md
This commit is contained in:
parent
133bc31d21
commit
8ac4dd4f42
51
src/directive/dialog/fullScreen.js
Normal file
51
src/directive/dialog/fullScreen.js
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
|
||||||
|
function handleFullScreen (dialog, isFullScreen, marginTop, width) {
|
||||||
|
if (!dialog) return false
|
||||||
|
if (isFullScreen) {
|
||||||
|
dialog.style.marginTop = '0'
|
||||||
|
dialog.style.position = 'absolute'
|
||||||
|
dialog.style.top = '0px'
|
||||||
|
dialog.style.bottom = '0px'
|
||||||
|
dialog.style.left = '0px'
|
||||||
|
dialog.style.width = '100%'
|
||||||
|
} else {
|
||||||
|
dialog.style.marginTop = marginTop
|
||||||
|
dialog.style.width = width
|
||||||
|
dialog.style.position = 'relative'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
bind(el, binding, vnode, oldVnode) {
|
||||||
|
let isFullScreen = false
|
||||||
|
|
||||||
|
const dialog = el.querySelector('.el-dialog')
|
||||||
|
const header = el.querySelector('.el-dialog__header')
|
||||||
|
if (!header || !dialog || !vnode) return
|
||||||
|
header.style.paddingRight = '43px'
|
||||||
|
header.style.boxShadow = '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)'
|
||||||
|
const { width, top } = vnode.componentInstance
|
||||||
|
|
||||||
|
const fullScreenBtn = document.createElement('button')
|
||||||
|
fullScreenBtn.type = 'button'
|
||||||
|
fullScreenBtn.style = 'float:right;padding:0;background: 0 0;border:0;outline:0;cursor:pointer;font-size:16px;'
|
||||||
|
|
||||||
|
const fullScreenIcon = document.createElement('i')
|
||||||
|
fullScreenIcon.className = 'el-icon el-icon-full-screen'
|
||||||
|
fullScreenBtn.append(fullScreenIcon)
|
||||||
|
|
||||||
|
fullScreenBtn.addEventListener('click', () => {
|
||||||
|
isFullScreen = !isFullScreen
|
||||||
|
handleFullScreen(dialog, isFullScreen, top, width)
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
|
||||||
|
header.append(fullScreenBtn)
|
||||||
|
|
||||||
|
header.addEventListener('dblclick', () => {
|
||||||
|
isFullScreen = !isFullScreen
|
||||||
|
handleFullScreen(dialog, isFullScreen, top, width)
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
};
|
||||||
57
src/directive/dialog/fullScreen_old.js
Normal file
57
src/directive/dialog/fullScreen_old.js
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/**
|
||||||
|
* 全屏
|
||||||
|
*/
|
||||||
|
function handleFullScreen (dialog, isFullScreen, marginTop, width) {
|
||||||
|
if (!dialog) return false
|
||||||
|
if (isFullScreen) {
|
||||||
|
dialog.style.marginTop = '0'
|
||||||
|
dialog.style.position = 'absolute'
|
||||||
|
dialog.style.top = '0px'
|
||||||
|
dialog.style.bottom = '0px'
|
||||||
|
dialog.style.left = '0px'
|
||||||
|
dialog.style.width = '100%'
|
||||||
|
} else {
|
||||||
|
dialog.style.marginTop = marginTop
|
||||||
|
dialog.style.width = width
|
||||||
|
dialog.style.position = 'relative'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const fullScreenDirective = Vue => {
|
||||||
|
Vue.directive('fullScreen', {
|
||||||
|
bind: function (el, binding, vnode) {
|
||||||
|
let isFullScreen = false
|
||||||
|
|
||||||
|
const dialog = el.querySelector('.el-dialog')
|
||||||
|
const header = el.querySelector('.el-dialog__header')
|
||||||
|
if (!header || !dialog || !vnode) return
|
||||||
|
header.style.paddingRight = '43px'
|
||||||
|
header.style.boxShadow = '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)'
|
||||||
|
const { width, top } = vnode.componentInstance
|
||||||
|
|
||||||
|
const fullScreenBtn = document.createElement('button')
|
||||||
|
fullScreenBtn.type = 'button'
|
||||||
|
fullScreenBtn.style = 'float:right;padding:0;background: 0 0;border:0;outline:0;cursor:pointer;font-size:16px;'
|
||||||
|
|
||||||
|
const fullScreenIcon = document.createElement('i')
|
||||||
|
fullScreenIcon.className = 'el-icon el-icon-full-screen'
|
||||||
|
fullScreenBtn.append(fullScreenIcon)
|
||||||
|
|
||||||
|
fullScreenBtn.addEventListener('click', () => {
|
||||||
|
isFullScreen = !isFullScreen
|
||||||
|
handleFullScreen(dialog, isFullScreen, top, width)
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
|
||||||
|
header.append(fullScreenBtn)
|
||||||
|
|
||||||
|
header.addEventListener('dblclick', () => {
|
||||||
|
isFullScreen = !isFullScreen
|
||||||
|
handleFullScreen(dialog, isFullScreen, top, width)
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default fullScreenDirective
|
||||||
628
src/views/emis/emisQuotePrice/vipTransQuotePriceForm.vue
Normal file
628
src/views/emis/emisQuotePrice/vipTransQuotePriceForm.vue
Normal file
@ -0,0 +1,628 @@
|
|||||||
|
<template>
|
||||||
|
<div >
|
||||||
|
<el-row :gutter="0" type='flex'>
|
||||||
|
<el-form ref="form" size="mini" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-col :span="6" :xs="6" style="border-right: 1px solid #f3f3f3;padding-right: 5px;">
|
||||||
|
<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="country">
|
||||||
|
<CountryPicker :placeholder="$t('所属国家')" v-model="form.country" ></CountryPicker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="使用网点" prop="useSiteCode">
|
||||||
|
<EmisSiteSimplePicker v-if="ownerSiteCode == '88888'" v-model="form.useSiteCode" :placeholder="$t('使用网点')" isInitiated="true" @onChange="onUseSiteChange" @onClear="onUseSiteChange"></EmisSiteSimplePicker>
|
||||||
|
<el-input v-else v-model="ownerSiteName" placeholder="寄件网点" disabled />
|
||||||
|
|
||||||
|
<!-- <div v-if="ownerSiteCode == 88888">
|
||||||
|
<EmisSiteSimplePicker v-model="form.useSiteCode" :placeholder="$t('使用网点')" siteType="2" isInitiated="true" :disabled="false" ></EmisSiteSimplePicker>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<EmisSiteSimplePicker v-model="form.useSiteCode" :placeholder="$t('使用网点')" siteType="2" isInitiated="true" :disabled="true" ></EmisSiteSimplePicker>
|
||||||
|
</div> -->
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="线路" prop="transLineCode">
|
||||||
|
<TransLinePicker v-model="form.transLineCode" isInitiated="true"></TransLinePicker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="产品类型" prop="prodCode">
|
||||||
|
<TransProductPicker placeholder="产品类型" v-model="form.prodCode" :transLineCode="form.transLineCode"></TransProductPicker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="最低价格" prop="leastPrice">
|
||||||
|
<el-input v-model="form.leastPrice" placeholder="最低价格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="价格取值" prop="priceType">
|
||||||
|
<el-select v-model="form.priceType" placeholder="价格取值">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.emis_price_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="开始日期" prop="startDate">
|
||||||
|
<el-date-picker
|
||||||
|
style="width:100%"
|
||||||
|
clearable
|
||||||
|
v-model="form.startDate"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
default-time = "00:00:00"
|
||||||
|
placeholder="请选择开始日期"
|
||||||
|
@change="onStartDateChange"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="结束日期" prop="endDate">
|
||||||
|
<el-date-picker
|
||||||
|
style="width:100%"
|
||||||
|
clearable
|
||||||
|
v-model="form.endDate"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
default-time = "23:59:59"
|
||||||
|
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 label="1" >重量计费</el-radio>
|
||||||
|
<el-radio label="2">体积计费</el-radio>
|
||||||
|
<el-radio label="3">一口价</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="启用状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio :label="1">启用</el-radio>
|
||||||
|
<el-radio :label="0">停用</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="费用类型" prop="feeType">
|
||||||
|
<el-select v-model="form.feeType" placeholder="费用类型" v-if="chargeType != 1" >
|
||||||
|
<el-option
|
||||||
|
v-for="dict of dict.type.emis_fee_type.filter(el=> el.value != 1001)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-select v-model="form.feeType" placeholder="费用类型" disabled v-if="chargeType == 1" >
|
||||||
|
<el-option
|
||||||
|
v-for="dict of dict.type.emis_fee_type.filter(el=> el.value == 1001)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="18" :xs="18">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12" :xs="12" style="padding: 5px;">
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-form-item label="寄件区域" prop="sendAreaId">
|
||||||
|
<el-select v-model="form.sendAreaId" placeholder="寄件区域" clearable @change="onSendAreaChange">
|
||||||
|
<el-option
|
||||||
|
v-for="item in emisQuoteSendAreaList"
|
||||||
|
:key="item.areaId"
|
||||||
|
:label="item.areaName"
|
||||||
|
:value="item.areaId*1"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
@click="handelSelectSendArea()"
|
||||||
|
:disabled="!form.useSiteCode"
|
||||||
|
>新增区域</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="" prop="sendAreaSite" label-width="0px" style="margin-bottom: 0px;">
|
||||||
|
<el-input v-model="form.sendAreaSite" rows="6" type="textarea" placeholder="" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" :xs="12" style="padding: 5px;">
|
||||||
|
<el-row :gutter="0">
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-form-item label="派件区域" prop="dispAreaId" >
|
||||||
|
<el-select v-model="form.dispAreaId" placeholder="派件区域" clearable @change="onDispAreaChange">
|
||||||
|
<el-option
|
||||||
|
v-for="item in emisQuoteDispAreaList"
|
||||||
|
:key="item.areaId"
|
||||||
|
:label="item.areaName"
|
||||||
|
:value="item.areaId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
:disabled="!form.useSiteCode"
|
||||||
|
@click="handelSelectDispArea()"
|
||||||
|
>新增区域</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="" prop="dispAreaSite" label-width="0px" style="margin-bottom: 0px;">
|
||||||
|
<el-input v-model="form.dispAreaSite" rows="6" type="textarea" placeholder="" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24" :xs="24" style="padding: 10px;">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<!-- 计算公式规则 -->
|
||||||
|
<el-alert
|
||||||
|
title="计算公式规则"
|
||||||
|
type="info"
|
||||||
|
description="说明: 计算公式中只能包含(w,数字,+,-,*,/),示例:0-1公斤 首重5元 ;1-3 公斤 每公斤2元加上首重,计算公式: 5+(w-1)*2输入完重量后回车跳转到表达式,输入完表达式后回车可以快速新增下一条公式"
|
||||||
|
show-icon
|
||||||
|
:closable="false"
|
||||||
|
style="margin-bottom: 10px;"
|
||||||
|
>
|
||||||
|
</el-alert>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<!-- <div style="max-height:200px;overflow-y: auto;"> -->
|
||||||
|
<!-- @onChange="onQuoteExpressionChange" -->
|
||||||
|
<QuoteExpressionPanel :quoteId="form.quoteId" :isCopy="isCopy" style="width:100%" v-model="form.exprList"></QuoteExpressionPanel>
|
||||||
|
<!-- </div> -->
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-dialog :title="titleSendAreaForm" :visible.sync="openSendAreaForm" width="90%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||||
|
<QuoteSendAreaPanel :useSiteCode="form.useSiteCode" :useSiteName="form.useSite" :feeType="form.feeType" @on-changed="handleSendAreaFormChanged" @on-cancel="cancelSendAreaForm"></QuoteSendAreaPanel>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog :title="titleDispAreaForm" :visible.sync="openDispAreaForm" width="90%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||||
|
<QuoteDispAreaPanel :useSiteCode="form.useSiteCode" :useSiteName="form.useSite" :feeType="form.feeType" @on-changed="handleDispAreaFormChanged" @on-cancel="cancelDispAreaForm"></QuoteDispAreaPanel>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<div style="text-align: center;margin-bottom: 10px;">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import { listEmisQuoteSendArea, getEmisQuoteSendArea, delEmisQuoteSendArea, addEmisQuoteSendArea, updateEmisQuoteSendArea } from "@/api/emis/emisQuoteSendArea";
|
||||||
|
import { listEmisQuotePrice, getEmisQuotePrice, delEmisQuotePrice, addEmisQuotePrice, updateEmisQuotePrice } from "@/api/emis/emisQuotePrice";
|
||||||
|
import { listEmisQuoteDispArea, getEmisQuoteDispArea, delEmisQuoteDispArea, addEmisQuoteDispArea, updateEmisQuoteDispArea } from "@/api/emis/emisQuoteDispArea";
|
||||||
|
import {checkRole} from '@/utils/permission'
|
||||||
|
import {addDateTimeByDay,dateToStr} from '@/utils/custom'
|
||||||
|
|
||||||
|
import CountryPicker from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
||||||
|
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||||
|
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
|
||||||
|
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
|
||||||
|
|
||||||
|
import QuoteExpressionPanel from '@/views/emis/emisQuoteExpression/quoteExpressionPanel.vue';
|
||||||
|
import QuoteSendAreaPanel from '@/views/emis/emisQuoteSendArea/sendAreaPanel.vue';
|
||||||
|
import QuoteDispAreaPanel from '@/views/emis/emisQuoteDispArea/dispAreaPanel.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "emisQuotePriceForm",
|
||||||
|
props:{
|
||||||
|
quoteId:{
|
||||||
|
type:[Number,Array]
|
||||||
|
},
|
||||||
|
isCopy:{
|
||||||
|
type:Boolean
|
||||||
|
},
|
||||||
|
chargeType:{
|
||||||
|
type:[Number,String]
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
CountryPicker,EmisSiteSimplePicker,TransLinePicker,
|
||||||
|
TransProductPicker,QuoteExpressionPanel,
|
||||||
|
QuoteSendAreaPanel,QuoteDispAreaPanel
|
||||||
|
},
|
||||||
|
dicts: ['emis_price_type','emis_fee_type'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
emisQuotePriceOptions: [],
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
|
||||||
|
emisQuoteSendAreaList:[],
|
||||||
|
emisQuoteDispAreaList:[],
|
||||||
|
|
||||||
|
// sendAreaIdsOptions:[],
|
||||||
|
// dispAreaIdsOptions:[],
|
||||||
|
|
||||||
|
openSendAreaForm:false,
|
||||||
|
titleSendAreaForm:'',
|
||||||
|
|
||||||
|
openDispAreaForm:false,
|
||||||
|
titleDispAreaForm:'',
|
||||||
|
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
quoteName: [
|
||||||
|
{ required: true, message: "报价名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
useSiteCode: [
|
||||||
|
{ required: true, message: "使用站点不能为空", trigger: ["blur",'change'] }
|
||||||
|
],
|
||||||
|
transLineCode: [
|
||||||
|
{ required: true, message: "线路不能为空", trigger: ["blur",'change'] }
|
||||||
|
],
|
||||||
|
prodCode: [
|
||||||
|
{ required: true, message: "产品不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
leastPrice: [
|
||||||
|
{ required: true, message: "最低价格不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
priceType: [
|
||||||
|
{ required: true, message: "价格取值不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
startDate: [
|
||||||
|
{ required: true, message: "开始日期不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
endDate: [
|
||||||
|
{ required: true, message: "结束日期不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
billType: [
|
||||||
|
{ required: true, message: "计费类型不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
status: [
|
||||||
|
{ required: true, message: "启用类型不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
dispAreaId: [
|
||||||
|
{ required: true, message: "派件区域不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
sendAreaId: [
|
||||||
|
{ required: true, message: "寄件区域不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
// startDate: [
|
||||||
|
// { required: true, message: "价格取值不能为空", trigger: "blur" }
|
||||||
|
// ],
|
||||||
|
// startDate: [
|
||||||
|
// { required: true, message: "价格取值不能为空", trigger: "blur" }
|
||||||
|
// ],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// useSite: [
|
||||||
|
// { required: true, message: "使用站点名称不能为空", trigger: "blur" }
|
||||||
|
// ],
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
'ownerSiteCode',
|
||||||
|
'ownerSiteName',
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
"quoteId": {
|
||||||
|
handler (newValue, oldValue) {
|
||||||
|
this.quoteId = newValue;
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
isCopy(newValue, oldValue){
|
||||||
|
console.log(this.isCopy)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
|
||||||
|
console.log(this.ownerSiteCode);
|
||||||
|
this.initData();
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData() {
|
||||||
|
if(this.quoteId !=null) {
|
||||||
|
this.loading = true;
|
||||||
|
getEmisQuotePrice(this.quoteId).then(response => {
|
||||||
|
this.form.useSiteCode=this.ownerSiteCode;
|
||||||
|
this.form = response.data;
|
||||||
|
if(this.isCopy){
|
||||||
|
this.form.quoteName=this.form.quoteName+"_Copy"
|
||||||
|
console.log(this.form);
|
||||||
|
// this.form.transLineCode=response.data.transLineCode;
|
||||||
|
// console.log(this.form);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.loading = false;
|
||||||
|
this.initSendAreaList();
|
||||||
|
this.initDispAreaList();
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.reset();
|
||||||
|
this.form.billType='1';
|
||||||
|
if(this.chargeType == 1){
|
||||||
|
this.form.feeType='1001';
|
||||||
|
}else{
|
||||||
|
this.form.feeType='9999';
|
||||||
|
}
|
||||||
|
this.form.useSiteCode=this.ownerSiteCode;
|
||||||
|
this.initSendAreaList();
|
||||||
|
this.initDispAreaList();
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onStartDateChange(){
|
||||||
|
this.form.endDate=dateToStr(addDateTimeByDay(this.form.startDate,365));
|
||||||
|
console.log(this.form.endDate);
|
||||||
|
},
|
||||||
|
onUseSiteChange(item){
|
||||||
|
if(item!=null){
|
||||||
|
this.form.useSite = item.siteName;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.initSendAreaList();
|
||||||
|
this.initDispAreaList();
|
||||||
|
|
||||||
|
},
|
||||||
|
// 初始化寄件区域
|
||||||
|
initSendAreaList() {
|
||||||
|
this.loading = true;
|
||||||
|
let queryParams = {};
|
||||||
|
if(this.form.useSiteCode&&this.form.useSiteCode!=''){
|
||||||
|
queryParams = {
|
||||||
|
useSiteCode: this.form.useSiteCode,
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
this.emisQuoteSendAreaList=[]
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
listEmisQuoteSendArea(queryParams).then(response => {
|
||||||
|
this.emisQuoteSendAreaList = response.rows;
|
||||||
|
if(this.form.sendAreaId != null){
|
||||||
|
this.emisQuoteSendAreaList.forEach(item=>{
|
||||||
|
if(this.form.sendAreaId==item.areaId){
|
||||||
|
this.form.sendAreaName=item.areaName;
|
||||||
|
this.form.sendAreaSiteCode=item.areaSiteCode;
|
||||||
|
this.form.sendAreaSite=item.areaSite;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
initDispAreaList(){
|
||||||
|
this.loading = true;
|
||||||
|
let queryParams =null;
|
||||||
|
if(this.form.useSiteCode&&this.form.useSiteCode!=''){
|
||||||
|
queryParams = {
|
||||||
|
useSiteCode: this.form.useSiteCode,
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
this.emisQuoteDispAreaList=[]
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
listEmisQuoteDispArea(queryParams).then(response => {
|
||||||
|
this.emisQuoteDispAreaList = response.rows;
|
||||||
|
if(this.form.dispAreaId != null){
|
||||||
|
this.emisQuoteDispAreaList.forEach(item=>{
|
||||||
|
if(this.form.dispAreaId==item.areaId){
|
||||||
|
this.form.dispAreaName=item.areaName;
|
||||||
|
this.form.dispAreaSiteCode=item.areaSiteCode;
|
||||||
|
this.form.dispAreaSite=item.areaSite;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 选择寄件区域
|
||||||
|
onSendAreaChange(){
|
||||||
|
if(this.form.sendAreaId != null){
|
||||||
|
this.emisQuoteSendAreaList.forEach(item=>{
|
||||||
|
if(this.form.sendAreaId==item.areaId){
|
||||||
|
this.form.sendAreaName=item.areaName;
|
||||||
|
this.form.sendAreaSiteCode=item.areaSiteCode;
|
||||||
|
this.form.sendAreaSite=item.areaSite;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 编辑寄件区域完成
|
||||||
|
handleSendAreaFormChanged(areaId){
|
||||||
|
this.form.sendAreaId = areaId;
|
||||||
|
this.initSendAreaList();
|
||||||
|
this.openSendAreaForm=false;
|
||||||
|
},
|
||||||
|
// 取消编辑寄件区域
|
||||||
|
cancelSendAreaForm(){
|
||||||
|
this.openSendAreaForm=false;
|
||||||
|
this.initSendAreaList();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 公式改变
|
||||||
|
onQuoteExpressionChange(item){
|
||||||
|
// console.log(item)
|
||||||
|
this.form.exprList = item;
|
||||||
|
},
|
||||||
|
// 打开寄件区域
|
||||||
|
handelSelectSendArea(){
|
||||||
|
this.titleSendAreaForm="寄件区域";
|
||||||
|
this.openSendAreaForm=true;
|
||||||
|
},
|
||||||
|
// 打开派件区域编辑
|
||||||
|
handelSelectDispArea(){
|
||||||
|
this.titleDispAreaForm="派件区域";
|
||||||
|
this.openDispAreaForm=true;
|
||||||
|
},
|
||||||
|
// 编辑派件区域完成
|
||||||
|
handleDispAreaFormChanged(areaId){
|
||||||
|
this.form.dispAreaId = areaId;
|
||||||
|
this.initDispAreaList();
|
||||||
|
this.openDispAreaForm=false;
|
||||||
|
},
|
||||||
|
// 取消编辑派件区域
|
||||||
|
cancelDispAreaForm(){
|
||||||
|
this.openDispAreaForm=false;
|
||||||
|
this.initDispAreaList();
|
||||||
|
},
|
||||||
|
// 选择派件区域
|
||||||
|
onDispAreaChange(){
|
||||||
|
if(this.form.dispAreaId != null){
|
||||||
|
this.emisQuoteDispAreaList.forEach(item=>{
|
||||||
|
if(this.form.dispAreaId==item.areaId){
|
||||||
|
this.form.dispAreaName=item.areaName;
|
||||||
|
this.form.dispAreaSiteCode=item.areaSiteCode;
|
||||||
|
this.form.dispAreaSite=item.areaSite;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.reset();
|
||||||
|
this.$emit("on-cancel");
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
quoteId: null,
|
||||||
|
quoteName: null,
|
||||||
|
quoteCode: null,
|
||||||
|
useSiteCode: null,
|
||||||
|
useSite: null,
|
||||||
|
transLineCode: null,
|
||||||
|
transLine: null,
|
||||||
|
feeType: null,
|
||||||
|
prodCode: null,
|
||||||
|
prodName: null,
|
||||||
|
recPayType: null,
|
||||||
|
billType: null,
|
||||||
|
otherType1: null,
|
||||||
|
otherType2: null,
|
||||||
|
carryType: null,
|
||||||
|
status: 1,
|
||||||
|
dispAreaId: null,
|
||||||
|
dispAreaName: null,
|
||||||
|
dispAreaSite: null,
|
||||||
|
dispAreaSiteCode: null,
|
||||||
|
dispAreaSiteId: null,
|
||||||
|
sendAreaId: null,
|
||||||
|
sendAreaName: null,
|
||||||
|
sendAreaSite: null,
|
||||||
|
sendAreaSiteCode: 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,
|
||||||
|
exprList:[],
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
// this.form.feeType='1001';
|
||||||
|
if (valid) {
|
||||||
|
|
||||||
|
// 复制的时候保存
|
||||||
|
if(this.isCopy){
|
||||||
|
this.form.quoteId=null;
|
||||||
|
addEmisQuotePrice(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("保存成功");
|
||||||
|
this.$emit("on-changed");
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if (this.form.quoteId != null) {
|
||||||
|
updateEmisQuotePrice(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.$emit("on-changed");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.form.quoteId=null;
|
||||||
|
addEmisQuotePrice(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("增加成功");
|
||||||
|
this.$emit("on-changed");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-dialog .el-dialog__body {
|
||||||
|
margin: 5px!important;
|
||||||
|
padding: 0;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
516
src/views/emis/emisQuotePrice/vipTransQuotePriceList.vue
Normal file
516
src/views/emis/emisQuotePrice/vipTransQuotePriceList.vue
Normal file
@ -0,0 +1,516 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> -->
|
||||||
|
<SearchForm :model="queryParams" ref="queryForm" size="small" :maxShow="20" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
||||||
|
|
||||||
|
<el-form-item label="报价名称" prop="quoteName" span="8">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.quoteName"
|
||||||
|
placeholder="报价名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
@input="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="线路" prop="transLineCode">
|
||||||
|
<TransLinePicker v-model="queryParams.transLineCode" isInitiated="true" @onChange="handleQuery"></TransLinePicker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品类型" prop="prodCode">
|
||||||
|
<TransProductPicker placeholder="产品类型" v-model="queryParams.prodCode" :transLineCode="queryParams.transLineCode" @onChange="handleQuery"></TransProductPicker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="使用网点" prop="useSiteCode">
|
||||||
|
<EmisSiteSimplePicker0 v-if="ownerSiteCode == 88888" v-model="queryParams.useSiteCode" :placeholder="$t('使用网点')" siteType="1" isInitiated="true" :disabled="false" ></EmisSiteSimplePicker0>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('寄件网点')" prop="sendAreaSiteCode">
|
||||||
|
<EmisSiteSimplePicker1 v-model="queryParams.sendAreaSiteCode" :placeholder="$t('寄件网点')" isInitiated="true" :disabled="false" @onChange="handleQuery"></EmisSiteSimplePicker1>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('派件区域')" prop="dispAreaName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.dispAreaName"
|
||||||
|
:placeholder="$t('派件区域')"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
@input="handleQuery"
|
||||||
|
/>
|
||||||
|
<!-- <EmisSiteSimplePicker v-model="queryParams.dispAreaSite" :placeholder="$t('派件区域')" isInitiated="true" :disabled="false" ></EmisSiteSimplePicker> -->
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="费用类型" prop="feeType">
|
||||||
|
<el-select v-model="queryParams.feeType" placeholder="费用类型" clearable @keyup.enter.native="handleQuery">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.emis_fee_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
|
||||||
|
<el-form-item label="报价状态" prop="quoteStatus">
|
||||||
|
<el-select v-model="queryParams.params.quoteStatus" placeholder="报价状态" clearable @change="handleQuery">
|
||||||
|
<el-option key="1" label="启用" :value="1"/>
|
||||||
|
<el-option key="2" label="停用" :value="2"/>
|
||||||
|
<el-option key="3" label="过期" :value="3"/>
|
||||||
|
<el-option key="4" label="启用且未过期的报价" :value="4"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('开始日期')" prop="startDate" >
|
||||||
|
<!-- default-time = "00:00:00"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
datetime
|
||||||
|
-->
|
||||||
|
<el-date-picker
|
||||||
|
style="width:100%"
|
||||||
|
clearable
|
||||||
|
v-model="queryParams.startDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择开始日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</SearchForm>
|
||||||
|
|
||||||
|
|
||||||
|
<XdTable
|
||||||
|
v-loading="loading"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
size="mini"
|
||||||
|
:data="emisQuotePriceList"
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
:total="total"
|
||||||
|
@queryTable="getList"
|
||||||
|
:queryParams="queryParams"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
@sort-change="handleSortChange"
|
||||||
|
>
|
||||||
|
<!-- <el-table v-loading="loading" :data="emisQuotePriceList" @selection-change="handleSelectionChange"> -->
|
||||||
|
|
||||||
|
<div slot="toolbar">
|
||||||
|
<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="warning"
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleCopy"
|
||||||
|
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> -->
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<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="报价ID" align="center" prop="quoteId" width="80" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.quoteId}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column label="报价名称" align="left" prop="quoteName" :show-overflow-tooltip="true" width="350" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="link-type" @click="handleUpdate(scope.row)">
|
||||||
|
<span v-if="scope.row.status==1">{{scope.row.quoteName}}</span>
|
||||||
|
<span v-else ><span style="text-decoration:line-through;color:gray">{{scope.row.quoteName}}</span>-已停用</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="费用名称" align="center" prop="feeType" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.emis_fee_type" :value="scope.row.feeType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="使用网点" align="center" prop="useSiteName" width="100" />
|
||||||
|
<el-table-column label="所属线路" align="center" prop="transLine" width="100" />
|
||||||
|
<el-table-column label="产品类型" align="center" prop="prodName" width="100" />
|
||||||
|
<el-table-column label="最低价格" align="center" prop="leastPrice" width="100" />
|
||||||
|
<el-table-column label="取价模式" align="center" prop="priceType" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.emis_price_type" :value="scope.row.priceType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计费模式" align="center" prop="billType" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.billType=='1'">重量计费</span>
|
||||||
|
<span v-if="scope.row.billType=='2'">体积计费</span>
|
||||||
|
<span v-if="scope.row.billType=='3'">一口价</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="启用标识" align="center" prop="status" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.status==1">启用</span>
|
||||||
|
<span v-else>停用</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
<el-table-column label="报价开始" align="center" prop="startDate" width="170" />
|
||||||
|
<el-table-column label="报价结束" align="center" prop="endDate" width="170" />
|
||||||
|
<el-table-column label="寄件区域" align="center" prop="sendAreaName" min-width="100" />
|
||||||
|
<el-table-column label="寄件网点" align="center" prop="sendAreaSite" :show-overflow-tooltip="true" min-width="100" />
|
||||||
|
<el-table-column label="派件区域" align="center" prop="dispAreaName" min-width="100" />
|
||||||
|
<el-table-column label="派件网点" align="center" prop="dispAreaSite" :show-overflow-tooltip="true" min-width="100" />
|
||||||
|
|
||||||
|
|
||||||
|
<el-table-column label="创建人" align="center" prop="createBy" width="80" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="创建网点" align="center" prop="createSite" width="80" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="170"/>
|
||||||
|
<el-table-column label="修改人" align="center" prop="updateBy" width="80" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="修改网点" align="center" prop="updateSite" width="80" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="修改时间" align="center" prop="updateTime" width="170"/>
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</XdTable>
|
||||||
|
|
||||||
|
<el-dialog :title="titleForm" :visible.sync="openForm" width="90%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||||
|
<vipTransQuotePriceForm :quoteId="currentId" :isCopy="isCopy" :chargeType="chargeType" @on-changed="handleFormChanged" @on-cancel="cancelForm"></vipTransQuotePriceForm>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
|
import { listEmisQuotePrice, getEmisQuotePrice, delEmisQuotePrice, addEmisQuotePrice, updateEmisQuotePrice } from "@/api/emis/emisQuotePrice";
|
||||||
|
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||||
|
import vipTransQuotePriceForm from '@/views/emis/emisQuotePrice/vipTransQuotePriceForm';
|
||||||
|
|
||||||
|
import CountryPicker from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
||||||
|
import EmisSiteSimplePicker0 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||||
|
import EmisSiteSimplePicker1 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||||
|
|
||||||
|
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
|
||||||
|
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "TransQuotePriceList",
|
||||||
|
components: { elDateSimplePicker,vipTransQuotePriceForm,CountryPicker,EmisSiteSimplePicker0,EmisSiteSimplePicker1,TransLinePicker,TransProductPicker },
|
||||||
|
dicts: [
|
||||||
|
'sys_normal_disable','emis_create_area_type','emis_fee_type','emis_price_type'
|
||||||
|
],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 创建时间搜索
|
||||||
|
dateTimeRange:[],
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
currentId:null,
|
||||||
|
currentQuote:null,
|
||||||
|
// 费用报价表格数据
|
||||||
|
emisQuotePriceList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
formulaType:1,
|
||||||
|
|
||||||
|
chargeType:null,
|
||||||
|
|
||||||
|
openForm: false,
|
||||||
|
titleForm: "",
|
||||||
|
isCopy: false,
|
||||||
|
|
||||||
|
// 显示编辑框更多
|
||||||
|
moreInputVisible: false,
|
||||||
|
// 弹出展示层
|
||||||
|
titleView:"",
|
||||||
|
openView: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
quoteName: null,
|
||||||
|
quoteCode: null,
|
||||||
|
useSiteCode: null,
|
||||||
|
useSite: null,
|
||||||
|
transLineCode: null,
|
||||||
|
transLine: null,
|
||||||
|
feeType: null,
|
||||||
|
prodCode: null,
|
||||||
|
prodName: null,
|
||||||
|
recPayType: null,
|
||||||
|
billType: null,
|
||||||
|
otherType1: null,
|
||||||
|
otherType2: null,
|
||||||
|
carryType: null,
|
||||||
|
status: null,
|
||||||
|
dispAreaName: null,
|
||||||
|
dispAreaSite: null,
|
||||||
|
dispAreaSiteCode: null,
|
||||||
|
sendAreaName: null,
|
||||||
|
sendAreaSite: null,
|
||||||
|
sendAreaSiteCode: null,
|
||||||
|
carriesNumber: null,
|
||||||
|
discardsNumber: null,
|
||||||
|
leastPrice: null,
|
||||||
|
priceType: null,
|
||||||
|
startDate: null,
|
||||||
|
endDate: null,
|
||||||
|
priorityLevel: null,
|
||||||
|
remark: null,
|
||||||
|
delFlag: null,
|
||||||
|
params:{
|
||||||
|
quoteStatus:null,
|
||||||
|
chargeType:null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// 根据名称筛选部门树
|
||||||
|
siteName(val) {
|
||||||
|
this.$refs.tree.filter(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
'ownerSiteCode',
|
||||||
|
'ownerSiteName',
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.chargeType=this.$route.query.chargeType;
|
||||||
|
this.queryParams.params.chargeType=this.chargeType;
|
||||||
|
if(this.chargeType ==1 ){
|
||||||
|
this.queryParams.feeType='1001';
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
/** 查询费用报价列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
// this.queryParams.params = {};
|
||||||
|
// this.queryParams.useSiteCode=this.ownerSiteCode;
|
||||||
|
listEmisQuotePrice(this.queryParams).then(response => {
|
||||||
|
this.emisQuotePriceList = 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.quoteId)
|
||||||
|
let [lastObj]=selection.slice(-1);
|
||||||
|
this.currentQuote=lastObj;
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
handleSelectionSiteChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.baseSiteId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
handleSortChange(column) {
|
||||||
|
this.queryParams.orderByColumn = column.prop;
|
||||||
|
this.queryParams.isAsc = column.order;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd(row) {
|
||||||
|
// 子组件打开模式
|
||||||
|
this.currentId = null;
|
||||||
|
this.openForm = true;
|
||||||
|
this.isCopy = false;
|
||||||
|
this.titleForm = "新增干线运输费";
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.currentId = row.quoteId || this.ids;
|
||||||
|
this.openForm = true;
|
||||||
|
this.isCopy = false;
|
||||||
|
this.titleForm = "修改干线运输费";
|
||||||
|
},
|
||||||
|
handleCopy() {
|
||||||
|
// console.log(this.currentQuote);
|
||||||
|
this.currentId = this.currentQuote.quoteId ;
|
||||||
|
this.openForm = true;
|
||||||
|
this.isCopy = true;
|
||||||
|
this.titleForm = "复制干线运输费【"+this.currentQuote.quoteName+"】";
|
||||||
|
},
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog .el-dialog__body {
|
||||||
|
margin: 5px!important;
|
||||||
|
padding: 0;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
546
src/views/emis/emisWaybill/recordScanStatistics.vue
Normal file
546
src/views/emis/emisWaybill/recordScanStatistics.vue
Normal file
@ -0,0 +1,546 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="mini" :maxShow="8" label-width="100px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
||||||
|
|
||||||
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="录单日期" prop="dateTimeRange">
|
||||||
|
<elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="寄件财务中心" prop="productType">
|
||||||
|
<EmisSiteSimplePicker1 v-model="queryParams.sendSiteCode" ></EmisSiteSimplePicker1>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="目的财务中心" prop="productType">
|
||||||
|
<EmisSiteSimplePicker3 v-model="queryParams.sendSiteCode" ></EmisSiteSimplePicker3>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="寄件网点" prop="productType">
|
||||||
|
<EmisSiteSimplePicker2 v-model="queryParams.sendSiteCode" ></EmisSiteSimplePicker2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="目的网点" prop="dispatchUnderlingSiteCode">
|
||||||
|
<EmisSiteSimplePicker4 v-model="queryParams.dispatchUnderlingSiteCode" ></EmisSiteSimplePicker4>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="0" type='flex'>
|
||||||
|
<el-col :span="24" :xs="24">
|
||||||
|
<el-tabs v-model="activeTab" class="center-tabs">
|
||||||
|
<el-tab-pane label="寄件录单统计" name="areaPanel" />
|
||||||
|
<el-tab-pane label="目的网点录单统计" name="pcdPanel" />
|
||||||
|
<el-tab-pane label="扫描数据统计" name="pcdPanel" />
|
||||||
|
<el-tab-pane label="全部明细统计" name="pcdPanel" />
|
||||||
|
</el-tabs>
|
||||||
|
<!-- <div v-show="activeTab==='areaPanel'">
|
||||||
|
<EmisCountryAreaPanel :countryCode="queryParams.countryCode"></EmisCountryAreaPanel>
|
||||||
|
</div> -->
|
||||||
|
<!-- <div v-show="activeTab==='pcdPanel'">
|
||||||
|
<EmisPcdPanel :countryCode="queryParams.countryCode"></EmisPcdPanel>
|
||||||
|
</div> -->
|
||||||
|
<!-- <div v-show="activeTab==='townPanel'">
|
||||||
|
<EmisTownPanel :countryCode="queryParams.countryCode"></EmisTownPanel>
|
||||||
|
</div> -->
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listEmisWaybill, getEmisWaybill, delEmisWaybill, addEmisWaybill, updateEmisWaybill } from "@/api/emis/emisWaybill";
|
||||||
|
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||||
|
|
||||||
|
import EmisSiteSimplePicker1 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||||
|
import EmisSiteSimplePicker2 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||||
|
import EmisSiteSimplePicker3 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||||
|
import EmisSiteSimplePicker4 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||||
|
|
||||||
|
import {dateToStr} from '@/utils/custom'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WaybillIsPrinted",
|
||||||
|
components: {
|
||||||
|
elDateAdvPicker,
|
||||||
|
EmisSiteSimplePicker1,
|
||||||
|
EmisSiteSimplePicker2,
|
||||||
|
EmisSiteSimplePicker3,
|
||||||
|
EmisSiteSimplePicker4,
|
||||||
|
},
|
||||||
|
dicts: ['emis_qujian_fangshi','emis_declare_mode','emis_customs_clear',
|
||||||
|
'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type',
|
||||||
|
'emis_calc_fee_type','emis_print_type','emis_payment_status','emis_waybill_status','emis_tab_dispatch_mode'
|
||||||
|
],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableHeight: 200,
|
||||||
|
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 创建时间搜索
|
||||||
|
dateTimeRange:[],
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 运单列表表格数据
|
||||||
|
emisWaybillList: [],
|
||||||
|
|
||||||
|
currentId:null,
|
||||||
|
openForm: false,
|
||||||
|
titleForm: "",
|
||||||
|
billCode:null,
|
||||||
|
|
||||||
|
queryOrderType:null,
|
||||||
|
queryOrderDateType:null,
|
||||||
|
|
||||||
|
// 弹出展示层
|
||||||
|
id:null,
|
||||||
|
titleView:"",
|
||||||
|
openView: false,
|
||||||
|
// 更新网点时间范围
|
||||||
|
daterangeOrderDate: [],
|
||||||
|
// 更新网点时间范围
|
||||||
|
daterangeEstimateDate: [],
|
||||||
|
// 更新网点时间范围
|
||||||
|
daterangePickStartDate: [],
|
||||||
|
// 更新网点时间范围
|
||||||
|
daterangePickFinishDate: [],
|
||||||
|
// 更新网点时间范围
|
||||||
|
daterangeDispFdDate: [],
|
||||||
|
// 更新网点时间范围
|
||||||
|
daterangeRegisterDate: [],
|
||||||
|
// 更新网点时间范围
|
||||||
|
daterangeSendDate: [],
|
||||||
|
// 更新网点时间范围
|
||||||
|
daterangeProduceBillDate: [],
|
||||||
|
// 更新网点时间范围
|
||||||
|
daterangeCreateTime: [],
|
||||||
|
// 更新网点时间范围
|
||||||
|
daterangeUpdateTime: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
orderSn: null,
|
||||||
|
billCode: null,
|
||||||
|
billCodeSub: null,
|
||||||
|
orderStatus: null,
|
||||||
|
waybillStatus: null,
|
||||||
|
orderType: null,
|
||||||
|
orderDate: null,
|
||||||
|
customerCode: null,
|
||||||
|
customerName: null,
|
||||||
|
receiveCustomerCode: null,
|
||||||
|
receiveCustomerName: null,
|
||||||
|
thirdCustomerCode: null,
|
||||||
|
thirdCustomerName: null,
|
||||||
|
receiveName: null,
|
||||||
|
receiveCompany: null,
|
||||||
|
receiveMobile: null,
|
||||||
|
receiveTel: null,
|
||||||
|
receiveCountry: null,
|
||||||
|
receiveProvince: null,
|
||||||
|
receiveCity: null,
|
||||||
|
receiveCounty: null,
|
||||||
|
receiveTown: null,
|
||||||
|
receiveAddress: null,
|
||||||
|
receivePostcode: null,
|
||||||
|
receivePcd: null,
|
||||||
|
sendName: null,
|
||||||
|
sendCompany: null,
|
||||||
|
sendMobile: null,
|
||||||
|
sendTel: null,
|
||||||
|
sendCountry: null,
|
||||||
|
sendProvince: null,
|
||||||
|
sendCity: null,
|
||||||
|
sendCounty: null,
|
||||||
|
sendTown: null,
|
||||||
|
sendAddress: null,
|
||||||
|
sendPostcode: null,
|
||||||
|
sendPcd: null,
|
||||||
|
paymentType: null,
|
||||||
|
calcFeeType: null,
|
||||||
|
custNo: null,
|
||||||
|
transLineType: null,
|
||||||
|
productType: null,
|
||||||
|
timeType: null,
|
||||||
|
meterType: null,
|
||||||
|
customsClear: null,
|
||||||
|
customsEclaration: null,
|
||||||
|
estimateDate: null,
|
||||||
|
packType: null,
|
||||||
|
dispatchMethod: null,
|
||||||
|
pickupMethod: null,
|
||||||
|
pickStartDate: null,
|
||||||
|
pickFinishDate: null,
|
||||||
|
pickFailReason: null,
|
||||||
|
intoWarehouseCode: null,
|
||||||
|
intoWarehouseName: null,
|
||||||
|
intoWarehouseAddress: null,
|
||||||
|
intoWarehouseContact: null,
|
||||||
|
intoWarehousePhone: null,
|
||||||
|
intoWarehouseBillCode: null,
|
||||||
|
warehouseInNo: null,
|
||||||
|
customerDeliveryBeginTime: null,
|
||||||
|
customerDeliveryEndTime: null,
|
||||||
|
goodsType: null,
|
||||||
|
goodsInfo: null,
|
||||||
|
goodsPics: null,
|
||||||
|
blPrepareInFreight: null,
|
||||||
|
prepareInEstFee: null,
|
||||||
|
prepareInRealFee: null,
|
||||||
|
prepareInExpress: null,
|
||||||
|
prepareInBillCode: null,
|
||||||
|
prepareInRemark: null,
|
||||||
|
prepareInSupplier: null,
|
||||||
|
totalWeight: null,
|
||||||
|
totalVolume: null,
|
||||||
|
parcelQty: null,
|
||||||
|
billWeight: null,
|
||||||
|
volumeWeight: null,
|
||||||
|
currency: null,
|
||||||
|
settlementWeight: null,
|
||||||
|
feeWeight: null,
|
||||||
|
freight: null,
|
||||||
|
blOverLong: null,
|
||||||
|
blBill: null,
|
||||||
|
blOverWeight: null,
|
||||||
|
overWeightNumber: null,
|
||||||
|
feeRemaker: null,
|
||||||
|
thirdCode: null,
|
||||||
|
realValue: null,
|
||||||
|
blInsure: null,
|
||||||
|
insureValue: null,
|
||||||
|
insureValueCurrency: null,
|
||||||
|
insureFeeCurrency: null,
|
||||||
|
insureFee: null,
|
||||||
|
insureRemark: null,
|
||||||
|
insureSiteCode: null,
|
||||||
|
insureDate: null,
|
||||||
|
blPrint: null,
|
||||||
|
printManCode: null,
|
||||||
|
printSite: null,
|
||||||
|
printDate: null,
|
||||||
|
printCount: null,
|
||||||
|
blDispFd: null,
|
||||||
|
transferCode: null,
|
||||||
|
transferBillcode: null,
|
||||||
|
dispFdDate: null,
|
||||||
|
dispFdReason: null,
|
||||||
|
currentSiteCode: null,
|
||||||
|
lastSiteCode: null,
|
||||||
|
registerSiteCode: null,
|
||||||
|
registerDate: null,
|
||||||
|
registerManCode: null,
|
||||||
|
takePieceEmployeeCode: null,
|
||||||
|
sendSiteCode: null,
|
||||||
|
sendDate: null,
|
||||||
|
dispatchManCode: null,
|
||||||
|
dispatchDate: null,
|
||||||
|
dispatchSiteCode: null,
|
||||||
|
produceBillDate: null,
|
||||||
|
produceBillSiteCode: null,
|
||||||
|
produceBillManCode: null,
|
||||||
|
destinationCode: null,
|
||||||
|
destinationProvince: null,
|
||||||
|
destinationCity: null,
|
||||||
|
destinationCounty: null,
|
||||||
|
dispatchUnderlingSiteCode: null,
|
||||||
|
destinationCenterCode: null,
|
||||||
|
marketManCode: null,
|
||||||
|
payee: null,
|
||||||
|
salesmen: null,
|
||||||
|
operateEmployeeCode: null,
|
||||||
|
blIsQuestion: null,
|
||||||
|
problemType: null,
|
||||||
|
problemCause: null,
|
||||||
|
problemDelayDays: null,
|
||||||
|
blMessage: null,
|
||||||
|
blAcceptMessage: null,
|
||||||
|
blGenSubbill: null,
|
||||||
|
signMan: null,
|
||||||
|
signManCode: null,
|
||||||
|
signSiteCode: null,
|
||||||
|
signDate: null,
|
||||||
|
billPicSendRmk: null,
|
||||||
|
billPicDispatchRmk: null,
|
||||||
|
timezoneOffset: null,
|
||||||
|
delFlag: null,
|
||||||
|
remark: null,
|
||||||
|
params:{
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.queryOrderType="1";
|
||||||
|
this.queryOrderDateType="1";
|
||||||
|
|
||||||
|
// 调整表格的高度,不允许滚动
|
||||||
|
this.$nextTick(function() {
|
||||||
|
let queryFormEl = this.$refs.queryForm.$el;
|
||||||
|
let tableH = queryFormEl.offsetHeight+190;
|
||||||
|
this.tableHeight = window.innerHeight - tableH;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询运单列表列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.params = {};
|
||||||
|
|
||||||
|
// this.queryOrderType="1";
|
||||||
|
// this.queryOrderDateType="1";
|
||||||
|
if(this.queryParams.billCode){
|
||||||
|
if(this.queryOrderType != "1"){
|
||||||
|
this.queryParams.orderSn=this.queryParams.billCode+"";
|
||||||
|
this.queryParams.billCode=null;
|
||||||
|
}else{
|
||||||
|
// 处理子单号
|
||||||
|
let billArr = this.queryParams.billCode.split(",");
|
||||||
|
let newBillCodeStr="";
|
||||||
|
billArr.forEach(item=>{
|
||||||
|
if(item.startsWith("T")){
|
||||||
|
let mainBillCode=item.substr(0,14);
|
||||||
|
newBillCodeStr=newBillCodeStr+mainBillCode+",";
|
||||||
|
}else{
|
||||||
|
newBillCodeStr=newBillCodeStr+item+",";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.queryParams.billCode=newBillCodeStr;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(this.dateTimeRange&&this.dateTimeRange.length==2){
|
||||||
|
|
||||||
|
let startDate = new Date(this.dateTimeRange[0]);
|
||||||
|
let endDate= new Date(this.dateTimeRange[1]);
|
||||||
|
startDate=dateToStr(startDate);
|
||||||
|
endDate=dateToStr(endDate)
|
||||||
|
|
||||||
|
if(this.queryOrderDateType != "1"){
|
||||||
|
this.queryParams.params["beginCreateTime"] = startDate;
|
||||||
|
this.queryParams.params["endCreateTime"] = endDate;
|
||||||
|
}else{
|
||||||
|
this.queryParams.params["beginSendDate"] = startDate;
|
||||||
|
this.queryParams.params["endSendDate"] = endDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if (null != this.daterangeOrderDate && '' != this.daterangeOrderDate) {
|
||||||
|
// this.queryParams.params["beginOrderDate"] = this.daterangeOrderDate[0];
|
||||||
|
// this.queryParams.params["endOrderDate"] = this.daterangeOrderDate[1];
|
||||||
|
// }
|
||||||
|
// if (null != this.daterangeEstimateDate && '' != this.daterangeEstimateDate) {
|
||||||
|
// this.queryParams.params["beginEstimateDate"] = this.daterangeEstimateDate[0];
|
||||||
|
// this.queryParams.params["endEstimateDate"] = this.daterangeEstimateDate[1];
|
||||||
|
// }
|
||||||
|
// if (null != this.daterangePickStartDate && '' != this.daterangePickStartDate) {
|
||||||
|
// this.queryParams.params["beginPickStartDate"] = this.daterangePickStartDate[0];
|
||||||
|
// this.queryParams.params["endPickStartDate"] = this.daterangePickStartDate[1];
|
||||||
|
// }
|
||||||
|
// if (null != this.daterangePickFinishDate && '' != this.daterangePickFinishDate) {
|
||||||
|
// this.queryParams.params["beginPickFinishDate"] = this.daterangePickFinishDate[0];
|
||||||
|
// this.queryParams.params["endPickFinishDate"] = this.daterangePickFinishDate[1];
|
||||||
|
// }
|
||||||
|
// if (null != this.daterangeDispFdDate && '' != this.daterangeDispFdDate) {
|
||||||
|
// this.queryParams.params["beginDispFdDate"] = this.daterangeDispFdDate[0];
|
||||||
|
// this.queryParams.params["endDispFdDate"] = this.daterangeDispFdDate[1];
|
||||||
|
// }
|
||||||
|
// if (null != this.daterangeRegisterDate && '' != this.daterangeRegisterDate) {
|
||||||
|
// this.queryParams.params["beginRegisterDate"] = this.daterangeRegisterDate[0];
|
||||||
|
// this.queryParams.params["endRegisterDate"] = this.daterangeRegisterDate[1];
|
||||||
|
// }
|
||||||
|
// if (null != this.daterangeSendDate && '' != this.daterangeSendDate) {
|
||||||
|
// this.queryParams.params["beginSendDate"] = this.daterangeSendDate[0];
|
||||||
|
// this.queryParams.params["endSendDate"] = this.daterangeSendDate[1];
|
||||||
|
// }
|
||||||
|
// if (null != this.daterangeProduceBillDate && '' != this.daterangeProduceBillDate) {
|
||||||
|
// this.queryParams.params["beginProduceBillDate"] = this.daterangeProduceBillDate[0];
|
||||||
|
// this.queryParams.params["endProduceBillDate"] = this.daterangeProduceBillDate[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];
|
||||||
|
// }
|
||||||
|
|
||||||
|
listEmisWaybill(this.queryParams).then(response => {
|
||||||
|
this.emisWaybillList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onDateSelect(value){
|
||||||
|
this.dateTimeRange=value;
|
||||||
|
// scanDate
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
if(selection!=null){
|
||||||
|
this.billCode=selection[0].billCode;
|
||||||
|
}
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||||
|
handleSortChange(column) {
|
||||||
|
this.queryParams.orderByColumn = column.prop;
|
||||||
|
this.queryParams.isAsc = column.order;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd(row) {
|
||||||
|
// <router-link :to="'/waybillManagement/waybillEntry?billCode=' + scope.row.billCode" class="link-type">
|
||||||
|
this.$router.push({ path: '/d24/waybillManagement/WaybillEntry', query: { action:"add"} });
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
// const waybill = this.emisWaybillList.find(item => item.id === id)
|
||||||
|
this.$router.push({ path: '/d24/waybillManagement/WaybillModify', query: { action:"modify",billCode: this.billCode }})
|
||||||
|
},
|
||||||
|
handleView(row) {
|
||||||
|
this.$router.push({ path: '/d24/waybillManagement/WaybillDetail', query: { billCode: this.billCode }})
|
||||||
|
},
|
||||||
|
handleFormChanged(){
|
||||||
|
this.openForm = false;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
cancelForm(){
|
||||||
|
this.openForm = false;
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除').then(function() {
|
||||||
|
return delEmisWaybill(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
// this.download('emis/emisWaybill/export', {
|
||||||
|
// ...this.queryParams
|
||||||
|
// }, `emisWaybill_${new Date().getTime()}.xlsx`)
|
||||||
|
const loadingInstance = this.$loading({
|
||||||
|
text: '正在导出...'
|
||||||
|
})
|
||||||
|
var qParam = {...this.queryParams};
|
||||||
|
qParam.pageNum=1;
|
||||||
|
qParam.pageSize=5000;
|
||||||
|
|
||||||
|
listEmisWaybill(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 = ['id','订单号','客户单号,合同号','运单号','子单号,逗号隔开','订单状态','运单状态','订单类型','下单时间','客户ID','客户编号2502021','客户名称','收件客户编号2502021','收件客户客户名称','第三方客户客户编号','第三方客户客户名称','wx','收货人名','收货公司','收货人手机号','收货人电话','收货人国家','省','市','区','县','收货地址','邮编','寄件人省市区名称,逗号分隔','寄件人名','寄件公司','寄件人手机号','寄件人电话','寄件人国家','寄件省','寄件市','寄件区','寄件县','寄件地址','寄件邮编','发件人省市区名称,逗号分隔','支付方式','计费方式','支付月结编号','快递线路','快递产品类型','时效','计泡比例','清关方式','报关方式','预计到达时间','包装类型','派件方式:1-送货上门','取件方式:1-上门取件','预计上门取件开始时间','预计上门取件结束时间','取货失败原因','入仓代码','入仓名称','入仓地址','入仓联系人','入仓联系人电话','入仓单号','实际进仓单关联','客户发货开始时间','客户发货截止时间','货物大类','货物描述','货物图片,逗号隔开','预入仓代垫运费','预入仓代垫运费','预入仓实际运费','预入仓快递公司','预入仓快递单号','预入仓自定义标识','预入仓供应商','总重量','总体积','件数','实际重量','体积重量','费用币种','结算重量','计费重量','运费','是否超长','是否出账','账单备注','是否超重','超重重量','费用备注','三段码','实际货值','是否投保','投保货值','投保货值币种','保费币种','保费','保险备注','保险站点代码','投保日期','是否打印','打印人编号','打印站点','打印时间','打印次数','是否同行转单','转单代码','转单单号','转单时间','转单原因','当前网点编号','下一网点编号','上一网点点号','寄件站点代码','寄件日期','寄件人编号','取件员代码','发件网点代码','发货时间','派件人代码','派件时间','派件网点代码','生成账单时间','生成账单站点代码','生成账单人代码','目的地编号','目的省','目的城市','目的国家','目的地网点代码','目的地财务中心代码','业务人代码','销售回款人','销售联系人','操作员代码','是否问题件','问题件类型','问题件原因','问题件延期天数','是否备注消息','是否发送收件人短信','是否生成子单','签收人','签收人代码','签收站点代码','签收时间','揽收图片备注','签收底单图片','时区偏差','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','备注','创建网点','更新网点',];
|
||||||
|
const filterVal = ['id','orderSn','custOrderId','billCode','billCodeSub','orderStatus','waybillStatus','orderType','orderDate','userId','customerCode','customerName','receiveCustomerCode','receiveCustomerName','thirdCustomerCode','thirdCustomerName','openId','receiveName','receiveCompany','receiveMobile','receiveTel','receiveCountry','receiveProvince','receiveCity','receiveCounty','receiveTown','receiveAddress','receivePostcode','receivePcd','sendName','sendCompany','sendMobile','sendTel','sendCountry','sendProvince','sendCity','sendCounty','sendTown','sendAddress','sendPostcode','sendPcd','paymentType','calcFeeType','custNo','transLineType','productType','timeType','meterType','customsClear','customsEclaration','estimateDate','packType','dispatchMethod','pickupMethod','pickStartDate','pickFinishDate','pickFailReason','intoWarehouseCode','intoWarehouseName','intoWarehouseAddress','intoWarehouseContact','intoWarehousePhone','intoWarehouseBillCode','warehouseInNo','customerDeliveryBeginTime','customerDeliveryEndTime','goodsType','goodsInfo','goodsPics','blPrepareInFreight','prepareInEstFee','prepareInRealFee','prepareInExpress','prepareInBillCode','prepareInRemark','prepareInSupplier','totalWeight','totalVolume','parcelQty','billWeight','volumeWeight','currency','settlementWeight','feeWeight','freight','blOverLong','blBill','blBillText','blOverWeight','overWeightNumber','feeRemaker','thirdCode','realValue','blInsure','insureValue','insureValueCurrency','insureFeeCurrency','insureFee','insureRemark','insureSiteCode','insureDate','blPrint','printManCode','printSite','printDate','printCount','blDispFd','transferCode','transferBillcode','dispFdDate','dispFdReason','currentSiteCode','nextSiteCode','lastSiteCode','registerSiteCode','registerDate','registerManCode','takePieceEmployeeCode','sendSiteCode','sendDate','dispatchManCode','dispatchDate','dispatchSiteCode','produceBillDate','produceBillSiteCode','produceBillManCode','destinationCode','destinationProvince','destinationCity','destinationCounty','dispatchUnderlingSiteCode','destinationCenterCode','marketManCode','payee','salesmen','operateEmployeeCode','blIsQuestion','problemType','problemCause','problemDelayDays','blMessage','blAcceptMessage','blGenSubbill','signMan','signManCode','signSiteCode','signDate','billPicSendRmk','billPicDispatchRmk','timezoneOffset','delFlag','createBy','createTime','updateBy','updateTime','remark','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 lang="scss" scoped>
|
||||||
|
|
||||||
|
.el-divider{
|
||||||
|
margin-top: 0px;
|
||||||
|
background: 0 0;
|
||||||
|
border-top: 1px solid #E6EBF5;
|
||||||
|
}
|
||||||
|
.el-divider__text {
|
||||||
|
color: #0955ee;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.query-label {
|
||||||
|
.el-radio{
|
||||||
|
display: block;
|
||||||
|
line-height: 23px;
|
||||||
|
white-space: normal;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user