Browse Source

采购上架编辑修改

hella_vue3
lijuncheng 6 months ago
parent
commit
086fc126d9
  1. 34
      src/mycomponents/detail/comJobDetailCard.vue
  2. 48
      src/mycomponents/package/packageList.vue
  3. 2
      src/mycomponents/scan/winScanPackAndLocationNoBalance.vue
  4. 4
      src/pages/purchaseReceipt/coms/comReceiptDetailCard.vue
  5. 3
      src/pages/purchaseReceipt/job/receiptDetail.vue
  6. 5
      src/pages/putaway/job/putawayDetail.vue

34
src/mycomponents/detail/comJobDetailCard.vue

@ -6,15 +6,17 @@
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" <itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowPackUnit="false"></itemCompareQty> :isShowPackUnit="false"></itemCompareQty>
</template> </template>
<package-list :dataContent="dataContent.subList" :isEdit="settingParam.allowModifyQty=='TRUE'" :settingParam="settingParam" @collapseChange="collapseChange"></package-list> <package-list :dataContent="dataContent.subList"
:isEdit="settingParam.allowModifyQty=='TRUE'"
:settingParam="settingParam"
@collapseChange="collapseChange"
@updateData="updateData"
></package-list>
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
<recommend-qty-edit ref=" receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> <recommend-qty-edit ref=" receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit> </recommend-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location>
<receipt-detail-info-popup ref="jobDetailPopup" :dataContent="showItem"></receipt-detail-info-popup>
<comMessage ref="message"></comMessage> <comMessage ref="message"></comMessage>
</view> </view>
</template> </template>
@ -36,6 +38,7 @@
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
emits: ["updateData"],
components: { components: {
itemCompareQty, itemCompareQty,
recommend, recommend,
@ -124,12 +127,8 @@
}, },
swipeClick(e, item) { swipeClick(e, item) {
if (e.content.text == "详情") { if (e.content.text == "编辑") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item) this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") { } else if (e.content.text == "移除") {
this.remove(item) this.remove(item)
} }
@ -138,20 +137,6 @@
this.editItem = item; this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty); this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
}, },
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode = code;
this.$emit('updateData')
},
detail(item) {
this.showItem = item;
this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) { remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?", this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => { res => {
@ -166,6 +151,9 @@
confirm(qty) { confirm(qty) {
this.editItem.handleQty = qty; this.editItem.handleQty = qty;
this.$emit('updateData') this.$emit('updateData')
},
updateData(){
this.$emit('updateData')
} }
} }
} }

48
src/mycomponents/package/packageList.vue

