From f1010266e195cff2356d5d2a36eff7ee28c77b61 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Mon, 15 Jan 2024 15:00:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=96=99=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=8F=AF=E4=BB=A5=E7=A7=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/issue/coms/comIssueRequestCreator.vue | 35 +++++++-------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/pages/issue/coms/comIssueRequestCreator.vue b/pages/issue/coms/comIssueRequestCreator.vue index 65b8fc04..29827a1e 100644 --- a/pages/issue/coms/comIssueRequestCreator.vue +++ b/pages/issue/coms/comIssueRequestCreator.vue @@ -8,7 +8,7 @@ - + @@ -76,13 +76,6 @@ }, }, watch: { - dataContent: { - handler(newval, oldval) { - this.requestItem = this.dataContent.subList[0]; - }, - immediate: true, - deep: true - } }, data() { @@ -94,9 +87,9 @@ } }, - requestItem: {}, detailOptions: [], - scanOptions: [] + scanOptions: [], + options:[] } }, @@ -105,26 +98,27 @@ this.detailOptions = getDetailOption(); } if (this.scanOptions.length == 0) { - this.scanOptions = getDetailEditRemoveOption(); + this.scanOptions = getDetailRemoveOption(); // if (this.dataContent.allowModifyQty == 1) { // this.scanOptions = getDetailEditRemoveOption(); // } else { // this.scanOptions = getDetailRemoveOption(); // } } - if(!this.isSwipe){ - this.detailOptions=[] - } + this.options =this.scanOptions + // if(!this.isSwipe){ + // this.detailOptions=[] + // } }, methods: { - swipeClick(e, item) { + swipeClick(e, item,index) { if (e.content.text == "详情") { this.detail(item) } else if (e.content.text == "编辑") { this.edit(item) } else if (e.content.text == "移除") { - this.remove(item) + this.remove(item,index) } }, edit(item) { @@ -138,17 +132,12 @@ // // this.showItem = item; // // this.$refs.jobDetailPopup.openPopup(item) }, - remove(item) { + remove(item,index) { this.$refs.message.showQuestionMessage("确定移除扫描信息?", res => { if (res) { - item.scaned = false - item.record = {} - item.balance = {} - item.inventoryStatus = item.RecommendInventoryStatus - // item.record.qty = 0; + this.dataContent.subList.splice(index, 1) this.$forceUpdate() - this.$emit('remove', item) } }); },