Commit d6e47ec7 by 杨树贤

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

parent ae2cce52
......@@ -33,7 +33,6 @@ class SupplierContractApiController extends Controller
'id',
'supplier_id',
'commission_rate',
'start_time',
'end_time',
'check_date',
]);
......@@ -41,8 +40,7 @@ class SupplierContractApiController extends Controller
$validator = \Validator::make($data, [
'supplier_id' => 'required|integer',
'start_time' => 'required|date',
'end_time' => 'required|date|after:start_time',
'end_time' => 'required|date',
'commission_rate' => 'required|numeric|max:100|min:1',
'check_date' => 'required|integer|min:1|max:31'
], [
......
......@@ -29,7 +29,6 @@ class SupplierContractService
{
try {
\DB::connection('web')->beginTransaction();
$data['start_time'] = strtotime($data['start_time']);
$data['end_time'] = strtotime($data['end_time']);
// 检查是否已存在相同供应商的合同
......@@ -56,8 +55,7 @@ class SupplierContractService
if ($oldData) {
$columnMap = [
'supplier_id' => '供应商',
'start_time' => '开始时间',
'end_time' => '结束时间',
'end_time' => '截止时间',
'commission_rate' => '抽佣比率',
'check_date' => '对账日期',
];
......
......@@ -58,6 +58,7 @@
admin.closeThisDialog();
}, 1000);
} else {
layer.close(loadIndex);
layer.msg(res.err_msg, {
icon: 5
});
......
......@@ -33,11 +33,6 @@
<div class="layui-form-item">
<label class="layui-form-label"><span class="require">*</span>合同有效期</label>
<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="结束日期"
class="layui-input" autocomplete="off" value="{{ $contract['end_time'] or '' }}">
</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