@ -5,15 +5,18 @@
<uni-collapse ref="collapse2" @change="collapseChange"> <uni-collapse ref="collapse2" @change="collapseChange">
<uni-collapse-item :disabled="false"> <uni-collapse-item :disabled="false">
<template v-slot:title> <template v-slot:title>
<package-card :dataContent="item" :isShowLocation="false" :isShowFromLocation ="isShowFromLocation" <package-card :dataContent="item" :isShowLocation="false"
></package-card> :isShowFromLocation="isShowFromLocation"></package-card>
</template> </template>
<view v-for="(pack,index) in item.packList" :key="pack.id" style=" width: 100%; background-color: antiquewhite;"> <view v-for="(pack,index) in item.packList" :key="pack.id"
<uni-swipe-action-item :right-options="(pack.scaned&&isEdit)?editAndRemoveOptions:removeOptions" style=" width: 100%; background-color: antiquewhite;">
@click="swipeClick($event,pack)"> <uni-swipe-action>
<package-card :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false" <uni-swipe-action-item :right-options="(pack.scaned&&isEdit)?editAndRemoveOptions : pack.scaned? removeOptions:options"
:isShowToLocation="false" :isShowBatch="false"></package-card> @click="swipeClick($event,pack)">
</uni-swipe-action-item> <package-card :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false"
:isShowToLocation="false" :isShowBatch="false"></package-card>
</uni-swipe-action-item>
</uni-swipe-action>
</view> </view>
</uni-collapse-item> </uni-collapse-item>
@ -21,6 +24,7 @@
</view> </view>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> <recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit> </recommend-qty-edit>
<comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -35,7 +39,7 @@
getEditRemoveOption getEditRemoveOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
emits: ["collapseChange"], emits: ["collapseChange", "updateData"],
components: { components: {
packageCard, packageCard,
recommendQtyEdit recommendQtyEdit
@ -46,12 +50,12 @@
editItem: {}, editItem: {},
options: [], options: [],
removeOptions: [], removeOptions: [],
editAndRemoveOptions:[] editAndRemoveOptions: []
} }
}, },
mounted() { mounted() {
this.removeOptions = getRemoveOption(); this.removeOptions = getRemoveOption();
this.editAndRemoveOptions =getEditRemoveOption() this.editAndRemoveOptions = getEditRemoveOption()
}, },
props: { props: {
dataContent: { dataContent: {
@ -91,7 +95,7 @@
type: Object, type: Object,
default: null default: null
}, },
isEdit:{ isEdit: {
type: Boolean, type: Boolean,
default: false default: false
} }
@ -104,8 +108,22 @@
swipeClick(e, item) { swipeClick(e, item) {
if (e.content.text == "编辑") { if (e.content.text == "编辑") {
this.edit(item) this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
} }
}, },
remove(item) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = 0
this.$emit('updateData')
this.$forceUpdate()
}
});
},
edit(item) { edit(item) {
this.editItem = item; this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty); this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
@ -180,11 +198,11 @@
isDevlement() { isDevlement() {
return config.isDevelopment; return config.isDevelopment;
}, },
confirm(qty){ confirm(qty) {
this.editItem.handleQty =qty; this.editItem.handleQty = qty;
this.$emit("updateData") this.$emit("updateData")
} }
} }
} }
</script> </script>

2
src/mycomponents/scan/winScanPackAndLocationNoBalance.vue

@ -28,7 +28,7 @@
<view v-if='allowModifyLocation'> <view v-if='allowModifyLocation'>
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位" <uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位"
@confirm="" style='height: 30rpx;border:1px solid #fff ;'></uni-combox> style='height: 30rpx;border:1px solid #fff ;'></uni-combox>
</view> </view>
<view v-else> <view v-else>
<text style="padding: 5px"> <text style="padding: 5px">

4
src/pages/purchaseReceipt/coms/comReceiptDetailCard.vue

@ -36,6 +36,7 @@
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
components: { components: {
itemCompareQty, itemCompareQty,
recommend, recommend,
@ -166,6 +167,9 @@
confirm(qty) { confirm(qty) {
this.editItem.handleQty = qty; this.editItem.handleQty = qty;
this.$emit('updateData') this.$emit('updateData')
},
updateData(){
this.$emit('updateData')
} }
} }
} }

3
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -334,7 +334,8 @@
}, },
updateData() { updateData() {
calcHandleQty(this.detailSource); calcTreeHandleQty(this.detailSource)
// calcHandleQty(this.detailSource);
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {

5
src/pages/putaway/job/putawayDetail.vue

@ -39,7 +39,6 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<winScanPackAndLocationNoBalance ref="scanPopup" @getResult='getScanResult' :allowNullBalance ="true"></winScanPackAndLocationNoBalance> <winScanPackAndLocationNoBalance ref="scanPopup" @getResult='getScanResult' :allowNullBalance ="true"></winScanPackAndLocationNoBalance>
<putaway-detail-info-popup ref="jobDetailPopup"></putaway-detail-info-popup>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -224,7 +223,9 @@
}, },
updateData() { updateData() {
this.calcHandleQty(); console.log("updateData")
// this.calcHandleQty();
calcTreeHandleQty(this.detailSource)
}, },
openScanPopup() { openScanPopup() {

Loading…
Cancel
Save