|
|
@ -1,60 +1,87 @@ |
|
|
|
<template> |
|
|
|
<view class="page-wraper"> |
|
|
|
<view class=""> |
|
|
|
<com-blank-view @goScan="showFromLocationPopup" v-if="detailSource.length == 0"></com-blank-view> |
|
|
|
<com-blank-view @goScan='getBusinessType' v-if="detailSource.length==0"></com-blank-view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="page-wraper" v-if="detailSource.length > 0"> |
|
|
|
<view class="page-wraper" v-if="detailSource.length>0"> |
|
|
|
<view class="page-main"> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
|
<view class=""> |
|
|
|
<com-package-record :dataContent="item" @removeItem="removeItem(index, item)" @updateData="updateData" @removePack="updateData"> </com-package-record> |
|
|
|
<record-com-detail-card :dataContent="item" @removeItem="removeItem(index,item)" |
|
|
|
@updateData="updateData" @removePack='updateData' :isShowToLocation="false"> |
|
|
|
</record-com-detail-card> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="uni-flex uni-row" style="margin-left: 30rpx;margin-top: 10rpx; "> |
|
|
|
|
|
|
|
<text style="font-size: 35rpx; margin-right: 20rpx;">拆出数量 :</text> |
|
|
|
<uni-number-box @change="calcQty($event,splitCount)" :value="splitCount"> |
|
|
|
</uni-number-box> |
|
|
|
<uom :uom="detailSource[0].uom"></uom> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="page-footer"> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%"> |
|
|
|
<view class=""> </view> |
|
|
|
<view class="uni-flex uni-row"> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
|
<view class=""> |
|
|
|
</view> |
|
|
|
<view class=" uni-flex uni-row"> |
|
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<win-scan-button @goScan="showScanPopupPack"></win-scan-button> |
|
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
|
</view> |
|
|
|
|
|
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult="getScanResult" :allowModifyLocation="false"> </win-scan-pack-and-location> |
|
|
|
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation="getLocation" :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> |
|
|
|
<win-scan-pack title="拆分标签" ref="scanPopupPack" @getResult="getScanPackResult"></win-scan-pack> |
|
|
|
<winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="typeCode"> |
|
|
|
</winComScanBalance> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { goHome } from '@/common/basic.js' |
|
|
|
import { splitPackageRecordSubmit } from '@/api/request2.js' |
|
|
|
|
|
|
|
import { calc } from '@/common/calc.js' |
|
|
|
|
|
|
|
import { getInventoryStatusDesc, getDirectoryItemArray } from '@/common/directory.js' |
|
|
|
|
|
|
|
import { getBusinessType, createItemInfo, createDetailInfo, calcHandleQty } from '@/common/record.js' |
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
|
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
|
|
|
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
|
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
|
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' |
|
|
|
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue' |
|
|
|
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue' |
|
|
|
import comPackageRecord from '@/pages/package/coms/comPackageRecord.vue' |
|
|
|
|
|
|
|
export default { |
|
|
|
import { |
|
|
|
goHome, |
|
|
|
showConfirmMsg |
|
|
|
} from '@/common/basic.js'; |
|
|
|
import { |
|
|
|
splitPackageRecordSubmit |
|
|
|
} from '@/api/request2.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
calc |
|
|
|
} from '@/common/calc.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
getInventoryStatusDesc, |
|
|
|
getDirectoryItemArray |
|
|
|
} from '@/common/directory.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
getBusinessType, |
|
|
|
createItemInfo, |
|
|
|
createDetailInfo, |
|
|
|
calcHandleQty |
|
|
|
} from '@/common/record.js'; |
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
|
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
|
|
|
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
|
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
|
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
|
|
|
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
|
|
|
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue' |
|
|
|
import comPackageRecord from '@/pages/package/coms/comPackageRecord.vue' |
|
|
|
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' |
|
|
|
import uom from '@/mycomponents/qty/uom.vue' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
winScanButton, |
|
|
|
winScanPack, |
|
|
@ -64,288 +91,328 @@ export default { |
|
|
|
winScanPackAndLocation, |
|
|
|
recommendBalance, |
|
|
|
recordComDetailCard, |
|
|
|
comPackageRecord |
|
|
|
comPackageRecord, |
|
|
|
winComScanBalance, |
|
|
|
uom |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
id: '', |
|
|
|
detailSource: [], // 绑定在页面上的数据源 |
|
|
|
fromLocationCode: '', |
|
|
|
toLocationCode: '', |
|
|
|
detailSource: [], //绑定在页面上的数据源 |
|
|
|
fromLocationCode: "", |
|
|
|
toLocationCode: "", |
|
|
|
fromLocationAreaTypeList: [], |
|
|
|
inInventoryStatus: '', // 目标入库库存状态 |
|
|
|
outInventoryStatus: '', // 来源出库库存状态 |
|
|
|
inInventoryStatus: "", //目标入库库存状态 |
|
|
|
outInventoryStatus: "", //来源出库库存状态 |
|
|
|
businessType: {}, |
|
|
|
dataContent: {}, |
|
|
|
currentItemCode: '', |
|
|
|
toPackingNumber: '' |
|
|
|
} |
|
|
|
currentItemCode: "", |
|
|
|
toPackingNumber: "", |
|
|
|
itemCode:"", |
|
|
|
splitCount:1, |
|
|
|
typeCode:"SplitPackage" |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
const typeCode = 'SplitPackage' |
|
|
|
getBusinessType(typeCode, (res) => { |
|
|
|
<<<<<<< Updated upstream |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title: option.title |
|
|
|
}) |
|
|
|
var typeCode = "SplitPackage" |
|
|
|
getBusinessType(typeCode, res => { |
|
|
|
if (res.success) { |
|
|
|
this.businessType = res.businessType |
|
|
|
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList |
|
|
|
this.showFromLocationPopup() |
|
|
|
this.businessType = res.businessType; |
|
|
|
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; |
|
|
|
this.showFromLocationPopup(); |
|
|
|
} else { |
|
|
|
this.showErrorMessage(res.message) |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
======= |
|
|
|
this.getBusinessType(); |
|
|
|
>>>>>>> Stashed changes |
|
|
|
}, |
|
|
|
// 返回首页 |
|
|
|
//返回首页 |
|
|
|
onNavigationBarButtonTap(e) { |
|
|
|
if (e.index === 0) { |
|
|
|
goHome() |
|
|
|
goHome(); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 拦截返回按钮事件 |
|
|
|
//拦截返回按钮事件 |
|
|
|
onBackPress(e) {}, |
|
|
|
|
|
|
|
onPullDownRefresh() {}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
// this.showFromLocationPopup(); |
|
|
|
}, |
|
|
|
mounted() {}, |
|
|
|
methods: { |
|
|
|
showScanPopupPack() { |
|
|
|
this.$refs.scanPopupPack.openScanPopup() |
|
|
|
getBusinessType() { |
|
|
|
getBusinessType(this.typeCode, res => { |
|
|
|
if (res.success) { |
|
|
|
this.businessType = res.businessType; |
|
|
|
this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses); |
|
|
|
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList |
|
|
|
this.openScanPopup(); |
|
|
|
} else { |
|
|
|
this.showErrorMessage(res.message) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
openScanPopup() { |
|
|
|
if (this.businessType) { |
|
|
|
if(this.detailSource.length>0){ |
|
|
|
showConfirmMsg("拆包信息还没提交,是否要重新扫描?",res=>{ |
|
|
|
if(res){ |
|
|
|
this.clearData(); |
|
|
|
this.$refs.scanPopup.openScanPopup(this.businessType); |
|
|
|
} |
|
|
|
}) |
|
|
|
}else { |
|
|
|
this.$refs.scanPopup.openScanPopup(this.businessType); |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.getBusinessType() |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
|
const { balance } = result |
|
|
|
const { label } = result |
|
|
|
const pack = result.package |
|
|
|
const item = this.detailSource.find((res) => { |
|
|
|
this.setData(result); |
|
|
|
}, |
|
|
|
|
|
|
|
setData(result) { |
|
|
|
let balance = result.balance; |
|
|
|
let label = result.label; |
|
|
|
let pack = result.package; |
|
|
|
this.fromPackUnit = pack.packUnit; |
|
|
|
this.fromPack = pack; |
|
|
|
if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) { |
|
|
|
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this |
|
|
|
.fromLocationCode + "]没有库存余额") |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var item = this.detailSource.find(res => { |
|
|
|
if (res.itemCode == balance.itemCode) { |
|
|
|
return res |
|
|
|
} |
|
|
|
}) |
|
|
|
if (item == undefined) { |
|
|
|
const itemp = createItemInfo(balance, pack) |
|
|
|
const newDetail = createDetailInfo(balance, pack) // |
|
|
|
newDetail.scaned = false |
|
|
|
newDetail.Records = [] |
|
|
|
newDetail.handleQty = 0 |
|
|
|
itemp.subList.push(newDetail) |
|
|
|
if (this.itemCode != "" && this.itemCode != balance.itemCode) { |
|
|
|
this.showErrorMessage("请扫描物料为【" + this.itemCode + "】的箱码") |
|
|
|
return; |
|
|
|
} |
|
|
|
var itemp = createItemInfo(balance, pack); |
|
|
|
itemp.handleQty=0 |
|
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
|
newDetail.handleQty=0 |
|
|
|
newDetail.scaned=false |
|
|
|
itemp.subList.push(newDetail); |
|
|
|
this.detailSource.push(itemp) |
|
|
|
this.itemCode = balance.itemCode; |
|
|
|
this.fromLocationCode = balance.locationCode |
|
|
|
this.closeScanPopup() |
|
|
|
} else { |
|
|
|
this.showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`) |
|
|
|
var detail = item.subList.find(r => { |
|
|
|
if (r.packingNumber == balance.packingNumber && |
|
|
|
r.batch == balance.batch && |
|
|
|
r.locationCode == balance.locationCode && |
|
|
|
r.inventoryStatus == balance.inventoryStatus) { |
|
|
|
return r; |
|
|
|
} |
|
|
|
this.$refs.scanPopup.closeScanPopup() |
|
|
|
this.showScanPopupPack() |
|
|
|
}, |
|
|
|
|
|
|
|
getScanPackResult(result) { |
|
|
|
const { packingNumber } = result.label |
|
|
|
const { batch } = result.label |
|
|
|
const { qty } = result.label |
|
|
|
const { itemCode } = result.label |
|
|
|
const { uom } = result.package |
|
|
|
const item = this.detailSource.find((r) => r.itemCode == itemCode) |
|
|
|
if (item == undefined) { |
|
|
|
this.showErrorMessage(`物料号【${itemCode}】不在列表中`) |
|
|
|
}) |
|
|
|
if (detail == undefined) { |
|
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
|
newDetail.handleQty=0 |
|
|
|
item.subList.push(newDetail); |
|
|
|
this.closeScanPopup() |
|
|
|
} else { |
|
|
|
const temp = { |
|
|
|
scaned: true, |
|
|
|
packingNumber, |
|
|
|
batch, |
|
|
|
qty: Number(qty), |
|
|
|
LabelQty: Number(qty), |
|
|
|
stdPackUnit: result.package.stdPackUnit, |
|
|
|
stdPackQty: result.package.stdPackQty, |
|
|
|
uom |
|
|
|
if (detail.scaned == true) { |
|
|
|
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let sumQty = 0 |
|
|
|
item.subList[0].Records.forEach(function (item1, index) { |
|
|
|
sumQty = calc.add(sumQty, item1.qty) |
|
|
|
}) |
|
|
|
// if (calc.add(qty,sumQty)> item.subList[0].qty) { |
|
|
|
// this.showErrorMessage("扫描数量总和【" + (Number(qty) + sumQty) + "】(当前输入数量【" + qty + "】+已添加数量【" + |
|
|
|
// sumQty + |
|
|
|
// "】)已超过拆包箱码的数量【" + Number(item.subList[0].qty) + "】!"); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
item.subList[0].Records.push(temp) |
|
|
|
this.$forceUpdate() |
|
|
|
} |
|
|
|
this.calcHandleQty() |
|
|
|
this.calcHandleQty(); |
|
|
|
}, |
|
|
|
|
|
|
|
calcHandleQty() { |
|
|
|
for (const detail of this.detailSource[0].subList) { |
|
|
|
let hQty = 0 |
|
|
|
if (detail.Records.length > 0) { |
|
|
|
detail.Records.forEach((r) => { |
|
|
|
hQty = calc.add(hQty, r.qty) |
|
|
|
}) |
|
|
|
} |
|
|
|
detail.handleQty = hQty |
|
|
|
} |
|
|
|
this.$forceUpdate() |
|
|
|
calcHandleQty(this.detailSource) |
|
|
|
this.$forceUpdate(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showErrorMessage(message) { |
|
|
|
this.$refs.comMessage.showErrorMessage(message, (res) => { |
|
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
|
|
if (res) { |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
updateData() { |
|
|
|
this.calcHandleQty() |
|
|
|
this.calcHandleQty(); |
|
|
|
for (var i = 0; i < this.detailSource.length; i++) { |
|
|
|
let item = this.detailSource[i]; |
|
|
|
if (item.qty == 0) { |
|
|
|
this.detailSource.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
removeItem(index, item) { |
|
|
|
this.detailSource.splice(index, 1) |
|
|
|
}, |
|
|
|
|
|
|
|
openScanPopup() { |
|
|
|
if (this.fromLocationCode == '') { |
|
|
|
this.showFromLocationPopup() |
|
|
|
return |
|
|
|
} |
|
|
|
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType) |
|
|
|
}, |
|
|
|
showFromLocationPopup() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.scanLocationCode.openScanPopup() |
|
|
|
}) |
|
|
|
}, |
|
|
|
closeScanPopup() { |
|
|
|
if (this.$refs.scanPopup != undefined) { |
|
|
|
this.$refs.scanPopup.closeScanPopup() |
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
scanPopupGetFocus() { |
|
|
|
if (this.$refs.scanPopup != undefined) { |
|
|
|
this.$refs.scanPopup.getfocus() |
|
|
|
this.$refs.scanPopup.getfocus(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
commit() { |
|
|
|
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { |
|
|
|
uni.showLoading({ |
|
|
|
title: '提交中....', |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
|
|
|
|
const params = this.setParams() |
|
|
|
console.log(`提交${JSON.stringify(params)}`) |
|
|
|
splitPackageRecordSubmit(params) |
|
|
|
.then((res) => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
this.showCommitSuccessMessage(`提交成功<br>生成拆包记录<br>${res.data}`) |
|
|
|
} else { |
|
|
|
this.showErrorMessage(`提交失败[${res.msg}]`) |
|
|
|
if(this.splitCount==0){ |
|
|
|
this.showErrorMessage("拆出数量不能等于0") |
|
|
|
return; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
if(this.splitCount>this.detailSource[0].qty){ |
|
|
|
this.showErrorMessage("拆出数量不能大于库存数量") |
|
|
|
return; |
|
|
|
} |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
|
|
|
|
var params = this.setParams(); |
|
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
|
// splitPackageRecordSubmit(params).then(res => { |
|
|
|
// uni.hideLoading() |
|
|
|
// if (res.data) { |
|
|
|
|
|
|
|
// let list = [] |
|
|
|
// res.data.forEach(item => { |
|
|
|
// list.push({ |
|
|
|
// itemCode: item.itemCode, // 物品代码 |
|
|
|
// itemName: item.itemName, // 物品名称 |
|
|
|
// packName: item.packName, // 包装名称 |
|
|
|
// packageCode: item.toPackingNumber, // 包装号 |
|
|
|
// batch: item.toBatch, //批次 |
|
|
|
// parentNumber: item.parentNumber, //父包装号 |
|
|
|
// itemType: item.itemType, //物料类型 |
|
|
|
// asnNumber: item.asnNumber, //ASN |
|
|
|
// supplierCode: item.supplierCode, // 供应商 |
|
|
|
// qty: item.qty, // 数量 |
|
|
|
// printTimes: getCurrDateTime(), // 打印时间 |
|
|
|
// productionLineCode: item.productionLineCode, //生产线 |
|
|
|
// barcodeString: item.barcodeString, // 标签信息 |
|
|
|
// barcodeBase64: '', |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// this.showCommitSuccessMessage("提交成功<br>生成拆包记录<br>", list) |
|
|
|
|
|
|
|
// } else { |
|
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
// } |
|
|
|
// }).catch(error => { |
|
|
|
// uni.hideLoading() |
|
|
|
// this.showErrorMessage(error) |
|
|
|
// }) |
|
|
|
} else { |
|
|
|
this.showErrorMessage('没有要提交的数据') |
|
|
|
this.showErrorMessage("没有要提交的数据") |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
setParams() { |
|
|
|
const subList = [] |
|
|
|
const creator = this.$store.state.user.id |
|
|
|
this.detailSource.forEach((item) => { |
|
|
|
item.subList.forEach((detail) => { |
|
|
|
detail.Records.forEach((record) => { |
|
|
|
if (record.scaned) { |
|
|
|
const subItem = {} |
|
|
|
var subList = [] |
|
|
|
var creator = this.$store.state.user.id |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
item.subList.forEach(detail => { |
|
|
|
var subItem = {}; |
|
|
|
Object.assign(subItem, detail) |
|
|
|
subItem.itemCode = subItem.itemCode |
|
|
|
subItem.itemName = detail.package.itemName |
|
|
|
subItem.itemDesc1 = detail.package.itemDesc1 |
|
|
|
subItem.itemDesc2 = detail.package.itemDesc2 |
|
|
|
subItem.itemCode = subItem.itemCode; |
|
|
|
subItem.itemName = detail.package.itemName; |
|
|
|
subItem.itemDesc1 = detail.package.itemDesc1; |
|
|
|
subItem.itemDesc2 = detail.package.itemDesc2; |
|
|
|
|
|
|
|
subItem.fromInventoryStatus = subItem.inventoryStatus |
|
|
|
subItem.toInventoryStatus = subItem.inventoryStatus |
|
|
|
subItem.fromInventoryStatus = subItem.inventoryStatus; |
|
|
|
subItem.toInventoryStatus = subItem.inventoryStatus; |
|
|
|
|
|
|
|
subItem.fromQty = subItem.qty |
|
|
|
subItem.toQty = record.qty |
|
|
|
subItem.toQty = subItem.qty |
|
|
|
|
|
|
|
subItem.fromPackingNumber = subItem.packingNumber |
|
|
|
subItem.toPackingNumber = record.packingNumber |
|
|
|
subItem.fromPackingNumber = subItem.packingNumber; |
|
|
|
subItem.toPackingNumber = subItem.packingNumber; |
|
|
|
|
|
|
|
subItem.fromBatch = subItem.batch |
|
|
|
subItem.toBatch = record.batch |
|
|
|
subItem.fromLocationCode = subItem.fromLocationCode |
|
|
|
subItem.package = '' |
|
|
|
subItem.Records = '' |
|
|
|
subItem.fromBatch = subItem.batch; |
|
|
|
subItem.toBatch = subItem.batch; |
|
|
|
subItem.fromLocationCode = subItem.fromLocationCode; |
|
|
|
subItem.package = "" |
|
|
|
subItem.Records = "" |
|
|
|
subList.push(subItem) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
this.dataContent.subList = subList |
|
|
|
this.dataContent.creator = creator |
|
|
|
return this.dataContent |
|
|
|
this.dataContent.subList = subList; |
|
|
|
this.dataContent.creator = creator; |
|
|
|
return this.dataContent; |
|
|
|
}, |
|
|
|
|
|
|
|
showMessage(message) { |
|
|
|
this.$refs.comMessage.showMessage(message, (res) => { |
|
|
|
if (res) { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
showErrorMessage(message) { |
|
|
|
this.$refs.comMessage.showErrorMessage(message, (res) => { |
|
|
|
if (res) { |
|
|
|
} |
|
|
|
}) |
|
|
|
this.$refs.comMessage.showMessage(message, res => { |
|
|
|
if (res) {} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
showScanMessage(message) { |
|
|
|
this.$refs.comMessage.showScanMessage(message) |
|
|
|
this.$refs.comMessage.showScanMessage(message); |
|
|
|
}, |
|
|
|
|
|
|
|
afterCloseMessage() { |
|
|
|
this.scanPopupGetFocus() |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}, |
|
|
|
|
|
|
|
closeScanMessage() { |
|
|
|
this.scanPopupGetFocus() |
|
|
|
}, |
|
|
|
getLocation(location, code) { |
|
|
|
this.getFromLocationCode(location, code) |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}, |
|
|
|
getFromLocationCode(location, code) { |
|
|
|
this.fromLocationCode = code |
|
|
|
this.openScanPopup() |
|
|
|
}, |
|
|
|
getToLocationCode(location, code) { |
|
|
|
if (this.fromLocationCode == code) { |
|
|
|
uni.showToast({ |
|
|
|
title: `来源库位[${this.fromLocationCode}]不能与目标库位[${code}]一致`, |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
return |
|
|
|
|
|
|
|
showCommitSuccessMessage(hint, pointData) { |
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
this.clearData(); |
|
|
|
if (pointData.length > 0) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: `/pages/point/index?points=${JSON.stringify(pointData)}` |
|
|
|
}); |
|
|
|
} |
|
|
|
this.toLocationCode = code |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, (res) => { |
|
|
|
clearData(){ |
|
|
|
this.detailSource = [] |
|
|
|
this.fromLocationCode = '' |
|
|
|
this.currentItemCode = '' |
|
|
|
this.fromLocationCode = ''; |
|
|
|
this.currentItemCode = "" |
|
|
|
this.dataContent = {} |
|
|
|
}) |
|
|
|
this.itemCode="" |
|
|
|
this.splitCount=1 |
|
|
|
}, |
|
|
|
|
|
|
|
calcQty(val) { |
|
|
|
this.splitCount =val; |
|
|
|
// if(val<=0){ |
|
|
|
// this.showErrorMessage("数量必须大于0") |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
updateData() { |
|
|
|
this.calcHandleQty() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"></style> |
|
|
|
<style scoped lang="scss"> |
|
|
|
|
|
|
|
</style> |