Browse Source

YT-1051PDA采购收货修改数量大于包装数量时提示语不正确

intex
zhang_li 5 days ago
parent
commit
eb03f9bfdc
  1. 10
      src/mycomponents/package/packageList.vue
  2. 14
      src/mycomponents/qty/recommendQtyEdit.vue
  3. 7
      src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue
  4. 6
      src/pages/purchaseReceipt/job/receiptDetail.vue

10
src/mycomponents/package/packageList.vue

@ -33,7 +33,7 @@
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
</view> </view>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> <recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm" :isNumPackTips='isNumPackTips'>
</recommend-qty-edit> </recommend-qty-edit>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -119,7 +119,11 @@
isShowPackingNumberProps:{ isShowPackingNumberProps:{
type:Boolean, type:Boolean,
default:false default:false
} },
isNumPackTips: {
type: Boolean,
default: false
},
}, },
watch: { watch: {
@ -172,7 +176,7 @@
edit(item) { edit(item) {
this.editItem = item; this.editItem = item;
console.log(777,item) console.log(777,item)
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty); this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty, item.packQty);
}, },
collapseChange() { collapseChange() {
this.$emit("collapseChange"); this.$emit("collapseChange");

14
src/mycomponents/qty/recommendQtyEdit.vue

@ -116,6 +116,11 @@ import { nextTick } from 'vue';
type: Boolean, type: Boolean,
default: true default: true
}, },
//
isNumPackTips: {
type: Boolean,
default: false
},
showBalanceQty: { showBalanceQty: {
type: Boolean, type: Boolean,
default: false default: false
@ -182,6 +187,15 @@ import { nextTick } from 'vue';
setValue() { setValue() {
// var recommendQty = Number(this.dataContent.qty); // var recommendQty = Number(this.dataContent.qty);
// var labelQty = Number(this.dataContent.record.label.qty); // var labelQty = Number(this.dataContent.record.label.qty);
if (this.allQty > parseFloat(this.dataContent.packQty) && this.isNumPackTips) {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于包装数量[' +
this.dataContent.packQty +
']',
res => {
this.allQty = this.dataContent.packQty
})
return
}
if (this.allQty > this.labelQty && this.isNumTips) { if (this.allQty > this.labelQty && this.isNumTips) {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于标签数量[' + this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于标签数量[' +
this.labelQty + this.labelQty +

7
src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue

@ -13,7 +13,7 @@
</template> </template>
<package-list ref='packageListRef' :dataContent="dataContent.subList" :isEdit="false" <package-list ref='packageListRef' :dataContent="dataContent.subList" :isEdit="false"
:settingParam="settingParam" @collapseChange="collapseChange" @updateData="updateData" :settingParam="settingParam" @collapseChange="collapseChange" @updateData="updateData"
:isShowFromLocation="false" :isShowPackingNumberProps='true'></package-list> :isShowFromLocation="false" :isShowPackingNumberProps='true' :isNumPackTips='isNumPackTips'></package-list>
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
@ -68,7 +68,10 @@
type: Object, type: Object,
default: null default: null
}, },
isNumPackTips: {
type: Boolean,
default: false
},
}, },
watch: { watch: {

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

@ -34,7 +34,7 @@
<!-- 管理精度是批次 --> <!-- 管理精度是批次 -->
<comReceiptDetailCardBacth ref='comReceiptDetailCardBacthRef' :dataContent="item" :index="index" :settingParam="jobContent" <comReceiptDetailCardBacth ref='comReceiptDetailCardBacthRef' :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList' @remove="updateData" @updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList'
v-if="managementType == 'BY_BATCH' || managementType =='BY_QUANTITY'"> v-if="managementType == 'BY_BATCH' || managementType =='BY_QUANTITY'" :isNumPackTips='true'>
</comReceiptDetailCardBacth> </comReceiptDetailCardBacth>
<com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent" @remove="updateData" <com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent" @remove="updateData"
@updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList' v-else> @updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList' v-else>
@ -502,13 +502,13 @@
let handleQtySub = calc.sub(parseFloat(batchDetailList[i].qty),parseFloat(packAllHandleQty)) let handleQtySub = calc.sub(parseFloat(batchDetailList[i].qty),parseFloat(packAllHandleQty))
let pack = {} let pack = {}
pack.packingNumber =packingNumber pack.packingNumber =packingNumber
pack.packQty = result.package.packQty pack.packQty = Number(result.package.packQty);
pack.packUnit = result.package.packUnit pack.packUnit = result.package.packUnit
pack.qty = batchDetailList[i].qty pack.qty = batchDetailList[i].qty
pack.toLocationCode = this.toLocationCode; pack.toLocationCode = this.toLocationCode;
console.log(999,result.package) console.log(999,result.package)
pack.labelQty = Number(result.package.packQty); pack.labelQty = Number(result.label.qty);
pack.scaned = true; pack.scaned = true;
// //
if(handleQtySub >= parseFloat(qty)){ if(handleQtySub >= parseFloat(qty)){

Loading…
Cancel
Save