Просмотр исходного кода

7.海运出口ETA 修改赋值规则并添加快捷项
8.客户订舱 新加ATD 船名 航次检索条件

qukaidi 2 дней назад
Родитель
Сommit
f85f934829

+ 3 - 3
src/lang/en.js

@@ -332,8 +332,8 @@ export default {
     clearancePieceWeightScale:'clearancePieceWeightScale',
     clearanceAllPieceWeightScale:'clearanceAllPieceWeightScale',
     billModify:'billModify',
-    today:'today',
-    tomorrow:'tomorrow',
-    week:'week',
+    today:'TODAY',
+    tomorrow:'TOMORROW',
+    week:'WEEK',
   }
 }

+ 1 - 1
src/views/boxManagement/boxAdjustment/components/containerNumber.vue

@@ -334,7 +334,7 @@ export default {
           this.loading = false;
         });
     },
-    openDialog(val) {
+    openDialog(val, form) {
       this.dialogVisible = true;
       this.quotationObj = null;
       this.query = {};

+ 1 - 1
src/views/boxManagement/boxAdjustment/detailsPage.vue

@@ -2238,7 +2238,7 @@ export default {
         // if (!row) {
         //   return this.$message.error("请输入放箱号");
         // }
-        this.$refs.container.openDialog(row);
+        this.$refs.container.openDialog(row,this.form);
       }
       if (name == "box一键保存") {
         if (!this.form.boxTypeList.length) {

+ 8 - 1
src/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/containers.vue

@@ -577,9 +577,16 @@ export default {
             overHidden: true
           },
           {
+            label: "放箱号",
+            prop: "containerNumber",
+            width: 100,
+            overHidden: true
+          },
+          {
             label: "PODCY",
             prop: "podStationCname",
-            width: "140"
+            width: "140",
+            overHidden: true
           },
           {
             label: "POLCY",

+ 232 - 130
src/views/iosBasicData/businessCenter/customerBooking/detailsPage.vue

@@ -506,7 +506,7 @@
                     </el-col>
                   </el-row>
                   <el-row>
-                    <el-col span="12">
+                    <el-col span="8">
                       <el-form-item
                         label="ETD"
                         prop="etd"
@@ -532,7 +532,22 @@
                         </el-date-picker>
                       </el-form-item>
                     </el-col>
-                    <el-col span="12">
+                    <el-col span="8">
+                      <el-form-item label="ATD" prop="actualEtd">
+                        <el-date-picker
+                          v-model="form.actualEtd"
+                          type="date"
+                          placeholder="请选择 ATD"
+                          :disabled="true"
+                          size="small"
+                          format="yyyy-MM-dd"
+                          value-format="yyyy-MM-dd"
+                          style="width: 100%;"
+                        >
+                        </el-date-picker>
+                      </el-form-item>
+                    </el-col>
+                    <el-col span="8">
                       <el-form-item label="订舱日期" prop="bookingDate">
                         <el-date-picker
                           v-model="form.bookingDate"
@@ -2704,6 +2719,126 @@ export default {
         });
       }
       if (name == "提交订舱") {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (lineQuantityVerification(this.form.detail.hshipperDetails, this.lineLength)) {
+              return this.$message.error(`发货人详情超长,请手动断行,否则影响打印`);
+            }
+            if (lineQuantityVerification(this.form.detail.hconsigneeDetails, this.lineLength)) {
+              return this.$message.error(`收货人详情超长,请手动断行,否则影响打印`);
+            }
+            if (lineQuantityVerification(this.form.detail.hnotifyDetails, this.lineLength)) {
+              return this.$message.error(`通知人详情超长,请手动断行,否则影响打印`);
+            }
+            if (!this.form.preContainersList.length) {
+              return this.$message.error("集装箱明细不能为空");
+            }
+            let htmlText = [];
+            for (let item of this.form.preContainersList) {
+              if (!item.id) {
+                return this.$message.error("请保存数据");
+              }
+              if (!item.cntrTypeCode || !item.quantity) {
+                this.$refs.crud.rowCell(item, item.$index);
+                return this.$message.error("请完善明细信息");
+              }
+              htmlText.push(item.cntrTypeCode + "*" + item.quantity);
+            }
+            for (let item of this.form.containersList) {
+              if (!item.id) {
+                return this.$message.error("请保存数据");
+              }
+              let textList = [];
+              if (!item.cntrTypeCode) {
+                textList.push("箱型");
+              }
+              if (!item.cntrNo) {
+                textList.push("箱号");
+              }
+              if (!item.sealNo) {
+                textList.push("封号");
+              }
+              if (!item.quantity || Number(item.quantity) == 0) {
+                textList.push("件数");
+              }
+              if (!item.grossWeight || Number(item.grossWeight) == 0) {
+                textList.push("毛重");
+              }
+              if (!item.measurement || Number(item.measurement) == 0) {
+                textList.push("尺码/体积");
+              }
+              if (textList.length) {
+                return this.$message.error(`请完善配箱信息的${textList.join(",")}!`);
+              }
+            }
+            let qtySUM = 0;
+            let gwtSUM = 0;
+            let mrtSUM = 0;
+            for (let item of this.form.containersList) {
+              qtySUM += Number(item.quantity ? item.quantity : 0);
+              gwtSUM += Number(item.grossWeight ? item.grossWeight : 0);
+              mrtSUM += Number(item.measurement ? item.measurement : 0);
+            }
+            if (qtySUM != this.form.quantity || gwtSUM != this.form.grossWeight || mrtSUM != this.form.measurement) {
+              this.$alert(
+                `<table border="1" align="center" style="width:100%;color:#F56C6C">
+                  <tr>
+                    <th align="center">合计名称</th>
+                    <th align="center">件数</th>
+                    <th align="center">毛重</th>
+                    <th align="center">尺码</th>
+                  </tr>
+                  <tr>
+                    <td align="center">提单合计</td>
+                    <td align="center">${Number(this.form.quantity)}</td>
+                    <td align="center">${Number(this.form.grossWeight)}</td>
+                    <td align="center">${Number(this.form.measurement)}</td>
+                  </tr>
+                  <tr>
+                    <td align="center">分箱合计</td>
+                    <td align="center">${qtySUM}</td>
+                    <td align="center">${gwtSUM}</td>
+                    <td align="center">${mrtSUM}</td>
+                  </tr>
+                </table>
+                <span style="color:#F56C6C">校验不相等,请检查!</span>`,
+                "提示",
+                {
+                  dangerouslyUseHTMLString: true
+                }
+              );
+              return;
+            }
+            submit(this.form).then(res => {
+              this.$confirm(`预定集装箱:${htmlText.join(",")}<br/>是否提交订舱?`, {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                dangerouslyUseHTMLString: true,
+                type: "warning"
+              }).then(() => {
+                this.form.businessType = "KHTS";
+                this.form.billNoFormat = "KHTS";
+                this.form.businessTypeCode = "KHTS";
+                const loading = this.$loading({
+                  lock: true,
+                  text: "加载中",
+                  spinner: "el-icon-loading",
+                  background: "rgba(255,255,255,0.7)"
+                });
+                submitCustomerBooking(this.form)
+                  .then(res => {
+                    this.$message.success("操作成功");
+                    this.getDetails(this.form.id);
+                  })
+                  .finally(() => {
+                    loading.close();
+                  });
+              });
+            });
+          } else {
+            return false;
+          }
+        });
         // if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
         //   let msg = [];
         //   for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
@@ -2764,83 +2899,6 @@ export default {
         //   });
         //   return;
         // }
-        if (lineQuantityVerification(this.form.detail.hshipperDetails, this.lineLength)) {
-          return this.$message.error(`发货人详情超长,请手动断行,否则影响打印`);
-        }
-        if (lineQuantityVerification(this.form.detail.hconsigneeDetails, this.lineLength)) {
-          return this.$message.error(`收货人详情超长,请手动断行,否则影响打印`);
-        }
-        if (lineQuantityVerification(this.form.detail.hnotifyDetails, this.lineLength)) {
-          return this.$message.error(`通知人详情超长,请手动断行,否则影响打印`);
-        }
-
-        if (!this.form.preContainersList.length) {
-          return this.$message.error("集装箱明细不能为空");
-        }
-        let htmlText = [];
-        for (let item of this.form.preContainersList) {
-          if (!item.id) {
-            return this.$message.error("请保存数据");
-          }
-          if (!item.cntrTypeCode || !item.quantity) {
-            this.$refs.crud.rowCell(item, item.$index);
-            return this.$message.error("请完善明细信息");
-          }
-          htmlText.push(item.cntrTypeCode + "*" + item.quantity);
-        }
-        for (let item of this.form.containersList) {
-          if (!item.id) {
-            return this.$message.error("请保存数据");
-          }
-          let textList = [];
-          if (!item.cntrTypeCode) {
-            textList.push("箱型");
-          }
-          if (!item.cntrNo) {
-            textList.push("箱号");
-          }
-          if (!item.sealNo) {
-            textList.push("封号");
-          }
-          if (!item.quantity || Number(item.quantity) == 0) {
-            textList.push("件数");
-          }
-          if (!item.grossWeight || Number(item.grossWeight) == 0) {
-            textList.push("毛重");
-          }
-          if (!item.measurement || Number(item.measurement) == 0) {
-            textList.push("尺码/体积");
-          }
-          if (textList.length) {
-            return this.$message.error(`请完善配箱信息的${textList.join(",")}!`);
-          }
-        }
-        submit(this.form).then(res => {
-          this.$confirm(`预定集装箱:${htmlText.join(",")}<br/>是否提交订舱?`, {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            dangerouslyUseHTMLString: true,
-            type: "warning"
-          }).then(() => {
-            this.form.businessType = "KHTS";
-            this.form.billNoFormat = "KHTS";
-            this.form.businessTypeCode = "KHTS";
-            const loading = this.$loading({
-              lock: true,
-              text: "加载中",
-              spinner: "el-icon-loading",
-              background: "rgba(255,255,255,0.7)"
-            });
-            submitCustomerBooking(this.form)
-              .then(res => {
-                this.$message.success("操作成功");
-                this.getDetails(this.form.id);
-              })
-              .finally(() => {
-                loading.close();
-              });
-          });
-        });
       }
       if (name == "撤销订舱") {
         this.$confirm("是否撤销订舱?", {
@@ -2866,7 +2924,7 @@ export default {
       }
       if (name == "提单修改") {
         if (this.overTime) {
-          return  this.$message.error("已超过截单日期,请联系客服!");;
+          return this.$message.error("已超过截单日期,请联系客服!");
         }
         this.flxDisabled = false;
         this.isSaveBtn = false;
@@ -2874,55 +2932,99 @@ export default {
         this.optionForm.disabled = false;
       }
       if (name == "提单确认") {
-        if (this.form.containersList.length == 0) {
-          return this.$message.error("配箱信息不能为空");
-        }
-        for (let item of this.form.containersList) {
-          let textList = [];
-          if (!item.cntrTypeCode) {
-            textList.push("箱型");
-          }
-          if (!item.cntrNo) {
-            textList.push("箱号");
-          }
-          if (!item.sealNo) {
-            textList.push("封号");
-          }
-          if (!item.quantity || Number(item.quantity) == 0) {
-            textList.push("件数");
-          }
-          if (!item.grossWeight || Number(item.grossWeight) == 0) {
-            textList.push("毛重");
-          }
-          if (!item.measurement || Number(item.measurement) == 0) {
-            textList.push("尺码/体积");
-          }
-          if (textList.length) {
-            return this.$message.error(`请完善配箱信息的${textList.join(",")}!`);
-          }
-        }
-        submit(this.form).then(res => {
-          this.form = res.data.data;
-          this.$confirm("是否提单确认?", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(() => {
-            const loading = this.$loading({
-              lock: true,
-              text: "加载中",
-              spinner: "el-icon-loading",
-              background: "rgba(255,255,255,0.7)"
-            });
-            submitConfirm(this.form)
-              .then(res => {
-                this.$message.success("操作成功");
-                this.getDetails(this.form.id);
-              })
-              .finally(() => {
-                loading.close();
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.containersList.length == 0) {
+              return this.$message.error("配箱信息不能为空");
+            }
+            for (let item of this.form.containersList) {
+              let textList = [];
+              if (!item.cntrTypeCode) {
+                textList.push("箱型");
+              }
+              if (!item.cntrNo) {
+                textList.push("箱号");
+              }
+              if (!item.sealNo) {
+                textList.push("封号");
+              }
+              if (!item.quantity || Number(item.quantity) == 0) {
+                textList.push("件数");
+              }
+              if (!item.grossWeight || Number(item.grossWeight) == 0) {
+                textList.push("毛重");
+              }
+              if (!item.measurement || Number(item.measurement) == 0) {
+                textList.push("尺码/体积");
+              }
+              if (textList.length) {
+                return this.$message.error(`请完善配箱信息的${textList.join(",")}!`);
+              }
+            }
+            let qtySUM = 0;
+            let gwtSUM = 0;
+            let mrtSUM = 0;
+            for (let item of this.form.containersList) {
+              qtySUM += Number(item.quantity ? item.quantity : 0);
+              gwtSUM += Number(item.grossWeight ? item.grossWeight : 0);
+              mrtSUM += Number(item.measurement ? item.measurement : 0);
+            }
+            if (qtySUM != this.form.quantity || gwtSUM != this.form.grossWeight || mrtSUM != this.form.measurement) {
+              this.$alert(
+                `<table border="1" align="center" style="width:100%;color:#F56C6C">
+                  <tr>
+                    <th align="center">合计名称</th>
+                    <th align="center">件数</th>
+                    <th align="center">毛重</th>
+                    <th align="center">尺码</th>
+                  </tr>
+                  <tr>
+                    <td align="center">提单合计</td>
+                    <td align="center">${Number(this.form.quantity)}</td>
+                    <td align="center">${Number(this.form.grossWeight)}</td>
+                    <td align="center">${Number(this.form.measurement)}</td>
+                  </tr>
+                  <tr>
+                    <td align="center">分箱合计</td>
+                    <td align="center">${qtySUM}</td>
+                    <td align="center">${gwtSUM}</td>
+                    <td align="center">${mrtSUM}</td>
+                  </tr>
+                </table>
+                <span style="color:#F56C6C">校验不相等,请检查!</span>`,
+                "提示",
+                {
+                  dangerouslyUseHTMLString: true
+                }
+              );
+              return;
+            }
+            submit(this.form).then(res => {
+              this.form = res.data.data;
+              this.$confirm("是否提单确认?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+              }).then(() => {
+                const loading = this.$loading({
+                  lock: true,
+                  text: "加载中",
+                  spinner: "el-icon-loading",
+                  background: "rgba(255,255,255,0.7)"
+                });
+                submitConfirm(this.form)
+                  .then(res => {
+                    this.$message.success("操作成功");
+                    this.getDetails(this.form.id);
+                  })
+                  .finally(() => {
+                    loading.close();
+                  });
               });
-          });
+            });
+          } else {
+            return false;
+          }
         });
       }
       if (name == "模板保存") {
@@ -2983,8 +3085,8 @@ export default {
         this.$refs.importTemp.openDialog();
       }
       if (name == "退舱") {
-        if(this.form.hblno){
-         return this.$message.error("已出号,退仓请联系客服!");
+        if (this.form.hblno) {
+          return this.$message.error("已出号,退仓请联系客服!");
         }
         this.$confirm("是否退舱?", {
           confirmButtonText: "确定",

+ 35 - 3
src/views/iosBasicData/businessCenter/customerBooking/index.vue

@@ -124,7 +124,7 @@ export default {
         menuWidth: 140,
         tip: false,
         searchShow: true,
-        searchMenuSpan: 18,
+        searchMenuSpan: 24,
         border: true,
         index: true,
         addBtn: false,
@@ -247,6 +247,12 @@ export default {
             overHidden: true
           },
           {
+            label: "联系人",
+            prop: "contact",
+            width: 100,
+            overHidden: true
+          },
+          {
             label: "ETD",
             prop: "etd",
             width: "100",
@@ -261,6 +267,20 @@ export default {
             searchDefaultTime: ["00:00:00", "23:59:59"]
           },
           {
+            label: "ATD",
+            prop: "actualEtd",
+            width: "100",
+            overHidden: true,
+            search: true,
+            type: "date",
+            searchProp: "actualEtdList",
+            unlinkPanels: true,
+            searchRange: true,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+            searchDefaultTime: ["00:00:00", "23:59:59"]
+          },
+          {
             label: "起运港",
             prop: "polEnName",
             width: "80",
@@ -471,12 +491,24 @@ export default {
             label: "船名",
             prop: "vesselCnName",
             width: "100",
+            search: true,
+            type: "select",
+            filterable: true,
+            remote: true,
+            allowCreate: true,
+            dicUrl: "/api/blade-los/bvessels/list?cnName={{key}}",
+            props: {
+              label: "cnName",
+              value: "cnName",
+              res: "data.records"
+            },
             overHidden: true
           },
           {
             label: "航次",
             prop: "voyageNo",
             width: "100",
+            search: true,
             overHidden: true
           },
           {
@@ -534,7 +566,7 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(513), this.optionBack);
     this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content;
     if (this.saberUserInfo.role_name.indexOf("admin") != -1 || this.saberUserInfo.role_name.indexOf("总部") != -1) {
-      this.option.searchMenuSpan = 12;
+      this.option.searchMenuSpan = 18;
       this.option.column.forEach(item => {
         if (item.prop == "branchId") {
           item.search = true;
@@ -720,7 +752,7 @@ export default {
       this[option] = this[optionBack];
       const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
       if (this.saberUserInfo.role_name.indexOf("admin") != -1 || this.saberUserInfo.role_name.indexOf("总部") != -1) {
-        this.option.searchMenuSpan = 12;
+        this.option.searchMenuSpan = 18;
         this.option.column.forEach(item => {
           if (item.prop == "branchId") {
             item.search = true;