瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

qinbai 3 年之前
父節點
當前提交
8a907966a6

+ 8 - 0
src/App.vue

@@ -23,4 +23,12 @@ export default {
   height: 100%;
   overflow: hidden;
 }
+.el-input.is-disabled .el-input__inner {
+  color: #000000 !important;
+  background-color: #fcfcfc !important;
+}
+.el-textarea.is-disabled .el-textarea__inner {
+  color: #000000 !important;
+  background-color: #fcfcfc !important;
+}
 </style>

+ 146 - 0
src/components/warehouseSelect/configuration/mainList.json

@@ -0,0 +1,146 @@
+{
+  "height": "auto",
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchMenuSpan": 6,
+  "dialogWidth": "60%",
+  "searchShowBtn": false,
+  "searchShow": false,
+  "menu": false,
+  "addBtn": false,
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 300,
+  "dialogClickModal": false,
+  "column": [
+    {
+      "label": "库区编码",
+      "prop": "code",
+      "search": true,
+      "index": 1,
+      "width": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入库区编码",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "库区",
+      "prop": "cname",
+      "search": true,
+      "index": 2,
+      "width": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入商品库区",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "地址",
+      "prop": "addr",
+      "search": true,
+      "index": 3,
+      "width": 100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入地址",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "联系人",
+      "prop": "attn",
+      "search": true,
+      "index": 4,
+      "width": 100,
+      "rules": [{
+        "required": false,
+        "message": "请输入联系人",
+        "trigger": "blur"
+      }]
+    },
+    {
+      "label": "电话",
+      "prop": "tel",
+      "search": true,
+      "index": 5,
+      "width": 100,
+      "rules": [{
+        "required": false,
+        "message": "请输入电话",
+        "trigger": "blur"
+      }]
+    },
+    {
+      "label": "是否计费",
+      "prop": "iffee",
+      "search": true,
+      "index": 6,
+      "width": 100,
+      "rules": [{
+        "required": false,
+        "message": "请输入是否计费",
+        "trigger": "blur"
+      }]
+    },
+    {
+      "label": "库容",
+      "prop": "storageCapacity",
+      "search": true,
+      "index": 7,
+      "width": 100,
+      "rules": [{
+        "required": false,
+        "message": "请输入库容",
+        "trigger": "blur"
+      }]
+    },
+    {
+      "label": "仓库",
+      "prop": "storageTypeId",
+      "dicData": [],
+      "type": "tree",
+      "addDisabled": false,
+      "multiple": false,
+      "props": {
+        "label": "title"
+      },
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "click"
+      }],
+      "dicUrl": "/api/blade-system/tenant/select",
+      "hide": "!website.tenantMode",
+      "addDisplay": "website.tenantMode",
+      "editDisplay": "website.tenantMode",
+      "viewDisplay": "website.tenantMode"
+    },{
+      "label": "备注",
+      "prop": "remarks",
+      "index": 8,
+      "width":100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入备注",
+          "trigger": "blur"
+        }
+      ]
+    }
+  ]
+}

+ 274 - 0
src/components/warehouseSelect/index.vue

