Commit 7049e848 by mushishixian

fix

parent 2cf1da52
......@@ -97,10 +97,15 @@ class SupplierReceiptApiController extends Controller
//修改供应商为审核状态
$supplierId = $model->where('receipt_id', $receiptId)->value('supplier_id');
$supplierModel = new SupplierChannelModel();
$supplierModel->where('supplier_id', $supplierId)->update([
'update_time' => time(),
'status' => 1,
]);
$supplierStatus = $supplierModel->where('supplier_id',$supplierId)->value('status');
//不等于-1的时候是第一次新增供应商,单独银行信息,不需要修改状态
if ($supplierStatus != SupplierChannelModel::STATUS_PENDING) {
$supplierModel = new SupplierChannelModel();
$supplierModel->where('supplier_id', $supplierId)->update([
'update_time' => time(),
'status' => 1,
]);
}
$this->response(0, '操作成功');
}
$this->response(-1, '操作失败');
......
......@@ -6,7 +6,8 @@
const admin = layui.admin;
//提交数据
form.on('submit(addSupplierReceipt)', function (data) {
layer.confirm('确定要保存银行信息吗?一旦保存,该供应商就会再次进入审核阶段', function (index) {
// layer.confirm('确定要保存银行信息吗?一旦保存,该供应商就会再次进入审核阶段', function (index) {
layer.confirm('确定要保存银行信息吗?', function (index) {
let res = ajax('/api/supplier_receipt/AddSupplierReceipt', data.field);
if (!res) {
layer.msg('网络错误,请重试', {icon: 6});
......
......@@ -67,7 +67,13 @@
// })
// // d.layId表示当前tab的url
// //判断列表是否需要刷新
// if (d.layId.search('SupplierList') !== -1) {
if (d.layId.search('SupplierList') !== -1) {
// alert(123);
// $(function () {
// $('.admin-iframe').contents().find('#getSupplierListButton').click()
// })
}
// }
// let needFreshList = admin.getTempData("needFreshList");
// if (needFreshList) {
// // admin.putTempData("needFreshList",0)
......@@ -85,6 +91,7 @@
// console.log(data)
// }
// }
// console.log($('.admin-iframe').contents().find('#getSupplierListButton').click());
});
});
</script>
......
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