|
@ -3,39 +3,42 @@ |
|
|
<view class="page-header"> |
|
|
<view class="page-header"> |
|
|
<view class="header_job_top"> |
|
|
<view class="header_job_top"> |
|
|
<job-top :dataContent="jobContent"></job-top> |
|
|
<job-top :dataContent="jobContent"></job-top> |
|
|
<view class="card_view"> |
|
|
<uni-collapse ref="collapse"> |
|
|
<text class="card_packing_code">盘点计划</text> |
|
|
<uni-collapse-item :open="true"> |
|
|
<text class="card_content">{{ jobContent.planNumber }}</text> |
|
|
<template v-slot:title> |
|
|
</view> |
|
|
<view class="card_itemName" style="padding: 3px 5px; font-size: 28rpx"> 盘点范围 </view> |
|
|
<view v-for="(range, index) in dataContent.countRange" :key="index"> |
|
|
</template> |
|
|
<view class="card_view"> |
|
|
<view v-for="(range, index) in jobContent.countRange" :key="index"> |
|
|
<text class="card_packing_code">{{ getCountScopeName(range.type) }}</text> |
|
|
<view class="card_view"> |
|
|
<text class="card_content">{{ range.value }}</text> |
|
|
<text class="card_packing_code">{{ getCountScopeName(range.type) }}</text> |
|
|
</view> |
|
|
<text class="card_content">{{ range.value }}</text> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</uni-collapse-item> |
|
|
|
|
|
</uni-collapse> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="card_view" v-if="fromLocationCode != ''"> |
|
|
|
|
|
<text class="card_location">盘点库位</text> |
|
|
|
|
|
<text class="card_content">{{ fromLocationCode }}</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<com-blank-view @goScan="showFromLocationPopup" v-if="detailSource.length == 0"></com-blank-view> |
|
|
<view class="page-main"> |
|
|
<view class="page-main"> |
|
|
<view class=""> |
|
|
|
|
|
<com-blank-view @goScan="showFromLocationPopup" v-if="detailSource.length == 0"></com-blank-view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
<uni-swipe-action ref="swipeAction"> |
|
|
<uni-swipe-action ref="swipeAction"> |
|
|
<uni-swipe-action-item @click="swipeClick($event, item)" :right-options="editRemoveOption"> |
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
<!-- {{editRemoveOption}} --> |
|
|
<uni-swipe-action-item @click="swipeClick($event, item, index)" :right-options="editRemoveOption"> |
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
|
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<package-and-item-card :dataContent="item"></package-and-item-card> |
|
|
<package-and-item-card :dataContent="item"></package-and-item-card> |
|
|
</view> |
|
|
</view> |
|
|
<view class="split_line"></view> |
|
|
<view class="split_line"></view> |
|
|
</view> |
|
|
</uni-swipe-action-item> |
|
|
</uni-swipe-action-item> |
|
|
</view> |
|
|
</uni-swipe-action> |
|
|
</uni-swipe-action> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="page-footer"> |
|
|
<view class="page-footer" v-if="detailSource.length > 0"> |
|
|
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%"> |
|
|
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%"> |
|
|
<view class=""> </view> |
|
|
<view class=""> </view> |
|
|
<view class="uni-flex uni-row"> |
|
|
<view class="uni-flex uni-row"> |
|
@ -46,23 +49,23 @@ |
|
|
|
|
|
|
|
|
<win-scan-button v-if="fromLocationCode != ''" @goScan="openScanPopup"></win-scan-button> |
|
|
<win-scan-button v-if="fromLocationCode != ''" @goScan="openScanPopup"></win-scan-button> |
|
|
<win-scan-pack ref="scanPopup" @getResult="getScanResult"></win-scan-pack> |
|
|
<win-scan-pack ref="scanPopup" @getResult="getScanResult"></win-scan-pack> |
|
|
|
|
|
|
|
|
<win-scan-location ref="scanLocationCode" title="盘点库位" @getLocation="getLocation"></win-scan-location> |
|
|
<win-scan-location ref="scanLocationCode" title="盘点库位" @getLocation="getLocation"></win-scan-location> |
|
|
|
|
|
|
|
|
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true" :allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount == 'TRUE'"> </count-qty-edit> |
|
|
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true" :allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount == 'TRUE'"> </count-qty-edit> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { getCountJobDetail, takeCountJob, cancleTakeCountJob, countJobSubmit } from '@/api/request2.js' |
|
|
import { Decimal } from 'decimal.js' // 引入 |
|
|
|
|
|
import { getFuuzyCountJobDetail, takeCountJob, cancleTakeCountJob, countJobSubmit } from '@/api/request2.js' |
|
|
import { getCountScopeType } from '@/common/directory.js' |
|
|
import { calc } from '@/common/calc.js' |
|
|
|
|
|
|
|
|
import { getEditRemoveOption } from '@/common/array.js' |
|
|
import { getEditRemoveOption } from '@/common/array.js' |
|
|
|
|
|
|
|
|
import { goHome, navigateBack, getPackingNumberAndBatch } from '@/common/basic.js' |
|
|
import { goHome, navigateBack, getPackingNumberAndBatch } from '@/common/basic.js' |
|
|
|
|
|
|
|
|
|
|
|
import { getCountScopeType } from '@/common/directory.js' |
|
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
import comCountDetailCard from '@/pages/count/coms/comCountDetailCard.vue' |
|
|
import comCountDetailCard from '@/pages/count/coms/comCountDetailCard.vue' |
|
@ -74,7 +77,7 @@ import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import PackageAndItemCard from '@/mycomponents/package/PackageAndItemCard.vue' |
|
|
import PackageAndItemCard from '@/mycomponents/package/PackageAndItemCard.vue' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'receipt_detail', |
|
|
name: 'fuzzycountdetail', |
|
|
components: { |
|
|
components: { |
|
|
winScanButton, |
|
|
winScanButton, |
|
|
winScanPack, |
|
|
winScanPack, |
|
@ -101,7 +104,8 @@ export default { |
|
|
jobStatus: '', |
|
|
jobStatus: '', |
|
|
fromLocation: {}, |
|
|
fromLocation: {}, |
|
|
fromLocationCode: '', |
|
|
fromLocationCode: '', |
|
|
editRemoveOption: [] |
|
|
editRemoveOption: [], |
|
|
|
|
|
itemRangeValue: '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
@ -110,13 +114,16 @@ export default { |
|
|
// 新建的任务自动接收 |
|
|
// 新建的任务自动接收 |
|
|
if (option.status == '1') { |
|
|
if (option.status == '1') { |
|
|
this.receive((callback) => { |
|
|
this.receive((callback) => { |
|
|
this.getDetail() |
|
|
this.getDetail((r) => { |
|
|
|
|
|
this.showFromLocationPopup() |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.getDetail() |
|
|
this.getDetail((r) => { |
|
|
|
|
|
this.showFromLocationPopup() |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
this.showFromLocationPopup() |
|
|
|
|
|
this.editRemoveOption = getEditRemoveOption() |
|
|
this.editRemoveOption = getEditRemoveOption() |
|
|
}, |
|
|
}, |
|
|
// 返回首页 |
|
|
// 返回首页 |
|
@ -164,25 +171,32 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getDetail() { |
|
|
getDetail(callback) { |
|
|
const that = this |
|
|
const that = this |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: '加载中....', |
|
|
title: '加载中....', |
|
|
mask: true |
|
|
mask: true |
|
|
}) |
|
|
}) |
|
|
getCountJobDetail(that.id) |
|
|
getFuuzyCountJobDetail(that.id) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
that.jobContent = res.data |
|
|
that.jobContent = res.data |
|
|
that.jobStatus = res.data.status |
|
|
that.jobStatus = res.data.status |
|
|
|
|
|
const range = that.jobContent.countRange.find((r) => r.type == 'ITEMS_CODE') |
|
|
|
|
|
if (range != undefined) { |
|
|
|
|
|
that.itemRangeValue = range.value |
|
|
|
|
|
} |
|
|
|
|
|
callback() |
|
|
}) |
|
|
}) |
|
|
.catch((error) => { |
|
|
.catch((error) => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error) |
|
|
that.showErrorMessage(error) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showFromLocationPopup() { |
|
|
showFromLocationPopup() { |
|
|
|
|
|
const as = '' |
|
|
|
|
|
// this.$refs.scanLocationCode.openScanPopup(); |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs.scanLocationCode.openScanPopup() |
|
|
this.$refs.scanLocationCode.openScanPopup() |
|
|
}) |
|
|
}) |
|
@ -191,33 +205,43 @@ export default { |
|
|
getLocation(location, code) { |
|
|
getLocation(location, code) { |
|
|
const { countRange } = this.jobContent |
|
|
const { countRange } = this.jobContent |
|
|
|
|
|
|
|
|
let range = countRange.find((r) => r.type == 'LOCATION_CODE') |
|
|
if (countRange != null) { |
|
|
if (range != undefined) { |
|
|
let range = countRange.find((r) => r.type == 'LOCATION_CODE') |
|
|
if (!rang.value.includes(location.code)) { |
|
|
|
|
|
this.showErrorMessage(`库位代码【${location.code}】,不在盘点库位范围【${rangeValue}】内`) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
range = countRange.find((r) => r.type == 'LOCATIONGROUP_CODE') |
|
|
|
|
|
if (range != undefined) { |
|
|
if (range != undefined) { |
|
|
if (!rang.value.includes(location.locationGroupCode)) { |
|
|
const rangeValue = range.value |
|
|
this.showErrorMessage(`库位组代码【${location.locationGroupCode}】,不在盘点库位组范围【${rangeValue}】内`) |
|
|
const index = rangeValue.indexOf(location.code) |
|
|
|
|
|
if (index < 0) { |
|
|
|
|
|
this.afterScanLocation(`库位代码【${location.code}】,不在盘点库位范围【${rangeValue}】内`) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
range = countRange.find((r) => r.type == 'AREA_CODE') |
|
|
range = countRange.find((r) => r.type == 'LOCATIONGROUP_CODE') |
|
|
if (range != undefined) { |
|
|
if (range != undefined) { |
|
|
if (!rang.value.includes(location.areaCode)) { |
|
|
const rangeValue = range.value |
|
|
this.showErrorMessage(`库区代码【${location.areaCode}】,不在盘点库区范围【${rangeValue}】内`) |
|
|
const index = rangeValue.indexOf(location.locationGroupCode) |
|
|
|
|
|
if (index < 0) { |
|
|
|
|
|
this.afterScanLocation(`库位组代码【${location.locationGroupCode}】,不在盘点库位组范围【${rangeValue}】内`) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
range = countRange.find((r) => r.type == 'WAREHOUSE_CODE') |
|
|
range = countRange.find((r) => r.type == 'AREABASIC_CODE') |
|
|
if (range != undefined) { |
|
|
if (range != undefined) { |
|
|
if (!rang.value.includes(location.warehouseCode)) { |
|
|
const rangeValue = range.value |
|
|
this.showErrorMessage(`仓库代码【${location.warehouseCode}】,不在盘点仓库范围【${rangeValue}】内`) |
|
|
const index = rangeValue.indexOf(location.areaCode) |
|
|
|
|
|
if (index < 0) { |
|
|
|
|
|
this.afterScanLocation(`库区代码【${location.areaCode}】,不在盘点库区范围【${rangeValue}】内`) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
range = countRange.find((r) => r.type == 'WAREHOUSE_CODE') |
|
|
|
|
|
if (range != undefined) { |
|
|
|
|
|
const rangeValue = range.value |
|
|
|
|
|
const index = rangeValue.indexOf(location.warehouseCode) |
|
|
|
|
|
if (index < 0) { |
|
|
|
|
|
this.afterScanLocation(`仓库代码【${location.warehouseCode}】,不在盘点仓库范围【${rangeValue}】内`) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -225,6 +249,11 @@ export default { |
|
|
this.getFromLocationCode(location, code) |
|
|
this.getFromLocationCode(location, code) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
afterScanLocation(message) { |
|
|
|
|
|
this.showErrorMessage(message) |
|
|
|
|
|
this.showFromLocationPopup() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
getFromLocationCode(location, code) { |
|
|
getFromLocationCode(location, code) { |
|
|
this.fromLocation = location |
|
|
this.fromLocation = location |
|
|
this.fromLocationCode = code |
|
|
this.fromLocationCode = code |
|
@ -235,10 +264,6 @@ export default { |
|
|
this.$refs.scanPopup.openScanPopup() |
|
|
this.$refs.scanPopup.openScanPopup() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
closeScanPopup() { |
|
|
|
|
|
this.$refs.scanPopup.closeScanPopup() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
scanPopupGetFocus() { |
|
|
scanPopupGetFocus() { |
|
|
if (this.$refs.scanPopup != undefined) { |
|
|
if (this.$refs.scanPopup != undefined) { |
|
|
this.$refs.scanPopup.getfocus() |
|
|
this.$refs.scanPopup.getfocus() |
|
@ -251,35 +276,47 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
scanPopupGetFocus() { |
|
|
|
|
|
if (this.$refs.scanPopup != undefined) { |
|
|
|
|
|
this.$refs.scanPopup.packGetFocus() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
scanPopupLoseFocus() { |
|
|
scanPopupLoseFocus() { |
|
|
if (this.$refs.scanPopup != undefined) { |
|
|
if (this.$refs.scanPopup != undefined) { |
|
|
this.$refs.scanPopup.packLoseFocus() |
|
|
this.$refs.scanPopup.packLoseFocus() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 明盘 |
|
|
|
|
|
getScanResult(result) { |
|
|
getScanResult(result) { |
|
|
const that = this |
|
|
const that = this |
|
|
const { package } = result |
|
|
const packInfo = result.package |
|
|
let detail = this.detailSource.find((r) => r.itemCode == package.itemCode && r.packingNumber == package.packingNumber && r.batch == package.batch && r.inventoryStatus == 'OK') |
|
|
if (this.itemRangeValue != '') { |
|
|
|
|
|
const index = this.itemRangeValue.indexOf(packInfo.itemCode) |
|
|
|
|
|
if (index < 0) { |
|
|
|
|
|
this.afterScanLocation(`物料代码【${packInfo.itemCode}】,不在盘点范围【${this.itemRangeValue}】内`) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.onScan(packInfo) |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.onScan(packInfo) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onScan(packInfo) { |
|
|
|
|
|
let detail = this.detailSource.find((r) => r.itemCode == packInfo.itemCode && r.packingNumber == packInfo.number && r.batch == packInfo.batch && r.inventoryStatus == 'OK') |
|
|
if (detail == undefined) { |
|
|
if (detail == undefined) { |
|
|
detail = this.createDetailInfo(package) |
|
|
detail = this.createDetailInfo(packInfo) |
|
|
this.detailSource.push(detail) |
|
|
this.detailSource.unshift(detail) |
|
|
|
|
|
this.scanPopupGetFocus() |
|
|
} else { |
|
|
} else { |
|
|
const { index } = detail |
|
|
const index = this.detailSource.findIndex((r) => r.itemCode == packInfo.itemCode && r.packingNumber == packInfo.number && r.batch == packInfo.batch && r.inventoryStatus == 'OK') |
|
|
list.unshift(list.splice(index, 1)[0]) // 置顶 |
|
|
if (index >= 0) { |
|
|
// 提交 |
|
|
this.detailSource.unshift(this.detailSource.splice(index, 1)[0]) // 置顶 |
|
|
this.showQuestionMessage('该箱码已经扫描,是否要编辑盘点明细?', (res) => { |
|
|
// 提交 |
|
|
if (res) { |
|
|
this.$refs.comMessage.showQuestionMessage('该箱码已经扫描,是否要编辑盘点明细?', (res) => { |
|
|
this.edit(detail) |
|
|
if (res) { |
|
|
} |
|
|
this.closeScanPopup() |
|
|
}) |
|
|
this.edit(detail) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.scanPopupGetFocus() |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -298,19 +335,30 @@ export default { |
|
|
itemDesc2: packInfo.itemDesc2, |
|
|
itemDesc2: packInfo.itemDesc2, |
|
|
projectCode: '', |
|
|
projectCode: '', |
|
|
qty: packInfo.qty, |
|
|
qty: packInfo.qty, |
|
|
countQty: packInfo.qty, |
|
|
packUnit: packInfo.packUnit, |
|
|
|
|
|
packQty: packInfo.packQty, |
|
|
|
|
|
packUom: packInfo.packUom, |
|
|
uom: packInfo.uom, |
|
|
uom: packInfo.uom, |
|
|
remark: '', |
|
|
remark: '', |
|
|
locationCode: this.fromLocationCode, |
|
|
locationCode: this.fromLocationCode, |
|
|
creator: this.$store.state.user.id, |
|
|
creator: this.$store.state.user.id, |
|
|
warehouseCode: this.fromLocation.warehouseCode, |
|
|
warehouseCode: this.fromLocation.warehouseCode, |
|
|
areaCode: this.fromLocation.areaCode, |
|
|
areaCode: this.fromLocation.areaCode, |
|
|
locationGroupCode: this.fromLocation.locationGroupCode |
|
|
locationGroupCode: this.fromLocation.locationGroupCode, |
|
|
|
|
|
createTime: new Date().getTime(), |
|
|
|
|
|
countTime: new Date().getTime(), |
|
|
|
|
|
countUser: this.$store.state.user.id, |
|
|
|
|
|
countDescription: 'a', |
|
|
|
|
|
countQty: packInfo.qty |
|
|
} |
|
|
} |
|
|
return detail |
|
|
return detail |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
swipeClick(e, item) { |
|
|
editClose() { |
|
|
|
|
|
this.$refs.countQtyEdit.closeEditPopup() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
swipeClick(e, item, index) { |
|
|
if (e.content.text == '编辑') { |
|
|
if (e.content.text == '编辑') { |
|
|
this.edit(item) |
|
|
this.edit(item) |
|
|
} else if (e.content.text == '移除') { |
|
|
} else if (e.content.text == '移除') { |
|
@ -322,18 +370,16 @@ export default { |
|
|
edit(item) { |
|
|
edit(item) { |
|
|
const that = this |
|
|
const that = this |
|
|
this.currentEditItem = item |
|
|
this.currentEditItem = item |
|
|
this.$refs.countQtyEdit.openEditPopup(item) |
|
|
item.handleQty = item.qty |
|
|
|
|
|
this.$refs.countQtyEdit.openEditPopup(item, null) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
editConfirm(qty, inventoryStatus, mode) { |
|
|
editConfirm(qty, inventoryStatus, mode) { |
|
|
const that = this |
|
|
const that = this |
|
|
// 编辑 |
|
|
this.currentEditItem.countQty = qty |
|
|
if (mode == 'edit') { |
|
|
this.currentEditItem.qty = qty |
|
|
this.currentEditItem.countQty = qty |
|
|
this.currentEditItem.inventoryStatus = inventoryStatus |
|
|
this.currentEditItem.qty = qty |
|
|
this.openScanPopup() |
|
|
this.currentEditItem.inventoryStatus = inventoryStatus |
|
|
|
|
|
} |
|
|
|
|
|
this.scanPopupGetFocus() |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
editClose() { |
|
|
editClose() { |
|
@ -343,16 +389,29 @@ export default { |
|
|
remove(item, index) { |
|
|
remove(item, index) { |
|
|
this.showQuestionMessage('是否要移除扫描信息?', (res) => { |
|
|
this.showQuestionMessage('是否要移除扫描信息?', (res) => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.dataContent.subList.splice(index, 1) |
|
|
this.detailSource.splice(index, 1) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
detail(item) { |
|
|
|
|
|
this.showItem = item |
|
|
|
|
|
this.$refs.detailInfoPopup.openPopup(item) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
commit() { |
|
|
commit() { |
|
|
// if(this.detailSource.length==0) |
|
|
if (this.detailSource.length == 0) { |
|
|
// { |
|
|
this.$refs.comMessage.showMessage('还未扫描,是否要继续提交', (res) => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.commitJob() |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.commitJob() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// } |
|
|
commitJob() { |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: '提交中....', |
|
|
title: '提交中....', |
|
|
mask: true |
|
|
mask: true |
|
@ -375,7 +434,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setParams() { |
|
|
setParams() { |
|
|
const subList = [] |
|
|
|
|
|
const creator = this.$store.state.user.id |
|
|
const creator = this.$store.state.user.id |
|
|
this.jobContent.subList = this.detailSource |
|
|
this.jobContent.subList = this.detailSource |
|
|
// this.jobContent.creator = creator; |
|
|
// this.jobContent.creator = creator; |
|
@ -389,7 +447,6 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showErrorMessage(message) { |
|
|
showErrorMessage(message) { |
|
|
this.$refs.comMessage.showErrorMessage(message, (res) => { |
|
|
this.$refs.comMessage.showErrorMessage(message, (res) => { |
|
|
if (res) { |
|
|
if (res) { |
|
@ -402,12 +459,6 @@ export default { |
|
|
this.$refs.comMessage.showScanMessage(message) |
|
|
this.$refs.comMessage.showScanMessage(message) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showQuestionMessage(message, callback) { |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage(message, (res) => { |
|
|
|
|
|
callback(res) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
afterCloseMessage() { |
|
|
afterCloseMessage() { |
|
|
this.scanPopupGetFocus() |
|
|
this.scanPopupGetFocus() |
|
|
}, |
|
|
}, |
|
@ -416,21 +467,30 @@ export default { |
|
|
this.scanPopupGetFocus() |
|
|
this.scanPopupGetFocus() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
editItem(item) { |
|
|
|
|
|
this.currentEditItem = item |
|
|
|
|
|
const detail = this.detailSource.find((r) => r.itemCode == item.itemCode) |
|
|
|
|
|
this.$refs.countQtyEdit.openEditPopup(item, detail.subList) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
showCommitSuccessMessage(hint) { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, (res) => { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, (res) => { |
|
|
navigateBack(1) |
|
|
this.fromLocationCode = '' |
|
|
|
|
|
this.fromLocation = {} |
|
|
|
|
|
this.detailSource = [] |
|
|
|
|
|
this.showFromLocationPopup() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
getCountStageName(value) { |
|
|
|
|
|
return getCountStageName(value) |
|
|
|
|
|
}, |
|
|
|
|
|
isOpenCount(value) { |
|
|
|
|
|
return value == 'TRUE' ? '明盘' : '盲盘' |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
getCountScopeName(value) { |
|
|
getCountScopeName(value) { |
|
|
const item = getCountScopeType(value) |
|
|
const item = getCountScopeType(value) |
|
|
return item.label |
|
|
return item.label |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showQuestionMessage(message, callback) { |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage(message, (res) => { |
|
|
|
|
|
callback(res) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -443,30 +503,31 @@ page { |
|
|
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> |
|
|