|
@@ -659,6 +659,7 @@ import {
|
|
|
RetreatFtmsorderbills,
|
|
|
allowChangesFtmsorderbills,
|
|
|
planChangeFtmsorderbills,
|
|
|
+ changeStatus
|
|
|
} from "@/api/fleet/ftmsorderbills";
|
|
|
import { getBasicInformation } from "@/api/kaihe/basicdata/container";
|
|
|
import { company } from "@/api/fleet/carManage";
|
|
@@ -919,25 +920,50 @@ 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", JSON.stringify(this.relevantAttachments));
|
|
|
formData.append("scntrs", JSON.stringify(this.planList));
|
|
|
formData.append("fees", JSON.stringify([]));
|
|
|
formData.append("plans", JSON.stringify(this.schedulingList));
|
|
|
- if (this.form.billStatus != 5) {
|
|
|
- addFtmsorderbills(formData).then((response) => {
|
|
|
- this.msgSuccess("提交成功");
|
|
|
- this.$parent.getList();
|
|
|
- this.showDialog = false;
|
|
|
- });
|
|
|
- } else {
|
|
|
- planChangeFtmsorderbills(formData).then((response) => {
|
|
|
- this.msgSuccess("修改成功");
|
|
|
- this.$parent.getList();
|
|
|
- this.showDialog = false;
|
|
|
+ for (let item in this.planList){
|
|
|
+ console.log(JSON.stringify(this.planList[item].cntrQty))
|
|
|
+ if (JSON.stringify(this.planList[item].cntrQty) !== undefined ?JSON.stringify(this.planList[item].cntrQty).length === 0:JSON.stringify(this.planList[item].cntrQty) === undefined) return this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: (Number(item)+1) +'行计划货量不能为空',
|
|
|
+ type: 'error'
|
|
|
});
|
|
|
}
|
|
|
+ this.$confirm('请确认已保存, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ if (this.form.billStatus != 5) {
|
|
|
+ addFtmsorderbills(formData).then((response) => {
|
|
|
+ this.msgSuccess("提交成功");
|
|
|
+ this.$parent.getList();
|
|
|
+ this.showDialog = false;
|
|
|
+ if (response.code === 200){
|
|
|
+ changeStatus(this.form.id)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ planChangeFtmsorderbills(formData).then((response) => {
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.$parent.getList();
|
|
|
+ this.showDialog = false;
|
|
|
+ if (response.code === 200){
|
|
|
+ console.log(this.form)
|
|
|
+ changeStatus(this.form.id)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消提交'
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|