Browse Source

增加 IQC检验任务重载时,可以更改物料编码以及供应商

java8
赵宏斌 5 months ago
parent
commit
1a37422cb0
  1. 1
      src/api/qc/qc.js
  2. 286
      src/views/modules/qc/IQCResultEntry.vue

1
src/api/qc/qc.js

@ -84,6 +84,7 @@ export const getOperationDescList = data => createAPI(`/pms/qc/getOperationDescL
export const getManufacturerList = data => createAPI(`/pms/qc/getManufacturerList`,'post',data)
export const getPartTemplateLists = data => createAPI(`/pms/qc/getPartTemplateLists`,'post',data)
export const qcPartAttributeEdit = data => createAPI(`/pms/qc/qcPartAttributeEdit`,'post',data)
export const overLoadSearchPartInfo = data => createAPI(`/pms/qc/overLoadSearchPartInfo`,'post',data)
// ===================================== 类别属性设置 =====================================
export const qcFamilyAttributeSearch = data => createAPI(`/pms/qc/qcFamilyAttributeSearch`,'post',data)

286
src/views/modules/qc/IQCResultEntry.vue

@ -422,6 +422,121 @@
</el-footer>
</el-dialog>
<el-dialog title="任务重载-更换物料" :close-on-click-modal="false" v-drag :visible.sync="iqcRecordOverFlag" width="425px">
<el-form :inline="true" label-position="top">
<el-form-item :label="'物料编码'">
<span slot="label" @click="overLoadSearchPartInfo()"><a herf="#">物料编码:</a></span>
<el-input v-model="iqcRecordOverPartNo" disabled style="width: 150px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="iqcRecordOverPartDesc" disabled style="width: 230px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top">
<el-form-item :label="'供应商编码'">
<span slot="label" @click="getManufacturerList()"><a herf="#">供应商编码:</a></span>
<el-input v-model="iqcRecordOverSupplierNo" disabled style="width: 150px"></el-input>
</el-form-item>
<el-form-item :label="'供应商'">
<el-input v-model="iqcRecordOverSupplierDesc" disabled style="width: 230px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:35px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="overLoadModal3">确定</el-button>
<el-button type="primary" @click="iqcRecordOverFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<el-dialog title="物料属性" :close-on-click-modal="false" v-drag :visible.sync="iqcRecordOverFlag2" width="350px">
<el-form :inline="true" label-position="top">
<el-form-item label="BU" prop="bu">
<el-select v-model="iqcRecordOverModal.buDesc" disabled style="width: 295px">
<el-option
v-for = "i in userBuList"
:key = "i.buNo"
:label = "i.sitename"
:value = "i.buDesc">
<span style="float: left;width: 100px">{{ i.sitename }}</span>
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
{{ i.buDesc }}
</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="'物料编码'">
<el-input v-model="iqcRecordOverModal.partNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="iqcRecordOverModal.partDesc" style="width: 120px"></el-input>
<el-button type="primary" @click="overLoadSearchPartInfo()" >查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
:data="overLoadPartList"
@row-dblclick="getRowData1"
border
style="width: 100%;">
<el-table-column
prop="partNo"
header-align="center"
align="center"
width="100"
label="物料编码">
</el-table-column>
<el-table-column
prop="partDesc"
header-align="center"
align="center"
width="240"
label="物料名称">
</el-table-column>
</el-table>
<el-footer style="height:35px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="iqcRecordOverFlag2 = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 供应商 -->
<el-dialog title="供应商清单" :close-on-click-modal="false" v-drag :visible.sync="manufacturerModelFlag" width="520px">
<div class="rq">
<el-form :inline="true" label-position="top">
<el-form-item :label="'供应商编码:'">
<el-input v-model="manufacturerData.manufacturerID" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'供应商名称:'">
<el-input v-model="manufacturerData.manufacturerName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getManufacturerList()">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
:data="manufacturerList"
ref="manufacturerTable"
@row-dblclick="manufacturerClickRow"
border
style="width: 100%;">
<el-table-column
prop="manufacturerID"
header-align="center"
align="center"
label="供应商编码">
</el-table-column>
<el-table-column
prop="manufacturerName"
header-align="center"
align="center"
label="供应商名称">
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="manufacturerModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 文件清单 -->
<el-dialog title="文件清单" :close-on-click-modal="false" v-drag :visible.sync="fileFlag" width="800px">
<el-form :inline="true" label-position="top">
@ -677,6 +792,7 @@
getIQCItemObjectList, //
dataAcquisitionByItem, //
cancelApproval, //
overLoadSearchPartInfo, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -693,6 +809,7 @@
import subDetailUpload from "./sub_detail_upload"
import QrCode from "../common/QrCode.vue";
import IqcFileTable from "./IQCFileTable.vue";
import {getManufacturerList, searchPartAttributeDetails} from "../../../api/qc/qc";
export default {
components: {
IqcFileTable,
@ -1691,6 +1808,28 @@
batchQualifiedQty: ''
},
detailInformationFlag: false,
iqcRecordOverFlag: false,
iqcRecordOverFlag2: false,
manufacturerModelFlag: false,
manufacturerData: {
site: '',
manufacturerID: '',
manufacturerName: ''
},
iqcRecordOverPartNo: '',
iqcRecordOverPartDesc: '',
iqcRecordOverSupplierNo: '',
iqcRecordOverSupplierDesc: '',
iqcRecordOverModal:{
attributeType: 'A',
userName: this.$store.state.user.name,
page: 1,
limit: 1000,
partNo: '',
partDesc: ''
},
overLoadPartList: [],
manufacturerList: [],
detailList: [],
saveInformationData: {
site: '',
@ -2638,40 +2777,127 @@
this.$message.warning('请勾选要重载的检验单!')
return
}
if (this.IQCSelections.every(val => val.state === '待检验' || val.state === '未开始')) {
this.$confirm(`是否重载该 `+ this.IQCSelections.length +` 条检验单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: '',
submitList: this.IQCSelections
}
iqcRecordOverLoad(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.IQCSelections = []
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
if (this.IQCSelections.length === 1 && this.IQCSelections[0].buNo == '02-Hardtag' && (this.IQCSelections[0].state=='待检验'|| this.IQCSelections[0].state=='未开始') &&this.IQCSelections[0].partNo.substring(0,1) === '1') {
this.iqcRecordOverPartNo = this.IQCSelections[0].partNo
this.iqcRecordOverPartDesc = this.IQCSelections[0].partDesc
this.iqcRecordOverSupplierNo = this.IQCSelections[0].supplierNo
this.iqcRecordOverSupplierDesc = this.IQCSelections[0].supplierDesc
this.iqcRecordOverFlag = true
} else {
if (this.IQCSelections.every(val => val.state === '待检验' || val.state === '未开始')) {
this.$confirm(`是否重载该 `+ this.IQCSelections.length +` 条检验单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: '',
submitList: this.IQCSelections
}
this.overLoadModal2(tempData)
// iqcRecordOverLoad(tempData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.IQCSelections = []
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {}
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
})
})
} else {
this.$message.warning('检验单必须为待检验状态!')
return
} else {
this.$message.warning('检验单必须为待检验状态!')
return
}
}
},
overLoadModal2(tempData){
iqcRecordOverLoad(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.IQCSelections = []
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
overLoadModal3(){
let IQCSelections = this.IQCSelections
IQCSelections[0].partNo = this.iqcRecordOverPartNo
IQCSelections[0].partDesc = this.iqcRecordOverPartDesc
IQCSelections[0].supplierNo = this.iqcRecordOverSupplierNo
let tempData = {
site: '',
submitList: IQCSelections
}
this.overLoadModal2(tempData)
this.iqcRecordOverFlag = false
},
overLoadSearchPartInfo(){
this.iqcRecordOverModal.buDesc = '硬标'
overLoadSearchPartInfo(this.iqcRecordOverModal).then(({data})=>{
if (data && data.code === 0) {
this.overLoadPartList = data.list
}
})
this.iqcRecordOverFlag2 = true
},
//
getManufacturerList () {
this.manufacturerData.site = '3'
getManufacturerList(this.manufacturerData).then(({data}) => {
if (data && data.code === 0) {
this.manufacturerList = data.rows
this.manufacturerModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
getRowData1(row){
this.iqcRecordOverPartNo = row.partNo
this.iqcRecordOverPartDesc = row.partDesc
let param = {
site: '3',
buNo: '02-Hardtag',
partNo: this.iqcRecordOverPartNo,
attributeNo: this.iqcRecordOverPartNo,
partDesc: this.iqcRecordOverPartDesc,
inspectionTypeNo: '105',
attributeType: 'A'
}
//
searchPartAttributeDetails(param).then(({data}) => {
console.log(data.rows.length)
if (data.rows.length > 0) {
this.iqcRecordOverSupplierNo = data.rows[0].manufacturerID
this.iqcRecordOverSupplierDesc = data.rows[0].manufacturerName
}
})
this.iqcRecordOverFlag2 = false
},
manufacturerClickRow(row){
this.iqcRecordOverSupplierNo = row.manufacturerID
this.iqcRecordOverSupplierDesc = row.manufacturerName
this.manufacturerModelFlag = false
},
//
submitResult () {
let tempData1 = '' //

Loading…
Cancel
Save