Commit 83ab1a52 authored by 我在何方's avatar 我在何方
parents 3f15ef68 0fa2df21
...@@ -5,7 +5,7 @@ NODE_ENV = 'production' ...@@ -5,7 +5,7 @@ NODE_ENV = 'production'
VUE_APP_TITLE = 捷道管理系统 VUE_APP_TITLE = 捷道管理系统
# 捷道管理系统/开发环境 # 捷道管理系统/开发环境
VUE_APP_BASE_API = 'https://jd.admtest.jdshangmen.com' VUE_APP_BASE_API = 'https://api.jd.jdshangmen.com'
# VUE_APP_BASE_API = '/api' # VUE_APP_BASE_API = '/api'
# 路由懒加载 # 路由懒加载
......
...@@ -5,7 +5,8 @@ ENV = 'development' ...@@ -5,7 +5,8 @@ ENV = 'development'
VUE_APP_TITLE = 捷道管理系统 VUE_APP_TITLE = 捷道管理系统
# 捷道管理系统/开发环境 # 捷道管理系统/开发环境
VUE_APP_BASE_API = 'https://jd.admtest.jdshangmen.com' #VUE_APP_BASE_API = 'https://jd.admtest.jdshangmen.com'
VUE_APP_BASE_API = 'https://api.jd.jdshangmen.com'
# VUE_APP_BASE_API = '/api' # VUE_APP_BASE_API = '/api'
# 路由懒加载 # 路由懒加载
......
...@@ -17972,8 +17972,9 @@ UE.plugins['video'] = function (){ ...@@ -17972,8 +17972,9 @@ UE.plugins['video'] = function (){
tmpCell.rowSpan = tmpCell.colSpan = 1; tmpCell.rowSpan = tmpCell.colSpan = 1;
} }
//去掉宽高 //去掉宽高
/* @ 20221223 dragondean
!keepPro && domUtils.removeAttributes(tmpCell,'width height'); !keepPro && domUtils.removeAttributes(tmpCell,'width height');
!keepPro && domUtils.removeAttributes(tmpCell,'style'); !keepPro && domUtils.removeAttributes(tmpCell,'style'); */
tmpCell.style.borderLeftStyle = ""; tmpCell.style.borderLeftStyle = "";
tmpCell.style.borderTopStyle = ""; tmpCell.style.borderTopStyle = "";
...@@ -18232,12 +18233,13 @@ UE.plugins['video'] = function (){ ...@@ -18232,12 +18233,13 @@ UE.plugins['video'] = function (){
}; };
} }
//给第一行设置firstRow的样式名称,在排序图标的样式上使用到 //给第一行设置firstRow的样式名称,在排序图标的样式上使用到
/* @ 20221223 dragondean
if(!domUtils.hasClass(this.table.rows[0], "firstRow")) { if(!domUtils.hasClass(this.table.rows[0], "firstRow")) {
domUtils.addClass(this.table.rows[0], "firstRow"); domUtils.addClass(this.table.rows[0], "firstRow11111");
for(var i = 1; i< this.table.rows.length; i++) { for(var i = 1; i< this.table.rows.length; i++) {
domUtils.removeClasses(this.table.rows[i], "firstRow"); domUtils.removeClasses(this.table.rows[i], "firstRow22222");
} }
} } */
}, },
/** /**
* 获取单元格的索引信息 * 获取单元格的索引信息
...@@ -215,8 +215,7 @@ export function getNoticeList(data) { ...@@ -215,8 +215,7 @@ export function getNoticeList(data) {
return request({ return request({
url: "/shipment/box/noticeList", url: "/shipment/box/noticeList",
method: "post", method: "post",
headers: { "Content-Type": "application/x-www-form-urlencoded" }, data,
data: jsonToFormData(data),
}); });
} }
...@@ -246,7 +245,7 @@ export function getBoxApproval(params) { ...@@ -246,7 +245,7 @@ export function getBoxApproval(params) {
} }
// 获得制作提货单(审核中调用) // 获得制作提货单(审核中调用)
export function getBillOfLandingInProcessing(params){ export function getBillOfLandingInProcessing(params) {
return request({ return request({
url: "/shipment/make-bill-of-lading/getInProcessing", url: "/shipment/make-bill-of-lading/getInProcessing",
method: "get", method: "get",
......
...@@ -181,6 +181,28 @@ export function orderWarehouseInUpdateLabel(data){ ...@@ -181,6 +181,28 @@ export function orderWarehouseInUpdateLabel(data){
}) })
} }
// 根据订单id获取标签箱号列表
export function getLabelByOrder(orderId){
return request({
url: '/order/order-warehouse-in/get-label-by-order',
method: 'get',
params: {
orderId
}
})
}
// 根据订单id获取待入仓标签箱号
export function getLabelWaitInByOrder(orderId){
return request({
url: '/order/order-warehouse-in/get-label-wait-in-by-order',
method: 'get',
params: {
orderId
}
})
}
// 入仓修改储位 // 入仓修改储位
export function saveOrUpdateOrderLocation(data){ export function saveOrUpdateOrderLocation(data){
return request({ return request({
......
<template>
<div>
<div class="filters mb-10">
{{$t('运输方式')}}
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" style="width:150px" />
{{$t('始发地')}}
<el-select :placeholder="$t('请选择始发地')" v-model="exportCity" clearable>
<el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
{{$t('目的地')}}
<el-select :placeholder="$t('请选择目的地')" v-model="importCity" clearable>
<el-option v-for="item in importCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
<!-- {{$t('出货渠道')}}:-->
<!-- <el-select :placeholder="$t('请选择目渠道')" v-model="channelId" clearable>-->
<!-- <el-option v-for="item in channelList" :key="item.channelId" :label="item.nameZh" :value="item.channelId" />-->
<!-- </el-select>-->
</div>
<div class="mb-10">
<el-radio-group v-model="checkAll">
<el-radio :label="true">{{$t('全选')}}</el-radio>
<el-radio :label="false">{{$t('全不选')}}</el-radio>
</el-radio-group>
</div>
<el-row class="" :gutter="10">
<template v-for="(item, index) in filteredRouterList">
<el-col :span="12" :key="item.value">
<el-card class="mb-10">
<div slot="header">
{{$l(item, 'label')}}
<el-link type="primary" @click.native="toggleHide(item.value)" style="float:right">{{item._hide ? $t('展开') : $t('折叠')}}</el-link>
</div>
<!--table需要给一个key,否则全选的时候不会自动更新渲染-->
<el-table v-if="!hideMap[item.value]" :data="item.routerList" :span-method="SpanMethod" border :key="selectedRoutes.length + item.value">
<el-table-column :label="$t('始发仓')" prop="startTitleZh">
<template slot-scope="{row}">
{{$l(row, 'startTitle')}}
</template>
</el-table-column>
<el-table-column :label="$t('目的仓')" prop="destTitleZh" >
<template slot-scope="{row}">
{{$l(row, 'destTitle')}}
</template>
</el-table-column>
<!-- <el-table-column :label="$t('渠道')" prop="startTitleZh">-->
<!-- <template slot-scope="{row}">-->
<!-- {{$l(row.channel, 'name')}}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column :label="$t('操作')" prop="">
<template slot="header">
<el-checkbox @change="toggleGroupChecker(index, $event)" v-model="groupChecker[item.value]"></el-checkbox>
</template>
<template slot-scope="{row}">
<el-checkbox :checked="getSelectedIndex(row) > -1" @change="toggleChecker(row, $event)"></el-checkbox>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</template>
</el-row>
</div>
</template>
<script>
import {getChannelList} from '@/api/ecw/channel'
import {getTradeCityList} from '@/api/ecw/region'
import {openedRouterList} from '@/api/ecw/warehouse'
export default {
props:{
value: {
type: Array
},
option: Object
},
data(){
return {
transportTypeDicts: this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE),
channelList:[],
tradeCityList:[],
openedRouterList:[], // 开放路线
transportType: null, // 运输方式
importCity: null, // 目的地(进口城市)
exportCity: null, // 始发地(出口城市)
channelId: null,
selectedRoutes: [], // 勾选的路线渠道
hideMap: {}, // 折叠状态
checkAll: null,
groupChecker: {}, // 分组全选状态
}
},
computed:{
importCityList(){
return this.tradeCityList.filter(item => item.type == 1 || item.type == 3)
},
exportCityList(){
return this.tradeCityList.filter(item => item.type == 2 || item.type == 3)
},
exportCityIds(){
let ids = []
this.exportCityList.forEach(item => {
ids.push(item.id)
})
return ids
},
importCityIds(){
let ids = []
this.importCityList.forEach(item => {
ids.push(item.id)
})
return ids
},
availChannelList(){
return this.channelList.filter(item => !this.channelId || this.channelId == item.channelId)
},
filteredRouterList(){
let transportTypeList = []
this.transportTypeDicts
.filter(transport => !this.channelId || transport.cssClass == 'channel')
.forEach(item => {
if(this.transportType === null || this.transportType == '' || this.transportType == item.value){
let routerList = []
this.openedRouterList.forEach(router => {
if(router.transportType == item.value){
routerList.push(Object.assign({
_merge: 1,
channel: {channelId: 0},
}, router)
)
// 字典的cssClass =channel则表示渠道相关(空运,海空联运)
// if(item.cssClass == 'channel'){
// this.availChannelList.slice(1).forEach(channel => {
// routerList.push(Object.assign({channel, _merge: 0}, router))
// })
// }
}
})
console.log(this.availChannelList)
let child = {
label: item.label,
labelEn: item.labelEn,
value: item.value,
_hide: false, // 是否折叠
routerList: routerList
}
transportTypeList.push(child)
}
})
return transportTypeList
}
},
watch:{
exportCity(){
this.getOpenedRouterList()
},
importCity(){
this.getOpenedRouterList()
},
selectedRoutes(val){
this.$emit('input', val)
// 如果选择发生变化
let total = 0
this.filteredRouterList.forEach(item => {
total += item.routerList.length
})
if(total != val.length && val.length){
this.checkAll = null
}
},
value(val){
this.selectedRoutes = val || []
},
checkAll(val){
if(val === true || val === false){
console.log('选中全部')
this.filteredRouterList.forEach(item => {
item.routerList.forEach(router => {
if(this.getSelectedIndex(router) > -1 != val )this.toggleChecker(router, val)
})
})
}
},
option(option){
if(option){
this.changeOption()
}
}
},
created(){
getChannelList().then(res => {
this.channelList = res.data
})
getTradeCityList().then(res => {
this.tradeCityList = res.data
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
this.getOpenedRouterList()
})
if(this.value && this.value.length){
this.selectedRoutes = this.value
}
if(this.option){
this.changeOption()
}
},
methods:{
changeOption(){
if(!this.option) return
this.importCity = +this.option.importCity || null
this.exportCity = +this.option.exportCity || null
this.transportType = this.option.transportId || null
this.channelId = +this.option.channelId || null
},
// 全选、全不选 某个运输方式所有线路
toggleGroupChecker(index, selected){
let routerList = this.filteredRouterList[index].routerList
console.log(routerList.length, selected)
routerList.forEach(router => {
this.toggleChecker(router, selected)
})
},
getOpenedRouterList(){
let params = {}
if(this.exportCity){
params.startCityId = this.exportCity
}
if(this.importCity){
params.destCityId = this.importCity
}
openedRouterList(params).then(res => this.openedRouterList = res.data.filter(item => {
return this.exportCityIds.indexOf(item.startCityId) > -1 && this.importCityIds.indexOf(item.destCityId) > -1
}))
},
// 切换路线选择
toggleChecker(router, selected){
// this.getSelectedIndex(router)
/* this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == item.channel.id){
index = i
break
}
}) */
if(selected){
this.selectedRoutes.push({
lineId: router.id,
channelId: router.channel.channelId,
transportId: router.transportType
})
}else{
let index = this.getSelectedIndex(router)
if(index > -1){
this.selectedRoutes.splice(index, 1)
}
}
},
getSelectedIndex(router){
return this.selectedRoutes.findIndex(item => {
return item.lineId == router.id && item.channelId == router.channel.channelId
})
/* let index = null
this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == router.channel.channelId){
index = i
// break
}
})
return index */
},
SpanMethod({ row, column, rowIndex, columnIndex }){
if (columnIndex < 2 ) {
return {
rowspan: row._merge,
colspan: 1
}
}
return {
rowspan: 1,
colspan: 1
}
},
// 折叠,展开
toggleHide(value){
this.$set(this.hideMap, value, !this.hideMap[value])
}
}
}
</script>
<style scoped>
.mb-10{
margin-bottom: 10px
}
</style>
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
} }
} }
} }
pre { .my-process-designer pre {
margin: 0; margin: 0;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
......
...@@ -16,19 +16,19 @@ ...@@ -16,19 +16,19 @@
<el-input v-model="queryParams.cubNo" :placeholder="$t('请输入柜号')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.cubNo" :placeholder="$t('请输入柜号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('柜型')" prop="cabinetId"> <el-form-item :label="$t('柜型')" prop="cabinetId">
<el-select v-model="queryParams.cabinetId" :placeholder="$t('请选择柜型')"> <el-select v-model="queryParams.cabinetId" :placeholder="$t('请选择柜型')" clearable>
<el-option v-for="item in cabinetList" :label="$l(item, 'name')" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in cabinetList" :label="$l(item, 'name')" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId"> <el-form-item :label="$t('始发地')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')"> <el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')" clearable>
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="destWarehouseId"> <el-form-item :label="$t('目的地')" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')"> <el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')" clearable>
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</el-form-item> </el-form-item>
<el-form-item label="" prop="dateRangeCreateTime"> <el-form-item label="" prop="dateRangeCreateTime">
<el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" /> <el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" clearable />
</el-form-item> </el-form-item>
<el-form-item :label="$t('状态')" prop="boxStatus"> <el-form-item :label="$t('状态')" prop="boxStatus">
...@@ -312,7 +312,9 @@ export default { ...@@ -312,7 +312,9 @@ export default {
methods: { methods: {
formatDate, formatDate,
queryNotice() { queryNotice() {
getNoticeList({}).then((res) => { getNoticeList({
transportTypeList: this.transportTypes.map((item) => item.value),
}).then((res) => {
const { data } = res; const { data } = res;
this.noticeList = data ?? []; this.noticeList = data ?? [];
if (data.length) { if (data.length) {
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item :label="$t('自编号')" prop="selfNo"> <el-form-item :label="$t('自编号')" prop="selfNo">
<el-input <el-input v-model="queryParams.selfNo" :placeholder="$t('请输入自编号')" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.selfNo"
:placeholder="$t('请输入自编号')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('柜号')" prop="cubNo"> <el-form-item :label="$t('柜号')" prop="cubNo">
<el-input <el-input v-model="queryParams.cubNo" :placeholder="$t('请输入柜号')" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.cubNo"
:placeholder="$t('请输入柜号')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('柜型')" prop="cabinetId"> <el-form-item :label="$t('柜型')" prop="cabinetId">
<el-select v-model="queryParams.cabinetId" :placeholder="$t('请选择柜型')"> <el-select v-model="queryParams.cabinetId" :placeholder="$t('请选择柜型')" clearable>
<el-option <el-option v-for="item in cabinetList" :label="$l(item, 'name')" :value="item.id" :key="item.id"></el-option>
v-for="item in cabinetList"
:label="item.name"
:value="item.name"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId"> <el-form-item :label="$t('始发地')" prop="startWarehouseId">
<el-select <el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')" clearable>
v-model="queryParams.startWarehouseId" <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
:placeholder="$t('请选择始发地')"
>
<el-option
v-for="item in exportWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="destWarehouseId"> <el-form-item :label="$t('目的地')" prop="destWarehouseId">
<el-select <el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')" clearable>
v-model="queryParams.destWarehouseId" <el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
:placeholder="$t('请选择目的地')"
>
<el-option
v-for="item in importWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="date"> <el-form-item label="" prop="dateType">
<el-select <el-select v-model="queryParams.dateType" :placeholder="$t('请选择时间类型')" clearable size="small">
v-model="queryParams.dateType" <el-option v-for="item in dateTypes" :key="item.value" :label="$l(item, 'label')" :value="item.value" />
:placeholder="$t('请选择时间类型')"
clearable
size="small"
>
<el-option
v-for="item in dateTypes"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="" prop="dateRangeCreateTime">
<el-date-picker <el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" clearable />
v-model="queryParams.dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-:placeholder="$t('开始日期')"
end-:placeholder="$t('结束日期')"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('状态')" prop="boxStatus"> <el-form-item :label="$t('状态')" prop="boxStatus">
<el-select <el-select v-model="queryParams.boxStatus" :placeholder="$t('请选择状态')" clearable size="small">
v-model="queryParams.boxStatus" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR_SHIPMENT_STATUS)" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value" />
:placeholder="$t('请选择状态')"
clearable
size="small"
>
<el-option
v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR_SHIPMENT_STATUS)"
:key="dict.value"
:label="$l(dict, 'label')"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -117,32 +51,14 @@ ...@@ -117,32 +51,14 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['shipment:box:create']">{{$t('出货安排')}}
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['shipment:box:create']"
>{{$t('出货安排')}}
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:box:export']">{{$t('导出')}}
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['shipment:box:export']"
>{{$t('导出')}}
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
...@@ -160,10 +76,7 @@ ...@@ -160,10 +76,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('运输方式')" align="center" prop="transportType"> <el-table-column :label="$t('运输方式')" align="center" prop="transportType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportType" />
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
:value="scope.row.transportType"
/>
</template> </template>
</el-table-column> </el-table-column>
...@@ -173,11 +86,7 @@ ...@@ -173,11 +86,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('方数') + '(' + $t('预装') + '/' + $t('已装') + ')'" align="center" prop="squareNumber">
:label="$t('方数') + '(' + $t('预装') + '/' + $t('已装') + ')'"
align="center"
prop="squareNumber"
>
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ row.boxStatistics.volume }}/{{ row.boxStatistics.loadVolume }} {{ row.boxStatistics.volume }}/{{ row.boxStatistics.loadVolume }}
</template> </template>
...@@ -190,39 +99,20 @@ ...@@ -190,39 +99,20 @@
<el-table-column :label="$t('状态')" align="center" prop="shipmentStatusText" /> <el-table-column :label="$t('状态')" align="center" prop="shipmentStatusText" />
<el-table-column <el-table-column :label="$t('日期')" align="center" prop="createTime" width="180">
:label="$t('日期')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss') }}</span>
new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss')
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="200px"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)" <el-dropdown trigger="click" @command="(command)=>handleCommand(scope.row, command)" style="marginRight:10px;">
v-hasPermi="['shipment:box:query']">{{$t('查看')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['shipment:box:update']">{{$t('修改')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['shipment:box:delete']">{{$t('删除')}}</el-button> -->
<el-dropdown
trigger="click"
@command="(command) => handleCommand(scope.row, command)"
style="marginRight:10px;"
>
<el-button type="primary"> <el-button type="primary">
{{$t('操作')}}<i class="el-icon-arrow-down el-icon--right"></i> {{$t('操作')}}<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="edit">{{$t('编辑')}}</el-dropdown-item> <el-dropdown-item command="edit">{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item command="seaAir" <el-dropdown-item command="seaAir">{{$t('操作')}}-{{$t('海空联运')}}</el-dropdown-item>
>{{$t('操作')}}-{{$t('海空联运')}}</el-dropdown-item
>
<el-dropdown-item command="error">{{$t('异常登记')}}</el-dropdown-item> <el-dropdown-item command="error">{{$t('异常登记')}}</el-dropdown-item>
<el-dropdown-item command="cost">{{$t('费用登记')}}</el-dropdown-item> <el-dropdown-item command="cost">{{$t('费用登记')}}</el-dropdown-item>
<el-dropdown-item command="delete">{{$t('删除')}}</el-dropdown-item> <el-dropdown-item command="delete">{{$t('删除')}}</el-dropdown-item>
...@@ -247,55 +137,49 @@ ...@@ -247,55 +137,49 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize" @pagination="getList" @current-change="pageChange" />
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog <el-dialog :title="dialogCfg.title" :visible.sync="dialogCfg.open" :width="dialogCfg.width" :fullscreen="dialogCfg.fullscreen" append-to-body class="shippingSea-dialog">
:title="dialogCfg.title" <template v-if="dialogCfg.dialogType === 'edit' || dialogCfg.dialogType === 'add'">
:visible.sync="dialogCfg.open" <editForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
:width="dialogCfg.width"
:fullscreen="dialogCfg.fullscreen"
append-to-body
class="shippingSea-dialog"
>
<template
v-if="
dialogCfg.dialogType === 'edit' || dialogCfg.dialogType === 'add'
"
>
<editForm
v-if="dialogCfg.open"
@closeDialog="closeDialog"
:shipmentObj="currRow"
:warehouseList="warehouseList"
:transportTypes="transportTypes"
:cabinetList="cabinetList"
/>
</template> </template>
<template v-if="dialogCfg.dialogType === 'cost'"> <template v-if="dialogCfg.dialogType === 'cost'">
<costForm <costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
v-if="dialogCfg.open"
@closeDialog="closeDialog"
:shipmentObj="currRow"
/>
</template> </template>
<template v-if="dialogCfg.dialogType === 'error'"> <template v-if="dialogCfg.dialogType === 'error'">
<regError <regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :allUsers="allUsers" />
v-if="dialogCfg.open"
@closeDialog="closeDialog"
:shipmentObj="currRow"
:allUsers="allUsers"
/>
</template> </template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'"> <template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" /> <ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" />
</template> </template>
<template v-if="dialogCfg.dialogType === 'notice'">
<div class="notice-dialog">
<div class="notice-title">{{$t('您有{cnt}个待处理出货操作,请尽快前往处理', {cnt: noticeList.length})}}</div>
<el-table :data="noticeList" height="500px" border>
<el-table-column :label="$t('自编号')" align="center" prop="selfNo" />
<el-table-column :label="$t('类型')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_NOTICE_TYPE" :value="String(scope.row.noticeType)" />
</template>
</el-table-column>
<el-table-column :label="$t('预计时间')" align="center">
<template slot-scope="scope">
{{formatDate(scope.row.createTime)}}
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" width="80">
<template slot-scope="scope">
<el-button type="text" @click="handleCommand(scope.row, 'handle')">{{$t('处理')}}</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="operate-button">
<el-button type="primary" @click="closeDialog">{{$t('关闭窗口')}}</el-button>
</el-row>
</div>
</template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -305,24 +189,25 @@ import { ...@@ -305,24 +189,25 @@ import {
deletebox, deletebox,
getbox, getbox,
getboxPage, getboxPage,
exportboxExcel exportboxExcel,
} from '@/api/ecw/box' getNoticeList,
} from "@/api/ecw/box";
import { import {
downloadFile, downloadFile,
downloadFileByUrl, downloadFileByUrl,
formatDate, formatDate,
} from "./shippingSea/utils"; } from "./shippingSea/utils";
import { getCabinetPage } from '@/api/ecw/cabinet' import { getCabinetPage } from "@/api/ecw/cabinet";
import { getChannelList } from '@/api/ecw/channel' import { getChannelList } from "@/api/ecw/channel";
import { getWarehouseList } from '@/api/ecw/warehouse' import { getWarehouseList } from "@/api/ecw/warehouse";
import costForm from './costForm.vue' import costForm from "./costForm.vue";
import regError from './regError.vue' import regError from "./regError.vue";
import editForm from './editSeaAirForm.vue' import editForm from "./editSeaAirForm.vue";
import ladingBill from "./ladingBill/index.vue"; import ladingBill from "./ladingBill/index.vue";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
export default { export default {
name: 'EcwBoxIndexseaair', name: "EcwBoxIndexseaair",
components: { components: {
costForm, costForm,
regError, regError,
...@@ -332,14 +217,13 @@ export default { ...@@ -332,14 +217,13 @@ export default {
data() { data() {
return { return {
dateTypes: [ dateTypes: [
{ value: '1', label: this.$t('预装时间') }, { value: "1", label: this.$t("预装时间") },
{ value: '2', label: this.$t('装柜时间') }, { value: "2", label: this.$t("装柜时间") },
{ value: '3', label: this.$t('起运时间') }, { value: "3", label: this.$t("起运时间") },
{ value: '4', label: this.$t('到港时间') }, { value: "4", label: this.$t("到港时间") },
{ value: '5', label: this.$t('清关时间') }, { value: "5", label: this.$t("清关时间") },
{ value: '6', label: this.$t('提货时间') } { value: "6", label: this.$t("提货时间") },
], ],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -351,9 +235,7 @@ export default { ...@@ -351,9 +235,7 @@ export default {
// 出货列表 // 出货列表
list: [], list: [],
// 弹出层标题 // 弹出层标题
title: '', // 弹出类型
// 是否显示弹出层
open: false,
dialogCfg: { dialogCfg: {
title: "", title: "",
dialogType: "", dialogType: "",
...@@ -367,120 +249,117 @@ export default { ...@@ -367,120 +249,117 @@ export default {
dateRangeCreateTime: [], dateRangeCreateTime: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNo: 1, page: 1,
pageSize: 10, pageSize: 10,
id: null,
selfNo: null,
cubNo: null,
cabinetId: null,
boxStatus: null,
startWarehouseId: null,
destWarehouseId: null,
transportType: null
}, },
cabinetList: [], cabinetList: [],
channelList: [], channelList: [],
warehouseList: [], warehouseList: [],
allUsers: [] transportTypes: [],
} // 通知列表
noticeList: [],
allUsers: [],
};
}, },
computed: { computed: {
exportWarehouseList() { exportWarehouseList() {
return this.warehouseList.filter( return this.warehouseList.filter(
(item) => item.tradeType == '2' || item.type == '3' (item) => item.tradeType == "2" || item.type == "3"
) );
}, },
importWarehouseList() { importWarehouseList() {
return this.warehouseList.filter( return this.warehouseList.filter(
(item) => item.tradeType == '1' || item.type == '3' (item) => item.tradeType == "1" || item.type == "3"
) );
}, },
getCabinetName() { getCabinetName() {
return (cabinetId) => { return (cabinetId) => {
for (let index in this.cabinetList) { for (let index in this.cabinetList) {
let cabinetItem = this.cabinetList[index] let cabinetItem = this.cabinetList[index];
if (cabinetItem.id == cabinetId) { if (cabinetItem.id == cabinetId) {
return cabinetItem.name return cabinetItem.name;
} }
} }
return '/' return "/";
} };
}, },
getShipChannelName() { getShipChannelName() {
return (shippingChannelId) => { return (shippingChannelId) => {
for (let index in this.channelList) { for (let index in this.channelList) {
let channelItem = this.channelList[index] let channelItem = this.channelList[index];
if (channelItem.channelId == shippingChannelId) { if (channelItem.channelId == shippingChannelId) {
return this.$l(channelItem, 'name') return this.$l(channelItem, "name");
} }
} }
return '/' return "/";
} };
} },
}, },
created() { created() {
this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == "4");
getWarehouseList().then((res) => (this.warehouseList = res.data));
getCabinetPage(null).then((response) => {
this.cabinetList = response.data.list;
});
this.getList();
this.getChannelList();
this.queryNotice();
// 用户 // 用户
listUser({ pageNo: "1", pageSize: "10000" }).then((res) => { listUser({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res; const { data } = res;
this.allUsers = data.list ?? []; this.allUsers = data.list ?? [];
}); });
this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == '4')
getWarehouseList().then((res) => (this.warehouseList = res.data))
getCabinetPage(null).then((response) => {
this.cabinetList = response.data.list
})
this.getList()
this.getChannelList()
}, },
methods: { methods: {
formatDate,
getChannelList() { getChannelList() {
getChannelList().then((res) => (this.channelList = res.data)) getChannelList().then((res) => (this.channelList = res.data));
},
queryNotice() {
getNoticeList({
transportTypeList: this.transportTypes.map((item) => item.value),
}).then((res) => {
const { data } = res;
this.noticeList = data ?? [];
if (data.length) {
this.$set(this.dialogCfg, "title", this.$t("出货操作提醒"));
this.$set(this.dialogCfg, "dialogType", "notice");
this.$set(this.dialogCfg, "width", "650px");
this.$set(this.dialogCfg, "open", true);
}
});
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true this.loading = true;
// 处理查询参数 // 处理查询参数
let params = { ...this.queryParams } let params = { ...this.queryParams };
params.transportType = 4 params.transportType = 4;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime') this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询 // 执行查询
getboxPage(params).then((response) => { getboxPage(params).then((response) => {
this.list = response.data.list this.list = response.data.list;
this.total = response.data.total this.total = response.data.total;
this.loading = false this.loading = false;
}) });
},
/** 取消按钮 */
cancel() {
this.open = false
this.reset()
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
cabinetId: undefined,
startWarehouseId: undefined,
destWarehouseId: undefined,
transportType: '4'
}
this.resetForm('form')
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1 this.queryParams.page = 1;
this.getList() this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRangeCreateTime = [] this.queryParams = {};
this.resetForm('queryForm') this.dateRangeCreateTime = [];
this.handleQuery() this.resetForm("queryForm");
this.handleQuery();
},
resetForm() {
this.$refs["queryForm"].resetFields();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
...@@ -504,96 +383,94 @@ export default { ...@@ -504,96 +383,94 @@ export default {
this.$set(this.dialogCfg, "open", true); this.$set(this.dialogCfg, "open", true);
}); });
}, },
/* 关闭弹窗 */
closeDialog(type) {
this.$set(this.dialogCfg, "open", false);
if (type === "add" || type === "edit") {
this.getList();
}
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id const id = row.id;
this.$modal this.$modal
.confirm(this.$t('是否确认删除出货编号为{id}的数据项?', {id})) .confirm(this.$t("是否确认删除出货编号为{id}的数据项?", { id }))
.then(function () { .then(function () {
return deletebox(id) return deletebox(id);
}) })
.then(() => { .then(() => {
this.getList() this.getList();
this.$modal.msgSuccess(this.$t('删除成功')) this.$modal.msgSuccess(this.$t("删除成功"));
}) })
.catch(() => {}) .catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// 处理查询参数 // 处理查询参数
let params = { ...this.queryParams } let params = { ...this.queryParams };
params.pageNo = undefined params.page = undefined;
params.pageSize = undefined params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime') this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行导出 // 执行导出
this.$modal this.$modal
.confirm(this.$t('是否确认导出所有出货数据项?')) .confirm(this.$t("是否确认导出所有出货数据项?"))
.then(() => { .then(() => {
this.exportLoading = true this.exportLoading = true;
return exportboxExcel(params) return exportboxExcel(params);
}) })
.then((response) => { .then((response) => {
this.$download.excel(response, '${table.classComment}.xls') this.$download.excel(response, "${table.classComment}.xls");
this.exportLoading = false this.exportLoading = false;
}) })
.catch(() => {}) .catch(() => {});
},
/* 关闭弹窗 */
closeDialog(type) {
this.$set(this.dialogCfg, "open", false);
if (type === "add" || type === "edit") {
this.getList();
}
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleCommand(row, command) { handleCommand(row, command) {
this.$set(this.dialogCfg, "fullscreen", false); this.$set(this.dialogCfg, "fullscreen", false);
switch (command) { switch (command) {
case 'seaAir': case "seaAir":
this.$router.push('/boxSeaAir/shippingSeaAir/' + row.id) this.$router.push("/boxSeaAir/shippingSeaAir/" + row.id);
break break;
case "detail": case "detail":
this.$router.push("/boxSeaAir/query/" + row.id); this.$router.push("/boxSeaAir/query/" + row.id);
break; break;
case 'edit': case "edit":
this.handleUpdate(row) this.handleUpdate(row);
break break;
case 'delete': case "delete":
this.handleDelete(row) this.handleDelete(row);
break break;
case "editLadingBill": case "editLadingBill":
const cabinetLabel = this.getCabinetName(row.cabinetId); const cabinetLabel = this.getCabinetName(row.cabinetId);
/* const title = const title = this.$t(
"查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}",
`查看提单 ${row.selfNo ?? ""} 柜号:${ {
row.cubNo ?? ""
} 柜型:${cabinetLabel}`; */
const title = this.$t('查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}`', {
selfNo: row.selfNo, selfNo: row.selfNo,
cubNo: row.cubNo, cubNo: row.cubNo,
cabinetLabel: cabinetLabel cabinetLabel: cabinetLabel,
}) }
this.$set(this.dialogCfg, "title", title); );
this.$set(this.dialogCfg, "fullscreen", true); this.$set(this.dialogCfg, "title", title);
break; this.$set(this.dialogCfg, "fullscreen", true);
break;
case "cost":
this.$set(this.dialogCfg, "title", this.$t("费用登记"));
break;
case 'cost': case "error":
this.$set(this.dialogCfg, 'title', this.$t('费用登记')) this.$set(this.dialogCfg, "title", this.$t("异常登记"));
break break;
case 'error':
this.$set(this.dialogCfg, 'title', this.$t('异常登记'))
break
case "downloadPreloadGoodsList": case "downloadPreloadGoodsList":
downloadFile( downloadFile(
command, command,
{ shipmentId: row.id }, { shipmentId: row.id },
this.$t('预装单') + `(${row.selfNo}).xlsx`, this.$t("预装单") + `(${row.selfNo}).xlsx`,
"xlsx" "xlsx"
); );
break; break;
...@@ -601,7 +478,7 @@ export default { ...@@ -601,7 +478,7 @@ export default {
downloadFile( downloadFile(
command, command,
{ shipmentId: row.id }, { shipmentId: row.id },
this.$t('已装单') + `(${row.selfNo}).xlsx`, this.$t("已装单") + `(${row.selfNo}).xlsx`,
"xlsx" "xlsx"
); );
break; break;
...@@ -609,7 +486,7 @@ export default { ...@@ -609,7 +486,7 @@ export default {
downloadFile( downloadFile(
command, command,
{ shipmentId: row.id }, { shipmentId: row.id },
this.$t('应收汇总表') + `(${row.selfNo}).xlsx`, this.$t("应收汇总表") + `(${row.selfNo}).xlsx`,
"xlsx" "xlsx"
); );
break; break;
...@@ -617,7 +494,7 @@ export default { ...@@ -617,7 +494,7 @@ export default {
downloadFile( downloadFile(
command, command,
{ shipmentId: row.id }, { shipmentId: row.id },
this.$t('提货单') + `(${row.selfNo}).zip`, this.$t("提货单") + `(${row.selfNo}).zip`,
"zip" "zip"
); );
break; break;
...@@ -626,15 +503,45 @@ export default { ...@@ -626,15 +503,45 @@ export default {
case "downloadLadingCopy": case "downloadLadingCopy":
downloadFileByUrl(command, { shipmentId: row.id }); downloadFileByUrl(command, { shipmentId: row.id });
break; break;
case "handle":
const { noticeType } = row;
if ([1, 2, 3, 4, 8].includes(noticeType)) {
this.$router.push("/boxSeaAir/shippingSeaAir/" + row.id);
}
if ([5, 6, 7].includes(noticeType)) {
this.$router.push("/boxSeaAir/query/" + row.id);
}
this.closeDialog();
break;
} }
if (["editLadingBill", "cost", "error"].includes(command)) { if (["editLadingBill", "cost", "error"].includes(command)) {
this.currRow = row; this.currRow = row;
this.currRow.bosType = 'seaAir' this.currRow.bosType = "seaAir";
this.$set(this.dialogCfg, "dialogType", command); this.$set(this.dialogCfg, "dialogType", command);
this.$set(this.dialogCfg, "width", "600px"); this.$set(this.dialogCfg, "width", "600px");
this.$set(this.dialogCfg, "open", true); this.$set(this.dialogCfg, "open", true);
} }
} },
/* 分页 */
pageChange(page) {
this.pageParam.page = page;
this.getList();
},
},
};
</script>
<style lang="scss" scoped>
.notice-dialog {
::v-deep .notice-title {
font-size: 24px;
font-weight: bold;
margin-bottom: 10px;
}
::v-deep .operate-button {
margin-top: 10px;
text-align: center;
} }
} }
</script> </style>
...@@ -362,18 +362,18 @@ export default { ...@@ -362,18 +362,18 @@ export default {
}, },
getErrorType() { getErrorType() {
for (const [key, value] of Object.entries(this.shipmentObj)) { for (const [key, value] of Object.entries(this.shipmentObj)) {
// 报关异常 customsInfo // 报关异常 customsHasAbnormal
if (key === "customsInfo" && value && value.hasAbnormal) { if (key === "customsHasAbnormal" && value) {
this.$set(this.errorInfo, "errorType", "customs"); this.$set(this.errorInfo, "errorType", "customs");
this.$set(this.dialogConfig, "title", this.$t("更新报关异常状态")); this.$set(this.dialogConfig, "title", this.$t("更新报关异常状态"));
} }
// 起运异常 shippingInfo // 起运异常 shippingHasAbnormal
if (key === "shippingInfo" && value && value.hasAbnormal) { if (key === "shippingHasAbnormal" && value) {
this.$set(this.errorInfo, "errorType", "shipping"); this.$set(this.errorInfo, "errorType", "shipping");
this.$set(this.dialogConfig, "title", this.$t("更新起运异常状态")); this.$set(this.dialogConfig, "title", this.$t("更新起运异常状态"));
} }
// 到港异常 arrivalInfo // 到港异常 arrivalHasAbnormal
if (key === "arrivalInfo" && value && value.hasAbnormal) { if (key === "arrivalHasAbnormal" && value) {
this.$set(this.errorInfo, "errorType", "arrival"); this.$set(this.errorInfo, "errorType", "arrival");
this.$set(this.dialogConfig, "title", this.$t("更新到港异常状态")); this.$set(this.dialogConfig, "title", this.$t("更新到港异常状态"));
} }
......
...@@ -240,8 +240,8 @@ ...@@ -240,8 +240,8 @@
<el-table-column :label="$t('品名')" align="center" prop="prodTitleZh" /> <el-table-column :label="$t('品名')" align="center" prop="prodTitleZh" />
<el-table-column :label="$t('备案')" align="center" prop="feeType"> <el-table-column :label="$t('备案')" align="center" prop="feeType">
<template slot-scope="{row}"> <template slot-scope="{row}">
<template v-if="row.brandName">{{row.brandName}}</template> <template>{{row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" /> <dict-tag :type="DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL" :value="row.feeType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="num" /> <el-table-column :label="$t('箱数')" align="center" prop="num" />
...@@ -354,7 +354,7 @@ export default { ...@@ -354,7 +354,7 @@ export default {
{ value: "2", label: this.$t("关联单") }, { value: "2", label: this.$t("关联单") },
], ],
// 备案 // 备案
filingOps: this.getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL), filingOps: this.getDictDatas(DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL),
// 报关方式 // 报关方式
declarationMethodOps: this.getDictDatas(DICT_TYPE.ECW_CUSTOMS_TYPE), declarationMethodOps: this.getDictDatas(DICT_TYPE.ECW_CUSTOMS_TYPE),
// 查询标识 // 查询标识
......
...@@ -237,7 +237,11 @@ export default { ...@@ -237,7 +237,11 @@ export default {
if (end.includes(val[keyName])) { if (end.includes(val[keyName])) {
node.currStatus = "end"; node.currStatus = "end";
// 判断是否存在异常未处理 // 判断是否存在异常未处理
if (val[voName].hasAbnormal) { if (
val.customsHasAbnormal ||
val.shippingHasAbnormal ||
val.arrivalHasAbnormal
) {
continue; continue;
} }
// 报关 // 报关
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
<dict-tag :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" :value="customer.resourceType"></dict-tag> <dict-tag :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" :value="customer.resourceType"></dict-tag>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item> <el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item>
<el-descriptions-item :label="$t('信用等级')">{{ customer.creditLevelNameZh }}</el-descriptions-item>
<el-descriptions-item :label="$t('国家')">{{ country }}</el-descriptions-item> <el-descriptions-item :label="$t('国家')">{{ country }}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('业务员')">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item :label="$t('业务员')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('客户来源')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item> <el-descriptions-item :label="$t('客户来源')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item>
...@@ -414,7 +416,7 @@ import { ...@@ -414,7 +416,7 @@ import {
orderStatistics, orderStatistics,
creditLogCreate, creditLogCreate,
creditScoreStatistic, creditScoreStatistic,
infoListReceiptPage, userMemberUserList, memberUserList, deleteCustomer, infoListReceiptPage, memberUserList, deleteCustomer,
} from '@/api/ecw/customer' } from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from '@/utils/dict' import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from '@/utils/dict'
...@@ -691,6 +693,7 @@ export default { ...@@ -691,6 +693,7 @@ export default {
if(r.code === 0){ if(r.code === 0){
this.creditLogPage(); this.creditLogPage();
this.creditFrom = {}; this.creditFrom = {};
this.creditScoreStatisticFn()
this.dialogVisible = false; this.dialogVisible = false;
} }
}) })
...@@ -698,7 +701,6 @@ export default { ...@@ -698,7 +701,6 @@ export default {
//获得信用客户统计 //获得信用客户统计
creditScoreStatisticFn(){ creditScoreStatisticFn(){
creditScoreStatistic({customerId:this.id}).then(r => { creditScoreStatistic({customerId:this.id}).then(r => {
console.log(r)
if(r.code === 0) this.creditScoreStatisticObj = r.data if(r.code === 0) this.creditScoreStatisticObj = r.data
}) })
}, },
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
</el-descriptions> </el-descriptions>
<el-button type="primary" @click="ShowLandingBill=true">查看提单</el-button> <el-button type="primary" @click="ShowLandingBill=true">查看提单</el-button>
<el-dialog title="查看提单" :visible.sync="ShowLandingBill"> <el-dialog title="查看提单" :visible.sync="ShowLandingBill" width="1000px">
<div style="text-align:center; width: 600px; margin: auto" v-html="billContent" /> <div style="text-align:center; width: 960px; margin: auto" v-html="billContent" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
......
...@@ -22,7 +22,22 @@ ...@@ -22,7 +22,22 @@
<el-descriptions-item :label="$t('申请理由')" :span="4"> <el-descriptions-item :label="$t('申请理由')" :span="4">
<div> <div>
<div v-for="(item, index) in order.applyInfoList" :key="index"> <div v-for="(item, index) in order.applyInfoList" :key="index">
{{index+1}}{{item.name}} {{$t('从旧的【{orgValue}】改成新的【{newValue}', {orgValue: item.orgValue, newValue: item.newValue })}} {{index+1}}{{item.name}}
<template v-if="item.type != 1">{{$t('从旧的【{orgValue}】改成新的【{newValue}', {orgValue: item.orgValue, newValue: item.newValue })}}</template>
<div v-else class="pl-30">
<div>
{{$t('旧值')}}<div v-if="!item.orgExternalWarehouse" class="pl-30">{{$t('')}}</div>
</div>
<div v-for="it in item.orgExternalWarehouse" class="pl-30">
{{$t('时间')}}{{it.estLoadingTime}}{{$t('地址')}}{{it.loadingAddress}}
</div>
<div>
{{$t('新值')}}<template v-if="!item.newExternalWarehouse">{{$t('')}}</template>
</div>
<div v-for="it in item.newExternalWarehouse" class="pl-30">
{{$t('时间')}}{{it.estLoadingTime}}{{$t('地址')}}{{it.loadingAddress}}
</div>
</div>
</div> </div>
</div> </div>
</el-descriptions-item> </el-descriptions-item>
......
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
<el-date-picker v-model="item.estLoadingTime" value-format="yyyy-MM-dd HH:mm:ss" class="w-200"></el-date-picker> <el-date-picker v-model="item.estLoadingTime" value-format="yyyy-MM-dd HH:mm:ss" class="w-200"></el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
<div class="w-300"> <div class="w-500">
<el-form-item :label="$t('装货地址')" <el-form-item :label="$t('装货地址')"
:prop="'externalWarehouseDtoList.' + index + '.loadingAddress'" :prop="'externalWarehouseDtoList.' + index + '.loadingAddress'"
:rules="{ :rules="{
......
...@@ -194,6 +194,7 @@ ...@@ -194,6 +194,7 @@
<script> <script>
import {getCurrencyList} from "@/api/ecw/currency" import {getCurrencyList} from "@/api/ecw/currency"
import { import {
getLabelByOrder, getLabelWaitInByOrder,
getOrder, getOrder,
getOrderWarehouseIn, getOrderWarehouseIn,
getSpecialListByOrderId, listByOrderId, getSpecialListByOrderId, listByOrderId,
...@@ -303,6 +304,23 @@ export default { ...@@ -303,6 +304,23 @@ export default {
} }
}) })
}, },
// 箱号标签回显
getLabelByOrder(){
getLabelByOrder(this.orderId).then(r => {
if (r.code === 0 && !! r.data && r.data.length > 0) {
this.label.orderLabelDtoList = r.data
} else {
// 没有历史数据,查默认值
getLabelWaitInByOrder(this.orderId).then(r => {
console.log(r)
if (r.code === 0 && !! r.data) {
this.label.orderLabelDtoList = [r.data]
}
})
}
})
},
handleLabelAdd(index){ handleLabelAdd(index){
this.label.orderLabelDtoList.splice(index + 1, 0, { this.label.orderLabelDtoList.splice(index + 1, 0, {
"end": '', "end": '',
...@@ -323,6 +341,8 @@ export default { ...@@ -323,6 +341,8 @@ export default {
return getOrder(this.orderId).then(r => { return getOrder(this.orderId).then(r => {
this.order = r.data this.order = r.data
this.getTowSum() this.getTowSum()
}).then(() => {
this.getLabelByOrder()
}) })
}, },
specialHas0(){ specialHas0(){
...@@ -353,6 +373,12 @@ export default { ...@@ -353,6 +373,12 @@ export default {
sumVolume: this.form.sumVolume, sumVolume: this.form.sumVolume,
sumWeight: this.form.sumWeight sumWeight: this.form.sumWeight
} }
// 标签箱号
if (this.order.parentOrderId) {
form.labelList = this.label.orderLabelDtoList || []
}
if (this.escapeBol) { if (this.escapeBol) {
form.exceptionUrls = this.form.exceptionUrls.split(','); form.exceptionUrls = this.form.exceptionUrls.split(',');
form.descZh = this.form.descZh; form.descZh = this.form.descZh;
......
...@@ -97,17 +97,17 @@ ...@@ -97,17 +97,17 @@
- -
<el-input v-model="item.endNum" type="number" placeholder="" class="w-100"></el-input> <el-input v-model="item.endNum" type="number" placeholder="" class="w-100"></el-input>
/ /
<selector v-model="item.weightUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> <selector :disabled="index > 0" v-model="item.weightUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('默认运费')" v-if="form.priceType != 1" :prop="`priceStepList.${index}.transportPrice`" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"> <el-form-item :label="$t('默认运费')" v-if="form.priceType != 1" :prop="`priceStepList.${index}.transportPrice`" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}">
<inputor default2="0" v-model.number="item.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10"/> <inputor default2="0" v-model.number="item.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10"/>
<selector v-model="item.transportPriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> <selector :disabled="index > 0" v-model="item.transportPriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
/ <selector v-model="item.transportVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> / <selector :disabled="index > 0" v-model="item.transportVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('默认清关费')" v-if="form.priceType != 1" :prop="`priceStepList.${index}.transportPrice`" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"> <el-form-item :label="$t('默认清关费')" v-if="form.priceType != 1" :prop="`priceStepList.${index}.transportPrice`" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}">
<inputor default2="0" v-model.number="item.clearancePrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"/> <inputor default2="0" v-model.number="item.clearancePrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"/>
<selector v-model="item.clearancePriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> <selector :disabled="index > 0" v-model="item.clearancePriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
/ <selector v-model="item.clearanceVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> / <selector :disabled="index > 0" v-model="item.clearanceVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -116,14 +116,21 @@ ...@@ -116,14 +116,21 @@
:prop="`priceStepList.${index}.allPrice`" :prop="`priceStepList.${index}.allPrice`"
:rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"
> >
<selector v-model="item.allPriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> <selector :disabled="index > 0" v-model="item.allPriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
<inputor default2="0" v-model.number="item.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 ml-10" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"/> <inputor default2="0" v-model.number="item.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 ml-10" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"/>
/ <selector v-model="item.allVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> / <selector :disabled="index > 0" v-model="item.allVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item> </el-form-item>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<el-form-item
:label="$t('最小起计量')"
:prop="`minWeight`"
>
<inputor default2="0" v-model.number="form.minWeight" type="number" class="w-100" :rules="{validator: priceValidator, trigger: 'blur', message: '数量错误'}"/>
/ <selector v-model="form.minWeightUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" disabled />
</el-form-item>
<el-form-item :label="$t('默认全包价')" v-if="form.priceType == 1" prop="allPrice" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"> <el-form-item :label="$t('默认全包价')" v-if="form.priceType == 1" prop="allPrice" :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}">
<selector test="allPriceUnit" v-model="form.allPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100 mr-10 aaa" /> <selector test="allPriceUnit" v-model="form.allPriceUnit" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable2 class="w-100 mr-10 aaa" />
<inputor default2="0" v-model.number="form.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr10" /> <inputor default2="0" v-model.number="form.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr10" />
...@@ -145,46 +152,47 @@ ...@@ -145,46 +152,47 @@
</el-form-item> </el-form-item>
</template> </template>
<!--特需--> </template>
<template v-if="form.priceType==1"> <!--特需-->
<el-form-item <template v-if="form.priceType==1">
v-for="(special, specialIndex) in this.form.specialList" <el-form-item
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('全包价')" v-for="(special, specialIndex) in this.form.specialList"
:key="specialIndex + 'transport'" :label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('全包价')"
:prop="`specialList.${specialIndex}`.allPrice" :key="specialIndex + 'transport'"
:rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}" :prop="`specialList.${specialIndex}`.allPrice"
> :rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"
<selector disabled v-model="special.allPriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100 mr-10" /> >
<inputor default2="0" v-model.number="special.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" /> <selector disabled v-model="special.allPriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100 mr-10" />
<span class="mr-10">/</span> <inputor default2="0" v-model.number="special.allPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
<selector disabled v-model="special.allVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> <span class="mr-10">/</span>
</el-form-item> <selector disabled v-model="special.allVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</template> </el-form-item>
<template v-else v-for="(special, specialIndex) in this.form.specialList">
<el-form-item
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('运费')"
:key="specialIndex + 'transport'"
:prop="`specialList.${specialIndex}.transportPrice`"
:rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"
>
<selector disabled v-model="special.transportPriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100 mr-10" />
<inputor default2="0" v-model.number="special.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
<span class="mr-10">/</span>
<selector disabled v-model="special.transportVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item>
<el-form-item
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('清关费')"
:key="specialIndex + 'clearance'"
:prop="`specialList.${specialIndex}.clearancePrice`"
:rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"
>
<selector disabled v-model="special.clearancePriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100 mr-10" />
<inputor default2="0" v-model.number="special.clearancePrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
<span class="mr-10">/</span>
<selector disabled v-model="special.clearanceVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item>
</template>
</template> </template>
<template v-else v-for="(special, specialIndex) in this.form.specialList">
<el-form-item
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('运费')"
:key="specialIndex + 'transport'"
:prop="`specialList.${specialIndex}.transportPrice`"
:rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"
>
<selector disabled v-model="special.transportPriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100 mr-10" />
<inputor default2="0" v-model.number="special.transportPrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
<span class="mr-10">/</span>
<selector disabled v-model="special.transportVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item>
<el-form-item
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('清关费')"
:key="specialIndex + 'clearance'"
:prop="`specialList.${specialIndex}.clearancePrice`"
:rules="{validator: priceValidator, trigger: 'blur', message: '价格错误'}"
>
<selector disabled v-model="special.clearancePriceUnit" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100 mr-10" />
<inputor default2="0" v-model.number="special.clearancePrice" type="number" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
<span class="mr-10">/</span>
<selector disabled v-model="special.clearanceVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item>
</template>
<el-form-item :label="$t('价格有效期')"> <el-form-item :label="$t('价格有效期')">
<el-date-picker v-model="form.validateStartDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker v-model="form.validateStartDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
...@@ -418,36 +426,48 @@ export default { ...@@ -418,36 +426,48 @@ export default {
if(priceType == 1){ if(priceType == 1){
this.$set(this.form, 'allPriceUnit', 1) this.$set(this.form, 'allPriceUnit', 1)
} }
this.syncAllUnit()
}, },
'form.transportVolumeUnit'(val){ 'form.transportVolumeUnit'(transportVolumeUnit){
this.form.specialList.forEach(item => { // 最小其计量
this.$set(this.form, 'minWeightUnit', transportVolumeUnit)
/* this.form.specialList.forEach(item => {
item.transportVolumeUnit = val item.transportVolumeUnit = val
}) }) */
this.syncSpecialUnit({transportVolumeUnit})
}, },
'form.clearanceVolumeUnit'(val){ 'form.clearanceVolumeUnit'(clearanceVolumeUnit){
this.form.specialList.forEach(item => { /* this.form.specialList.forEach(item => {
item.clearanceVolumeUnit = val item.clearanceVolumeUnit = val
}) }) */
this.syncSpecialUnit({clearanceVolumeUnit})
}, },
'form.transportPriceUnit'(val){ 'form.transportPriceUnit'(transportPriceUnit){
this.form.specialList.forEach(item => { /* this.form.specialList.forEach(item => {
item.transportPriceUnit = val item.transportPriceUnit = val
}) }) */
this.syncSpecialUnit({transportPriceUnit})
}, },
'form.clearancePriceUnit'(val){ 'form.clearancePriceUnit'(clearancePriceUnit){
this.form.specialList.forEach(item => { /* this.form.specialList.forEach(item => {
item.clearancePriceUnit = val item.clearancePriceUnit = val
}) }) */
this.syncSpecialUnit({clearancePriceUnit})
}, },
'form.allPriceUnit'(val){ 'form.allPriceUnit'(allPriceUnit){
this.form.specialList.forEach(item => { /* this.form.specialList.forEach(item => {
item.allPriceUnit = val item.allPriceUnit = val
}) }) */
this.syncSpecialUnit({allPriceUnit})
}, },
'form.allVolumeUnit'(val){ 'form.allVolumeUnit'(allVolumeUnit){
this.form.specialList.forEach(item => { // 最小其计量
this.$set(this.form, 'minWeightUnit', allVolumeUnit)
this.syncSpecialUnit({allVolumeUnit})
/* this.form.specialList.forEach(item => {
item.allVolumeUnit = val item.allVolumeUnit = val
}) }) */
}, },
'form.needBook'(val){ 'form.needBook'(val){
if(val) this.$set(this.form, 'dayLimit', 10000) if(val) this.$set(this.form, 'dayLimit', 10000)
...@@ -457,6 +477,50 @@ export default { ...@@ -457,6 +477,50 @@ export default {
if(stepPrice == 1 && (!this.form.priceStepList || !this.form.priceStepList.length)){ if(stepPrice == 1 && (!this.form.priceStepList || !this.form.priceStepList.length)){
this.$set(this.form, 'priceStepList', [{},{}]) this.$set(this.form, 'priceStepList', [{},{}])
} }
this.syncAllUnit()
},
// 添加区间价的时候需要对新增的区间价给初始单位
'form.priceStepList'(){
this.syncAllUnit()
/* this.syncSpecialUnit({
weightUnit: priceStepList[0].weightUnit,
transportPriceUnit: priceStepList[0].transportPriceUnit,
transportVolumeUnit: priceStepList[0].transportVolumeUnit,
clearancePriceUnit: priceStepList[0].clearancePriceUnit,
clearanceVolumeUnit: priceStepList[0].clearanceVolumeUnit,
allPriceUnit: priceStepList[0].allPriceUnit,
allVolumeUnit: priceStepList[0].allVolumeUnit,
}) */
},
// 第一阶梯的 重量单位
'form.priceStepList.0.weightUnit'(weightUnit){
this.syncSpecialUnit({weightUnit})
},
// 第一阶梯的 运费货币单位
'form.priceStepList.0.transportPriceUnit'(transportPriceUnit){
this.syncSpecialUnit({transportPriceUnit})
},
// 第一阶梯的 运费体积单位
'form.priceStepList.0.transportVolumeUnit'(transportVolumeUnit){
this.syncSpecialUnit({transportVolumeUnit})
},
// 第一阶梯的 清关费货币单位
'form.priceStepList.0.clearancePriceUnit'(clearancePriceUnit){
this.syncSpecialUnit({clearancePriceUnit})
},
// 第一阶梯的 清关费体积单位
'form.priceStepList.0.clearanceVolumeUnit'(clearanceVolumeUnit){
this.syncSpecialUnit({clearanceVolumeUnit})
},
// 第一阶梯价 全包价 货币单位
'form.priceStepList.0.allPriceUnit'(allPriceUnit){
// 同步特需价格单位
this.syncSpecialUnit({allPriceUnit})
},
// 第一阶梯价 全包价 体积单位
'form.priceStepList.0.allVolumeUnit'(allVolumeUnit){
// 同步特需价格单位
this.syncSpecialUnit({allVolumeUnit})
}, },
needPay(val){ needPay(val){
this.$set(this.form, 'needPay', val ? 1 : 0) this.$set(this.form, 'needPay', val ? 1 : 0)
...@@ -615,6 +679,51 @@ export default { ...@@ -615,6 +679,51 @@ export default {
}, },
methods: { methods: {
// 同步全部单位
syncAllUnit(){
let obj = this.form.stepPrice == 1 ? this.form.priceStepList[0] : this.form
let fields = {}
// 全包价
if(this.form.priceType == 1){
fields = {
allPriceUnit: obj['allPriceUnit'],
allVolumeUnit: obj['allVolumeUnit']
}
}else{
fields = {
transportPriceUnit: obj.transportPriceUnit,
transportVolumeUnit: obj.transportVolumeUnit,
clearancePriceUnit: obj.clearancePriceUnit,
clearanceVolumeUnit: obj.clearanceVolumeUnit,
}
}
if(this.form.stepPrice == 1){
fields['weightUnit'] = this.form.priceStepList[0].weightUnit
}
this.syncSpecialUnit(fields)
},
// 同步特需的货币单位和体积单位
syncSpecialUnit(obj){
if(!obj) return
// 同步特需单位
this.form.specialList.forEach(item => {
Object.assign(item, obj)
})
// 如果是阶梯价则需要同步其他阶梯
if(this.form.stepPrice == 1){
this.form.priceStepList.forEach(item => {
Object.assign(item, obj)
})
}
// 不是阶梯价需要 同步最小起计量
if(obj['transportVolumeUnit'] || obj['allVolumeUnit']){
this.$set(this.form, 'minWeightUnit', obj['transportVolumeUnit'] || obj['allVolumeUnit'])
}
},
priceValidator(rule, value, callback){ priceValidator(rule, value, callback){
if(!value || value == '') return callback() if(!value || value == '') return callback()
value = parseFloat(value) value = parseFloat(value)
......
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
</el-form-item> </el-form-item>
<el-form-item v-if="showFlag"> <el-form-item v-if="showFlag">
<routers-selector v-model="ladingform.lineIds" /> <routers-selector-without-channel v-model="ladingform.lineIds" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -389,7 +389,7 @@ import { uploadFile } from "@/api/infra/file"; ...@@ -389,7 +389,7 @@ import { uploadFile } from "@/api/infra/file";
import { listDept } from "@/api/system/dept"; import { listDept } from "@/api/system/dept";
import Ueditor from '@/components/Ueditor' import Ueditor from '@/components/Ueditor'
import {getDictData} from '@/utils/dict' import {getDictData} from '@/utils/dict'
import RoutersSelector from '@/components/RoutersSelector'; import RoutersSelectorWithoutChannel from '@/components/RoutersSelectorWithoutChannel';
import { has } from 'min-dash'; import { has } from 'min-dash';
import Template from "../../cms/template/index"; import Template from "../../cms/template/index";
...@@ -398,7 +398,7 @@ export default { ...@@ -398,7 +398,7 @@ export default {
components: { components: {
Template, Template,
Ueditor, Ueditor,
RoutersSelector RoutersSelectorWithoutChannel
}, },
data() { data() {
...@@ -446,6 +446,7 @@ export default { ...@@ -446,6 +446,7 @@ export default {
serviceGroup: [ serviceGroup: [
{id: '1', text: this.$t('集运服务')}, {id: '1', text: this.$t('集运服务')},
{id: '6', text: this.$t('数量(个)是否必填')},
], ],
endServiceGroup: [ endServiceGroup: [
...@@ -1071,6 +1072,7 @@ export default { ...@@ -1071,6 +1072,7 @@ export default {
}); });
this.ladingform.lineId=lineId.substr(0,lineId.length-1); this.ladingform.lineId=lineId.substr(0,lineId.length-1);
} }
console.log(this.ladingform.lineId);
this.ladingform.account = JSON.stringify(this.arr); this.ladingform.account = JSON.stringify(this.arr);
createTemplate(this.ladingform).then(response => { createTemplate(this.ladingform).then(response => {
this.$modal.msgSuccess(this.$t("设置路线提单模板成功")); this.$modal.msgSuccess(this.$t("设置路线提单模板成功"));
......
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