Ver Fonte

箱型箱量新增前 数据有变化时提醒保存

qukaidi há 3 semanas atrás
pai
commit
236ab1babb

+ 6 - 0
src/components/iosbasic-data/shipCopy.vue

@@ -119,6 +119,12 @@ export default {
             search: true
           },
           {
+            label: this.$t("sea118n.ctnrTypeQty"),
+            prop: "quantityCntrDescr",
+            width: 100,
+            overHidden: true
+          },
+          {
             label: this.$t("sea118n.pol"),
             prop: "polEnName",
             type: "select",

+ 32 - 6
src/views/boxManagement/boxCost/detailsPage.vue

@@ -3,7 +3,7 @@
     <div class="customer-head">
       <div class="customer-back">
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="goBack()">返回列表 </el-button>
-     <el-button v-if="form.id && pageIds.length" type="text" @click="lastPage">上一票</el-button>
+        <el-button v-if="form.id && pageIds.length" type="text" @click="lastPage">上一票</el-button>
         <el-button v-if="form.id && pageIds.length" type="text" @click="nextPage">下一票</el-button>
       </div>
       <div class="add-customer-btn">
@@ -454,7 +454,7 @@
                   :controls="false"
                   placeholder="请输入 汇率"
                   size="small"
-                  :disabled="row.curCode==getLocalCurrency()"
+                  :disabled="row.curCode == getLocalCurrency()"
                   style="width: 100%;"
                 ></el-input-number>
                 <span v-else>{{ row.exrate }}</span>
@@ -684,7 +684,7 @@
                   :controls="false"
                   placeholder="请输入 汇率"
                   size="small"
-                  :disabled="row.curCode==getLocalCurrency()"
+                  :disabled="row.curCode == getLocalCurrency()"
                   style="width: 100%;"
                 ></el-input-number>
                 <span v-else>{{ row.exrate }}</span>
@@ -1779,6 +1779,16 @@ export default {
             ]
           },
           {
+            label: "财务日期",
+            prop: "billDate",
+            width: 100,
+            overHidden: true,
+            cell: true,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd"
+          },
+          {
             label: "类别",
             prop: "billType",
             width: 100,
@@ -2083,6 +2093,16 @@ export default {
             ]
           },
           {
+            label: "财务日期",
+            prop: "billDate",
+            width: 100,
+            overHidden: true,
+            cell: true,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd"
+          },
+          {
             label: "类别",
             prop: "billType",
             width: 100,
@@ -3316,7 +3336,7 @@ export default {
       }
       if (name == "一键编辑") {
         for (let row of this.form.tradingBoxItemsList) {
-          if (row.whetherEnable != '是') {
+          if (row.whetherEnable != "是") {
             this.$set(row, "$cellEdit", true);
           }
         }
@@ -3603,6 +3623,9 @@ export default {
           if (row.stlPid && row.auditStatus != 0) {
             return this.$message.error("已申请费用,不允许重复申请");
           }
+          if (!row.billDate) {
+            return this.$message.error("请选择财务日期");
+          }
         }
         this.$confirm("确定申请费用?", {
           confirmButtonText: "确定",
@@ -3736,6 +3759,9 @@ export default {
           if (row.stlPid && row.auditStatus != 0) {
             return this.$message.error("已申请费用,不允许重复申请");
           }
+          if (!row.billDate) {
+            return this.$message.error("请选择财务日期");
+          }
         }
         this.$confirm("确定申请费用?", {
           confirmButtonText: "确定",
@@ -4045,13 +4071,13 @@ export default {
     },
     rowStyle({ row, column, rowIndex }) {
       //已结算金额
-      if (Number(row.stlTtlAmount?row.stlTtlAmount:0) != 0) {
+      if (Number(row.stlTtlAmount ? row.stlTtlAmount : 0) != 0) {
         return {
           color: "#0000FF"
         };
       }
       //发票金额和付费申请金额
-      if (Number(row.appliedAmount?row.appliedAmount:0) != 0 || Number(row.appliedInvoiceAmount?row.appliedInvoiceAmount:0) != 0) {
+      if (Number(row.appliedAmount ? row.appliedAmount : 0) != 0 || Number(row.appliedInvoiceAmount ? row.appliedInvoiceAmount : 0) != 0) {
         return {
           color: "#FFC300"
         };

+ 41 - 5
src/views/boxManagement/moveOut/detailsPage.vue

@@ -167,6 +167,8 @@
                 <!-- <el-button size="small" :disabled="!form.id || true"
                   @click="$refs.print.openDialog()">打印报表
                 </el-button> -->
+
+                <el-button type="warning" size="small" @click="outExport">导 出 </el-button>
               </template>
               <template slot="indexHeader" slot-scope="{ row, index }">
                 <el-button
@@ -831,7 +833,7 @@
       pageLabel="退租"
     ></fee-modify>
     <fee-modify-view ref="feeModifyView" :form="form"></fee-modify-view>
-        <reportContainer ref="reportContainer"></reportContainer>
+    <reportContainer ref="reportContainer"></reportContainer>
     <!--结算单位弹窗-->
     <el-dialog title="打印" :visible.sync="printingDialog" append-to-body width="70%" :close-on-click-modal="false" :before-close="handleClose">
       <div>
@@ -1250,13 +1252,13 @@ export default {
             cell: true,
             overHidden: true,
             type: "date",
-            format: "yyyy-MM-dd",
+            format: "yyyy-MM-dd HH:mm:ss",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
             width: 120,
             rules: [
               {
                 required: true,
-                message: "请选择场站",
+                message: "请选择日期",
                 trigger: "blur"
               }
             ]
@@ -1959,7 +1961,6 @@ export default {
     feeModifyView,
     reportformsList,
     reportContainer
-    
   },
   props: {
     detailData: Object,
@@ -2121,7 +2122,7 @@ export default {
     reportNodeClick(data) {
       this.reportformsObj = data;
     },
-    
+
     // 预览报表
     handleReportPreview(url, data) {
       console.log(url, 1670);
@@ -2434,6 +2435,41 @@ export default {
     handleGet() {
       window.open(`/api/blade-los/tradingBoxItem/boxItemTemplate?${this.website.tokenHeader}=${getToken()}&type=2`);
     },
+    outExport() {
+      let ids = [];
+      for (let item of this.selectionList) {
+        if (!item.id) {
+          return this.$message.error("请保存数据");
+        }
+        ids.push(item.id)
+      }
+      let obj = {
+        id: this.form.id,
+        itemIds:ids.join(",")
+      };
+      let config = { params: obj };
+      if (config.params) {
+        for (const propName of Object.keys(config.params)) {
+          const value = config.params[propName];
+          if (value !== null && typeof value !== "undefined") {
+            if (value instanceof Array) {
+              for (const key of Object.keys(value)) {
+                let params = propName + "[" + key + "]";
+                config.params[params] = value[key];
+              }
+              delete config.params[propName];
+            }
+          }
+        }
+      }
+      const routeData = this.$router.resolve({
+        path: "/api/blade-los/tradingBox/exportTradingBoxItemOut", //跳转目标窗口的地址
+        query: {
+          ...config.params //括号内是要传递给新窗口的参数
+        }
+      });
+      window.open(routeData.href.slice(1, routeData.href.length) + "&" + `${this.website.tokenHeader}=${getToken()}`);
+    },
     async dicChange(name, row) {
       if (name == "purchaseCompanyName") {
         if (row) {

+ 5 - 1
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue

@@ -1484,7 +1484,7 @@
       </el-row>
       <el-row>
         <el-col :span="12">
-          <precontainers :assemblyForm="assemblyForm" :seeDisabled="detailData.seeDisabled" :pid="assemblyForm.id" @billsDetailfun="billsDetailfun">
+          <precontainers :assemblyForm="assemblyForm" :oldForm="oldForm" :seeDisabled="detailData.seeDisabled" :pid="assemblyForm.id" @billsDetailfun="billsDetailfun">
           </precontainers>
         </el-col>
         <el-col :span="12">
@@ -1988,6 +1988,10 @@ export default {
       type: Object,
       default: {}
     },
+    oldForm: {
+      type: Object,
+      default: {}
+    },
     saberUserInfo: {
       type: Object,
       default: {}

+ 12 - 0
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation/precontainers.vue

@@ -265,6 +265,7 @@ import fixBoxQuantity from "./components/fixBoxQuantity.vue";
 import boxInfo from "./components/boxInfo.vue";
 import dicSelect from "@/components/dicSelect/main";
 import { isProcurement } from "@/api/basicData/configuration";
+import { contrastObj, contrastList } from "@/util/contrastData";
 export default {
   components: { SearchQuery, importTemp, sendEdi, fixBoxQuantity, boxInfo, dicSelect },
   props: {
@@ -273,6 +274,10 @@ export default {
       type: Object,
       default: {}
     },
+    oldForm: {
+      type: Object,
+      default: {}
+    },
     seeDisabled: {
       type: Boolean,
       default: false
@@ -823,6 +828,11 @@ export default {
       });
     },
     pick(row) {
+      if (
+        contrastObj(this.assemblyForm, this.oldForm)
+      ){
+         return this.$message.error("当前单据保存的数据,请先保存!");
+      }
       this.boxForm = {};
       this.containerNumberItemList = [];
       if (!this.assemblyForm.polId) {
@@ -843,6 +853,7 @@ export default {
         etd: this.assemblyForm.etd + " 00:00:00",
         polStationId: this.boxForm.polStationId
       };
+
       // if (this.verificationCost) {
       //   billVerificationPrompt({ ids: this.assemblyForm.id }).then(res => {
       //     getItemListHY(obj).then(res => {
@@ -868,6 +879,7 @@ export default {
       //   });
       //   this.dialogVisible = true;
       // }
+
       getItemListHY(obj).then(res => {
         if (res.data.data) {
           res.data.data.forEach(item => {

+ 17 - 7
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -356,22 +356,25 @@
                             v-model="form[item.prop]"
                             size="small"
                             autocomplete="off"
-                            :disabled="detailData.seeDisabled || item.disabled"
+                            :disabled="
+                              detailData.seeDisabled ||
+                                item.disabled ||
+                                form.preContainersList.filter(item => item.containerNumberStatus == '已选择').length > 0
+                            "
                             :placeholder="item.text || ''"
                           ></el-input>
                           <el-button
+                            v-if="isFixhblno"
                             type="text"
                             size="small"
                             style="margin-left: 6px;"
                             :disabled="
                               !form.id ||
-                                !form.hblno ||
                                 form.billStatus == 1 ||
-                                form.status > 0 ||
-                                form.preContainersList.filter(item => item.containerNumberStatus == '已选择').length > 0
+                                form.status > 0
                             "
                             @click="allClick('申请修改')"
-                            >申请修改</el-button
+                            >modify</el-button
                           >
                         </div>
                       </el-form-item>
@@ -388,6 +391,7 @@
                 <el-tab-pane :label="$t('sea118n.billInfo')" name="first">
                   <entrustment-lnformation
                     :assemblyForm="form"
+                    :oldForm="oldForm"
                     :saberUserInfo="saberUserInfo"
                     :detailData="detailData"
                     :disabled="showLock"
@@ -1076,7 +1080,8 @@ export default {
       importTemplate: null,
       isHq: null,
       textareaNumber: 5,
-      lineLength: 35
+      lineLength: 35,
+      isFixhblno: false
     };
   },
   watch: {
@@ -1193,6 +1198,11 @@ export default {
         this.textareaNumber = res.data.data;
       }
     });
+    isProcurement({ param: "is.fixhblno" }).then(res => {
+      if (res.data.data == 1) {
+        this.isFixhblno = true;
+      }
+    });
     // isProcurement({ param: "line.length" }).then(res => {
     //   if (res.data.data) {
     //     this.lineLength = res.data.data;
@@ -1325,7 +1335,7 @@ export default {
       if (!this.form.id) {
         return this.$message.error("请保存数据");
       }
-      this.$refs.copy.openDialog(this.form)
+      this.$refs.copy.openDialog(this.form);
       // this.$DialogForm.show({
       //   title: "复制单据",
       //   width: "300px",