Commit 05f6e30f authored by huhaiqing's avatar huhaiqing

出货详情功能开发

parent fe877479
...@@ -355,14 +355,14 @@ export function abnormalCreate(data) { ...@@ -355,14 +355,14 @@ export function abnormalCreate(data) {
* 获得已预装部分列表 * 获得已预装部分列表
* *
* @export * @export
* @param {*} params * @param {*} data
* @return {*} * @return {*}
*/ */
export function secGoodsList(params) { export function secGoodsList(data) {
return request({ return request({
url: "/ecw/box-preload-goods/secGoodsList", url: "/ecw/box-preload-goods/secGoodsList",
method: "get", method: "post",
params, data,
}); });
} }
...@@ -370,14 +370,14 @@ export function secGoodsList(params) { ...@@ -370,14 +370,14 @@ export function secGoodsList(params) {
* 获得预装分页 * 获得预装分页
* *
* @export * @export
* @param {*} params * @param {*} data
* @return {*} * @return {*}
*/ */
export function preloadPage(params) { export function preloadPage(data) {
return request({ return request({
url: "/ecw/box-preload-goods/preloadPage", url: "/ecw/box-preload-goods/preloadPage",
method: "get", method: "post",
params, data,
}); });
} }
...@@ -396,6 +396,37 @@ export function createSection(data) { ...@@ -396,6 +396,37 @@ export function createSection(data) {
}); });
} }
/**
* 查询出货单下的所有部分列表
*
* @export
* @param {*} data
* @return {*}
*/
export function getSectionList(params) {
return request({
url: "/ecw/box-preload-section/list",
method: "get",
params,
});
}
/**
* 装柜订单明细
*
* @export
* @param {*} data
* @return {*}
*/
export function boxGoodsDetail(data) {
return request({
url: "/ecw/box-preload-goods/boxGoodsDetail",
method: "post",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
data: jsonToFormData(data),
});
}
/** /**
* 删除预装部分 * 删除预装部分
* *
......
...@@ -387,13 +387,13 @@ export const constantRoutes = [ ...@@ -387,13 +387,13 @@ export const constantRoutes = [
hidden: true, hidden: true,
redirect: 'noredirect', redirect: 'noredirect',
children: [ children: [
/* { {
path: 'query/:boxId(\\d+)', path: 'query/:shipmentId(\\d+)',
component: (resolve) => import('@/views/ecw/box/query'), component: (resolve) => import('@/views/ecw/box/query'),
props: true, props: true,
name: 'boxQuery', name: 'shippingDetail',
meta: {title: '出货详情', icon: '', activeMenu: '/shipment/box'} meta: {title: '出货详情', icon: '', activeMenu: '/shipment/boxDetail'}
}, */ },
{ {
path: 'shippingSea/:shipmentId(\\d+)', path: 'shippingSea/:shipmentId(\\d+)',
component: (resolve) => import('@/views/ecw/box/shippingSea/shippingSea'), component: (resolve) => import('@/views/ecw/box/shippingSea/shippingSea'),
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-row class="two-element"> <el-row class="two-element-formItem">
<el-form-item label="金额"> <el-form-item label="金额">
<el-input-number v-model="costObj.price" controls-position="right" :min="1"></el-input-number> <el-input-number v-model="costObj.price" controls-position="right" :min="1"></el-input-number>
</el-form-item> </el-form-item>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="operate-button"> <div class="operate-button">
<el-button type="primary" @click="submit">确定</el-button> <el-button type="primary" @click="submit">确定</el-button>
<el-button @click="$emit('closeDialog')">取消</el-button> <el-button @click="$emit('closeDialog')">取消</el-button>
</div> </div>
...@@ -84,25 +84,3 @@ export default { ...@@ -84,25 +84,3 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss">
// 海运操作统一弹窗样式
.app-costForm {
// 页面内元素弹窗form控件宽度设置
.el-form-item__content {
> div:not(.el-input-number) {
width: 100%;
}
}
.operate-button {
text-align: center;
}
.two-element {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
}
</style>
<template> <template>
<div class="app-container"> <div class="app-container shipping-sea">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="运输方式" prop="transportType"> <el-form-item label="运输方式" prop="transportType">
<el-select v-model="queryParams.transportType" placeholder="请选择运输方式" clearable size="small"> <el-select v-model="queryParams.transportType" placeholder="请选择运输方式" clearable size="small">
<el-option v-for="dict in transportTypes" <el-option v-for="dict in transportTypes"
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<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-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
...@@ -79,7 +79,11 @@ ...@@ -79,7 +79,11 @@
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="自编号" align="center" prop="selfNo"/> <el-table-column label="自编号" align="center" prop="selfNo">
<template slot-scope="scope">
<el-button type="text" @click="handleCommand(scope.row, 'detail')">{{ scope.row.selfNo }}</el-button>
</template>
</el-table-column>
<el-table-column label="柜号" align="center" prop="cubNo"/> <el-table-column label="柜号" align="center" prop="cubNo"/>
<el-table-column label="柜型" align="center" prop="cabinetId"> <el-table-column label="柜型" align="center" prop="cabinetId">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -100,15 +104,15 @@ ...@@ -100,15 +104,15 @@
<dict-tag :type="DICT_TYPE.BOX_SHIPMENT_STATUS" :value="scope.row.boxStatus"/> <dict-tag :type="DICT_TYPE.BOX_SHIPMENT_STATUS" :value="scope.row.boxStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="日期" align="center" prop="createTime" width="180"> <el-table-column label="日期" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd') }}</span> <span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd') }}</span>
</template> </template>
</el-table-column> </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" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-dropdown trigger="click" @command="(command)=>handleCommand(scope.row, command)"> <el-dropdown trigger="click" @command="(command)=>handleCommand(scope.row, command)" style="marginRight:10px;">
<el-button type="primary"> <el-button type="primary">
操作<i class="el-icon-arrow-down el-icon--right"></i> 操作<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
...@@ -120,6 +124,20 @@ ...@@ -120,6 +124,20 @@
<el-dropdown-item command="delete">删除</el-dropdown-item> <el-dropdown-item command="delete">删除</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-dropdown trigger="click">
<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="">预装单</el-dropdown-item>
<el-dropdown-item command="">已装单</el-dropdown-item>
<el-dropdown-item command="">应收汇总表</el-dropdown-item>
<el-dropdown-item command="">agent list</el-dropdown-item>
<el-dropdown-item command="">son cap</el-dropdown-item>
<el-dropdown-item command="">提货单</el-dropdown-item>
<el-dropdown-item command="">提单Copy</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -128,7 +146,7 @@ ...@@ -128,7 +146,7 @@
@pagination="getList"/> @pagination="getList"/>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body class="shippingSea-dialog">
<template v-if="dialogType === 'edit' || dialogType === 'add'"> <template v-if="dialogType === 'edit' || dialogType === 'add'">
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
...@@ -155,9 +173,9 @@ ...@@ -155,9 +173,9 @@
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div class="operate-button">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
...@@ -165,6 +183,9 @@ ...@@ -165,6 +183,9 @@
<template v-if="dialogType === 'cost'"> <template v-if="dialogType === 'cost'">
<costForm v-if="open" @closeDialog="closeDialog" :currRow="currRow"/> <costForm v-if="open" @closeDialog="closeDialog" :currRow="currRow"/>
</template> </template>
<template v-if="dialogType === 'error'">
<regError v-if="open" @closeDialog="closeDialog" :shipmentObj="currRow"/>
</template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -173,13 +194,15 @@ ...@@ -173,13 +194,15 @@
import {createbox, updatebox, deletebox, getbox, getboxPage, exportboxExcel} from "@/api/ecw/box"; import {createbox, updatebox, deletebox, getbox, getboxPage, exportboxExcel} from "@/api/ecw/box";
import {getCabinetPage} from "@/api/ecw/cabinet"; import {getCabinetPage} from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse" import { getWarehouseList } from "@/api/ecw/warehouse"
import { getDictDatas, DICT_TYPE } from '@/utils/dict'; import { DICT_TYPE } from '@/utils/dict';
import costForm from './costForm.vue' import costForm from './costForm.vue'
import regError from './regError.vue'
export default { export default {
name: "box", name: "box",
components: { components: {
costForm costForm,
regError
}, },
data() { data() {
return { return {
...@@ -266,7 +289,7 @@ ...@@ -266,7 +289,7 @@
created() { created() {
this.transportTypes = this.transportTypes.filter(item => item.value == '1' || item.value == '2'); this.transportTypes = this.transportTypes.filter(item => item.value == '1' || item.value == '2');
getWarehouseList().then(res => this.warehouseList = res.data); getWarehouseList().then(res => this.warehouseList = res.data);
getCabinetPage(null).then(response => { getCabinetPage(null).then(response => {
...@@ -275,7 +298,6 @@ ...@@ -275,7 +298,6 @@
this.getList(); this.getList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -390,13 +412,6 @@ ...@@ -390,13 +412,6 @@
closeDialog() { closeDialog() {
this.open = false; this.open = false;
}, },
/* 费用登记 */
createCost(row) {
this.title = '费用登记'
this.dialogType = 'cost';
this.open = true;
this.currRow = row;
},
/** 查看按钮操作 */ /** 查看按钮操作 */
handleCommand(row, command) { handleCommand(row, command) {
switch (command) { switch (command) {
...@@ -413,10 +428,53 @@ ...@@ -413,10 +428,53 @@
break; break;
case 'cost': case 'cost':
this.createCost(row); this.title = '费用登记'
this.dialogType = 'cost';
this.open = true;
this.currRow = row;
break;
case 'error':
this.title = '异常登记'
this.dialogType = 'error';
this.open = true;
this.currRow = row;
break;
case 'detail':
this.$router.push('/boxSea/query/' + row.id)
break; break;
} }
}, },
} }
}; };
</script> </script>
<style lang="scss">
// 海运操作统一弹窗样式
.shippingSea-dialog {
// 页面内元素弹窗form控件宽度设置
.el-form-item__content {
> div:not(.el-input-number) {
width: 100%;
}
}
.operate-button {
text-align: center;
}
.two-element-formItem {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.two-element {
.el-form-item__content {
display: flex;
> :last-child {
margin-left: 10px;
}
}
}
}
</style>
This diff is collapsed.
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.abnStartTime" value-format="yyyy-MM-dd"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.abnStartTime" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.abnEndTime" value-format="yyyy-MM-dd"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.abnEndTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="是否更新订单状态"> <el-form-item label="是否更新订单状态">
<el-radio-group v-model="errorObj.orderStatus"> <el-radio-group v-model="errorObj.orderStatus">
<el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio> <el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
...@@ -65,7 +66,7 @@ export default { ...@@ -65,7 +66,7 @@ export default {
}, },
created() { created() {
const { currNode } = this.$attrs; const { currNode } = this.$attrs;
this.errorObj = { opStep: currNode.dataKey }; this.errorObj = { opStep: currNode?.dataKey ?? undefined };
}, },
methods: { methods: {
/** 提交 */ /** 提交 */
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<section class="table-goodList"> <section class="table-goodList">
<div>合计:{{calcSum(row.goodsList)}}</div> <div>合计:{{calcSum(row.goodsList)}}</div>
<div v-for="(item, index) in row.goodsList" :key="index" class="goodList-div"> <div v-for="(item, index) in row.goodsList" :key="index" class="goodList-div">
{{item.volume}}{{item.weight}}kg {{getTotlContent(item,['volume','weight'])}}
</div> </div>
</section> </section>
</template> </template>
...@@ -90,7 +90,11 @@ ...@@ -90,7 +90,11 @@
<script> <script>
import { approvalDetail } from "@/api/ecw/box"; import { approvalDetail } from "@/api/ecw/box";
import { getSeaStatus, getStatusName } from "./shippingSea/utils"; import {
getSeaStatus,
getStatusName,
getTotlContent,
} from "./shippingSea/utils";
import { getCabinetPage } from "@/api/ecw/cabinet"; import { getCabinetPage } from "@/api/ecw/cabinet";
import { getChannelList } from "@/api/ecw/channel"; import { getChannelList } from "@/api/ecw/channel";
...@@ -123,6 +127,7 @@ export default { ...@@ -123,6 +127,7 @@ export default {
getChannelList().then((res) => (this.channelList = res.data)); getChannelList().then((res) => (this.channelList = res.data));
}, },
methods: { methods: {
getTotlContent,
/* 获取详情 */ /* 获取详情 */
getApprovalDetail(processId) { getApprovalDetail(processId) {
approvalDetail({ approvalId: processId }).then((res) => { approvalDetail({ approvalId: processId }).then((res) => {
...@@ -144,7 +149,11 @@ export default { ...@@ -144,7 +149,11 @@ export default {
}, },
/* 打开订单列表 */ /* 打开订单列表 */
showOrder() { showOrder() {
this.$set(this.dialogConfig, "title", `${this.boxBackVO.selfNo} 订单列表`); this.$set(
this.dialogConfig,
"title",
`${this.boxBackVO.selfNo} 订单列表`
);
this.$set(this.dialogConfig, "visible", true); this.$set(this.dialogConfig, "visible", true);
}, },
/* 合计 */ /* 合计 */
...@@ -190,9 +199,7 @@ export default { ...@@ -190,9 +199,7 @@ export default {
/* 体积重量 */ /* 体积重量 */
getVolumeWeight() { getVolumeWeight() {
return (total) => { return (total) => {
return `${total?.num ?? 0} ${total?.volume ?? 0}m³ ${ return this.getTotlContent(total);
total?.weight ?? 0
}kg`;
}; };
}, },
/* 是否显示卸柜箱数 */ /* 是否显示卸柜箱数 */
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</template> </template>
<script> <script>
import regError from "./regError"; import regError from "../../regError";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { arrivalCreate, serviceMsg } from "@/api/ecw/boxSea"; import { arrivalCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils"; import { formatDateStr } from "../utils";
......
...@@ -11,9 +11,7 @@ ...@@ -11,9 +11,7 @@
</div> </div>
<div> <div>
<template v-if="item.secStatistics"> <template v-if="item.secStatistics">
<p>{{item.secStatistics.num}}</p> {{getTotlContent(item.secStatistics)}}
<p>{{item.secStatistics.volume}}</p>
<p>{{item.secStatistics.weight}}Kg</p>
</template> </template>
</div> </div>
</el-row> </el-row>
...@@ -54,29 +52,29 @@ ...@@ -54,29 +52,29 @@
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="item.productRecord" /> <dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="item.productRecord" />
</p> </p>
<p>其他:<span>{{item.num}}</span><span>{{item.volume}}</span><span>{{item.weight}}Kg</span></p> <p>其他:{{getTotlContent(item)}}</p>
</div> </div>
</section> </section>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划箱数" align="center" prop="num"> <el-table-column label="计划箱数" align="center" prop="num">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.num }} {{getTotlContent(scope.row,['num'])}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实装箱数" align="center" prop="installNum"> <el-table-column label="实装箱数" align="center" prop="installNum">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.installNum }} {{ scope.row.installNum }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="体积" align="center" prop="volume"> <el-table-column label="体积" align="center" prop="volume">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.volume }} {{getTotlContent(scope.row,['volume'])}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重量" align="center" prop="weight"> <el-table-column label="重量" align="center" prop="weight">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.weight }} Kg {{getTotlContent(scope.row,['weight'])}}
</template> </template>
</el-table-column> </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">
...@@ -97,14 +95,15 @@ ...@@ -97,14 +95,15 @@
<el-col :span="6" class="totle-info"> <el-col :span="6" class="totle-info">
<div class="count-info"> <div class="count-info">
<p>总计: <p>总计:
<!-- <span>{{sumData.count.num}}箱</span><span>{{sumData.count.volume}}m³</span><span>{{sumData.count.weight}}Kg</span> -->111 无返回
<!-- <span>{{sumData.count.num}}箱</span><span>{{sumData.count.volume}}m³</span><span>{{sumData.count.weight}}Kg</span> -->
</p> </p>
</div> </div>
<div> <div>
<p>容量:</p> <p>容量:</p>
<p>111</p> <p>无返回</p>
</div> </div>
<div>已装0</div> <div>已装 无返回 </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -204,6 +203,7 @@ import { ...@@ -204,6 +203,7 @@ import {
boxUpdate, boxUpdate,
approvalCreate, approvalCreate,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { getTotlContent } from "../../utils";
/** /**
* 开始装柜 * 开始装柜
...@@ -268,6 +268,7 @@ export default { ...@@ -268,6 +268,7 @@ export default {
}); });
}, },
methods: { methods: {
getTotlContent,
/* 装柜部分列表 */ /* 装柜部分列表 */
getLoadSecGoodsList() { getLoadSecGoodsList() {
loadSecGoodsList({ shipmentId: this.shipmentObj.id }).then((res) => { loadSecGoodsList({ shipmentId: this.shipmentObj.id }).then((res) => {
...@@ -275,7 +276,7 @@ export default { ...@@ -275,7 +276,7 @@ export default {
this.listData = data.map((item, index) => { this.listData = data.map((item, index) => {
return { return {
...item, ...item,
title: `第 ${++index} 部分`, title: `第${++index}部分`,
}; };
}); });
if (this.listData.length) { if (this.listData.length) {
......
...@@ -28,9 +28,7 @@ ...@@ -28,9 +28,7 @@
</el-collapse-transition> </el-collapse-transition>
<div class="part-secGoog"> <div class="part-secGoog">
<template> <template>
<p>{{item.secStatistics ? item.secStatistics.num : 0}}</p> {{getTotlContent(item.secStatistics)}}
<p>{{item.secStatistics ? item.secStatistics.volume : 0}}</p>
<p>{{item.secStatistics ? item.secStatistics.weight : 0}}Kg</p>
</template> </template>
</div> </div>
</el-row> </el-row>
...@@ -95,12 +93,12 @@ ...@@ -95,12 +93,12 @@
<el-table-column label="箱数" align="center" prop="num" width="120" /> <el-table-column label="箱数" align="center" prop="num" width="120" />
<el-table-column label="体积" align="center" prop="volume" width="120"> <el-table-column label="体积" align="center" prop="volume" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="scope.row.volume">{{scope.row.volume}}</p> <p v-if="scope.row.volume">{{getTotlContent(scope.row,['volume'])}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重量" align="center" prop="weight" width="120"> <el-table-column label="重量" align="center" prop="weight" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="scope.row.weight">{{scope.row.weight}}kg</p> <p v-if="scope.row.weight">{{getTotlContent(scope.row,['weight'])}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="预装柜" align="center" prop="" width="120"> <el-table-column label="预装柜" align="center" prop="" width="120">
...@@ -151,7 +149,7 @@ import { ...@@ -151,7 +149,7 @@ import {
createGoods, createGoods,
remove, remove,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { formatDate } from "../../utils"; import { formatDate, getTotlContent } from "../../utils";
/** /**
* 补单 * 补单
*/ */
...@@ -197,7 +195,7 @@ export default { ...@@ -197,7 +195,7 @@ export default {
} }
return { return {
...item, ...item,
title: `第 ${++index} 部分`, title: `第${++index}部分`,
}; };
}); });
...@@ -324,6 +322,7 @@ export default { ...@@ -324,6 +322,7 @@ export default {
.catch((_) => {}); .catch((_) => {});
}, },
formatDate, formatDate,
getTotlContent,
}, },
computed: { computed: {
/** 目的地 */ /** 目的地 */
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</template> </template>
<script> <script>
import regError from "./regError"; import regError from "../../regError";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { clearanceCreate, serviceMsg } from "@/api/ecw/boxSea"; import { clearanceCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils"; import { formatDateStr } from "../utils";
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</template> </template>
<script> <script>
import regError from "./regError"; import regError from "../../regError";
import { shippingCreate, serviceMsg } from "@/api/ecw/boxSea"; import { shippingCreate, serviceMsg } from "@/api/ecw/boxSea";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { formatDateStr } from "../utils"; import { formatDateStr } from "../utils";
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="目的地" prop="destWarehouseIdList"> <el-form-item label="目的地" prop="destWarehouseIdList">
<el-select v-model="queryParams.destWarehouseIdList" placeholder="请选择目的地" multiple> <el-select v-model="queryParams.destWarehouseIdList" placeholder="请选择目的地" multiple clearable>
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -108,11 +108,7 @@ ...@@ -108,11 +108,7 @@
<el-row class="preinstall-title"> <el-row class="preinstall-title">
<div class="pre-part-info"> <div class="pre-part-info">
<p>{{index+1}}部分</p> <p>{{index+1}}部分</p>
<p> <p>{{getTotlContent(part.secStatistics)}}</p>
<span>{{part.secStatistics ? part.secStatistics.num : 0}}</span>
<span>{{part.secStatistics ? part.secStatistics.volume : 0}}</span>
<span>{{part.secStatistics ? part.secStatistics.weight : 0}}kg</span>
</p>
</div> </div>
<div class="table-button"> <div class="table-button">
<el-button type="danger" size="small" @click="deletePart(part)">删除部分</el-button> <el-button type="danger" size="small" @click="deletePart(part)">删除部分</el-button>
...@@ -131,8 +127,8 @@ ...@@ -131,8 +127,8 @@
<el-table-column label="箱数" align="center" prop="num" /> <el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="体积/重量/重货比" align="center" width="140" prop="volumeWeight"> <el-table-column label="体积/重量/重货比" align="center" width="140" prop="volumeWeight">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="scope.row.volume">{{scope.row.volume}}</p> <p v-if="scope.row.volume">{{getTotlContent(scope.row,['volume'])}}</p>
<p v-if="scope.row.weight">{{scope.row.weight}}kg</p> <p v-if="scope.row.weight">{{getTotlContent(scope.row,['weight'])}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="报关方式" align="center" prop="customsType" width="120"> <el-table-column label="报关方式" align="center" prop="customsType" width="120">
...@@ -169,15 +165,15 @@ ...@@ -169,15 +165,15 @@
<div class="preinstall-title preinstalled"> <div class="preinstall-title preinstalled">
<div class="red-label"> <div class="red-label">
<p>筛选后待预装数量:</p> <p>筛选后待预装数量:</p>
<p>{{unloadStatistics.num}}箱</p> <p>{{getTotlContent(unloadStatistics,['num'])}}</p>
</div> </div>
<div class="red-label"> <div class="red-label">
<p>方数:</p> <p>方数:</p>
<p>{{unloadStatistics.volume}}m³</p> <p>{{getTotlContent(unloadStatistics,['volume'])}}</p>
</div> </div>
<div class="red-label"> <div class="red-label">
<p>重量:</p> <p>重量:</p>
<p>{{unloadStatistics.weight}}kg</p> <p>{{getTotlContent(unloadStatistics,['weight'])}}</p>
</div> </div>
</div> </div>
</el-row> </el-row>
...@@ -225,8 +221,8 @@ ...@@ -225,8 +221,8 @@
<el-table-column label="箱数" align="center" prop="num" /> <el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="体积/重量" align="center" prop="volumeWeight"> <el-table-column label="体积/重量" align="center" prop="volumeWeight">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="scope.row.volume">{{scope.row.volume}}</p> <p v-if="scope.row.volume">{{getTotlContent(scope.row,['volume'])}}</p>
<p v-if="scope.row.weight">{{scope.row.weight}}kg</p> <p v-if="scope.row.weight">{{getTotlContent(scope.row,['weight'])}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="报关方式" align="center" prop=""> <el-table-column label="报关方式" align="center" prop="">
...@@ -284,7 +280,8 @@ import { ...@@ -284,7 +280,8 @@ import {
approvalCreate, approvalCreate,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
import { formatDate } from "../utils"; import { formatDate, getTotlContent } from "../utils";
import dayjs from "dayjs";
/** /**
* 预装 * 预装
...@@ -354,6 +351,7 @@ export default { ...@@ -354,6 +351,7 @@ export default {
}, },
methods: { methods: {
formatDate, formatDate,
getTotlContent,
/* 获取城市 */ /* 获取城市 */
importCityName(id) { importCityName(id) {
var arr = this.$attrs.warehouseList.filter((item) => item.id == id); var arr = this.$attrs.warehouseList.filter((item) => item.id == id);
...@@ -370,7 +368,6 @@ export default { ...@@ -370,7 +368,6 @@ export default {
let params = this.getParams(); let params = this.getParams();
// 已预装单号 // 已预装单号
params.orderNo = params.preOrderNo; params.orderNo = params.preOrderNo;
delete params.preOrderNo;
params.shipmentId = this.shipmentObj.id; params.shipmentId = this.shipmentObj.id;
secGoodsList(params).then((res) => { secGoodsList(params).then((res) => {
this.preList = res.data; this.preList = res.data;
...@@ -384,7 +381,6 @@ export default { ...@@ -384,7 +381,6 @@ export default {
let params = this.getParams(); let params = this.getParams();
// 订单号 // 订单号
params.orderNo = params.toBePreOrderNo; params.orderNo = params.toBePreOrderNo;
delete params.toBePreOrderNo;
preloadPage({ ...params, ...this.pageParam }).then((res) => { preloadPage({ ...params, ...this.pageParam }).then((res) => {
const { data } = res; const { data } = res;
this.toBePreList = data.dataList?.list ?? []; this.toBePreList = data.dataList?.list ?? [];
...@@ -438,7 +434,10 @@ export default { ...@@ -438,7 +434,10 @@ export default {
if (column.property === "volumeWeight") { if (column.property === "volumeWeight") {
const volume = this.calcSum("volume", data); const volume = this.calcSum("volume", data);
const weight = this.calcSum("weight", data); const weight = this.calcSum("weight", data);
sums[index] = `${volume ?? 0}m³ ${weight ?? 0}kg`; sums[index] = getTotlContent({ volume, weight }, [
"volume",
"weight",
]);
} }
}); });
...@@ -540,11 +539,14 @@ export default { ...@@ -540,11 +539,14 @@ export default {
}, },
getParams() { getParams() {
const { rucangtime = [] } = this.queryParams; const { rucangtime = [] } = this.queryParams;
delete this.queryParams.rucangtime;
return { return {
...this.queryParams, ...this.queryParams,
rucangTimeStart: rucangtime[0], rucangTimeStart: rucangtime[0]
rucangTimeEnd: rucangtime[1], ? dayjs(rucangtime[0]).format("YYYY-MM-DD 00:00:00")
: rucangtime[0],
rucangTimeEnd: rucangtime[1]
? dayjs(rucangtime[1]).format("YYYY-MM-DD 23:59:59")
: rucangtime[1],
}; };
}, },
}, },
......
...@@ -859,11 +859,24 @@ function formatDateStr(obj, keys, format = "YYYY-MM-DD") { ...@@ -859,11 +859,24 @@ function formatDateStr(obj, keys, format = "YYYY-MM-DD") {
return obj; return obj;
} }
/**
* 格式化日期
*
* @param {*} date
* @param {string} [format="YYYY-MM-DD"]
* @return {*}
*/
function formatDate(date, format = "YYYY-MM-DD") { function formatDate(date, format = "YYYY-MM-DD") {
if (!date) return date; if (!date) return date;
return dayjs(date).format(format); return dayjs(date).format(format);
} }
/**
* 获取海运流程状态
*
* @param {*} val
* @return {*}
*/
function getSeaStatus(val) { function getSeaStatus(val) {
let currNodeStatus = 11, let currNodeStatus = 11,
isBreak = false, isBreak = false,
...@@ -896,6 +909,29 @@ function getSeaStatus(val) { ...@@ -896,6 +909,29 @@ function getSeaStatus(val) {
return currNodeStatus; return currNodeStatus;
} }
/**
* 组装统计信息文字
*
* @param {*} total
* @param {string} [keys=["num", "volume", "weight"]]
* @return {*}
*/
function getTotlContent(total, keys = ["num", "volume", "weight"]) {
let content = [];
for (const key of keys) {
if (key === "num") {
content.push(`${total?.num ?? 0}`);
}
if (key === "volume") {
content.push(`${total?.volume ?? 0}m³`);
}
if (key === "weight") {
content.push(`${total?.weight ?? 0}kg`);
}
}
return content.join(" ");
}
export const fileTypes = [ export const fileTypes = [
"doc", "doc",
"xls", "xls",
...@@ -917,4 +953,5 @@ export { ...@@ -917,4 +953,5 @@ export {
formatDateStr, formatDateStr,
formatNumberString, formatNumberString,
formatDate, formatDate,
getTotlContent,
}; };
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