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(); 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>

10
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();
@ -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: []
}; };

8
pages/putaway/job/putawayDetail.vue

@ -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);

Loading…
Cancel
Save