|
|
@ -43,6 +43,22 @@ |
|
|
|
@alterResultCountDetails="alterResultCountDetails" |
|
|
|
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
|
|
|
></curren-Drawer> |
|
|
|
<!-- 批量原因弹窗 --> |
|
|
|
<el-dialog |
|
|
|
title="不合格转合格原因" |
|
|
|
:visible="convertReasonShow" |
|
|
|
:append-to-body="true" |
|
|
|
> |
|
|
|
<el-form :model="convertReasonForm" v-if="convertReasonShow"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="convertReasonForm.reason" :rows="3" type="textarea"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="convertClose">取 消</el-button> |
|
|
|
<el-button type="primary" @click="convertList()">确 定</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
@ -77,12 +93,15 @@ export default { |
|
|
|
label: "批量转合格", |
|
|
|
name: "custom", |
|
|
|
size: "mini", |
|
|
|
customHandle: this.convertList() |
|
|
|
// customHandle: this.convertList() |
|
|
|
customHandle:(()=>{this.convertShow()}) |
|
|
|
}, |
|
|
|
this.defaultFieldSettingBtn(),//字段设置 |
|
|
|
this.defaultFreshBtn(),//刷新 |
|
|
|
this.defaultFilterBtn(),//筛选 |
|
|
|
], |
|
|
|
convertReasonShow:false,//批量原因弹窗 |
|
|
|
convertReasonForm:{reason:null}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted () { |
|
|
@ -105,90 +124,95 @@ export default { |
|
|
|
handleSelectionChange(val) { |
|
|
|
this.selectionData = val |
|
|
|
}, |
|
|
|
convertShow(){ |
|
|
|
if(this.selectionData && this.selectionData.length > 0){ |
|
|
|
this.convertReasonShow = true |
|
|
|
}else{ |
|
|
|
this.$message.warning('请至少选择一条数据!') |
|
|
|
} |
|
|
|
}, |
|
|
|
convertClose(){ |
|
|
|
this.convertReasonShow = false; |
|
|
|
this.convertReasonForm.reason = '' |
|
|
|
}, |
|
|
|
// 批量转合格 |
|
|
|
convertList() { |
|
|
|
if (this.selectionData != undefined ) { |
|
|
|
if (this.selectionData.length > 0) { |
|
|
|
this.Loading.appMainLoading = true |
|
|
|
// 20230407 |
|
|
|
let params = { |
|
|
|
tenantId: null, |
|
|
|
remark: null, |
|
|
|
extraProperties: null, |
|
|
|
worker: store.getters.name.userName, |
|
|
|
activeDate: new Date(), |
|
|
|
autoSubmit: false, |
|
|
|
autoAgree: false, |
|
|
|
autoHandle: false, |
|
|
|
autoCompleteJob: false, |
|
|
|
directCreateNote: false, |
|
|
|
number: null, |
|
|
|
details: [] |
|
|
|
// warehouseCode: null, |
|
|
|
// requestStatus: 0, |
|
|
|
// company: localStorage.getItem('company'), |
|
|
|
} |
|
|
|
// company "DongYang" |
|
|
|
// concurrencyStamp "187ecf6d642e48f68a86f05ceddcbaea" |
|
|
|
// creationTime "2022-10-31T09:07:29.4765498" |
|
|
|
// creatorId null |
|
|
|
// extraProperties null |
|
|
|
// id "5b951169-7e82-f544-4a16-3a073dc120ac" |
|
|
|
// isActive true |
|
|
|
// lastCountLabel null |
|
|
|
// lastCountPlanNumber null |
|
|
|
// lastCountTime "0001-01-01T00:00:00" |
|
|
|
// lastModificationTime null |
|
|
|
// lastModifierId null |
|
|
|
// lastTransNumber null |
|
|
|
// lastTransType 13 |
|
|
|
// manageType 1 |
|
|
|
// putInTime "2022-10-31T09:07:29.0686103" |
|
|
|
// serialNumber null |
|
|
|
// status 3 |
|
|
|
// tenantId null |
|
|
|
this.selectionData.forEach(item => { |
|
|
|
// 20240611 |
|
|
|
item.stdPackQty = item.stdPackQty |
|
|
|
item.fromPackingCode = item.packingCode |
|
|
|
item.toPackingCode = item.packingCode |
|
|
|
item.fromLot = item.lot |
|
|
|
item.toLot = item.lot |
|
|
|
item.fromLocationCode = item.locationCode |
|
|
|
item.toLocationCode = 'INSPECT' |
|
|
|
item.fromLocationGroup = item.locationGroup |
|
|
|
item.toLocationGroup = 'INSPECT' |
|
|
|
item.fromLocationArea = item.locationArea |
|
|
|
item.toLocationArea = 'INSPECT' |
|
|
|
item.fromLocationErpCode = item.locationErpCode |
|
|
|
item.toLocationErpCode = 'INSPECT' |
|
|
|
item.fromWarehouseCode = item.warehouseCode |
|
|
|
item.toWarehouseCode = item.warehouseCode |
|
|
|
item.fromStatus = 3 |
|
|
|
item.toStatus = 2 |
|
|
|
item.arriveNoticeNumber = null |
|
|
|
item.asnNumber = null |
|
|
|
item.rpNumber = null |
|
|
|
item.poNumber = null |
|
|
|
item.supplierCode = null |
|
|
|
params.details.push(item) |
|
|
|
// item.fromContainerCode = item.containerCode |
|
|
|
// item.toContainerCode = item.containerCode |
|
|
|
// item.stdPackUom = null |
|
|
|
}) |
|
|
|
convertOk(params).then(res => { |
|
|
|
this.$message.success('已成功转为合格') |
|
|
|
this.paging() |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}).catch(err => { |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message.warning('请至少选择一条数据!') |
|
|
|
} |
|
|
|
this.Loading.appMainLoading = true |
|
|
|
let params = { |
|
|
|
tenantId: null, |
|
|
|
remark: this.convertReasonForm.reason, |
|
|
|
extraProperties: null, |
|
|
|
worker: store.getters.name.userName, |
|
|
|
activeDate: new Date(), |
|
|
|
autoSubmit: false, |
|
|
|
autoAgree: false, |
|
|
|
autoHandle: false, |
|
|
|
autoCompleteJob: false, |
|
|
|
directCreateNote: false, |
|
|
|
number: null, |
|
|
|
details: [] |
|
|
|
// warehouseCode: null, |
|
|
|
// requestStatus: 0, |
|
|
|
// company: localStorage.getItem('company'), |
|
|
|
} |
|
|
|
return this.convertList |
|
|
|
// company "DongYang" |
|
|
|
// concurrencyStamp "187ecf6d642e48f68a86f05ceddcbaea" |
|
|
|
// creationTime "2022-10-31T09:07:29.4765498" |
|
|
|
// creatorId null |
|
|
|
// extraProperties null |
|
|
|
// id "5b951169-7e82-f544-4a16-3a073dc120ac" |
|
|
|
// isActive true |
|
|
|
// lastCountLabel null |
|
|
|
// lastCountPlanNumber null |
|
|
|
// lastCountTime "0001-01-01T00:00:00" |
|
|
|
// lastModificationTime null |
|
|
|
// lastModifierId null |
|
|
|
// lastTransNumber null |
|
|
|
// lastTransType 13 |
|
|
|
// manageType 1 |
|
|
|
// putInTime "2022-10-31T09:07:29.0686103" |
|
|
|
// serialNumber null |
|
|
|
// status 3 |
|
|
|
// tenantId null |
|
|
|
this.selectionData.forEach(item => { |
|
|
|
// 20240611 |
|
|
|
item.stdPackQty = item.stdPackQty |
|
|
|
item.fromPackingCode = item.packingCode |
|
|
|
item.toPackingCode = item.packingCode |
|
|
|
item.fromLot = item.lot |
|
|
|
item.toLot = item.lot |
|
|
|
item.fromLocationCode = item.locationCode |
|
|
|
item.toLocationCode = 'INSPECT' |
|
|
|
item.fromLocationGroup = item.locationGroup |
|
|
|
item.toLocationGroup = 'INSPECT' |
|
|
|
item.fromLocationArea = item.locationArea |
|
|
|
item.toLocationArea = 'INSPECT' |
|
|
|
item.fromLocationErpCode = item.locationErpCode |
|
|
|
item.toLocationErpCode = 'INSPECT' |
|
|
|
item.fromWarehouseCode = item.warehouseCode |
|
|
|
item.toWarehouseCode = item.warehouseCode |
|
|
|
item.fromStatus = 3 |
|
|
|
item.toStatus = 2 |
|
|
|
item.arriveNoticeNumber = null |
|
|
|
item.asnNumber = null |
|
|
|
item.rpNumber = null |
|
|
|
item.poNumber = null |
|
|
|
item.supplierCode = null |
|
|
|
params.details.push(item) |
|
|
|
// item.fromContainerCode = item.containerCode |
|
|
|
// item.toContainerCode = item.containerCode |
|
|
|
// item.stdPackUom = null |
|
|
|
}) |
|
|
|
convertOk(params).then(res => { |
|
|
|
this.$message.success('已成功转为合格') |
|
|
|
this.paging() |
|
|
|
this.convertClose() |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}).catch(err => { |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
// return this.convertList |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|