Commit d6e47ec7 by 杨树贤

去掉合同开始时间和js卡主问题

parent ae2cce52
...@@ -33,7 +33,6 @@ class SupplierContractApiController extends Controller ...@@ -33,7 +33,6 @@ class SupplierContractApiController extends Controller
'id', 'id',
'supplier_id', 'supplier_id',
'commission_rate', 'commission_rate',
'start_time',
'end_time', 'end_time',
'check_date', 'check_date',
]); ]);
...@@ -41,8 +40,7 @@ class SupplierContractApiController extends Controller ...@@ -41,8 +40,7 @@ class SupplierContractApiController extends Controller
$validator = \Validator::make($data, [ $validator = \Validator::make($data, [
'supplier_id' => 'required|integer', 'supplier_id' => 'required|integer',
'start_time' => 'required|date', 'end_time' => 'required|date',
'end_time' => 'required|date|after:start_time',
'commission_rate' => 'required|numeric|max:100|min:1', 'commission_rate' => 'required|numeric|max:100|min:1',
'check_date' => 'required|integer|min:1|max:31' 'check_date' => 'required|integer|min:1|max:31'
], [ ], [
......
...@@ -29,7 +29,6 @@ class SupplierContractService ...@@ -29,7 +29,6 @@ class SupplierContractService
{ {
try { try {
\DB::connection('web')->beginTransaction(); \DB::connection('web')->beginTransaction();
$data['start_time'] = strtotime($data['start_time']);
$data['end_time'] = strtotime($data['end_time']); $data['end_time'] = strtotime($data['end_time']);
// 检查是否已存在相同供应商的合同 // 检查是否已存在相同供应商的合同
...@@ -56,8 +55,7 @@ class SupplierContractService ...@@ -56,8 +55,7 @@ class SupplierContractService
if ($oldData) { if ($oldData) {
$columnMap = [ $columnMap = [
'supplier_id' => '供应商', 'supplier_id' => '供应商',
'start_time' => '开始时间', 'end_time' => '截止时间',
'end_time' => '结束时间',
'commission_rate' => '抽佣比率', 'commission_rate' => '抽佣比率',
'check_date' => '对账日期', 'check_date' => '对账日期',
]; ];
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
admin.closeThisDialog(); admin.closeThisDialog();
}, 1000); }, 1000);
} else { } else {
layer.close(loadIndex);
layer.msg(res.err_msg, { layer.msg(res.err_msg, {
icon: 5 icon: 5
}); });
......
...@@ -33,11 +33,6 @@ ...@@ -33,11 +33,6 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><span class="require">*</span>合同有效期</label> <label class="layui-form-label"><span class="require">*</span>合同有效期</label>
<div class="layui-input-inline" style="width: 150px;"> <div class="layui-input-inline" style="width: 150px;">
<input type="text" name="start_time" id="start_time" lay-verify="required" placeholder="开始日期"
class="layui-input" autocomplete="off" value="{{ $contract['start_time'] or '' }}">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width: 150px;">
<input type="text" name="end_time" id="end_time" lay-verify="required" placeholder="结束日期" <input type="text" name="end_time" id="end_time" lay-verify="required" placeholder="结束日期"
class="layui-input" autocomplete="off" value="{{ $contract['end_time'] or '' }}"> class="layui-input" autocomplete="off" value="{{ $contract['end_time'] or '' }}">
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment