|
|
@ -4,9 +4,13 @@ |
|
|
|
<view class="" style="display:flex;flex-direction: column;"> |
|
|
|
<view class="top_card"> |
|
|
|
<com-count-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount" |
|
|
|
:newCount="newCount" :location="location"> |
|
|
|
:newCount="newCount" :location="location" :countOrder="datacontent.inventoryStage"> |
|
|
|
</com-count-scan-detail> |
|
|
|
</view> |
|
|
|
<view class="" style="margin: 20rpx;"> |
|
|
|
<button type="primary" @click="queryItemCode">ERP料号查询</button> |
|
|
|
</view> |
|
|
|
|
|
|
|
<scroll-view scroll-y="true" style="margin-bottom: 50rpx;"> |
|
|
|
<view v-for="(item ,index) in showList" :key="index"> |
|
|
|
<view class="detail-content common_card"> |
|
|
@ -135,6 +139,7 @@ |
|
|
|
<com-easy-input-count ref="countPopup" @confirm='closeEditCount'></com-easy-input-count> |
|
|
|
<win-inventory-status ref="statusPopup"></win-inventory-status> |
|
|
|
<!-- com-message必须放在最下层 --> |
|
|
|
<wz-select-popup ref="wzSelectPopup" @select="selectCheckbox" /> |
|
|
|
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></com-message> |
|
|
|
<!-- <uni-load-more :status="loadingType" v-if="details.length>0"></uni-load-more> --> |
|
|
|
|
|
|
@ -150,6 +155,7 @@ |
|
|
|
getBalancesByFilterAsync, |
|
|
|
getitems, |
|
|
|
locationsAsync, |
|
|
|
getBalancesByItemCode |
|
|
|
} from '@/api/index.js'; |
|
|
|
|
|
|
|
import { |
|
|
@ -237,7 +243,12 @@ |
|
|
|
pageSize: 20, |
|
|
|
jobStatus: "", |
|
|
|
index: 0, |
|
|
|
showList: [] |
|
|
|
showList: [], |
|
|
|
userForm: { |
|
|
|
names: [], |
|
|
|
values: [], |
|
|
|
origin: [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
props: {}, |
|
|
@ -339,6 +350,87 @@ |
|
|
|
this.loadingType = ""; |
|
|
|
this.showList = this.getDataPage(this.index, this.pageSize) |
|
|
|
}, |
|
|
|
|
|
|
|
queryItemCode(){ |
|
|
|
this.$refs.wzSelectPopup.open({ |
|
|
|
mode: 'radio', //radio checkbox 单选、多选 |
|
|
|
// dataList:[], //如果dataList传入了数组则直接使用传入的数组渲染,无需再配置proxyConfig |
|
|
|
selected: this.userForm.values, //已选中的数据 |
|
|
|
proxyConfig: { //组件内部代理请求数据配置 |
|
|
|
reqFun: this.reqGetList, //请求方法,在方法中请返回Promise.resolve([]) |
|
|
|
localPaging: false //前端本地分页 |
|
|
|
}, |
|
|
|
search: { |
|
|
|
type: 'remote', //local本地数据搜索 | remote请求接口 |
|
|
|
}, |
|
|
|
fields: { |
|
|
|
label: 'name', |
|
|
|
value: 'code' |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
selectCheckbox(mode, resultData) { |
|
|
|
console.log(mode, resultData) |
|
|
|
var result = resultData |
|
|
|
|
|
|
|
var itemCode = result.itemCode; |
|
|
|
var itemScan = this.scanAllDetails.filter(r => |
|
|
|
r.itemCode == itemCode&& |
|
|
|
r.inventoryStage==this.datacontent.inventoryStage&& |
|
|
|
r.isDelete==false) |
|
|
|
// if(itemScan.length == 0){ |
|
|
|
// let detail = this.creatDetail(result); |
|
|
|
// this.setDetailNoBalance(detail, result) |
|
|
|
// detail.inventoryQty=result.qty |
|
|
|
// detail.countQty =result.qty |
|
|
|
// this.scanAllDetails.unshift(detail); |
|
|
|
// this.initList(); |
|
|
|
// this.calcScanCount(); |
|
|
|
// this.$forceUpdate(); |
|
|
|
// }else if (itemScan.length == 1){ |
|
|
|
// setTimeout(res => { |
|
|
|
// showConfirmMsg("物料【" + itemCode + "】已经扫描,是否覆盖已经扫描的信息", res => { |
|
|
|
// if (res) { |
|
|
|
// this.setQty(itemScan[0], itemScan[0].inventoryQty, false); |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }, 100) |
|
|
|
// } |
|
|
|
if (itemScan.length > 0) { |
|
|
|
setTimeout(res => { |
|
|
|
showConfirmMsg("物料【" + itemCode + "】已经扫描,是否覆盖已经扫描的信息", res => { |
|
|
|
if (res) { |
|
|
|
this.setQty(itemScan[0], itemScan[0].inventoryQty, false); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, 100) |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
let items = this.originalDetails.filter(r => |
|
|
|
r.itemCode === itemCode&&r.inventoryStage==this.datacontent.inventoryStage) |
|
|
|
//不在任务列表中,查询库存赋值 |
|
|
|
if (items.length == 0) { |
|
|
|
this.addNewDetail(result) |
|
|
|
} else if (items.length == 1) { |
|
|
|
var item = items[0]; |
|
|
|
item.isNew =true; |
|
|
|
this.setQty(item, item.inventoryQty, true); |
|
|
|
} else { |
|
|
|
this.showMessage('盘点数量异常,箱码【' + packingCode + '】的出现多条数据'); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
reqGetList(data) { |
|
|
|
|
|
|
|
let params = { |
|
|
|
pageSize: data.pageSize, |
|
|
|
pageIndex: data.pageIndex, |
|
|
|
itemCode: data.searchValue, |
|
|
|
locationCode:this.datacontent.locationCode |
|
|
|
}; |
|
|
|
return getBalancesByItemCode(params); |
|
|
|
}, |
|
|
|
getDetail() { |
|
|
|
uni.showLoading({ |
|
|
|
title: '加载中...', |
|
|
@ -390,8 +482,16 @@ |
|
|
|
var itemCode =result.itemCode; |
|
|
|
this.getitem(itemCode,res=>{ |
|
|
|
var result = res; |
|
|
|
result.itemCode = result.code; |
|
|
|
result.itemName = result.name; |
|
|
|
result.itemDesc1 = result.desc1; |
|
|
|
result.itemDesc2 = result.desc2; |
|
|
|
result.uom =result.basicUom |
|
|
|
var itemScan = this.scanAllDetails.filter(r => |
|
|
|
r.itemCode == itemCode&&r.inventoryStage==this.datacontent.inventoryStage) |
|
|
|
r.itemCode == itemCode&& |
|
|
|
r.inventoryStage==this.datacontent.inventoryStage&& |
|
|
|
r.isDelete==false |
|
|
|
) |
|
|
|
if (itemScan.length > 0) { |
|
|
|
setTimeout(res => { |
|
|
|
showConfirmMsg("物料【" + itemCode + "】已经扫描,是否覆盖已经扫描的信息", res => { |
|
|
@ -517,10 +617,10 @@ |
|
|
|
packingCode: "", |
|
|
|
lot: "", |
|
|
|
|
|
|
|
itemCode: result.code, |
|
|
|
itemName: result.name, |
|
|
|
itemDesc1: result.desc1, |
|
|
|
itemDesc2: result.desc2, |
|
|
|
itemCode: result.itemCode, |
|
|
|
itemName: result.itemName, |
|
|
|
itemDesc1: result.itemDesc1, |
|
|
|
itemDesc2: result.itemDesc2, |
|
|
|
|
|
|
|
locationCode: this.location.code, |
|
|
|
locationGroup: this.location.locationGroupCode, |
|
|
@ -553,7 +653,7 @@ |
|
|
|
detail.inventoryQty = 0; |
|
|
|
detail.countQty = 1; |
|
|
|
detail.status = 2; |
|
|
|
detail.uom =result.basicUom |
|
|
|
detail.uom =result.uom |
|
|
|
return detail; |
|
|
|
}, |
|
|
|
|
|
|
|