Commit 0e7d117a authored by huhaiqing's avatar huhaiqing

修改海运缺陷单

parent af7a6288
......@@ -16,7 +16,7 @@
<div v-for="(item, index) in scope.row.orderItemList" :key="index" class="goodList-div">
<p>{{$t('品名')}}{{item.prodTitleZh}}</p>
<p>{{$t('品牌')}}:【
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="item.productRecord" />
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="item.feeType" />
</p>
<p>{{$t('其他')}}{{getTotlContent(item)}}</p>
......
......@@ -8,13 +8,14 @@
<el-row class="operate-button">
<el-button type="success" @click="onSubmit" v-show="!isReview">{{$t('发起申请')}}</el-button>
<el-button type="primary" @click="jumpReviewDetail" v-show="isReview">{{$t('审核中')}}</el-button>
<el-button plain type="primary" @click="canclAudit" v-show="isReview">{{$t('取消审核')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
</el-row>
</div>
</template>
<script>
import { approvalCreate } from "@/api/ecw/boxSea";
import { approvalCreate, approvalCancel } from "@/api/ecw/boxSea";
import { serviceMsg, toReviewDetail } from "../utils";
/**
......@@ -29,41 +30,56 @@ export default {
reviewObj: {},
isReview: false,
bpmProcessId: "",
voKey: "",
};
},
created() {
const { currNode, shipmentObj } = this.$attrs;
const {
preInstallBackInfo,
cabinetBackInfo,
cabinetUnloadBackApprovalInfo,
} = shipmentObj;
if (currNode.type === "preinstall") {
this.isReview = preInstallBackInfo ? true : false;
if (preInstallBackInfo && preInstallBackInfo.approvalStatus !== 1) {
this.isReview = false;
}
this.bpmProcessId = preInstallBackInfo?.bpmProcessId;
let voKey = "";
switch (currNode.type) {
case "preinstall":
voKey = "preInstallBackInfo";
break;
case "cabinet":
voKey = "cabinetBackInfo";
break;
case "unloading":
voKey = "cabinetUnloadBackApprovalInfo";
break;
}
if (currNode.type === "cabinet") {
this.isReview = cabinetBackInfo ? true : false;
if (cabinetBackInfo && cabinetBackInfo.approvalStatus !== 1) {
if (voKey) {
this.isReview = shipmentObj[voKey] ? true : false;
if (shipmentObj[voKey] && shipmentObj[voKey].approvalStatus !== 1) {
this.isReview = false;
}
this.bpmProcessId = cabinetBackInfo?.bpmProcessId;
}
if (currNode.type === "unloading") {
this.isReview = cabinetUnloadBackApprovalInfo ? true : false;
if (
cabinetUnloadBackApprovalInfo &&
cabinetUnloadBackApprovalInfo.approvalStatus !== 1
) {
this.isReview = false;
this.bpmProcessId = shipmentObj[voKey].bpmProcessId;
if (this.isReview) {
this.$set(
this.reviewObj,
"applyReason",
shipmentObj[voKey].applyReason
);
}
this.bpmProcessId = cabinetUnloadBackApprovalInfo?.bpmProcessId;
}
this.voKey = voKey;
},
methods: {
/* 取消审核 */
canclAudit() {
const { shipmentObj } = this.$attrs;
approvalCancel({
applyReason: this.$t("取消反审核"),
id: shipmentObj[this.voKey].id,
shipmentId: shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit");
});
});
},
jumpReviewDetail() {
toReviewDetail.apply(this, [this.bpmProcessId]);
this.$emit("closeDialog");
......
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