|
|
@ -197,8 +197,8 @@ |
|
|
<el-row :gutter="10"> |
|
|
<el-row :gutter="10"> |
|
|
<el-col :span="10"> |
|
|
<el-col :span="10"> |
|
|
<el-form-item prop="customerNo" label="客户编码"> |
|
|
<el-form-item prop="customerNo" label="客户编码"> |
|
|
<span slot="label" v-if="modalData.flag === '1'" @click="getBaseList(102,1)"><a herf="#">客户编码</a></span> |
|
|
|
|
|
<el-input :disabled="modalData.flag !== '1'" v-model="modalData.customerNo" |
|
|
|
|
|
|
|
|
<span slot="label" v-if="!modalData.customerNoFlag" @click="getBaseList(102,1)"><a herf="#">客户编码</a></span> |
|
|
|
|
|
<el-input :disabled="modalData.customerNoFlag" readonly v-model="modalData.customerNo" |
|
|
@blur="handleQueryCustomer"></el-input> |
|
|
@blur="handleQueryCustomer"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
@ -247,9 +247,9 @@ |
|
|
<el-row :gutter="10"> |
|
|
<el-row :gutter="10"> |
|
|
<el-col :span="10"> |
|
|
<el-col :span="10"> |
|
|
<el-form-item prop="projectId" label="项目号"> |
|
|
<el-form-item prop="projectId" label="项目号"> |
|
|
<span slot="label" v-if="modalData.customerNo && modalData.flag === '1'" |
|
|
|
|
|
|
|
|
<span slot="label" v-if="!modalData.projectIdFlag" |
|
|
@click="chooseProjectListFlag = true"><a herf="#">项目号</a></span> |
|
|
@click="chooseProjectListFlag = true"><a herf="#">项目号</a></span> |
|
|
<el-input :disabled="!modalData.customerNo || modalData.flag !== '1'" v-model="modalData.projectId" |
|
|
|
|
|
|
|
|
<el-input :disabled="modalData.projectIdFlag" readonly v-model="modalData.projectId" |
|
|
@blur="handleQueryProjectByCustomer"></el-input> |
|
|
@blur="handleQueryProjectByCustomer"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
@ -277,12 +277,19 @@ |
|
|
<el-col :span="8"> |
|
|
<el-col :span="8"> |
|
|
<el-row :gutter="10"> |
|
|
<el-row :gutter="10"> |
|
|
<el-col :span="10"> |
|
|
<el-col :span="10"> |
|
|
|
|
|
<!-- <el-form-item prop="testPartNo" label="物料编码">--> |
|
|
|
|
|
<!-- <span slot="label" v-if="modalData.projectId && modalData.flag === '1'"--> |
|
|
|
|
|
<!-- @click="projectPartModelFlag = true"><a herf="#">物料编码</a></span>--> |
|
|
|
|
|
<!-- <el-input :disabled="!modalData.projectId || modalData.flag !== '1'" v-model="modalData.testPartNo"--> |
|
|
|
|
|
<!-- @blur="handleQueryProjectPart"></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
<el-form-item prop="testPartNo" label="物料编码"> |
|
|
<el-form-item prop="testPartNo" label="物料编码"> |
|
|
<span slot="label" v-if="modalData.projectId && modalData.flag === '1'" |
|
|
|
|
|
@click="projectPartModelFlag = true"><a herf="#">物料编码</a></span> |
|
|
|
|
|
<el-input :disabled="!modalData.projectId || modalData.flag !== '1'" v-model="modalData.testPartNo" |
|
|
|
|
|
|
|
|
<span slot="label" |
|
|
|
|
|
@click="projectPartModelFlag = true" v-if="!modalData.testPartNoFlag"><a herf="#">物料编码</a></span> |
|
|
|
|
|
<el-input v-model="modalData.testPartNo" readonly :disabled="modalData.testPartNoFlag" |
|
|
@blur="handleQueryProjectPart"></el-input> |
|
|
@blur="handleQueryProjectPart"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="14"> |
|
|
<el-col :span="14"> |
|
|
<el-form-item label=" "> |
|
|
<el-form-item label=" "> |
|
|
@ -1043,7 +1050,9 @@ export default { |
|
|
if (!newV) { |
|
|
if (!newV) { |
|
|
this.modalData.customerDesc = '' |
|
|
this.modalData.customerDesc = '' |
|
|
} |
|
|
} |
|
|
this.modalData.projectId = '' |
|
|
|
|
|
|
|
|
if (!this.modalData.projectId){ |
|
|
|
|
|
this.modalData.projectId = '' |
|
|
|
|
|
} |
|
|
this.modalData.consignee = '' |
|
|
this.modalData.consignee = '' |
|
|
this.modalData.consigneeContact = '' |
|
|
this.modalData.consigneeContact = '' |
|
|
this.modalData.sendSamplesAddress = '' |
|
|
this.modalData.sendSamplesAddress = '' |
|
|
@ -1054,7 +1063,12 @@ export default { |
|
|
if (!newV) { |
|
|
if (!newV) { |
|
|
this.modalData.projectName = '' |
|
|
this.modalData.projectName = '' |
|
|
} |
|
|
} |
|
|
this.modalData.testPartNo = '' |
|
|
|
|
|
|
|
|
if (!this.modalData.testPartNo){ |
|
|
|
|
|
this.modalData.testPartNo = '' |
|
|
|
|
|
} |
|
|
|
|
|
if (!this.modalData.customerNo){ |
|
|
|
|
|
this.modalData.customerNo = '' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
'modalData.testPartNo'(newV, oldV) { |
|
|
'modalData.testPartNo'(newV, oldV) { |
|
|
@ -1063,6 +1077,9 @@ export default { |
|
|
this.modalData.partName = '' |
|
|
this.modalData.partName = '' |
|
|
this.dialogProperties = []; |
|
|
this.dialogProperties = []; |
|
|
} |
|
|
} |
|
|
|
|
|
if (!this.modalData.projectId){ |
|
|
|
|
|
this.modalData.projectId = '' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
'modalData.tracker'(newV, oldV) { |
|
|
'modalData.tracker'(newV, oldV) { |
|
|
@ -1088,6 +1105,12 @@ export default { |
|
|
modalFlag(newVal, oldVal) { |
|
|
modalFlag(newVal, oldVal) { |
|
|
if (newVal === false) { |
|
|
if (newVal === false) { |
|
|
this.detailFlag = false |
|
|
this.detailFlag = false |
|
|
|
|
|
this.modalData.customerNoFlag = false |
|
|
|
|
|
this.modalData.projectIdFlag = true |
|
|
|
|
|
this.modalData.testPartNoFlag = false |
|
|
|
|
|
this.projectPartData.projectId = '' |
|
|
|
|
|
this.searchProjectData.customerId = '' |
|
|
|
|
|
this.searchProjectData.testPartNo = '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
rejectVisible(newVal, oldVal) { |
|
|
rejectVisible(newVal, oldVal) { |
|
|
@ -1224,6 +1247,9 @@ export default { |
|
|
isReject: '', |
|
|
isReject: '', |
|
|
nodeId: '', |
|
|
nodeId: '', |
|
|
soNumber: '', |
|
|
soNumber: '', |
|
|
|
|
|
customerNoFlag: false, |
|
|
|
|
|
projectIdFlag: true, |
|
|
|
|
|
testPartNoFlag: false, |
|
|
}, |
|
|
}, |
|
|
testDetailData: { |
|
|
testDetailData: { |
|
|
technicalConsiderations: '', |
|
|
technicalConsiderations: '', |
|
|
@ -2230,6 +2256,7 @@ export default { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
projectId: undefined, |
|
|
projectId: undefined, |
|
|
projectName: undefined, |
|
|
projectName: undefined, |
|
|
|
|
|
testPartNo: undefined, |
|
|
customerId: undefined, |
|
|
customerId: undefined, |
|
|
}, |
|
|
}, |
|
|
// 项目集合 |
|
|
// 项目集合 |
|
|
@ -2728,15 +2755,17 @@ export default { |
|
|
* 获取项目物料列表 |
|
|
* 获取项目物料列表 |
|
|
*/ |
|
|
*/ |
|
|
getProjectPartList() { |
|
|
getProjectPartList() { |
|
|
if (!this.modalData.projectId) { |
|
|
|
|
|
this.projectPartList = []; |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// if (!this.modalData.projectId) { |
|
|
|
|
|
// this.projectPartList = []; |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
// 先清空缓存选中 |
|
|
// 先清空缓存选中 |
|
|
// this.$nextTick(() => this.$refs.projectPartTable.clearSelection()) |
|
|
// this.$nextTick(() => this.$refs.projectPartTable.clearSelection()) |
|
|
// 拿到选中的产品编号 |
|
|
// 拿到选中的产品编号 |
|
|
let projectPartList = this.modalData.testPartNo.split(';') |
|
|
let projectPartList = this.modalData.testPartNo.split(';') |
|
|
this.projectPartData.projectId = this.modalData.projectId; |
|
|
|
|
|
|
|
|
if (this.modalData.projectId&&this.modalData.projectId!=='') { |
|
|
|
|
|
this.projectPartData.projectId = this.modalData.projectId; |
|
|
|
|
|
} |
|
|
let params = { |
|
|
let params = { |
|
|
...this.projectPartData, |
|
|
...this.projectPartData, |
|
|
no: this.partPageNo, |
|
|
no: this.partPageNo, |
|
|
@ -3331,6 +3360,16 @@ export default { |
|
|
if (val.Customer_no === this.modalData.customerNo) { |
|
|
if (val.Customer_no === this.modalData.customerNo) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.modalData.projectIdFlag&&!this.modalData.testPartNoFlag){ |
|
|
|
|
|
// 料号、项目、客户都没选时选客户 |
|
|
|
|
|
this.modalData.testPartNoFlag = true |
|
|
|
|
|
this.modalData.projectIdFlag = false |
|
|
|
|
|
} else if (!this.modalData.projectIdFlag&&this.modalData.testPartNoFlag){ |
|
|
|
|
|
// 选了客户没选项目和料号时选客户 |
|
|
|
|
|
|
|
|
|
|
|
} else if (!this.modalData.projectIdFlag&&!this.modalData.testPartNoFlag){ |
|
|
|
|
|
// 选了客户和料号时选客户 |
|
|
|
|
|
} |
|
|
this.modalData.customerNo = val.Customer_no |
|
|
this.modalData.customerNo = val.Customer_no |
|
|
this.modalData.customerDesc = val.Customer_desc |
|
|
this.modalData.customerDesc = val.Customer_desc |
|
|
this.modalData.projectId = '' |
|
|
this.modalData.projectId = '' |
|
|
@ -3476,13 +3515,32 @@ export default { |
|
|
projectClickRow(row) { |
|
|
projectClickRow(row) { |
|
|
this.modalData.projectId = row.projectId |
|
|
this.modalData.projectId = row.projectId |
|
|
this.modalData.projectName = row.projectName |
|
|
this.modalData.projectName = row.projectName |
|
|
this.getProjectPartList() |
|
|
|
|
|
|
|
|
if (this.modalData.testPartNoFlag&&!this.modalData.customerNoFlag){ |
|
|
|
|
|
// 选了客户没选项目时选项目 |
|
|
|
|
|
this.modalData.testPartNoFlag = false |
|
|
|
|
|
} else if (!this.modalData.testPartNoFlag&&!this.modalData.customerNoFlag){ |
|
|
|
|
|
// 选了客户选了项目时选项目 |
|
|
|
|
|
// this.modalData.testPartNoFlag = false |
|
|
|
|
|
} else if (!this.modalData.testPartNoFlag&&this.modalData.customerNoFlag){ |
|
|
|
|
|
// 选了料号没选客户时选项目 |
|
|
|
|
|
this.modalData.customerNoFlag = false |
|
|
|
|
|
} |
|
|
|
|
|
if (this.modalData.customerNo&&this.modalData.customerNo!==''){ |
|
|
|
|
|
this.getProjectPartList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.modalData.customerNo = row.customerId |
|
|
|
|
|
this.modalData.customerDesc = row.customerName |
|
|
|
|
|
} |
|
|
this.chooseProjectListFlag = false |
|
|
this.chooseProjectListFlag = false |
|
|
}, |
|
|
}, |
|
|
// 查询searchProjectInfoList |
|
|
// 查询searchProjectInfoList |
|
|
searchProjectInfoList() { |
|
|
searchProjectInfoList() { |
|
|
this.projectList = []; |
|
|
this.projectList = []; |
|
|
this.searchProjectData.customerId = this.modalData.customerNo |
|
|
|
|
|
|
|
|
if (this.modalData.customerNo&&this.modalData.customerNo!==''){ |
|
|
|
|
|
this.searchProjectData.customerId = this.modalData.customerNo |
|
|
|
|
|
} else { |
|
|
|
|
|
this.searchProjectData.testPartNo = this.modalData.testPartNo |
|
|
|
|
|
} |
|
|
searchProjectInfoList(this.searchProjectData).then(({data}) => { |
|
|
searchProjectInfoList(this.searchProjectData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.projectList = data.rows |
|
|
this.projectList = data.rows |
|
|
@ -3608,6 +3666,15 @@ export default { |
|
|
partPropertiesList(params).then(({data}) => { |
|
|
partPropertiesList(params).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.dialogProperties = data.rows |
|
|
this.dialogProperties = data.rows |
|
|
|
|
|
if (this.modalData.projectIdFlag&&!this.modalData.customerNoFlag){ |
|
|
|
|
|
// 料号、客户、项目都没选时选料号 |
|
|
|
|
|
this.modalData.customerNoFlag = true |
|
|
|
|
|
this.modalData.projectIdFlag = false |
|
|
|
|
|
} else if (!this.modalData.projectIdFlag&&this.modalData.customerNoFlag){ |
|
|
|
|
|
// 选了料号没选项目和客户时选料号 |
|
|
|
|
|
} else if (!this.modalData.projectIdFlag&&!this.modalData.customerNoFlag){ |
|
|
|
|
|
// 客户和项目都选了时选料号 |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.$message.warning(data.msg) |
|
|
this.$message.warning(data.msg) |
|
|
} |
|
|
} |
|
|
|