Commit 97ca3518 authored by 我在何方's avatar 我在何方
parents 559082cf 04cc9846
......@@ -740,6 +740,72 @@ export function extraCostList(params) {
/***************************** 报关费用 end **********************************/
/***************************** 理货 start **********************************/
/**
* 理货列表
*
* @export
* @param {*} data
* @return {*}
*/
export function getTallyList(data) {
return request({
url: "/shipment/box/tallyList",
method: "post",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
data: jsonToFormData(data),
});
}
/**
* 理货移出
*
* @export
* @param {*} data
* @return {*}
*/
export function tallyRemove(data) {
return request({
url: "/ecw/box-preload-goods/remove",
method: "post",
data,
});
}
/**
* 理货
*
* @export
* @param {*} data
* @return {*}
*/
export function tallyLocationUpdate(data) {
return request({
url: "/shipment/box/batchOrderLocationUpdate",
method: "post",
data,
});
}
/**
* 理货提交
*
* @export
* @param {*} data
* @return {*}
*/
export function tallyCommit(data) {
return request({
url: "/shipment/box/tallyCommit",
method: "post",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
data: jsonToFormData(data),
});
}
/***************************** 理货 end **********************************/
function jsonToFormData(params) {
const formData = new FormData();
for (const [key, value] of Object.entries(params)) {
......
......@@ -9,6 +9,15 @@ export function createReceipt(data) {
})
}
// 更新收款单
export function updateReceipt(data) {
return request({
url: '/ecw/receipt/update',
method: 'put',
data: data
})
}
// 获取应收款列表
export function getReceivableList(query) {
return request({
......@@ -18,6 +27,144 @@ export function getReceivableList(query) {
})
}
// 获取应收款详情
export function getReceivableInfoByIds(query) {
return request({
url: '/ecw/receivable/get',
method: 'get',
params: query
})
}
// 获取收款单列表
export function getReceiptList(query) {
return request({
url: '/ecw/receipt/page',
method: 'get',
params: query
})
}
// 核销收款单
export function receiptVerification(id) {
return request({
url: '/ecw/receipt/verification/' + id,
method: 'GET'
})
}
// 反核销收款单
export function receiptVerificationCancel(id) {
return request({
url: '/ecw/receipt/verificationCancel/' + id,
method: 'GET'
})
}
// 获取收款单详情
export function getReceiptInfoByIds(query) {
return request({
url: '/ecw/receipt/get',
method: 'get',
params: query
})
}
// 获取收款单明细列表
export function getReceivableItemDetail(query) {
return request({
url: '/ecw/receipt/getReceivableItemDetail',
method: 'get',
params: query
})
}
// 获取收款单明细
export function getInvoicingItem(query) {
return request({
url: '/ecw/receipt/getInvoicingItem',
method: 'get',
params: query
})
}
// 创建收款明细
export function receiptItemCreate(data) {
return request({
url: '/ecw/receipt-item/create',
method: 'post',
data: data
})
}
// 根据收款单ID获得收款明细列表
export function getReceivableItem(query) {
return request({
url: '/ecw/receipt-item/getReceivableItem',
method: 'get',
params: query
})
}
// 根据收款单ID获得收款账户细列表
export function getReceiptAccountList(query) {
return request({
url: '/ecw/receipt/getReceiptAccountList',
method: 'get',
params: query
})
}
// 删除收款明细
export function deleteReceiptItem(id) {
return request({
url: '/ecw/receipt-item/delete?id=' + id,
method: 'delete'
})
}
// 更新收款明细
export function updateReceiptItem(data) {
return request({
url: '/ecw/receipt-item/update',
method: 'put',
data: data
})
}
// 收款明细核销
export function receiptItemVerification(id) {
return request({
url: '/ecw/receipt-item/verification/' + id,
method: 'GET'
})
}
// 反核销收款单
export function receiptItemVerificationCancel(id) {
return request({
url: '/ecw/receipt-item/verificationCancel/' + id,
method: 'GET'
})
}
// 收款明细批量核销
export function receiptItemBatchVerification(query) {
return request({
url: '/ecw/receipt-item/batchVerification',
method: 'GET',
params: query
})
}
// 收款单全部核销
export function receiptItemAllVerification(id) {
return request({
url: '/ecw/receipt-item/allVerification/' + id,
method: 'GET'
})
}
// 根据获取应收款列表
// export function getReceivableListByIds(query) {
// return request({
......@@ -27,6 +174,41 @@ export function getReceivableList(query) {
// })
// }
// 导出收款单 Excel
export function receiptExportExcel(query) {
return request({
url: '/ecw/receipt/export-excel',
method: 'get',
params: query
})
}
// 删除收款单
export function deleteReceipt(id) {
return request({
url: '/ecw/receipt/delete?id=' + id,
method: 'delete'
})
}
// 获得收款单开票信息
export function getReceiptInvoicing(id) {
return request({
url: '/ecw/receipt/invoicing/info/' + id,
method: 'get'
})
}
// 更新收款单开票信息
export function updateReceiptInvoicing(data) {
return request({
url: '/ecw/receipt/invoicing/info',
method: 'put',
data: data
})
}
// 更新应付款
export function updatePayable(data) {
return request({
......
......@@ -318,3 +318,11 @@ export function getOrderCourierNumber(params){
params,
})
}
// 获取审核
export function getApproval(id){
return request({
url:'/order/approval/get?id=' + id,
method:'get'
})
}
\ No newline at end of file
......@@ -70,3 +70,22 @@ export function batchUpdateProductPrice(query) {
data: query
})
}
// 批量拉黑
export function batchBlock(query) {
return request({
url: '/ecw/product-price/batchBlock',
method: 'get',
params: query
})
}
// 批量下架
export function batchOff(query) {
return request({
url: '/ecw/product-price/batchOff',
method: 'get',
params: query
})
}
......@@ -35,10 +35,11 @@ export function getWarehouseArea(id) {
}
// 获得仓库查询库域
export function getByWarehouseId() {
export function getByWarehouseId(params) {
return request({
url: '/ecw/warehouse-area/getByWarehouseId',
method: 'get'
method: 'get',
params
})
}
......
......@@ -10,21 +10,21 @@
:remote-method="remoteMethod"
:loading="loading">
<el-option
v-for="(item, index) in list"
v-for="(item, index) in formattedList"
:key="item.id"
:label="`${item.contactsName}`"
:label="`${item.label}`"
:value="index">
</el-option>
</el-select>
<el-button v-if="quickable" type="text" @click="showQuickCreate=true" class="ml-10">快速新建</el-button>
<quick-create v-if="showQuickCreate" @success="onQuickCreateSuccess" @close="showQuickCreate=false"></quick-create>
<!-- <quick-create v-if="showQuickCreate" @success="onQuickCreateSuccess" @close="showQuickCreate=false" :default="{type}"></quick-create> -->
</div>
</template>
<script>
import {getCustomerContactsSelect, getCustomerContactsListByCustomer} from '@/api/ecw/customerContacts'
import QuickCreate from '@/views/ecw/customer/components/quickCreate'
import Vue from 'vue'
export default {
components:{QuickCreate},
props:{
......@@ -32,7 +32,8 @@ export default {
quickable: {
type: Boolean,
default: true
}
},
type: [String, Number], // 客户类别,新建时指定默认类别,也可以根据需要筛选联系人所属的客户类别
},
data(){
return {
......@@ -43,6 +44,24 @@ export default {
showQuickCreate: false
}
},
computed:{
formattedList(){
return this.list.map(item => {
item.label = item.contactsName
let more = []
if(item.phoneNew){
more.push(item.phoneNew)
}
if(item.email){
more.push(item.email)
}
if(more.length){
item.label += `(${more.join('|')})`
}
return item
})
}
},
watch:{
index(val){
this.$emit('input', val !== null ? this.list[val].customerContactsId: null)
......@@ -50,6 +69,49 @@ export default {
},
value(val){
this.init()
},
showQuickCreate(){
if(!this.showQuickCreate)return
const QuickCreateComp = Vue.extend(QuickCreate)
const dialog = new QuickCreateComp({
propsData:{
default: {type: this.type}
},
})
/* dialog.$on = () => {
return {
success: this.onQuickCreateSuccess,
close: () => {
console.log('关闭拉')
this.showQuickCreate = false
}
}
} */
dialog.$on('close', () => {
console.log('关闭拉')
this.showQuickCreate = false
document.body.removeChild(dialog.$el)
dialog.$destroy()
})
dialog.$on('success', (id) => {
this.onQuickCreateSuccess(id)
dialog.$emit('close')
})
dialog.$mount()
console.log({
dialog,
parent: this
})
window.dialogComp = dialog
document.body.append(dialog.$el)
/* dialog.remove = () => {
console.log('关闭拉11')
document.body.removeChild(dialog.$el)
} */
}
},
created(){
......
......@@ -2,7 +2,7 @@
<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.sumNum }}/{{ order.costVO.totalNum }}</el-descriptions-item>
<el-descriptions-item label="订单状态"><dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" :class="{red: order.status === 1, green: order.status === 5 || order.status === 2}" /></el-descriptions-item>
<el-descriptions-item label="送货时间">{{ order.consigneeVO && order.consigneeVO.deliveryDate || '' }}</el-descriptions-item>
<el-descriptions-item label="运输方式">
......
......@@ -13,7 +13,7 @@
<el-option
v-for="(item, index) in list"
:key="item.id"
:label="item.titleZh"
:label="item['title' + lang]"
:value="index">
</el-option>
......@@ -26,7 +26,11 @@ export default {
props:{
productType: [String, Number],
value: [String, Number],
disabled: Boolean
disabled: Boolean,
lang: {
type: String,
default: 'Zh'
}
},
data(){
return {
......
......@@ -83,10 +83,24 @@ export default {
computed:{
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
return this.tradeCityList.filter(item => item.type == 1 || item.type == 3)
},
exportCityList(){
return this.tradeCityList.filter(item => item.type == 2)
return this.tradeCityList.filter(item => item.type == 2 || item.type == 3)
},
exportCityIds(){
let ids = []
this.exportCityList.forEach(item => {
ids.push(item.id)
})
return ids
},
importCityIds(){
let ids = []
this.importCityList.forEach(item => {
ids.push(item.id)
})
return ids
},
availChannelList(){
return this.channelList.filter(item => !this.channelId || this.channelId == item.channelId)
......@@ -181,9 +195,9 @@ export default {
if(this.importCity){
params.destCityId = this.importCity
}
openedRouterList(params).then(res => {
this.openedRouterList = res.data
})
openedRouterList(params).then(res => this.openedRouterList = res.data.filter(item => {
return this.exportCityIds.indexOf(item.startCityId) > -1 && this.importCityIds.indexOf(item.destCityId) > -1
}))
},
// 切换路线选择
toggleChecker(router, selected){
......@@ -197,7 +211,8 @@ export default {
if(selected){
this.selectedRoutes.push({
lineId: router.id,
channelId: router.channel.channelId
channelId: router.channel.channelId,
transportId: router.transportType
})
}else{
let index = this.getSelectedIndex(router)
......
......@@ -5,6 +5,7 @@
:visible.sync="opened"
width="600px"
:before-close="handleClose()"
v-bind="$attrs"
>
<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">
......@@ -62,7 +63,11 @@ export default {
default: false
},
value: Array,
orderId: Number
orderId: Number,
cityId: {
type: Number,
default: undefined
}
},
data() {
......@@ -81,6 +86,25 @@ export default {
visible(val) {
if (val) {
this.opened = true
getByWarehouseId({cityId: this.cityId}).then(r => {
const area = r.data
area.forEach(e => {
// 仓库
e.children.forEach(f => {
// 区域
f.selected = false
if(f.positionList) f.positionList.forEach(g => {
// 位置
g.children.forEach(k => {
// 子位置
k.selected = false
})
})
})
})
this.area = area
})
} else {
}
},
......@@ -143,28 +167,7 @@ export default {
},
mounted() {
if (this.visible) {
this.opened = true
}
getByWarehouseId().then(r => {
const area = r.data
area.forEach(e => {
// 仓库
e.children.forEach(f => {
// 区域
f.selected = false
if(f.positionList) f.positionList.forEach(g => {
// 位置
g.children.forEach(k => {
// 子位置
k.selected = false
})
})
})
})
this.area = area
})
console.log('area dialog mounted')
},
computed: {
......
......@@ -27,7 +27,6 @@ export default {
download0(data, fileName, mineType) {
// 创建 blob
let blob = new Blob([data], {type: mineType});
debugger
// 创建 href 超链接,点击进行下载
window.URL = window.URL || window.webkitURL;
let href = URL.createObjectURL(blob);
......
......@@ -104,6 +104,7 @@ export const DICT_TYPE = {
ECW_CUSTOM_DRAWEE: 'custom_drawee', // 自定义付款人费用类型
ECW_IS_DRAFT: 'is_draft', // 草稿发布状态
ECW_PAYMENT_STATE: 'payment_state',//付款单状态
ECW_INVOICING_TYPE: 'invoicing_type',
ECW_PRICE_TYPE: 'price_type',
//--------ecw---------
CUSTOMER_STATUS: 'customer_status',
......@@ -149,7 +150,7 @@ export const DICT_TYPE = {
ORDER_ERROR_TYPE:'order_error_type',//订单异常类型
ORDER_EXCEPTION_STATUS:'order_exception_status',//异常订单状态
PAYMENT_TYPE:'payment_type',//收款类型
ORDER_WAREHOUSE_IN_STATUS: 'order_warehouse_in_status', // 入仓状态
ORDER_WAREHOUSE_IN_STATUS: 'order_warehouse_in_diff_status', // 入仓状态
ORDER_NO_QUOTE_EXCEPTION_RESULT:'order_no_quote_exception_result',//未报价异常处理结果
ORDER_SUPERFLUOUS_BOX_EXCEPTION_RESULT:'order_superfluous_box_exception_result',//多箱异常处理结果
ORDER_LACI_BOX_EXCEPTION_RESULT:'order_lack_box_exception_result',//少箱异常处理结果
......
......@@ -239,7 +239,7 @@ export default {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
split_order: {
split_detail: {
component: "splitDetail",
id: this.processInstance.businessKey,
}
......
......@@ -3,6 +3,12 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<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 label="自编号" prop="selfNo">
<el-input v-model="queryParams.selfNo" placeholder="请输入自编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
......@@ -43,9 +49,10 @@
</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-form-item label="国家">
<el-select v-model="queryParams.countryId" placeholder="请选择国家">
<el-option v-for="item in countryList" :key="item.id" :label="item.titleZh" :value="item.id">
</el-option>
</el-select>
</el-form-item>
......@@ -154,6 +161,7 @@
import { deletebox, getbox, getboxPage, exportboxExcel } from "@/api/ecw/box";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse";
import { getListTree } from "@/api/ecw/region";
import costForm from "./costForm.vue";
import regError from "./regError.vue";
import editForm from "./editForm.vue";
......@@ -202,6 +210,8 @@ export default {
cabinetList: [],
warehouseList: [],
transportTypes: [],
//国家信息列表
countryList: [],
};
},
computed: {
......@@ -235,8 +245,15 @@ export default {
this.cabinetList = response.data.list;
});
this.getList();
this.getCountryList();
},
methods: {
/* 国家 */
getCountryList() {
getListTree({ treeType: 1 }).then((response) => {
this.countryList = response.data;
});
},
/** 查询列表 */
getList() {
this.loading = true;
......
......@@ -217,7 +217,6 @@ export default {
editForm,
},
created() {
console.log();
this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == "1" || item.value == "2");
......
......@@ -6,9 +6,9 @@
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="boxBackVO.transportType" />
</el-descriptions-item>
<el-descriptions-item label="出货渠道">
<!-- <el-descriptions-item label="出货渠道">
{{getShipChannelName(boxBackVO.shippingChannelId)}}
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item label="柜型">
{{cabinetLabel}}
</el-descriptions-item>
......@@ -24,10 +24,10 @@
<el-button type="primary" @click="showOrder">订单列表</el-button>
</el-row>
<div>
<div v-if="boxBackVO.preInstallInfo && boxBackVO.preInstallInfo.applyReason">
<p>申请原因</p>
<div>
{{boxBackVO.preInstallInfo ? boxBackVO.preInstallInfo.applyReason : ''}}
{{boxBackVO.preInstallInfo.applyReason}}
</div>
</div>
......@@ -37,9 +37,9 @@
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="boxBackVO.transportType" />
</el-descriptions-item>
<el-descriptions-item label="出货渠道">
<!-- <el-descriptions-item label="出货渠道">
{{getShipChannelName(boxBackVO.shippingChannelId)}}
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item label="柜型">
{{cabinetLabel}}
</el-descriptions-item>
......
......@@ -19,7 +19,7 @@
<el-form-item label="订舱公司">
<supplierSelect v-model="bookingObj.spaceCompanyId" :companyType="'1'" placeholder="请选择订舱公司" :allSupplier="this.$attrs.allSupplier" />
</el-form-item>
<el-form-item label="预计驳船时间" prop="bargeTime">
<el-form-item label="预计驳船时间">
<el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.bargeTime"></el-date-picker>
</el-form-item>
......@@ -110,7 +110,6 @@ export default {
bookingObj: {},
// 校验
rules: {
bargeTime: [{ required: true, message: "必填", trigger: "change" }],
sailTime: [{ required: true, message: "必填", trigger: "change" }],
},
};
......
......@@ -68,7 +68,11 @@ export default {
"ldBoxTime",
"ldOutWarehouseTime",
]);
this.cabinetObj = oldData;
this.cabinetObj = {
...oldData,
ldWarehouseType:
oldData.ldWarehouseType === 0 ? undefined : oldData.ldWarehouseType,
};
},
methods: {
/** 提交 */
......
......@@ -94,14 +94,11 @@
<el-row>
<el-col :span="6" class="totle-info">
<div class="count-info">
<p>总计:
无返回
<!-- <span>{{sumData.count.num}}箱</span><span>{{sumData.count.volume}}m³</span><span>{{sumData.count.weight}}Kg</span> -->
</p>
<p>总计:{{getSumData}}</p>
</div>
<div>
<p>容量:</p>
<p>无返回</p>
<p>{{calcCapacity}}</p>
</div>
<div>已装 无返回 箱</div>
</el-col>
......@@ -119,7 +116,7 @@
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body>
<!-- 已装未装订单 -->
<template v-if="dialogConfig.type === 'orderTable'">
<el-table :data="orderList" border>
<el-table :data="orderList" height="500px" border>
<el-table-column label="已装" align="center" prop="loadTag" />
<el-table-column label="未装" align="center" prop="unloadTag" />
</el-table>
......@@ -206,7 +203,12 @@ import {
boxUpdate,
approvalCreate,
} from "@/api/ecw/boxSea";
import { getTotlContent, serviceMsg } from "../../utils";
import {
getTotlContent,
serviceMsg,
getCapacity,
sumStatistics,
} from "../../utils";
import splitOrder from "./splitOrder.vue";
/**
......@@ -489,23 +491,7 @@ export default {
},
watch: {
listData(val) {
let count = { num: 0, volume: 0, weight: 0 };
if (Array.isArray(val)) {
val.forEach((item) => {
const { secStatistics } = item;
if (secStatistics) {
if (!Number.isNaN(Number(secStatistics.num))) {
count.num = count.num + Number(secStatistics.num);
}
if (!Number.isNaN(Number(secStatistics.volume))) {
count.volume = count.volume + Number(secStatistics.volume);
}
if (!Number.isNaN(Number(secStatistics.weight))) {
count.weight = count.weight + Number(secStatistics.weight);
}
}
});
}
const count = sumStatistics(val);
this.$set(this.sumData, "count", count);
},
},
......@@ -522,6 +508,15 @@ export default {
}
return null;
},
/* 容量 */
calcCapacity() {
const { cabinetRespVO } = this.shipmentObj;
return getCapacity(cabinetRespVO);
},
/* 总计 */
getSumData() {
return sumStatistics(this.listData);
},
},
};
</script>
......
......@@ -108,7 +108,11 @@ export default {
"cdAgentlistType",
"cdSoncapType",
]);
this.cDocObj = oldData;
this.cDocObj = {
...oldData,
cdOutBillType:
oldData.cdOutBillType === 0 ? undefined : oldData.cdOutBillType,
};
},
methods: {
/** 提交 */
......
<template>
<el-select filterable :value="value" @change="change" v-bind="$attrs" clearable>
<el-select filterable :value="value === 0 ? undefined : value" @change="change" v-bind="$attrs" clearable>
<el-option v-for="dock in getDock" :key="dock.id" :label="dock.titleZh" :value="dock.id"></el-option>
</el-select>
</template>
......
<template>
<el-select filterable :value="value" @change="change" v-bind="$attrs" clearable>
<el-select filterable :value="value === 0 ? undefined : value" @change="change" v-bind="$attrs" clearable>
<el-option v-for="supplier in getSuppliers" :key="supplier.id" :label="supplier.companyZh" :value="supplier.id"></el-option>
</el-select>
</template>
......
<template>
<el-select filterable :value="value" @change="change" v-bind="$attrs" clearable>
<el-select filterable :value="value === 0 ? undefined : value" @change="change" v-bind="$attrs" clearable>
<el-option v-for="user in getUser" :key="user.id" :value="user.id" :label="user.nickname"></el-option>
</el-select>
</template>
......
<template>
<div>
<el-form ref="cusDeclarationForm" :rules="rules" :model="cusDeclarationObj" label-width="120px">
<el-form-item label="单证要求">无返回 <el-button type="primary" style="margin-left:10px;" @click="downloadVGM">VGM声明</el-button>
<el-form-item label="单证要求">
<template v-for="(item, index) in cusDeclarationObj.documentInfo">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item" :key="index" />
</template>
<el-button type="primary" style="margin-left:10px;" @click="downloadVGM">{{getButtonLabel(cusDeclarationObj.documentInfo)}}</el-button>
</el-form-item>
<el-form-item label="柜重" prop="dcBoxWgt">
<el-input v-model="cusDeclarationObj.dcBoxWgt" placeholder="请输入柜重" clearable />
......@@ -171,8 +175,12 @@ export default {
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
const { currNode, shipmentObj } = this.$attrs;
const { voName } = currNode;
let oldData = {
...shipmentObj[voName],
documentInfo: shipmentObj.documentInfo?.split(",") ?? [],
};
oldData = formatDateStr(oldData, [
"dcCutOffTime",
"dcCheckTime",
......@@ -186,6 +194,10 @@ export default {
this.cusDeclarationObj = oldData;
},
methods: {
getButtonLabel(documentInfo = []) {
const newList = Array.from(new Set(documentInfo));
return newList.length > 2 ? "混合报关" : "VGM声明";
},
/** 提交 */
onSubmit(operateType) {
this.$refs["cusDeclarationForm"].validate((valid) => {
......
......@@ -71,7 +71,7 @@
</div>
<div>
<p>容量:</p>
<p>无返回</p>
<p>{{calcCapacity}}</p>
</div>
<div>
<p>始发地:</p>
......@@ -89,22 +89,22 @@
<div class="table-label">已预装订单</div>
<div>
<p>总计:</p>
<p>无返回</p>
<p>{{getTotlContent(preList.loadStatistics)}}</p>
</div>
<div class="red-label">
<p>可预装方数:</p>
<p>无返回</p>
<p>{{preList.remainVolume}}</p>
</div>
<div class="red-label">
<p>重量:</p>
<p>无返回</p>
<p>{{preList.remainWeight}}kg</p>
</div>
<div class="table-button">
<el-button type="success" size="small" @click="addPart">增加</el-button>
</div>
</el-row>
<el-scrollbar style="height:calc(100% - 43px)">
<el-row v-for="(part, index) in preList" :key="index" class="pre-part">
<el-row v-for="(part, index) in preList.sectionGoodList" :key="index" class="pre-part">
<el-row class="preinstall-title">
<div class="pre-part-info">
<p>{{index+1}}部分</p>
......@@ -150,7 +150,7 @@
<el-dropdown trigger="click" @command="(command)=>handleGoods('singele',scope.row,command)">
<el-button type="primary" size="small" icon="el-icon-edit-outline" circle></el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="bPart" v-for="(bPart, index) in preList" :key="bPart.id" v-show="bPart.id !== part.id">{{index+1}}部分</el-dropdown-item>
<el-dropdown-item :command="bPart" v-for="(bPart, index) in preList.sectionGoodList" :key="bPart.id" v-show="bPart.id !== part.id">{{index+1}}部分</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button type="danger" size="small" icon="el-icon-minus" circle style="margin-left:10px;" @click="deleteOrder('row',scope.row)"></el-button>
......@@ -209,7 +209,7 @@
<el-dropdown trigger="click" @command="(command)=>handleGoods('all',item,command)">
<el-button type="success" size="small">预装全部</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="part" v-for="(part, index) in preList" :key="part.id">第{{index+1}}部分</el-dropdown-item>
<el-dropdown-item :command="part" v-for="(part, index) in preList.sectionGoodList" :key="part.id">第{{index+1}}部分</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
......@@ -242,7 +242,7 @@
<dict-tag :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" :value="scope.row.material" />
</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">
<el-dropdown trigger="click" @command="(command)=>handleGoods('singele',scope.row,command)">
<el-button type="primary" size="small">预装</el-button>
......@@ -251,7 +251,7 @@
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
</el-row>
</el-scrollbar>
......@@ -301,7 +301,7 @@ import {
approvalCancel,
} from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
import { formatDate, getTotlContent, serviceMsg } from "../utils";
import { formatDate, getTotlContent, serviceMsg, getCapacity } from "../utils";
import dayjs from "dayjs";
import WorkFlow from "@/components/WorkFlow";
......@@ -327,7 +327,11 @@ export default {
type: "",
// 已预装 遮罩层
preLoading: false,
preList: [],
preList: {
sectionGoodList: [],
remainWeight: 0,
remainVolume: 0,
},
// 选中行
selectedRows: {},
......@@ -373,10 +377,16 @@ export default {
const { currNode, shipmentObj } = this.$attrs;
return shipmentObj[currNode.keyName] === 23;
},
/* 容量 */
calcCapacity() {
const { cabinetRespVO } = this.$attrs.shipmentObj;
return getCapacity(cabinetRespVO);
},
},
created() {
// 查询待预装
this.handleQuery("toBePre");
this.handleQuery("pre");
},
methods: {
formatDate,
......@@ -494,7 +504,7 @@ export default {
/* 折叠 */
foldTable(index, part) {
part.fold = !part.fold;
this.$set(this.preList, index, part);
this.$set(this.preList.sectionGoodList, index, part);
},
/* 增加部分 */
addPart() {
......@@ -542,16 +552,17 @@ export default {
deleteOrder(type, data) {
let ids = [];
if (type === "selected") {
// 根据parid 构建的对象
const rows = this.selectedRows[data.id] ?? [];
if (!rows.length) {
this.$message.error("请选择订单");
return;
}
ids = rows.map((item) => item.orderItemId);
ids = rows.map((item) => item.id);
}
if (type === "row") {
ids.push(data.orderItemId);
ids.push(data.id);
}
deleteGoods(ids).then((res) => {
......
......@@ -30,7 +30,7 @@
<userSelect v-model="subMaterialObj.notifyingId" placeholder="请选择通知方" :allUsers="this.$attrs.allUsers" />
</el-form-item>
<el-form-item label="Mark & No.">
<el-input v-model="subMaterialObj.markNo"></el-input>
<el-input v-model="subMaterialObj.markNo" placeholder="请输入Mark & No."></el-input>
</el-form-item>
<el-form-item label="包装数量与单位" class="two-element">
<el-input v-model="subMaterialObj.packageNum" placeholder="请输入包装数量"></el-input>
......@@ -124,7 +124,10 @@ export default {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.shipmentObj[voName] };
oldData = formatNumberString(oldData, ["issueType"]);
this.subMaterialObj = oldData;
this.subMaterialObj = {
...oldData,
packageUnit: oldData.packageUnit === 0 ? undefined : oldData.packageUnit,
};
},
methods: {
/** 提交 */
......
<template>
<div class="shipping-batchTally">
<el-row v-if="$attrs.type === 'batchTally'">
<el-button type="text" size="small" @click="()=>openStorage('all')">批量修改储位</el-button>
</el-row>
<el-scrollbar viewClass="tally-list">
<el-row class="tally-detail" v-for="(item, index) in storageList" :key="item.id">
<div class="status-number">{{++index}}</div>
<div class="detail-info">
<div>入仓单号:{{item.orderNo}}</div>
<div>入仓统计:{{getTotlContent(item)}}</div>
<div class="detail-modify">
<el-tooltip effect="dark" :content="item.positionNo" placement="top">
<div>储位:{{item.positionNo}}</div>
</el-tooltip>
<el-button type="text" size="small" @click="()=>openStorage('single', item)">修改</el-button>
</div>
</div>
</el-row>
</el-scrollbar>
<el-row class="operate-button">
<el-button size="small" type="primary" @click="tallyModify">确定</el-button>
<el-button size="small" @click="$emit('closeDialog')">关闭</el-button>
</el-row>
<warehouse-area-dialog ref="area" :visible.sync="visible" v-model="storageSpaces" :order-id="orderId" :modal-append-to-body=false append-to-body v-if="visible" />
</div>
</template>
<script>
import { getTotlContent, serviceMsg } from "../../utils";
import WarehouseAreaDialog from "@/components/WarehouseAreaDialog";
import { deepClone } from "@/utils";
import { tallyLocationUpdate } from "@/api/ecw/boxSea";
export default {
name: "batchTally",
inheritAttrs: false,
components: { WarehouseAreaDialog },
props: {
tallyRows: Array,
},
data() {
return {
visible: false,
// 储位
storageSpaces: [],
// 订单ID
orderId: -1,
// 仓位数据
storageList: deepClone(this.tallyRows),
};
},
methods: {
getTotlContent,
// 打开储位
openStorage(type, item) {
if (type === "all") {
this.orderId = -1;
} else {
this.orderId = item.orderId;
}
this.visible = true;
},
// 修改储位
tallyModify() {
// 查找数据中存在storageList的订单
let orderLocationList = [];
this.storageList.forEach((item) => {
const { storageList } = item;
if (storageList && storageList.length) {
storageList.forEach((sItem) => {
orderLocationList.push({
...sItem,
orderId: item.orderId,
});
});
}
});
if (orderLocationList.length === 0) {
this.$message.error("没有需要修改储位的订单");
return;
}
tallyLocationUpdate({
shipmentId: this.$attrs.shipmentObj.id,
orderLocationList,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "query");
});
});
},
},
watch: {
storageSpaces(val) {
let newList = [];
const { selected = [] } = this.$refs.area;
// 批量修改储位
if (this.orderId === -1) {
newList = this.storageList.map((item) => {
item.positionNo = selected.join(",");
item.storageList = val;
return item;
});
} else {
newList = this.storageList.map((item) => {
if (item.orderId === this.orderId) {
item.positionNo = selected.join(",");
item.storageList = val;
}
return item;
});
}
this.storageList = newList;
},
},
};
</script>
<style lang="scss">
.shipping-batchTally {
.el-scrollbar__wrap {
max-height: 500px;
.tally-list {
.tally-detail {
display: flex;
padding: 10px 0px;
border-bottom: 1px solid rgb(223, 230, 236);
.status-number {
width: 26px;
height: 26px;
border: 1px solid #ccc;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20px;
}
.detail-info {
> div {
height: 30px;
line-height: 30px;
}
.detail-modify {
display: flex;
align-items: center;
> :first-child {
width: 150px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-right: 10px;
}
}
}
}
> .tally-detail:last-child {
border-bottom: none;
}
}
}
}
</style>
<template>
<div class="shipping-tally">
<el-row type="flex" style="margin-top: 15px; margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="22">
<el-card>
<el-descriptions :column="4" border>
<el-descriptions-item label="自编号">
{{shipmentObj.selfNo}}
</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="shipmentObj.transportType" />
</el-descriptions-item>
<el-descriptions-item label="始发地">
{{getCityName(shipmentObj.startWarehouseId)}}
</el-descriptions-item>
<el-descriptions-item label="目的地">
{{getCityName(shipmentObj.destWarehouseId)}}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-row style="margin-top: 15px">
<el-row>
<el-button size="small" type="primary" @click="()=>tallyClick('batch')">批量理货</el-button>
<el-button size="small" type="primary" @click="()=>removeClick('batch')">批量移出</el-button>
</el-row>
<el-row style="margin-top: 5px">
<el-table border :data="tallyList" @select="checkboxSelect" @select-all="checkboxSelect" max-height="600px">
<el-table-column type="selection" align="center" width="55" fixed="left" />
<el-table-column type="index" align="center" label="序号" width="50" />
<el-table-column label="订单号" align="center" prop="orderNo" />
<el-table-column label="商品信息" width="250px" align="center" prop="prodTitleZh">
</el-table-column>
<el-table-column label="备案" align="center" prop="productRecord">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="row.productRecord" />
</template>
</el-table-column>
<el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="纸箱尺寸" align="center" prop="boxGauge">
</el-table-column>
<el-table-column label="体积" align="center" prop="volume">
</el-table-column>
<el-table-column label="重量" align="center" prop="weight">
</el-table-column>
<el-table-column label="数量(个)" align="center" prop="quantity"></el-table-column>
<el-table-column label="储位" align="center" prop="positionNo" width="250px"></el-table-column>
<el-table-column label="状态" align="center" prop="tallyStatus">
<template slot-scope="scope">
{{scope.row.tallyStatus === 1 ? '已理货' : '未理货'}}
</template>
</el-table-column>
<el-table-column label="理货时间" align="center" prop="tallyTime">
<template slot-scope="scope">
{{formatDate(scope.row.tallyTime,'YYYY-MM-DD HH:mm:ss')}}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click="tallyClick('single',scope.row)">理货</el-button>
<el-button type="text" size="small" @click="removeClick('single',scope.row)">移出</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</el-row>
<el-row style="margin-top: 15px" class="operate-button">
<el-button size="small" type="primary" @click="tallyFinish">完成理货</el-button>
<el-button size="small" @click="cancel">取消</el-button>
</el-row>
</el-col>
</el-row>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body>
<batchTally v-if="dialogConfig.dialogVisible" v-bind="$attrs" @closeDialog="closeDialog" :type="dialogConfig.type" :tallyRows="tallyRows" :shipmentObj="shipmentObj" />
</el-dialog>
</div>
</template>
<script>
import batchTally from "./batchTally.vue";
import { getTallyList, tallyRemove, tallyCommit } from "@/api/ecw/boxSea";
import { formatDate, serviceMsg } from "../../utils";
export default {
name: "tally",
inheritAttrs: false,
components: {
batchTally,
},
props: {
shipmentObj: Object,
},
data() {
return {
tallyList: [],
// 理货数据
tallyRows: [],
// 勾选行
selectedRows: [],
// 弹窗配置
dialogConfig: {
title: "",
dialogVisible: false,
width: "30%",
type: "",
fullscreen: false,
},
};
},
created() {
this.getList();
},
methods: {
// 格式化日期
formatDate,
// 查询理货列表
getList() {
getTallyList({ shipmentId: this.shipmentObj.id }).then((res) => {
let list = [];
res.data.forEach((item) => {
item.orderItemList.forEach((oItem) => {
list.push({
...oItem,
positionNo: item.positionNo,
tallyStatus: item.tallyStatus,
tallyTime: item.tallyTime,
});
});
});
this.tallyList = list;
});
},
// 选中
checkboxSelect(selection) {
this.selectedRows = selection;
},
// 理货点击
tallyClick(type, data) {
if (type === "batch") {
if (this.selectedRows.length === 0) {
this.$message.error("请选择需要理货的订单");
return;
}
this.tallyRows = this.selectedRows;
this.showDialog("batchTally");
} else {
this.tallyRows = [data];
this.showDialog("singleTally");
}
},
// 移出点击
removeClick(type, data) {
let orderNos = [],
orderIds = [];
if (type === "batch") {
if (this.selectedRows.length === 0) {
this.$message.error("请选择需要移出的订单");
return;
}
orderNos = this.selectedRows.map((item) => item.orderNo);
orderIds = this.selectedRows.map((item) => item.orderId);
} else {
orderNos = [data.orderNo];
orderIds = [data.orderId];
}
let msgTitle = `您确定要将 ${orderNos.join("")} 移出 ${
this.shipmentObj.selfNo
} 吗?`;
this.$confirm(msgTitle, "提示", {
type: "warning",
})
.then((_) => {
tallyRemove({
orderIdLIst: orderIds,
shipmentId: this.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.getList();
});
});
})
.catch((_) => {});
},
// 关闭弹窗
closeDialog(type) {
this.$set(this.dialogConfig, "dialogVisible", false);
if (type === "query") {
this.getList();
}
},
// 打开弹窗
showDialog(type) {
switch (type) {
case "batchTally":
this.$set(this.dialogConfig, "title", "批量理货");
this.$set(this.dialogConfig, "width", "500px");
break;
case "singleTally":
this.$set(this.dialogConfig, "title", "理货确认");
this.$set(this.dialogConfig, "width", "500px");
break;
}
this.$set(this.dialogConfig, "type", type);
this.$set(this.dialogConfig, "dialogVisible", true);
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
// 理货完成
tallyFinish() {
tallyCommit({ shipmentId: this.shipmentObj.id }).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit");
});
});
},
},
computed: {
/* 获取仓库 */
getCityName() {
return (id) => {
let arr = this.$attrs.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? arr[0].titleZh : "";
};
},
},
};
</script>
<style lang="scss" scoped>
</style>
......@@ -62,10 +62,7 @@
<div class="label-font">
<p>
<span>总计:</span>
<span>无返回</span>
<!-- <span>{{pageData.totalStatistics ? pageData.totalStatistics.num : 0}}箱</span>
<span>{{pageData.totalStatistics ? pageData.totalStatistics.volume : 0}}m3</span>
<span>{{pageData.totalStatistics ? pageData.totalStatistics.weight : 0}}kg</span> -->
<span>{{getTotlContent(pageData.totalStatistics)}}</span>
</p>
</div>
<div class="label-font">
......@@ -146,6 +143,7 @@ export default {
});
},
methods: {
getTotlContent,
/* 获取卸柜数据 */
getLoadGoodsList() {
this.loading = true;
......@@ -166,7 +164,7 @@ export default {
return;
}
batchUnload({
orderNo: this.labelNo,
orderNumCode: this.labelNo,
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then((res) => {
......@@ -205,9 +203,9 @@ export default {
this.$emit("closeStart");
},
/* 关闭弹窗 */
closeDialog() {
closeDialog(type) {
this.dialogVisible = false;
this.getLoadGoodsList();
if (type === "query") this.getLoadGoodsList();
},
/* 打开异常 */
openError(row) {
......
......@@ -62,7 +62,7 @@ export default {
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then((res) => {
this.$emit("closeDialog");
this.$emit("closeDialog", "query");
});
});
}
......
......@@ -42,7 +42,8 @@ import arrivalWidget from "./nodePage/arrival.vue";
import cusClearanceWidget from "./nodePage/cusClearance.vue";
import unloadingWidget from "./nodePage/unloading/index.vue";
import settlementWidget from "./nodePage/settlement.vue";
import ReviewWidget from "./nodePage/review.vue";
import reviewWidget from "./nodePage/review.vue";
import tallyWidget from "./nodePage/tally/index.vue";
/**
* 海运流程图
......@@ -67,7 +68,8 @@ export default {
cusClearanceWidget,
unloadingWidget,
settlementWidget,
ReviewWidget,
reviewWidget,
tallyWidget,
},
props: {
shipmentObj: Object,
......@@ -137,12 +139,16 @@ export default {
case "agent":
this.$set(this.dialogConfig, "title", "代理商设置");
break;
// 理货
case "tally":
this.$set(this.dialogConfig, "fullscreen", true);
break;
// 预装
case "preinstall":
// 预装反审
const preStatus = this.shipmentObj[node.keyName];
if ([24, 25].includes(preStatus)) {
this.currentComponent = `ReviewWidget`;
if ([25].includes(preStatus)) {
this.currentComponent = `reviewWidget`;
this.$set(this.dialogConfig, "width", "700px");
this.$set(this.dialogConfig, "title", "预装反审");
} else {
......@@ -153,8 +159,8 @@ export default {
case "unloading":
// 卸柜反审
const unStatus = this.shipmentObj[node.keyName];
if ([184, 185].includes(unStatus)) {
this.currentComponent = `ReviewWidget`;
if ([186].includes(unStatus)) {
this.currentComponent = `reviewWidget`;
this.$set(this.dialogConfig, "width", "700px");
this.$set(this.dialogConfig, "title", "卸柜反审");
}
......@@ -223,7 +229,8 @@ export default {
.shipping-chart {
display: flex;
padding: 10px 10px;
min-width: 1320px;
min-width: 1300px;
width: max-content;
.chart-nodes {
display: flex;
......
<template>
<div class="app-seaStepDetail">
<el-scrollbar :vertical="true" viewClass="shipping-step">
<!-- <div class="shipping-step"> -->
<template v-for="(step, index) in flatSeaStep">
<div :key="index" v-if="shipmentObj[step.voName] && columnsMapping[step.voName]" class="step-table">
<div class="step-title">{{step.title}}</div>
......@@ -11,7 +10,6 @@
</div>
</div>
</template>
<!-- </div> -->
</el-scrollbar>
</div>
</template>
......@@ -64,9 +62,13 @@ export default {
case "billingMethod":
val = this.getConstant(type, String(val));
break;
case "user":
val = this.getUser(val);
break;
}
}
return val;
return val === 0 ? "" : val;
},
getSupplier(id) {
return (
......@@ -81,6 +83,11 @@ export default {
this.$attrs.warehouseList.find((item) => item.id === id)?.titleZh ?? id
);
},
getUser(id) {
return (
this.$attrs.allUsers.find((item) => item.id === id)?.nickname ?? id
);
},
getDict(code, id) {
return (
this.getDictDatas(code).find((item) => item.value === id)?.label ?? id
......
......@@ -139,6 +139,7 @@ export default {
}
}
.operate-button {
padding-top: 10px;
text-align: center;
}
.two-element {
......
......@@ -17,6 +17,9 @@ function getStatusName(statu) {
statusName.set(24, "预装审核失败");
statusName.set(25, "预装审核成功");
statusName.set(2111, "未理货");
statusName.set(2112, "已理货");
statusName.set(31, "未派车");
statusName.set(32, "已派车");
......@@ -99,7 +102,7 @@ function seaBaseData() {
],
[
{
title: "预装",
title: "排单",
imgSrc: {
start: require("@/assets/images/shipping/yz-start.png"),
wait: require("@/assets/images/shipping/yz-wait.png"),
......@@ -118,6 +121,39 @@ function seaBaseData() {
end: [25],
},
},
{
title: "AGENT",
imgSrc: {
start: require("@/assets/images/shipping/agent-start.png"),
wait: require("@/assets/images/shipping/agent-wait.png"),
end: require("@/assets/images/shipping/agent-end.png"),
},
type: "agent",
voName: "agentInfo",
currStatus: "start",
},
],
[
{
title: "理货",
imgSrc: {
start: require("@/assets/images/shipping/lh-start.png"),
wait: require("@/assets/images/shipping/lh-wait.png"),
end: require("@/assets/images/shipping/lh-end.png"),
},
type: "tally",
dataKey: "16", // 字典数据键值
/**
* 理货状态:2111、未理货;2112、已理货
*/
voName: "tallyInfo",
keyName: "tyStatus",
status: {
start: [2111],
wait: [],
end: [2112],
},
},
{
title: "拖车",
imgSrc: {
......@@ -138,17 +174,6 @@ function seaBaseData() {
end: [32],
},
},
{
title: "AGENT",
imgSrc: {
start: require("@/assets/images/shipping/agent-start.png"),
wait: require("@/assets/images/shipping/agent-wait.png"),
end: require("@/assets/images/shipping/agent-end.png"),
},
type: "agent",
voName: "agentInfo",
currStatus: "start",
},
],
[
{
......@@ -510,6 +535,17 @@ function getColmnMapping() {
key: "operator",
},
],
tallyInfo: [
{
title: "完成理货时间",
key: "tyTime",
type: "datetime",
},
{
title: "业务员",
key: "tyOperator",
},
],
agentInfo: [
{
title: "代理商",
......@@ -618,6 +654,7 @@ function getColmnMapping() {
{
title: "通知方",
key: "notifyingId",
type: "user",
},
{
title: "提单备注",
......@@ -933,6 +970,33 @@ function getTotlContent(total, keys = ["num", "volume", "weight"]) {
return content.join(" ");
}
function getCapacity(capacity) {
return `${capacity?.name ?? ""}柜型 ${capacity?.volume ?? 0}m³ ${
capacity?.weight ?? 0
}kg`;
}
function sumStatistics(val) {
let count = { num: 0, volume: 0, weight: 0 };
if (Array.isArray(val)) {
val.forEach((item) => {
const { secStatistics } = item;
if (secStatistics) {
if (!Number.isNaN(Number(secStatistics.num))) {
count.num = count.num + Number(secStatistics.num);
}
if (!Number.isNaN(Number(secStatistics.volume))) {
count.volume = count.volume + Number(secStatistics.volume);
}
if (!Number.isNaN(Number(secStatistics.weight))) {
count.weight = count.weight + Number(secStatistics.weight);
}
}
});
}
return getTotlContent(count);
}
export const fileTypes = [
"doc",
"xls",
......@@ -976,5 +1040,7 @@ export {
formatNumberString,
formatDate,
getTotlContent,
getCapacity,
sumStatistics,
serviceMsg,
};
<template>
<el-dialog :visible.sync="show" title="快速新建客户" :close-on-click-modal="false" class="quick-create-customer">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form ref="form" :model="form" :rules="rules" label-width="100px" :validate-on-rule-change="false">
<el-form-item label="客户类别" prop="type">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector>
</el-form-item>
......@@ -39,7 +39,7 @@
:key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注"/>
</el-form-item>
......@@ -59,19 +59,9 @@ import { getCountryListAll } from '@/api/ecw/country'
export default {
name: "quickCreateCustomer",
props:{
default: Object
},
created() {
if(this.default){
this.$set(this, 'form', Object.assign({}, this.default, this.form))
}
listServiceUser().then(r => {
this.serviceUserList = r.data
})
getCountryListAll().then(r => {
this.countryList = r.data
})
default: Object,
},
data(){
return {
show: true,
......@@ -87,7 +77,7 @@ export default {
type: [{ required: true, message: "客户类别不能为空", trigger: "blur" }],
createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }],
source: [{ required: true, message: "客户来源不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "跟进客服不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }],
},
......@@ -102,6 +92,17 @@ export default {
}
}
},
created() {
if(this.default){
this.$set(this, 'form', Object.assign({}, this.default, this.form))
}
listServiceUser().then(r => {
this.serviceUserList = r.data
})
getCountryListAll().then(r => {
this.countryList = r.data
})
},
methods: {
open(){
this.show = true
......@@ -127,8 +128,8 @@ export default {
}
}
</script>
<style scoped lang="scss">
<style lang="scss">
.quick-create-customer .el-form-item{
margin-bottom: 22px;
}
</style>
\ No newline at end of file
</style>
......@@ -102,8 +102,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="跟进客服" prop="customerService">
<el-select v-model="form.customerService" placeholder="请选择跟进客服">
<el-form-item label="客户经理" prop="customerService">
<el-select v-model="form.customerService" placeholder="请选择客户经理">
<el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
......@@ -459,7 +459,7 @@ export default {
type: [{ required: true, message: "客户类别不能为空", trigger: "blur" }],
createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }],
source: [{ required: true, message: "客户来源不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "跟进客服不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }],
},
......
......@@ -21,8 +21,8 @@
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item label="跟进客服" prop="customerService">
<el-select v-model="queryParams.customerService" placeholder="请选择跟进客服" clearable size="small">
<el-form-item label="客户经理" prop="customerService">
<el-select v-model="queryParams.customerService" placeholder="请选择客户经理" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
......@@ -73,7 +73,7 @@
<dict-tag :type="DICT_TYPE.COUNTRY" :value="scope.row.country" />
</template>
</el-table-column>
<el-table-column label="跟进客服" align="center" prop="customerService" :formatter="customerServiceFn">
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column label="客户状态" align="center" prop="status">
<template slot-scope="scope">
......@@ -211,8 +211,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="跟进客服" prop="customerService">
<el-select v-model="form.customerService" placeholder="请选择跟进客服">
<el-form-item label="客户经理" prop="customerService">
<el-select v-model="form.customerService" placeholder="请选择客户经理">
<el-option v-for="dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
......@@ -519,7 +519,7 @@ export default {
type: [{ required: true, message: "客户类别不能为空", trigger: "blur" }],
// createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }],
source: [{ required: true, message: "客户来源不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "跟进客服不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }],
},
......
......@@ -26,7 +26,7 @@
<el-descriptions-item label="客户类别">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_TYPE, customer.type) }}</el-descriptions-item>
<!-- <el-descriptions-item label="联系方式">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item label="推介人">{{ promoter }}</el-descriptions-item>
<el-descriptions-item label="跟进客服">{{ customerService }}</el-descriptions-item>
<el-descriptions-item label="客户经理">{{ customerService }}</el-descriptions-item>
<el-descriptions-item label="公司名称">{{ customer.company }}</el-descriptions-item>
<el-descriptions-item label="联系地址">{{ customer.address }}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{ parseTime(customer.createTime) }}</el-descriptions-item>
......
......@@ -21,8 +21,8 @@
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item label="跟进客服" prop="customerService">
<el-select v-model="queryParams.customerService" placeholder="请选择跟进客服" clearable size="small">
<el-form-item label="客户经理" prop="customerService">
<el-select v-model="queryParams.customerService" placeholder="请选择客户经理" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
......@@ -70,7 +70,7 @@
<dict-tag :type="DICT_TYPE.COUNTRY" :value="scope.row.country" />
</template>
</el-table-column>
<el-table-column label="跟进客服" align="center" prop="customerService" :formatter="customerServiceFn">
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column label="客户状态" align="center" prop="status">
<template slot-scope="scope">
......@@ -193,8 +193,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="跟进客服" prop="customerService">
<el-select v-model="form.customerService" placeholder="请选择跟进客服">
<el-form-item label="客户经理" prop="customerService">
<el-select v-model="form.customerService" placeholder="请选择客户经理">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
......@@ -291,8 +291,8 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="openHandOver" width="500px" append-to-body>
<el-form ref="handOverForm" :model="handOverForm" :rules="rules" label-width="80px">
<el-form-item label="跟进客服" prop="customerServiceId">
<el-select v-model="handOverForm.customerServiceId" placeholder="请选择跟进客服" clearable filterable>
<el-form-item label="客户经理" prop="customerServiceId">
<el-select v-model="handOverForm.customerServiceId" placeholder="请选择客户经理" clearable filterable>
<el-option v-for="user in serviceStaffOptions"
:key="user.id" :value="user.id"
:label="user.nickname" />
......
......@@ -22,8 +22,8 @@
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item label="跟进客服" prop="customerService">
<el-select v-model="queryParams.customerService" placeholder="请选择跟进客服" clearable size="small">
<el-form-item label="客户经理" prop="customerService">
<el-select v-model="queryParams.customerService" placeholder="请选择客户经理" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
......@@ -74,7 +74,7 @@
<dict-tag :type="DICT_TYPE.COUNTRY" :value="scope.row.country" />
</template>
</el-table-column>
<el-table-column label="跟进客服" align="center" prop="customerService" :formatter="customerServiceFn">
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column label="客户状态" align="center" prop="status">
<template slot-scope="scope">
......@@ -176,7 +176,7 @@ export default {
type: [{ required: true, message: "客户类别不能为空", trigger: "blur" }],
// createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }],
source: [{ required: true, message: "客户来源不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "跟进客服不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }],
},
......@@ -332,7 +332,7 @@ export default {
},
transferFn(){
if(!this.service){
return this.$message.warning('请选择跟进客服');
return this.$message.warning('请选择客户经理');
}
handOverCustomer({
customerServiceId:this.service,
......
This diff is collapsed.
......@@ -196,7 +196,11 @@
<el-input v-model="scope.row.taxRate" @keyup.native="scope.row.taxRate = oninput(scope.row.taxRate)"></el-input>
</template>
</el-table-column>
<el-table-column label="价税合计(RMB)" align="center" prop="total" />
<el-table-column label="价税合计(RMB)" align="center" prop="total" >
<template slot-scope="scope">
<span>{{ scope.row.total = (scope.row.totalAmount * scope.row.exchangeRate) + (scope.row.totalAmount * scope.row.exchangeRate) * (scope.row.taxRate/100) }}</span>
</template>
</el-table-column>
</el-table>
<el-form
......@@ -405,7 +409,7 @@
</template>
<script>
import { userList } from "@/api/system/user";
import { listSimpleUsers } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict";
import { getToken } from "@/utils/auth";
import { getChannelList } from "@/api/ecw/channel";
......@@ -475,7 +479,7 @@ export default {
this.defaultList = [...res.data]
})
}
userList("salesman").then((res) => (that.creatorData = res.data));
listSimpleUsers().then((res) => (that.creatorData = res.data));
getChannelList().then((res) => (that.channelList = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data));
getBankAccountPage(that.params).then(
......
This diff is collapsed.
......@@ -71,6 +71,7 @@
<el-date-picker
v-model="queryParams.beginCreateTime"
type="datetimerange"
value-format="yyyy-MM-dd"
range-separator="到"
start-placeholder="请选择日期"
end-placeholder="请选择日期">
......@@ -247,7 +248,7 @@ export default {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
this.addBeginAndEndTime(params, this.queryParams.beginCreateTime, "createTime");
// 执行查询
getPaymentList(params).then((response) => {
this.list = response.data.list;
......@@ -281,7 +282,7 @@ export default {
},
deleteClick(row) {
const id = row.id;
this.$modal.confirm('是否确认删除该应付款?').then(function() {
this.$modal.confirm('是否确认删除该付款单?').then(function() {
return deletePayment(id);
}).then(() => {
this.getList();
......
......@@ -29,11 +29,11 @@
</div>
<table border="1" style="margin-top: 20px;width: 100%;text-align: center;border-collapse: collapse;line-height: 2 ">
<tr>
<th style="width: 4%;">序号</th>
<th style="width: 6%;">序号</th>
<th style="width: 15%;">自编号</th>
<th style="width: 15%;">费用类型</th>
<th style="width: 15%;">币别</th>
<th style="width: 12%;">汇率</th>
<th style="width: 10%;">汇率</th>
<th style="width: 15%;">发票号</th>
<th style="width: 12%;">应付金额</th>
<th style="width: 12%;">申请金额</th>
......
This diff is collapsed.
This diff is collapsed.
......@@ -209,15 +209,25 @@
></dict-tag>
</template>
</el-table-column>
<el-table-column label="单价美元" align="center" prop="unitPrice" />
<el-table-column label="总金额美元" align="center" prop="totalAmount" />
<el-table-column label="单价" align="center" prop="unitPrice">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</template>
</el-table-column>
<el-table-column label="总金额" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" />
</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" @click="handleAdd(scope.row)"
<el-button size="mini" type="text" @click="handleAdd(scope.row.id)"
>收款</el-button
>
</template>
......@@ -301,9 +311,8 @@ export default {
this.getList();
},
/** 新增按钮操作 */
handleAdd(row) {
// return this.$router.push("creatCollection?id=" + row.id, { params });
return this.$router.push({ path: "creatCollection?id=" + row.id, query: { data: JSON.stringify(row) } })
handleAdd(id) {
return this.$router.push("creatCollection?receiptId=" + id);
},
submitForm() {},
},
......
This diff is collapsed.
......@@ -22,8 +22,8 @@
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item label="跟进客服" prop="customerService">
<el-select v-model="queryParams.customerService" placeholder="请选择跟进客服" clearable size="small">
<el-form-item label="客户经理" prop="customerService">
<el-select v-model="queryParams.customerService" placeholder="请选择客户经理" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
......@@ -83,7 +83,7 @@
<dict-tag :type="DICT_TYPE.COUNTRY" :value="scope.row.country" />
</template>
</el-table-column>
<el-table-column label="跟进客服" align="center" prop="customerService" :formatter="customerServiceFn">
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column label="客户状态" align="center" prop="status">
<template slot-scope="scope">
......@@ -181,7 +181,7 @@ export default {
type: [{ required: true, message: "客户类别不能为空", trigger: "blur" }],
// createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }],
source: [{ required: true, message: "客户来源不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "跟进客服不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }],
},
......@@ -365,7 +365,7 @@ export default {
},
transferFn(val){
if(!this.service){
return this.$message.warning('请选择跟进客服');
return this.$message.warning('请选择客户经理');
}
handOverCustomer({
customerServiceId:this.service,
......
This diff is collapsed.
......@@ -154,7 +154,7 @@ export default {
return false
}
console.log('submit')
createPick(this.formData).then(res => {
createPick(Object.assign({orderId: this.orderId}, this.formData)).then(res => {
this.$message.success(res.msg || '操作成功')
this.closeDialog()
})
......
<template>
<div>
<el-dialog :before-close="()=>{
clearFrom();$emit('update:show',false)
<el-dialog :before-close="()=>{$emit('update:show',false)
}" center width="80%" :visible.sync="show">
<div class="content">
<el-form label-width="180px" label-position="left">
<el-form-item label="特殊要求">
<dict-selector v-if="show" v-model="form.advanceType" multiple formType="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" ></dict-selector>
<dict-selector v-if="show" v-model="advanceType" multiple formType="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" ></dict-selector>
</el-form-item>
<el-form-item label="特殊要求备注"><el-input type="textarea" style="width: 300px;" v-model="form.todoDetail"></el-input></el-form-item>
<el-form-item label="内陆运费垫付预计金额" v-if="form.advanceType.indexOf('6') > -1">
<el-input style="width: 300px;" v-model="form.transFee">
<el-form-item label="特殊要求备注"><el-input type="textarea" style="width: 300px;" v-model="todoDetail"></el-input></el-form-item>
<el-form-item v-for="(item,index) in this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS)" v-if="advanceType.indexOf(item.value) > -1" :key="item.value" :label="item.label + '预计金额'">
<el-input style="width: 300px;" v-model="specialNeedsList[index].transFee">
<div style="width: 100px;" slot="append" >
<dict-selector v-model="form.transCurrency" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" ></dict-selector>
<dict-selector v-model="specialNeedsList[index].transCurrency" :type="DICT_TYPE.COMMISSION_CURRENCY_TYPE" ></dict-selector>
</div>
</el-input>
</el-form-item>
<el-form-item label="付款类型" v-if="form.advanceType.indexOf('6') > -1">
<div style="width: 300px;">
<dict-selector v-model="form.payType" :type="DICT_TYPE.PAYMENT_TYPE" ></dict-selector>
</div>
<el-form-item label="付款类型">
<dict-selector placeholder="请选择付款类型" v-model="payType" :type="DICT_TYPE.PAYMENT_TYPE" ></dict-selector>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="submit">提交</el-button>
<el-button @click="clearFrom();$emit('update:show',false)">取消</el-button>
<el-button @click="$emit('update:show',false)">取消</el-button>
</div>
</el-dialog>
</div>
......@@ -36,9 +33,6 @@ import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {specialNeedCreate} from "@/api/ecw/order";
export default {
name: "specialNeeds",
created() {
this.clearFrom()
},
props:{
orderId:{
type:[String,Number],
......@@ -50,23 +44,21 @@ export default {
getDictDatas,
DICT_TYPE,
form:{},
advanceType:[],
specialNeedsList:[],
todoDetail:'',
payType:''
}
},
methods:{
clearFrom(){
this.form = {
advanceType:[],
advanceWho: undefined,
payType: undefined,
todoDetail: undefined,
transCurrency: undefined,
transFee: undefined
}
},
submit(){
specialNeedCreate([{orderId:this.orderId, ...this.form}]).then(r=>{
this.specialNeedsList.forEach(i => {
i.todoDetail = this.todoDetail
i.payType = this.payType
})
let p = this.specialNeedsList.filter(i => this.advanceType.indexOf(i.advanceType) > -1)
specialNeedCreate(p).then(r=>{
if(r.code === 0){
this.clearFrom();
this.$emit('update:show',false)
this.$emit('determine')
this.$message.success('提交成功');
......@@ -75,10 +67,20 @@ export default {
},
},
watch:{
'form.advanceType'(val){
this.form.transFee = undefined;
this.form.transCurrency = undefined;
this.form.payType = undefined;
show(val){
if(val){
this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).forEach(r => {
this.specialNeedsList.push({
advanceType:r.value,
orderId:this.orderId,
transFee:'',//预计金额
transCurrency:'',//运输费币种
})
})
}else {
this.specialNeedsList = []
this.advanceType = []
}
}
}
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -133,7 +133,7 @@
<template slot-scope="{row}">{{row.totalNum}}箱/{{row.sumNum}}</template>
</el-table-column>
<el-table-column label="体积/重量" align="center" prop="sumWeight">
<template slot-scope="{row}">{{row.totalVolume}}m³ /{{row.totalWeight}}Kg</template>
<template slot-scope="{row}">{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</template>
</el-table-column>
<el-table-column label="始发仓" align="center" prop="departureName" />
<el-table-column label="运输方式/目的地" align="center" prop="transportId">
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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