|
@@ -1,21 +1,65 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <el-breadcrumb separator="/">
|
|
|
- <el-breadcrumb-item
|
|
|
- ><span style="font-weight: 700">调拨</span></el-breadcrumb-item
|
|
|
- >
|
|
|
- <el-breadcrumb-item
|
|
|
- ><span style="font-weight: 700">调拨详情页</span></el-breadcrumb-item
|
|
|
+ <div style="display: flex; justify-content: space-between">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <el-breadcrumb separator="/">
|
|
|
+ <el-breadcrumb-item
|
|
|
+ ><span style="font-weight: 700">调拨</span></el-breadcrumb-item
|
|
|
+ >
|
|
|
+ <el-breadcrumb-item
|
|
|
+ ><span style="font-weight: 700"
|
|
|
+ >调拨详情页</span
|
|
|
+ ></el-breadcrumb-item
|
|
|
+ >
|
|
|
+ </el-breadcrumb>
|
|
|
+ <el-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ size="mini"
|
|
|
+ icon="el-icon-arrow-left"
|
|
|
+ @click="goBack"
|
|
|
+ >返回列表</el-button
|
|
|
>
|
|
|
- </el-breadcrumb>
|
|
|
- <el-button
|
|
|
- style="margin-left: 10px"
|
|
|
- size="mini"
|
|
|
- icon="el-icon-arrow-left"
|
|
|
- @click="goBack"
|
|
|
- >返回列表</el-button
|
|
|
- >
|
|
|
+ </div>
|
|
|
+ <div v-if="showApproval == 0">
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ size="small"
|
|
|
+ @click="addOrUpdateHandle(form, 'warehouse_status')"
|
|
|
+ v-if="form.warehouseStatus > 3"
|
|
|
+ >查看接单审批
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ size="small"
|
|
|
+ @click="addOrUpdateHand(form, 'warehouse_status')"
|
|
|
+ v-if="form.warehouseStatus > 3 && approVal == true"
|
|
|
+ >接单审批
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ :disabled="form.warehouseStatus >= 4"
|
|
|
+ size="small"
|
|
|
+ @click="verifyForm"
|
|
|
+ v-if="form.fBillstatus"
|
|
|
+ >接单请核
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ :disabled="browseStatus"
|
|
|
+ size="small"
|
|
|
+ @click="ordersRevoke"
|
|
|
+ v-if="form.warehouseStatus == 6"
|
|
|
+ >撤销接单请核
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ :disabled="browseStatus"
|
|
|
+ size="small"
|
|
|
+ @click="revokeTwo('warehouse_status')"
|
|
|
+ v-if="form.warehouseStatus == 4"
|
|
|
+ >撤销接单审批
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<br />
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
|
@@ -44,7 +88,7 @@
|
|
|
<el-form-item
|
|
|
label="结算方式"
|
|
|
prop="fStltypeid"
|
|
|
- v-if="dataShowcar == '0'"
|
|
|
+ v-if="dataShowcar == '1'"
|
|
|
>
|
|
|
<el-select
|
|
|
v-model="form.fStltypeid"
|
|
@@ -64,7 +108,7 @@
|
|
|
<el-form-item
|
|
|
label="作业类型"
|
|
|
prop="fBusinessType"
|
|
|
- v-if="dataShowcar == '1'"
|
|
|
+ v-else
|
|
|
>
|
|
|
<el-select
|
|
|
style="width: 80%"
|
|
@@ -244,7 +288,7 @@
|
|
|
<el-form-item
|
|
|
label="作业类型"
|
|
|
prop="fBusinessType"
|
|
|
- v-if="dataShowcar == '0'"
|
|
|
+ v-if="dataShowcar == '1'"
|
|
|
>
|
|
|
<el-select
|
|
|
style="width: 80%"
|
|
@@ -269,7 +313,7 @@
|
|
|
<el-form-item
|
|
|
label="结算方式"
|
|
|
prop="fStltypeid"
|
|
|
- v-if="dataShowcar == '1'"
|
|
|
+ v-else
|
|
|
>
|
|
|
<el-select
|
|
|
v-model="form.fStltypeid"
|
|
@@ -428,12 +472,12 @@
|
|
|
<el-row>
|
|
|
<el-col :offset="17" :span="6">
|
|
|
<el-button
|
|
|
+ v-if="dataShowcar == '0'"
|
|
|
@click="
|
|
|
detailsHidden2
|
|
|
? (detailsHidden2 = false)
|
|
|
: (detailsHidden2 = true)
|
|
|
"
|
|
|
- v-if="this.dataShowcar == 1"
|
|
|
>{{ detailsHidden2 ? "隐藏" : "更多" }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
@@ -739,7 +783,7 @@
|
|
|
>撤回调拨
|
|
|
</el-button>
|
|
|
<el-dropdown @command="handleCommand" style="margin-left: 10px">
|
|
|
- <el-button :disabled="browseStatus" size="small" type="success">
|
|
|
+ <el-button size="small" type="success">
|
|
|
打印单据<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
@@ -2846,7 +2890,7 @@
|
|
|
>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- v-if="approVal === true"
|
|
|
+ v-if="approVal === true && form.fBillstatus == 6"
|
|
|
@click="addOrUpdateHand(form, 'f_billstatus')"
|
|
|
>审批</el-button
|
|
|
>
|
|
@@ -2854,17 +2898,17 @@
|
|
|
>保 存</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
- :disabled="browseStatus"
|
|
|
+ :disabled="form.fBillstatus > 3"
|
|
|
style="background-color: #008000; color: #fff"
|
|
|
@click="submitForm()"
|
|
|
>请核</el-button
|
|
|
>
|
|
|
- <el-button type="danger" v-if="form.fBillstatus === 6" @click="revoke"
|
|
|
+ <el-button type="danger" v-if="form.fBillstatus == 6" @click="revoke"
|
|
|
>撤销请核</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
type="danger"
|
|
|
- v-if="form.fBillstatus === 4 && current == before"
|
|
|
+ v-if="form.fBillstatus == 4 && current == before"
|
|
|
:disabled="doNot"
|
|
|
@click="revokeTwo('f_billstatus')"
|
|
|
>撤销审批</el-button
|
|
@@ -2877,7 +2921,6 @@
|
|
|
<script>
|
|
|
import print from "print-js";
|
|
|
import {
|
|
|
- backFee,
|
|
|
RevocationApproval,
|
|
|
addWhgenleg,
|
|
|
getStockTransferList,
|
|
@@ -2892,6 +2935,10 @@ import {
|
|
|
exportStockTransfer,
|
|
|
delstockTransfer_s,
|
|
|
serialNumber,
|
|
|
+ revoke,
|
|
|
+ submitWarehousingApproval,
|
|
|
+ ordersRevoke,
|
|
|
+ checkCode,
|
|
|
} from "@/api/warehouseBusiness/stockTransfer";
|
|
|
import { operationAgreement } from "@/api/agreement/agreement";
|
|
|
import { listCorps } from "@/api/basicdata/corps";
|
|
@@ -3378,6 +3425,7 @@ export default {
|
|
|
dataShowcar: null,
|
|
|
tfNetweightnum: 0,
|
|
|
tfGrossweightnum: 0,
|
|
|
+ showApproval: null,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -3416,9 +3464,11 @@ export default {
|
|
|
});
|
|
|
this.getConfigKey("data_showcar").then((response) => {
|
|
|
this.dataShowcar = response.msg;
|
|
|
- if (this.dataShowcar == "1") {
|
|
|
+ if (this.dataShowcar == "0") {
|
|
|
this.detailsHidden2 = false;
|
|
|
this.form.fBusinessType = "0";
|
|
|
+ } else {
|
|
|
+ this.detailsHidden2 = true;
|
|
|
}
|
|
|
});
|
|
|
listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
|
|
@@ -3451,6 +3501,9 @@ export default {
|
|
|
listCorps({ fTypeid: 2 }).then((response) => {
|
|
|
this.fleetOptions = response.rows;
|
|
|
});
|
|
|
+ this.getConfigKey("outStock.orders.approvalFlow").then((response) => {
|
|
|
+ this.showApproval = response.msg;
|
|
|
+ });
|
|
|
this.company = localStorage.getItem("companyName");
|
|
|
this.queryUser();
|
|
|
this.getRow();
|
|
@@ -3494,8 +3547,10 @@ export default {
|
|
|
this.warehouseCrList = [];
|
|
|
this.warehouseDrList = [];
|
|
|
this.CntrTable = [];
|
|
|
- if (this.dataShowcar == "1") {
|
|
|
+ if (this.dataShowcar == "0") {
|
|
|
this.detailsHidden2 = false;
|
|
|
+ } else {
|
|
|
+ this.detailsHidden2 = true;
|
|
|
}
|
|
|
if (this.$route.query.id) {
|
|
|
this.approVal = true;
|
|
@@ -3817,16 +3872,16 @@ export default {
|
|
|
this.addOrUpdateVisib = false;
|
|
|
this.$router.push({ path: "/index" });
|
|
|
},
|
|
|
- addOrUpdateHandle(form,status) {
|
|
|
+ addOrUpdateHandle(form, status) {
|
|
|
this.addOrUpdateVisible = true;
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.addOrUpdate.init(form.fId, 140,status);
|
|
|
+ this.$refs.addOrUpdate.init(form.fId, 140, status);
|
|
|
});
|
|
|
},
|
|
|
- addOrUpdateHand(form,status) {
|
|
|
+ addOrUpdateHand(form, status) {
|
|
|
this.addOrUpdateVisib = true;
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.ApprovalComments.init(form.fId,status,140);
|
|
|
+ this.$refs.ApprovalComments.init(form.fId, status, 140);
|
|
|
});
|
|
|
},
|
|
|
changefStltype(row) {
|
|
@@ -4199,7 +4254,7 @@ export default {
|
|
|
getForm() {
|
|
|
getStockTransfer(this.chiId).then((response) => {
|
|
|
this.form = response.data.warehousebills;
|
|
|
- if (this.form.fBillstatus > 2) {
|
|
|
+ if (this.form.fBillstatus > 3) {
|
|
|
this.approvalStatus = false;
|
|
|
this.browseStatus = true;
|
|
|
} else {
|
|
@@ -4427,6 +4482,112 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ verifyForm() {
|
|
|
+ let checkData = {
|
|
|
+ fId: this.form.fId,
|
|
|
+ fType: "warehouse",
|
|
|
+ codeVal: this.form.fDateChanged,
|
|
|
+ };
|
|
|
+ checkCode(checkData).then((response) => {
|
|
|
+ if (!response) {
|
|
|
+ this.$confirm("数据发生变化,请更新一下数据?", "提示", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ this.getForm();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.updateDeduplication();
|
|
|
+ this.form.fBillingway = this.form.fFeetUnit;
|
|
|
+ this.form.fFeetunit = this.form.fFeetUnit;
|
|
|
+ if (this.detailList.length == 0) {
|
|
|
+ this.form.fNetweight = 0;
|
|
|
+ this.form.fPlanvolumn = 0;
|
|
|
+ this.form.fGrossweight = 0;
|
|
|
+ } else {
|
|
|
+ this.form.fNetweight = this.fNetweight;
|
|
|
+ this.form.fPlanvolumn = this.fPlanvolumn;
|
|
|
+ this.form.fGrossweight = this.fGrossweight;
|
|
|
+ }
|
|
|
+ let formData = new window.FormData();
|
|
|
+ // 附件数据
|
|
|
+ this.form.fQty = this.fQty;
|
|
|
+ if (this.CntrTable.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.CntrTable.map((e) => {
|
|
|
+ this.cntrList.map((item) => {
|
|
|
+ if (item.fId == e.fCntrid) {
|
|
|
+ arr.push(item.fName + "X" + e.fCntrcount);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fCntval = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fCntval = null;
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ this.goodsOptions.map((item) => {
|
|
|
+ if (e.fGoodsid == item.fId) {
|
|
|
+ arr.push(item.fName);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fProductName = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fProductName = "";
|
|
|
+ }
|
|
|
+ if (this.detailList.length > 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.detailList.map((e) => {
|
|
|
+ arr.push(e.fMarks);
|
|
|
+ });
|
|
|
+ arr = [...new Set(arr)];
|
|
|
+ this.form.fMarks = arr.join(",");
|
|
|
+ } else {
|
|
|
+ this.form.fMarks = "";
|
|
|
+ }
|
|
|
+ formData.append("tWarehouseBills", JSON.stringify(this.form));
|
|
|
+ // 库存明细
|
|
|
+ formData.append(
|
|
|
+ "tWarehousebillsitems",
|
|
|
+ JSON.stringify(this.detailList)
|
|
|
+ );
|
|
|
+ // 附件数据
|
|
|
+ formData.append(
|
|
|
+ "tEnclosure",
|
|
|
+ JSON.stringify(this.relevantAttachments)
|
|
|
+ );
|
|
|
+ // 费用明细付款
|
|
|
+ formData.append(
|
|
|
+ "tWarehousebillsfeesCr",
|
|
|
+ JSON.stringify(this.warehouseCrList)
|
|
|
+ );
|
|
|
+ // 收款
|
|
|
+ formData.append(
|
|
|
+ "tWarehousebillsfeesDr",
|
|
|
+ JSON.stringify(this.warehouseDrList)
|
|
|
+ );
|
|
|
+ formData.append("mblnoStatus", JSON.stringify(this.mblnoStatus));
|
|
|
+ formData.append("tCntr", JSON.stringify(this.CntrTable));
|
|
|
+ submitWarehousingApproval(formData).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.msgSuccess("请核成功");
|
|
|
+ this.$set(this.form, "warehouseStatus", 4);
|
|
|
+ this.cancel();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
saveForm(status) {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -4763,6 +4924,23 @@ export default {
|
|
|
this.whgenlegTotal = response.total;
|
|
|
});
|
|
|
},
|
|
|
+ //撤销请核
|
|
|
+ revoke() {
|
|
|
+ revoke(this.form.fId).then((data) => {
|
|
|
+ if (data.code === 200) {
|
|
|
+ this.browseStatus = false;
|
|
|
+ this.msgSuccess("撤销成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ ordersRevoke() {
|
|
|
+ ordersRevoke(this.form.fId).then((data) => {
|
|
|
+ if (data.code === 200) {
|
|
|
+ this.$set(this.form, "warehouseStatus", 2);
|
|
|
+ this.msgSuccess("撤销成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
printZyd() {
|
|
|
if (this.Printinglist.length > 0) {
|
|
|
for (let item in this.Printinglist) {
|