@@ -0,0 +1,274 @@
+<template>
+  <span class="select-component" style="display:inline-flex;width: 100%;">
+    <el-select
+      v-model="value"
+      size="small"
+      :placeholder="configuration.placeholder"
+      style="border-right: none;width: 100%"
+      :disabled="disabled?disabled:false"
+      :multiple="configuration.multiple?configuration.multiple:false"
+      :clearable="configuration.clearable?configuration.clearable:false"
+      :collapse-tags="configuration.collapseTags?configuration.collapseTags:false"
+      filterable
+      remote
+      @change="changeName"
+      :remote-method="remoteMethod"
+    >
+      <el-option
+        v-for="item in configuration.dicData.length !== 0?dicData.length !== 0?dicData:configuration.dicData:dicData"
+        :key="item.id"
+        :label="item.cname"
+        :value="item.id"
+      />
+    </el-select>
+    <el-button slot="append" icon="el-icon-search" size="mini" @click="dialogVisible = true"
+               :disabled="disabled?disabled:false"></el-button>
+  <el-dialog
+    v-dialogdrag
+    title="导入仓库"
+    :visible.sync="dialogVisible"
+    class="el-dialogDeep"
+    append-to-body
+    width="80%">
+    <el-row style="height: 0">
+      <el-col :span="5">
+        <div class="box">
+          <el-scrollbar>
+            <basic-container>
+              <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
+            </basic-container>
+          </el-scrollbar>
+        </div>
+      </el-col>
+      <el-col :span="19">
+        <basic-container>
+          <avue-crud :option="option"
+                     :data="dataList"
+                     ref="crud"
+                     v-model="form"
+                     :page.sync="page"
+                     :before-close="beforeClose"
+                     @search-change="searchChange"
+                     @search-reset="searchReset"
+                     @refresh-change="refreshChange"
+                     @selection-change="selectionChange"
+                     @on-load="onLoad"
+                     @tree-load="treeLoad">
+          </avue-crud>
+        </basic-container>
+      </el-col>
+    </el-row>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="dialogVisible = false">取 消</el-button>
+      <el-button type="primary" @click="confirmSelection"
+                 :disabled="configuration.multipleChoices === true?false:selection.length === 1?false:true">确 定</el-button>
+    </span>
+  </el-dialog>
+  </span>
+</template>
+
+<script>
+import option from "./configuration/mainList.json";
+import {customerList, typeSave,detail,deleteDetails,getDeptLazyTree,getDeptTree} from "@/api/basicData/basicStorageDesc"
+// import {customerList, typeSave, deleteDetails, getDeptLazyTree} from "@/api/basicData/customerInformation"
+
+export default {
+  name: "customerInformation",
+  props: {
+    disabled: Boolean,
+    value: String,
+    configuration: Object,
+  },
+  model: {
+    prop: 'value',
+    event: 'returnBack'
+  },
+  data() {
+    return {
+      form: {},
+      dicData: [],
+      dialogVisible: false,
+      value: '',
+      option: option,
+      parentId: 0,
+      dataList: [],
+      selection: [],
+      treeOption: {
+        nodeKey: 'id',
+        lazy: true,
+        treeLoad: function (node, resolve) {
+          const parentId = (node.level === 0) ? 0 : node.data.id;
+          getDeptLazyTree(parentId).then(res => {
+            resolve(res.data.data.map(item => {
+              return {
+                ...item,
+                leaf: !item.hasChildren
+              }
+            }))
+          });
+        },
+        addBtn: false,
+        menu: false,
+        size: 'small',
+        props: {
+          labelText: '标题',
+          label: 'title',
+          value: 'value',
+          children: 'children'
+        }
+      },
+      page: {
+        pageSize: 10,
+        pagerCount: 5,
+        total: 0,
+      },
+      // 远程模糊查找loading
+      loading: false,
+      queryParams: {
+        size: 10,
+        current: 1
+      },
+    }
+  },
+  created() {
+    this.option.searchShow = this.configuration.searchShow ? this.configuration.searchShow : false
+    this.remoteMethod()
+  },
+  methods: {
+    changeName(){
+      this.$emit('returnBack', this.value)
+    },
+    //刷新触发
+    refreshChange() {
+      this.page = {
+        pageSize: 10,
+        pagerCount: 5,
+        total: 0,
+      }
+    },
+    //确认导出触发
+    confirmSelection() {
+      this.dicData = []
+      if (this.configuration.multipleChoices === true) {
+        let value = []
+        for (let item in this.selection) {
+          this.dicData.push({id: this.selection[item].id, cname: this.selection[item].cname})
+          value.push(this.selection[item].id)
+        }
+        this.value = value
+      } else {
+        this.dicData.push({id: this.selection[0].id, cname: this.selection[0].cname})
+        this.value = this.selection[0].id
+      }
+      this.selection = []
+      this.$emit('returnBack', this.value)
+      this.dialogVisible = false
+      this.$emit('receiveList',this.dicData)
+    },
+    //选中触发
+    selectionChange(selection) {
+      this.selection = selection
+    },
+    nodeClick(data) {
+      this.treeDeptId = data.id;
+      this.page.currentPage = 1;
+      this.onLoad(this.page);
+    },
+    //查询全部
+    initData() {
+      customerList().then(res => {
+        console.log(this.form);
+        const column = this.findObject(this.option.column, "parentId");
+        column.dicData = res.data.data.records;
+      });
+    },
+    //新增子项触发
+    handleAdd(row) {
+      this.parentId = row.id;
+      const column = this.findObject(this.option.column, "parentId");
+      column.value = row.id;
+      column.addDisabled = true;
+      this.$refs.crud.rowAdd();
+    },
+    //点击新增时触发
+    beforeClose(done) {
+      this.parentId = "";
+      const column = this.findObject(this.option.column, "parentId");
+      column.value = "";
+      column.addDisabled = false;
+      done();
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      console.log(params)
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done()
+    },
+    //搜索重置按钮触发
+    searchReset() {
+      this.treeDeptId = '';
+      this.onLoad(this.page);
+    },
+    onLoad(page, params = {parentId: 0}) {
+      let queryParams = Object.assign({}, params, {
+        size: page.pageSize,
+        current: page.currentPage,
+        corpsTypeId: this.treeDeptId
+      })
+      customerList(queryParams).then(res => {
+        this.dataList = res.data.data.records
+        this.page.total = res.data.data.total
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 500;
+        } else {
+          this.option.height = window.innerHeight - 200;
+        }
+      })
+    },
+    //树桩列点击展开触发
+    treeLoad(tree, treeNode, resolve) {
+      const parentId = tree.id;
+      customerList({parentId: parentId}).then(res => {
+        resolve(res.data.data.records);
+      });
+    },
+    // 远程模糊查找
+    remoteMethod(query) {
+      if (query !== '') {
+        this.loading = true;
+        this.queryParams = {
+          size: 10,
+          current: 1,
+          cname: query
+        }
+        customerList(this.queryParams).then(res => {
+          this.dicData = res.data.data.records
+          this.loading = false;
+        });
+      } else {
+        this.loading = true
+        this.queryParams = {
+          size: 10,
+          current: 1
+        }
+        customerList(this.queryParams).then(res => {
+          this.dicData = res.data.data.records
+          this.loading = false;
+        });
+      }
+    },
+  }
+};
+</script>
+
+<style scoped lang="scss">
+.el-dialogDeep {
+  ::v-deep .el-dialog {
+    .el-dialog__body, .el-dialog__footer {
+      padding-bottom: 0 !important;
+      padding-top: 0 !important;
+    }
+  }
+}
+</style>

