Browse Source

改单费加上接单时间比较判断

Qukatie 5 days ago
parent
commit
58fb0fadc2

+ 15 - 6
src/views/iosBasicData/SeafreightExportF/bills/assembly/DocumentCenter.vue

@@ -196,7 +196,7 @@
 
 <script>
 import { getList as reportsList, reportsGetReportData, reportsDetail, reportsRemove, getList } from "@/api/iosBasicData/reports";
-import { reportslogList, reportslogSubmit,generateAmendmentFee} from "@/api/iosBasicData/bills";
+import { reportslogList, reportslogSubmit, generateAmendmentFee } from "@/api/iosBasicData/bills";
 import { bbusinesstypeList } from "@/api/iosBasicData/bbusinesstype";
 import bbusinesstype from "@/views/iosBasicData/bbusinesstype/index.vue";
 import reportformsList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsList.vue";
@@ -416,7 +416,7 @@ export default {
       addShow: false,
       mttachedGoodsdesc: 15,
       mttachedMark: 15,
-      mttachedCntry: 3,
+      mttachedCntry: 3
     };
   },
   props: {
@@ -690,7 +690,6 @@ export default {
       console.log(obj);
       // 保存
       reportslogSubmit(obj).then(res => {
-        
         this.addShow = true;
         if (type) {
           let documentaa = null; // 暂存url数据
@@ -752,9 +751,11 @@ export default {
           });
         } else {
           this.$message.success("操作成功");
-          generateAmendmentFee({id:this.assemblyForm.id}).then(res=>{
-            this.$emit("billsDetailfun");
-          })
+          if (this.compareDates(this.assemblyForm.cyTrailerTime)) {
+            generateAmendmentFee({ id: this.assemblyForm.id }).then(res => {
+              this.$emit("billsDetailfun");
+            });
+          }
           this.reportslogListfun(this.documentPage, { ...this.query, reportsCode: res.data.data.reportsCode });
           // this.editData = {};
           this.documentForm = JSON.parse(res.data.data.printContent).data;
@@ -763,6 +764,14 @@ export default {
         }
       });
     },
+    compareDates(dateStr1) {
+      if (dateStr1) {
+        const timestamp1 = new Date(dateStr1).getTime();
+        const timestamp2 = new Date().getTime();
+        return timestamp1 < timestamp2;
+      }
+      return false;
+    },
     // 打印取消
     printingCanceling() {
       this.editData = {};

+ 3 - 3
src/views/iosBasicData/businessCenter/customerBooking/detailsPage.vue

@@ -886,7 +886,7 @@
                 <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0" @click="allClick('批量删除')"
                   >批量删除</el-button
                 >
-                <el-button v-if="form.issueStatus > 0" type="success" plain size="small" @click="allClick('提交箱型')">修改预配箱</el-button>
+                <el-button v-if="form.issueStatus > 0" type="success" plain size="small" @click="allClick('修改预配箱')">修改预配箱</el-button>
               </template>
               <template slot="indexHeader" slot-scope="{ row, index }">
                 <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled || !form.id" circle @click="addRow()"> </el-button>
@@ -2540,8 +2540,8 @@ export default {
           }
         });
       }
-      if (name == "提交箱型") {
-        this.$confirm("是否提交箱型?", "提示", {
+      if (name == "修改预配箱") {
+        this.$confirm("是否修改预配箱?", "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"