From c3a675b9f61fc672a2e0bcec4ea2f2ea07a0b15b Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 20 Jul 2023 09:55:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E5=BA=93=E8=BF=90=E5=8D=95=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=A8=A1=E5=9D=97=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/warehouse/warehouseWaybill.vue | 48 +++++++++++++++++++++--- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/src/views/warehouse/warehouseWaybill.vue b/src/views/warehouse/warehouseWaybill.vue index 62c4b480..b76fdf2a 100644 --- a/src/views/warehouse/warehouseWaybill.vue +++ b/src/views/warehouse/warehouseWaybill.vue @@ -328,7 +328,7 @@ {{ itemlimit.productName }}
- +
@@ -365,7 +365,7 @@
- 取消 + 取消 确认
@@ -783,7 +783,7 @@ export default { goods: [ { productName: '', - splitNum: 0, + splitNum: '', }, ], }, @@ -796,7 +796,7 @@ export default { goods: [ { productName: '', - splitNum: 0, + splitNum: '', }, ], }, @@ -1097,16 +1097,46 @@ export default { var proN = t[i]; var o = {}; o.productName = proN; - o.splitNum = 0; arr[i] = o; } return arr; }, - + // inputChange(e){//验证输入饰品件数 + // var self = this + // var o = e.target + // o.value=o.value.replace(/[^\d.]/g,'') + // o.value = o.value.replace(/[^\d.]/g,""); // 清除“数字”和“.”以外的字符 + // o.value = o.value.replace(/\./g,""); // 只保留第一个. 清除多余的 + // if(o.value.indexOf(".")< 0 && o.value !=""){// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 + // o.value= parseFloat(o.value); + // } + // if(o.value.toString().split(".")[0].length>8){ // 整数部分大于8的时候,限制只能输入8位 + // if(o.value.toString().indexOf(".")>-1){ + // o.value = o.value.toString().split(".")[0].substr(0,8)+"."+o.value.toString().split(".")[1] + // } + // else{ + // o.value = o.value.toString().split(".")[0].substr(0,8) + // } + // } + // //o.value //这个就是最后过来之后的值 + // this.value = o.value + // }, hidedial() { + //判 + let row = []; for (let index = 0; index < this.orderlist.length; index++) { const element = this.orderlist[index]; + if(element.goods){ + var o = element.goods[index] + if(!o.splitNum){ + this.$message({ + type: 'waring', + message: '请输入拆分数量!', + }); + return + } + } let obj = { waybillNo: this.rowobj.waybillNo, customerPerson: element.name, @@ -1116,17 +1146,23 @@ export default { }; row.push(obj); } + console.log(row) splitOrder(row).then(res => { const data = res.data.data; this.page.total = data.total; this.data = data.records; this.loading = false; + this.orderlist = []; this.selectionClear(); }); this.dialogTableVisible = false; }, + close() { + this.dialogTableVisible = false; + }, + addorder() { // 实现对对象内包含的元素进行copy