|
|
@ -28,8 +28,11 @@ |
|
|
|
</div> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
|
<com-message ref="comMessage"></com-message> |
|
|
|
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm'></com-issue-request-popup> |
|
|
|
<win-scan-button @goScan='openScanDetailPopup'></win-scan-button> |
|
|
|
<com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'> |
|
|
|
</com-scan-issue-pack> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
@ -57,6 +60,8 @@ |
|
|
|
import comIssueRequestCreator from '@/pages/issue/coms/comIssueRequestCreator.vue' |
|
|
|
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue' |
|
|
|
import comIssueDetailCard from '@/pages/issue/coms/comIssueDetailCard.vue' |
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
|
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'issueRequestSubmit', |
|
|
@ -67,7 +72,9 @@ |
|
|
|
comMessage, |
|
|
|
comIssueRequestCreator, |
|
|
|
comIssueRequestInfo, |
|
|
|
comIssueDetailCard |
|
|
|
comIssueDetailCard, |
|
|
|
winScanButton, |
|
|
|
comScanIssuePack |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -117,7 +124,7 @@ |
|
|
|
} else { |
|
|
|
if (res.data.length > 0) { |
|
|
|
this.workShopCode = item.workshopCode; |
|
|
|
res.data.forEach(r => { |
|
|
|
res.data.forEach(r => { |
|
|
|
r.toLocationCode = item.rawLocationCode; |
|
|
|
r.productionLineCode = item.productionLineCode; |
|
|
|
r.workStationCode = item.workStationCode; |
|
|
@ -197,7 +204,6 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
caclcQty() { |
|
|
|
var totalQty = 0; |
|
|
|
this.detailSource.subList.forEach(res => { |
|
|
@ -206,6 +212,38 @@ |
|
|
|
this.detailSource.totalQty = totalQty; |
|
|
|
}, |
|
|
|
|
|
|
|
openScanDetailPopup() { |
|
|
|
var datacontent = {} |
|
|
|
//克隆对象,深度克隆,防止双向绑定同一个变量 |
|
|
|
// Object.assign(datacontent, this.detailSource); |
|
|
|
this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent); |
|
|
|
}, |
|
|
|
|
|
|
|
closeScanPopup() { |
|
|
|
this.updateCommitBtn(); |
|
|
|
}, |
|
|
|
|
|
|
|
updateData(record) { |
|
|
|
let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode); |
|
|
|
let item = requestLocation.Items.find(r => r.itemCode == record.itemCode); |
|
|
|
let itemHandleQty = 0; |
|
|
|
if (item != undefined) { |
|
|
|
item.Locations.forEach(l => { |
|
|
|
let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b |
|
|
|
.packingNumber == null || b.packingNumber == '') && b.batch == |
|
|
|
record.batch); |
|
|
|
let handleQty = 0; |
|
|
|
if (batch != undefined) { |
|
|
|
batch.Records.forEach(res => { |
|
|
|
handleQty += Number(res.qty) |
|
|
|
}) |
|
|
|
batch.handleQty = handleQty; |
|
|
|
itemHandleQty += handleQty; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
// item.handleQty=itemHandleQty; |
|
|
|
}, |
|
|
|
|
|
|
|
setParams() { |
|
|
|
return this.detailSource |
|
|
|