Browse Source

新加历史引入
利润统计 新加检索条件

qukaidi 16 hours ago
parent
commit
36facacc46

+ 2 - 2
src/api/iosBasicData/bills.js

@@ -498,7 +498,7 @@ export const historyCostList = (data) => {
 export const historyCostImport = (data) => {
   return request({
     url: '/api/blade-los/bills/historyCostImport',
-    method: 'get',
-    params: data
+    method: 'post',
+    data: data
   })
 }

+ 391 - 0
src/components/iosbasic-data/historicalIntroduction.vue

@@ -0,0 +1,391 @@
+<template>
+  <div>
+    <el-dialog v-dialogDrag title="历史引入" :visible.sync="dialogVisible" append-to-body width="80%" :close-on-click-modal="false">
+      <el-row>
+        <el-col :span="16">
+          <avue-crud
+            v-if="dialogVisible"
+            :option="option"
+            :data="data"
+            :table-loading="loading"
+            :page.sync="page"
+            :search.sync="query"
+            ref="crud"
+            @search-change="searchChange"
+            @search-reset="searchReset"
+            @current-change="currentChange"
+            @size-change="sizeChange"
+            @current-row-change="handleCurrentRowChange"
+            @on-load="onLoad"
+          >
+            <template slot="menuLeft">
+              <div style="display: flex;align-items: center;">
+                <!-- <avue-radio v-model="dc" :dic="dic" @input="dcChange"></avue-radio> -->
+              </div>
+            </template>
+          </avue-crud>
+        </el-col>
+        <el-col :span="8">
+          <el-radio-group v-model="dc" size="mini" @input="dcChange">
+            <el-radio-button :label="null">全部</el-radio-button>
+            <el-radio-button label="D">收</el-radio-button>
+            <el-radio-button label="C">付</el-radio-button>
+          </el-radio-group>
+          <avue-crud
+            v-if="dialogVisible"
+            :option="feeOption"
+            :data="itemData"
+            :table-loading="itemLoading"
+            @selection-change="selectionChange"
+          ></avue-crud
+        ></el-col>
+      </el-row>
+      <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 { billsList, historyCostList, historyCostImport } from "@/api/iosBasicData/bills";
+import dicSelect from "@/components/dicSelect/main";
+import { dateFormat } from "@/util/date";
+export default {
+  props: {
+    businessType: {
+      type: String
+    }
+  },
+  components: {
+    dicSelect
+  },
+  data() {
+    return {
+      firstPage: false,
+      billId: null,
+      dc: null,
+      dic: [
+        {
+          label: "全部",
+          value: null
+        },
+        {
+          label: "收",
+          value: "D"
+        },
+        {
+          label: "付",
+          value: "C"
+        }
+      ],
+      data: [],
+      itemData: [],
+      selectionList: [],
+      form: {},
+      dialogVisible: false,
+      loading: false,
+      itemLoading: false,
+      query: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0
+      },
+      option: {
+        height: 400,
+        searchShow: true,
+        searchMenuSpan: 12,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        menu: false,
+        columnBtn: false,
+        refreshBtn: false,
+        searchIcon: true,
+        highlightCurrentRow: true,
+        align: "center",
+        searchIndex: 3,
+        header: false,
+        column: [
+          {
+            label: this.$t("sea118n.corpName"),
+            prop: "corpCnName",
+            search: true,
+            type: "select",
+            filterable: true,
+            remote: true,
+            dicUrl: "/api/blade-los/bcorps/listByType?shortName={{key}}",
+            props: {
+              label: "cnName",
+              value: "cnName",
+              res: "data.records"
+            },
+            overHidden: true
+          },
+          {
+            label: this.$t("sea118n.mblno"),
+            prop: "mblno",
+            search: true,
+            overHidden: true
+          },
+          {
+            label: this.$t("sea118n.hblno"),
+            prop: "hblno",
+            search: true,
+            overHidden: true
+          },
+          {
+            label: this.$t("sea118n.etd"),
+            prop: "etd",
+            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
+          },
+          {
+            label: this.$t("sea118n.pol"),
+            prop: "polEnName",
+            type: "select",
+            filterable: true,
+            remote: true,
+            dicUrl: "/api/blade-los/bports/list?enName={{key}}",
+            props: {
+              label: "enName",
+              value: "enName",
+              res: "data.records"
+            },
+            search: true,
+            overHidden: true
+          },
+          {
+            label: this.$t("sea118n.pod"),
+            prop: "podEnName",
+            type: "select",
+            filterable: true,
+            remote: true,
+            dicUrl: "/api/blade-los/bports/list?enName={{key}}",
+            props: {
+              label: "enName",
+              value: "enName",
+              res: "data.records"
+            },
+            search: true,
+            overHidden: true
+          }
+        ]
+      },
+      feeOption: {
+        height: 500,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        menu: false,
+        align: "center",
+        header: false,
+        selection: true,
+        tip: false,
+        column: [
+          {
+            label: "收/付",
+            prop: "dc",
+            width: 60,
+            dicData: [
+              {
+                label: "收",
+                value: "D"
+              },
+              {
+                label: "付",
+                value: "C"
+              }
+            ],
+            overHidden: true
+          },
+          {
+            label: this.$t("sea118n.feeInfo"),
+            prop: "feeCnName",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: this.$t("sea118n.unitNo"),
+            prop: "unitNo",
+            width: 90,
+            overHidden: true
+          },
+          {
+            label: this.$t("sea118n.currency"),
+            prop: "curCode",
+            width: 60,
+            overHidden: true
+          },
+          {
+            label: this.$t("sea118n.exrate"),
+            prop: "exrate",
+            width: 60,
+            overHidden: true
+          },
+          {
+            label: this.$t("sea118n.price"),
+            prop: "price",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: this.$t("sea118n.quantity"),
+            prop: "quantity",
+            width: 80,
+            overHidden: true
+          }
+        ]
+      }
+    };
+  },
+  created() {},
+  methods: {
+    dcChange(val) {
+      let obj = {
+        id: this.form.id,
+        billId: this.billId,
+        dc: val
+      };
+      this.getHistoryCostList(obj);
+    },
+    openDialog(val, type) {
+      this.billId = null;
+      this.data = [];
+      this.itemData = [];
+      this.dc = type;
+      this.form = val;
+      this.dialogVisible = true;
+    },
+    handleCurrentRowChange(row) {
+      this.billId = row.id;
+      let obj = {
+        id: this.form.id,
+        billId: row.id,
+        dc: this.dc
+      };
+      this.getHistoryCostList(obj);
+    },
+    getHistoryCostList(obj) {
+      this.itemLoading = true;
+      historyCostList(obj)
+        .then(res => {
+          this.itemData = res.data.data;
+        })
+        .finally(() => {
+          this.itemLoading = false;
+        });
+    },
+    searchReset() {
+      this.query = this.$options.data().query;
+      // this.onLoad(this.page);
+    },
+    // 搜索按钮点击
+    searchChange(params, done) {
+      this.firstPage = true;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.query);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    onLoad(page, params = {}) {
+      if (this.firstPage) {
+        let obj = {};
+        obj = {
+          businessType: this.businessType,
+          ...Object.assign(params, this.query)
+        };
+        this.loading = true;
+        billsList(page.currentPage, page.pageSize, obj)
+          .then(res => {
+            this.data = res.data.data.records;
+            this.page.total = res.data.data.total;
+          })
+          .finally(() => {
+            this.loading = false;
+          });
+      }
+    },
+    submit() {
+      if (this.selectionList.length == 0) {
+        return this.$message.error("请选择费用明细");
+      }
+      let obj = {
+        id: this.form.id,
+        feeCenterListAll: this.selectionList
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: "加载中",
+        spinner: "el-icon-loading",
+        background: "rgba(255,255,255,0.7)"
+      });
+      historyCostImport(obj)
+        .then(res => {
+          this.$emit("update");
+          this.dialogVisible = false;
+        })
+        .finally(() => {
+          loading.close();
+        });
+    },
+    // 更改表格颜色
+    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 lang="scss" 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;
+}
+
+::v-deep .el-col-md-8 {
+  width: 24.33333%;
+}
+::v-deep .el-dialog__body {
+  padding: 5px 20px;
+}
+</style>

