1376 lines
50 KiB
Vue
1376 lines
50 KiB
Vue
|
|
<template>
|
|||
|
|
<div class="app-container">
|
|||
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|||
|
|
|
|||
|
|
<el-form-item label="" prop="quoteName" span="8">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.quoteName"
|
|||
|
|
placeholder="报价名称"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="" prop="useSiteCode">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.useSiteCode"
|
|||
|
|
placeholder="报价网点编码"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="" prop="useSite">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.useSite"
|
|||
|
|
placeholder="报价网点名称"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="" prop="transLineCode">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.transLineCode"
|
|||
|
|
placeholder="所属线路代码"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="" prop="transLine">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.transLine"
|
|||
|
|
placeholder="所属线路名称"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="" prop="feeType">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.feeType"
|
|||
|
|
placeholder="费用类型"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="" prop="prodCode">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.prodCode"
|
|||
|
|
placeholder="产品类型代码"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="" prop="prodName">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.prodName"
|
|||
|
|
placeholder="产品类型名称"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</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="['emis:emisQuotePrice: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="['emis:emisQuotePrice: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="['emis:emisQuotePrice: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="['emis:emisQuotePrice:export']"
|
|||
|
|
>导出</el-button>
|
|||
|
|
</el-col> -->
|
|||
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|||
|
|
</el-row>
|
|||
|
|
|
|||
|
|
<el-table v-loading="loading" :data="emisQuotePriceList" @selection-change="handleSelectionChange">
|
|||
|
|
<el-table-column type="selection" width="55" align="center" />
|
|||
|
|
<el-table-column label="序号" align="center" min-width="60">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span v-text="getIndex(scope.$index)"> </span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="报价名称" align="center" prop="quoteName" min-width="100" />
|
|||
|
|
<el-table-column label="费用名称" align="center" prop="quoteCode" min-width="100" />
|
|||
|
|
<el-table-column label="网点名称" align="center" prop="useSite" min-width="100" />
|
|||
|
|
<el-table-column label="所属线路" align="center" prop="transLine" min-width="100" />
|
|||
|
|
<el-table-column label="取重方式" align="center" prop="carryType" min-width="100" />
|
|||
|
|
<el-table-column label="最低价格" align="center" prop="leastPrice" min-width="100" />
|
|||
|
|
<el-table-column label="取价模式" align="center" prop="priceType" min-width="100" />
|
|||
|
|
<el-table-column label="启用状态" align="center" prop="status" min-width="100" />
|
|||
|
|
<el-table-column label="报价开始" align="center" prop="startDate" min-width="100" />
|
|||
|
|
<el-table-column label="报价结束" align="center" prop="endDate" min-width="100" />
|
|||
|
|
|
|||
|
|
<el-table-column label="修改人" align="center" prop="updateBy" min-width="100" />
|
|||
|
|
<el-table-column label="修改人编号" align="center" prop="updateBy" min-width="100" />
|
|||
|
|
<el-table-column label="修改站点" align="center" prop="updateSite" min-width="100" />
|
|||
|
|
<el-table-column label="修改站点ID" align="center" prop="updateSiteCode" min-width="100" />
|
|||
|
|
<el-table-column label="修改时间" align="center" prop="updateTime" min-width="100" />
|
|||
|
|
<el-table-column label="创建日期" align="center" prop="createTime" min-width="100" />
|
|||
|
|
<el-table-column label="创建人" align="center" prop="createBy" min-width="100" />
|
|||
|
|
<el-table-column label="创建网点" align="center" prop="createSite" min-width="100" />
|
|||
|
|
<el-table-column label="创建网点编号" align="center" prop="createSiteCode" min-width="100" />
|
|||
|
|
<el-table-column label="创建人编号" align="center" prop="createByCode" min-width="100" />
|
|||
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text"
|
|||
|
|
icon="el-icon-edit"
|
|||
|
|
@click="handleUpdate(scope.row)"
|
|||
|
|
v-hasPermi="['emis:emisQuotePrice:edit']"
|
|||
|
|
>修改</el-button>
|
|||
|
|
<!--
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text"
|
|||
|
|
icon="el-icon-delete"
|
|||
|
|
@click="handleDelete(scope.row)"
|
|||
|
|
v-hasPermi="['emis:emisQuotePrice:remove']"
|
|||
|
|
>删除</el-button> -->
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
</el-table>
|
|||
|
|
|
|||
|
|
<pagination
|
|||
|
|
v-show="total>0"
|
|||
|
|
:total="total"
|
|||
|
|
:page-sizes="[20,50,100,300,500,1000,2000,5000]"
|
|||
|
|
:page.sync="queryParams.pageNum"
|
|||
|
|
:limit.sync="queryParams.pageSize"
|
|||
|
|
:page-size="queryParams.pageSize"
|
|||
|
|
@pagination="getList"
|
|||
|
|
/>
|
|||
|
|
|
|||
|
|
<!-- 添加或修改费用报价对话框 -->
|
|||
|
|
<el-dialog :title="title" :visible.sync="open" width="1100px" :close-on-click-modal="false" append-to-body>
|
|||
|
|
<el-row :gutter="20" type='flex'>
|
|||
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|||
|
|
<el-col :span="8" :xs="5">
|
|||
|
|
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="报价名称" prop="quoteName">
|
|||
|
|
<el-input v-model="form.quoteName" placeholder="请输入报价名称" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="使用网点" prop="useSiteCode">
|
|||
|
|
<el-select v-model="form.useSiteCode" placeholder="使用网点" clearable>
|
|||
|
|
<el-option
|
|||
|
|
v-for="dict in sendAreaSiteIdsOptions"
|
|||
|
|
:key="dict.value"
|
|||
|
|
:label="dict.label"
|
|||
|
|
:value="dict.value"
|
|||
|
|
/>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="线路" prop="transLine">
|
|||
|
|
<el-select v-model="form.transLine" placeholder="线路" clearable>
|
|||
|
|
<el-option
|
|||
|
|
v-for="dict in transLineIdsOptions"
|
|||
|
|
:key="dict.label"
|
|||
|
|
:label="dict.label"
|
|||
|
|
:value="dict.label"
|
|||
|
|
/>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="产品类型" prop="prodCode">
|
|||
|
|
<el-select v-model="form.prodCode" placeholder="产品类型" clearable>
|
|||
|
|
<el-option
|
|||
|
|
v-for="dict in productIdsOptions"
|
|||
|
|
:key="dict.value"
|
|||
|
|
:label="dict.label"
|
|||
|
|
:value="dict.value"
|
|||
|
|
/>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="最低价格" prop="minPrice">
|
|||
|
|
<el-input v-model="form.minPrice" placeholder="请输入最低价格" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="价格取值" prop="priceType">
|
|||
|
|
<el-select v-model="form.priceType" placeholder="价格取值" clearable>
|
|||
|
|
<el-option
|
|||
|
|
v-for="dict in dict.type.sys_normal_disable"
|
|||
|
|
:key="dict.value"
|
|||
|
|
:label="dict.label"
|
|||
|
|
:value="dict.value"
|
|||
|
|
/>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="是否启用" prop="status">
|
|||
|
|
<el-radio-group v-model="form.status">
|
|||
|
|
<el-radio
|
|||
|
|
v-for="dict in dict.type.sys_normal_disable"
|
|||
|
|
:key="dict.value"
|
|||
|
|
:label="dict.value"
|
|||
|
|
>{{dict.label}}</el-radio>
|
|||
|
|
</el-radio-group>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="开始日期" prop="startDate">
|
|||
|
|
<el-date-picker clearable
|
|||
|
|
v-model="form.startDate"
|
|||
|
|
type="date"
|
|||
|
|
value-format="yyyy-MM-dd"
|
|||
|
|
placeholder="请选择开始日期">
|
|||
|
|
</el-date-picker>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="结束日期" prop="endDate">
|
|||
|
|
<el-date-picker clearable
|
|||
|
|
v-model="form.endDate"
|
|||
|
|
type="date"
|
|||
|
|
value-format="yyyy-MM-dd"
|
|||
|
|
placeholder="请选择结束日期">
|
|||
|
|
</el-date-picker>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="计费方式" prop="billType">
|
|||
|
|
<el-radio-group v-model="form.billType">
|
|||
|
|
<el-radio
|
|||
|
|
v-for="dict in dict.type.sys_normal_disable"
|
|||
|
|
:key="dict.value"
|
|||
|
|
:label="dict.value"
|
|||
|
|
>{{dict.label}}</el-radio>
|
|||
|
|
</el-radio-group>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<!--
|
|||
|
|
<el-col :span="24" v-show="moreInputVisible" > </el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-divider content-position="right" @click="handleShowMoreInput" >更多信息[+]</el-divider>
|
|||
|
|
</el-col>
|
|||
|
|
-->
|
|||
|
|
|
|||
|
|
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="16" :xs="5">
|
|||
|
|
<el-row :gutter="16">
|
|||
|
|
<el-col :span="9">
|
|||
|
|
<el-form-item label="寄件区域" prop="sendAreaId">
|
|||
|
|
<el-select v-model="form.sendAreaId" placeholder="寄件区域" clearable>
|
|||
|
|
<el-option
|
|||
|
|
v-for="dict in sendAreaIdsOptions"
|
|||
|
|
:key="dict.value"
|
|||
|
|
:label="dict.label"
|
|||
|
|
:value="dict.value"
|
|||
|
|
/>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="3">
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text"
|
|||
|
|
@click="addArea(1)"
|
|||
|
|
>新增区域</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="9">
|
|||
|
|
<el-form-item label="派件区域" prop="dispAreaId">
|
|||
|
|
<el-select v-model="form.dispAreaId" placeholder="派件区域" clearable>
|
|||
|
|
<el-option
|
|||
|
|
v-for="dict in dispAreaIdsOptions"
|
|||
|
|
:key="dict.value"
|
|||
|
|
:label="dict.label"
|
|||
|
|
:value="dict.value"
|
|||
|
|
/>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="3">
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text"
|
|||
|
|
@click="addArea(2)"
|
|||
|
|
>新增区域</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="" prop="remark">
|
|||
|
|
<el-input v-model="form.sendAreaText" type="textarea" placeholder="" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="12">
|
|||
|
|
<el-form-item label="" prop="remark">
|
|||
|
|
<el-input v-model="form.dispAreaText" type="textarea" placeholder="" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="3.5">
|
|||
|
|
计算公式规则
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="1.5">
|
|||
|
|
<el-button
|
|||
|
|
type="primary"
|
|||
|
|
plain
|
|||
|
|
size="mini"
|
|||
|
|
@click="handleAddFormula"
|
|||
|
|
>新增公式</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-table v-loading="loading" :data="formFormulaArr" >
|
|||
|
|
<el-table-column label="序号" align="center" prop="sort" min-width="40"/>
|
|||
|
|
<el-table-column label="范围" align="center" prop="formula" min-width="100" />
|
|||
|
|
<el-table-column label="公式" align="center" prop="calculationRange" min-width="100" />
|
|||
|
|
<el-table-column label="首重(s)" align="center" prop="firstWeight" min-width="100" />
|
|||
|
|
<el-table-column label="续重单价(d)" align="center" prop="continueWeight" min-width="100" />
|
|||
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="180">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text"
|
|||
|
|
@click="handleEdit(scope.row)"
|
|||
|
|
>编辑</el-button>
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text"
|
|||
|
|
@click="handleCopy(scope.row)"
|
|||
|
|
>复制</el-button>
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text"
|
|||
|
|
@click="hDelete(scope.row)"
|
|||
|
|
>删除</el-button>
|
|||
|
|
<!--
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text"
|
|||
|
|
icon="el-icon-delete"
|
|||
|
|
@click="handleDelete(scope.row)"
|
|||
|
|
v-hasPermi="['emis:emisQuotePrice:remove']"
|
|||
|
|
>删除</el-button> -->
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
</el-table>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
</el-col>
|
|||
|
|
</el-form>
|
|||
|
|
</el-row>
|
|||
|
|
<div slot="footer" class="dialog-footer">
|
|||
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|||
|
|
<el-button @click="cancel">取 消</el-button>
|
|||
|
|
</div>
|
|||
|
|
</el-dialog>
|
|||
|
|
|
|||
|
|
<!--新增公式-->
|
|||
|
|
<el-dialog :title="title" :visible.sync="openFormula" width="1100px" :close-on-click-modal="false" append-to-body>
|
|||
|
|
<el-row :gutter="20" >
|
|||
|
|
<el-form ref="form" :model="formFormula" label-width="80px">
|
|||
|
|
<el-col :span="8">
|
|||
|
|
<el-form-item label="计算范围" prop="minCalculationRange">
|
|||
|
|
<el-input v-model="formFormula.minCalculationRange" placeholder="最小值" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="8">
|
|||
|
|
<el-form-item label="<w<=" prop="maxCalculationRange">
|
|||
|
|
<el-input v-model="formFormula.maxCalculationRange" placeholder="最大值" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="8">
|
|||
|
|
<el-form-item label="公式" prop="calculationRange">
|
|||
|
|
<el-input v-model="formFormula.calculationRange" placeholder="" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="8">
|
|||
|
|
<el-form-item label="序号" prop="sort">
|
|||
|
|
<el-input v-model="formFormula.sort" placeholder="" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="8">
|
|||
|
|
<el-form-item label="首重(s)" prop="firstWeight">
|
|||
|
|
<el-input v-model="formFormula.firstWeight" placeholder="" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="8">
|
|||
|
|
<el-form-item label="续重(d)" prop="continueWeight">
|
|||
|
|
<el-input v-model="formFormula.continueWeight" placeholder="" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
说明: 计算公式中只能包含(s,w,d数字,+,.*,/).示例:0-1公斤 首重5元,1-3 公斤 每公斤2元加上首重,计算公式: 5+(w-1)*2
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<el-col :span="8">
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="1.5">
|
|||
|
|
<el-button
|
|||
|
|
type="primary"
|
|||
|
|
plain
|
|||
|
|
size="mini"
|
|||
|
|
@click="handleConfirm"
|
|||
|
|
>保存</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="1.5">
|
|||
|
|
<el-button
|
|||
|
|
plain
|
|||
|
|
size="mini"
|
|||
|
|
@click="handleCancel"
|
|||
|
|
>取消</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
</el-form>
|
|||
|
|
</el-row>
|
|||
|
|
</el-dialog>
|
|||
|
|
|
|||
|
|
<!-- 添加或修改区域对话框 -->
|
|||
|
|
<el-dialog :title="title" :visible.sync="openArea" width="1100px" :close-on-click-modal="false" append-to-body>
|
|||
|
|
<el-row :gutter="20" type='flex'>
|
|||
|
|
<el-form ref="form" :model="form" label-width="80px">
|
|||
|
|
<el-col :span="14" :xs="5">
|
|||
|
|
<el-col :span="3">
|
|||
|
|
<el-button
|
|||
|
|
type="primary"
|
|||
|
|
size="mini"
|
|||
|
|
plain
|
|||
|
|
@click="addAreaConfirm"
|
|||
|
|
>新增</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="3">
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
plain
|
|||
|
|
@click="delArea"
|
|||
|
|
>删除</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-table v-loading="loading" :data="areaArr" >
|
|||
|
|
<el-table-column label="报价区城名称" align="center" prop="areaName" min-width="100"/>
|
|||
|
|
<el-table-column label="所属网点" align="center" prop="siteName" min-width="100" />
|
|||
|
|
<el-table-column label="费用类型" align="center" prop="flowType" min-width="100" />
|
|||
|
|
<el-table-column label="区域类型" align="center" prop="areaType" min-width="100" />
|
|||
|
|
<el-table-column label="创建时间" align="center" prop="creatTime" min-width="100" />
|
|||
|
|
</el-table>
|
|||
|
|
</el-col>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="10" :xs="5">
|
|||
|
|
<el-col :span="14">
|
|||
|
|
<el-form-item label="区域名称" prop="areaName">
|
|||
|
|
<el-input v-model="formArea.areaName" placeholder="" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="10">
|
|||
|
|
<el-form-item label="区域类型" prop="areaType">
|
|||
|
|
<el-select v-model="formArea.areaType" @change="handleAreaChange" placeholder="区域类型" clearable>
|
|||
|
|
<el-option
|
|||
|
|
v-for="dict in dict.type.emis_create_area_type"
|
|||
|
|
:key="dict.value"
|
|||
|
|
:label="dict.label"
|
|||
|
|
:value="dict.value"
|
|||
|
|
/>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-button
|
|||
|
|
type="primary"
|
|||
|
|
size="mini"
|
|||
|
|
plain
|
|||
|
|
@click="addBaseArea"
|
|||
|
|
>添加网点</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="6">
|
|||
|
|
<el-button
|
|||
|
|
type="danger"
|
|||
|
|
size="mini"
|
|||
|
|
plain
|
|||
|
|
@click="delBaseArea"
|
|||
|
|
>删除</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-table v-loading="loading" :data="areaBaseArr" @selection-change="handleSelectionSiteChange">
|
|||
|
|
<el-table-column type="selection" width="55" align="center" />
|
|||
|
|
<el-table-column label="网点编号" align="center" prop="siteCode" min-width="100"/>
|
|||
|
|
<el-table-column label="网点名称" align="center" prop="siteName" min-width="100" />
|
|||
|
|
<el-table-column label="财务中心" align="center" prop="flowType" min-width="100" />
|
|||
|
|
</el-table>
|
|||
|
|
</el-col>
|
|||
|
|
</el-col>
|
|||
|
|
</el-form>
|
|||
|
|
</el-row>
|
|||
|
|
<div slot="footer" class="dialog-footer">
|
|||
|
|
<el-button type="primary" @click="submitFormArea">保 存</el-button>
|
|||
|
|
<el-button @click="cancelArea">取 消</el-button>
|
|||
|
|
</div>
|
|||
|
|
</el-dialog>
|
|||
|
|
<!-- 选择网点对话框 -->
|
|||
|
|
<el-dialog :title="title" :visible.sync="openSite" width="700px" :close-on-click-modal="false" append-to-body>
|
|||
|
|
<el-row :gutter="20" type='flex'>
|
|||
|
|
<el-form ref="form" :model="formSite" :rules="rules" label-width="80px">
|
|||
|
|
<el-col :span="8">
|
|||
|
|
<el-form-item label="" prop="country">
|
|||
|
|
<el-select v-model="formSite.country" placeholder="国家" @change="hideOther" clearable filterable>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in countryIdsOptions"
|
|||
|
|
v-bind:key="item.label"
|
|||
|
|
v-bind:label="item.label"
|
|||
|
|
v-bind:value="item.label"
|
|||
|
|
/>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="16" >
|
|||
|
|
<el-input
|
|||
|
|
v-model="siteName"
|
|||
|
|
placeholder="网点名称搜索"
|
|||
|
|
clearable
|
|||
|
|
size="small"
|
|||
|
|
prefix-icon="el-icon-search"
|
|||
|
|
style="margin-bottom: 20px"
|
|||
|
|
/>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24" >
|
|||
|
|
<el-radio-group v-model="formSite.type" >
|
|||
|
|
<el-radio
|
|||
|
|
v-for="dict in siteType"
|
|||
|
|
:key="dict.value"
|
|||
|
|
:label="dict.label"
|
|||
|
|
:value="dict.value"
|
|||
|
|
@change="radioChange"
|
|||
|
|
>{{dict.label}}</el-radio>
|
|||
|
|
</el-radio-group><br/><br/>
|
|||
|
|
<el-checkbox v-model="formSite.deptCheckStrictly" @change="handleCheckedTreeConnect" >全选/单选</el-checkbox>
|
|||
|
|
<br/>
|
|||
|
|
<el-tree
|
|||
|
|
ref="tree"
|
|||
|
|
class="filter-tree tree"
|
|||
|
|
:data="siteTree"
|
|||
|
|
:props="defaultProps"
|
|||
|
|
:expand-on-click-node="false"
|
|||
|
|
:filter-node-method="filterNode"
|
|||
|
|
node-key="id"
|
|||
|
|
highlight-current
|
|||
|
|
default-expand-all
|
|||
|
|
@node-click="handleNodeClick"
|
|||
|
|
>
|
|||
|
|
</el-tree>
|
|||
|
|
</el-col>
|
|||
|
|
</el-form>
|
|||
|
|
</el-row>
|
|||
|
|
<div slot="footer" class="dialog-footer">
|
|||
|
|
<el-button type="primary" @click="submitFormSite">保存</el-button>
|
|||
|
|
<el-button @click="cancelSite">取 消</el-button>
|
|||
|
|
</div>
|
|||
|
|
</el-dialog>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<el-dialog :title="titleForm" :visible.sync="openForm" width="500px" append-to-body>
|
|||
|
|
<emisQuotePriceForm :quoteId="currentQuoteId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisQuotePriceForm>
|
|||
|
|
</el-dialog>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" append-to-body>
|
|||
|
|
<emisQuotePriceView :quoteId="quoteId" ></EmisQuotePriceView>
|
|||
|
|
</el-dialog>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<script>
|
|||
|
|
import { listEmisQuotePrice, getEmisQuotePrice, delEmisQuotePrice, addEmisQuotePrice, updateEmisQuotePrice } from "@/api/emis/emisQuotePrice";
|
|||
|
|
import { listEmisSite, getEmisSite, delEmisSite, addEmisSite, updateEmisSite } from "@/api/emis/emisSite";
|
|||
|
|
import { listEmisTransLine, getEmisTransLine, delEmisTransLine, addEmisTransLine, updateEmisTransLine,changeTransLineStatus } from "@/api/emis/emisTransLine";
|
|||
|
|
import { listEmisTransProduct, getEmisTransProduct, delEmisTransProduct, addEmisTransProduct, updateEmisTransProduct,changeTransProductStatus } from "@/api/emis/emisTransProduct";
|
|||
|
|
import { listEmisCountry, getEmisCountry, delEmisCountry, addEmisCountry, updateEmisCountry } from "@/api/emis/emisCountry";
|
|||
|
|
import { listEmisQuoteSendArea, getEmisQuoteSendArea, delEmisQuoteSendArea, addEmisQuoteSendArea, updateEmisQuoteSendArea } from "@/api/emis/emisQuoteSendArea";
|
|||
|
|
import { listEmisQuoteDispArea, getEmisQuoteDispArea, delEmisQuoteDispArea, addEmisQuoteDispArea, updateEmisQuoteDispArea } from "@/api/emis/emisQuoteDispArea";
|
|||
|
|
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
|||
|
|
import emisQuotePriceView from '@/views/emis/emisQuotePrice/emisQuotePriceView';
|
|||
|
|
import emisQuotePriceForm from '@/views/emis/emisQuotePrice/emisQuotePriceForm';
|
|||
|
|
|
|||
|
|
export default {
|
|||
|
|
name: "emisQuotePrice",
|
|||
|
|
components: { elDateSimplePicker,emisQuotePriceView,emisQuotePriceForm },
|
|||
|
|
dicts: [
|
|||
|
|
'sys_normal_disable','emis_create_area_type',
|
|||
|
|
],
|
|||
|
|
data() {
|
|||
|
|
return {
|
|||
|
|
// 遮罩层
|
|||
|
|
loading: true,
|
|||
|
|
// 选中数组
|
|||
|
|
ids: [],
|
|||
|
|
// 非单个禁用
|
|||
|
|
single: true,
|
|||
|
|
// 非多个禁用
|
|||
|
|
multiple: true,
|
|||
|
|
siteName:null,
|
|||
|
|
area_type:0,
|
|||
|
|
currentQuoteId:null,
|
|||
|
|
currentSite:null,
|
|||
|
|
// 显示搜索条件
|
|||
|
|
showSearch: true,
|
|||
|
|
// 创建时间搜索
|
|||
|
|
dateTimeRange:[],
|
|||
|
|
areaArr:[],
|
|||
|
|
areaBaseArr:[],
|
|||
|
|
siteTree:[],
|
|||
|
|
// 总条数
|
|||
|
|
total: 0,
|
|||
|
|
currentId:null,
|
|||
|
|
areaIdsOptions:[],
|
|||
|
|
countryIdsOptions:[],
|
|||
|
|
// 费用报价表格数据
|
|||
|
|
emisQuotePriceList: [],
|
|||
|
|
sendAreaSiteIdsOptions:[],
|
|||
|
|
transLineIdsOptions:[],
|
|||
|
|
productIdsOptions:[],
|
|||
|
|
dispAreaIdsOptions:[],
|
|||
|
|
sendAreaIdsOptions:[],
|
|||
|
|
areaTypeArr:[],
|
|||
|
|
// 弹出层标题
|
|||
|
|
title: "",
|
|||
|
|
// 是否显示弹出层
|
|||
|
|
open: false,
|
|||
|
|
formulaType:1,
|
|||
|
|
|
|||
|
|
openForm: false,
|
|||
|
|
openArea:false,
|
|||
|
|
openFormula:false,
|
|||
|
|
openSite:false,
|
|||
|
|
titleForm: "",
|
|||
|
|
|
|||
|
|
titleEmisQuotePrice: "",
|
|||
|
|
openEmisQuotePrice: false,
|
|||
|
|
|
|||
|
|
// 显示编辑框更多
|
|||
|
|
moreInputVisible: false,
|
|||
|
|
|
|||
|
|
// 弹出展示层
|
|||
|
|
quoteId:null,
|
|||
|
|
titleView:"",
|
|||
|
|
openView: false,
|
|||
|
|
// 删除标志(0代表存在时间范围
|
|||
|
|
daterangeStartDate: [],
|
|||
|
|
// 删除标志(0代表存在时间范围
|
|||
|
|
daterangeEndDate: [],
|
|||
|
|
// 删除标志(0代表存在时间范围
|
|||
|
|
daterangeCreateTime: [],
|
|||
|
|
// 删除标志(0代表存在时间范围
|
|||
|
|
daterangeUpdateTime: [],
|
|||
|
|
// 查询参数
|
|||
|
|
queryParams: {
|
|||
|
|
pageNum: 1,
|
|||
|
|
pageSize: 20,
|
|||
|
|
quoteName: null,
|
|||
|
|
quoteCode: null,
|
|||
|
|
useSiteCode: null,
|
|||
|
|
useSite: null,
|
|||
|
|
transLineCode: null,
|
|||
|
|
transLine: null,
|
|||
|
|
feeType: null,
|
|||
|
|
prodCode: null,
|
|||
|
|
prodName: null,
|
|||
|
|
soonPieceType: null,
|
|||
|
|
recPayType: null,
|
|||
|
|
billType: null,
|
|||
|
|
otherType1: null,
|
|||
|
|
otherType2: null,
|
|||
|
|
carryType: null,
|
|||
|
|
status: null,
|
|||
|
|
dispAreaSite: null,
|
|||
|
|
dispAreaName: null,
|
|||
|
|
sendAreaName: null,
|
|||
|
|
sendAreaSite: null,
|
|||
|
|
carriesNumber: null,
|
|||
|
|
discardsNumber: null,
|
|||
|
|
leastPrice: null,
|
|||
|
|
priceType: null,
|
|||
|
|
startDate: null,
|
|||
|
|
endDate: null,
|
|||
|
|
priorityLevel: null,
|
|||
|
|
remark: null,
|
|||
|
|
delFlag: null,
|
|||
|
|
},
|
|||
|
|
// 表单参数
|
|||
|
|
form: {},
|
|||
|
|
sendForm:{},
|
|||
|
|
disForm:{},
|
|||
|
|
formFormula:{},
|
|||
|
|
formFormulaArr:[],
|
|||
|
|
formArea:{},
|
|||
|
|
formSite:{},
|
|||
|
|
currentRow:{},
|
|||
|
|
defaultProps: {
|
|||
|
|
children: "children",
|
|||
|
|
label: "label"
|
|||
|
|
},
|
|||
|
|
siteType:[{value:0,label:"按网点层级展示"},{value:1,label:"按省市区层级展示"}],
|
|||
|
|
// 表单校验
|
|||
|
|
rules: {
|
|||
|
|
quoteId: [
|
|||
|
|
{ required: true, message: "序号不能为空", trigger: "blur" }
|
|||
|
|
],
|
|||
|
|
quoteName: [
|
|||
|
|
{ required: true, message: "报价名称不能为空", trigger: "blur" }
|
|||
|
|
],
|
|||
|
|
useSiteCode: [
|
|||
|
|
{ required: true, message: "使用站点代码不能为空", trigger: "blur" }
|
|||
|
|
],
|
|||
|
|
useSite: [
|
|||
|
|
{ required: true, message: "使用站点名称不能为空", trigger: "blur" }
|
|||
|
|
],
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
},
|
|||
|
|
watch: {
|
|||
|
|
// 根据名称筛选部门树
|
|||
|
|
siteName(val) {
|
|||
|
|
this.$refs.tree.filter(val);
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
created() {
|
|||
|
|
this.getList();
|
|||
|
|
this.getSiteList();
|
|||
|
|
this.getTransLineList();
|
|||
|
|
this.getProductList();
|
|||
|
|
this.getCountryList();
|
|||
|
|
},
|
|||
|
|
methods: {
|
|||
|
|
// 所有部门节点数据
|
|||
|
|
//getSiteAllCheckedKeys() {
|
|||
|
|
// 目前被选中的部门节点
|
|||
|
|
//let checkedKeys = this.$refs.site.getCheckedKeys();
|
|||
|
|
// 半选中的部门节点
|
|||
|
|
//let halfCheckedKeys = this.$refs.site.getHalfCheckedKeys();
|
|||
|
|
//checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
|
|||
|
|
//return checkedKeys;
|
|||
|
|
//},
|
|||
|
|
delArea(){
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
hideOther(){
|
|||
|
|
this.queryParams.country = this.formSite.country;
|
|||
|
|
this.getSiteList();
|
|||
|
|
},
|
|||
|
|
handleCheckedTreeConnect(){
|
|||
|
|
//this.formSite.deptCheckStrictly;
|
|||
|
|
this.currentSite.label = "全部";
|
|||
|
|
this.currentSite.id = "00000";
|
|||
|
|
},
|
|||
|
|
radioChange(){
|
|||
|
|
//console.log(this.formSite);
|
|||
|
|
this.queryParams.searchSiteType = this.formSite.type;
|
|||
|
|
this.getSiteList();
|
|||
|
|
},
|
|||
|
|
delBaseArea(){
|
|||
|
|
var newAreaBaseArr = [];
|
|||
|
|
this.areaBaseArr.map((res) => {
|
|||
|
|
var needAdd = true;
|
|||
|
|
console.log(res);
|
|||
|
|
this.ids.map((res1) => {
|
|||
|
|
console.log(res1);
|
|||
|
|
if(res.siteCode == res1){
|
|||
|
|
needAdd = false;
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
if(needAdd == true){
|
|||
|
|
newAreaBaseArr.push(res);
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
this.areaBaseArr = newAreaBaseArr;
|
|||
|
|
},
|
|||
|
|
submitFormSite(){
|
|||
|
|
var tTree = {siteName:this.currentSite.label,siteCode:this.currentSite.id,flowType:this.currentSite.flowType,baseSiteId:this.currentSite.id};
|
|||
|
|
//console.log(tTree);
|
|||
|
|
this.areaBaseArr.push(tTree);
|
|||
|
|
this.currentSite = null;
|
|||
|
|
this.openSite = false;
|
|||
|
|
},
|
|||
|
|
cancelSite(){
|
|||
|
|
this.openSite = false;
|
|||
|
|
},
|
|||
|
|
addBaseArea(){
|
|||
|
|
if(this.formArea.areaType=="all"){
|
|||
|
|
this.$modal.msgSuccess("全选不用添加区域");
|
|||
|
|
}else{
|
|||
|
|
this.openSite = true;
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
handleAreaChange(row){
|
|||
|
|
console.log(row);
|
|||
|
|
console.log(this.formArea.areaType);
|
|||
|
|
},
|
|||
|
|
// 筛选节点
|
|||
|
|
filterNode(value, data) {
|
|||
|
|
if (!value) return true;
|
|||
|
|
return data.label.indexOf(value) !== -1;
|
|||
|
|
},
|
|||
|
|
// 节点单击事件
|
|||
|
|
handleNodeClick(data) {
|
|||
|
|
if(this.formSite.deptCheckStrictly!=true){
|
|||
|
|
this.currentSite = data;
|
|||
|
|
console.log(this.currentSite);
|
|||
|
|
}else{
|
|||
|
|
this.formArea.areaType = "all";
|
|||
|
|
this.$modal.msgSuccess("全选不用单独选区域");
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
handleEdit(row){
|
|||
|
|
this.currentRow = row;
|
|||
|
|
this.formFormula = row;
|
|||
|
|
this.openFormula = true;
|
|||
|
|
this.formulaType = 2;
|
|||
|
|
},
|
|||
|
|
handleCopy(row){
|
|||
|
|
var new_row = {maxCalculationRange:row.maxCalculationRange,minCalculationRange:row.minCalculationRange,formula:row.minCalculationRange+"<=<"+row.maxCalculationRange,calculationRange:row.calculationRange,sort:row.sort,firstWeight:row.firstWeight,continueWeight:row.continueWeight};
|
|||
|
|
this.formFormulaArr.push(new_row);
|
|||
|
|
},
|
|||
|
|
hDelete(row){
|
|||
|
|
var newFormFormulaArr = [];
|
|||
|
|
this.formFormulaArr.map((res) => {
|
|||
|
|
if(row.sort != res.sort){
|
|||
|
|
newFormFormulaArr.push(res);
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
this.formFormulaArr = newFormFormulaArr;
|
|||
|
|
},
|
|||
|
|
/** 查询费用报价列表 */
|
|||
|
|
getList() {
|
|||
|
|
this.loading = true;
|
|||
|
|
this.queryParams.params = {};
|
|||
|
|
if (null != this.daterangeStartDate && '' != this.daterangeStartDate) {
|
|||
|
|
this.queryParams.params["beginStartDate"] = this.daterangeStartDate[0];
|
|||
|
|
this.queryParams.params["endStartDate"] = this.daterangeStartDate[1];
|
|||
|
|
}
|
|||
|
|
if (null != this.daterangeEndDate && '' != this.daterangeEndDate) {
|
|||
|
|
this.queryParams.params["beginEndDate"] = this.daterangeEndDate[0];
|
|||
|
|
this.queryParams.params["endEndDate"] = this.daterangeEndDate[1];
|
|||
|
|
}
|
|||
|
|
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
|||
|
|
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
|||
|
|
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
|||
|
|
}
|
|||
|
|
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
|
|||
|
|
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
|
|||
|
|
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
|||
|
|
}
|
|||
|
|
listEmisQuotePrice(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
|||
|
|
this.emisQuotePriceList = response.rows;
|
|||
|
|
this.total = response.total;
|
|||
|
|
this.loading = false;
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
getCountryList() {
|
|||
|
|
this.loading = true;
|
|||
|
|
let qParam={
|
|||
|
|
pageNum: 1,
|
|||
|
|
pageSize: 300
|
|||
|
|
}
|
|||
|
|
listEmisCountry(qParam).then(response => {
|
|||
|
|
this.loading = false;
|
|||
|
|
this.countryIdsOptions = [];
|
|||
|
|
this.countryIdsOptions.push({"value":40,"label":"中国"})
|
|||
|
|
response.rows.forEach(item =>{
|
|||
|
|
if(item.id != 40){
|
|||
|
|
//var optItem={value:item.id,label:item.name};
|
|||
|
|
//this.countryIdsOptions.push(optItem)
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
/** 查询网点列表 */
|
|||
|
|
getSiteList() {
|
|||
|
|
this.loading = true;
|
|||
|
|
this.queryParams.params = {};
|
|||
|
|
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
|||
|
|
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
|||
|
|
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
|||
|
|
}
|
|||
|
|
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
|
|||
|
|
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
|
|||
|
|
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
|||
|
|
}
|
|||
|
|
//获取财务类型的网点
|
|||
|
|
this.queryParams.params['type'] = "财务中心";
|
|||
|
|
this.loading = false;
|
|||
|
|
this.sendAreaSiteIdsOptions = [];
|
|||
|
|
this.sendAreaSiteIdsOptions.push({"value":0,"label":"华东财务中心"})
|
|||
|
|
this.siteTree = [];
|
|||
|
|
var cTree={"id":"","label":"华东财务中心","children":[]};
|
|||
|
|
listEmisSite(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
|||
|
|
response.rows.forEach(item =>{
|
|||
|
|
var optItem={value:item.siteCode,label:item.siteName};
|
|||
|
|
this.sendAreaSiteIdsOptions.push(optItem)
|
|||
|
|
var treeItem={"id":item.siteCode,"label":item.siteName};
|
|||
|
|
cTree.children.push(treeItem);
|
|||
|
|
});
|
|||
|
|
this.siteTree.push(cTree);
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
/** 查询线路列表 */
|
|||
|
|
getTransLineList() {
|
|||
|
|
this.loading = true;
|
|||
|
|
this.transLineIdsOptions = [];
|
|||
|
|
listEmisTransLine(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
|||
|
|
response.rows.forEach(item =>{
|
|||
|
|
var optItem={value:item.lineName,label:item.lineName};
|
|||
|
|
this.transLineIdsOptions.push(optItem)
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
/** 查询运输产品类型列表 */
|
|||
|
|
getProductList() {
|
|||
|
|
this.loading = true;
|
|||
|
|
this.queryParams.params = {};
|
|||
|
|
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
|||
|
|
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
|||
|
|
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
|||
|
|
}
|
|||
|
|
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
|
|||
|
|
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
|
|||
|
|
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
this.productIdsOptions = [];
|
|||
|
|
listEmisTransProduct(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
|||
|
|
response.rows.forEach(item =>{
|
|||
|
|
var optItem={value:item.prodCode,label:item.prodName};
|
|||
|
|
this.productIdsOptions.push(optItem)
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
getDispList() {
|
|||
|
|
this.loading = true;
|
|||
|
|
this.queryParams.params = {};
|
|||
|
|
this.dispAreaIdsOptions = [];
|
|||
|
|
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
|||
|
|
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
|||
|
|
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
|||
|
|
}
|
|||
|
|
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
|
|||
|
|
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
|
|||
|
|
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
|||
|
|
}
|
|||
|
|
listEmisQuoteDispArea(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
|||
|
|
response.rows.forEach(item =>{
|
|||
|
|
var optItem={value:item.areaId,label:item.areaName};
|
|||
|
|
this.dispAreaIdsOptions.push(optItem)
|
|||
|
|
this.loading = false;
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
getSendList() {
|
|||
|
|
this.loading = true;
|
|||
|
|
this.queryParams.params = {};
|
|||
|
|
this.sendAreaIdsOptions = [];
|
|||
|
|
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
|||
|
|
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
|||
|
|
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
|||
|
|
}
|
|||
|
|
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
|
|||
|
|
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
|
|||
|
|
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
|||
|
|
}
|
|||
|
|
listEmisQuoteSendArea(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
|||
|
|
response.rows.forEach(item =>{
|
|||
|
|
var optItem={value:item.areaId,label:item.areaName};
|
|||
|
|
this.sendAreaIdsOptions.push(optItem)
|
|||
|
|
this.loading = false;
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
// 取消按钮
|
|||
|
|
cancel() {
|
|||
|
|
this.open = false;
|
|||
|
|
this.reset();
|
|||
|
|
},
|
|||
|
|
// 取消按钮
|
|||
|
|
cancelArea() {
|
|||
|
|
this.openArea = false;
|
|||
|
|
},
|
|||
|
|
handleConfirm(){
|
|||
|
|
if(this.formulaType==1){
|
|||
|
|
var tTree = {maxCalculationRange:this.formFormula.maxCalculationRange,minCalculationRange:this.formFormula.minCalculationRange,formula:this.formFormula.minCalculationRange+"<=<"+this.formFormula.maxCalculationRange,calculationRange:this.formFormula.calculationRange,sort:this.formFormula.sort,firstWeight:this.formFormula.firstWeight,continueWeight:this.formFormula.continueWeight};
|
|||
|
|
this.formFormulaArr.push(tTree);
|
|||
|
|
this.openFormula = false;
|
|||
|
|
this.formFormula = {};
|
|||
|
|
}else{
|
|||
|
|
this.currentRow.formula = this.formFormula.minCalculationRange+"<=<"+this.formFormula.maxCalculationRange;
|
|||
|
|
this.openFormula = false;
|
|||
|
|
this.formFormula = {};
|
|||
|
|
}
|
|||
|
|
this.form.formFormulaArr = this.formFormulaArr;
|
|||
|
|
},
|
|||
|
|
handleCancel(){
|
|||
|
|
this.openFormula = false;
|
|||
|
|
},
|
|||
|
|
submitFormArea(){
|
|||
|
|
//console.log(this.formArea.areaName);
|
|||
|
|
if(this.formArea.areaName == undefined){
|
|||
|
|
this.$modal.msgSuccess("报价区域名称不能为空!");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
if (Array.isArray(this.areaBaseArr) && this.areaBaseArr.length === 0&&this.formArea.areaType != 'all') {
|
|||
|
|
this.$modal.msgSuccess("网点不能为空!");
|
|||
|
|
}
|
|||
|
|
var siteNameStr = "";
|
|||
|
|
var siteCodeStr = "";
|
|||
|
|
const date = new Date();
|
|||
|
|
const year = date.getFullYear();
|
|||
|
|
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|||
|
|
const day = date.getDate().toString().padStart(2, '0');
|
|||
|
|
const hour = date.getHours().toString().padStart(2, '0');
|
|||
|
|
const minute = date.getMinutes().toString().padStart(2, '0');
|
|||
|
|
const second = date.getSeconds().toString().padStart(2, '0');
|
|||
|
|
const currentTime = `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
|||
|
|
//console.log(this.formArea.areaType);
|
|||
|
|
if(this.formArea.areaType != 'all'){
|
|||
|
|
this.areaBaseArr.map((res) => {
|
|||
|
|
//console.log(res);
|
|||
|
|
siteNameStr+=res.siteName+",";
|
|||
|
|
siteCodeStr+=res.siteCode+",";
|
|||
|
|
});
|
|||
|
|
if (siteNameStr.charAt(siteNameStr.length - 1) === ",") {
|
|||
|
|
siteNameStr = siteNameStr.slice(0, -1);
|
|||
|
|
}
|
|||
|
|
if (siteCodeStr.charAt(siteCodeStr.length - 1) === ",") {
|
|||
|
|
siteCodeStr = siteCodeStr.slice(0, -1);
|
|||
|
|
}
|
|||
|
|
var tTree = {"feeType":"运输费","useSiteCode":siteCodeStr,"useSite":siteNameStr,"areaType":"网点","siteName":siteNameStr,"siteCodeStr":siteCodeStr,"flowType":"运输费","areaName":this.formArea.areaName,"creatTime":currentTime};
|
|||
|
|
this.areaArr.push(tTree);
|
|||
|
|
}else{
|
|||
|
|
var tTree = {"feeType":"运输费","useSiteCode":"00000","useSite":"全部","areaType":"全部","siteName":"全部","siteCodeStr":"00000","flowType":"运输费","areaName":this.formArea.areaName,"creatTime":currentTime};
|
|||
|
|
this.areaArr.push(tTree);
|
|||
|
|
}
|
|||
|
|
//保存数据赋值
|
|||
|
|
if(this.areaType==1){
|
|||
|
|
this.sendForm = tTree;
|
|||
|
|
//submitSendForm();
|
|||
|
|
}else{
|
|||
|
|
this.disForm = tTree;
|
|||
|
|
//submitDispForm();
|
|||
|
|
}
|
|||
|
|
//this.openArea = false;
|
|||
|
|
this.formArea = {};
|
|||
|
|
this.areaBaseArr = [];
|
|||
|
|
},
|
|||
|
|
// 表单重置
|
|||
|
|
reset() {
|
|||
|
|
this.form = {
|
|||
|
|
quoteId: null,
|
|||
|
|
quoteName: null,
|
|||
|
|
quoteCode: null,
|
|||
|
|
useSiteCode: null,
|
|||
|
|
useSite: null,
|
|||
|
|
transLineCode: null,
|
|||
|
|
transLine: null,
|
|||
|
|
feeType: null,
|
|||
|
|
prodCode: null,
|
|||
|
|
prodName: null,
|
|||
|
|
soonPieceType: null,
|
|||
|
|
recPayType: null,
|
|||
|
|
billType: null,
|
|||
|
|
otherType1: null,
|
|||
|
|
otherType2: null,
|
|||
|
|
carryType: null,
|
|||
|
|
status: null,
|
|||
|
|
dispAreaId: null,
|
|||
|
|
dispAreaSite: null,
|
|||
|
|
dispAreaName: null,
|
|||
|
|
dispAreaSiteId: null,
|
|||
|
|
sendAreaId: null,
|
|||
|
|
sendAreaName: null,
|
|||
|
|
sendAreaSite: null,
|
|||
|
|
sendAreaSiteId: null,
|
|||
|
|
carriesNumber: null,
|
|||
|
|
discardsNumber: null,
|
|||
|
|
leastPrice: null,
|
|||
|
|
priceType: null,
|
|||
|
|
startDate: null,
|
|||
|
|
endDate: null,
|
|||
|
|
priorityLevel: null,
|
|||
|
|
remark: null,
|
|||
|
|
tenantId: null,
|
|||
|
|
delFlag: null,
|
|||
|
|
createBy: null,
|
|||
|
|
createTime: null,
|
|||
|
|
updateBy: null,
|
|||
|
|
updateTime: null,
|
|||
|
|
createSite: null,
|
|||
|
|
updateSite: null
|
|||
|
|
};
|
|||
|
|
this.resetForm("form");
|
|||
|
|
},
|
|||
|
|
/** 搜索按钮操作 */
|
|||
|
|
handleQuery() {
|
|||
|
|
this.queryParams.pageNum = 1;
|
|||
|
|
this.getList();
|
|||
|
|
},
|
|||
|
|
/** 重置按钮操作 */
|
|||
|
|
resetQuery() {
|
|||
|
|
this.resetForm("queryForm");
|
|||
|
|
this.handleQuery();
|
|||
|
|
},
|
|||
|
|
// 多选框选中数据
|
|||
|
|
handleSelectionChange(selection) {
|
|||
|
|
this.ids = selection.map(item => item.quoteId)
|
|||
|
|
this.single = selection.length!==1
|
|||
|
|
this.multiple = !selection.length
|
|||
|
|
},
|
|||
|
|
handleSelectionSiteChange(selection) {
|
|||
|
|
this.ids = selection.map(item => item.baseSiteId)
|
|||
|
|
console.log(this.ids);
|
|||
|
|
this.single = selection.length!==1
|
|||
|
|
this.multiple = !selection.length
|
|||
|
|
},
|
|||
|
|
/** 新增按钮操作 */
|
|||
|
|
handleAdd(row) {
|
|||
|
|
this.reset();
|
|||
|
|
this.open = true;
|
|||
|
|
this.title = "新增运输费";
|
|||
|
|
this.getDispList();
|
|||
|
|
this.getSendList();
|
|||
|
|
// 子组件打开模式
|
|||
|
|
// if(row != undefined){
|
|||
|
|
// this.currentParentQuoteId = row.quoteId
|
|||
|
|
// }
|
|||
|
|
// this.openEmisQuotePrice = true;
|
|||
|
|
// this.titleEmisQuotePrice = "新增";
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
handleAddFormula(){
|
|||
|
|
this.openFormula = true;
|
|||
|
|
this.formulaType = 1;
|
|||
|
|
this.title = "新增公式";
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
/** 新增按钮操作 */
|
|||
|
|
addArea(areaType) {
|
|||
|
|
this.openArea = true;
|
|||
|
|
this.title = "新增区域";
|
|||
|
|
this.areaType = areaType;
|
|||
|
|
},
|
|||
|
|
addAreaConfirm(){
|
|||
|
|
var quoteAreaNameStr = "";
|
|||
|
|
this.areaArr.map((res) => {
|
|||
|
|
quoteAreaNameStr+=res.areaName+",";
|
|||
|
|
});
|
|||
|
|
if (quoteAreaNameStr.charAt(quoteAreaNameStr.length - 1) === ",") {
|
|||
|
|
quoteAreaNameStr = quoteAreaNameStr.slice(0, -1);
|
|||
|
|
}
|
|||
|
|
if(this.areaType==1){
|
|||
|
|
this.form.sendAreaText = quoteAreaNameStr;
|
|||
|
|
this.form.sendArea = this.areaArr;
|
|||
|
|
}else{
|
|||
|
|
this.form.dispAreaText = quoteAreaNameStr;
|
|||
|
|
this.form.dispArea = this.areaArr;
|
|||
|
|
}
|
|||
|
|
this.areaArr = [];
|
|||
|
|
this.openArea = false;
|
|||
|
|
},
|
|||
|
|
handleShowMoreInput(){
|
|||
|
|
this.moreInputVisible = !this.moreInputVisible;
|
|||
|
|
},
|
|||
|
|
/** 修改按钮操作 */
|
|||
|
|
handleUpdate(row) {
|
|||
|
|
this.reset();
|
|||
|
|
const quoteId = row.quoteId || this.ids
|
|||
|
|
getEmisQuotePrice(quoteId).then(response => {
|
|||
|
|
this.form = response.data;
|
|||
|
|
this.open = true;
|
|||
|
|
this.title = "编辑运输费";
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
// 子组件打开模式
|
|||
|
|
// this.currentQuoteId= row.quoteId || this.ids;
|
|||
|
|
// this.openEmisQuotePrice = true;
|
|||
|
|
// this.titleEmisQuotePrice = "修改";
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
handleView(row) {
|
|||
|
|
this.quoteId=row.quoteId;
|
|||
|
|
this.titleView="查看";
|
|||
|
|
this.openView=true;
|
|||
|
|
// this.router.push({ path: '/emis/emisQuotePrice/viewDetail', query: { quoteId: row.quoteId }})
|
|||
|
|
},
|
|||
|
|
/** 提交按钮 */
|
|||
|
|
submitForm() {
|
|||
|
|
this.$refs["form"].validate(valid => {
|
|||
|
|
if (valid) {
|
|||
|
|
if (this.form.quoteId != null) {
|
|||
|
|
updateEmisQuotePrice(this.form).then(response => {
|
|||
|
|
this.$modal.msgSuccess("修改成功");
|
|||
|
|
this.open = false;
|
|||
|
|
this.getList();
|
|||
|
|
});
|
|||
|
|
} else {
|
|||
|
|
addEmisQuotePrice(this.form).then(response => {
|
|||
|
|
this.$modal.msgSuccess("新增成功");
|
|||
|
|
this.open = false;
|
|||
|
|
this.getList();
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
/** 提交按钮 */
|
|||
|
|
submitSendForm() {
|
|||
|
|
if (this.sendForm.areaId != null) {
|
|||
|
|
updateEmisQuoteSendArea(this.form).then(response => {
|
|||
|
|
this.$modal.msgSuccess("修改成功");
|
|||
|
|
this.open = false;
|
|||
|
|
this.getSendList();
|
|||
|
|
});
|
|||
|
|
} else {
|
|||
|
|
addEmisQuoteSendArea(this.sendForm).then(response => {
|
|||
|
|
this.$modal.msgSuccess("新增成功");
|
|||
|
|
this.open = false;
|
|||
|
|
this.getSendList();
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
/** 提交按钮 */
|
|||
|
|
submitDispForm() {
|
|||
|
|
if (this.disForm.areaId != null) {
|
|||
|
|
updateEmisQuoteDispArea(this.dispForm).then(response => {
|
|||
|
|
this.$modal.msgSuccess("修改成功");
|
|||
|
|
this.open = false;
|
|||
|
|
this.getDispList();
|
|||
|
|
});
|
|||
|
|
} else {
|
|||
|
|
addEmisQuoteDispArea(this.dispForm).then(response => {
|
|||
|
|
this.$modal.msgSuccess("新增成功");
|
|||
|
|
this.open = false;
|
|||
|
|
this.getDispList();
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
handleFormChanged(){
|
|||
|
|
this.openForm = false;
|
|||
|
|
this.getList();
|
|||
|
|
},
|
|||
|
|
cancelForm(){
|
|||
|
|
this.openForm = false;
|
|||
|
|
},
|
|||
|
|
/** 删除按钮操作 */
|
|||
|
|
handleDelete(row) {
|
|||
|
|
const quoteIds = row.quoteId || this.ids;
|
|||
|
|
this.$modal.confirm('是否确认删除').then(function() {
|
|||
|
|
return delEmisQuotePrice(quoteIds);
|
|||
|
|
}).then(() => {
|
|||
|
|
this.getList();
|
|||
|
|
this.$modal.msgSuccess("删除成功");
|
|||
|
|
}).catch(() => {});
|
|||
|
|
},
|
|||
|
|
/** 导出按钮操作 */
|
|||
|
|
handleExport() {
|
|||
|
|
// this.download('emis/emisQuotePrice/export', {
|
|||
|
|
// ...this.queryParams
|
|||
|
|
// }, `emisQuotePrice_${new Date().getTime()}.xlsx`)
|
|||
|
|
const loadingInstance = this.$loading({
|
|||
|
|
text: '正在导出...'
|
|||
|
|
})
|
|||
|
|
var qParam = {...this.queryParams};
|
|||
|
|
qParam.pageNum=1;
|
|||
|
|
qParam.pageSize=5000;
|
|||
|
|
|
|||
|
|
listEmisQuotePrice(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
|||
|
|
this.downloadLoading = false
|
|||
|
|
if (response.code === 200) {
|
|||
|
|
const curList = response.rows
|
|||
|
|
import('@/vendor/Export2Excel').then(excel => {
|
|||
|
|
const tHeader = ['序号','报价名称','报价编码','使用站点代码','使用站点名称','所属线路代码','所属线路名称','费用类型','产品类型代码','产品类型名称','soon_piece_type','录入付款类型','计费类型','其他类型1','其他类型2','取重方式','启用状态','派件区域','派件区域站点','派件区域名称','派件区域站点id','寄件区域','寄件区域名称','寄件区域站点列表','寄件区域站点列表','carries_number','discards_number','最低价格','价格取值','开始日期','结束日期','优先级','备注','租户ID','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建网点','更新网点',];
|
|||
|
|
const filterVal = ['quoteId','quoteName','quoteCode','useSiteCode','useSite','transLineCode','transLine','feeType','prodCode','prodName','soonPieceType','recPayType','billType','otherType1','otherType2','carryType','status','dispAreaId','dispAreaSite','dispAreaName','dispAreaSiteId','sendAreaId','sendAreaName','sendAreaSite','sendAreaSiteId','carriesNumber','discardsNumber','leastPrice','priceType','startDate','endDate','priorityLevel','remark','tenantId','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
|
|||
|
|
const data = this.formatJson(filterVal, curList, response.rows)
|
|||
|
|
excel.export_json_to_excel({
|
|||
|
|
header: tHeader,
|
|||
|
|
data,
|
|||
|
|
filename: '费用报价',
|
|||
|
|
autoWidth: true
|
|||
|
|
})
|
|||
|
|
loadingInstance.close()
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
formatJson(filterVal, jsonData, resData) {
|
|||
|
|
let index = 0
|
|||
|
|
return jsonData.map(v => filterVal.map(j => {
|
|||
|
|
if (j === 'index') {
|
|||
|
|
return ++index
|
|||
|
|
}
|
|||
|
|
if (j === 'status') {
|
|||
|
|
var statusStr='xxx'
|
|||
|
|
if(v[j] == 10){
|
|||
|
|
statusStr='xxx'
|
|||
|
|
}
|
|||
|
|
return statusStr;
|
|||
|
|
}
|
|||
|
|
return v[j]
|
|||
|
|
}))
|
|||
|
|
},
|
|||
|
|
/** 列索引函数 */
|
|||
|
|
getIndex($index) {
|
|||
|
|
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
|||
|
|
},
|
|||
|
|
/** 时间搜索响应函数 */
|
|||
|
|
dateTimeChange(value){
|
|||
|
|
this.dateTimeRange=value;
|
|||
|
|
},
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
<style scoped>
|
|||
|
|
.el-divider{
|
|||
|
|
margin-top: 0px;
|
|||
|
|
background: 0 0;
|
|||
|
|
border-top: 1px solid #E6EBF5;
|
|||
|
|
}
|
|||
|
|
.el-divider__text {
|
|||
|
|
color: #0955ee;
|
|||
|
|
cursor: pointer;
|
|||
|
|
}
|
|||
|
|
</style>
|