1945 lines
83 KiB
Vue
1945 lines
83 KiB
Vue
<template>
|
||
<div class="app-container">
|
||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||
<el-form-item label="询价单号" prop="quotCode">
|
||
<el-input
|
||
v-model="queryParams.quotCode"
|
||
placeholder="请输入询价单号"
|
||
clearable
|
||
@keyup.enter.native="handleQuery"
|
||
/>
|
||
</el-form-item>
|
||
<el-form-item label="客户名称" prop="quotCustomerName">
|
||
<el-input
|
||
v-model="queryParams.quotCustomerName"
|
||
placeholder="请输入客户名称"
|
||
clearable
|
||
@keyup.enter.native="handleQuery"
|
||
/>
|
||
</el-form-item>
|
||
<el-form-item label="项目名称" prop="quotProject">
|
||
<el-input
|
||
v-model="queryParams.quotProject"
|
||
placeholder="请输入项目名称"
|
||
clearable
|
||
@keyup.enter.native="handleQuery"
|
||
/>
|
||
</el-form-item>
|
||
<el-form-item label="报价要求" prop="quotQuotationRequire" v-if="checkRole(['SALES_MAN'])">
|
||
<el-input
|
||
v-model="queryParams.quotQuotationRequire"
|
||
placeholder="请输入报价要求"
|
||
clearable
|
||
@keyup.enter.native="handleQuery"
|
||
/>
|
||
</el-form-item>
|
||
<el-form-item label="业务员" prop="quotSalesmanName" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-input
|
||
v-model="queryParams.quotSalesmanName"
|
||
placeholder="请输入业务员"
|
||
clearable
|
||
@keyup.enter.native="handleQuery"
|
||
/>
|
||
</el-form-item>
|
||
<el-form-item label="是否打印" prop="quotPrint" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-select v-model="queryParams.quotPrint" placeholder="请选择打印状态" clearable>
|
||
<el-option
|
||
v-for="dict in dict.type.quot_print"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="提交状态" prop="quotApprovalStatus">
|
||
<el-select v-model="queryParams.quotApprovalStatus" placeholder="请选择提交状态" clearable>
|
||
<el-option
|
||
v-for="dict in dict.type.quot_approval_status"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="OA提交状态" prop="quotOAApprovalStatus" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-select v-model="queryParams.quotOAApprovalStatus" placeholder="请选择提交状态" clearable>
|
||
<el-option
|
||
v-for="dict in dict.type.quot_oa_approval_status"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item>
|
||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||
</el-form-item>
|
||
</el-form>
|
||
|
||
<el-row :gutter="10" class="mb8">
|
||
<el-col :span="1.5">
|
||
<el-button
|
||
type="primary"
|
||
plain
|
||
icon="el-icon-plus"
|
||
size="mini"
|
||
@click="handleAdd"
|
||
v-hasPermi="['quot:quot:add']"
|
||
>新增</el-button>
|
||
</el-col>
|
||
<el-col :span="1.5">
|
||
<el-button
|
||
type="success"
|
||
plain
|
||
icon="el-icon-edit"
|
||
size="mini"
|
||
:disabled="single"
|
||
@click="handleUpdate"
|
||
v-hasPermi="['quot:quot:edit']"
|
||
>修改</el-button>
|
||
</el-col>
|
||
<el-col :span="1.5">
|
||
<el-button
|
||
type="danger"
|
||
plain
|
||
icon="el-icon-delete"
|
||
size="mini"
|
||
:disabled="multiple"
|
||
@click="handleDelete"
|
||
v-hasPermi="['quot:quot:remove']"
|
||
>删除</el-button>
|
||
</el-col>
|
||
<el-col :span="1.5">
|
||
<el-button
|
||
type="warning"
|
||
plain
|
||
icon="el-icon-download"
|
||
size="mini"
|
||
@click="handleExport"
|
||
v-hasPermi="['quot:quot:export']"
|
||
>导出</el-button>
|
||
</el-col>
|
||
<el-col :span="1.5">
|
||
<el-button
|
||
type="warning"
|
||
plain
|
||
icon="el-icon-edit"
|
||
size="mini"
|
||
:disabled="single"
|
||
@click="handleReturnUpdate"
|
||
v-hasPermi="['quot:quot:returnUpdate']"
|
||
>错误修订</el-button>
|
||
</el-col>
|
||
<el-col :span="1.5">
|
||
<el-button
|
||
type="warning"
|
||
plain
|
||
icon="el-icon-edit"
|
||
size="mini"
|
||
:disabled="multiple"
|
||
@click="handleAllPass"
|
||
v-hasPermi="['quot:quot:allPass']"
|
||
>整单通过</el-button>
|
||
</el-col>
|
||
<el-col :span="1.5">
|
||
<el-button
|
||
type="warning"
|
||
plain
|
||
icon="el-icon-edit"
|
||
size="mini"
|
||
:disabled="single"
|
||
@click="handleAllReject"
|
||
v-hasPermi="['quot:quot:allReject']"
|
||
>整单驳回</el-button>
|
||
</el-col>
|
||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||
</el-row>
|
||
|
||
<el-table v-loading="loading" :data="quotList" @selection-change="handleSelectionChange">
|
||
<el-table-column type="selection" width="55" align="center" />
|
||
<el-table-column label="报价单ID" align="center" prop="quotId" v-if="false"/>
|
||
<el-table-column fixed label="询价单号" align="center" prop="quotCode" width="250px">
|
||
<template slot-scope="scope">
|
||
<el-link :underline="false" type="primary" @click="handleUpdate(scope.row)">{{scope.row.quotCode}}</el-link>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column fixed label="提交状态" align="center" prop="quotApprovalStatus">
|
||
<template slot-scope="scope">
|
||
<dict-tag :options="dict.type.quot_approval_status" :value="scope.row.quotApprovalStatus"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="处理状态" align="center" prop="quotHandle" v-if="checkRole(['SALES_MAN'])">
|
||
<template slot-scope="scope">
|
||
<dict-tag :options="dict.type.quot_fkfile_handle" :value="scope.row.quotHandle"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="是否打印" align="center" prop="quotPrint" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')">
|
||
<template slot-scope="scope">
|
||
<el-switch
|
||
v-model="scope.row.quotPrint"
|
||
active-value="0"
|
||
inactive-value="1"
|
||
@change="handleStatusChange(scope.row)"
|
||
:disabled="scope.row.quotPrint=='0'"
|
||
></el-switch>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="打印人" align="center" prop="quotPrintUserNickName" width="150px" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')"/>
|
||
<el-table-column label="OA提交状态" align="center" prop="quotOAApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])">
|
||
<template slot-scope="scope">
|
||
<dict-tag :options="dict.type.quot_oa_approval_status" :value="scope.row.quotOAApprovalStatus" v-if="scope.row.quotOAApprovalStatus!=0"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="OA审批说明" align="center" prop="quotOAApprovalStatusRemark" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])"/>
|
||
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
|
||
<el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
|
||
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
|
||
<el-table-column label="报价要求" align="center" prop="quotQuotationRequire" width="250px"/>
|
||
<el-table-column label="金思维提交状态" align="center" prop="quotJswApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<template slot-scope="scope">
|
||
<dict-tag :options="dict.type.quot_jsw_approval_status" :value="scope.row.quotJswApprovalStatus" v-if="scope.row.quotJswApprovalStatus!=0"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="技术协助状态" align="center" prop="quotJsxzApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<template slot-scope="scope">
|
||
<dict-tag :options="dict.type.quot_jsxz_approval_status" :value="scope.row.quotJsxzApprovalStatus" v-if="scope.row.quotJsxzApprovalStatus!=0"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="核价协助状态" align="center" prop="quotHjApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<template slot-scope="scope">
|
||
<dict-tag :options="dict.type.quot_hj_approval_status" :value="scope.row.quotHjApprovalStatus" v-if="scope.row.quotHjApprovalStatus!=0"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="金思维报价单号" align="center" prop="quotJswCode" width="280px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])"/>
|
||
<el-table-column label="询价日期" align="center" prop="quotInquiryDate" width="160">
|
||
<template slot-scope="scope">
|
||
<span>{{ parseTime(scope.row.quotInquiryDate) }}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="报价日期" align="center" prop="quotQuotationDate" width="160">
|
||
<template slot-scope="scope">
|
||
<span>{{ parseTime(scope.row.quotQuotationDate) }}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="明细条数" align="center" prop="quotMaterialsCount" width="100"/>
|
||
<el-table-column label="反馈说明" align="center" prop="quotFeedbackExplanation" width="150px"/>
|
||
<el-table-column label="创建人" align="center" prop="createName" width="150px"/>
|
||
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
||
<template slot-scope="scope">
|
||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="审核人" align="center" prop="quotCheckUserNickname" />
|
||
</el-table>
|
||
|
||
<pagination
|
||
v-show="total>0"
|
||
:total="total"
|
||
:page.sync="queryParams.pageNum"
|
||
:limit.sync="queryParams.pageSize"
|
||
@pagination="getList"
|
||
/>
|
||
|
||
<!-- 添加或修改报价对话框 -->
|
||
<el-dialog :visible.sync="open" width="1050px" v-el-drag-dialog append-to-body>
|
||
<template slot="title">
|
||
报价单信息<span style="color:red;margin-left:25px">(注:此报价单数据,型号规格电压等如需下单或签订合同引用,请再次自行核对,责任自负)</span>
|
||
</template>
|
||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||
<el-divider content-position="left" class="customer_divider_text">当前协助情况</el-divider>
|
||
<el-row>
|
||
<el-col :span="4">
|
||
<el-form-item label="提交状态" prop="quotApprovalStatus">
|
||
<dict-tag :options="dict.type.quot_approval_status" :value="this.form.quotApprovalStatus"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<div v-if="checkPermi(['quot:quot:xzInfo'])">
|
||
<el-col :span="4" v-if="!checkRole(['SALES_MAN'])">
|
||
<el-form-item label="技术协助" prop="quotJsxzApprovalStatus">
|
||
<dict-tag :options="dict.type.quot_approval_status" :value="this.form.quotJsxzApprovalStatus"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="4" v-if="!checkRole(['SALES_MAN'])">
|
||
<el-form-item label="核价协助" prop="quotHjApprovalStatus">
|
||
<dict-tag :options="dict.type.quot_approval_status" :value="this.form.quotHjApprovalStatus"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="4" v-if="!checkRole(['SALES_MAN'])">
|
||
<el-form-item label="金思维协助" prop="quotJswApprovalStatus">
|
||
<dict-tag :options="dict.type.quot_jsw_approval_status" :value="this.form.quotJswApprovalStatus"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="4">
|
||
<el-form-item label="OA审批" prop="quotOAApprovalStatus">
|
||
<dict-tag :options="dict.type.quot_oa_approval_status" :value="this.form.quotOAApprovalStatus"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</div>
|
||
</el-row>
|
||
|
||
<el-divider content-position="left" class="customer_divider_text">报价信息</el-divider>
|
||
<el-row :gutter="8">
|
||
<el-col :span="8">
|
||
<el-form-item label="询价单号" prop="quotCode">
|
||
<el-input v-model="form.quotCode" placeholder="系统自动生成" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="业务员" prop="quotSalesmanName">
|
||
<el-input v-model="form.quotSalesmanName" :disabled="true" style="width: 60%"/>
|
||
<el-input v-model="form.quotSalesmanBm" v-if="false"/>
|
||
<el-input v-model="form.quotSalesmanCode" v-if="false"/>
|
||
|
||
<el-button type="primary" icon="el-icon-search" style="margin-left: 10px" @click="openPeopleSelect" size="mini" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])"></el-button>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="所属部门" prop="quotSalesmanDeptName">
|
||
<el-input v-model="form.quotSalesmanDeptName" :disabled="true"/>
|
||
<el-input v-model="form.quotSalesmanDeptId" v-if="false"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="16">
|
||
<el-form-item label="客户" prop="quotCustomerName">
|
||
<el-input v-model="form.quotCustomerBm" v-if="false"/>
|
||
<el-input v-model="form.quotCustomerName" placeholder="请输入客户" :disabled="true">
|
||
<el-button slot="append" icon="el-icon-search" @click="openCustomer" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null"></el-button>
|
||
</el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="联系电话" prop="quotPhone">
|
||
<el-input v-model="form.quotPhone" placeholder="请输入联系电话" :disabled="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="8">
|
||
<el-form-item label="询价日期" prop="quotInquiryDate">
|
||
<div class="el-p" style="width:100%">
|
||
<el-date-picker
|
||
style="width:100%"
|
||
v-model="form.quotInquiryDate"
|
||
type="datetime"
|
||
placeholder="系统自动生成"
|
||
:disabled="true">
|
||
</el-date-picker>
|
||
</div>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="16">
|
||
<el-form-item label="地址" prop="quotAddress">
|
||
<el-input type="textarea" autosize v-model="form.quotAddress" placeholder="请输入地址" :disabled="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="8">
|
||
<el-form-item label="报价日期" prop="quotQuotationDate">
|
||
<div class="el-p" style="width:100%">
|
||
<el-date-picker
|
||
style="width:100%"
|
||
v-model="form.quotQuotationDate"
|
||
type="datetime"
|
||
placeholder="系统自动生成"
|
||
:disabled="true">
|
||
</el-date-picker>
|
||
</div>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="16">
|
||
<el-form-item label="项目名称" prop="quotProject">
|
||
<el-input type="textarea" autosize v-model="form.quotProject" placeholder="请输入项目名称" :disabled="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="24">
|
||
<el-form-item label="报价要求" prop="quotQuotationRequire">
|
||
<el-input type="textarea" autosize v-model="form.quotQuotationRequire" placeholder="请输入报价要求" :disabled="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8" v-if="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null">
|
||
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-form-item label="明细条数" prop="quotMaterialsCount">
|
||
<el-input v-model="form.quotMaterialsCount" :disabled="form.quotApprovalStatus == '2' || form.quotApprovalStatus == '3'"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-form-item label="总价" prop="quotTotalPrice">
|
||
<el-input v-model="form.quotTotalPrice" :disabled="form.quotApprovalStatus == '2' || form.quotApprovalStatus == '3'"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-form-item label="是否打印" prop="quotPrint">
|
||
<el-select v-model="form.quotPrint" :disabled="true">
|
||
<el-option
|
||
v-for="dict in dict.type.quot_print"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-form-item label="打印人" prop="quotPrintUserNickName">
|
||
<el-input v-model="form.quotPrintUserNickName" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-form-item label="总数量" prop="quotQuantity">
|
||
<el-input v-model="form.quotQuantity" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-form-item label="铜价" prop="quotTongPrice">
|
||
<el-input v-model="form.quotTongPrice" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-form-item label="铝价" prop="quotLvPrice">
|
||
<el-input v-model="form.quotLvPrice" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6" v-if="checkRole(['QUOT_MAT_PRICE_DIFF'])">
|
||
<el-form-item label="整单料价价差率" prop="quotMatpriceDiff">
|
||
<el-input v-model="form.quotMatpriceDiff" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION','QUOT_MAT_PRICE_DIFF'])">
|
||
<el-form-item label="整单料价价差率2" prop="quotMatpriceDiff2">
|
||
<el-input v-model="form.quotMatpriceDiff2"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])">
|
||
<el-col :span="14" v-if="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null">
|
||
<el-form-item label="反馈说明" prop="quotFeedbackExplanation">
|
||
<el-input type="textarea" autosize v-model="form.quotFeedbackExplanation" placeholder="报价组填写" :disabled="this.form.quotApprovalStatus == 2"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="10" v-if="this.form.quotOAApprovalStatus == '2' || this.form.quotOAApprovalStatus == '3'">
|
||
<el-form-item label="OA审批说明" prop="quotOAApprovalStatusRemark">
|
||
<el-input type="textarea" autosize v-model="form.quotOAApprovalStatusRemark" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
<el-divider content-position="left" class="customer_divider_text">清单附件(先保存再上传且必须是EXCEL文件)</el-divider>
|
||
<div v-hasPermi="['quot:quot:quotXjFile']">
|
||
<el-row :gutter="10" class="mb8">
|
||
<el-col :span="1.5">
|
||
<el-upload class="upload-demo"
|
||
ref="quotXjFileUpload"
|
||
name="quotFile"
|
||
:action="uploadUrl"
|
||
:headers="headers"
|
||
:data="{ relation_id: this.form.quotId,file_type: 'quotXjFile' }"
|
||
:before-upload="beforeAvatarUploadQuotXjFile"
|
||
:on-success="handleAvatarSuccess"
|
||
:show-file-list="false"
|
||
:limit="1"
|
||
v-if="this.form.quotApprovalStatus == '0'">
|
||
<el-button size="mini" type="primary" @click="uploadFile('quotXjFile')">上传文件</el-button>
|
||
</el-upload>
|
||
</el-col>
|
||
<el-col :span="1.5">
|
||
<el-button type="info" plain icon="el-icon-download" size="mini" @click="importTemplate">清单附件模版下载</el-button>
|
||
</el-col>
|
||
</el-row>
|
||
</div>
|
||
<el-table class="down" v-loading="quotXjFileLoading" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
|
||
<el-table-column prop="fileName" label="文件名称" ></el-table-column>
|
||
<el-table-column prop="fileSize" label="文件大小" width="150px">
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
|
||
<span v-else>{{(scope.row.fileSize / 1024 / 1024).toFixed(2) + 'MB'}}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="fileTime" label="上传时间" width="200px"></el-table-column>
|
||
<el-table-column width="150px" label="操作">
|
||
<template slot-scope="scope">
|
||
<el-button :key="Math.random()" size="small" type="text">
|
||
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
|
||
</el-button>
|
||
<el-button :key="Math.random()" size="small" type="text" v-if="form.quotApprovalStatus == '0'">
|
||
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
|
||
</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
|
||
<el-divider content-position="left" class="customer_divider_text">技术附件(先保存再上传,如包含清单附件则不受理)</el-divider>
|
||
<div v-hasPermi="['quot:quot:quotJsgfFile']">
|
||
<el-upload class="upload-demo"
|
||
ref="quotJsgfFileUpload"
|
||
name="quotFile"
|
||
:action="uploadUrl"
|
||
:headers="headers"
|
||
:data="{ relation_id: this.form.quotId,file_type: 'quotJsgfFile' }"
|
||
:before-upload="beforeAvatarUploadQuotJsgfFile"
|
||
:on-success="handleAvatarSuccess"
|
||
:show-file-list="false"
|
||
:limit="1"
|
||
v-if="this.form.quotApprovalStatus == '0'">
|
||
<el-button size="mini" type="primary" @click="uploadFile('quotJsgfFile')">上传文件</el-button>
|
||
</el-upload>
|
||
</div>
|
||
<el-table class="down" v-loading="quotJsgfFileLoading" :data="quotJsgfFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
|
||
<el-table-column prop="fileName" label="文件名称" ></el-table-column>
|
||
<el-table-column prop="fileSize" label="文件大小" width="150px">
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
|
||
<span v-else>{{(scope.row.fileSize / 1024 / 1024).toFixed(2) + 'MB'}}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="fileTime" label="上传时间" width="200px"></el-table-column>
|
||
<el-table-column width="150px" label="操作">
|
||
<template slot-scope="scope">
|
||
<el-button :key="Math.random()" size="small" type="text">
|
||
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
|
||
</el-button>
|
||
<el-button :key="Math.random()" size="small" type="text" v-if="form.quotApprovalStatus == '0'">
|
||
<a @click="deleteFile(scope.row.fileId,'quotJsgfFile')">删除</a>
|
||
</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
|
||
<el-divider content-position="left" class="customer_divider_text">产品信息</el-divider>
|
||
<el-row :gutter="10" class="mb8">
|
||
<!--<el-col :span="1.5">
|
||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddQuotMaterial" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">添加</el-button>
|
||
</el-col>
|
||
<el-col :span="1.5">
|
||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">删除</el-button>
|
||
</el-col>-->
|
||
<!-- <el-col :span="1.5">
|
||
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport" v-if="(this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null) || checkRole(['QUOT','PRICE_VERIFICATION'])">导入</el-button>
|
||
</el-col>-->
|
||
<el-col :span="1.5" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
|
||
</el-col>
|
||
<el-col :span="1.5" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleExportMaterial">导出</el-button>
|
||
</el-col>
|
||
</el-row>
|
||
<el-table :data="quotMaterialList" height="300px" show-summary :summary-method="getSummaries" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial">
|
||
<el-table-column type="selection" width="80" align="center" />
|
||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||
<el-table-column label="型号" prop="matXingh" width="180">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matXingh" placeholder="型号" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="规格" prop="matGuig" width="150">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matGuig" placeholder="规格" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="电压" prop="matDiany" width="130">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matDiany" placeholder="电压" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="单位" prop="matDanw" width="100">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matDanw" placeholder="单位" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="数量" prop="matSl" width="100">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matSl" placeholder="数量" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="备注" prop="matRemark" width="180">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matRemark" placeholder="备注" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="料单价" prop="matMatprice" v-if="checkRole(['QUOT_MAT_PRICE_DIFF'])" width="130">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matMatprice" :disabled="true"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="红本单价" prop="matPrice" v-if="checkRole(['QUOT','PRICE_VERIFICATION','QUOT_MAT_PRICE_DIFF'])" width="130">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matPrice" :disabled="true"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="特批下点" prop="matQuotTp" v-if="checkRole(['QUOT','PRICE_VERIFICATION','QUOT_MAT_PRICE_DIFF'])" width="100">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matQuotTp" :disabled="true"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="报价单价" prop="matQuotPrice" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN','QUOT_MAT_PRICE_DIFF'])" width="130">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matQuotPrice" :disabled="true"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="报价小计" prop="matQuotAllPrice" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN','QUOT_MAT_PRICE_DIFF'])" width="130">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matQuotAllPrice" :disabled="true"/>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="毛利率" prop="matMatpriceDiff" v-if="checkRole(['QUOT_MAT_PRICE_DIFF'])" width="130">
|
||
<template slot-scope="scope">
|
||
<el-input v-model="scope.row.matMatpriceDiff" :disabled="true"/>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
|
||
<el-divider content-position="left" class="customer_divider_text">反馈附件</el-divider>
|
||
<div v-hasPermi="['quot:quot:quotFkFile']" >
|
||
<el-upload class="upload-demo"
|
||
ref="quotFkFileUpload"
|
||
name="quotFile"
|
||
:action="uploadUrl"
|
||
:headers="headers"
|
||
:data="{ relation_id: this.form.quotId,file_type: 'quotFkFile' }"
|
||
:before-upload="beforeAvatarUploadQuotFkFile"
|
||
:on-success="handleAvatarSuccess"
|
||
:show-file-list="false"
|
||
:limit="1"
|
||
v-if="this.form.quotApprovalStatus == '1'">
|
||
<el-button size="mini" type="primary" @click="uploadFile('quotFkFile')">上传文件</el-button>
|
||
</el-upload>
|
||
</div>
|
||
<el-table class="down" v-loading="quotFkFileLoading" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
|
||
<el-table-column prop="fileName" label="文件名称"></el-table-column>
|
||
<el-table-column prop="fileSize" label="文件大小" width="150px">
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
|
||
<span v-else>{{(scope.row.fileSize / 1024 / 1024).toFixed(2) + 'MB'}}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="fileTime" label="上传时间" width="200px"></el-table-column>
|
||
<el-table-column width="150px" label="操作">
|
||
<template slot-scope="scope">
|
||
<el-button size="small" type="text">
|
||
<a @click="downloadFkFile(scope.row.fileUrl)">下载</a>
|
||
</el-button>
|
||
<el-button size="small" type="text" @click="deleteFile(scope.row.fileId,'quotFkFile')" v-if="form.quotApprovalStatus == '1'">删除</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
|
||
<!-- 技术协助块-->
|
||
<div v-if="checkPermi(['quot:quot:jsxzInfo'])">
|
||
<el-divider content-position="left" class="customer_divider_text">技术协助</el-divider>
|
||
<el-row :gutter="8">
|
||
<!--<el-col :span="8">
|
||
<el-form-item label="标准" prop="quotJsxzStandard">
|
||
<el-select v-model="form.quotJsxzStandard" :disabled="this.form.quotJsxzApprovalStatus != '0'">
|
||
<el-option
|
||
v-for="dict in dict.type.quot_jsxz_standard"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>-->
|
||
<el-col :span="8">
|
||
<el-form-item label="技术协助状态" prop="quotJsxzApprovalStatus">
|
||
<el-select v-model="form.quotJsxzApprovalStatus" :disabled="true">
|
||
<el-option
|
||
v-for="dict in dict.type.quot_jsxz_approval_status"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<!--<el-col :span="8">
|
||
<el-form-item label="是否盖技术章" prop="quotJsxzChapter">
|
||
<el-select v-model="form.quotJsxzChapter" :disabled="this.form.quotJsxzApprovalStatus != '0'">
|
||
<el-option
|
||
v-for="dict in dict.type.quot_jsxz_chapter"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>-->
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="12">
|
||
<el-form-item label="技术确认单号" prop="quotJsxzConfirmCode">
|
||
<el-link :underline="false" type="primary" @click="showJsqrDialog">{{form.quotJsxzConfirmCode}}</el-link>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="分组" prop="quotJsxzGroup">
|
||
<el-select v-model="form.quotJsxzGroup" multiple style="width: 100%" :disabled="this.form.quotJsxzApprovalStatus != '0'">
|
||
<el-option
|
||
v-for="dict in dict.type.quot_jsxz_group"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value">
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="24">
|
||
<el-form-item label="技术要求" prop="quotJsxzTechnicalRequirement">
|
||
<el-input type="textarea" autosize v-model="form.quotJsxzTechnicalRequirement" placeholder="请输入技术要求" :disabled="this.form.quotJsxzApprovalStatus != '0'"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<!--<el-row :gutter="8">
|
||
<el-col :span="24">
|
||
<el-divider content-position="center">技术规范要求(技术附件)</el-divider>
|
||
<div v-hasPermi="['quot:quot:quotJsgfFile']">
|
||
<el-upload class="upload-demo"
|
||
ref="upload"
|
||
name="quotFile"
|
||
:action="uploadUrl"
|
||
:headers="headers"
|
||
:data="{ relation_id: this.form.quotId,file_type: 'quotJsgfFile' }"
|
||
:on-success="handleAvatarSuccess"
|
||
:show-file-list="false"
|
||
:limit="1"
|
||
v-if="this.form.quotJsxzApprovalStatus == '0'">
|
||
<el-button size="small" type="primary" @click="uploadFile('quotJsgfFile')">上传文件</el-button>
|
||
</el-upload>
|
||
</div>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8" class="mt5">
|
||
<el-col :span="24">
|
||
<el-table class="down" :data="quotJsgfFileList" border stripe style="width: 100%;" height="150px">
|
||
<el-table-column prop="fileName" label="文件名称" width="450px"></el-table-column>
|
||
<el-table-column prop="fileSize" label="文件大小" width="100px">
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
|
||
<span v-else>{{(scope.row.fileSize / 1024 / 1024).toFixed(2) + 'MB'}}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="fileTime" label="上传时间"></el-table-column>
|
||
<el-table-column width="150px" label="操作">
|
||
<template slot-scope="scope">
|
||
<el-button :key="Math.random()" size="small" type="text">
|
||
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
|
||
</el-button>
|
||
<el-button :key="Math.random()" size="small" type="text" v-if="form.quotJsxzApprovalStatus == '0'">
|
||
<a @click="deleteFile(scope.row.fileId,'quotJsgfFile')">删除</a>
|
||
</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
</el-col>
|
||
</el-row>-->
|
||
<div v-if="showTl">
|
||
<el-divider content-position="center">特缆协助</el-divider>
|
||
<el-row :gutter="8">
|
||
<el-col :span="8">
|
||
<el-form-item label="特缆协助状态" prop="quotJsqrTlApprovalStatus">
|
||
<el-select v-model="form.quotJsqrTlApprovalStatus" :disabled="true">
|
||
<el-option
|
||
v-for="dict in dict.type.quot_jsxz_approval_status"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="16">
|
||
<el-form-item label="特缆反馈附件">
|
||
<el-button size="mini" type="primary" @click="handleAddFile('quotJsqrTl')">上传文件 ({{this.quotJsqrTlFileNum}})</el-button>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="24">
|
||
<el-form-item label="特缆协助说明" prop="quotJsqrTlRemark">
|
||
<el-input type="textarea" autosize v-model="form.quotJsqrTlRemark" placeholder="技术部填写" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
</div>
|
||
<div v-if="showDy">
|
||
<el-divider content-position="center">低压协助</el-divider>
|
||
<el-row :gutter="8">
|
||
<el-col :span="8">
|
||
<el-form-item label="低压协助状态" prop="quotJsqrDyApprovalStatus">
|
||
<el-select v-model="form.quotJsqrDyApprovalStatus" :disabled="true">
|
||
<el-option
|
||
v-for="dict in dict.type.quot_jsxz_approval_status"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="16">
|
||
<el-form-item label="低压反馈附件">
|
||
<el-button size="mini" type="primary" @click="handleAddFile('quotJsqrDy')">上传文件 ({{this.quotJsqrDyFileNum}})</el-button>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="24">
|
||
<el-form-item label="低压协助说明" prop="quotJsqrDyRemark">
|
||
<el-input type="textarea" autosize v-model="form.quotJsqrDyRemark" placeholder="技术部填写" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
</div>
|
||
<div v-if="showZy">
|
||
<el-divider content-position="center">中压协助</el-divider>
|
||
<el-row :gutter="8">
|
||
<el-col :span="8">
|
||
<el-form-item label="中压协助状态" prop="quotJsqrZyApprovalStatus">
|
||
<el-select v-model="form.quotJsqrZyApprovalStatus" :disabled="true">
|
||
<el-option
|
||
v-for="dict in dict.type.quot_jsxz_approval_status"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="16">
|
||
<el-form-item label="中压反馈附件">
|
||
<el-button size="mini" type="primary" @click="handleAddFile('quotJsqrZy')">上传文件 ({{this.quotJsqrZyFileNum}})</el-button>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="24">
|
||
<el-form-item label="中压协助说明" prop="quotJsqrZyRemark">
|
||
<el-input type="textarea" autosize v-model="form.quotJsqrZyRemark" placeholder="技术部填写" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
</div>
|
||
<div v-if="showQt">
|
||
<el-divider content-position="center">其他协助</el-divider>
|
||
<el-row :gutter="8">
|
||
<el-col :span="8">
|
||
<el-form-item label="其他协助状态" prop="quotJsqrQtApprovalStatus">
|
||
<el-select v-model="form.quotJsqrQtApprovalStatus" :disabled="true">
|
||
<el-option
|
||
v-for="dict in dict.type.quot_jsxz_approval_status"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="16">
|
||
<el-form-item label="其他反馈附件">
|
||
<el-button size="mini" type="primary" @click="handleAddFile('quotJsqrQt')">上传文件 ({{this.quotJsqrQtFileNum}})</el-button>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="24">
|
||
<el-form-item label="其他协助说明" prop="quotJsqrQtRemark">
|
||
<el-input type="textarea" autosize v-model="form.quotJsqrQtRemark" placeholder="技术部填写" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 核价协助块-->
|
||
<div v-if="checkPermi(['quot:quot:hjxzInfo'])">
|
||
<el-divider content-position="left" class="customer_divider_text">核价协助</el-divider>
|
||
<el-row :gutter="8">
|
||
<el-col :span="10">
|
||
<el-form-item label="核价单号" prop="quotHjCode">
|
||
<el-link :underline="false" type="primary" @click="showHjDialog">{{form.quotHjCode}}</el-link>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="8">
|
||
<el-form-item label="核价日期" prop="quotHjPricingDate">
|
||
<div class="el-p" style="width:100%">
|
||
<el-date-picker
|
||
style="width:100%"
|
||
v-model="form.quotHjPricingDate"
|
||
type="datetime"
|
||
:disabled="true">
|
||
</el-date-picker>
|
||
</div>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<el-form-item label="核价确认状态" prop="quotHjApprovalStatus">
|
||
<el-select v-model="form.quotHjApprovalStatus" :disabled="true">
|
||
<el-option
|
||
v-for="dict in dict.type.quot_hj_approval_status"
|
||
:key="dict.value"
|
||
:label="dict.label"
|
||
:value="dict.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="24">
|
||
<el-form-item label="备注" prop="quotHjRemark">
|
||
<el-input type="textarea" autosize v-model="form.quotHjRemark" :disabled="true"/>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="8">
|
||
<el-col :span="24">
|
||
<el-divider content-position="center">核价附件</el-divider>
|
||
<el-table class="down" :data="quotHjFileList" border stripe style="width: 100%;" height="150px">
|
||
<el-table-column prop="fileName" label="文件名称" width="450px"></el-table-column>
|
||
<el-table-column prop="fileSize" label="文件大小" width="100px">
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
|
||
<span v-else>{{(scope.row.fileSize / 1024 / 1024).toFixed(2) + 'MB'}}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="fileTime" label="上传时间"></el-table-column>
|
||
<el-table-column width="150px" label="操作">
|
||
<template slot-scope="scope">
|
||
<el-button :key="Math.random()" size="small" type="text">
|
||
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
|
||
</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
</el-col>
|
||
</el-row>
|
||
</div>
|
||
|
||
<!-- 特缆、中压、低压、其他协助反馈附件对话框 -->
|
||
<el-dialog custom-class="fkfjDialog" :title="addFileTitle" :visible.sync="addFileOpen" width="800px" append-to-body>
|
||
<!--<el-upload class="upload-demo"
|
||
ref="upload"
|
||
name="quotFile"
|
||
:action="uploadUrl"
|
||
:headers="headers"
|
||
:data="{ relation_id: this.form.quotJsxzConfirmId,file_type: fileType }"
|
||
:on-success="handleAvatarSuccess"
|
||
:show-file-list="false"
|
||
:limit="1"
|
||
v-if="uploadDis">
|
||
<el-button size="small" type="primary">上传文件</el-button>
|
||
</el-upload>-->
|
||
<el-table class="down" :data="quotJsqrFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
|
||
<el-table-column prop="fileName" label="文件名称" ></el-table-column>
|
||
<el-table-column prop="fileSize" label="文件大小" width="150px">
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
|
||
<span v-else>{{(scope.row.fileSize / 1024 / 1024).toFixed(2) + 'MB'}}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column prop="fileTime" label="上传时间" width="200px"></el-table-column>
|
||
<el-table-column width="150px" label="操作">
|
||
<template slot-scope="scope">
|
||
<el-button :key="Math.random()" size="small" type="text">
|
||
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
|
||
</el-button>
|
||
<!--<el-button :key="Math.random()" size="small" type="text" v-if="uploadDis">
|
||
<a @click="deleteFile(scope.row.fileId)">删除</a>
|
||
</el-button>-->
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
</el-dialog>
|
||
|
||
<PeopleSelect v-if="checkRole(['QUOT','PRICE_VERIFICATION'])" ref="peopleSelect" :type="'single'" :isCheck="true" :open="peopleOpen" @cancel="peopleOpen=false" @submit="submitPeople"></PeopleSelect>
|
||
</el-form>
|
||
<div slot="footer" class="dialog-footer">
|
||
<div style="height: 25px;">
|
||
<!-- 业务员提交保存-->
|
||
<span v-hasPermi="['quot:quot:save']"><el-button @click="saveForm" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">保 存</el-button></span>
|
||
<span style="margin-left: 10px" v-hasPermi="['quot:quot:commit']"><el-button type="primary" plain @click="commitForm" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">提 交</el-button></span>
|
||
|
||
<!-- 报价组提交技术、核价协助-->
|
||
<span v-hasPermi="['quot:quot:assist']"><el-button type="primary" plain @click="commitJsForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJsxzApprovalStatus == '0'">提交技术协助</el-button></span>
|
||
<span style="margin-left: 10px" v-hasPermi="['quot:quot:assistHj']"><el-button type="primary" plain @click="commitHjForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotHjApprovalStatus == '0'">提交核价审核</el-button></span>
|
||
|
||
<!-- 业务员、报价组生成报价单-->
|
||
<span style="float:left" v-hasPermi="['quot:quot:madeQuot']"><el-button type="warning" plain @click="madeQuot" v-if="this.form.quotApprovalStatus == '2'||!checkRole(['SALES_MAN'])">生成报价单</el-button></span>
|
||
|
||
<!-- 报价组提交金思维、OA-->
|
||
<span style="margin-left: 10px;float:left" v-hasPermi="['quot:quot:assistJsw']"><el-button type="warning" plain @click="commitJswForm" v-if="this.form.quotApprovalStatus == '1'&&(this.form.quotJswApprovalStatus == '0'||this.form.quotJswApprovalStatus == '2')">提交金思维</el-button></span>
|
||
<span style="margin-left: 10px;float:left" v-hasPermi="['quot:quot:assistOA']"><el-button type="warning" plain @click="commitOAForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotOAApprovalStatus == '0'">提交OA</el-button></span>
|
||
|
||
<!-- 报价组提交反馈、驳回报价单-->
|
||
<span style="margin-left: 10px" v-hasPermi="['quot:quot:feedback']"><el-button type="primary" plain @click="feedbackQuotForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJsxzApprovalStatus != '1'&&this.form.quotHjApprovalStatus != '1'&&this.form.quotJswApprovalStatus != '1'&&this.form.quotOAApprovalStatus != '1'">提交反馈</el-button></span>
|
||
<span style="margin-left: 10px" v-hasPermi="['quot:quot:reject']"><el-button type="danger" plain @click="rejectQuotForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJsxzApprovalStatus != '1'&&this.form.quotHjApprovalStatus != '1'&&this.form.quotJswApprovalStatus != '1'&&this.form.quotOAApprovalStatus != '1'">驳回</el-button></span>
|
||
</div>
|
||
</div>
|
||
</el-dialog>
|
||
|
||
<!-- 客户选择对话框-->
|
||
<CustomerSelect ref="customerSelect" :open="customerOpen" @submit="submitCustomer" @cancel="customerOpen=false"></CustomerSelect>
|
||
|
||
<!-- 技术确认单详情对话框 -->
|
||
<jsqrDialog ref="jsqrDialog"></jsqrDialog>
|
||
|
||
<!-- 核价单详情对话框 -->
|
||
<hjDialog ref="hjDialog"></hjDialog>
|
||
|
||
<!-- 产品导入对话框 -->
|
||
<el-dialog :title="productUpload.title" :visible.sync="productUpload.open" width="400px" append-to-body>
|
||
<el-upload
|
||
ref="productUpload"
|
||
:limit="1"
|
||
accept=".xlsx, .xls"
|
||
:headers="productUpload.headers"
|
||
:action="productUpload.url"
|
||
:disabled="productUpload.isUploading"
|
||
:on-progress="handleFileUploadProgress"
|
||
:on-success="handleFileSuccess"
|
||
:auto-upload="false"
|
||
drag
|
||
>
|
||
<i class="el-icon-upload"></i>
|
||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||
<div class="el-upload__tip text-center" slot="tip">
|
||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
||
</div>
|
||
</el-upload>
|
||
<div slot="footer" class="dialog-footer">
|
||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||
<el-button @click="productUpload.open = false">取 消</el-button>
|
||
</div>
|
||
</el-dialog>
|
||
</div>
|
||
</template>
|
||
<style>
|
||
/** 弹窗设置 */
|
||
.el-dialog__body {
|
||
padding: 10px 10px;
|
||
color: #606266;
|
||
font-size: 14px;
|
||
word-break: break-all;
|
||
overflow-y: auto; /** 自动显示垂直滚动条 */
|
||
max-height: 580px; /** 设置最大高度,根据需要调整 */
|
||
}
|
||
/** divider 文本样式 */
|
||
.customer_divider_text .el-divider__text{
|
||
color: #1890ff;
|
||
font-size: 18px;
|
||
font-weight: 600;
|
||
}
|
||
/*Tab页设置 */
|
||
.el-tabs__content {
|
||
height: 100%;
|
||
overflow-y: auto;
|
||
}
|
||
/* 日期控件宽度设置 */
|
||
:deep(.el-p .el-input__wrapper){
|
||
width: 100% !important;
|
||
}
|
||
</style>
|
||
<style>
|
||
/* 特缆、中压、低压、其他协助反馈附件对话框设置 */
|
||
.fkfjDialog .el-dialog__body{
|
||
height: 280px;
|
||
max-height: 300px; /* 设置最大高度,根据需要调整 */
|
||
}
|
||
</style>
|
||
<script>
|
||
import { NumberAdd } from '@/utils/number';// 数值计算
|
||
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot,getAllPass,getAllReject, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot, setHandle } from "@/api/quot/quot";
|
||
import { getToken } from "@/utils/auth";
|
||
import { checkPermi,checkRole } from '@/utils/permission';// 权限判断函数
|
||
import { getDicts } from "@/api/system/dict/data";
|
||
|
||
/** 导入客户选择组件 */
|
||
import CustomerSelect from "@/views/components/Tools/CustomerSelect/index.vue";
|
||
/** 导入技术确认单详情组件*/
|
||
import jsqrDialog from '@/views/technicalConfirm/technicalConfirm/jsxzInfo.vue';
|
||
/** 导入核价单详情组件*/
|
||
import hjDialog from '@/views/priceVerification/priceVerification/hjInfo.vue';
|
||
/** 导入选人组件 */
|
||
import PeopleSelect from "@/views/components/Tools/PeopleSelect/index.vue";
|
||
|
||
/** 弹窗放大、拖拽 */
|
||
import elDragDialog from "@/directive/dialog/dragDialog";
|
||
|
||
export default {
|
||
name: "Quot",
|
||
directives: {
|
||
elDragDialog,
|
||
},
|
||
components: {
|
||
// 注册组件
|
||
'CustomerSelect': CustomerSelect,
|
||
'jsqrDialog': jsqrDialog,
|
||
'hjDialog': hjDialog,
|
||
'PeopleSelect': PeopleSelect
|
||
},
|
||
dicts: ['quot_fkfile_handle','quot_print', 'quot_approval_status','quot_jsxz_group','quot_jsxz_chapter','quot_jsxz_approval_status','quot_jsxz_standard','quot_hj_approval_status','quot_jsw_approval_status','quot_oa_approval_status'],
|
||
data() {
|
||
return {
|
||
//选项卡默认
|
||
activeName: 'quotInfo',
|
||
|
||
// 遮罩层
|
||
loading: true,
|
||
// 选中数组
|
||
ids: [],
|
||
// 子表选中数据
|
||
checkedQuotMaterial: [],
|
||
// 非单个禁用
|
||
single: true,
|
||
// 非多个禁用
|
||
multiple: true,
|
||
// 显示搜索条件
|
||
showSearch: true,
|
||
// 总条数
|
||
total: 0,
|
||
// 报价表格数据
|
||
quotList: [],
|
||
// 报价单-产品表格数据
|
||
quotMaterialList: [],
|
||
// 产品表格数据导入参数
|
||
productUpload: {
|
||
// 是否显示弹出层(用户导入)
|
||
open: false,
|
||
// 弹出层标题(用户导入)
|
||
title: "",
|
||
// 是否禁用上传
|
||
isUploading: false,
|
||
// 设置上传的请求头部
|
||
headers: { Authorization: "Bearer " + getToken() },
|
||
// 上传的地址
|
||
url: process.env.VUE_APP_BASE_API + "/quot/quot/importData"
|
||
},
|
||
|
||
// 报价单-询价附件列表数据
|
||
quotXjFileLoading: false,
|
||
quotXjFileList: [],
|
||
// 报价单-反馈附件列表数据
|
||
quotFkFileLoading: false,
|
||
quotFkFileList: [],
|
||
// 报价单-技术规范附件列表数据
|
||
quotJsgfFileLoading: false,
|
||
quotJsgfFileList: [],
|
||
//报价单-询价附件上传地址
|
||
uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile",
|
||
//报价单-询价附件请求头
|
||
headers: {Authorization: "Bearer " + getToken()},
|
||
// 弹出层标题
|
||
title: "",
|
||
// 是否显示弹出层
|
||
open: false,
|
||
|
||
//是否打开客户选择组件,默认不打开
|
||
customerOpen:false,
|
||
|
||
// 技术协助反馈附件显示弹窗
|
||
addFileOpen: false,
|
||
// 技术协助反馈附件显示弹窗标题
|
||
addFileTitle: "",
|
||
// 技术协助反馈附件显示弹窗 上传按钮设置 删除设置
|
||
uploadDis: false,
|
||
// 技术协助附件表格数据
|
||
quotJsqrFileList: [],
|
||
quotJsqrTlFileNum: 0,
|
||
quotJsqrDyFileNum: 0,
|
||
quotJsqrZyFileNum: 0,
|
||
quotJsqrQtFileNum: 0,
|
||
// 核价单附件列表数据
|
||
quotHjFileList: [],
|
||
//反馈附件类别
|
||
fileType: null,
|
||
// 查询参数
|
||
queryParams: {
|
||
pageNum: 1,
|
||
pageSize: 10,
|
||
quotCode: null,
|
||
quotCustomerName: null,
|
||
quotProject: null,
|
||
quotApprovalStatus: null,
|
||
},
|
||
// 表单参数
|
||
form: {},
|
||
// 表单校验
|
||
rules: {
|
||
quotSalesmanName: [
|
||
{ required: true, message: "业务员不能为空", trigger: "blur" }
|
||
],
|
||
quotCustomerName: [
|
||
{ required: true, message: "客户名称不能为空", trigger: "blur" }
|
||
],
|
||
quotProject: [
|
||
{ required: true, message: "项目名称不能为空", trigger: "blur" }
|
||
],
|
||
quotQuotationRequire: [
|
||
{ required: true, message: "报价要求不能为空", trigger: "blur" }
|
||
],
|
||
quotMaterialsCount: [
|
||
{ required: true, message: "明细条数不能为空", trigger: "blur" }
|
||
],
|
||
quotTotalPrice: [
|
||
{ required: true, message: "总价不能为空", trigger: "blur" }
|
||
],
|
||
},
|
||
|
||
//技术协助-特缆、低压、中压、其他 隐藏控制
|
||
showTl: false,
|
||
showDy: false,
|
||
showZy: false,
|
||
showQt: false,
|
||
|
||
//是否打开选人组件,默认不打开
|
||
peopleOpen:false,
|
||
selectedPeoples:[]
|
||
};
|
||
},
|
||
created() {
|
||
const roles = this.$store.state.user.roles;
|
||
if(roles && (roles.indexOf('QUOT') !== -1 || roles.indexOf('PRICE_VERIFICATION') !== -1) && roles.indexOf('admin') == -1){//报价组默认查看待审核且按询价时间排序 单据
|
||
this.queryParams.orderByColumn = "a.quot_inquiry_date";//查询字段是表格中字段名字
|
||
this.queryParams.isAsc = "desc";//动态取值排序顺序
|
||
this.queryParams.quotApprovalStatus = '1';
|
||
}
|
||
if(roles && (roles.indexOf('SALES_MAN') !== -1 || roles.indexOf('ITZX') !== -1 || roles.indexOf('admin') !== -1)){//营销经理默认查看待提交且按创建时间排序 单据
|
||
this.queryParams.orderByColumn = "a.create_time";//查询字段是表格中字段名字
|
||
this.queryParams.isAsc = "desc";//动态取值排序顺序
|
||
//this.queryParams.quotApprovalStatus = '0';
|
||
}
|
||
this.getList();
|
||
},
|
||
methods: {
|
||
/** 打印状态修改 */
|
||
handleStatusChange(row) {
|
||
let text = row.quotPrint === "0" ? "打印" : "取消打印";
|
||
this.$modal.confirm('确认要"' + text + '"报价单:"' + row.quotCode + '"吗?').then(function() {
|
||
return changQuotPrintStatus(row.quotId, row.quotPrint);
|
||
}).then(() => {
|
||
this.$modal.msgSuccess(text + "成功");
|
||
this.getList();
|
||
}).catch(function() {
|
||
row.quotPrint = row.quotPrint === "0" ? "1" : "0";
|
||
});
|
||
},
|
||
|
||
/** 打开客户选择弹窗 */
|
||
openCustomer(){
|
||
this.customerOpen=true;
|
||
},
|
||
/** 客户选择确定按钮事件 */
|
||
submitCustomer(customer){
|
||
this.form.quotCustomerBm = customer.value;
|
||
this.form.quotCustomerName = customer.label;
|
||
this.customerOpen=false;
|
||
},
|
||
|
||
/** 清空表单 */
|
||
reset(){
|
||
this.form = {
|
||
quotCode: null,
|
||
quotSalesmanName: null,
|
||
quotSalesmanBm: null,
|
||
quotSalesmanCode: null,
|
||
quotSalesmanDeptName: null,
|
||
quotSalesmanDeptId: null,
|
||
quotCustomerBm: null,
|
||
quotCustomerName: null,
|
||
quotPhone: null,
|
||
quotAddress: null,
|
||
quotInquiryDate: null,
|
||
quotProject: null,
|
||
quotQuotationDate: null,
|
||
quotQuotationRequire: null,
|
||
quotFeedbackExplanation: null,
|
||
quotOAApprovalStatusRemark: null,
|
||
quotApprovalStatus: null,
|
||
|
||
quotPrintUserName: null,
|
||
quotPrintUserNickName: null,
|
||
quotMaterialsCount: null,
|
||
quotTongPrice: null,
|
||
quotLvPrice: null,
|
||
quotMatpriceDiff: null,
|
||
quotMatpriceDiff2: null,
|
||
|
||
quotJsxzApprovalStatus: null,
|
||
quotJsxzChapter: null,
|
||
quotJsxzConfirmCode: null,
|
||
quotJsxzGroup: null,
|
||
quotJsxzTechnicalRequirement: null,
|
||
|
||
quotJsqrTlApprovalStatus: null,
|
||
quotJsqrTlRemark: null,
|
||
|
||
quotJsqrDyApprovalStatus: null,
|
||
quotJsqrDyRemark: null,
|
||
|
||
quotJsqrZyApprovalStatus: null,
|
||
quotJsqrZyRemark: null,
|
||
|
||
quotJsqrQtApprovalStatus: null,
|
||
quotJsqrQtRemark: null,
|
||
|
||
quotHjCode: null,
|
||
quotHjPricingDate: null,
|
||
quotHjApprovalStatus: null,
|
||
|
||
quotJswApprovalStatus: null,
|
||
quotOAApprovalStatus: null
|
||
};
|
||
|
||
this.quotMaterialList = [];
|
||
this.quotXjFileList = [];
|
||
this.quotJsgfFileList = [];
|
||
this.quotHjFileList = [];
|
||
this.quotFkFileList = [];
|
||
this.quotJsqrFileList = [];
|
||
|
||
this.showTl = false;
|
||
this.showDy = false;
|
||
this.showZy = false;
|
||
this.showQt = false;
|
||
this.resetForm("form");
|
||
},
|
||
|
||
/** 查询报价列表 */
|
||
getList() {
|
||
this.loading = true;
|
||
listQuot(this.queryParams).then(response => {
|
||
this.quotList = response.rows;
|
||
this.total = response.total;
|
||
this.loading = false;
|
||
});
|
||
},
|
||
|
||
/** 搜索按钮操作 */
|
||
handleQuery() {
|
||
this.queryParams.pageNum = 1;
|
||
this.getList();
|
||
},
|
||
/** 重置按钮操作 */
|
||
resetQuery() {
|
||
this.resetForm("queryForm");
|
||
this.handleQuery();
|
||
},
|
||
/** 多选框选中数据 */
|
||
handleSelectionChange(selection) {
|
||
this.ids = selection.map(item => item.quotId)
|
||
this.single = selection.length!==1
|
||
this.multiple = !selection.length
|
||
},
|
||
/** 新增按钮操作 */
|
||
handleAdd() {
|
||
this.reset();
|
||
this.open = true;
|
||
this.activeName = "quotInfo";
|
||
this.form.quotSalesmanName = this.$store.state.user.nickName;
|
||
//this.form.quotSalesmanName = this.$store.state.user.sapUserName;
|
||
this.form.quotSalesmanBm = this.$store.state.user.sapBm;
|
||
this.form.quotSalesmanCode = this.$store.state.user.name;
|
||
this.form.quotSalesmanDeptId = this.$store.state.user.deptId;
|
||
this.form.quotSalesmanDeptName = this.$store.state.user.deptName;
|
||
},
|
||
/** 修改按钮操作 */
|
||
handleUpdate(row) {
|
||
this.reset();
|
||
const quotId = row.quotId || this.ids
|
||
getQuot(quotId).then(response => {
|
||
this.setInfo(response);
|
||
});
|
||
},
|
||
/** 错误修订按钮操作 */
|
||
handleReturnUpdate(row) {
|
||
this.reset();
|
||
const quotId = row.quotId || this.ids
|
||
this.$modal.confirm('是否确认修订所选报价单且更新状态为协助中?').then(function() {
|
||
}).then(() => {
|
||
getReturnUpdateQuot(quotId).then(response => {
|
||
this.$modal.msgSuccess("更改成功");
|
||
this.getList();
|
||
});
|
||
}).catch(() => {});
|
||
},
|
||
// 整单通过
|
||
handleAllPass(row) {
|
||
this.reset();
|
||
const quotIds = row.quotId || this.ids
|
||
this.$modal.confirm('是否确认修订所选报价单且更新状态为通过?').then(function() {
|
||
}).then(() => {
|
||
getAllPass(quotIds).then(response => {
|
||
this.$modal.msgSuccess("更改成功");
|
||
this.getList();
|
||
});
|
||
}).catch(() => {});
|
||
},
|
||
// 整单驳回
|
||
handleAllReject(row) {
|
||
this.reset();
|
||
const quotId = row.quotId || this.ids;
|
||
|
||
this.$prompt('请输入驳回原因', '是否确认修订所选报价单且更新状态为驳回?', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
inputPattern: /^.+$/,
|
||
inputErrorMessage: '驳回原因必填'
|
||
}).then(({ value }) => {
|
||
this.form = {
|
||
"quotId":quotId[0],
|
||
"quotFeedbackExplanation":value
|
||
}
|
||
getAllReject(this.form).then(response => {
|
||
this.$modal.msgSuccess("更改成功");
|
||
this.getList();
|
||
});
|
||
}).catch(() => {});
|
||
},
|
||
|
||
/** 修改按钮操作-详细信息设置 */
|
||
setInfo(response){
|
||
this.form = response.data;
|
||
this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroupValues==''||this.form.quotJsxzGroupValues==null)?[]:this.form.quotJsxzGroupValues.split(','));
|
||
|
||
//协助中状态不显示产品信息
|
||
if(checkRole(['SALES_MAN']) && !checkRole(['admin'])){
|
||
if(this.form.quotApprovalStatus!='1'){
|
||
this.quotMaterialList = response.data.quotMaterialList;
|
||
}
|
||
}else{
|
||
this.quotMaterialList = response.data.quotMaterialList;
|
||
}
|
||
|
||
this.open = true;
|
||
this.activeName = "quotInfo";
|
||
|
||
const quotJsxzGroup = this.form.quotJsxzGroupValues;
|
||
if(quotJsxzGroup){
|
||
if(quotJsxzGroup.indexOf("TL")!==-1){
|
||
this.showTl = true;
|
||
this.getQuotJsqrFileList('quotJsqrTlFkFile');
|
||
}
|
||
if(quotJsxzGroup.indexOf("DY")!==-1){
|
||
this.showDy = true;
|
||
this.getQuotJsqrFileList('quotJsqrDyFkFile');
|
||
}
|
||
if(quotJsxzGroup.indexOf("ZY")!==-1){
|
||
this.showZy = true;
|
||
this.getQuotJsqrFileList('quotJsqrZyFkFile');
|
||
}
|
||
if(quotJsxzGroup.indexOf("QT")!==-1){
|
||
this.showQt = true;
|
||
this.getQuotJsqrFileList('quotJsqrQtFkFile');
|
||
}
|
||
}
|
||
this.getQuotXjFileList();
|
||
this.getQuotJsgfFileList();
|
||
this.getQuotHjFileList();
|
||
this.getQuotFkFileList();
|
||
},
|
||
|
||
/** 产品数据导入按钮操作 */
|
||
handleImport() {
|
||
this.productUpload.title = "产品数据导入";
|
||
this.productUpload.open = true;
|
||
},
|
||
/** 产品数据导出按钮操作 */
|
||
handleExportMaterial() {
|
||
const quot = {"quotId":this.form.quotId};
|
||
this.download('quot/quot/exportMaterial', {
|
||
...quot
|
||
}, this.form.quotCode +".xlsx")
|
||
},
|
||
/** 产品数据下载模板操作 */
|
||
importTemplate() {
|
||
this.download('quot/quot/importTemplate', {
|
||
}, `product_template_${new Date().getTime()}.xlsx`)
|
||
},
|
||
/** 产品数据文件上传中处理 */
|
||
handleFileUploadProgress(event, file, fileList) {
|
||
this.productUpload.isUploading = true;
|
||
},
|
||
/** 产品数据文件上传成功处理 */
|
||
handleFileSuccess(response, file, fileList) {
|
||
this.productUpload.open = false;
|
||
this.productUpload.isUploading = false;
|
||
this.$refs.productUpload.clearFiles();
|
||
this.$message.success("产品数据导入成功!");
|
||
this.quotMaterialList = this.quotMaterialList.concat(response.data)
|
||
},
|
||
/** 产品数据提交上传文件 */
|
||
submitFileForm() {
|
||
this.$refs.productUpload.submit();
|
||
},
|
||
|
||
/** 保存报价单按钮 */
|
||
saveForm() {
|
||
this.$refs["form"].validate(valid => {
|
||
if (valid) {
|
||
this.form.quotMaterialList = this.quotMaterialList;
|
||
if (this.form.quotId != null) {
|
||
updateQuot(this.form).then(response => {
|
||
this.$modal.msgSuccess("修改成功");
|
||
this.open = false;
|
||
this.getList();
|
||
});
|
||
} else {
|
||
addQuot(this.form).then(response => {
|
||
this.$modal.msgSuccess("创建成功");
|
||
|
||
const row = {'quotId':response.data.quotId}
|
||
this.handleUpdate(row);
|
||
//this.open = false;
|
||
//this.getList();
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
/** 提交报价组按钮 */
|
||
commitForm() {
|
||
this.$refs["form"].validate(valid => {
|
||
if (valid) {
|
||
if(this.quotXjFileList == 0){
|
||
this.$message.warning("未上传询价清单附件!");
|
||
return;
|
||
}
|
||
|
||
this.form.quotMaterialList = this.quotMaterialList;
|
||
console.log(this.form)
|
||
commitQuot(this.form).then(response => {
|
||
this.$modal.msgSuccess("提交成功");
|
||
this.open = false;
|
||
this.getList();
|
||
});
|
||
}
|
||
});
|
||
},
|
||
|
||
/** 报价组权限控制 */
|
||
checkPermi,
|
||
checkRole,
|
||
/** 报价组提交技术协助按钮 */
|
||
commitJsForm() {
|
||
this.form.quotMaterialList = this.quotMaterialList;
|
||
commitJsQuot(this.form).then(response => {
|
||
this.$modal.msgSuccess("提交技术协助成功");
|
||
this.open = false;
|
||
this.getList();
|
||
});
|
||
},
|
||
|
||
/** 报价组提交核价协助按钮 */
|
||
commitHjForm() {
|
||
this.form.quotMaterialList = this.quotMaterialList;
|
||
commitHjQuot(this.form).then(response => {
|
||
this.$modal.msgSuccess("提交核价协助成功");
|
||
this.open = false;
|
||
this.getList();
|
||
});
|
||
},
|
||
|
||
/** 报价组提交金思维协助按钮 */
|
||
commitJswForm() {
|
||
this.form.quotMaterialList = this.quotMaterialList;
|
||
commitJswQuot(this.form).then(response => {
|
||
this.$modal.msgSuccess("提交金思维协助成功");
|
||
this.open = false;
|
||
this.getList();
|
||
});
|
||
},
|
||
|
||
/** 报价组提交金OA按钮 */
|
||
commitOAForm() {
|
||
this.form.quotMaterialList = this.quotMaterialList;
|
||
commitOAQuot(this.form).then(response => {
|
||
this.$modal.msgSuccess("提交OA成功");
|
||
this.open = false;
|
||
this.getList();
|
||
});
|
||
},
|
||
|
||
/** 报价组报价单提交反馈按钮 */
|
||
feedbackQuotForm() {
|
||
const quotTotalPrice = this.form.quotTotalPrice;
|
||
const quotMaterialsCount = this.form.quotMaterialsCount;
|
||
if(!quotTotalPrice || !quotMaterialsCount ){
|
||
this.$modal.msgError("明细条数或总价未填");
|
||
return;
|
||
}
|
||
|
||
/*const quotFkFileNum = this.quotFkFileList.length;
|
||
if(quotFkFileNum==0){
|
||
this.$modal.msgError("反馈附件必须上传");
|
||
return;
|
||
}*/
|
||
feedbackQuot(this.form).then(response => {
|
||
this.$modal.msgSuccess("提交反馈成功");
|
||
this.open = false;
|
||
this.getList();
|
||
});
|
||
},
|
||
|
||
/** 报价组生成报价单按钮 */
|
||
madeQuot(){
|
||
const roles = this.$store.state.user.roles;
|
||
if(roles && roles.indexOf('SALES_MAN') !== -1){//业务员下载附件更新处理状态为1-已处理
|
||
// 更新报价单状态为已处理
|
||
setHandle(this.form.quotId).then(response => {
|
||
this.madeQuotFile();
|
||
})
|
||
}else{
|
||
this.madeQuotFile();
|
||
}
|
||
},
|
||
madeQuotFile(){
|
||
this.form.quotMaterialList = this.quotMaterialList;
|
||
madeQuot(this.form).then(response => {
|
||
this.$modal.msgSuccess("生成报价单成功");
|
||
// 处理返回的文件流
|
||
const content = response;
|
||
const blob = new Blob([content]);
|
||
const fileName = this.form.quotCode +".xls";
|
||
if ("download" in document.createElement("a")) {
|
||
// 非IE下载
|
||
const elink = document.createElement("a");
|
||
elink.download = fileName;
|
||
elink.style.display = "none";
|
||
elink.href = URL.createObjectURL(blob);
|
||
document.body.appendChild(elink);
|
||
elink.click();
|
||
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
||
document.body.removeChild(elink);
|
||
}else {
|
||
// IE10+下载
|
||
navigator.msSaveBlob(blob, fileName);
|
||
}
|
||
});
|
||
},
|
||
|
||
/** 报价组报价单驳回按钮 */
|
||
rejectQuotForm() {
|
||
rejectQuot(this.form).then(response => {
|
||
this.$modal.msgSuccess("驳回成功");
|
||
this.open = false;
|
||
this.getList();
|
||
});
|
||
},
|
||
|
||
/** 删除按钮操作 */
|
||
handleDelete(row) {
|
||
const quotIds = row.quotId || this.ids;
|
||
this.$modal.confirm('是否确认删除所选报价单?').then(function() {
|
||
return delQuot(quotIds);
|
||
}).then(() => {
|
||
this.getList();
|
||
this.$modal.msgSuccess("删除成功");
|
||
}).catch(() => {});
|
||
},
|
||
|
||
/** 报价单-产品序号 */
|
||
rowQuotMaterialIndex({ row, rowIndex }) {
|
||
row.index = rowIndex + 1;
|
||
},
|
||
|
||
/** 报价单-产品添加按钮操作 */
|
||
handleAddQuotMaterial() {
|
||
let obj = {};
|
||
obj.matXingh = "";
|
||
obj.matGuig = "";
|
||
obj.matDiany = "";
|
||
obj.matDanw = "";
|
||
obj.matSl = "";
|
||
this.quotMaterialList.push(obj);
|
||
},
|
||
|
||
/** 报价单-产品删除按钮操作 */
|
||
handleDeleteQuotMaterial() {
|
||
if (this.checkedQuotMaterial.length == 0) {
|
||
this.$modal.msgError("请先选择要删除的报价单-产品数据");
|
||
} else {
|
||
const quotMaterialList = this.quotMaterialList;
|
||
const checkedQuotMaterial = this.checkedQuotMaterial;
|
||
this.quotMaterialList = quotMaterialList.filter(function(item) {
|
||
return checkedQuotMaterial.indexOf(item.index) == -1
|
||
});
|
||
}
|
||
},
|
||
|
||
/** 复选框选中数据 */
|
||
handleQuotMaterialSelectionChange(selection) {
|
||
this.checkedQuotMaterial = selection.map(item => item.index)
|
||
},
|
||
|
||
/** 导出按钮操作 */
|
||
handleExport() {
|
||
this.download('quot/quot/export', {
|
||
...this.queryParams
|
||
}, `quot_${new Date().getTime()}.xlsx`)
|
||
},
|
||
|
||
/** 对产品数据-数量、金额进行合算 */
|
||
getSummaries(param) {
|
||
const { columns, data } = param;
|
||
const sums = [];
|
||
columns.forEach((column, index) => {
|
||
if (index === 0) {
|
||
sums[index] = '合计';
|
||
return;
|
||
}
|
||
const values = data.map(item => Number(item[column.property]));
|
||
|
||
if (column.property === 'matSl' || column.property === 'matQuotAllPrice') {
|
||
if (!values.every(value => isNaN(value))) {
|
||
sums[index] = values.reduce((prev, curr) => {
|
||
const value = Number(curr);
|
||
if (!isNaN(value)) {
|
||
return NumberAdd(prev,curr);
|
||
}else {
|
||
return prev;
|
||
}
|
||
}, 0);
|
||
} else {
|
||
sums[index] = ''
|
||
}
|
||
}
|
||
});
|
||
this.form.quotQuantity = sums[6];
|
||
this.form.quotTotalPrice = this.form.quotTotalPrice?this.form.quotTotalPrice:checkRole(['QUOT_MAT_PRICE_DIFF'])? sums[12] : sums[11];
|
||
this.form.quotMaterialsCount = this.form.quotMaterialsCount?this.form.quotMaterialsCount:data.length;
|
||
return sums;
|
||
},
|
||
|
||
|
||
|
||
/*********************************附件列表数据展示、上传*****************************************/
|
||
//获取报价单-询价附件列表
|
||
getQuotXjFileList(){
|
||
const param = {relationId:this.form.quotId,fileType:'quotXjFile'}
|
||
quotFileList(param).then(response => {
|
||
this.quotXjFileList = response.rows;
|
||
});
|
||
},
|
||
//获取报价单-反馈附件列表
|
||
getQuotFkFileList(){
|
||
const param = {relationId:this.form.quotId,fileType:'quotFkFile'}
|
||
|
||
//协助中状态不显示反馈附件
|
||
if(checkRole(['SALES_MAN']) && !checkRole(['admin'])){
|
||
if(this.form.quotApprovalStatus!='1'){
|
||
quotFileList(param).then(response => {
|
||
this.quotFkFileList = response.rows;
|
||
});
|
||
}
|
||
}else{
|
||
quotFileList(param).then(response => {
|
||
this.quotFkFileList = response.rows;
|
||
});
|
||
}
|
||
},
|
||
//获取报价单-技术规范附件列表
|
||
getQuotJsgfFileList(){
|
||
console.log(this.form.quotId)
|
||
const param = {relationId:this.form.quotId,fileType:'quotJsgfFile'}
|
||
quotFileList(param).then(response => {
|
||
this.quotJsgfFileList = response.rows;
|
||
});
|
||
},
|
||
//获取报价单-技术确认-反馈附件上传
|
||
getQuotJsqrFileList(fileType){
|
||
const param = {relationId:this.form.quotJsxzConfirmId,fileType:fileType}
|
||
quotFileList(param).then(response => {
|
||
this.quotJsqrFileList = response.rows;
|
||
if('quotJsqrTlFkFile' == fileType){
|
||
this.quotJsqrTlFileNum = response.rows.length;
|
||
}else if('quotJsqrDyFkFile' == fileType){
|
||
this.quotJsqrDyFileNum = response.rows.length;
|
||
}else if('quotJsqrZyFkFile' == fileType){
|
||
this.quotJsqrZyFileNum = response.rows.length;
|
||
}else if('quotJsqrQtFkFile' == fileType){
|
||
this.quotJsqrQtFileNum = response.rows.length;
|
||
}
|
||
});
|
||
},
|
||
//获取报价单-核价附件列表
|
||
getQuotHjFileList(){
|
||
const param = {relationId:this.form.quotHjId,fileType:'quotHjFile'}
|
||
quotFileList(param).then(response => {
|
||
this.quotHjFileList = response.rows;
|
||
});
|
||
},
|
||
//特缆、低压、中压、其他 反馈附件显示窗口
|
||
handleAddFile(group){
|
||
this.addFileOpen = true;
|
||
this.quotJsqrFileList = [];
|
||
if("quotJsqrTl"==group){
|
||
this.addFileTitle = '特缆反馈附件'
|
||
this.fileType = 'quotJsqrTlFkFile';
|
||
this.uploadDis = (this.form.quotJsqrTlOperateState == 0 ? true : false);
|
||
}else if('quotJsqrDy'==group){
|
||
this.addFileTitle = '低压反馈附件'
|
||
this.fileType = 'quotJsqrDyFkFile';
|
||
this.uploadDis = (this.form.quotJsqrDyOperateState == 0 ? true : false);
|
||
}else if('quotJsqrZy'==group){
|
||
this.addFileTitle = '中压反馈附件'
|
||
this.fileType = 'quotJsqrZyFkFile';
|
||
this.uploadDis = (this.form.quotJsqrZyOperateState == 0 ? true : false);
|
||
}else if('quotJsqrQt'==group){
|
||
this.addFileTitle = '其他反馈附件'
|
||
this.fileType = 'quotJsqrQtFkFile';
|
||
this.uploadDis = (this.form.quotJsqrQtOperateState == 0 ? true : false);
|
||
}
|
||
// 获取反馈附件
|
||
this.getQuotJsqrFileList(this.fileType);
|
||
},
|
||
|
||
//点击上传附件按钮触发事件
|
||
uploadFile(activeName){
|
||
this.activeName = activeName
|
||
},
|
||
//上传前校验-反馈附件
|
||
beforeAvatarUploadQuotFkFile(file) {
|
||
this.quotFkFileLoading = true;
|
||
},
|
||
//上传前校验-清单附件
|
||
beforeAvatarUploadQuotXjFile(file) {
|
||
this.quotXjFileLoading = true;
|
||
let activeName = this.activeName;
|
||
if(activeName=='quotXjFile'){
|
||
const fileExtension = file.name.split('.').pop();
|
||
if(fileExtension.toLowerCase() != 'xls' && fileExtension.toLowerCase() != 'xlsx'){
|
||
this.$modal.msgError("清单附件必须是Excel格式");
|
||
this.quotXjFileLoading = false;
|
||
return false;
|
||
}
|
||
}
|
||
},
|
||
//上传前校验-清单附件
|
||
beforeAvatarUploadQuotJsgfFile(file){
|
||
this.quotJsgfFileLoading = true;
|
||
const maxSize = 100 * 1024 * 1024; // 100MB,根据你的需求设置最大文件大小
|
||
if (file.size > maxSize) {
|
||
this.$modal.msgError("文件大小超过了"+maxSize / (1024 * 1024)+"MB的限制");
|
||
this.quotJsgfFileLoading = false;
|
||
return false;
|
||
}
|
||
},
|
||
//成功回调
|
||
handleAvatarSuccess(res) {
|
||
let activeName = this.activeName;
|
||
// 如果上传成功
|
||
if (res.code == 200) {
|
||
this.$modal.msgSuccess(res.msg);
|
||
if(activeName=='quotXjFile'){
|
||
this.getQuotXjFileList();
|
||
this.quotXjFileLoading = false;
|
||
this.$refs.quotXjFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||
}else if(activeName=='quotJsgfFile'){
|
||
this.getQuotJsgfFileList();
|
||
this.quotJsgfFileLoading = false;
|
||
this.$refs.quotJsgfFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||
}else if(activeName=='quotFkFile'){
|
||
this.getQuotFkFileList();
|
||
this.quotFkFileLoading = false;
|
||
this.$refs.quotFkFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||
}
|
||
} else {
|
||
this.$modal.msgError(res.msg);
|
||
if(activeName=='quotXjFile'){
|
||
this.quotXjFileLoading = false;
|
||
this.$refs.quotXjFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||
}else if(activeName=='quotJsgfFile'){
|
||
this.quotJsgfFileLoading = false;
|
||
this.$refs.quotJsgfFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||
}else if(activeName=='quotFkFile'){
|
||
this.quotFkFileLoading = false;
|
||
this.$refs.quotFkFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||
}
|
||
}
|
||
},
|
||
|
||
//下载附件
|
||
downloadFile(fileUrl){
|
||
window.open(fileUrl, "_blank");
|
||
},
|
||
//下载反馈附件
|
||
downloadFkFile(fileUrl){
|
||
const roles = this.$store.state.user.roles;
|
||
if(roles && roles.indexOf('SALES_MAN') !== -1){//业务员下载附件更新处理状态为1-已处理
|
||
// 更新报价单状态为已处理
|
||
setHandle(this.form.quotId).then(response => {
|
||
window.open(fileUrl, "_blank");
|
||
})
|
||
}else{
|
||
window.open(fileUrl, "_blank");
|
||
}
|
||
},
|
||
|
||
//删除附件
|
||
deleteFile(fileId,activeName){
|
||
if(activeName=='quotXjFile'){
|
||
this.quotXjFileLoading = true;
|
||
quotFileDelete(fileId).then(response => {
|
||
this.getQuotXjFileList();
|
||
this.quotXjFileLoading = false;
|
||
})
|
||
}else if(activeName=='quotJsgfFile'){
|
||
this.quotJsgfFileLoading = true;
|
||
quotFileDelete(fileId).then(response => {
|
||
this.getQuotJsgfFileList();
|
||
this.quotJsgfFileLoading = false;
|
||
})
|
||
}else if(activeName=='quotFkFile'){
|
||
this.quotFkFileLoading = true;
|
||
quotFileDelete(fileId).then(response => {
|
||
this.getQuotFkFileList();
|
||
this.quotFkFileLoading = false;
|
||
})
|
||
}
|
||
},
|
||
|
||
//打开选人弹窗
|
||
openPeopleSelect(){
|
||
this.peopleOpen=true;
|
||
},
|
||
//选择人的确定按钮事件 submitPeople(nikeNamelist)方法传参一个默认接收用户昵称数组 submitPeople(peopleList,nikeNamelist)方法传参两个则是接收用户昵称数组和用户账号数组
|
||
submitPeople(peopleList,nickNameList){
|
||
this.selectedPeoples = this.selectedPeoples.concat(nickNameList)
|
||
this.selectedPeoples = this.unique(this.selectedPeoples)
|
||
this.form.quotSalesmanName = this.selectedPeoples[0].nickName;
|
||
this.form.quotSalesmanBm = this.selectedPeoples[0].sapUserBm;
|
||
this.form.quotSalesmanCode = this.selectedPeoples[0].userName;
|
||
this.peopleOpen=false;
|
||
},
|
||
/*********************************附件列表数据展示、上传*****************************************/
|
||
|
||
//技术确认单 详细信息
|
||
showJsqrDialog(){
|
||
this.$refs.jsqrDialog.getInfo("报价单-技术确认单",true,false,this.form.quotJsxzConfirmId);
|
||
},
|
||
|
||
//核价单 详细信息
|
||
showHjDialog(){
|
||
this.$refs.hjDialog.getInfo("报价单-核价单",true,false,this.form.quotHjId);
|
||
},
|
||
//数组去重
|
||
unique(arr) {
|
||
const res = new Map();
|
||
return arr.filter((arr) => !res.has(arr.userName) && res.set(arr.userName, 1));
|
||
},
|
||
}
|
||
};
|
||
</script>
|