niexiting 11 months ago
parent
commit
6b0d89b282
  1. 17
      common/basic.js
  2. 3
      mycomponents/detail/comDetailCard.vue
  3. 4
      pages/count/job/countDetail.vue
  4. 4
      pages/customerReturn/job/returnDetail.vue
  5. 4
      pages/inspect/job/inspectDetail.vue
  6. 4
      pages/inspect/job/inspectFullDetail.vue
  7. 4
      pages/inspect/job/inspectResult.vue
  8. 4
      pages/inventoryMove/job/inventoryMoveDetail.vue
  9. 2
      pages/issue/request/issueRequestCreate.vue
  10. 4
      pages/productDismantle/job/productDismantleDetail.vue
  11. 14
      pages/productPutaway/job/productPutawayDetail.vue
  12. 5
      pages/productReceipt/job/productReceiptDetail.vue
  13. 4
      pages/productionReceipt/job/productionReceiptDetail.vue
  14. 4
      pages/productionReturn/job/returnDetail.vue
  15. 12
      pages/putaway/job/putawayDetail.vue
  16. 4
      pages/scrap/job/scrapJobDetail.vue
  17. 4
      pages/transfer/job/issueDetail.vue
  18. 4
      pages/transfer/job/transferDetail.vue
  19. 22
      pages/unPlanned/job/issueJobDetail.vue
  20. 11
      pages/unPlanned/job/receiptJobDetail.vue
  21. 2
      pages/unPlanned/record/receiptRecord.vue

17
common/basic.js

@ -992,3 +992,20 @@ export function navigateBack(backIndex) {
history.back(); history.back();
} }
} }
/**
* 深度克隆对象
* @param {*} target
*/
export function deepCopyData(target) {
// 克隆原始类型和null
if (!(target !== null && (typeof target === 'object' || typeof target === 'function'))) {
return target;
}
let cloneTarget = Array.isArray(target) ? [] : {};
// 克隆对象和数组
for (const key in target) {
cloneTarget[key] = this.deepCopyData(target[key]);
}
return cloneTarget;
}

3
mycomponents/detail/comDetailCard.vue

@ -31,10 +31,11 @@
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :isShowToLocation="false"> <recommend :detail="item" :isShowToLocation="false">
</recommend> </recommend>
<u-line />
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
</view> </view>
<u-line />
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit> <balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>

4
pages/count/job/countDetail.vue

@ -273,8 +273,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //

4
pages/customerReturn/job/returnDetail.vue

@ -226,8 +226,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //

4
pages/inspect/job/inspectDetail.vue

@ -270,8 +270,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //

4
pages/inspect/job/inspectFullDetail.vue

@ -286,8 +286,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //

4
pages/inspect/job/inspectResult.vue

