Commit 6a1c1cb3 authored by 我在何方's avatar 我在何方

添加应收款,应付款UI

parents dd6d4602 ad637e33
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"build:prod": "vue-cli-service build", "build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
"build:demo1024": "vue-cli-service build --mode demo1024", "build:demo1024": "vue-cli-service build --mode demo1024",
"dev:demo1024": "vue-cli-service serve --mode demo1024",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src" "lint": "eslint --ext .js,.vue src"
}, },
......
...@@ -22,3 +22,10 @@ export function getProcessDefinitionBpmnXML(id) { ...@@ -22,3 +22,10 @@ export function getProcessDefinitionBpmnXML(id) {
method: 'get' method: 'get'
}) })
} }
export function getProcessDefinitionBpmnXMLByKey(id) {
return request({
url: '/bpm/model/get-bpmn-xml-key?key=' + id,
method: 'get'
})
}
import request from '@/utils/request'
// 创建出货
export function createbox(data) {
return request({
url: '/shipment/box/create',
method: 'post',
data: data
})
}
// 更新出货
export function updatebox(data) {
return request({
url: '/shipment/box/update',
method: 'put',
data: data
})
}
// 删除出货
export function deletebox(id) {
return request({
url: '/shipment/box/delete?id=' + id,
method: 'delete'
})
}
// 获得出货
export function getbox(id) {
return request({
url: '/shipment/box/get?id=' + id,
method: 'get'
})
}
// 获得出货分页
export function getboxPage(query) {
return request({
url: '/shipment/box/page',
method: 'get',
params: query
})
}
// 导出出货 Excel
export function exportboxExcel(query) {
return request({
url: '/shipment/box/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
...@@ -27,9 +27,9 @@ export function deleteOrder(id) { ...@@ -27,9 +27,9 @@ export function deleteOrder(id) {
} }
// 获得订单 // 获得订单
export function getOrder(id) { export function getOrder(orderId) {
return request({ return request({
url: '/ecw/order/get?id=' + id, url: '/ecw/order/info/' + orderId,
method: 'get' method: 'get'
}) })
} }
......
...@@ -52,3 +52,21 @@ export function exportProductPriceExcel(query) { ...@@ -52,3 +52,21 @@ export function exportProductPriceExcel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 批量获得产品价格
export function getProductPriceList(query) {
return request({
url: '/ecw/product-price/list',
method: 'get',
params: query
})
}
// 批量修改产品价格
export function batchUpdateProductPrice(query) {
return request({
url: '/ecw/product-price/batchUpdate',
method: 'put',
data: query
})
}
...@@ -34,6 +34,14 @@ export function getWarehouseArea(id) { ...@@ -34,6 +34,14 @@ export function getWarehouseArea(id) {
}) })
} }
// 获得仓库查询库域
export function getByWarehouseId() {
return request({
url: '/ecw/warehouse-area/getByWarehouseId',
method: 'get'
})
}
// 获得库区库域分页 // 获得库区库域分页
export function getWarehouseAreaPage(query) { export function getWarehouseAreaPage(query) {
return request({ return request({
......
...@@ -26,15 +26,15 @@ export default { ...@@ -26,15 +26,15 @@ export default {
}, },
data(){ data(){
return { return {
index: {}, index: null,
list:[], list:[],
loading: false loading: false
} }
}, },
watch:{ watch:{
index(val){ index(val){
this.$emit('input', val !== null ? this.list[val].id : null) this.$emit('input', val !== null ? this.list[val].id: null)
this.$emit('change', val !== null ? this.list[val] : null) this.$emit('change', val !== null ? this.list[val]: null)
}, },
value(val){ value(val){
this.init() this.init()
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
}, },
methods:{ methods:{
init(){ init(){
if(!this.value) return null if(!this.value) return
let index = this.list.findIndex(item => item.id == this.value) let index = this.list.findIndex(item => item.id == this.value)
if(index < 0){ if(index < 0){
getCustomer(this.value).then(res => { getCustomer(this.value).then(res => {
......
...@@ -34,7 +34,12 @@ ...@@ -34,7 +34,12 @@
import {getCustomerSelect, getCustomerList} from '@/api/ecw/customer' import {getCustomerSelect, getCustomerList} from '@/api/ecw/customer'
export default { export default {
props:{ props:{
value: [Array] value: {
type: Array,
default: () => {
return []
}
}
}, },
data(){ data(){
return { return {
...@@ -60,16 +65,16 @@ export default { ...@@ -60,16 +65,16 @@ export default {
customerIds(val){ customerIds(val){
this.$emit('input', val) this.$emit('input', val)
}, },
value(val, old){ value(val){
if(val.sort().join(',') != old.sort().join(',')){ if(Array.from(new Set(val)).sort().join(',') != Array.from(new Set(this.customerIds)).sort().join(',')){
this.getChoosedList() this.getChoosedList()
} }
} }
}, },
created(){ created(){
if(this.value && this.value.length){ /* if(this.value && this.value.length){
this.getChoosedList() this.getChoosedList()
} } */
this.reLoad() this.reLoad()
}, },
methods:{ methods:{
......
<template>
<div>
<el-descriptions border v-if="order.orderId">
<el-descriptions-item label="唛头">{{ order.marks }}</el-descriptions-item>
<el-descriptions-item label="已到箱数">{{ order.sumNum }}</el-descriptions-item>
<el-descriptions-item label="订单状态">{{ order.status }}</el-descriptions-item>
<el-descriptions-item label="送货时间">todo</el-descriptions-item>
<el-descriptions-item label="运输方式">{{ order.logisticsInfoDto.transportId }}</el-descriptions-item>
<el-descriptions-item label="始发地">{{ order.logisticsInfoDto.startWarehouseId }}</el-descriptions-item>
<el-descriptions-item label="目的地">{{ order.logisticsInfoDto.destWarehouseId }}</el-descriptions-item>
<el-descriptions-item label="发货人姓名">{{ order.consignorVO.name }}</el-descriptions-item>
<el-descriptions-item label="发货人公司">{{ order.consignorVO.company }}</el-descriptions-item>
<el-descriptions-item label="发货人电话">{{ order.consignorVO.phone }}</el-descriptions-item>
<el-descriptions-item label="收货人姓名">{{ order.consigneeVO.name }}</el-descriptions-item>
<el-descriptions-item label="收货人公司">{{ order.consigneeVO.company }}</el-descriptions-item>
<el-descriptions-item label="收货人电话">{{ order.consigneeVO.phone }}</el-descriptions-item>
<el-descriptions-item label="入仓类型">{{ order.warehouseType }}</el-descriptions-item>
<el-descriptions-item label="订单号">{{ order.orderNo }}</el-descriptions-item>
</el-descriptions>
</div>
</template>
<script>
export default {
name: "orderBaseInfo",
props: {
order: Object
}
}
</script>
<style scoped>
</style>
...@@ -44,7 +44,9 @@ export default { ...@@ -44,7 +44,9 @@ export default {
props: { props: {
defaultIds: { defaultIds: {
type: Array, type: Array,
default: [] default: () => {
return []
}
} }
}, },
data() { data() {
......
<template>
<div>
<el-dialog
title="选择储位"
:visible.sync="opened"
width="600px"
:before-close="handleClose()"
>
<el-tabs v-model="activeName" type="card" @tab-click="activeWarehouse = {}">
<el-tab-pane :label="item.name" :name="'' + index" v-for="(item, index) in area" :key="index">
<div>
<div style="text-align: center">区域</div>
<div style="background-color: #efefef;padding: 10px 10px 0;border: #dcdcdc solid 1px;border-radius: 2px">
<el-row :gutter="20">
<el-col :span="12" v-for="(warehouse, i) in item.children" :key="i">
<div
class="warehouse-block"
:class="{'warehouse-block-selected': warehouse.selected, 'warehouse-block-active': warehouse.id === activeWarehouse.id}"
@click="handleSelectWarehouse(warehouse)"
>
{{ warehouse.name }}
</div>
</el-col>
</el-row>
</div>
</div>
<div>
<div style="text-align: center">仓位</div>
<div class="position-group">
<div class="position" v-for="position in activeWarehouse.positionList" :key="item.id">
<div
class="position-item"
v-for="item in position.children"
@click="handleSelectPosition(item)"
:class="{'position-item-active': item.selected}">
{{ item.code }}
</div>
</div>
</div>
</div>
<el-divider></el-divider>
已选择:{{ selected.join(', ') }}
<el-divider></el-divider>
</el-tab-pane>
</el-tabs>
<span slot="footer">
<el-button @click="opened = false">关 闭</el-button>
<el-button type="primary" @click="opened = false">提 交</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getByWarehouseId } from '@/api/ecw/warehouseArea'
export default {
name: 'WarehouseAreaDialog',
props: {
visible: {
type: Boolean,
default: false
},
},
data() {
return {
opened: false,
key: 0,
orderId: '',
area: [],
activeName: '0',
selectedWarehouse: [],
selectedPosition: [],
activeWarehouse: {}
};
},
watch: {
visible(val) {
if (val) {
this.opened = true
} else {
}
},
opened(val) {
if (val) {
} else {
this.$emit('update:visible', false)
}
}
},
methods: {
handleClose() {},
handleSelectWarehouse(warehouse) {
this.activeWarehouse = warehouse
if (!!warehouse.selected) {
warehouse.selected = false
} else {
warehouse.selected = true
// 区域被选,清空该区域下的位置
warehouse.positionList.forEach(g => {
g.children.forEach(k => {
k.selected = false
})
})
}
},
handleSelectPosition(position) {
if (!!position.selected) {
position.selected = false
// 反选位置时,检查父区域下是否所有位置被反选,若是,选父区域
const parentAre = this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId)
if (!parentAre.selected) {
// 检查父区域下是否所有位置被反选
let hasSelected = false
parentAre.positionList.forEach(g => {
// 位置
g.children.forEach(k => {
// 子位置
if (k.selected) hasSelected = true
})
})
// 所有子位置被反选,选父区域
if (!hasSelected) parentAre.selected = true
}
} else {
position.selected = true
// 选位置时,父区域反选
this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId).selected = false
}
}
},
mounted() {
if (this.visible) {
this.opened = true
}
getByWarehouseId().then(r => {
const area = r.data
area.forEach(e => {
// 仓库
e.children.forEach(f => {
// 区域
f.selected = false
f.positionList.forEach(g => {
// 位置
g.children.forEach(k => {
// 子位置
k.selected = false
})
})
})
})
this.area = area
})
},
computed: {
selected() {
const result = []
this.area.forEach(e => {
// 仓库
e.children.forEach(f => {
// 区域
if (f.selected) result.push(f.code)
f.positionList.forEach(g => {
// 位置
g.children.forEach(k => {
// 子位置
if (k.selected) result.push(k.code)
})
})
})
})
return result
}
}
}
</script>
<style scoped>
.warehouse-block{
background-color: white;
border-radius: 5px;
height: 42px;
line-height: 42px;
text-align: center;
margin-bottom: 15px;
cursor: pointer;
transition: 0.5s;
box-shadow: #bfbfbf 3px 3px 14px 0;
}
.warehouse-block:hover{
opacity: 0.9;
transition: 0.5s;
transform: scale(1.02);
box-shadow: #8f8f8f 7px 5px 14px 0;
}
.warehouse-block-active{
box-shadow: #7e9dbd 7px 5px 14px 0;
transform: scale(1.04);
}
.warehouse-block-selected{
color: #ffffff;
background-color: #4085e3;
}
.position-group{
display: flex;
background-color: #EFEFEF;
border: 1px #EFEFEF solid;
gap: 1px;
min-height: 64px;
}
.position{
width: 20%;
height: 64px;
display: flex;
flex-direction: column;
gap: 1px;
}
.position-item{
width: 100%;
background-color: #FFFFFF;
flex: 1;
cursor: pointer;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
}
.position-item:hover{
background-color: #d7dbe3;
}
.position-item-active{
background-color: #4085e3;
color: white;
}
.position-item-active:hover{
background-color: #4085e3;
opacity: 0.8;
}
</style>
...@@ -283,6 +283,38 @@ export const constantRoutes = [ ...@@ -283,6 +283,38 @@ export const constantRoutes = [
}, },
] ]
}, },
<<<<<<< HEAD
=======
{
path: '/boxSea',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
/* {
path: 'query/:boxId(\\d+)',
component: (resolve) => import('@/views/ecw/box/query'),
props: true,
name: 'boxQuery',
meta: {title: '出货详情', icon: '', activeMenu: '/shipment/box'}
}, */
{
path: 'shippingSea/:boxId(\\d+)',
component: (resolve) => import('@/views/ecw/box/shipping/shippingSea'),
props: true,
name: 'shippingSea',
meta: {title: '海运出货操作', icon: '', activeMenu: '/shipment/boxSea'}
},
{
path: 'shippingSea/preinstall/:boxId(\\d+)',
component: (resolve) => import('@/views/ecw/box/shipping/preinstall'),
props: true,
name: 'preinstall',
meta: {title: '出货安排(预装)', icon: '', activeMenu: '/shipment/boxSea'}
}
]
},
>>>>>>> ad637e33746d81b425acb8e13903cb24f27ecd6e
] ]
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错
......
...@@ -55,6 +55,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { ...@@ -55,6 +55,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
title: route.name, title: route.name,
icon: route.icon icon: route.icon
} }
route.hidden = typeof route.isShowInMenuBar != 'undefined' && (route.isShowInMenuBar == 'false' || !route.isShowInMenuBar)
// 处理 component 属性 // 处理 component 属性
if (route.children) { // 父节点 if (route.children) { // 父节点
// debugger // debugger
......
...@@ -10,6 +10,7 @@ export const DICT_TYPE = { ...@@ -10,6 +10,7 @@ export const DICT_TYPE = {
COMMON_STATUS: 'common_status', COMMON_STATUS: 'common_status',
AUDIT_STATUS: 'audit_status', AUDIT_STATUS: 'audit_status',
ADVANCE_STATUS: 'advance_status', ADVANCE_STATUS: 'advance_status',
BOX_SHIPMENT_STATUS: 'box_shipment_status',
// ========== SYSTEM 模块 ========== // ========== SYSTEM 模块 ==========
SYSTEM_USER_SEX: 'system_user_sex', SYSTEM_USER_SEX: 'system_user_sex',
...@@ -134,6 +135,7 @@ export const DICT_TYPE = { ...@@ -134,6 +135,7 @@ export const DICT_TYPE = {
PRODUCT_RECORD_ATTRIBUTE: 'product_record_attribute', //产品备案属性 PRODUCT_RECORD_ATTRIBUTE: 'product_record_attribute', //产品备案属性
CONTROL_GOODS_STATUS: 'control_goods_status', //控货状态 CONTROL_GOODS_STATUS: 'control_goods_status', //控货状态
DISBURSEMENT_TYPE: 'disbursement_type' ,//垫付类型 DISBURSEMENT_TYPE: 'disbursement_type' ,//垫付类型
DRAWEE: 'drawee', // 付款人
ORDER_STATUS:'order_status',//订单状态 ORDER_STATUS:'order_status',//订单状态
BEGINTIME_TYPE_ENDTIME:'begintime_type_endtime',//订单日期筛选类别 BEGINTIME_TYPE_ENDTIME:'begintime_type_endtime',//订单日期筛选类别
} }
......
...@@ -11,7 +11,7 @@ const baseURL = process.env.VUE_APP_BASE_API ...@@ -11,7 +11,7 @@ const baseURL = process.env.VUE_APP_BASE_API
* @param pattern {String} '{y}-{m}-{d} {h}:{i}:{s}' * @param pattern {String} '{y}-{m}-{d} {h}:{i}:{s}'
* @returns {string|null} * @returns {string|null}
*/ */
export function parseTime(time, pattern) { export function parseTime(time, pattern = undefined) {
if (arguments.length === 0 || !time) { if (arguments.length === 0 || !time) {
return null return null
} }
......
...@@ -53,7 +53,11 @@ ...@@ -53,7 +53,11 @@
</template> </template>
<script> <script>
import {getProcessDefinitionBpmnXML, getProcessDefinitionList} from "@/api/bpm/definition"; import {
getProcessDefinitionBpmnXML,
getProcessDefinitionBpmnXMLByKey,
getProcessDefinitionList
} from "@/api/bpm/definition";
import {DICT_TYPE, getDictDatas} from "@/utils/dict"; import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import {getForm} from "@/api/bpm/form"; import {getForm} from "@/api/bpm/form";
import {decodeFields} from "@/utils/formGenerator"; import {decodeFields} from "@/utils/formGenerator";
...@@ -118,15 +122,14 @@ export default { ...@@ -118,15 +122,14 @@ export default {
...JSON.parse(row.formConf), ...JSON.parse(row.formConf),
fields: decodeFields(row.formFields) fields: decodeFields(row.formFields)
} }
// 加载流程图 // 加载流程图
getProcessDefinitionBpmnXML(row.id).then(response => { getProcessDefinitionBpmnXML(row.id).then(response => {
this.bpmnXML = response.data this.bpmnXML = response.data
}) })
/*getProcessDefinitionBpmnXMLByKey("sheet_sale").then(response => {
this.bpmnXML = response.data
})*/
} else if (row.formCustomCreatePath) { } else if (row.formCustomCreatePath) {
//
console.log("-------------------------------");
console.log(row.formCustomCreatePath);
this.$router.push({ path: row.formCustomCreatePath}); this.$router.push({ path: row.formCustomCreatePath});
// 这里暂时无需加载流程图,因为跳出到另外个 Tab; // 这里暂时无需加载流程图,因为跳出到另外个 Tab;
} }
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="自编号" prop="selfNo">
<el-input v-model="queryParams.selfNo" placeholder="请输入自编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="柜号" prop="cubNo">
<el-input v-model="queryParams.cubNo" placeholder="请输入柜号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="boxStatus">
<el-select v-model="queryParams.boxStatus" placeholder="请选择状态" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item label="" prop="date">
<el-select v-model="queryParams.dateType" placeholder="请选择时间类型" clearable size="small">
<el-option v-for="item in dateTypes" :key="item.value" :label="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"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['shipment:box:create']">出货安排
</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']">导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="自编号" align="center" prop="selfNo"/>
<el-table-column label="柜号" align="center" prop="cubNo"/>
<el-table-column label="出货渠道" align="center" prop="shippingChannelId">
<template slot-scope="scope">
<span>{{ getShipChannelName(scope.row.shippingChannelId) }}</span>
</template>
</el-table-column>
<el-table-column label="方数(预装/已装)" align="center" prop="squareNumber"/>
<el-table-column label="重量(预装/已装)" align="center" prop="weight"/>
<el-table-column label="状态" align="center" prop="boxStatus">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPMENT_STATUS" :value="scope.row.boxStatus"/>
</template>
</el-table-column>
<el-table-column label="日期" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
v-hasPermi="['shipment:box:query']">查看</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['shipment:box:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['shipment:box:delete']">删除</el-button> -->
<el-dropdown trigger="click" @command="(command)=>handleCommand(scope.row, command)">
<el-button type="primary">
操作<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="edit">编辑</el-dropdown-item>
<el-dropdown-item command="air">操作-空运</el-dropdown-item>
<el-dropdown-item command="error">异常登记</el-dropdown-item>
<el-dropdown-item command="cost">费用登记</el-dropdown-item>
<el-dropdown-item command="delete">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="出货渠道" prop="shippingChannelId">
<el-select v-model="form.shippingChannelId" placeholder="请选择出货渠道">
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="form.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="form.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {createbox, updatebox, deletebox, getbox, getboxPage, exportboxExcel} from "@/api/ecw/box";
import { getChannelList } from '@/api/ecw/channel';
import { getWarehouseList } from "@/api/ecw/warehouse"
export default {
name: "box",
components: {},
data() {
return {
dateTypes:[
{value:'1', label:'分拣时间'},
{value:'2', label:'装柜时间'},
{value:'3', label:'起运时间'},
{value:'4', label:'到港时间'},
{value:'5', label:'清关时间'},
{value:'6', label:'提货时间'},
],
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 出货列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
id: null,
selfNo: null,
cubNo: null,
cabinetId: null,
boxStatus: null,
startWarehouseId: null,
destWarehouseId: null,
transportType: null,
},
channelList:[],
warehouseList: [],
// 表单参数
form: {},
// 表单校验
rules: {
shippingChannelId: [{ required: true, message: "出货渠道不能为空", trigger: "blur" }],
startWarehouseId: [{ required: true, message: "始发地不能为空", trigger: "blur" }],
destWarehouseId: [{ required: true, message: "目的地不能为空", trigger: "blur" }],
}
};
},
computed: {
exportWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == '2' || item.type == '3')
},
importWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == '1' || item.type == '3')
},
getShipChannelName() {
return shippingChannelId => {
for (let index in this.channelList) {
let channelItem = this.channelList[index];
if (channelItem.channelId == shippingChannelId) {
return channelItem.nameZh;
}
}
return '/'
}
}
},
created() {
getWarehouseList().then(res => this.warehouseList = res.data);
this.getList();
this.getChannelList();
},
methods: {
getChannelList(){
getChannelList().then(res => this.channelList = res.data)
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
params.transportType = 3;
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: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加出货";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getbox(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改出货";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
this.form.transportType = 3;
// 修改的提交
if (this.form.id != null) {
updatebox(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createbox(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除出货编号为"' + id + '"的数据项?').then(function () {
return deletebox(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm('是否确认导出所有出货数据项?').then(() => {
this.exportLoading = true;
return exportboxExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {
});
},
/** 查看按钮操作 */
handleCommand(row, command) {
switch (command) {
case 'sea':
this.$router.push('/box/shippingSea/' + row.id)
break;
case 'edit':
this.handleUpdate(row);
break;
case 'delete':
this.handleDelete(row);
break;
}
},
}
};
</script>
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="自编号" prop="selfNo">
<el-input v-model="queryParams.selfNo" placeholder="请输入自编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="柜号" prop="cubNo">
<el-input v-model="queryParams.cubNo" placeholder="请输入柜号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="柜型" prop="cabinetId">
<el-select v-model="queryParams.cabinetId" placeholder="请选择柜型">
<el-option v-for="item in cabinetList" :label="item.name" :value="item.name" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :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="请选择时间类型" clearable size="small">
<el-option v-for="item in dateTypes" :key="item.value" :label="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"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/>
</el-form-item>
<el-form-item label="状态" prop="boxStatus">
<el-select v-model="queryParams.boxStatus" placeholder="请选择状态" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item label="运输方式" prop="transportType">
<el-select v-model="queryParams.transportType" placeholder="请选择运输方式" clearable size="small">
<el-option v-for="dict in transportTypes"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['shipment:box:create']">出货安排
</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']">导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="自编号" align="center" prop="selfNo"/>
<el-table-column label="柜号" align="center" prop="cubNo"/>
<el-table-column label="柜型" align="center" prop="cabinetId">
<template slot-scope="scope">
<span>{{ getCabinetName(scope.row.cabinetId) }}</span>
</template>
</el-table-column>
<el-table-column label="运输方式" align="center" prop="transportType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportType"/>
</template>
</el-table-column>
<el-table-column label="方数(预装/已装)" align="center" prop="squareNumber"/>
<el-table-column label="重量(预装/已装)" align="center" prop="weight"/>
<el-table-column label="状态" align="center" prop="boxStatus">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPMENT_STATUS" :value="scope.row.boxStatus"/>
</template>
</el-table-column>
<el-table-column label="日期" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
v-hasPermi="['shipment:box:query']">查看</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['shipment:box:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['shipment:box:delete']">删除</el-button> -->
<el-dropdown trigger="click" @command="(command)=>handleCommand(scope.row, command)">
<el-button type="primary">
操作<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="edit">编辑</el-dropdown-item>
<el-dropdown-item command="sea">操作-海运</el-dropdown-item>
<el-dropdown-item command="error">异常登记</el-dropdown-item>
<el-dropdown-item command="cost">费用登记</el-dropdown-item>
<el-dropdown-item command="delete">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="运输方式" prop="transportType">
<el-radio-group v-model="form.transportType">
<el-radio v-for="dict in transportTypes" :key="dict.value" :label="dict.value">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="柜型" prop="cabinetId">
<el-select v-model="form.cabinetId" placeholder="请选择柜型">
<el-option v-for="item in cabinetList" :label="item.name" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="form.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="form.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {createbox, updatebox, deletebox, getbox, getboxPage, exportboxExcel} from "@/api/ecw/box";
import {getCabinetPage} from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse"
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
export default {
name: "box",
components: {},
data() {
return {
dateTypes:[
{value:'1', label:'预装时间'},
{value:'2', label:'装柜时间'},
{value:'3', label:'起运时间'},
{value:'4', label:'到港时间'},
{value:'5', label:'清关时间'},
{value:'6', label:'提货时间'},
],
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 出货列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
id: null,
selfNo: null,
cubNo: null,
cabinetId: null,
boxStatus: null,
startWarehouseId: null,
destWarehouseId: null,
transportType: null,
},
cabinetList:[],
warehouseList: [],
transportTypes:this.getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE),
// 表单参数
form: {},
// 表单校验
rules: {
transportType: [{ required: true, message: "运输方式不能为空", trigger: "blur" }],
cabinetId: [{ required: true, message: "柜型不能为空", trigger: "blur" }],
startWarehouseId: [{ required: true, message: "始发地不能为空", trigger: "blur" }],
destWarehouseId: [{ required: true, message: "目的地不能为空", trigger: "blur" }],
}
};
},
computed: {
exportWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == '2' || item.type == '3')
},
importWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == '1' || item.type == '3')
},
getCabinetName() {
return cabinetId => {
for (let index in this.cabinetList) {
let cabinetItem = this.cabinetList[index];
if (cabinetItem.id == cabinetId) {
return cabinetItem.name;
}
}
return '/'
}
}
},
created() {
this.transportTypes = this.transportTypes.filter(item => item.value == '1' || item.value == '2');
getWarehouseList().then(res => this.warehouseList = res.data);
getCabinetPage(null).then(response => {
this.cabinetList = response.data.list;
});
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
params.transportTypeList = ['1', '2'];
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: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加出货";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getbox(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改出货";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
updatebox(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createbox(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除出货编号为"' + id + '"的数据项?').then(function () {
return deletebox(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm('是否确认导出所有出货数据项?').then(() => {
this.exportLoading = true;
return exportboxExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {
});
},
/** 查看按钮操作 */
handleCommand(row, command) {
switch (command) {
case 'sea':
this.$router.push('/boxSea/shippingSea/' + row.id)
break;
case 'edit':
this.handleUpdate(row);
break;
case 'delete':
this.handleDelete(row);
break;
}
},
}
};
</script>
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="自编号" prop="selfNo">
<el-input v-model="queryParams.selfNo" placeholder="请输入自编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="柜号" prop="cubNo">
<el-input v-model="queryParams.cubNo" placeholder="请输入柜号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="柜型" prop="cabinetId">
<el-select v-model="queryParams.cabinetId" placeholder="请选择柜型">
<el-option v-for="item in cabinetList" :label="item.name" :value="item.name" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :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="请选择时间类型" clearable size="small">
<el-option v-for="item in dateTypes" :key="item.value" :label="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"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/>
</el-form-item>
<el-form-item label="状态" prop="boxStatus">
<el-select v-model="queryParams.boxStatus" placeholder="请选择状态" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['shipment:box:create']">出货安排
</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']">导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="自编号" align="center" prop="selfNo"/>
<el-table-column label="柜号" align="center" prop="cubNo"/>
<el-table-column label="柜型" align="center" prop="cabinetId">
<template slot-scope="scope">
<span>{{ getCabinetName(scope.row.cabinetId) }}</span>
</template>
</el-table-column>
<el-table-column label="运输方式" align="center" prop="transportType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportType"/>
</template>
</el-table-column>
<el-table-column label="出货渠道" align="center" prop="shippingChannelId">
<template slot-scope="scope">
<span>{{ getShipChannelName(scope.row.shippingChannelId) }}</span>
</template>
</el-table-column>
<el-table-column label="方数(预装/已装)" align="center" prop="squareNumber"/>
<el-table-column label="重量(预装/已装)" align="center" prop="weight"/>
<el-table-column label="状态" align="center" prop="boxStatus">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPMENT_STATUS" :value="scope.row.boxStatus"/>
</template>
</el-table-column>
<el-table-column label="日期" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
v-hasPermi="['shipment:box:query']">查看</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['shipment:box:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['shipment:box:delete']">删除</el-button> -->
<el-dropdown trigger="click" @command="(command)=>handleCommand(scope.row, command)">
<el-button type="primary">
操作<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="edit">编辑</el-dropdown-item>
<el-dropdown-item command="seaAir">操作-海空联运</el-dropdown-item>
<el-dropdown-item command="error">异常登记</el-dropdown-item>
<el-dropdown-item command="cost">费用登记</el-dropdown-item>
<el-dropdown-item command="delete">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="出货渠道" prop="shippingChannelId">
<el-select v-model="form.shippingChannelId" placeholder="请选择出货渠道">
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="柜型" prop="cabinetId">
<el-select v-model="form.cabinetId" placeholder="请选择柜型">
<el-option v-for="item in cabinetList" :label="item.name" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="form.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="form.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {createbox, updatebox, deletebox, getbox, getboxPage, exportboxExcel} from "@/api/ecw/box";
import {getCabinetPage} from "@/api/ecw/cabinet";
import { getChannelList } from '@/api/ecw/channel';
import { getWarehouseList } from "@/api/ecw/warehouse"
export default {
name: "box",
components: {},
data() {
return {
dateTypes:[
{value:'1', label:'预装时间'},
{value:'2', label:'装柜时间'},
{value:'3', label:'起运时间'},
{value:'4', label:'到港时间'},
{value:'5', label:'清关时间'},
{value:'6', label:'提货时间'},
],
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 出货列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
id: null,
selfNo: null,
cubNo: null,
cabinetId: null,
boxStatus: null,
startWarehouseId: null,
destWarehouseId: null,
transportType: null,
},
cabinetList:[],
channelList:[],
warehouseList: [],
// 表单参数
form: {},
// 表单校验
rules: {
shippingChannelId: [{ required: true, message: "出货渠道不能为空", trigger: "blur" }],
cabinetId: [{ required: true, message: "柜型不能为空", trigger: "blur" }],
startWarehouseId: [{ required: true, message: "始发地不能为空", trigger: "blur" }],
destWarehouseId: [{ required: true, message: "目的地不能为空", trigger: "blur" }],
}
};
},
computed: {
exportWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == '2' || item.type == '3')
},
importWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == '1' || item.type == '3')
},
getCabinetName() {
return cabinetId => {
for (let index in this.cabinetList) {
let cabinetItem = this.cabinetList[index];
if (cabinetItem.id == cabinetId) {
return cabinetItem.name;
}
}
return '/'
}
},
getShipChannelName() {
return shippingChannelId => {
for (let index in this.channelList) {
let channelItem = this.channelList[index];
if (channelItem.channelId == shippingChannelId) {
return channelItem.nameZh;
}
}
return '/'
}
}
},
created() {
getWarehouseList().then(res => this.warehouseList = res.data);
getCabinetPage(null).then(response => {
this.cabinetList = response.data.list;
});
this.getList();
this.getChannelList();
},
methods: {
getChannelList(){
getChannelList().then(res => this.channelList = res.data)
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
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: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加出货";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getbox(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改出货";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
this.form.transportType = 4;
// 修改的提交
if (this.form.id != null) {
updatebox(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createbox(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除出货编号为"' + id + '"的数据项?').then(function () {
return deletebox(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm('是否确认导出所有出货数据项?').then(() => {
this.exportLoading = true;
return exportboxExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {
});
},
/** 查看按钮操作 */
handleCommand(row, command) {
switch (command) {
case 'sea':
this.$router.push('/box/shippingSea/' + row.id)
break;
case 'edit':
this.handleUpdate(row);
break;
case 'delete':
this.handleDelete(row);
break;
}
},
}
};
</script>
<template>
<div>
<el-row type="flex" style="margin-top: 15px; margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<div style="display: flex; justify-content: space-between;align-items: flex-end;">
<h2>出货详情</h2>
<div>
<el-button size="small">编辑</el-button>
<el-button size="small">操作</el-button>
<el-button type="primary" size="small">异常登记</el-button>
<el-button type="primary" size="small">费用登记</el-button>
<el-button type="danger" size="small">删除</el-button>
</div>
</div>
<el-card style="margin-top: 15px">
<el-descriptions :column="4" border>
<el-descriptions-item label="自编号"></el-descriptions-item>
<el-descriptions-item label="运输方式"></el-descriptions-item>
<el-descriptions-item label="出货渠道"></el-descriptions-item>
<!-- <el-descriptions-item label="柜型"></el-descriptions-item> -->
<el-descriptions-item label="状态"></el-descriptions-item>
<el-descriptions-item label="总计"></el-descriptions-item>
<el-descriptions-item label="始发地"></el-descriptions-item>
<el-descriptions-item label="目的地"></el-descriptions-item>
<el-descriptions-item label="SO.NO"></el-descriptions-item>
</el-descriptions>
</el-card>
<el-tabs style="margin-top: 15px" type="border-card">
<el-tab-pane label="明细">
<div class="detail-pane">
<p>当前部分:</p>
<el-select v-model="value" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<p class="box-weight">9箱子xxx</p>
<p class="document-status">单证状态:我司全代</p>
</div>
<el-table :data="[]" style="width: 100%">
<el-table-column prop="" label="序号"> </el-table-column>
<el-table-column prop="" label="订单号"> </el-table-column>
<el-table-column prop="" label="货物信息"> </el-table-column>
<el-table-column prop="" label="计划箱数"> </el-table-column>
<el-table-column prop="" label="实装箱数"> </el-table-column>
<el-table-column prop="" label="卸柜箱数"> </el-table-column>
<el-table-column prop="" label="提货点"> </el-table-column>
<el-table-column prop="" label="体积"> </el-table-column>
<el-table-column prop="" label="重量"> </el-table-column>
<el-table-column prop="" label="货值"> </el-table-column>
<el-table-column prop="" label="报关方式"> </el-table-column>
<el-table-column prop="" label="报关费用"> </el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="状态"></el-tab-pane>
<el-tab-pane label="费用">
<el-table :data="[]" style="width: 100%">
<el-table-column prop="" label="序号"> </el-table-column>
<el-table-column prop="" label="费用类型"> </el-table-column>
<el-table-column prop="" label="供应商"> </el-table-column>
<el-table-column prop="" label="金额"> </el-table-column>
<el-table-column prop="" label="实付金额"> </el-table-column>
<el-table-column prop="" label="实付日期"> </el-table-column>
<el-table-column prop="" label="操作"> </el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="异常">
<el-table :data="[]" style="width: 100%">
<el-table-column prop="" label="序号"> </el-table-column>
<el-table-column prop="" label="操作步骤"> </el-table-column>
<el-table-column prop="" label="异常"> </el-table-column>
<el-table-column prop="" label="异常详情"> </el-table-column>
<el-table-column prop="" label="异常时间"> </el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="表单">
<el-table :data="[]" style="width: 50%">
<el-table-column prop="" label="文件类型"> </el-table-column>
<el-table-column prop="" label="下载链接"> </el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</div>
</template>
<script>
import { getCustomer, getCustomerSelect } from "@/api/ecw/customer";
import { DICT_TYPE, getDictDataLabel } from "@/utils/dict";
import { getProductTypeList } from "@/api/ecw/productType";
import { getNodeList } from "@/api/ecw/node";
import CustomerFollow from "@/components/CustomerFollow";
import { parseTime } from "@/utils/ruoyi";
import CustomerComplaint from "@/views/ecw/customerComplaint";
import { listServiceUser } from "@/api/system/user";
import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts";
export default {
name: "boxQuery",
props: {
customerId: String,
},
components: {
CustomerFollow,
CustomerComplaint,
},
created() {
getNodeList().then((r) => {
this.nodeList = r.data;
});
getCustomer(this.id).then((response) => {
this.customer = { ...this.customer, ...response.data };
getCustomerContactsListByCustomer({ customerId: this.id }).then((r) => {
this.customerContacts = r.data;
});
});
getProductTypeList().then((r) => {
this.productTypeList = r.data;
});
getCustomerSelect().then((r) => {
this.customerSelect = r.data;
});
listServiceUser().then((r) => {
this.serviceUserList = r.data;
});
},
data() {
return {
DICT_TYPE,
getDictDataLabel,
parseTime,
nodeList: [],
productTypeList: [],
customerSelect: [],
serviceUserList: [],
customerContacts: [],
customer: {
id: undefined,
number: undefined,
name: undefined,
level: undefined,
country: undefined,
type: undefined,
agentId: undefined,
company: undefined,
address: undefined,
productType: undefined,
productId: undefined,
pickupPoint: undefined,
memberId: undefined,
birthday: undefined,
balance: undefined,
source: undefined,
picture: undefined,
customerService: undefined,
customerLines: [],
promoter: undefined,
status: undefined,
founder: undefined,
department: undefined,
invoiceTitle: undefined,
licenseNumber: undefined,
bank: undefined,
bankNumber: undefined,
project: undefined,
billingAddress: undefined,
billingTell: undefined,
taxRate: undefined,
remarks: undefined,
arrivalConfirm: undefined,
weightUnit: undefined,
createTime: undefined,
},
};
},
computed: {
productType() {
const productType = this.productTypeList.find(
(p) => p.id === parseInt(this.customer.productType)
);
return productType ? productType.titleZh : "";
},
pickupPoint() {
const pickupPoint = this.nodeList.find(
(p) => p.id === parseInt(this.customer.pickupPoint)
);
return pickupPoint ? pickupPoint.titleZh : "";
},
promoter() {
return (
this.customerSelect.find((e) => e.id === this.customer.promoter)
?.name || ""
);
},
customerService() {
return (
this.serviceUserList.find((e) => e.id === this.customer.customerService)
?.nickname || ""
);
},
id() {
return this.customerId ? parseInt(this.customerId) : undefined;
},
},
};
</script>
<style lang="scss" scoped>
.detail-pane {
display: flex;
.box-weight {
margin-left: 10px;
}
.document-status {
flex: 1;
text-align: right;
}
}
</style>
<template>
<div>
<el-form ref="agentForm" :rules="rules" :model="agent" label-width="120px">
<el-form-item label="代理商Agent">
<el-select v-model="agent.agent" placeholder="请选择代理商">
</el-select>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">提交</el-button>
<el-button @click="cancel">保存</el-button>
</el-row>
</div>
</template>
<script>
export default {
name: "agent",
data() {
return {
agent: {},
};
},
methods: {
onSubmit() {
this.$refs["agentForm"].validate((valid) => {
if (valid) {
alert("submit!");
}
});
},
cancel() {
this.$emit("closeDialog");
},
},
};
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-form ref="bookingForm" :rules="rules" :model="booking" label-width="140px" class="booking-form">
<el-form-item label="SO NO">
<el-input v-model="booking.soNo"></el-input>
</el-form-item>
<el-form-item label="船公司类型">
<el-select v-model="booking.type" placeholder="请选择船公司类型">
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item>
<el-form-item label="驳船港">
<el-select v-model="booking.bargePort" placeholder="请选择驳船港">
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item>
<el-form-item label="大船港">
<el-select v-model="booking.bigShipPort" placeholder="请选择大船港">
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的港">
<el-select v-model="booking.destination" placeholder="请选择目的港">
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item>
<el-form-item label="订舱公司">
<el-select v-model="booking.bookingCompany" placeholder="请选择订舱公司">
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item>
<el-form-item label="预计驳船时间" prop="time">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.bargeTime"></el-date-picker>
</el-form-item>
<el-row>
<el-col span="12">
<el-form-item label="预计开船时间" prop="time">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.departureTime"></el-date-picker>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col span="12">
<el-form-item label="预计提单补料时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.feedTime"></el-date-picker>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col span="12">
<el-form-item label="预计报关时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.declarationTime"></el-date-picker>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col span="12">
<el-form-item label="预计截关时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.cutOffTime"></el-date-picker>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">提交</el-button>
<el-button @click="cancel">取消</el-button>
</el-row>
</div>
</template>
<script>
export default {
name: "booking",
data() {
return {
types: ["PIL", "MSK", "CMA", "COSCO", "ZIM", "ONE", "OOCL", "MSC", "HPL"],
booking: {},
rules: {
time: [{ required: true, message: "请选择时间", trigger: "change" }],
},
};
},
methods: {
onSubmit() {
this.$refs["bookingForm"].validate((valid) => {
if (valid) {
alert("submit!");
}
});
},
cancel() {
this.$emit("closeDialog");
},
},
};
</script>
<template>
<div class="app-container preinstall">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="入仓时间" prop="warehousingTime">
<el-date-picker v-model="queryParams.warehousingTime" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item>
<el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" placeholder="请选择始发地" clearable size="small">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-select v-model="queryParams.state" placeholder="请选择状态" clearable size="small">
<el-option v-for="item in stateOps" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="备案" prop="filing">
<el-select v-model="queryParams.filing" placeholder="请选择备案" clearable size="small">
<el-option v-for="item in filingOps" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="报关方式" prop="declarationMethod">
<el-select v-model="queryParams.declarationMethod" placeholder="请选择报关方式" clearable size="small">
<el-option v-for="item in declarationMethodOps" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="订单号码" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入订单号码" clearable />
</el-form-item>
<el-form-item label="已预装单号" prop="preinstalledNo">
<el-input v-model="queryParams.preinstalledNo" placeholder="请输入已预装单号" clearable />
</el-form-item>
<el-form-item label="品名" prop="productName">
<el-input v-model="queryParams.productName" placeholder="请输入品名" clearable />
</el-form-item>
<el-form-item label="重货比" prop="ratioMin">
<el-input v-model="queryParams.ratioMin" placeholder="请输入" clearable />
</el-form-item>
<el-form-item label="" prop="ratioMax">
<el-input v-model="queryParams.ratioMax" placeholder="请输入" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索已预装订单</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索待预装订单</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 表格 -->
<el-card style="margin-top: 15px">
<el-row class="preinstall-title">
<div>
<p>自编号:</p>
<p>111</p>
</div>
<div>
<p>柜号:</p>
<p>111</p>
</div>
<div>
<p>容量:</p>
<p>111</p>
</div>
<div>
<p>始发地:</p>
<p>111</p>
</div>
<div>
<p>目的地:</p>
<p>111</p>
</div>
</el-row>
<el-row class="preinstall-table">
<!-- 已预装订单 -->
<el-col :span="12">
<el-row class="preinstall-title">
<div class="table-label">已预装订单</div>
<div>
<p>总计:</p>
<p>111</p>
</div>
<div class="red-label">
<p>可预装方数:</p>
<p>111</p>
</div>
<div class="red-label">
<p>重量:</p>
<p>111</p>
</div>
<div class="table-button">
<el-button type="success" size="small">增加</el-button>
</div>
</el-row>
<el-row class="preinstall-title">
<div>
<p>第一部分</p>
<p>111</p>
</div>
<div class="table-button">
<el-button type="danger" size="small">删除部分</el-button>
<el-button type="danger" size="small">删除订单</el-button>
<el-button type="primary" size="small">收起</el-button>
</div>
</el-row>
<el-table v-loading="loading" :data="list">
<el-table-column type="selection" width="55" />
<el-table-column label="订单号" align="center" prop="selfNo" />
<el-table-column label="目的地" align="center" prop="cubNo" />
<el-table-column label="入仓时间" align="center" prop="cabinetId" />
<el-table-column label="品名" align="center" prop="transportType" />
<el-table-column label="箱数" align="center" prop="squareNumber" />
<el-table-column label="体积/重量/重货比" align="center" prop="weight" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="small">操作</el-button>
<el-button type="primary" size="small">操作</el-button>
</template>
</el-table-column>
</el-table>
</el-col>
<!-- 待预装订单 -->
<el-col :span="12">
<el-row class="preinstall-title">
<div class="table-label">待预装订单</div>
<div class="preinstall-title preinstalled">
<div class="red-label">
<p>筛选后待预装数量:</p>
<p>111</p>
</div>
<div class="red-label">
<p>方数:</p>
<p>111</p>
</div>
<div class="red-label">
<p>重量:</p>
<p>111</p>
</div>
</div>
</el-row>
<el-row>
<el-row class="preinstall-title order-title">
<div>
<p>EC11111</p>
</div>
<div>
<p>发往:</p>
<p>111</p>
</div>
<div>
<p>海运拼仓</p>
</div>
<div>
<p>入仓时间</p>
<p>111</p>
</div>
<div>
<p>重货比</p>
<p>111</p>
</div>
<div class="table-button">
<el-button type="primary" size="small">预装</el-button>
</div>
</el-row>
<el-table v-loading="loading" :data="list">
<el-table-column type="index" label="序号" width="50" />
<el-table-column label="品名" align="center" prop="selfNo" />
<el-table-column label="备案" align="center" prop="cubNo" />
<el-table-column label="箱数" align="center" prop="cabinetId" />
<el-table-column label="体积/重量" align="center" prop="transportType" />
<el-table-column label="报关方式" align="center" prop="squareNumber" />
<el-table-column label="包装类型" align="center" prop="weight" />
<el-table-column label="材质" align="center" prop="boxStatus" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="small">预装</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</el-col>
</el-row>
</el-card>
<!-- 操作员 -->
<el-row style="margin-top: 15px">
<el-row>
<el-form ref="operatorForm" :model="operatorData" size="small" :inline="true" label-width="120px" :rules="rules">
<el-form-item label="目的地操作员" prop="operator">
<el-select v-model="operatorData.operator" placeholder="请选择目的地操作员" clearable size="small">
</el-select>
</el-form-item>
</el-form>
</el-row>
<el-row style="margin-top: 10px">
<el-button type="primary" @click="onSubmit">提交申请</el-button>
</el-row>
</el-row>
</div>
</template>
<script>
import { DICT_TYPE } from "@/utils/dict";
import { getWarehouseList } from "@/api/ecw/warehouse";
export default {
name: "preinstall",
components: {},
data() {
return {
// 状态
stateOps: [
{ value: "1", label: "拆单" },
{ value: "2", label: "关联单" },
],
// 备案
filingOps: this.getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL),
// 报关方式
declarationMethodOps: this.getDictDatas(DICT_TYPE.ECW_CUSTOMS_TYPE),
// 仓库
warehouseList: [],
// 遮罩层
loading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 出货列表
list: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
},
// 目的地操作员
operatorData: {
operator: null,
},
rules: {
operator: [
{ required: true, message: "请选择目的地操作员", trigger: "change" },
],
},
};
},
computed: {
// 始发地
exportWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "2" || item.type == "3"
);
},
// 目的地
importWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3"
);
},
},
created() {
getWarehouseList().then((res) => (this.warehouseList = res.data));
// this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
// 执行查询
getboxPage(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 查看按钮操作 */
handleCommand(row, command) {
switch (command) {
case "sea":
this.$router.push("/boxSea/shippingSea/" + row.id);
break;
case "edit":
break;
case "delete":
break;
}
},
/** 提交 */
onSubmit() {
this.$refs["operatorForm"].validate((valid) => {
if (valid) {
alert("submit!");
}
});
},
},
};
</script>
<style lang="scss" scoped>
.preinstall {
p {
margin: 0;
}
.preinstall-title {
display: flex;
align-items: center;
margin-bottom: 10px;
padding: 0 10px;
&.preinstalled {
flex: 1;
display: flex;
justify-content: flex-end;
> div {
display: flex;
}
}
&.order-title {
margin-bottom: 0px;
background-color: #e6ebf5;
height: 45px;
}
> div {
display: flex;
margin-right: 10px;
}
.table-label {
font-size: 14px;
}
.red-label {
color: red;
}
.table-button {
flex: 1;
margin: 0;
display: flex;
justify-content: flex-end;
}
}
.preinstall-table {
display: flex;
> div {
border: 1px solid #e6ebf5;
padding: 10px 0px;
}
> div:first-child {
margin-right: 10px;
}
}
}
</style>
<template>
<div>
<el-scrollbar :vertical="true" style="width: 100%;" viewClass="shipping-chart">
<div v-for="(nodes,index) in chartData['sea']" :key="index" class="chart-nodes">
<div>
<div v-for="node in nodes" :key="node.title" @click="nodeClick(node)" class="node-div">
<template v-if="!node.unNode">
<img :src="node.imgSrc" alt="">
<p>{{node.title}}</p>
</template>
<template v-else-if="node.unNode">
<el-button type="primary" @click="nodeClick(node)">AGENT</el-button>
</template>
</div>
</div>
<div class="chart-arrow" v-if="index !== (chartData['sea'].length-1)">
<img src="@/assets/images/shipping/jt-start.png" alt="">
</div>
</div>
</el-scrollbar>
<el-dialog :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :width="dialogConfig.width" destroy-on-close>
<booking @closeDialog="closeDialog" v-if="dialogConfig.type === 'booking'" />
<trailer @closeDialog="closeDialog" v-if="dialogConfig.type === 'trailer'" />
<preinstall v-if="dialogConfig.type === 'preinstall'" />
<agentWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'agent'" />
</el-dialog>
</div>
</template>
<script>
import booking from "./booking";
import trailer from "./trailer";
import preinstall from "./preinstall";
import agentWidget from "./agent";
export default {
name: "shippingChart",
components: { booking, trailer, preinstall, agentWidget },
props: {
shippingType: String,
boxId: String,
},
data() {
return {
dialogConfig: {
dialogVisible: false,
title: "",
width: "30%",
type: "",
},
chartData: {
sea: [
[
{
title: "订舱",
imgSrc: require("@/assets/images/shipping/dc-start.png"),
type: "booking",
},
],
[
{
title: "预装",
imgSrc: require("@/assets/images/shipping/yz-start.png"),
type: "preinstall",
},
{
title: "拖车",
imgSrc: require("@/assets/images/shipping/tc-start.png"),
type: "trailer",
},
{
unNode: true,
type: "agent",
title: "代理商设置",
},
],
[
{
title: "装柜",
imgSrc: require("@/assets/images/shipping/zg-start.png"),
type: "cabinet",
},
],
[
{
title: "报关",
imgSrc: require("@/assets/images/shipping/bg-start.png"),
type: "customsDeclaration",
},
{
title: "配船",
imgSrc: require("@/assets/images/shipping/pc-start.png"),
type: "ship",
},
{
title: "提单材料",
imgSrc: require("@/assets/images/shipping/tdcl-start.png"),
type: "subMaterial",
},
],
[
{
title: "驳船",
imgSrc: require("@/assets/images/shipping/bc-start.png"),
type: "barge",
},
],
[
{
title: "起运",
imgSrc: require("@/assets/images/shipping/qy-start.png"),
type: "departure",
},
],
[
{
title: "清关文件",
imgSrc: require("@/assets/images/shipping/qg-start.png"),
type: "clearanceDocument",
},
],
[
{
title: "到港",
imgSrc: require("@/assets/images/shipping/dg-start.png"),
type: "arrival",
},
],
[
{
title: "清关",
imgSrc: require("@/assets/images/shipping/qg-start.png"),
type: "customsClearance",
},
],
[
{
title: "卸柜",
imgSrc: require("@/assets/images/shipping/xg-start.png"),
type: "unloading",
},
],
[
{
title: "结算",
imgSrc: require("@/assets/images/shipping/js-start.png"),
type: "settlement",
},
],
],
},
};
},
methods: {
closeDialog() {
this.$set(this.dialogConfig, "dialogVisible", false);
},
setCommonAttr(node) {
this.$set(this.dialogConfig, "dialogVisible", true);
this.$set(this.dialogConfig, "title", node.title);
this.$set(this.dialogConfig, "type", node.type);
},
nodeClick(node) {
console.log(node);
switch (node.type) {
case "booking":
this.$set(this.dialogConfig, "width", "40%");
this.setCommonAttr(node);
break;
case "trailer":
case "agent":
this.$set(this.dialogConfig, "width", "25%");
this.setCommonAttr(node);
break;
case "preinstall":
this.$router.push(`/boxSea/shippingSea/preinstall/${this.boxId}`);
break;
}
},
},
};
</script>
<style lang="scss">
.shipping-chart {
width: max-content;
display: flex;
justify-content: center;
padding: 10px;
.chart-nodes {
display: flex;
align-items: center;
justify-content: center;
.node-div {
margin-top: 10px;
cursor: pointer;
p {
margin-top: -10px;
margin-bottom: 0px;
text-align: center;
}
}
}
.chart-arrow {
margin: 0 10px;
}
}
</style>
<template>
<div>
<el-row type="flex" style="margin-top: 15px; margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="20">
<div style="display: flex; justify-content: space-between;align-items: flex-end;">
<h2>海运出货操作</h2>
</div>
<el-card style="margin-top: 15px">
<el-descriptions :column="5" border>
<el-descriptions-item label="自编号"></el-descriptions-item>
<el-descriptions-item label="运输方式"></el-descriptions-item>
<el-descriptions-item label="始发地"></el-descriptions-item>
<el-descriptions-item label="目的地"></el-descriptions-item>
<el-descriptions-item label="状态"></el-descriptions-item>
</el-descriptions>
</el-card>
<div class="shipping-flow">
<shippingChart :boxId="boxId" />
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import shippingChart from "./shippingChart";
export default {
name: "shippingSea",
components: {
shippingChart,
},
props: {
boxId: String,
},
};
</script>
<style lang="scss">
.shipping-flow {
margin-top: 5px;
// 页面内元素弹框form控件宽度设置
.el-form-item__content {
> div {
width: 100%;
}
}
.operate-button {
text-align: center;
}
}
</style>
<template>
<div>
<el-form ref="trailerForm" :rules="rules" :model="trailer" label-width="120px" class="trailer-form">
<el-form-item label="状态">
<el-select v-model="trailer.status" placeholder="请选择状态">
<el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="拖车公司">
<el-select v-model="trailer.trailerCompany" placeholder="请选择拖车公司">
<el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="拖车时间" prop="time">
<el-date-picker type="date" placeholder="请选择日期" v-model="trailer.trailerTime"></el-date-picker>
</el-form-item>
<el-form-item label="车牌">
<el-input v-model="trailer.licensePlate"></el-input>
</el-form-item>
<el-form-item label="司机">
<el-input v-model="trailer.driver"></el-input>
</el-form-item>
<el-form-item label="司机联系方式">
<el-input v-model="trailer.telephone"></el-input>
</el-form-item>
<el-form-item label="货柜号">
<el-input v-model="trailer.containerNumber"></el-input>
</el-form-item>
<el-form-item label="封条">
<el-input v-model="trailer.seal"></el-input>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">提交</el-button>
<el-button @click="cancel">取消</el-button>
</el-row>
</div>
</template>
<script>
export default {
name: "trailer",
data() {
return {
status: [
{
value: "1",
label: "已派车,待提柜",
},
{
value: "2",
label: "已提柜,待还柜",
},
{
value: "3",
label: "已还柜",
},
],
trailer: {},
rules: {
time: [{ required: true, message: "请选择时间", trigger: "change" }],
},
};
},
methods: {
onSubmit() {
this.$refs["trailerForm"].validate((valid) => {
if (valid) {
alert("submit!");
}
});
},
cancel() {
this.$emit("closeDialog");
},
},
};
</script>
...@@ -670,7 +670,7 @@ export default { ...@@ -670,7 +670,7 @@ export default {
// 添加的提交 // 添加的提交
createOffer(data).then(response => { createOffer(data).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.$router.replace('offer/index') this.$router.replace('index')
}); });
}); });
}, },
......
...@@ -12,39 +12,63 @@ ...@@ -12,39 +12,63 @@
<el-table-column <el-table-column
prop="prodTitleZh" prop="prodTitleZh"
label="品名"> label="品名">
<template v-slot="{row}">
{{ row.prodTitleZh }}/{{ row.prodTitleEn }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="prodAttrIds" prop="prodAttrIds"
label="填单货物属性"> label="填单货物属性">
<template v-slot="{row}">
{{ getProductNamesByIds(row.prodAttrIds) }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="入库货物属性"> label="入库货物属性">
<template v-slot="{row}">
品牌:{{ row.brand ? '' : '' }}<br>
箱数:{{ row.num }}<br>
体积:{{ row.volume }}<br>
重量:{{ row.weight }}Kg
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="updateTime"
:formatter="(_, __, v) => parseTime(v)"
label="最后操作时间"> label="最后操作时间">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="原价"> label="原价">
<template v-slot="{row}"> <template v-slot="{row}">
运费:{{ row.originalSeaFreight }}美元/立方米 清关费:{{ row.originalClearanceFreight }}奈拉/立方米 运费:{{ row.originalSeaFreight }} {{ currentMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br>
清关费:{{ row.originalClearanceFreight }} {{ currentMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="成本价"> label="成本价">
<template v-slot="{row}"> <template v-slot="{row}">
运费:{{ row.seaFreight }}美元/立方米 清关费:{{ row.clearanceFreight }}奈拉/立方米 运费:{{ row.seaFreight }} {{ currentMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br>
清关费:{{ row.clearanceFreight }} {{ currentMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="销售价"> label="销售价">
<template v-slot="{row}"> <template v-slot="{row}">
运费:{{ row.seaFreight }}美元/立方米 清关费:{{ row.clearanceFreight }}奈拉/立方米 运费:{{ row.seaFreight }} {{ currentMap[row.seaFreightCurrency] }}/{{ unitMap[row.seaFreightVolume] }}
<br>
清关费:{{ row.clearanceFreight }} {{ currentMap[row.clearanceFreightCurrency] }}/{{ unitMap[row.clearanceFreightVolume] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="status"
:formatter="(v) => ['取消报价', '特价审批中', '需求确认(草稿)', '跟进中', '赢单', '输单', '报价完成', '审批通过', '审批拒绝'][v.status]"
label="审核状态">
</el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
label="操作"> label="操作">
...@@ -67,19 +91,24 @@ ...@@ -67,19 +91,24 @@
</template> </template>
<script> <script>
import {getOfferLogPage} from "@/api/ecw/offerLog"; import {DICT_TYPE, getDictDataLabel} from '@/utils/dict'
import {DICT_TYPE} from '@/utils/dict'
import {getOffer} from '@/api/ecw/offer' import {getOffer} from '@/api/ecw/offer'
import {getUnitList} from "@/api/ecw/unit"
import {getCurrencyList} from "@/api/ecw/currency"
import {getProductAttrList} from "@/api/ecw/productAttr"
import { parseTime } from '@/utils/ruoyi'
export default { export default {
name: "OfferSpecial", name: "OfferSpecial",
components: { components: {
}, },
props: { props: {
offerId: String offerId: String
}, },
data() { data() {
return { return {
parseTime,
DICT_TYPE,
getDictDataLabel,
// 遮罩层 // 遮罩层
loading: true, loading: true,
list: [], list: [],
...@@ -95,7 +124,10 @@ export default { ...@@ -95,7 +124,10 @@ export default {
offer: { offer: {
number: '', number: '',
offerProdRespVOList: [] offerProdRespVOList: []
} },
unitList:[],
currencyList:[],
productAttrList:[],
}; };
}, },
created() { created() {
...@@ -103,6 +135,9 @@ export default { ...@@ -103,6 +135,9 @@ export default {
this.params.offerId = this.offerId this.params.offerId = this.offerId
this.getOffer() this.getOffer()
} }
getUnitList().then(res => this.unitList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data)
}, },
methods: { methods: {
getOffer(){ getOffer(){
...@@ -111,8 +146,36 @@ export default { ...@@ -111,8 +146,36 @@ export default {
this.loading = false this.loading = false
this.offer = response.data this.offer = response.data
}) })
},
getProductNamesByIds(ids){
const result = []
ids.split(',').forEach(e => {
this.productAttrList.forEach(f => {
if (parseInt(e) === f.id) {
result.push(f.attrName)
} }
})
})
return result.join(',')
} }
},
computed: {
currentMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = item.titleZh
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = item.titleZh
})
return map
}
}
}; };
</script> </script>
<style> <style>
......
...@@ -3,29 +3,95 @@ ...@@ -3,29 +3,95 @@
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16"> <el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix" v-if="!readonly">
<span>优惠申请</span> <span>优惠申请</span>
</div> </div>
<el-form ref="form" :model="form" label-width="80px"> <el-form v-if="!readonly" ref="form" :model="form" label-width="80px">
<el-form-item label="offerId"> <el-form-item label="商品类型">
<el-input v-model="form.offerId" placeholder="placeholder" :readonly="readonly"></el-input> <span>{{ getProductAttrNameById(form.productType) }}</span>
</el-form-item> </el-form-item>
<el-form-item label="offerProdId"> <el-form-item label="商品名称">
<el-input v-model="form.offerProdId" placeholder="placeholder" :readonly="readonly"></el-input> <span>{{ form.prodTitleZh }}</span>
</el-form-item> </el-form-item>
<el-form-item label="clearanceFreight"> <el-form-item label="英文名称">
<el-input v-model="form.clearanceFreight" placeholder="placeholder" :readonly="readonly"></el-input> <span>{{ form.prodTitleEn }}</span>
</el-form-item> </el-form-item>
<el-form-item label="seaFreight"> <el-form-item label="线路">
<el-input v-model="form.seaFreight" placeholder="placeholder" :readonly="readonly"></el-input> {{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.departureName}】发往【${form.objectiveName}】`}}
</el-form-item>
<el-form-item label="是否预付">
{{ form.isPayAdvance === 0 ? '' : '' }}
</el-form-item>
<el-form-item label="旧运费">
<el-input v-model="form.orgSeaFreight" readonly>
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgSeaFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgSeaFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="旧清关费">
<el-input v-model="form.orgClearanceFreight" readonly>
<div slot="prepend" style="width: 60px">{{ currentMap[form.orgClearanceFreightCurrency] }}</div>
<div slot="append" style="width: 60px">{{ unitMap[form.orgClearanceFreightVolume] }}</div>
</el-input>
</el-form-item>
<el-form-item label="新运费" required>
<el-input v-model.number="form.seaFreight">
<el-select v-model="form.seaFreightCurrency" placeholder="请选择" slot="prepend" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="form.seaFreightVolume" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="新清关费" required>
<el-input v-model.number="form.clearanceFreight">
<el-select v-model="form.clearanceFreightCurrency" placeholder="请选择" slot="prepend" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="form.clearanceFreightVolume" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<h3>
{{ JSON.stringify(follow) }}
</h3>
<div v-if="!readonly"> <div v-if="!readonly">
<el-button type="primary" @click="handleSubmit">提交</el-button> <el-button type="primary" @click="handleSubmit">提交</el-button>
</div> </div>
<el-descriptions border v-if="readonly" :column="1">
<el-descriptions-item label="商品类型">{{ form.productType }}</el-descriptions-item>
<el-descriptions-item label="商品名称">{{ form.prodTitleZh }}</el-descriptions-item>
<el-descriptions-item label="英文名称">{{ form.prodTitleEn }}</el-descriptions-item>
<el-descriptions-item label="线路">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.departureName}】发往【${form.objectiveName}】`}}
</el-descriptions-item>
<el-descriptions-item label="是否预付">{{ form.isPayAdvance === 0 ? '' : '' }}</el-descriptions-item>
<el-descriptions-item label="旧运费">{{ form.orgSeaFreight }} {{ currentMap[form.orgSeaFreightCurrency] }}/{{ unitMap[form.orgSeaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="旧清关费">{{ form.orgClearanceFreight }} {{ currentMap[form.orgClearanceFreightCurrency] }}/{{ unitMap[form.orgClearanceFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新运费">{{ form.seaFreight }} {{ currentMap[form.seaFreightCurrency] }}/{{ unitMap[form.seaFreightVolume] }}</el-descriptions-item>
<el-descriptions-item label="新清关费">{{ form.clearanceFreight }} {{ currentMap[form.clearanceFreightCurrency] }}/{{ unitMap[form.clearanceFreightVolume] }}</el-descriptions-item>
</el-descriptions>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
...@@ -33,7 +99,13 @@ ...@@ -33,7 +99,13 @@
</template> </template>
<script> <script>
import {createOfferSpecial, getOffer, getOfferSpecial, getOfferSpecialByApproveId} from "@/api/ecw/offer" import {createOfferSpecial, getOfferSpecial, getOfferSpecialByApproveId} from "@/api/ecw/offer"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict"
import DictSelector from "@/components/DictSelector"
import {getUnitList} from "@/api/ecw/unit"
import {getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductAttrList } from '@/api/ecw/productAttr'
export default { export default {
name: "specialDiscount", name: "specialDiscount",
...@@ -45,6 +117,9 @@ export default { ...@@ -45,6 +117,9 @@ export default {
default: false default: false
} }
}, },
components: {
DictSelector
},
created() { created() {
// 临时 // 临时
if(this.$route.query.offerId){ if(this.$route.query.offerId){
...@@ -62,61 +137,112 @@ export default { ...@@ -62,61 +137,112 @@ export default {
if(this.id) if(this.id)
this.getOfferSpecialByApproveId() this.getOfferSpecialByApproveId()
getUnitList().then(res => this.unitList = res.data)
getChannelList().then(res => this.channelList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getProductAttrList().then(res => this.productAttrList = res.data)
}, },
data() { data() {
return { return {
getDictDataLabel,
DICT_TYPE,
unitList:[],
channelList:[],
currencyList:[],
productAttrList:[],
form: { form: {
// "applyResult": "", "applyResult": "",
// "applyStatus": 0, "applyStatus": 0,
"channelId": 0,
"clearanceFreight": 0, "clearanceFreight": 0,
"clearanceFreightCurrency": 0,
"clearanceFreightVolume": 0,
"createTime": "",
"departureId": 0,
"departureName": "",
"details": "",
"finishBy": "",
"finishTime": "",
"followUpSalesmanId": "",
"formId": "",
"isPayAdvance": 0,
"lineId": 0,
"objectiveId": 0,
"objectiveName": "",
"offerApprovalId": 0,
"offerId": 0, "offerId": 0,
"offerProdId": 0, "offerProdId": 0,
"seaFreight": 0 "orgClearanceFreight": 0,
}, "orgClearanceFreightCurrency": 0,
follow: {} "orgClearanceFreightVolume": 0,
"orgSeaFreight": 0,
"orgSeaFreightCurrency": 0,
"orgSeaFreightVolume": 0,
"processingResults": "",
"prodId": 0,
"prodTitleEn": "",
"prodTitleZh": "",
"productType": 0,
"seaFreight": 0,
"seaFreightCurrency": 0,
"seaFreightVolume": 0,
"status": 0,
"transportId": 0,
"type": 0
}
} }
}, },
methods: { methods: {
handleSubmit(){ handleSubmit(){
createOfferSpecial(this.form).then(r => { createOfferSpecial({
clearanceFreight: this.form.clearanceFreight,
clearanceFreightCurrency: this.form.clearanceFreightCurrency,
clearanceFreightVolume: this.form.clearanceFreightVolume,
offerId: this.form.offerId,
offerProdId: this.form.offerProdId,
seaFreight: this.form.seaFreight,
seaFreightCurrency: this.form.seaFreightCurrency,
seaFreightVolume: this.form.seaFreightVolume,
}).then(r => {
this.$message.success(r.msg || '提交成功') this.$message.success(r.msg || '提交成功')
}) })
}, },
// getOffer(){
// getOffer(this.form.offerId).then(r => {
// const line = r.data.offerProdRespVOList.find(e => e.offerProdId = this.form.offerProdId)
// console.log(line)
// const {
// clearanceFreight,
// seaFreight
// } = line
// this.form = {
// ...this.form,
// clearanceFreight,
// seaFreight
// }
// })
// },
getOfferSpecial(){ getOfferSpecial(){
getOfferSpecial(this.form.offerProdId).then(r => { getOfferSpecial(this.form.offerProdId).then(r => {
this.follow = r.data this.form = r.data
if (!this.form.offerId) {
this.form.offerId = r.data.offerId
}
}) })
}, },
getOfferSpecialByApproveId(){ getOfferSpecialByApproveId(){
getOfferSpecialByApproveId(this.id).then(r => { getOfferSpecialByApproveId(this.id).then(r => {
this.follow = r.data this.form = r.data
if (!this.form.offerId) { })
this.form.offerId = r.data.offerId },
this.form.offerProdId = r.data.offerProdId getProductAttrNameById(id){
this.form.clearanceFreight = this.form.offerSpecialApplyVO.clearanceFreight return this.productAttrList.find(e => e.id === id)?.attrName || ''
this.form.seaFreight = this.form.offerSpecialApplyVO.seaFreight
} }
},
computed: {
// 根据渠道id显示渠道名
getChannelNameById(){
return channelId => {
const s = this.channelList.find(item => item.channelId == channelId) ?. nameZh
return s ? '' + s + '' : ''
}
},
currentMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = item.titleZh
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = item.titleZh
}) })
return map
} }
} }
} }
......
<template>
<div class="app-container">
<el-card class="card">
<div slot="header" class="card-title">订单详情-EC00636U-CNG2506-01</div>
<div slot="header" class="card-title">订单编号:EC00636U</div>
<el-row :gutter="20">
<el-col :span="12">
<el-descriptions class="margin-top" border title="发货人" :column="2">
<el-descriptions-item label="发货人">kooriookami</el-descriptions-item>
<el-descriptions-item label="发货人电话">18100000000</el-descriptions-item>
<el-descriptions-item label="发货人邮箱">18100000000</el-descriptions-item>
<el-descriptions-item label="发货人公司名称">
<el-tag size="small">学校学校学校学校</el-tag>
</el-descriptions-item>
</el-descriptions>
</el-col>
<el-col :span="12">
<el-descriptions class="margin-top" border title="收货人" :column="2">
<el-descriptions-item label="收货人">kooriookami</el-descriptions-item>
<el-descriptions-item label="收货人电话">18100000000</el-descriptions-item>
<el-descriptions-item label="收货人邮箱">18100000000</el-descriptions-item>
<el-descriptions-item label="收货人公司名称">
<el-tag size="small">学校学校学校学校</el-tag>
</el-descriptions-item>
</el-descriptions>
</el-col>
</el-row>
</el-card>
<el-card class="card">
<div slot="header" class="card-title">物流信息/基础信息</div>
<el-row :gutter="20">
<el-col :span="12">
<el-descriptions class="margin-top" border title="物流信息" :column="2">
<el-descriptions-item label="始发仓">广州仓</el-descriptions-item>
<el-descriptions-item label="目的仓">Dubai</el-descriptions-item>
<el-descriptions-item label="地址" :span="2">广州市白云区鹤边鹤泰二横路民通院内第一栋捷道仓库E&C(收货时间周一至周六10:00-19:30)
</el-descriptions-item>
<el-descriptions-item label="运输方式">海运拼柜</el-descriptions-item>
<el-descriptions-item label="出货渠道">/</el-descriptions-item>
</el-descriptions>
</el-col>
<el-col :span="12">
<el-descriptions class="margin-top" border title="基础信息" :column="2">
<el-descriptions-item label="唛头">kooriookami</el-descriptions-item>
<el-descriptions-item label="送货时间">2022-05-22</el-descriptions-item>
<el-descriptions-item label="是否控货"></el-descriptions-item>
<el-descriptions-item label="填单信息">22箱 1000KG 14m³</el-descriptions-item>
<el-descriptions-item label="仓库实测">123箱 900Kg 11.23m³</el-descriptions-item>
<el-descriptions-item label="收款数据">123箱 900Kg 11.23m³</el-descriptions-item>
<el-descriptions-item label="入仓类型">一次到齐</el-descriptions-item>
<el-descriptions-item label="单证报关">我司全代</el-descriptions-item>
<el-descriptions-item label="代收货款">是(50000美元)</el-descriptions-item>
</el-descriptions>
</el-col>
</el-row>
</el-card>
<el-card class="card">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="货物详情" name="first">
<el-table :data="tableData" border style="width: 100%">
<el-table-column prop="date" label="中文品名" />
<el-table-column prop="name" label="英文品名" />
<el-table-column prop="address" label="品牌" />
<el-table-column prop="address" label="填单件数" />
<el-table-column prop="address" label="入仓件数" />
<el-table-column prop="address" label="单位" />
<el-table-column prop="address" label="货值" />
<el-table-column prop="address" label="材质" />
<el-table-column prop="address" label="体积(m3)" />
<el-table-column prop="address" label="重量(kg)" />
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize" @pagination="getList" />
</el-tab-pane>
<el-tab-pane label="订单动态" name="second">
<el-timeline :reverse="true">
<el-timeline-item v-for="(activity, index) in activities" :key="index" :timestamp="activity.timestamp">
{{ activity.content }}
</el-timeline-item>
</el-timeline>
</el-tab-pane>
<el-tab-pane label="运单资料/提货单" name="three">
<el-descriptions class="margin-top" border title="" :column="3">
<el-descriptions-item label="单票立即转运"></el-descriptions-item>
<el-descriptions-item label="包装类型">纸箱</el-descriptions-item>
<el-descriptions-item label="包装要求备注">多个订单一起打包,不要单独打</el-descriptions-item>
</el-descriptions>
<el-button type="text">查看入仓单</el-button>
<el-button type="text" disabled>
<el-dropdown>
<span class="el-dropdown-link">
查看提货单<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>海运提货单</el-dropdown-item>
<el-dropdown-item>空运提货单</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-button>
<el-button :disabled="true" type="text">装箱单未上传</el-button>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</template>
<script>
import { getOrder } from '@/api/ecw/order'
export default {
name: "detail",
components: {
},
data() {
return {
// 遮罩层
loading: false,
list: [],
activeName: 'first',
orderId: 17,
tableData: [],
queryParams: {
pageNo: 1,
pageSize: 10,
},
activities: [{
content: '活动按期开始',
timestamp: '2018-04-15'
}, {
content: '通过审核',
timestamp: '2018-04-13'
}, {
content: '创建成功',
timestamp: '2018-04-11'
}]
};
},
created() {
if (this.$route.query.orderId) {
this.orderId = this.$route.query.orderId
this.getList();
}
this.getList();
},
methods: {
/** 查询列表 */
getList() {
let that = this
that.loading = true;
// 执行查询
getOrder(that.orderId).then(response => {
that.list = response.data;
});
},
}
};
</script>
<style scoped>
.card {
margin-bottom: 20px;
}
.el-dropdown-link {
cursor: pointer;
color: #409EFF;
}
.el-icon-arrow-down {
font-size: 12px;
}
</style>
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-card>
<div slot="header" class="card-title">新建订单</div>
<el-descriptions :column="3" border>
<el-descriptions-item label="*发货人" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorId" required error="发货人不能为空">
<customer-selector v-model="form.consignorId" @change="consignor = $event" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="发货人">
{{consignor.name || ''}}
</el-descriptions-item>
<el-descriptions-item label="手机号">
{{consignor.defaultContactPhone || ''}}
</el-descriptions-item>
<el-descriptions-item label="发货人公司">
{{consignor.company || ''}}
</el-descriptions-item>
<el-descriptions-item label="客户来源">
{{consignor.source || ''}}
</el-descriptions-item>
<el-descriptions-item label="社交软件">
暂缺字段数据
</el-descriptions-item>
<el-descriptions-item label="联系地址">
{{consignor.address || ''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" border>
<el-descriptions-item label="*收货人">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeId" required error="收货人不能为空">
<customer-selector v-model="form.consigneeId" @change="consignee = $event" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="收货人">
{{consignee.name || ''}}
</el-descriptions-item>
<el-descriptions-item label="手机号">
{{consignee.defaultContactPhone || ''}}
</el-descriptions-item>
<el-descriptions-item label="收货人公司">
{{consignee.company || ''}}
</el-descriptions-item>
<el-descriptions-item label="客户来源">
{{consignee.source || ''}}
</el-descriptions-item>
<el-descriptions-item label="社交软件">
暂缺字段数据
</el-descriptions-item>
<el-descriptions-item label="联系地址">
{{consignee.address || ''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" border>
<el-descriptions-item label="*始发城市">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="departureId" required error="始发地必选">
<el-select v-model="form.departureId" placeholder="请选择始发地">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="*目的城市">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="objectiveId" required error="目的城市必选">
<el-select v-model="form.objectiveId" placeholder="请选择目的地">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="mt-10">
<div slot="header" class="card-title">
<div class="card-name">商品信息</div>
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addProduct"></el-button>
</div>
<el-table :data="productList" border>
<el-table-column label="序号" width="60px" fixed>
<template slot-scope="scope">
{{scope.$index + 1}}
</template>
</el-table-column>
<el-table-column label="中文名" width="160px">
<template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="row.goodsType = $event.typeId" />
</template>
</el-table-column>
<el-table-column label="英文名" width="160px">
<template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="row.goodsType = $event.typeId" />
</template>
</el-table-column>
<el-table-column label="商品类型" width="160px">
<template slot-scope="{row}">
<selector disabled v-model="row.goodsType" :options="productAttrList" label-field="attrName" value-field="id"></selector>
</template>
</el-table-column>
<el-table-column label="品牌" width="100px">
<template slot-scope="{row}">
<dict-selector v-model="row.brand" :type="DICT_TYPE.ECW_IS_BRAND" formatter="bool" defaultable @input="getProductFee(row)" />
</template>
</el-table-column>
<el-table-column label="件数" width="90px">
<template slot-scope="{row}">
<el-input v-model.number="row.num" />
</template>
</el-table-column>
<el-table-column label="包装单位">
<template slot-scope="{row}">
<dict-selector v-model="row.unit" :type="DICT_TYPE.ECW_PACKAGE_TYPE" defaultable />
</template>
</el-table-column>
<el-table-column label="箱规(m)" width="120px">
<template slot-scope="{row}">
<el-input v-model="row.boxGauge" @input="calcVolume(row)" />
</template>
</el-table-column>
<el-table-column label="总体积(m³)" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.volume" />
</template>
</el-table-column>
<el-table-column label="总重量(kg)" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.weight" />
</template>
</el-table-column>
<el-table-column label="货值(RMB)" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.worth" />
</template>
</el-table-column>
<el-table-column label="商品特性" width="250px">
<template slot-scope="{row}">
<el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event)">
<el-checkbox v-for="item in productAttrList" :label="item.id" :key="item.id">{{item.attrName}}</el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
<el-table-column label="运输方式" width="150px">
<template slot-scope="{row}">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="row.transportId"
@input="onTransportChange(row,$event)" formatter="number" />
</template>
</el-table-column>
<el-table-column label="出货渠道" width="150px">
<template slot-scope="{row}">
<selector
:disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, row.transportId).cssClass != 'channel'"
v-model="row.channelId"
:options="channelList"
value-field="channelId"
label-field="nameZh"
@input="onChannelChange(row)"
></selector>
</template>
</el-table-column>
<el-table-column label="线路" width="200px">
<template slot-scope="{row}">
<selector
v-model="row.lineId"
:options="routerList"
@input="onLineChange(row)"
clearable
:label-field="(item, index) => item.startTitleZh + ' >> ' + item.destTitleZh" value-field="id"></selector>
</template>
</el-table-column>
<el-table-column label="运费" width="200px">
<template slot-scope="{row}">
<template v-if="row.fee">
<div>
运费:{{row.fee.seaFreight}} {{currentMap[row.fee.seaFreightCurrency]}} / {{unitMap[row.fee.seaFreightVolume]}}
</div>
<div>
清关费:{{row.fee.clearanceFreight}} {{currentMap[row.fee.clearanceFreightCurrency]}} / {{unitMap[row.fee.clearanceFreightVolume]}}
</div>
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="180px" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="delProduct(scope.$index)">删除</el-button>
<!-- <el-button size="mini" type="primary" @click="showMorePrice($index)">更多报价</el-button> -->
<!-- <el-button size="mini" type="primary" @click="getProductFee(scope.row)">计算</el-button> -->
</template>
</el-table-column>
</el-table>
<!--
</el-card>
<el-card class="mt-10"> -->
<div class="card-title" style="padding:20px 0;">费用小计</div>
<el-descriptions :column="4" border>
<el-descriptions-item label="总件数">
{{sum.totalNum || 0}}
</el-descriptions-item>
<!-- <el-descriptions-item label="总体积">
{{sum.totalVolume || 0}}m³
</el-descriptions-item>
<el-descriptions-item label="总重量">
{{sum.totalWeight || 0}}kg
</el-descriptions-item> -->
<el-descriptions-item label="总货值">
{{sum.totalWorth || 0}}人民币
</el-descriptions-item>
<el-descriptions-item label="保价费">
{{fee.insuranceFee || 0}}人民币
</el-descriptions-item>
<!-- <el-descriptions-item label="总运费">
<div>{{fee.seaNGN || 0}}泰拉</div>
<div>{{fee.seaRMB || 0}}人民币</div>
<div>{{fee.seaUSD || 0}}美元</div>
</el-descriptions-item>
<el-descriptions-item label="总清关费">
<div>{{fee.clearanceNGN || 0}}泰拉</div>
<div>{{fee.clearanceRMB || 0}}人民币</div>
<div>{{fee.clearanceUSD || 0}}美元</div>
</el-descriptions-item>
<el-descriptions-item label="预计费用">
<div>{{fee.seaNGN + fee.clearanceNGN}}泰拉</div>
<div>{{fee.seaRMB + fee.clearanceRMB + fee.insuranceFee }}人民币</div>
<div>{{fee.seaUSD + fee.clearanceUSD}}美元</div>
</el-descriptions-item> -->
</el-descriptions>
</el-card>
<template v-for="(item, index) in transportList" >
<el-card class="mt-10" :key="index" v-if="item._enabled" :data-enabled="item._enabled">
<div class="card-title" slot="header">{{item.label}}</div>
<el-form-item v-for="(router, routerIndex) in item.routers" :key="routerIndex" :label="item.label.substr(0, 2) + '线路' + (routerIndex + 1)">
<el-col :span="12">
{{getRouterNameById(router.lineId)}}
</el-col>
<el-col :span="12" v-if="router.channelId">
出货渠道{{routerIndex + 1}}: {{getChannelNameById(router.channelId)}}
</el-col>
</el-form-item>
<el-form-item label="是否双清" v-if="[2,3,4].indexOf(+item.transportId) > -1">
<dict-selector v-model="item.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" />
</el-form-item>
<el-form-item label="航空公司" v-if="[3,4].indexOf(+item.transportId) > -1">
<el-select placeholder="" v-model="item.airlineCompany">
</el-select>
</el-form-item>
<el-form-item label="船公司" v-if="[2].indexOf(+item.transportId) > -1">
<el-select placeholder="" v-model="item.airlineCompany">
</el-select>
</el-form-item>
<el-form-item label="清关证书" v-if="[2,3,4].indexOf(+item.transportId) > -1">
<dict-selector v-model="item.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item>
<el-form-item label="清关证书备注" v-if="[2,3,4].indexOf(+item.transportId) > -1">
<el-input v-model="item.remarks" ></el-input>
</el-form-item>
<el-form-item label="是否拆包" v-if="[3,4].indexOf(+item.transportId) > -1">
<dict-selector v-model="item.isUnpack" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item>
<el-form-item label="单票立刻转运" v-if="[3,4].indexOf(+item.transportId) > -1">
<dict-selector v-model="item.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
<span style="margin-left:10px">注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”</span>
</el-form-item>
<el-form-item label="包装类型" v-if="[3,4].indexOf(+item.transportId) > -1">
<dict-selector v-model="item.packageType" form-type="checkbox" :type="DICT_TYPE.ECW_PACKAGE_TYPE" multiple />
</el-form-item>
<el-form-item label="包装要求备注" v-if="[3,4].indexOf(+item.transportId) > -1">
<el-input v-model="item.packageRemarks" ></el-input>
</el-form-item>
</el-card>
</template>
<el-card class="mt-10">
<div class="card-title" slot="header">通用</div>
<el-descriptions :column="2" border>
<el-descriptions-item label="唛头">
<el-input v-model="form.marks" placeholder=""></el-input>
</el-descriptions-item>
<el-descriptions-item label="报关方式">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.customsType" form-type="radio" />
</el-descriptions-item>
<el-descriptions-item label="预计结束时间">
<el-date-picker v-model="form.stopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-descriptions-item>
<el-descriptions-item label="是否控货">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.control" form-type="radio" />
</el-descriptions-item>
<el-descriptions-item label="竞争对手">
<el-input v-model="form.competitor" placeholder=""></el-input>
</el-descriptions-item>
<el-descriptions-item label="重要程度">
<el-rate v-model="form.importance"></el-rate>
</el-descriptions-item>
<el-descriptions-item label="价格有效时间">
<el-date-picker v-model="form.startTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
-
<el-date-picker v-model="form.endTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-descriptions-item>
<el-descriptions-item label="交货方式">
<!--
接口要求数据为整数,所以增加trade_type类型的字典,用1234代码以下不同类型
FOB(离岸价),CIF(到岸价),CNF(成本加运费),EXW(出厂价)
-->
<dict-selector :type="DICT_TYPE.ECW_TRADE_TYPE" fomtter="number" v-model="form.tradeType" />
<el-input v-model="form.tradeAdress" placeholder=""></el-input>
</el-descriptions-item>
<!-- <el-descriptions-item label="总运费" :span="2">
</el-descriptions-item>
<el-descriptions-item label="总清关费" :span="2">
</el-descriptions-item>
<el-descriptions-item label="总价格" :span="2">
</el-descriptions-item> -->
<!-- <el-descriptions-item label="佣金类型" :span="2">
<dict-selector :type="DICT_TYPE.COMMISSION_TYPE" form-type="radio" fomtter="number" v-model="form.commissionType" defaultable />
</el-descriptions-item> -->
<el-descriptions-item label="付款人" :span="2">
<dict-selector :type="DICT_TYPE.DRAWEE" v-model="form.drawee" form-type="radio" />
</el-descriptions-item>
<el-descriptions-item v-if="form.drawee==3" label="费用类型" :span="2">
<template v-for="(item,index) in customDraweeVOList" v-key="index">
<el-form-item :label="item.name" >
<dict-selector :type="DICT_TYPE.DRAWEE" :filter="(e) => e.value == '1' || e.value == '2'" v-model="item.value" form-type="radio" />
</el-form-item>
</template>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-form-item label="">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="$router.back()">取 消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { createOrder, updateOrder, getOrder, getProductFeeList, getProductFee } from "@/api/ecw/order";
import ProductSelector from '@/components/ProductSelector'
import {getProductAttrList} from '@/api/ecw/productAttr'
import {getChannelList} from '@/api/ecw/channel'
import Selector from '@/components/Selector'
import CustomerSelector from '@/components/CustomerSelector'
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {getTradeCityList} from '@/api/ecw/region'
import {getDictData} from '@/utils/dict'
import Fee from '@/components/Fee'
import {getCurrencyList} from '@/api/ecw/currency'
import {getUnitList} from '@/api/ecw/unit'
import { getDictDatas } from '@/utils/dict';
export default {
name: "OrderEdit",
components: {
ProductSelector, Selector, CustomerSelector, Fee
},
data() {
return {
customDraweeVOList: [
{name: '运费',value: undefined},
{name: '清关费',value: undefined},
{name: '其他费用',value: undefined},
{name: '报关费',value: undefined}
],
draweeList: [],
// 遮罩层
loading: true,
// 是否显示弹出层
/* dateRangeStopTime: [],
dateRangeStartTime: [],
dateRangeEndTime: [],
dateRangeCreateTime: [], */
productList:[], // 商品信息
productAttrList:[], // 商品属性
channelList: [], // 出货取到
routerList: [],
tradeCityList: [],
consignor: {}, // 发货人
consignee:{}, // 收货人
transportList: [],
currencyList:[],
unitList:[],
fee: {}, // 费用
// 表单参数
form: {
sendstatus:0
},
// 表单校验
rules: {
/* number: [{ required: true, message: "报价单号不能为空", trigger: "blur" }],
consignorId: [{ required: true, message: "客户id,发货人不能为空", trigger: "blur" }],
consigneeId: [{ required: true, message: "收货人id不能为空", trigger: "blur" }],
sendstatus: [{ required: true, message: "站内信状态,0未发送,1已发送不能为空", trigger: "blur" }], */
}
};
},
computed:{
expoerCityList(){
return this.tradeCityList.filter(item => item.type == 2)
},
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
},
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
// 被启用的货运方式
/* enbedTransports(){
let transports = []
this.transportList.forEach(item => {
let disabled = true
let lineIds = []
let channelIds = []
let routers = []
this.productList.forEach(prod => {
if(prod.offerTransportId == item.transportId){
disabled = false
routers.push({
lineId: prod.lineId,
channelId: prod.channelId
})
if(prod.lineId)lineIds.push(prod.lineId)
if(prod.channelId)channelIds.push(prod.channelId)
}
})
if(!disabled){
item._disabled = disabled
item.routers = routers
item.lineIds = lineIds.join(',')
item.channelIds = channelIds.join(',')
transports.push(item)
}
})
return transports
}, */
// 根据线路id显示线路名称
getRouterNameById(){
return routerId => {
let router = this.routerList.find(item => item.id == routerId)
console.log({router})
if(router){
return router.startTitleZh + ' > ' + router.destTitleZh
}
return '-'
}
},
// 根据渠道id显示渠道名
getChannelNameById(){
return channelId => {
return this.channelList.find(item => item.channelId == channelId) ?. nameZh
}
},
currentMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = item.titleZh
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = item.titleZh
})
return map
},
sum(){
let sum = {
totalNum: 0,
totalVolume: 0,
totalWeight: 0,
totalWorth: 0,
}
this.productList.forEach(item => {
sum.totalNum += parseInt(item.num) || 0
sum.totalVolume += parseFloat(item.volume) || 0
sum.totalWeight += parseFloat(item.weight) || 0
sum.totalWorth += parseFloat(item.worth) || 0
})
return sum
}
},
watch:{
// 始发地
'form.departureId'(){
this.getOpenedRouterList()
},
// 目的地
'form.objectiveId'(){
this.getOpenedRouterList()
},
},
created() {
getProductAttrList().then(res => this.productAttrList = res.data)
getChannelList().then(res => this.channelList = res.data)
getTradeCityList().then(res => this.tradeCityList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data)
this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE).forEach(res => {
this.transportList.push({
transportId: +res.value, // 转为整形
label: res.label,
})
})
if(this.$route.query.id){
getOffer(this.$route.query.id).then(res => {
this.$set(this, 'form', res.data)
if(res.data.offerProdRespVOList){
res.data.offerProdRespVOList.forEach(item => {
this.addProduct({
"goodsType": item.goodsType,
"brand": item.brand,
"unit": item.unit,
"channelId": item.channelId,
"lineId": item.lineId,
"prodId": item.prodId,
"num": item.num,
"boxGauge": item.boxGauge,
"volume": item.volume,
"transportId": item.transportId,
"weight": item.weight,
"worth": item.worth,
"prodAttrArr": item.prodAttrIds && item.prodAttrIds != '' ? item.prodAttrIds.split(',').filter(item => item != '').map(item => +item) : []
})
})
}
console.log('res.data.transportRespVOList', res.data.transportRespVOList)
res.data.transportRespVOList.forEach(item => {
let transport = this.transportList.find(t => t.transportId == item.transportId)
console.log(item.transportId, transport)
Object.assign(transport, item, {_enabled: true})
})
this.$nextTick(() => {
this.updateEnabledTransports()
})
})
}else this.addProduct()
},
methods: {
onTransportChange(row, val){
this.getProductFee(row)
if(this.getDictData(this.DICT_TYPE.ECW_TRANSPORT_TYPE, val).cssClass != 'channel') row.channelId = null
this.updateEnabledTransports()
},
onLineChange(row){
this.getProductFee(row)
this.updateEnabledTransports()
},
onChannelChange(row){
this.getProductFee(row)
},
onProductAttrChange(row, attr){
console.log(attr)
this.getProductFee(row)
/* // 需要强制刷新,否则勾选框不更新
this.$forceUpdate() */
},
// 更新运输方式
updateEnabledTransports(){
let enabled = {}
this.productList.forEach(prod => {
if(prod.transportId){
if(!enabled[prod.transportId]){
enabled[prod.transportId] = {
// transportId: prod.transportId,
lineIdSet: new Set(),
channelIdSet: new Set(),
routers:[]
}
}
if(prod.lineId){
enabled[prod.transportId].lineIdSet.add(prod.lineId)
}
if(prod.channelId){
enabled[prod.transportId].channelIdSet.add(prod.channelId)
}
if(prod.lineId && enabled[prod.transportId].routers.findIndex(item => { item.lineId == prod.lineId && item.channelId == prod.channelId }) < 0){
enabled[prod.transportId].routers.push({
lineId: prod.lineId,
channelId: prod.channelId
})
}
}
})
console.log(JSON.stringify(enabled))
let enabledTransportIds = Object.keys(enabled).map(item => +item)
this.transportList.forEach(transport => {
this.$set(transport, '_enabled', enabledTransportIds.indexOf(transport.transportId) > -1 && enabled[transport.transportId].routers.length)
if(transport._enabled){
Object.assign(transport, enabled[transport.transportId])
}
})
},
addProduct(data){
this.productList.push(data || {prodAttrArr:[]})
},
// 计算商品运费
getProductFee(row){
if(!row.prodId || !row.transportId || !row.lineId || !row.num || !row.weight)return false
if(row.prodAttrArr){
row.prodAttrIds = row.prodAttrArr.join(',')
}
getProductFeeList(row).then(res => {
this.$set(row, 'fee', res.data[0] || {})
})
},
// 获取路线
getOpenedRouterList(){
let params = {}
if(this.form.departureId){
params.startCityId = this.form.departureId
}
if(this.form.objectiveId){
params.destCityId = this.form.objectiveId
}
getOpenedRouterList(params).then(res => this.routerList = res.data)
},
// 计算体积
calcVolume(row){
if(!row.boxGauge || !row.num) return false
try{
row.volume = (eval(row.boxGauge) * row.num).toFixed(2)
}catch(e){
row.volume = ''
}
},
// 删除一条产品
delProduct(index){
this.$confirm('确定删除此条内容么?')
.then(res => {
this.productList.splice(index, 1)
})
},
// 显示更多报价
showMorePrice(index){
console.log('显示更多', index)
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
this.productList.map(item => {
item.prodAttrIds = item.prodAttrArr.join(',')
})
this.transportList.map(item => {
if(item._enabled){
item.lineIds = Array.from(item.lineIdSet).join(',')
item.channelIds = Array.from(item.channelIdSet).join(',')
}
})
// 修改的提交
if (this.form.orderNo != null) {
let data = Object.assign({}, this.form, {
customDraweeVOList: this.customDraweeVOList,
transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
orderItemVOList: this.productList
})
updateOrder(data).then(response => {
this.$modal.msgSuccess("修改成功");
this.$router.back()
});
return;
}
let data = Object.assign({}, this.form, {
customDraweeVOList: this.customDraweeVOList,
transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
orderItemVOList: this.productList
})
// 添加的提交
createOrder(data).then(response => {
this.$modal.msgSuccess("新增成功");
this.$router.replace('order')
});
});
},
}
};
</script>
<style lang="scss" scoped>
.card-title{
font-size: 18px;
display: flex;
.card-name{
flex: 1;
}
}
.mt-10{
margin-top: 10px;
}
</style>
\ No newline at end of file
...@@ -2,19 +2,85 @@ ...@@ -2,19 +2,85 @@
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" > <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="订单编号" prop="orderNo"> <el-form-item label="订单编号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.orderNo" placeholder="订单编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="唛头" prop="marks">
<el-input v-model="queryParams.marks" placeholder="唛头" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="产品备案属性" prop="productRecord"> <el-form-item label="发货人" prop="consignorId">
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" v-model="queryParams.productRecord" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.consignorId" placeholder="发货人" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="控货状态" prop="cargoControlStatus">
<dict-selector :type="DICT_TYPE.CONTROL_GOODS_STATUS" v-model="queryParams.cargoControlStatus" clearable @keyup.enter.native="handleQuery" /> <el-form-item label="收货人" prop="consigneeId">
<el-input v-model="queryParams.consigneeId" placeholder="收货人" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="报关类别" prop="customsType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" clearable @keyup.enter.native="handleQuery" /> <el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="运输方式" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" />
</el-form-item>
<el-form-item label="商品分类" prop="goodsType">
<selector v-model="queryParams.goodsType" :options="productAttrList" label-field="attrName" value-field="id">
</selector>
</el-form-item>
<el-form-item label="品名" prop="prodId">
<product-selector v-model="queryParams.prodId" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="品牌" prop="brand">
<dict-selector v-model="queryParams.brand" :type="DICT_TYPE.ECW_IS_BRAND" formatter="bool" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="提单号" prop="tidanNo">
<el-input v-model="queryParams.tidanNo" placeholder="提单号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="控货" prop="isCargoControl">
<dict-selector v-model="queryParams.isCargoControl" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item>
<el-form-item label="入仓类型" prop="warehouseType">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehousingType" />
</el-form-item>
<!-- <el-form-item label="跟进客服" prop="">
<customer-selector v-model="" />
</el-form-item> -->
<el-form-item label="订单状态" prop="status">
<dict-selector :type="DICT_TYPE.PAY_ORDER_STATUS" v-model="queryParams.status"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="报关方式" prop="customsType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<!-- <el-form-item label="是否齐货" prop="customsType">
<dict-selector v-model="queryParams.isCargoControl" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item> -->
<el-form-item label="重货比" prop="weightRatio">
<el-input style="width: 100px;" v-model="molecule" placeholder="" clearable @change="moleculeChange"
@keyup.enter.native="handleQuery" />
-
<el-input style="width: 100px;" v-model="denominator" placeholder="" clearable @change="denominatorChange"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="备案属性" prop="productRecord">
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" v-model="queryParams.productRecord" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="快递单号" prop="number">
<el-input v-model="queryParams.number" placeholder="快递单号" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -30,50 +96,44 @@ ...@@ -30,50 +96,44 @@
v-hasPermi="['ecw:order:create']">新增</el-button> v-hasPermi="['ecw:order:create']">新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleEdit" :disabled="multiple">批量调仓
v-hasPermi="['ecw:order:export']">导出</el-button> </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="['ecw:order:export']">导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column label="主键ID" align="center" prop="orderId" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="订单编号" align="center" prop="orderNo" /> <el-table-column label="订单编号" align="center" prop="orderNo" />
<el-table-column label="父编号" align="center" prop="parentNumber" />
<el-table-column label="下单会员" align="center" prop="userId" />
<el-table-column label="唛头" align="center" prop="marks" /> <el-table-column label="唛头" align="center" prop="marks" />
<el-table-column label="入仓箱数" align="center" prop="sumNum" />
<el-table-column label="入仓重量" align="center" prop="sumWeight" />
<el-table-column label="产品备案属性" align="center" prop="productRecord"> <el-table-column label="运输方式" align="center" prop="transportId">
<template slot-scope="scope">
<span>{{ scope.row.productRecord | recordFilter(productRecordList) }}</span>
</template>
</el-table-column>
<el-table-column label="控货状态" align="center" prop="cargoControlStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.cargoControlStatus | cargoControlStatusFilter(cargoControlStatusList) }}</span> <span>{{ scope.row.transportId | transportFilter(transportList) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="报关类别" align="center" prop="customsType"> <el-table-column label="订单状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.customsType | customsTypeFilter(customsTypeList) }}</span> <span>{{ scope.row.status | orderStatusFilter(orderStatusList) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入仓箱数" align="center" prop="sumNum" />
<el-table-column label="入仓方数" align="center" prop="sumVolume" />
<el-table-column label="入仓重量" align="center" prop="sumWeight" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:order:update']">修改</el-button> v-hasPermi="['ecw:order:update']">编辑</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="$router.push('/order/warehousing?id=' + scope.row.orderId)"
v-hasPermi="['ecw:order:update']">入仓</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:order:update']">退仓</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:order:delete']">删除</el-button> v-hasPermi="['ecw:order:delete']">删除</el-button>
</template> </template>
...@@ -81,7 +141,7 @@ ...@@ -81,7 +141,7 @@
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/> @pagination="getList" />
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
...@@ -118,26 +178,43 @@ ...@@ -118,26 +178,43 @@
</template> </template>
<script> <script>
import Selector from '@/components/Selector'
import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import { getTradeCityList } from '@/api/ecw/region'
import { createOrder, updateOrder, deleteOrder, getOrder, getOrderPage, exportOrderExcel } from "@/api/ecw/order"; import { createOrder, updateOrder, deleteOrder, getOrder, getOrderPage, exportOrderExcel } from "@/api/ecw/order";
import { getDictDatas, DICT_TYPE } from '@/utils/dict'; import { getDictDatas, DICT_TYPE } from '@/utils/dict';
export default { export default {
name: "Order", name: "Order",
components: { components: {
CustomerSelector, ProductSelector, Selector
}, },
filters:{ filters: {
cargoControlStatusFilter(e,cargoControlStatusList) { cargoControlStatusFilter(e, cargoControlStatusList) {
if(e) return cargoControlStatusList.find(item=>item.value == e).label if (e) return cargoControlStatusList.find(item => item.value == e).label
}, },
recordFilter(e,productRecordList) { recordFilter(e, productRecordList) {
if(e) return productRecordList.find(item=>item.value == e).label if (e) return productRecordList.find(item => item.value == e).label
}, },
customsTypeFilter(e,customsTypeList) { customsTypeFilter(e, customsTypeList) {
if(e) return customsTypeList.find(item=>item.value == e).label if (e) return customsTypeList.find(item => item.value == e).label
},
orderStatusFilter(e, orderStatusList) {
if (e) return orderStatusList.find(item => item.value == e) ? orderStatusList.find(item => item.value == e).label : ''
},
transportFilter(e, transportList) {
if (e) return transportList.find(item => item.value == e).label
} }
}, },
data() { data() {
return { return {
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -230,18 +307,35 @@ export default { ...@@ -230,18 +307,35 @@ export default {
}, },
productRecordList: getDictDatas(DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE), productRecordList: getDictDatas(DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE),
cargoControlStatusList: getDictDatas(DICT_TYPE.CONTROL_GOODS_STATUS), cargoControlStatusList: getDictDatas(DICT_TYPE.CONTROL_GOODS_STATUS),
customsTypeList: getDictDatas(DICT_TYPE.ECW_CUSTOMS_TYPE) customsTypeList: getDictDatas(DICT_TYPE.ECW_CUSTOMS_TYPE),
orderStatusList: getDictDatas(DICT_TYPE.PAY_ORDER_STATUS),
transportList: getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE),
tradeCityList: [],
productAttrList: [], // 商品属性
molecule: '', //重货比分子
denominator: '' //重货比分母
}; };
}, },
computed: {
expoerCityList() {
return this.tradeCityList.filter(item => item.type == 2)
},
importCityList() {
return this.tradeCityList.filter(item => item.type == 1)
}
},
created() { created() {
this.getList(); this.getList();
getProductAttrList().then(res => this.productAttrList = res.data)
getTradeCityList().then(res => this.tradeCityList = res.data)
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = { ...this.queryParams };
console.log('params', params)
this.addBeginAndEndTime(params, this.dateRangeRucangtime, 'rucangtime'); this.addBeginAndEndTime(params, this.dateRangeRucangtime, 'rucangtime');
this.addBeginAndEndTime(params, this.dateRangeDaogangtime, 'daogangtime'); this.addBeginAndEndTime(params, this.dateRangeDaogangtime, 'daogangtime');
this.addBeginAndEndTime(params, this.dateRangeQingguantime, 'qingguantime'); this.addBeginAndEndTime(params, this.dateRangeQingguantime, 'qingguantime');
...@@ -392,17 +486,17 @@ export default { ...@@ -392,17 +486,17 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const orderId = row.orderId; const orderId = row.orderId;
this.$modal.confirm('是否确认删除订单编号为"' + orderId + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除订单编号为"' + orderId + '"的数据项?').then(function () {
return deleteOrder(orderId); return deleteOrder(orderId);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => { });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = { ...this.queryParams };
params.pageNo = undefined; params.pageNo = undefined;
params.pageSize = undefined; params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeRucangtime, 'rucangtime'); this.addBeginAndEndTime(params, this.dateRangeRucangtime, 'rucangtime');
...@@ -421,8 +515,17 @@ export default { ...@@ -421,8 +515,17 @@ export default {
}).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(() => { });
} },
// 表格多选
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
handleEdit() { },
moleculeChange() { },
denominatorChange() { }
} }
}; };
</script> </script>
<template>
<div class="app-container">
<h2>入仓操作-{{ order.orderNo }}</h2>
<order-base-info :order="order"></order-base-info>
<div style="margin-top: 20px">
<span>储位:</span><el-button type="primary" size="mini" @click="areaVisible = true">选择</el-button>
</div>
<h2>货物信息</h2>
<el-table
:data="order.orderItemVOList || []"
style="width: 100%">
<el-table-column
type="index"
width="50"
label="序号">
</el-table-column>
<el-table-column
prop="prodTitleZh"
label="品名">
</el-table-column>
<el-table-column
label="填单货物属性">
<template v-slot="{row}">
品牌:{{ row.brand ? '' : '' }}<br>
箱数:{{ row.num }}<br>
体积:{{ row.volume }}<br>
重量:{{ row.weight }}Kg
</template>
</el-table-column>
<el-table-column
label="入库货物属性">
<template v-slot="{row}">
品牌:{{ row.brand ? '' : '' }}<br>
箱数:{{ row.num }}<br>
体积:{{ row.volume }}<br>
重量:{{ row.weight }}Kg
</template>
</el-table-column>
<el-table-column
prop="address"
label="快递单号">
</el-table-column>
<el-table-column
prop="address"
label="最后操作时间">
</el-table-column>
<el-table-column
prop="address"
label="状态">
</el-table-column>
<el-table-column
prop="address"
label="操作">
<template v-slot="{row}">
<el-button size="mini" type="text">入仓</el-button>
<el-button size="mini" type="text">追加</el-button>
<el-button size="mini" type="text">退仓</el-button>
</template>
</el-table-column>
</el-table>
<h2>特殊需求</h2>
<el-form ref="form" :model="form" label-width="180px" style="max-width: 600px;">
<el-form-item label="套编织袋费">
<el-input v-model="form.a" placeholder="请输入套编织袋费">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="木架包装费">
<el-input v-model="form.a" placeholder="请输入木架包装费">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="纸箱包装费">
<el-input v-model="form.a" placeholder="请输入纸箱包装费">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="内陆运输费">
<el-input v-model="form.a" placeholder="请输入内陆运输费">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="打包费">
<el-input v-model="form.a" placeholder="请输入打包费">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="易碎标签">
<el-input v-model="form.a" placeholder="请输入易碎标签">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="其他费用">
<el-input v-model="form.a" placeholder="请输入其他费用">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<div style="text-align: center">
<el-button type="primary">转异</el-button>
<el-button type="primary">完成入仓</el-button>
</div>
</el-form>
<warehouse-area-dialog :visible.sync="areaVisible"></warehouse-area-dialog>
</div>
</template>
<script>
import {getCurrencyList} from "@/api/ecw/currency"
import {getOrder} from "@/api/ecw/order"
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
export default {
name: "Warehousing",
components: {
orderBaseInfo,
WarehouseAreaDialog
},
mounted() {
if(this.$route.query.id){
this.orderId = this.$route.query.id
getOrder(this.orderId).then(r => this.order = r.data)
}
getCurrencyList().then(res => this.currencyList = res.data)
},
data() {
return {
areaVisible: false,
form: {
a: '',
b: 3
},
currencyList:[],
order: {}
}
}
}
</script>
<style scoped>
</style>
...@@ -10,15 +10,28 @@ ...@@ -10,15 +10,28 @@
</el-form-item> </el-form-item>
<el-form-item label="商品名称" prop="titleZh"> <el-form-item label="商品名称" prop="titleZh">
<el-input v-if="productDisabled" :value="product ? product.titleZh:null" disabled /> <el-input v-if="productDisabled" :value="product ? product.titleZh : null" disabled />
<product-selector v-else v-model="form.productId" :product-type="form.productType" @change="product=$event" /> <product-selector v-else v-model="form.productId" :product-type="form.productType" @change="product = $event" />
</el-form-item> </el-form-item>
<el-form-item label="英文名称" prop="titleEn"> <el-form-item label="英文名称" prop="titleEn">
<el-input :value="product ? product.titleEn : ''" disabled /> <el-input :value="product ? product.titleEn : ''" disabled />
</el-form-item> </el-form-item>
<el-form-item label="路线" v-if="form.warehouseLineDO">
<el-input :value="'【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, form.warehouseLineDO.transportType) + '】从【'+form.warehouseLineDO.startTitleZh+'】发往【'+form.warehouseLineDO.destTitleZh+'】'" disabled />
<el-form-item label="路线" prop="lineChannelList" v-if="lineList && lineList.length == 1">
<el-input v-for="item in lineList"
:value="'【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType) + '】从【' + item.warehouseLineDO.startTitleZh + '】发往【' + item.warehouseLineDO.destTitleZh + '】'"
disabled />
</el-form-item>
<el-form-item label="路线" prop="lineChannelList" v-else>
<el-checkbox-group v-model="checkList">
<el-checkbox v-for="item in lineList" :label="item.id">
{{ '' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType) + '】从【' +
item.warehouseLineDO.startTitleZh + '】发往【' + item.warehouseLineDO.destTitleZh + ''
}}
</el-checkbox>
</el-checkbox-group>
</el-form-item> </el-form-item>
<routers-selector v-if="!form.id" v-model="selectedRoutes" /> <routers-selector v-if="!form.id" v-model="selectedRoutes" />
<el-card style="margin-bottom: 10px"> <el-card style="margin-bottom: 10px">
...@@ -28,18 +41,21 @@ ...@@ -28,18 +41,21 @@
<el-form-item label="默认运费" prop="transportPrice"> <el-form-item label="默认运费" prop="transportPrice">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<selector v-model="form.transportPriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-model="form.transportPriceUnit" :options="currencyList" label-field="titleZh" value-field="id"
defaultable style="width:100px" />
<!-- <el-select v-model="form.transportPriceUnit"> <!-- <el-select v-model="form.transportPriceUnit">
<el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" /> <el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" />
</el-select> --> </el-select> -->
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<inputor default="0" v-model.number="form.transportPrice" type="number" placeholder="整数或者两位小数"/> <inputor default="0" v-model.number="form.transportPrice" type="number" placeholder="整数或者两位小数" />
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
/ <selector v-model="form.transportVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> /
<selector v-model="form.transportVolumeUnit" :options="unitList" label-field="titleZh" value-field="id"
defaultable style="width:100px" />
<!-- <el-select v-model="form.transportVolumeUnit"> <!-- <el-select v-model="form.transportVolumeUnit">
<el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" /> <el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" />
</el-select> --> </el-select> -->
...@@ -49,18 +65,21 @@ ...@@ -49,18 +65,21 @@
<el-form-item label="默认清关费" prop="clearancePrice"> <el-form-item label="默认清关费" prop="clearancePrice">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<selector v-model="form.clearancePriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-model="form.clearancePriceUnit" :options="currencyList" label-field="titleZh" value-field="id"
defaultable style="width:100px" />
<!-- <el-select v-model="form.clearancePriceUnit"> <!-- <el-select v-model="form.clearancePriceUnit">
<el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" /> <el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" />
</el-select> --> </el-select> -->
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<inputor default="0" v-model.number="form.clearancePrice" type="number" placeholder="整数或者两位小数"/> <inputor default="0" v-model.number="form.clearancePrice" type="number" placeholder="整数或者两位小数" />
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
/ <selector v-model="form.clearanceVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> /
<selector v-model="form.clearanceVolumeUnit" :options="unitList" label-field="titleZh" value-field="id"
defaultable style="width:100px" />
<!-- <el-select v-model="form.clearanceVolumeUnit"> <!-- <el-select v-model="form.clearanceVolumeUnit">
<el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" /> <el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" />
</el-select> --> </el-select> -->
...@@ -69,10 +88,13 @@ ...@@ -69,10 +88,13 @@
</el-form-item> </el-form-item>
<template v-for="(special, specialIndex) in this.specialProducts"> <template v-for="(special, specialIndex) in this.specialProducts">
<el-form-item :label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + '运费'" :key="specialIndex + 'transport'"> <el-form-item
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + '运费'"
:key="specialIndex + 'transport'">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<selector v-model="special.transportPriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-model="special.transportPriceUnit" :options="currencyList" label-field="titleZh"
value-field="id" defaultable style="width:100px" />
<!-- <el-select v-model="special.transportPriceUnit"> <!-- <el-select v-model="special.transportPriceUnit">
<el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" /> <el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" />
</el-select> --> </el-select> -->
...@@ -83,7 +105,9 @@ ...@@ -83,7 +105,9 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
/ <selector v-model="special.transportVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> /
<selector v-model="special.transportVolumeUnit" :options="unitList" label-field="titleZh"
value-field="id" defaultable style="width:100px" />
<!-- <el-select v-model="special.transportVolumeUnit"> <!-- <el-select v-model="special.transportVolumeUnit">
<el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" /> <el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" />
...@@ -91,21 +115,26 @@ ...@@ -91,21 +115,26 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item :label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + '清关费'" :key="specialIndex + 'clearance'"> <el-form-item
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + '清关费'"
:key="specialIndex + 'clearance'">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<selector v-model="special.clearancePriceUnit" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-model="special.clearancePriceUnit" :options="currencyList" label-field="titleZh"
value-field="id" defaultable style="width:100px" />
<!-- <el-select v-model="special.clearancePriceUnit"> <!-- <el-select v-model="special.clearancePriceUnit">
<el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" /> <el-option v-for="currency in currencyList" :key="currency.id" :label="currency.titleZh" :value="currency.id" />
</el-select> --> </el-select> -->
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<inputor default="0" v-model.number="special.clearancePrice" type="number" placeholder="整数或者两位小数"/> <inputor default="0" v-model.number="special.clearancePrice" type="number" placeholder="整数或者两位小数" />
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
/ <selector v-model="special.clearanceVolumeUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> /
<selector v-model="special.clearanceVolumeUnit" :options="unitList" label-field="titleZh"
value-field="id" defaultable style="width:100px" />
<!-- <el-select v-model="special.clearanceVolumeUnit"> <!-- <el-select v-model="special.clearanceVolumeUnit">
<el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" /> <el-option v-for="unit in unitList" :key="unit.id" :label="unit.titleZh" :value="unit.id" />
</el-select> --> </el-select> -->
...@@ -161,22 +190,23 @@ ...@@ -161,22 +190,23 @@
</template> </template>
<script> <script>
import RoutersSelector from '@/components/RoutersSelector' import RoutersSelector from '@/components/RoutersSelector'
import { createProductPrice, updateProductPrice, deleteProductPrice, getProductPrice, getProductPricePage, exportProductPriceExcel } from "@/api/ecw/productPrice"; import { createProductPrice, updateProductPrice, batchUpdateProductPrice, deleteProductPrice, getProductPrice, getProductPriceList, getProductPricePage, exportProductPriceExcel } from "@/api/ecw/productPrice";
import { getProduct } from '@/api/ecw/product' import { getProduct } from '@/api/ecw/product'
import { getProductType, getProductTypeList } from '@/api/ecw/productType' import { getProductType, getProductTypeList } from '@/api/ecw/productType'
import { getCurrencyList } from '@/api/ecw/currency'; import { getCurrencyList } from '@/api/ecw/currency';
import { getUnitList } from '@/api/ecw/unit'; import { getUnitList } from '@/api/ecw/unit';
import ProductSelector from '@/components/ProductSelector' import ProductSelector from '@/components/ProductSelector'
import {arrryToKeyedObjectBy} from '@/utils/index' import { arrryToKeyedObjectBy } from '@/utils/index'
import Selector from '@/components/Selector' import Selector from '@/components/Selector'
import Inputor from '@/components/Inputor' import Inputor from '@/components/Inputor'
export default { export default {
components: {RoutersSelector, ProductSelector, Selector, Inputor}, components: { RoutersSelector, ProductSelector, Selector, Inputor },
data(){ data() {
return { return {
checkList: [],
selectedRoutes: [], // 勾选的路线渠道 selectedRoutes: [], // 勾选的路线渠道
form:{}, form: {},
specialProducts: [], specialProducts: [],
// specialList:[], // 特殊需求,默认四个 // specialList:[], // 特殊需求,默认四个
rules: { rules: {
...@@ -186,39 +216,48 @@ export default { ...@@ -186,39 +216,48 @@ export default {
transportPrice: [{ required: true, message: "海运费不能为空", trigger: "blur" }], transportPrice: [{ required: true, message: "海运费不能为空", trigger: "blur" }],
clearancePrice: [{ required: true, message: "清关费不能为空", trigger: "blur" }], clearancePrice: [{ required: true, message: "清关费不能为空", trigger: "blur" }],
advanceStatus: [{ required: true, message: "是否预付不能为空", trigger: "blur" }], advanceStatus: [{ required: true, message: "是否预付不能为空", trigger: "blur" }],
containerLocation:[{ required: true, message: "货柜位置不能为空", trigger: "blur" }], containerLocation: [{ required: true, message: "货柜位置不能为空", trigger: "blur" }],
square:[{ required: true, message: "方数不能为空", trigger: "blur" }], square: [{ required: true, message: "方数不能为空", trigger: "blur" }],
// zhongLinjie:[{ required: true, message: "默认重货标准不能为空", trigger: "blur" }], // zhongLinjie:[{ required: true, message: "默认重货标准不能为空", trigger: "blur" }],
// paoLinjie:[{ required: true, message: "默认泡货标准不能为空", trigger: "blur" }], // paoLinjie:[{ required: true, message: "默认泡货标准不能为空", trigger: "blur" }],
needBook:[{ required: true, message: "预约入仓不能为空", trigger: "blur" }], needBook: [{ required: true, message: "预约入仓不能为空", trigger: "blur" }],
}, },
product: null, product: null,
productType: null, productType: null,
currencyList:[], currencyList: [],
unitList:[], unitList: [],
productTypeList:[], productTypeList: [],
productDisabled: true productDisabled: true,
lineList: [] //路线数组
} }
}, },
computed:{ computed: {
}, },
watch:{ watch: {
product(){ checkList() { //选择路线
if (this.checkList.length > 0) {
this.form.lineChannelList = this.checkList.map(item => {
return { lineId: item, shippingChannelId: 0 }
})
} else {
this.form.lineChannelList = []
}
},
product() {
getProductType(this.product.typeId).then(res => { getProductType(this.product.typeId).then(res => {
this.productType = res.data this.productType = res.data
}) })
}, },
form(val){ form(val) {
if(!val)return if (!val) return
// 特殊需求回显 // 特殊需求回显
if(val.specialList){ if (val.specialList) {
let keyed = arrryToKeyedObjectBy(val.specialList, 'specialDictType') let keyed = arrryToKeyedObjectBy(val.specialList, 'specialDictType')
console.log(keyed)
this.specialProducts.map((item, index) => { this.specialProducts.map((item, index) => {
if(keyed[item.specialDictType]){ if (keyed[item.specialDictType]) {
for(let field in item){ for (let field in item) {
if(keyed[item.specialDictType][field]){ if (keyed[item.specialDictType][field]) {
item[field] = keyed[item.specialDictType][field] item[field] = keyed[item.specialDictType][field]
} }
} }
...@@ -234,32 +273,46 @@ export default { ...@@ -234,32 +273,46 @@ export default {
}) })
} }
}, },
selectedRoutes(routers){ selectedRoutes(routers) {
routers.forEach(item => { routers.forEach(item => {
item.shippingChannelId = item.channelId item.shippingChannelId = item.channelId
}) })
} }
}, },
created(){ async created() {
// 修改回显 // 修改回显
if(this.$route.query.id){ if (this.$route.query.id) {
getProductPrice(this.$route.query.id).then(res => {
getProductPrice(12).then(res => {
this.form = res.data this.form = res.data
this.product = res.data.productDO this.product = res.data.productDO
/* getProduct(res.data.productId).then(res => { /* getProduct(res.data.productId).then(res => {
this.product = res.data this.product = res.data
}) */ }) */
}) })
let query = {
ids: this.$route.query.id
}
getProductPriceList(query).then(res => {
this.form = res.data[0]
this.lineList = res.data
})
// this.form =newdata[newdata.length-1]
// this.product = newdata[newdata.length-1].productDO
} }
// 指定产品 // 指定产品
else if(this.$route.query.product_id){ else if (this.$route.query.product_id) {
getProduct(this.$route.query.product_id).then(res => { getProduct(this.$route.query.product_id).then(res => {
this.product = res.data this.product = res.data
}) })
} }
// 获取类型列表 // 获取类型列表
else{ else {
this.productDisabled = false this.productDisabled = false
getProductTypeList().then(res => this.productTypeList = res.data) getProductTypeList().then(res => this.productTypeList = res.data)
} }
...@@ -268,7 +321,6 @@ export default { ...@@ -268,7 +321,6 @@ export default {
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
this.getDictDatas(this.DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS).forEach(item => { this.getDictDatas(this.DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS).forEach(item => {
console.log(item, this.getDictDataLabel(item.value))
this.specialProducts.push({ this.specialProducts.push({
"clearancePrice": null, "clearancePrice": null,
"clearancePriceUnit": null, "clearancePriceUnit": null,
...@@ -280,7 +332,8 @@ export default { ...@@ -280,7 +332,8 @@ export default {
}) })
}) })
}, },
methods:{ methods: {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (!valid) { if (!valid) {
...@@ -288,21 +341,29 @@ export default { ...@@ -288,21 +341,29 @@ export default {
} }
// 只有新增的时候做判断 // 只有新增的时候做判断
if(!this.form.id && (!this.selectedRoutes || !this.selectedRoutes.length)) { if (!this.form.id && (!this.selectedRoutes || !this.selectedRoutes.length)) {
this.$message.error('请选择线路'); this.$message.error('请选择线路');
return; return;
} }
let data = Object.assign({}, this.form, { let data = Object.assign({}, this.form, {
// lineChannelList: this.selectedRoutes, lineChannelList: this.selectedRoutes,
specialList: this.specialProducts specialList: this.specialProducts
}) })
// 修改的提交 // 修改的提交
if (this.form.id != null) { if (this.form.id != null) {
if (this.lineList.length > 1) {//批量修改
batchUpdateProductPrice(data).then(response => {
this.$modal.msgSuccess("修改成功");
this.$router.replace('/product/product-price')
})
} else {
updateProductPrice(data).then(response => { updateProductPrice(data).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.$router.replace('/product/product-price') this.$router.replace('/product/product-price')
}); })
}
return; return;
} }
// 添加的提交 // 添加的提交
......
...@@ -60,8 +60,10 @@ ...@@ -60,8 +60,10 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['ecw:product-price:create']">新增</el-button>
v-hasPermi="['ecw:product-price:create']">新增</el-button> </el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleEdit" :disabled="multiple" v-hasPermi="['ecw:product:attr']">批量设置路线</el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
...@@ -71,7 +73,8 @@ ...@@ -71,7 +73,8 @@
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column label="序号" prop="id" width="50" /> <el-table-column label="序号" prop="id" width="50" />
<el-table-column label="商品编码" align="center" prop="productCode" > <el-table-column label="商品编码" align="center" prop="productCode" >
...@@ -347,6 +350,12 @@ export default { ...@@ -347,6 +350,12 @@ export default {
}, },
data() { data() {
return { return {
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
//特性列表 //特性列表
attrList:[], attrList:[],
typeList: [], typeList: [],
...@@ -708,6 +717,10 @@ export default { ...@@ -708,6 +717,10 @@ export default {
this.open = true; this.open = true;
this.title = "添加路线价格"; this.title = "添加路线价格";
}, },
// 批量设置路线
handleEdit() {
this.$router.push('product-price/edit?id=' + this.ids)
},
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
return this.$router.push('product-price/edit?id=' + row.id) return this.$router.push('product-price/edit?id=' + row.id)
...@@ -826,6 +839,12 @@ export default { ...@@ -826,6 +839,12 @@ export default {
this.$download.excel(response, '${table.classComment}.xls'); this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => {});
},
// 表格多选
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
} }
} }
}; };
......
...@@ -78,6 +78,11 @@ ...@@ -78,6 +78,11 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" v-if="form.type == 2">
<el-form-item label="显示菜单" prop="isShowInMenuBar">
<dict-selector v-model="form.isShowInMenuBar" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" form-type="radio" />
</el-form-item>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item v-if="form.type != '3'" label="菜单图标"> <el-form-item v-if="form.type != '3'" label="菜单图标">
<el-popover placement="bottom-start" width="460" trigger="click" @show="$refs['iconSelect'].reset()"> <el-popover placement="bottom-start" width="460" trigger="click" @show="$refs['iconSelect'].reset()">
...@@ -242,6 +247,7 @@ export default { ...@@ -242,6 +247,7 @@ export default {
parentId: 0, parentId: 0,
name: undefined, name: undefined,
icon: undefined, icon: undefined,
isShowInMenuBar: undefined,
type: SystemMenuTypeEnum.DIR, type: SystemMenuTypeEnum.DIR,
sort: undefined, sort: undefined,
status: CommonStatusEnum.ENABLE status: CommonStatusEnum.ENABLE
......
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