Browse Source

2024-09-13 单据项目查询

master
qiezi 1 year ago
parent
commit
66fb505126
  1. 2
      src/api/part/partInformation.js
  2. 2
      src/api/project/project.js
  3. 23
      src/views/modules/proofing/requestForProofing.vue
  4. 27
      src/views/modules/quotation/requestForQuote.vue
  5. 27
      src/views/modules/quotation/sellForQuotation.vue
  6. 23
      src/views/modules/test/requestForTest.vue
  7. 35
      src/views/modules/test/testSoBom/testTable.vue

2
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 getNextPartNo = data => createAPI(`/plm/partInformation/getNextPartNo`,'post',data)
export const queryPart = (data) => createAPI(`/plm/partInformation`,'post',data);

2
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 queryCustomerContact= data => createAPI(`/project/queryCustomerContact`,'post',data)
export const projectInfoPartSearch= data => createAPI(`/project/projectInfoPartSearch`,'post',data) export const projectInfoPartSearch= data => createAPI(`/project/projectInfoPartSearch`,'post',data)
export const queryProjectByCustomer = (data) => createAPI(`/project`,'post',data)

23
src/views/modules/proofing/requestForProofing.vue

@ -222,7 +222,7 @@
<span slot="label" v-if="modalData.customerNo && modalData.flag === '1'" <span slot="label" v-if="modalData.customerNo && modalData.flag === '1'"
@click="chooseProjectListFlag = true"><a herf="#">项目编码</a></span> @click="chooseProjectListFlag = true"><a herf="#">项目编码</a></span>
<el-input :disabled="(!modalData.customerNo || modalData.flag !== '1')" <el-input :disabled="(!modalData.customerNo || modalData.flag !== '1')"
v-model="modalData.projectId"></el-input>
v-model="modalData.projectId" @blur="handleQueryProjectByCustomer"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
@ -1070,6 +1070,7 @@ import ProjectInfo from "../quotation/sellForQuotation/projectInfo.vue";
import profingFile from "./profingFile" import profingFile from "./profingFile"
import proofingAttribute from "../demoComponents/orderProperties" import proofingAttribute from "../demoComponents/orderProperties"
import {queryCustomer} from "../../../api/customer/customerInformation"; import {queryCustomer} from "../../../api/customer/customerInformation";
import {queryProjectByCustomer} from "../../../api/project/project";
export default { export default {
components: { components: {
@ -3608,6 +3609,26 @@ export default {
this.$message.error(error) 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)
})
}
} }
} }
</script> </script>

27
src/views/modules/quotation/requestForQuote.vue

@ -218,7 +218,7 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<el-input :disabled="!modalData.customerNo || modalData.flag !== '1'" <el-input :disabled="!modalData.customerNo || modalData.flag !== '1'"
v-model="modalData.projectId"></el-input>
v-model="modalData.projectId" @blur="handleQueryProjectByCustomer"></el-input>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-input disabled v-model="modalData.projectName"></el-input> <el-input disabled v-model="modalData.projectName"></el-input>
@ -1038,6 +1038,7 @@ import PriceCheckDetail from "./sellForQuotation/priceCheckDetail/priceCheckDeta
import {getPriceCheckDetailList} from "../../../api/quotation/priceCheckDetail"; import {getPriceCheckDetailList} from "../../../api/quotation/priceCheckDetail";
import InquiryQuoteDetail from "./inquiry/inquiryQuoteDetail.vue"; import InquiryQuoteDetail from "./inquiry/inquiryQuoteDetail.vue";
import {queryCustomer} from "../../../api/customer/customerInformation"; import {queryCustomer} from "../../../api/customer/customerInformation";
import {queryProjectByCustomer} from "../../../api/project/project";
export default { export default {
computed: { computed: {
@ -3441,6 +3442,30 @@ export default {
this.$message.error(error) 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)
})
},
} }
} }
</script> </script>

27
src/views/modules/quotation/sellForQuotation.vue

