Commit b54f4cc8 authored by dragondean@qq.com's avatar dragondean@qq.com

报价单,特价,框架页面缓存改造,其他bug

parent dc4dfb23
...@@ -94,16 +94,16 @@ function checkOrTryHttp() { ...@@ -94,16 +94,16 @@ function checkOrTryHttp() {
//==获取LODOP对象主过程,判断是否安装、需否升级:== //==获取LODOP对象主过程,判断是否安装、需否升级:==
function getLodop(oOBJECT, oEMBED) { function getLodop(oOBJECT, oEMBED) {
var strFontTag = "<br><font color='#FF00FF'>打印控件"; var strFontTag = "<br><font color='#FF00FF'>打印控件";
var strLodopInstall = strFontTag + "未安装!点击这里<a href='install_lodop32.exe' target='_self'>执行安装</a>"; var strLodopInstall = strFontTag + "未安装!点击这里<a href='/static/install_lodop32.exe' target='_self'>执行安装</a>";
var strLodopUpdate = strFontTag + "需要升级!点击这里<a href='install_lodop32.exe' target='_self'>执行升级</a>"; var strLodopUpdate = strFontTag + "需要升级!点击这里<a href='/static/install_lodop32.exe' target='_self'>执行升级</a>";
var strLodop64Install = strFontTag + "未安装!点击这里<a href='install_lodop64.exe' target='_self'>执行安装</a>"; var strLodop64Install = strFontTag + "未安装!点击这里<a href='/static/install_lodop64.exe' target='_self'>执行安装</a>";
var strLodop64Update = strFontTag + "需要升级!点击这里<a href='install_lodop64.exe' target='_self'>执行升级</a>"; var strLodop64Update = strFontTag + "需要升级!点击这里<a href='/static/install_lodop64.exe' target='_self'>执行升级</a>";
var strCLodopInstallA = "<br><font color='#FF00FF'>Web打印服务CLodop未安装启动,点击这里<a href='CLodop_Setup_for_Win32NT.exe' target='_self'>下载执行安装</a>"; var strCLodopInstallA = "<br><font color='#FF00FF'>Web打印服务CLodop未安装启动,点击这里<a href='/static/CLodop_Setup_for_Win32NT.exe' target='_self'>下载执行安装</a>";
var strCLodopInstallB = "<br>(若此前已安装过,可<a href='CLodop.protocol:setup' target='_self'>点这里直接再次启动</a>)"; var strCLodopInstallB = "<br>(若此前已安装过,可<a href='CLodop.protocol:setup' target='_self'>点这里直接再次启动</a>)";
var strCLodopUpdate = "<br><font color='#FF00FF'>Web打印服务CLodop需升级!点击这里<a href='CLodop_Setup_for_Win32NT.exe' target='_self'>执行升级</a>"; var strCLodopUpdate = "<br><font color='#FF00FF'>Web打印服务CLodop需升级!点击这里<a href='/static/CLodop_Setup_for_Win32NT.exe' target='_self'>执行升级</a>";
var strLodop7FontTag = "<br><font color='#FF00FF'>Web打印服务Lodop7"; var strLodop7FontTag = "<br><font color='#FF00FF'>Web打印服务Lodop7";
var strLodop7HrefX86 = "点击这里<a href='Lodop7_Linux_X86_64.tar.gz' target='_self'>下载安装</a>(下载后解压,点击lodop文件开始执行)"; var strLodop7HrefX86 = "点击这里<a href='/static/Lodop7_Linux_X86_64.tar.gz' target='_self'>下载安装</a>(下载后解压,点击lodop文件开始执行)";
var strLodop7HrefARM = "点击这里<a href='Lodop7_Linux_ARM64.tar.gz' target='_self'>下载安装</a>(下载后解压,点击lodop文件开始执行)"; var strLodop7HrefARM = "点击这里<a href='/static/Lodop7_Linux_ARM64.tar.gz' target='_self'>下载安装</a>(下载后解压,点击lodop文件开始执行)";
var strLodop7Install_X86 = strLodop7FontTag + "未安装启动," + strLodop7HrefX86; var strLodop7Install_X86 = strLodop7FontTag + "未安装启动," + strLodop7HrefX86;
var strLodop7Install_ARM = strLodop7FontTag + "未安装启动," + strLodop7HrefARM; var strLodop7Install_ARM = strLodop7FontTag + "未安装启动," + strLodop7HrefARM;
var strLodop7Update_X86 = strLodop7FontTag + "需升级," + strLodop7HrefX86; var strLodop7Update_X86 = strLodop7FontTag + "需升级," + strLodop7HrefX86;
......
...@@ -54,7 +54,9 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { ...@@ -54,7 +54,9 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
route.meta = { route.meta = {
title: route.name, title: route.name,
titleEn: route.nameEn, titleEn: route.nameEn,
icon: route.icon icon: route.icon,
noCache: !route.keepalive, // 不缓存,如果需要缓存则需要组件名称能对应上
componentPath: route.component
} }
route.hidden = typeof route.isShowInMenuBar != 'undefined' && (route.isShowInMenuBar == 'false' || !route.isShowInMenuBar) route.hidden = typeof route.isShowInMenuBar != 'undefined' && (route.isShowInMenuBar == 'false' || !route.isShowInMenuBar)
// 处理 component 属性 // 处理 component 属性
......
import router from '@/router' import router from '@/router'
window.router = router
const state = { const state = {
visitedViews: [], visitedViews: [],
cachedViews: [] cachedViews: []
...@@ -15,9 +15,10 @@ const mutations = { ...@@ -15,9 +15,10 @@ const mutations = {
) )
}, },
ADD_CACHED_VIEW: (state, view) => { ADD_CACHED_VIEW: (state, view) => {
if (state.cachedViews.includes(view.name)) return if (view.meta && view.meta.componentPath) {
if (view.meta && !view.meta.noCache) { let cacheName = view.meta.componentPath.split('/').map(item => item.substring(0, 1).toUpperCase() + item.substring(1).toLowerCase()).join('')
state.cachedViews.push(view.name) if (state.cachedViews.includes(cacheName)) return
state.cachedViews.push(cacheName)
} }
}, },
......
...@@ -10,7 +10,6 @@ import { getLocale } from '@/utils/db'; ...@@ -10,7 +10,6 @@ import { getLocale } from '@/utils/db';
// 是否显示重新登录 // 是否显示重新登录
export let isRelogin = { show: false }; export let isRelogin = { show: false };
axios.defaults.headers['locale'] = getLocale()
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
...@@ -21,6 +20,7 @@ const service = axios.create({ ...@@ -21,6 +20,7 @@ const service = axios.create({
}) })
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
config.headers['locale'] = getLocale()
// 是否需要设置 token // 是否需要设置 token
const isToken = (config.headers || {}).isToken === false const isToken = (config.headers || {}).isToken === false
if (getToken() && !isToken) { if (getToken() && !isToken) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-form ref="form" :model="form" :rules="rules" label-width="120px" inline> <el-form ref="form" :model="form" :rules="rules" label-width="120px" inline>
<el-card> <el-card>
<div slot="header" class="card-title">{{$t('新建报价单')}}</div> <div slot="header" class="card-title">{{$t('新建报价单')}}</div>
<el-form-item :label="$t('所属人')"> <el-form-item :label="$t('所属人')" prop="relation">
<el-radio-group v-model="form.relation"> <el-radio-group v-model="form.relation">
<el-radio label="1">{{$t('发件人')}}</el-radio> <el-radio label="1">{{$t('发件人')}}</el-radio>
<el-radio label="2">{{$t('收件人')}}</el-radio> <el-radio label="2">{{$t('收件人')}}</el-radio>
...@@ -222,15 +222,15 @@ ...@@ -222,15 +222,15 @@
<el-table-column :label="$t('运费')" width="200px"> <el-table-column :label="$t('运费')" width="200px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<template v-if="row.fee && row.fee.charging == 1"> <template v-if="row.fee && row.fee.charging == 1">
<template v-if="!row.fee.freight">{{$t('未报价')}}</template> <template v-if="!row.fee.oneFreight">{{$t('未报价')}}</template>
<template v-else> <template v-else>
{{$t('全包价')}}{{row.fee.freight}} {{currencyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}} {{$t('全包价')}}{{row.fee.oneFreight}} {{currencyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
</template> </template>
</template> </template>
<template v-else-if="!row.fee || !row.fee.freight && !row.fee.clearanceFee">{{$t('未报价')}}</template> <template v-else-if="!row.fee || !row.fee.oneFreight && !row.fee.oneClearanceFee">{{$t('未报价')}}</template>
<template v-else-if="row.fee"> <template v-else-if="row.fee">
<div> <div>
{{$t('运费')}}{{row.fee.freight}} {{currencyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}} {{$t('运费')}}{{row.fee.oneFreight}} {{currencyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
</div> </div>
<div> <div>
{{$t('清关费')}}{{row.fee.oneClearanceFee}} {{currencyMap[row.fee.clearanceFeeCurrency]}} / {{unitMap[row.fee.clearanceFeeVolume]}} {{$t('清关费')}}{{row.fee.oneClearanceFee}} {{currencyMap[row.fee.clearanceFeeCurrency]}} / {{unitMap[row.fee.clearanceFeeVolume]}}
...@@ -424,41 +424,41 @@ ...@@ -424,41 +424,41 @@
<el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')"></el-input> <el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')"></el-input>
</el-form-item> --> </el-form-item> -->
<el-form-item :label="$t('是否双清')" v-if="[2,3,4].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('是否双清')" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" /> <dict-selector v-model="form.transportVO.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('航空公司')" v-if="[3,4].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('航空公司')" v-if="[3,4].indexOf(+form.transportId) > -1">
<!--待查询备选数据--> <!--待查询备选数据-->
<!-- <el-select placeholder="" v-model="form.airlineCompany"> <!-- <el-select placeholder="" v-model="form.airlineCompany">
</el-select> --> </el-select> -->
<supplier-selector v-model="form.airlineCompany" companyType="10" /> <supplier-selector v-model="form.transportVO.airlineCompany" companyType="10" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('船公司')" v-if="[2].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('船公司')" v-if="[2].indexOf(+form.transportId) > -1">
<!-- <el-select placeholder="" v-model="form.shippingCompany"> <!-- <el-select placeholder="" v-model="form.shippingCompany">
</el-select> --> </el-select> -->
<supplier-selector v-model="form.shippingCompany" companyType="9" /> <supplier-selector v-model="form.transportVO.shippingCompany" companyType="9" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('清关证书')" v-if="[2,3,4].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('清关证书')" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" /> <dict-selector v-model="form.transportVO.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('清关证书备注')" v-if="[2,3,4].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('清关证书备注')" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<el-input v-model="form.remarks" ></el-input> <el-input v-model="form.transportVO.remarks" ></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('是否拆包')" v-if="[3,4].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('是否拆包')" v-if="[3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.isUnpack" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" /> <dict-selector v-model="form.transportVO.isUnpack" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('单票立刻转运')" v-if="[3,4].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('单票立刻转运')" v-if="[3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" /> <dict-selector v-model="form.transportVO.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
<span style="margin-left:10px">{{$t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”')}}</span> <span style="margin-left:10px">{{$t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”')}}</span>
</el-form-item> </el-form-item>
<br/> <br/>
<el-form-item :label="$t('特殊要求')" > <el-form-item :label="$t('特殊要求')" >
<dict-selector v-model="form.packageType" form-type="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" multiple /> <dict-selector v-model="form.transportVO.packageType" form-type="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" multiple />
</el-form-item> </el-form-item>
<br/> <br/>
<el-form-item :label="$t('特殊要求备注')"> <el-form-item :label="$t('特殊要求备注')">
<el-input v-model="form.packageRemarks" ></el-input> <el-input v-model="form.transportVO.packageRemarks" ></el-input>
</el-form-item> </el-form-item>
</el-card> </el-card>
...@@ -493,7 +493,7 @@ import QuickCreateCustomer from '@/components/QuickCreateCustomer' ...@@ -493,7 +493,7 @@ import QuickCreateCustomer from '@/components/QuickCreateCustomer'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts' import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
export default { export default {
name: "OfferEdit", name: "EcwOfferEdit",
components: { components: {
ProductSelector, Selector, SupplierSelector,ChooseContactDialog, QuickCreateCustomer ProductSelector, Selector, SupplierSelector,ChooseContactDialog, QuickCreateCustomer
}, },
...@@ -519,6 +519,7 @@ export default { ...@@ -519,6 +519,7 @@ export default {
type: [], type: [],
isCargoControl: false, isCargoControl: false,
prodCreateReqVOList:[], prodCreateReqVOList:[],
transportVO: {}
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -529,7 +530,10 @@ export default { ...@@ -529,7 +530,10 @@ export default {
endTime: [{ required: true, message: "有效期结束时间不能为空"}], endTime: [{ required: true, message: "有效期结束时间不能为空"}],
transportId: [{ required: true, message: "选择运输方式"}], transportId: [{ required: true, message: "选择运输方式"}],
channelId: [{ required: true, message: "选择出货渠道"}], channelId: [{ required: true, message: "选择出货渠道"}],
stopTime: [{ required: true, message: "不能为空"}] stopTime: [{ required: true, message: "不能为空"}],
relation: [{ required: true, message: "请选择所属人"}],
control: [{ required: true, message: "请选择是否控货"}],
importance: [{ required: true, message: "请选择重要成都"}]
/*sendstatus: [{ required: true, message: "站内信状态,0未发送,1已发送不能为空", trigger: "blur" }], */ /*sendstatus: [{ required: true, message: "站内信状态,0未发送,1已发送不能为空", trigger: "blur" }], */
}, },
labelStyle: 'width:120px', labelStyle: 'width:120px',
...@@ -856,7 +860,7 @@ export default { ...@@ -856,7 +860,7 @@ export default {
// 修改的提交 // 修改的提交
if (this.form.offerId != null) { if (this.form.offerId != null) {
let data = Object.assign({}, this.form, { let data = Object.assign({}, this.form, {
transportUpdateReqVOList: this.transportList.filter(item => item._enabled), // transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
prodUpdateReqVOList: this.getProductListWithDefaultValue() prodUpdateReqVOList: this.getProductListWithDefaultValue()
}) })
updateOffer(data).then(response => { updateOffer(data).then(response => {
...@@ -866,7 +870,7 @@ export default { ...@@ -866,7 +870,7 @@ export default {
return; return;
} }
let data = Object.assign({}, this.form, { let data = Object.assign({}, this.form, {
transportCreateReqVOList: this.transportList.filter(item => item._enabled), // transportCreateReqVOList: this.transportList.filter(item => item._enabled),
prodCreateReqVOList: this.getProductListWithDefaultValue() prodCreateReqVOList: this.getProductListWithDefaultValue()
}) })
// 添加的提交 // 添加的提交
......
...@@ -51,8 +51,7 @@ ...@@ -51,8 +51,7 @@
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('业务员')" align="left" prop="creatorName">
</el-table-column>
<el-table-column :label="$t('预计销售额')" align="left" prop="estCost"> <el-table-column :label="$t('预计销售额')" align="left" prop="estCost">
<template slot-scope="{row}"> <template slot-scope="{row}">
...@@ -62,7 +61,8 @@ ...@@ -62,7 +61,8 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="left" prop="creatorName">
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="[1,2].indexOf(scope.row.status) > -1"> <template v-if="[1,2].indexOf(scope.row.status) > -1">
......
...@@ -57,7 +57,9 @@ export default { ...@@ -57,7 +57,9 @@ export default {
"warehousingType": undefined "warehousingType": undefined
}, },
// 表单校验 // 表单校验
rules: {} rules: {
warehousingType: {required: true, message: '请选择入仓类型'}
}
}; };
}, },
computed: { computed: {
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<div slot="header" class="card-title">申请特价</div> <div slot="header" class="card-title">{{$t('申请特价')}}</div>
<!-- 列表 -->
<div class="offer-header"> <div class="offer-header">
<span style="font-size: 15px;">订单号:{{ offer.number }}</span> <el-descriptions>
<el-descriptions-item :label="$t('报价单号')">{{offer.number}}</el-descriptions-item>
<el-descriptions-item :label="$t('始发地')">{{$l(departure, 'title')}}</el-descriptions-item>
<el-descriptions-item :label="$t('目的地')">{{$l(objective, 'title')}}</el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="offer.transportId" />
</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
// TODO
</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{offer.createTime}}</el-descriptions-item>
<el-descriptions-item :label="$t('状态')">
<dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="offer.status" />
</el-descriptions-item>
</el-descriptions>
</div> </div>
<el-table v-loading="loading" :data="offer.offerProdRespVOList"> <el-table v-loading="loading" :data="offer.offerProdRespVOList">
<el-table-column label="序号" align="center" prop="id" type="index"></el-table-column> <el-table-column :label="$t('序号')" align="center" prop="id" type="index"></el-table-column>
<el-table-column <el-table-column
prop="prodTitleZh" :label="$t('品名')">
label="品名">
<template v-slot="{row}"> <template v-slot="{row}">
{{ row.prodTitleZh }}/{{ row.prodTitleEn }} {{ row.prodTitleZh }}/{{ row.prodTitleEn }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="prodAttrIds" :label="$t('品牌')">
label="填单货物属性">
<template v-slot="{row}"> <template v-slot="{row}">
{{ getProductNamesByIds(row.prodAttrIds) }} <dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brand"></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" :label="$t('件数')" prop="num"></el-table-column>
label="入库货物属性"> <el-table-column
:label="$t('包装')">
<template v-slot="{row}"> <template v-slot="{row}">
品牌:{{ row.brand ? '' : '' }}<br> <dict-tag :value="row.unit" :type="DICT_TYPE.ECW_PACKAGE_TYPE" />
箱数:{{ row.num }}<br>
体积:{{ row.volume }}<br>
重量:{{ row.weight }}Kg
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="updateTime" :label="$t('原价')">
:formatter="(_, __, v) => parseTime(v)"
label="最后操作时间">
</el-table-column>
<el-table-column
label="原价">
<template v-slot="{row}"> <template v-slot="{row}">
运费:{{ row.originalSeaFreight }} {{ currentMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }} 运费:{{ row.originalSeaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br> <br>
清关费:{{ row.originalClearanceFreight }} {{ currentMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }} 清关费:{{ row.originalClearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address"
label="成本价"> label="成本价">
<template v-slot="{row}"> <template v-slot="{row}">
运费:{{ row.seaFreight }} {{ currentMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }} 运费:{{ row.seaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br> <br>
清关费:{{ row.clearanceFreight }} {{ currentMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }} 清关费:{{ row.clearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address"
label="销售价"> label="销售价">
<template v-slot="{row}"> <template v-slot="{row}">
运费:{{ row.seaFreight }} {{ currentMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }} 运费:{{ row.seaFreight }} {{ currencyMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br> <br>
清关费:{{ row.clearanceFreight }} {{ currentMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }} 清关费:{{ row.clearanceFreight }} {{ currencyMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="status"
:formatter="(v) => ['取消报价', '特价审批中', '需求确认(草稿)', '跟进中', '赢单', '输单', '报价完成', '审批通过', '审批拒绝'][v.status]"
label="审核状态">
</el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="操作"> :label="$t('操作')">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']" @click="$router.push(`/offer/discount/${row.offerProdId}?offerId=${row.offerId}`)">优惠申请</el-button> <el-button size="mini" type="text" @click="$router.push(`/offer/discount/${row.offerProdId}?offerId=${row.offerId}`)">{{$t('优惠申请')}}</el-button>
<!-- <el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']">佣金规则</el-button>--> <el-button size="mini" type="text" @click="$alert('// TODO')">{{$t('佣金规则')}}</el-button>
<!-- <el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']">管理折扣</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="text-align: center;margin-top: 80px"> <!-- <div style="text-align: center;margin-top: 80px">
<el-button type="primary">申请重货优惠</el-button> <el-button type="primary">申请重货优惠</el-button>
<el-button type="primary">申请泡货优惠</el-button> <el-button type="primary">申请泡货优惠</el-button>
<el-button type="primary">关闭窗口</el-button> <el-button type="primary">关闭窗口</el-button>
</div> </div> -->
</el-card> </el-card>
</div> </div>
</template> </template>
...@@ -97,6 +95,7 @@ import {getUnitList} from "@/api/ecw/unit" ...@@ -97,6 +95,7 @@ import {getUnitList} from "@/api/ecw/unit"
import {getCurrencyList} from "@/api/ecw/currency" import {getCurrencyList} from "@/api/ecw/currency"
import {getProductAttrList} from "@/api/ecw/productAttr" import {getProductAttrList} from "@/api/ecw/productAttr"
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import {listByIds} from '@/api/ecw/region'
export default { export default {
name: "OfferSpecial", name: "OfferSpecial",
components: { components: {
...@@ -128,13 +127,15 @@ export default { ...@@ -128,13 +127,15 @@ export default {
unitList:[], unitList:[],
currencyList:[], currencyList:[],
productAttrList:[], productAttrList:[],
objective: null,
departure: null
}; };
},
watch:{
}, },
created() { created() {
if(this.offerId){ this.getOffer()
this.params.offerId = this.offerId
this.getOffer()
}
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data) getProductAttrList().then(res => this.productAttrList = res.data)
...@@ -142,9 +143,16 @@ export default { ...@@ -142,9 +143,16 @@ export default {
methods: { methods: {
getOffer(){ getOffer(){
this.loading = true this.loading = true
getOffer(this.offerId).then(response => { getOffer(this.offerId || this.params.offerId).then(response => {
this.loading = false this.loading = false
this.offer = response.data this.offer = response.data
this.getCity()
})
},
getCity(){
listByIds({ids: [this.offer.objectiveId, this.offer.departureId].join(',')}).then(res => {
this.objective = res.data.find(item => item.id == this.offer.objectiveId)
this.departure = res.data.find(item => item.id == this.offer.departureId)
}) })
}, },
getProductNamesByIds(ids){ getProductNamesByIds(ids){
...@@ -160,7 +168,7 @@ export default { ...@@ -160,7 +168,7 @@ export default {
} }
}, },
computed: { computed: {
currentMap(){ currencyMap(){
let map = {} let map = {}
this.currencyList.forEach(item => { this.currencyList.forEach(item => {
map[item.id] = item.titleZh map[item.id] = item.titleZh
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane :label="$t('货物详情')" name="first"> <el-tab-pane :label="$t('货物详情')" name="first">
<el-table :data="order.orderItemVOList" border style="width: 100%"> <el-table :data="order.orderItemVOList" border style="width: 100%">
<el-table-column prop="prodTitleZh" :label="$t('序号')" width="90px"> <el-table-column :label="$t('序号')" width="90px">
<template slot-scope="scope">{{scope.$index + 1}}</template> <template slot-scope="scope">{{scope.$index + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="prodTitleZh" :label="$t('中文品名')" /> <el-table-column prop="prodTitleZh" :label="$t('中文品名')" />
...@@ -98,7 +98,11 @@ ...@@ -98,7 +98,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="num" :label="$t('填单件数')" width="90px"/> <el-table-column prop="num" :label="$t('填单件数')" width="90px"/>
<el-table-column prop="sumNum" :label="$t('入仓件数')" width="90px"/> <el-table-column prop="sumNum" :label="$t('入仓件数')" width="90px">
<template slot-scope="{row}">
{{row.warehouseInInfoVO ? row.warehouseInInfoVO.cartonsNum : 0}}
</template>
</el-table-column>
<el-table-column prop="unit" :label="$t('单位')" width="90px"> <el-table-column prop="unit" :label="$t('单位')" width="90px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_PACKAGE_TYPE" :value="row.unit" /> <dict-tag :type="DICT_TYPE.ECW_PACKAGE_TYPE" :value="row.unit" />
...@@ -116,7 +120,7 @@ ...@@ -116,7 +120,7 @@
<el-table-column prop="quantity" :label="$t('数量') + '(个)'" width="90px"/> <el-table-column prop="quantity" :label="$t('数量') + '(个)'" width="90px"/>
<el-table-column prop="" :label="$t('费用类型')"> <el-table-column prop="" :label="$t('费用类型')">
<template slot-scope="{row}"> <template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="row.feeType" /> <dict-tag :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.isPayAdvance" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" :label="$t('成交单价')" width="220px"> <el-table-column prop="" :label="$t('成交单价')" width="220px">
......
...@@ -111,13 +111,13 @@ ...@@ -111,13 +111,13 @@
}" }"
class="mb-0 mr-0" class="mb-0 mr-0"
> >
<product-selector v-model="scope.row.prodId" @change="onProductChange(row, $event)" :disabled="!form.lineId || !productEditable" /> <product-selector v-model="scope.row.prodId" @change="onProductChange(scope.row, $event)" :disabled="!form.lineId || !productEditable" />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('英文品名')" width="160px"> <el-table-column :label="$t('英文品名')" width="160px">
<template slot-scope="{row}"> <template slot-scope="scope">
<product-selector lang="En" v-model="row.prodId" @change="onProductChange(row, $event)" :disabled="!form.lineId || !productEditable" /> <product-selector lang="En" v-model="scope.row.prodId" @change="onProductChange(scope.row, $event)" :disabled="!form.lineId || !productEditable" />
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="商品类型" width="160px"> <!-- <el-table-column label="商品类型" width="160px">
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
}" }"
class="mb-0 mr-0" class="mb-0 mr-0"
> >
<el-input v-model="scope.row.worth" :disabled="!form.lineId" /> <el-input v-model="scope.row.worth" :disabled="!form.lineId" @input="calculationPrice" />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -198,16 +198,17 @@ ...@@ -198,16 +198,17 @@
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" width="80px" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="delProduct(scope.$index)">{{$t('删除')}}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')" width="100px"> <el-table-column :label="$t('快递单号')" width="100px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-model="row.expressNo" placeholder="" /> <el-input v-model="row.expressNo" placeholder="" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" width="80px" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="delProduct(scope.$index)">{{$t('删除')}}</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<!-- <!--
</el-card> </el-card>
...@@ -510,8 +511,11 @@ import FileUpload from '@/components/FileUpload' ...@@ -510,8 +511,11 @@ import FileUpload from '@/components/FileUpload'
import AreaCodeSelector from '@/components/AreaCodeSelector' import AreaCodeSelector from '@/components/AreaCodeSelector'
import ChooseContactDialog from '@/components/ChooseContactDialog' import ChooseContactDialog from '@/components/ChooseContactDialog'
import QuickCreateCustomer from '@/components/QuickCreateCustomer' import QuickCreateCustomer from '@/components/QuickCreateCustomer'
import {calculationPrice} from '@/api/ecw/product'
export default { export default {
name: "OrderEdit", name: "EcwOrderEdit",
components: { components: {
ProductSelector, Selector, CustomerContactSelector, AreaSelector, FileUpload, AreaCodeSelector, ChooseContactDialog, QuickCreateCustomer ProductSelector, Selector, CustomerContactSelector, AreaSelector, FileUpload, AreaCodeSelector, ChooseContactDialog, QuickCreateCustomer
}, },
...@@ -695,17 +699,6 @@ export default { ...@@ -695,17 +699,6 @@ export default {
this.$set(this.form, 'departureId', router.startCityId) this.$set(this.form, 'departureId', router.startCityId)
this.$set(this.form, 'objectiveId', router.destCityId) this.$set(this.form, 'objectiveId', router.destCityId)
}, },
/* 'form.orderItemVOList':{
deep: true,
handler(){
this.form.orderItemVOList.map(item => {
item.prodAttrIds = item.prodAttrArr.join(',')
})
}
}, */
fee(){
this.getCoupons()
},
// 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择 // 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择
selectedRouter(val){ selectedRouter(val){
if(!val) return if(!val) return
...@@ -717,12 +710,36 @@ export default { ...@@ -717,12 +710,36 @@ export default {
} }
}, },
activated(){
if(this.$route.query.id != this.form.id){
this.getOrder()
}
},
created() { created() {
this.couponTypeList = this.getDictDatas(this.DICT_TYPE.ECW_COUPON_TYPE) this.couponTypeList = this.getDictDatas(this.DICT_TYPE.ECW_COUPON_TYPE)
this.couponTypeList.forEach(item => { this.couponTypeList.forEach(item => {
this.$set(this.selectedCoupons, item.value, null) this.$set(this.selectedCoupons, item.value, null)
}) })
if(this.$route.query.id){ if(this.$route.query.id){
this.getOrder()
}else this.addProduct()
getProductAttrList().then(res => this.productAttrList = res.data)
getChannelList().then(res => this.channelList = res.data)
getTradeCityList().then(res => this.tradeCityList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data)
this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE)
this.getDictDatas(this.DICT_TYPE.ECW_CUSTOM_DRAWEE).forEach(item => {
this.customDraweeList.push({
label: item.label, // 显示文字
name: item.value, // key值
value: 2 // 1 发货人,2收货人,默认收货人,可修改
})
})
},
methods: {
getOrder(){
getOrderDetail(this.$route.query.id).then(res => { getOrderDetail(this.$route.query.id).then(res => {
this.form = res.data this.form = res.data
...@@ -746,23 +763,7 @@ export default { ...@@ -746,23 +763,7 @@ export default {
this.$set(this.form, 'consigneeName', res.data.consigneeVO.name) this.$set(this.form, 'consigneeName', res.data.consigneeVO.name)
this.$set(this.form, 'consigneePhone', res.data.consigneeVO.phone) this.$set(this.form, 'consigneePhone', res.data.consigneeVO.phone)
}) })
}else this.addProduct() },
getProductAttrList().then(res => this.productAttrList = res.data)
getChannelList().then(res => this.channelList = res.data)
getTradeCityList().then(res => this.tradeCityList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data)
this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE)
this.getDictDatas(this.DICT_TYPE.ECW_CUSTOM_DRAWEE).forEach(item => {
this.customDraweeList.push({
label: item.label, // 显示文字
name: item.value, // key值
value: 2 // 1 发货人,2收货人,默认收货人,可修改
})
})
},
methods: {
onContactChoose(contact){ onContactChoose(contact){
console.log('选择联系人', contact) console.log('选择联系人', contact)
if(!this.contactChooseType && !this.quickCreateType) return if(!this.contactChooseType && !this.quickCreateType) return
...@@ -835,7 +836,7 @@ export default { ...@@ -835,7 +836,7 @@ export default {
}, },
onProductChange(row, product){ onProductChange(row, product){
console.log(product) console.log(product)
row.goodsType = product ? product.typeId : null // row.goodsType = product ? product.typeId : null
row.prodAttrArr = !product ? [] : product.attrId.split(',').filter(item => item !== '').map(item => +item) row.prodAttrArr = !product ? [] : product.attrId.split(',').filter(item => item !== '').map(item => +item)
}, },
onAreaChange(type, val){ onAreaChange(type, val){
...@@ -938,6 +939,28 @@ export default { ...@@ -938,6 +939,28 @@ export default {
}); });
}); });
}, },
// 计算商品运费(根据货值计算保费)
calculationPrice(){
let calcable = true
if(!this.form.orderItemVOList.length) return false
this.form.orderItemVOList.forEach(item => {
if(!item.prodId){
calcable = false
}
})
if(this.calculating || !calcable) return false
this.calculating = true
calculationPrice({
lineId: this.form.lineId,
transportId: this.form.transportId,
channelId: this.form.channelId,
prodConditionParamList: this.getProductListWithDefaultValue()
}).then(res => {
this.$set(this, 'fee', res.data.costDto)
}).finally(() => {
this.calculating = false
})
},
// 体积。件数,数量,重量为选填,但是接口确实必填,所以生成一个副本并赋予默认值 // 体积。件数,数量,重量为选填,但是接口确实必填,所以生成一个副本并赋予默认值
getProductListWithDefaultValue(){ getProductListWithDefaultValue(){
let arr = [] let arr = []
......
...@@ -499,13 +499,11 @@ export default { ...@@ -499,13 +499,11 @@ export default {
} }
}, },
deleteSpecial(id,orderId){ deleteSpecial(id,orderId){
orderSpecialNeed({orderId:orderId,advanceType:id}).then( this.$confirm(this.$t('确定删除此特需么?')).then(res => {
r =>{ return orderSpecialNeed({orderId:orderId,advanceType:id})
if(r.code === 0){ }).then(() => {
this.getList() this.getList()
} })
}
)
}, },
onBatchClose(){ onBatchClose(){
this.showBatchPickup = false this.showBatchPickup = false
......
...@@ -83,11 +83,12 @@ ...@@ -83,11 +83,12 @@
<dict-selector v-model="form.isShowInMenuBar" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" form-type="radio" /> <dict-selector v-model="form.isShowInMenuBar" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" form-type="radio" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="form.type == 2"> <!--同一个组件可能会配置多个路由,通过路由设置keepalive会产生冲突,此字段废弃 22-09-17 @老丁 -->
<!-- <el-col :span="12" v-if="form.type == 2">
<el-form-item label="保活" prop="keepalive"> <el-form-item label="保活" prop="keepalive">
<dict-selector v-model="form.keepalive" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" form-type="radio" /> <dict-selector v-model="form.keepalive" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" form-type="radio" />
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="24"> <el-col :span="24">
<el-form-item v-if="form.type != '3'" label="菜单图标"> <el-form-item v-if="form.type != '3'" label="菜单图标">
<el-popover placement="bottom-start" width="460" trigger="click" @show="$refs['iconSelect'].reset()"> <el-popover placement="bottom-start" width="460" trigger="click" @show="$refs['iconSelect'].reset()">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment