Commit 15b66c6a authored by huhaiqing's avatar huhaiqing

拆单审核增加状态判断

parent 98039f9c
......@@ -22,7 +22,7 @@
<!-- 开始装柜 -->
<el-dialog title="开始装柜" :visible.sync="dialogVisible" fullscreen :modal-append-to-body=false append-to-body>
<startPacking v-bind="$attrs" v-if="dialogVisible" @closeDialog="closeDialog" />
<startPacking v-bind="$attrs" v-if="dialogVisible" v-on="$listeners" @closeDialog1="closeDialog1" />
</el-dialog>
<!-- 操作 -->
......@@ -99,7 +99,7 @@ export default {
}
});
},
closeDialog(type) {
closeDialog1(type) {
this.dialogVisible = false;
if (type) this.cancel(type);
},
......
......@@ -38,7 +38,7 @@
{{orderData.consignorVO?orderData.consignorVO.company||'':''}}
</el-descriptions-item>
<el-descriptions-item label="发货电话">
{{orderData.consignorVO?(orderData.consignorVO.phone?(orderData.consignorVO.countryCode+orderData.consignorVO.phone):''):''}}
{{orderData.consignorVO?(orderData.consignorVO.phone?("+"+orderData.consignorVO.countryCode+orderData.consignorVO.phone):''):''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
......@@ -49,7 +49,7 @@
{{orderData.consigneeVO?orderData.consigneeVO.company||'':''}}
</el-descriptions-item>
<el-descriptions-item label="收货电话">
{{orderData.consigneeVO?orderData.consigneeVO.phone?orderData.consigneeVO.countryCode+orderData.consigneeVO.phone :'':''}}
{{orderData.consigneeVO?orderData.consigneeVO.phone?"+"+orderData.consigneeVO.countryCode+orderData.consigneeVO.phone :'':''}}
</el-descriptions-item>
</el-descriptions>
</el-card>
......@@ -117,7 +117,7 @@
</p>
</div>
<div>
<el-button type="primary" @click="addShop">放入</el-button>
<el-button type="primary" :disabled="isAudit" @click="addShop">放入</el-button>
</div>
</div>
<el-table border :data="splitData.orderSplitItemBackVOList">
......@@ -157,7 +157,7 @@
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete" @click="removeShop(scope.row.id)">移出</el-button>
<el-button size="mini" :disabled="isAudit" type="text" icon="el-icon-delete" @click="removeShop(scope.row.id)">移出</el-button>
</template>
</el-table-column>
</el-table>
......@@ -168,12 +168,12 @@
<work-flow xmlkey="split_order" v-model="selectedUsers"></work-flow>
</el-row>
<div slot="footer" class="card footer_btn" v-if="orderData.status!=99">
<el-button v-if="orderData.status!=19" type="primary" @click="submitForm">提交申请</el-button>
<el-button v-if="orderData.status!=19" plain type="primary" @click="$emit('closeDialog')">取消</el-button>
<el-button v-if="orderData.status==19" type="primary">审核中</el-button>
<el-button v-if="orderData.status==19" plain type="primary" @click="cancelSplit">取消审核</el-button>
<el-button v-if="orderData.status==19" plain type="primary" @click="$emit('closeDialog')">返回</el-button>
<div slot="footer" class="card footer_btn">
<el-button v-if="!isAudit" type="primary" @click="submitForm">提交申请</el-button>
<el-button v-if="!isAudit" plain type="primary" @click="$emit('closeDialog2')">取消</el-button>
<el-button v-if="isAudit" type="primary" @click="jumpReviewDetail">审核中</el-button>
<el-button v-if="isAudit" plain type="primary" @click="cancelSplit">取消审核</el-button>
<el-button v-if="isAudit" plain type="primary" @click="$emit('closeDialog2')">返回</el-button>
</div>
<!-- 对话框(添加 / 修改) -->
......@@ -215,15 +215,14 @@
import {
getSplitList,
createSplit,
cancelApply,
createSplitItem,
deleteSplitItem,
} from "@/api/ecw/orderHandle";
import { getTradeCityList } from "@/api/ecw/region";
import WorkFlow from "@/components/WorkFlow";
import { getOrder } from "@/api/ecw/order";
import { serviceMsg } from "../../utils";
import { createApproval } from "@/api/ecw/boxSea";
import { serviceMsg, toReviewDetail } from "../../utils";
import { createApproval, approvalCancel } from "@/api/ecw/boxSea";
export default {
name: "splitOrder",
......@@ -288,6 +287,23 @@ export default {
},
},
},
computed: {
isAudit() {
const { shipmentObj } = this.$attrs;
const { cabinetSplitInfo } = shipmentObj;
if (cabinetSplitInfo) {
/**
* PROCESS(1, "处理中"),
* APPROVE(2, "通过"),
* REJECT(3, "不通过"),
* CANCEL(4, "已取消");
*/
const { approvalStatus } = cabinetSplitInfo;
if (approvalStatus === 1) return true;
}
return false;
},
},
methods: {
/* 拆箱总数 */
totalSplitNum() {
......@@ -405,6 +421,7 @@ export default {
shipmentId: shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then((res) => {
this.$emit("getBoxInfo");
this.getSplit();
});
});
......@@ -469,11 +486,12 @@ export default {
const { shipmentObj } = this.$attrs;
approvalCancel({
applyReason: "取消审核",
id: shipmentObj["cabinetApprovalInfo"].id,
id: shipmentObj["cabinetSplitInfo"].id,
shipmentId: shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog");
this.$emit("getBoxInfo");
this.getSplit();
});
});
},
......@@ -481,6 +499,11 @@ export default {
this.shopOpen = false;
this.shopForm = {};
},
jumpReviewDetail() {
const { cabinetSplitInfo } = this.$attrs.shipmentObj;
toReviewDetail.apply(this, [cabinetSplitInfo.bpmProcessId]);
this.$emit("closeDialog2", "close");
},
},
};
</script>
......
......@@ -119,7 +119,7 @@
<div v-if="isUnderReview">
<el-button type="primary" @click="jumpReviewDetail">封柜审核中</el-button>
<el-button plain type="primary" @click="canclAudit">取消审核</el-button>
<el-button plain type="primary" @click="$emit('closeDialog')">返回</el-button>
<el-button plain type="primary" @click="$emit('closeDialog1')">返回</el-button>
</div>
</el-row>
......@@ -154,7 +154,7 @@
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit('modifyForm')">下一步</el-button>
<el-button @click="closeDialog">取消</el-button>
<el-button @click="closeDialog2">取消</el-button>
</el-row>
</template>
<!-- 装柜纠错 -->
......@@ -166,7 +166,7 @@
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit('correctionForm')">提交</el-button>
<el-button @click="closeDialog">取消</el-button>
<el-button @click="closeDialog2">取消</el-button>
</el-row>
</template>
<!-- 批量装柜纠错(订单号) -->
......@@ -178,7 +178,7 @@
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit('orderForm')">提交</el-button>
<el-button @click="closeDialog">取消</el-button>
<el-button @click="closeDialog2">取消</el-button>
</el-row>
</template>
<!-- 装柜批量输入 -->
......@@ -190,11 +190,11 @@
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit('batchForm')">提交</el-button>
<el-button @click="closeDialog">取消</el-button>
<el-button @click="closeDialog2">取消</el-button>
</el-row>
</template>
<!-- 拆单 -->
<splitOrder v-bind="$attrs" :shipmentObj="shipmentObj" v-if="dialogConfig.type === 'splitOrder' && dialogConfig.dialogVisible" :currRow="currRow" @closeDialog="closeDialog" />
<splitOrder v-bind="$attrs" v-on="$listeners" :shipmentObj="shipmentObj" v-if="dialogConfig.type === 'splitOrder' && dialogConfig.dialogVisible" :currRow="currRow" @closeDialog2="closeDialog2" />
</el-dialog>
</div>
</template>
......@@ -372,7 +372,7 @@ export default {
this.$set(this.dialogConfig, "dialogVisible", true);
},
/** 关闭弹窗 */
closeDialog() {
closeDialog2() {
this.$set(this.dialogConfig, "dialogVisible", false);
},
/** 修改提交 */
......@@ -428,7 +428,7 @@ export default {
params.orderNo = this.batchObj.qrCode;
batchCreate(params).then((res) => {
serviceMsg(res, this).then(() => {
this.closeDialog();
this.closeDialog2();
this.getLoadSecGoodsList();
});
});
......@@ -445,14 +445,14 @@ export default {
if (type === "single") {
singleDelete(params).then((res) => {
serviceMsg(res, this).then(() => {
this.closeDialog();
this.closeDialog2();
this.getLoadSecGoodsList();
});
});
} else {
batchDelete(params).then((res) => {
serviceMsg(res, this).then(() => {
this.closeDialog();
this.closeDialog2();
this.getLoadSecGoodsList();
});
});
......@@ -479,12 +479,12 @@ export default {
};
boxUpdate(params).then((res) => {
serviceMsg(res, this);
this.closeDialog();
this.closeDialog2();
});
},
/* 补单完成 */
supplementFinish() {
this.closeDialog();
this.closeDialog2();
this.getLoadSecGoodsList();
},
/* 申请封柜 */
......@@ -497,7 +497,7 @@ export default {
shipmentId: this.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit");
this.$emit("closeDialog1", "submit");
});
});
},
......@@ -516,14 +516,14 @@ export default {
shipmentId: this.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit");
this.$emit("closeDialog1", "submit");
});
});
},
jumpReviewDetail() {
const { cabinetApprovalInfo } = this.shipmentObj;
toReviewDetail.apply(this, [cabinetApprovalInfo.bpmProcessId]);
this.$emit("closeDialog", "close");
this.$emit("closeDialog1", "close");
},
},
computed: {
......
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