|
@@ -645,7 +645,7 @@
|
|
|
<el-select
|
|
|
v-model="scope.row.cntrId"
|
|
|
placeholder="请选择箱型"
|
|
|
- :disabled="disabled || scope.row.billStatus == 6"
|
|
|
+ :disabled="scope.row.billStatus >= 6"
|
|
|
@change="checkPid(scope.row)"
|
|
|
>
|
|
|
<el-option
|
|
@@ -664,12 +664,12 @@
|
|
|
prop="carcorPid"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-select
|
|
|
+ <el-select
|
|
|
v-model="scope.row.carcorPid"
|
|
|
placeholder="请输入车队名称"
|
|
|
:clearable="true"
|
|
|
filterable
|
|
|
- :disabled="disabled || scope.row.billStatus == 6"
|
|
|
+ :disabled="scope.row.billStatus >= 6"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(dict, index) in companyList"
|
|
@@ -692,7 +692,7 @@
|
|
|
v-model="scope.row.cntrQty"
|
|
|
placeholder="调度安排货量"
|
|
|
v-input-limit="2"
|
|
|
- :disabled="disabled || scope.row.billStatus == 6"
|
|
|
+ :disabled="scope.row.billStatus >= 6"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -714,7 +714,7 @@
|
|
|
<el-input
|
|
|
v-model="scope.row.remarks"
|
|
|
placeholder="备注"
|
|
|
- :disabled="disabled || scope.row.billStatus == 6"
|
|
|
+ :disabled="scope.row.billStatus >= 6"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -723,7 +723,7 @@
|
|
|
label="操作"
|
|
|
align="center"
|
|
|
class-name="small-padding fixed-width"
|
|
|
- width="150"
|
|
|
+ width="200"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -733,7 +733,7 @@
|
|
|
@click.native.prevent="
|
|
|
delplansRow(scope.$index, schedulingList, scope.row)
|
|
|
"
|
|
|
- :disabled="disabled || scope.row.billStatus == 6"
|
|
|
+ :disabled="scope.row.billStatus >= 6"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -741,7 +741,7 @@
|
|
|
type="text"
|
|
|
icon="el-icon-document-checked"
|
|
|
@click.native.prevent="addplansRow(scope.row)"
|
|
|
- :disabled="disabled || scope.row.billStatus == 6"
|
|
|
+ :disabled="scope.row.billStatus >= 6"
|
|
|
>提交</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -754,6 +754,14 @@
|
|
|
:disabled="true"
|
|
|
>撤销</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ @click.native.prevent="changeplansRow(scope.row)"
|
|
|
+ :disabled="scope.row.billStatus < 6"
|
|
|
+ >变更</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -1272,14 +1280,19 @@
|
|
|
>提 交</el-button
|
|
|
>
|
|
|
<!-- <el-button type="success" @click="submitFix">修改</el-button> -->
|
|
|
- <el-button type="success" @click="submitAllowChanges">修 改</el-button>
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ @click="submitAllowChanges"
|
|
|
+ :disabled="this.form.billStatus < 6"
|
|
|
+ >修 改</el-button
|
|
|
+ >
|
|
|
<el-button type="info" @click="submitSave" :disabled="disabled"
|
|
|
>保 存</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
type="warning"
|
|
|
@click="submitRetreat"
|
|
|
- :disabled="this.form.billStatus != 40"
|
|
|
+ :disabled="this.form.billStatus < 6"
|
|
|
>撤 回</el-button
|
|
|
>
|
|
|
<el-button @click="showDialog = false">取 消</el-button>
|
|
@@ -1299,6 +1312,8 @@ import {
|
|
|
singleaddFtmsorderbillsplans,
|
|
|
revokeFtmsorderbillsplans,
|
|
|
removeFtmsorderbillsplans,
|
|
|
+ changeFtmsorderbillsplans,
|
|
|
+ planChangeFtmsorderbillsplans,
|
|
|
} from "@/api/fleet/ftmsorderbillsplans";
|
|
|
import { company } from "@/api/fleet/carManage";
|
|
|
import { listGoods } from "@/api/basicdata/goods";
|
|
@@ -1419,8 +1434,8 @@ export default {
|
|
|
ffeeunitidList: [],
|
|
|
collapses2: [],
|
|
|
polList: [],
|
|
|
- podList:[],
|
|
|
- companyList:[],
|
|
|
+ podList: [],
|
|
|
+ companyList: [],
|
|
|
uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
|
|
|
headers: {
|
|
|
Authorization: "Bearer " + getToken(),
|
|
@@ -1465,7 +1480,7 @@ export default {
|
|
|
listFees().then((response) => {
|
|
|
this.fWbuOptions = response.rows;
|
|
|
});
|
|
|
- company({
|
|
|
+ company({
|
|
|
delFlag: "0",
|
|
|
billStatus: 6,
|
|
|
}).then((response) => {
|
|
@@ -1577,9 +1592,11 @@ export default {
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- let arr = this.schedulingList.filter((e) => e.billStatus == 6);
|
|
|
+ let arr = this.schedulingList.filter((e) => e.billStatus >= 6);
|
|
|
if (this.schedulingList.length == arr.length) {
|
|
|
- this.form["billStatus"] = "6";
|
|
|
+ if (this.form.billStatus != 5) {
|
|
|
+ this.form["billStatus"] = "6";
|
|
|
+ }
|
|
|
this.DList.map((e) => {
|
|
|
return (e.fDc = "D");
|
|
|
});
|
|
@@ -1600,6 +1617,7 @@ export default {
|
|
|
}
|
|
|
this.form["cntrDesc"] = this.cntrDesc;
|
|
|
let formData = new window.FormData();
|
|
|
+ console.log(this.form);
|
|
|
formData.append("tmsorder", JSON.stringify(this.form));
|
|
|
formData.append(
|
|
|
"attachs",
|
|
@@ -1611,7 +1629,7 @@ export default {
|
|
|
JSON.stringify(this.DList.concat(this.CList))
|
|
|
);
|
|
|
formData.append("plans", JSON.stringify(this.schedulingList));
|
|
|
- if (this.form.billStatus != 50) {
|
|
|
+ if (this.form.billStatus != 5) {
|
|
|
addFtmsorderbills(formData).then((response) => {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.$parent.getList();
|
|
@@ -1658,12 +1676,13 @@ export default {
|
|
|
},
|
|
|
//撤回
|
|
|
submitRetreat() {
|
|
|
- if (this.form.billStatus <= 3) {
|
|
|
- const data = { id: this.form.id };
|
|
|
+ if (this.form.billStatus >= 6) {
|
|
|
+ const data = { id: this.form.id,actId: 1000 };
|
|
|
RetreatFtmsorderbills(data).then((response) => {
|
|
|
if (response.code == 200) {
|
|
|
this.msgSuccess("撤回成功");
|
|
|
this.$parent.getList();
|
|
|
+ this.$set(this.form, "billStatus", 3);
|
|
|
this.$emit("fixDisabled", "false");
|
|
|
}
|
|
|
});
|
|
@@ -1673,40 +1692,34 @@ export default {
|
|
|
},
|
|
|
//修改
|
|
|
submitAllowChanges() {
|
|
|
- this.$emit("fixDisabled", "false");
|
|
|
- this.msgSuccess("允许修改");
|
|
|
- // if (this.form.billStatus == 20 || this.form.billStatus == 50) {
|
|
|
- // this.$emit("fixDisabled", "false");
|
|
|
- // this.msgSuccess("允许修改");
|
|
|
- // } else if (this.form.billStatus == 30) {
|
|
|
- // this.msgSuccess("单据已撤销不允许修改");
|
|
|
- // } else if (this.form.billStatus > 50) {
|
|
|
- // this.msgSuccess("单据已进行业务调度不允许修改");
|
|
|
- // } else {
|
|
|
- // this.$confirm("该单据已经提交,是否进行变更操作?", "提示", {
|
|
|
- // confirmButtonText: "确定",
|
|
|
- // cancelButtonText: "取消",
|
|
|
- // type: "warning",
|
|
|
- // })
|
|
|
- // .then(() => {
|
|
|
- // const data = { id: this.form.id, billType: 1000 };
|
|
|
- // allowChangesFtmsorderbills(data).then((response) => {
|
|
|
- // if (response.code == 200) {
|
|
|
- // this.$emit("fixDisabled", "false");
|
|
|
- // this.msgSuccess("允许修改");
|
|
|
- // this.$set(this.form, "billStatus", 50);
|
|
|
- // } else {
|
|
|
- // this.msgSuccess("不允许修改");
|
|
|
- // }
|
|
|
- // });
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // this.$message({
|
|
|
- // type: "info",
|
|
|
- // message: "已取消",
|
|
|
- // });
|
|
|
- // });
|
|
|
- // }
|
|
|
+ if (this.form.billStatus < 6) {
|
|
|
+ this.$emit("fixDisabled", "false");
|
|
|
+ this.msgSuccess("允许修改");
|
|
|
+ } else {
|
|
|
+ this.$confirm("该单据已经提交,是否进行变更操作?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ const data = { id: this.form.id, actId: 1000 };
|
|
|
+ allowChangesFtmsorderbills(data).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.$emit("fixDisabled", "false");
|
|
|
+ this.msgSuccess("允许修改");
|
|
|
+ this.$set(this.form, "billStatus", 5);
|
|
|
+ } else {
|
|
|
+ this.msgSuccess("不允许修改");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已取消",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
//调度安排新增
|
|
|
addschedulingRow(tableData, event) {
|
|
@@ -1739,11 +1752,18 @@ export default {
|
|
|
},
|
|
|
//单条订单调度提交
|
|
|
addplansRow(row) {
|
|
|
- console.log(row);
|
|
|
- if (row.billStatus != 6) {
|
|
|
- let formData = new window.FormData();
|
|
|
- formData.append("tmsorder", JSON.stringify(this.form));
|
|
|
- formData.append("plans", JSON.stringify(row));
|
|
|
+ let formData = new window.FormData();
|
|
|
+ formData.append("tmsorder", JSON.stringify(this.form));
|
|
|
+ formData.append("plans", JSON.stringify(row));
|
|
|
+ if (row.billStatus == 5) {
|
|
|
+ planChangeFtmsorderbillsplans(formData).then((response) => {
|
|
|
+ this.msgSuccess("成功提交");
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.$set(row, "billStatus", 6);
|
|
|
+ this.$set(row, "disabled", true);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else if (row.billStatus != 6) {
|
|
|
singleaddFtmsorderbillsplans(formData).then((response) => {
|
|
|
this.msgSuccess("成功提交");
|
|
|
if (response.code == 200) {
|
|
@@ -1779,6 +1799,18 @@ export default {
|
|
|
this.msgSuccess("此条数据没有提交,不能申请撤回");
|
|
|
}
|
|
|
},
|
|
|
+ changeplansRow(row) {
|
|
|
+ if (row.billStatus != 5) {
|
|
|
+ changeFtmsorderbillsplans(row).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.msgSuccess("允许变更");
|
|
|
+ this.$set(row, "billStatus", 5);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.msgSuccess("请勿重复变更");
|
|
|
+ }
|
|
|
+ },
|
|
|
mbinput(val) {
|
|
|
this.form.mblno = val.toUpperCase();
|
|
|
},
|