Browse Source

修改装配收货

hella_vue3
niexiting 6 months ago
parent
commit
ab69394079
  1. 5
      src/mycomponents/scan/winComScanFG.vue
  2. 4
      src/mycomponents/scan/winScanFGLabel.vue
  3. 11
      src/pages/productReceipt/coms/comProductDetailCard.vue
  4. 115
      src/pages/productReceipt/job/FgProductReceiptDetail.vue

5
src/mycomponents/scan/winComScanFG.vue

@ -166,7 +166,6 @@
} }
try { try {
let itemCode = content.substr(0, 10); let itemCode = content.substr(0, 10);
let productDate = content.substr(10, 8); let productDate = content.substr(10, 8);
let batch = content.substr(18, 3); let batch = content.substr(18, 3);
@ -177,9 +176,9 @@
productDate: productDate, productDate: productDate,
batch: batch, batch: batch,
order: order, order: order,
qty: 1,
content: content, content: content,
success: true,
success: true
}; };
that.clear(); that.clear();
that.$emit("getResult", scanResult); that.$emit("getResult", scanResult);

4
src/mycomponents/scan/winScanFGLabel.vue

@ -41,10 +41,6 @@
isShowHistory: { isShowHistory: {
type: Boolean, type: Boolean,
default: true default: true
},
headerType: {
type: String,
default: 'HPQ'
} }
}, },
data() { data() {

11
src/pages/productReceipt/coms/comProductDetailCard.vue

@ -12,6 +12,11 @@
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :isShowFromLocation="false" <recommend :detail="item" :isShowFromLocation="false"
:isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommend> :isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommend>
<view v-if="item.fgList!=undefined && item.fgList.length>0" class="card_view"
style="margin-left: 20px;"
v-for="(fg, index) in item.fgList">
<com-fg-card :detail='fg'></com-fg-card>
</view>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
</view> </view>
@ -34,7 +39,7 @@
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue' import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import productDetailInfoPopup from '@/pages/productReceipt/coms/productDetailInfoPopup.vue' import productDetailInfoPopup from '@/pages/productReceipt/coms/productDetailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue"
import { import {
getDetailOption, getDetailOption,
getPurchaseReceiptOption getPurchaseReceiptOption
@ -47,7 +52,9 @@
recommendQtyEdit, recommendQtyEdit,
jobDetailPopup, jobDetailPopup,
productDetailInfoPopup, productDetailInfoPopup,
winScanLocation winScanLocation,
comFgCard
}, },
props: { props: {
dataContent: { dataContent: {

115
src/pages/productReceipt/job/FgProductReceiptDetail.vue

@ -17,12 +17,7 @@
<com-product-detail-card :dataContent="item" :settingParam="jobContent" :isShowLocation="false" <com-product-detail-card :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'> @remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'>
</com-product-detail-card> </com-product-detail-card>
<view class="card_view" style="margin-left: 20px; border-bottom: 1px solid #e0e0e0;"
v-for="(fg, index) in fgList">
<com-fg-card :detail='fg'></com-fg-card>
</view>
</view> </view>
<view class="split_line"></view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -76,6 +71,13 @@
getScanCount getScanCount
} from '@/common/detail.js'; } from '@/common/detail.js';
import {
Decimal
} from 'decimal.js'; //
import {
calc
} from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue' import locationCompare from '@/mycomponents/location/locationCompare.vue'
@ -83,7 +85,7 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue" import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue"
export default { export default {
name: 'receipt_detail', name: 'receipt_detail',
@ -94,7 +96,6 @@
winScanFgLabel, winScanFgLabel,
jobTop, jobTop,
comProductDetailCard, comProductDetailCard,
comFgCard
}, },
data() { data() {
return { return {
@ -202,26 +203,45 @@
}, },
getScanResult(result) { getScanResult(result) {
let source = that.detailSource; //TODO
this.fgList.push(result); let that = this;
}, if (that.detailSource.length > 0) {
let item = that.detailSource[0]; //
// result.uom = item.uom;
continueScan() { if (item.subList.length > 0) {
this.scanCount = getScanCount(this.subList); let subItem = item.subList[0];
if (this.scanCount == this.subList.length) { if (subItem.fgList == undefined) {
this.closeScanPopup(); subItem.fgList = [];
} else { }
this.scanPopupGetFocus(); subItem.fgList.push(result);
that.calcFgQty(this.detailSource);
setTimeout(r => {
this.scanPopupGetFocus();
}, 500)
}
} }
}, },
calcFgQty() {
let that = this;
that.detailSource.forEach(item => {
item.subList.forEach(pack => {
pack.handleQty = new Decimal(0).toNumber();
pack.fgList.forEach(fg => {
if (fg != null) {
fg.qty = new Decimal(fg.qty).toNumber();
pack.handleQty = calc.add(pack.handleQty, fg.qty);
// item.qty = calc.add(item.qty, detail.qty);
}
})
})
})
},
updateData() { updateData() {
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
}, },
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup();
}, },
@ -230,16 +250,15 @@
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { // this.$refs.comMessage.showQuestionMessage("[" + code + "]", res => {
this.toLocationCode = code this.toLocationCode = code
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
detail.toLocationCode = code detail.toLocationCode = code
})
}) })
}) })
// })
}, },
checkLocation() { checkLocation() {
@ -248,7 +267,6 @@
this.showMessageHint('请扫描收货库位', callback => { this.showMessageHint('请扫描收货库位', callback => {
this.$refs.comScanLocation.showLocation(); this.$refs.comScanLocation.showLocation();
}) })
return isPass = false; return isPass = false;
} }
return isPass; return isPass;
@ -263,33 +281,30 @@
}, },
commit() { commit() {
this.scanCount = getScanCount(this.subList); // this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) { // if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描") // this.showErrorMessage("0,")
return; // return;
} // }
// //
if (!this.checkLocation()) { if (!this.checkLocation()) {
return return
} }
this.detailSource.forEach(item => {
item.subList.forEach(subitem => {
// if (subitem.handleQty == undefined) {
if (this.scanCount == this.subList.length) { this.showMessage("还没扫码成品不能提交")
this.submitJob(); } else {
} else if (this.scanCount < this.subList.length) { if (subitem.handleQty != subitem.packQty) {
// this.showQuestionMessage('制品数量不等于包装数量,是否继续提交?', res => {
if (this.jobContent.allowPartialComplete == "TRUE") { if (res) {
// this.submitJob();
this.submitJob(); }
} else { });
// }
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList }
.length + })
"]"); })
}
}
}, },
submitJob() { submitJob() {

Loading…
Cancel
Save