You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

3649 lines
128 KiB

<template>
<div class="mod-config">
<!-- 查询条件 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item label="申请批次号">
<el-input v-model="searchData.quotationBatchNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="客户编码">
<el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'客户名称'">
<el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'项目料号'">
<el-input v-model="searchData.testPartNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'料号描述'">
<el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'要求完成日期'">
<el-date-picker
style="width: 120px"
v-model="searchData.startDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label=" ">
<div style="text-align: center;"><i class="el-icon-right"></i></div>
</el-form-item>
<el-form-item :label="' '">
<el-date-picker
style="width: 120px"
v-model="searchData.endDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item label="批次序号">
<el-input v-model="searchData.quotationItemNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'项目编码'">
<el-input v-model="searchData.projectNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'项目名称'">
<el-input v-model="searchData.projectDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'报价专员'">
<el-input v-model="searchData.quoterName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'优先等级'">
<dict-data-select v-model="searchData.priorityLevel" clearable style="width: 120px" :use-default-value="false"
dict-type="priority_Level"/>
</el-form-item>
<el-form-item :label="'状态'" v-if="false">
<el-select v-model="searchData.quotationResultStatus" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="草稿" value="B"></el-option>
<el-option label="已下达" value="C"></el-option>
<el-option label="已完成报价" value="E"></el-option>
<el-option label="已提交报价" value="S"></el-option>
<el-option label="客户已反馈" value="R"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'状态'">
<el-select v-model="searchData.quotationStatus" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="草稿" value="草稿"></el-option>
<el-option label="下达" value="下达"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
<el-button type="primary" @click="delModal()">删除</el-button>
<el-button type="primary" icon="el-icon-upload" @click="handleImportQuotation()">导入</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
</el-form-item>
</el-form>
<!-- 询价列表 -->
<el-table
height="37vh"
:data="dataList"
border
:row-style="rowStyle"
ref="quotationTable"
@row-click="quotationClickRow"
@selection-change="selectionQuotation"
@current-change="changeCurrentRow"
v-loading="dataListLoading"
style="width: 100%;margin-top: 5px">
<el-table-column
type="selection"
header-align="center"
align="center"
:selectable="selectFlag"
width="50">
</el-table-column>
<el-table-column
v-for="(item,index) in columnList" :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">
<div v-if="item.columnProp === 'quotationResultStatus'">
<span v-if="!item.columnHidden">
<span v-show="scope.row.quotationResultStatus === 'B'">草稿</span>
<span v-show="scope.row.quotationResultStatus === 'C'">已下达</span>
<span v-show="scope.row.quotationResultStatus === 'E'">已完成报价</span>
<span v-show="scope.row.quotationResultStatus === 'S'">已提交报价</span>
<span v-show="scope.row.quotationResultStatus === 'R'">客户已反馈</span>
</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
<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>
</div>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
<el-link style="cursor: pointer" v-if="scope.row.quotationResultStatus === 'B'"
@click="updateModalStatus(scope.row,'C')">下达
</el-link>
</template>
</el-table-column>
</el-table>
<selectDiv ref="selectDiv"></selectDiv>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 询价模态框 -->
<el-dialog :title="modalData.title" v-drag @open="openSaveDataDialog" @close="closeSaveDataDialog"
:close-on-click-modal="false" top="10vh" :visible.sync="modalFlag" width="1200px">
<el-form label-position="top" ref="saveDataForm" :model="modalData" :rules="rules">
<el-row :gutter="10">
<el-col :span="12">
<el-form-item prop="customerNo" label="客户编码">
<span style="cursor: pointer" slot="label" v-if="modalData.flag === '1'" @click="getBaseList(509,1)"><a herf="#">客户编码</a></span>
<el-row :gutter="10">
<el-col :span="8">
<el-input :disabled="modalData.flag !== '1'" v-model="modalData.customerNo" @blur="customerNoBlur"></el-input>
</el-col>
<el-col :span="16">
<el-input disabled v-model="modalData.customerDesc"></el-input>
</el-col>
</el-row>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="要求完成日期" prop="requiredCompletionDate">
<el-date-picker v-model="modalData.requiredCompletionDate"
:disabled="modalData.flag === '2' && modalData.quotationResultStatus === 'C'"
style="width: 100%" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="优先等级" >
<dict-data-select v-if="modalFlag"
:disabled="modalData.flag === '2' && modalData.quotationResultStatus === 'C'"
v-model="modalData.priorityLevel" dict-type="priority_Level"></dict-data-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="询价金额">
<el-input-number :step="0"
:disabled="modalData.flag === '2' && modalData.quotationResultStatus === 'C'"
:controls="false" v-model="modalData.quotationAmount"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item prop="projectNo" label="项目编码">
<span slot="label" v-if="modalData.customerNo && modalData.flag === '1'" style=""
@click="chooseProjectListFlag = true"><a herf="#">项目编码</a></span>
<el-row :gutter="10">
<el-col :span="8">
<el-input :disabled="!modalData.customerNo || modalData.flag !== '1'"
v-model="modalData.projectNo" @blur="projectNoBlur"></el-input>
</el-col>
<el-col :span="16">
<el-input disabled v-model="modalData.projectDesc"></el-input>
</el-col>
</el-row>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item prop="projectManagerName" label="PM/Sales">
<el-input disabled v-model="modalData.projectManagerName"></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item prop="projectOwnerName" label="PjM">
<el-input disabled v-model="modalData.projectOwnerName"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="Quote Type">
<dict-data-select v-if="modalFlag" v-model="modalData.quoteType"
:disabled="modalData.flag === '2' && modalData.quotationResultStatus === 'C'"
clearable dict-type="quote_type" :use-default-value="modalData.flag === '1'"></dict-data-select>
</el-form-item>
</el-col>
<el-col :span="4" v-if="false">
<el-form-item>
<span slot="label" @click="getCustomerContactList"><a>客户负责人</a></span>
<el-input v-model="modalData.customerResponsiblePerson"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" v-if="false">
<el-form-item label="客户负责人联系方式">
<el-input v-model="modalData.customerResponsiblePersonPhone"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="4">-->
<!-- <el-form-item prop="trackerName">-->
<!-- <span v-if="quotationInformationFlag('tracker') === 'N' && modalData.flag === '2'" slot="label">采购专员</span>-->
<!-- <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2000)"><a herf="#">采购专员</a></span>-->
<!-- <el-input :disabled="quotationInformationFlag('tracker') === 'N' && modalData.flag === '2'" v-model="modalData.trackerName" readonly></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="4">
<el-form-item prop="quoterName">
<span v-if="modalData.flag === '2' && modalData.quotationResultStatus === 'C'" slot="label">报价专员</span>
<span v-else style="cursor: pointer" slot="label" @click="getBaseList(2002)"><a herf="#">报价专员</a></span>
<el-input v-model="modalData.quoterName" :disabled="modalData.flag === '2' && modalData.quotationResultStatus === 'C'" readonly></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="终端客户编码">
<el-row :gutter="10">
<el-col :span="8">
<el-input disabled v-model="modalData.finalCustomerId"></el-input>
</el-col>
<el-col :span="16">
<el-input disabled v-model="modalData.finalCustomerName"></el-input>
</el-col>
</el-row>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="Delivery Terms" prop="deliveryTerms">
<dict-data-select v-if="modalFlag" v-model="modalData.deliveryTerms"
:disabled="modalData.flag === '2' && modalData.quotationResultStatus === 'C'"
clearable dict-type="delivery_terms" :use-default-value="modalData.flag === '1'"></dict-data-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="客户询价单号" prop="customerQuoteNo">
<el-input v-model="modalData.customerQuoteNo" :disabled="modalData.flag === '2' && modalData.quotationResultStatus === 'C'"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="是否需要Sourcing">
<dict-data-select v-if="modalFlag"
v-model="modalData.sourcing" dict-type="sourcing"></dict-data-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" v-if="false">
<el-col :span="24">
<el-form-item label="备注" style="display: block;min-height: 90px">
<el-input type="textarea" :autosize="{minRows: 3, maxRows: 3}" resize='none'
v-model="modalData.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="24">
<el-form-item label="技术注意事项" style="display: block;min-height: 90px">
<el-input
:disabled="modalData.flag === '2' && modalData.quotationResultStatus === 'C'"
type="textarea"
v-model="modalData.technicalConsiderations"
:autosize="{minRows: 3, maxRows: 3}"
resize='none'>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item style="display: none">
<span slot="label" @click="getProjectPartList()"><a>项目物料</a></span>
<el-input v-model="modalData.partDesc" style="display: none"></el-input>
</el-form-item>
<el-tabs v-model="activeTab">
<el-tab-pane label="物料信息" name="part">
<div class="rq">
<el-form :inline="true" label-position="top" :model="projectPartData">
<el-form-item label="项目料号">
<el-input v-model="projectPartData.testPartNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="料号描述">
<el-input v-model="projectPartData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="getProjectPartList()">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="223"
:data="projectPartList"
ref="projectPartTable"
@row-click="projectPartClickRow"
@selection-change="selectionProjectPart"
:row-key="getRowKeys"
:row-style="partRowStyle"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
type="selection"
header-align="center"
align="center"
:selectable="checkSelectable"
width="50" class-name="disabledCheckbox">
</el-table-column>
<el-table-column
v-for="(item,index) in projectPartDetailList" :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>
</el-tab-pane>
</el-tabs>
</el-form>
<el-footer style="height:35px;margin-top: 10px;padding-bottom:5px;text-align:center">
<el-button type="primary" @click="saveData()">保存</el-button>
<el-button type="primary" @click="modalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!--选择项目模态框-->
<el-dialog title="选择-项目" @close="closeProjectInfoDialog" @open="searchProjectInfoList"
:visible.sync="chooseProjectListFlag" width="35%">
<el-form label-position="top" :model="searchProjectData" ref="closeProjectInfoForm">
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="项目编码">
<el-input v-model="searchProjectData.projectNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="项目名称">
<el-input v-model="searchProjectData.projectDesc"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label=" ">
<el-button type="primary" @click="searchProjectInfoList">查询</el-button>
</el-form-item>
</el-col>
</el-row>
<el-table :height="223"
:data="projectList"
border
@row-dblclick="projectClickRow">
<el-table-column label="项目编码" prop="projectNo"/>
<el-table-column label="项目名称" prop="projectDesc"/>
<el-table-column label="终端客户编码" prop="finalCustomerId"/>
<el-table-column label="终端客户名称" prop="finalCustomerName"/>
</el-table>
</el-form>
</el-dialog>
<!-- 录入询价结果模态框 -->
<el-dialog title="录入询价结果" :close-on-click-modal="false" v-drag :visible.sync="enterResultModalFlag"
width="785px">
<el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
style="margin-left: 0px;margin-top: 10px;">
<el-form-item label="实际询价日期" prop="actualityQuotationDate"
:rules="enterResultRules.actualityQuotationDate">
<el-date-picker v-model="enterResultData.actualityQuotationDate" type="date" value-format="yyyy-MM-dd"
placeholder="请选择日期" style="width: 200px"></el-date-picker>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
style="margin-left:0px;margin-top: 5px;">
<el-form-item label="询价结果信息" prop="quotationResultInformation"
:rules="enterResultRules.quotationResultInformation">
<el-input type="textarea" v-model="enterResultData.quotationResultInformation" :rows="3" resize='none'
show-word-limit style="width: 500px;height: 30px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="enterResultData" style="margin-left: 0px;margin-top: 50px;">
<el-form :inline="true" label-position="top" style="margin-top: 5px">
<el-button type="primary" @click="uploadFile()">上传文件</el-button>
</el-form>
<el-table
:height="200"
:data="fileContentList"
border
v-loading="dataListLoading"
style="width: 100%">
<el-table-column
v-for="(item,index) in fileColumnList" :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-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<a @click="deleteFile(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
</el-form>
<el-footer style="height:35px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="saveQuotationResult()">保存</el-button>
<el-button type="primary" @click="enterResultModalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 页签 -->
<el-tabs style="margin-top: 0px; width: 100%; height: 40vh;" v-model="activeTable" class="customer-tab" type="border-card" @tab-click="tabClick">
<!-- 询价详细信息页签 -->
<el-tab-pane label="询价详细信息" name="quotation_detail_information" style="" v-if="false">
<el-form :inline="true" label-position="top" :model="quotationDetailData"
style="margin-left: 10px;margin-top: 10px;">
<el-form-item label="技术注意事项">
<el-input
type="textarea"
v-model="quotationDetailData.technicalConsiderations"
readonly
:rows="3"
resize='none'
show-word-limit
style="width: 600px;height: 30px">
</el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="quotationDetailData"
style="margin-left: 10px;margin-top: 46px;">
<el-form-item label="客户负责人">
<el-input v-model="quotationDetailData.customerResponsiblePerson" readonly style="width: 295px"></el-input>
</el-form-item>
<el-form-item label="客户负责人联系方式">
<el-input v-model="quotationDetailData.customerResponsiblePersonPhone" readonly
style="width: 295px"></el-input>
</el-form-item>
</el-form>
</el-tab-pane>
<!-- 询价结果页签 -->
<el-tab-pane label="询价结果" name="quotation_result" v-if="false">
<el-form :inline="true" label-position="top" :model="quotationResultData"
style="margin-left: 10px;margin-top: 5px;">
<el-button v-if="quotationResultData.quotationResultStatus === 'C'" type="primary"
@click="quotationResultModal()">录入询价结果
</el-button>
<el-button v-if="quotationResultData.quotationResultStatus === 'E'" type="primary"
@click="submitQuotationModal()">提交客户询价
</el-button>
<el-button v-if="quotationResultData.quotationResultStatus === 'S'" type="primary"
@click="customerResponseModal()">客户回复
</el-button>
</el-form>
<el-form :inline="true" label-position="top" :model="quotationResultData"
style="margin-left: 10px;margin-top: 2px;">
<el-form-item label="实际询价日期">
<el-date-picker v-model="quotationResultData.actualityQuotationDate" readonly type="date"
value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="quotationResultData"
style="margin-left: 10px;margin-top: -1px;">
<el-form-item label="询价结果信息">
<el-input type="textarea" v-model="quotationResultData.quotationResultInformation" readonly :rows="2"
resize='none' show-word-limit style="width: 760px;height: 20px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="quotationResultData"
style="margin-left: 10px;margin-top: 26px;">
<el-form-item label="附件清单">
<el-table
:height="90"
:data="fileContentList"
border
v-loading="dataListLoading"
style="width: 100%">
<el-table-column
v-for="(item,index) in fileColumnList" :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-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<a @click="downloadFile(scope.row)">下载</a>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="quotationResultData"
style="margin-left: 10px;margin-top: 69px;">
<el-form-item label="实际提交看客户日期">
<el-date-picker v-model="quotationResultData.actualitySubmissionDate" readonly type="date"
value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
</el-form-item>
<el-form-item label="提交方式">
<el-input v-model="quotationResultData.submissionMethod" readonly style="width: 240px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="quotationResultData"
style="margin-left: 10px;margin-top: -2px;">
<el-form-item label="提交备注">
<el-input type="textarea" v-model="quotationResultData.submissionRemark" readonly :rows="2" resize='none'
show-word-limit style="width: 760px;height: 20px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="quotationResultData"
style="margin-left: 10px;margin-top: 26px;">
<el-form-item label="客户是否回复">
<input type="checkbox" v-if="quotationResultData.quotationResultStatus == 'R'" checked
onclick="return false"/>
<input type="checkbox" v-if="quotationResultData.quotationResultStatus != 'R'" onclick="return false"/>
</el-form-item>
<el-form-item label="客户确认结果">
<el-input v-model="quotationResultData.confirmResults" readonly style="width: 205px"></el-input>
</el-form-item>
<el-form-item label="实际回复日期">
<el-date-picker v-model="quotationResultData.actualityReplyDate" readonly type="date"
value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
</el-form-item>
<el-form-item label="客户确认人">
<el-input v-model="quotationResultData.confirmBy" readonly style="width: 205px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="quotationResultData"
style="margin-left: 10px;margin-top: -2px;">
<el-form-item label="客户回复信息">
<el-input type="textarea" v-model="quotationResultData.confirmInformation" readonly :rows="2" resize='none'
show-word-limit style="width: 760px;height: 20px"></el-input>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="基本信息" name="priceCheck">
<price-check-properties ref="tabProperties" height="33vh" v-model:data-list="priceCheckPropertiesList"
:quotation-no="quotationCurrentRow.quotationNo"></price-check-properties>
</el-tab-pane>
<!-- 项目信息页签 -->
<el-tab-pane label="项目信息" name="project_information" style="height: 272px">
<el-form label-position="top" :model="projectInformationData"
style="margin-left: 10px;margin-top: 5px;margin-right: 10px;">
<el-row :gutter="20">
<el-col :span="4">
<div class="grid-content bg-purple">
<el-form-item label="项目编码">
<el-input v-model="projectInformationData.projectNo" 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.projectDesc" 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.projectCreationDate" 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.projectCategory" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="4">
<div class="grid-content bg-purple">
<el-form-item label="客户编码">
<el-input v-model="projectInformationData.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="projectInformationData.customerDesc" 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.priority" 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.cProjectRegion" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="4">
<div class="grid-content bg-purple">
<el-form-item label="PM/Sales">
<el-input v-model="projectInformationData.projectManagerName" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="4">
<div class="grid-content bg-purple">
<el-form-item label="PjM">
<el-input v-model="projectInformationData.projectOwnerName" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="4">
<div class="grid-content bg-purple">
<el-form-item label="Engineer">
<el-input v-model="projectInformationData.engineerName" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="IPQC-Lam/Pri/Etch/Slit">
<el-input v-model="projectInformationData.cQualityEngineer1Name" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="IPQC-Converting">
<el-input v-model="projectInformationData.cQualityEngineer2Name" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="4">
<div class="grid-content bg-purple">
<el-form-item label="FQC">
<el-input v-model="projectInformationData.cQualityEngineer3Name" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="4">
<div class="grid-content bg-purple">
<el-form-item label="MFG">
<el-input v-model="projectInformationData.cManufactureEngineerName" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<!-- 客户信息页签 -->
<el-tab-pane label="客户信息" name="customer_information" style="height: 274px">
<el-form label-position="top" :model="customerInformationData"
style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
<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.customerDescription" 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>
</el-tab-pane>
</el-tabs>
<!-- chooseList模态框 -->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 上传文件的modal -->
<quotationUploadFile ref="quotationUploadFile" @refreshPageTables="getFileContentData()"
v-drag></quotationUploadFile>
<!-- 导入 -->
<quotationUpload ref="quotationUpload" @refreshPageTables="getDataList()" v-drag></quotationUpload>
</div>
</template>
<script>
import {
quotationInformationSearch, // 询价信息列表查询
quotationInformationSave, // 询价信息新增
quotationInformationEdit, // 询价信息编辑
quotationInformationDelete, // 询价信息删除
getFileContentList, // 获取询价单附件列表
quotationResultSearch, // 获取询价结果对象
deleteQuotationFile, // 文件删除
downLoadQuotationFile, // 文件下载
saveQuotationResult, // 保存询价结果
saveSubmitResult, // 保存提交结果
saveCustomerResponse, // 保存客户回复
getProjectPartList, // 获取产品列表
checkQuotationStatus, // 检查询价进度
getProjectInformation, // 获取项目信息
getCustomerInformation, // 获取客户信息
searchProjectInfoList,// 查询项目信息
submitChange, // 提交
quotationInformationEditStatus, // 下达
} from '@/api/quote/quotationInformation.js'
import {
customerContactSearch, // 客户联系人列表查询
} from '@/api/customer/customerContact.js'
import Chooselist from '@/views/modules/common/Chooselist'
import quotationUploadFile from "./quotation_upload_file"
import DictDataSelect from "../sys/dict-data-select.vue";
import PriceCheckProperties from "./priceCheckProperties.vue";
import TestProperties from "../test/testAttribute/testProperties.vue";
import {getPriceCheckPropertiesList} from "../../../api/quote/priceCheckProperties";
import * as XLSX from 'xlsx';
import priceCheckProperties from "./priceCheckProperties.vue";
import quotationUpload from "../quote/quotation_upload.vue";
import {queryCustomerList} from "../../../api/customer/customer";
import {queryProjectList} from "../../../api/project/project";
export default {
computed: {
priceCheckProperties() {
return priceCheckProperties
},
// quotationInformationFlag () {
// return (value) => {
// if (!this.plmQuotationInformationArr){
// return 'N'
// }
// let arr = this.plmQuotationInformationArr.filter(a => a.fieldId === value)
// if (arr.length > 0) {
// return arr[0].updateFlag
// }
// return 'N'
// }
// },
},
components: {
quotationUpload,
TestProperties,
PriceCheckProperties,
DictDataSelect,
Chooselist,
quotationUploadFile
},
props:{
height:{
type:Number,
default:200
}
},
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
this.searchData.projectNo = this.searchData.projectNo.toUpperCase()
}
},
modalData: {
deep: true,
handler: function (newV, oldV) {
this.modalData.customerNo = this.modalData.customerNo.toUpperCase()
this.modalData.projectNo = this.modalData.projectNo.toUpperCase()
this.modalData.quotationNo = this.modalData.quotationNo.toUpperCase()
}
},
quotationCurrentRow(newVal,oldVal){
this.getPriceCheckProperties();
},
'modalData.customerNo'(newV, oldV) {
if (oldV) {
if (!newV) {
this.modalData.customerDesc = ''
}
this.modalData.projectNo = ''
this.modalData.consignee = ''
this.modalData.consigneeContact = ''
this.modalData.sendSamplesAddress = ''
}
},
'modalData.projectNo'(newV, oldV) {
if (oldV) {
if (!newV) {
this.modalData.projectName = ''
}
this.modalData.projectPartId = ''
this.modalData.testPartNo = ''
this.modalData.partDesc = ''
this.projectPartListSelections = [];
this.projectPartList = [];
this.$refs.projectPartTable.clearSelection();
}
},
},
data() {
return {
copyPriceCheckDetail:{},
priceCheckRule: {
associatedPartNo:[{required: true, message: ' ', trigger: 'change'},],
materialRequired:[{required: true, message: ' ', trigger: 'change'},],
yearlyOrMonthlyRequirement:[{required: true, message: ' ', trigger: 'change'},],
runningWidth:[{required: true, message: ' ', trigger: 'change'},],
},
savePriceDetail:{
site:'',
quotationNo:'',
associatedPartNo:'',
materialRequired:'',
yearlyOrMonthlyRequirement:'',
runningWidth:'',
},
activeTab:'part',
priceCheckPropertiesList: [],
// 导出
exportData: [],
exportName: '询价申请' + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ['询价申请'],
exportFooter: [],
resultList: [],
uploadUrl: '/plm/quotationInformation/uploadExcel',
// ======== 行高 ========
secondHeight: 200,
// ======== 分页 ========
pageIndex: 1,
pageSize: 50,
totalPage: 0,
selectedDataNum: 0,
// 条件查询
searchData: {
site: this.$store.state.user.site,
customerNo: '',
customerDesc: '',
quotationBatchNo: '',
quotationItemNo: '',
trackerName: '',
testPartNo: '',
partDesc: '',
quotationStatus: '',
quotationResultStatus: '',
startDate: '',
endDate: '',
projectId: '',
projectNo: '',
projectDesc: '',
quoterName: '',
priorityLevel: '',
page: 1,
limit: 10,
menuId: this.$route.meta.menuId,
quotationNo: ''
},
// 其它
dataListLoading: false,
// 选择项目弹框开关
chooseProjectListFlag: false,
//项目搜索条件
searchProjectData: {
site: this.$store.state.user.site,
projectId: undefined,
projectNo: undefined,
projectName: undefined,
projectDesc: undefined,
customerNo: undefined,
userName: undefined,
page: 1,
limit: 10
},
// 项目集合
projectList: [],
// 初始页签
activeTable: 'priceCheck',
// ======== 数据对象 ========
modalData: {
flag: '',
title: '',
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
quotationNo: '',
customerNo: '',
customerDesc: '',
projectId: '',
projectNo: '',
projectDesc: '',
projectManagerName: '',
projectOwnerName: '',
deliveryTerms: '',
quoteType: '',
tracker: '',
trackerName: '',
sourcing:'',
quoter: '',
quoterName: '',
customerQuoteNo: '',
quotationStatus: '',
projectPartId: '',
testPartNo: '',
partDesc: '',
priorityLevel: '',
requiredCompletionDate: '',
remark: '',
technicalConsiderations: '',
customerResponsiblePerson: '',
customerResponsiblePersonPhone: '',
nextToDo: '',
actualityQuotationDate: '',
quotationResultInformation: '',
actualitySubmissionDate: '',
submissionMethod: '',
submissionRemark: '',
actualityReplyDate: '',
confirmResults: '',
confirmBy: '',
confirmInformation: '',
quotationResultStatus: '',
createDate: '',
createBy: '',
updateDate: '',
updateBy: '',
nodeConclusion: '',
stepId: '',
rejectFlag: '',
rejectStepId: '',
isReject: '',
projectManager: '',
projectOwner: '',
projectPartIds: []
},
quotationDetailData: {
technicalConsiderations: '',
customerResponsiblePerson: '',
customerResponsiblePersonPhone: ''
},
quotationResultData: {
actualityQuotationDate: '',
quotationResultInformation: '',
actualitySubmissionDate: '',
submissionMethod: '',
submissionRemark: '',
confirmResults: '',
actualityReplyDate: '',
confirmBy: '',
confirmInformation: '',
quotationResultStatus: '',
},
enterResultData: {
site: this.$store.state.user.site,
quotationNo: '',
actualityQuotationDate: '',
quotationResultInformation: '',
updateBy: this.$store.state.user.name,
quotationResultStatus: '',
fileContentList: []
},
submitResultData: {
site: this.$store.state.user.site,
quotationNo: '',
actualitySubmissionDate: '',
submissionMethod: '',
submissionRemark: '',
updateBy: this.$store.state.user.name,
quotationResultStatus: ''
},
customerResponseData: {
site: this.$store.state.user.site,
quotationNo: '',
actualityReplyDate: '',
confirmResults: '',
confirmBy: '',
confirmInformation: '',
updateBy: this.$store.state.user.name,
quotationResultStatus: ''
},
projectPartData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
projectPartId: '',
testPartNo: '',
partDesc: '',
projectId: '',
page: 1,
limit: 10
},
projectInformationData: {
projectId: '',
projectNo: '',
projectPartId: '',
oriProjectId: '',
projectDesc:'',
projectCloseDate:'',
proofingNo:'',
needDate:'',
customerNo:'',
finalCustomerId:'',
customerDesc:'',
projectCategory:'',
testPartNo:'',
partDesc:'',
priority:'',
projectManager:'',
projectManagerName:'',
projectOwner:'',
projectOwnerName:'',
cProjectRegion:'',
cProjectBuildDate:'',
cQualityEngineer1:'',
cQualityEngineer1Name:'',
cQualityEngineer2:'',
cQualityEngineer2Name:'',
cQualityEngineer3:'',
cQualityEngineer3Name:'',
cManufactureEngineer:'',
cManufactureEngineerName:'',
engineer:'',
engineerName:'',
//projectCreationDate为当前服务器的时间
projectCreationDate: '',
finalPartNo:'',
finalPartDesc:'',
wantedConfirmDate: '',
// active:'',
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
},
customerInformationData: {
customerNo: '',
customerDesc: '',
importantCustomer: '',
customerCurrency: '',
turnoverOfYear: '',
potentialRevenueOfYear: '',
customerStatus: '',
customerIndustry: '',
companyName: '',
jobDescription: '',
customerDescription: '',
contactName: '',
contactPhoneNumber1: '',
position: '',
addressName: '',
addressType: '',
createDate: '',
createBy: '',
updateDate: '',
updateBy: ''
},
// ======== 数据列表 ========
dataList: [],
fileContentList: [],
projectPartList: [],
contactList: [],
// ======== 列表表头 ========
columnList: [
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1QuotationNo',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'quotationNo',
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: 102001,
serialNumber: '102001Table1QuotationBatchNo',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'quotationBatchNo',
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: 102001,
serialNumber: '102001Table1QuotationItemNo',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'quotationItemNo',
headerAlign: 'center',
align: 'right',
columnLabel: '序号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1CustomerNo',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'customerNo',
headerAlign: 'center',
align: 'center',
columnLabel: '客户编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1CustomerDesc',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'customerDesc',
headerAlign: 'center',
align: 'left',
columnLabel: '客户名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1ProjectId',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'projectNo',
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: 102001,
serialNumber: '102001Table1ProjectDesc',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'projectDesc',
headerAlign: 'center',
align: 'left',
columnLabel: '项目名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1ProjectManagerName',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'projectManagerName',
headerAlign: 'center',
align: 'left',
columnLabel: 'PM/Sales',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1ProjectOwnerName',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'projectOwnerName',
headerAlign: 'center',
align: 'left',
columnLabel: 'PjM',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1QuoterName',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'quoterName',
headerAlign: 'center',
align: 'left',
columnLabel: '报价专员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1TestPartNo',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'testPartNo',
headerAlign: 'center',
align: 'left',
columnLabel: '项目料号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1PartDesc',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'partDesc',
headerAlign: 'center',
align: 'left',
columnLabel: '物料描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1PriorityLevel',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'priorityLevel',
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: 102001,
serialNumber: '102001Table1RequiredCompletionDate',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'requiredCompletionDate',
headerAlign: 'center',
align: 'center',
columnLabel: '要求完成日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1quotationStatus',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'quotationStatus',
headerAlign: 'center',
align: 'center',
columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1CreateDate',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '创建时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1CreateBy',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'left',
columnLabel: '创建人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1UpdateDate',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
columnLabel: '更新时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1UpdateBy',
tableId: '102001Table1',
tableName: '询价信息表',
columnProp: 'updateBy',
headerAlign: 'center',
align: 'left',
columnLabel: '更新人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
}
],
fileColumnList: [
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table2FileName',
tableId: '102001Table2',
tableName: '文件信息表',
columnProp: 'fileName',
headerAlign: 'center',
align: 'center',
columnLabel: '文件名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table2FileRemark',
tableId: '102001Table2',
tableName: '文件信息表',
columnProp: 'fileRemark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 240
},
// {
// userId: this.$store.state.user.name,
// functionId: 102001,
// serialNumber: '102001Table2OrderRef3',
// tableId: '102001Table2',
// tableName: '文件信息表',
// columnProp: 'orderRef3',
// 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: 102001,
serialNumber: '102001Table2CreateDate',
tableId: '102001Table2',
tableName: '文件信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '上传时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table2CreatedBy',
tableId: '102001Table2',
tableName: '文件信息表',
columnProp: 'createdBy',
headerAlign: 'center',
align: 'center',
columnLabel: '上传人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
}
],
projectPartDetailList: [
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table3TestPartNo',
tableId: '102001Table3',
tableName: '项目物料表',
columnProp: 'testPartNo',
headerAlign: 'center',
align: 'center',
columnLabel: '项目料号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table3PartDesc',
tableId: '102001Table3',
tableName: '项目物料表',
columnProp: 'partDesc',
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: 101001014,
serialNumber: '101001014Table1BuildDate',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: "buildDate",
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: 101001014,
serialNumber: '101001014Table1ProjectCategory',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'projectCategory',
headerAlign: "center",
align: "left",
columnLabel: '项目分类',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1Priority',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'priority',
headerAlign: "center",
align: "left",
columnLabel: '优先级',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1ProjectManager',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'projectManagerName',
headerAlign: "center",
align: "left",
columnLabel: 'PM/Sales',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1ProjectOwner',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'projectOwnerName',
headerAlign: "center",
align: "left",
columnLabel: 'PjM',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1Engineer',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'engineerName',
headerAlign: "center",
align: "left",
columnLabel: 'Engineer',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1CQualityEngineer1',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'cQualityEngineer1Name',
headerAlign: "center",
align: "left",
columnLabel: 'IPQC-Lam/Pri/Etch/Slit',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1CQualityEngineer2',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'cQualityEngineer2Name',
headerAlign: "center",
align: "left",
columnLabel: 'IPQC-Converting',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1CQualityEngineer3',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'cQualityEngineer3Name',
headerAlign: "center",
align: "left",
columnLabel: 'FQC',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1CManufactureEngineer',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'cManufactureEngineerName',
headerAlign: "center",
align: "left",
columnLabel: 'MFG',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1Status',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'status',
headerAlign: "center",
align: "left",
columnLabel: '项目状态' ,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1NeedDate',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'needDate',
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: 101001014,
serialNumber: '101001014Table1closeDate',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'closeDate',
headerAlign: "center",
align: "left",
columnLabel: '转量产日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1FinalPartNo',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'finalPartNo',
headerAlign: "center",
align: "left",
columnLabel: 'ERP正式料号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1CreateDate',
tableId: "101001014Table1",
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: 101001014,
serialNumber: '101001014Table1CreateBy',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'createBy',
headerAlign: "center",
align: "left",
columnLabel: '创建人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1UpdateDate',
tableId: "101001014Table1",
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: 101001014,
serialNumber: '101001014Table1UpdateBy',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'updateBy',
headerAlign: "center",
align: "left",
columnLabel: '更新人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
],
columnContactList: [
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table4ContactName',
tableId: '102001Table4',
tableName: '客户联系人表',
columnProp: 'contactName',
headerAlign: 'center',
align: 'center',
columnLabel: '客户负责人',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table4ContactPhoneNumber1',
tableId: '102001Table4',
tableName: '客户联系人表',
columnProp: 'contactPhoneNumber1',
headerAlign: 'center',
align: 'center',
columnLabel: '联系方式',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table4PrimaryContact',
tableId: '102001Table4',
tableName: '客户联系人表',
columnProp: 'primaryContact',
headerAlign: 'center',
align: 'center',
columnLabel: '默认联系人',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table4ContactStatus',
tableId: '102001Table4',
tableName: '客户联系人表',
columnProp: 'contactStatus',
headerAlign: 'center',
align: 'center',
columnLabel: '人员状态',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
],
// ======== 必填规则 ========
rules: {
customerNo: [
{required: true, message: ' ', trigger: 'change'},
{required: true, message: ' ', trigger: 'blur'},
],
customerDesc: [
{required: true, message: ' ', trigger: 'change'},
{required: true, message: ' ', trigger: 'blur'},
],
trackerName: [
{required: true, message: ' ', trigger: 'change'},
{required: true, message: ' ', trigger: 'blur'},
],
projectNo: [
{required: true, message: ' ', trigger: 'change'},
{required: true, message: ' ', trigger: 'blur'},
],
projectDesc: [
{required: true, message: ' ', trigger: 'change'},
{required: true, message: ' ', trigger: 'blur'},
],
quoterName: [
{required: true, message: ' ', trigger: 'change'},
{required: true, message: ' ', trigger: 'blur'},
],
partDesc: [
{required: true, message: ' ', trigger: 'change'},
{required: true, message: ' ', trigger: 'blur'},
],
priorityLevel: [
{required: true, message: ' ', trigger: 'change'},
],
requiredCompletionDate: [
{required: true, message: ' ', trigger: 'change'},
{required: true, message: ' ', trigger: 'blur'},
],
deliveryTerms: [
{required: true, message: ' ', trigger: 'change'},
{required: true, message: ' ', trigger: 'blur'},
],
quoteType: [
{required: true, message: ' ', trigger: 'change'},
{required: true, message: ' ', trigger: 'blur'},
],
},
enterResultRules: {
actualityQuotationDate: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
quotationResultInformation: [
{
required: true,
message: ' ',
trigger: 'change'
}
]
},
submitResultRules: {
actualitySubmissionDate: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
submissionMethod: [
{
required: true,
message: ' ',
trigger: 'change'
}
]
},
customerResponseRules: {
actualityReplyDate: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
confirmResults: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
confirmBy: [
{
required: true,
message: ' ',
trigger: 'change'
}
]
},
// ======== 复选数据集 ========
quotationSelections: [],
projectPartListSelections: [],
// ======== 选中的当前行数据 ========
quotationCurrentRow: {},
// ======== 模态框开关控制 ========
modalFlag: false,
modalDisableFlag: false,
enterResultModalFlag: false,
submitResultModalFlag: false,
customerResponseModalFlag: false,
projectPartModelFlag: false,
contactModelFlag: false,
plmQuotationInformationArr: []
}
},
mounted() {
this.$nextTick(() => {
/*第二个表格高度的动态调整*/
this.height = window.innerHeight - 210;
})
},
created() {
this.getDataList()
},
activated () {
if (this.$route.params.type === 'tokenLogin') {
if (this.$route.params.docNo) {
this.searchData.quotationNo = this.$route.params.docNo
}
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
quotationInformationSearch(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
this.$refs.selectDiv.setLengthAll(this.dataList.length)
//判断是否全部存在数据
if (this.totalPage > 0) {
//设置选中行
// this.$refs.quotationTable.setCurrentRow(this.dataList[0])
// this.refreshCurrentTabTable() //加载当前的页签的table
this.quotationClickRow(this.dataList[0])
this.updateModal(this.dataList[0])
}
}
})
}else {
if (this.$route.params.quotationNo) {
this.searchData.quotationNo = this.$route.params.quotationNo
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
quotationInformationSearch(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
this.$refs.selectDiv.setLengthAll(this.dataList.length)
this.searchData.quotationNo = ''
//判断是否全部存在数据
if (this.totalPage > 0) {
//设置选中行
// this.$refs.quotationTable.setCurrentRow(this.dataList[0])
// this.refreshCurrentTabTable() //加载当前的页签的table
this.quotationClickRow(this.dataList[0])
// this.updateModal(this.dataList[0])
}
}
})
}
}
},
methods: {
// ======== 分页相关方法 ========
/**
* 每页数
* @param val
*/
sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
/**
* 当前页
* @param val
*/
currentChangeHandle(val) {
this.pageIndex = val
this.getDataList()
},
// ======== 复选框操作相关方法 ========
/**
* 选中一行
* @param row
*/
projectPartClickRow(row) {
if (this.modalData.flag === '1') {
this.$refs.projectPartTable.toggleRowSelection(row);
this.confirmProjectPart();
}
},
/**
* 多选
* @param val
*/
selectionProjectPart(val) {
this.projectPartListSelections = val
},
/**
* 获取唯一值,一般都为 id
* @param row
* @returns {*}
*/
getRowKeys(row) {
return row.testPartNo;
},
/**
* 未知
* @returns {boolean}
*/
selectFlag() {
return true;
},
// ======== 页签切换相关方法 ========
/**
* 列表表格选择替换
* @param tab
* @param event
*/
tabClick(tab, event) {
// 刷新列表数据
this.refreshCurrentTabTable()
},
/**
* 当前值发生变化的时候修改
* @param row
* @param oldRow
*/
changeCurrentRow(row, oldRow) {
// 判断是否是获取焦点的事件
if (row) {
this.quotationCurrentRow = JSON.parse(JSON.stringify(row))
//刷新当前页表
this.refreshCurrentTabTable()
}
},
/**
* 刷新页签的table数据
*/
refreshCurrentTabTable() {
if (this.activeTable === 'quotation_result') {
this.getQuotationResult()
} else if (this.activeTable === 'project_information') {
this.getProjectInformation()
} else if (this.activeTable === 'customer_information') {
this.getCustomerInformation()
}
},
// ======== 列表数据刷新方法 ========
/**
* 获取数据列表
*/
getDataList() {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
quotationInformationSearch(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
this.$refs.selectDiv.setLengthAll(this.dataList.length)
// 遍历dataList 取-后的值
this.dataList.forEach((item) => {
item.projectManagerName = item.projectManager.split('-')[1]
item.projectOwnerName = item.projectOwner.split('-')[1]
})
//判断是否全部存在数据
if (this.totalPage > 0) {
//设置选中行
// this.$refs.quotationTable.setCurrentRow(this.dataList[0])
// this.refreshCurrentTabTable() //加载当前的页签的table
this.quotationClickRow(this.dataList[0])
}
}
this.dataListLoading = false
})
},
/**
* 获取询价结果列表
*/
getQuotationResult() {
let tempData = {
site: this.$store.state.user.site,
quotationNo: this.quotationCurrentRow.quotationNo
}
// 询价结果对象
quotationResultSearch(tempData).then(({data}) => {
if (data && data.code === 0) {
this.quotationResultData = data.rows[0]
} else {
this.quotationResultData = {}
}
})
// 附件列表
this.getFileContentData()
},
/**
* 获取项目信息
*/
getProjectInformation() {
let tempData = {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
projectId: this.quotationCurrentRow.projectId,
page: this.pageIndex,
limit: this.pageSize
}
// 询价结果对象
getProjectInformation(tempData).then(({data}) => {
if (data && data.code === 0) {
this.projectInformationData = data.page.list[0]
this.projectInformationData.projectManagerName = this.projectInformationData.projectManager.split('-')[1]
this.projectInformationData.projectOwnerName = this.projectInformationData.projectOwner.split('-')[1]
this.projectInformationData.engineerName = this.projectInformationData.engineer.split('-')[1]
this.projectInformationData.cQualityEngineer1Name = this.projectInformationData.cQualityEngineer1.split('-')[1]
this.projectInformationData.cQualityEngineer2Name = this.projectInformationData.cQualityEngineer2.split('-')[1]
this.projectInformationData.cQualityEngineer3Name = this.projectInformationData.cQualityEngineer3.split('-')[1]
this.projectInformationData.cManufactureEngineerName = this.projectInformationData.cManufactureEngineer.split('-')[1]
} else {
this.projectInformationData = {}
}
})
},
/**
* 获取客户信息
*/
getCustomerInformation() {
let tempData = {
site: this.$store.state.user.site,
customerNo: this.quotationCurrentRow.customerNo
}
// 询价结果对象
getCustomerInformation(tempData).then(({data}) => {
if (data && data.code === 0) {
this.customerInformationData = data.rows[0]
} else {
this.customerInformationData = {}
}
})
},
// ======== 新增/编辑模态框 ========
/**
* 询价信息新增模态框
*/
addModal() {
this.modalData = {
flag: '1',
title: '询价新增',
site: this.$store.state.user.site,
quotationNo: '',
customerNo: '',
customerDesc: '',
deliveryTerms: '',
sourcing:'',
quoteType: '',
projectId: '',
projectNo: '',
projectDesc: '',
finalCustomerId: '',
finalCustomerName: '',
tracker: '',
trackerName: '',
quoter: '',
quoterName: '',
customerQuoteNo: '',
quotationStatus: '草稿',
projectPartId: '',
testPartNo: '',
partDesc: '',
priorityLevel: '',
requiredCompletionDate: '',
remark: '',
technicalConsiderations: '',
customerResponsiblePerson: '',
customerResponsiblePersonPhone: '',
nextToDo: '',
actualityQuotationDate: '',
quotationResultInformation: '',
actualitySubmissionDate: '',
submissionMethod: '',
submissionRemark: '',
actualityReplyDate: '',
confirmResults: '',
confirmBy: '',
confirmInformation: '',
quotationResultStatus: 'B',
createBy: this.$store.state.user.name
}
this.modalDisableFlag = false
this.modalFlag = true
},
/**
* 询价信息编辑模态框
* @param row
*/
async updateModal(row) {
this.modalData = {
flag: '2',
title: '询价编辑-' + row.quotationNo,
deliveryTerms: row.deliveryTerms,
quoteType: row.quoteType,
site: row.site,
quotationNo: row.quotationNo,
customerNo: row.customerNo,
customerDesc: row.customerDesc,
projectId: row.projectId,
projectNo: row.projectNo,
projectDesc: row.projectDesc,
finalCustomerId: row.finalCustomerId,
finalCustomerName: row.finalCustomerName,
projectManager: row.projectManager,
projectManagerName: row.projectManagerName,
projectOwner: row.projectOwner,
projectOwnerName: row.projectOwnerName,
quoter: row.quoter,
sourcing:row.sourcing,
quoterName: row.quoterName,
customerQuoteNo: row.customerQuoteNo,
quotationStatus: row.quotationStatus,
projectPartId: row.projectPartId,
testPartNo: row.testPartNo,
partDesc: row.partDesc,
priorityLevel: row.priorityLevel,
requiredCompletionDate: row.requiredCompletionDate,
remark: row.remark,
technicalConsiderations: row.technicalConsiderations,
customerResponsiblePerson: row.customerResponsiblePerson,
customerResponsiblePersonPhone: row.customerResponsiblePersonPhone,
nextToDo: row.nextToDo,
actualityQuotationDate: row.actualityQuotationDate,
quotationResultInformation: row.quotationResultInformation,
actualitySubmissionDate: row.actualitySubmissionDate,
submissionMethod: row.submissionMethod,
submissionRemark: row.submissionRemark,
actualityReplyDate: row.actualityReplyDate,
confirmResults: row.confirmResults,
confirmBy: row.confirmBy,
confirmInformation: row.confirmInformation,
quotationResultStatus: row.quotationResultStatus,
updateBy: this.$store.state.user.name,
quotationAmount:row.quotationAmount,
nodeConclusion: '',
stepId: row.stepId,
rejectFlag: row.rejectFlag,
rejectStepId: row.rejectStepId,
isReject: row.isReject
}
this.modalDisableFlag = true
this.modalFlag = true
},
// ======== 新增/编辑/删除方法 ========
/**
* 获取产品列表
*/
getProjectPartList() {
if (!this.modalData.projectNo) {
this.$message.warning("请选择项目编码!")
return
}
// 先清空缓存选中
this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
// 拿到选中的产品编号
let projectPartList = this.modalData.testPartNo.split(';')
// 获得查询
this.projectPartData.projectId = this.modalData.projectId;
this.projectPartData.projectPartId = this.modalData.projectPartId;
this.projectPartData.limit = this.pageSize;
this.projectPartData.page = this.pageIndex;
// 查询所有产品
getProjectPartList(this.projectPartData).then(({data}) => {
if (data && data.code === 0) {
this.projectPartList = data.page.list
this.projectPartList.forEach((item) => {
item.projectManagerName = item.projectManager.split('-')[1]
item.projectOwnerName = item.projectOwner.split('-')[1]
item.engineerName = item.engineer.split('-')[1]
item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
})
this.projectPartList.forEach(val => {
// 回显选中的产品
if (projectPartList.includes(val.testPartNo)) {
this.$nextTick(() => this.$refs.projectPartTable.toggleRowSelection(val, true))
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
/**
* 确认多选产品
*/
confirmProjectPart() {
if (this.projectPartListSelections.length === 0) {
// 先清空缓存选中
this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
// 拿到选中的产品编号
this.modalData.projectPartId = ''
this.modalData.testPartNo = ''
this.modalData.partDesc = ''
return
}
this.modalData.projectPartId = ''
this.modalData.testPartNo = ''
this.modalData.partDesc = ''
this.modalData.projectPartIds = []
for (let i = 0; i < this.projectPartListSelections.length; i++) {
this.modalData.projectPartIds.push(this.projectPartListSelections[i].projectPartId)
this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
this.modalData.partDesc = this.modalData.partDesc + ";" + this.projectPartListSelections[i].partDesc
}
this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
this.modalData.partDesc = this.modalData.partDesc.substring(1)
},
/**
* 客户信息新增/编辑
*/
saveData() {
this.$refs.saveDataForm.validate((valid) => {
if (!valid) {
if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
this.$message.warning('请选择客户编码!')
return
}
if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
this.$message.warning('请选择客户名称!')
return
}
if (this.modalData.projectNo === '' || this.modalData.projectNo == null) {
this.$message.warning('请选择项目编码!')
return
}
if (this.modalData.projectDesc === '' || this.modalData.projectDesc== null) {
this.$message.warning('请选择项目名称!')
return
}
if (this.modalData.quoter === '' || this.modalData.quoter == null) {
this.$message.warning('请选择询价专员编码!')
return
}
if (this.modalData.quoterName === '' || this.modalData.quoterName == null) {
this.$message.warning('请选择询价专员名称!')
return
}
if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
this.$message.warning('请选择优先等级!')
return
}
if (this.modalData.requiredCompletionDate === '' || this.modalData.requiredCompletionDate == null) {
this.$message.warning('请输入要求完成日期!')
return
}
if (this.modalData.deliveryTerms === '' || this.modalData.deliveryTerms == null) {
this.$message.warning('请选择Delivery Terms!')
return
}
if (this.modalData.quoteType === '' || this.modalData.quoteType == null) {
this.$message.warning('请选择Quote Type!')
return
}
} else {
if (this.projectPartListSelections.length === 0) {
this.$message.warning('请选择物料信息!')
return
}
this.confirmProjectPart();
if (this.modalData.flag === '1') {
quotationInformationSave(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else {
quotationInformationEdit(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
}
})
},
/**
* 询价信息删除
*/
delModal() {
if (this.quotationSelections.length === 0) {
this.$message.warning('请勾选要删除的询价信息!')
return
}
// 遍历this.quotationSelections.quotationStatus
for (let i = 0; i < this.quotationSelections.length; i++) {
if (this.quotationSelections[i].quotationStatus !== '草稿') {
this.$message.warning('只能删除草稿状态的询价信息!')
return
}
}
this.$confirm(`是否删除这 ` + this.quotationSelections.length + ` 条询价信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
informationList: this.quotationSelections
}
quotationInformationDelete(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.quotationSelections = []
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
// ======== 列表操作方法 ========
/**
* 单机选中询价信息
* @param row
*/
quotationClickRow(row) {
// this.$refs.quotationTable.toggleRowSelection(row)
this.quotationCurrentRow = JSON.parse(JSON.stringify(row))
this.quotationDetailData = row;
},
getPriceCheckProperties() {
let params = {
site: this.quotationCurrentRow.site,
quotationNo: this.quotationCurrentRow.quotationNo
}
getPriceCheckPropertiesList(params).then(({data}) => {
if (data && data.code === 0) {
this.priceCheckPropertiesList = data.rows
} else {
this.$message.warning(data.msg)
}
}).catch((error) => {
this.$message.error(error)
})
},
/**
* 复选询价信息
* @param val
*/
selectionQuotation(val) {
this.quotationSelections = val
this.$refs.selectDiv.setLengthselected(this.quotationSelections.length)
},
// ======== 询价结果相关方法 ========
/**
* 封装录入方法
*/
packQuotationResultModal() {
// 重置对象
this.enterResultData = {
site: this.$store.state.user.site,
quotationNo: '',
actualityQuotationDate: new Date(),
quotationResultInformation: '',
quotationResultStatus: 'E',
fileContentList: [],
updateBy: this.$store.state.user.name
}
// 获得选中的询价号
// if (this.quotationSelections.length > 0) {
// this.quotationSelections.forEach(val => {
// this.enterResultData.quotationNo += ';' + val.quotationNo
// })
// this.enterResultData.quotationNo = this.enterResultData.quotationNo.substring(1)
// } else {
// this.enterResultData.quotationNo = this.quotationCurrentRow.quotationNo
// }
this.enterResultData.quotationNo = this.quotationCurrentRow.quotationNo
// // 获得这些询价号的全部附件
// this.getFileContentList()
this.enterResultModalFlag = true
},
/**
* 录入询价结果
*/
quotationResultModal() {
// // 如果有选中询价单
// if (this.quotationSelections != null && this.quotationSelections.length > 0) {
// let tempData = {
// currentStatus: 'C',
// informationList: this.quotationSelections,
// }
// // 检查询价单状态
// checkQuotationStatus(tempData).then(({data}) => {
// if (data && data.code === 0) {
// if (data.flag === 1) { // 状态一致
// this.packQuotationResultModal()
// } else { // 状态不同
// this.$message.warning('选中的询价单进度有误,请确认!')
// }
// } else {
// this.$alert(data.msg, '错误', {
// confirmButtonText: '确定'
// })
// }
// })
// } else { // 没有选中询价单,则根据当前点击行询价单操作
// this.packQuotationResultModal()
// }
this.packQuotationResultModal()
},
/**
* 保存询价结果
*/
saveQuotationResult() {
if (this.enterResultData.actualityQuotationDate === '' || this.enterResultData.actualityQuotationDate == null) {
this.$message.warning('请选择实际询价日期!')
return
}
if (this.enterResultData.quotationResultInformation === '' || this.enterResultData.quotationResultInformation == null) {
this.$message.warning('请填写询价结果信息!')
return
}
// if (this.quotationSelections.length > 1) {
// this.$confirm(`是否录入多条询价结果?`, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// saveQuotationResult(this.enterResultData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.enterResultModalFlag = false
// this.$message({
// message: '操作成功',
// type: 'success',
// duration: 1500,
// onClose: () => {
// }
// })
// } else {
// this.$alert(data.msg, '错误', {
// confirmButtonText: '确定'
// })
// }
// })
// }).catch(() => {
// })
// } else {
saveQuotationResult(this.enterResultData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.enterResultModalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
// }
},
/**
* 封装提交方法
*/
packSubmitQuotationModal() {
this.submitResultData = {
site: this.$store.state.user.site,
quotationNo: '',
actualitySubmissionDate: new Date(),
submissionMethod: '',
submissionRemark: '',
quotationResultStatus: 'S',
updateBy: this.$store.state.user.name
}
// 获得选中的询价号
// if (this.quotationSelections.length > 0) {
// this.quotationSelections.forEach(val => {
// this.submitResultData.quotationNo += ';' + val.quotationNo
// })
// this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
// } else {
// this.submitResultData.quotationNo = this.quotationCurrentRow.quotationNo
// }
this.submitResultData.quotationNo = this.quotationCurrentRow.quotationNo
this.submitResultModalFlag = true
},
/**
* 提交客户询价
*/
submitQuotationModal() {
// // 如果有选中询价单
// if (this.quotationSelections != null && this.quotationSelections.length > 0) {
// let tempData = {
// currentStatus: 'E',
// informationList: this.quotationSelections,
// }
// // 检查询价单状态
// checkQuotationStatus(tempData).then(({data}) => {
// if (data && data.code === 0) {
// if (data.flag === 1) { // 状态一致
// this.packSubmitQuotationModal()
// } else { // 状态不同
// this.$message.warning('选中的询价单进度有误,请确认!')
// }
// } else {
// this.$alert(data.msg, '错误', {
// confirmButtonText: '确定'
// })
// }
// })
// } else { // 没有选中询价单,则根据当前点击行询价单操作
// this.packSubmitQuotationModal()
// }
this.packSubmitQuotationModal()
},
/**
* 保存提交结果
*/
saveSubmitResult() {
if (this.submitResultData.actualitySubmissionDate === '' || this.submitResultData.actualitySubmissionDate == null) {
this.$message.warning('请选择实际提交客户日期!')
return
}
if (this.submitResultData.submissionMethod === '' || this.submitResultData.submissionMethod == null) {
this.$message.warning('请选择提交方式!')
return
}
// if (this.quotationSelections.length > 1) {
// this.$confirm(`是否提交多条客户询价?`, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// saveSubmitResult(this.submitResultData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.submitResultModalFlag = false
// this.$message({
// message: '操作成功',
// type: 'success',
// duration: 1500,
// onClose: () => {
// }
// })
// } else {
// this.$alert(data.msg, '错误', {
// confirmButtonText: '确定'
// })
// }
// })
// }).catch(() => {
// })
// } else {
saveSubmitResult(this.submitResultData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.submitResultModalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
// }
},
/**
* 封装回复方法
*/
packCustomerResponseModal() {
this.customerResponseData = {
site: this.$store.state.user.site,
quotationNo: '',
actualityReplyDate: new Date(),
confirmResults: '接受',
confirmBy: '',
confirmInformation: '',
quotationResultStatus: 'R',
updateBy: this.$store.state.user.name
}
// 获得选中的询价号
// if (this.quotationSelections.length > 0) {
// this.quotationSelections.forEach(val => {
// this.customerResponseData.quotationNo += ';' + val.quotationNo
// })
// this.customerResponseData.quotationNo = this.customerResponseData.quotationNo.substring(1)
// } else {
// this.customerResponseData.quotationNo = this.quotationCurrentRow.quotationNo
// }
this.customerResponseData.quotationNo = this.quotationCurrentRow.quotationNo
this.customerResponseModalFlag = true
},
/**
* 客户回复
*/
customerResponseModal() {
// // 如果有选中询价单
// if (this.quotationSelections != null && this.quotationSelections.length > 0) {
// let tempData = {
// currentStatus: 'S',
// informationList: this.quotationSelections,
// }
// // 检查询价单状态
// checkQuotationStatus(tempData).then(({data}) => {
// if (data && data.code === 0) {
// if (data.flag === 1) { // 状态一致
// this.packCustomerResponseModal()
// } else { // 状态不同
// this.$message.warning('选中的询价单进度有误,请确认!')
// }
// } else {
// this.$alert(data.msg, '错误', {
// confirmButtonText: '确定'
// })
// }
// })
// } else { // 没有选中询价单,则根据当前点击行询价单操作
// this.packCustomerResponseModal()
// }
this.packCustomerResponseModal()
},
/**
* 保存客户回复
*/
saveCustomerResponse() {
if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
this.$message.warning('请选择实际回复日期!')
return
}
if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
this.$message.warning('请选择客户确认结果!')
return
}
if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
this.$message.warning('请填写客户确认人!')
return
}
// if (this.quotationSelections.length > 1) {
// this.$confirm(`是否提交多条客户回复?`, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// saveCustomerResponse(this.customerResponseData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.customerResponseModalFlag = false
// this.$message({
// message: '操作成功',
// type: 'success',
// duration: 1500,
// onClose: () => {
// }
// })
// } else {
// this.$alert(data.msg, '错误', {
// confirmButtonText: '确定'
// })
// }
// })
// }).catch(() => {
// })
// } else {
saveCustomerResponse(this.customerResponseData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.customerResponseModalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
// }
},
customerNoBlur(){
let params = {
customerNo: this.modalData.customerNo,
createBy: this.$store.state.user.name,
}
queryCustomerList(params).then(({data}) => {
if (data && data.code === 0) {
if (data.rows.length === 1){
this.modalData.customerDesc = data.rows[0].customerDesc
}else {
this.modalData.projectNo = ''
this.modalData.projectDesc = ''
this.modalData.customerDesc = ''
}
}else {
this.$message.warning(data.message)
}
}).catch((error) => {
this.$message.error(error)
})
},
projectNoBlur(){
let params = {
projectNo: this.modalData.projectNo,
customerNo: this.modalData.customerNo,
createBy: this.$store.state.user.name,
buId: this.modalData.buId,
}
queryProjectList(params).then(({data})=>{
if (data && data.code === 0) {
if (data.rows.length === 1) {
this.modalData.projectDesc = data.rows[0].projectDesc
this.modalData.projectId = data.rows[0].projectId
this.modalData.finalCustomerId = data.rows[0].finalCustomerId
this.modalData.finalCustomerName = data.rows[0].finalCustomerName
this.modalData.projectManagerName = data.rows[0].projectManager.split('-')[1]
this.modalData.projectOwnerName = data.rows[0].projectOwner.split('-')[1]
this.getProjectPartList()
}else {
this.modalData.projectDesc = ''
this.modalData.finalCustomerId = ''
this.modalData.finalCustomerName = ''
}
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
// ======== 询价单附件的相关方法 ========
/**
* 获取询价单附件列表
*/
getFileContentData() {
let currentData = {
orderRef1: this.$store.state.user.site,
orderRef2: this.quotationCurrentRow.quotationNo
}
getFileContentList(currentData).then(({data}) => {
if (data && data.code === 0) {
this.fileContentList = data.rows
} else {
this.fileContentList = []
}
})
},
// /**
// * 获得这些询价号的全部附件
// */
// getFileContentList () {
// let currentData = {
// orderRef1: this.$store.state.user.site,
// orderRef2: this.enterResultData.quotationNo
// }
// getFileContentList(currentData).then(({data}) => {
// if (data && data.code === 0) {
// this.enterResultData.fileContentList = data.rows
// } else {
// this.enterResultData.fileContentList = []
// }
// })
// },
/**
* 上传文件
*/
uploadFile() {
let currentData = {
titleCon: '询价附件上传',
site: this.$store.state.user.site,
createBy: this.$store.state.user.name,
quotationNo: this.enterResultData.quotationNo,
fileRemark: '',
folder: 'quotationFile',
// options: []
}
// let num = 0
// let arr = this.enterResultData.quotationNo.split(';')
// arr.forEach(val => {
// currentData.options.push({key: num++, value: val})
// })
//打开组件 去做新增业务
this.$nextTick(() => {
this.$refs.quotationUploadFile.init(currentData);
})
},
/**
* 文件删除
* @param row
*/
deleteFile(row) {
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteQuotationFile(row).then(({data}) => {
if (data && data.code === 0) {
this.getFileContentList();
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
/**
* 文件下载
* @param row
*/
downloadFile(row) {
downLoadQuotationFile(row).then(({data}) => {
// 不限制文件下载类型
const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'})
// 下载文件名称
const fileName = row.fileName
// a标签下载
const linkNode = document.createElement('a')
linkNode.download = fileName // a标签的download属性规定下载文件的名称
linkNode.style.display = 'none'
linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
document.body.appendChild(linkNode)
linkNode.click() // 模拟在按钮上的一次鼠标单击
URL.revokeObjectURL(linkNode.href) // 释放URL 对象
document.body.removeChild(linkNode)
})
},
// 双击选择负责人
getContactData(row) {
this.modalData.customerResponsiblePerson = row.contactName
this.modalData.customerResponsiblePersonPhone = row.contactPhoneNumber1
this.contactModelFlag = false
},
/**
* 获取该客户的客户负责人
*/
getCustomerContactList() {
let tempData = {
site: this.$store.state.user.site,
customerNo: this.modalData.customerNo
}
customerContactSearch(tempData).then(({data}) => {
if (data && data.code === 0) {
this.contactList = data.rows
this.contactModelFlag = true
} else {
this.contactList = []
}
});
},
// ======== chooseList相关方法 ========
/**
* 获取基础数据列表S
* @param val
* @param type
*/
getBaseList(val, type) {
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
let conSql = ''
if (val === 509) {
if (type === 1) {
strVal = this.modalData.customerNo
}
}
if (val === 103) {
if (type === 1) {
strVal = this.modalData.tracker
}
if (type === 2) {
strVal = this.modalData.quoter
}
}
if (val === 104) {
if (type === 1) {
strVal = this.modalData.projectNo
}
}
if (val === 2000) {
strVal = this.modalData.trackerName
conSql = " and b.site = '" + this.$store.state.user.site + "'"
}
if (val === 2002) {
strVal = this.modalData.quoterName
conSql = " and b.site = '" + this.$store.state.user.site + "'"
}
this.$refs.baseList.init(val, strVal, conSql)
})
},
/**
* 列表方法的回调
* @param val
*/
getBaseData(val) {
if (this.tagNo === 509) {
if (this.tagNo1 === 1) {
if (val.customer_no === this.modalData.customerNo) {
return
}
this.modalData.customerNo = val.customer_no
this.modalData.customerDesc = val.customer_desc
this.modalData.projectNo = ''
this.modalData.projectDesc = ''
this.projectPartList = []
}
}
if (this.tagNo === 103) {
if (this.tagNo1 === 1) {
this.modalData.tracker = val.username
this.modalData.trackerName = val.user_display
}
if (this.tagNo1 === 2) {
this.modalData.quoter = val.username
this.modalData.quoterName = val.user_display
}
}
if (this.tagNo === 104) {
if (this.tagNo1 === 1) {
this.modalData.projectId = val.project_id
this.modalData.projectNo = val.project_no
this.modalData.projectDesc = val.project_desc
}
}
if (this.tagNo === 2000) {
this.modalData.tracker = val.username
this.modalData.trackerName = val.user_display
}
if (this.tagNo === 2002) {
this.modalData.quoter = val.username
this.modalData.quoterName = val.user_display
}
},
// ======== 导出相关方法 ========
/**
* 导出excel
*/
async createExportData() {
this.searchData.limit = -1
this.searchData.page = 1
await quotationInformationSearch(this.searchData).then(({data}) => {
this.resultList = data.page.list
// 遍历dataList 取-后的值
this.resultList.forEach((item) => {
item.projectManagerName = item.projectManager.split('-')[1]
item.projectOwnerName = item.projectOwner.split('-')[1]
})
})
return this.resultList
},
startDownload() {
},
finishDownload() {
},
fields() {
let json = '{'
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
} else {
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
}
})
json += '}'
let s = eval('(' + json + ')')
return s
},
// ======== 导入相关方法 ========
handleImportQuotation() {
let currentData = {
createBy: this.$store.state.user.name,
site: this.$store.state.user.site,
}
//打开组件 去做新增业务
this.$nextTick(() => {
this.$refs.quotationUpload.init(currentData)
})
},
// 保存弹框关闭事件
closeSaveDataDialog() {
this.activeTab='part';
this.$refs.saveDataForm.resetFields(); // 先清空缓存选中
this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
// 拿到选中的产品编号
this.modalData.projectPartId = ''
this.modalData.testPartNo = ''
this.modalData.partDesc = ''
this.projectPartData = {
site: this.$store.state.user.site,
projectId: '',
projectPartId: '',
testPartNo: '',
partDesc: '',
projectNo: '',
}
},
// 保存弹框打开事件
openSaveDataDialog() {
if (!this.modalData.projectNo) {
this.projectPartList = [];
return
}
this.getProjectPartList()
},
// 查询searchProjectInfoList
searchProjectInfoList() {
this.projectList = [];
this.searchProjectData.customerNo = this.modalData.customerNo
this.searchProjectData.userName = this.$store.state.user.name
this.searchProjectData.page = 1
this.searchProjectData.limit = 20
searchProjectInfoList(this.searchProjectData).then(({data}) => {
if (data && data.code === 0) {
this.projectList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
// 遍历dataList
this.projectList.forEach((item) => {
item.projectManagerName = item.projectManager.split('-')[1]
item.projectOwnerName = item.projectOwner.split('-')[1]
item.engineerName = item.engineer.split('-')[1]
item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
})
} else {
this.projectList = []
}
}).catch((error) => {
this.$message.error('查询项目信息失败')
})
},
closeProjectInfoDialog() {
this.$refs.closeProjectInfoForm.resetFields();
this.searchProjectData = {
site: this.$store.state.user.site,
projectId: undefined,
projectNo: undefined,
projectDesc: undefined,
customerNo: undefined,
}
},
projectClickRow(row) {
console.log(row)
this.modalData.projectId = row.projectId
this.modalData.projectNo = row.projectNo
this.modalData.projectDesc = row.projectDesc
this.modalData.projectManagerName = row.projectManagerName
this.modalData.projectOwnerName = row.projectOwnerName
this.modalData.finalCustomerId = row.finalCustomerId
this.modalData.finalCustomerName = row.finalCustomerName
console.log(this.modalData)
this.getProjectPartList()
this.chooseProjectListFlag = false
},
checkSelectable(row, index) {
if (this.modalData.flag === '1') {
return true
} else {
return false
}
},
rowStyle({row}) {
if (this.quotationCurrentRow.quotationNo === row.quotationNo) {
return {'background-color': '#E8F7F6', cursor: 'pointer'};
}
},
partRowStyle({row}) {
if (this.modalData.testPartNo === row.testPartNo) {
return {'background-color': '#E8F7F6', cursor: 'pointer'};
}
},
updateModalStatus(row, status) {
this.$confirm(`是否确认下达?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = JSON.parse(JSON.stringify(row))
params.quotationResultStatus = status;
params.quotationStatus = '下达';
params.userName = this.$store.state.user.name
params.menuId = this.$route.meta.menuId
quotationInformationEditStatus(params).then(({data}) => {
if (data && data.code === 0) {
this.$message.success('询价单已下达')
this.getDataList()
} else {
this.$message.warning(data.msg)
}
}).catch((error) => {
this.$message.error(error)
})
})
},
}
}
</script>
<style scoped>
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
height: 100%;
}
/deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
background-color: #17B3A3;
border-color: #17B3A3;
}
/deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
border-color: #FFF
}
/deep/ .el-form-item--medium .el-form-item__content{
height: auto;
}
</style>