zhang_li
3 months ago
10 changed files with 1164 additions and 1145 deletions
@ -1,383 +1,355 @@ |
|||||
<template> |
<template> |
||||
<view class="page-wraper"> |
<view class="page-wraper"> |
||||
<view class=""> |
<view class=""> |
||||
<com-blank-view @goScan='showContainerPopup' v-if="containerCode==''"></com-blank-view> |
<com-blank-view @goScan="showContainerPopup" v-if="containerCode == ''"></com-blank-view> |
||||
</view> |
</view> |
||||
|
|
||||
<view class="page-wraper" v-if="containerCode!=''"> |
<view class="page-wraper" v-if="containerCode != ''"> |
||||
<view class="" style="margin-left: 20rpx;"> |
<view class="" style="margin-left: 20rpx"> |
||||
<targetContainer ref="targetContainer" title="托盘" :containerCode="containerCode" :isShowEdit="false" |
<targetContainer ref="targetContainer" title="托盘" :containerCode="containerCode" :isShowEdit="false" @getContainer="getContainer"></targetContainer> |
||||
@getContainer="getContainer"></targetContainer> |
</view> |
||||
</view> |
<view class="split_line"></view> |
||||
<view class='split_line'></view> |
<view class="page-main"> |
||||
<view class="page-main"> |
<scroll-view scroll-y="true" class="page-main-scroll"> |
||||
<scroll-view scroll-y="true" class="page-main-scroll"> |
<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=""> |
<!-- {{item.contentNumber}} --> |
||||
<!-- {{item.contentNumber}} --> |
<comPalletRecord :dataContent="item" :index="index" :isShowPatch="false" @removeItem="removeItem(index, item)" @updateData="updateData" @removePack="removePack"> </comPalletRecord> |
||||
<comPalletRecord :dataContent="item" :index="index" |
</view> |
||||
:isShowPatch="false" @removeItem="removeItem(index,item)" @updateData="updateData" |
</view> |
||||
@removePack="removePack"> |
</scroll-view> |
||||
</comPalletRecord> |
</view> |
||||
|
|
||||
</view> |
<view class="page-footer"> |
||||
</view> |
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%"> |
||||
</scroll-view> |
<view class=""> </view> |
||||
</view> |
<view class="uni-flex uni-row"> |
||||
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
||||
<view class="page-footer"> |
</view> |
||||
<view class="uni-flex u-col-center space-between padding_10" |
</view> |
||||
style="background-color:ghostwhite; width: 100%; "> |
</view> |
||||
<view class=""> |
<win-scan-button @goScan="openScanPopup"></win-scan-button> |
||||
</view> |
</view> |
||||
<view class=" uni-flex uni-row"> |
<win-scan-pack ref="scanPopup" @getResult="getScanResult"></win-scan-pack> |
||||
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
<comMessage ref="comMessage"></comMessage> |
||||
</view> |
<winScanContainer ref="scanContainer" title="托盘" @getContainer="getContainer"></winScanContainer> |
||||
</view> |
</view> |
||||
</view> |
|
||||
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
||||
</view> |
|
||||
<win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack> |
|
||||
<comMessage ref="comMessage"></comMessage> |
|
||||
<winScanContainer ref="scanContainer" title="托盘" @getContainer='getContainer'></winScanContainer> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { |
import { containerUnBindRecordSubmit, getContainerDetailByNumber } from '@/api/request2.js' |
||||
containerUnBindRecordSubmit, |
import { goHome } from '@/common/basic.js' |
||||
getContainerDetailByNumber |
|
||||
} from '@/api/request2.js'; |
import { calc } from '@/common/calc.js' |
||||
import { |
|
||||
goHome |
import { getDirectoryItemArray } from '@/common/directory.js' |
||||
} from '@/common/basic.js'; |
|
||||
|
import { createItemInfo, createDetailInfo, calcHandleQty } from '@/common/record.js' |
||||
import { |
|
||||
calc |
import { getScanCount } from '@/common/detail.js' |
||||
} from '@/common/calc.js'; |
|
||||
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
||||
import { |
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
||||
getDirectoryItemArray |
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
||||
} from '@/common/directory.js'; |
import targetContainer from '@/mycomponents/container/targetContainer.vue' |
||||
|
import winScanContainer from '@/mycomponents/scan/winScanContainer.vue' |
||||
import { |
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
||||
createItemInfo, |
import comPalletRecord from '@/pages/container/coms/comPalletRecord.vue' |
||||
createDetailInfo, |
|
||||
calcHandleQty |
export default { |
||||
} from '@/common/record.js'; |
components: { |
||||
|
winScanButton, |
||||
import { |
winScanPack, |
||||
getScanCount |
comBlankView, |
||||
} from '@/common/detail.js'; |
targetContainer, |
||||
|
recordComDetailCard, |
||||
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
winScanContainer, |
||||
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
comPalletRecord |
||||
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
}, |
||||
import targetContainer from "@/mycomponents/container/targetContainer.vue" |
data() { |
||||
import winScanContainer from "@/mycomponents/scan/winScanContainer.vue" |
return { |
||||
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
id: '', |
||||
import comPalletRecord from '@/pages/container/coms/comPalletRecord.vue' |
scanCount: 0, |
||||
|
detailSource: [], // 绑定在页面上的数据源 |
||||
export default { |
businessTypeInfo: {}, |
||||
components: { |
fromLocationInfo: {}, |
||||
winScanButton, |
containerCode: '' |
||||
winScanPack, |
} |
||||
comBlankView, |
}, |
||||
targetContainer, |
onLoad(option) { |
||||
recordComDetailCard, |
uni.setNavigationBarTitle({ |
||||
winScanContainer, |
title: option.title |
||||
comPalletRecord |
}) |
||||
}, |
}, |
||||
data() { |
// 返回首页 |
||||
return { |
onNavigationBarButtonTap(e) { |
||||
id: '', |
if (e.index === 0) { |
||||
scanCount: 0, |
goHome() |
||||
detailSource: [], //绑定在页面上的数据源 |
} |
||||
businessTypeInfo: {}, |
}, |
||||
fromLocationInfo: {}, |
// 拦截返回按钮事件 |
||||
containerCode: "", |
onBackPress(e) {}, |
||||
}; |
|
||||
}, |
onPullDownRefresh() {}, |
||||
onLoad(option) { |
|
||||
|
mounted() { |
||||
}, |
this.showContainerPopup() |
||||
//返回首页 |
}, |
||||
onNavigationBarButtonTap(e) { |
methods: { |
||||
if (e.index === 0) { |
getScanResult(result) { |
||||
goHome(); |
try { |
||||
} |
const { packingNumber } = result.label |
||||
}, |
const { batch } = result.label |
||||
//拦截返回按钮事件 |
const { qty } = result.label |
||||
onBackPress(e) {}, |
const { itemCode } = result.label |
||||
|
const detail = this.detailSource.find((r) => r.itemCode == itemCode) |
||||
onPullDownRefresh() {}, |
if (detail == undefined) { |
||||
|
this.showMessage(`物料号【${itemCode}】不在列表中`) |
||||
mounted() { |
} else { |
||||
this.showContainerPopup(); |
const itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch) |
||||
}, |
if (itemDetail == undefined) { |
||||
methods: { |
this.showMessage(`箱码【${packingNumber}】,批次【${batch}】不在列表中`) |
||||
getScanResult(result) { |
} else if (itemDetail.scaned) { |
||||
try { |
this.showMessage(`箱码【${packingNumber}】,批次【${batch}】已经扫描`) |
||||
var packingNumber = result.label.packingNumber; |
} else { |
||||
var batch = result.label.batch; |
itemDetail.scaned = true |
||||
var qty = result.label.qty; |
itemDetail.record = this.createRecordInfo(itemDetail, result.label) |
||||
var itemCode = result.label.itemCode; |
// this.calcHandleQty(); |
||||
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
} |
||||
if (detail == undefined) { |
} |
||||
this.showMessage("物料号【" + itemCode + "】不在列表中") |
} catch (e) { |
||||
} else { |
this.showErrorMessage(e.message) |
||||
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); |
} |
||||
if (itemDetail == undefined) { |
}, |
||||
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】不在列表中") |
|
||||
} else { |
createRecordInfo(detail, label) { |
||||
if (itemDetail.scaned) { |
const record = {} |
||||
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】已经扫描") |
detail.scaned = true |
||||
} else { |
// let record = JSON.parse(JSON.stringify(detail)); |
||||
itemDetail.scaned = true; |
// 克隆对象,深度克隆,防止双向绑定同一个变量 |
||||
itemDetail.record = this.createRecordInfo(itemDetail, result.label); |
Object.assign(record, detail) |
||||
// this.calcHandleQty(); |
record.qty = Number(label.qty) |
||||
} |
return record |
||||
} |
}, |
||||
} |
|
||||
|
calcHandleQty() { |
||||
} catch (e) { |
calcHandleQty(this.detailSource) |
||||
this.showErrorMessage(e.message) |
this.scanPopupGetFocus() |
||||
} |
this.$forceUpdate() |
||||
}, |
}, |
||||
|
|
||||
createRecordInfo(detail, label) { |
getDataSource(subList) { |
||||
var record = {} |
const items = [] |
||||
detail.scaned = true; |
subList.forEach((detail) => { |
||||
// let record = JSON.parse(JSON.stringify(detail)); |
let item = items.find((r) => r.itemCode == detail.itemCode) |
||||
//克隆对象,深度克隆,防止双向绑定同一个变量 |
if (item == undefined) { |
||||
Object.assign(record, detail) |
item = this.createItemInfo(detail) |
||||
record.qty = Number(label.qty); |
const newDetail = this.createDetailInfo(detail) // |
||||
return record; |
item.subList.push(newDetail) |
||||
}, |
items.push(item) |
||||
|
} else { |
||||
calcHandleQty() { |
item.qty = calc.add(item.qty, detail.qty) |
||||
calcHandleQty(this.detailSource); |
const newDetail = this.createDetailInfo(detail) // |
||||
this.scanPopupGetFocus(); |
item.subList.push(newDetail) |
||||
this.$forceUpdate(); |
} |
||||
}, |
}) |
||||
|
return items |
||||
getDataSource(subList) { |
}, |
||||
let items = []; |
|
||||
subList.forEach(detail => { |
updateData() { |
||||
var item = items.find(r => |
this.calcHandleQty() |
||||
r.itemCode == detail.itemCode) |
}, |
||||
if (item == undefined) { |
|
||||
item = this.createItemInfo(detail); |
removeItem(index, item) { |
||||
let newDetail = this.createDetailInfo(detail); // |
this.detailSource.splice(index, 1) |
||||
item.subList.push(newDetail); |
}, |
||||
items.push(item) |
|
||||
} else { |
createItemInfo(res) { |
||||
item.qty = calc.add(item.qty,detail.qty) |
const item = { |
||||
let newDetail = this.createDetailInfo(detail); // |
itemCode: res.itemCode, |
||||
item.subList.push(newDetail); |
itemName: res.itemName, |
||||
} |
packQty: res.packQty, |
||||
}) |
packUnit: res.packUnit, |
||||
return items; |
qty: res.qty, |
||||
}, |
handleQty: 0, |
||||
|
uom: res.uom, |
||||
updateData() { |
subList: [] |
||||
this.calcHandleQty(); |
} |
||||
}, |
return item |
||||
|
}, |
||||
removeItem(index, item) { |
|
||||
this.detailSource.splice(index, 1) |
createDetailInfo(data) { |
||||
}, |
data.scaned = false |
||||
|
data.packingNumber = data.contentNumber |
||||
createItemInfo(res) { |
data.qty = Number(data.qty) |
||||
let item = { |
data.handleQty = 0 |
||||
itemCode: res.itemCode, |
const detail = data |
||||
itemName: res.itemName, |
return detail |
||||
packQty: res.packQty, |
}, |
||||
packUnit: res.packUnit, |
|
||||
qty: res.qty, |
removePack() { |
||||
handleQty: 0, |
for (let i = 0; i < this.detailSource.length; i++) { |
||||
uom: res.uom, |
const item = this.detailSource[i] |
||||
subList: [] |
if (item.subList.length == 0) { |
||||
} |
this.detailSource.splice(i, 1) |
||||
return item; |
} |
||||
}, |
} |
||||
|
this.updateData() |
||||
createDetailInfo(data) { |
}, |
||||
data.scaned = false; |
|
||||
data.packingNumber = data.contentNumber |
openScanPopup() { |
||||
data.qty = Number(data.qty) |
if (this.containerCode == '') { |
||||
data.handleQty =0; |
this.showContainerPopup() |
||||
let detail = data; |
return |
||||
return detail; |
} |
||||
}, |
this.$refs.scanPopup.openScanPopup() |
||||
|
}, |
||||
removePack() { |
showContainerPopup() { |
||||
for (var i = 0; i < this.detailSource.length; i++) { |
this.$nextTick(() => { |
||||
var item = this.detailSource[i]; |
this.$refs.scanContainer.openScanPopup() |
||||
if (item.subList.length == 0) { |
}) |
||||
this.detailSource.splice(i, 1) |
}, |
||||
} |
closeScanPopup() { |
||||
} |
this.$refs.scanPopup.closeScanPopup() |
||||
this.updateData(); |
}, |
||||
}, |
|
||||
|
scanPopupGetFocus() { |
||||
openScanPopup() { |
if (this.$refs.scanPopup != undefined) { |
||||
if (this.containerCode == "") { |
this.$refs.scanPopup.getfocus() |
||||
this.showContainerPopup(); |
} |
||||
return |
}, |
||||
} |
|
||||
this.$refs.scanPopup.openScanPopup(); |
scanPopupLoseFocus() { |
||||
}, |
if (this.$refs.scanPopup != undefined) { |
||||
showContainerPopup() { |
this.$refs.scanPopup.losefocus() |
||||
this.$nextTick(() => { |
} |
||||
this.$refs.scanContainer.openScanPopup(); |
}, |
||||
}) |
|
||||
|
commit() { |
||||
}, |
uni.showLoading({ |
||||
closeScanPopup() { |
title: '提交中...', |
||||
this.$refs.scanPopup.closeScanPopup(); |
mask: true |
||||
}, |
}) |
||||
|
|
||||
scanPopupGetFocus() { |
this.scanCount = getScanCount(this.detailSource[0].subList) |
||||
if (this.$refs.scanPopup != undefined) { |
if (this.scanCount == 0) { |
||||
this.$refs.scanPopup.getfocus(); |
this.showErrorMessage('扫描数为0,请先扫描要解绑的箱码') |
||||
} |
return |
||||
}, |
} |
||||
|
|
||||
scanPopupLoseFocus() { |
const params = this.getParams() |
||||
if (this.$refs.scanPopup != undefined) { |
console.log(`提交${JSON.stringify(params)}`) |
||||
this.$refs.scanPopup.losefocus(); |
|
||||
} |
containerUnBindRecordSubmit(params) |
||||
}, |
.then((res) => { |
||||
|
uni.hideLoading() |
||||
commit() { |
if (res.data) { |
||||
uni.showLoading({ |
this.showCommitSuccessMessage(`提交成功<br>生成器具绑定记录<br>${res.data}`) |
||||
title: '提交中...', |
this.clear() |
||||
mask: true |
} else { |
||||
}) |
this.showErrorMessage(`提交失败[${res.msg}]`) |
||||
|
} |
||||
this.scanCount = getScanCount(this.detailSource[0].subList); |
}) |
||||
if (this.scanCount == 0) { |
.catch((error) => { |
||||
this.showErrorMessage("扫描数为0,请先扫描要解绑的箱码") |
uni.hideLoading() |
||||
return; |
this.showErrorMessage(error) |
||||
} |
}) |
||||
|
}, |
||||
let params = this.getParams(); |
|
||||
console.log("提交" + JSON.stringify(params)) |
getParams() { |
||||
|
const subList = [] |
||||
containerUnBindRecordSubmit(params).then(res => { |
const creator = this.$store.state.user.id |
||||
uni.hideLoading() |
const params = { |
||||
if (res.data) { |
number: this.containerCode, |
||||
this.showCommitSuccessMessage("提交成功<br>生成器具绑定记录<br>" + res.data) |
type: 'bind', |
||||
this.clear(); |
status: 'USED', |
||||
} else { |
creator |
||||
this.showErrorMessage("提交失败[" + res.msg + "]") |
} |
||||
} |
|
||||
}).catch(error => { |
this.detailSource.forEach((item) => { |
||||
uni.hideLoading() |
item.subList.forEach((detail) => { |
||||
this.showErrorMessage(error) |
if (detail.scaned) { |
||||
}) |
detail.containerContentType = 'PACKAGE' |
||||
}, |
detail.contentNumber = detail.packingNumber |
||||
|
|
||||
getParams() { |
detail.itemCode = detail.itemCode |
||||
var subList = [] |
detail.batch = detail.batch |
||||
var creator = this.$store.state.user.id |
detail.inventoryStatus = detail.inventoryStatus |
||||
let params = { |
detail.qty = detail.handleQty |
||||
number: this.containerCode, |
detail.package = null |
||||
type: 'bind', |
subList.push(detail) |
||||
status: 'USED', |
} |
||||
creator: creator |
}) |
||||
}; |
}) |
||||
|
params.subList = subList |
||||
this.detailSource.forEach(item => { |
return params |
||||
item.subList.forEach(detail => { |
}, |
||||
if (detail.scaned) { |
|
||||
detail.containerContentType = 'PACKAGE'; |
showMessage(message) { |
||||
detail.contentNumber = detail.packingNumber; |
setTimeout((r) => { |
||||
|
this.scanPopupLoseFocus() |
||||
detail.itemCode = detail.itemCode; |
this.$refs.comMessage.showMessage(message, (res) => { |
||||
detail.batch = detail.batch; |
if (res) { |
||||
detail.inventoryStatus = detail.inventoryStatus; |
this.scanPopupGetFocus() |
||||
detail.qty =detail.handleQty; |
} |
||||
detail.package = null; |
}) |
||||
subList.push(detail) |
}) |
||||
} |
}, |
||||
}) |
|
||||
}) |
showErrorMessage(message) { |
||||
params.subList = subList |
setTimeout((r) => { |
||||
return params; |
this.scanPopupLoseFocus() |
||||
}, |
this.$refs.comMessage.showErrorMessage(message, (res) => { |
||||
|
if (res) { |
||||
|
this.scanPopupGetFocus() |
||||
showMessage(message) { |
} |
||||
setTimeout(r => { |
}) |
||||
this.scanPopupLoseFocus(); |
}) |
||||
this.$refs.comMessage.showMessage(message, res => { |
}, |
||||
if (res) { |
|
||||
this.scanPopupGetFocus(); |
showScanMessage(message) { |
||||
} |
this.$refs.comMessage.showScanMessage(message) |
||||
}); |
}, |
||||
}) |
|
||||
}, |
afterCloseMessage() { |
||||
|
this.scanPopupGetFocus() |
||||
showErrorMessage(message) { |
}, |
||||
setTimeout(r => { |
|
||||
this.scanPopupLoseFocus(); |
closeScanMessage() { |
||||
this.$refs.comMessage.showErrorMessage(message, res => { |
this.scanPopupGetFocus() |
||||
if (res) { |
}, |
||||
this.scanPopupGetFocus(); |
|
||||
} |
getContainer(containerInfo) { |
||||
}); |
this.containerCode = containerInfo.number |
||||
}) |
getContainerDetailByNumber(this.containerCode) |
||||
}, |
.then((res) => { |
||||
|
if (res.data != null && res.data.subList.length > 0) { |
||||
showScanMessage(message) { |
this.detailSource = this.getDataSource(res.data.subList) |
||||
this.$refs.comMessage.showScanMessage(message); |
} |
||||
}, |
}) |
||||
|
.catch((error) => { |
||||
afterCloseMessage() { |
this.showErrorMessage(error.message) |
||||
this.scanPopupGetFocus(); |
}) |
||||
}, |
}, |
||||
|
|
||||
closeScanMessage() { |
showCommitSuccessMessage(hint) { |
||||
this.scanPopupGetFocus(); |
this.$refs.comMessage.showSuccessMessage(hint, (res) => { |
||||
}, |
this.containerCode = '' |
||||
|
}) |
||||
getContainer(containerInfo) { |
}, |
||||
this.containerCode = containerInfo.number; |
|
||||
getContainerDetailByNumber(this.containerCode).then(res => { |
updateData() { |
||||
if (res.data != null && res.data.subList.length > 0) { |
this.calcHandleQty() |
||||
this.detailSource = this.getDataSource(res.data.subList) |
for (let i = 0; i < this.detailSource.length; i++) { |
||||
} |
const item = this.detailSource[i] |
||||
}).catch(error => { |
if (item.qty == 0) { |
||||
this.showErrorMessage(error.message) |
this.detailSource.splice(i, 1) |
||||
}) |
} |
||||
}, |
} |
||||
|
}, |
||||
showCommitSuccessMessage(hint) { |
clear() {} |
||||
this.$refs.comMessage.showSuccessMessage(hint, res => { |
} |
||||
this.containerCode = ''; |
} |
||||
|
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
updateData() { |
|
||||
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) |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
clear() |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"> |
<style scoped lang="scss"></style> |
||||
|
|
||||
</style> |
|
||||
|
@ -1,5 +1,14 @@ |
|||||
<template></template> |
<template> |
||||
|
<view class=""> |
||||
|
<com-blank-view @goScan="openFg" v-if="detailSource.length == 0"></com-blank-view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
<script></script> |
<script setup lang="ts"> |
||||
|
import { ref, onMounted, nextTick, watch, getCurrentInstance } from 'vue' |
||||
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
||||
|
|
||||
|
const detailSource = ref([]) |
||||
|
</script> |
||||
|
|
||||
<style></style> |
<style></style> |
||||
|
@ -1,390 +1,361 @@ |
|||||
<template> |
<template> |
||||
<view class="page-wraper"> |
<view class="page-wraper"> |
||||
<view class=""> |
<view class=""> |
||||
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view> |
<com-blank-view @goScan="showFromLocationPopup" v-if="detailSource.length == 0"></com-blank-view> |
||||
</view> |
</view> |
||||
|
|
||||
<view class="page-wraper" v-if="detailSource.length>0"> |
<view class="page-wraper" v-if="detailSource.length > 0"> |
||||
<view class="page-main"> |
<view class="page-main"> |
||||
<scroll-view scroll-y="true" class="page-main-scroll"> |
<scroll-view scroll-y="true" class="page-main-scroll"> |
||||
<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=""> |
||||
<record-com-detail-card :dataContent="item" :index="index" |
<record-com-detail-card :dataContent="item" :index="index" @removeItem="removeItem(index, item)" @updateData="updateData" @removePack="removePack"> </record-com-detail-card> |
||||
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> |
</view> |
||||
</record-com-detail-card> |
<view class="split_line"></view> |
||||
</view> |
</view> |
||||
<view class='split_line'></view> |
</scroll-view> |
||||
</view> |
</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="page-footer"> |
<view class=""> |
||||
<view class="uni-flex u-col-center space-between padding_10" |
<packageTarget title="目标箱码" :isShowEdit="true" :packingNumber="toPackingNumber" @getScanResult="getToPackingNumber"></packageTarget> |
||||
style="background-color:ghostwhite; width: 100%; "> |
</view> |
||||
<view class=""> |
<view class="uni-flex uni-row"> |
||||
<packageTarget title="目标箱码" :isShowEdit="true" :packingNumber="toPackingNumber" |
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
||||
@getScanResult='getToPackingNumber'></packageTarget> |
</view> |
||||
</view> |
</view> |
||||
<view class=" uni-flex uni-row"> |
</view> |
||||
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
<win-scan-button @goScan="openScanPopup"></win-scan-button> |
||||
</view> |
</view> |
||||
</view> |
|
||||
</view> |
<win-scan-pack-and-location ref="scanPopup" @getResult="getScanResult" :allowModifyLocation="false"> </win-scan-pack-and-location> |
||||
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation="getLocation" :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> |
||||
</view> |
<comMessage ref="comMessage"></comMessage> |
||||
|
</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> |
|
||||
<comMessage ref="comMessage"></comMessage> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { |
import { mergePackageRecordSubmit } from '@/api/request2.js' |
||||
mergePackageRecordSubmit |
import { goHome } from '@/common/basic.js' |
||||
} from '@/api/request2.js'; |
|
||||
import { |
import { getInventoryStatusDesc, getDirectoryItemArray } from '@/common/directory.js' |
||||
goHome |
|
||||
} from '@/common/basic.js'; |
import { getBusinessType, createItemInfo, createDetailInfo, calcHandleQty } from '@/common/record.js' |
||||
|
|
||||
import { |
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
||||
getInventoryStatusDesc, |
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
||||
getDirectoryItemArray |
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
||||
} from '@/common/directory.js'; |
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
||||
|
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' |
||||
import { |
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue' |
||||
getBusinessType, |
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue' |
||||
createItemInfo, |
import packageTarget from '@/mycomponents/package/packageTarget.vue' |
||||
createDetailInfo, |
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
||||
calcHandleQty |
|
||||
} from '@/common/record.js'; |
export default { |
||||
|
components: { |
||||
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
winScanButton, |
||||
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
winScanPack, |
||||
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
requiredLocation, |
||||
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
comBlankView, |
||||
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
winScanLocation, |
||||
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
winScanPackAndLocation, |
||||
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue' |
recommendBalance, |
||||
import packageTarget from '@/mycomponents/package/packageTarget.vue' |
packageTarget, |
||||
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
recordComDetailCard |
||||
|
}, |
||||
export default { |
data() { |
||||
components: { |
return { |
||||
winScanButton, |
id: '', |
||||
winScanPack, |
scanCount: 0, |
||||
requiredLocation, |
detailSource: [], // 绑定在页面上的数据源 |
||||
comBlankView, |
fromLocationCode: '', |
||||
winScanLocation, |
isShowLocation: false, |
||||
winScanPackAndLocation, |
fromLocationAreaTypeList: [], |
||||
recommendBalance, |
inInventoryStatus: '', // 目标入库库存状态 |
||||
packageTarget, |
outInventoryStatus: '', // 来源出库库存状态 |
||||
recordComDetailCard |
businessType: {}, |
||||
}, |
toPackingNumber: '', |
||||
data() { |
toBatch: '', |
||||
return { |
currentItemCode: '', |
||||
id: '', |
dataContent: {} |
||||
scanCount: 0, |
} |
||||
detailSource: [], //绑定在页面上的数据源 |
}, |
||||
fromLocationCode: "", |
onLoad(option) { |
||||
isShowLocation: false, |
uni.setNavigationBarTitle({ |
||||
fromLocationAreaTypeList: [], |
title: option.title |
||||
inInventoryStatus: "", //目标入库库存状态 |
}) |
||||
outInventoryStatus: "", //来源出库库存状态 |
const typeCode = 'MergePackage' |
||||
businessType: {}, |
getBusinessType(typeCode, (res) => { |
||||
toPackingNumber: "", |
if (res.success) { |
||||
toBatch:"", |
this.businessType = res.businessType |
||||
currentItemCode: "", |
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList |
||||
dataContent: {} |
this.showFromLocationPopup() |
||||
}; |
} else { |
||||
}, |
this.showErrorMessage(res.message) |
||||
onLoad(option) { |
} |
||||
var typeCode = "MergePackage" |
}) |
||||
getBusinessType(typeCode, res => { |
}, |
||||
if (res.success) { |
// 返回首页 |
||||
this.businessType = res.businessType; |
onNavigationBarButtonTap(e) { |
||||
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; |
if (e.index === 0) { |
||||
this.showFromLocationPopup(); |
goHome() |
||||
} else { |
} |
||||
this.showErrorMessage(res.message) |
}, |
||||
} |
// 拦截返回按钮事件 |
||||
}); |
onBackPress(e) {}, |
||||
}, |
|
||||
//返回首页 |
onPullDownRefresh() {}, |
||||
onNavigationBarButtonTap(e) { |
|
||||
if (e.index === 0) { |
mounted() {}, |
||||
goHome(); |
|
||||
} |
methods: { |
||||
}, |
scanPopupPack() { |
||||
//拦截返回按钮事件 |
this.$refs.scanPopupPack.openScanPopup() |
||||
onBackPress(e) {}, |
}, |
||||
|
|
||||
onPullDownRefresh() {}, |
getScanResult(result) { |
||||
|
const { balance } = result |
||||
mounted() {}, |
const { label } = result |
||||
|
const pack = result.package |
||||
methods: { |
const item = this.detailSource.find((res) => { |
||||
scanPopupPack() { |
if (res.itemCode == balance.itemCode) { |
||||
this.$refs.scanPopupPack.openScanPopup(); |
return res |
||||
}, |
} |
||||
|
}) |
||||
getScanResult(result) { |
if (item == undefined) { |
||||
let balance = result.balance; |
if (this.currentItemCode != '' && this.currentItemCode != balance.itemCode) { |
||||
let label = result.label; |
this.showErrorMessage(`合包当前物料号[${this.currentItemCode}与扫描物料号[${balance.itemCode}]不一致,请扫描相同物料号`) |
||||
let pack = result.package; |
return |
||||
var item = this.detailSource.find(res => { |
} |
||||
if (res.itemCode == balance.itemCode) { |
const itemp = createItemInfo(balance, pack) |
||||
return res |
const newDetail = createDetailInfo(balance, pack) // |
||||
} |
itemp.subList.push(newDetail) |
||||
}) |
this.currentItemCode = balance.itemCode |
||||
if (item == undefined) { |
this.detailSource.push(itemp) |
||||
if (this.currentItemCode != "" && this.currentItemCode != balance.itemCode) { |
} else { |
||||
this.showErrorMessage("合包当前物料号[" + this.currentItemCode + "与扫描物料号[" + balance.itemCode + |
const detail = item.subList.find((r) => { |
||||
"]不一致,请扫描相同物料号") |
if (r.packingNumber == balance.packingNumber && r.batch == balance.batch && r.locationCode == balance.locationCode && r.inventoryStatus == balance.inventoryStatus) { |
||||
return; |
return r |
||||
} |
} |
||||
var itemp = createItemInfo(balance, pack); |
}) |
||||
let newDetail = createDetailInfo(balance, pack); // |
if (detail == undefined) { |
||||
itemp.subList.push(newDetail); |
const newDetail = createDetailInfo(balance, pack) |
||||
this.currentItemCode = balance.itemCode; |
item.subList.push(newDetail) |
||||
this.detailSource.push(itemp) |
} else if (detail.scaned == true) { |
||||
} else { |
this.showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`) |
||||
var detail = item.subList.find(r => { |
} |
||||
if (r.packingNumber == balance.packingNumber && |
} |
||||
r.batch == balance.batch && |
this.calcHandleQty() |
||||
r.locationCode == balance.locationCode && |
}, |
||||
r.inventoryStatus == balance.inventoryStatus) { |
|
||||
return r; |
calcHandleQty() { |
||||
} |
calcHandleQty(this.detailSource) |
||||
}) |
this.$forceUpdate() |
||||
if (detail == undefined) { |
}, |
||||
let newDetail = createDetailInfo(balance, pack); |
|
||||
item.subList.push(newDetail); |
showErrorMessage(message) { |
||||
} else { |
this.$refs.comMessage.showErrorMessage(message, (res) => { |
||||
if (detail.scaned == true) { |
if (res) { |
||||
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") |
} |
||||
} |
}) |
||||
} |
}, |
||||
} |
|
||||
this.calcHandleQty(); |
updateData() { |
||||
|
this.calcHandleQty() |
||||
}, |
}, |
||||
|
removeItem(index, item) { |
||||
calcHandleQty() { |
this.detailSource.splice(index, 1) |
||||
calcHandleQty(this.detailSource) |
}, |
||||
this.$forceUpdate(); |
removePack() { |
||||
}, |
for (let i = 0; i < this.detailSource.length; i++) { |
||||
|
const item = this.detailSource[i] |
||||
showErrorMessage(message) { |
if (item.subList.length == 0) { |
||||
this.$refs.comMessage.showErrorMessage(message, res => { |
this.detailSource.splice(i, 1) |
||||
if (res) { |
} |
||||
|
} |
||||
} |
this.updateData() |
||||
}); |
}, |
||||
}, |
|
||||
|
openScanPopup() { |
||||
updateData() { |
if (this.fromLocationCode == '') { |
||||
this.calcHandleQty(); |
this.showFromLocationPopup() |
||||
}, |
return |
||||
removeItem(index, item) { |
} |
||||
this.detailSource.splice(index, 1) |
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType) |
||||
}, |
}, |
||||
removePack() { |
showFromLocationPopup() { |
||||
for (var i = 0; i < this.detailSource.length; i++) { |
this.$nextTick(() => { |
||||
var item = this.detailSource[i]; |
this.$refs.scanLocationCode.openScanPopup() |
||||
if (item.subList.length == 0) { |
}) |
||||
this.detailSource.splice(i, 1) |
}, |
||||
} |
closeScanPopup() { |
||||
} |
if (this.$refs.scanPopup != undefined) { |
||||
this.updateData(); |
this.$refs.scanPopup.closeScanPopup() |
||||
}, |
} |
||||
|
}, |
||||
openScanPopup() { |
|
||||
if (this.fromLocationCode == "") { |
scanPopupGetFocus() { |
||||
this.showFromLocationPopup(); |
if (this.$refs.scanPopup != undefined) { |
||||
return |
this.$refs.scanPopup.getfocus() |
||||
} |
} |
||||
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType); |
}, |
||||
}, |
|
||||
showFromLocationPopup() { |
commit() { |
||||
this.$nextTick(() => { |
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { |
||||
this.$refs.scanLocationCode.openScanPopup(); |
uni.showLoading({ |
||||
}) |
title: '提交中....', |
||||
|
mask: true |
||||
}, |
}) |
||||
closeScanPopup() { |
|
||||
if (this.$refs.scanPopup != undefined) { |
const params = this.setParams() |
||||
this.$refs.scanPopup.closeScanPopup(); |
console.log(`提交${JSON.stringify(params)}`) |
||||
} |
mergePackageRecordSubmit(params) |
||||
}, |
.then((res) => { |
||||
|
uni.hideLoading() |
||||
scanPopupGetFocus() { |
if (res.data) { |
||||
if (this.$refs.scanPopup != undefined) { |
this.showCommitSuccessMessage(`提交成功<br>生成合包记录<br>${res.data}`) |
||||
this.$refs.scanPopup.getfocus(); |
} else { |
||||
} |
this.showErrorMessage(`提交失败[${res.msg}]`) |
||||
}, |
} |
||||
|
}) |
||||
commit() { |
.catch((error) => { |
||||
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { |
uni.hideLoading() |
||||
uni.showLoading({ |
this.showErrorMessage(error) |
||||
title: "提交中....", |
}) |
||||
mask: true |
} else { |
||||
}); |
this.showErrorMessage('没有要扫描的数据') |
||||
|
} |
||||
var params = this.setParams(); |
}, |
||||
console.log("提交" + JSON.stringify(params)) |
|
||||
mergePackageRecordSubmit(params).then(res => { |
setParams() { |
||||
uni.hideLoading() |
const subList = [] |
||||
if (res.data) { |
const creator = this.$store.state.user.id |
||||
this.showCommitSuccessMessage("提交成功<br>生成合包记录<br>" + res.data) |
this.detailSource.forEach((item) => { |
||||
} else { |
item.subList.forEach((detail) => { |
||||
this.showErrorMessage("提交失败[" + res.msg + "]") |
if (detail.scaned) { |
||||
} |
detail.itemCode = detail.itemCode |
||||
}).catch(error => { |
detail.itemName = detail.package.itemName |
||||
uni.hideLoading() |
detail.itemDesc1 = detail.package.itemDesc1 |
||||
this.showErrorMessage(error) |
detail.itemDesc2 = detail.package.itemDesc2 |
||||
}) |
|
||||
} else { |
detail.fromInventoryStatus = detail.inventoryStatus |
||||
this.showErrorMessage("没有要扫描的数据") |
detail.toInventoryStatus = detail.inventoryStatus |
||||
} |
detail.fromQty = detail.handleQty |
||||
|
detail.fromPackingNumber = detail.packingNumber |
||||
}, |
detail.toPackingNumber = this.toPackingNumber |
||||
|
|
||||
setParams() { |
detail.fromBatch = detail.batch |
||||
|
detail.toBatch = detail.batch |
||||
var subList = [] |
|
||||
var creator = this.$store.state.user.id |
detail.fromLocationCode = detail.locationCode |
||||
this.detailSource.forEach(item => { |
// detail.toLocationCode = detail.toLocationCode; |
||||
item.subList.forEach(detail => { |
|
||||
if (detail.scaned) { |
subList.push(detail) |
||||
detail.itemCode = detail.itemCode; |
} |
||||
detail.itemName = detail.package.itemName; |
}) |
||||
detail.itemDesc1 = detail.package.itemDesc1; |
}) |
||||
detail.itemDesc2 = detail.package.itemDesc2; |
this.dataContent.subList = subList |
||||
|
this.dataContent.creator = creator |
||||
detail.fromInventoryStatus = detail.inventoryStatus; |
return this.dataContent |
||||
detail.toInventoryStatus = detail.inventoryStatus; |
}, |
||||
detail.fromQty = detail.handleQty |
|
||||
detail.fromPackingNumber = detail.packingNumber; |
showMessage(message) { |
||||
detail.toPackingNumber = this.toPackingNumber; |
this.$refs.comMessage.showMessage(message, (res) => { |
||||
|
if (res) { |
||||
detail.fromBatch = detail.batch; |
} |
||||
detail.toBatch = detail.batch; |
}) |
||||
|
}, |
||||
detail.fromLocationCode = detail.locationCode; |
showErrorMessage(message) { |
||||
// detail.toLocationCode = detail.toLocationCode; |
this.$refs.comMessage.showErrorMessage(message, (res) => { |
||||
|
if (res) { |
||||
subList.push(detail) |
} |
||||
} |
}) |
||||
}) |
}, |
||||
}) |
|
||||
this.dataContent.subList = subList; |
showScanMessage(message) { |
||||
this.dataContent.creator = creator; |
this.$refs.comMessage.showScanMessage(message) |
||||
return this.dataContent; |
}, |
||||
}, |
|
||||
|
afterCloseMessage() { |
||||
showMessage(message) { |
this.scanPopupGetFocus() |
||||
this.$refs.comMessage.showMessage(message, res => { |
}, |
||||
if (res) {} |
|
||||
}); |
closeScanMessage() { |
||||
}, |
this.scanPopupGetFocus() |
||||
showErrorMessage(message) { |
}, |
||||
this.$refs.comMessage.showErrorMessage(message, res => { |
getLocation(location, code) { |
||||
if (res) { |
this.getFromLocationCode(location, code) |
||||
|
}, |
||||
} |
getFromLocationCode(location, code) { |
||||
}); |
this.fromLocationCode = code |
||||
}, |
this.openScanPopup() |
||||
|
}, |
||||
showScanMessage(message) { |
|
||||
this.$refs.comMessage.showScanMessage(message); |
showCommitSuccessMessage(hint) { |
||||
}, |
this.$refs.comMessage.showSuccessMessage(hint, (res) => { |
||||
|
this.detailSource = [] |
||||
afterCloseMessage() { |
this.fromLocationCode = '' |
||||
this.scanPopupGetFocus(); |
this.toPackingNumber = '' |
||||
}, |
this.toBatch = '' |
||||
|
this.currentItemCode = '' |
||||
closeScanMessage() { |
this.dataContent = {} |
||||
this.scanPopupGetFocus(); |
}) |
||||
}, |
}, |
||||
getLocation(location, code) { |
|
||||
this.getFromLocationCode(location, code) |
updateData() { |
||||
}, |
this.calcHandleQty() |
||||
getFromLocationCode(location, code) { |
for (let i = 0; i < this.detailSource.length; i++) { |
||||
this.fromLocationCode = code; |
const item = this.detailSource[i] |
||||
this.openScanPopup(); |
if (item.qty == 0) { |
||||
}, |
this.detailSource.splice(i, 1) |
||||
|
} |
||||
showCommitSuccessMessage(hint) { |
} |
||||
this.$refs.comMessage.showSuccessMessage(hint, res => { |
}, |
||||
this.detailSource = [] |
getToPackingNumber(result) { |
||||
this.fromLocationCode = ''; |
if (this.currentItemCode != result.label.itemCode) { |
||||
this.toPackingNumber ="" |
this.showErrorMessage(`合包当前物料号[${this.currentItemCode}与目标物料号[${result.label.itemCode}]不一致,请扫描相同物料号`) |
||||
this.toBatch ="" |
return |
||||
this.currentItemCode ="" |
} |
||||
this.dataContent ={} |
this.toPackingNumber = result.label.packingNumber |
||||
|
this.toBatch = result.label.batch |
||||
}) |
} |
||||
}, |
} |
||||
|
} |
||||
updateData() { |
|
||||
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) |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
getToPackingNumber(result) { |
|
||||
if(this.currentItemCode!=result.label.itemCode){ |
|
||||
this.showErrorMessage("合包当前物料号[" + this.currentItemCode + "与目标物料号[" + result.label.itemCode + |
|
||||
"]不一致,请扫描相同物料号") |
|
||||
return; |
|
||||
} |
|
||||
this.toPackingNumber = result.label.packingNumber; |
|
||||
this.toBatch =result.label.batch |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"> |
<style scoped lang="scss"> |
||||
page { |
page { |
||||
width: 100%; |
width: 100%; |
||||
height: 100%; |
height: 100%; |
||||
background-color: #fff; |
background-color: #fff; |
||||
} |
} |
||||
|
|
||||
.page-wraper { |
.page-wraper { |
||||
display: flex; |
display: flex; |
||||
flex-direction: column; |
flex-direction: column; |
||||
width: 100%; |
width: 100%; |
||||
height: 100%; |
height: 100%; |
||||
} |
} |
||||
|
|
||||
|
.page-main { |
||||
.page-main { |
flex: 1; |
||||
flex: 1; |
position: relative; |
||||
position: relative; |
} |
||||
} |
|
||||
|
.page-main-scroll { |
||||
.page-main-scroll { |
position: absolute; |
||||
position: absolute; |
left: 0; |
||||
left: 0; |
right: 0; |
||||
right: 0; |
top: 0; |
||||
top: 0; |
bottom: 0; |
||||
bottom: 0; |
} |
||||
} |
|
||||
|
.page-main-list { |
||||
.page-main-list { |
/* height: 80rpx; |
||||
/* height: 80rpx; |
|
||||
line-height: 80rpx; */ |
line-height: 80rpx; */ |
||||
text-align: center; |
text-align: center; |
||||
background: #e0e0e0; |
background: #e0e0e0; |
||||
|
} |
||||
} |
|
||||
</style> |
</style> |
||||
|
@ -1,351 +1,418 @@ |
|||||
<template> |
<template> |
||||
<view class="page-wraper"> |
<view class="page-wraper"> |
||||
<view class=""> |
<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> |
||||
|
|
||||
<view class="page-wraper" v-if="detailSource.length > 0"> |
<view class="page-wraper" v-if="detailSource.length>0"> |
||||
<view class="page-main"> |
<view class="page-main"> |
||||
<scroll-view scroll-y="true" class="page-main-scroll"> |
<scroll-view scroll-y="true" class="page-main-scroll"> |
||||
<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=""> |
||||
<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)" |
||||
</view> |
@updateData="updateData" @removePack='updateData' :isShowToLocation="false"> |
||||
</view> |
</record-com-detail-card> |
||||
</scroll-view> |
</view> |
||||
</view> |
</view> |
||||
|
<view class="uni-flex uni-row" style="margin-left: 30rpx;margin-top: 10rpx; "> |
||||
<view class="page-footer"> |
|
||||
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%"> |
<text style="font-size: 35rpx; margin-right: 20rpx;">拆出数量 :</text> |
||||
<view class=""> </view> |
<uni-number-box @change="calcQty($event,splitCount)" :value="splitCount"> |
||||
<view class="uni-flex uni-row"> |
</uni-number-box> |
||||
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
<uom :uom="detailSource[0].uom"></uom> |
||||
</view> |
</view> |
||||
</view> |
</scroll-view> |
||||
</view> |
</view> |
||||
|
|
||||
<win-scan-button @goScan="showScanPopupPack"></win-scan-button> |
<view class="page-footer"> |
||||
</view> |
<view class="uni-flex u-col-center space-between padding_10" |
||||
|
style="background-color:ghostwhite; width: 100%; "> |
||||
<win-scan-pack-and-location ref="scanPopup" @getResult="getScanResult" :allowModifyLocation="false"> </win-scan-pack-and-location> |
<view class=""> |
||||
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation="getLocation" :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> |
</view> |
||||
<win-scan-pack title="拆分标签" ref="scanPopupPack" @getResult="getScanPackResult"></win-scan-pack> |
<view class=" uni-flex uni-row"> |
||||
<comMessage ref="comMessage"></comMessage> |
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
||||
</view> |
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
||||
|
</view> |
||||
|
|
||||
|
<winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="typeCode"> |
||||
|
</winComScanBalance> |
||||
|
<comMessage ref="comMessage"></comMessage> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { goHome } from '@/common/basic.js' |
import { |
||||
import { splitPackageRecordSubmit } from '@/api/request2.js' |
goHome, |
||||
|
showConfirmMsg |
||||
import { calc } from '@/common/calc.js' |
} from '@/common/basic.js'; |
||||
|
import { |
||||
import { getInventoryStatusDesc, getDirectoryItemArray } from '@/common/directory.js' |
splitPackageRecordSubmit |
||||
|
} from '@/api/request2.js'; |
||||
import { getBusinessType, createItemInfo, createDetailInfo, calcHandleQty } from '@/common/record.js' |
|
||||
|
import { |
||||
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
calc |
||||
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
} from '@/common/calc.js'; |
||||
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
|
||||
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
import { |
||||
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
getInventoryStatusDesc, |
||||
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' |
getDirectoryItemArray |
||||
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue' |
} from '@/common/directory.js'; |
||||
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue' |
|
||||
import comPackageRecord from '@/pages/package/coms/comPackageRecord.vue' |
import { |
||||
|
getBusinessType, |
||||
export default { |
createItemInfo, |
||||
components: { |
createDetailInfo, |
||||
winScanButton, |
calcHandleQty |
||||
winScanPack, |
} from '@/common/record.js'; |
||||
requiredLocation, |
|
||||
comBlankView, |
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
||||
winScanLocation, |
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
||||
winScanPackAndLocation, |
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
||||
recommendBalance, |
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
||||
recordComDetailCard, |
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
||||
comPackageRecord |
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
||||
}, |
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
||||
data() { |
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue' |
||||
return { |
import comPackageRecord from '@/pages/package/coms/comPackageRecord.vue' |
||||
id: '', |
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' |
||||
detailSource: [], // 绑定在页面上的数据源 |
import uom from '@/mycomponents/qty/uom.vue' |
||||
fromLocationCode: '', |
|
||||
toLocationCode: '', |
export default { |
||||
fromLocationAreaTypeList: [], |
components: { |
||||
inInventoryStatus: '', // 目标入库库存状态 |
winScanButton, |
||||
outInventoryStatus: '', // 来源出库库存状态 |
winScanPack, |
||||
businessType: {}, |
requiredLocation, |
||||
dataContent: {}, |
comBlankView, |
||||
currentItemCode: '', |
winScanLocation, |
||||
toPackingNumber: '' |
winScanPackAndLocation, |
||||
} |
recommendBalance, |
||||
}, |
recordComDetailCard, |
||||
onLoad(option) { |
comPackageRecord, |
||||
const typeCode = 'SplitPackage' |
winComScanBalance, |
||||
getBusinessType(typeCode, (res) => { |
uom |
||||
if (res.success) { |
}, |
||||
this.businessType = res.businessType |
data() { |
||||
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList |
return { |
||||
this.showFromLocationPopup() |
id: '', |
||||
} else { |
detailSource: [], //绑定在页面上的数据源 |
||||
this.showErrorMessage(res.message) |
fromLocationCode: "", |
||||
} |
toLocationCode: "", |
||||
}) |
fromLocationAreaTypeList: [], |
||||
}, |
inInventoryStatus: "", //目标入库库存状态 |
||||
// 返回首页 |
outInventoryStatus: "", //来源出库库存状态 |
||||
onNavigationBarButtonTap(e) { |
businessType: {}, |
||||
if (e.index === 0) { |
dataContent: {}, |
||||
goHome() |
currentItemCode: "", |
||||
} |
toPackingNumber: "", |
||||
}, |
itemCode:"", |
||||
// 拦截返回按钮事件 |
splitCount:1, |
||||
onBackPress(e) {}, |
typeCode:"SplitPackage" |
||||
|
}; |
||||
onPullDownRefresh() {}, |
}, |
||||
|
onLoad(option) { |
||||
mounted() { |
<<<<<<< Updated upstream |
||||
// this.showFromLocationPopup(); |
uni.setNavigationBarTitle({ |
||||
}, |
title: option.title |
||||
methods: { |
}) |
||||
showScanPopupPack() { |
var typeCode = "SplitPackage" |
||||
this.$refs.scanPopupPack.openScanPopup() |
getBusinessType(typeCode, res => { |
||||
}, |
if (res.success) { |
||||
|
this.businessType = res.businessType; |
||||
getScanResult(result) { |
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; |
||||
const { balance } = result |
this.showFromLocationPopup(); |
||||
const { label } = result |
} else { |
||||
const pack = result.package |
this.showErrorMessage(res.message) |
||||
const item = this.detailSource.find((res) => { |
} |
||||
if (res.itemCode == balance.itemCode) { |
}); |
||||
return res |
======= |
||||
} |
this.getBusinessType(); |
||||
}) |
>>>>>>> Stashed changes |
||||
if (item == undefined) { |
}, |
||||
const itemp = createItemInfo(balance, pack) |
//返回首页 |
||||
const newDetail = createDetailInfo(balance, pack) // |
onNavigationBarButtonTap(e) { |
||||
newDetail.scaned = false |
if (e.index === 0) { |
||||
newDetail.Records = [] |
goHome(); |
||||
newDetail.handleQty = 0 |
} |
||||
itemp.subList.push(newDetail) |
}, |
||||
this.detailSource.push(itemp) |
//拦截返回按钮事件 |
||||
} else { |
onBackPress(e) {}, |
||||
this.showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`) |
|
||||
} |
onPullDownRefresh() {}, |
||||
this.$refs.scanPopup.closeScanPopup() |
|
||||
this.showScanPopupPack() |
mounted() {}, |
||||
}, |
methods: { |
||||
|
getBusinessType() { |
||||
getScanPackResult(result) { |
getBusinessType(this.typeCode, res => { |
||||
const { packingNumber } = result.label |
if (res.success) { |
||||
const { batch } = result.label |
this.businessType = res.businessType; |
||||
const { qty } = result.label |
this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses); |
||||
const { itemCode } = result.label |
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList |
||||
const { uom } = result.package |
this.openScanPopup(); |
||||
const item = this.detailSource.find((r) => r.itemCode == itemCode) |
} else { |
||||
if (item == undefined) { |
this.showErrorMessage(res.message) |
||||
this.showErrorMessage(`物料号【${itemCode}】不在列表中`) |
} |
||||
} else { |
}); |
||||
const temp = { |
}, |
||||
scaned: true, |
openScanPopup() { |
||||
packingNumber, |
if (this.businessType) { |
||||
batch, |
if(this.detailSource.length>0){ |
||||
qty: Number(qty), |
showConfirmMsg("拆包信息还没提交,是否要重新扫描?",res=>{ |
||||
LabelQty: Number(qty), |
if(res){ |
||||
stdPackUnit: result.package.stdPackUnit, |
this.clearData(); |
||||
stdPackQty: result.package.stdPackQty, |
this.$refs.scanPopup.openScanPopup(this.businessType); |
||||
uom |
} |
||||
} |
}) |
||||
|
}else { |
||||
let sumQty = 0 |
this.$refs.scanPopup.openScanPopup(this.businessType); |
||||
item.subList[0].Records.forEach(function (item1, index) { |
} |
||||
sumQty = calc.add(sumQty, item1.qty) |
} else { |
||||
}) |
this.getBusinessType() |
||||
// if (calc.add(qty,sumQty)> item.subList[0].qty) { |
} |
||||
// this.showErrorMessage("扫描数量总和【" + (Number(qty) + sumQty) + "】(当前输入数量【" + qty + "】+已添加数量【" + |
}, |
||||
// sumQty + |
|
||||
// "】)已超过拆包箱码的数量【" + Number(item.subList[0].qty) + "】!"); |
getScanResult(result) { |
||||
// return; |
this.setData(result); |
||||
// } |
}, |
||||
item.subList[0].Records.push(temp) |
|
||||
this.$forceUpdate() |
setData(result) { |
||||
} |
let balance = result.balance; |
||||
this.calcHandleQty() |
let label = result.label; |
||||
}, |
let pack = result.package; |
||||
|
this.fromPackUnit = pack.packUnit; |
||||
calcHandleQty() { |
this.fromPack = pack; |
||||
for (const detail of this.detailSource[0].subList) { |
if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) { |
||||
let hQty = 0 |
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this |
||||
if (detail.Records.length > 0) { |
.fromLocationCode + "]没有库存余额") |
||||
detail.Records.forEach((r) => { |
return; |
||||
hQty = calc.add(hQty, r.qty) |
} |
||||
}) |
|
||||
} |
var item = this.detailSource.find(res => { |
||||
detail.handleQty = hQty |
if (res.itemCode == balance.itemCode) { |
||||
} |
return res |
||||
this.$forceUpdate() |
} |
||||
}, |
}) |
||||
|
if (item == undefined) { |
||||
showErrorMessage(message) { |
if (this.itemCode != "" && this.itemCode != balance.itemCode) { |
||||
this.$refs.comMessage.showErrorMessage(message, (res) => { |
this.showErrorMessage("请扫描物料为【" + this.itemCode + "】的箱码") |
||||
if (res) { |
return; |
||||
} |
} |
||||
}) |
var itemp = createItemInfo(balance, pack); |
||||
}, |
itemp.handleQty=0 |
||||
|
let newDetail = createDetailInfo(balance, pack); // |
||||
updateData() { |
newDetail.handleQty=0 |
||||
this.calcHandleQty() |
newDetail.scaned=false |
||||
}, |
itemp.subList.push(newDetail); |
||||
removeItem(index, item) { |
this.detailSource.push(itemp) |
||||
this.detailSource.splice(index, 1) |
this.itemCode = balance.itemCode; |
||||
}, |
this.fromLocationCode = balance.locationCode |
||||
|
this.closeScanPopup() |
||||
openScanPopup() { |
} else { |
||||
if (this.fromLocationCode == '') { |
var detail = item.subList.find(r => { |
||||
this.showFromLocationPopup() |
if (r.packingNumber == balance.packingNumber && |
||||
return |
r.batch == balance.batch && |
||||
} |
r.locationCode == balance.locationCode && |
||||
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType) |
r.inventoryStatus == balance.inventoryStatus) { |
||||
}, |
return r; |
||||
showFromLocationPopup() { |
} |
||||
this.$nextTick(() => { |
}) |
||||
this.$refs.scanLocationCode.openScanPopup() |
if (detail == undefined) { |
||||
}) |
let newDetail = createDetailInfo(balance, pack); |
||||
}, |
newDetail.handleQty=0 |
||||
closeScanPopup() { |
item.subList.push(newDetail); |
||||
if (this.$refs.scanPopup != undefined) { |
this.closeScanPopup() |
||||
this.$refs.scanPopup.closeScanPopup() |
} else { |
||||
} |
if (detail.scaned == true) { |
||||
}, |
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") |
||||
|
} |
||||
scanPopupGetFocus() { |
} |
||||
if (this.$refs.scanPopup != undefined) { |
} |
||||
this.$refs.scanPopup.getfocus() |
this.calcHandleQty(); |
||||
} |
}, |
||||
}, |
|
||||
|
calcHandleQty() { |
||||
commit() { |
calcHandleQty(this.detailSource) |
||||
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { |
this.$forceUpdate(); |
||||
uni.showLoading({ |
}, |
||||
title: '提交中....', |
|
||||
mask: true |
|
||||
}) |
showErrorMessage(message) { |
||||
|
this.$refs.comMessage.showErrorMessage(message, res => { |
||||
const params = this.setParams() |
if (res) { |
||||
console.log(`提交${JSON.stringify(params)}`) |
|
||||
splitPackageRecordSubmit(params) |
} |
||||
.then((res) => { |
}); |
||||
uni.hideLoading() |
}, |
||||
if (res.data) { |
|
||||
this.showCommitSuccessMessage(`提交成功<br>生成拆包记录<br>${res.data}`) |
updateData() { |
||||
} else { |
this.calcHandleQty(); |
||||
this.showErrorMessage(`提交失败[${res.msg}]`) |
for (var i = 0; i < this.detailSource.length; i++) { |
||||
} |
let item = this.detailSource[i]; |
||||
}) |
if (item.qty == 0) { |
||||
.catch((error) => { |
this.detailSource.splice(i, 1) |
||||
uni.hideLoading() |
} |
||||
this.showErrorMessage(error) |
} |
||||
}) |
}, |
||||
} else { |
removeItem(index, item) { |
||||
this.showErrorMessage('没有要提交的数据') |
this.detailSource.splice(index, 1) |
||||
} |
}, |
||||
}, |
|
||||
|
closeScanPopup() { |
||||
setParams() { |
if (this.$refs.scanPopup != undefined) { |
||||
const subList = [] |
this.$refs.scanPopup.closeScanPopup(); |
||||
const creator = this.$store.state.user.id |
} |
||||
this.detailSource.forEach((item) => { |
}, |
||||
item.subList.forEach((detail) => { |
|
||||
detail.Records.forEach((record) => { |
scanPopupGetFocus() { |
||||
if (record.scaned) { |
if (this.$refs.scanPopup != undefined) { |
||||
const subItem = {} |
this.$refs.scanPopup.getfocus(); |
||||
Object.assign(subItem, detail) |
} |
||||
subItem.itemCode = subItem.itemCode |
}, |
||||
subItem.itemName = detail.package.itemName |
|
||||
subItem.itemDesc1 = detail.package.itemDesc1 |
commit() { |
||||
subItem.itemDesc2 = detail.package.itemDesc2 |
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { |
||||
|
|
||||
subItem.fromInventoryStatus = subItem.inventoryStatus |
if(this.splitCount==0){ |
||||
subItem.toInventoryStatus = subItem.inventoryStatus |
this.showErrorMessage("拆出数量不能等于0") |
||||
|
return; |
||||
subItem.fromQty = subItem.qty |
} |
||||
subItem.toQty = record.qty |
if(this.splitCount>this.detailSource[0].qty){ |
||||
|
this.showErrorMessage("拆出数量不能大于库存数量") |
||||
subItem.fromPackingNumber = subItem.packingNumber |
return; |
||||
subItem.toPackingNumber = record.packingNumber |
} |
||||
|
uni.showLoading({ |
||||
subItem.fromBatch = subItem.batch |
title: "提交中....", |
||||
subItem.toBatch = record.batch |
mask: true |
||||
subItem.fromLocationCode = subItem.fromLocationCode |
}); |
||||
subItem.package = '' |
|
||||
subItem.Records = '' |
var params = this.setParams(); |
||||
subList.push(subItem) |
console.log("提交" + JSON.stringify(params)) |
||||
} |
// splitPackageRecordSubmit(params).then(res => { |
||||
}) |
// uni.hideLoading() |
||||
}) |
// if (res.data) { |
||||
}) |
|
||||
|
// let list = [] |
||||
this.dataContent.subList = subList |
// res.data.forEach(item => { |
||||
this.dataContent.creator = creator |
// list.push({ |
||||
return this.dataContent |
// itemCode: item.itemCode, // 物品代码 |
||||
}, |
// itemName: item.itemName, // 物品名称 |
||||
|
// packName: item.packName, // 包装名称 |
||||
showMessage(message) { |
// packageCode: item.toPackingNumber, // 包装号 |
||||
this.$refs.comMessage.showMessage(message, (res) => { |
// batch: item.toBatch, //批次 |
||||
if (res) { |
// parentNumber: item.parentNumber, //父包装号 |
||||
} |
// itemType: item.itemType, //物料类型 |
||||
}) |
// asnNumber: item.asnNumber, //ASN |
||||
}, |
// supplierCode: item.supplierCode, // 供应商 |
||||
showErrorMessage(message) { |
// qty: item.qty, // 数量 |
||||
this.$refs.comMessage.showErrorMessage(message, (res) => { |
// printTimes: getCurrDateTime(), // 打印时间 |
||||
if (res) { |
// productionLineCode: item.productionLineCode, //生产线 |
||||
} |
// barcodeString: item.barcodeString, // 标签信息 |
||||
}) |
// barcodeBase64: '', |
||||
}, |
// }) |
||||
|
// }) |
||||
showScanMessage(message) { |
// this.showCommitSuccessMessage("提交成功<br>生成拆包记录<br>", list) |
||||
this.$refs.comMessage.showScanMessage(message) |
|
||||
}, |
// } else { |
||||
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
||||
afterCloseMessage() { |
// } |
||||
this.scanPopupGetFocus() |
// }).catch(error => { |
||||
}, |
// uni.hideLoading() |
||||
|
// this.showErrorMessage(error) |
||||
closeScanMessage() { |
// }) |
||||
this.scanPopupGetFocus() |
} else { |
||||
}, |
this.showErrorMessage("没有要提交的数据") |
||||
getLocation(location, code) { |
} |
||||
this.getFromLocationCode(location, code) |
|
||||
}, |
}, |
||||
getFromLocationCode(location, code) { |
|
||||
this.fromLocationCode = code |
setParams() { |
||||
this.openScanPopup() |
var subList = [] |
||||
}, |
var creator = this.$store.state.user.id |
||||
getToLocationCode(location, code) { |
this.detailSource.forEach(item => { |
||||
if (this.fromLocationCode == code) { |
item.subList.forEach(detail => { |
||||
uni.showToast({ |
var subItem = {}; |
||||
title: `来源库位[${this.fromLocationCode}]不能与目标库位[${code}]一致`, |
Object.assign(subItem, detail) |
||||
duration: 2000 |
subItem.itemCode = subItem.itemCode; |
||||
}) |
subItem.itemName = detail.package.itemName; |
||||
return |
subItem.itemDesc1 = detail.package.itemDesc1; |
||||
} |
subItem.itemDesc2 = detail.package.itemDesc2; |
||||
this.toLocationCode = code |
|
||||
}, |
subItem.fromInventoryStatus = subItem.inventoryStatus; |
||||
|
subItem.toInventoryStatus = subItem.inventoryStatus; |
||||
showCommitSuccessMessage(hint) { |
|
||||
this.$refs.comMessage.showSuccessMessage(hint, (res) => { |
subItem.fromQty = subItem.qty |
||||
this.detailSource = [] |
subItem.toQty = subItem.qty |
||||
this.fromLocationCode = '' |
|
||||
this.currentItemCode = '' |
subItem.fromPackingNumber = subItem.packingNumber; |
||||
this.dataContent = {} |
subItem.toPackingNumber = subItem.packingNumber; |
||||
}) |
|
||||
}, |
subItem.fromBatch = subItem.batch; |
||||
|
subItem.toBatch = subItem.batch; |
||||
updateData() { |
subItem.fromLocationCode = subItem.fromLocationCode; |
||||
this.calcHandleQty() |
subItem.package = "" |
||||
} |
subItem.Records = "" |
||||
} |
subList.push(subItem) |
||||
} |
|
||||
|
}) |
||||
|
}) |
||||
|
|
||||
|
this.dataContent.subList = subList; |
||||
|
this.dataContent.creator = creator; |
||||
|
return this.dataContent; |
||||
|
}, |
||||
|
|
||||
|
showMessage(message) { |
||||
|
this.$refs.comMessage.showMessage(message, res => { |
||||
|
if (res) {} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
showScanMessage(message) { |
||||
|
this.$refs.comMessage.showScanMessage(message); |
||||
|
}, |
||||
|
|
||||
|
afterCloseMessage() { |
||||
|
this.scanPopupGetFocus(); |
||||
|
}, |
||||
|
|
||||
|
closeScanMessage() { |
||||
|
this.scanPopupGetFocus(); |
||||
|
}, |
||||
|
|
||||
|
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)}` |
||||
|
}); |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
clearData(){ |
||||
|
this.detailSource = [] |
||||
|
this.fromLocationCode = ''; |
||||
|
this.currentItemCode = "" |
||||
|
this.dataContent = {} |
||||
|
this.itemCode="" |
||||
|
this.splitCount=1 |
||||
|
}, |
||||
|
|
||||
|
calcQty(val) { |
||||
|
this.splitCount =val; |
||||
|
// if(val<=0){ |
||||
|
// this.showErrorMessage("数量必须大于0") |
||||
|
// } |
||||
|
}, |
||||
|
|
||||
|
} |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"></style> |
<style scoped lang="scss"> |
||||
|
|
||||
|
</style> |
Loading…
Reference in new issue