Browse Source

修改校验

wms3.0_pda
lijuncheng 11 months ago
parent
commit
b7e18fe0c5
  1. 17
      common/basic.js
  2. 3
      mycomponents/detail/comDetailCard.vue
  3. 10
      pages/productPutaway/job/productPutawayDetail.vue
  4. 5
      pages/productReceipt/job/productReceiptDetail.vue
  5. 8
      pages/putaway/job/putawayDetail.vue

17
common/basic.js

@ -992,3 +992,20 @@ export function navigateBack(backIndex) {
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">
<recommend :detail="item" :isShowToLocation="false">
</recommend>
<u-line />
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<u-line />
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>

10
pages/productPutaway/job/productPutawayDetail.vue

@ -142,7 +142,7 @@
if (e.from == 'backbutton') {
if (this.received) {
//
cancleProductPutawayJob(this.id).then(res => {
cancleTakeProductPutawayJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
@ -276,15 +276,13 @@
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch &&
r.fromLocationCode == locationCode
r.fromLocationCode == result.fromLocationCode
})
if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode +
"]不在列表中")
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】不在列表中")
} else {
if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode +
"]已经扫描")
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】已经扫描")
} else {
let itemStatus = getInventoryStatusName(itemDetail.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="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationTypeList='tolocationTypeList'>
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'>
</comProductDetailCard>
</view>
<u-line />
@ -28,7 +28,7 @@
<view class="">
<requiredLocation title="收货库位" :locationCode="toLocationCode"
:isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
:locationTypeList="toLocationTypeList"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -104,7 +104,6 @@
subList: [], //subList
detailSource: [], //
toLocationTypeList: [],
toLocationInfo: {},
managementList: []
};

8
pages/putaway/job/putawayDetail.vue

@ -284,13 +284,13 @@
} else {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch
r.batch == batch&&
r.fromLocationCode == result.fromLocationCode
})
if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在列表中")
} else {
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】不在列表中")
if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
this.showErrorMessage("箱码" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】已经扫描")
} else {
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);

Loading…
Cancel
Save