From 9cab6b5cc30b7142330bf8ff1e967cad936382e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E5=B9=B3=E8=89=BA?= <52643018@qq.com> Date: Wed, 4 Aug 2021 16:22:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=87=BA=E5=BA=93=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=8B=A6=E6=88=AA=E6=9C=AA=E8=BE=93=E5=85=A5=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- canteen/pages/delivery/apply.vue | 18 +++++++++++++++--- supplier/pages/gonghuo/order.vue | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/canteen/pages/delivery/apply.vue b/canteen/pages/delivery/apply.vue index ec13355..a5ba3b0 100644 --- a/canteen/pages/delivery/apply.vue +++ b/canteen/pages/delivery/apply.vue @@ -191,15 +191,18 @@ if(this.contents.length <= 0) { return this.$msg('您未选择物资') } - + let is_empty = false; + console.log("总的", this.contents) let list = this.contents.map(item => { + if(!item.delivery_number.value){ + is_empty = true; + } if(Number(item.delivery_number.value) > item.stock) { console.log('循环几次') uni.showModal({ title: '温馨提示', content: `物资:${item.material_name},仅剩${item.stock}单位库存,已超出您申请的数量,是否直接修改成出库${item.stock}单位`, - cancelColor: '#11D189', - confirmColor: '#FF0000', + confirmColor: '#11D189', success: result => { if(result.confirm){ this.isStock = true @@ -251,6 +254,15 @@ _api = this.API.API_EDITOUTORDER; } let state = ['待确认', '已确认'][_t]; // 传入状态 + if(is_empty){ + uni.showModal({ + title: '温馨提示', + content: '您有物资未填写出库数量, 请填写', + showCancel: false, + confirmColor: '#11D189' + }) + return; + } this.$http(_api, { data: list, state: state diff --git a/supplier/pages/gonghuo/order.vue b/supplier/pages/gonghuo/order.vue index a0f3280..9904d86 100644 --- a/supplier/pages/gonghuo/order.vue +++ b/supplier/pages/gonghuo/order.vue @@ -1,7 +1,7 @@