Commit 97a3043f authored by huhaiqing's avatar huhaiqing

装柜功能开发

parent e32d2198
......@@ -443,6 +443,82 @@ export function loadSecGoodsList(params) {
});
}
/**
* 订单装箱编号列表
*
* @export
* @param {*} data
* @return {*}
*/
export function orderTagList(data) {
return request({
url: "/ecw/box-load-info/orderTagList",
method: "post",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
data: jsonToFormData(data),
});
}
/**
* 批量装柜
*
* @export
* @param {*} data
* @return {*}
*/
export function batchCreate(data) {
return request({
url: "/ecw/box-load-info/batchCreate",
method: "post",
data,
});
}
/**
* 批量删除已装柜标签
*
* @export
* @param {*} data
* @return {*}
*/
export function batchDelete(data) {
return request({
url: "/ecw/box-load-info/batchDelete",
method: "post",
data,
});
}
/**
* 移出
*
* @export
* @param {*} data
* @return {*}
*/
export function remove(data) {
return request({
url: "/ecw/box-load-info/remove",
method: "post",
data,
});
}
/**
* 修改柜信息
*
* @export
* @param {*} data
* @return {*}
*/
export function boxUpdate(data) {
return request({
url: "/ecw/box-load-info/boxUpdate",
method: "post",
data,
});
}
/***************************** 装柜 end **********************************/
/**
......
......@@ -75,26 +75,22 @@ export default {
onSubmit(operateType) {
this.$refs["cabinetForm"].validate((valid) => {
if (valid) {
if (operateType === 2) {
const { currNode, shipmentObj } = this.$attrs;
const status = shipmentObj[currNode.keyName];
if (status !== 46) {
this.$message.error("请先进行装柜->审批->确认封柜");
return;
}
}
cabinetCreate({
shipmentId: this.$attrs.shipmentObj.id,
...this.cabinetObj,
operateType,
}).then((res) => {
if (operateType === 2) {
approvalCreate({
shipmentId: this.$attrs.shipmentObj.id,
approvalStatus: 0,
approvalType: 2,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
} else {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
}
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
......
......@@ -4,7 +4,7 @@
<el-row class="content-area">
<!-- 左侧 -->
<el-col :span="4" class="left-area">
<el-col :span="6" class="left-area">
<el-row v-for="item in listData" :key="item.id" class="title-info" :class="item.id === tableData.id ? 'selected' : ''">
<div @click="partClick(item)">
<p>{{item.title}}</p>
......@@ -20,27 +20,29 @@
</el-col>
<!-- 右侧 -->
<el-col :span="20" class="right-area">
<el-col :span="18" class="right-area">
<!-- 操作 -->
<el-row class="table-title">
<div>当前装柜:{{tableData.title}}</div>
<div>
<el-input v-model="qrCode" placeholder="请输入二维码/条码编号"></el-input>
<el-button type="primary">确定</el-button>
<el-button type="primary" @click="handlerClick('batchInput','批量输入')">批量输入</el-button>
<el-button type="primary" @click="handlerClick('correction','装柜纠错')">装柜纠错</el-button>
<el-button type="primary" @click="handlerClick('correctionOrder','批量装柜纠错')">批量装柜纠错</el-button>
<template v-if="!isUnderReview">
<el-input v-model="qrCode" placeholder="请输入二维码/条码编号" clearable></el-input>
<el-button type="primary" @click="handlerBatchCreate('single')">确定</el-button>
<el-button type="primary" @click="handlerClick('batchInput','批量输入')">批量输入</el-button>
<el-button type="primary" @click="handlerClick('correction','装柜纠错')">装柜纠错</el-button>
<el-button type="primary" @click="handlerClick('correctionOrder','批量装柜纠错')">批量装柜纠错</el-button>
</template>
</div>
</el-row>
<!-- 表格 -->
<el-row class="table-content">
<el-table v-loading="loading" :data="tableData.sectionOrderList">
<el-table :data="tableData.sectionOrderList">
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column label="订单号" align="center" prop="orderId">
<el-table-column label="订单号" align="center" prop="orderNo">
<template slot-scope="scope">
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.orderId }}</a>
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.orderNo }}</a>
</template>
</el-table-column>
<el-table-column label="货物信息" align="center" prop="goodsList">
......@@ -48,9 +50,9 @@
<section class="table-goodList">
<div v-for="item in scope.row.goodsList" :key="item.orderId" class="goodList-div">
<p>品名:{{item.prodTitleZh}}</p>
<p>
品牌:【
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="item.productRecord" />
<p>品牌:【
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="item.productRecord" />
</p>
<p>其他:<span>{{item.num}}</span><span>{{item.volume}}</span><span>{{item.weight}}Kg</span></p>
</div>
......@@ -79,7 +81,8 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="small">移出</el-button>
<el-button type="text" size="small" @click="moveOut(scope.row)" v-if="!isUnderReview">移出</el-button>
<el-button type="text" size="small" disabled>拆单</el-button>
</template>
</el-table-column>
</el-table>
......@@ -93,7 +96,9 @@
<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>总计:
<!-- <span>{{sumData.count.num}}箱</span><span>{{sumData.count.volume}}m³</span><span>{{sumData.count.weight}}Kg</span> -->111
</p>
</div>
<div>
<p>容量:</p>
......@@ -105,41 +110,45 @@
<!-- 操作 -->
<el-row class="button-area">
<el-button type="primary" @click="handlerClick('supplementOrder','补单')">补单</el-button>
<el-button type="primary">申请封柜</el-button>
<el-button type="primary" @click="handlerClick('modifyCabinet','修改柜信息')">修改柜信息</el-button>
<el-button type="primary">封柜审核中</el-button>
<el-button type="primary" @click="handlerClick('supplementOrder','补单')" v-if="!isUnderReview">补单</el-button>
<el-button type="primary" v-if="!isUnderReview" @click="applyCloseCabinet">申请封柜</el-button>
<el-button type="primary" @click="handlerClick('modifyCabinet','修改柜信息')" v-if="!isUnderReview">修改柜信息</el-button>
<el-button type="primary" v-if="isUnderReview">封柜审核中</el-button>
</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 destroy-on-close>
<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="[]">
<el-table-column label="已装" align="center" prop="selfNo" />
<el-table-column label="未装" align="center" prop="cubNo" />
</el-table>
<div style="display: flex;">
<el-table :data="orderList.loadList">
<el-table-column label="已装" align="center" prop="loadTag" />
</el-table>
<el-table :data="orderList.unLoadList">
<el-table-column label="未装" align="center" prop="unloadTag" />
</el-table>
</div>
</template>
<!-- 补单 -->
<template v-if="dialogConfig.type === 'supplementOrder'">
<supplementOrder />
</template>
<supplementOrder v-if="dialogConfig.type === 'supplementOrder' && dialogConfig.dialogVisible" v-bind="$attrs" :shipmentObj="shipmentObj" @supplementFinish="supplementFinish" />
<!-- 修改柜信息 -->
<template v-if="dialogConfig.type === 'modifyCabinet'">
<template v-if="dialogConfig.type === 'modifyCabinet' && dialogConfig.dialogVisible">
<el-form ref="modifyForm" :rules="rules" :model="modifyCabinetObj" label-width="80px">
<el-form-item label="起运仓库" prop="warehouse">
<el-select v-model="modifyCabinetObj.warehouse" placeholder="请选择起运仓库">
<el-form-item label="起运仓库" prop="startWarehouseId">
<el-select v-model="modifyCabinetObj.startWarehouseId" placeholder="请选择仓库" filterable>
<el-option v-for="warehouse in $attrs.warehouseList" :key="warehouse.id" :label="warehouse.titleZh" :value="warehouse.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="预计时间" prop="estimatedTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="modifyCabinetObj.estimatedTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="选择柜型" prop="cabinetType">
<el-select v-model="modifyCabinetObj.cabinetType" placeholder="请选择柜型">
<el-form-item label="选择柜型" prop="cabinetId">
<el-select v-model="modifyCabinetObj.cabinetId" placeholder="请选择柜型">
<el-option v-for="item in cabinetList" :label="item.name" :value="item.name" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="柜号">
<el-input v-model="modifyCabinetObj.cabinetNo" placeholder="请输入柜号" clearable />
<el-input v-model="modifyCabinetObj.cubNo" placeholder="请输入柜号" clearable />
</el-form-item>
</el-form>
<el-row class="operate-button">
......@@ -148,7 +157,7 @@
</el-row>
</template>
<!-- 装柜纠错 -->
<template v-if=" dialogConfig.type === 'correction'">
<template v-if="dialogConfig.type === 'correction' && dialogConfig.dialogVisible">
<el-form ref="correctionForm" :rules="rules" :model="correctionObj" label-position="top">
<el-form-item label="装柜纠错(二维码/条形码编号)" prop="qrCode">
<el-input v-model="correctionObj.qrCode" placeholder="请输入二维码/条形码编号" clearable />
......@@ -160,10 +169,10 @@
</el-row>
</template>
<!-- 批量装柜纠错(订单号) -->
<template v-if=" dialogConfig.type === 'correctionOrder'">
<template v-if=" dialogConfig.type === 'correctionOrder' && dialogConfig.dialogVisible">
<el-form ref="orderForm" :rules="rules" :model="orderObj" label-position="top">
<el-form-item label="装柜纠错(订单号)" prop="orderNo">
<el-input v-model="orderObj.orderNo" placeholder="请输入订单号" clearable />
<el-input type="textarea" :rows="3" v-model="orderObj.orderNo" placeholder="请输入,多个以逗号分隔" clearable />
</el-form-item>
</el-form>
<el-row class="operate-button">
......@@ -172,7 +181,7 @@
</el-row>
</template>
<!-- 装柜批量输入 -->
<template v-if=" dialogConfig.type === 'batchInput'">
<template v-if=" dialogConfig.type === 'batchInput' && dialogConfig.dialogVisible">
<el-form ref="batchForm" :rules="rules" :model="batchObj" label-position="top">
<el-form-item label="" prop="qrCode">
<el-input type="textarea" :rows="3" v-model="batchObj.qrCode" placeholder="请输入,多个以逗号分隔" clearable />
......@@ -189,7 +198,17 @@
<script>
import supplementOrder from "./supplementOrder.vue";
import { loadSecGoodsList } from "@/api/ecw/boxSea";
import { getCabinetPage } from "@/api/ecw/cabinet";
import {
loadSecGoodsList,
orderTagList,
batchCreate,
batchDelete,
remove,
serviceMsg,
boxUpdate,
approvalCreate,
} from "@/api/ecw/boxSea";
/**
* 开始装柜
......@@ -205,8 +224,6 @@ export default {
},
data() {
return {
// laoding
loading: false,
// 表格数据
listData: [],
// 表格数据
......@@ -223,6 +240,10 @@ export default {
type: "",
fullscreen: false,
},
// 已装/未装
orderList: {},
// 柜型
cabinetList: [],
// 二维码/条码编号
qrCode: "",
// 批量输入
......@@ -235,9 +256,11 @@ export default {
modifyCabinetObj: {},
// 修改柜信息校验
rules: {
warehouse: [{ required: true, message: "必填", trigger: "change" }],
startWarehouseId: [
{ required: true, message: "必填", trigger: "change" },
],
estimatedTime: [{ required: true, message: "必填", trigger: "change" }],
cabinetType: [{ required: true, message: "必填", trigger: "change" }],
cabinetId: [{ required: true, message: "必填", trigger: "change" }],
qrCode: [{ required: true, message: "必填", trigger: "change" }],
orderNo: [{ required: true, message: "必填", trigger: "change" }],
},
......@@ -245,6 +268,10 @@ export default {
},
created() {
this.getLoadSecGoodsList();
// 柜型
getCabinetPage(null).then((response) => {
this.cabinetList = response.data.list;
});
},
methods: {
/* 装柜部分列表 */
......@@ -254,7 +281,7 @@ export default {
this.listData = data.map((item, index) => {
return {
...item,
title: `第${++index}部分`,
title: `第 ${++index} 部分`,
};
});
if (this.listData.length) {
......@@ -268,6 +295,17 @@ export default {
},
/** 表格订单号点击 */
orderClick(row) {
orderTagList({ orderId: row.orderId }).then((res) => {
const { data = [] } = res;
this.orderList = {
loadList: data.loadList.map((item) => ({
loadTag: item,
})),
unLoadList: data.unLoadList.map((item) => ({
unloadTag: item,
})),
};
});
this.shwoDialog({
type: "orderTable",
title: row.selfNo,
......@@ -279,12 +317,27 @@ export default {
this.$set(this.dialogConfig, "type", config.type);
switch (config.type) {
case "orderTable":
case "modifyCabinet":
this.$set(this.dialogConfig, "fullscreen", false);
break;
case "supplementOrder":
this.$set(this.dialogConfig, "fullscreen", true);
break;
case "batchInput":
this.$set(this.dialogConfig, "fullscreen", false);
this.batchObj = {};
break;
case "correction":
this.$set(this.dialogConfig, "fullscreen", false);
this.correctionObj = {};
break;
case "correctionOrder":
this.$set(this.dialogConfig, "fullscreen", false);
this.orderObj = {};
break;
case "modifyCabinet":
this.$set(this.dialogConfig, "fullscreen", false);
this.modifyCabinetObj = {};
break;
}
this.$set(this.dialogConfig, "dialogVisible", true);
},
......@@ -296,15 +349,100 @@ export default {
onSubmit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert("submit!");
if (formName === "batchForm") {
this.handlerBatchCreate("batch");
}
if (formName === "correctionForm") {
this.handlerBatchDelete({
orderNumCode: this.correctionObj.qrCode,
});
}
if (formName === "orderForm") {
this.handlerBatchDelete({ orderNo: this.orderObj.orderNo });
}
if (formName === "modifyForm") {
this.modifyBoxUpdate();
}
}
});
},
/* 部分点击 */
partClick(item) {
console.log(item);
this.tableData = item;
},
/* 装柜 */
handlerBatchCreate(type) {
let params = {
shipmentId: this.shipmentObj.id,
secId: this.tableData.id,
};
if (type === "single") {
if (!this.qrCode) {
this.$message.warning("请输入二维码/条码编号");
return;
}
params.orderNumCode = this.qrCode;
} else {
params.orderNo = this.batchObj.qrCode;
}
batchCreate(params).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
},
/* 删除已装柜 */
handlerBatchDelete(params) {
params = {
shipmentId: this.shipmentObj.id,
secId: this.tableData.id,
...params,
};
batchDelete(params).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
},
/* 移出 */
moveOut(row) {
let params = {
shipmentId: this.shipmentObj.id,
secId: this.tableData.id,
orderId: row.orderId,
};
remove(params).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
},
/* 修改柜信息 */
modifyBoxUpdate() {
let params = {
shipmentId: this.shipmentObj.id,
...this.modifyCabinetObj,
};
boxUpdate(params).then((res) => {
serviceMsg(res, this);
});
},
/* 补单完成 */
supplementFinish() {
this.closeDialog();
this.getLoadSecGoodsList();
},
/* 申请封柜 */
applyCloseCabinet() {
approvalCreate({
shipmentId: this.shipmentObj.id,
approvalStatus: 0,
approvalType: 2,
}).then((res) => {
serviceMsg(res, this);
});
},
},
watch: {
listData(val) {
......@@ -328,6 +466,13 @@ export default {
this.$set(this.sumData, "count", count);
},
},
computed: {
/* 是否审核中 */
isUnderReview() {
const { currNode } = this.$attrs;
this.shipmentObj[currNode.keyName] === 44 ? true : false;
},
},
};
</script>
......@@ -358,6 +503,7 @@ export default {
background-color: #f2f2f2;
line-height: 30px;
text-align: center;
cursor: pointer;
}
> :last-child {
display: flex;
......
......@@ -7,22 +7,34 @@
<!-- 左侧 -->
<el-col :span="6" class="left-area">
<el-row>
<el-button type="primary">新增</el-button>
<el-button type="primary">删除</el-button>
<el-button type="primary" @click="addPart">新增</el-button>
<el-button type="danger" @click="deletePart">删除</el-button>
</el-row>
<el-row v-for="item in testData" :key="item.key" class="title-info">
<div>
<p>{{item.title}}</p>
</div>
<div>
<p>111</p>
<p>111</p>
<p>111</p>
<div>
<i class="el-icon-delete"></i>
<el-scrollbar style="height:calc(100% - 40px)">
<el-row v-for="item in partList" :key="item.id" class="title-info" :class="item.id === partData.id ? 'selected' : ''">
<div @click="partClick(item)">
<p>{{item.title}}</p>
</div>
</div>
</el-row>
<el-collapse-transition>
<div v-if="item.fold === false ? true : false">
<div v-for="(secGoog, index) in item.sectionGoodsList" :key="index" class="part-secGoog">
<p>{{secGoog.orderNo}}</p>
<p>{{secGoog.prodTitleZh}}</p>
<div>
<i class="el-icon-delete" @click="deleteOrder(secGoog)"></i>
</div>
</div>
</div>
</el-collapse-transition>
<div class="part-secGoog">
<template>
<p>{{item.secStatistics ? item.secStatistics.num : 0}}</p>
<p>{{item.secStatistics ? item.secStatistics.volume : 0}}</p>
<p>{{item.secStatistics ? item.secStatistics.weight : 0}}Kg</p>
</template>
</div>
</el-row>
</el-scrollbar>
</el-col>
<!-- 右侧 -->
......@@ -30,16 +42,19 @@
<el-row class="right-title">
<div>货物筛选</div>
<div>当前装柜:第一部分</div>
<div>可预装方数:111m³,重量:22KG</div>
<div>当前装柜:{{partData.title}}</div>
<div>可预装方数:无返回m³,重量:无返回Kg</div>
</el-row>
<!-- 搜索工作栏 -->
<el-row>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="始发地">111</el-form-item>
<el-form-item label="始发地">
<p>{{importCityName(queryParams.startWarehouseId)}}</p>
</el-form-item>
<el-form-item label="目的地" prop="destination">
<el-select v-model="queryParams.destination" placeholder="请选择目的地">
<el-select v-model="queryParams.destWarehouseIdList" placeholder="请选择目的地" multiple>
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="订单号" prop="orderNo">
......@@ -47,41 +62,61 @@
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search">搜索</el-button>
<el-button type="primary" icon="el-icon-search" @click="queryAllData">搜索</el-button>
</el-form-item>
</el-form>
</el-row>
<!-- 表格 -->
<el-row>
<el-row class="table-title">
<div>EC1111111</div>
<div>发往:xxxxxxxxxx</div>
<div>我司全代</div>
<div>入仓时间:1111111</div>
<div>
<div>[全部预装]</div>
<div>[收起]</div>
</div>
<el-scrollbar style="height:calc(100% - 124px)">
<el-row v-for="(item, index) in toBePreList" :key="index" class="toBePre-table">
<el-row class="table-title">
<div>{{item.orderNo}}</div>
<div>发往:{{item.destWarehouseName}}</div>
<div>
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" />
</div>
<div>入仓时间:{{item.rucangtime}}</div>
<div>
<el-button type="text" @click="handleGoods('all', item)">[全部预装]</el-button>
<el-button type="text" @click="foldTable(index, item)">[{{item.fold ? '展开' : '收起'}}]</el-button>
</div>
</el-row>
<el-collapse-transition>
<div v-show="!item.fold">
<el-table :data="item.orderItemList" border>
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column label="品名" align="center" prop="prodTitleZh" min-width="500" />
<el-table-column label="品牌" align="center" prop="brandType" width="120">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="scope.row.brandType" />
</template>
</el-table-column>
<el-table-column label="箱数" align="center" prop="num" width="120" />
<el-table-column label="体积" align="center" prop="volume" width="120">
<template slot-scope="scope">
<p v-if="scope.row.volume">{{scope.row.volume}}</p>
</template>
</el-table-column>
<el-table-column label="重量" align="center" prop="weight" width="120">
<template slot-scope="scope">
<p v-if="scope.row.weight">{{scope.row.weight}}kg</p>
</template>
</el-table-column>
<el-table-column label="预装柜" align="center" prop="weight" width="120" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleGoods('singele',scope.row)">预装</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-collapse-transition>
</el-row>
<el-table v-loading="loading" :data="listData">
<el-table-column label="序号" type="index" width="50" />
<el-table-column label="订单号" align="center" prop="selfNo" />
<el-table-column label="货物信息" align="center" prop="cubNo" />
<el-table-column label="计划箱数" align="center" prop="cabinetId" />
<el-table-column label="实装箱数" align="center" prop="transportType" />
<el-table-column label="体积" align="center" prop="squareNumber" />
<el-table-column label="重量" align="center" prop="weight" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="small">预装</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</el-scrollbar>
<!-- 分页 -->
<el-pagination background layout="prev, pager, next" :total="1000"></el-pagination>
<el-pagination background layout="prev, pager, next" :page-size="pageParam.pageSize" :total="total" @current-change="pageChange" v-show="total > 0"></el-pagination>
</el-col>
</el-row>
......@@ -99,73 +134,233 @@
</el-col>
</el-row>
<el-row class="button-area">
<el-button type="primary">完成</el-button>
<el-button type="primary" @click="handlerFinish">完成</el-button>
</el-row>
</div>
</template>
<script>
import {
secGoodsList,
preloadPage,
createSection,
deleteSection,
serviceMsg,
createGoods,
deleteGoods,
} from "@/api/ecw/boxSea";
/**
* 补单
*/
export default {
name: "supplementOrder",
inheritAttrs: false,
data() {
return {
// loading
loading: false,
// 二维码/条码编号
cabinetNo: "",
// 表格数据
listData: [
{
selfNo: "111aaa",
cubNo: "11111111111111111111111111",
},
{
selfNo: "111aaa",
cubNo: "11111111111111111111111111",
},
],
// 左侧数据
testData: [
{
key: 1,
title: "第一部分",
},
{
key: 2,
title: "第二部分",
},
],
listData: [],
// 选中部分
partData: {},
// 部分列表
partList: [],
// 查询参数
queryParams: {},
queryParams: {
startWarehouseId: this.$attrs.shipmentObj.startWarehouseId,
},
pageParam: { pageNo: 1, pageSize: 10 },
// 待预装
toBePreList: [],
total: 0,
};
},
methods: {},
created() {
this.queryAllData();
},
methods: {
/* 查询已预装 */
getSecGoods() {
secGoodsList({ shipmentId: this.$attrs.shipmentObj.id }).then((res) => {
this.partList = res.data.map((item, index) => {
item.fold = true;
if (
Object.keys(this.partData).length &&
this.partData.id === item.id
) {
item.fold = false;
}
return {
...item,
title: `第 ${++index} 部分`,
};
});
if (this.partList.length && !Object.keys(this.partData).length) {
this.partList[0].fold = false;
this.partData = this.partList[0];
}
});
},
/* 查询待预装 */
getPreLoad() {
// 处理查询参数
let params = {
...this.queryParams,
};
preloadPage({ ...params, ...this.pageParam }).then((res) => {
this.toBePreList = res.data.list;
this.total = res.data.total;
});
},
/* 删除订单 */
deleteOrder(data) {
let ids = [data.orderItemId];
deleteGoods(ids).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
},
/** 预装 */
handleGoods(type, item) {
let params = {
secId: this.partData.id,
shipmentId: this.$attrs.shipmentObj.id,
orderId: item.orderId,
};
if (type === "all") {
params.orderItemIdList = item.orderItemList.map(
(data) => data.orderItemId
);
} else {
params.orderItemIdList = [item.orderItemId];
}
createGoods(params).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
},
/* 增加部分 */
addPart() {
createSection({ shipmentId: this.$attrs.shipmentObj.id }).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
},
/* 删除部分 */
deletePart() {
this.$confirm("确认删除该部分及其已预装订单?", "提示", {
type: "warning",
})
.then((_) => {
deleteSection(this.partData.id).then((res) => {
serviceMsg(res, this).then(() => {
this.partData = {};
this.getSecGoods();
});
});
})
.catch((_) => {});
},
/* 部分点击 */
partClick(item) {
item.fold = !item.fold;
this.partData = item;
let copyList = [...this.partList];
copyList = copyList.map((cItem) => {
cItem.fold = true;
if (item.id === cItem.id) {
cItem.fold = false;
return cItem;
}
});
this.$set(this.partList, copyList);
},
/* 获取城市 */
importCityName(id) {
var arr = this.$attrs.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? arr[0].titleZh : "";
},
/* 待预装订单分页 */
pageChange(page) {
this.pageParam.pageNo = page;
this.getPreLoad();
},
/* 折叠 */
foldTable(index, item) {
item.fold = !item.fold;
this.$set(this.toBePreList, index, item);
},
/* 查询所有数据 */
queryAllData() {
this.getSecGoods();
this.pageParam.pageNo = 1;
this.getPreLoad();
},
/* 完成 */
handlerFinish() {
this.$confirm("确定执行操作?", "提示", {
type: "warning",
})
.then((_) => {
this.$emit("supplementFinish");
})
.catch((_) => {});
},
},
computed: {
/** 目的地 */
importWarehouseList() {
return this.$attrs.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3"
);
},
},
};
</script>
<style lang="scss" scoped>
<style lang="scss">
.supplementOrder {
display: flex;
flex-direction: column;
p {
margin: 0;
}
.el-card__body {
height: 100%;
}
.content-area {
display: flex;
height: 100%;
.left-area {
border-right: 3px solid #e6ebf5;
padding-right: 10px;
.el-scrollbar__view {
padding-right: 10px;
}
.title-info {
margin-top: 10px;
height: auto;
&.selected {
> div:first-child {
background-color: #4f9cdd;
color: #fff;
}
}
> div:first-child {
font-size: 16px;
background-color: #f2f2f2;
line-height: 30px;
text-align: center;
cursor: pointer;
}
> :last-child {
.part-secGoog {
margin-top: 5px;
display: flex;
align-items: center;
> p {
......@@ -205,6 +400,7 @@ export default {
}
.table-title {
display: flex;
align-items: center;
line-height: 30px;
background-color: #4f9cdd;
color: #fff;
......@@ -215,7 +411,10 @@ export default {
flex: 1;
display: flex;
justify-content: flex-end;
> div {
> .el-button--text {
color: #fff;
}
> .el-button--text:last-child {
margin-right: 10px;
}
}
......@@ -225,6 +424,10 @@ export default {
padding: 0;
text-align: right;
}
.toBePre-table {
margin-bottom: 10px;
}
}
}
.totle-info {
......
......@@ -120,41 +120,45 @@
<el-button type="primary" size="small" @click="foldTable(index, part)">{{part.fold ? '展开' : '收起'}}</el-button>
</div>
</el-row>
<el-table v-loading="preLoading" border :data="part.sectionGoodsList" v-show="!part.fold" @select="(selection)=>checkboxSelect(selection, part)" @select-all="(selection)=>checkboxSelect(selection, part)">
<el-table-column type="selection" align="center" width="55" fixed="left" />
<el-table-column label="订单号" align="center" prop="orderId" width="120" />
<el-table-column label="目的地" align="center" prop="destWarehouseName" width="120" />
<el-table-column label="入仓时间" align="center" prop="rucangtime" width="120" />
<el-table-column label="品名" align="center" prop="prodTitleZh" width="120" />
<el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="体积/重量/重货比" align="center" width="140" prop="volumeWeight">
<template slot-scope="scope">
<p v-if="scope.row.volume">{{scope.row.volume}}</p>
<p v-if="scope.row.weight">{{scope.row.weight}}kg</p>
</template>
</el-table-column>
<el-table-column label="报关方式" align="center" prop="customsType" width="120">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
</template>
</el-table-column>
<el-table-column label="备案" align="center" prop="productRecord" width="100">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="scope.row.productRecord" />
</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-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-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>
</template>
</el-table-column>
</el-table>
<el-collapse-transition>
<div v-show="!part.fold">
<el-table v-loading="preLoading" border :data="part.sectionGoodsList" @select="(selection)=>checkboxSelect(selection, part)" @select-all="(selection)=>checkboxSelect(selection, part)">
<el-table-column type="selection" align="center" width="55" fixed="left" />
<el-table-column label="订单号" align="center" prop="orderNo" width="120" />
<el-table-column label="目的地" align="center" prop="destWarehouseName" width="120" />
<el-table-column label="入仓时间" align="center" prop="rucangtime" width="120" />
<el-table-column label="品名" align="center" prop="prodTitleZh" width="120" />
<el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="体积/重量/重货比" align="center" width="140" prop="volumeWeight">
<template slot-scope="scope">
<p v-if="scope.row.volume">{{scope.row.volume}}</p>
<p v-if="scope.row.weight">{{scope.row.weight}}kg</p>
</template>
</el-table-column>
<el-table-column label="报关方式" align="center" prop="customsType" width="120">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
</template>
</el-table-column>
<el-table-column label="备案" align="center" prop="productRecord" width="100">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="scope.row.productRecord" />
</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-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-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>
</template>
</el-table-column>
</el-table>
</div>
</el-collapse-transition>
</el-row>
</el-scrollbar>
</el-col>
......@@ -177,8 +181,8 @@
</div>
</div>
</el-row>
<el-scrollbar style="height:calc(100% - 40px)">
<el-pagination background layout="prev, pager, next" :page-size="pageParam.pageSize" :total="total" @current-change="pageChange" v-show="total > 0"></el-pagination>
<el-pagination background layout="prev, pager, next" :page-size="pageParam.pageSize" :total="total" @current-change="pageChange" v-show="total > 0"></el-pagination>
<el-scrollbar style="height:calc(100% - 75px)">
<el-row v-for="(item, index) in toBePreList" :key="index" class="tobePre-row">
<el-row class="preinstall-title order-title">
<div>
......@@ -189,7 +193,9 @@
<p>{{item.destWarehouseName}}</p>
</div>
<div>
<p>{{item.warehouseType}}</p>
<p>
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" />
</p>
</div>
<div>
<p>入仓时间:</p>
......@@ -309,7 +315,7 @@ export default {
// 查询参数
queryParams: {},
pageParam: { pageNo: 1, pageSize: 5 },
pageParam: { pageNo: 1, pageSize: 10 },
// 目的地操作员
operatorData: {},
// 校验
......@@ -441,7 +447,7 @@ export default {
},
/* 待预装订单分页 */
pageChange(page) {
this.queryParams.page = page;
this.pageParam.pageNo = page;
this.getPreLoad();
},
/* 折叠 */
......
......@@ -21,7 +21,7 @@
<script>
import { shipConfigure, serviceMsg } from "@/api/ecw/boxSea";
import { formatNumberString, constantDict } from "../utils";
import { formatNumberString, formatDateStr, constantDict } from "../utils";
/**
* 配船
*/
......@@ -47,6 +47,7 @@ export default {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.shipmentObj[voName] };
oldData = formatNumberString(oldData, ["saExmtStatus"]);
oldData = formatDateStr(oldData, ["configTime"]);
this.shipObj = oldData;
},
methods: {
......
......@@ -59,7 +59,8 @@ export default {
this.$refs["unloadingForm"].validate((valid) => {
if (valid) {
if (operateType === 2) {
const { ulStatus } = this.$attrs.shipmentObj;
const { keyName } = this.$attrs.currNode;
const ulStatus = this.$attrs.shipmentObj[keyName];
if (ulStatus !== 145) {
this.$message.warning("请先通过卸柜审批");
return;
......
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