Commit 6940581c authored by huhaiqing's avatar huhaiqing

出货拆单开发

parent 2a96bde2
...@@ -170,8 +170,11 @@ export default { ...@@ -170,8 +170,11 @@ export default {
}, },
}, },
watch: { watch: {
processId(val) { processId: {
this.getApprovalDetail(val); immediate: true,
handler(val) {
this.getApprovalDetail(val);
},
}, },
boxBackVO(val) { boxBackVO(val) {
// 柜型 // 柜型
......
This diff is collapsed.
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
</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">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="moveOut(scope.row)" v-if="!isUnderReview">移出</el-button> <el-button type="text" size="small" @click="moveOut(scope.row)" v-if="!isUnderReview && scope.row.installNum === 0">移出</el-button>
<!-- <el-button type="text" size="small" disabled>拆单</el-button> --> <el-button type="text" size="small" v-if="isShowSplitOrder(scope.row)" @click="handlerSplitOrder(scope.row, 'splitOrder','拆单')">拆单</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
</el-row> </el-row>
</template> </template>
<!-- 批量装柜纠错(订单号) --> <!-- 批量装柜纠错(订单号) -->
<template v-if=" dialogConfig.type === 'correctionOrder' && dialogConfig.dialogVisible"> <template v-if="dialogConfig.type === 'correctionOrder' && dialogConfig.dialogVisible">
<el-form ref="orderForm" :rules="rules" :model="orderObj" label-position="top"> <el-form ref="orderForm" :rules="rules" :model="orderObj" label-position="top">
<el-form-item label="装柜纠错(订单号)" prop="orderNo"> <el-form-item label="装柜纠错(订单号)" prop="orderNo">
<el-input type="textarea" :rows="3" v-model="orderObj.orderNo" placeholder="请输入,多个以逗号分隔" clearable /> <el-input type="textarea" :rows="3" v-model="orderObj.orderNo" placeholder="请输入,多个以逗号分隔" clearable />
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
</el-row> </el-row>
</template> </template>
<!-- 装柜批量输入 --> <!-- 装柜批量输入 -->
<template v-if=" dialogConfig.type === 'batchInput' && dialogConfig.dialogVisible"> <template v-if="dialogConfig.type === 'batchInput' && dialogConfig.dialogVisible">
<el-form ref="batchForm" :rules="rules" :model="batchObj" label-position="top"> <el-form ref="batchForm" :rules="rules" :model="batchObj" label-position="top">
<el-form-item label="" prop="qrCode"> <el-form-item label="" prop="qrCode">
<el-input type="textarea" :rows="3" v-model="batchObj.qrCode" placeholder="请输入,多个以逗号分隔" clearable /> <el-input type="textarea" :rows="3" v-model="batchObj.qrCode" placeholder="请输入,多个以逗号分隔" clearable />
...@@ -185,6 +185,8 @@ ...@@ -185,6 +185,8 @@
<el-button @click="closeDialog">取消</el-button> <el-button @click="closeDialog">取消</el-button>
</el-row> </el-row>
</template> </template>
<!-- 拆单 -->
<splitOrder v-if="dialogConfig.type === 'splitOrder' && dialogConfig.dialogVisible" :currRow="currRow" @closeDialog="closeDialog" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -205,6 +207,7 @@ import { ...@@ -205,6 +207,7 @@ import {
approvalCreate, approvalCreate,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { getTotlContent, serviceMsg } from "../../utils"; import { getTotlContent, serviceMsg } from "../../utils";
import splitOrder from "./splitOrder.vue";
/** /**
* 开始装柜 * 开始装柜
...@@ -214,6 +217,7 @@ export default { ...@@ -214,6 +217,7 @@ export default {
inheritAttrs: false, inheritAttrs: false,
components: { components: {
supplementOrder, supplementOrder,
splitOrder,
}, },
props: { props: {
shipmentObj: Object, shipmentObj: Object,
...@@ -259,6 +263,8 @@ export default { ...@@ -259,6 +263,8 @@ export default {
qrCode: [{ required: true, message: "必填", trigger: "change" }], qrCode: [{ required: true, message: "必填", trigger: "change" }],
orderNo: [{ required: true, message: "必填", trigger: "change" }], orderNo: [{ required: true, message: "必填", trigger: "change" }],
}, },
// 当前行
currRow: {},
}; };
}, },
created() { created() {
...@@ -289,6 +295,11 @@ export default { ...@@ -289,6 +295,11 @@ export default {
handlerClick(type, title) { handlerClick(type, title) {
this.shwoDialog({ type, title }); this.shwoDialog({ type, title });
}, },
/* 拆单 */
handlerSplitOrder(row, type, title) {
this.currRow = row;
this.shwoDialog({ type, title });
},
/** 表格订单号点击 */ /** 表格订单号点击 */
orderClick(row) { orderClick(row) {
orderTagList({ orderId: row.orderId }).then((res) => { orderTagList({ orderId: row.orderId }).then((res) => {
...@@ -340,6 +351,9 @@ export default { ...@@ -340,6 +351,9 @@ export default {
this.$set(this.dialogConfig, "fullscreen", false); this.$set(this.dialogConfig, "fullscreen", false);
this.modifyCabinetObj = {}; this.modifyCabinetObj = {};
break; break;
case "splitOrder":
this.$set(this.dialogConfig, "fullscreen", true);
break;
} }
this.$set(this.dialogConfig, "dialogVisible", true); this.$set(this.dialogConfig, "dialogVisible", true);
}, },
...@@ -465,6 +479,13 @@ export default { ...@@ -465,6 +479,13 @@ export default {
serviceMsg(res, this); serviceMsg(res, this);
}); });
}, },
/* 是否显示拆单 */
isShowSplitOrder(row) {
if (row.num > row.installNum) {
return true;
}
return false;
},
}, },
watch: { watch: {
listData(val) { listData(val) {
......
...@@ -277,26 +277,12 @@ ...@@ -277,26 +277,12 @@
<el-row class="process-area" v-show="isAudit"> <el-row class="process-area" v-show="isAudit">
<div class="process"> <div class="process">
<div>审批流程</div> <div>审批流程</div>
<div>流程图</div> <work-flow xmlkey="shipment_preassemble" v-model="selectedUsers"></work-flow>
</div> </div>
<!-- <div class="copy-user">
<div>
<label class="el-form-item__label">抄送</label>
<userSelect v-model="copyUser" placeholder="请选择抄送人" :allUsers="this.$attrs.allUsers" size="small" multiple collapse-tags />
</div>
<div>
<label class="el-form-item__label">抄送人</label>
<div class="copyUser-tag">
<el-tag v-for="user in copyUsers" :key="user.id" closable @close="removeCopyUser(user)">
{{user.nickname}}
</el-tag>
</div>
</div>
</div> -->
<div> <div>
<el-button type="primary" :disabled=true>审核中</el-button> <el-button type="primary" :disabled=true>审核中</el-button>
<el-button type="primary" @click="canclAudit">取消审核</el-button> <el-button plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button type="primary" @click="closeDialog">返回</el-button> <el-button plain type="primary" @click="closeDialog">返回</el-button>
</div> </div>
</el-row> </el-row>
</div> </div>
...@@ -317,6 +303,7 @@ import { ...@@ -317,6 +303,7 @@ import {
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
import { formatDate, getTotlContent, serviceMsg } from "../utils"; import { formatDate, getTotlContent, serviceMsg } from "../utils";
import dayjs from "dayjs"; import dayjs from "dayjs";
import WorkFlow from "@/components/WorkFlow";
/** /**
* 预装 * 预装
...@@ -324,7 +311,7 @@ import dayjs from "dayjs"; ...@@ -324,7 +311,7 @@ import dayjs from "dayjs";
export default { export default {
name: "preinstall", name: "preinstall",
inheritAttrs: false, inheritAttrs: false,
components: { userSelect }, components: { userSelect, WorkFlow },
data() { data() {
return { return {
// 状态 // 状态
...@@ -364,10 +351,8 @@ export default { ...@@ -364,10 +351,8 @@ export default {
}, },
// 出货信息 // 出货信息
shipmentObj: this.$attrs.shipmentObj, shipmentObj: this.$attrs.shipmentObj,
// 抄送人
copyUser: undefined,
// 抄送人数组 // 抄送人数组
copyUsers: [], selectedUsers: [],
}; };
}, },
computed: { computed: {
...@@ -594,10 +579,6 @@ export default { ...@@ -594,10 +579,6 @@ export default {
: rucangtime[1], : rucangtime[1],
}; };
}, },
/* 删除抄送人 */
removeCopyUser(user) {
this.copyUser = this.copyUser.filter((id) => id !== user.id);
},
/* 关闭弹框 */ /* 关闭弹框 */
closeDialog() { closeDialog() {
this.$emit("closeDialog"); this.$emit("closeDialog");
...@@ -617,17 +598,6 @@ export default { ...@@ -617,17 +598,6 @@ export default {
}); });
}, },
}, },
watch: {
copyUser(val) {
const { allUsers } = this.$attrs;
let users = [];
for (const id of val) {
const user = allUsers.find((item) => item.id === id);
if (user) users.push(user);
}
this.copyUsers = users;
},
},
}; };
</script> </script>
...@@ -730,26 +700,6 @@ export default { ...@@ -730,26 +700,6 @@ export default {
font-weight: bolder; font-weight: bolder;
font-size: 16px; font-size: 16px;
} }
> :last-child {
height: 300px;
}
}
.copy-user {
margin-bottom: 15px;
> div {
display: flex;
align-items: center;
}
> :last-child {
.copyUser-tag {
display: flex;
flex-wrap: wrap;
> span {
margin-right: 10px;
}
}
}
} }
} }
} }
......
...@@ -74,7 +74,6 @@ export default { ...@@ -74,7 +74,6 @@ export default {
seaBaseData: Array, seaBaseData: Array,
}, },
data() { data() {
console.log(this.$store.state.user);
return { return {
// 弹窗配置 // 弹窗配置
dialogConfig: { dialogConfig: {
...@@ -177,8 +176,17 @@ export default { ...@@ -177,8 +176,17 @@ export default {
let nodeIndex = 0; let nodeIndex = 0;
for (let j = 0; j < nodes.length; j++) { for (let j = 0; j < nodes.length; j++) {
const node = nodes[j]; const node = nodes[j];
const { keyName, voName, status } = node; const { keyName, voName, status, type } = node;
if (!keyName) continue;
if (!keyName && type === "agent") {
if (val[voName]) {
// 已完成agent节点
node.currStatus = "end";
++nodeIndex;
}
continue;
}
const { start, wait, end } = status; const { start, wait, end } = status;
if (start.includes(val[keyName])) { if (start.includes(val[keyName])) {
...@@ -199,7 +207,7 @@ export default { ...@@ -199,7 +207,7 @@ export default {
++nodeIndex; ++nodeIndex;
} }
} }
// 如果相等标识步骤已完成 // 如果相等标识步骤已完成
if (nodeIndex === nodes.length) { if (nodeIndex === nodes.length) {
// 加1表示为已完成步骤后一步 // 加1表示为已完成步骤后一步
this.currIndex = i + 1; this.currIndex = i + 1;
......
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