+ 2 - 1
src/components/iosbasic-data/shipCopy.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-dialog v-dialogDrag title="复制单据" :visible.sync="dialogVisible" append-to-body width="80%">
+    <el-dialog v-dialogDrag title="复制单据" :visible.sync="dialogVisible" append-to-body width="80%" :close-on-click-modal="false">
       <avue-form v-if="dialogVisible" v-model="form" :option="optionForm"></avue-form>
       <span style="font-weight: 600;color: #000;">查询数据</span>
       <avue-crud
@@ -44,6 +44,7 @@ export default {
       fristQuery: true,
       selectionList: [],
       form: {},
+      data:[],
       dialogVisible: false,
       loading: false,
       query: {

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

@@ -314,7 +314,8 @@ export default {
     onLoad(page, params = {}) {
       let obj = {};
       obj = {
-        ...Object.assign(params, this.query)
+        ...Object.assign(params, this.query),
+        whetherDeactivate:0
       };
       if (obj.effectiveDateList && obj.effectiveDateList.length > 0) {
         obj.effectiveStartDate = obj.effectiveDateList[0];

+ 45 - 2
src/views/boxManagement/boxPoolDynamics/index.vue

@@ -190,7 +190,10 @@ export default {
       activeName: "1",
       isShow: true,
       form: {},
-      query: {},
+      query: {
+        whetherExpired:1,
+        type:2
+      },
       loading: false,
       page: {
         pageSize: 20,
@@ -222,7 +225,7 @@ export default {
         menuWidth: 70,
         tip: false,
         searchShow: true,
-        searchMenuSpan: 6,
+        searchMenuSpan: 18,
         // header: false,
         menu: false,
         border: true,
@@ -421,6 +424,46 @@ export default {
                 overHidden: true
               }
             ]
+          },
+          {
+            label: "单据状态",
+            prop: "whetherExpired",
+            width: 100,
+            hide:true,
+            search: true,
+            searchValue:1,
+            type: "select",
+            dicData: [
+              {
+                label: "正常",
+                value: 1
+              },
+              {
+                label: "全部",
+                value: null
+              }
+            ],
+            overHidden: true
+          },
+          {
+            label: "类型",
+            prop: "type",
+            width: 100,
+            hide:true,
+            search: true,
+            searchValue:2,
+            type: "select",
+            dicData: [
+              {
+                label: "可用",
+                value: 1
+              },
+              {
+                label: "盘存",
+                value: 2
+              }
+            ],
+            overHidden: true
           }
         ]
       },

+ 22 - 1
src/views/iosBasicData/OceanFreightImport/bills/assembly/feecenter.vue

@@ -184,6 +184,7 @@
             @click="allClick('存为模板', 'D')"
             >存为模板</el-button
           >
+          <el-button type="success" plain size="small" :disabled="disabled" @click="allClick('历史引入', 'D')">历史引入</el-button>
         </template>
         <template slot="indexHeader" slot-scope="scope">
           <el-button v-if="isFeeEditD" type="primary" size="small" icon="el-icon-plus" circle :disabled="disabled" @click="addDfun"></el-button>
@@ -543,6 +544,7 @@
             @click="allClick('存为模板', 'C')"
             >存为模板</el-button
           >
+          <el-button type="success" plain size="small" :disabled="disabled" @click="allClick('历史引入', 'C')">历史引入</el-button>
         </template>
         <template slot="indexHeader" slot-scope="scope">
           <el-button v-if="isFeeEditC" type="primary" size="small" icon="el-icon-plus" circle :disabled="disabled" @click="addCfun"> </el-button>
@@ -1095,6 +1097,7 @@
     <fee-modify-view ref="feeModifyView" :form="assemblyForm"></fee-modify-view>
     <sysn-corpName ref="sysnCorpName" @update="getData"></sysn-corpName>
     <cost-template ref="costTemplate"></cost-template>
+    <historical-introduction ref="introduction" businessType="SI" @update="getData"></historical-introduction>
   </div>
 </template>
 
@@ -1139,6 +1142,7 @@ import feeModify from "@/components/feeModify/main.vue";
 import feeModifyView from "@/components/feeModify/view.vue";
 import sysnCorpName from "./sysnCorpName";
 import costTemplate from "./components/costTemplate.vue";
+import historicalIntroduction from "@/components/iosbasic-data/historicalIntroduction.vue";
 import _ from "lodash";
 export default {
   components: {
@@ -1151,7 +1155,8 @@ export default {
     feeModify,
     feeModifyView,
     sysnCorpName,
-    costTemplate
+    costTemplate,
+    historicalIntroduction
   },
   props: {
     pid: {},
@@ -1712,6 +1717,12 @@ export default {
             width: "80",
             overHidden: true
           },
+          {
+            label: "排序",
+            prop: "sort",
+            width: 60,
+            overHidden: true
+          },
           // {
           //     label: "CNY(净额)",
           //     prop: "rmbAmountNet",
@@ -1946,6 +1957,12 @@ export default {
             width: "80",
             overHidden: true
           },
+          {
+            label: "排序",
+            prop: "sort",
+            width: 60,
+            overHidden: true
+          },
           // {
           //     label: "CNY(净额)",
           //     prop: "rmbAmountNet",
@@ -3932,6 +3949,10 @@ export default {
         });
     },
     allClick(name, type) {
+      if (name == "历史引入") {
+        console.log(this.assemblyForm);
+        this.$refs.introduction.openDialog(this.assemblyForm, type);
+      }
       if (name == "存为模板") {
         if (type == "D") {
           for (let item of this.selectionDList) {

+ 39 - 7
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -184,6 +184,7 @@
             @click="allClick('存为模板', 'D')"
             >存为模板</el-button
           >
+          <el-button type="success" plain size="small" :disabled="disabled" @click="allClick('历史引入', 'D')">历史引入</el-button>
         </template>
         <template slot="indexHeader" slot-scope="scope">
           <el-button v-if="isFeeEditD" type="primary" size="small" icon="el-icon-plus" circle :disabled="disabled" @click="addDfun"></el-button>
@@ -417,6 +418,18 @@
           </el-popover>
           <span v-else>{{ row.stlTtlAmount }}</span>
         </template>
+         <template slot="sort" slot-scope="{ row }">
+          <el-input-number
+            v-if="row.edit"
+            v-model="row.sort"
+            size="small"
+            :controls="false"
+            :precision="0"
+            placeholder="请输入"
+            style="width: 100%;"
+          ></el-input-number>
+          <span v-else>{{ row.sort }}</span>
+        </template>
         <template slot-scope="{ row, index }" slot="menu">
           <el-button v-if="row.id" type="text" size="small" @click="rowView(row, index)">查看</el-button>
           <!--<el-button v-if="scope.row.edit" type="text" size="small" @click="savefun(scope.row,scope.index,'D')">保存</el-button>-->
@@ -538,6 +551,7 @@
             @click="allClick('存为模板', 'C')"
             >存为模板</el-button
           >
+          <el-button type="success" plain size="small" :disabled="disabled" @click="allClick('历史引入', 'C')">历史引入</el-button>
         </template>
         <template slot="indexHeader" slot-scope="scope">
           <el-button v-if="isFeeEditC" type="primary" size="small" icon="el-icon-plus" circle :disabled="disabled" @click="addCfun"> </el-button>
@@ -954,7 +968,7 @@
           <el-col :span="8">
             <el-scrollbar>
               <basic-container>
-                <avue-tree  :option="treeOption" :data="templateData" @node-click="nodeClick" class="diy-tree"> </avue-tree>
+                <avue-tree :option="treeOption" :data="templateData" @node-click="nodeClick" class="diy-tree"> </avue-tree>
               </basic-container>
             </el-scrollbar>
           </el-col>
@@ -1092,6 +1106,7 @@
     <fee-modify-view ref="feeModifyView" :form="assemblyForm"></fee-modify-view>
     <sysn-corpName ref="sysnCorpName" @update="getData"></sysn-corpName>
     <cost-template ref="costTemplate"></cost-template>
+    <historical-introduction ref="introduction" businessType="SE" @update="getData"></historical-introduction>
   </div>
 </template>
 
@@ -1137,6 +1152,7 @@ import feeModify from "@/components/feeModify/main.vue";
 import feeModifyView from "@/components/feeModify/view.vue";
 import sysnCorpName from "./sysnCorpName";
 import costTemplate from "./components/costTemplate.vue";
+import historicalIntroduction from "@/components/iosbasic-data/historicalIntroduction.vue";
 import _ from "lodash";
 export default {
   components: {
@@ -1149,7 +1165,8 @@ export default {
     feeModify,
     feeModifyView,
     sysnCorpName,
-    costTemplate
+    costTemplate,
+    historicalIntroduction
   },
   props: {
     pid: {},
@@ -1718,6 +1735,12 @@ export default {
             width: "80",
             overHidden: true
           },
+          {
+            label: "排序",
+            prop: "sort",
+            width: 60,
+            overHidden: true
+          },
           // {
           //     label: "CNY(净额)",
           //     prop: "rmbAmountNet",
@@ -1966,6 +1989,12 @@ export default {
             prop: "usdAmount",
             width: "80",
             overHidden: true
+          },       
+          {
+            label: "排序",
+            prop: "sort",
+            width: 60,
+            overHidden: true
           },
           {
             label: "快递单号",
@@ -3453,11 +3482,11 @@ export default {
             }
             // 按箱量
             if (item.quantityRule == "按箱量") {
-              let sum=0
-              for(let item of this.assemblyForm.preContainersList){
-                sum+=item.quantity
+              let sum = 0;
+              for (let item of this.assemblyForm.preContainersList) {
+                sum += item.quantity;
               }
-              this.$set(row, "quantity",sum);
+              this.$set(row, "quantity", sum);
             }
           }
         }
@@ -3695,7 +3724,7 @@ export default {
               }
             }
             this.unitNoData.push({ ...item, boxquantity: teunum });
-          }else {
+          } else {
             this.unitNoData.push(item); // 不是TEU和不是箱的走这个
           }
         }
@@ -3965,6 +3994,9 @@ export default {
       this.$emit("billsDetailfun");
     },
     allClick(name, type) {
+      if (name == "历史引入") {
+        this.$refs.introduction.openDialog(this.assemblyForm, type);
+      }
       if (name == "存为模板") {
         if (type == "D") {
           for (let item of this.selectionDList) {