@ -208,7 +208,7 @@
@click="clickProject"><a herf="#">项目编码</a></span> @click="clickProject"><a herf="#">项目编码</a></span>
<el-input v-model="insertData.projectId" <el-input v-model="insertData.projectId"
:disabled="insertData.customerNo ==='' || insertData.internalInquiryNo !==''" :disabled="insertData.customerNo ==='' || insertData.internalInquiryNo !==''"
clearable/>
clearable @blur="handleQueryProjectByCustomer"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
@ -401,6 +401,7 @@ import {searchProjectInfoList} from "../../../api/quotation/quotationInformation
import {getQuotationHeaderByPagePost, updateQuoteStatus} from "../../../api/quotation/quotationHeader"; import {getQuotationHeaderByPagePost, updateQuoteStatus} from "../../../api/quotation/quotationHeader";
import {getQuotePage} from "../../../api/quotation/quote"; import {getQuotePage} from "../../../api/quotation/quote";
import {queryCustomer} from "../../../api/customer/customerInformation"; import {queryCustomer} from "../../../api/customer/customerInformation";
import {queryProjectByCustomer} from "../../../api/project/project";
export default { export default {
components: { components: {
@ -1314,6 +1315,30 @@ export default {
this.$message.error(error) 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: {}, computed: {},
watch: { watch: {

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

@ -214,7 +214,7 @@
<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'" @click="chooseProjectListFlag = true"><a herf="#">项目编码</a></span> <span slot="label" v-if="modalData.customerNo && modalData.flag === '1'" @click="chooseProjectListFlag = true"><a herf="#">项目编码</a></span>
<el-input :disabled="!modalData.customerNo || modalData.flag !== '1'" v-model="modalData.projectId"></el-input>
<el-input :disabled="!modalData.customerNo || modalData.flag !== '1'" v-model="modalData.projectId" @blur="handleQueryProjectByCustomer"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
@ -1168,6 +1168,7 @@
import {getTestPropertiesList,searchTestPropertiesItem} from "../../../api/test/testProperties"; import {getTestPropertiesList,searchTestPropertiesItem} from "../../../api/test/testProperties";
import TestFile from "./file/testFile.vue"; import TestFile from "./file/testFile.vue";
import {queryCustomer} from "../../../api/customer/customerInformation"; import {queryCustomer} from "../../../api/customer/customerInformation";
import {queryProjectByCustomer} from "../../../api/project/project";
export default { export default {
computed: { computed: {
testInformationFlag () { testInformationFlag () {
@ -3642,6 +3643,26 @@
this.$message.error(error) 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)
})
},
} }
} }
</script> </script>

35
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 numberInput from "../../common/numberInput.vue";
import {searchAllUmInformationList} from "../../../../api/part/umInformation"; import {searchAllUmInformationList} from "../../../../api/part/umInformation";
import {Decimal} from "decimal.js"; import {Decimal} from "decimal.js";
import {queryPart} from "../../../../api/part/partInformation";
export default { export default {
name: "testTable", name: "testTable",
components:{ components:{
@ -380,17 +381,10 @@ export default {
this.partData.partNo = this.testSoBom.componentPartNo this.partData.partNo = this.testSoBom.componentPartNo
this.initPartList(); this.initPartList();
}, },
initPartList(flag){
initPartList(){
searchPartList(this.partData).then(({data})=>{ searchPartList(this.partData).then(({data})=>{
if (data && data.code === 200) { if (data && data.code === 200) {
this.partList = data.data; 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.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() 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 {
<el-col :span="8"> <el-col :span="8">
<el-form-item label="物料编码" prop="componentPartNo"> <el-form-item label="物料编码" prop="componentPartNo">
<span slot="label" @click="partDialogFlag = true"><a>物料编码</a></span> <span slot="label" @click="partDialogFlag = true"><a>物料编码</a></span>
<el-input @change="changePartNo" v-model="testSoBom.componentPartNo"></el-input>
<el-input @blur="handleQueryPart" v-model="testSoBom.componentPartNo"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">

Loading…
Cancel
Save