@ -479,9 +479,9 @@
if (res.data) { if (res.data) {
var hint=""; var hint="";
if(this.jobContent.nextAction=="FULL_INSPECT"){ if(this.jobContent.nextAction=="FULL_INSPECT"){
hint ="提交成功<br>生成到货检验任务" + res.data hint ="提交成功<br>生成到货检验任务<br>" + res.data
}else { }else {
hint ="提交成功<br>生成到货检验记录" + res.data hint ="提交成功<br>生成到货检验记录<br>" + res.data
} }
this.showCommitSuccessMessage(hint) this.showCommitSuccessMessage(hint)
} else { } else {

4
pages/inventoryMove/job/inventoryMoveDetail.vue

@ -267,8 +267,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //

2
pages/issue/request/issueRequestCreate.vue

@ -89,7 +89,7 @@
if (this.detailSource.subList.length == 0) { if (this.detailSource.subList.length == 0) {
this.detailSource = { this.detailSource = {
workshopCode: item.workshopCode, workShopCode: item.workshopCode,
workShopName: item.workShopName, workShopName: item.workShopName,
productionLineCode: item.productionLineCode, productionLineCode: item.productionLineCode,
productionLineName: item.productionLineName, productionLineName: item.productionLineName,

4
pages/productDismantle/job/productDismantleDetail.vue

@ -241,8 +241,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //

14
pages/productPutaway/job/productPutawayDetail.vue

@ -142,7 +142,7 @@
if (e.from == 'backbutton') { if (e.from == 'backbutton') {
if (this.received) { if (this.received) {
// //
cancleProductPutawayJob(this.id).then(res => { cancleTakeProductPutawayJob(this.id).then(res => {
uni.navigateBack(); uni.navigateBack();
}).catch(error => { }).catch(error => {
uni.navigateBack(); uni.navigateBack();
@ -241,8 +241,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //
@ -276,15 +276,13 @@
var itemDetail = detail.subList.find(r => { var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber && return r.packingNumber == packingNumber &&
r.batch == batch && r.batch == batch &&
r.fromLocationCode == locationCode r.fromLocationCode == result.fromLocationCode
}) })
if (itemDetail == undefined) { if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode + this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】不在列表中")
"]不在列表中")
} else { } else {
if (itemDetail.scaned) { if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode + this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】已经扫描")
"]已经扫描")
} else { } else {
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);

5
pages/productReceipt/job/productReceiptDetail.vue

@ -14,7 +14,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false" <comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationTypeList='tolocationTypeList'> @remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'>
</comProductDetailCard> </comProductDetailCard>
</view> </view>
<u-line /> <u-line />
@ -28,7 +28,7 @@
<view class=""> <view class="">
<requiredLocation title="收货库位" :locationCode="toLocationCode" <requiredLocation title="收货库位" :locationCode="toLocationCode"
:isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode' :isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation> :locationTypeList="toLocationTypeList"></requiredLocation>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -104,7 +104,6 @@
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
toLocationTypeList: [], toLocationTypeList: [],
toLocationInfo: {},
managementList: [] managementList: []
}; };

4
pages/productionReceipt/job/productionReceiptDetail.vue

@ -226,8 +226,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //

4
pages/productionReturn/job/returnDetail.vue

@ -243,8 +243,8 @@
// let item = this.detailSource[i]; // let item = this.detailSource[i];
// item.subList.forEach(l => { // item.subList.forEach(l => {
// // // //
// var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) // var location = fromlocationList.find(res => res == l.fromLocationCode)
// if (location.length == 0) { // if (location == undefined) {
// fromlocationList.push(l.fromLocationCode); // fromlocationList.push(l.fromLocationCode);
// } // }
// // // //

12
pages/putaway/job/putawayDetail.vue

@ -250,8 +250,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //
@ -284,13 +284,13 @@
} else { } else {
var itemDetail = detail.subList.find(r => { var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber && return r.packingNumber == packingNumber &&
r.batch == batch r.batch == batch&&
r.fromLocationCode == result.fromLocationCode
}) })
if (itemDetail == undefined) { if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在列表中") this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】不在列表中")
} else {
if (itemDetail.scaned) { if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") this.showErrorMessage("箱码" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】已经扫描")
} else { } else {
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);

4
pages/scrap/job/scrapJobDetail.vue

@ -374,8 +374,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //

4
pages/transfer/job/issueDetail.vue

@ -230,8 +230,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //

4
pages/transfer/job/transferDetail.vue

@ -281,8 +281,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //

22
pages/unPlanned/job/issueJobDetail.vue

@ -218,13 +218,14 @@
} else { } else {
var itemDetail = detail.subList.find(r => { var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber && return r.packingNumber == packingNumber &&
r.batch == batch r.batch == batch&&
r.fromLocationCode == result.fromLocationCode
}) })
if (itemDetail == undefined) { if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在列表中") this.showErrorMessage("箱码" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】不在列表中")
} else { } else {
if (itemDetail.scaned) { if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") this.showErrorMessage("箱码" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】已经扫描")
} else { } else {
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
@ -362,6 +363,17 @@
}) })
}, },
showQuestionMessage(message, callback) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage(message, res => {
if (res) {
callback(res);
}
});
})
},
openScanPopup() { openScanPopup() {
let fromlocationCode = ''; let fromlocationCode = '';
let fromlocationList = []; let fromlocationList = [];
@ -369,8 +381,8 @@
let item = this.detailSource[i]; let item = this.detailSource[i];
item.subList.forEach(l => { item.subList.forEach(l => {
// //
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location.length == 0) { if (location == undefined) {
fromlocationList.push(l.fromLocationCode); fromlocationList.push(l.fromLocationCode);
} }
// //

11
pages/unPlanned/job/receiptJobDetail.vue

@ -37,7 +37,7 @@
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack> <win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HPQ,HMQ"></win-scan-pack>
<com-message ref="comMessage"></com-message> <com-message ref="comMessage"></com-message>
</view> </view>
@ -217,15 +217,16 @@
var itemCode = result.label.itemCode; var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode); var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) { if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中") this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else { } else {
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch
&& r.fromLocationCode == result.fromLocationCode);
if (itemDetail == undefined) { if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】不在列表中") this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】不在列表中")
} else { } else {
if (itemDetail.scaned) { if (itemDetail.scaned) {
this.showMessage("箱码【" + packingNumber + "】已经扫描") this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】已经扫描")
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty); itemDetail.handleQty = Number(result.label.qty);

2
pages/unPlanned/record/receiptRecord.vue

@ -37,7 +37,7 @@
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' :title="'箱码'"></win-scan-pack> <win-scan-pack ref="scanPopup" @getResult='getScanResult' :title="'箱码'" headerType="HPQ,HMQ"></win-scan-pack>
<com-message ref="comMessage"></com-message> <com-message ref="comMessage"></com-message>
</view> </view>
</template> </template>

Loading…
Cancel
Save