Browse Source

2025/7/10

master
Aoi_Tori 6 months ago
parent
commit
aec8343481
  1. 7
      src/views/modules/project/projectPart/projectPartQuote.vue
  2. 99
      src/views/modules/test/requestForTest.vue

7
src/views/modules/project/projectPart/projectPartQuote.vue

@ -384,6 +384,10 @@ export default {
createExportData() { createExportData() {
return this.dataList; return this.dataList;
}, },
formatDecimal(value) {
const num = parseFloat(value);
return !isNaN(num) ? num.toFixed(4) : value;
},
}, },
watch:{ watch:{
part(newVal,oldVal){ part(newVal,oldVal){
@ -427,6 +431,9 @@ export default {
<el-link v-if="!item.columnHidden" @click="handleClick(scope.row)"> {{ `${scope.row[item.columnProp]}` }}</el-link> <el-link v-if="!item.columnHidden" @click="handleClick(scope.row)"> {{ `${scope.row[item.columnProp]}` }}</el-link>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div> </div>
<template v-else-if="item.columnProp === 'unitPriceRate'">
{{ formatDecimal(scope.row.unitPriceRate) }}
</template>
<div v-else> <div v-else>
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp]}}</span> <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>

99
src/views/modules/test/requestForTest.vue

@ -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)
} }

Loading…
Cancel
Save