Browse Source

修改发料申请可以移除

wms3.0_pda
lijuncheng 1 year ago
parent
commit
f1010266e1
  1. 35
      pages/issue/coms/comIssueRequestCreator.vue

35
pages/issue/coms/comIssueRequestCreator.vue

@ -8,7 +8,7 @@
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in dataContent.subList" :key="index"> <view v-for="(item, index) in dataContent.subList" :key="index">
<uni-swipe-action-item @click="swipeClick($event,item)" :right-options="detailOptions"> <uni-swipe-action-item @click="swipeClick($event,item,index)" :right-options="options">
<item-qty :dataContent="item" :isShowStdPack="false"> <item-qty :dataContent="item" :isShowStdPack="false">
</item-qty> </item-qty>
<u-line /> <u-line />
@ -76,13 +76,6 @@
}, },
}, },
watch: { watch: {
dataContent: {
handler(newval, oldval) {
this.requestItem = this.dataContent.subList[0];
},
immediate: true,
deep: true
}
}, },
data() { data() {
@ -94,9 +87,9 @@
} }
}, },
requestItem: {},
detailOptions: [], detailOptions: [],
scanOptions: [] scanOptions: [],
options:[]
} }
}, },
@ -105,26 +98,27 @@
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
} }
if (this.scanOptions.length == 0) { if (this.scanOptions.length == 0) {
this.scanOptions = getDetailEditRemoveOption(); this.scanOptions = getDetailRemoveOption();
// if (this.dataContent.allowModifyQty == 1) { // if (this.dataContent.allowModifyQty == 1) {
// this.scanOptions = getDetailEditRemoveOption(); // this.scanOptions = getDetailEditRemoveOption();
// } else { // } else {
// this.scanOptions = getDetailRemoveOption(); // this.scanOptions = getDetailRemoveOption();
// } // }
} }
if(!this.isSwipe){ this.options =this.scanOptions
this.detailOptions=[] // if(!this.isSwipe){
} // this.detailOptions=[]
// }
}, },
methods: { methods: {
swipeClick(e, item) { swipeClick(e, item,index) {
if (e.content.text == "详情") { if (e.content.text == "详情") {
this.detail(item) this.detail(item)
} else if (e.content.text == "编辑") { } else if (e.content.text == "编辑") {
this.edit(item) this.edit(item)
} else if (e.content.text == "移除") { } else if (e.content.text == "移除") {
this.remove(item) this.remove(item,index)
} }
}, },
edit(item) { edit(item) {
@ -138,17 +132,12 @@
// // this.showItem = item; // // this.showItem = item;
// // this.$refs.jobDetailPopup.openPopup(item) // // this.$refs.jobDetailPopup.openPopup(item)
}, },
remove(item) { remove(item,index) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?", this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => { res => {
if (res) { if (res) {
item.scaned = false this.dataContent.subList.splice(index, 1)
item.record = {}
item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus
// item.record.qty = 0;
this.$forceUpdate() this.$forceUpdate()
this.$emit('remove', item)
} }
}); });
}, },

Loading…
Cancel
Save