|
@ -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,9 +140,10 @@ |
|
|
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; |
|
|
|
|
|
result.balance.forEach( |
|
|
|
|
|
balance => { |
|
|
var item = this.detailSource.find(res => { |
|
|
var item = this.detailSource.find(res => { |
|
|
if (res.itemCode == balance.itemCode) { |
|
|
if (res.itemCode == balance.itemCode) { |
|
|
return res |
|
|
return res |
|
@ -184,20 +170,18 @@ |
|
|
item.subList.push(newDetail); |
|
|
item.subList.push(newDetail); |
|
|
} else { |
|
|
} else { |
|
|
if (detail.scaned == true) { |
|
|
if (detail.scaned == true) { |
|
|
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") |
|
|
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 => { |
|
|