diff --git a/src/api/part/partInformation.js b/src/api/part/partInformation.js
index cab766c..dc3e26e 100644
--- a/src/api/part/partInformation.js
+++ b/src/api/part/partInformation.js
@@ -288,6 +288,6 @@ export const partInformationToOfficial = data => createAPI(`/plm/partInformation
*/
export const getNextPartNo = data => createAPI(`/plm/partInformation/getNextPartNo`,'post',data)
-
+export const queryPart = (data) => createAPI(`/plm/partInformation`,'post',data);
diff --git a/src/api/project/project.js b/src/api/project/project.js
index 9aa949b..0d5da24 100644
--- a/src/api/project/project.js
+++ b/src/api/project/project.js
@@ -45,3 +45,5 @@ export const deleteContact= data => createAPI(`/project/deleteContact`,'post',da
export const queryCustomerContact= data => createAPI(`/project/queryCustomerContact`,'post',data)
export const projectInfoPartSearch= data => createAPI(`/project/projectInfoPartSearch`,'post',data)
+
+export const queryProjectByCustomer = (data) => createAPI(`/project`,'post',data)
diff --git a/src/views/modules/proofing/requestForProofing.vue b/src/views/modules/proofing/requestForProofing.vue
index 5a0b248..aef2f15 100644
--- a/src/views/modules/proofing/requestForProofing.vue
+++ b/src/views/modules/proofing/requestForProofing.vue
@@ -222,7 +222,7 @@
项目编码
+ v-model="modalData.projectId" @blur="handleQueryProjectByCustomer">
@@ -1070,6 +1070,7 @@ import ProjectInfo from "../quotation/sellForQuotation/projectInfo.vue";
import profingFile from "./profingFile"
import proofingAttribute from "../demoComponents/orderProperties"
import {queryCustomer} from "../../../api/customer/customerInformation";
+import {queryProjectByCustomer} from "../../../api/project/project";
export default {
components: {
@@ -3608,6 +3609,26 @@ export default {
this.$message.error(error)
})
},
+ handleQueryProjectByCustomer(){
+ let params = {
+ site:this.$store.state.user.site,
+ customerId:this.modalData.customerNo,
+ projectId:this.modalData.projectId
+ }
+ queryProjectByCustomer(params).then(({data})=>{
+ if (data && data.code === 0 ){
+ if (data.rows && data.rows.length === 1){
+ this.modalData.projectName = data.rows[0].projectName
+ }else {
+ this.modalData.projectName = ''
+ }
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ }
}
}
diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue
index 940977a..7e7d822 100644
--- a/src/views/modules/quotation/requestForQuote.vue
+++ b/src/views/modules/quotation/requestForQuote.vue
@@ -218,7 +218,7 @@
+ v-model="modalData.projectId" @blur="handleQueryProjectByCustomer">
@@ -1038,6 +1038,7 @@ import PriceCheckDetail from "./sellForQuotation/priceCheckDetail/priceCheckDeta
import {getPriceCheckDetailList} from "../../../api/quotation/priceCheckDetail";
import InquiryQuoteDetail from "./inquiry/inquiryQuoteDetail.vue";
import {queryCustomer} from "../../../api/customer/customerInformation";
+import {queryProjectByCustomer} from "../../../api/project/project";
export default {
computed: {
@@ -3441,6 +3442,30 @@ export default {
this.$message.error(error)
})
},
+ handleQueryProjectByCustomer(){
+ let params = {
+ site:this.$store.state.user.site,
+ customerId:this.modalData.customerNo,
+ projectId:this.modalData.projectId
+ }
+ queryProjectByCustomer(params).then(({data})=>{
+ if (data && data.code === 0 ){
+ if (data.rows && data.rows.length === 1){
+ this.modalData.projectName = data.rows[0].projectName
+ this.modalData.finalCustomerId = data.rows[0].finalCustomerId
+ this.modalData.finalCustomerName = data.rows[0].finalCustomerName
+ }else {
+ this.modalData.projectName = ''
+ this.modalData.finalCustomerId = ''
+ this.modalData.finalCustomerName = ''
+ }
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ },
}
}
diff --git a/src/views/modules/quotation/sellForQuotation.vue b/src/views/modules/quotation/sellForQuotation.vue
index 67f387c..589fec5 100644
--- a/src/views/modules/quotation/sellForQuotation.vue
+++ b/src/views/modules/quotation/sellForQuotation.vue
@@ -208,7 +208,7 @@
@click="clickProject">项目编码
+ clearable @blur="handleQueryProjectByCustomer"/>
@@ -401,6 +401,7 @@ import {searchProjectInfoList} from "../../../api/quotation/quotationInformation
import {getQuotationHeaderByPagePost, updateQuoteStatus} from "../../../api/quotation/quotationHeader";
import {getQuotePage} from "../../../api/quotation/quote";
import {queryCustomer} from "../../../api/customer/customerInformation";
+import {queryProjectByCustomer} from "../../../api/project/project";
export default {
components: {
@@ -1314,6 +1315,30 @@ export default {
this.$message.error(error)
})
},
+ handleQueryProjectByCustomer(){
+ let params = {
+ site:this.$store.state.user.site,
+ customerId:this.insertData.customerNo,
+ projectId:this.insertData.projectId
+ }
+ queryProjectByCustomer(params).then(({data})=>{
+ if (data && data.code === 0 ){
+ if (data.rows && data.rows.length === 1){
+ this.insertData.projectName = data.rows[0].projectName
+ this.insertData.finalCustomerId = data.rows[0].finalCustomerId
+ this.insertData.finalCustomerName = data.rows[0].finalCustomerName
+ }else {
+ this.insertData.projectName = ''
+ this.insertData.finalCustomerId = ''
+ this.insertData.finalCustomerName = ''
+ }
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ },
},
computed: {},
watch: {
diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue
index f53a80f..0ef481f 100644
--- a/src/views/modules/test/requestForTest.vue
+++ b/src/views/modules/test/requestForTest.vue
@@ -214,7 +214,7 @@
项目编码
-
+
@@ -1168,6 +1168,7 @@
import {getTestPropertiesList,searchTestPropertiesItem} from "../../../api/test/testProperties";
import TestFile from "./file/testFile.vue";
import {queryCustomer} from "../../../api/customer/customerInformation";
+ import {queryProjectByCustomer} from "../../../api/project/project";
export default {
computed: {
testInformationFlag () {
@@ -3642,6 +3643,26 @@
this.$message.error(error)
})
},
+ handleQueryProjectByCustomer(){
+ let params = {
+ site:this.$store.state.user.site,
+ customerId:this.modalData.customerNo,
+ projectId:this.modalData.projectId
+ }
+ queryProjectByCustomer(params).then(({data})=>{
+ if (data && data.code === 0 ){
+ if (data.rows && data.rows.length === 1){
+ this.modalData.projectName = data.rows[0].projectName
+ }else {
+ this.modalData.projectName = ''
+ }
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ },
}
}
diff --git a/src/views/modules/test/testSoBom/testTable.vue b/src/views/modules/test/testSoBom/testTable.vue
index fbae5a1..8a37dd9 100644
--- a/src/views/modules/test/testSoBom/testTable.vue
+++ b/src/views/modules/test/testSoBom/testTable.vue
@@ -10,6 +10,7 @@ import {searchPart, searchPartList} from '@/api/part/partInformation.js';
import numberInput from "../../common/numberInput.vue";
import {searchAllUmInformationList} from "../../../../api/part/umInformation";
import {Decimal} from "decimal.js";
+import {queryPart} from "../../../../api/part/partInformation";
export default {
name: "testTable",
components:{
@@ -380,17 +381,10 @@ export default {
this.partData.partNo = this.testSoBom.componentPartNo
this.initPartList();
},
- initPartList(flag){
+ initPartList(){
searchPartList(this.partData).then(({data})=>{
if (data && data.code === 200) {
this.partList = data.data;
- if (flag === true){
- if (this.partList.length === 1 && this.partList[0].partNo === this.testSoBom.componentPartNo){
- this.dblClickPartTable(this.partList[0])
- }else {
- this.dblClickPartTable({partNo:this.testSoBom.componentPartNo,partDesc:'',umId:''})
- }
- }
}
})
},
@@ -575,9 +569,26 @@ export default {
this.testSoBom.assemblyQty = new Decimal(this.testSoBom.requiredQty).div(new Decimal(this.testNumber)).toNumber()
this.testSoBom.totalCost = new Decimal(this.testSoBom.requiredQty).mul(new Decimal(this.testSoBom.unitCost)).toNumber()
},
- changePartNo(val){
- this.partData.partNo = val
- this.initPartList(true);
+ handleQueryPart(){
+ let params = {
+ site:this.$store.state.user.site,
+ partNo:this.testSoBom.componentPartNo
+ }
+ queryPart(params).then(({data})=>{
+ if (data && data.code === 0){
+ if (data.data && data.data.length === 1){
+ this.dblClickPartTable(data.data[0])
+ }else {
+ this.dblClickPartTable({
+ partNo:this.testSoBom.componentPartNo,
+ })
+ }
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
}
},
@@ -632,7 +643,7 @@ export default {
物料编码
-
+