|
@ -10,8 +10,8 @@ |
|
|
<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" :settingParam="dataContent" |
|
|
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" |
|
|
:isShowStatus="false" @removeItem="removeItem(index,item)" @updateData="updateData" |
|
|
:isShowStatus="true" :isShowToLocation='false' @removeItem="removeItem(index,item)" |
|
|
@removePack="removePack"> |
|
|
@updateData="updateData" @removePack="removePack"> |
|
|
</record-com-detail-card> |
|
|
</record-com-detail-card> |
|
|
</view> |
|
|
</view> |
|
|
<view class='split_line'></view> |
|
|
<view class='split_line'></view> |
|
@ -33,16 +33,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<win-scan-package ref="scanPopup" @getResult='getScanResult'></win-scan-package> |
|
|
<win-scan-package ref="scanPopup" @getResult='getScanResult'></win-scan-package> |
|
|
|
|
|
|
|
|
<!-- <win-scan-pack-and-location :balanceFromInventoryStatuses="false" ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> --> |
|
|
|
|
|
<!-- <win-com-scan-balance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="bussinessCode"> |
|
|
|
|
|
</win-com-scan-balance> --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' |
|
|
|
|
|
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> --> |
|
|
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
@ -73,12 +64,9 @@ |
|
|
} from '@/common/record.js'; |
|
|
} from '@/common/record.js'; |
|
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
|
|
|
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
|
|
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
|
|
import comProductionRecord from '@/pages/productionReceipt/coms/comProductionRecord.vue' |
|
|
import comProductionRecord from '@/pages/productionReceipt/coms/comProductionRecord.vue' |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
|
|
|
|
|
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
|
|
|
|
|
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
|
|
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
|
|
import winScanPackage from '@/mycomponents/scan/winScanPackage.vue' |
|
|
import winScanPackage from '@/mycomponents/scan/winScanPackage.vue' |
|
|
|
|
|
|
|
@ -90,12 +78,9 @@ |
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
winScanButton, |
|
|
winScanButton, |
|
|
winScanPack, |
|
|
|
|
|
comProductionRecord, |
|
|
comProductionRecord, |
|
|
requiredLocation, |
|
|
requiredLocation, |
|
|
comBlankView, |
|
|
comBlankView, |
|
|
winScanLocation, |
|
|
|
|
|
winScanPackAndLocation, |
|
|
|
|
|
recordComDetailCard, |
|
|
recordComDetailCard, |
|
|
winScanPackage |
|
|
winScanPackage |
|
|
}, |
|
|
}, |
|
@ -155,49 +140,48 @@ |
|
|
mounted() {}, |
|
|
mounted() {}, |
|
|
methods: { |
|
|
methods: { |
|
|
getScanResult(result) { |
|
|
getScanResult(result) { |
|
|
let balance = result.balance; |
|
|
|
|
|
let label = result.label; |
|
|
let label = result.label; |
|
|
let pack = result.package; |
|
|
let pack = result.package; |
|
|
var item = this.detailSource.find(res => { |
|
|
result.balance.forEach( |
|
|
if (res.itemCode == balance.itemCode) { |
|
|
balance => { |
|
|
return res |
|
|
var item = this.detailSource.find(res => { |
|
|
} |
|
|
if (res.itemCode == balance.itemCode) { |
|
|
}) |
|
|
return res |
|
|
if (item == undefined) { |
|
|
} |
|
|
var itemp = createItemInfo(balance, pack); |
|
|
}) |
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
if (item == undefined) { |
|
|
newDetail.fromInventoryStatus = balance.inventoryStatus; |
|
|
var itemp = createItemInfo(balance, pack); |
|
|
itemp.subList.push(newDetail); |
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
this.detailSource.push(itemp) |
|
|
newDetail.fromInventoryStatus = balance.inventoryStatus; |
|
|
} else { |
|
|
itemp.subList.push(newDetail); |
|
|
var detail = item.subList.find(r => { |
|
|
this.detailSource.push(itemp) |
|
|
if (r.packingNumber == balance.packingNumber && |
|
|
} else { |
|
|
r.batch == balance.batch && |
|
|
var detail = item.subList.find(r => { |
|
|
r.locationCode == balance.locationCode && |
|
|
if (r.packingNumber == balance.packingNumber && |
|
|
r.inventoryStatus == balance.inventoryStatus) { |
|
|
r.batch == balance.batch && |
|
|
return r; |
|
|
r.locationCode == balance.locationCode && |
|
|
} |
|
|
r.inventoryStatus == balance.inventoryStatus) { |
|
|
}) |
|
|
return r; |
|
|
if (detail == undefined) { |
|
|
} |
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
}) |
|
|
newDetail.fromInventoryStatus = balance.inventoryStatus; |
|
|
if (detail == undefined) { |
|
|
item.subList.push(newDetail); |
|
|
let newDetail = createDetailInfo(balance, pack); |
|
|
} else { |
|
|
newDetail.fromInventoryStatus = balance.inventoryStatus; |
|
|
if (detail.scaned == true) { |
|
|
item.subList.push(newDetail); |
|
|
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") |
|
|
} else { |
|
|
|
|
|
if (detail.scaned == true) { |
|
|
|
|
|
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + |
|
|
|
|
|
"]已经在列表中") |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
this.calcHandleQty(); |
|
|
} |
|
|
} |
|
|
} |
|
|
) |
|
|
this.calcHandleQty(); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showErrorMessage(message) { |
|
|
showErrorMessage(message) { |
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
|
this.$refs.comMessage.showErrorMessage(message, res => {}); |
|
|
if (res) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
}, |
|
|
calcHandleQty() { |
|
|
calcHandleQty() { |
|
|
calcHandleQty(this.detailSource); |
|
|
calcHandleQty(this.detailSource); |
|
@ -258,10 +242,17 @@ |
|
|
|
|
|
|
|
|
commit() { |
|
|
commit() { |
|
|
if (this.toLocationCode == "") { |
|
|
if (this.toLocationCode == "") { |
|
|
this.showMessage("请先选择目标库位") |
|
|
this.$refs.comMessage.showQuestionMessage('未指定目标库位,系统将按上架策略推荐库位是否继续提交?', res => { |
|
|
return; |
|
|
if (res) { |
|
|
|
|
|
this.commitRecord(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.commitRecord(); |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
commitRecord() { |
|
|
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { |
|
|
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { |
|
|
//查询管理模式 |
|
|
//查询管理模式 |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
@ -292,13 +283,10 @@ |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
this.showErrorMessage(res.message); |
|
|
this.showErrorMessage(res.message); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("没有要提交的数据,请先扫描") |
|
|
this.showErrorMessage("没有要提交的数据,请先扫描") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setPrecisionStrategParams() { |
|
|
setPrecisionStrategParams() { |
|
@ -321,7 +309,6 @@ |
|
|
} |
|
|
} |
|
|
itemList.push(result) |
|
|
itemList.push(result) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
@ -329,7 +316,6 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setParams() { |
|
|
setParams() { |
|
|
|
|
|
|
|
|
var subList = [] |
|
|
var subList = [] |
|
|
var creator = this.$store.state.user.id |
|
|
var creator = this.$store.state.user.id |
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
|