Commit 83ab1a52 authored by 我在何方's avatar 我在何方
parents 3f15ef68 0fa2df21
......@@ -5,7 +5,7 @@ NODE_ENV = 'production'
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'
# 路由懒加载
......
......@@ -5,7 +5,8 @@ ENV = 'development'
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'
# 路由懒加载
......
......@@ -17972,8 +17972,9 @@ UE.plugins['video'] = function (){
tmpCell.rowSpan = tmpCell.colSpan = 1;
}
//去掉宽高
/* @ 20221223 dragondean
!keepPro && domUtils.removeAttributes(tmpCell,'width height');
!keepPro && domUtils.removeAttributes(tmpCell,'style');
!keepPro && domUtils.removeAttributes(tmpCell,'style'); */
tmpCell.style.borderLeftStyle = "";
tmpCell.style.borderTopStyle = "";
......@@ -18232,12 +18233,13 @@ UE.plugins['video'] = function (){
};
}
//给第一行设置firstRow的样式名称,在排序图标的样式上使用到
/* @ 20221223 dragondean
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++) {
domUtils.removeClasses(this.table.rows[i], "firstRow");
}
domUtils.removeClasses(this.table.rows[i], "firstRow22222");
}
} */
},
/**
* 获取单元格的索引信息
......@@ -215,8 +215,7 @@ export function getNoticeList(data) {
return request({
url: "/shipment/box/noticeList",
method: "post",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
data: jsonToFormData(data),
data,
});
}
......@@ -246,7 +245,7 @@ export function getBoxApproval(params) {
}
// 获得制作提货单(审核中调用)
export function getBillOfLandingInProcessing(params){
export function getBillOfLandingInProcessing(params) {
return request({
url: "/shipment/make-bill-of-lading/getInProcessing",
method: "get",
......
......@@ -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){
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 @@
}
}
}
pre {
.my-process-designer pre {
margin: 0;
height: 100%;
overflow: hidden;
......
......@@ -16,19 +16,19 @@
<el-input v-model="queryParams.cubNo" :placeholder="$t('请输入柜号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<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-select>
</el-form-item>
<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-select>
</el-form-item>
<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-select>
</el-form-item>
......@@ -40,7 +40,7 @@
</el-form-item>
<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 :label="$t('状态')" prop="boxStatus">
......@@ -312,7 +312,9 @@ export default {
methods: {
formatDate,
queryNotice() {
getNoticeList({}).then((res) => {
getNoticeList({
transportTypeList: this.transportTypes.map((item) => item.value),
}).then((res) => {
const { data } = res;
this.noticeList = data ?? [];
if (data.length) {
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('自编号')" prop="selfNo">
<el-input
v-model="queryParams.selfNo"
:placeholder="$t('请输入自编号')"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.selfNo" :placeholder="$t('请输入自编号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('柜号')" prop="cubNo">
<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 :label="$t('柜型')" prop="cabinetId">
<el-select v-model="queryParams.cabinetId" :placeholder="$t('请选择柜型')">
<el-option
v-for="item in cabinetList"
:label="item.name"
:value="item.name"
:key="item.id"
></el-option>
<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-select>
</el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId">
<el-select
v-model="queryParams.startWarehouseId"
:placeholder="$t('请选择始发地')"
>
<el-option
v-for="item in exportWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
<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-select>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="destWarehouseId">
<el-select
v-model="queryParams.destWarehouseId"
:placeholder="$t('请选择目的地')"
>
<el-option
v-for="item in importWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
<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-select>
</el-form-item>
<el-form-item label="" prop="date">
<el-select
v-model="queryParams.dateType"
:placeholder="$t('请选择时间类型')"
clearable
size="small"
>
<el-option
v-for="item in dateTypes"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-form-item label="" prop="dateType">
<el-select v-model="queryParams.dateType" :placeholder="$t('请选择时间类型')" clearable size="small">
<el-option v-for="item in dateTypes" :key="item.value" :label="$l(item, 'label')" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="">
<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-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('结束日期')" clearable />
</el-form-item>
<el-form-item :label="$t('状态')" prop="boxStatus">
<el-select
v-model="queryParams.boxStatus"
: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 v-model="queryParams.boxStatus" :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-form-item>
......@@ -117,32 +51,14 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['shipment:box:create']"
>{{$t('出货安排')}}
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['shipment:box:create']">{{$t('出货安排')}}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['shipment:box:export']"
>{{$t('导出')}}
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:box:export']">{{$t('导出')}}
</el-button>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
......@@ -160,10 +76,7 @@
</el-table-column>
<el-table-column :label="$t('运输方式')" align="center" prop="transportType">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
:value="scope.row.transportType"
/>
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportType" />
</template>
</el-table-column>
......@@ -173,11 +86,7 @@
</template>
</el-table-column>
<el-table-column
:label="$t('方数') + '(' + $t('预装') + '/' + $t('已装') + ')'"
align="center"
prop="squareNumber"
>
<el-table-column :label="$t('方数') + '(' + $t('预装') + '/' + $t('已装') + ')'" align="center" prop="squareNumber">
<template slot-scope="{ row }">
{{ row.boxStatistics.volume }}/{{ row.boxStatistics.loadVolume }}
</template>
......@@ -190,39 +99,20 @@
<el-table-column :label="$t('状态')" align="center" prop="shipmentStatusText" />
<el-table-column
:label="$t('日期')"
align="center"
prop="createTime"
width="180"
>
<el-table-column :label="$t('日期')" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{
new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss')
}}</span>
<span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
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-dropdown trigger="click" @command="(command)=>handleCommand(scope.row, command)" style="marginRight:10px;">
<el-button type="primary">
{{$t('操作')}}<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="edit">{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item command="seaAir"
>{{$t('操作')}}-{{$t('海空联运')}}</el-dropdown-item
>
<el-dropdown-item command="seaAir">{{$t('操作')}}-{{$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="delete">{{$t('删除')}}</el-dropdown-item>
......@@ -247,55 +137,49 @@
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize" @pagination="getList" @current-change="pageChange" />
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title="dialogCfg.title"
:visible.sync="dialogCfg.open"
: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"
/>
<el-dialog :title="dialogCfg.title" :visible.sync="dialogCfg.open" :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 v-if="dialogCfg.dialogType === 'cost'">
<costForm
v-if="dialogCfg.open"
@closeDialog="closeDialog"
:shipmentObj="currRow"
/>
<costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template>
<template v-if="dialogCfg.dialogType === 'error'">
<regError
v-if="dialogCfg.open"
@closeDialog="closeDialog"
:shipmentObj="currRow"
:allUsers="allUsers"
/>
<regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :allUsers="allUsers" />
</template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" />
</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>
</div>
</template>
......@@ -305,24 +189,25 @@ import {
deletebox,
getbox,
getboxPage,
exportboxExcel
} from '@/api/ecw/box'
exportboxExcel,
getNoticeList,
} from "@/api/ecw/box";
import {
downloadFile,
downloadFileByUrl,
formatDate,
} from "./shippingSea/utils";
import { getCabinetPage } from '@/api/ecw/cabinet'
import { getChannelList } from '@/api/ecw/channel'
import { getWarehouseList } from '@/api/ecw/warehouse'
import costForm from './costForm.vue'
import regError from './regError.vue'
import editForm from './editSeaAirForm.vue'
import { getCabinetPage } from "@/api/ecw/cabinet";
import { getChannelList } from "@/api/ecw/channel";
import { getWarehouseList } from "@/api/ecw/warehouse";
import costForm from "./costForm.vue";
import regError from "./regError.vue";
import editForm from "./editSeaAirForm.vue";
import ladingBill from "./ladingBill/index.vue";
import { listUser } from "@/api/system/user";
export default {
name: 'EcwBoxIndexseaair',
name: "EcwBoxIndexseaair",
components: {
costForm,
regError,
......@@ -332,14 +217,13 @@ export default {
data() {
return {
dateTypes: [
{ value: '1', label: this.$t('预装时间') },
{ value: '2', label: this.$t('装柜时间') },
{ value: '3', label: this.$t('起运时间') },
{ value: '4', label: this.$t('到港时间') },
{ value: '5', label: this.$t('清关时间') },
{ value: '6', label: this.$t('提货时间') }
{ value: "1", label: this.$t("预装时间") },
{ value: "2", label: this.$t("装柜时间") },
{ value: "3", label: this.$t("起运时间") },
{ value: "4", label: this.$t("到港时间") },
{ value: "5", label: this.$t("清关时间") },
{ value: "6", label: this.$t("提货时间") },
],
// 遮罩层
loading: true,
// 导出遮罩层
......@@ -351,9 +235,7 @@ export default {
// 出货列表
list: [],
// 弹出层标题
title: '',
// 是否显示弹出层
open: false,
// 弹出类型
dialogCfg: {
title: "",
dialogType: "",
......@@ -367,120 +249,117 @@ export default {
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
page: 1,
pageSize: 10,
id: null,
selfNo: null,
cubNo: null,
cabinetId: null,
boxStatus: null,
startWarehouseId: null,
destWarehouseId: null,
transportType: null
},
cabinetList: [],
channelList: [],
warehouseList: [],
allUsers: []
}
transportTypes: [],
// 通知列表
noticeList: [],
allUsers: [],
};
},
computed: {
exportWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == '2' || item.type == '3'
)
(item) => item.tradeType == "2" || item.type == "3"
);
},
importWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == '1' || item.type == '3'
)
(item) => item.tradeType == "1" || item.type == "3"
);
},
getCabinetName() {
return (cabinetId) => {
for (let index in this.cabinetList) {
let cabinetItem = this.cabinetList[index]
let cabinetItem = this.cabinetList[index];
if (cabinetItem.id == cabinetId) {
return cabinetItem.name
}
return cabinetItem.name;
}
return '/'
}
return "/";
};
},
getShipChannelName() {
return (shippingChannelId) => {
for (let index in this.channelList) {
let channelItem = this.channelList[index]
let channelItem = this.channelList[index];
if (channelItem.channelId == shippingChannelId) {
return this.$l(channelItem, 'name')
}
}
return '/'
return this.$l(channelItem, "name");
}
}
return "/";
};
},
},
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) => {
const { data } = res;
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: {
formatDate,
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() {
this.loading = true
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams }
params.transportType = 4
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime')
let params = { ...this.queryParams };
params.transportType = 4;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询
getboxPage(params).then((response) => {
this.list = response.data.list
this.total = response.data.total
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')
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1
this.getList()
this.queryParams.page = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = []
this.resetForm('queryForm')
this.handleQuery()
this.queryParams = {};
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
resetForm() {
this.$refs["queryForm"].resetFields();
},
/** 新增按钮操作 */
handleAdd() {
......@@ -504,96 +383,94 @@ export default {
this.$set(this.dialogCfg, "open", true);
});
},
/* 关闭弹窗 */
closeDialog(type) {
this.$set(this.dialogCfg, "open", false);
if (type === "add" || type === "edit") {
this.getList();
}
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id
const id = row.id;
this.$modal
.confirm(this.$t('是否确认删除出货编号为{id}的数据项?', {id}))
.confirm(this.$t("是否确认删除出货编号为{id}的数据项?", { id }))
.then(function () {
return deletebox(id)
return deletebox(id);
})
.then(() => {
this.getList()
this.$modal.msgSuccess(this.$t('删除成功'))
this.getList();
this.$modal.msgSuccess(this.$t("删除成功"));
})
.catch(() => {})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = { ...this.queryParams }
params.pageNo = undefined
params.pageSize = undefined
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime')
let params = { ...this.queryParams };
params.page = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行导出
this.$modal
.confirm(this.$t('是否确认导出所有出货数据项?'))
.confirm(this.$t("是否确认导出所有出货数据项?"))
.then(() => {
this.exportLoading = true
return exportboxExcel(params)
this.exportLoading = true;
return exportboxExcel(params);
})
.then((response) => {
this.$download.excel(response, '${table.classComment}.xls')
this.exportLoading = false
this.$download.excel(response, "${table.classComment}.xls");
this.exportLoading = false;
})
.catch(() => {})
.catch(() => {});
},
/* 关闭弹窗 */
closeDialog(type) {
this.$set(this.dialogCfg, "open", false);
if (type === "add" || type === "edit") {
this.getList();
}
},
/** 查看按钮操作 */
handleCommand(row, command) {
this.$set(this.dialogCfg, "fullscreen", false);
switch (command) {
case 'seaAir':
this.$router.push('/boxSeaAir/shippingSeaAir/' + row.id)
break
case "seaAir":
this.$router.push("/boxSeaAir/shippingSeaAir/" + row.id);
break;
case "detail":
this.$router.push("/boxSeaAir/query/" + row.id);
break;
case 'edit':
this.handleUpdate(row)
break
case "edit":
this.handleUpdate(row);
break;
case 'delete':
this.handleDelete(row)
break
case "delete":
this.handleDelete(row);
break;
case "editLadingBill":
const cabinetLabel = this.getCabinetName(row.cabinetId);
/* const title =
`查看提单 ${row.selfNo ?? ""} 柜号:${
row.cubNo ?? ""
} 柜型:${cabinetLabel}`; */
const title = this.$t('查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}`', {
const title = this.$t(
"查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}",
{
selfNo: row.selfNo,
cubNo: row.cubNo,
cabinetLabel: cabinetLabel
})
cabinetLabel: cabinetLabel,
}
);
this.$set(this.dialogCfg, "title", title);
this.$set(this.dialogCfg, "fullscreen", true);
break;
case 'cost':
this.$set(this.dialogCfg, 'title', this.$t('费用登记'))
break
case "cost":
this.$set(this.dialogCfg, "title", this.$t("费用登记"));
break;
case "error":
this.$set(this.dialogCfg, "title", this.$t("异常登记"));
break;
case 'error':
this.$set(this.dialogCfg, 'title', this.$t('异常登记'))
break
case "downloadPreloadGoodsList":
downloadFile(
command,
{ shipmentId: row.id },
this.$t('预装单') + `(${row.selfNo}).xlsx`,
this.$t("预装单") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
......@@ -601,7 +478,7 @@ export default {
downloadFile(
command,
{ shipmentId: row.id },
this.$t('已装单') + `(${row.selfNo}).xlsx`,
this.$t("已装单") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
......@@ -609,7 +486,7 @@ export default {
downloadFile(
command,
{ shipmentId: row.id },
this.$t('应收汇总表') + `(${row.selfNo}).xlsx`,
this.$t("应收汇总表") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
......@@ -617,7 +494,7 @@ export default {
downloadFile(
command,
{ shipmentId: row.id },
this.$t('提货单') + `(${row.selfNo}).zip`,
this.$t("提货单") + `(${row.selfNo}).zip`,
"zip"
);
break;
......@@ -626,15 +503,45 @@ export default {
case "downloadLadingCopy":
downloadFileByUrl(command, { shipmentId: row.id });
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)) {
this.currRow = row;
this.currRow.bosType = 'seaAir'
this.currRow.bosType = "seaAir";
this.$set(this.dialogCfg, "dialogType", command);
this.$set(this.dialogCfg, "width", "600px");
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 {
},
getErrorType() {
for (const [key, value] of Object.entries(this.shipmentObj)) {
// 报关异常 customsInfo
if (key === "customsInfo" && value && value.hasAbnormal) {
// 报关异常 customsHasAbnormal
if (key === "customsHasAbnormal" && value) {
this.$set(this.errorInfo, "errorType", "customs");
this.$set(this.dialogConfig, "title", this.$t("更新报关异常状态"));
}
// 起运异常 shippingInfo
if (key === "shippingInfo" && value && value.hasAbnormal) {
// 起运异常 shippingHasAbnormal
if (key === "shippingHasAbnormal" && value) {
this.$set(this.errorInfo, "errorType", "shipping");
this.$set(this.dialogConfig, "title", this.$t("更新起运异常状态"));
}
// 到港异常 arrivalInfo
if (key === "arrivalInfo" && value && value.hasAbnormal) {
// 到港异常 arrivalHasAbnormal
if (key === "arrivalHasAbnormal" && value) {
this.$set(this.errorInfo, "errorType", "arrival");
this.$set(this.dialogConfig, "title", this.$t("更新到港异常状态"));
}
......
......@@ -240,8 +240,8 @@
<el-table-column :label="$t('品名')" align="center" prop="prodTitleZh" />
<el-table-column :label="$t('备案')" align="center" prop="feeType">
<template slot-scope="{row}">
<template v-if="row.brandName">{{row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" />
<template>{{row.brandName}}</template>
<dict-tag :type="DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL" :value="row.feeType" />
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="num" />
......@@ -354,7 +354,7 @@ export default {
{ 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),
// 查询标识
......
......@@ -237,7 +237,11 @@ export default {
if (end.includes(val[keyName])) {
node.currStatus = "end";
// 判断是否存在异常未处理
if (val[voName].hasAbnormal) {
if (
val.customsHasAbnormal ||
val.shippingHasAbnormal ||
val.arrivalHasAbnormal
) {
continue;
}
// 报关
......
......@@ -25,6 +25,8 @@
<dict-tag :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" :value="customer.resourceType"></dict-tag>
</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('业务员')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('客户来源')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item>
......@@ -414,7 +416,7 @@ import {
orderStatistics,
creditLogCreate,
creditScoreStatistic,
infoListReceiptPage, userMemberUserList, memberUserList, deleteCustomer,
infoListReceiptPage, memberUserList, deleteCustomer,
} from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from '@/utils/dict'
......@@ -691,6 +693,7 @@ export default {
if(r.code === 0){
this.creditLogPage();
this.creditFrom = {};
this.creditScoreStatisticFn()
this.dialogVisible = false;
}
})
......@@ -698,7 +701,6 @@ export default {
//获得信用客户统计
creditScoreStatisticFn(){
creditScoreStatistic({customerId:this.id}).then(r => {
console.log(r)
if(r.code === 0) this.creditScoreStatisticObj = r.data
})
},
......
......@@ -22,8 +22,8 @@
</el-descriptions>
<el-button type="primary" @click="ShowLandingBill=true">查看提单</el-button>
<el-dialog title="查看提单" :visible.sync="ShowLandingBill">
<div style="text-align:center; width: 600px; margin: auto" v-html="billContent" />
<el-dialog title="查看提单" :visible.sync="ShowLandingBill" width="1000px">
<div style="text-align:center; width: 960px; margin: auto" v-html="billContent" />
</el-dialog>
</div>
</template>
......
......@@ -22,7 +22,22 @@
<el-descriptions-item :label="$t('申请理由')" :span="4">
<div>
<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>
</el-descriptions-item>
......
......@@ -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-form-item>
</div>
<div class="w-300">
<div class="w-500">
<el-form-item :label="$t('装货地址')"
:prop="'externalWarehouseDtoList.' + index + '.loadingAddress'"
:rules="{
......
......@@ -194,6 +194,7 @@
<script>
import {getCurrencyList} from "@/api/ecw/currency"
import {
getLabelByOrder, getLabelWaitInByOrder,
getOrder,
getOrderWarehouseIn,
getSpecialListByOrderId, listByOrderId,
......@@ -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){
this.label.orderLabelDtoList.splice(index + 1, 0, {
"end": '',
......@@ -323,6 +341,8 @@ export default {
return getOrder(this.orderId).then(r => {
this.order = r.data
this.getTowSum()
}).then(() => {
this.getLabelByOrder()
})
},
specialHas0(){
......@@ -353,6 +373,12 @@ export default {
sumVolume: this.form.sumVolume,
sumWeight: this.form.sumWeight
}
// 标签箱号
if (this.order.parentOrderId) {
form.labelList = this.label.orderLabelDtoList || []
}
if (this.escapeBol) {
form.exceptionUrls = this.form.exceptionUrls.split(',');
form.descZh = this.form.descZh;
......
......@@ -97,17 +97,17 @@
-
<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 :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"/>
<selector 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.transportPriceUnit" :options="currencyList" :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 :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: '价格错误'}"/>
<selector 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.clearancePriceUnit" :options="currencyList" :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
......@@ -116,14 +116,21 @@
:prop="`priceStepList.${index}.allPrice`"
: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: '价格错误'}"/>
/ <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>
</div>
</template>
<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: '价格错误'}">
<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" />
......@@ -145,6 +152,7 @@
</el-form-item>
</template>
</template>
<!--特需-->
<template v-if="form.priceType==1">
<el-form-item
......@@ -184,7 +192,7 @@
<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>
<el-form-item :label="$t('价格有效期')">
<el-date-picker v-model="form.validateStartDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
......@@ -418,36 +426,48 @@ export default {
if(priceType == 1){
this.$set(this.form, 'allPriceUnit', 1)
}
this.syncAllUnit()
},
'form.transportVolumeUnit'(val){
this.form.specialList.forEach(item => {
'form.transportVolumeUnit'(transportVolumeUnit){
// 最小其计量
this.$set(this.form, 'minWeightUnit', transportVolumeUnit)
/* this.form.specialList.forEach(item => {
item.transportVolumeUnit = val
})
}) */
this.syncSpecialUnit({transportVolumeUnit})
},
'form.clearanceVolumeUnit'(val){
this.form.specialList.forEach(item => {
'form.clearanceVolumeUnit'(clearanceVolumeUnit){
/* this.form.specialList.forEach(item => {
item.clearanceVolumeUnit = val
})
}) */
this.syncSpecialUnit({clearanceVolumeUnit})
},
'form.transportPriceUnit'(val){
this.form.specialList.forEach(item => {
'form.transportPriceUnit'(transportPriceUnit){
/* this.form.specialList.forEach(item => {
item.transportPriceUnit = val
})
}) */
this.syncSpecialUnit({transportPriceUnit})
},
'form.clearancePriceUnit'(val){
this.form.specialList.forEach(item => {
'form.clearancePriceUnit'(clearancePriceUnit){
/* this.form.specialList.forEach(item => {
item.clearancePriceUnit = val
})
}) */
this.syncSpecialUnit({clearancePriceUnit})
},
'form.allPriceUnit'(val){
this.form.specialList.forEach(item => {
'form.allPriceUnit'(allPriceUnit){
/* this.form.specialList.forEach(item => {
item.allPriceUnit = val
})
}) */
this.syncSpecialUnit({allPriceUnit})
},
'form.allVolumeUnit'(val){
this.form.specialList.forEach(item => {
'form.allVolumeUnit'(allVolumeUnit){
// 最小其计量
this.$set(this.form, 'minWeightUnit', allVolumeUnit)
this.syncSpecialUnit({allVolumeUnit})
/* this.form.specialList.forEach(item => {
item.allVolumeUnit = val
})
}) */
},
'form.needBook'(val){
if(val) this.$set(this.form, 'dayLimit', 10000)
......@@ -457,6 +477,50 @@ export default {
if(stepPrice == 1 && (!this.form.priceStepList || !this.form.priceStepList.length)){
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){
this.$set(this.form, 'needPay', val ? 1 : 0)
......@@ -615,6 +679,51 @@ export default {
},
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){
if(!value || value == '') return callback()
value = parseFloat(value)
......
......@@ -367,7 +367,7 @@
</el-form-item>
<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>
<div slot="footer" class="dialog-footer">
......@@ -389,7 +389,7 @@ import { uploadFile } from "@/api/infra/file";
import { listDept } from "@/api/system/dept";
import Ueditor from '@/components/Ueditor'
import {getDictData} from '@/utils/dict'
import RoutersSelector from '@/components/RoutersSelector';
import RoutersSelectorWithoutChannel from '@/components/RoutersSelectorWithoutChannel';
import { has } from 'min-dash';
import Template from "../../cms/template/index";
......@@ -398,7 +398,7 @@ export default {
components: {
Template,
Ueditor,
RoutersSelector
RoutersSelectorWithoutChannel
},
data() {
......@@ -446,6 +446,7 @@ export default {
serviceGroup: [
{id: '1', text: this.$t('集运服务')},
{id: '6', text: this.$t('数量(个)是否必填')},
],
endServiceGroup: [
......@@ -1071,6 +1072,7 @@ export default {
});
this.ladingform.lineId=lineId.substr(0,lineId.length-1);
}
console.log(this.ladingform.lineId);
this.ladingform.account = JSON.stringify(this.arr);
createTemplate(this.ladingform).then(response => {
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