Browse Source

2023-11-24 plm报价

master
zelian_wu 2 years ago
parent
commit
e15dc18a0e
  1. 8
      src/api/quotation/quotationHeader.js
  2. 311
      src/components/quotation/sellForQuotation/quotationCustomerContact.vue
  3. 217
      src/components/quotation/sellForQuotation/quotationCustomerInformation.vue
  4. 299
      src/components/quotation/sellForQuotation/quotationDetail.vue
  5. 6
      src/components/quotation/sellForQuotation/quotationExamineAndApprove.vue
  6. 171
      src/components/quotation/sellForQuotation/quotationProjectInformation.vue
  7. 2
      src/views/modules/quotation/requestForQuote.vue
  8. 72
      src/views/modules/quotation/sellForQuotation.vue

8
src/api/quotation/quotationHeader.js

@ -61,6 +61,13 @@ export const searchQuotationDetail = (data) => createAPI('/plm/quotationDetail/l
* @returns {*}
*/
export const insertQuotationDetail = (data) => createAPI('/plm/quotationDetail/insertQuotationDetail','post',data);
/**
* 导入历史报价明细
* @param data
* @returns {*}
*/
export const batchInsertQuotationDetail = (data) => createAPI('/plm/quotationDetail/batchInsertQuotationDetail','post',data);
/**
* 修改 QuotationDetail
* @param data
@ -68,6 +75,7 @@ export const insertQuotationDetail = (data) => createAPI('/plm/quotationDetail/i
*/
export const updateQuotationDetail = (data) => createAPI('/plm/quotationDetail/updateQuotationDetail','post',data);
export const deleteQuotationDetail = (data) => createAPI('/plm/quotationDetail/deleteQuotationDetail','post',data);
// ==========================工艺===========================================
/**

311
src/components/quotation/sellForQuotation/quotationCustomerContact.vue

@ -1,11 +1,318 @@
<template>
<div class="mode-config">
<h2>客户联系人</h2>
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
<el-form :inline="true" label-position="top" style="margin-top: 0px">
<download-excel
:fields="fields2()"
:data="exportData2"
type="xls"
:name="exportName2"
:header="exportHeader2"
:footer="exportFooter2"
:fetch="createExportData2"
:before-generate="startDownload2"
:before-finish="finishDownload2"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ '导出' }}
</download-excel>
</el-form>
</el-form>
<el-table
:data="contactList"
height="370"
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columnList2" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<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>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {
getCustomerContactData,
} from "@/api/project/project.js"
export default {
name: "quotationCustomerContact"
name: "quotationCustomerContact",
props: ['quotationHeader'],
data(){
return{
quotationData: {},
contactList: [],
exportData2: [],
exportName2: "项目客户联系人" + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader2: ["项目客户联系人"],
exportFooter2: [],
exportList2:[],
dataListLoading: false,
columnList2: [
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table2ContactName',
tableId: '101002001Table2',
tableName: '项目联系人表',
columnProp: 'contactName',
headerAlign: 'center',
align: 'center',
columnLabel: '联系人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table2ContactPhoneNumber1',
tableId: '101002001Table2',
tableName: '项目联系人表',
columnProp: 'contactPhoneNumber1',
headerAlign: 'center',
align: 'center',
columnLabel: '联系电话',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table2ContactLandlineNumber',
tableId: '101002001Table2',
tableName: '项目联系人表',
columnProp: 'contactLandlineNumber',
headerAlign: 'center',
align: 'center',
columnLabel: '座机',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table2Position',
tableId: '101002001Table2',
tableName: '项目联系人表',
columnProp: 'position',
headerAlign: 'center',
align: 'center',
columnLabel: '公司职务',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table2Mailbox',
tableId: '101002001Table2',
tableName: '项目联系人表',
columnProp: 'mailbox',
headerAlign: 'center',
align: 'center',
columnLabel: '邮箱',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table2PrimaryContact',
tableId: '101002001Table2',
tableName: '项目联系人表',
columnProp: 'primaryContact',
headerAlign: 'center',
align: 'center',
columnLabel: '主联系人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table2ContactStatus',
tableId: '101002001Table2',
tableName: '项目联系人表',
columnProp: 'contactStatus',
headerAlign: 'center',
align: 'center',
columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table2CreateDate',
tableId: '101002001Table2',
tableName: '项目联系人表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '创建时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table2CreateBy',
tableId: '101002001Table2',
tableName: '项目联系人表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
columnLabel: '创建人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table2UpdateDate',
tableId: '101002001Table2',
tableName: '项目联系人表',
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
columnLabel: '更新时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table2UpdateBy',
tableId: '101002001Table2',
tableName: '项目联系人表',
columnProp: 'updateBy',
headerAlign: 'center',
align: 'center',
columnLabel: '更新人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
}
],
}
},
methods:{
initData(){
let inData={
site:this.quotationData.site,
customerId:this.quotationData.customerNo,
projectId:this.quotationData.projectId,
}
getCustomerContactData(inData).then(({data}) => {
//
if (data && data.code == 0) {
this.contactList = data.rows;
} else {
this.contactList = [];
}
});
},
//excel
async createExportData2() {
return this.contactList;
},
startDownload2() {
// this.exportData = this.dataList
},
finishDownload2() {
},
fields2() {
let json = "{"
this.columnList2.forEach((item, index) => {
if (index == this.columnList2.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
},
watch:{
//
quotationHeader: function (val) {
this.quotationData = val;
this.initData();
}
},
created() {
},
mounted() {
}
}
</script>
<style scoped>

217
src/components/quotation/sellForQuotation/quotationCustomerInformation.vue

@ -1,11 +1,224 @@
<template>
<div class="mode-config">
<h2>客户信息</h2>
<el-form label-position="top" :model="customerInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px;width: 60%">
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="客户代码">
<el-input v-model="customerInformationData.customerNo" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="客户名称">
<el-input v-model="customerInformationData.customerDesc" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="关键客户">
<el-input v-model="customerInformationData.importantCustomer" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="客户币种">
<el-input v-model="customerInformationData.customerCurrency" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="年营业额">
<el-input v-model="customerInformationData.turnoverOfYear" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="年潜在收入">
<el-input v-model="customerInformationData.potentialRevenueOfYear" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="客户状态">
<el-input v-model="customerInformationData.customerStatus" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="行业">
<el-input v-model="customerInformationData.customerIndustry" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="公司名称">
<el-input v-model="customerInformationData.companyName" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="客户联系人">
<el-input v-model="customerInformationData.contactName" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="联系人电话">
<el-input v-model="customerInformationData.contactPhoneNumber1" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="联系人职务">
<el-input v-model="customerInformationData.position" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<div class="grid-content bg-purple">
<el-form-item label="岗位描述">
<el-input v-model="customerInformationData.jobDescription" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<div class="grid-content bg-purple">
<el-form-item label="备注信息">
<el-input v-model="customerInformationData.remark" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<div class="grid-content bg-purple">
<el-form-item label="客户联系地址">
<el-input v-model="customerInformationData.addressName" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<div class="grid-content bg-purple">
<el-form-item label="地址类型">
<el-input v-model="customerInformationData.addressType" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="创建时间">
<el-input v-model="customerInformationData.createDate" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="创建人">
<el-input v-model="customerInformationData.createBy" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="更新时间">
<el-input v-model="customerInformationData.updateDate" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="更新人">
<el-input v-model="customerInformationData.updateBy" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import {
getCustomerInformation, //
} from '@/api/quotation/quotationInformation.js'
export default {
name: "quotationCustomerInformation"
name: "quotationCustomerInformation",
props: ['quotationHeader'],
data(){
return{
quotationData: {},
customerInformationData:{
customerNo: '',
customerDesc: '',
importantCustomer: '',
customerCurrency: '',
turnoverOfYear: '',
potentialRevenueOfYear: '',
customerStatus: '',
customerIndustry: '',
companyName: '',
jobDescription: '',
remark: '',
contactName: '',
contactPhoneNumber1: '',
position: '',
addressName: '',
addressType: '',
createDate: '',
createBy: '',
updateDate: '',
updateBy: ''
},
}
},
watch:{
//
quotationHeader: function (val) {
this.quotationData = val;
this.initData();
}
},
methods:{
initData(){
let tempData = {
site: this.$store.state.user.site,
customerNo: this.quotationData.customerNo
}
//
getCustomerInformation(tempData).then(({data}) => {
if (data && data.code === 0) {
this.customerInformationData = data.rows[0]
} else {
this.customerInformationData = {}
}
})
},
},
created() {
},
mounted() {
},
}
</script>

299
src/components/quotation/sellForQuotation/quotationDetail.vue

@ -2,11 +2,12 @@
<div class="mode-config">
<el-row>
<el-col :span="24">
<el-button type="primary" :loading="quotation.quotationHeaderId === undefined">从询价单导入明细</el-button>
<el-button type="primary" :loading="quotation.quotationHeaderId === undefined"
@click="quotationLeadIntoDetailFlag = true">新增报价明细
@click="quotationLeadIntoDetailFlag = true">新增
</el-button>
<el-button type="primary" :loading="quotation.quotationHeaderId === undefined">从历史报价明细导入</el-button>
<el-button type="primary" :loading="quotation.quotationHeaderId === undefined">从历史询价导入</el-button>
<el-button type="primary" :loading="quotation.quotationHeaderId === undefined" @click="clickHistoryQuotationDetailBtn">从历史报价导入</el-button>
</el-col>
<el-col :span="24" style="margin-top: 10px">
<el-table :data="tableData" height="320px" stripe border
@ -14,10 +15,11 @@
<el-table-column
label="操作"
fixed
width="90" align="center">
<template slot-scope="scope">
<el-link>下达</el-link>
<el-link @click="editQuotationDetail(scope.row)">编辑</el-link>
width="120" align="center">
<template slot-scope="{row,$index}">
<el-link style="cursor: pointer">下达</el-link>
<el-link style="cursor: pointer" @click="editQuotationDetail(row)">编辑</el-link>
<el-link style="cursor: pointer" @click="deleteQuotationDetailData(row)">删除</el-link>
</template>
</el-table-column>
<el-table-column
@ -155,7 +157,7 @@
<!--新增报价明细-->
<el-dialog @open="openInsertQuotationDetail" @close="closeInsertQuotationDetail"
:visible.sync="quotationLeadIntoDetailFlag" title="新增报价明细" width="30%">
:visible.sync="quotationLeadIntoDetailFlag" title="新增报价明细" width="30%" :close-on-click-modal="false">
<el-form :model="insertQuotationDetail" ref="insertQuotationDetailForm" :rules="quotationDetailRules"
label-width="80px" label-position="top" :inline="true">
<el-row>
@ -198,13 +200,13 @@
</el-form>
<div slot="footer" class="dialog-footer" style="margin-top: 20px">
<el-button @click="quotationLeadIntoDetailFlag = false"> </el-button>
<el-button type="primary" @click="insertQuotationDetailBtn"> </el-button>
<el-button type="primary" :loading="quotationLeadIntoDetailBtn" @click="insertQuotationDetailBtn"> </el-button>
</div>
</el-dialog>
<!--新增-->
<el-dialog @open="openQuotationDetailData" @close="closeInsertDialog" :visible.sync="quotationDetailFlag"
width="60%" top="10vh">
width="60%" top="10vh" :close-on-click-modal="false">
<el-form :rules="quotationDetailRules" style="margin-top: 5px" ref="quotationDetailForm"
:model="quotationDetailData" label-width="80px" label-position="top" :inline="true">
<el-row>
@ -265,14 +267,14 @@
<el-table-column label="材料名称" align="center" show-overflow-tooltip prop="quotationPartDesc">
<template slot-scope="{row,$index}">
<el-form-item :prop="'quotationPartList.'+$index+'.quotationPartDesc'" :rules="quotationPartRules.quotationPartDesc">
<el-input :ref="'quotationPartDesc_'+$index" @keyup.native.enter="enterKeyUpFun('quotationPartDesc_'+($index+1))" v-model="row.quotationPartDesc" clearable/>
<el-input :disabled="row.quotationPartNo.trim() !='*'" :ref="'quotationPartDesc_'+$index" @keyup.native.enter="enterKeyUpFun('quotationPartDesc_'+($index+1))" v-model="row.quotationPartDesc" clearable/>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="计量单位" align="center" show-overflow-tooltip prop="umId">
<template slot-scope="{row,$index}">
<el-form-item :prop="'quotationPartList.'+$index+'.umId'" :rules="quotationPartRules.umId">
<el-select v-model="row.umId" :disabled="quotationPart.quotationPartNo === '*'" style="width: 100%" placeholder="请选择">
<el-select v-model="row.umId" :disabled="row.quotationPartNo != '*'" style="width: 100%" placeholder="请选择">
<el-option
v-for="item in umInformationList"
:key="item.umId"
@ -346,7 +348,7 @@
<el-table-column align="center" width="120" label="工序名称" prop="quotationRoutingDesc" show-overflow-tooltip>
<template slot-scope="{row,$index}">
<el-form-item :prop="'quotationRoutingList.'+$index+'.quotationRoutingDesc'" :rules="quotationRoutingRules.quotationRoutingDesc">
<el-input :disabled="row.quotationRoutingNo.trim() !=='*'" :ref="'quotationRoutingDesc_'+$index" @keyup.native.enter="enterKeyUpFun('quotationRoutingDesc_'+($index+1))" v-model="row.quotationRoutingDesc" clearable/>
<el-input :disabled="row.quotationRoutingNo.trim() !='*'" :ref="'quotationRoutingDesc_'+$index" @keyup.native.enter="enterKeyUpFun('quotationRoutingDesc_'+($index+1))" v-model="row.quotationRoutingDesc" clearable/>
</el-form-item>
</template>
</el-table-column>
@ -403,7 +405,7 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column label="效率" align="center" width="120" prop="routingEfficiency" show-overflow-tooltip>
<el-table-column label="效率%" align="center" width="120" prop="routingEfficiency" show-overflow-tooltip>
<template slot-scope="{row,$index}">
<el-form-item :prop="'quotationRoutingList.'+$index+'.routingEfficiency'" :rules="quotationRoutingRules.routingEfficiency">
<el-input :ref="'routingEfficiency_'+$index" @keyup.native.enter="enterKeyUpFun('routingEfficiency_'+($index+1))" v-model="row.routingEfficiency" clearable/>
@ -668,13 +670,13 @@
</el-tabs>
<span slot="footer" class="dialog-footer" style="margin-top: 0px">
<el-button @click=" quotationDetailFlag= false"> </el-button>
<el-button type="primary" @click="saveQuotationDetail"> </el-button>
<el-button type="primary" :loading="updateQuotationDetailBtnFlag" @click="saveQuotationDetail"> </el-button>
</span>
</el-dialog>
<!--quotationTool新增-->
<el-dialog @close="closeQuotationToolDialog" title="报价工具" :visible.sync="saveQuotationToolFlag" width="40%"
top="10vh">
top="10vh" :close-on-click-modal="false">
<el-form :rules="quotationToolRules" ref="quotationToolForm" :model="quotationTool" label-position="top"
style="height: 260px">
<el-row>
@ -699,13 +701,14 @@
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: 5px">
<el-button @click=" saveQuotationToolFlag= false"> </el-button>
<el-button type="primary" @click="saveQuotationTool"> </el-button>
<el-button type="primary" :loading="saveQuotationToolBtn" @click="saveQuotationTool"> </el-button>
</span>
</el-dialog>
<!--tool列表-->
<el-dialog @open="openToolHeaderDialog"
@close="closeToolHeaderDialog"
:close-on-click-modal="false"
title="工具信息" width="40%" top="15vh"
:visible.sync="toolHeaderDialogFlag">
<!--搜索条件-->
@ -746,7 +749,7 @@
</el-dialog>
<!--quotationRouting新增-->
<el-dialog @close="closeQuotationRoutingDialog" title="报价工艺" :visible.sync="quotationRoutingDialogFlag" width="40%" top="15vh">
<el-dialog @close="closeQuotationRoutingDialog" title="报价工艺" :visible.sync="quotationRoutingDialogFlag" width="40%" top="15vh" :close-on-click-modal="false">
<el-form :rules="quotationRoutingRules" ref="quotationRoutingForm" :model="quotationRouting" label-position="top">
<el-row>
<el-col :span="6">
@ -813,7 +816,9 @@
</el-col>
<el-col :span="6" >
<el-form-item label="效率" prop="routingEfficiency">
<el-input v-model="quotationRouting.routingEfficiency"></el-input>
<el-input v-model="quotationRouting.routingEfficiency">
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6" :offset="2">
@ -848,7 +853,7 @@
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: 5px">
<el-button @click="quotationRoutingDialogFlag= false"> </el-button>
<el-button type="primary" @click="saveQuotationRoutingBtn"> </el-button>
<el-button type="primary" :loading="quotationRoutingDialogBtn" @click="saveQuotationRoutingBtn"> </el-button>
</span>
</el-dialog>
@ -857,12 +862,13 @@
title="报价材料"
:visible.sync="quotationPartDialogFlag"
@close="closeQuotationPartDialog"
:close-on-click-modal="false"
width="30%">
<el-form :model="quotationPart" :rules="quotationPartRules" ref="quotationPartForm" label-position="top">
<el-row>
<el-col :span="10">
<el-form-item label="材料编号" prop="quotationPartNo">
<span slot="label" @click="partDialogFlag = true" style="cursor: pointer"><a>工具编码</a></span>
<span slot="label" @click="partDialogFlag = true" style="cursor: pointer"><a>材料编码</a></span>
<el-input v-model="quotationPart.quotationPartNo" :disabled="quotationPart.quotationPartDesc" clearable/>
</el-form-item>
</el-col>
@ -918,23 +924,23 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="quotationPartDialogFlag = false"> </el-button>
<el-button type="primary" @click="saveQuotationPartBtn"> </el-button>
<el-button type="primary" :loading="quotationPartDialogBtn" @click="saveQuotationPartBtn"> </el-button>
</span>
</el-dialog>
<!--材料弹框-->
<el-dialog title="材料列表" @open="openPartDialog"
<el-dialog title="材料列表" @open="openPartDialog" :close-on-click-modal="false"
:visible.sync="partDialogFlag">
<!--搜索条件-->
<el-form :model="partData" ref="partDataForm" label-position="top">
<el-row>
<el-col :span="4">
<el-form-item label="工具编号" prop="toolNo">
<el-form-item label="材料编号" prop="toolNo">
<el-input v-model="partData.partNo" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="工具描述" prop="toolDescription">
<el-form-item label="材料描述" prop="toolDescription">
<el-input v-model="partData.partDesc" clearable/>
</el-form-item>
</el-col>
@ -981,7 +987,8 @@
<!-- 其他报价单弹框 -->
<el-dialog title="报价明细列表"
@close="closeOtherQuotationDetail"
:visible.sync="otherQuotationDetailDialogFlag">
:close-on-click-modal="false"
:visible.sync="otherQuotationDetailDialogFlag">
<!--搜索条件-->
<el-form :model="otherDetail" ref="otherDetailForm" label-position="top">
<el-row>
@ -1016,7 +1023,7 @@
</el-table>
<span slot="footer" class="dialog-footer" style="margin-top: 5px">
<el-button @click="otherQuotationDetailDialogFlag= false"> </el-button>
<el-button type="primary" @click="saveOtherQuotationDetailBtn"> </el-button>
<el-button type="primary" :loading="otherQuotationDetailBtn" @click="saveOtherQuotationDetailBtn"> </el-button>
</span>
</el-dialog>
</div>
@ -1030,11 +1037,12 @@ import {
batchDeleteQuotationTool,
searchQuotationDetailPageByHeaderId,
insertQuotationDetail,
batchInsertQuotationDetail,
updateQuotationDetail,
deleteQuotationDetail,
searchQuotationRoutingByDetailId,
insertQuotationRouting,
batchInsertQuotationRouting,
updateQuotationRouting,
deleteQuotationRouting,
batchDeleteQuotationRouting,
searchQuotationPart,
@ -1098,6 +1106,14 @@ export default {
partDialogFlag:false,//
otherQuotationDetailDialogFlag:false,//
options:0,//
// =========================================================================================
updateQuotationDetailBtnFlag:false,
otherQuotationDetailBtn:false,
quotationLeadIntoDetailBtn:false,
saveQuotationToolBtn:false,
quotationRoutingDialogBtn:false,
quotationPartDialogBtn:true,
// =======================================================================================
//
insertQuotationDetailData: {
@ -1335,24 +1351,24 @@ export default {
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'},
],
operatorsNumber: [
{required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'change'},
{required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'blur'},
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'},
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'},
],
unitMachineryCost: [
{required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'change'},
{required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'blur'},
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'},
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'},
],
unitLaborCost: [
{required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'change'},
{required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'blur'},
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'},
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'},
],
unitManufacturingCost: [
{required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'change'},
{required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'blur'},
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'},
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'},
],
unitQuotedCost: [
{required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'change'},
{required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'blur'},
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'},
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'},
],
},
//
@ -1502,12 +1518,14 @@ export default {
insertQuotationDetailBtn() {
this.$refs['insertQuotationDetailForm'].validate((validate, objects) => {
if (validate) {
this.quotationLeadIntoDetailBtn = true;
insertQuotationDetail(this.insertQuotationDetail).then(({data}) => {
if (data.code == 200) {
this.quotationLeadIntoDetailFlag = false;
//
if (this.insertQuotationDetailData.flag) {
this.quotationDetailData = data.data;
this.quotationLeadIntoDetailBtn = false;
this.quotationDetailFlag = true;
}
this.initData();
@ -1525,6 +1543,7 @@ export default {
saveQuotationTool() {
this.$refs['quotationToolForm'].validate((validate, object) => {
if (validate) {
this.saveQuotationToolBtn= true;
if (this.selectionToolHeaderList.length > 0){
//
let batchUpdateList = this.quotationToolFormTable.quotationToolList.filter((v) => this.selectionToolHeaderList.some((val) => val.toolNo == v.toolNo));
@ -1557,6 +1576,7 @@ export default {
if (data.code == 200) {
this.initQuotationToolData();
this.$message.success(data.msg);
this.saveQuotationToolBtn = false;
this.saveQuotationToolFlag = false;//
} else {
this.$message.error(data.msg);
@ -1568,6 +1588,9 @@ export default {
batchInsertQuotationTool(batchInsertQuotationToolList).then(({data})=>{
if (data.code == 200){
this.initQuotationToolData();
this.otherQuotationDetailBtn = false;
this.saveQuotationToolBtn = false;
this.otherQuotationDetailDialogFlag = false;
this.saveQuotationToolFlag = false;
}
this.$message.success(data.msg);
@ -1576,73 +1599,127 @@ export default {
// ==================================================================================================
//
clickDeleteToolTableBtn(row,i) {
deleteQuotationTool(row).then(({data})=>{
if (data.code == 200){
this.initQuotationToolData();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteQuotationTool(row).then(({data})=>{
if (data.code == 200){
this.initQuotationToolData();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
})
})
},
//
deleteSelectionQuotationTool(){
batchDeleteQuotationTool(this.selectionQuotationToolList).then(({data})=>{
if (data.code == 200){
this.initQuotationToolData();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
batchDeleteQuotationTool(this.selectionQuotationToolList).then(({data})=>{
if (data.code == 200){
this.initQuotationToolData();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
})
})
},
//
deleteQuotationRoutingBtn(row,index){
deleteQuotationRouting(row).then(({data})=>{
if (data.code == 200){
this.initQuotationRoutingData();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteQuotationRouting(row).then(({data})=>{
if (data.code == 200){
this.initQuotationRoutingData();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
})
})
},
//
deleteSelectionQuotationRoutingBtn(){
batchDeleteQuotationRouting(this.selectionQuotationRoutingList).then(({data})=>{
if (data.code == 200){
this.initQuotationRoutingData();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
batchDeleteQuotationRouting(this.selectionQuotationRoutingList).then(({data})=>{
if (data.code == 200){
this.initQuotationRoutingData();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
})
})
},
//
deleteQuotationPart(row,index){
deleteQuotationPart(row).then(({data})=>{
if (data.code == 200){
this.initQuotationPart();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteQuotationPart(row).then(({data})=>{
if (data.code == 200){
this.initQuotationPart();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
})
})
},
//
deleteSelectionQuotationPart(){
batchDeleteQuotationPart(this.selectionQuotationPartList).then(({data})=>{
if (data.code == 200){
this.initQuotationPart();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
batchDeleteQuotationPart(this.selectionQuotationPartList).then(({data})=>{
if (data.code == 200){
this.initQuotationPart();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
})
})
},
//
deleteQuotationDetailData(row){
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteQuotationDetail(row).then(({data})=>{
if (data.code == 200){
this.initData();
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
})
})
},
// ====================================================================================================
//
saveQuotationDetail() {
this.updateQuotationDetailBtnFlag=true;
//
let flag = true;
//
@ -1694,9 +1771,11 @@ export default {
params.quotationToolList = this.quotationToolFormTable.quotationToolList;
params.quotationPartList = this.quotationPartFormTable.quotationPartList;
params.quotationRoutingList = this.quotationRoutingFormTable.quotationRoutingList;
updateQuotationDetail(this.quotationDetailData).then(({data}) => {
if (data.code == 200) {
this.quotationDetailFlag = false;
this.updateQuotationDetailBtnFlag = false;
this.initData();
this.$message.success(data.msg);
} else {
@ -1760,10 +1839,12 @@ export default {
},
//
insertQuotationRoutingData(){
this.quotationRoutingDialogBtn = true;
insertQuotationRouting(this.quotationRouting).then(({data})=>{
if (data.code == 200){
this.initQuotationRoutingData();
this.$message.success(data.msg);
this.quotationRoutingDialogBtn = false;
this.quotationRoutingDialogFlag = false;
}else {
this.$message.error(data.msg);
@ -1776,6 +1857,8 @@ export default {
if (data.code == 200){
this.initQuotationRoutingData();
this.$message.success(data.msg);
this.otherQuotationDetailBtn = false;
this.otherQuotationDetailDialogFlag = false;
this.quotationRoutingDialogFlag = false;
}else {
this.$message.error(data.msg);
@ -1789,6 +1872,7 @@ export default {
this.rulesValidateLabel(objects,this.quotationPartColumns);
}else {
//
this.quotationPartDialogBtn = true;
if (this.selectionPartList.length > 0){
let quotationPartList = this.selectionPartList.map(item=>{
let data = this.quotationPartFormTable.quotationPartList.find(val => val.partNo == item.partNo);
@ -1817,6 +1901,9 @@ export default {
if (data.code == 200){
this.initQuotationPart();
this.$message.success(data.msg);
this.otherQuotationDetailBtn = false;
this.quotationPartDialogBtn = false;
this.otherQuotationDetailDialogFlag = false;
this.quotationPartDialogFlag = false;
}else {
this.$message.error(data.msg);
@ -1829,6 +1916,7 @@ export default {
if (data.code == 200){
this.initQuotationPart();
this.$message.success(data.msg);
this.quotationPartDialogBtn = false;
this.quotationPartDialogFlag = false;
}else {
this.$message.error(data.msg);
@ -1840,6 +1928,7 @@ export default {
let otherSelectionPart = [];//
let otherSelectionRouting = [];//
let otherSelectionTool = [];//
this.otherQuotationDetailBtn = true;
//
for (let i = 0; i < this.selectionOtherDetailList.length; i++) {
if (this.selectionOtherDetailList[i].quotationPartList){
@ -1853,6 +1942,16 @@ export default {
}
}
switch (this.options){
case 0:
this.selectionOtherDetailList = this.selectionOtherDetailList.map(value => {
value.quotationHeaderId = this.quotation.quotationHeaderId;
value.quotationDetailId = undefined;
value.internalInquiryNo = this.quotation.internalInquiryNo;
value.quotationRoutingList = [];
return value;
})
this.batchInsertQuotationDetailData(this.selectionOtherDetailList);
break;
case 1:
otherSelectionPart = otherSelectionPart.map(item=>{
item.quotationDetailId = this.quotationDetailData.quotationDetailId;
@ -1878,7 +1977,20 @@ export default {
this.batchInsertQuotationToolData(otherSelectionTool);
break;
}
this.otherQuotationDetailDialogFlag = false;
},
//
batchInsertQuotationDetailData(quotationDetailList){
batchInsertQuotationDetail(quotationDetailList).then(({data})=>{
if (data.code == 200){
this.initData();
this.otherQuotationDetailBtn= false;
this.otherQuotationDetailDialogFlag = false;
this.$message.success(data.msg);
}else {
this.$message.error(data.msg);
}
})
},
// =================================================================================================
//
@ -2026,6 +2138,7 @@ export default {
quotationNo:this.otherDetail.quotationNo,
productNo:this.otherDetail.productNo,
productDesc:this.otherDetail.productDesc,
quotationHeaderId:this.quotation.quotationHeaderId,
};
searchQuotationDetail(params).then(({data})=>{
if (data.code == 200){
@ -2099,6 +2212,11 @@ export default {
this.otherQuotationDetailDialogFlag = true;
this.options = i;
},
//
clickHistoryQuotationDetailBtn(){
this.initOtherQuotationDetail();
this.otherQuotationDetailDialogFlag = true;
},
// =======================================================dialog=============================================
//
closeInsertDialog() {
@ -2155,7 +2273,12 @@ export default {
//
closeOtherQuotationDetail(){
this.options = 0;
this.$refs.otherDetailForm.resetFields();
this.otherDetail = {
quotationNo:undefined,//
productNo:undefined,//
productDesc:undefined,//
};
this.$refs['otherDetailForm'].resetFields();
this.$refs.otherQuotationDetailTable.clearSelection();
},
// ===============================================================================================
@ -2189,7 +2312,7 @@ export default {
this.$refs[refName].toggleRowSelection(row);
},
// ====================================================================================================
//
//
inputProfitRate() {
this.quotationDetailData.detailProfitAmount = 0;
if (this.quotationDetailData.detailProfitRate) {
@ -2221,9 +2344,10 @@ export default {
num = num.toFixed(4);
this.quotationDetailData.finalTaxedPrice = num;
},
//
//
inputOuterCost() {
this.quotationDetailData.detailTotalCost = 0;
//
if (this.quotationDetailData.adjustPartCost) {
this.quotationDetailData.detailTotalCost += +this.quotationDetailData.adjustPartCost;
}
@ -2239,12 +2363,15 @@ export default {
if (this.quotationDetailData.adjustMachineCost) {
this.quotationDetailData.detailTotalCost += +this.quotationDetailData.adjustMachineCost;
}
//
if (this.quotationDetailData.detailManageCost) {
this.quotationDetailData.detailTotalCost += +this.quotationDetailData.detailManageCost;
}
//
if (this.quotationDetailData.detailOtherCost) {
this.quotationDetailData.detailTotalCost += +this.quotationDetailData.detailOtherCost;
}
//
this.finalPrice();
},
//
@ -2253,7 +2380,9 @@ export default {
return total + currentValue.toolQuantity * currentValue.unitCost;
}, 0);
this.quotationDetailData.computeToolCost = total;
this.quotationDetailData.adjustToolCost = total;
if (this.quotationDetailData.adjustToolCost == 0){
this.quotationDetailData.adjustToolCost = total;
}
this.inputProfitRate();
this.inputOuterCost();
},

6
src/components/quotation/sellForQuotation/quotationExamineAndApprove.vue

@ -5,7 +5,11 @@
</template>
<script>
export default {
name: "quotationExamineAndApprove"
name: "quotationExamineAndApprove",
created() {
},
mounted() {
},
}
</script>

171
src/components/quotation/sellForQuotation/quotationProjectInformation.vue

@ -1,11 +1,178 @@
<template>
<div class="mode-config">
<h2>项目信息</h2>
<el-form label-position="top" :model="projectInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px;width: 60%">
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="项目号">
<el-input v-model="projectInformationData.projectId" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="项目名称">
<el-input v-model="projectInformationData.projectName" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="项目类型">
<el-input v-model="projectInformationData.projectType" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="客户来源">
<el-input v-model="projectInformationData.projectSourceDesc" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="优先级">
<el-input v-model="projectInformationData.priorityDesc" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="项目状态">
<el-input v-model="projectInformationData.status" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="项目经理">
<el-input v-model="projectInformationData.projectManagerName" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="项目负责人">
<el-input v-model="projectInformationData.projectOwnerName" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="项目权限">
<el-input v-model="projectInformationData.userRoleName" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="创建时间">
<el-input v-model="projectInformationData.createDate" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="创建人">
<el-input v-model="projectInformationData.createBy" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="更新时间">
<el-input v-model="projectInformationData.updateDate" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="更新人">
<el-input v-model="projectInformationData.updateBy" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="grid-content bg-purple">
<el-form-item label="项目描述">
<el-input v-model="projectInformationData.projectDesc" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="grid-content bg-purple">
<el-form-item label="其它特殊要求">
<el-input v-model="projectInformationData.remark" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import {
getProjectInformation, //
} from '@/api/quotation/quotationInformation.js'
export default {
name: "quotationProjectInformation"
name: "quotationProjectInformation",
props: ['quotationHeader'],
data(){
return{
quotationData:{},
projectInformationData:{
projectId: '',
projectName: '',
projectType: '',
projectSourceDesc: '',
priorityDesc: '',
status: '',
projectDesc: '',
projectManagerName: '',
projectOwnerName: '',
userRoleName: '',
remark: ''
},
}
},
watch:{
//
quotationHeader: function (val) {
this.quotationData = val;
this.initData();
}
},
methods:{
initData(){
let tempData = {
site: this.$store.state.user.site,
projectId: this.quotationData.projectId
}
//
getProjectInformation(tempData).then(({data}) => {
if (data && data.code === 0) {
this.projectInformationData = data.rows[0]
} else {
this.projectInformationData = {}
}
})
},
},
created() {
},
mounted() {
},
}
</script>

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

@ -376,7 +376,7 @@
</el-dialog>
<!-- 页签 -->
<el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 500px;" type="border-card" @tab-click="tabClick" class="customer-tab">
<el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 500px;box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);border: 2px;" @tab-click="tabClick" class="customer-tab">
<!-- 报价详细信息页签 -->
<el-tab-pane label="报价详细信息" name="quotation_detail_information" style="">
<el-form :inline="true" label-position="top" :model="quotationDetailData" style="margin-left: 10px;margin-top: 10px;">

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

@ -180,7 +180,7 @@
</el-pagination>
<!-- 标签页 -->
<el-tabs v-model="activeTabName" @tab-click="handleClickTab"
style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);border: 2px;min-height: 380px;margin-top: 5px;padding: 5px">
style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);border: 2px;min-height: 440px;margin-top: 5px;padding: 5px">
<el-tab-pane label="明细" name="quotation_detail">
<quotation-detail :quotation-header="quotationHeader"></quotation-detail>
</el-tab-pane>
@ -188,13 +188,13 @@
<quotation-examine-and-approve></quotation-examine-and-approve>
</el-tab-pane>
<el-tab-pane label="项目信息" name="quotation_project_information">
<quotation-project-information></quotation-project-information>
<quotation-project-information :quotation-header="quotationHeader"></quotation-project-information>
</el-tab-pane>
<el-tab-pane label="客户信息" name="quotation_customer_information">
<quotation-customer-information></quotation-customer-information>
<quotation-customer-information :quotation-header="quotationHeader"></quotation-customer-information>
</el-tab-pane>
<el-tab-pane label="客户联系人" name="quotation_customer_contact">
<quotation-customer-contact></quotation-customer-contact>
<quotation-customer-contact :quotation-header="quotationHeader"></quotation-customer-contact>
</el-tab-pane>
</el-tabs>
@ -285,7 +285,7 @@
</el-form>
<el-footer style="height:30px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="insertDiaLogFlag = false">关闭</el-button>
<el-button type="primary" @click="insertQuotationHeader">保存</el-button>
<el-button type="primary" :loading="insertQuotationHeaderBtn" @click="insertQuotationHeader">保存</el-button>
</el-footer>
</el-dialog>
@ -401,6 +401,28 @@ export default {
createBy:this.$store.state.user.id,//
createDate:new Date(),//
},
quotationHeaderColumns:[
{label:"quotationNo",value:"客户报价单号"},
{label:"quotationDate",value:"报价日期"},
{label:"customerNo",value:"客户编码"},
{label:"customerName",value:"客户名称"},
{label:"versionCode",value:"版本号"},
{label:"projectId",value:"项目编码"},
{label:"projectName",value:"项目名称"},
{label:"quoterName",value:"销售员"},
{label:"trackerName",value:"跟单员"},
{label:"currency",value:"货币"},
{label:"quotationStatus",value:"状态"},
{label:"remark",value:"备注"},
{label:"customerInquiryNo",value:"客户询价单号"},
{label:"internalInquiryNo",value:"内部询价单号"},
{label:"requireApproval",value:"需要审批"},
{label:"approvalStatus",value:"审批状态"},
{label:"createBy",value:"创建人"},
{label:"createDate",value:"创建时间"},
{label:"updateBy",value:"更新人"},
{label:"updateDate",value:"更新时间"},
],
//
rules: {
customerNo: [
@ -449,6 +471,8 @@ export default {
quotationNoData:[],
//
quotationHeader:{},
//
insertQuotationHeaderBtn:false,
}
},
methods: {
@ -504,23 +528,37 @@ export default {
// QuotationHeader
insertQuotationHeader(){
//
this.$refs['insertQuotationForm'].validate((valid)=>{
this.$refs['insertQuotationForm'].validate((valid,objects)=>{
if (valid){
this.insertQuotationHeaderBtn = true;
//
insertQuotationHeader(this.insertData).then(({data})=>{
console.log("回调结果:",data)
//
if (data.code === 200){
this.initData();
this.insertQuotationHeaderBtn = false;
this.insertDiaLogFlag = false;
}
this.$message.success(data.msg);
})
}else {
this.$message.warning("校验未通过,必填项未填!");
this.rulesValidateLabel(objects,this.quotationHeaderColumns);
}
})
},
//
rulesValidateLabel(objects, labels) {
for (let filed in objects) {
for (let i = 0; i < labels.length; i++) {
let quotationToolColumn = labels[i];
if (quotationToolColumn.label === filed) {
this.$message.warning(quotationToolColumn.value+"填写不正确");
return
}
}
}
},
// resetInsertData
resetInsertData(){
this.insertData = {
@ -647,16 +685,16 @@ export default {
},
//
dblclickQuotationNo(row){
this.insertData.customerNo = row.customerNo
this.insertData.customerName=row.customerDesc,//
this.insertData.projectId=row.projectId,//
this.insertData.projectName=row.projectName,//
this.insertData.tracker=row.tracker,//
this.insertData.quoter=row.quoter,//
this.insertData.quoterName=row.quoterName,//
this.insertData.trackerName=row.trackerName,//
this.insertData.quotationStatus=row.quotationStatus,//
this.insertData.internalInquiryNo=row.quotationNo,//
this.insertData.customerNo = row.customerNo;
this.insertData.customerName=row.customerDesc;//
this.insertData.projectId=row.projectId;//
this.insertData.projectName=row.projectName;//
this.insertData.tracker=row.tracker;//
this.insertData.quoter=row.quoter;//
this.insertData.quoterName=row.quoterName;//
this.insertData.trackerName=row.trackerName;//
this.insertData.quotationStatus=row.quotationStatus;//
this.insertData.internalInquiryNo=row.quotationNo;//
//
this.quotationNoDialogFlag = false;
}

Loading…
Cancel
Save