+ 3 - 0
src/main.js

@@ -31,6 +31,8 @@ import {
 import './util/directives.js'
 //客户选择组件
 import selectComponent from '@/components/selectComponent/customerSelect';
+// 仓库选择组件
+import warehouseSelect from '@/components/warehouseSelect/index';
 //枚举列设置名称管理
 import {
   getColumnName
@@ -40,6 +42,7 @@ import {
   saveColumnData
 } from "@/util/columnSetting"
 Vue.component('selectComponent', selectComponent);
+Vue.component('warehouseSelect', warehouseSelect);
 import portInfo from "@/components/port-info/index";
 Vue.component('portInfo', portInfo);
 // 注册全局crud驱动

+ 33 - 28
src/views/exportTrade/customerInquiry/config/mainList.json

@@ -1,6 +1,6 @@
 {
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuSpan": 8,
   "border": true,
   "index": true,
   "viewBtn": false,
@@ -10,14 +10,15 @@
   "align": "center",
   "menuWidth": "180",
   "searchIcon": true,
-  "searchIndex": 3,
+  "searchIndex": 2,
   "column": [{
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
       "index": 1,
       "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
       "label": "订单日期",
@@ -25,10 +26,8 @@
       "search": true,
       "index": 2,
       "width": 100,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00",
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
       "label": "有效日期",
@@ -36,10 +35,8 @@
       "search": true,
       "index": 3,
       "width": 100,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00",
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
       "label": "价格条款",
@@ -84,11 +81,11 @@
       "width": 100,
       "overHidden": true,
       "type": "select",
-      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
       "props": {
         "label": "dictValue",
         "value": "dictValue"
-      }
+      },
+      "searchSpan":8
     },
     {
       "label": "起运港",
@@ -96,7 +93,8 @@
       "search": true,
       "index": 10,
       "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
       "label": "目的港",
@@ -111,39 +109,40 @@
       "props": {
         "label": "name",
         "value": "name"
-      }
+      },
+      "searchSpan":8
     },
     {
       "label": "数量合计",
-      "prop": "",
+      "prop": "orderQuantity",
       "index": 12,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "毛利额",
-      "prop": "",
+      "prop": "grossProfit",
       "index": 13,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "毛利率",
-      "prop": "",
+      "prop": "grossProfitRate",
       "index": 14,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "销售金额",
-      "prop": "",
+      "prop": "amount",
       "index": 15,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "采购金额",
-      "prop": "",
+      "prop": "purchaseAmount",
       "index": 16,
       "width": 100,
       "overHidden": true
@@ -155,31 +154,36 @@
       "index": 17,
       "width": 100,
       "overHidden": true,
-      "showColumn":false
+      "hide":true,
+      "showColumn":false,
+      "searchSpan":8
     },
     {
       "label": "系统号",
-      "prop": "SysNo",
+      "prop": "sysNo",
       "search": true,
       "index": 17,
       "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
       "label": "制单人",
-      "prop": "",
+      "prop": "createUser",
       "index": 18,
       "width": 100,
       "search": true,
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
       "label": "制单日期",
-      "prop": "",
+      "prop": "createTime",
       "index": 19,
       "width": 100,
       "search": true,
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
       "label": "备注",
@@ -187,7 +191,8 @@
       "index": 20,
       "width": 100,
       "search": true,
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
       "label": "采购备注",

+ 9 - 2
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -543,10 +543,10 @@ export default {
               value: "dictValue"
             },
             change: ({ value }) => {
-              if (value == "CNY") {
+              if (value == "人民币") {
                 this.form.exchangeRate = 1;
               }
-              if (value == "USD") {
+              if (value == "美元") {
                 this.form.exchangeRate = 6.3843;
               }
             }
@@ -996,6 +996,13 @@ export default {
         done();
         if (valid) {
           let orderFeesList = this.$refs.feeInfo.submitData();
+          if (this.data.length > 0) {
+            for (let i = 0; i < this.data.length; i++) {
+              if (this.data[i].corpId == null) {
+                return this.$message.error(`请输入第${i + 1}行的供应商`);
+              }
+            }
+          }
           for (let i = 0; i < orderFeesList.length; i++) {
             if (orderFeesList[i].corpId == null) {
               return this.$message.error(`请输入第${i + 1}行的结算中心`);

+ 54 - 8
src/views/exportTrade/customerInquiry/index.vue

@@ -17,6 +17,9 @@
         @saveColumn="saveColumn"
         :cell-style="cellStyle"
       >
+        <template slot-scope="{ row }" slot="createUser">
+          <span>{{ row.createUserName }}</span>
+        </template>
         <template slot="portOfLoadSearch">
           <port-info v-model="search.portOfLoad" />
         </template>
@@ -35,6 +38,30 @@
           >
           </el-date-picker>
         </template>
+        <template slot="dateValiditySearch">
+          <el-date-picker
+            v-model="search.dateValidity"
+            type="daterange"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
+        </template>
+        <template slot="createTimeSearch">
+          <el-date-picker
+            v-model="search.createTime"
+            type="daterange"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
+        </template>
         <template slot="menuLeft">
           <el-button
             type="primary"
@@ -55,6 +82,9 @@
         <template slot-scope="scope" slot="corpId">
           {{ scope.row.corpsName }}
         </template>
+        <template slot-scope="scope" slot="grossProfitRate">
+          {{ scope.row.grossProfitRate }}%
+        </template>
         <template slot-scope="scope" slot="menu">
           <el-button
             type="text"
@@ -98,7 +128,8 @@ export default {
         multiple: false,
         collapseTags: false,
         placeholder: "请点击右边按钮选择",
-        dicData: []
+        dicData: [],
+        clearable: true
       },
       search: {},
       form: {},
@@ -117,13 +148,17 @@ export default {
   },
   components: { detailPage },
   async created() {
-    this.search.businesDate=defaultDate()
+    this.search.businesDate = defaultDate();
     /**
      * 已定义全局方法,直接使用,getColumnData获取列数据,参数传值(表格名称,引入的本地JSON的数据定义的名称)
      * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
      * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
      */
     this.option = await this.getColumnData(this.getColumnName(0), option);
+    this.getWorkDicts("order_status").then(res => {
+      this.findObject(this.option.column, "orderStatus").dicData =
+        res.data.data;
+    });
     let _this = this;
     this.option.column.forEach(e => {
       if (e.prop == "exchangeRate") {
@@ -185,7 +220,17 @@ export default {
         params.orderStartDate = params.businesDate[0];
         params.orderEndDate = params.businesDate[1];
       }
+      if (params.dateValidity) {
+        params.dateValidityStart = params.dateValidity[0];
+        params.dateValidityEnd = params.dateValidity[1];
+      }
+      if (params.createTime) {
+        params.createTimeStart = params.createTime[0];
+        params.createTimeEnd = params.createTime[1];
+      }
       delete params.businesDate;
+      delete params.dateValidity;
+      delete params.createTime;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done();
@@ -198,11 +243,12 @@ export default {
       this.page.pageSize = val;
     },
     onLoad(page, params) {
-      if (this.search.businesDate.length>0) {
-        params={
-          orderStartDate:this.search.businesDate[0],
-          orderEndDate:this.search.businesDate[1],
-        }
+      if (this.search.businesDate && this.search.businesDate.length > 0) {
+        params = {
+          ...params,
+          orderStartDate: this.search.businesDate[0],
+          orderEndDate: this.search.businesDate[1]
+        };
       }
       this.loading = true;
       getList(page.currentPage, page.pageSize, params)
@@ -210,7 +256,7 @@ export default {
           this.dataList = res.data.data.records ? res.data.data.records : [];
           this.page.total = res.data.data.total;
           if (this.page.total) {
-            this.option.height = window.innerHeight - 420;
+            this.option.height = window.innerHeight - 460;
           }
         })
         .finally(() => {

+ 58 - 64
src/views/exportTrade/invoice/config/mainList.json

@@ -1,6 +1,6 @@
 {
   "searchShow": true,
-  "searchMenuSpan": 24,
+  "searchMenuSpan": 8,
   "border": true,
   "index": true,
   "viewBtn": false,
@@ -12,137 +12,131 @@
   "searchLabelWidth": "90",
   "showSummary": true,
   "searchIcon": true,
-  "searchIndex": 3,
+  "searchIndex": 2,
   "column": [{
-      "label": "系统号",
-      "prop": "sysNo",
-      "search": true,
+      "label": "销售订单号",
+      "prop": "orgOrderNo",
       "index": 1,
       "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "search": true,
+      "searchSpan": 8
     },
     {
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
+      "searchSpan": 8,
       "index": 2,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "销售订单号",
-      "prop": "srcOrderNo",
+      "label": "所属公司",
+      "prop": "belongToCorpName",
+      "search": true,
+      "searchSpan": 8,
       "index": 3,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "订单状态",
-      "prop": "deliveryStatus",
+      "label": "出库日期",
+      "prop": "businessDate",
       "search": true,
+      "searchSpan": 8,
       "index": 4,
       "width": 100,
       "overHidden": true,
-      "type": "select",
-      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
-      "props": {
-        "label": "dictValue",
-        "value": "dictValue"
-      }
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd 00:00:00"
     },
     {
-      "label": "仓库名称",
-      "prop": "storageId",
+      "label": "商品名称",
+      "prop": "",
       "search": true,
       "index": 5,
       "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "hide": true,
+      "showColumn": false,
+      "searchSpan": 8
     },
     {
-      "label": "仓库类型",
-      "prop": "warehouseType",
-      "search": true,
+      "label": "仓库",
+      "prop": "storageId",
       "index": 6,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "发货日期",
-      "prop": "businessDate",
-      "search": true,
+      "label": "出库数量",
+      "prop": "totalQuantity",
       "index": 7,
       "width": 100,
-      "overHidden": true,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00"
+      "overHidden": true
     },
     {
-      "label": "制单时间",
-      "prop": "createTime",
-      "search": true,
+      "label": "出库金额",
+      "prop": "deliveryAmount",
       "index": 8,
       "width": 100,
-      "overHidden": true,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00"
+      "overHidden": true
     },
     {
-      "label": "出库金额",
-      "prop": "deliveryAmount",
-      "search": false,
+      "label": "收货地址",
+      "prop": "arrivalAddress",
+      "search": true,
+      "searchSpan": 8,
       "index": 9,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "出库数量",
-      "prop": "totalQuantity",
-      "search": false,
+      "label": "收货人",
+      "prop": "arrivalContact",
+      "search": true,
+      "searchSpan": 8,
       "index": 10,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "费用合计",
-      "prop": "totalCost",
-      "search": false,
+      "label": "收货电话",
+      "prop": "arrivalTel",
+      "search": true,
+      "searchSpan": 8,
       "index": 11,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "联系人",
-      "prop": "arrivalContact",
-      "search": false,
+      "label": "备注",
+      "prop": "deliveryRemarks",
+      "search": true,
+      "searchSpan": 8,
       "index": 12,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "电话",
-      "prop": "arrivalTel",
-      "search": false,
+      "label": "制单日期",
+      "prop": "createTime",
       "index": 13,
       "width": 100,
-      "overHidden": true
+      "search": true,
+      "overHidden": true,
+      "searchSpan": 8
     },
     {
-      "label": "收货地址",
-      "prop": "arrivalAddress",
-      "search": false,
+      "label": "制单人",
+      "prop": "createUser",
       "index": 14,
       "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "deliveryRemarks",
-      "search": false,
-      "index": 15,
-      "width": 100,
-      "overHidden": true
+      "search": true,
+      "overHidden": true,
+      "searchSpan": 8
     }
   ]
 }

+ 2 - 0
src/views/exportTrade/salesContract/config/customerContact.json

@@ -11,6 +11,8 @@
   "menuWidth": 150,
   "refreshBtn": false,
   "showSummary": true,
+  "selection": true,
+  "tip":false,
   "column": [{
       "label": "产品类别",
       "prop": "priceCategory",

+ 173 - 75
src/views/exportTrade/salesContract/config/mainList.json

@@ -1,6 +1,6 @@
 {
   "searchShow": true,
-  "searchMenuSpan": 12,
+  "searchMenuSpan": 24,
   "border": true,
   "index": true,
   "viewBtn": false,
@@ -10,85 +10,135 @@
   "align": "center",
   "menuWidth": "180",
   "searchIcon": true,
-  "searchIndex": 3,
+  "searchIndex": 2,
+  "searchLabelWidth": 90,
   "column": [{
-      "label": "系统号",
-      "prop": "sysNo",
-      "search": true,
-      "index": 1,
-      "width": 100,
-      "overHidden": true
-    }, {
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
-      "index": 2,
+      "index": 1,
       "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
       "label": "销售订单号",
       "prop": "orderNo",
+      "index": 2,
+      "width": 100,
+      "overHidden": true,
+      "search": true,
+      "searchSpan":8
+    },
+    {
+      "label": "订单日期",
+      "prop": "businesDate",
+      "search": true,
       "index": 3,
       "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
-      "label": "订单状态",
-      "prop": "orderStatus",
+      "label": "预交日期",
+      "prop": "dateValidity",
       "search": true,
       "index": 4,
       "width": 100,
       "overHidden": true,
-      "type": "select",
-      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
-      "props": {
-        "label": "dictValue",
-        "value": "dictValue"
-      }
-    }, {
-      "label": "业务员",
-      "prop": "salesName",
+      "searchSpan":8
+    },
+    {
+      "label": "价格条款",
+      "prop": "priceTerms",
+      "index": 5,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "收款方式",
+      "prop": "paymentType",
       "index": 5,
       "width": 100,
       "overHidden": true
-    }, {
-      "label": "提成标准",
-      "prop": "commissionRate",
+    },
+    {
+      "label": "运输方式",
+      "prop": "transport",
       "index": 6,
       "width": 100,
       "overHidden": true
-    }, {
-      "label": "联系人",
-      "prop": "corpAttn",
+    },
+    {
+      "label": "箱型",
+      "prop": "boxPile",
       "index": 7,
       "width": 100,
       "overHidden": true
-    }, {
-      "label": "电话",
-      "prop": "corpTel",
+    },
+    {
+      "label": "箱量",
+      "prop": "boxNumber",
       "index": 8,
       "width": 100,
       "overHidden": true
-    }, {
-      "label": "起运港",
-      "prop": "portOfLoad",
+    },
+    {
+      "label": "起订量",
+      "prop": "minOrder",
+      "index": 8,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "预计海运费",
+      "prop": "predictOceanFreight",
+      "index": 8,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "参考海运费",
+      "prop": "referenceOceanFreight",
+      "index": 8,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "实际海运费",
+      "prop": "oceanFreight",
+      "index": 8,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "订单状态",
+      "prop": "orderStatus",
       "search": true,
       "index": 9,
       "width": 100,
       "overHidden": true,
       "type": "select",
-      "filterable": true,
-      "dicData": [],
       "props": {
-        "label": "name",
-        "value": "name"
-      }
-    }, {
+        "label": "dictValue",
+        "value": "dictValue"
+      },
+      "searchSpan":8
+    },
+    {
+      "label": "起运港",
+      "prop": "portOfLoad",
+      "search": true,
+      "index": 10,
+      "width": 100,
+      "overHidden": true,
+      "searchSpan":8
+    },
+    {
       "label": "目的港",
       "prop": "portOfDestination",
       "search": true,
-      "index": 10,
+      "index": 11,
       "width": 100,
       "overHidden": true,
       "type": "select",
@@ -97,61 +147,109 @@
       "props": {
         "label": "name",
         "value": "name"
-      }
-    }, {
-      "label": "运输方式",
-      "prop": "transport",
-      "index": 11,
+      },
+      "searchSpan":8
+    },
+    {
+      "label": "数量合计",
+      "prop": "orderQuantity",
+      "index": 12,
       "width": 100,
       "overHidden": true
-    }, {
-      "label": "价格条款",
-      "prop": "priceTerms",
+    },
+    {
+      "label": "发货数量",
+      "prop": "actualQuantity",
       "index": 12,
       "width": 100,
       "overHidden": true
-    }, {
-      "label": "订单日期",
-      "prop": "businesDate",
-      "search": true,
+    },
+    {
+      "label": "毛利额",
+      "prop": "grossProfit",
+      "index": 13,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "毛利率",
+      "prop": "grossProfitRate",
       "index": 14,
       "width": 100,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00",
       "overHidden": true
-    }, {
-      "label": "有效日期",
-      "prop": "dateValidity",
+    },
+    {
+      "label": "销售金额",
+      "prop": "amount",
       "index": 15,
       "width": 100,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00",
       "overHidden": true
-    }, {
-      "label": "收款方式",
-      "prop": "paymentType",
+    },
+    {
+      "label": "采购金额",
+      "prop": "purchaseAmount",
       "index": 16,
       "width": 100,
       "overHidden": true
-    }, {
-      "label": "币别",
-      "prop": "currency",
+    },
+    {
+      "label": "商品名称",
+      "prop": "",
+      "search": true,
       "index": 17,
       "width": 100,
-      "overHidden": true
-    }, {
-      "label": "汇率",
-      "prop": "exchangeRate",
+      "overHidden": true,
+      "hide":true,
+      "showColumn":false,
+      "searchSpan":8
+    },
+    {
+      "label": "系统号",
+      "prop": "sysNo",
+      "search": true,
+      "index": 17,
+      "width": 100,
+      "overHidden": true,
+      "searchSpan":8
+    },
+    {
+      "label": "制单人",
+      "prop": "createUser",
       "index": 18,
       "width": 100,
-      "overHidden": true
+      "search": true,
+      "overHidden": true,
+      "searchSpan":8
+    },
+    {
+      "label": "制单日期",
+      "prop": "createTime",
+      "index": 19,
+      "width": 100,
+      "search": true,
+      "overHidden": true,
+      "searchSpan":8
     },
     {
       "label": "备注",
       "prop": "orderRemark",
-      "index": 19,
+      "index": 20,
+      "width": 100,
+      "search": true,
+      "overHidden": true,
+      "searchSpan":8
+    },
+    {
+      "label": "采购备注",
+      "prop": "purchaseRemark",
+      "index": 21,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "销售备注",
+      "prop": "shippingRemark",
+      "index": 20,
       "width": 100,
       "overHidden": true
     }

+ 8 - 3
src/views/exportTrade/salesContract/detailsPage.vue

@@ -254,7 +254,7 @@
                 type="warning"
                 icon="el-icon-plus"
                 size="small"
-                :disabled="detailData.status == 1 || tableOption.length == 0"
+                :disabled="detailData.status == 1 || orderItemIds.length == 0"
                 @click="getInvoice"
                 >生成发货单
               </el-button>
@@ -385,7 +385,6 @@ import {
   getGoods,
   deliverGoods,
   getPorts,
-  getSysNo,
   getSpecification,
   saveSell
 } from "@/api/basicData/salesContract";
@@ -994,7 +993,6 @@ export default {
       list.map(e => {
         this.orderItemIds.push(e.id);
       });
-      console.log(this.orderItemIds);
     },
     selectionChange(list) {
       this.selectionList = list;
@@ -1040,6 +1038,13 @@ export default {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
+          if (this.data.length > 0) {
+            for (let i = 0; i < this.data.length; i++) {
+              if (this.data[i].corpId == null) {
+                return this.$message.error(`请输入第${i + 1}行的供应商`);
+              }
+            }
+          }
           const orderFeesList = this.$refs.feeInfo.submitData();
           for (let i = 0; i < orderFeesList.length; i++) {
             if (orderFeesList[i].corpId == null) {

+ 44 - 3
src/views/exportTrade/salesContract/index.vue

@@ -16,6 +16,12 @@
         @saveColumn="saveColumn"
         :cell-style="cellStyle"
       >
+        <template slot-scope="scope" slot="grossProfitRate">
+          {{ scope.row.grossProfitRate }}%
+        </template>
+        <template slot-scope="{ row }" slot="createUser">
+          <span>{{ row.createUserName }}</span>
+        </template>
         <template slot="menuLeft">
           <el-button
             type="primary"
@@ -51,6 +57,30 @@
           >
           </el-date-picker>
         </template>
+        <template slot="dateValiditySearch">
+          <el-date-picker
+            v-model="search.dateValidity"
+            type="daterange"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
+        </template>
+        <template slot="createTimeSearch">
+          <el-date-picker
+            v-model="search.createTime"
+            type="daterange"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
+        </template>
         <template slot-scope="scope" slot="corpId">
           {{ scope.row.corpsName }}
         </template>
@@ -87,7 +117,7 @@
 import option from "./config/mainList.json";
 import { getList, remove, getPorts } from "@/api/basicData/salesContract";
 import detailPage from "./detailsPage.vue";
-
+import { defaultDate } from "@/util/date";
 export default {
   name: "customerInformation",
   data() {
@@ -116,6 +146,7 @@ export default {
   },
   components: { detailPage },
   async created() {
+    this.search.businesDate = defaultDate();
     this.option = await this.getColumnData(this.getColumnName(4), option);
     let _this = this;
     this.option.column.forEach(e => {
@@ -141,6 +172,10 @@ export default {
       this.findObject(this.option.column, "portOfDestination").dicData =
         res.data;
     });
+    this.getWorkDicts("order_status").then(res => {
+      this.findObject(this.option.column, "orderStatus").dicData =
+        res.data.data;
+    });
   },
   methods: {
     cellStyle() {
@@ -196,13 +231,19 @@ export default {
       this.page.pageSize = val;
     },
     onLoad(page, params) {
+      console.log(this.search.businesDate)
+      if (this.search.businesDate && this.search.businesDate.length > 0) {
+        params = {
+          ...params,
+          orderStartDate: this.search.businesDate[0],
+          orderEndDate: this.search.businesDate[1]
+        };
+      }
       getList(page.currentPage, page.pageSize, params).then(res => {
         this.dataList = res.data.data.records ? res.data.data.records : [];
         this.page.total = res.data.data.total;
         if (this.page.total) {
           this.option.height = window.innerHeight - 380;
-        } else {
-          this.option.height = window.innerHeight - 305;
         }
       });
     },