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.
1490 lines
49 KiB
1490 lines
49 KiB
<template>
|
|
<div class="mod-config">
|
|
<!-- 查询条件 -->
|
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
|
|
<el-form-item :label="'BU'">
|
|
<el-select v-model="searchData.bu" placeholder="请选择" clearable style="width: 120px">
|
|
<el-option
|
|
v-for = "i in userBuList"
|
|
:key = "i.buNo"
|
|
:label = "i.buDesc"
|
|
:value = "i.buNo">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="询价单号">
|
|
<el-input v-model="searchData.rfqNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="客户编码">
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(509,2)"><a herf="#">客户编码</a></span>
|
|
<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-date-picker
|
|
style="width: 120px"
|
|
v-model="searchData.requestStartDate"
|
|
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.requestEndDate"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</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>
|
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
|
|
<el-form-item label="产品编码">
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a herf="#">产品编码</a></span>
|
|
<el-input v-model="searchData.partNo" 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="'PjM'">
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(2004,1)"><a herf="#">PjM</a></span>
|
|
<el-input v-model="searchData.requesterName" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'报价专员'">
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(2002,1)"><a herf="#">报价专员</a></span>
|
|
<el-input v-model="searchData.quoterName" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'要求报价日期'">
|
|
<el-date-picker
|
|
style="width: 120px"
|
|
v-model="searchData.requiredCompletionStartDate"
|
|
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.requiredCompletionEndDate"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item :label="'状态'">
|
|
<el-select v-model="searchData.status" style="width: 120px">
|
|
<el-option label="全部" value=""></el-option>
|
|
<el-option label="草稿" value="C"></el-option>
|
|
<el-option label="已下达" value="B"></el-option>
|
|
<el-option label="已报价" value="A"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="' '">
|
|
<el-button @click="getDataList()">查询</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="mainTable"
|
|
@row-click="inquiryPartClickRow"
|
|
@current-change="changeCurrentRow"
|
|
style="width: 100%;margin-top: 5px">
|
|
<el-table-column
|
|
v-for="(item,index) in columnList" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
: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 !== 'status' && item.columnProp !== 'priorityLevel'">
|
|
<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>
|
|
<div v-else-if="item.columnProp === 'status'">
|
|
<span v-if="!item.columnHidden">
|
|
<span v-if="scope.row.status === 'C'">草稿</span>
|
|
<span v-if="scope.row.status === 'B'">已下达</span>
|
|
<span v-if="scope.row.status === 'A'">已报价</span>
|
|
</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
|
|
style="width: 100px; height: 80px"/></span>
|
|
</div>
|
|
<div v-else-if="item.columnProp === 'priorityLevel'">
|
|
<span v-if="!item.columnHidden">
|
|
<span v-if="scope.row.priorityLevel === 'A'">普通</span>
|
|
<span v-if="scope.row.priorityLevel === ' B'">重要</span>
|
|
<span v-if="scope.row.priorityLevel === ' C'">紧急</span>
|
|
</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>
|
|
|
|
<!-- 分页插件 -->
|
|
<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-tabs style="margin-top: 0px; width: 100%; height: 100%;" v-model="activeTable" class="customer-tab" type="border-card" @tab-click="tabClick">
|
|
<!-- 询价明细 属性页签 -->
|
|
<el-tab-pane label="属性" name="inquiryPartItem">
|
|
<el-table
|
|
:height="height - 300"
|
|
:data="inquiryPartItemDataList"
|
|
border
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
v-for="(item,index) in columnItemList" :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 !== 'textValue' && item.columnProp !== 'numValue'">
|
|
<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>
|
|
<div v-else>
|
|
{{ scope.row.textValue ? scope.row.textValue : scope.row.numValue }}
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
<!-- 询价明细 详情页签 -->
|
|
<el-tab-pane label="详情" name="inquiryPartDetail">
|
|
<div style="margin-left: 10px;height: 225px">
|
|
<el-form :inline="true" label-position="top" :model="inquiryPartCurrentRow">
|
|
<el-form-item :label="'BU'">
|
|
<el-input v-model="inquiryPartCurrentRow.buDesc" readonly style="width: 70px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'客户编码'">
|
|
<el-input v-model="inquiryPartCurrentRow.customerNo" readonly style="width: 160px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'客户名称'">
|
|
<el-input v-model="inquiryPartCurrentRow.customerDesc" readonly style="width: 340px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'询价单号'">
|
|
<el-input v-model="inquiryPartCurrentRow.rfqNo" readonly style="width: 160px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'询价日期'">
|
|
<el-input v-model="inquiryPartCurrentRow.requestDate" readonly style="width: 100px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'询价数量'">
|
|
<el-input-number :controls="false" :step="0" v-model="inquiryPartCurrentRow.inquiryQty" readonly style="width: 70px"></el-input-number>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="inquiryPartCurrentRow">
|
|
<el-form-item :label="'状态'">
|
|
<el-input v-model="statusDisplay" readonly style="width: 70px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'产品编码'">
|
|
<el-input v-model="inquiryPartCurrentRow.partNo" readonly style="width: 160px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'产品描述'">
|
|
<el-input v-model="inquiryPartCurrentRow.partDesc" readonly style="width: 340px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'客户询价单号'">
|
|
<el-input v-model="inquiryPartCurrentRow.customerInquiryNo" readonly style="width: 160px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'要求报价日期'">
|
|
<el-input v-model="inquiryPartCurrentRow.requiredCompletionDate" readonly style="width: 100px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'计量单位'">
|
|
<el-input v-model="inquiryPartCurrentRow.umName" readonly style="width: 70px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="inquiryPartCurrentRow">
|
|
<el-form-item :label="'属性模版'">
|
|
<el-input v-model="inquiryPartCurrentRow.codeNo" readonly style="width: 244px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'PjM'">
|
|
<el-input v-model="inquiryPartCurrentRow.requesterName" readonly style="width: 163px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'报价专员'">
|
|
<el-input v-model="inquiryPartCurrentRow.quoterName" readonly style="width: 163px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'优先等级'">
|
|
<el-input v-model="priorityLevelDisplay" readonly style="width: 274px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="inquiryPartCurrentRow">
|
|
<el-form-item :label="'备注'">
|
|
<el-input v-model="inquiryPartCurrentRow.remark" readonly style="width: 885px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="inquiryPartCurrentRow">
|
|
<el-form-item :label="'创建人'">
|
|
<el-input v-model="inquiryPartCurrentRow.createBy" readonly style="width: 146px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'创建时间'">
|
|
<el-input v-model="inquiryPartCurrentRow.createDate" readonly style="width: 263px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'更新人'">
|
|
<el-input v-model="inquiryPartCurrentRow.updateBy" readonly style="width: 161px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'更新时间'">
|
|
<el-input v-model="inquiryPartCurrentRow.updateDate" readonly style="width: 276px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</el-tab-pane>
|
|
<!-- 询价明细 报价记录页签 -->
|
|
<el-tab-pane label="报价记录" name="inquiryPartQuotation">
|
|
<el-table
|
|
:height="height - 300"
|
|
:data="inquiryQuotationDataList"
|
|
border
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
v-for="(item,index) in columnQuotationList" :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 !== 'textValue' && item.columnProp !== 'numValue'">
|
|
<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>
|
|
<div v-else>
|
|
{{ scope.row.textValue ? scope.row.textValue : scope.row.numValue }}
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
fixed="left"
|
|
header-align="center"
|
|
align="center"
|
|
width="80"
|
|
label="操作">
|
|
<template slot-scope="scope">
|
|
<a type="text" size="small" @click="handleQuotationRequest(scope.row)">报价详情</a>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
|
|
<!-- chooseList模态框 -->
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam'
|
|
import {getSiteAndBuByUserName} from "../../../api/qc/qc";
|
|
import {searchInquiryApplicationInfo,addInquiryApplicationInfo,updateInquiryApplicationInfo,deleteInquiryApplicationInfo} from "@/api/inquiry/inquiryApplication";
|
|
import {searchInquiryDetailInfo,addInquiryDetailInfo,updateInquiryDetailInfo,deleteInquiryDetailInfo} from "@/api/inquiry/inquiryDetail";
|
|
import {getItemListByInquiryPartAndCodeNo,updateInquiryPartItemList,searchInquiryDetailHeaderInfo,searchQuotationRecordInfo} from "@/api/inquiry/inquiryDetail";
|
|
import DictDataSelect from "../sys/dict-data-select.vue";
|
|
import OssComponents from "../oss/ossComponents.vue";
|
|
import {queryCustomerList} from "@/api/customer/customer";
|
|
import {verifyData} from "@/api/part/partInformation";
|
|
import {EventBus} from "../../../main";
|
|
import TableColumn from "../../common/table.vue";
|
|
|
|
export default {
|
|
components: {
|
|
TableColumn,
|
|
DictDataSelect,
|
|
Chooselist,
|
|
OssComponents
|
|
},
|
|
computed: {
|
|
statusDisplay() {
|
|
return this.inquiryPartCurrentRow.status === 'C' ? '草稿' : (this.inquiryPartCurrentRow.status === 'B' ? '已下达' : '已报价')
|
|
},
|
|
priorityLevelDisplay() {
|
|
return this.inquiryPartCurrentRow.priorityLevel === 'A' ? '普通' : (this.inquiryPartCurrentRow.priorityLevel === ' B' ? '重要' : '紧急')
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
// 导出
|
|
exportData: [],
|
|
exportName: '询价明细' + this.dayjs().format('YYYYMMDDHHmmss'),
|
|
exportHeader: ['询价明细'],
|
|
exportFooter: [],
|
|
resultList: [],
|
|
userBuList: [],
|
|
// ======== 分页 ========
|
|
pageIndex: 1,
|
|
pageSize: 50,
|
|
totalPage: 0,
|
|
height: 200,
|
|
// 条件查询
|
|
searchData: {
|
|
site: this.$store.state.user.site,
|
|
customerNo: '',
|
|
customerDesc: '',
|
|
id: '',
|
|
rfqNo: '',
|
|
bu: '',
|
|
requestStartDate: '',
|
|
requestEndDate: '',
|
|
requiredCompletionStartDate: '',
|
|
requiredCompletionEndDate: '',
|
|
status: '',
|
|
quoterName: '',
|
|
requesterName: '',
|
|
priorityLevel: '',
|
|
partNo: '',
|
|
partDesc: '',
|
|
page: 1,
|
|
limit: 10,
|
|
menuId: this.$route.meta.menuId,
|
|
},
|
|
// 初始页签
|
|
activeTable: 'inquiryPartItem',
|
|
// ======== 数据列表 ========
|
|
dataList: [],
|
|
inquiryPartItemDataList: [],
|
|
inquiryQuotationDataList: [],
|
|
// ======== 列表表头 ========
|
|
columnList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 102001,
|
|
serialNumber: '102001Table1BuDesc',
|
|
tableId: '102001Table1',
|
|
tableName: '询价信息表',
|
|
columnProp: 'buDesc',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'BU',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 102001,
|
|
serialNumber: '102001Table1rfqNo',
|
|
tableId: '102001Table1',
|
|
tableName: '询价信息表',
|
|
columnProp: 'rfqNo',
|
|
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: '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: '102001Table1RequestDate',
|
|
tableId: '102001Table1',
|
|
tableName: '询价信息表',
|
|
columnProp: 'requestDate',
|
|
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: '102001Table1RequesterName',
|
|
tableId: '102001Table1',
|
|
tableName: '询价信息表',
|
|
columnProp: 'requesterName',
|
|
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: '102001Table1RequiredCompletionDate',
|
|
tableId: '102001Table1',
|
|
tableName: '询价信息表',
|
|
columnProp: 'requiredCompletionDate',
|
|
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: '102001Table1CustomerInquiryNo',
|
|
tableId: '102001Table1',
|
|
tableName: '询价信息表',
|
|
columnProp: 'customerInquiryNo',
|
|
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: '102001Table2PartNo',
|
|
tableId: '102001Table2',
|
|
tableName: '询价产品表',
|
|
columnProp: 'partNo',
|
|
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: '102001Table2PartDesc',
|
|
tableId: '102001Table2',
|
|
tableName: '询价产品表',
|
|
columnProp: 'partDesc',
|
|
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: '102001Table1Status',
|
|
tableId: '102001Table1',
|
|
tableName: '询价信息表',
|
|
columnProp: 'status',
|
|
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: '102001Table2InquiryQty',
|
|
tableId: '102001Table2',
|
|
tableName: '询价产品表',
|
|
columnProp: 'inquiryQty',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '询价数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 102001,
|
|
serialNumber: '102001Table2Unit',
|
|
tableId: '102001Table2',
|
|
tableName: '询价产品表',
|
|
columnProp: 'umName',
|
|
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: '102001Table2CodeNo',
|
|
tableId: '102001Table2',
|
|
tableName: '询价产品表',
|
|
columnProp: 'codeNo',
|
|
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: '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: '102001Table2Remark',
|
|
tableId: '102001Table2',
|
|
tableName: '询价产品表',
|
|
columnProp: 'remark',
|
|
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: '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
|
|
}
|
|
],
|
|
columnItemList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 601006,
|
|
serialNumber: '601006Table3ItemID',
|
|
tableId: "601006Table3",
|
|
tableName: "物料属性表",
|
|
columnProp: 'itemNo',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '属性编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 601006,
|
|
serialNumber: '601006Table3PropertiesItemDesc',
|
|
tableId: "601006Table3",
|
|
tableName: "物料属性表",
|
|
columnProp: 'itemDesc',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: '属性名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 601006,
|
|
serialNumber: '601006Table3ValueType',
|
|
tableId: "601006Table3",
|
|
tableName: "物料属性表",
|
|
columnProp: 'valueType',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '属性类型',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 601006,
|
|
serialNumber: '601006Table3ValueChooseFlag',
|
|
tableId: "601006Table3",
|
|
tableName: "物料属性表",
|
|
columnProp: 'textValue',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: '属性值',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
// {
|
|
// userId: this.$store.state.user.name,
|
|
// functionId: 601006,
|
|
// serialNumber: '601006Table3ValueChooseFlag',
|
|
// tableId: "601006Table3",
|
|
// tableName: "物料属性表",
|
|
// columnProp: 'numValue',
|
|
// headerAlign: "center",
|
|
// align: "center",
|
|
// columnLabel: '数字值',
|
|
// columnHidden: false,
|
|
// columnImage: false,
|
|
// status: true,
|
|
// fixed: '',
|
|
// columnWidth: 70,
|
|
// },
|
|
],
|
|
columnQuotationList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 5011,
|
|
serialNumber: '5011Table1BuDesc',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'buDesc',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'BU',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 5011,
|
|
serialNumber: '5011Table1QuoteVersionNo',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'quoteVersionNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '报价单号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 180
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 5011,
|
|
serialNumber: '5011Table1QuoteDate',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'quoteDate',
|
|
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: 5011,
|
|
serialNumber: '5011Table1CustomerNo',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'customerNo',
|
|
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: 5011,
|
|
serialNumber: '5011Table1CustomerDesc',
|
|
tableId: '5011Table1',
|
|
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: 5011,
|
|
serialNumber: '5011Table1QuoterName',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'quoterName',
|
|
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: 5011,
|
|
serialNumber: '5011Table1PurchaseName',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'purchaseName',
|
|
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: 5011,
|
|
serialNumber: '5011Table1Currency',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'currency',
|
|
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: 5011,
|
|
serialNumber: '5011Table1Status',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'status',
|
|
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: 5011,
|
|
serialNumber: '5011Table1CustomerInquiryNo',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'customerInquiryNo',
|
|
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: 5011,
|
|
serialNumber: '5011Table1InsideInquiryNo',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'insideInquiryNo',
|
|
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: 5011,
|
|
serialNumber: '5011Table1CreateBy',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'createBy',
|
|
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: 5011,
|
|
serialNumber: '5011Table1CreateDate',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'createDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '创建时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 130
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 5011,
|
|
serialNumber: '5011Table1UpdateBy',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'updateBy',
|
|
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: 5011,
|
|
serialNumber: '5011Table1UpdateDate',
|
|
tableId: '5011Table1',
|
|
tableName: '报价信息表',
|
|
columnProp: 'updateDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '更新时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 130
|
|
},
|
|
],
|
|
// ======== 选中的当前行数据 ========
|
|
inquiryPartCurrentRow: {},
|
|
}
|
|
},
|
|
|
|
mounted() {
|
|
this.$nextTick(() => {
|
|
/*第二个表格高度的动态调整*/
|
|
this.height = window.innerHeight - 210;
|
|
})
|
|
EventBus.$on('updateInquiryPartInfo', () => {
|
|
this.getDataList();
|
|
});
|
|
},
|
|
|
|
created() {
|
|
this.getSiteAndBuByUserName()
|
|
this.getDataList()
|
|
},
|
|
|
|
activated() {
|
|
console.log(this.$route.query.id)
|
|
if (this.$route.query.id) {
|
|
this.getDataList(this.$route.query.id);
|
|
this.activeTable = 'inquiryPartDetail';
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
// 获取用户的bu
|
|
getSiteAndBuByUserName() {
|
|
let tempData = {
|
|
username: this.$store.state.user.name,
|
|
}
|
|
getSiteAndBuByUserName(tempData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.userBuList = data.rows
|
|
}
|
|
})
|
|
},
|
|
// ======== 分页相关方法 ========
|
|
/**
|
|
* 每页数
|
|
* @param val
|
|
*/
|
|
sizeChangeHandle(val) {
|
|
this.pageSize = val
|
|
this.pageIndex = 1
|
|
this.getDataList()
|
|
},
|
|
/**
|
|
* 当前页
|
|
* @param val
|
|
*/
|
|
currentChangeHandle(val) {
|
|
this.pageIndex = val
|
|
this.getDataList()
|
|
},
|
|
|
|
|
|
// ======== 页签切换相关方法 ========
|
|
/**
|
|
* 列表表格选择替换
|
|
* @param tab
|
|
* @param event
|
|
*/
|
|
tabClick(tab, event) {
|
|
// 刷新列表数据
|
|
this.refreshCurrentTabTable()
|
|
},
|
|
|
|
// ======== 列表操作方法 ========
|
|
/**
|
|
* 单机选中询价信息
|
|
* @param row
|
|
*/
|
|
inquiryPartClickRow(row) {
|
|
this.inquiryPartCurrentRow = JSON.parse(JSON.stringify(row))
|
|
},
|
|
/**
|
|
* 当前值发生变化的时候修改
|
|
* @param row
|
|
* @param oldRow
|
|
*/
|
|
changeCurrentRow(row, oldRow) {
|
|
// 判断是否是获取焦点的事件
|
|
if (row) {
|
|
this.inquiryPartCurrentRow = JSON.parse(JSON.stringify(row))
|
|
//刷新当前页表
|
|
this.refreshCurrentTabTable()
|
|
}
|
|
},
|
|
/**
|
|
* 刷新页签的table数据
|
|
*/
|
|
refreshCurrentTabTable() {
|
|
if (this.activeTable === 'inquiryPartItem') {
|
|
this.getItemListByInquiryPartAndCodeNo()
|
|
}
|
|
if (this.activeTable === 'inquiryPartQuotation') {
|
|
this.getQuotationDataList()
|
|
}
|
|
},
|
|
|
|
// ======== chooseList相关方法 ========
|
|
/**
|
|
* 获取基础数据列表S
|
|
* @param val
|
|
* @param type
|
|
*/
|
|
getBaseList(val, type) {
|
|
this.tagNo = val
|
|
this.tagNo1 = type
|
|
this.$nextTick(() => {
|
|
let strVal = ''
|
|
let conSql = ''
|
|
if (val === 220) {
|
|
strVal = this.inquiryPartModalData.codeNo ? this.inquiryPartModalData.codeNo : ''
|
|
conSql = " and function_type = 'PRICECHECK'" + " and site = '" + this.inquiryPartModalData.bu.split('_')[0] + "'" +
|
|
" and bu_no = '" + this.inquiryPartModalData.bu.split('_')[1] + "'"
|
|
}
|
|
if (val === 509) {
|
|
if (type === 1) {
|
|
strVal = this.modalData.customerNo ? this.modalData.customerNo : ''
|
|
}
|
|
if (type === 2) {
|
|
strVal = this.searchData.customerNo ? this.searchData.customerNo : ''
|
|
}
|
|
}
|
|
if (val === 510) {
|
|
strVal = this.inquiryPartModalData.umId ? this.inquiryPartModalData.umId : ''
|
|
conSql = " and site = '" + this.inquiryPartModalData.bu.split('_')[0] + "'"
|
|
}
|
|
if (val === 2002) {
|
|
if (type === 1) {
|
|
strVal = this.searchData.quoterName ? this.searchData.quoterName : ''
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
if (type === 2) {
|
|
strVal = this.modalData.quoterName ? this.modalData.quoterName : ''
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
}
|
|
if (val === 2004) {
|
|
if (type === 1) {
|
|
strVal = this.searchData.requesterName ? this.searchData.requesterName : ''
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
if (type === 2) {
|
|
strVal = this.modalData.requesterName ? this.modalData.requesterName : ''
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
}
|
|
if (val === 2005) {
|
|
strVal = this.searchData.partNo ? this.searchData.partNo : ''
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
this.$refs.baseList.init(val, strVal, conSql)
|
|
})
|
|
},
|
|
/**
|
|
* 列表方法的回调
|
|
* @param val
|
|
*/
|
|
getBaseData(val) {
|
|
console.log(val)
|
|
if (this.tagNo === 220) {
|
|
this.inquiryPartModalData.codeNo = val.code_no
|
|
this.inquiryPartModalData.codeDesc = val.code_desc
|
|
}
|
|
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
|
|
}
|
|
if (this.tagNo1 === 2) {
|
|
if (val.customer_no === this.searchData.customerNo) {
|
|
return
|
|
}
|
|
this.searchData.customerNo = val.customer_no
|
|
}
|
|
}
|
|
if (this.tagNo === 510) {
|
|
this.inquiryPartModalData.umId = val.UMID
|
|
this.inquiryPartModalData.umName = val.UMName
|
|
}
|
|
if (this.tagNo === 2002) {
|
|
if (this.tagNo1 === 1) {
|
|
this.searchData.quoter = val.username
|
|
this.searchData.quoterName = val.user_display
|
|
}
|
|
if (this.tagNo1 === 2) {
|
|
this.modalData.quoter = val.username
|
|
this.modalData.quoterName = val.user_display
|
|
}
|
|
}
|
|
if (this.tagNo === 2004) {
|
|
if (this.tagNo1 === 1) {
|
|
this.searchData.requester = val.username
|
|
this.searchData.requesterName = val.user_display
|
|
}
|
|
if (this.tagNo1 === 2) {
|
|
this.modalData.requester = val.username
|
|
this.modalData.requesterName = val.user_display
|
|
}
|
|
}
|
|
if (this.tagNo === 2005) {
|
|
this.searchData.partNo = val.part_no
|
|
}
|
|
},
|
|
|
|
// ======== 列表数据刷新方法 ========
|
|
/**
|
|
* 获取数据列表
|
|
*/
|
|
getDataList(id) {
|
|
if (id) {
|
|
this.searchData.id = id
|
|
} else {
|
|
this.searchData.id = ''
|
|
}
|
|
this.searchData.limit = this.pageSize
|
|
this.searchData.page = this.pageIndex
|
|
searchInquiryDetailHeaderInfo(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
|
|
//判断是否全部存在数据
|
|
if (this.totalPage > 0) {
|
|
//设置选中行
|
|
this.$refs.mainTable.setCurrentRow(this.dataList[0])
|
|
this.inquiryPartClickRow(this.dataList[0])
|
|
this.refreshCurrentTabTable() //加载当前的页签的table
|
|
}
|
|
}
|
|
})
|
|
},
|
|
|
|
async getItemListByInquiryPartAndCodeNo() {
|
|
let inData = this.inquiryPartCurrentRow
|
|
inData.inquiryPartId = inData.id
|
|
inData.recordType = 'PRICECHECK'
|
|
return getItemListByInquiryPartAndCodeNo(inData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.inquiryPartItemDataList = data.rows;
|
|
} else {
|
|
this.$message.warning(data.msg)
|
|
}
|
|
}).catch((error) => {
|
|
this.$message.error(error)
|
|
})
|
|
},
|
|
|
|
getQuotationDataList(){
|
|
let inData = {
|
|
site : this.inquiryPartCurrentRow.site,
|
|
rfqNo : this.inquiryPartCurrentRow.rfqNo,
|
|
testPartId : this.inquiryPartCurrentRow.testPartId
|
|
}
|
|
searchQuotationRecordInfo(inData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.inquiryQuotationDataList = data.rows;
|
|
} else {
|
|
this.$message.warning(data.msg)
|
|
}
|
|
}).catch((error) => {
|
|
this.$message.error(error)
|
|
})
|
|
},
|
|
|
|
handleQuotationRequest(row) {
|
|
// 创建一个array
|
|
let ids = [row.id]
|
|
this.$router.push({
|
|
name:'quote-index',
|
|
params:{
|
|
ids:ids
|
|
}
|
|
})
|
|
},
|
|
|
|
rowStyle({row}) {
|
|
if (this.inquiryPartCurrentRow.id === row.id) {
|
|
return {'background-color': '#E8F7F6', cursor: 'pointer'};
|
|
}
|
|
},
|
|
|
|
// ======== 导出相关方法 ========
|
|
/**
|
|
* 导出excel
|
|
*/
|
|
async createExportData() {
|
|
this.searchData.limit = -1
|
|
this.searchData.page = 1
|
|
await searchInquiryDetailHeaderInfo(this.searchData).then(({data}) => {
|
|
this.resultList = data.page.list
|
|
// 遍历dataList 取-后的值
|
|
this.resultList.forEach((item) => {
|
|
if (item.status === 'A') {
|
|
item.status = '已报价'
|
|
} else if (item.status === 'B') {
|
|
item.status = '已下达'
|
|
} else if (item.status === 'C') {
|
|
item.status = '草稿'
|
|
}
|
|
if (item.priorityLevel === 'A') {
|
|
item.priorityLevel = '普通'
|
|
} else if (item.priorityLevel === ' B') {
|
|
item.priorityLevel = '重要'
|
|
} else if (item.priorityLevel === ' C') {
|
|
item.priorityLevel = '紧急'
|
|
}
|
|
})
|
|
})
|
|
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
|
|
},
|
|
}
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
/deep/ .customer-tab .el-tabs__content {
|
|
padding: 0px !important;
|
|
}
|
|
.el-table /deep/ .cell{
|
|
height: auto;
|
|
line-height: 1.5;
|
|
}
|
|
.el-input-number /deep/ .el-input__inner {
|
|
text-align: right;
|
|
padding-right: 5px !important;
|
|
}
|
|
</style>
|