|
|
@ -3,18 +3,27 @@ |
|
|
|
<view class="page-header"> |
|
|
|
<view class="header_job_top"> |
|
|
|
<job-top :dataContent="jobContent"></job-top> |
|
|
|
<view class="card_view"> |
|
|
|
<text class="card_packing_code ">盘点计划</text> |
|
|
|
<text class="card_content ">{{jobContent.planNumber}}</text> |
|
|
|
</view> |
|
|
|
<view v-for="(range, index) in dataContent.countRange" :key="index"> |
|
|
|
<view class="card_view"> |
|
|
|
<text class="card_packing_code ">{{getCountScopeName(range.type)}}</text> |
|
|
|
<text class="card_content ">{{range.value}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="page-main" style="height: 500px;"> |
|
|
|
<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"> |
|
|
|
<uni-swipe-action ref="swipeAction"> |
|
|
|
<uni-swipe-action-item @click="swipeClick($event,item)" |
|
|
|
:right-options="editRemoveOption"> |
|
|
|
{{editRemoveOption}} |
|
|
|
<uni-swipe-action-item @click="swipeClick($event,item)" :right-options="editRemoveOption"> |
|
|
|
<!-- {{editRemoveOption}} --> |
|
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
|
<view class=""> |
|
|
|
<package-and-item-card :dataContent="item"></package-and-item-card> |
|
|
@ -56,13 +65,10 @@ |
|
|
|
cancleTakeCountJob, |
|
|
|
countJobSubmit |
|
|
|
} from '@/api/request2.js'; |
|
|
|
import { |
|
|
|
calc |
|
|
|
} from '@/common/calc.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
Decimal |
|
|
|
} from 'decimal.js'; //引入 |
|
|
|
getCountScopeType |
|
|
|
} from '@/common/directory.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
getEditRemoveOption |
|
|
@ -73,9 +79,6 @@ |
|
|
|
navigateBack, |
|
|
|
getPackingNumberAndBatch |
|
|
|
} from '@/common/basic.js'; |
|
|
|
import { |
|
|
|
getCountStageName |
|
|
|
} from '@/common/directory.js'; |
|
|
|
|
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
@ -132,7 +135,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
this.showFromLocationPopup(); |
|
|
|
this.editRemoveOption=getEditRemoveOption(); |
|
|
|
this.editRemoveOption = getEditRemoveOption(); |
|
|
|
}, |
|
|
|
//返回首页 |
|
|
|
onNavigationBarButtonTap(e) { |
|
|
@ -202,6 +205,41 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
getLocation(location, code) { |
|
|
|
let countRange = this.jobContent.countRange; |
|
|
|
|
|
|
|
let range = countRange.find(r => r.type == "LOCATION_CODE"); |
|
|
|
if (range != undefined) { |
|
|
|
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 (!rang.value.includes(location.locationGroupCode)) { |
|
|
|
this.showErrorMessage("库位组代码【" + location.locationGroupCode + "】,不在盘点库位组范围【" + rangeValue + |
|
|
|
"】内") |
|
|
|
return; |
|
|
|
} |
|
|
|
} else { |
|
|
|
range = countRange.find(r => r.type == "AREA_CODE"); |
|
|
|
if (range != undefined) { |
|
|
|
if (!rang.value.includes(location.areaCode)) { |
|
|
|
this.showErrorMessage("库区代码【" + location.areaCode + "】,不在盘点库区范围【" + rangeValue + "】内") |
|
|
|
return; |
|
|
|
} |
|
|
|
} else { |
|
|
|
range = countRange.find(r => r.type == "WAREHOUSE_CODE"); |
|
|
|
if (range != undefined) { |
|
|
|
if (!rang.value.includes(location.warehouseCode)) { |
|
|
|
this.showErrorMessage("仓库代码【" + location.warehouseCode + "】,不在盘点仓库范围【" + rangeValue + |
|
|
|
"】内") |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.getFromLocationCode(location, code) |
|
|
|
}, |
|
|
|
|
|
|
@ -246,8 +284,22 @@ |
|
|
|
//明盘 |
|
|
|
getScanResult(result) { |
|
|
|
let that = this; |
|
|
|
let item = this.createDetailInfo(result.package); |
|
|
|
this.detailSource.push(item) |
|
|
|
let package = result.package; |
|
|
|
let detail = this.detailSource.find(r => r.itemCode == package.itemCode && r.packingNumber == package |
|
|
|
.packingNumber && r.batch == package.batch && r.inventoryStatus == "OK"); |
|
|
|
if (detail == undefined) { |
|
|
|
detail = this.createDetailInfo(package); |
|
|
|
this.detailSource.push(detail) |
|
|
|
} else { |
|
|
|
let index = detail.index; |
|
|
|
list.unshift(list.splice(index, 1)[0]); //置顶 |
|
|
|
//提交 |
|
|
|
this.showQuestionMessage('该箱码已经扫描,是否要编辑盘点明细?', res => { |
|
|
|
if (res) { |
|
|
|
this.edit(detail); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//创建盘盈的明细 |
|
|
@ -277,55 +329,41 @@ |
|
|
|
return detail; |
|
|
|
}, |
|
|
|
|
|
|
|
//编辑盘点结果 |
|
|
|
editCountResult(item, subItem) { |
|
|
|
let that = this; |
|
|
|
this.$refs.comMessage.showQuestionMessage("箱码【" + that.label.packingNumber + |
|
|
|
"】已经完成盘点,是否要编辑盘点结果?", |
|
|
|
res => { |
|
|
|
if (res) { |
|
|
|
this.currentEditItem = subItem; |
|
|
|
this.$refs.countQtyEdit.openEditPopup(subItem, |
|
|
|
item.subList); |
|
|
|
// this.$refs.countQtyEdit.openEditPopupShowSeconds(subItem, |
|
|
|
// item.subList); |
|
|
|
} else { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
editClose() { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}, |
|
|
|
|
|
|
|
swipeClick(e, item) { |
|
|
|
if (e.content.text == "详情") { |
|
|
|
this.detail(item) |
|
|
|
} else if (e.content.text == "编辑") { |
|
|
|
if (e.content.text == "编辑") { |
|
|
|
this.edit(item) |
|
|
|
} else if (e.content.text == "移除") { |
|
|
|
this.remove(item) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
edit(detail) { |
|
|
|
this.$emit("editItem", detail) |
|
|
|
//编辑盘点结果 |
|
|
|
edit(item) { |
|
|
|
let that = this; |
|
|
|
this.currentEditItem = item; |
|
|
|
this.$refs.countQtyEdit.openEditPopup(item); |
|
|
|
}, |
|
|
|
|
|
|
|
detail(item) { |
|
|
|
this.showItem = item; |
|
|
|
this.$refs.detailInfoPopup.openPopup(item); |
|
|
|
editConfirm(qty, inventoryStatus, mode) { |
|
|
|
let that = this; |
|
|
|
//编辑 |
|
|
|
if (mode == 'edit') { |
|
|
|
this.currentEditItem.countQty = qty; |
|
|
|
this.currentEditItem.qty = qty; |
|
|
|
this.currentEditItem.inventoryStatus = inventoryStatus; |
|
|
|
} |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
editClose() { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}, |
|
|
|
|
|
|
|
remove(item, index) { |
|
|
|
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", |
|
|
|
res => { |
|
|
|
this.showQuestionMessage("是否要移除扫描信息?", res => { |
|
|
|
if (res) { |
|
|
|
// this.dataContent.subList.splice(index, 1) |
|
|
|
item.scaned = false; |
|
|
|
item.handleQty = 0; |
|
|
|
this.$emit('removePack') |
|
|
|
this.dataContent.subList.splice(index, 1) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
@ -363,7 +401,6 @@ |
|
|
|
return this.jobContent; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showMessage(message) { |
|
|
|
this.$refs.comMessage.showMessage(message, res => { |
|
|
|
if (res) { |
|
|
@ -371,6 +408,7 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
showErrorMessage(message) { |
|
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
|
|
if (res) { |
|
|
@ -383,6 +421,12 @@ |
|
|
|
this.$refs.comMessage.showScanMessage(message); |
|
|
|
}, |
|
|
|
|
|
|
|
showQuestionMessage(message, callback) { |
|
|
|
this.$refs.comMessage.showQuestionMessage(message, res => { |
|
|
|
callback(res); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
afterCloseMessage() { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}, |
|
|
@ -403,13 +447,11 @@ |
|
|
|
navigateBack(1); |
|
|
|
}) |
|
|
|
}, |
|
|
|
getCountStageName(value) { |
|
|
|
return getCountStageName(value) |
|
|
|
}, |
|
|
|
isOpenCount(value) { |
|
|
|
return value == "TRUE" ? "明盘" : "盲盘" |
|
|
|
} |
|
|
|
|
|
|
|
getCountScopeName(value) { |
|
|
|
let item = getCountScopeType(value); |
|
|
|
return item.label; |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|