Browse Source

采购上架编辑修改

hella_vue3
lijuncheng 6 months ago
parent
commit
086fc126d9
  1. 34
      src/mycomponents/detail/comJobDetailCard.vue
  2. 38
      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"
:isShowPackUnit="false"></itemCompareQty>
</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>
<recommend-qty-edit ref=" receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</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>
</view>
</template>
@ -36,6 +38,7 @@
} from '@/common/array.js';
export default {
emits: ["updateData"],
components: {
itemCompareQty,
recommend,
@ -124,12 +127,8 @@
},
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
@ -138,20 +137,6 @@
this.editItem = item;
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) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
@ -166,6 +151,9 @@
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
},
updateData(){
this.$emit('updateData')
}
}
}

38
src/mycomponents/package/packageList.vue

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

2
src/mycomponents/scan/winScanPackAndLocationNoBalance.vue

@ -28,7 +28,7 @@
<view v-if='allowModifyLocation'>
<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 v-else>
<text style="padding: 5px">

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

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

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

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

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

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

Loading…
Cancel
Save