Browse Source

1.查看方箱号新加修改箱量功能
2.代理箱启用时带默认值
3.进出场记录 详情页默认高度
4.海运进口 开船日期改为到港日期
5.OW箱信息 新加放箱号检索条件

Qukatie 4 days ago
parent
commit
cbd669c137

+ 1 - 0
src/api/iosBasicData/ReceivingOrders/precontainers.js

@@ -69,6 +69,7 @@ export const revokeSelectedContainerNumber = (row) => {
     params:row
   })
 }
+
 //海运出口-提取订舱箱型列表
 export const synchronousBoxType = (row) => {
   return request({

+ 7 - 6
src/views/boxManagement/agentBox/detailsPage.vue

@@ -746,6 +746,7 @@ import feeModify from "@/components/feeModify/boxMain.vue";
 import feeModifyView from "@/components/feeModify/view.vue";
 import _ from "lodash";
 import { Header } from "element-ui";
+import { dateFormat } from "@/util/date";
 export default {
   name: "detailsPage",
   data() {
@@ -2598,7 +2599,7 @@ export default {
       if (name == "启用") {
         this.form.cyTextOne = this.form.cyText;
         this.activationForm = {
-          containerNumber: null,
+          containerNumber: this.form.containerNumber,
           polId: this.form.addressId,
           polCode: this.form.addressCode,
           polEname: this.form.addressEname,
@@ -2607,11 +2608,11 @@ export default {
           polStationCode: this.form.stationCode,
           polStationCname: this.form.stationCname,
           polStationEname: this.form.stationEname,
-          podId: null,
-          podCode: null,
-          podEname: null,
-          podCname: null,
-          activationDate: null
+          podId: this.form.podId,
+          podCode: this.form.podCode,
+          podEname: this.form.podCode,
+          podCname: this.form.podCode,
+          activationDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
         };
         this.activationDialog = true;
       }

+ 70 - 1
src/views/boxManagement/containerNumber/detailsPage.vue

@@ -223,6 +223,19 @@
               :disabled="editDisabled"
             ></dic-select>
           </tempalte>
+          <tempalte slot="remainingNumLabel">
+            <span v-if="!form.id">可用/占用:</span>
+            <span v-if="form.id"
+              >可用/<el-popover ref="popover" placement="bottom" trigger="click">
+                <avue-crud :data="occupyNumData" :option="occupyNumOption">
+                  <template slot="mblno" slot-scope="{ row }">
+                    <span style="color: #1e9fff;cursor: pointer;" @click="rowJump(row)">{{ row.mblno }}</span>
+                  </template>
+                </avue-crud>
+                <el-button type="text" slot="reference" @click="viewOccupyNum()">占用</el-button> </el-popover
+              >:
+            </span>
+          </tempalte>
           <tempalte slot="remainingNum">
             <el-input-number
               v-model="form.remainingNum"
@@ -489,7 +502,8 @@ import {
   submitItemList,
   boxEastBatch,
   batchContainerNumber,
-  copyAgent
+  copyAgent,
+  getContainerNumberOccupationRecord
 } from "@/api/boxManagement/containerNumber";
 import { getAccurate } from "@/api/boxManagement/buyContainer/index.js";
 import dicSelect from "@/components/dicSelect/main";
@@ -500,6 +514,7 @@ import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
 import { getToken } from "@/util/auth";
 import _ from "lodash";
 import { Header } from "element-ui";
+import { head } from "lodash";
 export default {
   data() {
     return {
@@ -1312,6 +1327,43 @@ export default {
           }
         ]
       },
+      occupyNumOption: {
+        maxHeight: 340,
+        calcHeight: 30,
+        tip: false,
+        border: true,
+        header: false,
+        selection: false,
+        align: "center",
+        menu: false,
+        column: [
+          {
+            label: "提单号",
+            prop: "mblno",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "分单号",
+            prop: "hblno",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "操作占用",
+            prop: "occupyNum",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "实际操作占用",
+            prop: "actualOccupyNum",
+            width: 100,
+            overHidden: true
+          }
+        ]
+      },
+      occupyNumData: [],
       roleName: []
     };
   },
@@ -1341,6 +1393,23 @@ export default {
     }
   },
   methods: {
+    rowJump(row) {
+      if (this.verifyTags("海运出口(F)")) {
+        this.$router.push({
+          path: `/iosBasicData/SeafreightExportF/bills/index`,
+          query: {
+            id: row.pid
+          }
+        });
+        this.$refs.popover.doClose();
+      }
+    },
+    viewOccupyNum(row) {
+      this.occupyNumData = [];
+      getContainerNumberOccupationRecord({ id: this.form.id }).then(res => {
+        this.occupyNumData = res.data.data;
+      });
+    },
     verifyChange(name, row) {
       if (row[name]) {
         row[name] = row[name].replace(/\s+/g, "");

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

@@ -139,7 +139,7 @@ export default {
       option: {},
       optionBack: {
         // height: 'auto',
-        maxHeight: 340,
+        maxHeight: 700,
         calcHeight: 30,
         menuWidth: 60,
         tip: false,

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

@@ -139,7 +139,7 @@ export default {
       option: {},
       optionBack: {
         // height: 'auto',
-        maxHeight: 340,
+        maxHeight: 700,
         calcHeight: 30,
         menuWidth: 60,
         tip: false,

+ 26 - 9
src/views/iosBasicData/OceanFreightImport/bills/index.vue

@@ -31,7 +31,7 @@
       >
         <template slot-scope="{ disabled, size }" slot="billSortSearch">
           <el-radio-group v-model="query.billSort">
-            <el-radio label="1">{{ $t("sea118n.etd") }}</el-radio>
+            <el-radio label="1">{{ $t("sea118n.eta") }}</el-radio>
             <el-radio label="2">{{ $t("sea118n.mblno") }}</el-radio>
             <el-radio label="3">{{ $t("sea118n.hblno") }}</el-radio>
           </el-radio-group>
@@ -728,25 +728,42 @@ export default {
             width: "80",
             overHidden: true
           },
+          // {
+          //   label: this.$t("sea118n.etd"),
+          //   prop: "etd",
+          //   width: "100",
+          //   searchProp: "etdList",
+          //   type: "date",
+          //   unlinkPanels: true,
+          //   searchRange: true,
+          //   overHidden: true,
+          //   format: "yyyy-MM-dd",
+          //   valueFormat: "yyyy-MM-dd HH:mm:ss",
+          //   searchDefaultTime: ["00:00:00", "23:59:59"],
+          //   search: true,
+          //   span: 6,
+          //   searchOrder: 8
+          // },
           {
-            label: this.$t("sea118n.etd"),
-            prop: "etd",
-            searchProp: "etdList",
+            label: this.$t("sea118n.eta"),
+            prop: "eta",
+            width: "100",
+            overHidden: true,
+            searchProp: "etaList",
             type: "date",
             unlinkPanels: true,
             searchRange: true,
-            overHidden: true,
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
             searchDefaultTime: ["00:00:00", "23:59:59"],
             search: true,
             span: 6,
-            searchOrder: 8
+            searchOrder: 9
           },
           {
-            label: this.$t("sea118n.eta"),
+            label: "ATA",
             prop: "actualEta",
-            width: "80",
+            width: "100",
             overHidden: true,
             searchProp: "actualEtaList",
             type: "date",
@@ -762,7 +779,7 @@ export default {
           {
             label: "ATD",
             prop: "actualEtd",
-            width: "80",
+            width: "100",
             overHidden: true,
             searchProp: "actualEtdList",
             type: "date",

+ 250 - 0
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation/components/fixBoxQuantity.vue

@@ -0,0 +1,250 @@
+<template>
+  <div>
+    <el-dialog title="修改箱量" :visible.sync="dialogVisible" append-to-body width="60%" :before-close="handleClose">
+      <avue-form v-if="dialogVisible" :option="optionForm" v-model="form"></avue-form>
+      <avue-crud
+        v-if="dialogVisible"
+        :option="option"
+        :data="data"
+        ref="crud"
+        id="out-table"
+        :header-cell-class-name="headerClassName"
+        @on-load="onLoad"
+      >
+      </avue-crud>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false" size="mini">取 消</el-button>
+        <el-button type="primary" @click="submit" size="mini">确 认</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { synchronousBoxType, precontainers } from "@/api/iosBasicData/ReceivingOrders/precontainers";
+export default {
+  props: {},
+  data() {
+    return {
+      quotationObj: null,
+      id: null,
+      data: [],
+      form: {},
+      dialogVisible: false,
+      loading: false,
+      optionForm: {
+        menuBtn: false,
+        span: 6,
+        disabled: false,
+        column: [
+          {
+            label: this.$t("sea118n.ctnrType"),
+            prop: "cntrTypeCode",
+            disabled: true
+          },
+          {
+            label: this.$t("sea118n.ctnrQty"),
+            prop: "quantity",
+            type: "number",
+            controls: false,
+            precision: 0,
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
+          }
+        ]
+      },
+      option: {
+        height: 500,
+        calcHeight: 30,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        delBtn: false,
+        editBtn: false,
+        menu: false,
+        header: false,
+        // highlightCurrentRow: true,
+        column: [
+          {
+            label: "放箱号",
+            prop: "containerNumber",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "内部放箱号",
+            prop: "internalContainerNumber",
+            width: 100,
+            overHidden: true
+          },
+          // {
+          //   label: "放箱号类型",
+          //   prop: "busType",
+          //   width: 100,
+          //   overHidden: true
+          // },
+          {
+            label: "场站",
+            prop: "polStationCname",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "箱型",
+            prop: "boxType",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "可用箱数",
+            prop: "remainingNum",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "场地盘存",
+            prop: "storageNum",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "占用箱量",
+            prop: "occupyNum",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "实际操作占用",
+            prop: "actualOccupyNum",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "优先等级",
+            prop: "priorityLevel",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=priorityLevel",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "箱管备注",
+            prop: "boxRemarks",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "是否出场状态",
+            prop: "whetherAppearStatus",
+            width: 100,
+            type: "select",
+            dicData: [
+              {
+                label: "否",
+                value: "0"
+              },
+              {
+                label: "是",
+                value: "1"
+              }
+            ],
+            overHidden: true
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            width: 100,
+            overHidden: true
+          }
+        ]
+      }
+    };
+  },
+  async created() {
+    // this.option = await this.getColumnData(this.getColumnName(309.6), this.optionBack);
+  },
+  methods: {
+    openDialog(obj, row) {
+      this.dialogVisible = true;
+      this.form = row;
+      this.data = obj.containerNumberItemList.filter(item => row.cntrTypeCode == item.boxType && item.occupyNum > 0);
+    },
+    submit() {
+      // if (!this.quotationObj) {
+      //     return this.$message.error("请选择数据");
+      // }
+      // delete this.quotationObj.id
+      let obj = {
+        id: this.form.id
+      };
+      synchronousBoxType(obj).then(res => {
+        this.$emit("getUpdate");
+        this.$message.success("操作成功");
+        this.dialogVisible = false;
+      });
+    },
+    //自定义列保存
+    async saveColumn(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.searchReset();
+      }
+    },
+    //自定义列重置
+    async resetColumn(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = "";
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one";
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two";
+        }
+      }
+      return back;
+    }
+  }
+};
+</script>
+
+<style scoped>
+::v-deep#out-table .back-one {
+  background: #ecf5ff !important;
+  text-align: center;
+  padding: 4px 0;
+}
+
+::v-deep#out-table .back-two {
+  background: #ecf5ff !important;
+  text-align: center;
+  padding: 4px 0;
+}
+</style>

+ 225 - 52
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation/precontainers.vue

@@ -77,6 +77,15 @@
         >
           查看放箱号
         </el-button>
+        <!-- <el-button
+          v-if="row.id && row.containerNumberStatus == '已选择' && assemblyForm.billType != 'MM'"
+          size="mini"
+          type="text"
+          @click.stop="rowFix(row)"
+          :disabled="seeDisabled"
+        >
+          修改箱量
+        </el-button> -->
       </template>
       <template slot-scope="{ row }" slot="cntrTypeCodeForm">
         <search-query
@@ -95,6 +104,19 @@
         >
         </search-query>
       </template>
+      <template slot="quantityForm" slot-scope="{ row }">
+        <el-input
+          v-if="row.$cellEdit"
+          style="width: 100%;"
+          v-model="row.quantity"
+          size="small"
+          autocomplete="off"
+          min="0"
+          clearable
+          placeholder="请输入箱量"
+        ></el-input>
+        <span v-else>{{ row.quantity }}</span>
+      </template>
       <template slot="number" slot-scope="{ row }">
         <el-input
           v-if="row.$cellEdit"
@@ -140,7 +162,9 @@
     </avue-crud>
     <el-dialog title="查看放箱号" :visible.sync="dialogVisible" width="50%" :before-close="handleClose" append-to-body>
       <span>
+        <avue-form ref="form" v-if="dialogVisible" :option="optionForm" v-model="boxForm"></avue-form>
         <avue-crud
+          v-if="dialogVisible"
           ref="crud2"
           :option="containerOption"
           :data="containerNumberItemList"
@@ -149,7 +173,7 @@
         >
           <template slot="occupyNum" slot-scope="{ row }">
             <el-input-number
-              v-if="!row.id"
+              v-if="!row.id || editStatus"
               v-model="row.occupyNum"
               :min="0"
               :max="row.remainingNum"
@@ -160,15 +184,23 @@
             ></el-input-number>
             <span v-else>{{ row.occupyNum }}</span>
           </template>
+          <template slot-scope="{ row, index }" slot="menu">
+            <el-button v-if="row.id && row.whetherAppearStatus == 1" size="mini" type="text" @click.stop="rowFix(row)" :disabled="seeDisabled">
+              确认操作占用
+            </el-button>
+          </template>
         </avue-crud>
       </span>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false" size="mini">{{ editStatus ? "取 消" : "关 闭" }}</el-button>
-        <el-button v-if="editStatus" type="primary" @click="submit" size="mini">确 定</el-button>
+        <el-button v-if="editStatus" type="primary" @click="submit" size="mini">{{
+          boxForm.containerNumberStatus == "录入" ? "确 定" : "修 改"
+        }}</el-button>
       </span>
     </el-dialog>
     <import-temp ref="importTemp" @importData="importTemp"></import-temp>
     <send-edi ref="sendEdi" @importData="sendEdi"></send-edi>
+    <fix-boxQuantity ref="fixBoxQuantity" @getUpdate="getUpdate"></fix-boxQuantity>
   </basic-container>
 </template>
 
@@ -182,7 +214,8 @@ import {
   getItemListHY,
   selectedContainerNumber,
   revokeSelectedContainerNumber,
-  sendVerificationPrompt
+  sendVerificationPrompt,
+  actualOccupyNumUpdate
 } from "@/api/iosBasicData/ReceivingOrders/precontainers";
 import { getWorkDicts } from "@/api/system/dictbiz";
 import { mapGetters } from "vuex";
@@ -193,8 +226,10 @@ import { requiredMessage } from "@/util/messageReminder";
 import { Header } from "element-ui";
 import importTemp from "./components/importTemp.vue";
 import sendEdi from "./components/sendEdi.vue";
+import fixBoxQuantity from "./components/fixBoxQuantity.vue";
+import { isProcurement } from "@/api/basicData/configuration";
 export default {
-  components: { SearchQuery, importTemp, sendEdi },
+  components: { SearchQuery, importTemp, sendEdi, fixBoxQuantity },
   props: {
     pid: {},
     assemblyForm: {
@@ -212,11 +247,40 @@ export default {
   },
   data() {
     return {
+      isOccupyNum: false,
       editStatus: false,
       dialogVisible: false,
       // 集装箱尺码箱型
       cntrTypeCodeData: [],
+      boxForm: {},
       containerNumberItemList: [],
+      optionForm: {
+        menuBtn: false,
+        span: 6,
+        disabled: false,
+        labelWidth: 50,
+        column: [
+          {
+            label: this.$t("sea118n.ctnrType"),
+            prop: "cntrTypeCode",
+            disabled: true
+          },
+          {
+            label: this.$t("sea118n.ctnrQty"),
+            prop: "quantity",
+            type: "number",
+            controls: false,
+            precision: 0,
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
+          }
+        ]
+      },
       form: {},
       query: {},
       loading: false,
@@ -256,13 +320,14 @@ export default {
                 message: "请选择箱型",
                 trigger: "blur"
               }
-            ]
+            ],
+            overHidden: true
           },
           {
             label: this.$t("sea118n.ctnrQty"),
             prop: "quantity",
             type: "number",
-            cell: true,
+            slot: true,
             controls: false,
             precision: 0,
             width: "120",
@@ -272,7 +337,8 @@ export default {
                 message: "请输入箱量",
                 trigger: "blur"
               }
-            ]
+            ],
+            overHidden: true
           },
           {
             label: this.$t("sea118n.QTY"),
@@ -280,7 +346,7 @@ export default {
             type: "number",
             width: "120",
             // cell:true,
-            controls: false,
+            overHidden: true,
             precision: 0
           },
           {
@@ -289,7 +355,8 @@ export default {
             width: "120",
             type: "number",
             // cell:true,
-            controls: false
+            controls: false,
+            overHidden: true
           },
           {
             label: this.$t("sea118n.CBM"),
@@ -297,7 +364,8 @@ export default {
             width: "120",
             type: "number",
             // cell:true,
-            controls: false
+            controls: false,
+            overHidden: true
           },
           {
             label: "temperature",
@@ -305,7 +373,8 @@ export default {
             cell: true,
             controls: false,
             // type:"number",
-            width: "120"
+            width: "120",
+            overHidden: true
           },
           {
             label: "temperatureUnit",
@@ -321,7 +390,8 @@ export default {
                 label: "华氏度",
                 value: "F"
               }
-            ]
+            ],
+            overHidden: true
           },
           {
             label: "通风度",
@@ -329,7 +399,8 @@ export default {
             cell: true,
             controls: false,
             // type:"number",
-            width: "120"
+            width: "120",
+            overHidden: true
           },
           {
             label: "湿度",
@@ -337,7 +408,8 @@ export default {
             cell: true,
             controls: false,
             // type:"number",
-            width: "120"
+            width: "120",
+            overHidden: true
           },
           {
             label: "SOC",
@@ -354,7 +426,8 @@ export default {
                 label: "是",
                 value: 1
               }
-            ]
+            ],
+            overHidden: true
           },
           {
             label: "单程",
@@ -370,7 +443,8 @@ export default {
                 label: "是",
                 value: 1
               }
-            ]
+            ],
+            overHidden: true
           },
           {
             label: "NOR",
@@ -387,7 +461,8 @@ export default {
                 label: "是",
                 value: 1
               }
-            ]
+            ],
+            overHidden: true
           },
           {
             label: "OOG",
@@ -404,42 +479,48 @@ export default {
                 label: "是",
                 value: 1
               }
-            ]
+            ],
+            overHidden: true
           },
           {
             label: "左超(CM)",
             prop: "overLeft",
             type: "number",
             cell: true,
-            controls: false
+            controls: false,
+            overHidden: true
           },
           {
             label: "右超(CM)",
             prop: "overRight",
             type: "number",
             cell: true,
-            controls: false
+            controls: false,
+            overHidden: true
           },
           {
             label: "前超(CM)",
             prop: "overFront",
             type: "number",
             cell: true,
-            controls: false
+            controls: false,
+            overHidden: true
           },
           {
             label: "后超(CM)",
             prop: "overBack",
             type: "number",
             cell: true,
-            controls: false
+            controls: false,
+            overHidden: true
           },
           {
             label: "超高(CM)",
             prop: "overHeight",
             type: "number",
             cell: true,
-            controls: false
+            controls: false,
+            overHidden: true
           },
           {
             label: "备注",
@@ -447,7 +528,8 @@ export default {
             span: 24,
             type: "textarea",
             slot: true,
-            minRows: 3
+            minRows: 3,
+            overHidden: true
           }
         ]
       },
@@ -457,7 +539,7 @@ export default {
         height: "500",
         // calcHeight: 30,
         calcHeight: 30,
-        menuWidth: 160,
+        menuWidth: 100,
         tip: false,
         border: true,
         addBtn: false,
@@ -518,6 +600,12 @@ export default {
             overHidden: true
           },
           {
+            label: "实际操作占用",
+            prop: "actualOccupyNum",
+            width: 100,
+            overHidden: true
+          },
+          {
             label: "优先等级",
             prop: "priorityLevel",
             type: "select",
@@ -529,14 +617,29 @@ export default {
             width: 100,
             overHidden: true
           },
-
           {
             label: "箱管备注",
             prop: "boxRemarks",
             width: 100,
             overHidden: true
           },
-
+          {
+            label: "是否出场状态",
+            prop: "whetherAppearStatus",
+            width: 100,
+            type: "select",
+            dicData: [
+              {
+                label: "否",
+                value: "0"
+              },
+              {
+                label: "是",
+                value: "1"
+              }
+            ],
+            overHidden: true
+          },
           {
             label: "备注",
             prop: "remarks",
@@ -568,6 +671,12 @@ export default {
   async created() {
     this.option = await this.getColumnData(this.getColumnName(487), this.optionBack);
     this.containerOption = await this.getColumnData(this.getColumnName(488), this.containerOptionBack);
+    isProcurement({ param: "is.occupyNum" }).then(res => {
+      if (res.data.data == 1) {
+        this.containerOption.menu = true;
+        this.isOccupyNum = true;
+      }
+    });
   },
   methods: {
     sendEdi() {
@@ -581,25 +690,61 @@ export default {
     importTemp() {
       this.$emit("billsDetailfun");
     },
+    rowFix(row) {
+      this.$refs.fixBoxQuantity.openDialog(this.assemblyForm, row);
+    },
+    getUpdate() {
+      this.$emit("billsDetailfun");
+    },
     submit() {
-      // let obj = {
-      //     containerNumberItemList:
-      // }
-      // for (let item of ) {
-      //     if (!(item.occupyNum > 0)) {
-      //         return this.$message.error("占用箱量必须大于0!");
-      //     }
-      // }
-      if (this.containerNumberItemList.filter(item => item.occupyNum > 0).length == 0) {
-        return this.$message.error("至少有一条占用箱量大于0!");
-      }
-      selectedContainerNumber(this.containerNumberItemList).then(res => {
-        this.$message.success("操作成功!");
-        this.dialogVisible = false;
-        this.$emit("billsDetailfun");
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          if (this.boxForm.containerNumberStatus == "录入") {
+            if (this.containerNumberItemList.filter(item => item.occupyNum > 0).length == 0) {
+              return this.$message.error("至少有一条占用箱量大于0!");
+            }
+            let occupyNumSum = 0;
+            for (let item of this.containerNumberItemList) {
+              occupyNumSum += Number(item.occupyNum ? item.occupyNum : 0);
+            }
+            if (occupyNumSum != this.boxForm.quantity) {
+               return this.$message.error(`明细数据所有占用箱量的和必须等于箱量:${this.boxForm.quantity}!`);
+            }
+            selectedContainerNumber(this.containerNumberItemList).then(res => {
+              this.$message.success("操作成功!");
+              this.dialogVisible = false;
+              this.$emit("billsDetailfun");
+            });
+          }
+          if (this.boxForm.containerNumberStatus == "已选择") {
+            if (this.containerNumberItemList.filter(item => item.occupyNum > 0).length == 0) {
+              return this.$message.error("至少有一条占用箱量大于0!");
+            }
+            let occupyNumSum = 0;
+            for (let item of this.containerNumberItemList) {
+              occupyNumSum += Number(item.occupyNum ? item.occupyNum : 0);
+            }
+            if (occupyNumSum != this.boxForm.quantity) {
+              return this.$message.error(`明细数据所有占用箱量的和必须等于箱量:${this.boxForm.quantity}!`);
+            }
+            let obj = {
+              ...this.boxForm,
+              containerNumberItemList: this.containerNumberItemList
+            };
+            actualOccupyNumUpdate(obj).then(res => {
+              this.$message.success("操作成功!");
+              this.dialogVisible = false;
+              this.$emit("billsDetailfun");
+            });
+          }
+        } else {
+          return false;
+        }
       });
     },
     pick(row) {
+      this.boxForm = {};
       this.containerNumberItemList = [];
       if (!this.assemblyForm.polId) {
         return this.$message.error("请选择装货港");
@@ -615,6 +760,7 @@ export default {
         airlineId: this.assemblyForm.airlineId,
         etd: this.assemblyForm.etd + " 00:00:00"
       };
+      this.boxForm = row;
       getItemListHY(obj).then(res => {
         if (res.data.data) {
           res.data.data.forEach(item => {
@@ -637,9 +783,11 @@ export default {
       });
     },
     rowView(row) {
+      this.boxForm = {};
       this.containerNumberItemList = [];
-      this.editStatus = false;
+      this.editStatus = true;
       this.dialogVisible = true;
+      this.boxForm = row;
       this.containerNumberItemList = this.assemblyForm.containerNumberItemList.filter(item => row.cntrTypeCode == item.boxType && item.occupyNum > 0);
     },
     handleClose() {
@@ -647,15 +795,6 @@ export default {
       this.editStatus = false;
     },
     onclickEdit() {
-      // for (let item of this.assemblyForm.preContainersList) {
-      //     if(item.containerNumberStatus == '已选择'){
-      //         return this.$message.error('请撤销放箱号,再进行编辑!')
-      //     }else{
-      //     this.$delete(item, '$cellEdit')
-      //     this.$set(item, '$cellEdit', true)
-      //     }
-      // }
-      console.log();
       if (this.assemblyForm.containersList.length > 0) {
         this.$alert("当前数据已经均分箱量,请撤销之后再修改", "提示", {
           confirmButtonText: "确定"
@@ -666,6 +805,10 @@ export default {
           this.$set(item, "$cellEdit", true);
         }
       }
+      // for (let item of this.assemblyForm.preContainersList) {
+      //   this.$delete(item, "$cellEdit");
+      //   this.$set(item, "$cellEdit", true);
+      // }
     },
     // 件数失焦事件
     numberBlur(row) {
@@ -679,6 +822,30 @@ export default {
         this.assemblyForm.quantity = quantityNum;
       }
     },
+    // quantityChange(row) {
+    //   if (row.id && row.containerNumberStatus == "已选择" && this.assemblyForm.billType != "MM") {
+    //     // this.dialogVisible = true;
+    //     this.$confirm("是否保存当前修改的箱量?", "提示", {
+    //       confirmButtonText: "确定",
+    //       cancelButtonText: "取消",
+    //       type: "warning"
+    //     }).then(() => {
+    //       precontainersSubmitList(this.assemblyForm.preContainersList).then(res => {
+    //         this.$message({
+    //           type: "success",
+    //           message: "操作成功!"
+    //         });
+    //         this.$emit("billsDetailfun");
+    //         this.containerNumberItemList = [];
+    //         this.editStatus = true;
+    //         this.dialogVisible = true;
+    //         this.containerNumberItemList = this.assemblyForm.containerNumberItemList.filter(
+    //           item => row.cntrTypeCode == item.boxType && item.occupyNum > 0
+    //         );
+    //       });
+    //     });
+    //   }
+    // },
     // 毛重失焦事件
     grossWeightBlur(row) {
       let grossWeightNum = 0;
@@ -1156,6 +1323,9 @@ export default {
        * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
        */
       const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (this.isOccupyNum == true) {
+        this.containerOption.menu = true;
+      }
       if (inSave) {
         this.$message.success("保存成功");
         //关闭窗口
@@ -1166,6 +1336,9 @@ export default {
     async resetColumnTwo(ref, option, optionBack, code) {
       this[option] = this[optionBack];
       const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (this.isOccupyNum == true) {
+        this.containerOption.menu = true;
+      }
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs[ref].$refs.dialogColumn.columnBox = false;

+ 67 - 71
src/views/iosBasicData/financeProfit/index.vue

@@ -174,8 +174,8 @@
         <el-checkbox v-model="query.examineDate" :true-label="1" :false-label="0">按审核日期</el-checkbox>
       </template>
     </avue-crud>
-    <business-reports  ref="print" businessValue="决策分析" reportCode="业务利润" groupCode="统计" :type="true"></business-reports>
-      <reports  businessValue="决策分析"  reportCode="业务利润" groupCode="统计" ref="report"></reports>
+    <business-reports ref="print" businessValue="决策分析" reportCode="业务利润" groupCode="统计" :type="true"></business-reports>
+    <reports businessValue="决策分析" reportCode="业务利润" groupCode="统计" ref="report"></reports>
   </basic-container>
 </template>
 
@@ -237,6 +237,21 @@ export default {
         summaryText: "合计",
         sumColumnList: [
           {
+            name: "amountProfit",
+            type: "sum",
+            decimals: 2
+          },
+          {
+            name: "amountProfitUsd",
+            type: "sum",
+            decimals: 2
+          },
+          {
+            name: "amountProfitOther",
+            type: "sum",
+            decimals: 2
+          },
+          {
             name: "amountDrUsd",
             type: "sum",
             decimals: 2
@@ -325,11 +340,6 @@ export default {
             name: "realAmountCrOther",
             type: "sum",
             decimals: 2
-          },
-          {
-            name: "amountProfitOther",
-            type: "sum",
-            decimals: 2
           }
         ],
         column: [
@@ -399,7 +409,7 @@ export default {
           {
             label: "开船日期",
             prop: "statisticsDate",
-            overHidden: true,
+            overHidden: true
           },
           {
             label: "箱属",
@@ -436,6 +446,33 @@ export default {
             searchOrder: 12
           },
           {
+            label: "人民币利润",
+            prop: "amountProfit",
+            overHidden: true,
+            minWidth: 90
+          },
+          {
+            label: "美元利润",
+            prop: "amountProfitUsd",
+            overHidden: true
+          },
+          {
+            label: "单票利润",
+            prop: "amountProfitLoc",
+            overHidden: true
+          },
+          {
+            label: "其他利润",
+            prop: "amountProfitOther",
+            overHidden: true
+          },
+          {
+            label: "实际单票利润",
+            prop: "realAmountProfitLoc",
+            overHidden: true,
+            minWidth: 100
+          },
+          {
             label: "往来单位",
             prop: "corpName",
             overHidden: true,
@@ -615,22 +652,6 @@ export default {
             minWidth: 100
           },
           {
-            label: "人民币利润",
-            prop: "amountProfit",
-            overHidden: true,
-            minWidth: 90
-          },
-          {
-            label: "美元利润",
-            prop: "amountProfitUsd",
-            overHidden: true
-          },
-          {
-            label: "其他利润",
-            prop: "amountProfitOther",
-            overHidden: true
-          },
-          {
             label: "应收海运费",
             prop: "oceanFreightDr",
             overHidden: true,
@@ -648,17 +669,6 @@ export default {
             overHidden: true,
             minWidth: 90
           },
-          {
-            label: "单票利润",
-            prop: "amountProfitLoc",
-            overHidden: true
-          },
-          {
-            label: "实际单票利润",
-            prop: "realAmountProfitLoc",
-            overHidden: true,
-            minWidth: 100
-          },
           // {
           //     label: "委托人",
           //     prop: "client",
@@ -709,123 +719,105 @@ export default {
       // 合计的配置项
       commodityLabel: [
         {
-          id: 4,
+          label: "人民币利润",
+          prop: "amountProfit",
+          minWidth: 90
+        },
+        {
+          label: "美元利润",
+          prop: "amountProfitUsd"
+        },
+        {
+          label: "单票利润",
+          prop: "amountProfitLoc"
+        },
+        {
+          label: "其他利润",
+          prop: "amountProfitOther"
+        },
+        {
           label: "应收人民币",
           prop: "amountDr",
           minWidth: 90
         },
         {
-          id: 5,
           label: "应收美元",
           prop: "amountDrUsd"
         },
         {
-          id: 5,
           label: "应收其他",
           prop: "amountDrOther"
         },
         {
-          id: 6,
           label: "合计应收",
           prop: "amountDrLoc"
         },
         {
-          id: 10,
           label: "实收人民币",
           prop: "realAmountDr",
           minWidth: 90
         },
         {
-          id: 11,
           label: "实收美元",
           prop: "realAmountDrUsd"
         },
         {
-          id: 10,
           label: "实收其他",
           prop: "realAmountDrOther"
         },
         {
-          id: 12,
           label: "实收合计",
           prop: "realAmountDrLoc"
         },
         {
-          id: 1,
           label: "应付人民币",
           prop: "amountCr",
           minWidth: 90
         },
         {
-          id: 2,
           label: "应付美元",
           prop: "amountCrUsd"
         },
         {
-          id: 2,
           label: "应付其他",
           prop: "amountCrOther"
         },
         {
-          id: 3,
           label: "合计应付",
           prop: "amountCrLoc"
         },
         {
-          id: 7,
           label: "实付人民币",
           prop: "realAmountCr",
           minWidth: 90
         },
         {
-          id: 8,
           label: "实付美元",
           prop: "realAmountCrUsd"
         },
         {
-          id: 8,
           label: "实付其他",
           prop: "realAmountCrOther"
         },
         {
-          id: 9,
           label: "实付合计",
           prop: "realAmountCrLoc"
         },
         {
-          id: 10,
-          label: "人民币利润",
-          prop: "amountProfit",
-          minWidth: 90
-        },
-        {
-          id: 11,
-          label: "美元利润",
-          prop: "amountProfitUsd"
-        },
-        {
-          id: 10,
-          label: "其他利润",
-          prop: "amountProfitOther"
-        },
-        {
-          id: 12,
           label: "应收海运费",
           prop: "oceanFreightDr",
           minWidth: 90
         },
         {
-          id: 13,
           label: "应付海运费",
           prop: "oceanFreightCr",
           minWidth: 90
         },
         {
-          id: 14,
           label: "海运费利润",
           prop: "oceanFreightProfit",
           minWidth: 90
-        },
+        }
         // {
         //   id: 15,
         //   label: "单票利润",
@@ -1054,6 +1046,9 @@ export default {
         }
         financeStatisticsFinanceProfit(page.currentPage, page.pageSize, Object.assign(params, this.query))
           .then(res => {
+            res.data.data.records.forEach(item => {
+              item.amountProfitLoc = item.amountProfitLoc ? Number(item.amountProfitLoc).toFixed(2) : 0;
+            });
             const data = res.data.data;
             this.page.total = data.total;
             this.data = data.records;
@@ -1063,6 +1058,7 @@ export default {
             });
             financeStatisticsFinanceProfitSum(Object.assign(params, this.query))
               .then(re => {
+                re.data.data.amountProfitLoc= re.data.data.amountProfitLoc ? Number(re.data.data.amountProfitLoc).toFixed(2) : 0;
                 this.commodityData = [re.data.data];
               })
               .finally(() => {

+ 37 - 0
src/views/ow/owPut/detailsPage.vue

@@ -229,6 +229,9 @@
               :header-cell-class-name="headerClassName"
               :row-style="{ height: '20px', padding: '0px' }"
               :cell-style="{ height: '20px', padding: '0px' }"
+              :search.sync="boxQuery"
+              @search-change="searchChangeBox"
+              @search-reset="searchResetBox"
               @selection-change="selectionChange"
               @select="selectHandle"
               @row-update="rowUpdate"
@@ -1218,6 +1221,8 @@ export default {
   name: "detailsPage",
   data() {
     return {
+      searchStatus: false,
+      boxQuery: {},
       fininvoicesData: [],
       fininvoicesOption: {
         header: false,
@@ -1782,7 +1787,11 @@ export default {
             label: "箱号",
             prop: "code",
             width: 140,
+            searchPlaceholder: "请输入箱号 多个箱号用空格区分",
+            search: true,
             cell: true,
+            slot: true,
+            formslot: true,
             overHidden: true,
             rules: [
               {
@@ -3076,6 +3085,30 @@ export default {
     this.saveLocalCurrency(this.deptId);
   },
   methods: {
+        searchChangeBox(params, done) {
+      done();
+      if (!this.form.id) {
+        return this.$message.error("请保存数据");
+      }
+      for (let item of this.form.tradingBoxItemsList) {
+        if (item.$cellEdit) {
+          return this.$message.error("请保存明细数据再进行检索");
+        }
+      }
+      if (this.searchStatus) {
+        return this.$message.error("请清空数据再检索");
+      }
+      if (this.boxQuery.code) {
+        this.searchStatus = true;
+        let boxNums = this.boxQuery.code.split(" ");
+        console.log(boxNums);
+        this.form.tradingBoxItemsList = this.form.tradingBoxItemsList.filter(item => boxNums.includes(item.code));
+      }
+    },
+    searchResetBox() {
+      this.searchStatus = false;
+      this.getDetail(this.form.id);
+    },
     viewFininvoices(row) {
       this.fininvoicesData = [];
       fininvoicesGetAccBillIdList({ accBillId: row.accBillId }).then(res => {
@@ -3705,6 +3738,10 @@ export default {
               }
             });
           }
+          if (this.boxQuery.code) {
+            this.searchStatus = false;
+            this.searchChange(this.boxQuery);
+          }
         })
         .finally(() => {
           loading.close();

+ 37 - 2
src/views/ow/owTask/detailsPage.vue

@@ -268,6 +268,9 @@
               :header-cell-class-name="headerClassName"
               :row-style="{ height: '20px', padding: '0px' }"
               :cell-style="{ height: '20px', padding: '0px' }"
+              :search.sync="boxQuery"
+              @search-change="searchChangeBox"
+              @search-reset="searchResetBox"
               @selection-change="selectionChange"
               @select="selectHandle"
               @row-update="rowUpdate"
@@ -279,7 +282,7 @@
                   type="info"
                   plain
                   size="small"
-                  :disabled="editDisabled || !form.id || form.tradingBoxItemsList.length == 0"
+                  :disabled="editDisabled || !form.id || form.tradingBoxItemsList.length == 0 || searchStatus"
                   @click="allClick('一键保存')"
                   >一键保存</el-button
                 >
@@ -287,7 +290,7 @@
                   type="info"
                   plain
                   size="small"
-                  :disabled="editDisabled || form.tradingBoxItemsList.length == 0"
+                  :disabled="editDisabled || form.tradingBoxItemsList.length == 0 || searchStatus"
                   @click="allClick('一键编辑')"
                   >一键编辑</el-button
                 >
@@ -1316,6 +1319,8 @@ export default {
   name: "detailsPage",
   data() {
     return {
+      searchStatus: false,
+      boxQuery: {},
       fininvoicesData: [],
       fininvoicesOption: {
         header: false,
@@ -2072,6 +2077,8 @@ export default {
             label: "箱号",
             prop: "code",
             width: 140,
+            searchPlaceholder: "请输入箱号 多个箱号用空格区分",
+            search: true,
             cell: true,
             slot: true,
             formslot: true,
@@ -3382,6 +3389,30 @@ export default {
     }
   },
   methods: {
+    searchChangeBox(params, done) {
+      done();
+      if (!this.form.id) {
+        return this.$message.error("请保存数据");
+      }
+      for (let item of this.form.tradingBoxItemsList) {
+        if (item.$cellEdit) {
+          return this.$message.error("请保存明细数据再进行检索");
+        }
+      }
+      if (this.searchStatus) {
+        return this.$message.error("请清空数据再检索");
+      }
+      if (this.boxQuery.code) {
+        this.searchStatus = true;
+        let boxNums = this.boxQuery.code.split(" ");
+        console.log(boxNums);
+        this.form.tradingBoxItemsList = this.form.tradingBoxItemsList.filter(item => boxNums.includes(item.code));
+      }
+    },
+    searchResetBox() {
+      this.searchStatus = false;
+      this.getDetail(this.form.id);
+    },
     viewFininvoices(row) {
       this.fininvoicesData = [];
       fininvoicesGetAccBillIdList({ accBillId: row.accBillId }).then(res => {
@@ -4089,6 +4120,10 @@ export default {
               }
             });
           }
+          if (this.boxQuery.code) {
+            this.searchStatus = false;
+            this.searchChange(this.boxQuery);
+          }
           // if (res.data.data.status != '录入') {
           //   this.editButton = true
           //   this.editDisabled = true