Browse Source

【nev-pc】不合格转合格原因需求更改

ag_report_nev
安虹睿 11 months ago
parent
commit
b0630f6577
  1. 188
      fe/PC/src/views/rawMaterialManage/quality/unqualifiedToQualified.vue

188
fe/PC/src/views/rawMaterialManage/quality/unqualifiedToQualified.vue

@ -43,6 +43,22 @@
@alterResultCountDetails="alterResultCountDetails" @alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails" @alertoldSkipCountDetails="alertoldSkipCountDetails"
></curren-Drawer> ></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> </div>
</template> </template>
<script> <script>
@ -77,12 +93,15 @@ export default {
label: "批量转合格", label: "批量转合格",
name: "custom", name: "custom",
size: "mini", size: "mini",
customHandle: this.convertList() // customHandle: this.convertList()
customHandle:(()=>{this.convertShow()})
}, },
this.defaultFieldSettingBtn(),// this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),// this.defaultFreshBtn(),//
this.defaultFilterBtn(),// this.defaultFilterBtn(),//
], ],
convertReasonShow:false,//
convertReasonForm:{reason:null},
}; };
}, },
mounted () { mounted () {
@ -105,90 +124,95 @@ export default {
handleSelectionChange(val) { handleSelectionChange(val) {
this.selectionData = 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() { convertList() {
if (this.selectionData != undefined ) { this.Loading.appMainLoading = true
if (this.selectionData.length > 0) { let params = {
this.Loading.appMainLoading = true tenantId: null,
// 20230407 remark: this.convertReasonForm.reason,
let params = { extraProperties: null,
tenantId: null, worker: store.getters.name.userName,
remark: null, activeDate: new Date(),
extraProperties: null, autoSubmit: false,
worker: store.getters.name.userName, autoAgree: false,
activeDate: new Date(), autoHandle: false,
autoSubmit: false, autoCompleteJob: false,
autoAgree: false, directCreateNote: false,
autoHandle: false, number: null,
autoCompleteJob: false, details: []
directCreateNote: false, // warehouseCode: null,
number: null, // requestStatus: 0,
details: [] // company: localStorage.getItem('company'),
// 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('请至少选择一条数据!')
}
} }
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
} }
} }
}; };

Loading…
Cancel
Save