zx 2 年之前
父節點
當前提交
0ce02b41d6
共有 53 個文件被更改,包括 6789 次插入5277 次删除
  1. 2 15
      build/utils.js
  2. 16 0
      config/index.js
  3. 二進制
      icore-pass.zip
  4. 3 3
      package.json
  5. 2 0
      src/components/DilCommonUI/packages/table/src/table.js
  6. 7 0
      src/components/DilCommonUI/packages/table/src/table.vue
  7. 0 2
      src/config/include.js
  8. 0 8
      src/lib/el-table/index.js
  9. 0 28
      src/lib/el-table/src/dropdown.js
  10. 0 259
      src/lib/el-table/src/filter-panel.vue
  11. 0 68
      src/lib/el-table/src/layout-observer.js
  12. 0 478
      src/lib/el-table/src/table-body.js
  13. 0 438
      src/lib/el-table/src/table-column.js
  14. 0 147
      src/lib/el-table/src/table-footer.js
  15. 0 656
      src/lib/el-table/src/table-header.js
  16. 0 231
      src/lib/el-table/src/table-layout.js
  17. 0 650
      src/lib/el-table/src/table-store.js
  18. 0 666
      src/lib/el-table/src/table.vue
  19. 0 110
      src/lib/el-table/src/util.js
  20. 10 0
      src/views/RMS/components/addContractPrice.vue
  21. 15 3
      src/views/RMS/components/contractPrice.vue
  22. 538 508
      src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/addSporadicTransportAppoint.vue
  23. 5 0
      src/views/TMS/components/bmsship/addMoistureDetection.vue
  24. 448 48
      src/views/TMS/components/bmsship/detailsStatement.vue
  25. 132 0
      src/views/TMS/components/bmsship/threeSectionFeeDetails.vue
  26. 283 0
      src/views/TMS/components/bmsship/updateThreeSectionFeeDetails.vue
  27. 32 7
      src/views/TMS/components/domesticMine/wagonLoadAdd.vue
  28. 2 2
      src/views/TMS/components/domesticMine/wagonLoadbu.vue
  29. 602 287
      src/views/TMS/components/importedEmergency/addWagonLoadEmergency.vue
  30. 3 0
      src/views/TMS/components/importedEmergency/wagonLoadEmergency.vue
  31. 21 2
      src/views/TMS/components/importedIngredients/truckEnfactoryFuResult.vue
  32. 52 18
      src/views/TMS/components/importedMine/addWagonLoad.vue
  33. 1 1
      src/views/TMS/components/importedMine/outBoundWagon.vue
  34. 45 15
      src/views/TMS/components/importedShip/addLoadShip.vue
  35. 3 3
      src/views/TMS/components/importedShip/updateLoadShip.vue
  36. 15 2
      src/views/TMS/router/index.js
  37. 3 1
      src/views/WMS/components/billingOrder/updateBill.vue
  38. 35 0
      src/views/appoint/components/saleContract/addSaleOrder.vue
  39. 1 1
      src/views/appoint/components/saleContract/importExcelSaleOrder.vue
  40. 3 2
      src/views/appoint/components/saleContract/saleOrderSteel.vue
  41. 3 1
      src/views/inward/components/inwardFactory/tareWeightResult.vue
  42. 529 0
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue
  43. 554 0
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue
  44. 322 19
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckOrder.vue
  45. 1293 0
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckPreview.vue
  46. 25 1
      src/views/inward/router/index.js
  47. 3 4
      src/views/queue/components/qmsEnFacotory/queueFStart.vue
  48. 2 0
      src/views/queue/components/qmsEnFacotory/updateBill.vue
  49. 312 245
      src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue
  50. 535 0
      src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelDetails.vue
  51. 77 0
      src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelStatement.vue
  52. 732 223
      src/views/sale/router/index.js
  53. 123 125
      src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelAllReport.vue

+ 2 - 15
build/utils.js

@@ -15,22 +15,9 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
-// let devModules = ["index", "appoint", "statisticalReport"];
-// let devModules = ["index", "statisticalReport", "appoint", "TMS"];
-// let devModules = ["index", "statisticalReport", "TMS", "appoint"];
-
-// let devModules = ["all"];
-
-let devModules = ["all"];
-
 // let devModules = ["index", "appoint", "statisticalReport", "WMS","TMS"];
-// let devModules = ["index", "inward", "appoint", "queue"];
-// let devModules = ["index", "appoint", "statisticalReport", "WMS"];
-// let devModules = ["index", "appoint", "inward", "statisticalReport", "RMS"];
-// let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS','WMS']
-// let devModules = ["index", "ADMINISTRATORS", "RMS"];
-// let devModules = ["index", "inward", "statisticalReport"];
-// let devModules = ['index','statisticalReport','inward']
+let devModules = ["index", "TMS", "appoint", "WMS", "inward", "statisticalReport"];
+// let devModules = ["all"];
 
 if (pathSrc.indexOf("node_modules") > -1) {
   devModules = require("../../../cors.js").devModules;

+ 16 - 0
config/index.js

@@ -33,6 +33,15 @@ let proxyTable = {
       "^/icore.icp.web/pass/auth/login": ""
     }
   },
+  "/icore-api/v1": {
+    target: "http://172.16.33.161:8088/api/v1/truckTms",
+    // target: "http://localhost:8080",
+    // target: "http://192.168.1.109:8080",
+    ws: true,
+    pathRewrite: {
+      "^/icore-api/v1": ""
+    }
+  },
   "/icore-api": {
     target: "http://172.16.33.166:9001",
     changeOrigin: true,
@@ -64,8 +73,13 @@ let proxyTable = {
     }
   },
   // 所有数据的请求域名地址
+  // http://localhost:8802/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=5&pageNum=1&pageSize=10
+  // http://172.16.33.161:8088/api/v1/truckTms/sysusertablecfgs/?userId=admin&userCode=admin&companyId=713710108567277568&uiId=metaData_appManagement_appSysTable&icore_t=1658973823958
+  // http://localhost:8802/icore-api/v1/sysusertablecfgs/?userId=923674253012897792&userCode=admin06&companyId=713710108567277568&uiId=systemConfig_userManage_table&icore_t=1659347371501
   "/api/v1": {
     target: "http://172.16.33.166:80",
+    // target: "http://localhost:8080",
+    // target: "http://192.168.1.109:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"
@@ -73,6 +87,8 @@ let proxyTable = {
   },
   "/views/api/v1": {
     target: "http://172.16.33.166:80",
+    // target: "http://localhost:8080",
+    // target: "http://192.168.1.109:8080",
     ws: true,
     pathRewrite: {
       "^/views/api/v1": "/api/v1"

二進制
icore-pass.zip


+ 3 - 3
package.json

@@ -30,7 +30,7 @@
     "crypto": "^1.0.1",
     "echarts": "^4.1.0",
     "el-cascader-multi": "^1.1.8",
-    "element-ui": "2.13.2",
+    "element-ui": "2.4.2",
     "file-saver": "^1.3.8",
     "graphql": "^14.1.1",
     "graphql-tag": "^2.10.1",
@@ -58,7 +58,6 @@
     "vue-apollo": "^3.0.0-beta.28",
     "vue-baidu-map": "^0.21.19",
     "vue-clipboard2": "^0.2.1",
-    "vue-element-bigdata-table": "^1.3.1",
     "vue-print-nb": "^1.7.5",
     "vue-property-decorator": "^8.2.1",
     "vue-quill-editor": "^3.0.5",
@@ -71,7 +70,8 @@
     "x2js": "^3.3.0",
     "xe-utils": "^3.5.4",
     "xlsx": "^0.18.4",
-    "xterm": "3.12.0"
+    "xterm": "3.12.0",
+    "codemirror": "5.65.5"
   },
   "devDependencies": {
     "@vue/test-utils": "^1.0.0-beta.24",

+ 2 - 0
src/components/DilCommonUI/packages/table/src/table.js

@@ -92,6 +92,7 @@ export default {
               //执行成功的回调
               this.$emit("func", response.data.data);
               this.refreshColumnData(d.columnData);
+              //this.$refs.mainTable.getTableConfig();
               this.isShow = true;
             });
         } else {
@@ -111,6 +112,7 @@ export default {
               //执行成功的回调
               this.$emit("func", response.data.data);
               this.refreshColumnData(d.columnData);
+              //this.$refs.mainTable.getTableConfig();
               this.isShow = true;
             });
         }

+ 7 - 0
src/components/DilCommonUI/packages/table/src/table.vue

@@ -21,6 +21,8 @@
       element-loading-spinner="el-icon-loading"
       :isHeigth="isHeigth"
       :shiyHeigth="shiyHeigth"
+      :id="id"
+      :individual-panel="individualPanel"
     >
       <!-- 多选列 -->
       <el-table-column
@@ -235,6 +237,11 @@ export default {
     //组件布局,子组件名用逗号分隔
     layout: {
       default: "total, prev, pager, next, sizes, jumper"
+    },
+    id:String,
+    individualPanel:{
+      type:Boolean,
+      default:false
     }
   },
   watch: {

+ 0 - 2
src/config/include.js

@@ -1,5 +1,4 @@
 /* eslint-disable */
-
 /**************************************************************** 通用引入,包含element-ui等 ***********************************************************************************/
 import Vue from 'vue';
 import ElementUI from 'element-ui';
@@ -30,7 +29,6 @@ Vue.use(VueClipboard)
 
 // use element-ui 2.4.2
 Vue.use(ElementUI);
-
 Vue.use(icorePlugin);
 
 /**************************************************************** 引入项目公用样式 简直覆盖Element-ui css ***********************************************************************/

+ 0 - 8
src/lib/el-table/index.js

@@ -1,8 +0,0 @@
-import ElTable from './src/table';
-
-/* istanbul ignore next */
-ElTable.install = function(Vue) {
-  Vue.component(ElTable.name, ElTable);
-};
-
-export default ElTable;

+ 0 - 28
src/lib/el-table/src/dropdown.js

@@ -1,28 +0,0 @@
-import Vue from 'vue';
-var dropdowns = [];
-
-!Vue.prototype.$isServer && document.addEventListener('click', function(event) {
-  dropdowns.forEach(function(dropdown) {
-    var target = event.target;
-    if (!dropdown || !dropdown.$el) return;
-    if (target === dropdown.$el || dropdown.$el.contains(target)) {
-      return;
-    }
-    dropdown.handleOutsideClick && dropdown.handleOutsideClick(event);
-  });
-});
-
-export default {
-  open(instance) {
-    if (instance) {
-      dropdowns.push(instance);
-    }
-  },
-
-  close(instance) {
-    var index = dropdowns.indexOf(instance);
-    if (index !== -1) {
-      dropdowns.splice(instance, 1);
-    }
-  }
-};

+ 0 - 259
src/lib/el-table/src/filter-panel.vue

@@ -1,259 +0,0 @@
-<template>
-  <transition name="el-zoom-in-top">
-    <div
-      class="el-table-filter"
-      v-if="multiple"
-      v-clickoutside="handleOutsideClick"
-      v-show="showPopper">
-      <div class="el-table-filter__content">
-        <el-input v-if="column.filters && column.filters.length > 5"
-          placeholder="请输入内容"
-          prefix-icon="el-icon-search"
-          @keyup.native="searchFilterEvent"
-          v-model="searchFilter">
-        </el-input>
-        <el-scrollbar wrap-class="el-table-filter__wrap">
-          <el-checkbox-group class="el-table-filter__checkbox-group" @change="handleCheckedChange" v-model="filteredValue">
-            <el-checkbox :id="'sb' + index"
-              v-for="(filter, index) in filtersBak"
-              :key="filter.value"
-              :label="filter.value">{{ filter.text }}</el-checkbox>
-          </el-checkbox-group>
-        </el-scrollbar>
-      </div>
-      <div class="el-table-filter__bottom">
-        <el-checkbox :indeterminate="isIndeterminate"  v-model="checkAll" @change="checkedAllChange">全选</el-checkbox>
-        <button @click="handleConfirm"
-          :class="{ 'is-disabled': filteredValue.length === 0 }"
-          :disabled="filteredValue.length === 0">{{ t('el.table.confirmFilter') }}</button>
-        <button @click="handleReset">{{ t('el.table.resetFilter') }}</button>
-      </div>
-    </div>
-    <div
-      class="el-table-filter"
-      v-else
-      v-clickoutside="handleOutsideClick"
-      v-show="showPopper">
-      <ul class="el-table-filter__list">
-        <li class="el-table-filter__list-item"
-            :class="{ 'is-active': filterValue === undefined || filterValue === null }"
-            @click="handleSelect(null)">{{ t('el.table.clearFilter') }}</li>
-        <li class="el-table-filter__list-item"
-            v-for="filter in filtersBak"
-            :label="filter.value"
-            :key="filter.value"
-            :class="{ 'is-active': isActive(filter) }"
-            @click="handleSelect(filter.value)" >{{ filter.text }}</li>
-      </ul>
-    </div>
-  </transition>
-</template>
-
-<script type="text/babel">
-  import Popper from 'element-ui/src/utils/vue-popper';
-  import { PopupManager } from 'element-ui/src/utils/popup';
-  import Locale from 'element-ui/src/mixins/locale';
-  import Clickoutside from 'element-ui/src/utils/clickoutside';
-  import Dropdown from './dropdown';
-  import ElCheckbox from 'element-ui/packages/checkbox';
-  import ElCheckboxGroup from 'element-ui/packages/checkbox-group';
-
-  export default {
-    name: 'ElTableFilterPanel',
-
-    mixins: [Popper, Locale],
-
-    directives: {
-      Clickoutside
-    },
-
-    components: {
-      ElCheckbox,
-      ElCheckboxGroup
-    },
-
-    props: {
-      placement: {
-        type: String,
-        default: 'bottom-end'
-      }
-    },
-
-    customRender(h) {
-      return (<div class="el-table-filter">
-        <div class="el-table-filter__content">
-        </div>
-        <div class="el-table-filter__bottom">
-          <button on-click={ this.handleConfirm }>{ this.t('el.table.confirmFilter') }</button>
-          <button on-click={ this.handleReset }>{ this.t('el.table.resetFilter') }</button>
-        </div>
-      </div>);
-    },
-
-    methods: {
-      searchFilterEvent() {
-        let that = this;
-        if (that.searchFilter !== '') {
-          var temp = that.filters.filter(function(val) {
-            return (val.value + '').indexOf(that.searchFilter + '') > -1;
-          });
-          that.filtersBak = temp;
-        } else {
-          that.filtersBak = that.filters;
-        }
-        that.handleCheckedChange(that.filteredValue);
-      },
-      handleCheckedChange(value) {
-        let checkedCount = value.length;
-        this.checkAll = checkedCount === this.filtersBak.length;
-        this.isIndeterminate = checkedCount > 0 && checkedCount < this.filtersBak.length;
-      },
-      checkedAllChange(val) {
-        let that = this;
-        if (val) {
-          var temp = [];
-          for (let i = 0; i < that.filtersBak.length; i++) {
-            temp.push(that.filtersBak[i].value);
-          }
-          temp.unshift('');
-          that.filteredValue = temp;
-        } else {
-          that.filteredValue = [];
-        }
-        that.isIndeterminate = false;
-      },
-      isActive(filter) {
-        return filter.value === this.filterValue;
-      },
-
-      handleOutsideClick() {
-        setTimeout(() => {
-          this.showPopper = false;
-        }, 16);
-      },
-
-      handleConfirm() {
-        this.confirmFilter(this.filteredValue);
-        this.handleOutsideClick();
-        this.searchFilter = '';
-        this.searchFilterEvent();
-      },
-
-      handleReset() {
-        this.filteredValue = [];
-        this.confirmFilter(this.filteredValue);
-        this.handleOutsideClick();
-        this.isIndeterminate = false;
-        this.checkAll = false;  
-        this.searchFilter = '';
-      },
-
-      handleSelect(filterValue) {
-        this.filterValue = filterValue;
-
-        if ((typeof filterValue !== 'undefined') && (filterValue !== null)) {
-          this.confirmFilter(this.filteredValue);
-        } else {
-          this.confirmFilter([]);
-        }
-
-        this.handleOutsideClick();
-      },
-
-      confirmFilter(filteredValue) {
-        this.table.store.commit('filterChange', {
-          column: this.column,
-          values: filteredValue
-        });
-        this.table.store.updateAllSelected();
-      }
-    },
-
-    data() {
-      return {
-        table: null,
-        cell: null,
-        column: null,
-        isIndeterminate: false,
-        checkAll: false,
-        searchFilter: '',
-        filtersBak: []
-      };
-    },
-
-    computed: {
-      filters: {
-        get() {
-					return this.column && this.column.filters;
-        },
-        set() {
-          this.filtersBak = this.column && this.column.filters;
-        }
-      },
-
-      filterValue: {
-        get() {
-          return (this.column.filteredValue || [])[0];
-        },
-        set(value) {
-          if (this.filteredValue) {
-            if ((typeof value !== 'undefined') && (value !== null)) {
-              this.filteredValue.splice(0, 1, value);
-            } else {
-              this.filteredValue.splice(0, 1);
-            }
-          }
-        }
-      },
-
-      filteredValue: {
-        get() {
-          if (this.column) {
-            return this.column.filteredValue || [];
-          }
-          return [];
-        },
-        set(value) {
-          if (this.column) {
-            this.column.filteredValue = value;
-          }
-        }
-      },
-
-      multiple() {
-        if (this.column) {
-          return this.column.filterMultiple;
-        }
-        return true;
-      }
-    },
-
-    mounted() {
-      this.popperElm = this.$el;
-      this.referenceElm = this.cell;  
-      this.table.bodyWrapper.addEventListener('scroll', () => {
-        this.updatePopper();
-      });
-
-      this.$watch('showPopper', (value) => {
-        if (this.column) this.column.filterOpened = value;
-        if (value) {
-          Dropdown.open(this);
-          this.filters = this.column && this.column.filters;
-          let checkedCount = this.filteredValue.length;
-          this.checkAll = checkedCount === this.filtersBak.length;
-          this.isIndeterminate = checkedCount > 0 && checkedCount < this.filtersBak.length;
-        } else {
-          Dropdown.close(this);
-        }
-      });
-    },
-    watch: {
-      showPopper(val) {
-        if (val === true && parseInt(this.popperJS._popper.style.zIndex, 10) < PopupManager.zIndex) {
-          this.popperJS._popper.style.zIndex = PopupManager.nextZIndex();
-        }
-      }
-    }
-  };
-</script>

+ 0 - 68
src/lib/el-table/src/layout-observer.js

@@ -1,68 +0,0 @@
-export default {
-  created() {
-    this.tableLayout.addObserver(this);
-  },
-
-  destroyed() {
-    this.tableLayout.removeObserver(this);
-  },
-
-  computed: {
-    tableLayout() {
-      let layout = this.layout;
-      if (!layout && this.table) {
-        layout = this.table.layout;
-      }
-      if (!layout) {
-        throw new Error('Can not find table layout.');
-      }
-      return layout;
-    }
-  },
-
-  mounted() {
-    this.onColumnsChange(this.tableLayout);
-    this.onScrollableChange(this.tableLayout);
-  },
-
-  updated() {
-    if (this.__updated__) return;
-    this.onColumnsChange(this.tableLayout);
-    this.onScrollableChange(this.tableLayout);
-    this.__updated__ = true;
-  },
-
-  methods: {
-    onColumnsChange() {
-      const cols = this.$el.querySelectorAll('colgroup > col');
-      if (!cols.length) return;
-      const flattenColumns = this.tableLayout.getFlattenColumns();
-      const columnsMap = {};
-      flattenColumns.forEach((column) => {
-        columnsMap[column.id] = column;
-      });
-      for (let i = 0, j = cols.length; i < j; i++) {
-        const col = cols[i];
-        const name = col.getAttribute('name');
-        const column = columnsMap[name];
-        if (column) {
-          col.setAttribute('width', column.realWidth || column.width);
-        }
-      }
-    },
-
-    onScrollableChange(layout) {
-      const cols = this.$el.querySelectorAll('colgroup > col[name=gutter]');
-      for (let i = 0, j = cols.length; i < j; i++) {
-        const col = cols[i];
-        col.setAttribute('width', layout.scrollY ? layout.gutterWidth : '0');
-      }
-      const ths = this.$el.querySelectorAll('th.gutter');
-      for (let i = 0, j = ths.length; i < j; i++) {
-        const th = ths[i];
-        th.style.width = layout.scrollY ? layout.gutterWidth + 'px' : '0';
-        th.style.display = layout.scrollY ? '' : 'none';
-      }
-    }
-  }
-};

+ 0 - 478
src/lib/el-table/src/table-body.js

@@ -1,478 +0,0 @@
-import { getCell, getColumnByCell, getRowIdentity } from './util';
-import { getStyle, hasClass, addClass, removeClass } from 'element-ui/src/utils/dom';
-// import ElCheckbox from 'element-ui/packages/checkbox';
-// import ElTooltip from 'element-ui/packages/tooltip';
-import debounce from 'throttle-debounce/debounce';
-import LayoutObserver from './layout-observer';
-
-export default {
-  name: 'ElTableBody',
-
-  mixins: [LayoutObserver],
-
-  components: {
-    // ElCheckbox,
-    // ElTooltip
-  },
-
-  props: {
-    store: {
-      required: true
-    },
-    stripe: Boolean,
-    context: {},
-    rowClassName: [String, Function],
-    rowStyle: [Object, Function],
-    fixed: String,
-    highlight: Boolean,
-    dragRow:[String,Boolean]
-  },
-
-  render(h) {
-    const columnsHidden = this.columns.map((column, index) => this.isColumnHidden(index));
-    return (
-      <table
-        class="el-table__body"
-        cellspacing="0"
-        cellpadding="0"
-        border="0">
-        <colgroup>
-          {
-            this._l(this.columns, column => <col name={ column.id } />)
-          }
-        </colgroup>
-        <tbody>
-          {
-            this._l(this.data, (row, $index) =>
-              [<tr
-                draggable = {this.dragRow ? true : false}
-                on-drop={ ($event) => this.dropRowSet($event,$index)}
-                on-dragstart={ ($event) => this.dropRowStart($event,$index) }
-                on-dragover={ ($event) => this.dropRowOver($event) }
-                style={ this.rowStyle ? this.getRowStyle(row, $index) : null }
-                key={ this.table.rowKey ? this.getKeyOfRow(row, $index) : $index }
-                on-dblclick={ ($event) => this.handleDoubleClick($event, row) }
-                on-click={ ($event) => this.handleClick($event, row) }
-                on-contextmenu={ ($event) => this.handleContextMenu($event, row) }
-                on-mouseenter={ _ => this.handleMouseEnter($index) }
-                on-mouseleave={ _ => this.handleMouseLeave() }
-                class={ [this.getRowClass(row, $index)] }>
-                {
-                  this._l(this.columns, (column, cellIndex) => {
-                    const { rowspan, colspan } = this.getSpan(row, column, $index, cellIndex);
-                    if (!rowspan || !colspan) {
-                      return '';
-                    } else {
-                      if (rowspan === 1 && colspan === 1) {
-                        return (
-                          <td
-                            style={ this.getCellStyle($index, cellIndex, row, column) }
-                            class={ this.getCellClass($index, cellIndex, row, column) }
-                            on-mouseenter={ ($event) => this.handleCellMouseEnter($event, row) }
-                            on-mouseleave={ this.handleCellMouseLeave }>
-                            {
-                              column.renderCell.call(
-                                this._renderProxy,
-                                h,
-                                {
-                                  row,
-                                  column,
-                                  $index,
-                                  store: this.store,
-                                  _self: this.context || this.table.$vnode.context
-                                },
-                                columnsHidden[cellIndex]
-                              )
-                            }
-                          </td>
-                        );
-                      } else {
-                        return (
-                          <td
-                            style={ this.getCellStyle($index, cellIndex, row, column) }
-                            class={ this.getCellClass($index, cellIndex, row, column) }
-                            rowspan={ rowspan }
-                            colspan={ colspan }
-                            on-mouseenter={ ($event) => this.handleCellMouseEnter($event, row) }
-                            on-mouseleave={ this.handleCellMouseLeave }>
-                            {
-                              column.renderCell.call(
-                                this._renderProxy,
-                                h,
-                                {
-                                  row,
-                                  column,
-                                  $index,
-                                  store: this.store,
-                                  _self: this.context || this.table.$vnode.context
-                                },
-                                columnsHidden[cellIndex]
-                              )
-                            }
-                          </td>
-                        );
-                      }
-                    }
-                  })
-                }
-              </tr>,
-              this.store.isRowExpanded(row)
-                ? (<tr>
-                  <td colspan={ this.columns.length } class="el-table__expanded-cell">
-                    { this.table.renderExpanded ? this.table.renderExpanded(h, { row, $index, store: this.store }) : ''}
-                  </td>
-                </tr>)
-                : ''
-              ]
-            ).concat(
-              <el-tooltip effect={ this.table.tooltipEffect } placement="top" ref="tooltip" content={ this.tooltipContent }></el-tooltip>
-            )
-          }
-        </tbody>
-      </table>
-    );
-  },
-
-  watch: {
-    'store.states.hoverRow'(newVal, oldVal) {
-      if (!this.store.states.isComplex) return;
-      const el = this.$el;
-      if (!el) return;
-      const tr = el.querySelector('tbody').children;
-      const rows = [].filter.call(tr, row => hasClass(row, 'el-table__row'));
-      const oldRow = rows[oldVal];
-      const newRow = rows[newVal];
-      if (oldRow) {
-        removeClass(oldRow, 'hover-row');
-      }
-      if (newRow) {
-        addClass(newRow, 'hover-row');
-      }
-    },
-    'store.states.currentRow'(newVal, oldVal) {
-      if (!this.highlight) return;
-      const el = this.$el;
-      if (!el) return;
-      const data = this.store.states.data;
-      const tr = el.querySelector('tbody').children;
-      const rows = [].filter.call(tr, row => hasClass(row, 'el-table__row'));
-      const oldRow = rows[data.indexOf(oldVal)];
-      const newRow = rows[data.indexOf(newVal)];
-      if (oldRow) {
-        removeClass(oldRow, 'current-row');
-      } else {
-        [].forEach.call(rows, row => removeClass(row, 'current-row'));
-      }
-      if (newRow) {
-        addClass(newRow, 'current-row');
-      }
-    }
-  },
-
-  computed: {
-    table() {
-      return this.$parent;
-    },
-
-    data() {
-      return this.store.states.data;
-    },
-
-    columnsCount() {
-      return this.store.states.columns.length;
-    },
-
-    leftFixedLeafCount() {
-      return this.store.states.fixedLeafColumnsLength;
-    },
-
-    rightFixedLeafCount() {
-      return this.store.states.rightFixedLeafColumnsLength;
-    },
-
-    leftFixedCount() {
-      return this.store.states.fixedColumns.length;
-    },
-
-    rightFixedCount() {
-      return this.store.states.rightFixedColumns.length;
-    },
-
-    columns() {
-      return this.store.states.columns;
-    }
-  },
-
-  data() {
-    return {
-      tooltipContent: '',
-    };
-  },
-
-  created() {
-    this.activateTooltip = debounce(50, tooltip => tooltip.handleShowPopper());
-  },
-
-  methods: {
-    getKeyOfRow(row, index) {
-      const rowKey = this.table.rowKey;
-      if (rowKey) {
-        return getRowIdentity(row, rowKey);
-      }
-      return index;
-    },
-
-    isColumnHidden(index) {
-      if (this.fixed === true || this.fixed === 'left') {
-        return index >= this.leftFixedLeafCount;
-      } else if (this.fixed === 'right') {
-        return index < this.columnsCount - this.rightFixedLeafCount;
-      } else {
-        return (index < this.leftFixedLeafCount) || (index >= this.columnsCount - this.rightFixedLeafCount);
-      }
-    },
-
-    getSpan(row, column, rowIndex, columnIndex) {
-      let rowspan = 1;
-      let colspan = 1;
-
-      const fn = this.table.spanMethod;
-      if (typeof fn === 'function') {
-        const result = fn({
-          row,
-          column,
-          rowIndex,
-          columnIndex
-        });
-
-        if (Array.isArray(result)) {
-          rowspan = result[0];
-          colspan = result[1];
-        } else if (typeof result === 'object') {
-          rowspan = result.rowspan;
-          colspan = result.colspan;
-        }
-      }
-
-      return {
-        rowspan,
-        colspan
-      };
-    },
-
-    getRowStyle(row, rowIndex) {
-      const rowStyle = this.table.rowStyle;
-      if (typeof rowStyle === 'function') {
-        return rowStyle.call(null, {
-          row,
-          rowIndex
-        });
-      }
-      return rowStyle;
-    },
-
-    getRowClass(row, rowIndex) {
-      const currentRow = this.store.states.currentRow;
-      const classes = this.table.highlightCurrentRow && currentRow === row
-        ? ['el-table__row', 'current-row']
-        : ['el-table__row'];
-
-      if (this.stripe && rowIndex % 2 === 1) {
-        classes.push('el-table__row--striped');
-      }
-      const rowClassName = this.table.rowClassName;
-      if (typeof rowClassName === 'string') {
-        classes.push(rowClassName);
-      } else if (typeof rowClassName === 'function') {
-        classes.push(rowClassName.call(null, {
-          row,
-          rowIndex
-        }));
-      }
-
-      if (this.store.states.expandRows.indexOf(row) > -1) {
-        classes.push('expanded');
-      }
-
-      return classes.join(' ');
-    },
-
-    getCellStyle(rowIndex, columnIndex, row, column) {
-      const cellStyle = this.table.cellStyle;
-      if (typeof cellStyle === 'function') {
-        return cellStyle.call(null, {
-          rowIndex,
-          columnIndex,
-          row,
-          column
-        });
-      }
-      return cellStyle;
-    },
-
-    getCellClass(rowIndex, columnIndex, row, column) {
-      const classes = [column.id, column.align, column.className];
-
-      if (this.isColumnHidden(columnIndex)) {
-        classes.push('is-hidden');
-      }
-      
-      if (column.whiteSpaceNowrap) {
-        let _div = document.createElement('div');
-        _div.style.position = 'absolute';
-        _div.style.opacity = '0';
-        _div.style['white-space'] = 'nowrap';
-        _div.innerHTML = row[column.property] ? row[column.property] : '';
-        $('body').append(_div)
-        var realWIdth = _div.scrollWidth;
-        $(_div).remove();
-        
-        if (column.realWidth != null && column.realWidth > realWIdth || column.width > realWIdth || column.minWidth > realWIdth) {
-          //TODO
-        } else {
-          column.width = column.realWidth = realWIdth + 50;
-        }
-      }
-      
-
-      const cellClassName = this.table.cellClassName;
-      if (typeof cellClassName === 'string') {
-        classes.push(cellClassName);
-      } else if (typeof cellClassName === 'function') {
-        classes.push(cellClassName.call(null, {
-          rowIndex,
-          columnIndex,
-          row,
-          column
-        }));
-      }
-
-      return classes.join(' ');
-    },
-
-    handleCellMouseEnter(event, row) {
-      const table = this.table;
-      const cell = getCell(event);
-
-      if (cell) {
-        const column = getColumnByCell(table, cell);
-        const hoverState = table.hoverState = {cell, column, row};
-        table.$emit('cell-mouse-enter', hoverState.row, hoverState.column, hoverState.cell, event);
-      }
-
-      // 判断是否text-overflow, 如果是就显示tooltip
-      const cellChild = event.target.querySelector('.cell');
-      if (!hasClass(cellChild, 'el-tooltip')) {
-        return;
-      }
-      // use range width instead of scrollWidth to determine whether the text is overflowing
-      // to address a potential FireFox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3
-      const range = document.createRange();
-      range.setStart(cellChild, 0);
-      range.setEnd(cellChild, cellChild.childNodes.length);
-      const rangeWidth = range.getBoundingClientRect().width;
-      const padding = (parseInt(getStyle(cellChild, 'paddingLeft'), 10) || 0) +
-        (parseInt(getStyle(cellChild, 'paddingRight'), 10) || 0);
-      if ((rangeWidth + padding > cellChild.offsetWidth || cellChild.scrollWidth > cellChild.offsetWidth) 
-            && (this.$refs.tooltip && $(cellChild).find('input').length <= 0 ||  $(cellChild).find('input').css('display') == 'none')) {
-        const tooltip = this.$refs.tooltip;
-        // TODO 会引起整个 Table 的重新渲染,需要优化
-        this.tooltipContent = cell.textContent || cell.innerText;
-        tooltip.referenceElm = cell;
-        tooltip.$refs.popper && (tooltip.$refs.popper.style.display = 'none');
-        tooltip.doDestroy();
-        tooltip.setExpectedState(true);
-        this.activateTooltip(tooltip);
-      }
-    },
-
-    handleCellMouseLeave(event) {
-      const tooltip = this.$refs.tooltip;
-      if (tooltip) {
-        tooltip.setExpectedState(false);
-        tooltip.handleClosePopper();
-      }
-      const cell = getCell(event);
-      if (!cell) return;
-
-      const oldHoverState = this.table.hoverState || {};
-      this.table.$emit('cell-mouse-leave', oldHoverState.row, oldHoverState.column, oldHoverState.cell, event);
-    },
-
-    handleMouseEnter(index) {
-      this.store.commit('setHoverRow', index);
-    },
-
-    handleMouseLeave() {
-      this.store.commit('setHoverRow', null);
-    },
-
-    handleContextMenu(event, row) {
-      this.handleEvent(event, row, 'contextmenu');
-    },
-
-    handleDoubleClick(event, row) {
-      let eventParent = event.target.parentNode.parentNode;
-      //取消拖拽
-      this.handleEvent(event, row, 'dblclick');
-      $(eventParent).attr('draggable',false)
-    },
-
-    handleClick(event, row) {
-        this.store.commit('setCurrentRow', row);
-        this.handleEvent(event, row, 'click');      
-        let eventParent = event.target.parentNode.parentNode;
-        let allTr = $(eventParent).siblings();
-        //恢复拖拽
-        if(this.dragRow){
-          if ($(eventParent).attr('draggable')){
-            for (let i = 0; i<allTr.length; i++){
-              $(allTr[i]).attr('draggable',true);
-            }
-          } 
-        }             
-    },
-
-    handleEvent(event, row, name) {
-      const table = this.table;
-      const cell = getCell(event);
-      let column;
-      if (cell) {
-        column = getColumnByCell(table, cell);
-        if (column) {
-          table.$emit(`cell-${name}`, row, column, cell, event);
-        }
-      }
-      table.$emit(`row-${name}`, row, event, column);
-    },
-
-    handleExpandClick(row, e) {
-      e.stopPropagation();
-      this.store.toggleRowExpansion(row);
-    },
-
-    //拖动行
-    dropRowSet(event,index) {
-      let that =this;
-      if (!that.dragRow){
-        return;
-      }
-      that.dragEnd = index;
-      if (that.dragRow && that.dragStart != that.dragEnd){
-        that.store.changeRowOrder(that.dragStart, that.dragEnd);
-      }
-    },
-    dropRowStart(event,index) {
-      if (!this.dragRow){
-        return;
-      }
-      this.dragStart = index;
-    },
-    dropRowOver(event,index) {
-      if (!this.dragRow){
-        return;
-      }
-      event.preventDefault();
-    }
-  }
-};

+ 0 - 438
src/lib/el-table/src/table-column.js

@@ -1,438 +0,0 @@
-import ElCheckbox from 'element-ui/packages/checkbox';
-import ElTag from 'element-ui/packages/tag';
-import objectAssign from 'element-ui/src/utils/merge';
-import { getPropByPath } from 'element-ui/src/utils/util';
-
-let columnIdSeed = 1;
-
-const defaults = {
-  default: {
-    order: ''
-  },
-  selection: {
-    width: 48,
-    minWidth: 48,
-    realWidth: 48,
-    order: '',
-    className: 'el-table-column--selection'
-  },
-  expand: {
-    width: 48,
-    minWidth: 48,
-    realWidth: 48,
-    order: ''
-  },
-  index: {
-    width: 48,
-    minWidth: 48,
-    realWidth: 48,
-    order: ''
-  }
-};
-
-const forced = {
-  selection: {
-    renderHeader: function(h, { store }) {
-      return <el-checkbox
-        disabled={ store.states.data && store.states.data.length === 0 }
-        indeterminate={ store.states.selection.length > 0 && !this.isAllSelected }
-        nativeOn-click={ this.toggleAllSelection }
-        value={ this.isAllSelected } />;
-    },
-    renderCell: function(h, { row, column, store, $index }) {
-      return <el-checkbox
-        nativeOn-click={ (event) => event.stopPropagation() }
-        value={ store.isSelected(row) }
-        disabled={ column.selectable ? !column.selectable.call(null, row, $index) : false }
-        on-input={ () => { store.commit('rowSelectedChanged', row); } } />;
-    },
-    sortable: false,
-    resizable: false
-  },
-  index: {
-    renderHeader: function(h, { column }) {
-      return column.label || '#';
-    },
-    renderCell: function(h, { $index, column }) {
-      let i = $index + 1;
-      const index = column.index;
-
-      if (typeof index === 'number') {
-        i = $index + index;
-      } else if (typeof index === 'function') {
-        i = index($index);
-      }
-
-      return <div>{ i }</div>;
-    },
-    sortable: false
-  },
-  expand: {
-    renderHeader: function(h, { column }) {
-      return column.label || '';
-    },
-    renderCell: function(h, { row, store }, proxy) {
-      const expanded = store.states.expandRows.indexOf(row) > -1;
-      return <div class={ 'el-table__expand-icon ' + (expanded ? 'el-table__expand-icon--expanded' : '') }
-        on-click={ e => proxy.handleExpandClick(row, e) }>
-        <i class='el-icon el-icon-arrow-right'></i>
-      </div>;
-    },
-    sortable: false,
-    resizable: false,
-    className: 'el-table__expand-column'
-  }
-};
-
-const getDefaultColumn = function(type, options) {
-  const column = {};
-
-  objectAssign(column, defaults[type || 'default']);
-
-  for (let name in options) {
-    if (options.hasOwnProperty(name)) {
-      const value = options[name];
-      if (typeof value !== 'undefined') {
-        column[name] = value;
-      }
-    }
-  }
-
-  if (!column.minWidth) {
-    column.minWidth = 80;
-  }
-
-  column.realWidth = column.width === undefined ? column.minWidth : column.width;
-
-  return column;
-};
-
-const DEFAULT_RENDER_CELL = function(h, { row, column, $index }) {
-  const property = column.property;
-  const value = property && getPropByPath(row, property).v;
-  if (column && column.formatter) {
-    return column.formatter(row, column, value, $index);
-  }
-  return value;
-};
-
-const parseWidth = (width) => {
-  if (width !== undefined) {
-    width = parseInt(width, 10);
-    if (isNaN(width)) {
-      width = null;
-    }
-  }
-  return width;
-};
-
-const parseMinWidth = (minWidth) => {
-  if (minWidth !== undefined) {
-    minWidth = parseInt(minWidth, 10);
-    if (isNaN(minWidth)) {
-      minWidth = 80;
-    }
-  }
-  return minWidth;
-};
-
-export default {
-  name: 'ElTableColumn',
-
-  props: {
-    type: {
-      type: String,
-      default: 'default'
-    },
-    label: String,
-    className: String,
-    labelClassName: String,
-    property: String,
-    prop: String,
-    width: {},
-    minWidth: {},
-    renderHeader: Function,
-    sortable: {
-      type: [String, Boolean],
-      default: false
-    },
-    sortMethod: Function,
-    sortBy: [String, Function, Array],
-    resizable: {
-      type: Boolean,
-      default: true
-    },
-    context: {},
-    columnKey: String,
-    align: String,
-    headerAlign: String,
-    showTooltipWhenOverflow: Boolean,
-    showOverflowTooltip: Boolean,
-    whiteSpaceNowrap: Boolean,
-    fixed: [Boolean, String],
-    formatter: Function,
-    selectable: Function,
-    reserveSelection: Boolean,
-    filterMethod: Function,
-    filteredValue: Array,
-    filters: Array,
-    filterPlacement: String,
-    filterMultiple: {
-      type: Boolean,
-      default: true
-    },
-    index: [Number, Function],
-    sortOrders: {
-      type: Array,
-      default() {
-        return ['ascending', 'descending', null];
-      },
-      validator(val) {
-        return val.every(order => ['ascending', 'descending', null].indexOf(order) > -1);
-      }
-    }
-  },
-
-  data() {
-    return {
-      isSubColumn: false,
-      columns: []
-    };
-  },
-
-  beforeCreate() {
-    this.row = {};
-    this.column = {};
-    this.$index = 0;
-  },
-
-  components: {
-    ElCheckbox,
-    ElTag
-  },
-
-  computed: {
-    owner() {
-      let parent = this.$parent;
-      while (parent && !parent.tableId) {
-        parent = parent.$parent;
-      }
-      return parent;
-    },
-    columnOrTableParent() {
-      let parent = this.$parent;
-      while (parent && !parent.tableId && !parent.columnId) {
-        parent = parent.$parent;
-      }
-      return parent;
-    }
-  },
-
-  created() {
-    this.customRender = this.$options.render;
-    this.$options.render = h => h('div', this.$slots.default);
-
-    let parent = this.columnOrTableParent;
-    let owner = this.owner;
-    this.isSubColumn = owner !== parent;
-    this.columnId = (parent.tableId || parent.columnId) + '_column_' + columnIdSeed++;
-
-    let type = this.type;
-
-    const width = parseWidth(this.width);
-    const minWidth = parseMinWidth(this.minWidth);
-
-    let isColumnGroup = false;
-
-    let column = getDefaultColumn(type, {
-      id: this.columnId,
-      columnKey: this.columnKey,
-      label: this.label,
-      className: this.className,
-      labelClassName: this.labelClassName,
-      property: this.prop || this.property,
-      type,
-      renderCell: null,
-      renderHeader: this.renderHeader,
-      minWidth,
-      width,
-      isColumnGroup,
-      context: this.context,
-      align: this.align ? 'is-' + this.align : null,
-      headerAlign: this.headerAlign ? 'is-' + this.headerAlign : (this.align ? 'is-' + this.align : null),
-      sortable: this.sortable === '' ? true : this.sortable,
-      sortMethod: this.sortMethod,
-      sortBy: this.sortBy,
-      resizable: this.resizable,
-      showOverflowTooltip: this.showOverflowTooltip || this.showTooltipWhenOverflow,
-      whiteSpaceNowrap: this.whiteSpaceNowrap,
-      formatter: this.formatter,
-      selectable: this.selectable,
-      reserveSelection: this.reserveSelection,
-      fixed: this.fixed === '' ? true : this.fixed,
-      filterMethod: this.filterMethod,
-      filters: this.filters,
-      filterable: this.filters || this.filterMethod,
-      filterMultiple: this.filterMultiple,
-      filterOpened: false,
-      filteredValue: this.filteredValue || [],
-      filterPlacement: this.filterPlacement || '',
-      index: this.index,
-      sortOrders: this.sortOrders
-    });
-
-    objectAssign(column, forced[type] || {});
-
-    this.columnConfig = column;
-
-    let renderCell = column.renderCell;
-    let _self = this;
-
-    if (type === 'expand') {
-      owner.renderExpanded = function(h, data) {
-        return _self.$scopedSlots.default
-          ? _self.$scopedSlots.default(data)
-          : _self.$slots.default;
-      };
-
-      column.renderCell = function(h, data) {
-        return <div class="cell">{ renderCell(h, data, this._renderProxy) }</div>;
-      };
-
-      return;
-    }
-
-    column.renderCell = function(h, data) {
-      if (_self.$scopedSlots.default) {
-        renderCell = () => _self.$scopedSlots.default(data);
-      }
-
-      if (!renderCell) {
-        renderCell = DEFAULT_RENDER_CELL;
-      }
-
-      return _self.showOverflowTooltip || _self.showTooltipWhenOverflow
-        ? <div class="cell el-tooltip" style={ {width: (data.column.realWidth || data.column.width) - 1 + 'px'} }>{ renderCell(h, data) }</div>
-        : <div class="cell">{ renderCell(h, data) }</div>;
-    };
-  },
-
-  destroyed() {
-    if (!this.$parent) return;
-    const parent = this.$parent;
-    this.owner.store.commit('removeColumn', this.columnConfig, this.isSubColumn ? parent.columnConfig : null);
-  },
-
-  watch: {
-    label(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.label = newVal;
-      }
-    },
-
-    prop(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.property = newVal;
-      }
-    },
-
-    property(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.property = newVal;
-      }
-    },
-
-    filters(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.filters = newVal;
-      }
-    },
-
-    filterMultiple(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.filterMultiple = newVal;
-      }
-    },
-
-    align(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.align = newVal ? 'is-' + newVal : null;
-
-        if (!this.headerAlign) {
-          this.columnConfig.headerAlign = newVal ? 'is-' + newVal : null;
-        }
-      }
-    },
-
-    headerAlign(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.headerAlign = 'is-' + (newVal ? newVal : this.align);
-      }
-    },
-
-    width(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.width = parseWidth(newVal);
-        this.owner.store.scheduleLayout();
-      }
-    },
-
-    minWidth(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.minWidth = parseMinWidth(newVal);
-        this.owner.store.scheduleLayout();
-      }
-    },
-
-    fixed(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.fixed = newVal;
-        this.owner.store.scheduleLayout(true);
-      }
-    },
-
-    sortable(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.sortable = newVal;
-      }
-    },
-
-    index(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.index = newVal;
-      }
-    },
-
-    formatter(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.formatter = newVal;
-      }
-    },
-
-    className(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.className = newVal;
-      }
-    },
-
-    labelClassName(newVal) {
-      if (this.columnConfig) {
-        this.columnConfig.labelClassName = newVal;
-      }
-    }
-  },
-
-  mounted() {
-    const owner = this.owner;
-    const parent = this.columnOrTableParent;
-    let columnIndex;
-
-    if (!this.isSubColumn) {
-      columnIndex = [].indexOf.call(parent.$refs.hiddenColumns.children, this.$el);
-    } else {
-      columnIndex = [].indexOf.call(parent.$el.children, this.$el);
-    }
-
-    owner.store.commit('insertColumn', this.columnConfig, columnIndex, this.isSubColumn ? parent.columnConfig : null);
-  }
-};

+ 0 - 147
src/lib/el-table/src/table-footer.js

@@ -1,147 +0,0 @@
-import LayoutObserver from './layout-observer';
-
-export default {
-  name: 'ElTableFooter',
-
-  mixins: [LayoutObserver],
-
-  render(h) {
-    let sums = [];
-    if (this.summaryMethod) {
-      sums = this.summaryMethod({ columns: this.columns, data: this.store.states.data });
-    } else {
-      this.columns.forEach((column, index) => {
-        if (index === 0) {
-          sums[index] = this.sumText;
-          return;
-        }
-        const values = this.store.states.data.map(item => Number(item[column.property]));
-        const precisions = [];
-        let notNumber = true;
-        values.forEach(value => {
-          if (!isNaN(value)) {
-            notNumber = false;
-            let decimal = ('' + value).split('.')[1];
-            precisions.push(decimal ? decimal.length : 0);
-          }
-        });
-        const precision = Math.max.apply(null, precisions);
-        if (!notNumber) {
-          sums[index] = values.reduce((prev, curr) => {
-            const value = Number(curr);
-            if (!isNaN(value)) {
-              return parseFloat((prev + curr).toFixed(Math.min(precision, 20)));
-            } else {
-              return prev;
-            }
-          }, 0);
-        } else {
-          sums[index] = '';
-        }
-      });
-    }
-
-    return (
-      <table
-        class="el-table__footer"
-        cellspacing="0"
-        cellpadding="0"
-        border="0">
-        <colgroup>
-          {
-            this._l(this.columns, column => <col name={ column.id } />)
-          }
-          {
-            this.hasGutter ? <col name="gutter" /> : ''
-          }
-        </colgroup>
-        <tbody class={ [{ 'has-gutter': this.hasGutter }] }>
-          <tr>
-            {
-              this._l(this.columns, (column, cellIndex) =>
-                <td
-                  colspan={ column.colSpan }
-                  rowspan={ column.rowSpan }
-                  class={ [column.id, column.headerAlign, column.className || '', this.isCellHidden(cellIndex, this.columns) ? 'is-hidden' : '', !column.children ? 'is-leaf' : '', column.labelClassName] }>
-                  <div class={ ['cell', column.labelClassName] }>
-                    {
-                      sums[cellIndex]
-                    }
-                  </div>
-                </td>
-              )
-            }
-            {
-              this.hasGutter ? <th class="gutter"></th> : ''
-            }
-          </tr>
-        </tbody>
-      </table>
-    );
-  },
-
-  props: {
-    fixed: String,
-    store: {
-      required: true
-    },
-    summaryMethod: Function,
-    sumText: String,
-    border: Boolean,
-    defaultSort: {
-      type: Object,
-      default() {
-        return {
-          prop: '',
-          order: ''
-        };
-      }
-    }
-  },
-
-  computed: {
-    table() {
-      return this.$parent;
-    },
-
-    isAllSelected() {
-      return this.store.states.isAllSelected;
-    },
-
-    columnsCount() {
-      return this.store.states.columns.length;
-    },
-
-    leftFixedCount() {
-      return this.store.states.fixedColumns.length;
-    },
-
-    rightFixedCount() {
-      return this.store.states.rightFixedColumns.length;
-    },
-
-    columns() {
-      return this.store.states.columns;
-    },
-
-    hasGutter() {
-      return !this.fixed && this.tableLayout.gutterWidth;
-    }
-  },
-
-  methods: {
-    isCellHidden(index, columns) {
-      if (this.fixed === true || this.fixed === 'left') {
-        return index >= this.leftFixedCount;
-      } else if (this.fixed === 'right') {
-        let before = 0;
-        for (let i = 0; i < index; i++) {
-          before += columns[i].colSpan;
-        }
-        return before < this.columnsCount - this.rightFixedCount;
-      } else {
-        return (index < this.leftFixedCount) || (index >= this.columnsCount - this.rightFixedCount);
-      }
-    }
-  }
-};

+ 0 - 656
src/lib/el-table/src/table-header.js

@@ -1,656 +0,0 @@
-import { hasClass, addClass, removeClass } from 'element-ui/src/utils/dom';
-import ElCheckbox from 'element-ui/packages/checkbox';
-import ElTag from 'element-ui/packages/tag';
-import Vue from 'vue';
-import FilterPanel from './filter-panel.vue';
-import LayoutObserver from './layout-observer';
-import { setCookie, getCookie } from '@/utils/util.js';
-
-const getAllColumns = (columns) => {
-  const result = [];
-  columns.forEach((column) => {
-    if (column.children) {
-      result.push(column);
-      result.push.apply(result, getAllColumns(column.children));
-    } else {
-      result.push(column);
-    }
-  });
-  return result;
-};
-
-const convertToRows = (originColumns) => {
-  let maxLevel = 1;
-  const traverse = (column, parent) => {
-    if (parent) {
-      column.level = parent.level + 1;
-      if (maxLevel < column.level) {
-        maxLevel = column.level;
-      }
-    }
-    if (column.children) {
-      let colSpan = 0;
-      column.children.forEach((subColumn) => {
-        traverse(subColumn, column);
-        colSpan += subColumn.colSpan;
-      });
-      column.colSpan = colSpan;
-    } else {
-      column.colSpan = 1;
-    }
-  };
-
-  originColumns.forEach((column) => {
-    column.level = 1;
-    traverse(column);
-  });
-
-  const rows = [];
-  for (let i = 0; i < maxLevel; i++) {
-    rows.push([]);
-  }
-
-  const allColumns = getAllColumns(originColumns);
-
-  allColumns.forEach((column) => {
-    if (!column.children) {
-      column.rowSpan = maxLevel - column.level + 1;
-    } else {
-      column.rowSpan = 1;
-    }
-    rows[column.level - 1].push(column);
-  });
-
-  return rows;
-};
-
-export default {
-  name: 'ElTableHeader',
-
-  mixins: [LayoutObserver],
-
-  render(h) {
-    const originColumns = this.store.states.originColumns;
-    const columnRows = convertToRows(originColumns, this.columns);
-    // 是否拥有多级表头
-    const isGroup = columnRows.length > 1;
-    if (isGroup) this.$parent.isGroup = true;
-    return (
-      <table
-        class="el-table__header"
-        cellspacing="0"
-        cellpadding="0"
-        border="0">
-        <colgroup>
-          {
-            this._l(this.columns, column => <col name={ column.id } />)
-          }
-          {
-            this.hasGutter ? <col name="gutter" /> : ''
-          }
-        </colgroup>
-        <thead class={ [{ 'is-group': isGroup, 'has-gutter': this.hasGutter }] }>
-          {
-            this._l(columnRows, (columns, rowIndex) =>
-              <tr
-                style={ this.getHeaderRowStyle(rowIndex) }
-                class={ this.getHeaderRowClass(rowIndex) }
-              >
-                {
-                  this._l(columns, (column, cellIndex) =>
-                    <th
-                      draggable={!column.fixed && this.dragColumn && column.level === 1}
-                      colspan={ column.colSpan }
-                      rowspan={ column.rowSpan }
-                      on-drop={ ($event) => this.dropColumnSet($event, column )}
-                      on-dragstart={ ($event) => this.dropColumnStart($event, column) }
-                      on-dragover={ ($event) => this.dropColumnOver($event, column) }
-                      on-mousemove={ ($event) => this.handleMouseMove($event, column) }
-                      on-mouseout={ this.handleMouseOut }
-                      on-mousedown={ ($event) => this.handleMouseDown($event, column) }
-                      on-click={ ($event) => this.handleHeaderClick($event, column) }
-                      on-contextmenu={ ($event) => this.handleHeaderContextMenu($event, column) }
-                      style={ this.getHeaderCellStyle(rowIndex, cellIndex, columns, column) }
-                      class={ this.getHeaderCellClass(rowIndex, cellIndex, columns, column) }>
-                      <div class={ ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : '', column.labelClassName] }>
-                        {
-                          column.renderHeader
-                            ? column.renderHeader.call(this._renderProxy, h, { column, $index: cellIndex, store: this.store, _self: this.$parent.$vnode.context })
-                            : column.label
-                        }
-                        {
-                          column.sortable
-                            ? <span class="caret-wrapper" on-click={ ($event) => this.handleSortClick($event, column) }>
-                              <i class="sort-caret ascending" on-click={ ($event) => this.handleSortClick($event, column, 'ascending') }>
-                              </i>
-                              <i class="sort-caret descending" on-click={ ($event) => this.handleSortClick($event, column, 'descending') }>
-                              </i>
-                            </span>
-                            : ''
-                        }
-                        {
-                          column.filterable
-                            ? <span class="el-table__column-filter-trigger" on-click={ ($event) => this.handleFilterClick($event, column) }><i class={ ['el-icon-arrow-down', column.filterOpened ? 'el-icon-arrow-up' : ''] }></i></span>
-                            : ''
-                        }
-                      </div>
-                      {!column.fixed && this.dragColumn && column.level === 1 ? 
-                        <div style={"position:absolute;width:1px;height:" + this.$parent.bodyHeight.height}></div> : ''}
-                    </th>
-                  )
-                }
-                {
-                  this.hasGutter ? <th class="gutter"></th> : ''
-                }
-              </tr>
-            )
-          }
-        </thead>
-      </table>
-    );
-  },
-
-  props: {
-    fixed: String,
-    store: {
-      required: true
-    },
-    border: Boolean,
-    dragColumn: [String, Boolean],    
-    defaultSort: {
-      type: Object,
-      default() {
-        return {
-          prop: '',
-          order: ''
-        };
-      }
-    }
-  },
-
-  components: {
-    ElCheckbox,
-    ElTag
-  },
-
-  computed: {
-    table() {
-      return this.$parent;
-    },
-
-    isAllSelected() {
-      return this.store.states.isAllSelected;
-    },
-
-    columnsCount() {
-      return this.store.states.columns.length;
-    },
-
-    leftFixedCount() {
-      return this.store.states.fixedColumns.length;
-    },
-
-    rightFixedCount() {
-      return this.store.states.rightFixedColumns.length;
-    },
-
-    leftFixedLeafCount() {
-      return this.store.states.fixedLeafColumnsLength;
-    },
-
-    rightFixedLeafCount() {
-      return this.store.states.rightFixedLeafColumnsLength;
-    },
-
-    columns() {
-      return this.store.states.columns;
-    },
-
-    hasGutter() {
-      return !this.fixed && this.tableLayout.gutterWidth;
-    }
-  },
-
-  created() {
-    this.filterPanels = {};
-  },
-
-  mounted() {
-    const { prop, order } = this.defaultSort;
-    this.store.commit('sort', { prop, order });
-    this.setCookieColumn();
-  },
-
-  beforeDestroy() {
-    const panels = this.filterPanels;
-    for (let prop in panels) {
-      if (panels.hasOwnProperty(prop) && panels[prop]) {
-        panels[prop].$destroy(true);
-      }
-    }
-  },
-
-  methods: {
-    setCookieColumn() {
-      let that = this;
-      var columnOrderCookie = null;
-      if (typeof(that.dragColumn) === 'string') {
-        try {
-          columnOrderCookie = JSON.parse(getCookie(that.dragColumn));
-          that.setColumnMounted(columnOrderCookie);
-        }
-        catch(err){
-          return;
-        }
-      }
-    },
-    isCellHidden(index, columns) {
-      let start = 0;
-      for (let i = 0; i < index; i++) {
-        start += columns[i].colSpan;
-      }
-      const after = start + columns[index].colSpan - 1;
-      if (this.fixed === true || this.fixed === 'left') {
-        return after >= this.leftFixedLeafCount;
-      } else if (this.fixed === 'right') {
-        return start < this.columnsCount - this.rightFixedLeafCount;
-      } else {
-        return (after < this.leftFixedLeafCount) || (start >= this.columnsCount - this.rightFixedLeafCount);
-      }
-    },
-
-    getHeaderRowStyle(rowIndex) {
-      const headerRowStyle = this.table.headerRowStyle;
-      if (typeof headerRowStyle === 'function') {
-        return headerRowStyle.call(null, { rowIndex });
-      }
-      return headerRowStyle;
-    },
-
-    getHeaderRowClass(rowIndex) {
-      const classes = [];
-
-      const headerRowClassName = this.table.headerRowClassName;
-      if (typeof headerRowClassName === 'string') {
-        classes.push(headerRowClassName);
-      } else if (typeof headerRowClassName === 'function') {
-        classes.push(headerRowClassName.call(null, { rowIndex }));
-      }
-
-      return classes.join(' ');
-    },
-
-    getHeaderCellStyle(rowIndex, columnIndex, row, column) {
-      const headerCellStyle = this.table.headerCellStyle;
-      if (typeof headerCellStyle === 'function') {
-        return headerCellStyle.call(null, {
-          rowIndex,
-          columnIndex,
-          row,
-          column
-        });
-      }
-      return headerCellStyle;
-    },
-
-    getHeaderCellClass(rowIndex, columnIndex, row, column) {
-      const classes = [column.id, column.order, column.headerAlign, column.className, column.labelClassName];
-
-      if (rowIndex === 0 && this.isCellHidden(columnIndex, row)) {
-        classes.push('is-hidden');
-      }
-
-      if (!column.children) {
-        classes.push('is-leaf');
-      }
-
-      if (column.sortable) {
-        classes.push('is-sortable');
-      }
-
-      const headerCellClassName = this.table.headerCellClassName;
-      if (typeof headerCellClassName === 'string') {
-        classes.push(headerCellClassName);
-      } else if (typeof headerCellClassName === 'function') {
-        classes.push(headerCellClassName.call(null, {
-          rowIndex,
-          columnIndex,
-          row,
-          column
-        }));
-      }
-
-      return classes.join(' ');
-    },
-
-    toggleAllSelection() {
-      this.store.commit('toggleAllSelection');
-    },
-
-    handleFilterClick(event, column) {
-      event.stopPropagation();
-      const target = event.target;
-      let cell = target.tagName === 'TH' ? target : target.parentNode;
-      cell = cell.querySelector('.el-table__column-filter-trigger') || cell;
-      const table = this.$parent;
-
-      let filterPanel = this.filterPanels[column.id];
-
-      if (filterPanel && column.filterOpened) {
-        filterPanel.showPopper = false;
-        return;
-      }
-
-      if (!filterPanel) {
-        filterPanel = new Vue(FilterPanel);
-        this.filterPanels[column.id] = filterPanel;
-        if (column.filterPlacement) {
-          filterPanel.placement = column.filterPlacement;
-        }
-        filterPanel.table = table;
-        filterPanel.cell = cell;
-        filterPanel.column = column;
-        !this.$isServer && filterPanel.$mount(document.createElement('div'));
-      }
-
-      setTimeout(() => {
-        filterPanel.showPopper = true;
-      }, 16);
-    },
-
-    dropColumnSet(event, column) {
-      if(!(!column.fixed && this.dragColumn && column.level === 1)) {
-        return;
-      }
-      this.dragEnd = $(event.target).offset().left;
-      let target = event.target;
-      while (target && !$(target).hasClass('el-table')) {
-        target = target.parentNode;
-      }
-      this.setColumn(target);
-    },
-
-    setColumn(target) {
-      let that = this;
-      var ths = $(target).find('th');
-      var prevTargets = [];
-      var setTargets = [];
-      for (let i = 0; i < ths.length; i++) {
-        if ($(ths[i]).attr('draggable') === 'false') {
-          continue;
-        }
-        if ($(ths[i]).offset().left === that.dragStart) {
-          prevTargets.push(ths[i]);
-        }
-        if ($(ths[i]).offset().left === that.dragEnd) {
-          setTargets.push(ths[i]);
-        }
-      }
-      var preClassList = $(prevTargets[0])[0].classList;
-      var preId = '';
-      for (let i = 0; i < preClassList.length; i++) {
-        if (preClassList[i].indexOf('el-table_') > -1) {
-          preId = preClassList[i];
-        }
-      }
-      if (!$(setTargets[0])[0]) {
-        return;
-      }
-      var setClassList = $(setTargets[0])[0].classList;
-      var setId = '';
-      for (let i = 0; i < setClassList.length; i++) {
-        if (setClassList[i].indexOf('el-table_') > -1) {
-          setId = setClassList[i];
-        }
-      }
-      let array = this.store.states._columns;
-      let preIndex = 0;
-      let setIndex = 0;
-      for (let i = 0; i < array.length; i++) {
-        if (array[i].id === preId) {
-          preIndex = i;
-        }
-        if (array[i].id === setId) {
-          setIndex = i;
-        }
-      }
-      var temp = array[preIndex];
-      array.splice(setIndex,0,temp);
-      if (preIndex <= setIndex) {
-        array.splice(preIndex,1);
-      } else {
-        array.splice(preIndex+1,1);
-      }
-      if (typeof(that.dragColumn) === 'string') {
-        let temp = [];
-        for (let i = 0; i < array.length; i++) {
-          temp.push(array[i].label);
-        }
-        setCookie(that.dragColumn, JSON.stringify(temp), 9999, '/');
-      }
-      if (this.table.$ready) {
-        this.store.updateColumns(); // hack for dynamics remove column
-        this.store.scheduleLayout();
-      }
-    },
-
-    setColumnMounted(columnOrderCookie) {
-      let that = this;
-      that.$nextTick(function () {
-        let array = that.store.states._columns;
-        let temp = [];
-        for (let i = 0; i < columnOrderCookie.length; i++) {
-          for (let k = 0; k < array.length; k++) {
-            if (array[k].label === columnOrderCookie[i]) {
-              temp.push(array[k]);
-              continue;
-            }
-          }
-        }
-        that.store.states._columns = temp;
-        if (that.table.$ready) {
-          that.store.updateColumns(); // hack for dynamics remove column
-          that.store.scheduleLayout();
-        }
-      });
-      
-    },
-
-    dropColumnStart(event, column) {
-      if(!(!column.fixed && this.dragColumn && column.level === 1)) {
-        return;
-      }
-      this.dragStart = $(event.target).offset().left;
-    },
-
-    dropColumnOver(event, column) {
-      if(!(!column.fixed && this.dragColumn && column.level === 1)) {
-        return;
-      }
-      event.preventDefault();
-    },
-
-    handleHeaderClick(event, column) {
-      if (!column.filters && column.sortable) {
-        this.handleSortClick(event, column);
-      } else if (column.filters && !column.sortable) {
-        this.handleFilterClick(event, column);
-      }
-
-      this.$parent.$emit('header-click', column, event);
-    },
-
-    handleHeaderContextMenu(event, column) {
-      this.$parent.$emit('header-contextmenu', column, event);
-    },
-
-    handleMouseDown(event, column) {
-      if (this.$isServer) return;
-      if (column.children && column.children.length > 0) return;
-      /* istanbul ignore if */
-      if (this.draggingColumn && this.border) {
-        this.dragging = true;
-
-        this.$parent.resizeProxyVisible = true;
-
-        const table = this.$parent;
-        const tableEl = table.$el;
-        const tableLeft = tableEl.getBoundingClientRect().left;
-        const columnEl = this.$el.querySelector(`th.${column.id}`);
-        const columnRect = columnEl.getBoundingClientRect();
-        const minLeft = columnRect.left - tableLeft + 30;
-
-        addClass(columnEl, 'noclick');
-
-        this.dragState = {
-          startMouseLeft: event.clientX,
-          startLeft: columnRect.right - tableLeft,
-          startColumnLeft: columnRect.left - tableLeft,
-          tableLeft
-        };
-
-        const resizeProxy = table.$refs.resizeProxy;
-        resizeProxy.style.left = this.dragState.startLeft + 'px';
-
-        document.onselectstart = function() { return false; };
-        document.ondragstart = function() { return false; };
-
-        const handleMouseMove = (event) => {
-          const deltaLeft = event.clientX - this.dragState.startMouseLeft;
-          const proxyLeft = this.dragState.startLeft + deltaLeft;
-
-          resizeProxy.style.left = Math.max(minLeft, proxyLeft) + 'px';
-        };
-
-        const handleMouseUp = () => {
-          if (this.dragging) {
-            const {
-              startColumnLeft,
-              startLeft
-            } = this.dragState;
-            const finalLeft = parseInt(resizeProxy.style.left, 10);
-            const columnWidth = finalLeft - startColumnLeft;
-            column.width = column.realWidth = columnWidth;
-            table.$emit('header-dragend', column.width, startLeft - startColumnLeft, column, event);
-
-            this.store.scheduleLayout();
-
-            document.body.style.cursor = '';
-            this.dragging = false;
-            this.draggingColumn = null;
-            this.dragState = {};
-
-            table.resizeProxyVisible = false;
-          }
-
-          document.removeEventListener('mousemove', handleMouseMove);
-          document.removeEventListener('mouseup', handleMouseUp);
-          document.onselectstart = null;
-          document.ondragstart = null;
-
-          setTimeout(function() {
-            removeClass(columnEl, 'noclick');
-          }, 0);
-        };
-
-        document.addEventListener('mousemove', handleMouseMove);
-        document.addEventListener('mouseup', handleMouseUp);
-      }
-    },
-
-    handleMouseMove(event, column) {
-      if (column.children && column.children.length > 0) return;
-      let target = event.target;
-      while (target && target.tagName !== 'TH') {
-        target = target.parentNode;
-      }
-
-      if (!column || !column.resizable) return;
-
-      if (!this.dragging && this.border) {
-        let rect = target.getBoundingClientRect();
-
-        const bodyStyle = document.body.style;
-        if (rect.width > 12 && rect.right - event.pageX < 8) {
-          bodyStyle.cursor = 'col-resize';
-          if (hasClass(target, 'is-sortable')) {
-            target.style.cursor = 'col-resize';
-          }
-          this.draggingColumn = column;
-        } else if (!this.dragging) {
-          bodyStyle.cursor = '';
-          if (hasClass(target, 'is-sortable')) {
-            target.style.cursor = 'pointer';
-          }
-          this.draggingColumn = null;
-        }
-      }
-    },
-
-    handleMouseOut() {
-      if (this.$isServer) return;
-      document.body.style.cursor = '';
-    },
-
-    toggleOrder({ order, sortOrders }) {
-      if (order === '') return sortOrders[0];
-      const index = sortOrders.indexOf(order || null);
-      return sortOrders[index > sortOrders.length - 2 ? 0 : index + 1];
-    },
-
-    handleSortClick(event, column, givenOrder) {
-      event.stopPropagation();
-      let order = givenOrder || this.toggleOrder(column);
-
-      let target = event.target;
-      while (target && target.tagName !== 'TH') {
-        target = target.parentNode;
-      }
-
-      if (target && target.tagName === 'TH') {
-        if (hasClass(target, 'noclick')) {
-          removeClass(target, 'noclick');
-          return;
-        }
-      }
-
-      if (!column.sortable) return;
-
-      const states = this.store.states;
-      let sortProp = states.sortProp;
-      let sortOrder;
-      const sortingColumn = states.sortingColumn;
-
-      if (sortingColumn !== column || (sortingColumn === column && sortingColumn.order === null)) {
-        if (sortingColumn) {
-          sortingColumn.order = null;
-        }
-        states.sortingColumn = column;
-        sortProp = column.property;
-      }
-
-      if (!order) {
-        sortOrder = column.order = null;
-        states.sortingColumn = null;
-        sortProp = null;
-      } else {
-        sortOrder = column.order = order;
-      }
-
-      states.sortProp = sortProp;
-      states.sortOrder = sortOrder;
-
-      this.store.commit('changeSortCondition');
-    }
-  },
-
-  data() {
-    return {
-      draggingColumn: null,
-      dragging: false,
-      dragState: {},
-      dragStart: 0,
-      dragEnd: 0
-    };
-  }
-};

+ 0 - 231
src/lib/el-table/src/table-layout.js

@@ -1,231 +0,0 @@
-import scrollbarWidth from 'element-ui/src/utils/scrollbar-width';
-import Vue from 'vue';
-
-class TableLayout {
-  constructor(options) {
-    this.observers = [];
-    this.table = null;
-    this.store = null;
-    this.columns = null;
-    this.fit = true;
-    this.showHeader = true;
-
-    this.height = null;
-    this.scrollX = false;
-    this.scrollY = false;
-    this.bodyWidth = null;
-    this.fixedWidth = null;
-    this.rightFixedWidth = null;
-    this.tableHeight = null;
-    this.headerHeight = 44; // Table Header Height
-    this.appendHeight = 0; // Append Slot Height
-    this.footerHeight = 44; // Table Footer Height
-    this.viewportHeight = null; // Table Height - Scroll Bar Height
-    this.bodyHeight = null; // Table Height - Table Header Height
-    this.fixedBodyHeight = null; // Table Height - Table Header Height - Scroll Bar Height
-    this.gutterWidth = scrollbarWidth();
-
-    for (let name in options) {
-      if (options.hasOwnProperty(name)) {
-        this[name] = options[name];
-      }
-    }
-
-    if (!this.table) {
-      throw new Error('table is required for Table Layout');
-    }
-    if (!this.store) {
-      throw new Error('store is required for Table Layout');
-    }
-  }
-
-  updateScrollY() {
-    const height = this.height;
-    if (typeof height !== 'string' && typeof height !== 'number') return;
-    const bodyWrapper = this.table.bodyWrapper;
-    if (this.table.$el && bodyWrapper) {
-      const body = bodyWrapper.querySelector('.el-table__body');
-      this.scrollY = body.offsetHeight > this.bodyHeight;
-    }
-  }
-
-  setHeight(value, prop = 'height') {
-    if (Vue.prototype.$isServer) return;
-    const el = this.table.$el;
-    if (typeof value === 'string' && /^\d+$/.test(value)) {
-      value = Number(value);
-    }
-    this.height = value;
-
-    if (!el && (value || value === 0)) return Vue.nextTick(() => this.setHeight(value, prop));
-
-    if (typeof value === 'number') {
-      el.style[prop] = value + 'px';
-
-      this.updateElsHeight();
-    } else if (typeof value === 'string') {
-      el.style[prop] = value;
-      this.updateElsHeight();
-    }
-  }
-
-  setMaxHeight(value) {
-    return this.setHeight(value, 'max-height');
-  }
-
-  updateElsHeight() {
-    if (!this.table.$ready) return Vue.nextTick(() => this.updateElsHeight());
-    const { headerWrapper, appendWrapper, footerWrapper } = this.table.$refs;
-    this.appendHeight = appendWrapper ? appendWrapper.offsetHeight : 0;
-
-    if (this.showHeader && !headerWrapper) return;
-    const headerHeight = this.headerHeight = !this.showHeader ? 0 : headerWrapper.offsetHeight;
-    if (this.showHeader && headerWrapper.offsetWidth > 0 && (this.table.columns || []).length > 0 && headerHeight < 2) {
-      return Vue.nextTick(() => this.updateElsHeight());
-    }
-    const tableHeight = this.tableHeight = this.table.$el.clientHeight;
-    if (this.height !== null && (!isNaN(this.height) || typeof this.height === 'string')) {
-      const footerHeight = this.footerHeight = footerWrapper ? footerWrapper.offsetHeight : 0;
-      this.bodyHeight = tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0);
-    }
-    this.fixedBodyHeight = this.scrollX ? this.bodyHeight - this.gutterWidth : this.bodyHeight;
-
-    const noData = !this.table.data || this.table.data.length === 0;
-    this.viewportHeight = this.scrollX ? tableHeight - (noData ? 0 : this.gutterWidth) : tableHeight;
-
-    this.updateScrollY();
-    this.notifyObservers('scrollable');
-  }
-
-  getFlattenColumns() {
-    const flattenColumns = [];
-    const columns = this.table.columns;
-    columns.forEach((column) => {
-      if (column.isColumnGroup) {
-        flattenColumns.push.apply(flattenColumns, column.columns);
-      } else {
-        flattenColumns.push(column);
-      }
-    });
-
-    return flattenColumns;
-  }
-
-  updateColumnsWidth() {
-    if (Vue.prototype.$isServer) return;
-    const fit = this.fit;
-    const bodyWidth = this.table.$el.clientWidth;
-    let bodyMinWidth = 0;
-
-    const flattenColumns = this.getFlattenColumns();
-    let flexColumns = flattenColumns.filter((column) => typeof column.width !== 'number');
-
-    flattenColumns.forEach((column) => { // Clean those columns whose width changed from flex to unflex
-      if (typeof column.width === 'number' && column.realWidth) column.realWidth = null;
-    });
-
-    if (flexColumns.length > 0 && fit) {
-      flattenColumns.forEach((column) => {
-        bodyMinWidth += column.width || column.minWidth || 80;
-      });
-
-      const scrollYWidth = this.scrollY ? this.gutterWidth : 0;
-
-      if (bodyMinWidth <= bodyWidth - scrollYWidth) { // DON'T HAVE SCROLL BAR
-        this.scrollX = false;
-
-        const totalFlexWidth = bodyWidth - scrollYWidth - bodyMinWidth;
-
-        if (flexColumns.length === 1) {
-          flexColumns[0].realWidth = (flexColumns[0].minWidth || 80) + totalFlexWidth;
-        } else {
-          const allColumnsWidth = flexColumns.reduce((prev, column) => prev + (column.minWidth || 80), 0);
-          const flexWidthPerPixel = totalFlexWidth / allColumnsWidth;
-          let noneFirstWidth = 0;
-
-          flexColumns.forEach((column, index) => {
-            if (index === 0) return;
-            const flexWidth = Math.floor((column.minWidth || 80) * flexWidthPerPixel);
-            noneFirstWidth += flexWidth;
-            column.realWidth = (column.minWidth || 80) + flexWidth;
-          });
-
-          flexColumns[0].realWidth = (flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth;
-        }
-      } else { // HAVE HORIZONTAL SCROLL BAR
-        this.scrollX = true;
-        flexColumns.forEach(function(column) {
-          column.realWidth = column.minWidth;
-        });
-      }
-
-      this.bodyWidth = Math.max(bodyMinWidth, bodyWidth);
-      this.table.resizeState.width = this.bodyWidth;
-    } else {
-      flattenColumns.forEach((column) => {
-        if (!column.width && !column.minWidth) {
-          column.realWidth = 80;
-        } else {
-          column.realWidth = column.width || column.minWidth;
-        }
-
-        bodyMinWidth += column.realWidth;
-      });
-      this.scrollX = bodyMinWidth > bodyWidth;
-
-      this.bodyWidth = bodyMinWidth;
-    }
-
-    const fixedColumns = this.store.states.fixedColumns;
-
-    if (fixedColumns.length > 0) {
-      let fixedWidth = 0;
-      fixedColumns.forEach(function(column) {
-        fixedWidth += column.realWidth || column.width;
-      });
-
-      this.fixedWidth = fixedWidth;
-    }
-
-    const rightFixedColumns = this.store.states.rightFixedColumns;
-    if (rightFixedColumns.length > 0) {
-      let rightFixedWidth = 0;
-      rightFixedColumns.forEach(function(column) {
-        rightFixedWidth += column.realWidth || column.width;
-      });
-
-      this.rightFixedWidth = rightFixedWidth;
-    }
-
-    this.notifyObservers('columns');
-  }
-
-  addObserver(observer) {
-    this.observers.push(observer);
-  }
-
-  removeObserver(observer) {
-    const index = this.observers.indexOf(observer);
-    if (index !== -1) {
-      this.observers.splice(index, 1);
-    }
-  }
-
-  notifyObservers(event) {
-    const observers = this.observers;
-    observers.forEach((observer) => {
-      switch (event) {
-        case 'columns':
-          observer.onColumnsChange(this);
-          break;
-        case 'scrollable':
-          observer.onScrollableChange(this);
-          break;
-        default:
-          throw new Error(`Table Layout don't have event ${event}.`);
-      }
-    });
-  }
-}
-
-export default TableLayout;

+ 0 - 650
src/lib/el-table/src/table-store.js

@@ -1,650 +0,0 @@
-import Vue from 'vue';
-import debounce from 'throttle-debounce/debounce';
-import merge from 'element-ui/src/utils/merge';
-import { hasClass, addClass, removeClass } from 'element-ui/src/utils/dom';
-import { orderBy, getColumnById, getRowIdentity } from './util';
-
-let filterColumnWatch = function (data = [], tableColumns = {}, _filters = []) {
-  for (let i = 0; i < tableColumns.length; i++) {
-    let filters = [];
-    let tableColumn = tableColumns[i];
-    let property = tableColumn.property;
-    for (let i in data) {
-      let flag = true;
-      var set = data[i][property] || data[i][property] === 0 ? (data[i][property] + '') : '';
-      for (let j in filters) {
-        
-        if ((filters[j].value + '') === (set)) {
-          flag = false;
-          break;
-        }
-      }
-      if (flag) {
-        filters.push({
-          value: set,
-          text: set
-        })
-      }
-    }
-    tableColumn.filters = filters;
-  }
-}
-
-const sortData = (data, states) => {
-  const sortingColumn = states.sortingColumn;
-  if (!sortingColumn || typeof sortingColumn.sortable === 'string') {
-    return data;
-  }
-  return orderBy(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy);
-};
-
-const getKeysMap = function(array, rowKey) {
-  const arrayMap = {};
-  (array || []).forEach((row, index) => {
-    arrayMap[getRowIdentity(row, rowKey)] = { row, index };
-  });
-  return arrayMap;
-};
-
-const toggleRowSelection = function(states, row, selected) {
-  let changed = false;
-  const selection = states.selection;
-  const index = selection.indexOf(row);
-  if (typeof selected === 'undefined') {
-    if (index === -1) {
-      selection.push(row);
-      changed = true;
-    } else {
-      selection.splice(index, 1);
-      changed = true;
-    }
-  } else {
-    if (selected && index === -1) {
-      selection.push(row);
-      changed = true;
-    } else if (!selected && index > -1) {
-      selection.splice(index, 1);
-      changed = true;
-    }
-  }
-
-  return changed;
-};
-
-const toggleRowExpansion = function(states, row, expanded) {
-  let changed = false;
-  const expandRows = states.expandRows;
-  if (typeof expanded !== 'undefined') {
-    const index = expandRows.indexOf(row);
-    if (expanded) {
-      if (index === -1) {
-        expandRows.push(row);
-        changed = true;
-      }
-    } else {
-      if (index !== -1) {
-        expandRows.splice(index, 1);
-        changed = true;
-      }
-    }
-  } else {
-    const index = expandRows.indexOf(row);
-    if (index === -1) {
-      expandRows.push(row);
-      changed = true;
-    } else {
-      expandRows.splice(index, 1);
-      changed = true;
-    }
-  }
-
-  return changed;
-};
-
-const TableStore = function(table, initialState = {}) {
-  if (!table) {
-    throw new Error('Table is required.');
-  }
-  this.table = table;
-
-  this.states = {
-    rowKey: null,
-    _columns: [],
-    originColumns: [],
-    columns: [],
-    fixedColumns: [],
-    rightFixedColumns: [],
-    leafColumns: [],
-    fixedLeafColumns: [],
-    rightFixedLeafColumns: [],
-    leafColumnsLength: 0,
-    fixedLeafColumnsLength: 0,
-    rightFixedLeafColumnsLength: 0,
-    isComplex: false,
-    filteredData: null,
-    data: null,
-    sortingColumn: null,
-    sortProp: null,
-    sortOrder: null,
-    isAllSelected: false,
-    selection: [],
-    reserveSelection: false,
-    selectable: null,
-    currentRow: null,
-    hoverRow: null,
-    filters: {},
-    expandRows: [],
-    defaultExpandAll: false,
-    selectOnIndeterminate: false
-  };
-
-  for (let prop in initialState) {
-    if (initialState.hasOwnProperty(prop) && this.states.hasOwnProperty(prop)) {
-      this.states[prop] = initialState[prop];
-    }
-  }
-};
-
-TableStore.prototype.mutations = {
-  setData(states, data) {
-    const dataInstanceChanged = states._data !== data;
-    states._data = data;
-
-    Object.keys(states.filters).forEach((columnId) => {
-      const values = states.filters[columnId];
-      if (!values || values.length === 0) return;
-      const column = getColumnById(this.states, columnId);
-      if (column && column.filterMethod) {
-        data = data.filter((row) => {
-          return values.some(value => column.filterMethod.call(null, value, row, column));
-        });
-      }
-    });
-
-    states.filteredData = data;
-    states.data = sortData((data || []), states);
-
-    this.updateCurrentRow();
-
-    const rowKey = states.rowKey;
-
-    if (!states.reserveSelection) {
-      if (dataInstanceChanged) {
-        this.clearSelection();
-      } else {
-        this.cleanSelection();
-      }
-      this.updateAllSelected();
-    } else {
-      if (rowKey) {
-        const selection = states.selection;
-        const selectedMap = getKeysMap(selection, rowKey);
-
-        states.data.forEach((row) => {
-          const rowId = getRowIdentity(row, rowKey);
-          const rowInfo = selectedMap[rowId];
-          if (rowInfo) {
-            selection[rowInfo.index] = row;
-          }
-        });
-
-        this.updateAllSelected();
-      } else {
-        console.warn('WARN: rowKey is required when reserve-selection is enabled.');
-      }
-    }
-
-    const defaultExpandAll = states.defaultExpandAll;
-    if (defaultExpandAll) {
-      this.states.expandRows = (states.data || []).slice(0);
-    } else if (rowKey) {
-      // update expandRows to new rows according to rowKey
-      const ids = getKeysMap(this.states.expandRows, rowKey);
-      let expandRows = [];
-      for (const row of states.data) {
-        const rowId = getRowIdentity(row, rowKey);
-        if (ids[rowId]) {
-          expandRows.push(row);
-        }
-      }
-      this.states.expandRows = expandRows;
-    } else {
-      // clear the old rows
-      this.states.expandRows = [];
-    }
-    Vue.nextTick(() => this.table.updateScrollY());
-  },
-
-  changeSortCondition(states, options) {
-    states.data = sortData((states.filteredData || states._data || []), states);
-
-    const { $el, highlightCurrentRow } = this.table;
-    if ($el && highlightCurrentRow) {
-      const data = states.data;
-      const tr = $el.querySelector('tbody').children;
-      const rows = [].filter.call(tr, row => hasClass(row, 'el-table__row'));
-      const row = rows[data.indexOf(states.currentRow)];
-
-      [].forEach.call(rows, row => removeClass(row, 'current-row'));
-      addClass(row, 'current-row');
-    }
-
-    if (!options || !options.silent) {
-      this.table.$emit('sort-change', {
-        column: this.states.sortingColumn,
-        prop: this.states.sortProp,
-        order: this.states.sortOrder
-      });
-    }
-
-    Vue.nextTick(() => this.table.updateScrollY());
-  },
-
-  sort(states, options) {
-    const { prop, order } = options;
-    if (prop) {
-      states.sortProp = prop;
-      states.sortOrder = order || 'ascending';
-      Vue.nextTick(() => {
-        for (let i = 0, length = states.columns.length; i < length; i++) {
-          let column = states.columns[i];
-          if (column.property === states.sortProp) {
-            column.order = states.sortOrder;
-            states.sortingColumn = column;
-            break;
-          }
-        }
-
-        if (states.sortingColumn) {
-          this.commit('changeSortCondition');
-        }
-      });
-    }
-  },
-
-  filterChange(states, options) {
-    let { column, values, silent } = options;
-    if (values && !Array.isArray(values)) {
-      values = [values];
-    }
-
-    const prop = column.property;
-    const filters = {};
-
-    if (prop) {
-      states.filters[column.id] = values;
-      filters[column.columnKey || column.id] = values;
-    }
-
-    let data = states._data;
-
-    Object.keys(states.filters).forEach((columnId) => {
-      const values = states.filters[columnId];
-      if (!values || values.length === 0) return;
-      const column = getColumnById(this.states, columnId);
-      if (column && column.filterMethod) {
-        data = data.filter((row) => {
-          return values.some(value => column.filterMethod.call(null, value, row, column));
-        });
-      }
-    });
-
-    states.filteredData = data;
-    states.data = sortData(data, states);
-
-    if (!silent) {
-      // let filteredData = this.table.tableData;
-      // filterColumnWatch(filteredData, this.table.columns, filters)
-      this.table.$emit('filter-change', filters);
-    }
-
-    Vue.nextTick(() => this.table.updateScrollY());
-  },  
-
-  insertColumn(states, column, index, parent) {
-    let array = states._columns;
-    if (parent) {
-      array = parent.children;
-      if (!array) array = parent.children = [];
-    }
-
-    if (typeof index !== 'undefined') {
-      array.splice(index, 0, column);
-    } else {
-      array.push(column);
-    }
-
-    if (column.type === 'selection') {
-      states.selectable = column.selectable;
-      states.reserveSelection = column.reserveSelection;
-    }
-
-    if (this.table.$ready) {
-      this.updateColumns(); // hack for dynamics insert column
-      this.scheduleLayout();
-    }
-  },
-
-  removeColumn(states, column, parent) {
-    let array = states._columns;
-    if (parent) {
-      array = parent.children;
-      if (!array) array = parent.children = [];
-    }
-    if (array) {
-      array.splice(array.indexOf(column), 1);
-    }
-
-    if (this.table.$ready) {
-      this.updateColumns(); // hack for dynamics remove column
-      this.scheduleLayout();
-    }
-  },
-
-  setHoverRow(states, row) {
-    states.hoverRow = row;
-  },
-
-  setCurrentRow(states, row) {
-    const oldCurrentRow = states.currentRow;
-    states.currentRow = row;
-
-    if (oldCurrentRow !== row) {
-      this.table.$emit('current-change', row, oldCurrentRow);
-    }
-  },
-
-  rowSelectedChanged(states, row) {
-    const changed = toggleRowSelection(states, row);
-    const selection = states.selection;
-
-    if (changed) {
-      const table = this.table;
-      table.$emit('selection-change', selection ? selection.slice() : []);
-      table.$emit('select', selection, row);
-    }
-
-    this.updateAllSelected();
-  },
-
-  toggleAllSelection: debounce(10, function(states) {
-    const data = states.data || [];
-    if (data.length === 0) return;
-    const selection = this.states.selection;
-    // when only some rows are selected (but not all), select or deselect all of them
-    // depending on the value of selectOnIndeterminate
-    const value = states.selectOnIndeterminate
-      ? !states.isAllSelected
-      : !(states.isAllSelected || selection.length);
-    let selectionChanged = false;
-
-    data.forEach((item, index) => {
-      if (states.selectable) {
-        if (states.selectable.call(null, item, index) && toggleRowSelection(states, item, value)) {
-          selectionChanged = true;
-        }
-      } else {
-        if (toggleRowSelection(states, item, value)) {
-          selectionChanged = true;
-        }
-      }
-    });
-
-    const table = this.table;
-    if (selectionChanged) {
-      table.$emit('selection-change', selection ? selection.slice() : []);
-    }
-    table.$emit('select-all', selection);
-    states.isAllSelected = value;
-  })
-};
-
-const doFlattenColumns = (columns) => {
-  const result = [];
-  columns.forEach((column) => {
-    if (column.children) {
-      result.push.apply(result, doFlattenColumns(column.children));
-    } else {
-      result.push(column);
-    }
-  });
-  return result;
-};
-
-TableStore.prototype.updateColumns = function() {
-  const states = this.states;
-  const _columns = states._columns || [];
-  states.fixedColumns = _columns.filter((column) => column.fixed === true || column.fixed === 'left');
-  states.rightFixedColumns = _columns.filter((column) => column.fixed === 'right');
-
-  if (states.fixedColumns.length > 0 && _columns[0] && _columns[0].type === 'selection' && !_columns[0].fixed) {
-    _columns[0].fixed = true;
-    states.fixedColumns.unshift(_columns[0]);
-  }
-
-  const notFixedColumns = _columns.filter(column => !column.fixed);
-  states.originColumns = [].concat(states.fixedColumns).concat(notFixedColumns).concat(states.rightFixedColumns);
-
-  const leafColumns = doFlattenColumns(notFixedColumns);
-  const fixedLeafColumns = doFlattenColumns(states.fixedColumns);
-  const rightFixedLeafColumns = doFlattenColumns(states.rightFixedColumns);
-
-  states.leafColumnsLength = leafColumns.length;
-  states.fixedLeafColumnsLength = fixedLeafColumns.length;
-  states.rightFixedLeafColumnsLength = rightFixedLeafColumns.length;
-
-  states.columns = [].concat(fixedLeafColumns).concat(leafColumns).concat(rightFixedLeafColumns);
-  states.isComplex = states.fixedColumns.length > 0 || states.rightFixedColumns.length > 0;
-};
-
-TableStore.prototype.isSelected = function(row) {
-  return (this.states.selection || []).indexOf(row) > -1;
-};
-
-TableStore.prototype.clearSelection = function() {
-  const states = this.states;
-  states.isAllSelected = false;
-  const oldSelection = states.selection;
-  if (states.selection.length) {
-    states.selection = [];
-  }
-  if (oldSelection.length > 0) {
-    this.table.$emit('selection-change', states.selection ? states.selection.slice() : []);
-  }
-};
-
-TableStore.prototype.setExpandRowKeys = function(rowKeys) {
-  const expandRows = [];
-  const data = this.states.data;
-  const rowKey = this.states.rowKey;
-  if (!rowKey) throw new Error('[Table] prop row-key should not be empty.');
-  const keysMap = getKeysMap(data, rowKey);
-  rowKeys.forEach((key) => {
-    const info = keysMap[key];
-    if (info) {
-      expandRows.push(info.row);
-    }
-  });
-
-  this.states.expandRows = expandRows;
-};
-
-TableStore.prototype.toggleRowSelection = function(row, selected) {
-  const changed = toggleRowSelection(this.states, row, selected);
-  if (changed) {
-    this.table.$emit('selection-change', this.states.selection ? this.states.selection.slice() : []);
-  }
-};
-
-TableStore.prototype.toggleRowExpansion = function(row, expanded) {
-  const changed = toggleRowExpansion(this.states, row, expanded);
-  if (changed) {
-    this.table.$emit('expand-change', row, this.states.expandRows);
-    this.scheduleLayout();
-  }
-};
-
-TableStore.prototype.isRowExpanded = function(row) {
-  const { expandRows = [], rowKey } = this.states;
-  if (rowKey) {
-    const expandMap = getKeysMap(expandRows, rowKey);
-    return !!expandMap[getRowIdentity(row, rowKey)];
-  }
-  return expandRows.indexOf(row) !== -1;
-};
-
-TableStore.prototype.cleanSelection = function() {
-  const selection = this.states.selection || [];
-  const data = this.states.data;
-  const rowKey = this.states.rowKey;
-  let deleted;
-  if (rowKey) {
-    deleted = [];
-    const selectedMap = getKeysMap(selection, rowKey);
-    const dataMap = getKeysMap(data, rowKey);
-    for (let key in selectedMap) {
-      if (selectedMap.hasOwnProperty(key) && !dataMap[key]) {
-        deleted.push(selectedMap[key].row);
-      }
-    }
-  } else {
-    deleted = selection.filter((item) => {
-      return data.indexOf(item) === -1;
-    });
-  }
-
-  deleted.forEach((deletedItem) => {
-    selection.splice(selection.indexOf(deletedItem), 1);
-  });
-
-  if (deleted.length) {
-    this.table.$emit('selection-change', selection ? selection.slice() : []);
-  }
-};
-
-TableStore.prototype.clearFilter = function() {
-  const states = this.states;
-  const { tableHeader, fixedTableHeader, rightFixedTableHeader } = this.table.$refs;
-  let panels = {};
-
-  if (tableHeader) panels = merge(panels, tableHeader.filterPanels);
-  if (fixedTableHeader) panels = merge(panels, fixedTableHeader.filterPanels);
-  if (rightFixedTableHeader) panels = merge(panels, rightFixedTableHeader.filterPanels);
-
-  const keys = Object.keys(panels);
-  if (!keys.length) return;
-
-  keys.forEach(key => {
-    panels[key].filteredValue = [];
-  });
-
-  states.filters = {};
-
-  this.commit('filterChange', {
-    column: {},
-    values: [],
-    silent: true
-  });
-};
-
-TableStore.prototype.clearSort = function() {
-  const states = this.states;
-  if (!states.sortingColumn) return;
-  states.sortingColumn.order = null;
-  states.sortProp = null;
-  states.sortOrder = null;
-
-  this.commit('changeSortCondition', {
-    silent: true
-  });
-};
-
-TableStore.prototype.updateAllSelected = function() {
-  const states = this.states;
-  const { selection, rowKey, selectable, data } = states;
-  if (!data || data.length === 0) {
-    states.isAllSelected = false;
-    return;
-  }
-
-  let selectedMap;
-  if (rowKey) {
-    selectedMap = getKeysMap(states.selection, rowKey);
-  }
-
-  const isSelected = function(row) {
-    if (selectedMap) {
-      return !!selectedMap[getRowIdentity(row, rowKey)];
-    } else {
-      return selection.indexOf(row) !== -1;
-    }
-  };
-
-  let isAllSelected = true;
-  let selectedCount = 0;
-  for (let i = 0, j = data.length; i < j; i++) {
-    const item = data[i];
-    const isRowSelectable = selectable && selectable.call(null, item, i);
-    if (!isSelected(item)) {
-      if (!selectable || isRowSelectable) {
-        isAllSelected = false;
-        break;
-      }
-    } else {
-      selectedCount++;
-    }
-  }
-
-  if (selectedCount === 0) isAllSelected = false;
-
-  states.isAllSelected = isAllSelected;
-};
-
-TableStore.prototype.scheduleLayout = function(updateColumns) {
-  if (updateColumns) {
-    this.updateColumns();
-  }
-  this.table.debouncedUpdateLayout();
-};
-
-TableStore.prototype.setCurrentRowKey = function(key) {
-  const states = this.states;
-  const rowKey = states.rowKey;
-  if (!rowKey) throw new Error('[Table] row-key should not be empty.');
-  const data = states.data || [];
-  const keysMap = getKeysMap(data, rowKey);
-  const info = keysMap[key];
-  if (info) {
-    states.currentRow = info.row;
-  }
-};
-
-TableStore.prototype.updateCurrentRow = function() {
-  const states = this.states;
-  const table = this.table;
-  const data = states.data || [];
-  const oldCurrentRow = states.currentRow;
-
-  if (data.indexOf(oldCurrentRow) === -1) {
-    states.currentRow = null;
-
-    if (states.currentRow !== oldCurrentRow) {
-      table.$emit('current-change', null, oldCurrentRow);
-    }
-  }
-};
-
-TableStore.prototype.commit = function(name, ...args) {
-  const mutations = this.mutations;
-  if (mutations[name]) {
-    mutations[name].apply(this, [this.states].concat(args));
-  } else {
-    throw new Error(`Action not found: ${name}`);
-  }
-};
-
-TableStore.prototype.changeRowOrder = function(startIndex, endIndex) {
-  this.table.$emit('changeRowOrder', startIndex, endIndex)
-};
-
-export default TableStore;

+ 0 - 666
src/lib/el-table/src/table.vue

@@ -1,666 +0,0 @@
-<template>
-  <div class="el-table"
-    :class="[{
-      'el-table--fit': fit,
-      'el-table--striped': stripe,
-      'el-table--border': border || isGroup,
-      'el-table--hidden': isHidden,
-      'el-table--group': isGroup,
-      'el-table--fluid-height': maxHeight,
-      'el-table--scrollable-x': layout.scrollX,
-      'el-table--scrollable-y': layout.scrollY,
-      'el-table--enable-row-hover': !store.states.isComplex,
-      'el-table--enable-row-transition': (store.states.data || []).length !== 0 && (store.states.data || []).length < 100
-    }, tableSize ? `el-table--${ tableSize }` : '']"
-    @mouseleave="handleMouseLeave($event)">
-    <div class="hidden-columns" ref="hiddenColumns"><slot></slot></div>
-    <div
-      v-if="showHeader"
-      v-mousewheel="handleHeaderFooterMousewheel"
-      class="el-table__header-wrapper"
-      ref="headerWrapper">
-      <table-header
-        ref="tableHeader"
-        :store="store"
-        :dragColumn="dragColumn"
-        :border="border"
-        :default-sort="defaultSort"
-        :style="{
-          width: layout.bodyWidth ? layout.bodyWidth + 'px' : ''
-        }">
-      </table-header>
-    </div>
-    <div
-      class="el-table__body-wrapper"
-      ref="bodyWrapper"
-      :class="[layout.scrollX ? `is-scrolling-${scrollPosition}` : 'is-scrolling-none']"
-      :style="[bodyHeight]">
-      <table-body
-        :dragRow="dragRow"
-        :context="context"
-        :store="store"
-        :stripe="stripe"
-        :row-class-name="rowClassName"
-        :row-style="rowStyle"
-        :highlight="highlightCurrentRow"
-        :style="{
-           width: bodyWidth
-        }">
-      </table-body>
-      <div
-        v-if="!data || data.length === 0"
-        class="el-table__empty-block"
-        ref="emptyBlock"
-        :style="{
-          width: bodyWidth
-        }">
-        <span class="el-table__empty-text">
-          <slot name="empty">{{ emptyText || t('el.table.emptyText') }}</slot>
-        </span>
-      </div>
-      <div
-        v-if="$slots.append"
-        class="el-table__append-wrapper"
-        ref="appendWrapper">
-        <slot name="append"></slot>
-      </div>
-    </div>
-    <div
-      v-if="showSummary"
-      v-show="data && data.length > 0"
-      v-mousewheel="handleHeaderFooterMousewheel"
-      class="el-table__footer-wrapper"
-      ref="footerWrapper">
-      <table-footer
-        :store="store"
-        :border="border"
-        :sum-text="sumText || t('el.table.sumText')"
-        :summary-method="summaryMethod"
-        :default-sort="defaultSort"
-        :style="{
-          width: layout.bodyWidth ? layout.bodyWidth + 'px' : ''
-        }">
-      </table-footer>
-    </div>
-    <div
-      v-if="fixedColumns.length > 0"
-      v-mousewheel="handleFixedMousewheel"
-      class="el-table__fixed"
-      ref="fixedWrapper"
-      :style="[{
-        width: layout.fixedWidth ? layout.fixedWidth + 'px' : ''
-      },
-      fixedHeight]">
-      <div
-        v-if="showHeader"
-        class="el-table__fixed-header-wrapper"
-        ref="fixedHeaderWrapper" >
-        <table-header
-          ref="fixedTableHeader"
-          fixed="left"
-          :border="border"
-          :dragColumn="dragColumn"
-          :store="store"
-          :style="{
-            width: bodyWidth
-          }"></table-header>
-      </div>
-      <div
-        class="el-table__fixed-body-wrapper"
-        ref="fixedBodyWrapper"
-        :style="[{
-          top: layout.headerHeight + 'px'
-        },
-        fixedBodyHeight]">
-        <table-body
-          fixed="left"
-          :dragRow="dragRow"
-          :store="store"
-          :stripe="stripe"
-          :highlight="highlightCurrentRow"
-          :row-class-name="rowClassName"
-          :row-style="rowStyle"
-          :style="{
-            width: bodyWidth
-          }">
-        </table-body>
-        <div
-          v-if="$slots.append"
-          class="el-table__append-gutter"
-          :style="{
-            height: layout.appendHeight + 'px'
-          }"></div>
-      </div>
-      <div
-        v-if="showSummary"
-        v-show="data && data.length > 0"
-        class="el-table__fixed-footer-wrapper"
-        ref="fixedFooterWrapper">
-        <table-footer
-          fixed="left"
-          :border="border"
-          :sum-text="sumText || t('el.table.sumText')"
-          :summary-method="summaryMethod"
-          :store="store"
-          :style="{
-            width: bodyWidth
-          }"></table-footer>
-      </div>
-    </div>
-    <div
-      v-if="rightFixedColumns.length > 0"
-      v-mousewheel="handleFixedMousewheel"
-      class="el-table__fixed-right"
-      ref="rightFixedWrapper"
-      :style="[{
-        width: layout.rightFixedWidth ? layout.rightFixedWidth + 'px' : '',
-        right: layout.scrollY ? (border ? layout.gutterWidth : (layout.gutterWidth || 0)) + 'px' : ''
-      },
-      fixedHeight]">
-      <div v-if="showHeader"
-        class="el-table__fixed-header-wrapper"
-        ref="rightFixedHeaderWrapper">
-        <table-header
-          ref="rightFixedTableHeader"
-          fixed="right"
-          :border="border"
-          :store="store"
-          :dragColumn="dragColumn"
-          :style="{
-            width: bodyWidth
-          }"></table-header>
-      </div>
-      <div
-        class="el-table__fixed-body-wrapper"
-        ref="rightFixedBodyWrapper"
-        :style="[{
-          top: layout.headerHeight + 'px'
-        },
-        fixedBodyHeight]">
-        <table-body
-          fixed="right"
-          :dragRow="dragRow"
-          :store="store"          
-          :stripe="stripe"
-          :row-class-name="rowClassName"
-          :row-style="rowStyle"
-          :highlight="highlightCurrentRow"
-          :style="{
-            width: bodyWidth
-          }">
-        </table-body>
-      </div>
-      <div
-        v-if="showSummary"
-        v-show="data && data.length > 0"
-        class="el-table__fixed-footer-wrapper"
-        ref="rightFixedFooterWrapper">
-        <table-footer
-          fixed="right"
-          :border="border"
-          :sum-text="sumText || t('el.table.sumText')"
-          :summary-method="summaryMethod"
-          :store="store"
-          :style="{
-            width: bodyWidth
-          }"></table-footer>
-      </div>
-    </div>
-    <div
-      v-if="rightFixedColumns.length > 0"
-      class="el-table__fixed-right-patch"
-      ref="rightFixedPatch"
-      :style="{
-        width: layout.scrollY ? layout.gutterWidth + 'px' : '0',
-        height: layout.headerHeight + 'px'
-      }"></div>
-    <div class="el-table__column-resize-proxy" ref="resizeProxy" v-show="resizeProxyVisible"></div>
-  </div>
-</template>
-
-<script type="text/babel">
-  import ElCheckbox from 'element-ui/packages/checkbox';
-  import debounce from 'throttle-debounce/debounce';
-  import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event';
-  import Mousewheel from 'element-ui/src/directives/mousewheel';
-  import Locale from 'element-ui/src/mixins/locale';
-  import Migrating from 'element-ui/src/mixins/migrating';
-  import TableStore from './table-store';
-  import TableLayout from './table-layout';
-  import TableBody from './table-body';
-  import TableHeader from './table-header';
-  import TableFooter from './table-footer';
-
-  let tableIdSeed = 1;
-
-  export default {
-    name: 'ElTable',
-
-    mixins: [Locale, Migrating],
-
-    directives: {
-      Mousewheel
-    },
-
-    props: {
-      data: {
-        type: Array,
-        default: function() {
-          return [];
-        }
-      },
-
-      size: String,
-
-      width: [String, Number],
-
-      height: [String, Number],
-
-      maxHeight: [String, Number],
-
-      fit: {
-        type: Boolean,
-        default: true
-      },
-
-      stripe: Boolean,
-
-      border: Boolean,
-
-      dragColumn: [String, Boolean],
-
-      dragRow: [String, Boolean],
-
-      rowKey: [String, Function],
-
-      context: {},
-
-      showHeader: {
-        type: Boolean,
-        default: true
-      },
-
-      showSummary: Boolean,
-
-      sumText: String,
-
-      summaryMethod: Function,
-
-      rowClassName: [String, Function],
-
-      rowStyle: [Object, Function],
-
-      cellClassName: [String, Function],
-
-      cellStyle: [Object, Function],
-
-      headerRowClassName: [String, Function],
-
-      headerRowStyle: [Object, Function],
-
-      headerCellClassName: [String, Function],
-
-      headerCellStyle: [Object, Function],
-
-      highlightCurrentRow: Boolean,
-
-      currentRowKey: [String, Number],
-
-      emptyText: String,
-
-      expandRowKeys: Array,
-
-      defaultExpandAll: Boolean,
-
-      defaultSort: Object,
-
-      tooltipEffect: String,
-
-      spanMethod: Function,
-
-      selectOnIndeterminate: {
-        type: Boolean,
-        default: true
-      }
-    },
-
-    components: {
-      TableHeader,
-      TableFooter,
-      TableBody,
-      ElCheckbox
-    },
-
-    methods: {
-      getMigratingConfig() {
-        return {
-          events: {
-            expand: 'expand is renamed to expand-change'
-          }
-        };
-      },
-
-      setCurrentRow(row) {
-        this.store.commit('setCurrentRow', row);
-      },
-
-      toggleRowSelection(row, selected) {
-        this.store.toggleRowSelection(row, selected);
-        this.store.updateAllSelected();
-      },
-
-      toggleRowExpansion(row, expanded) {
-        this.store.toggleRowExpansion(row, expanded);
-      },
-
-      clearSelection() {
-        this.store.clearSelection();
-      },
-
-      clearFilter() {
-        this.store.clearFilter();
-      },
-
-      clearSort() {
-        this.store.clearSort();
-      },
-
-      handleMouseLeave() {
-        this.store.commit('setHoverRow', null);
-        if (this.hoverState) this.hoverState = null;
-      },
-
-      updateScrollY() {
-        this.layout.updateScrollY();
-        this.layout.updateColumnsWidth();
-      },
-
-      handleFixedMousewheel(event, data) {
-        const bodyWrapper = this.bodyWrapper;
-        if (Math.abs(data.spinY) > 0) {
-          const currentScrollTop = bodyWrapper.scrollTop;
-          if (data.pixelY < 0 && currentScrollTop !== 0) {
-            event.preventDefault();
-          }
-          if (data.pixelY > 0 && bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop) {
-            event.preventDefault();
-          }
-          bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5);
-        } else {
-          bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5);
-        }
-      },
-
-      handleHeaderFooterMousewheel(event, data) {
-        const { pixelX, pixelY } = data;
-        if (Math.abs(pixelX) >= Math.abs(pixelY)) {
-          event.preventDefault();
-          this.bodyWrapper.scrollLeft += data.pixelX / 5;
-        }
-      },
-
-      bindEvents() {
-        const { headerWrapper, footerWrapper } = this.$refs;
-        const refs = this.$refs;
-        let self = this;
-
-        this.bodyWrapper.addEventListener('scroll', function() {
-          if (headerWrapper) headerWrapper.scrollLeft = this.scrollLeft;
-          if (footerWrapper) footerWrapper.scrollLeft = this.scrollLeft;
-          if (refs.fixedBodyWrapper) refs.fixedBodyWrapper.scrollTop = this.scrollTop;
-          if (refs.rightFixedBodyWrapper) refs.rightFixedBodyWrapper.scrollTop = this.scrollTop;
-          const maxScrollLeftPosition = this.scrollWidth - this.offsetWidth - 1;
-          const scrollLeft = this.scrollLeft;
-          if (scrollLeft >= maxScrollLeftPosition) {
-            self.scrollPosition = 'right';
-          } else if (scrollLeft === 0) {
-            self.scrollPosition = 'left';
-          } else {
-            self.scrollPosition = 'middle';
-          }
-        });
-
-        if (this.fit) {
-          addResizeListener(this.$el, this.resizeListener);
-        }
-      },
-
-      resizeListener() {
-        if (!this.$ready) return;
-        let shouldUpdateLayout = false;
-        const el = this.$el;
-        const { width: oldWidth, height: oldHeight } = this.resizeState;
-
-        const width = el.offsetWidth;
-        if (oldWidth !== width) {
-          shouldUpdateLayout = true;
-        }
-
-        const height = el.offsetHeight;
-        if ((this.height || this.shouldUpdateHeight) && oldHeight !== height) {
-          shouldUpdateLayout = true;
-        }
-
-        if (shouldUpdateLayout) {
-          this.resizeState.width = width;
-          this.resizeState.height = height;
-          this.doLayout();
-        }
-      },
-
-      doLayout() {
-        this.layout.updateColumnsWidth();
-        if (this.shouldUpdateHeight) {
-          this.layout.updateElsHeight();
-        }
-      },
-
-      sort(prop, order) {
-        this.store.commit('sort', { prop, order });
-      }
-    },
-
-    created() {
-      this.tableId = 'el-table_' + tableIdSeed++;
-      this.debouncedUpdateLayout = debounce(50, () => this.doLayout());
-    },
-
-    computed: {
-      tableSize() {
-        return this.size || (this.$ELEMENT || {}).size;
-      },
-
-      bodyWrapper() {
-        return this.$refs.bodyWrapper;
-      },
-
-      shouldUpdateHeight() {
-        return this.height ||
-          this.maxHeight ||
-          this.fixedColumns.length > 0 ||
-          this.rightFixedColumns.length > 0;
-      },
-
-      selection() {
-        return this.store.states.selection;
-      },
-
-      columns() {
-        return this.store.states.columns;
-      },
-
-      tableData() {
-        return this.store.states.data;
-      },
-
-      fixedColumns() {
-        return this.store.states.fixedColumns;
-      },
-
-      rightFixedColumns() {
-        return this.store.states.rightFixedColumns;
-      },
-
-      bodyWidth() {
-        const { bodyWidth, scrollY, gutterWidth } = this.layout;
-        return bodyWidth ? bodyWidth - (scrollY ? gutterWidth : 0) + 'px' : '';
-      },
-
-      bodyHeight() {
-        if (this.height) {
-          return {
-            height: this.layout.bodyHeight ? this.layout.bodyHeight + 'px' : ''
-          };
-        } else if (this.maxHeight) {
-          return {
-            'max-height': (this.showHeader
-              ? this.maxHeight - this.layout.headerHeight - this.layout.footerHeight
-              : this.maxHeight - this.layout.footerHeight) + 'px'
-          };
-        }
-        return {};
-      },
-
-      fixedBodyHeight() {
-        if (this.height) {
-          return {
-            height: this.layout.fixedBodyHeight ? this.layout.fixedBodyHeight + 'px' : ''
-          };
-        } else if (this.maxHeight) {
-          let maxHeight = this.layout.scrollX ? this.maxHeight - this.layout.gutterWidth : this.maxHeight;
-
-          if (this.showHeader) {
-            maxHeight -= this.layout.headerHeight;
-          }
-
-          maxHeight -= this.layout.footerHeight;
-
-          return {
-            'max-height': maxHeight + 'px'
-          };
-        }
-
-        return {};
-      },
-
-      fixedHeight() {
-        if (this.maxHeight) {
-          if (this.showSummary) {
-            return {
-              bottom: 0
-            };
-          }
-          return {
-            bottom: (this.layout.scrollX && this.data.length) ? this.layout.gutterWidth + 'px' : ''
-          };
-        } else {
-          if (this.showSummary) {
-            return {
-              height: this.layout.tableHeight ? this.layout.tableHeight + 'px' : ''
-            };
-          }
-          return {
-            height: this.layout.viewportHeight ? this.layout.viewportHeight + 'px' : ''
-          };
-        }
-      }
-    },
-
-    watch: {
-      height: {
-        immediate: true,
-        handler(value) {
-          this.layout.setHeight(value);
-        }
-      },
-
-      maxHeight: {
-        immediate: true,
-        handler(value) {
-          this.layout.setMaxHeight(value);
-        }
-      },
-
-      currentRowKey(newVal) {
-        this.store.setCurrentRowKey(newVal);
-      },
-
-      data: {
-        immediate: true,
-        handler(value) {
-          this.store.commit('setData', value);
-          if (this.$ready) {
-            this.$nextTick(() => {
-              this.doLayout();
-            });
-          }
-        }
-      },
-
-      expandRowKeys: {
-        immediate: true,
-        handler(newVal) {
-          if (newVal) {
-            this.store.setExpandRowKeys(newVal);
-          }
-        }
-      }
-    },
-
-    destroyed() {
-      if (this.resizeListener) removeResizeListener(this.$el, this.resizeListener);
-    },
-
-    mounted() {
-      this.bindEvents();
-      this.store.updateColumns();
-      this.doLayout();
-
-      this.resizeState = {
-        width: this.$el.offsetWidth,
-        height: this.$el.offsetHeight
-      };
-
-      // init filters
-      this.store.states.columns.forEach(column => {
-        if (column.filteredValue && column.filteredValue.length) {
-          this.store.commit('filterChange', {
-            column,
-            values: column.filteredValue,
-            silent: true
-          });
-        }
-      });
-
-      this.$ready = true;
-    },
-
-    data() {
-      const store = new TableStore(this, {
-        rowKey: this.rowKey,
-        defaultExpandAll: this.defaultExpandAll,
-        selectOnIndeterminate: this.selectOnIndeterminate
-      });
-      const layout = new TableLayout({
-        store,
-        table: this,
-        fit: this.fit,
-        showHeader: this.showHeader
-      });
-      return {
-        layout,
-        store,
-        isHidden: false,
-        renderExpanded: null,
-        resizeProxyVisible: false,
-        resizeState: {
-          width: null,
-          height: null
-        },
-        // 是否拥有多级表头
-        isGroup: false,
-        scrollPosition: 'left'
-      };
-    }
-  };
-</script>

+ 0 - 110
src/lib/el-table/src/util.js

@@ -1,110 +0,0 @@
-import { getValueByPath } from 'element-ui/src/utils/util';
-
-export const getCell = function(event) {
-  let cell = event.target;
-
-  while (cell && cell.tagName.toUpperCase() !== 'HTML') {
-    if (cell.tagName.toUpperCase() === 'TD') {
-      return cell;
-    }
-    cell = cell.parentNode;
-  }
-
-  return null;
-};
-
-const isObject = function(obj) {
-  return obj !== null && typeof obj === 'object';
-};
-
-export const orderBy = function(array, sortKey, reverse, sortMethod, sortBy) {
-  if (!sortKey && !sortMethod && (!sortBy || Array.isArray(sortBy) && !sortBy.length)) {
-    return array;
-  }
-  if (typeof reverse === 'string') {
-    reverse = reverse === 'descending' ? -1 : 1;
-  } else {
-    reverse = (reverse && reverse < 0) ? -1 : 1;
-  }
-  const getKey = sortMethod ? null : function(value, index) {
-    if (sortBy) {
-      if (!Array.isArray(sortBy)) {
-        sortBy = [sortBy];
-      }
-      return sortBy.map(function(by) {
-        if (typeof by === 'string') {
-          return getValueByPath(value, by);
-        } else {
-          return by(value, index, array);
-        }
-      });
-    }
-    if (sortKey !== '$key') {
-      if (isObject(value) && '$value' in value) value = value.$value;
-    }
-    return [isObject(value) ? getValueByPath(value, sortKey) : value];
-  };
-  const compare = function(a, b) {
-    if (sortMethod) {
-      return sortMethod(a.value, b.value);
-    }
-    for (let i = 0, len = a.key.length; i < len; i++) {
-      if (a.key[i] < b.key[i]) {
-        return -1;
-      }
-      if (a.key[i] > b.key[i]) {
-        return 1;
-      }
-    }
-    return 0;
-  };
-  return array.map(function(value, index) {
-    return {
-      value: value,
-      index: index,
-      key: getKey ? getKey(value, index) : null
-    };
-  }).sort(function(a, b) {
-    let order = compare(a, b);
-    if (!order) {
-      // make stable https://en.wikipedia.org/wiki/Sorting_algorithm#Stability
-      order = a.index - b.index;
-    }
-    return order * reverse;
-  }).map(item => item.value);
-};
-
-export const getColumnById = function(table, columnId) {
-  let column = null;
-  table.columns.forEach(function(item) {
-    if (item.id === columnId) {
-      column = item;
-    }
-  });
-  return column;
-};
-
-export const getColumnByCell = function(table, cell) {
-  const matches = (cell.className || '').match(/el-table_[^\s]+/gm);
-  if (matches) {
-    return getColumnById(table, matches[0]);
-  }
-  return null;
-};
-
-export const getRowIdentity = (row, rowKey) => {
-  if (!row) throw new Error('row is required when get row identity');
-  if (typeof rowKey === 'string') {
-    if (rowKey.indexOf('.') < 0) {
-      return row[rowKey];
-    }
-    let key = rowKey.split('.');
-    let current = row;
-    for (let i = 0; i < key.length; i++) {
-      current = current[key[i]];
-    }
-    return current;
-  } else if (typeof rowKey === 'function') {
-    return rowKey.call(null, row);
-  }
-};

+ 10 - 0
src/views/RMS/components/addContractPrice.vue

@@ -87,6 +87,7 @@ export default {
       }
       else{
          let map=this.form;
+         map.userId=getCookie("userId");
          console.log(map);
          map.startTime = sjTime(this.form.startTime);
          map.endTime = sjTime(this.form.endTime);
@@ -119,6 +120,15 @@ export default {
           } else {
             this.$message.error(res.data.data);
           }
+        }).then(()=>{
+          let copy=this.$route.query;
+          console.log("copy:",copy);
+          if(copy){
+            if(copy.portId){
+              copy.portId=copy.portId * 1;
+            }
+            this.$set(this,"form",copy);
+          }
         });
     }
   }

+ 15 - 3
src/views/RMS/components/contractPrice.vue

@@ -13,12 +13,15 @@
     </div>
     <div class="table">
       <dilTable v-bind.sync="options">
-        <el-table-column fixed="right" label="操作" width="100">
+        <el-table-column fixed="right" label="操作" width="180">
           <template slot-scope="scope">
-            <el-button type="text" size="small" @click="update(scope)">
+            <el-button type="text" size="small" @click="add(scope)" style="margin:10px">
+              复制新增
+            </el-button>
+            <el-button type="text" size="small" @click="update(scope)" style="margin:10px">
               修改
             </el-button>
-            <el-button type="text" size="mini" @click="deleteOne(scope)">
+            <el-button type="text" size="mini" @click="deleteOne(scope)" style="margin:10px">
               删除
             </el-button>
           </template>
@@ -53,6 +56,15 @@ export default {
       console.log(scope.row.resultId);
       this.$router.push("/editContractPrice/" + scope.row.resultId);
     },
+    //复制新增
+    add(scope) {
+      console.log(scope.row);
+      this.$router.push("/addContractPrice?contractNo="+scope.row.contractNo
+      +"&portId="+scope.row.portId
+      +"&unitPrice="+scope.row.unitPrice
+      +"&startTime="+scope.row.startTime
+      +"&endTime="+scope.row.endTime);
+    },
     showCarrier(scope) {
       console.log(scope.row.resultId);
       this.$router.push("/showContractPrice/" + scope.row.resultId);

+ 538 - 508
src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/addSporadicTransportAppoint.vue

@@ -4,125 +4,100 @@
   <div class="addSporadic">
     <page-title>运输预约</page-title>
     <div class="form-box">
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-        >
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="发货单位">
-         <el-autocomplete
-          class="inline-input"
-          v-model="stateSupplier"
-          :fetch-suggestions="querySearchSupplier"
-          placeholder="请输入发货单位名称"
-          :trigger-on-focus="false"
-          @select="handleSelectSupplier"
-        >
-        <template slot-scope="{ item }">
-          <div class="name">{{ item.supplierName }}</div>
-        </template>
-        </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateSupplier"
+            :fetch-suggestions="querySearchSupplier"
+            placeholder="请输入发货单位名称"
+            :trigger-on-focus="false"
+            @select="handleSelectSupplier"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.supplierName }}</div>
+            </template>
+          </el-autocomplete>
         </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-        >
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="收货单位">
-         <el-autocomplete
-          class="inline-input"
-          v-model="stateConsignee"
-          :fetch-suggestions="querySearchConsignee"
-          placeholder="请输入收货单位名称"
-          :trigger-on-focus="false"
-          @select="handleSelectConsignee"
-        >
-        <template slot-scope="{ item }">
-          <div class="name">{{ item.consigneeCompanyName }}</div>
-        </template>
-        </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateConsignee"
+            :fetch-suggestions="querySearchConsignee"
+            placeholder="请输入收货单位名称"
+            :trigger-on-focus="false"
+            @select="handleSelectConsignee"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.consigneeCompanyName }}</div>
+            </template>
+          </el-autocomplete>
         </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="流向">
-        <el-select v-model="orderType" placeholder="请选择" @change="flowChange">
-        <el-option
-          v-for="item in orderTypeList"
-          :key="item.value"
-          :label="item.label" 
-          :value="item.value"
-        >
-        </el-option>
-      </el-select>
-      </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+          <el-select
+            v-model="orderType"
+            placeholder="请选择"
+            @change="flowChange"
+          >
+            <el-option
+              v-for="item in orderTypeList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="选择路线">
-          <el-input v-model="lineName" placeholder="必填" disabled>
-          </el-input>
+          <el-input v-model="lineName" placeholder="必填" disabled> </el-input>
         </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
         </el-form-item>
-        </el-form>
-         <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="选择承运商">
-         <el-autocomplete
-          class="inline-input"
-          v-model="stateCarrier"
-          :fetch-suggestions="querySearchCarrier"
-          placeholder="请输入承运商名称"
-          :trigger-on-focus="false"
-          @select="handleSelectCarrier"
-        >
-        <template slot-scope="{ item }">
-          <div class="name">{{ item.carrierName }}</div>
-        </template>
-        </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateCarrier"
+            :fetch-suggestions="querySearchCarrier"
+            placeholder="请输入承运商名称"
+            :trigger-on-focus="false"
+            @select="handleSelectCarrier"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.carrierName }}</div>
+            </template>
+          </el-autocomplete>
         </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="趟次">
-         <el-input
-          class="inline-input"
-          v-model="materialTimes"
-          placeholder="趟次-非必填"
-          :trigger-on-focus="false"
-          @input="onInputTimes()"
-          @blur="onblur()"
-        >
-        </el-input>
-        </el-form-item>
-        </el-form>
-        <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
-        <el-form-item label="选择物资">      
+          <el-input
+            class="inline-input"
+            v-model="materialTimes"
+            placeholder="趟次-非必填"
+            :trigger-on-focus="false"
+            @input="onInputTimes()"
+            @blur="onblur()"
+          >
+          </el-input>
         </el-form-item>
-        <el-form-item > 
+      </el-form>
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
+        <el-form-item label="选择物资"> </el-form-item>
+        <el-form-item>
           <el-button type="primary" @click="drawTable" class="truckBtn"
-          >浏览</el-button>
+            >浏览</el-button
+          >
         </el-form-item>
-        </el-form>
+      </el-form>
     </div>
     <div class="lineId from">
       <span class="text">该批车辆是否一车多趟:</span>
@@ -130,183 +105,200 @@
       </el-switch>
     </div>
     <div class="swtichTop">
-    <span class="titile">点击浏览选择物资之前请选择物资单位!</span>
-    <div class="switch" v-if="tableData.length > 0">
-      <el-tooltip placement="top">
-        <div slot="content">下面表格已有数据,不能进行更改!!!</div>
-        <el-switch
-          v-model="value"
-          active-text="件数"
-          inactive-text="重量"
-          disabled
-        >
-        </el-switch>
-      </el-tooltip>
-    </div>
-    <div class="switch" v-else>
-      <el-tooltip placement="top">
-        <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
-        <el-switch v-model="value" active-text="件数" inactive-text="重量">
-        </el-switch>
-      </el-tooltip>
-    </div>
+      <span class="titile">点击浏览选择物资之前请选择物资单位!</span>
+      <div class="switch" v-if="tableData.length > 0">
+        <el-tooltip placement="top">
+          <div slot="content">下面表格已有数据,不能进行更改!!!</div>
+          <el-switch
+            v-model="value"
+            active-text="件数"
+            inactive-text="重量"
+            disabled
+          >
+          </el-switch>
+        </el-tooltip>
+      </div>
+      <div class="switch" v-else>
+        <el-tooltip placement="top">
+          <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
+          <el-switch v-model="value" active-text="件数" inactive-text="重量">
+          </el-switch>
+        </el-tooltip>
+      </div>
     </div>
     <!-- 物资表格 -->
     <div class="truckListTable">
-    <div class="selectionTable">
-      <el-table
-        :data="tableData"
-        border
-        style="width: 100%"
-        highlight-current-row
-      >
-        <el-table-column
-          v-for="(item, i) in tableTop"
-          :key="i"
-          :prop="item.prop"
-          :label="item.label"
-          align="center"
-          show-overflow-tooltip
+      <div class="selectionTable">
+        <el-table
+          :data="tableData"
+          border
+          style="width: 100%"
+          highlight-current-row
         >
-          <template slot="scope" v-if="item.label !== '件数'">
-            <span>{{ item.label }}</span>
-          </template>
-          <!-- 插入输入框 -->
-          <template slot-scope="scope">
-            <template v-if="item.slot">
+          <el-table-column
+            v-for="(item, i) in tableTop"
+            :key="i"
+            :prop="item.prop"
+            :label="item.label"
+            align="center"
+            show-overflow-tooltip
+          >
+            <template slot="scope" v-if="item.label !== '件数'">
+              <span>{{ item.label }}</span>
+            </template>
+            <!-- 插入输入框 -->
+            <template slot-scope="scope">
+              <template v-if="item.slot">
                 <!-- 装卸货优先级 -->
-               <template v-if="item.prop == 'materialPriority'">
-                <el-input
-                  class="textinput"
-                  v-model.number="scope.row.materialPriority"
-                  @input="onInputPriority(scope.row.materialPriority)"
-                ></el-input>
+                <template v-if="item.prop == 'materialPriority'">
+                  <el-input
+                    class="textinput"
+                    v-model.number="scope.row.materialPriority"
+                    @input="onInputPriority(scope.row.materialPriority)"
+                  ></el-input>
+                </template>
+                <!-- 物资件数 -->
+                <template v-if="item.prop == 'orderMaterialNumber'">
+                  <el-input
+                    class="textinput"
+                    v-model.number="scope.row.orderMaterialNumber"
+                    @input="onInputNumber(scope.row.orderMaterialNumber)"
+                  ></el-input>
+                </template>
+                <!-- 物资重量 -->
+                <template v-if="item.prop == 'orderMaterialWeight'">
+                  <el-input
+                    v-model.number="scope.row.orderMaterialWeight"
+                    @input="onInputWeight(scope.row.orderMaterialWeight)"
+                  ></el-input>
+                </template>
               </template>
-              <!-- 物资件数 -->
-              <template v-if="item.prop == 'orderMaterialNumber'">
-                <el-input
-                  class="textinput"
-                  v-model.number="scope.row.orderMaterialNumber"
-                  @input="onInputNumber(scope.row.orderMaterialNumber)"
-                ></el-input>
+              <template v-else>
+                <span>{{ scope.row[item.prop] }}</span>
               </template>
-              <!-- 物资重量 -->
-               <template v-if="item.prop == 'orderMaterialWeight'">
-                <el-input
-                  v-model.number="scope.row.orderMaterialWeight"
-                  @input="onInputWeight(scope.row.orderMaterialWeight)"
-                ></el-input>
-              </template>           
             </template>
-            <template v-else>
-              <span>{{ scope.row[item.prop] }}</span>
+          </el-table-column>
+          <!-- 操作列 -->
+          <el-table-column fixed="right" label="操作" width="100">
+            <template slot-scope="scope">
+              <el-button
+                @click.native.prevent="deleteRow(scope.$index, tableData)"
+                type="text"
+                icon="el-icon-close"
+                size="big"
+              ></el-button>
             </template>
-          </template>
-        </el-table-column>
-        <!-- 操作列 -->
-        <el-table-column fixed="right" label="操作" width="100">
-          <template slot-scope="scope">
-            <el-button
-              @click.native.prevent="deleteRow(scope.$index, tableData)"
-              type="text"
-              icon="el-icon-close"
-              size="big"
-            ></el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
+          </el-table-column>
+        </el-table>
+      </div>
     </div>
     <!-- 物资模态框 -->
     <div class="drawSty">
       <el-drawer
-      title="选择物资信息"
-      :visible.sync="table"
-      direction="rtl"
-      size="40%"
-      :show-close="false"
-    >
-      <el-input placeholder="请输入内容" v-model="inputMaterial" clearable > </el-input
-      ><el-button type="primary" class="btn" @click="onclickMaterial">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <!-- <el-button @click="open">取消</el-button> -->
-      <el-button type="primary" @click="makeSure1">确定</el-button>
-      <div class="tablecls">
-        <!-- 查询所有的物资 -->
-        <dilTable ref="materialTable" v-bind.sync="materialOptions" @selection-change="selectionChange" :drawer="aaadrawer">
-        </dilTable>
-      </div>
-    </el-drawer>
-    <!-- 模态窗口 -->
-    <el-drawer :visible.sync="drawer" :direction="direction" size="30%" :before-close="handleClose">
-      <el-input
-        placeholder="请输入内容"
-        v-model="input"
-        style="margin-top: 20px"
-        clearable
-      ></el-input>
-      <el-button
-        type="primary"
-        class="btn"
-        @click="onclick(a)"
-        style="margin-bottom: 0.9375rem"
+        title="选择物资信息"
+        :visible.sync="table"
+        direction="rtl"
+        size="40%"
+        :show-close="false"
       >
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <div v-show="a == 5">
-        <dilTable
-          v-bind.sync="line"
-          @radio-change="currentRadioChange5"
-        ></dilTable>
-      </div>
-    </el-drawer>
-    </div>  
+        <el-input placeholder="请输入内容" v-model="inputMaterial" clearable>
+        </el-input
+        ><el-button type="primary" class="btn" @click="onclickMaterial">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <!-- <el-button @click="open">取消</el-button> -->
+        <el-button type="primary" @click="makeSure1">确定</el-button>
+        <div class="tablecls">
+          <!-- 查询所有的物资 -->
+          <dilTable
+            ref="materialTable"
+            v-bind.sync="materialOptions"
+            @selection-change="selectionChange"
+            :drawer="aaadrawer"
+          >
+          </dilTable>
+        </div>
+      </el-drawer>
+      <!-- 模态窗口 -->
+      <el-drawer
+        :visible.sync="drawer"
+        :direction="direction"
+        size="30%"
+        :before-close="handleClose"
+      >
+        <el-input
+          placeholder="请输入内容"
+          v-model="input"
+          style="margin-top: 20px"
+          clearable
+        ></el-input>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="onclick(a)"
+          style="margin-bottom: 0.9375rem"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <div v-show="a == 5">
+          <dilTable
+            ref="dilTabRef"
+            v-bind.sync="line"
+            @radio-change="currentRadioChange5"
+            :isKuang="isKuang"
+          ></dilTable>
+        </div>
+      </el-drawer>
+    </div>
     <div class="button-box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="makeSure" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="makeSure" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      inputLine:null,
-      aaadrawer:false,
-      disabled:false,
-      materialTimes:null,
+      isKuang: false,
+      inputLine: null,
+      aaadrawer: false,
+      disabled: false,
+      materialTimes: null,
       options: [],
-      value: '',
-      receiveName:'',
-      stateCarrier:null,
-      stateSupplier:null,
-      stateConsignee:null,
-      restaurantsConsignee:null,
-      restaurantsSupplier:null,
-      orderTypeList:[
+      value: "",
+      receiveName: "",
+      stateCarrier: null,
+      stateSupplier: null,
+      stateConsignee: null,
+      restaurantsConsignee: null,
+      restaurantsSupplier: null,
+      orderTypeList: [
+        {
+          value: 12,
+          label: "进厂"
+        },
         {
-          value:12,
-          label:'进厂'
-        },{
-          value:13,
-          label:'出厂'
+          value: 13,
+          label: "出厂"
         },
         {
-          value:14,
-          label:'中转'
+          value: 14,
+          label: "中转"
         },
         {
-          value:19,
-          label:'退货'
+          value: 19,
+          label: "退货"
         }
       ],
-      orderType:null,
-      restaurantsCarrier:null,
+      orderType: null,
+      restaurantsCarrier: null,
       // 线路名称
       lineName: "",
       //线路id
@@ -322,37 +314,37 @@ export default {
         {
           prop: "materialCode",
           label: "物资编码",
-          width: "160",
+          width: "160"
         },
         {
           prop: "materialName",
           label: "物资名称",
-          width: "140",
+          width: "140"
         },
         {
           prop: "materialSpecification",
           label: "规格型号",
-          width: "140",
+          width: "140"
         },
         {
           prop: "materialPriority",
           label: "装卸货优先级",
-          slot: true,
+          slot: true
         },
         {
           prop: "orderMaterialWeight",
           label: "重量",
-          slot: true,
-        },
+          slot: true
+        }
       ],
       // 收货单位ID
-      receiveId:null,
+      receiveId: null,
       //承运商ID
-      carrierId:null,
+      carrierId: null,
       //物资表格数据
       tableData: [],
       selectionList1: [],
-      newsArr:[],
+      newsArr: [],
       //物资名称
       materialName: "",
       //发货单位名称
@@ -362,177 +354,207 @@ export default {
       //物资id
       materialId: null,
       //承运商id
-      carrierId:null,
+      carrierId: null,
       //是否需要打开模态窗口
       drawer: false,
       a: 1,
       direction: "rtl",
-      inputMaterial:null,
-      input:null,
+      inputMaterial: null,
+      input: null,
       //物资模态框
-      materialOptions:{
-          requestUrl:"",
-          selectionType: "select",
+      materialOptions: {
+        requestUrl: "",
+        selectionType: "select"
       },
       line: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
-      row: {},
+      row: {}
     };
   },
   watch: {
     value() {
       if (this.value) {
-        console.log(this.value)
-        console.log(this.tableTop.length)
+        console.log(this.value);
+        console.log(this.tableTop.length);
         this.tableTop.splice(this.tableTop.length - 1, 1);
         this.tableTop.push({
           prop: "orderMaterialNumber",
           label: "件数",
-          slot: true,
+          slot: true
         });
       } else {
         this.tableTop.splice(this.tableTop.length - 1, 1);
         this.tableTop.push({
           prop: "orderMaterialWeight",
           label: "重量",
-          slot: true,
+          slot: true
         });
       }
-    },
+    }
   },
   methods: {
     //关闭运输线路
-    handleClose(done){
-        done()
-        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"
+    handleClose(done) {
+      done();
+      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3";
     },
-    onclickMaterial(){
-        if(this.inputMaterial != null){
-          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&index=" + this.inputMaterial
-        }
-        else{
-          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"
-        }
+    onclickMaterial() {
+      if (this.inputMaterial != null) {
+        this.materialOptions.requestUrl =
+          "/api/v1/uc/selectAllMaterialName?apiId=395&index=" +
+          this.inputMaterial;
+      } else {
+        this.materialOptions.requestUrl =
+          "/api/v1/uc/selectAllMaterialName?apiId=395";
+      }
     },
-    onInputTimes(){
-      if(!isNumber(this.materialTimes)){
-        this.$message.warning('趟次请输入数字')
+    onInputTimes() {
+      if (!isNumber(this.materialTimes)) {
+        this.$message.warning("趟次请输入数字");
       }
     },
-    onblur(){
-      this.isMoreTrips = false
-      if(this.materaialTimes <= 0){
-        this.$message.warning('趟次必须大于0')
-        this.materialTimes = null
+    onblur() {
+      this.isMoreTrips = false;
+      if (this.materaialTimes <= 0) {
+        this.$message.warning("趟次必须大于0");
+        this.materialTimes = null;
       }
-      if(this.materialTimes > 1 ){
-        this.isMoreTrips = true
+      if (this.materialTimes > 1) {
+        this.isMoreTrips = true;
       }
     },
-    onInputPriority(scope){
-      if(!isNumber(scope)){
-        this.$message.warning('装卸货次序请输入数字')
+    onInputPriority(scope) {
+      if (!isNumber(scope)) {
+        this.$message.warning("装卸货次序请输入数字");
       }
     },
-    onInputWeight(scope){
-      if(!isNumber(scope)){
-        this.$message.warning('重量请输入数字')
+    onInputWeight(scope) {
+      if (!isNumber(scope)) {
+        this.$message.warning("重量请输入数字");
       }
     },
-    onInputNumber(scope){
-      if(!isNumber(scope)){
-        this.$message.warning('件数请输入数字')
+    onInputNumber(scope) {
+      if (!isNumber(scope)) {
+        this.$message.warning("件数请输入数字");
       }
     },
     //流向选择框变动后
-    flowChange(){
-      if(this.orderType == 12){
-        this.inputLine = "零星进厂"
+    flowChange() {
+      if (this.orderType == 12) {
+        this.inputLine = "零星进厂";
       }
-      if(this.orderType == 13){
-        this.inputLine = "零星出厂"
+      if (this.orderType == 13) {
+        this.inputLine = "零星出厂";
       }
-      if(this.orderType == 14){
-        this.inputLine = "零星中转"
+      if (this.orderType == 14) {
+        this.inputLine = "零星中转";
       }
-      if(this.orderType == 19){
-        this.inputLine = "退货"
+      if (this.orderType == 19) {
+        this.inputLine = "退货";
       }
     },
-    drawTable(){
-      this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395" +"&test=" + new Date()
-      this.selectionList1 = []
-      this.table = true
+    drawTable() {
+      this.materialOptions.requestUrl =
+        "/api/v1/uc/selectAllMaterialName?apiId=395" + "&test=" + new Date();
+      this.selectionList1 = [];
+      this.table = true;
     },
     //收货单位弹出层
-    handleSelectConsignee(item){   
-      this.consigneeId = item.consigneeId
-      item.consigneeCompanyName = this.consigneeCompanyName
-  
+    handleSelectConsignee(item) {
+      this.consigneeId = item.consigneeId;
+      item.consigneeCompanyName = this.consigneeCompanyName;
     },
     //以下是发货单位边输边查搜索
     querySearchConsignee(queryString, cb) {
-      this.axios.post('/api/v1/uc/getConsigneeByLike?index='+queryString).then((res)=>{
-        if(res.data.code == "200"){
-          console.log(res)
-          var restaurantsConsignee = res.data.data
-          var results = queryString ? restaurantsConsignee.filter(this.createFilterConsignee(queryString)) :restaurantsConsignee;
+      this.axios
+        .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
+        .then(res => {
+          if (res.data.code == "200") {
+            console.log(res);
+            var restaurantsConsignee = res.data.data;
+            var results = queryString
+              ? restaurantsConsignee.filter(
+                  this.createFilterConsignee(queryString)
+                )
+              : restaurantsConsignee;
             // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-      })    
-      },
+            cb(results);
+          }
+        });
+    },
     createFilterConsignee(queryString) {
-        return (restaurantsConsignee) => {
-          return (restaurantsConsignee.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
-      //以上是返回单位边输边查搜索
-     //发货单位弹出层
-    handleSelectSupplier(item){
-      this.supplierId = item.supplierId
-      item.supplierName = this.supplierName
+      return restaurantsConsignee => {
+        return (
+          restaurantsConsignee.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
+    //以上是返回单位边输边查搜索
+    //发货单位弹出层
+    handleSelectSupplier(item) {
+      this.supplierId = item.supplierId;
+      item.supplierName = this.supplierName;
     },
     //以下是发货单位边输边查搜索
     querySearchSupplier(queryString, cb) {
-        this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+this.stateSupplier).then((res)=>{
-        if(res.data.code == "200"){    
-          var restaurantsSupplier = res.data.data
-          var results = queryString ? restaurantsSupplier.filter(this.createFilterSupplier(queryString)) :restaurantsSupplier;
-          // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-      })  
-      },
+      this.axios
+        .post("/api/v1/uc/getSupplierMesByLike?index=" + this.stateSupplier)
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurantsSupplier = res.data.data;
+            var results = queryString
+              ? restaurantsSupplier.filter(
+                  this.createFilterSupplier(queryString)
+                )
+              : restaurantsSupplier;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
     createFilterSupplier(queryString) {
-        return (restaurantsSupplier) => {
-          return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
+      return restaurantsSupplier => {
+        return (
+          restaurantsSupplier.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     //承运商弹出层
-    handleSelectCarrier(item){    
-      this.carrierId = item.carrierId
-      item.carrierName = this.stateCarrier
+    handleSelectCarrier(item) {
+      this.carrierId = item.carrierId;
+      item.carrierName = this.stateCarrier;
     },
     //以下是承运商边输边查搜索
     querySearchCarrier(queryString, cb) {
-        this.axios.post('/api/v1/uc/getCarrierMesByLike?index='+queryString).then((res)=>{
-        if(res.data.code == "200"){
-          var restaurantsCarrier = res.data.data
-          console.log(restaurantsCarrier,"restaurantsCarrier");
-          var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
-           // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-        })     
-      },
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurantsCarrier = res.data.data;
+            console.log(restaurantsCarrier, "restaurantsCarrier");
+            var results = queryString
+              ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
+              : restaurantsCarrier;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
     createFilterCarrier(queryString) {
-        return (restaurantsCarrier)  =>  {
-          return (restaurantsCarrier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
+      return restaurantsCarrier => {
+        return (
+          restaurantsCarrier.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     //以上是承运商边输边查搜索
     //删除行
     deleteRow(index, rows) {
@@ -540,36 +562,36 @@ export default {
     },
     // 返回主界面
     makeSure1() {
-        var arr = []
-        for (let i = 0; i < this.newsArr.length; i++) {
-        if(arr.indexOf(this.newsArr[i]) === -1){
-            arr.push(this.newsArr[i]);
+      var arr = [];
+      for (let i = 0; i < this.newsArr.length; i++) {
+        if (arr.indexOf(this.newsArr[i]) === -1) {
+          arr.push(this.newsArr[i]);
         }
-        }
-        arr.forEach( (e) => {
-          let addmap = {
-            materialSpecification:e.materialSpecification,
-            materialName:e.materialName,
-            materialCode:e.materialCode,
-            materialId:e.materialId,
-            materialPriority:1
-          }
-          this.tableData.push(addmap)
-        })
-        this.newsArr = []
-        this.table = false
+      }
+      arr.forEach(e => {
+        let addmap = {
+          materialSpecification: e.materialSpecification,
+          materialName: e.materialName,
+          materialCode: e.materialCode,
+          materialId: e.materialId,
+          materialPriority: 1
+        };
+        this.tableData.push(addmap);
+      });
+      this.newsArr = [];
+      this.table = false;
     },
-      // 返回选中的物资信息
+    // 返回选中的物资信息
     selectionChange(selection) {
-      console.log(selection)
-      this.selectionList1 = []
-      this.selectionList1 = selection
-      this.newsArr = []
+      console.log(selection);
+      this.selectionList1 = [];
+      this.selectionList1 = selection;
+      this.newsArr = [];
       for (let i = 0; i < this.selectionList1.length; i++) {
-        if(this.newsArr.indexOf(this.selectionList1[i]) === -1){
-        this.newsArr.push(this.selectionList1[i]);
-        }
+        if (this.newsArr.indexOf(this.selectionList1[i]) === -1) {
+          this.newsArr.push(this.selectionList1[i]);
         }
+      }
     },
     onclick(a) {
       if (a == 5) {
@@ -579,7 +601,11 @@ export default {
     },
     ondrawer(num) {
       this.line.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" + "&t=" + new Date() + "&con=" + this.inputLine;
+        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" +
+        "&t=" +
+        new Date() +
+        "&con=" +
+        this.inputLine;
       this.drawer = true;
       this.a = num;
     },
@@ -588,139 +614,143 @@ export default {
       this.$router.push("/oldSporadicAppoint");
     },
     currentRadioChange5(selection) {
-      if(selection.lineName == null &&selection.lineDesk == null){
-          this.lineName = ''
-      }else{
-          this.lineName = selection.lineName+'  '+selection.lineDesk 
-          this.lineId = selection.lineId;
-      }    
+      if (selection.lineName == null && selection.lineDesk == null) {
+        this.lineName = "";
+      } else {
+        this.lineName = selection.lineName + "  " + selection.lineDesk;
+        this.lineId = selection.lineId;
+      }
     },
     // 确认
     makeSure() {
-        if(this.isMoreTrips == false){
-          this.materialTimes = 1
-        }
-        if(Number(this.materialTimes) != 0){
-          this.isMoreTrips = true
-        }
-        this.disabled = true
-        if(this.supplierId==null||this.lineId==null||this.consigneeId==null||this.carrierId==null){
-          this.disabled = false
-          this.$message.warning("存在值未填写")
-          return
-        }else if(this.tableData.length == 0){
-          this.disabled = false
-          this.$message.warning("请点击浏览勾选物资")
-          return
-        }
-        var i = 0;
-        var j = 0;
-        this.tableData.forEach((e) => {
-          if(e.materialPriority == null){
-            i++
-          }else if(e.orderMaterialWeight == null){            
-            j++
-          }            
-        })
-        if(i != 0){
-           this.$message.warning("装卸货优先级未填写")
-           this.disabled = false
-           return
-        }else if(j != 0){
-           this.$message.warning("物资重量未填写")
-           this.disabled = false
-           return
+      if (this.isMoreTrips == false) {
+        this.materialTimes = 1;
+      }
+      if (Number(this.materialTimes) != 0) {
+        this.isMoreTrips = true;
+      }
+      this.disabled = true;
+      if (
+        this.supplierId == null ||
+        this.lineId == null ||
+        this.consigneeId == null ||
+        this.carrierId == null
+      ) {
+        this.disabled = false;
+        this.$message.warning("存在值未填写");
+        return;
+      } else if (this.tableData.length == 0) {
+        this.disabled = false;
+        this.$message.warning("请点击浏览勾选物资");
+        return;
+      }
+      var i = 0;
+      var j = 0;
+      this.tableData.forEach(e => {
+        if (e.materialPriority == null) {
+          i++;
+        } else if (e.orderMaterialWeight == null) {
+          j++;
         }
-        let amsOrder = {
-          supplierId:this.supplierId,
-          lineId:this.lineId,
-          carrierId: this.carrierId,
-          orderType:this.orderType,
-          receiveId: this.consigneeId,
-          userId:getCookie("orgCode"),
-          orderTime:this.materialTimes,
-          mapList: this.tableData,
-          isMoreTrips:Number(this.isMoreTrips)
-          
-        };
-        console.log(amsOrder)
-        debugger
-        this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
-          if (res.data.code == "200") {
-            this.onClickCancel()
-            this.disabled = false
-          }else{
-            this.disabled = false
-          }
-        });
+      });
+      if (i != 0) {
+        this.$message.warning("装卸货优先级未填写");
+        this.disabled = false;
+        return;
+      } else if (j != 0) {
+        this.$message.warning("物资重量未填写");
+        this.disabled = false;
+        return;
       }
-    },
+      let amsOrder = {
+        supplierId: this.supplierId,
+        lineId: this.lineId,
+        carrierId: this.carrierId,
+        orderType: this.orderType,
+        receiveId: this.consigneeId,
+        userId: getCookie("orgCode"),
+        orderTime: this.materialTimes,
+        mapList: this.tableData,
+        isMoreTrips: Number(this.isMoreTrips)
+      };
+      console.log(amsOrder);
+      debugger;
+      this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then(res => {
+        if (res.data.code == "200") {
+          this.onClickCancel();
+          this.disabled = false;
+        } else {
+          this.disabled = false;
+        }
+      });
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>
-.addSporadic{
+.addSporadic {
   .contractDetails {
-  width: 100%;
-}
-.drawSty{
-  .el-input{
-    width: 240px;
+    width: 100%;
   }
-}
-.lineId {
-  display: flex;
-  justify-content: center;
-  .text {
-    display: inline-block;
-    width: 190px;
-    text-align: right;
-    font-size: 16px;
+  .drawSty {
+    .el-input {
+      width: 240px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .lineId {
+    display: flex;
+    justify-content: center;
+    .text {
+      display: inline-block;
+      width: 190px;
+      text-align: right;
+      font-size: 16px;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
+    .span {
+      display: inline-block;
+      width: 70px;
+      height: 1px;
+    }
   }
-  .span {
-    display: inline-block;
-    width: 70px;
-    height: 1px;
+  .swtichTop {
+    display: flex;
+    height: 40px;
+    align-content: center;
+    justify-content: center;
+    padding-right: 20px;
+    .titile {
+      color: red;
+      font-size: 14px;
+    }
+    .switch {
+      margin-right: -60px;
+    }
   }
-}
-.swtichTop{
-  display: flex;
-  height: 40px;
-  align-content: center;
-  justify-content: center;
-  padding-right:20px ;
-  .titile{
-    color: red;
-    font-size: 14px;
-  }
-  .switch{
-    margin-right: -60px
+  .form-box {
+    display: inline-block !important;
+    margin-left: 488px;
+    .el-input {
+      width: 320px;
+    }
+    .el-select {
+      width: 320px;
+    }
+    .el-autocomplete {
+      width: 320px;
+    }
+    .el-form {
+      padding: 10px;
+    }
+    .truckBtn {
+      width: 320px;
+    }
   }
-}
-.form-box {
-  display: inline-block !important;
-  margin-left: 488px;
-  .el-input {
-    width: 320px;
+  .button-box {
+    margin-left: 45%;
   }
-  .el-select{
-    width: 320px;
-  }
-  .el-autocomplete{
-    width: 320px;
-  }
-  .el-form {
-    padding: 10px;
-  }
-  .truckBtn{
-    width: 320px;
-  }
-}
-.button-box {
-  margin-left: 45% ;
-}
 }
-</style>
+</style>

+ 5 - 0
src/views/TMS/components/bmsship/addMoistureDetection.vue

@@ -73,12 +73,14 @@
         <dilTable
           v-bind.sync="batchOption"
           @radio-change="batchChange"
+          :isKuang="isKuang"
         ></dilTable>
       </div>
       <div v-show="a == 6">
         <dilTable
           v-bind.sync="contractPriceOption"
           @radio-change="priceChange"
+          :isKuang="isKuang"
         ></dilTable>
       </div>
     </el-drawer>
@@ -101,6 +103,8 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isKuang: false,
+
       spell: false,
       noSpell: "false",
       value1: false,
@@ -154,6 +158,7 @@ export default {
     //右侧选中框
     ondrawer(num) {
       this.drawer = true;
+      this.isKuang = true;
       this.a = num;
       if (num == 5) {
         this.batchOption.requestUrl =

+ 448 - 48
src/views/TMS/components/bmsship/detailsStatement.vue

@@ -1,71 +1,471 @@
+<!-- 计费账单 -->
 <template>
-  <!-- 船运计费详单页面 -->
-  <div class="purchaseOrder">
+  <div id="detailsStatement">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" @click="shipclick">
-        新增水运费账单
-      </el-button>
-      <el-button type="primary" @click="waterclick">
-        新增水分检测费账单
-      </el-button>
-      <el-button type="primary" @click="click()">
-        新增途损费账单
-      </el-button>
+      <el-form inline="true">
+        <el-form-item>
+          <el-input v-model="shipName" placeholder="请输入船名"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="demonstration">结算日期</span>
+          <el-date-picker v-model="value1" type="date" placeholder="选择日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="onClick">查询</el-button>
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计已预开票吨位</span>
+          <el-input
+            v-model="totalWillTonageedValue"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计已预开金额</span>
+          <el-input
+            v-model="totalWillTonageedMoney"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计本次实际开票吨位</span>
+          <el-input
+            v-model="totalActuallyTonageedValue"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计本月实际开票金额</span>
+          <el-input
+            v-model="totalActuallyTonageedMoney"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+      </el-form>
     </div>
-    <dilTable v-bind.sync="option" >
-      <el-table-column fixed="right" label="操作" width="100">
-        <template slot-scope="scope">
-          <el-button @click="btnclick(scope.row)" type="text" size="small"
-            >详情</el-button
+    <div class="main">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane label="未结算" name="first">
+          <el-table
+            :data="tableData"
+            ref="tableRef"
+            border
+            stripe
+            style="width: 100%; margin-top: 20px"
+            max-height="800px"
+            :row-style="{ height: '30px' }"
+            :cell-style="{ fontWeight: '700' }"
+            :summary-method="getSummaries"
+            show-summary
+            class="table"
           >
-        </template>
-      </el-table-column>
-    </dilTable>
+            <el-table-column
+              prop="index"
+              width="50"
+              label="序号"
+              align="center"
+              :resizable="false"
+            >
+              <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+            </el-table-column>
+            <el-table-column
+              prop="materialTypeName"
+              label="品种"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="shipName"
+              label="船名"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="portName"
+              label="放货港口"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="carrierName"
+              label="承运单位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="leavePortDate"
+              label="离港日期"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadShipTon"
+              label="装船吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadShipPer"
+              label="装船比例"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="billTon"
+              label="结算吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="enFatoryTon"
+              label="到厂湿吨"
+              width="200px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.enFatoryTon"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="contractPrice"
+              label="合同单价"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="statementAmount"
+              label="金额(元)"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="willTonanged"
+              label="已预开票吨位"
+              width="200px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.willTonanged"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="willMoneyed"
+              label="已预开票金额"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMoney"
+              label="本次实际开票吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMoney"
+              label="本次实际开票吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMonthMoney"
+              label="本月实际开票金额"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+        <el-tab-pane label="已结算" name="second">
+          <el-table
+            :data="tableData1"
+            ref="tableRef1"
+            border
+            stripe
+            style="width: 100%; margin-top: 20px"
+            max-height="800px"
+            :row-style="{ height: '30px' }"
+            :cell-style="{ fontWeight: '700' }"
+            :summary-method="getSummaries"
+            show-summary
+            class="table"
+          >
+            <el-table-column
+              prop="index"
+              width="50"
+              label="序号"
+              align="center"
+              :resizable="false"
+            >
+              <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+            </el-table-column>
+            <el-table-column
+              prop="materialTypeName"
+              label="品种"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="shipName"
+              label="船名"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="portName"
+              label="放货港口"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="carrierName"
+              label="承运单位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="leavePortDate"
+              label="离港日期"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadShipTon"
+              label="装船吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadShipPer"
+              label="装船比例"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="billTon"
+              label="结算吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="enFatoryTon"
+              label="到厂湿吨"
+              width="200px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.enFatoryTon"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="contractPrice"
+              label="合同单价"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="statementAmount"
+              label="金额(元)"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="willTonanged"
+              label="已预开票吨位"
+              width="200px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.willTonanged"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="willMoneyed"
+              label="已预开票金额"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMoney"
+              label="本次实际开票吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMoney"
+              label="本次实际开票吨位"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMonthMoney"
+              label="本月实际开票金额"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
-
 <script>
 export default {
-  name: "purchaseOrder",
   data() {
     return {
-      input:"",
-      option: {
-        // 表格请求数据的地址
-        requestUrl: "/api/v1/bms/getStatementList?apiId=113",
-      },
+      totalWillTonageedValue: 0,
+      totalWillTonageedMoney: 0,
+      totalActuallyTonageedMoney: 0,
+      totalActuallyTonageedValue: 0,
+      shipName: null,
+      tableData: null,
+      spanArr: [],
+      mergeList: [
+        "index",
+        "carrierName",
+        "portName",
+        "shipName",
+        "materialTypeName",
+        "enFatoryTon"
+      ],
+      activeName: "first",
+      tableTitle: "结算账单报表"
     };
   },
   methods: {
-    onclick() {
-      this.option.requestUrl = "/api/v1/bms/getStatementList?apiId=113&con="+this.input;
-    },
-    btnclick(row) {
-      this.$router.push("/statementDetailsOrder/" + row.batchId + "?statementId=" + row.statementId);
+    //根据表格据汇总顶部展示
+    getTotalArr(data) {
+      this.totalWillTonageedValue = data.reduce((pre, item) => {
+        return pre + item.willTonanged;
+      }, 0);
+      this.totalWillTonageedMoney = data.reduce((pre, item) => {
+        return pre + item.willMoneyed;
+      });
+      this.totalActuallyTonageedValue = data.reduce((pre, item) => {
+        return pre + item.actuallyMoney;
+      });
+      this.totalActuallyTonageedMoney = data.reduce((pre, item) => {
+        return pre + item.actuallyMonthMoney;
+      });
     },
-    shipclick() {
-      this.$router.push("/uncomplateDetails");
+    onClick() {},
+    //获取未结算账单数据
+    getNoDetailsStament() {},
+    getDetailsStamented() {},
+    //合并表格数据
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          data[i].group = i;
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].saleOrderId === data[i - 1].saleOrderId) {
+            this.spanArr[this.pos] += 1;
+            data[i].group = data[i - 1].group;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+            data[i].group = data[i - 1].group + 1;
+          }
+        }
+      }
     },
-    waterclick() {
-      this.$router.push("/uncomplateWater");
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.includes(column.property)) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
     },
-    click() {
-      this.$router.push("/toBeStatement");
+    //导出账单数据
+    exportAllReportToExcel() {
+      console.log(this.$refs.tableRef);
+      const loading = this.$loading({
+        lock: true,
+        text: "正在导出Excel",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      var title = this.tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      let data = [];
+      if (this.activeName == "first") {
+        data = this.$refs.tableRef.$children;
+      } else {
+        data = this.$refs.tableRef1.$children;
+      }
+      data.forEach(item => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label);
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop);
+          }
+        }
+      });
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+      loading.close();
     }
   },
+  mounted() {
+    this.getNoDetailsStament();
+    this.getDetailsStamented();
+  }
 };
 </script>
-<style lang='scss' scoped>
-.purchaseOrder {
+<style lang="scss" scoped>
+#detailsStatement {
   .top {
-    padding: 1.25rem 1.875rem;
-    .el-input {
-      width: 250px;
-    }
+    margin-left: 10px;
+    margin-top: 30px;
   }
 }
-</style>
+</style>

+ 132 - 0
src/views/TMS/components/bmsship/threeSectionFeeDetails.vue

@@ -0,0 +1,132 @@
+<template>
+  <!-- 装船作业页面 -->
+  <div class="shipTransport">
+    <div class="top">
+      <el-input
+        class="el-input"
+        placeholder="请输入内容"
+        v-model="input"
+        clearable
+      >
+      </el-input>
+<!-- 
+       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
+
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="refresh()">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option">
+      <el-table-column fixed="right" label="操作" align="center" width="100">
+        <template slot-scope="scope">
+          <el-button @click="click(scope.row.resultId)" type="text" size="small"
+            >编辑</el-button
+          >
+          <!-- <el-button
+            type="text"
+            size="small"
+            @click="deleteclick(scope.row.resultId)"
+            >删除</el-button> -->
+        </template>
+      </el-table-column>
+    </dilTable>
+  </div>
+</template>
+
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      startTime: null,
+      endTime: null,
+      input: "",
+       startTime: null,
+      endTime: null,
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/tms/getLoadShipList?apiId=63",
+      },
+    };
+  },
+  mounted() {},
+  methods: {
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input;
+      }
+    },
+    click(resultId) {
+      console.log("aaa" + resultId);
+      this.$router.push("/updateThreeSectionFeeDetails/" + resultId);
+    },
+    addclick() {
+      this.$router.push("/addLoadShip/");
+    },
+    deleteclick(scope) {
+      let resultId = scope;
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios.post("/api/v1/tms/deleteLoadShip/" + resultId).then(() => {
+            this.$message({
+              type: "success",
+              message: "删除成功!",
+            });
+            this.option.requestUrl =
+              "/api/v1/tms/getLoadShipList?apiId=63&i=" + new Date();
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消删除!",
+          });
+        });
+    },
+    refresh() {
+      this.$router.go(0);
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.shipTransport {
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 40rpx;
+    }
+    .btn {
+      width: 5.5%;
+      margin-left: 0.25rem;
+    }
+  }
+}
+</style>

+ 283 - 0
src/views/TMS/components/bmsship/updateThreeSectionFeeDetails.vue

@@ -0,0 +1,283 @@
+<template>
+  <!-- 修改位置作业 -->
+    <div class="shipTransport">
+    <page-title>返回</page-title>
+    <div class="form">
+      <div class="form_box">
+        <dil-form :formId="136" v-model="form1" ref="from1"></dil-form>
+        <el-form :inline="true">
+          <el-form-item label="水运单价">
+            <el-input type="number" placeholder="水运单价" v-model="form1.waterUnitPrice" disabled
+            ></el-input>
+          </el-form-item> 
+          <el-form-item label="是否拼装" >
+            <el-radio v-model="form1.isNeedAssemble" label="否" style="margin-left :10px">否</el-radio>
+            <el-radio v-model="form1.isNeedAssemble" label="是">是</el-radio>
+          </el-form-item>
+          <el-form-item label="水分检测费">
+             <el-input type="number" placeholder="水分检测费" v-model="form1.resultInspectionFees"></el-input>
+          </el-form-item>
+          <el-form-item label="计划日期">
+            <el-date-picker
+            v-model="form1.planDate"
+            type="datetime"
+            placeholder="计划日期">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="预计放货日期">
+            <el-date-picker
+            v-model="form1.planDeliveryDate"
+            type="datetime"
+            placeholder="预计放货日期">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="含水率">
+             <el-input type="number" placeholder="含水率" v-model="form1.resultMoistureContent"
+             @change="pipeiContarct"></el-input>
+          </el-form-item>
+          <el-form-item label="合同水分值">
+             <el-input
+             type="number"
+              placeholder=""
+              v-model="form1.contractMoistureValue"
+              :disabled="true"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="水分吨位">
+            <el-input
+            type="number"
+              placeholder=""
+              v-model="form1.moistureTonnage"
+              :disabled="true"
+            ></el-input>
+          </el-form-item>
+        </el-form> 
+      </div> 
+    </div>
+    <!-- 确定和取消 -->
+    <div class="button_box">
+      <el-button type="primary" @click="makeSure">确认</el-button>
+      <el-button @click="onClickCancel">返回</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+ data(){
+     return {
+      form1: {},
+      waterQualiyResultId:null,
+      outWharyResultId:null,
+      unitPrices:[]
+  }
+ },
+  mounted() {
+    this.information();
+  },
+  watch:{
+    "form1.resultOutPortTime":{
+      handler(newVal,oldVal){
+        this.findUnitPrice();
+      },
+      deep: true,
+      immediate: true
+    },
+    "form1.isNeedAssemble":{
+      handler(newVal,oldVal){
+        this.isNeedAssemble();
+      },
+      deep: true,
+      immediate: true
+    }
+  },
+  methods: {
+    getUnitPrice(){
+      this.axios
+            .post("/api/v1/rms/selectbmsshipContractPriceList?apiId=500")
+            .then((res) => {
+                this.unitPrices=res.data.data.list;
+        }).then(()=>{
+            this.findUnitPrice();
+        });
+    },
+    findUnitPrice(){
+        console.log("form1",this.form1);
+      if(this.form1.sendPortId && this.form1.resultOutPortTime){
+          let contract=this.unitPrices.find(item=>
+          item.portId==this.form1.sendPortId
+          && sjTime(this.form1.resultOutPortTime)>=sjTime(item.startTime)
+          && sjTime(this.form1.resultOutPortTime)<=sjTime(item.endTime));
+          if(contract){
+             this.form1.waterUnitPrice=contract.unitPrice;
+             this.form1.unitPriceId=contract.resultId;
+             console.log("contract:",contract);
+             this.$forceUpdate();
+          }
+      }else{
+        console.log("null");
+      }
+    },
+    isNeedAssemble(){
+        if(this.form1.isNeedAssemble){
+            if(this.form1.isNeedAssemble=="是" && this.form1.sendPortId!=this.form1.startPortId){
+                this.form1.resultInspectionFees=4000;
+            }else{
+                this.form1.resultInspectionFees=2000;
+            }
+        }else{
+            console.log("是否拼装为空");
+        }
+    },
+    information() {
+      //编辑位置作业
+      this.axios
+        .post("/api/v1/tms/getLoadShip/" + this.$route.params.resultId)
+        .then((res) => {
+          res.data.data.forEach((e) => {
+            this.form1 = e;
+            this.waterQualiyResultId=e.waterQualiyResultId;
+            this.outWharyResultId=e.outWharyResultId;
+            console.log("form1:",e);
+          });
+        }).then(()=>{
+            this.getUnitPrice();
+        });
+    },
+    handleCheckedCitiesChange(value) {
+      console.log(value);
+    },
+    // 返回
+    onClickCancel() {
+      this.$router.go(-1);
+    },
+    currentRadioChange(row) {
+      this.aaaa = row;
+    },
+    pipeiContarct() {
+      if (
+        this.form1.resultMoistureContent >= 0
+      ) {
+        let map = {
+          batchInfactoryId: this.form1.batchId,
+          resultMoistureContent: this.form1.resultMoistureContent,
+          resultActualInstallations:this.form1.resultActualInstallations,
+        };
+        this.axios
+          .post("/api/v1/tms/getMoistureAndInstallations", map)
+          .then(res => {
+            if (res.data.code == 200) {
+              console.log("res:",res);
+              this.form1.contractMoistureValue = res.data.data.purchaseContractMoisture;
+              this.form1.moistureTonnage = res.data.data.resultWaterTonnage;
+              this.$forceUpdate();
+            } else {
+              this.$message.warning(res.data.data);
+            }
+          });
+      }
+    },
+    // 确认
+    makeSure() {
+      let mapVal = {
+        resultId: this.$route.params.resultId,
+        waterQualiyResultId:this.waterQualiyResultId,
+        resultActualInstallations: this.form1.resultActualInstallations,
+        outWharyResultId:this.outWharyResultId,
+        // rwarehouseMaterialId: this.form1.rwarehouseMaterialId,
+        resultArrivalPortTime: sjTime(
+          this.form1.resultArrivalPortTime
+        ),
+        resultOutPortTime: sjTime(
+          this.form1.resultOutPortTime
+        ),
+        resultLoadShipDate: sjTime(
+          this.form1.resultLoadShipDate
+        ),
+        resultIsClear: this.form1.resultIsClear,
+        resultOutPortName:this.form1.resultOutPortName,
+        planDate:sjTime(this.form1.planDate),
+        planDeliveryDate:sjTime(this.form1.planDeliveryDate),
+        isNeedAssemble:this.form1.isNeedAssemble,
+        resultInspectionFees:this.form1.resultInspectionFees,
+        moistureTonnage:this.form1.moistureTonnage,
+        waterUnitPrice:this.form1.waterUnitPrice,
+        unitPriceId:this.form1.unitPriceId,
+        resultHeavyWeight:this.form1.resultHeavyWeight,
+        resultMoistureContent:this.form1.resultMoistureContent,
+        userId:getCookie("userId")
+      };
+              //判断放货数量是否为数字
+       function isNumber() {
+        var value = mapVal.resultActualInstallations;
+        //验证是否为数字
+        var patrn = /^(-)?\d+(\.\d+)?$/;
+        if (patrn.exec(value) == null || value == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+      var val=this.value;
+    
+    console.log("map:",mapVal);
+      this.axios
+        .post(
+          "/api/v1/tms/updateThreeSectionDetails",
+          mapVal
+        )
+        .then((res) => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "修改成功!",
+            });
+            // this.$refs.table.refreshData();
+            this.$router.go(-1);
+          } else {
+            this.$message.error("修改失败!");
+          }
+          this.$refs['table'].resetField();
+        });
+    },
+  },
+};
+</script>
+<style lang="scss">
+.shipTransport{
+  .form{
+    display: flex;
+    .form_box{
+      width: 320px;
+      margin-left: 35%;
+      margin-top: 30px;
+      margin-right: 20px;
+      .el-form{
+        .preview-group{
+          .el-form-item{
+            .el-form-item__label{
+              display: inline-block;
+              width: 70px !important;
+            }
+            .el-form-item__content{
+              .el-select{
+                width: 250px;
+              }
+              .el-input{
+                width: 250px;
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+  .button_box{
+    margin-left: 45%;
+  }
+}
+</style>

+ 32 - 7
src/views/TMS/components/domesticMine/wagonLoadAdd.vue

@@ -154,7 +154,7 @@
       :visible.sync="drawer"
       :direction="direction"
       :before-close="handleClose"
-      size="50%"
+      size="80%"
     >
     <el-input
         placeholder="发货单位"
@@ -413,7 +413,7 @@ export default {
         list: selection,
         userId: getCookie("userId")
       };
-      console.log(data);
+      console.log("data:",data);
       //请求添加
       this.axios.post("/api/v1/tms/addDomesticLoadResult", data).then(res => {
         console.log(res);
@@ -616,9 +616,17 @@ export default {
           }
           return;
         }
+        let groupNo=1;
+        let isLoading=true;
         //读取表格
-        for (let i = 1; i <= rows.length + 1; i++) {
+        for (let i = index+1; i <= rows.length + 1; i++) {
           let row = workbook.Sheets[workbook.SheetNames[0]]["A" + i];//先取A列,如果是数字则取该行数据
+          if(row && typeof row.v == "number" && isLoading==false){
+            isLoading=true;
+            groupNo++;
+          }else if(!row || typeof row.v != "number" && isLoading==true){
+            isLoading=false;
+          }
           if (
             row && typeof row.v == "number" &&
             workbook.Sheets[workbook.SheetNames[0]]["B" + i] != "undefined" &&
@@ -645,7 +653,8 @@ export default {
               productName: workbook.Sheets[workbook.SheetNames[0]]["G" + i].v,
               wagonNo: workbook.Sheets[workbook.SheetNames[0]]["J" + i].v,
               weight: workbook.Sheets[workbook.SheetNames[0]]["I" + i].v,
-              mineral: workbook.Sheets[workbook.SheetNames[0]]["H" + i].v
+              mineral: workbook.Sheets[workbook.SheetNames[0]]["H" + i].v,
+              groupNo:groupNo
             };
             if ((tableRow.wagonNo + "").length != 7) {
               that.$message({
@@ -657,7 +666,7 @@ export default {
             excelData.push(tableRow);
           }
         }
-        console.log(excelData);
+        console.log("excelData",excelData);
         let map={
           list:excelData
         }
@@ -665,15 +674,31 @@ export default {
         that.axios.post("/api/v1/tms/importDomesticLoadResult",map).then(res => {
           console.log(res);
           if (res.data.code == "200") {
+            //赋值
             that.tableData=res.data.data;
+            //查询匹配失败记录数
+            let length=that.tableData.length;
+            that.tableData.forEach((item)=>{
+              if(item.purchaseOrderId)
+                length--;
+            });
+            if(length<=0){
+              that.$message({
+                message: "导入"+that.tableData.length+"条数据,全部匹配成功!",
+                type: "success",
+              });
+            }else if(length>0){
+               that.$confirm("导入"+that.tableData.length+"条数据,"+length+"条数据匹配失败!请手动配单!")
+                .then(_ => {
+                  done();
+                });
+            }
           } else {
             that.$message({
               type: "error",
               message: res.data.data
             });
           }
-        }).then(()=>{
-          // that.isLoading = false;
         });
       };
       reader.readAsBinaryString(file.raw); //以二进制方式读取

+ 2 - 2
src/views/TMS/components/domesticMine/wagonLoadbu.vue

@@ -131,7 +131,7 @@ export default {
         requestUrl: "/api/v1/tms/findPurchaseOrderList?apiId=81",
         // 控制选择单列
         selectionType: "radio",
-        pageSize:5,
+        pageSize:10,
       },
       option: {
         // 表格请求数据的地址
@@ -188,7 +188,7 @@ export default {
     };
   },
   mounted(){
-    this.searchMaterialName('');
+    // this.searchMaterialName('');
   },
   methods: {
     //确定

文件差異過大導致無法顯示
+ 602 - 287
src/views/TMS/components/importedEmergency/addWagonLoadEmergency.vue


+ 3 - 0
src/views/TMS/components/importedEmergency/wagonLoadEmergency.vue

@@ -93,6 +93,9 @@ export default {
         this.$router.push("/editWagonLoadEmergency/" + resultId);
       }
     },
+    click(resultId) {
+      this.$router.push("/editWagonLoadEmergency/" + resultId);
+    },
     deleteclick(resultId) {
       this.$confirm("是否删除", "提示", {
         confirmButtonText: "确定",

+ 21 - 2
src/views/TMS/components/importedIngredients/truckEnfactoryFuResult.vue

@@ -11,7 +11,7 @@
         <i class="el-icon-search"></i>查询
       </el-button>
     </div>
-    <dilTable v-bind.sync="option">
+    <dilTable v-bind.sync="option" id="TMS_trunkEnfactoryFuResult_faTable" individual-panel>
       
     </dilTable>
   </div>
@@ -23,6 +23,23 @@ export default {
   name: "homeworkPath",
   data() {
     return {
+      tableData: [{
+            date: '2016-05-02',
+            name: '王小虎',
+            address: '上海市普陀区金沙江路 1518 弄'
+          }, {
+            date: '2016-05-04',
+            name: '王小虎',
+            address: '上海市普陀区金沙江路 1517 弄'
+          }, {
+            date: '2016-05-01',
+            name: '王小虎',
+            address: '上海市普陀区金沙江路 1519 弄'
+          }, {
+            date: '2016-05-03',
+            name: '王小虎',
+            address: '上海市普陀区金沙江路 1516 弄'
+          }],
       restaurants: [],
       startTime: null,
       endTime: null,
@@ -33,7 +50,9 @@ export default {
       },
     };
   },
-
+  mounted(){
+    console.log('this', this);
+  },
   methods: {
     onclick() {
       let startTime = null;

+ 52 - 18
src/views/TMS/components/importedMine/addWagonLoad.vue

@@ -16,21 +16,22 @@
       <span >当前导入数量:{{tableData.length}}</span>
     </div> -->
     <div class="tempTable">
-      <div class="search" style="display:flex">
+      <div class="search" style="display:flex;margin: 10px;">
         <el-input
           placeholder="请输入"
-          v-model="input"
-          style="margin: 10px; width:20%"
+         value="请先导入查询,再勾选,如果查询失败,可能是港口没有出库或者已经装车"
+          style="margin: 10px; width:38%"
           clearable
+          disabled
         ></el-input>
-        <el-button
+        <!-- <el-button
           type="primary"
           class="btn"
           @click="searchLoadTemp()"
           style="margin: 10px;"
         >
           <i class="el-icon-search"></i>查询
-        </el-button>
+        </el-button> -->
          <el-upload style="margin: 10px;"
           class="upload-excel"
           action=""
@@ -40,16 +41,18 @@
           :auto-upload="false">
           <el-button  type="primary">
             <i class="el-icon-search"></i>导入查询</el-button>
+            <span >查询结果数量:{{tableDataReal.length}}</span>
       </el-upload>
       </div>
       <!-- 临时表已导入配单的车皮 -->
       <div class="tempTable" style="height:300px;overflow:scroll;float:left;margin-left:5px">
         <el-table
           ref="tempTable"
+          empty-text="请先查询,再查看数据"
           highlight-current-row
           @selection-change="handleSelectionChange"
           @row-click="rowClick"
-          :data="tableData"
+          :data="tableDataReal"
           :row-style="{height:'40px'}"
           style="width: 100%;font-size: 18px"
           id="domesticTable">
@@ -223,6 +226,7 @@ export default {
       list: [],
       form1: {},
       tableData:[],
+      tableDataReal:[],
       selectionRow:[],
       input: "",
       value: undefined,
@@ -495,9 +499,17 @@ export default {
           }
           return;
         }
+        let groupNo=1;
+        let isLoading=true;
         //读取表格
-        for(let i=1;i<=rows.length+1;i++){
+        for(let i=index+1;i<=rows.length+1;i++){
           let row=workbook.Sheets[workbook.SheetNames[0]]['A'+i];
+          if(row && typeof row.v == "number" && isLoading==false){
+            isLoading=true;
+            groupNo++;
+          }else if(!row || typeof row.v != "number" && isLoading==true){
+            isLoading=false;
+          }
           if(row!='undefined' && row!=null && typeof row.v=='number' 
               && workbook.Sheets[workbook.SheetNames[0]]['B'+i]!='undefined'
             && workbook.Sheets[workbook.SheetNames[0]]['B'+i]!=null
@@ -516,13 +528,14 @@ export default {
             let tableRow={
               sendStation:workbook.Sheets[workbook.SheetNames[0]]['B'+i].v,
               arrivalStation:workbook.Sheets[workbook.SheetNames[0]]['C'+i].v,
-              sendDate:sjTime(workbook.Sheets[workbook.SheetNames[0]]['D'+i].v),
-              arrivalDate:workbook.Sheets[workbook.SheetNames[0]]['E'+i].v,
+              sendDate: that.formatDate(workbook.Sheets[workbook.SheetNames[0]]["D" + i].v),
+              arrivalDate: that.formatDate(workbook.Sheets[workbook.SheetNames[0]]["E" + i].v),
               unloadPoint:workbook.Sheets[workbook.SheetNames[0]]['F'+i].v,
               productName:workbook.Sheets[workbook.SheetNames[0]]['G'+i].v,
               wagonNo:workbook.Sheets[workbook.SheetNames[0]]['J'+i].v,
               weight:workbook.Sheets[workbook.SheetNames[0]]['I'+i].v,
               mineral:workbook.Sheets[workbook.SheetNames[0]]['H'+i].v,
+              groupNo:groupNo
             }
             if((tableRow.wagonNo+"").length!=7){
               that.$message({
@@ -543,7 +556,7 @@ export default {
           return;
         }else if(that.tableData.length<=0){
           that.$message({
-            message:"当前列表没有可用数据",
+            message:"数据库没有可用数据",
             type:"warning "
           })
           return;
@@ -553,15 +566,24 @@ export default {
         importData.forEach((row)=>{
           let temp=that.tableData.find(item=>item.wagonNo==row.wagonNo 
           && row.productName.includes(item.foreignShipName));
-          if(temp)
+          if(temp){
+            temp.sendDate=row.sendDate;
+            temp.arrivalDate=row.arrivalDate;
+            temp.groupNo=row.groupNo;
+
             tableData.push(temp);
+          }
         });
-        console.log("test",tableData);
-        that.tableData=tableData;
-        if(that.tableData.length<=0){
-           that.$message({
-            message: "查询不到相关车皮!",
-            type: "warning",
+        that.tableDataReal=tableData;
+        if(tableData.length<=0){
+          that.$confirm('查询不到相关车皮!')
+          .then(_ => {
+            done();
+          });
+        }else if(tableData.length<importData.length){
+           that.$confirm("共"+(importData.length-tableData.length)+"条车皮查询失败!")
+          .then(_ => {
+            done();
           });
         }else{
           that.$message({
@@ -587,8 +609,9 @@ export default {
     },
     //查询临时表
     searchLoadTemp(){
+      this.tableDataReal=[];
       this.axios.post('/api/v1/tms/getResultType?apiId=58&resultType=1&con='+this.input).then((res)=>{
-        console.log(res);
+        console.log("temp:",res.data.data);
         if(res.data.code == "200"){
           this.tableData=res.data.data;
         }else {
@@ -630,6 +653,17 @@ export default {
       this.selectionRow = rows //保存已选择行
       console.log(this.selectionRow);
     },
+    formatDate(numb, format) {
+      const time = new Date((numb - 1) * 24 * 3600000 + 1)
+      time.setYear(time.getFullYear() - 70)
+      const year = time.getFullYear() + ''
+      const month = time.getMonth() + 1 + ''
+      const date = time.getDate() + ''
+      if (format && format.length === 1) {
+        return year + format + month + format + date
+      }
+      return year + '年' + (month < 10 ? '0' + month : month)+ '月' + (date < 10 ? '0' + date : date) + '日'
+    },
   },
 };
 </script>

+ 1 - 1
src/views/TMS/components/importedMine/outBoundWagon.vue

@@ -17,7 +17,7 @@
               @click="click(scope.row.resultId)"
               type="text"
               size="small"
-              :disabled="!isEdit"
+              :disabled="scope.row.isEdit!=1"
               >修改</el-button
             >
             <!-- <el-button

+ 45 - 15
src/views/TMS/components/importedShip/addLoadShip.vue

@@ -12,11 +12,9 @@
     <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
     </dilTable>
     <div class="form">
-      <!-- 第二部分 -->
       <div class="form_box">
         <dil-form :formId="120" v-model="form"></dil-form>
-            <el-form :inline="true">
-            <!-- 含水率 -->
+            <!-- <el-form :inline="true">
           <el-form-item>
             <label class="el-form-item__label" style="width: auto;margin: left 2px;"
               >含水率</label
@@ -25,7 +23,6 @@
           <el-form-item>
             <el-input placeholder="" v-model="resultMoistureContent"></el-input>
           </el-form-item>
-          <!-- 合同水分值 -->
           <el-form-item>
             <label class="el-form-item__label" style="width: auto"
               >合同水分值</label
@@ -38,7 +35,6 @@
               :disabled="true"
             ></el-input>
           </el-form-item>
-          <!-- 水分吨位 -->
           <el-form-item>
             <label class="el-form-item__label" style="width: auto"
               >水分吨位</label
@@ -51,11 +47,10 @@
               :disabled="true"
             ></el-input>
           </el-form-item>
-        </el-form>
+        </el-form> -->
       </div>
-      <!-- 下方内容 -->  
     </div>
-    <div class="button_box">
+    <div class="button_box_addLoadShip">
       <el-button type="primary" @click="makeSure">新增装船作业</el-button>
     </div>
   </div>
@@ -75,7 +70,9 @@ export default {
       batchInfactoryId:"",
       restaurants: [],
       state: "",
-      form: {},
+      form: {
+        waterUnitPrice:null,
+      },
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getCapacityList?apiId=138",
@@ -83,21 +80,52 @@ export default {
         selectionType: "radio",
       },
       rowMap: {},
+      unitPrices:[]
     };
   },
-  mounted() {},
+  mounted() {
+    this.getUnitPrice();
+  },
     watch: {
     resultMoistureContent() {
       this.pipeiContarct();
     },
     batchId() {
       this.pipeiContarct();
+    },
+    "form.resultOutWharyTime":{
+      handler(newVal,oldVal){
+        this.findUnitPrice();
+      },
+      deep: true,
+      immediate: true
     }
   },
   methods: {
+    getUnitPrice(){
+      this.axios
+            .post("/api/v1/rms/selectbmsshipContractPriceList?apiId=500")
+            .then((res) => {
+                this.unitPrices=res.data.data.list;
+        });
+    },
+    findUnitPrice(){
+      if(this.rowMap && this.form.resultOutWharyTime){
+          let contract=this.unitPrices.find(item=>
+          item.portId==this.rowMap.startPortId
+          && sjTime(this.form.resultOutWharyTime)>=sjTime(item.startTime)
+          && sjTime(this.form.resultOutWharyTime)<=sjTime(item.endTime));
+          if(contract){
+             this.form.waterUnitPrice=contract.unitPrice;
+             this.form.unitPriceId=contract.resultId;
+             console.log("contract:",contract);
+          }
+      }
+    },
     currentRadioChange(row) {
       this.rowMap = row;
       this.batchInfactoryId=this.rowMap.batchInfactoryId;
+      this.findUnitPrice();
     },
 
     pipeiContarct() {
@@ -139,17 +167,19 @@ export default {
         resultOutWharyName: this.form.resultOutWharyName,
         resultOutWharyTime: sjTime(this.form.resultOutWharyTime),
         resultMemo: this.form.resultMemo,
-        resultPlannedDate: sjTime(this.form.planDate),
-        expectNoticeDate: sjTime(this.form.expectNoticeDate),
+        //resultPlannedDate: sjTime(this.form.planDate),
+        //expectNoticeDate: sjTime(this.form.expectNoticeDate),
         resultEmptyHeavyWaterMeter: this.form.resultEmptyHeavyWaterMeter,
         resultMoistureContent: this.resultMoistureContent,
-        resultInspectionFees: this.form.resultInspectionFees,
+        //resultInspectionFees: this.form.resultInspectionFees,
         contractMoistureValue: this.contractMoistureValue,
         moistureTonnage: this.moistureTonnage,
         waterUnitPrice:this.form.waterUnitPrice,
-        isNeedAssemble:this.form.isNeedAssemble,
+        unitPriceId:this.form.unitPriceId,
+        //isNeedAssemble:this.form.isNeedAssemble,
         userId: getCookie("userId"),
       };
+      console.log("mapVal:",mapVal);
       //判断放货数量是否为数字
       function isNumber() {
         var value = mapVal.resultActualInstallations;
@@ -255,7 +285,7 @@ export default {
       margin-right: 1.25rem;
     }
   }
-  .button_box {
+  .button_box_addLoadShip {
     margin-left: 45%;
   }
 }

+ 3 - 3
src/views/TMS/components/importedShip/updateLoadShip.vue

@@ -73,9 +73,9 @@ export default {
         ),
         resultIsClear: this.form1.resultIsClear,
         resultOutPortName:this.form1.resultOutPortName,
-        planDate:sjTime(this.form1.planDate),
-        planDeliveryDate:sjTime(this.form1.planDeliveryDate),
-        resultHeavyWeight:this.form1.resultHeavyWeight,
+        //planDate:sjTime(this.form1.planDate),
+        //planDeliveryDate:sjTime(this.form1.planDeliveryDate),
+        //resultHeavyWeight:this.form1.resultHeavyWeight,
         userId:getCookie("userId"),
       };
               //判断放货数量是否为数字

+ 15 - 2
src/views/TMS/router/index.js

@@ -228,11 +228,13 @@ import editDomesticTrainFee from "../components/bmstrain/editDomesticTrainFee.vu
 import threeSectionHandleFee from "../components/bmsship/threeSectionHandleFee.vue";
 import addThreeSectionHandleFee from "../components/bmsship/addThreeSectionHandleFee.vue";
 import editThreeSectionHandleFee from "../components/bmsship/editThreeSectionHandleFee.vue";
-import threeSectionFee from "../components/bmsship/threeSectionFee.vue";
+import threeSectionFee from "../components/bmsship/threeSectionFee.vue";    
 import addThreeSectionFee from "../components/bmsship/addThreeSectionFee.vue";
 import editThreeSectionFee from "../components/bmsship/editThreeSectionFee.vue";
 import moistureDetection from "../components/bmsship/moistureDetection.vue";
 import addMoistureDetection from "../components/bmsship/addMoistureDetection.vue";
+import threeSectionFeeDetails from "../components/bmsship/threeSectionFeeDetails.vue";
+import updateThreeSectionFeeDetails from "../components/bmsship/updateThreeSectionFeeDetails.vue";   
 Vue.use(Router);
 
 const constantRouterMap = [
@@ -1464,7 +1466,18 @@ const constantRouterMap = [
         name: "moistureDetection",
         meta: { code: "xtpzgl-jggl" },
         component: moistureDetection
-      }
+      },{
+        path: "threeSectionFeeDetails",
+        name: "threeSectionFeeDetails",
+        meta: { code: "xtpzgl-jggl" },
+        component: threeSectionFeeDetails
+      },
+      {
+        path: "updateThreeSectionFeeDetails/:resultId",
+        name: "updateThreeSectionFeeDetails",
+        meta: { code: "xtpzgl-jggl" },
+        component: updateThreeSectionFeeDetails
+      },
     ]
   }
 ];

+ 3 - 1
src/views/WMS/components/billingOrder/updateBill.vue

@@ -139,6 +139,7 @@ export default {
           this.consigneeCompanyName = res.data.data.consigneeCompanyName;
           this.receiveAddressName = res.data.data.receiveAddressName;
           this.shipperName = res.data.data.shipperName;
+          this.saleOrderId = res.data.data.saleOrderId;
         });
     },
     changeMaterial() {
@@ -235,7 +236,8 @@ export default {
       // }
       let updateNumMap = {
         orderId: this.orderId,
-        mapList: this.materialList
+        mapList: this.materialList,
+        saleOrderId: this.saleOrderId
       };
       this.axios
         .post("/api/v1/oms/updateMaterialMes", updateNumMap)

+ 35 - 0
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -421,6 +421,16 @@
             >
           </template>
         </el-table-column>
+        <el-table-column fixed="right" width="80">
+          <template slot-scope="scope">
+            <el-button
+              @click.native.prevent="copyRowfluAll(scope.$index, scope.row)"
+              type="text"
+              size="big"
+              >复制整车</el-button
+            >
+          </template>
+        </el-table-column>
       </el-table>
     </div>
     <!-- 收货地址弹出框 -->
@@ -1394,6 +1404,23 @@ export default {
       // this.selectionList.push(copyRowflu);
       this.getSpanArr(this.selectionList);
     },
+    copyRowfluAll(index, row) {
+      let arr = [];
+      //复制整车,根据车序号去寻找相同的列
+      arr = this.selectionList.concat([]).filter((item, index) => {
+        return item.cxh == row.cxh;
+      });
+      arr.forEach(e => {
+        let copyRow = new Object();
+        Object.keys(e).forEach(key => {
+          copyRow[key] = e[key];
+        });
+        copyRow.cxh = this.maxCxh;
+        this.selectionList.push(copyRow);
+      });
+      this.getSpanArr(this.selectionList);
+      this.maxCxh++;
+    },
     singleDistribute() {
       let ml = this.materialList.length;
       if (ml == 0) {
@@ -1767,6 +1794,14 @@ export default {
           colspan: _col
         };
       }
+      if (columnIndex === 10) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
     },
     //点击外层收货地址浏览事件
     ondrawerOut() {

+ 1 - 1
src/views/appoint/components/saleContract/importExcelSaleOrder.vue

@@ -87,7 +87,7 @@ export default {
   },
   data() {
     return {
-      columnIndexList: [0, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],
+      columnIndexList: [0, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
       spanArr: [],
       tableData1: this.tableData
     };

+ 3 - 2
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -3,7 +3,7 @@
   <div class="salePlan">
     <div class="top">
       <el-form :inline="true">
-        <el-form-item>
+        <el-form-item v-if="activeName != 'first'">
           <el-date-picker
             v-model="startTime"
             type="datetime"
@@ -773,8 +773,9 @@ export default {
               saleOrderId: row.saleOrderId,
               reason: value
             };
+            console.log(mapValue);
             this.axios
-              .post("/api/v1/ams/deleteSaleOrderById", mapValue)
+              .post("/api/v1/ams/deleteSaleOrderSame", mapValue)
               .then(res => {
                 if (res.data.code == 200) {
                   this.$message.success("关闭成功");

+ 3 - 1
src/views/inward/components/inwardFactory/tareWeightResult.vue

@@ -3,7 +3,7 @@
   <!-- 零星物资计皮作业页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <span class="text">装车结束时间:</span>
+      <span class="text">计重时间:</span>
       <el-date-picker
         v-model="startTime"
         type="datetime"
@@ -41,6 +41,8 @@ export default {
   name: "homeworkPath",
   data() {
     return {
+      endTime: null,
+      startTime: null,
       input: "",
       option: {
         // 表格请求数据的地址

+ 529 - 0
src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue

@@ -0,0 +1,529 @@
+//站台库存信息一览表
+<template>
+  <div id="platformStockInfo">
+    <div class="head">
+      <!-- //需要一个日期查询框 -->
+      <el-form :inline="true">
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;"
+            >入库时间:</label
+          >
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width:200px"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width:200px"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="请选择需筛选的内容"
+            clearable
+            style="width:150px"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:200px"
+            v-model="input"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen1"
+            placeholder="请选择需筛选的内容"
+            clearable
+            style="width:150px"
+          >
+            <el-option
+              v-for="item in options1"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:200px"
+            v-model="input1"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="exportAllReportToExcel"
+            ><i class="el-icon-download"></i>Excel</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="refresh">
+            <i class="el-icon-refresh"></i>
+          </el-button>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>
+          </el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="main">
+      <el-table
+        :data="tableData"
+        ref="tableRef"
+        border
+        stripe
+        style="width: 100%; margin-top: 20px"
+        max-height="800px"
+        :row-style="{ height: '30px' }"
+        :cell-style="{ fontWeight: '700' }"
+        class="table"
+        :span-method="objectSpanMethod"
+        id="offsetSteel_kucunList_Table" individual-panel
+      >
+        <el-table-column
+          prop="index"
+          width="50"
+          label="序号"
+          align="center"
+          fixed="left"
+          :resizable="false"
+        >
+          <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+        </el-table-column>
+        <el-table-column
+          prop="saleNo"
+          label="单据编号"
+          width="200px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleRemark"
+          label="摘要"
+          width="120px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="toTheStation"
+          label="到站"
+          width="120px"
+          align="center"
+          column-key="toTheStation"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="receiveName"
+          label="收货单位"
+          width="300px"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <el-autocomplete
+              class="inline-input"
+              v-model="scope.row.receiveName"
+              :fetch-suggestions="querySearchConsignee"
+              placeholder="请输入收货单位名称"
+              :trigger-on-focus="false"
+              @select="handleSelectConsignee(scope.row, scope.$index)"
+            >
+              <template slot-scope="{ item }">
+                <div class="name">{{ item.consigneeCompanyName }}</div>
+              </template>
+            </el-autocomplete>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="transInDep"
+          label="调入部门"
+          width="120px"
+          align="center"
+          column-key="transInDep"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="transOutDep"
+          label="调出部门"
+          width="120px"
+          align="center"
+          column-key="transOutDep"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="transInWarehouse"
+          label="调入仓库"
+          width="120px"
+          align="center"
+          column-key="transInWarehouse"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialName"
+          label="物资名称"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialSpa"
+          label="规格"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialNum"
+          label="件数"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialWeight"
+          label="重量"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="sendStation"
+          label="发站"
+          width="120px"
+          align="center"
+          column-key="sendStation"
+          :filters="[
+            { text: '专用线', value: '专用线' },
+            { text: '达州站', value: '达州站' }
+          ]"
+          :filter-method="filterSend"
+        >
+          <template slot-scope="scope">
+            <el-select size="mini" v-model="scope.row.sendStationId">
+              <el-option
+                v-for="item in sendStationList"
+                :key="item.sendStationId"
+                :label="item.sendStation"
+                :value="item.sendStationId"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="operate"
+          label="操作"
+          align="center"
+          width="150px"
+          fixed="right"
+        >
+          <template slot-scope="scope">
+            <el-button type="text" @click="operate(scope.row)">保存</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+<script>
+//需要设计-发站、移库/直发的表格筛选传递给后端
+//需要设计-件数,重量,理重,标重,计费吨位的合计
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      startTime: null,
+      endTime: null,
+      options: [
+        {
+          value: "到站",
+          lable: "到站"
+        },
+        {
+          value: "收货单位",
+          lable: "收货单位"
+        },
+        {
+          value: "调入部门",
+          lable: "调入部门"
+        }
+      ],
+      options1: [
+        {
+          value: "到站",
+          lable: "到站"
+        },
+        {
+          value: "收货单位",
+          lable: "收货单位"
+        },
+        {
+          value: "调入部门",
+          lable: "调入部门"
+        }
+      ],
+      input: null,
+      input1: null,
+      tableData: [],
+      screen: null,
+      screen1: null,
+      //需要合并的列集合
+      mergeList: [
+        "saleNo",
+        "saleRemark",
+        "receiveName",
+        "index",
+        "operate",
+        "transInDep",
+        "transOutDep"
+      ],
+      spanArr: [],
+      pos: null,
+      sendStationList: [],
+      //收货客户列表
+      consigneeList: []
+    };
+  },
+  created() {
+    this.getRequestUrl();
+  },
+  mounted() {
+    this.information();
+  },
+  methods: {
+    handleSelectConsignee(row, index, item) {
+      console.log(row);
+      this.consigneeList.forEach(e => {
+        if (e.consigneeCompanyName == row.receiveName) {
+          row.consigneeId = e.consigneeId;
+        }
+      });
+    },
+    //以下是收货单位边输边查搜索
+    querySearchConsignee(queryString, cb) {
+      if (queryString.length > 3) {
+        this.axios
+          .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
+          .then(res => {
+            if (res.data.code == "200") {
+              console.log(res);
+              var restaurantsConsignee = res.data.data;
+              this.consigneeList = res.data.data;
+              var results = queryString
+                ? restaurantsConsignee.filter(
+                    this.createFilterConsignee(queryString)
+                  )
+                : restaurantsConsignee;
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      }
+    },
+    createFilterConsignee(queryString) {
+      return restaurantsConsignee => {
+        return (
+          restaurantsConsignee.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
+    //获取发站信息
+    information() {
+      this.axios.get("/api/v1/uc/getInwardSendStation").then(res => {
+        console.log(res.data.data);
+        this.sendStationList = res.data.data;
+      });
+    },
+    //合并行
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          data[i].group = i;
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].saleOrderId === data[i - 1].saleOrderId) {
+            this.spanArr[this.pos] += 1;
+            data[i].group = data[i - 1].group;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+            data[i].group = data[i - 1].group + 1;
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.includes(column.property)) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+    operate(row) {
+      this.axios
+        .post("/api/v1/ams/updateInwardConsignee", row)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("保存成功");
+            this.getRequestUrl();
+          } else {
+            this.$message.error(res.data.data);
+            this.getRequestUrl();
+          }
+        })
+        .catch(e => {
+          this.$message.error(e);
+          this.getRequestUrl();
+        });
+    },
+    //查询事件
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      let totheStation = null;
+      let consigneeName = null;
+      let transferIndep = null;
+      let remark = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      if (this.screen == "到站") {
+        totheStation = this.input;
+      } else if (this.screen == "收货单位") {
+        consigneeName = this.input;
+      } else if (this.screen == "调入部门") {
+        transferIndep = this.input;
+      } else {
+        remark = this.input;
+      }
+      if (this.screen1 == "到站") {
+        totheStation = this.input1;
+      } else if (this.screen1 == "收货单位") {
+        consigneeName = this.input1;
+      } else if (this.screen1 == "调入部门") {
+        transferIndep = this.input1;
+      } else {
+        remark = this.input1;
+      }
+      this.axios
+        .post(
+          "/api/v1/ams/getKucunList?startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&totheStation=" +
+            totheStation +
+            "&consigneeName=" +
+            consigneeName +
+            "&transferIndep=" +
+            transferIndep +
+            "&remark=" +
+            remark
+        )
+        .then(res => {
+          this.tableData = res.data.data;
+          this.getSpanArr(this.tableData);
+        });
+    },
+    //获取后台数据
+    getRequestUrl() {
+      this.axios
+        .post(
+          "/api/v1/ams/getKucunList?startTime=null&endTime=null&i=" + new Date()
+        )
+        .then(res => {
+          console.log(res.data.data);
+          this.tableData = res.data.data;
+          this.getSpanArr(this.tableData);
+        });
+    },
+    //刷新
+    refresh() {
+      this.getRequestUrl();
+    },
+    //筛选发站
+    filterSend(value, row, column) {
+      return row.sendStation === value;
+    },
+    //导出Excel
+    exportAllReportToExcel() {
+      console.log(this.$refs.tableRef);
+      const loading = this.$loading({
+        lock: true,
+        text: "正在导出Excel",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      var title = this.tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      console.log(this.$refs.tableRef);
+      this.$refs.tableRef.$children.forEach(item => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label);
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop);
+          }
+        }
+      });
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+      loading.close();
+    }
+  }
+};
+</script>
+<style lang="scss">
+#platformStockInfo {
+  .head {
+    margin-top: 20px;
+    margin-left: 20px;
+  }
+  .main {
+    margin-top: 20px;
+    margin-left: 20px;
+    ::-webkit-scrollbar {
+      // width: 20px;
+      height: 20px;
+      background-color: transparent;
+    }
+  }
+}
+</style>

+ 554 - 0
src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue

@@ -0,0 +1,554 @@
+//站台库存信息一览表
+<template>
+  <div id="platformStockInfo">
+    <div class="head">
+      <!-- //需要一个日期查询框 -->
+      <el-form :inline="true">
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;"
+            >入库时间:</label
+          >
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width:200px"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width:200px"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="请选择需筛选的内容"
+            clearable
+            style="width:150px"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:200px"
+            v-model="input"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="exportAllReportToExcel"
+            ><i class="el-icon-download"></i>Excel</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="refresh">
+            <i class="el-icon-refresh"></i>
+          </el-button>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>
+          </el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="main">
+      <el-table
+        :data="tableData"
+        ref="tableRef"
+        border
+        stripe
+        style="width: 100%; margin-top: 20px"
+        max-height="800px"
+        :row-style="{ height: '30px' }"
+        :cell-style="{ fontWeight: '700' }"
+        :summary-method="getSummaries"
+        show-summary
+        class="table"
+      >
+        <el-table-column width="50" label="序号" align="center" type="index">
+        </el-table-column>
+        <el-table-column
+          prop="sendStation"
+          label="发站"
+          width="120px"
+          align="center"
+          column-key="sendStation"
+          :filters="[
+            { text: '专用线', value: '专用线' },
+            { text: '达州站', value: '达州站' }
+          ]"
+          :filter-method="filterSend"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="consigneeName"
+          label="收货单位"
+          width="200px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="unloadPoint"
+          label="卸货地点"
+          width="200px"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <el-autocomplete
+              class="inline-input"
+              v-model="scope.row.unloadPoint"
+              :fetch-suggestions="querySearchWarehouse"
+              placeholder="请输入卸货点名称"
+              :trigger-on-focus="false"
+              @select="handleSelectWarehouse(scope.row, scope.$index)"
+            >
+            </el-autocomplete>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="belongCompany"
+          label="所属公司"
+          width="200px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="orderType"
+          label="直发/移库"
+          width="120px"
+          align="center"
+          :filters="[
+            { text: '移库', value: '移库' },
+            { text: '直发', value: '直发' }
+          ]"
+          :filter-method="filterType"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="arrivalStation"
+          label="到站"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="railwayBureau"
+          label="到局"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="capacityNum"
+          label="车牌号"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialName"
+          label="物资名称"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialSpa"
+          label="规格"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialNum"
+          label="件数"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialWeight"
+          label="重量"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="theoryWeight"
+          label="理重"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="strawMats"
+          label="草垫根数"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope">
+            <el-input
+              v-model.number="scope.row.strawMats"
+              placeholder="草垫根数"
+            >
+            </el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="orderNum"
+          label="运输订单号"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="EnStation"
+          label="进站日期"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope">
+            <el-date-picker
+              v-model="scope.row.EnStation"
+              type="date"
+              placeholder="选择进站日期"
+            >
+            </el-date-picker>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="wagonNo"
+          label="发出车号"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope">
+            <el-input v-model.number="scope.row.wagonNo" placeholder="发出车号">
+            </el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="wagonWeight"
+          label="标重"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope">
+            <el-input v-model.number="scope.row.wagonWeight" placeholder="标重">
+            </el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="wagonBillWeight"
+          label="计费吨位"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope">
+            <el-input
+              v-model.number="scope.row.wagonBillWeight"
+              placeholder="计费吨位"
+            >
+            </el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="OutStation"
+          label="发出日期"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope">
+            <el-date-picker
+              v-model="scope.row.OutStation"
+              type="date"
+              placeholder="选择发出日期"
+            >
+            </el-date-picker>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="number"
+          label="票号"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="consigneeName"
+          label="客户"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="150px">
+          <template slot-scope="scope">
+            <el-button type="text" @click="operate(scope.row)">保存</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+<script>
+//需要设计-发站、移库/直发的表格筛选传递给后端
+//需要设计-件数,重量,理重,标重,计费吨位的合计
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      startTime: null,
+      endTime: null,
+      options: [
+        {
+          value: "发站",
+          lable: "发站"
+        },
+        {
+          value: "收货单位",
+          lable: "收货单位"
+        }
+      ],
+      input: null,
+      tableData: [],
+      screen: null,
+      sumList: [
+        "wagonBillWeight",
+        "wagonWeight",
+        "theoryWeight",
+        "materialWeight",
+        "materialNum"
+      ],
+      operateName: "编辑",
+      unloadPointList: []
+    };
+  },
+  created() {
+    this.getRequestUrl();
+  },
+  mounted() {
+    this.showSummariesPosition();
+  },
+  methods: {
+    handleSelectWarehouse(row, index, item) {
+      console.log(item);
+      this.unloadPointList.forEach(e => {
+        if (e.warehouseName == row.unloadPoint) {
+          row.unloadPointId = e.warehouseId;
+          row.unloadPoint = e.warehouseName;
+        }
+      });
+    },
+    //边输边查卸货点
+    querySearchWarehouse(queryString, cb) {
+      if (queryString.length >= 2) {
+        this.axios
+          .post("/api/v1/uc/selectUnloadingPoint?index=" + queryString)
+          .then(res => {
+            console.log(res.data);
+            if (res.data.length > 0) {
+              console.log(res);
+              var restaurantsConsignee = res.data;
+              this.unloadPointList = res.data;
+              var results = queryString
+                ? restaurantsConsignee.filter(
+                    this.createFilterConsignee(queryString)
+                  )
+                : restaurantsConsignee;
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      }
+    },
+    createFilterConsignee(queryString) {
+      return restaurantsConsignee => {
+        return (
+          restaurantsConsignee.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
+    operate(row) {
+      row.personnelSsoId = getCookie("userId");
+      if (
+        (typeof row.EnStation == "object" ||
+          typeof row.EnStation == "string") &&
+        row.EnStation != null
+      ) {
+        row.EnStation = sjTime(new Date(row.EnStation));
+      }
+      if (
+        (typeof row.OutStation == "object" ||
+          typeof row.OutStation == "string") &&
+        row.OutStation != null
+      ) {
+        row.OutStation = sjTime(new Date(row.OutStation));
+      }
+      console.log(typeof row.EnStation);
+      console.log(typeof row.OutStation);
+      this.axios
+        .post("/api/v1/wms/afterInwardOutbound", row)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("保存成功");
+            this.getRequestUrl();
+          } else {
+            this.$message.error(res.data.data);
+            this.getRequestUrl();
+          }
+        })
+        .catch(e => {
+          this.$message.error(e);
+          this.getRequestUrl();
+        });
+    },
+    //查询事件
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      this.axios
+        .post(
+          "/api/v1/oms/getWagonShippingDetails?startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime
+        )
+        .then(res => {
+          this.tableData = res.data.data;
+          this.showSummariesPosition();
+        });
+    },
+    //获取后台数据
+    getRequestUrl() {
+      this.axios
+        .post(
+          "/api/v1/oms/getWagonShippingDetails?startTime=null&endTime=null&i=" +
+            new Date()
+        )
+        .then(res => {
+          console.log(res.data.data);
+          this.tableData = res.data.data;
+          this.showSummariesPosition();
+        });
+    },
+    //刷新
+    refresh() {
+      this.getRequestUrl();
+    },
+    //筛选发站
+    filterSend(value, row, column) {
+      return row.sendStation === value;
+    },
+    //筛选类型
+    filterType(value, row, column) {
+      return row.orderType === value;
+    },
+    //将合计行置顶
+    showSummariesPosition() {
+      const table = document.querySelector(".table");
+      const footer = document.querySelector(".table .el-table__footer-wrapper");
+      const body = document.querySelector(".table .el-table__body-wrapper");
+      table.removeChild(footer); // 移除表格最下方的合计行
+      table.insertBefore(footer, body); // 把合计行插入到表格body的上面
+    },
+    //表尾合计行
+    getSummaries(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        //如果索引值为0,则展示‘合计’
+        if (index === 0) {
+          sums[index] = "合计";
+          return;
+        }
+        if (this.sumList.includes(column.property)) {
+          const values = data.map(item => Number(item[column.property]));
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
+              } else {
+                return prev;
+              }
+            }, 0);
+            sums[index];
+          } else {
+            sums[index] = "N/A";
+          }
+        }
+        //遍历数组,找到符合条件的列
+      });
+
+      return sums;
+    },
+    //导出Excel
+    exportAllReportToExcel() {
+      console.log(this.$refs.tableRef);
+      const loading = this.$loading({
+        lock: true,
+        text: "正在导出Excel",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      var title = this.tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      console.log(this.$refs.tableRef);
+      this.$refs.tableRef.$children.forEach(item => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label);
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop);
+          }
+        }
+      });
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+      loading.close();
+    }
+  }
+};
+</script>
+<style lang="scss">
+#platformStockInfo {
+  .head {
+    margin-top: 20px;
+    margin-left: 20px;
+  }
+  .main {
+    margin-top: 20px;
+    margin-left: 20px;
+    ::-webkit-scrollbar {
+      // width: 20px;
+      height: 20px;
+      background-color: transparent;
+    }
+  }
+}
+</style>

+ 322 - 19
src/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckOrder.vue

@@ -75,6 +75,11 @@
             style="width: 100px"
           ></el-input>
         </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="showDialog"
+            >多拼派车</el-button
+          >
+        </el-form-item>
       </el-form>
     </div>
     <div class="table">
@@ -90,6 +95,10 @@
         :row-style="{ height: '30px' }"
         :cell-style="{ fontWeight: '700' }"
       >
+      <el-table-column
+        type="selection"
+        width="55">
+      </el-table-column>
         <el-table-column
           width="50"
           label="序号"
@@ -101,11 +110,22 @@
         </el-table-column>
         <el-table-column
           prop="consigneeName"
-          label="下单客户"
+          label="收货客户"
           :width="flexColumnWidth('consigneeName', tableData, 'max')"
           align="center"
           fixed
         >
+        <template slot-scope="scope">
+          <el-autocomplete
+            class="inline-input"
+            v-model="scope.row.consigneeName"
+            :fetch-suggestions="querySearchConsignee"
+            placeholder="请输入收货客户名称"
+            @select="handleSelectConsignee(scope.row, scope.$index)"
+            style="width:300px"
+          >
+          </el-autocomplete>
+        </template>
         </el-table-column>
         <el-table-column
           prop="carrierName"
@@ -132,16 +152,39 @@
             >
           </template>
         </el-table-column>
+        
         <el-table-column
+          prop="sendStationName"
+          column-key="sendStationName"
+          label="发站"
+          align="center"
+          width="100px"
+          fixed
+        >
+          <!-- 选择发站 -->
+          <template slot-scope="scope">
+            <el-select filterable  v-model="scope.row.sendStationId"
+            @change="updateSendStation($event,scope.row)">
+                <el-option v-for="item in sendStations" :value="item.sendStationId" :key="item.sendStationId" :label="item.sendStation"></el-option>
+            </el-select>
+            <!-- <el-button
+              @click="updateStation(scope.row)"
+              type="primary"
+              v-if="scope.row.isSendStationName == 1"
+              >提交</el-button
+            > -->
+          </template>
+        </el-table-column>
+        <!-- <el-table-column
           prop="lineName"
           column-key="lineName"
           label="路线"
           align="center"
           width="250px"
           fixed
-        >
+        > -->
           <!-- 选择路线 -->
-          <template slot-scope="scope">
+          <!-- <template slot-scope="scope">
             <el-autocomplete
               style="width: 120px"
               v-model="scope.row.lineName"
@@ -158,7 +201,7 @@
               >提交</el-button
             >
           </template>
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column
           prop="capacityNo"
           column-key="capacityNo"
@@ -366,7 +409,7 @@
             >
           </template>
         </el-table-column>
-        <el-table-column
+        <!-- <el-table-column
           label="操作"
           fixed="right"
           width="120px"
@@ -381,7 +424,7 @@
               >反关闭分录</el-button
             >
           </template>
-        </el-table-column>
+        </el-table-column> -->
       </el-table>
     </div>
     <div class="address">
@@ -459,6 +502,25 @@
         </div>
       </el-dialog>
     </div>
+    <!-- 多拼弹出层-->
+    <el-dialog title="生成多拼" :visible.sync="dialogTableVisible" style="width:500px">
+      <el-form :inline="true">
+        <el-form-item>
+          <el-autocomplete
+            style="width: 120px"
+            v-model="capacityNo"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入车牌号"
+            @select="handleMulSelect"
+          ></el-autocomplete>
+          <el-button
+            @click="updateMulCapacity"
+            type="primary"
+            >提交</el-button
+          >
+        </el-form-item>
+      </el-form>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -475,6 +537,10 @@ export default {
       clickIndex: null,
       input: null,
       screen: "",
+      dialogTableVisible:false,
+      newsCapacityId:null,
+      capacityNo:null,
+      selection:[],
       options: [
         {
           value: "下单客户",
@@ -510,7 +576,7 @@ export default {
       a: 1,
       isCellClick: 0,
       columnIndexs: [
-        0, 1, 2, 3, 7, 8, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+          1, 2, 3,4, 7, 8, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
         29, 31,
       ],
       //钢材多拼车辆线路ID
@@ -528,6 +594,26 @@ export default {
       //   110009,
       //   110010
       // ],
+      //达州站内转多拼车辆线路ID,从1-5为1-5拼线路id
+      lineDazhou:[
+        0,
+        189982,
+        189983,
+        189984,
+        189985,
+        189986
+      ],
+      //专用线内转多拼车辆线路ID,从1-5为1-5拼线路id
+      lineZhuanxian:[
+        0,
+        189987,
+        189988,
+        189989,
+        189990,
+        189991
+      ],
+      sendStationId:null,
+      sendStations:[],
       tableTitle: "销售钢材统计报表",
       //所有省
       provinceList: [],
@@ -553,11 +639,13 @@ export default {
       addressId: null,
       direction: "rtl",
       addressRow: {},
+      consigneeDisable: false,
     };
   },
   created() {},
   mounted() {
     this.getSteelReport();
+    this.getSendStations();
   },
   methods: {
     //反关闭整条分录
@@ -635,6 +723,7 @@ export default {
             this.$set(item, "isAddressShow", 0);
             this.$set(item, "isNumShow", 0);
             this.$set(item, "isLineName", 0);
+            this.$set(item, "isSendStationName", 0);
           }
         });
       }
@@ -646,6 +735,10 @@ export default {
         this.$set(row, "isLineName", 1);
         this.clickIndex = row.group;
       }
+      if (column.property == "sendStationName") {
+        this.$set(row, "isSendStationName", 1);
+        this.clickIndex = row.group;
+      }
       if (column.property == "carrierName") {
         this.$set(row, "isCarrierShow", 1);
         this.clickIndex = row.group;
@@ -721,6 +814,19 @@ export default {
           });
       }
     },
+    //获取发站
+     getSendStations() {
+      this.axios
+        .get(
+          "/api/v1/uc/getInwardSendStation"
+        )
+        .then((res) => {
+          console.log(res.data.data);
+          if (res.data.code == "200") {
+            this.sendStations = res.data.data;
+          }
+        });
+    },
     // 过滤器
     createFilterLine(queryString) {
       return (restaurants) => {
@@ -779,6 +885,20 @@ export default {
         }
       });
     },
+   //多拼弹出层绑定车牌号
+    handleMulSelect(row, index) {
+      this.capacityList.forEach((item) => {
+        if (item.capacityNumber === row.capacityNo) {
+          this.selection.forEach((selected)=>{
+             selected.newsCapacityId = item.capacityId;
+             selected.capacityNo=row.capacityNo;
+          });
+          this.newsCapacityId=item.capacityId;
+          this.capacityNo=row.capacityNo;
+          console.log("newCapacityId:",this.newsCapacityId);
+        }
+      });
+    },
 
     // 线路弹出层
     handleSelectLine(row, index) {
@@ -795,7 +915,30 @@ export default {
       console.log("this.lineId" +this.lineId);
     },
 
+    updateSendStation(selection,row){
+      let sendStation=this.sendStations.find(item=>item.sendStationId==row.sendStationId);
+      row.sendStation=sendStation.sendStation;
+      console.log("sendStation",sendStation);
+      //绑定线路id
+      // let i = 0;
+      // this.tableData.forEach((e) => {
+      //   if (row.group == e.group) {
+      //     i++;//得到拼数
+      //   }
+      // });
+      // if(row.sendStation=="达州站"){
+      //   row.lineId=this.lineDazhou[i];
+      // }else if(row.sendStation=="专用线"){
+      //   row.lineId=this.lineZhuanxian[i];
+      // }else{
+      //   console.log("没有该发站的线路");
+      // }
+      console.log("row:",row);
+    },
+
     updateCapacity(row) {
+      row.isIwardSteel=4;
+      row.saleOrderMaterialId=row.saleOrderId;
       if (row.newsCapacityId == null) {
         this.$message.warning("请先注册车牌号或者选中弹出后再提交!");
         return;
@@ -814,7 +957,7 @@ export default {
         this.axios
           .post("/api/v1/ams/updateCapacityNumberInFactory", row)
           .then((res) => {
-            if (res.data.code == 200) {
+            if (res.data.code == "200") {
               this.$message.success("变更车牌号成功!");
               this.getSteelReport();
               loading.close();
@@ -834,14 +977,98 @@ export default {
           this.$message.error("请先选择承运商!");
           return;
         }
-        let i = 0;
-        this.tableData.forEach((e) => {
-          if (row.group == e.group) {
-            i++;
-          }
+        row.driverTel = row.capacityTel;
+        row.capacityNumber = row.capacityNo;
+        let arr = [];
+        arr.push(row);
+        const loading = this.$loading({
+          lock: true,
+          text: "正在变更车牌号",
+          spinner: "el-icon-loading",
+          background: "rgba(0, 0, 0, 0.7)",
         });
-        // row.lineId = this.lineSpelling[i];
-
+        this.axios
+          .post("/api/v1/ams/dispatchSteelOrder", arr)
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.$message.success("派车成功!");
+              this.getSteelReport();
+              loading.close();
+            } else {
+              this.$message.error("派车失败,请联系管理员");
+              this.getSteelReport();
+              loading.close();
+            }
+          })
+          .catch(() => {
+            this.$message.error("派车失败,请联系管理员");
+            this.getSteelReport();
+            loading.close();
+          });
+      }
+    },
+    
+    //多拼修改
+    updateMulCapacity() {
+      this.selection.forEach((item)=>{
+          item.isIwardSteel=4;
+          item.saleOrderMaterialId=item.saleOrderId;
+          item.capacityId=this.capacityId;
+          item.capacityNumber=this.capacityNo;
+      });
+      if(this.selection[0].sendStation=="达州站"){
+        this.selection.forEach((item)=>{
+          item.lineId=this.lineDazhou[this.selection.length];
+          item.lineName="达州站";
+        });
+      }else if(this.selection[0].sendStation=="专用线"){
+        this.selection.forEach((item)=>{
+          item.lineId=this.lineZhuanxian[this.selection.length];
+          item.lineName="专用线";
+        });
+      }else{
+        console.log("没有该发站的线路");
+      }
+      console.log("selection:",this.selection);
+      return;
+      if (row.newsCapacityId == null) {
+        this.$message.warning("请先注册车牌号或者选中弹出后再提交!");
+        return;
+      }
+      if (!isVehicleNumber(row.capacityNo)) {
+        this.$message.error("请输入正确格式的车牌号!");
+        return;
+      }
+      if (row.capacityIds != 0) {
+        const loading = this.$loading({
+          lock: true,
+          text: "正在变更车牌号",
+          spinner: "el-icon-loading",
+          background: "rgba(0, 0, 0, 0.7)",
+        });
+        this.axios
+          .post("/api/v1/ams/updateCapacityNumberInFactory", row)
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.$message.success("变更车牌号成功!");
+              this.getSteelReport();
+              loading.close();
+            } else {
+              this.$message.success("变更失败,请联系管理员");
+              this.getSteelReport();
+              loading.close();
+            }
+          })
+          .catch(() => {
+            this.$message.success("变更失败,请联系管理员");
+            this.getSteelReport();
+            loading.close();
+          });
+      } else {
+        if (row.carrierIds == 0) {
+          this.$message.error("请先选择承运商!");
+          return;
+        }
         row.driverTel = row.capacityTel;
         row.capacityNumber = row.capacityNo;
         let arr = [];
@@ -872,6 +1099,7 @@ export default {
           });
       }
     },
+    
     //修改司机电话号码
     updateDriverTel(row) {
       const loading = this.$loading({
@@ -948,6 +1176,9 @@ export default {
     },
     //修改承运商授权
     updateTruckCarrier(row) {
+      if(!row.saleOrderMaterialId){
+        row.saleOrderMaterialId=row.saleOrderId;
+      }
       if (row.newCarrierId == null) {
         this.$message.warning("请注册承运商或者选中弹出层之后再提交!");
         this.getSteelReport();
@@ -991,7 +1222,7 @@ export default {
         this.axios
           .post("/api/v1/ams/dispatchToCarrier", arr)
           .then((res) => {
-            if (res.data.code == "200") {
+            if (res.data.code == "0") {
               this.$message.success("授权承运商成功");
               this.getSteelReport();
               loading.close();
@@ -1144,7 +1375,7 @@ export default {
           this.pos = 0;
         } else {
           // 判断当前元素与上一个元素是否相同
-          if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
+          if (data[i].saleOrderId === data[i - 1].saleOrderMaterialId) {
             this.spanArr[this.pos] += 1;
             data[i].group = data[i - 1].group;
             this.spanArr.push(0);
@@ -1289,7 +1520,7 @@ export default {
       }
       this.axios
         .post(
-          "/api/v1/tms/getSaleSteelReport?startTime=" +
+          "/api/v1/tms/getInwardSaleSteelReport?startTime=" +
             startTime +
             "&endTime=" +
             endTime +
@@ -1329,7 +1560,7 @@ export default {
       }
       this.axios
         .post(
-          "/api/v1/tms/getSaleSteelReport?startTime=" +
+          "/api/v1/tms/getInwardSaleSteelReport?startTime=" +
             null +
             "&endTime=" +
             null +
@@ -1412,6 +1643,78 @@ export default {
       }
       return flexWidth + "px";
     },
+    //多拼弹出层
+    showDialog(){
+      let selection=this.$refs.tableRef.selection;
+      console.log("selection",selection);
+      if(selection && selection.length>0){
+        if(selection.find(item=>item.lineId != selection[0].lineId || item.saleOrderId!=selection[0].saleOrderId)){
+           this.$message({
+            message:"无法生成多拼,订单或者线路不一致",
+            type:"warning"
+          });
+          return;
+        }
+        this.dialogTableVisible=true;
+        this.selection=selection;
+        this.capacityNo=selection[0].capacityNo;
+      }else{
+        this.$message({
+          message:"请先勾选再生成多拼",
+          type:"warning"
+        });
+      }
+    },
+     handleSelectConsignee(item) {
+      this.consigneeName = item.consigneeCompanyName;
+      this.consigneeId = item.consigneeId;
+      this.isReceiveHaveArea(this.consigneeId);
+      //带出摘要
+      this.axios
+        .post("/api/v1/uc/getSaleArea?receiveId=" + this.consigneeId)
+        .then(res => {
+          this.remarks = res.data.data;
+        });
+      this.axios
+        .post(
+          "/api/v1/ams/matchingAddressRecently?receiveId=" + this.consigneeId
+        )
+        .then(res => {
+          const place = res.data.data;
+          console.log(place);
+          this.saleShipperAddressName =
+            place[0].addressProvince +
+            place[0].addressDistrict +
+            place[0].addressTown +
+            place[0].place;
+          this.saleShipperAddressId = place[0].shipperAddressId;
+          this.addressId = place[0].shipperAddressId;
+          this.place1 = place[0].place;
+          this.saleMan = place[0].salerId;
+          this.saleOrderConsigneeTel = place[0].saleOrderConsigneeTel;
+          this.province = place[0].addressProvince;
+          this.city = place[0].addressDistrict;
+          this.county = place[0].addressTown;
+        });
+    },
+     //以下是下单客户边输边查搜索
+    querySearchConsignee(queryString, cb) {
+      this.axios
+        .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.consignee = res.data.data;
+            var restaurantsConsignee = res.data.data;
+            var results = queryString
+              ? restaurantsConsignee.filter(
+                  this.createFilter1(queryString)
+                )
+              : restaurantsConsignee;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
   },
 };
 </script>

+ 1293 - 0
src/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckPreview.vue

@@ -0,0 +1,1293 @@
+<!-- 内转钢材到异地库派单界面 -->
+<template>
+  <div class="purchasFuelNewMonitor">
+    <div class="tableTop">
+      <el-form :inline="true" style="margin-top: 5px">
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="请选择需筛选的内容"
+            clearable
+            @change="changeScreen"
+            style="width: 150px"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width: 200px"
+            v-model="input"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto"
+            >订单时间:</label
+          >
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width: 200px"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width: 200px"
+          >
+          </el-date-picker>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>
+          </el-button>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="refresh">
+            <i class="el-icon-refresh"></i>
+          </el-button>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="showDialog">多拼派车</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <el-table
+        :data="tableData"
+        :span-method="objectSpanMethod"
+        ref="tableRef"
+        border
+        stripe
+        style="width: 100%; margin-top: 20px"
+        max-height="800px"
+        @cell-click="cellClik"
+        :row-style="{ height: '30px' }"
+        :cell-style="{ fontWeight: '700' }"
+      >
+        <el-table-column type="selection" width="55" :selectable="selectInit">
+        </el-table-column>
+        <el-table-column
+          prop="index"
+          width="50"
+          label="序号"
+          align="center"
+          :resizable="false"
+        >
+          <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+        </el-table-column>
+        <el-table-column
+          prop="consigneeName"
+          label="收货单位"
+          width="200px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="sendStationName"
+          column-key="sendStationName"
+          label="车皮装车地点"
+          align="center"
+          width="100px"
+          :filters="[
+            { text: '专用线', value: '专用线' },
+            { text: '达州站', value: '达州站' }
+          ]"
+          :filter-method="filterSend"
+        >
+          <!-- 选择发站 -->
+          <template slot-scope="scope">
+            <el-select
+              filterable
+              v-model="scope.row.sendStationId"
+              @change="updateSendStation($event, scope.row)"
+            >
+              <el-option
+                v-for="item in sendStations"
+                :value="item.sendStationId"
+                :key="item.sendStationId"
+                :label="item.sendStation"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="capacityNo"
+          column-key="capacityNo"
+          label="车牌号"
+          align="center"
+          width="250px"
+        >
+          <template slot-scope="scope">
+            <el-autocomplete
+              style="width: 120px"
+              v-model="scope.row.capacityNo"
+              :fetch-suggestions="querySearch"
+              placeholder="请输入车牌号"
+              @select="handleSelect(scope.row, scope.$index)"
+              :disabled="scope.row.isCapacityShow != 1"
+            ></el-autocomplete>
+            <el-button
+              @click="updateCapacity(scope.row)"
+              type="primary"
+              v-if="scope.row.isCapacityShow == 1"
+              >提交</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="materialName"
+          label="物资名称"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column prop="materialSpe" label="物资规格" align="center">
+        </el-table-column>
+        <el-table-column
+          prop="materialNum"
+          label="物资件数"
+          align="center"
+          width="150px"
+        >
+          <!-- <template slot-scope="scope">
+            <button
+              type="primary"
+              @click="scope.row.materialNum--"
+              v-if="scope.row.isNumShow == 1"
+              style="height: 40px"
+            >
+              -
+            </button>
+            <input
+              v-model="scope.row.materialNum"
+              disabled
+              style="
+                width: 40px;
+                height: 40px;
+                font-size: 16px;
+                line-height: 40px;
+                text-align: center;
+              "
+            />
+            <el-button
+              type="primary"
+              @click="updateBillOrder(scope.row)"
+              v-if="scope.row.isNumShow == 1"
+              >提交</el-button
+            >
+          </template> -->
+        </el-table-column>
+        <el-table-column
+          prop="transInDep"
+          label="调入部门"
+          width="120px"
+          align="center"
+          column-key="transInDep"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="transOutDep"
+          label="调出部门"
+          width="120px"
+          align="center"
+          column-key="transOutDep"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="transInWarehouse"
+          label="调入仓库"
+          width="120px"
+          align="center"
+          column-key="transInWarehouse"
+        >
+        </el-table-column>
+        <el-table-column prop="netWeight" label="净重"> </el-table-column>
+        <el-table-column prop="entryGateTime" label="进厂时间" width="130px">
+        </el-table-column>
+        <el-table-column
+          prop="carrierName"
+          label="承运商"
+          align="center"
+          width="250px"
+        >
+          <template slot-scope="scope">
+            <el-autocomplete
+              style="width: 120px"
+              v-model="scope.row.carrierName"
+              :fetch-suggestions="querySearchCarrier"
+              placeholder="请输入承运商"
+              @select="handleSelectCarrier(scope.row, scope.$index)"
+              :disabled="scope.row.isCarrierShow != 1"
+            >
+            </el-autocomplete>
+            <el-button
+              @click="updateTruckCarrier(scope.row)"
+              type="primary"
+              v-if="scope.row.isCarrierShow == 1"
+              >提交</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="orderNo"
+          label="运输订单号"
+          width="180px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="capacityTel"
+          label="司机电话"
+          width="250px"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <el-input
+              style="width: 120px"
+              v-model="scope.row.capacityTel"
+              placeholder="请输入电话号码"
+              :disabled="scope.row.isTelShow != 1"
+            ></el-input>
+            <el-button
+              @click="updateDriverTel(scope.row)"
+              type="primary"
+              v-if="scope.row.isTelShow == 1"
+              >提交</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="shipperName"
+          label="发货单位"
+          width="170px"
+          align="center"
+        >
+        </el-table-column>
+        <!-- <el-table-column
+          label="操作"
+          fixed="right"
+          width="120px"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="closeEasEntryId(scope.row)"
+              v-if="scope.row.deletedStatus == null"
+              >关闭分录</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="操作"
+          fixed="right"
+          width="120px"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="deleteEasEntryId(scope.row)"
+              v-if="
+                scope.row.carStatus == 4 ||
+                scope.row.carStatus == 5 ||
+                scope.row.carStatus == null
+              "
+              >关闭车辆</el-button
+            >
+          </template>
+        </el-table-column> -->
+        <!-- <el-table-column
+          label="操作"
+          fixed="right"
+          width="120px"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="adverseCloseSaleMaterial(scope.row)"
+              v-if="scope.row.deletedStatus != null"
+              >反关闭分录</el-button
+            >
+          </template>
+        </el-table-column> -->
+      </el-table>
+    </div>
+    <!-- 多拼弹出层-->
+    <el-dialog
+      title="生成多拼"
+      :visible.sync="dialogTableVisible"
+      style="width: 500px"
+    >
+      <el-form :inline="true">
+        <el-form-item>
+          <el-autocomplete
+            style="width: 120px"
+            v-model="capacityNo"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入车牌号"
+            @select="handleMulSelect"
+          ></el-autocomplete>
+          <el-button
+            @click="updateMulCapacity"
+            type="primary"
+            :disabled="disabledDispatch"
+            >提交</el-button
+          >
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { sjTime, isVehicleNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      // 线路名称
+      lineName: "",
+      //线路id
+      lineId: null,
+      drawer: false,
+      clickIndex: null,
+      input: null,
+      screen: "",
+      dialogTableVisible: false,
+      newsCapacityId: null,
+      capacityNo: null,
+      selection: [],
+      options: [
+        {
+          value: "收货单位",
+          lable: "收货单位"
+        },
+        {
+          value: "车牌号",
+          lable: "车牌号"
+        }
+      ],
+      startTime: null,
+      endTime: null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      tableTitle: "销售统计报表",
+      capacityList: [],
+      carrierList: [],
+      // 线路
+      LineList: [],
+      tableData: [],
+      spanArr: [],
+      pos: 0,
+      a: 1,
+      isCellClick: 0,
+      //需要合并的行
+      mergeList: [
+        "shipperName",
+        "capacityTel",
+        "orderNo",
+        "carrierName",
+        "transInWarehouse",
+        "transOutDep",
+        "transInDep",
+        "capacityNo",
+        "sendStationName",
+        "consigneeName",
+        "index"
+      ],
+      //钢材多拼车辆线路ID
+      //索引从1-10为1-10拼路线ID
+      // lineSpelling: [
+      //   0,
+      //   110001,
+      //   110002,
+      //   110003,
+      //   110004,
+      //   110005,
+      //   110006,
+      //   110007,
+      //   110008,
+      //   110009,
+      //   110010
+      // ],
+      //达州站内转多拼车辆线路ID,从1-5为1-5拼线路id
+      lineDazhou: [0, 189982, 189983, 189984, 189985, 189986],
+      //专用线内转多拼车辆线路ID,从1-5为1-5拼线路id
+      lineZhuanxian: [0, 189987, 189988, 189989, 189990, 189991],
+      sendStationId: null,
+      sendStations: [],
+      direction: "rtl"
+    };
+  },
+  mounted() {
+    this.getSteelReport();
+    this.getSendStations();
+  },
+  methods: {
+    // dispatchSome() {
+    //   console.log(this.tableData);
+    //   //首先过滤掉已派车的数据
+    //   let arr = this.tableData.filter(item => {
+    //     return item.capacityIds == 0;
+    //   });
+    //   if (arr.length == 0) {
+    //     ths.$message.error("没有符合条件的分录可供拼装");
+    //     return;
+    //   }
+    //   console.log(arr);
+    //   this.selection = arr;
+    //   this.updateMulCapacity();
+    // },
+    //禁用已派车
+    selectInit(row) {
+      console.log(row);
+      if (row.capacityIds != 0) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+    filterSend(value, row, column) {
+      return row.sendStation === value;
+    },
+    //反关闭整条分录
+    adverseCloseSaleMaterial(row) {
+      console.log(row.saleMaterialId);
+      this.$confirm("确定反关闭该条分录?", "提示", {
+        cancelButtonText: "确定",
+        confirmButtonText: "取消",
+        center: true
+      }).then(() => {
+        this.axios
+          .post(
+            "/api/v1/ams/adverseCloseSaleMaterial?saleMaterialId=" +
+              row.saleMaterialId
+          )
+          .then(res => {
+            if (res.data.code == "200") {
+              this.$message.success("反关闭成功");
+              this.getSteelReport();
+            } else {
+              this.$message.error("反关闭失败");
+              this.getSteelReport();
+            }
+          })
+          .catch(() => {
+            this.$message.error("反关闭失败");
+            this.getSteelReport();
+          });
+      });
+    },
+
+    //销售钢材报表导出excel
+    exportAllReportToExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: "正在导出Excel",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      var title = this.tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      console.log(this.$refs.tableRef);
+      this.$refs.tableRef.$children.forEach(item => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label);
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop);
+          }
+        }
+      });
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+      loading.close();
+    },
+    cellClik(row, column, cell, event) {
+      if (row.group != this.clickIndex) {
+        // this.getSteelReport();
+        this.tableData.forEach(item => {
+          if (item.group == this.clickIndex) {
+            this.$set(item, "isCapacityShow", 0);
+            this.$set(item, "isCarrierShow", 0);
+            this.$set(item, "isTelShow", 0);
+            this.$set(item, "isSendStationName", 0);
+          }
+        });
+      }
+      if (column.property == "capacityNo") {
+        this.$set(row, "isCapacityShow", 1);
+        this.clickIndex = row.group;
+      }
+      if (column.property == "sendStationName") {
+        this.$set(row, "isSendStationName", 1);
+        this.clickIndex = row.group;
+      }
+      if (column.property == "carrierName") {
+        this.$set(row, "isCarrierShow", 1);
+        this.clickIndex = row.group;
+      }
+      if (column.property == "capacityTel") {
+        this.$set(row, "isTelShow", 1);
+        this.clickIndex = row.group;
+      }
+    },
+    //承运商弹出层
+    handleSelectCarrier(row, index, item) {
+      this.carrierList.forEach(item => {
+        if (item.carrierName == row.carrierName) {
+          row.newCarrierId = item.carrierId;
+          row.carrierId = item.carrierId;
+          row.carrierIds = item.carrierId;
+        }
+      });
+    },
+    //承运商边输边查
+    querySearchCarrier(queryString, cb) {
+      if (queryString.length > 1) {
+        this.axios
+          .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+          .then(res => {
+            if (res.data.code == "200") {
+              this.carrierList = [];
+              if (res.data.data.length == 0) {
+                this.$message.info("承运商不存在,请前往注册");
+                return;
+              }
+              var restaurants = res.data.data;
+              this.carrierList = res.data.data;
+              var results = queryString
+                ? restaurants.filter(this.createFilterCarrier(queryString))
+                : restaurants;
+              cb(results);
+            }
+          });
+      }
+    },
+    //获取发站
+    getSendStations() {
+      this.axios.get("/api/v1/uc/getInwardSendStation").then(res => {
+        console.log(res.data.data);
+        if (res.data.code == "200") {
+          this.sendStations = res.data.data;
+        }
+      });
+    },
+    createFilterCarrier(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value1.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以下是车牌号边输边查搜索
+    querySearch(queryString, cb) {
+      if (queryString.length > 3) {
+        this.axios
+          .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
+          .then(res => {
+            this.capacityList = [];
+            if (res.data.code == "200") {
+              if (res.data.data.length == 0) {
+                this.$message.info("车牌号不存在,请前往注册");
+                return;
+              }
+              var restaurants = res.data.data;
+              this.capacityList = res.data.data;
+              var results = queryString
+                ? restaurants.filter(this.createFilter(queryString))
+                : restaurants;
+              // console.log("res",+results);
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      }
+    },
+    createFilter(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //车牌号弹出层
+    handleSelect(row, index) {
+      this.capacityList.forEach(item => {
+        if (item.capacityNumber === row.capacityNo) {
+          row.newsCapacityId = item.capacityId;
+        }
+      });
+    },
+    //多拼弹出层绑定车牌号
+    handleMulSelect(item) {
+      console.log(item);
+      this.capacityList.forEach(e => {
+        if (item.capacityNumber === e.capacityNumber) {
+          this.capacityNumber = e.capacityNumber;
+          this.capacityId = e.capacityId;
+        }
+      });
+    },
+
+    updateSendStation(selection, row) {
+      let sendStation = this.sendStations.find(
+        item => item.sendStationId == row.sendStationId
+      );
+      row.sendStation = sendStation.sendStation;
+      console.log("sendStation", sendStation);
+      console.log("row:", row);
+    },
+
+    updateCapacity(row) {
+      row.isIwardSteel = 4;
+      row.saleOrderMaterialId = row.saleOrderId;
+      if (row.newsCapacityId == null) {
+        this.$message.warning("请先注册车牌号或者选中弹出后再提交!");
+        return;
+      }
+      if (!isVehicleNumber(row.capacityNo)) {
+        this.$message.error("请输入正确格式的车牌号!");
+        return;
+      }
+      if (row.capacityIds != 0) {
+        const loading = this.$loading({
+          lock: true,
+          text: "正在变更车牌号",
+          spinner: "el-icon-loading",
+          background: "rgba(0, 0, 0, 0.7)"
+        });
+        console.log("updateCapacityRow:", row);
+        this.axios
+          .post("/api/v1/ams/updateCapacityNumberInFactory", row)
+          .then(res => {
+            if (res.data.code == "200") {
+              this.$message.success("变更车牌号成功!");
+              this.getSteelReport();
+              loading.close();
+            } else {
+              this.$message.success("变更失败,请联系管理员");
+              this.getSteelReport();
+              loading.close();
+            }
+          })
+          .catch(() => {
+            this.$message.success("变更失败,请联系管理员");
+            this.getSteelReport();
+            loading.close();
+          });
+      } else {
+        if (row.carrierIds == 0) {
+          this.$message.error("请先选择承运商!");
+          return;
+        }
+        if (row.sendStation == null || row.sendStation == "") {
+          this.$message.error("请先选择发站");
+          return;
+        }
+        row.driverTel = row.capacityTel;
+        row.capacityNumber = row.capacityNo;
+        let arr = [];
+        arr.push(row);
+        if (arr[0].sendStation == "达州站") {
+          arr.forEach(item => {
+            item.lineId = this.lineDazhou[arr.length];
+            item.lineName = "达州站";
+          });
+        } else if (arr[0].sendStation == "专用线") {
+          arr.forEach(item => {
+            item.lineId = this.lineZhuanxian[arr.length];
+            item.lineName = "专用线";
+          });
+        } else {
+          console.log("没有该发站的线路");
+          this.$message.error("未匹配到线路,请联系管理员");
+          this.getSteelReport();
+          return;
+        }
+        let map = {
+          sendStationId: row.sendStationId,
+          saleOrderId: row.saleOrderId,
+          mapList: arr
+        };
+        console.log("map", map);
+        if (!map.saleOrderId || !map.sendStationId || !map.mapList) {
+          this.$message.warning("数据异常,请确认已选发站");
+          return;
+        }
+        console.log("map:", map);
+        const loading = this.$loading({
+          lock: true,
+          text: "正在派车",
+          spinner: "el-icon-loading",
+          background: "rgba(0, 0, 0, 0.7)"
+        });
+        this.axios
+          .post("/api/v1/ams/dispatchInwardTruckOrderBySale", map)
+          .then(res => {
+            if (res.data.code == "200") {
+              this.$message.success("派车成功!");
+              this.getSteelReport();
+              loading.close();
+            } else {
+              this.$message.error("派车失败,请联系管理员");
+              this.getSteelReport();
+              loading.close();
+            }
+          })
+          .catch(() => {
+            this.$message.error("派车失败,请联系管理员");
+            this.getSteelReport();
+            loading.close();
+          });
+      }
+    },
+
+    //多拼派车
+    updateMulCapacity() {
+      let i = 0;
+      if (this.capacityId == null) {
+        this.$message.error("请选择车牌号后再派发");
+        return;
+      }
+      this.selection.forEach(item => {
+        item.isIwardSteel = 4;
+        item.saleOrderMaterialId = item.saleOrderId;
+        item.capacityNumber = this.capacityNumber;
+      });
+      if (this.selection[0].sendStation == "达州站") {
+        this.selection.forEach(item => {
+          item.lineId = this.lineDazhou[this.selection.length];
+          item.lineName = "达州站";
+        });
+      } else if (this.selection[0].sendStation == "专用线") {
+        this.selection.forEach(item => {
+          item.lineId = this.lineZhuanxian[this.selection.length];
+          item.lineName = "专用线";
+        });
+      } else {
+        console.log("没有该发站的线路");
+        this.$message.error("未匹配到线路,请联系管理员");
+        this.getSteelReport();
+        return;
+      }
+      let map = {
+        sendStationId: this.selection[0].sendStationId,
+        saleOrderId: this.selection[0].saleOrderId,
+        mapList: this.selection
+      };
+      console.log("map", map);
+      if (!map.saleOrderId || !map.sendStationId || !map.mapList) {
+        this.$message.warning("数据异常,请确认已选发站");
+        return;
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: "正在派车",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      this.axios
+        .post("/api/v1/ams/dispatchInwardTruckOrderBySale", map)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("派车成功!");
+            this.getSteelReport();
+            loading.close();
+            this.capacityId = null;
+            this.dialogTableVisible = false;
+          } else {
+            this.$message.error("派车失败,请联系管理员");
+            this.getSteelReport();
+            loading.close();
+            this.capacityId = null;
+            this.dialogTableVisible = false;
+          }
+        })
+        .catch(() => {
+          this.$message.error("派车失败,请联系管理员");
+          this.getSteelReport();
+          loading.close();
+          this.capacityId = null;
+          this.dialogTableVisible = false;
+        });
+    },
+
+    //修改司机电话号码
+    updateDriverTel(row) {
+      const loading = this.$loading({
+        lock: true,
+        text: "修改电话号码中",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      if (row.capacityTel == null || row.capacityTel == "") {
+        this.$message.error("电话号码不能为空");
+        return;
+      }
+      this.axios
+        .post("/api/v1/uc/updateDriverTel", {
+          orderId: parseInt(row.orderId),
+          driverTel: row.capacityTel
+        })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改成功");
+            this.getSteelReport();
+            loading.close();
+          } else {
+            this.$message.error("修改失败");
+            this.getSteelReport();
+            loading.close();
+          }
+        })
+        .catch(() => {
+          this.$message.error("修改失败");
+          this.getSteelReport();
+          loading.close();
+        });
+    },
+    //关闭车辆金蝶分录
+    deleteEasEntryId(row) {
+      this.$confirm("确定关闭该车金蝶分录吗?", "提示", {
+        confirmButtonText: "是",
+        cancelButtonText: "否",
+        center: true,
+        type: "warning"
+      })
+        .then(() => {
+          let map = row;
+          map.isCloseEas = Number(0);
+          const loading = this.$loading({
+            lock: true,
+            text: "正在关闭车辆",
+            spinner: "el-icon-loading",
+            background: "rgba(0, 0, 0, 0.7)"
+          });
+          this.axios
+            .post("/api/v1/ams/updateCarAddress", map)
+            .then(res => {
+              if (res.data.code == "200") {
+                this.$message.success("关闭车辆成功");
+                this.getSteelReport();
+                loading.close();
+              } else {
+                this.$message.error("关闭车辆失败");
+                this.getSteelReport();
+                loading.close();
+              }
+            })
+            .catch(() => {
+              this.$message.error("关闭车辆失败");
+              this.getSteelReport();
+              loading.close();
+            });
+        })
+        .catch(() => {
+          this.$message.info("取消关闭");
+        });
+    },
+    //修改承运商授权
+    updateTruckCarrier(row) {
+      if (!row.saleOrderMaterialId) {
+        row.saleOrderMaterialId = row.saleOrderId;
+      }
+      if (row.newCarrierId == null) {
+        this.$message.warning("请注册承运商或者选中弹出层之后再提交!");
+        this.getSteelReport();
+        return;
+      }
+      console.log("carrierIdRow:", row);
+      if (row.carrierIds != 0) {
+        const loading = this.$loading({
+          lock: true,
+          text: "正在修改承运商授权",
+          spinner: "el-icon-loading",
+          background: "rgba(0, 0, 0, 0.7)"
+        });
+        this.axios
+          .post("/api/v1/ams/updateTruckNoCarrier", row)
+          .then(res => {
+            if (res.data.code == "200") {
+              this.$message.success("修改承运商授权成功");
+              this.getSteelReport();
+              loading.close();
+            } else {
+              this.$message.error("修改失败,请联系管理员!");
+              this.getSteelReport();
+              loading.close();
+            }
+          })
+          .catch(() => {
+            this.$message.error("修改失败,请联系管理员!");
+            this.getSteelReport();
+            loading.close();
+          });
+      } else {
+        //授权承运商
+        let arr = [];
+        arr.push(row);
+        const loading = this.$loading({
+          lock: true,
+          text: "正在授权承运商",
+          spinner: "el-icon-loading",
+          background: "rgba(0, 0, 0, 0.7)"
+        });
+        this.axios
+          .post("/api/v1/ams/dispatchToCarrier", arr)
+          .then(res => {
+            if (res.data.code == "0") {
+              this.$message.success("授权承运商成功");
+              this.getSteelReport();
+              loading.close();
+            } else {
+              this.$message.error("授权失败,请联系管理员");
+              this.getSteelReport();
+              loading.close();
+            }
+          })
+          .catch(() => {
+            this.$message.error("授权失败,请联系管理员");
+            this.getSteelReport();
+            loading.close();
+          });
+      }
+    },
+
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          data[i].group = i;
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (
+            data[i].orderId === data[i - 1].orderId &&
+            data[i].orderId != null &&
+            data[i - 1].orderId != null
+          ) {
+            this.spanArr[this.pos] += 1;
+            data[i].group = data[i - 1].group;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+            data[i].group = data[i - 1].group + 1;
+          }
+        }
+        this.totalCapacity = data[data.length - 1].group + 1;
+        this.totalNumber = data.reduce(function(prev, item) {
+          return prev + item.materialNum;
+        }, 0);
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.includes(column.property)) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+    // //减少物资件数
+    // updateBillOrder(row) {
+    //   const loading = this.$loading({
+    //     lock: true,
+    //     text: "修改物资件数中",
+    //     spinner: "el-icon-loading",
+    //     background: "rgba(0, 0, 0, 0.7)"
+    //   });
+    //   let map = {
+    //     materialId: row.materialId,
+    //     materialNum: row.materialNum
+    //   };
+    //   let arr = [];
+    //   arr.push(map);
+    //   let updateMap = {
+    //     orderId: row.orderId,
+    //     saleOrderId: row.saleOrderId,
+    //     saleOrderMaterialId: row.saleOrderMaterialId,
+    //     mapList: arr
+    //   };
+    //   this.axios
+    //     .post("/api/v1/oms/updateMaterialMes", updateMap)
+    //     .then(res => {
+    //       if (res.data.code == "200") {
+    //         this.$message.success("修改物资数量成功");
+    //         this.getSteelReport();
+    //         loading.close();
+    //       } else {
+    //         this.$message.error("修改物资数量失败,请联系管理员");
+    //         this.getSteelReport();
+    //         loading.close();
+    //       }
+    //     })
+    //     .catch(() => {
+    //       this.$message.error("修改物资数量失败,请联系管理员");
+    //       this.getSteelReport();
+    //       loading.close();
+    //     });
+    // },
+    //关闭单条分录
+    closeEasEntryId(row) {
+      console.log(row);
+      this.$prompt("确定关闭该条分录吗?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        center: true,
+        inputPlaceholder: "请输入关闭理由"
+      })
+        .then(({ value }) => {
+          if (value != null || value != "") {
+            const loading = this.$loading({
+              lock: true,
+              text: "正在关闭该条分录",
+              spinner: "el-icon-loading",
+              background: "rgba(0, 0, 0, 0.7)"
+            });
+            let map = {
+              orderId: row.orderId,
+              saleOrderMaterialId: row.saleOrderMaterialId,
+              saleMaterialId: row.saleMaterialId,
+              reason: value,
+              number: row.saleOrderNo,
+              closeEntryId: row.closeEntryId
+            };
+            this.axios
+              .post("/api/v1/ams/closeSteelMaterialId", map)
+              .then(res => {
+                if (res.data.code == "200") {
+                  this.$message.success("关闭成功");
+                  this.getSteelReport();
+                  loading.close();
+                } else {
+                  this.$message.error("关闭失败,请联系管理员");
+                  this.getSteelReport();
+                  loading.close();
+                }
+              })
+              .catch(() => {
+                this.$message.error("关闭失败,请联系管理员");
+                this.getSteelReport();
+                loading.close();
+              });
+          }
+        })
+        .catch(() => {
+          this.$message.info("取消输入");
+        });
+    },
+    //查询,输入查询条件
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      let consigneeName = null;
+      let capacityNo = null;
+      let remark = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      if (this.screen == "收货单位") {
+        consigneeName = this.input;
+      } else if (this.screen == "车牌号") {
+        capacityNo = this.input;
+      } else {
+        remark = this.input;
+      }
+      this.axios
+        .post(
+          "/api/v1/tms/getInwardSaleSteelOrder?startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date() +
+            "&remark=" +
+            remark +
+            "&consigneeName=" +
+            consigneeName +
+            "&capacityNo=" +
+            capacityNo
+        )
+        .then(res => {
+          this.tableData = res.data.data;
+          this.getSpanArr(res.data.data);
+        });
+    },
+    //重新获取表格数据
+    refresh() {
+      this.getSteelReport();
+    },
+    //获取钢材订单报表
+    getSteelReport() {
+      let carrierSsoId = null;
+      let saler = null;
+      this.axios
+        .post(
+          "/api/v1/tms/getInwardSaleSteelOrder?startTime=" +
+            null +
+            "&endTime=" +
+            null +
+            "&i=" +
+            new Date()
+        )
+        .then(res => {
+          this.tableData = res.data.data;
+          this.getSpanArr(res.data.data);
+        });
+    },
+    //控制列自动撑开
+    flexColumnWidth(str, tableData, flag) {
+      // str为该列的字段名(传字符串);tableData为该表格的数据源(传变量);
+      // flag为可选值,可不传该参数,传参时可选'max'或'equal',默认为'max'
+      // flag为'max'则设置列宽适配该列中最长的内容,flag为'equal'则设置列宽适配该列中第一行内容的长度。
+      str = str + "";
+      let columnContent = "";
+      if (
+        !tableData ||
+        !tableData.length ||
+        tableData.length === 0 ||
+        tableData === undefined
+      ) {
+        return;
+      }
+      if (!str || !str.length || str.length === 0 || str === undefined) {
+        return;
+      }
+      if (flag === "equal") {
+        // 获取该列中第一个不为空的数据(内容)
+        for (let i = 0; i < tableData.length; i++) {
+          if (tableData[i][str].length > 0) {
+            columnContent = tableData[i][str] + "";
+            break;
+          }
+        }
+      } else {
+        // 获取该列中最长的数据(内容)
+        let index = 0;
+        for (let i = 0; i < tableData.length; i++) {
+          if (tableData[i][str] === null) {
+            // 当数据为空时跳过本次循环获取下一条数据长度
+            continue;
+          }
+          const now_temp = tableData[i][str] + "";
+          const max_temp = tableData[index][str] + "";
+          if (now_temp.length > max_temp.length) {
+            index = i;
+          }
+        }
+        columnContent = tableData[index][str] + "";
+      } // 以下分配的单位长度可根据实际需求进行调整
+      let flexWidth = 0;
+      if (columnContent != undefined) {
+        for (const char of columnContent) {
+          if ((char >= "A" && char <= "Z") || (char >= "a" && char <= "z")) {
+            // 如果是英文字符,为字符分配10个单位宽度
+            flexWidth += 10;
+          } else if (char >= "\u4e00" && char <= "\u9fa5") {
+            // 如果是中文字符,为字符分配16个单位宽度
+            flexWidth += 14;
+          } else {
+            // 其他种类字符,为字符分配10个单位宽度
+            flexWidth += 10;
+          }
+        }
+      }
+      if (flexWidth < 80) {
+        // 设置最小宽度
+        flexWidth = 80;
+      }
+      if (flexWidth > 500) {
+        // 设置最大宽度
+        flexWidth = 500;
+      }
+      return flexWidth + "px";
+    },
+    //多拼弹出层
+    showDialog() {
+      let selection = this.$refs.tableRef.selection;
+      console.log("selection", selection);
+      if (selection && selection.length > 0) {
+        if (
+          selection.find(
+            item =>
+              item.lineId != selection[0].lineId ||
+              item.saleOrderId != selection[0].saleOrderId
+          )
+        ) {
+          this.$message({
+            message: "无法生成多拼,订单或者线路不一致",
+            type: "warning"
+          });
+          return;
+        } else if (!selection[0].sendStationId) {
+          this.$message({
+            message: "无法生成多拼,请先选择发站",
+            type: "warning"
+          });
+          return;
+        }
+        this.dialogTableVisible = true;
+        this.selection = selection;
+        this.capacityNo = selection[0].capacityNo;
+      } else {
+        this.$message({
+          message: "请先勾选再生成多拼",
+          type: "warning"
+        });
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.purchasFuelNewMonitor {
+  .tableTop {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .address {
+    .button-box {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+  }
+}
+</style>

+ 25 - 1
src/views/inward/router/index.js

@@ -46,6 +46,7 @@ import wagonPlease from "@/views/inward/components/offsetSteel/truckTrain/wagonP
 
 //内转钢材到异地库--分派订单
 import saleTruckOrder from "@/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckOrder.vue";
+import saleTruckPreview from "@/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckPreview.vue";
 
 //内转钢材到异地库--火车运输--批车作业
 import wagonApprove from "@/views/inward/components/offsetSteel/truckTrain/wagonApprove.vue";
@@ -168,6 +169,11 @@ import inwardWeightTimeDetailsOrder from "../components/inwardSettlement/inwardA
 //继续分解采购内转需求订单
 import addPurInwardOrderCon from "@/views/inward/components/truckOrder/addPurInwardOrderCon";
 
+//内转火车发运明细
+import platformStockInfo from "@/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue";
+
+//库存调拨单浏览
+import kucunList from "@/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue";
 Vue.use(Router);
 
 const constantRouterMap = [
@@ -321,13 +327,19 @@ const constantRouterMap = [
         meta: { code: "xtpzgl-yhgl" },
         component: trainUnload
       },
-      
+
       {
         path: "saleTruckOrder",
         name: "saleTruckOrder",
         meta: { code: "xtpzgl-yhgl" },
         component: saleTruckOrder
       },
+      {
+        path: "saleTruckPreview",
+        name: "saleTruckPreview",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleTruckPreview
+      },
       {
         path: "daZhouEnFactoryResult",
         name: "daZhouEnFactoryResult",
@@ -640,6 +652,18 @@ const constantRouterMap = [
         name: "addPurInwardOrderCon",
         meta: { code: "xtpzgl-yhgl" },
         component: addPurInwardOrderCon
+      },
+      {
+        path: "platformStockInfo",
+        name: "platformStockInfo",
+        meta: { code: "xtpzgl-yhgl" },
+        component: platformStockInfo
+      },
+      {
+        path: "kucunList",
+        name: "kucunList",
+        meta: { code: "xtpzgl-yhgl" },
+        component: kucunList
       }
     ]
   }

+ 3 - 4
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -5,7 +5,7 @@
       <el-form :inline="true" style="margin-top: 1rem;">
         <el-form-item>
           <el-input
-            v-model="capacityNo"
+            v-model.trim="capacityNo"
             style="width:250px"
             placeholder="输入车牌号查询"
             clearable
@@ -159,14 +159,13 @@
 
             <el-table-column prop="gatepostName" label="进厂门岗">
             </el-table-column>
-
-            <!-- <el-table-column fixed="right" label="操作" width="100">
+            <el-table-column fixed="right" label="操作" width="100">
               <template slot-scope="scope">
                 <el-button type="text" size="mini" @click="updateBill(scope)">
                   修改提货单
                 </el-button>
               </template>
-            </el-table-column> -->
+            </el-table-column>
           </el-table>
         </el-tab-pane>
         <el-tab-pane label="多拼车辆排队链表" name="second">

+ 2 - 0
src/views/queue/components/qmsEnFacotory/updateBill.vue

@@ -148,6 +148,7 @@ export default {
           this.consigneeCompanyName = res.data.data.consigneeCompanyName;
           this.receiveAddressName = res.data.data.receiveAddressName;
           this.shipperName = res.data.data.shipperName;
+          this.saleOrderId = res.data.data.saleOrderId;
         });
     },
     changeMaterial() {
@@ -248,6 +249,7 @@ export default {
       }
       let updateNumMap = {
         orderId: this.orderId,
+        saleOrderId: this.saleOrderId,
         mapList: this.materialList
       };
       this.axios

+ 312 - 245
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue

@@ -3,98 +3,142 @@
   <div class="steel_inbound">
     <div class="sache">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
     <div class="table">
       <el-tabs v-model="activeName">
         <!-- 未结算 -->
         <el-tab-pane label="未结算" name="first">
-        <dilTable v-bind.sync="options1">
+          <dilTable v-bind.sync="options1">
             <el-table-column fixed="right" label="操作" width="145">
-                <template slot-scope="scope">
-                  <el-button v-if="ssoId==null" type="text" size="small" @click="priceValueUpdate(scope.row)">修改详单地址</el-button>
-                  <!-- <el-button type="text" size="mini" @click="getclick(scope)">查看</el-button> -->
-                  <el-button type="text" size="mini" @click="addDamage(scope.row)">增加途损</el-button>
-                </template>
+              <template slot-scope="scope">
+                <el-button
+                  v-if="ssoId == null"
+                  type="text"
+                  size="small"
+                  @click="priceValueUpdate(scope.row)"
+                  >修改详单地址</el-button
+                >
+                <!-- <el-button type="text" size="mini" @click="getclick(scope)">查看</el-button> -->
+                <el-button type="text" size="mini" @click="addDamage(scope.row)"
+                  >增加途损</el-button
+                >
+              </template>
             </el-table-column>
-        </dilTable>
+          </dilTable>
         </el-tab-pane>
         <!-- 已结算 -->
         <el-tab-pane label="已结算" name="second">
-        <dilTable v-bind.sync="options2">
+          <dilTable v-bind.sync="options2">
             <!-- <el-table-column fixed="right" label="操作" width="40">
                 <template slot-scope="scope">
                   <el-button type="text" size="mini" @click="getclick(scope)">查看</el-button>
                 </template>
             </el-table-column> -->
-        </dilTable>
+          </dilTable>
         </el-tab-pane>
       </el-tabs>
     </div>
     <!-- 修改详单单价弹出框 -->
-    <el-dialog title="修改详单地址" :visible.sync="dialogFormVisible" append-to-body>
+    <el-dialog
+      title="修改详单地址"
+      :visible.sync="dialogFormVisible"
+      append-to-body
+    >
       <!-- 内层单价选择弹出框 -->
       <el-dialog
-      width="40%"
-      title="地址筛选"
-      :visible.sync="addressDrawer"
-      append-to-body>
-
-      <el-input v-model="addresText" placeholder="请输入内容" style="margin-top: 10px; margin-left: 20px; width: 250px"></el-input>
-        <el-button type="primary" @click="selectAddresClick" :loading="selectLineLoading"><i class="el-icon-search"></i>查询</el-button>
-         <!-- 已选中 省市(区)县 -->
-         <el-form :inline="true" style="margin-top: 0.5rem;">
+        width="40%"
+        title="地址筛选"
+        :visible.sync="addressDrawer"
+        append-to-body
+      >
+        <el-input
+          v-model="addresText"
+          placeholder="请输入内容"
+          style="margin-top: 10px; margin-left: 20px; width: 250px"
+        ></el-input>
+        <el-button
+          type="primary"
+          @click="selectAddresClick"
+          :loading="selectLineLoading"
+          ><i class="el-icon-search"></i>查询</el-button
+        >
+        <!-- 已选中 省市(区)县 -->
+        <el-form :inline="true" style="margin-top: 0.5rem;">
           <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">已选中省市县(区):</label>
+            <label class="el-form-item__label" style="width: auto;"
+              >已选中省市县(区):</label
+            >
           </el-form-item>
           <el-form-item>
-              <el-input class="el-form-item__content" v-model="address" placeholder="请输入内容" :disabled="true"></el-input>
+            <el-input
+              class="el-form-item__content"
+              v-model="address"
+              placeholder="请输入内容"
+              :disabled="true"
+            ></el-input>
           </el-form-item>
-         </el-form>
-         <!-- 具体收货地址 -->
-         <div v-if="address != null">
-           <el-form :inline="true" style="margin-top: 0.5rem;" >
+        </el-form>
+        <!-- 具体收货地址 -->
+        <div v-if="address != null">
+          <el-form :inline="true" style="margin-top: 0.5rem;">
+            <el-form-item label="具体收货地址:">
+              <el-autocomplete
+                class="inline-input"
+                v-model="place"
+                :fetch-suggestions="querySearch1"
+                placeholder="请输入具体收货地址"
+                :trigger-on-focus="false"
+                @select="handleSelect1"
+              >
+              </el-autocomplete>
+            </el-form-item>
 
-          <el-form-item label="具体收货地址:">
-            <el-autocomplete
-              class="inline-input"
-              v-model="place"
-              :fetch-suggestions="querySearch1"
-              placeholder="请输入具体收货地址"
-              :trigger-on-focus="false"
-              @select="handleSelect1"
-            >
-            </el-autocomplete>
-          </el-form-item> 
-
-          <el-button type="primary" @click="addAddressClick">确定</el-button>
-         </el-form>
-         </div>
+            <el-button type="primary" @click="addAddressClick">确定</el-button>
+          </el-form>
+        </div>
 
-      <div class="tablecls">
-        <!-- 查询所有的运输单价 -->
-        <dilTable
-          v-bind.sync="Address"
-          @radio-change="currentRadioChange2"
-        ></dilTable>
-      </div>
+        <div class="tablecls">
+          <!-- 查询所有的运输单价 -->
+          <dilTable
+            v-bind.sync="Address"
+            @radio-change="currentRadioChange2"
+          ></dilTable>
+        </div>
       </el-dialog>
       <!-- 内层单价选择弹出框 -->
 
       <el-form>
         <el-form-item label="原详单地址" :label-width="formLabelWidth">
-          <el-input style="width:250px" v-model="originalAddress" disabled></el-input>
+          <el-input
+            style="width:250px"
+            v-model="originalAddress"
+            disabled
+          ></el-input>
           <label>原单价</label>
-          <el-input style="width:100px" v-model="originalPriceValue" disabled></el-input>
-          
+          <el-input
+            style="width:100px"
+            v-model="originalPriceValue"
+            disabled
+          ></el-input>
         </el-form-item>
         <el-form-item label="新详单地址" :label-width="formLabelWidth">
-          <el-input style="width:250px" v-model="newAddress" disabled></el-input>
+          <el-input
+            style="width:250px"
+            v-model="newAddress"
+            disabled
+          ></el-input>
           <label>现单价</label>
-          <el-input style="width:100px" v-model="newPriceValue" disabled></el-input>
-          <el-button type="primary" placeholder="()" @click="select">浏览</el-button>
+          <el-input
+            style="width:100px"
+            v-model="newPriceValue"
+            disabled
+          ></el-input>
+          <el-button type="primary" placeholder="()" @click="select"
+            >浏览</el-button
+          >
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -103,129 +147,144 @@
       </div>
     </el-dialog>
     <!-- 增加途损 -->
-      <el-dialog title="增加途损" width="30%" :visible.sync="dialogDamage">
-    <el-form>
-      <el-form-item label="达钢的干基" :label-width="formLabelWidth">
-        <el-input v-model="DaDryBasis"></el-input>
-      </el-form-item>
-      <el-form-item label="九江收货的干基" :label-width="formLabelWidth">
-        <el-input v-model="JiuDryBasis"></el-input>
-      </el-form-item>
-      <el-form-item label="单价" :label-width="formLabelWidth">
-        <el-input v-model="Fee"></el-input>
-      </el-form-item>
-    </el-form>
-    <div slot="footer" class="dialog-footer">
-      <el-button @click="dialogDamage = false">取 消</el-button>
-      <el-button type="primary" @click="makeSureAdd">确 定</el-button>
-    </div>
+    <el-dialog title="增加途损" width="30%" :visible.sync="dialogDamage">
+      <el-form>
+        <el-form-item label="达钢的干基" :label-width="formLabelWidth">
+          <el-input v-model="DaDryBasis"></el-input>
+        </el-form-item>
+        <el-form-item label="九江收货的干基" :label-width="formLabelWidth">
+          <el-input v-model="JiuDryBasis"></el-input>
+        </el-form-item>
+        <el-form-item label="单价" :label-width="formLabelWidth">
+          <el-input v-model="Fee"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogDamage = false">取 消</el-button>
+        <el-button type="primary" @click="makeSureAdd">确 定</el-button>
+      </div>
     </el-dialog>
-
   </div>
 </template>
 
 <script>
 import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
+  data() {
+    return {
       //已选中 省市县(区)
-      address:null,
+      address: null,
       //具体收货地址
-      place:null,
+      place: null,
       //收货地址id
-      addressId:null,
+      addressId: null,
       //省市县(区)查询值
-      addresText:null,
+      addresText: null,
       //达钢的干基
-      DaDryBasis:null,
+      DaDryBasis: null,
       //九江收货的干基
-      JiuDryBasis:null,
+      JiuDryBasis: null,
       //单价
-      Fee:null,
+      Fee: null,
       //途损费
-      damageFee:null,
+      damageFee: null,
       //加载
-      selectLineLoading:false,
-      input:"",
-      activeName:"first",
-      ssoId:null,
+      selectLineLoading: false,
+      input: "",
+      activeName: "first",
+      ssoId: null,
       //详单Id
-      detailsId:null,
-      options1:{
+      detailsId: null,
+      options1: {
         // first请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
-      options2:{
+      options2: {
         // second请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
       //是否打开修改详单地址弹出框
-      dialogFormVisible:false,
+      dialogFormVisible: false,
       //是否打开增加途损弹出框
-      dialogDamage:false,
+      dialogDamage: false,
       //原详单单价
-      originalPriceValue:null,
+      originalPriceValue: null,
       //新详单单价
-      newPriceValue:null,
+      newPriceValue: null,
       //原详单地址
-      originalAddress:null,
+      originalAddress: null,
       //新详单地址
-      newAddress:null,
+      newAddress: null,
       //新单价Id
-      priceId:null,
+      priceId: null,
       //是否打开运输单价的模态框
-      addressDrawer:false,
+      addressDrawer: false,
       //运输单价的表格
       Address: {
         requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       // addressText:null,
       //缓存当前选中的运输单价
-      priceMap:{},
-      formLabelWidth: '125px'
-    }
+      priceMap: {},
+      formLabelWidth: "125px"
+    };
   },
-  created(){
-     this.options1GetRequestUrl();
-     this.options2GetRequestUrl();
+  created() {
+    this.options1GetRequestUrl();
+    this.options2GetRequestUrl();
   },
-  methods:{
-    //已结算数据
-    options1GetRequestUrl(){
-    if(getCookie("orgCode") == "chengyunshang"){
-      this.ssoId=getCookie('userId');
-      this.options1.requestUrl = "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&carrierSsoId="+ getCookie('userId');
-    }else{
-      this.options1.requestUrl = "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&carrierSsoId=" + this.ssoId;
-    }
-    },
+  methods: {
     //未结算数据
-    options2GetRequestUrl(){
-    if(getCookie("orgCode") == "chengyunshang"){
-      this.options2.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId="+ getCookie('userId');
-    }else{
-      this.options2.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" + this.ssoId;
-    }
+    options1GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options1.requestUrl =
+          "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
+          getCookie("userId");
+      } else {
+        this.options1.requestUrl =
+          "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
+          this.ssoId;
+      }
+    },
+    //已结算数据
+    options2GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.options2.requestUrl =
+          "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
+          getCookie("userId");
+      } else {
+        this.options2.requestUrl =
+          "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
+          this.ssoId;
+      }
     },
     //收货地址弹出层
     handleSelect1(item) {
-        console.log("获取所有下拉值!");
+      console.log("获取所有下拉值!");
     },
     //查询全国省市县
-    selectAddresClick(){
-      if(this.addresText){
-        this.Address.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con="+this.addresText;
-      }else{
-        this.Address.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
+    selectAddresClick() {
+      if (this.addresText) {
+        this.Address.requestUrl =
+          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+          this.addresText;
+      } else {
+        this.Address.requestUrl =
+          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
       }
     },
     //以下是收货地址边输边查搜索
-    querySearch1(queryString, cb){
+    querySearch1(queryString, cb) {
       this.axios
-        .post("/api/v1/ams/getRealAddressByLike?addressId="+this.addressId + "&index=" + queryString)
-        .then((res) => {
+        .post(
+          "/api/v1/ams/getRealAddressByLike?addressId=" +
+            this.addressId +
+            "&index=" +
+            queryString
+        )
+        .then(res => {
           if (res.data.code == "200") {
             var restaurants = res.data.data;
             var results = queryString
@@ -237,7 +296,7 @@ export default {
         });
     },
     createFilter1(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -245,172 +304,180 @@ export default {
       };
     },
     //以上是收货地址边输边查搜索
-
-     toInsert() {
+    toInsert() {
       this.$router.push("/insertCheckInventory");
     },
     // getclick(scope){
-		//   this.$router.push("/getTransportResult/"+scope.row.orderId)
-	  // },
+    //   this.$router.push("/getTransportResult/"+scope.row.orderId)
+    // },
     //增加途损
-    addDamage(row){
+    addDamage(row) {
       this.detailsId = row.detailsId;
       this.dialogDamage = true;
     },
-    makeSureAdd(){
-      if(!this.DaDryBasis){
-        this.$message.error('达钢的干基还未填!')
-      }else if(!this.JiuDryBasis){
-        this.$message.error('九江收货的干基还未填!')
-      }else if(!this.Fee){
-        this.$message.error('单价还未填!')
-      }else{
+    makeSureAdd() {
+      if (!this.DaDryBasis) {
+        this.$message.error("达钢的干基还未填!");
+      } else if (!this.JiuDryBasis) {
+        this.$message.error("九江收货的干基还未填!");
+      } else if (!this.Fee) {
+        this.$message.error("单价还未填!");
+      } else {
         this.dialogDamage = false;
         //计算途损 [(达钢的干基-九江收货的干基)/达钢的干基 - 0.03] * 单价 > 0, 扣除途损
-        this.damageFee = ((this.DaDryBasis - this.JiuDryBasis) / this.DaDryBasis - 0.03) * this.Fee;
-        if(this.damageFee>0){
+        this.damageFee =
+          ((this.DaDryBasis - this.JiuDryBasis) / this.DaDryBasis - 0.03) *
+          this.Fee;
+        if (this.damageFee > 0) {
           let map = {
-        detailsId: this.detailsId,
-        lossFees: this.damageFee.toFixed(2)
-        }
-        //是否确定增加途损费!
+            detailsId: this.detailsId,
+            lossFees: this.damageFee.toFixed(2)
+          };
+          //是否确定增加途损费!
           this.$confirm("是否确定增加途损费", "提示", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning",
-            center: true,
-          })
-          .then(() => {
-            //初始化增加途损费对话框中的信息
-            this.damageFee=null,
-            this.axios.post('/api/v1/bms/addLossFeeOfCoke',map).then((res)=>{
-                if(res.data.code == '0'){
-                this.$message.success('增加途损费成功!')
-                //重置未结算详单表单信息
-                this.options1.requestUrl = "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" + new Date();
-              }else{
-                this.$message.error('增加途损费失败,请联系管理员!')
-              }
-            });
+            center: true
           })
-          .catch(() => {
-            this.$message({
-              type: "info",
-              message: "取消修改详单单价!",
+            .then(() => {
+              //初始化增加途损费对话框中的信息
+              (this.damageFee = null),
+                this.axios
+                  .post("/api/v1/bms/addLossFeeOfCoke", map)
+                  .then(res => {
+                    if (res.data.code == "0") {
+                      this.$message.success("增加途损费成功!");
+                      //重置未结算详单表单信息
+                      this.options1.requestUrl =
+                        "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" +
+                        new Date();
+                    } else {
+                      this.$message.error("增加途损费失败,请联系管理员!");
+                    }
+                  });
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "取消修改详单单价!"
+              });
             });
-          });
         }
       }
-      
     },
-    onclick(){
-      console.log("查询待定值")
+    onclick() {
+      console.log("查询待定值");
       // this.options.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=1&con="+this.input;
     },
     //修改详单单价
-    priceValueUpdate(row){
+    priceValueUpdate(row) {
       this.originalAddress = row.realAddress;
       this.originalPriceValue = row.priceValue;
       this.detailsId = row.detailsId;
-      this.dialogFormVisible = true
+      this.dialogFormVisible = true;
     },
     //运输订单点击浏览的事件
-    select(){
+    select() {
       this.addressDrawer = true;
     },
     //运输单价模态窗口的框计算
-    selectAddressClick(){
-      this.Price.requestUrl = '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con='+this.addressText;
+    selectAddressClick() {
+      this.Price.requestUrl =
+        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+        this.addressText;
     },
     //运输单价模态窗口的点击事件
-    addAddressClick(){
+    addAddressClick() {
       //获取运输单价和运输单价ID
       let map = {
         place: this.place,
         addressId: this.addressId
-      }
-      this.axios.post('/api/v1/ams/getPriceMap',map)
-      .then((res)=>{
-          if(res.data.data.priceId==-1){
-            this.newPriceValue = '未录单价!';
-            this.priceId = null;
-          }else{
-            //赋值运输单价和运输单价ID
-            this.newPriceValue = res.data.data.priceValue;//this.priceMap.priceValue
-            this.priceId = res.data.data.priceId;//this.priceMap.priceId
-          }
+      };
+      this.axios.post("/api/v1/ams/getPriceMap", map).then(res => {
+        if (res.data.data.priceId == -1) {
+          this.newPriceValue = "未录单价!";
+          this.priceId = null;
+        } else {
+          //赋值运输单价和运输单价ID
+          this.newPriceValue = res.data.data.priceValue; //this.priceMap.priceValue
+          this.priceId = res.data.data.priceId; //this.priceMap.priceId
+        }
       });
       //priceMap
-      this.newAddress = this.address+this.place;
+      this.newAddress = this.address + this.place;
       this.addressDrawer = false;
     },
     //运输单价模态框单选选中的事件
-    currentRadioChange2(val){
+    currentRadioChange2(val) {
       //若具体地址有值,清空值
-      if(this.place!=null){
-        this.place=null;
+      if (this.place != null) {
+        this.place = null;
       }
-      this.address = val.address,
-      this.addressId = val.addressId;
+      (this.address = val.address), (this.addressId = val.addressId);
       // this.priceMap = {};
       // this.priceMap = val;
     },
     //确认修改详单单价
-    makeSure(){
+    makeSure() {
       //若没有单价Id
-      if(this.priceId==null){
-        this.$message.error('该区域没有录入单价,不可修改!')
-      }else{
-      this.dialogFormVisible = false;
-      let mapValue = {
-        detailsId: this.detailsId,
-        priceId: this.priceId
-      }
-      //是否确定修改详单地址!
-      this.$confirm("是否确定修改详单地址", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-      .then(() => {
-        //初始化修改详单地址对话框的信息
-        this.newPriceValue=null,
-        this.newAddress=null,
-        this.address=null,
-        this.addresText=null,
-        this.addressId=null,
-        this.priceId=null,
-        this.axios.post('/api/v1/bms/updateDetailsOrder',mapValue).then((res)=>{
-            if(res.data.code == '0'){
-            this.$message.success('修改详单单价成功!')
-            //重置未结算详单表单信息
-            this.options1.requestUrl = "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" + new Date();
-          }else{
-            this.$message.error('修改详单单价失败,请联系管理员!')
-          }
-        });
-      })
-      .catch(() => {
-        this.$message({
-          type: "info",
-          message: "取消修改详单单价!",
-        });
-      });
+      if (this.priceId == null) {
+        this.$message.error("该区域没有录入单价,不可修改!");
+      } else {
+        this.dialogFormVisible = false;
+        let mapValue = {
+          detailsId: this.detailsId,
+          priceId: this.priceId
+        };
+        //是否确定修改详单地址!
+        this.$confirm("是否确定修改详单地址", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+          center: true
+        })
+          .then(() => {
+            //初始化修改详单地址对话框的信息
+            (this.newPriceValue = null),
+              (this.newAddress = null),
+              (this.address = null),
+              (this.addresText = null),
+              (this.addressId = null),
+              (this.priceId = null),
+              this.axios
+                .post("/api/v1/bms/updateDetailsOrder", mapValue)
+                .then(res => {
+                  if (res.data.code == "0") {
+                    this.$message.success("修改详单单价成功!");
+                    //重置未结算详单表单信息
+                    this.options1.requestUrl =
+                      "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" +
+                      new Date();
+                  } else {
+                    this.$message.error("修改详单单价失败,请联系管理员!");
+                  }
+                });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "取消修改详单单价!"
+            });
+          });
       }
     }
   }
-}
+};
 </script>
 
 <style lang="scss" scode>
-.steel_inbound{
-  .sache{
+.steel_inbound {
+  .sache {
     padding: 1.25rem 0.375rem;
-			.el-input {
-			width: 20%;
-			margin-right: 1.25rem;
-			}
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
   }
 }
-</style>
+</style>

+ 535 - 0
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelDetails.vue

@@ -0,0 +1,535 @@
+// 计费详单
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+        style="width:220px"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="datetime"
+        placeholder="选择日期"
+        style="width:220px"
+      >
+      </el-date-picker>
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出Excel</el-button
+      >
+    </div>
+    <div class="table">
+      <el-tabs v-model="activeName">
+        <!-- 未结算 -->
+        <el-tab-pane label="未结算" name="first">
+          <dilTable v-bind.sync="options1" ref="excelDom">
+            <el-table-column fixed="right" label="操作" width="145">
+              <template slot-scope="scope">
+                <el-button
+                  v-if="ssoId == null"
+                  type="text"
+                  size="small"
+                  @click="priceValueUpdate(scope.row)"
+                  >修改详单地址</el-button
+                >
+                <!-- <el-button type="text" size="mini" @click="getclick(scope)">查看</el-button> -->
+                <el-button type="text" size="mini" @click="addDamage(scope.row)"
+                  >增加途损</el-button
+                >
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已结算 -->
+        <el-tab-pane label="已结算" name="second">
+          <dilTable v-bind.sync="options2">
+            <!-- <el-table-column fixed="right" label="操作" width="40">
+                <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="getclick(scope)">查看</el-button>
+                </template>
+            </el-table-column> -->
+          </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+    <!-- 修改详单单价弹出框 -->
+    <el-dialog
+      title="修改详单地址"
+      :visible.sync="dialogFormVisible"
+      append-to-body
+    >
+      <!-- 内层单价选择弹出框 -->
+      <el-dialog
+        width="40%"
+        title="地址筛选"
+        :visible.sync="addressDrawer"
+        append-to-body
+      >
+        <el-input
+          v-model="addresText"
+          placeholder="请输入内容"
+          style="margin-top: 10px; margin-left: 20px; width: 250px"
+        ></el-input>
+        <el-button
+          type="primary"
+          @click="selectAddresClick"
+          :loading="selectLineLoading"
+          ><i class="el-icon-search"></i>查询</el-button
+        >
+        <!-- 已选中 省市(区)县 -->
+        <el-form :inline="true" style="margin-top: 0.5rem;">
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto;"
+              >已选中省市县(区):</label
+            >
+          </el-form-item>
+          <el-form-item>
+            <el-input
+              class="el-form-item__content"
+              v-model="address"
+              placeholder="请输入内容"
+              :disabled="true"
+            ></el-input>
+          </el-form-item>
+        </el-form>
+        <!-- 具体收货地址 -->
+        <div v-if="address != null">
+          <el-form :inline="true" style="margin-top: 0.5rem;">
+            <el-form-item label="具体收货地址:">
+              <el-autocomplete
+                class="inline-input"
+                v-model="place"
+                :fetch-suggestions="querySearch1"
+                placeholder="请输入具体收货地址"
+                :trigger-on-focus="false"
+                @select="handleSelect1"
+              >
+              </el-autocomplete>
+            </el-form-item>
+
+            <el-button type="primary" @click="addAddressClick">确定</el-button>
+          </el-form>
+        </div>
+
+        <div class="tablecls">
+          <!-- 查询所有的运输单价 -->
+          <dilTable
+            v-bind.sync="Address"
+            @radio-change="currentRadioChange2"
+          ></dilTable>
+        </div>
+      </el-dialog>
+      <!-- 内层单价选择弹出框 -->
+
+      <el-form>
+        <el-form-item label="原详单地址" :label-width="formLabelWidth">
+          <el-input
+            style="width:250px"
+            v-model="originalAddress"
+            disabled
+          ></el-input>
+          <label>原单价</label>
+          <el-input
+            style="width:100px"
+            v-model="originalPriceValue"
+            disabled
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="新详单地址" :label-width="formLabelWidth">
+          <el-input
+            style="width:250px"
+            v-model="newAddress"
+            disabled
+          ></el-input>
+          <label>现单价</label>
+          <el-input
+            style="width:100px"
+            v-model="newPriceValue"
+            disabled
+          ></el-input>
+          <el-button type="primary" placeholder="()" @click="select"
+            >浏览</el-button
+          >
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="makeSure">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 增加途损 -->
+    <el-dialog title="增加途损" width="30%" :visible.sync="dialogDamage">
+      <el-form>
+        <el-form-item label="达钢的干基" :label-width="formLabelWidth">
+          <el-input v-model="DaDryBasis"></el-input>
+        </el-form-item>
+        <el-form-item label="九江收货的干基" :label-width="formLabelWidth">
+          <el-input v-model="JiuDryBasis"></el-input>
+        </el-form-item>
+        <el-form-item label="单价" :label-width="formLabelWidth">
+          <el-input v-model="Fee"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogDamage = false">取 消</el-button>
+        <el-button type="primary" @click="makeSureAdd">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+import { sjTime } from "../../../../ADMINISTRATORS/app";
+export default {
+  data() {
+    return {
+      tableTitle: "销售钢材汽运结算详单",
+      endTime: null,
+      startTime: null,
+      //已选中 省市县(区)
+      address: null,
+      //具体收货地址
+      place: null,
+      //收货地址id
+      addressId: null,
+      //省市县(区)查询值
+      addresText: null,
+      //达钢的干基
+      DaDryBasis: null,
+      //九江收货的干基
+      JiuDryBasis: null,
+      //单价
+      Fee: null,
+      //途损费
+      damageFee: null,
+      //加载
+      selectLineLoading: false,
+      input: "",
+      activeName: "first",
+      ssoId: null,
+      //详单Id
+      detailsId: null,
+      options1: {
+        // first请求数据的地址
+        requestUrl: ""
+      },
+      options2: {
+        // second请求数据的地址
+        requestUrl: ""
+      },
+      //是否打开修改详单地址弹出框
+      dialogFormVisible: false,
+      //是否打开增加途损弹出框
+      dialogDamage: false,
+      //原详单单价
+      originalPriceValue: null,
+      //新详单单价
+      newPriceValue: null,
+      //原详单地址
+      originalAddress: null,
+      //新详单地址
+      newAddress: null,
+      //新单价Id
+      priceId: null,
+      //是否打开运输单价的模态框
+      addressDrawer: false,
+      //运输单价的表格
+      Address: {
+        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
+        selectionType: "radio"
+      },
+      // addressText:null,
+      //缓存当前选中的运输单价
+      priceMap: {},
+      formLabelWidth: "125px"
+    };
+  },
+  created() {
+    this.options1GetRequestUrl();
+    this.options2GetRequestUrl();
+  },
+  methods: {
+    //未结算数据
+    options1GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options1.requestUrl =
+          "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&carrierSsoId=" +
+          getCookie("userId");
+      } else {
+        this.options1.requestUrl =
+          "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&carrierSsoId=" +
+          this.ssoId;
+      }
+    },
+    //已结算数据
+    options2GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.options2.requestUrl =
+          "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&carrierSsoId=" +
+          getCookie("userId");
+      } else {
+        this.options2.requestUrl =
+          "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&carrierSsoId=" +
+          this.ssoId;
+      }
+    },
+    //收货地址弹出层
+    handleSelect1(item) {
+      console.log("获取所有下拉值!");
+    },
+    //查询全国省市县
+    selectAddresClick() {
+      if (this.addresText) {
+        this.Address.requestUrl =
+          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+          this.addresText;
+      } else {
+        this.Address.requestUrl =
+          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
+      }
+    },
+    //以下是收货地址边输边查搜索
+    querySearch1(queryString, cb) {
+      this.axios
+        .post(
+          "/api/v1/ams/getRealAddressByLike?addressId=" +
+            this.addressId +
+            "&index=" +
+            queryString
+        )
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter1(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter1(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是收货地址边输边查搜索
+    toInsert() {
+      this.$router.push("/insertCheckInventory");
+    },
+    // getclick(scope){
+    //   this.$router.push("/getTransportResult/"+scope.row.orderId)
+    // },
+    //增加途损
+    addDamage(row) {
+      this.detailsId = row.detailsId;
+      this.dialogDamage = true;
+    },
+    makeSureAdd() {
+      if (!this.DaDryBasis) {
+        this.$message.error("达钢的干基还未填!");
+      } else if (!this.JiuDryBasis) {
+        this.$message.error("九江收货的干基还未填!");
+      } else if (!this.Fee) {
+        this.$message.error("单价还未填!");
+      } else {
+        this.dialogDamage = false;
+        //计算途损 [(达钢的干基-九江收货的干基)/达钢的干基 - 0.03] * 单价 > 0, 扣除途损
+        this.damageFee =
+          ((this.DaDryBasis - this.JiuDryBasis) / this.DaDryBasis - 0.03) *
+          this.Fee;
+        if (this.damageFee > 0) {
+          let map = {
+            detailsId: this.detailsId,
+            lossFees: this.damageFee.toFixed(2)
+          };
+          //是否确定增加途损费!
+          this.$confirm("是否确定增加途损费", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+            center: true
+          })
+            .then(() => {
+              //初始化增加途损费对话框中的信息
+              (this.damageFee = null),
+                this.axios
+                  .post("/api/v1/bms/addLossFeeOfCoke", map)
+                  .then(res => {
+                    if (res.data.code == "0") {
+                      this.$message.success("增加途损费成功!");
+                      //重置未结算详单表单信息
+                      this.options1.requestUrl =
+                        "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&i=" +
+                        new Date();
+                    } else {
+                      this.$message.error("增加途损费失败,请联系管理员!");
+                    }
+                  });
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "取消修改详单单价!"
+              });
+            });
+        }
+      }
+    },
+    onclick() {
+      console.log("查询待定值");
+      let startTime = null;
+      let endTime = null;
+      let carrierSsoId = null;
+      if (getCookie("orgCode") == "chengyunshang") {
+        carrierSsoId = getCookie("userId");
+      }
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      this.options1.requestUrl =
+        "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&con=" +
+        this.input +
+        "&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&status=0" +
+        "&i=" +
+        new Date();
+      this.options2.requestUrl =
+        "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&con=" +
+        this.input +
+        "&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&status=1" +
+        "&i=" +
+        new Date();
+    },
+    //修改详单单价
+    priceValueUpdate(row) {
+      this.originalAddress = row.realAddress;
+      this.originalPriceValue = row.priceValue;
+      this.detailsId = row.detailsId;
+      this.dialogFormVisible = true;
+    },
+    //运输订单点击浏览的事件
+    select() {
+      this.addressDrawer = true;
+    },
+    //运输单价模态窗口的框计算
+    selectAddressClick() {
+      this.Price.requestUrl =
+        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+        this.addressText;
+    },
+    //运输单价模态窗口的点击事件
+    addAddressClick() {
+      //获取运输单价和运输单价ID
+      let map = {
+        place: this.place,
+        addressId: this.addressId
+      };
+      this.axios.post("/api/v1/ams/getPriceMap", map).then(res => {
+        if (res.data.data.priceId == -1) {
+          this.newPriceValue = "未录单价!";
+          this.priceId = null;
+        } else {
+          //赋值运输单价和运输单价ID
+          this.newPriceValue = res.data.data.priceValue; //this.priceMap.priceValue
+          this.priceId = res.data.data.priceId; //this.priceMap.priceId
+        }
+      });
+      //priceMap
+      this.newAddress = this.address + this.place;
+      this.addressDrawer = false;
+    },
+    //运输单价模态框单选选中的事件
+    currentRadioChange2(val) {
+      //若具体地址有值,清空值
+      if (this.place != null) {
+        this.place = null;
+      }
+      (this.address = val.address), (this.addressId = val.addressId);
+      // this.priceMap = {};
+      // this.priceMap = val;
+    },
+    //确认修改详单单价
+    makeSure() {
+      //若没有单价Id
+      if (this.priceId == null) {
+        this.$message.error("该区域没有录入单价,不可修改!");
+      } else {
+        this.dialogFormVisible = false;
+        let mapValue = {
+          detailsId: this.detailsId,
+          priceId: this.priceId
+        };
+        //是否确定修改详单地址!
+        this.$confirm("是否确定修改详单地址", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+          center: true
+        })
+          .then(() => {
+            //初始化修改详单地址对话框的信息
+            (this.newPriceValue = null),
+              (this.newAddress = null),
+              (this.address = null),
+              (this.addresText = null),
+              (this.addressId = null),
+              (this.priceId = null),
+              this.axios
+                .post("/api/v1/bms/updateDetailsOrder", mapValue)
+                .then(res => {
+                  if (res.data.code == "0") {
+                    this.$message.success("修改详单单价成功!");
+                    //重置未结算详单表单信息
+                    this.options1.requestUrl =
+                      "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" +
+                      new Date();
+                  } else {
+                    this.$message.error("修改详单单价失败,请联系管理员!");
+                  }
+                });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "取消修改详单单价!"
+            });
+          });
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scode>
+.steel_inbound {
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 77 - 0
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelStatement.vue

@@ -0,0 +1,77 @@
+// 计费账单
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="selectBmstruckOrder(scope)"
+            >
+              查看
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="updateBmstruckCheck(scope)"
+            >
+              稽核
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      input: "",
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/bms/getTruckStatementList?apiId=179"
+      }
+    };
+  },
+  methods: {
+    toInsert() {
+      this.$router.push("/addBmsTruckStatement");
+    },
+    selectBmstruckOrder(scope) {
+      this.$router.push("/getBmsTruckStatementOrder/" + scope.row.statementId);
+    },
+    updateBmstruckCheck(scope) {
+      this.$router.push("/bmsTruckAudit/" + scope.row.statementId);
+    },
+    onclick() {
+      console.log("查询待定值");
+      // this.options.requestUrl = "/api/v1/bms/getTruckStatementList?apiId=179&con="+this.input;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scode>
+.steel_inbound {
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 732 - 223
src/views/sale/router/index.js

@@ -1,234 +1,743 @@
-import Vue from 'vue'
-import Router from 'vue-router'
+import Vue from "vue";
+import Router from "vue-router";
 
-import routerBefore from '@/config/routerBefore.js'
+import routerBefore from "@/config/routerBefore.js";
 // 主要
-import main from '@/components/main.vue'
+import main from "@/components/main.vue";
 // 系统配置管理
-import addSaleOrder from '../components/sale_contract/addSaleOrder.vue'
-import addSalePlan from '../components/sale_contract/addSalePlan.vue'
-import addSalePlanDetail from '../components/sale_contract/addSalePlanDetail.vue'
-import addTransportPrice from '../components/sale_contract/addTransportPrice.vue'
-import addTruckNoDetail from '../components/sale_contract/addTruckNoDetail.vue'
-import editaddress from '../components/sale_contract/editaddress.vue'
-import editSaleOrder from '../components/sale_contract/editSaleOrder.vue'
-import editSaleOrderDetail from '../components/sale_contract/editSaleOrderDetail.vue'
-import editSalePalnDetail from '../components/sale_contract/editSalePalnDetail.vue'
-import editSalePlan from '../components/sale_contract/editSalePlan.vue'
-import editTransportPrice from '../components/sale_contract/editTransportPrice.vue'
-import editTruckNoDetail from '../components/sale_contract/editTruckNoDetail.vue'
-import saleOrder from '../components/sale_contract/saleOrder.vue'
-import saleOrderDetail from '../components/sale_contract/saleOrderDetail.vue'
-import saleOrderDetailApproved from '../components/sale_contract/saleOrderDetailApproved.vue'
-import saleOrderUpdateLog from '../components/sale_contract/saleOrderUpdateLog.vue'
-import salePlan from '../components/sale_contract/salePlan.vue'
-import transportPrice from '../components/sale_contract/transportPrice.vue'
-import addlading from '../components/saleSelfMachine/addlading.vue'
-import printLading from '../components/saleSelfMachine/printLading.vue'
-import printReceipt from '../components/saleSelfMachine/printReceipt.vue'
-import printScan from '../components/saleSelfMachine/printScan.vue'
-import printWarranty from '../components/saleSelfMachine/printWarranty.vue'
-import saleSelfMachine from '../components/saleSelfMachine/saleSelfMachine.vue'
-import addCokeRailPlan from '../components/transport_appointment/railPlan/addCokeRailPlan.vue'
-import addSlagRailPlan from '../components/transport_appointment/railPlan/addSlagRailPlan.vue'
-import addSteelRailPlan from '../components/transport_appointment/railPlan/addSteelRailPlan.vue'
-import cokeRailPlan from '../components/transport_appointment/railPlan/cokeRailPlan.vue'
-import slagRailPlan from '../components/transport_appointment/railPlan/slagRailPlan.vue'
-import steelRailPlan from '../components/transport_appointment/railPlan/steelRailPlan.vue'
-import updateCokeRailPlan from '../components/transport_appointment/railPlan/updateCokeRailPlan.vue'
-import updateSlagRailPlan from '../components/transport_appointment/railPlan/updateSlagRailPlan.vue'
-import updateSteelRailPlan from '../components/transport_appointment/railPlan/updateSteelRailPlan.vue'
-import addOpenDistribution from '../components/transport_appointment/addOpenDistribution.vue'
-import directionalDispatch from '../components/transport_appointment/directionalDispatch.vue'
-import openDistribution from '../components/transport_appointment/openDistribution.vue'
-import openDistributionSection from '../components/transport_appointment/openDistributionSection.vue'
-import orderGrabbing from '../components/transport_appointment/orderGrabbing.vue'
+import addSaleOrder from "../components/sale_contract/addSaleOrder.vue";
+import addSalePlan from "../components/sale_contract/addSalePlan.vue";
+import addSalePlanDetail from "../components/sale_contract/addSalePlanDetail.vue";
+import addTransportPrice from "../components/sale_contract/addTransportPrice.vue";
+import addTruckNoDetail from "../components/sale_contract/addTruckNoDetail.vue";
+import editaddress from "../components/sale_contract/editaddress.vue";
+import editSaleOrder from "../components/sale_contract/editSaleOrder.vue";
+import editSaleOrderDetail from "../components/sale_contract/editSaleOrderDetail.vue";
+import editSalePalnDetail from "../components/sale_contract/editSalePalnDetail.vue";
+import editSalePlan from "../components/sale_contract/editSalePlan.vue";
+import editTransportPrice from "../components/sale_contract/editTransportPrice.vue";
+import editTruckNoDetail from "../components/sale_contract/editTruckNoDetail.vue";
+import saleOrder from "../components/sale_contract/saleOrder.vue";
+import saleOrderDetail from "../components/sale_contract/saleOrderDetail.vue";
+import saleOrderDetailApproved from "../components/sale_contract/saleOrderDetailApproved.vue";
+import saleOrderUpdateLog from "../components/sale_contract/saleOrderUpdateLog.vue";
+import salePlan from "../components/sale_contract/salePlan.vue";
+import transportPrice from "../components/sale_contract/transportPrice.vue";
+import addlading from "../components/saleSelfMachine/addlading.vue";
+import printLading from "../components/saleSelfMachine/printLading.vue";
+import printReceipt from "../components/saleSelfMachine/printReceipt.vue";
+import printScan from "../components/saleSelfMachine/printScan.vue";
+import printWarranty from "../components/saleSelfMachine/printWarranty.vue";
+import saleSelfMachine from "../components/saleSelfMachine/saleSelfMachine.vue";
+import addCokeRailPlan from "../components/transport_appointment/railPlan/addCokeRailPlan.vue";
+import addSlagRailPlan from "../components/transport_appointment/railPlan/addSlagRailPlan.vue";
+import addSteelRailPlan from "../components/transport_appointment/railPlan/addSteelRailPlan.vue";
+import cokeRailPlan from "../components/transport_appointment/railPlan/cokeRailPlan.vue";
+import slagRailPlan from "../components/transport_appointment/railPlan/slagRailPlan.vue";
+import steelRailPlan from "../components/transport_appointment/railPlan/steelRailPlan.vue";
+import updateCokeRailPlan from "../components/transport_appointment/railPlan/updateCokeRailPlan.vue";
+import updateSlagRailPlan from "../components/transport_appointment/railPlan/updateSlagRailPlan.vue";
+import updateSteelRailPlan from "../components/transport_appointment/railPlan/updateSteelRailPlan.vue";
+import addOpenDistribution from "../components/transport_appointment/addOpenDistribution.vue";
+import directionalDispatch from "../components/transport_appointment/directionalDispatch.vue";
+import openDistribution from "../components/transport_appointment/openDistribution.vue";
+import openDistributionSection from "../components/transport_appointment/openDistributionSection.vue";
+import orderGrabbing from "../components/transport_appointment/orderGrabbing.vue";
 
-import add_sale_dilNotice from '../components/dilNotice/add_sale_dilNotice.vue'
-import Carrier_dilNotice from '../components/dilNotice/Carrier_dilNotice.vue'
-import sale_dilNotice from '../components/dilNotice/sale_dilNotice.vue'
-import addNotice from '../components/dilNotice/addNotice.vue'
-import carrierNotice from '../components/dilNotice/carrierNotice.vue'
-import clientNotice from '../components/dilNotice/clientNotice.vue'
-import editNotice from '../components/dilNotice/editNotice.vue'
-import getNoticeById from '../components/dilNotice/getNoticeById.vue'
-import marketingNotice from '../components/dilNotice/marketingNotice.vue'
-import newNotice from '../components/dilNotice/newNotice.vue'
+import add_sale_dilNotice from "../components/dilNotice/add_sale_dilNotice.vue";
+import Carrier_dilNotice from "../components/dilNotice/Carrier_dilNotice.vue";
+import sale_dilNotice from "../components/dilNotice/sale_dilNotice.vue";
+import addNotice from "../components/dilNotice/addNotice.vue";
+import carrierNotice from "../components/dilNotice/carrierNotice.vue";
+import clientNotice from "../components/dilNotice/clientNotice.vue";
+import editNotice from "../components/dilNotice/editNotice.vue";
+import getNoticeById from "../components/dilNotice/getNoticeById.vue";
+import marketingNotice from "../components/dilNotice/marketingNotice.vue";
+import newNotice from "../components/dilNotice/newNotice.vue";
 
-import outFactoryResult from '../components/transport_excute/outFactory/outFactoryResult.vue'
-import smsResult from '../components/transport_excute/outFactory/smsResult.vue'
-import arrivalPhoto from '../components/transport_excute/tms-offsite/arrivalPhoto.vue'
-import arrivalResult from '../components/transport_excute/tms-offsite/arrivalResult.vue' 
-import transportationPerformance from '../components/offSiteTransportation/transportationPerformance.vue' 
-import distance from '../components/transport_excute/tms-offsite/distance.vue'
+import outFactoryResult from "../components/transport_excute/outFactory/outFactoryResult.vue";
+import smsResult from "../components/transport_excute/outFactory/smsResult.vue";
+import arrivalPhoto from "../components/transport_excute/tms-offsite/arrivalPhoto.vue";
+import arrivalResult from "../components/transport_excute/tms-offsite/arrivalResult.vue";
+import transportationPerformance from "../components/offSiteTransportation/transportationPerformance.vue";
+import distance from "../components/transport_excute/tms-offsite/distance.vue";
 // import inTransit from '../components/transport_excute/offSiteTransportation/inTransit.vue'
-import inTransitAbnormal from '../components/transport_excute/tms-offsite/inTransitAbnormal.vue'
-import inTransitAlarm from '../components/transport_excute/tms-offsite/inTransitAlarm.vue'
-import inTransitOrderMileage from '../components/transport_excute/tms-offsite/inTransitOrderMileage.vue'
-import pathView from '../components/transport_excute/tms-offsite/pathView.vue'
-import receiptChildPhoto from '../components/transport_excute/tms-offsite/receiptChildPhoto.vue'
-import receiptPhoto from '../components/transport_excute/tms-offsite/receiptPhoto.vue'
-import receiptResult from '../components/transport_excute/tms-offsite/receiptResult.vue'
-import transportInfo from '../components/transport_excute/tms-offsite/transportInfo.vue'
-import enFactoryResult from '../components/transport_excute/enFactoryResult.vue'
-import grossWeightResult from '../components/transport_excute/grossWeightResult.vue'
-import loadTruckResult from '../components/transport_excute/loadTruckResult.vue'
-import qualityResult from '../components/transport_excute/qualityResult.vue'
-import returnResult from '../components/transport_excute/returnResult.vue'
-import tareWeightResult from '../components/transport_excute/tareWeightResult.vue'
-import disatchSteelSaleOrderAdd from '../components/transport_order/disatchSteelSaleOrderAdd.vue'
-import dispatchCokeRailPlan from '../components/transport_order/dispatchCokeRailPlan.vue'
-import dispatchCokeRailPlanAdd from '../components/transport_order/dispatchCokeRailPlanAdd.vue'
-import dispatchCokeRailPlanCheck from '../components/transport_order/dispatchCokeRailPlanCheck.vue'
-import dispatchOrder from '../components/transport_order/dispatchOrder.vue'
-import dispatchSlagDayPlanAdd from '../components/transport_order/dispatchSlagDayPlanAdd.vue'
-import dispatchSlagDayPlanCheck from '../components/transport_order/dispatchSlagDayPlanCheck.vue'
-import dispatchSlagRailPlan from '../components/transport_order/dispatchSlagRailPlan.vue'
-import dispatchSteelSaleOrder from '../components/transport_order/dispatchSteelSaleOrder.vue'
-import dispatchSteelSaleOrderCheck from '../components/transport_order/dispatchSteelSaleOrderCheck.vue'
-import receiveOrder from '../components/transport_order/receiveOrder.vue'
-import saleChemicalCokeOrder from '../components/transport_order/saleChemicalCokeOrder.vue'
-import saleCoproductOrder from '../components/transport_order/saleCoproductOrder.vue'
-import saleSteelOrder from '../components/transport_order/saleSteelOrder.vue'
-import addBmsTrainFreight from '../components/transportFreight/saleTrainSettlement/addBmsTrainFreight.vue'
-import bmsTrainFreight from '../components/transportFreight/saleTrainSettlement/bmsTrainFreight.vue'
-import updateBmsTrainFreight from '../components/transportFreight/saleTrainSettlement/updateBmsTrainFreight.vue'
-import addBmsTruckInvoice from '../components/transportFreight/saleTruckSettlement/addBmsTruckInvoice.vue'
-import addBmsTruckStatement from '../components/transportFreight/saleTruckSettlement/addBmsTruckStatement.vue'
-import bmsTruckAudit from '../components/transportFreight/saleTruckSettlement/bmsTruckAudit.vue'
-import bmsTruckDetailOrder from '../components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue'
-import bmsTruckFormula from '../components/transportFreight/saleTruckSettlement/bmsTruckFormula.vue'
-import bmsTruckInvoice from '../components/transportFreight/saleTruckSettlement/bmsTruckInvoice.vue'
-import bmsTruckStatement from '../components/transportFreight/saleTruckSettlement/bmsTruckStatement.vue'
-import getBmsTruckStatementOrder from '../components/transportFreight/saleTruckSettlement/getBmsTruckStatementOrder.vue'
-import getTransportResult from '../components/transportFreight/saleTruckSettlement/getTransportResult.vue'
-import mapTest from '../components/offSiteTransportation/mapTest.vue'
-import checkGPS from '../components/offSiteTransportation/checkGPS.vue'
-import currentLocation from '../components/offSiteTransportation/currentLocation.vue'
-import inTransit from '../components/offSiteTransportation/inTransit.vue'  
-import inTransitWarn from '../components/offSiteTransportation/inTransitWarn.vue'
+import inTransitAbnormal from "../components/transport_excute/tms-offsite/inTransitAbnormal.vue";
+import inTransitAlarm from "../components/transport_excute/tms-offsite/inTransitAlarm.vue";
+import inTransitOrderMileage from "../components/transport_excute/tms-offsite/inTransitOrderMileage.vue";
+import pathView from "../components/transport_excute/tms-offsite/pathView.vue";
+import receiptChildPhoto from "../components/transport_excute/tms-offsite/receiptChildPhoto.vue";
+import receiptPhoto from "../components/transport_excute/tms-offsite/receiptPhoto.vue";
+import receiptResult from "../components/transport_excute/tms-offsite/receiptResult.vue";
+import transportInfo from "../components/transport_excute/tms-offsite/transportInfo.vue";
+import enFactoryResult from "../components/transport_excute/enFactoryResult.vue";
+import grossWeightResult from "../components/transport_excute/grossWeightResult.vue";
+import loadTruckResult from "../components/transport_excute/loadTruckResult.vue";
+import qualityResult from "../components/transport_excute/qualityResult.vue";
+import returnResult from "../components/transport_excute/returnResult.vue";
+import tareWeightResult from "../components/transport_excute/tareWeightResult.vue";
+import disatchSteelSaleOrderAdd from "../components/transport_order/disatchSteelSaleOrderAdd.vue";
+import dispatchCokeRailPlan from "../components/transport_order/dispatchCokeRailPlan.vue";
+import dispatchCokeRailPlanAdd from "../components/transport_order/dispatchCokeRailPlanAdd.vue";
+import dispatchCokeRailPlanCheck from "../components/transport_order/dispatchCokeRailPlanCheck.vue";
+import dispatchOrder from "../components/transport_order/dispatchOrder.vue";
+import dispatchSlagDayPlanAdd from "../components/transport_order/dispatchSlagDayPlanAdd.vue";
+import dispatchSlagDayPlanCheck from "../components/transport_order/dispatchSlagDayPlanCheck.vue";
+import dispatchSlagRailPlan from "../components/transport_order/dispatchSlagRailPlan.vue";
+import dispatchSteelSaleOrder from "../components/transport_order/dispatchSteelSaleOrder.vue";
+import dispatchSteelSaleOrderCheck from "../components/transport_order/dispatchSteelSaleOrderCheck.vue";
+import receiveOrder from "../components/transport_order/receiveOrder.vue";
+import saleChemicalCokeOrder from "../components/transport_order/saleChemicalCokeOrder.vue";
+import saleCoproductOrder from "../components/transport_order/saleCoproductOrder.vue";
+import saleSteelOrder from "../components/transport_order/saleSteelOrder.vue";
+import addBmsTrainFreight from "../components/transportFreight/saleTrainSettlement/addBmsTrainFreight.vue";
+import bmsTrainFreight from "../components/transportFreight/saleTrainSettlement/bmsTrainFreight.vue";
+import updateBmsTrainFreight from "../components/transportFreight/saleTrainSettlement/updateBmsTrainFreight.vue";
+import addBmsTruckInvoice from "../components/transportFreight/saleTruckSettlement/addBmsTruckInvoice.vue";
+import addBmsTruckStatement from "../components/transportFreight/saleTruckSettlement/addBmsTruckStatement.vue";
+import bmsTruckAudit from "../components/transportFreight/saleTruckSettlement/bmsTruckAudit.vue";
+import bmsTruckDetailOrder from "../components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue";
+import bmsTruckFormula from "../components/transportFreight/saleTruckSettlement/bmsTruckFormula.vue";
+import bmsTruckInvoice from "../components/transportFreight/saleTruckSettlement/bmsTruckInvoice.vue";
+import bmsTruckStatement from "../components/transportFreight/saleTruckSettlement/bmsTruckStatement.vue";
+import getBmsTruckStatementOrder from "../components/transportFreight/saleTruckSettlement/getBmsTruckStatementOrder.vue";
+import getTransportResult from "../components/transportFreight/saleTruckSettlement/getTransportResult.vue";
+import mapTest from "../components/offSiteTransportation/mapTest.vue";
+import checkGPS from "../components/offSiteTransportation/checkGPS.vue";
+import currentLocation from "../components/offSiteTransportation/currentLocation.vue";
+import inTransit from "../components/offSiteTransportation/inTransit.vue";
+import inTransitWarn from "../components/offSiteTransportation/inTransitWarn.vue";
 //测试数据
+//添加销售钢材汽运结算
+import bmsTruckSteelDetails from "@/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelDetails.vue";
+import bmsTruckSteelStatement from "@/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelStatement.vue";
 
-Vue.use(Router)
+Vue.use(Router);
 const constantRouterMap = [
-	{
-	  path: '/',
-	  name: 'main',
-	  meta: {title: '首页', code: 'xtpzgl'},
-	  component: main,
-	  redirect: {name: 'addSaleOrder'},
-	  children: [
-		{path: 'addSaleOrder', name: 'addSaleOrder', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrder},
-		{path: 'addSalePlan', name: 'addSalePlan', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlan},
-		{path: 'addSalePlanDetail/:planId', name: 'addSalePlanDetail', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlanDetail},
-		{path: 'addTransportPrice', name: 'addTransportPrice', meta: {code: 'xtpzgl-yhgl'}, component: addTransportPrice},
-		{path: 'addTruckNoDetail/:saleOrderMaterialId', name: 'addTruckNoDetail', meta: {code: 'xtpzgl-yhgl'}, component: addTruckNoDetail},
-		{path: 'editaddress/:saleOrderMaterialId', name: 'editaddress', meta: {code: 'xtpzgl-yhgl'}, component: editaddress},
-		{path: 'editSaleOrder/:saleOrderId', name: 'editSaleOrder', meta: {code: 'xtpzgl-yhgl'}, component: editSaleOrder},
-		{path: 'editSaleOrderDetail/:saleOrderMaterialId', name: 'editSaleOrderDetail', meta: {code: 'xtpzgl-yhgl'}, component: editSaleOrderDetail},
-		{path: 'editSalePalnDetail/:planMaterialId', name: 'editSalePalnDetail', meta: {code: 'xtpzgl-yhgl'}, component: editSalePalnDetail},
-		{path: 'editSalePlan/:planId', name: 'editSalePlan', meta: {code: 'xtpzgl-yhgl'}, component: editSalePlan},
-		{path: 'editTransportPrice/:priceId', name: 'editTransportPrice', meta: {code: 'xtpzgl-yhgl'}, component: editTransportPrice},
-		{path: 'editTruckNoDetail/:trucknoMaterialId', name: 'editTruckNoDetail', meta: {code: 'xtpzgl-yhgl'}, component: editTruckNoDetail},
-		{path: 'saleOrder', name: 'saleOrder', meta: {code: 'xtpzgl-yhgl'}, component: saleOrder},
-		{path: 'saleOrderDetail/:saleOrderId', name: 'saleOrderDetail', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetail},
-		{path: 'saleOrderDetailApproved/:saleOrderId', name: 'saleOrderDetailApproved', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetailApproved},
-		{path: 'saleOrderUpdateLog/:saleOrderId', name: 'saleOrderUpdateLog', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderUpdateLog},
-		{path: 'salePlan', name: 'salePlan', meta: {code: 'xtpzgl-yhgl'}, component: salePlan},
-		{path: 'transportPrice', name: 'transportPrice', meta: {code: 'xtpzgl-yhgl'}, component: transportPrice},
-		{path: 'addlading', name: 'addlading', meta: {code: 'xtpzgl-yhgl'}, component: addlading},
-		{path: 'printLading', name: 'printLading', meta: {code: 'xtpzgl-yhgl'}, component: printLading},
-		{path: 'printReceipt', name: 'printReceipt', meta: {code: 'xtpzgl-yhgl'}, component: printReceipt},
-		{path: 'printScan', name: 'printScan', meta: {code: 'xtpzgl-yhgl'}, component: printScan},
-		{path: 'printWarranty', name: 'printWarranty', meta: {code: 'xtpzgl-yhgl'}, component: printWarranty},
-		{path: 'saleSelfMachine', name: 'saleSelfMachine', meta: {code: 'xtpzgl-yhgl'}, component: saleSelfMachine},
-		{path: 'addCokeRailPlan', name: 'addCokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: addCokeRailPlan},
-		{path: 'addSlagRailPlan', name: 'addSlagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: addSlagRailPlan},
-		{path: 'addSteelRailPlan', name: 'addSteelRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: addSteelRailPlan},
-		{path: 'cokeRailPlan', name: 'cokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: cokeRailPlan},
-		{path: 'slagRailPlan', name: 'slagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: slagRailPlan},
-		{path: 'steelRailPlan', name: 'steelRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: steelRailPlan},
-		{path: 'updateCokeRailPlan/:dayPlanId', name: 'updateCokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: updateCokeRailPlan},
-		{path: 'updateSlagRailPlan/:dayPlanId', name: 'updateSlagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: updateSlagRailPlan},
-		{path: 'updateSteelRailPlan/:dayPlanId', name: 'updateSteelRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: updateSteelRailPlan},
-		{path: 'addOpenDistribution', name: 'addOpenDistribution', meta: {code: 'xtpzgl-yhgl'}, component: addOpenDistribution},
-		{path: 'directionalDispatch', name: 'directionalDispatch', meta: {code: 'xtpzgl-yhgl'}, component: directionalDispatch},
-		{path: 'openDistribution', name: 'openDistribution', meta: {code: 'xtpzgl-yhgl'}, component: openDistribution},
-		{path: 'openDistributionSection/:dispatchId', name: 'openDistributionSection', meta: {code: 'xtpzgl-yhgl'}, component: openDistributionSection},
-		{path: 'orderGrabbing', name: 'orderGrabbing', meta: {code: 'xtpzgl-yhgl'}, component: orderGrabbing},
+  {
+    path: "/",
+    name: "main",
+    meta: { title: "首页", code: "xtpzgl" },
+    component: main,
+    redirect: { name: "addSaleOrder" },
+    children: [
+      {
+        path: "addSaleOrder",
+        name: "addSaleOrder",
+        meta: { code: "xtpzgl-jggl" },
+        component: addSaleOrder
+      },
+      {
+        path: "addSalePlan",
+        name: "addSalePlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addSalePlan
+      },
+      {
+        path: "addSalePlanDetail/:planId",
+        name: "addSalePlanDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addSalePlanDetail
+      },
+      {
+        path: "addTransportPrice",
+        name: "addTransportPrice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addTransportPrice
+      },
+      {
+        path: "addTruckNoDetail/:saleOrderMaterialId",
+        name: "addTruckNoDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addTruckNoDetail
+      },
+      {
+        path: "editaddress/:saleOrderMaterialId",
+        name: "editaddress",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editaddress
+      },
+      {
+        path: "editSaleOrder/:saleOrderId",
+        name: "editSaleOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSaleOrder
+      },
+      {
+        path: "editSaleOrderDetail/:saleOrderMaterialId",
+        name: "editSaleOrderDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSaleOrderDetail
+      },
+      {
+        path: "editSalePalnDetail/:planMaterialId",
+        name: "editSalePalnDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSalePalnDetail
+      },
+      {
+        path: "editSalePlan/:planId",
+        name: "editSalePlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSalePlan
+      },
+      {
+        path: "editTransportPrice/:priceId",
+        name: "editTransportPrice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editTransportPrice
+      },
+      {
+        path: "editTruckNoDetail/:trucknoMaterialId",
+        name: "editTruckNoDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editTruckNoDetail
+      },
+      {
+        path: "saleOrder",
+        name: "saleOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleOrder
+      },
+      {
+        path: "saleOrderDetail/:saleOrderId",
+        name: "saleOrderDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleOrderDetail
+      },
+      {
+        path: "saleOrderDetailApproved/:saleOrderId",
+        name: "saleOrderDetailApproved",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleOrderDetailApproved
+      },
+      {
+        path: "saleOrderUpdateLog/:saleOrderId",
+        name: "saleOrderUpdateLog",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleOrderUpdateLog
+      },
+      {
+        path: "salePlan",
+        name: "salePlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: salePlan
+      },
+      {
+        path: "transportPrice",
+        name: "transportPrice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: transportPrice
+      },
+      {
+        path: "addlading",
+        name: "addlading",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addlading
+      },
+      {
+        path: "printLading",
+        name: "printLading",
+        meta: { code: "xtpzgl-yhgl" },
+        component: printLading
+      },
+      {
+        path: "printReceipt",
+        name: "printReceipt",
+        meta: { code: "xtpzgl-yhgl" },
+        component: printReceipt
+      },
+      {
+        path: "printScan",
+        name: "printScan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: printScan
+      },
+      {
+        path: "printWarranty",
+        name: "printWarranty",
+        meta: { code: "xtpzgl-yhgl" },
+        component: printWarranty
+      },
+      {
+        path: "saleSelfMachine",
+        name: "saleSelfMachine",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleSelfMachine
+      },
+      {
+        path: "addCokeRailPlan",
+        name: "addCokeRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addCokeRailPlan
+      },
+      {
+        path: "addSlagRailPlan",
+        name: "addSlagRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addSlagRailPlan
+      },
+      {
+        path: "addSteelRailPlan",
+        name: "addSteelRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addSteelRailPlan
+      },
+      {
+        path: "cokeRailPlan",
+        name: "cokeRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: cokeRailPlan
+      },
+      {
+        path: "slagRailPlan",
+        name: "slagRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: slagRailPlan
+      },
+      {
+        path: "steelRailPlan",
+        name: "steelRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: steelRailPlan
+      },
+      {
+        path: "updateCokeRailPlan/:dayPlanId",
+        name: "updateCokeRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: updateCokeRailPlan
+      },
+      {
+        path: "updateSlagRailPlan/:dayPlanId",
+        name: "updateSlagRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: updateSlagRailPlan
+      },
+      {
+        path: "updateSteelRailPlan/:dayPlanId",
+        name: "updateSteelRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: updateSteelRailPlan
+      },
+      {
+        path: "addOpenDistribution",
+        name: "addOpenDistribution",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addOpenDistribution
+      },
+      {
+        path: "directionalDispatch",
+        name: "directionalDispatch",
+        meta: { code: "xtpzgl-yhgl" },
+        component: directionalDispatch
+      },
+      {
+        path: "openDistribution",
+        name: "openDistribution",
+        meta: { code: "xtpzgl-yhgl" },
+        component: openDistribution
+      },
+      {
+        path: "openDistributionSection/:dispatchId",
+        name: "openDistributionSection",
+        meta: { code: "xtpzgl-yhgl" },
+        component: openDistributionSection
+      },
+      {
+        path: "orderGrabbing",
+        name: "orderGrabbing",
+        meta: { code: "xtpzgl-yhgl" },
+        component: orderGrabbing
+      },
 
-		{path: 'add_sale_dilNotice', name: 'add_sale_dilNotice', meta: {code: 'xtpzgl-yhgl'}, component: add_sale_dilNotice},
-		{path: 'Carrier_dilNotice', name: 'Carrier_dilNotice', meta: {code: 'xtpzgl-yhgl'}, component: Carrier_dilNotice},
-		{path: 'sale_dilNotice', name: 'sale_dilNotice', meta: {code: 'xtpzgl-yhgl'}, component: sale_dilNotice},
-		{path: 'addNotice', name: 'addNotice', meta: {code: 'xtpzgl-yhgl'}, component: addNotice},
-		{path: 'carrierNotice', name: 'carrierNotice', meta: {code: 'xtpzgl-yhgl'}, component: carrierNotice},
-		{path: 'clientNotice', name: 'clientNotice', meta: {code: 'xtpzgl-yhgl'}, component: clientNotice},
-		{path: 'editNotice/:noticeId', name: 'editNotice', meta: {code: 'xtpzgl-yhgl'}, component: editNotice},
-		{path: 'getNoticeById/:noticeId', name: 'getNoticeById', meta: {code: 'xtpzgl-yhgl'}, component: getNoticeById},
-		{path: 'marketingNotice', name: 'marketingNotice', meta: {code: 'xtpzgl-yhgl'}, component: marketingNotice},
-		{path: 'newNotice', name: 'newNotice', meta: {code: 'xtpzgl-yhgl'}, component: newNotice},
+      {
+        path: "add_sale_dilNotice",
+        name: "add_sale_dilNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: add_sale_dilNotice
+      },
+      {
+        path: "Carrier_dilNotice",
+        name: "Carrier_dilNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: Carrier_dilNotice
+      },
+      {
+        path: "sale_dilNotice",
+        name: "sale_dilNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sale_dilNotice
+      },
+      {
+        path: "addNotice",
+        name: "addNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addNotice
+      },
+      {
+        path: "carrierNotice",
+        name: "carrierNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: carrierNotice
+      },
+      {
+        path: "clientNotice",
+        name: "clientNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: clientNotice
+      },
+      {
+        path: "editNotice/:noticeId",
+        name: "editNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editNotice
+      },
+      {
+        path: "getNoticeById/:noticeId",
+        name: "getNoticeById",
+        meta: { code: "xtpzgl-yhgl" },
+        component: getNoticeById
+      },
+      {
+        path: "marketingNotice",
+        name: "marketingNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: marketingNotice
+      },
+      {
+        path: "newNotice",
+        name: "newNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: newNotice
+      },
 
-		{path: 'outFactoryResult', name: 'outFactoryResult', meta: {code: 'xtpzgl-yhgl'}, component: outFactoryResult},
-		{path: 'smsResult', name: 'smsResult', meta: {code: 'xtpzgl-jggl'}, component: smsResult},
-		{path: 'arrivalPhoto', name: 'arrivalPhoto', meta: {code: 'xtpzgl-yhgl'}, component: arrivalPhoto},
-		{path: 'arrivalResult', name: 'arrivalResult', meta: {code: 'xtpzgl-yhgl'}, component: arrivalResult},
-		{path: 'distance', name: 'distance', meta: {code: 'xtpzgl-yhgl'}, component: distance},
-		{path: 'inTransit', name: 'inTransit', meta: {code: 'xtpzgl-yhgl'}, component: inTransit},
-		{path: 'inTransitAbnormal', name: 'inTransitAbnormal', meta: {code: 'xtpzgl-yhgl'}, component: inTransitAbnormal},
-		{path: 'inTransitAlarm', name: 'inTransitAlarm', meta: {code: 'xtpzgl-yhgl'}, component: inTransitAlarm},
-		{path: 'inTransitOrderMileage', name: 'inTransitOrderMileage', meta: {code: 'xtpzgl-yhgl'}, component: inTransitOrderMileage},
-		{path: 'pathView', name: 'pathView', meta: {code: 'xtpzgl-yhgl'}, component: pathView},
-		{path: 'receiptChildPhoto', name: 'receiptChildPhoto', meta: {code: 'xtpzgl-yhgl'}, component: receiptChildPhoto},
-		{path: 'receiptPhoto', name: 'receiptPhoto', meta: {code: 'xtpzgl-yhgl'}, component: receiptPhoto},
-		{path: 'receiptResult', name: 'receiptResult', meta: {code: 'xtpzgl-yhgl'}, component: receiptResult},
-		{path: 'transportInfo', name: 'transportInfo', meta: {code: 'xtpzgl-yhgl'}, component: transportInfo},
-		{path: 'enFactoryResult', name: 'enFactoryResult', meta: {code: 'xtpzgl-yhgl'}, component: enFactoryResult},
-		{path: 'grossWeightResult', name: 'grossWeightResult', meta: {code: 'xtpzgl-jggl'}, component: grossWeightResult},
-		{path: 'loadTruckResult', name: 'loadTruckResult', meta: {code: 'xtpzgl-yhgl'}, component: loadTruckResult},
-		{path: 'qualityResult', name: 'qualityResult', meta: {code: 'xtpzgl-yhgl'}, component: qualityResult},
-		{path: 'returnResult', name: 'returnResult', meta: {code: 'xtpzgl-yhgl'}, component: returnResult},
-		{path: 'tareWeightResult', name: 'tareWeightResult', meta: {code: 'xtpzgl-yhgl'}, component: tareWeightResult},
-		{path: 'disatchSteelSaleOrderAdd', name: 'disatchSteelSaleOrderAdd', meta: {code: 'xtpzgl-yhgl'}, component: disatchSteelSaleOrderAdd},
-		{path: 'dispatchCokeRailPlan', name: 'dispatchCokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: dispatchCokeRailPlan},
-		{path: 'dispatchCokeRailPlanAdd', name: 'dispatchCokeRailPlanAdd', meta: {code: 'xtpzgl-yhgl'}, component: dispatchCokeRailPlanAdd},
-		{path: 'dispatchCokeRailPlanCheck', name: 'dispatchCokeRailPlanCheck', meta: {code: 'xtpzgl-yhgl'}, component: dispatchCokeRailPlanCheck},
-		{path: 'dispatchOrder', name: 'dispatchOrder', meta: {code: 'xtpzgl-yhgl'}, component: dispatchOrder},
-		{path: 'dispatchSlagDayPlanAdd', name: 'dispatchSlagDayPlanAdd', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSlagDayPlanAdd},
-		{path: 'dispatchSlagDayPlanCheck', name: 'dispatchSlagDayPlanCheck', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSlagDayPlanCheck},
-		{path: 'dispatchSlagRailPlan', name: 'dispatchSlagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSlagRailPlan},
-		{path: 'dispatchSteelSaleOrder', name: 'dispatchSteelSaleOrder', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSteelSaleOrder},
-		{path: 'dispatchSteelSaleOrderCheck', name: 'dispatchSteelSaleOrderCheck', meta: {code: 'xtpzgl-jggl'}, component: dispatchSteelSaleOrderCheck},
-		{path: 'receiveOrder', name: 'receiveOrder', meta: {code: 'xtpzgl-yhgl'}, component: receiveOrder},
-		{path: 'saleChemicalCokeOrder', name: 'saleChemicalCokeOrder', meta: {code: 'xtpzgl-yhgl'}, component: saleChemicalCokeOrder},
-		{path: 'saleCoproductOrder', name: 'saleCoproductOrder', meta: {code: 'xtpzgl-yhgl'}, component: saleCoproductOrder},
-		{path: 'saleSteelOrder', name: 'saleSteelOrder', meta: {code: 'xtpzgl-yhgl'}, component: saleSteelOrder},
-		{path: 'addBmsTrainFreight', name: 'addBmsTrainFreight', meta: {code: 'xtpzgl-yhgl'}, component: addBmsTrainFreight},
-		{path: 'bmsTrainFreight', name: 'bmsTrainFreight', meta: {code: 'xtpzgl-yhgl'}, component: bmsTrainFreight},
-		{path: 'updateBmsTrainFreight/:settlementId', name: 'updateBmsTrainFreight', meta: {code: 'xtpzgl-yhgl'}, component: updateBmsTrainFreight},
-		{path: 'addBmsTruckInvoice', name: 'addBmsTruckInvoice', meta: {code: 'xtpzgl-yhgl'}, component: addBmsTruckInvoice},
-		{path: 'addBmsTruckStatement', name: 'addBmsTruckStatement', meta: {code: 'xtpzgl-yhgl'}, component: addBmsTruckStatement},
-		{path: 'bmsTruckAudit/:statementId', name: 'bmsTruckAudit', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckAudit},
-		{path: 'bmsTruckDetailOrder', name: 'bmsTruckDetailOrder', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckDetailOrder},
-		{path: 'bmsTruckFormula', name: 'bmsTruckFormula', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckFormula},
-		{path: 'bmsTruckInvoice', name: 'bmsTruckInvoice', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckInvoice},
-		{path: 'bmsTruckStatement', name: 'bmsTruckStatement', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckStatement},
-		{path: 'getBmsTruckStatementOrder/:statementId', name: 'getBmsTruckStatementOrder', meta: {code: 'xtpzgl-yhgl'}, component: getBmsTruckStatementOrder},
-		{path: 'getTransportResult/:orderId', name: 'getTransportResult', meta: {code: 'xtpzgl-yhgl'}, component: getTransportResult},
-		{path: 'mapTest', name: 'mapTest', meta: {code: 'xtpzgl-yhgl'}, component: mapTest},  
-		{path: 'checkGPS', name: 'checkGPS', meta: {code: 'xtpzgl-yhgl'}, component: checkGPS},
-		{path: 'currentLocation', name: 'currentLocation', meta: {code: 'xtpzgl-yhgl'}, component: currentLocation},
-		{path: 'inTransitWarn', name: 'inTransitWarn', meta: {code: 'xtpzgl-yhgl'}, component: inTransitWarn},
-		{path: 'transportationPerformance', name: 'transportationPerformance', meta: {code: 'xtpzgl-yhgl'}, component: transportationPerformance},
-	  ] 
-	}
-  ];
-  const router = new Router({
-	routes: constantRouterMap
-  })
-  //  before
-  routerBefore(router, constantRouterMap);
-  
-  export default router;
-  //  constantRouterMap
-  export const routes = constantRouterMap;
-  
+      {
+        path: "outFactoryResult",
+        name: "outFactoryResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: outFactoryResult
+      },
+      {
+        path: "smsResult",
+        name: "smsResult",
+        meta: { code: "xtpzgl-jggl" },
+        component: smsResult
+      },
+      {
+        path: "arrivalPhoto",
+        name: "arrivalPhoto",
+        meta: { code: "xtpzgl-yhgl" },
+        component: arrivalPhoto
+      },
+      {
+        path: "arrivalResult",
+        name: "arrivalResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: arrivalResult
+      },
+      {
+        path: "distance",
+        name: "distance",
+        meta: { code: "xtpzgl-yhgl" },
+        component: distance
+      },
+      {
+        path: "inTransit",
+        name: "inTransit",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inTransit
+      },
+      {
+        path: "inTransitAbnormal",
+        name: "inTransitAbnormal",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inTransitAbnormal
+      },
+      {
+        path: "inTransitAlarm",
+        name: "inTransitAlarm",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inTransitAlarm
+      },
+      {
+        path: "inTransitOrderMileage",
+        name: "inTransitOrderMileage",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inTransitOrderMileage
+      },
+      {
+        path: "pathView",
+        name: "pathView",
+        meta: { code: "xtpzgl-yhgl" },
+        component: pathView
+      },
+      {
+        path: "receiptChildPhoto",
+        name: "receiptChildPhoto",
+        meta: { code: "xtpzgl-yhgl" },
+        component: receiptChildPhoto
+      },
+      {
+        path: "receiptPhoto",
+        name: "receiptPhoto",
+        meta: { code: "xtpzgl-yhgl" },
+        component: receiptPhoto
+      },
+      {
+        path: "receiptResult",
+        name: "receiptResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: receiptResult
+      },
+      {
+        path: "transportInfo",
+        name: "transportInfo",
+        meta: { code: "xtpzgl-yhgl" },
+        component: transportInfo
+      },
+      {
+        path: "enFactoryResult",
+        name: "enFactoryResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: enFactoryResult
+      },
+      {
+        path: "grossWeightResult",
+        name: "grossWeightResult",
+        meta: { code: "xtpzgl-jggl" },
+        component: grossWeightResult
+      },
+      {
+        path: "loadTruckResult",
+        name: "loadTruckResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: loadTruckResult
+      },
+      {
+        path: "qualityResult",
+        name: "qualityResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: qualityResult
+      },
+      {
+        path: "returnResult",
+        name: "returnResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: returnResult
+      },
+      {
+        path: "tareWeightResult",
+        name: "tareWeightResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: tareWeightResult
+      },
+      {
+        path: "disatchSteelSaleOrderAdd",
+        name: "disatchSteelSaleOrderAdd",
+        meta: { code: "xtpzgl-yhgl" },
+        component: disatchSteelSaleOrderAdd
+      },
+      {
+        path: "dispatchCokeRailPlan",
+        name: "dispatchCokeRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchCokeRailPlan
+      },
+      {
+        path: "dispatchCokeRailPlanAdd",
+        name: "dispatchCokeRailPlanAdd",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchCokeRailPlanAdd
+      },
+      {
+        path: "dispatchCokeRailPlanCheck",
+        name: "dispatchCokeRailPlanCheck",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchCokeRailPlanCheck
+      },
+      {
+        path: "dispatchOrder",
+        name: "dispatchOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchOrder
+      },
+      {
+        path: "dispatchSlagDayPlanAdd",
+        name: "dispatchSlagDayPlanAdd",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchSlagDayPlanAdd
+      },
+      {
+        path: "dispatchSlagDayPlanCheck",
+        name: "dispatchSlagDayPlanCheck",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchSlagDayPlanCheck
+      },
+      {
+        path: "dispatchSlagRailPlan",
+        name: "dispatchSlagRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchSlagRailPlan
+      },
+      {
+        path: "dispatchSteelSaleOrder",
+        name: "dispatchSteelSaleOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchSteelSaleOrder
+      },
+      {
+        path: "dispatchSteelSaleOrderCheck",
+        name: "dispatchSteelSaleOrderCheck",
+        meta: { code: "xtpzgl-jggl" },
+        component: dispatchSteelSaleOrderCheck
+      },
+      {
+        path: "receiveOrder",
+        name: "receiveOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: receiveOrder
+      },
+      {
+        path: "saleChemicalCokeOrder",
+        name: "saleChemicalCokeOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleChemicalCokeOrder
+      },
+      {
+        path: "saleCoproductOrder",
+        name: "saleCoproductOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleCoproductOrder
+      },
+      {
+        path: "saleSteelOrder",
+        name: "saleSteelOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleSteelOrder
+      },
+      {
+        path: "addBmsTrainFreight",
+        name: "addBmsTrainFreight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addBmsTrainFreight
+      },
+      {
+        path: "bmsTrainFreight",
+        name: "bmsTrainFreight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTrainFreight
+      },
+      {
+        path: "updateBmsTrainFreight/:settlementId",
+        name: "updateBmsTrainFreight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: updateBmsTrainFreight
+      },
+      {
+        path: "addBmsTruckInvoice",
+        name: "addBmsTruckInvoice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addBmsTruckInvoice
+      },
+      {
+        path: "addBmsTruckStatement",
+        name: "addBmsTruckStatement",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addBmsTruckStatement
+      },
+      {
+        path: "bmsTruckAudit/:statementId",
+        name: "bmsTruckAudit",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckAudit
+      },
+      {
+        path: "bmsTruckDetailOrder",
+        name: "bmsTruckDetailOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckDetailOrder
+      },
+      {
+        path: "bmsTruckFormula",
+        name: "bmsTruckFormula",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckFormula
+      },
+      {
+        path: "bmsTruckInvoice",
+        name: "bmsTruckInvoice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckInvoice
+      },
+      {
+        path: "bmsTruckStatement",
+        name: "bmsTruckStatement",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckStatement
+      },
+      {
+        path: "getBmsTruckStatementOrder/:statementId",
+        name: "getBmsTruckStatementOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: getBmsTruckStatementOrder
+      },
+      {
+        path: "getTransportResult/:orderId",
+        name: "getTransportResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: getTransportResult
+      },
+      {
+        path: "mapTest",
+        name: "mapTest",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mapTest
+      },
+      {
+        path: "checkGPS",
+        name: "checkGPS",
+        meta: { code: "xtpzgl-yhgl" },
+        component: checkGPS
+      },
+      {
+        path: "currentLocation",
+        name: "currentLocation",
+        meta: { code: "xtpzgl-yhgl" },
+        component: currentLocation
+      },
+      {
+        path: "inTransitWarn",
+        name: "inTransitWarn",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inTransitWarn
+      },
+      {
+        path: "transportationPerformance",
+        name: "transportationPerformance",
+        meta: { code: "xtpzgl-yhgl" },
+        component: transportationPerformance
+      },
+      {
+        path: "bmsTruckSteelDetails",
+        name: "bmsTruckSteelDetails",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckSteelDetails
+      },
+      {
+        path: "bmsTruckSteelStatement",
+        name: "bmsTruckSteelStatement",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckSteelStatement
+      }
+    ]
+  }
+];
+const router = new Router({
+  routes: constantRouterMap
+});
+//  before
+routerBefore(router, constantRouterMap);
+
+export default router;
+//  constantRouterMap
+export const routes = constantRouterMap;

+ 123 - 125
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelAllReport.vue

@@ -2,14 +2,14 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="tableTop">
-      <el-form :inline="true" style="margin-top :5px">
+      <el-form :inline="true" style="margin-top: 5px">
         <el-form-item>
           <el-select
             v-model="screen"
             placeholder="请选择需筛选的内容"
             clearable
             @change="changeScreen"
-            style="width:150px"
+            style="width: 150px"
           >
             <el-option
               v-for="item in options"
@@ -20,21 +20,21 @@
             </el-option>
           </el-select>
           <el-input
-            style="width:200px"
+            style="width: 200px"
             v-model="input"
             placeholder="请输入查询条件"
             clearable
           ></el-input>
         </el-form-item>
         <el-form-item>
-          <label class="el-form-item__label" style="width: auto;"
+          <label class="el-form-item__label" style="width: auto"
             >订单时间:</label
           >
           <el-date-picker
             v-model="startTime"
             type="datetime"
             placeholder="选择日期时间"
-            style="width:200px"
+            style="width: 200px"
           >
           </el-date-picker>
           <span>至</span>
@@ -42,7 +42,7 @@
             v-model="endTime"
             type="datetime"
             placeholder="选择日期时间"
-            style="width:200px"
+            style="width: 200px"
           >
           </el-date-picker>
           <el-button type="primary" class="btn" @click="onclick">
@@ -64,7 +64,7 @@
           <el-input
             v-model="totalCapacity"
             :disabled="true"
-            style="width: 100px;"
+            style="width: 100px"
           ></el-input>
         </el-form-item>
         <el-form-item>
@@ -72,7 +72,7 @@
           <el-input
             v-model="totalNumber"
             :disabled="true"
-            style="width: 100px;"
+            style="width: 100px"
           ></el-input>
         </el-form-item>
       </el-form>
@@ -89,8 +89,11 @@
         @cell-click="cellClik"
         :row-style="{ height: '30px' }"
         :cell-style="{ fontWeight: '700' }"
+        id="salesLogistics_saleSteelAllReport_table"
+        individual-panel
       >
         <el-table-column
+          prop="index"
           width="50"
           label="序号"
           align="center"
@@ -116,7 +119,7 @@
         >
           <template slot-scope="scope">
             <el-autocomplete
-              style="width:120px"
+              style="width: 120px"
               v-model="scope.row.carrierName"
               :fetch-suggestions="querySearchCarrier"
               placeholder="请输入承运商"
@@ -142,7 +145,7 @@
         >
           <template slot-scope="scope">
             <el-autocomplete
-              style="width:120px"
+              style="width: 120px"
               v-model="scope.row.capacityNo"
               :fetch-suggestions="querySearch"
               placeholder="请输入车牌号"
@@ -177,14 +180,20 @@
               type="primary"
               @click="scope.row.materialNum--"
               v-if="scope.row.isNumShow == 1"
-              style="height:40px"
+              style="height: 40px"
             >
               -
             </button>
             <input
               v-model="scope.row.materialNum"
               disabled
-              style="width:40px;height: 40px;font-size:16px;line-height: 40px;text-align: center;"
+              style="
+                width: 40px;
+                height: 40px;
+                font-size: 16px;
+                line-height: 40px;
+                text-align: center;
+              "
             />
             <el-button
               type="primary"
@@ -201,7 +210,7 @@
         >
           <template slot-scope="scope">
             <el-input
-              style="width:280px"
+              style="width: 280px"
               v-model="scope.row.addressPlace"
               placeholder="请输入收货地址"
               :disabled="scope.row.isAddressShow != 1"
@@ -256,7 +265,7 @@
         >
           <template slot-scope="scope">
             <el-input
-              style="width:120px"
+              style="width: 120px"
               v-model="scope.row.capacityTel"
               placeholder="请输入电话号码"
               :disabled="scope.row.isTelShow != 1"
@@ -298,6 +307,7 @@
         </el-table-column>
         <el-table-column
           label="操作"
+          prop="singleOp"
           fixed="right"
           width="120px"
           align="center"
@@ -310,9 +320,17 @@
               v-if="scope.row.deletedStatus == null"
               >关闭分录</el-button
             >
+            <el-button
+              type="text"
+              size="small"
+              @click="adverseCloseSaleMaterial(scope.row)"
+              v-if="scope.row.deletedStatus != null"
+              >反关闭分录</el-button
+            >
           </template>
         </el-table-column>
         <el-table-column
+          prop="someSignle"
           label="操作"
           fixed="right"
           width="120px"
@@ -325,29 +343,13 @@
               @click="deleteEasEntryId(scope.row)"
               v-if="
                 scope.row.carStatus == 4 ||
-                  scope.row.carStatus == 5 ||
-                  scope.row.carStatus == null
+                scope.row.carStatus == 5 ||
+                scope.row.carStatus == null
               "
               >关闭车辆</el-button
             >
           </template>
         </el-table-column>
-        <el-table-column
-          label="操作"
-          fixed="right"
-          width="120px"
-          align="center"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              size="small"
-              @click="adverseCloseSaleMaterial(scope.row)"
-              v-if="scope.row.deletedStatus != null"
-              >反关闭分录</el-button
-            >
-          </template>
-        </el-table-column>
       </el-table>
     </div>
     <div class="address">
@@ -355,7 +357,7 @@
       <el-dialog title="收货地址" :visible.sync="drawer" width="90%">
         <el-form :inline="true">
           <el-form-item>
-            <label class="el-form-item__label" style="width: auto;">省</label>
+            <label class="el-form-item__label" style="width: auto">省</label>
             <el-select
               v-model="province"
               filterable
@@ -371,7 +373,7 @@
             </el-select>
           </el-form-item>
           <el-form-item>
-            <label class="el-form-item__label" style="width: auto;">市</label>
+            <label class="el-form-item__label" style="width: auto">市</label>
             <el-select
               v-model="city"
               filterable
@@ -387,7 +389,7 @@
             </el-select>
           </el-form-item>
           <el-form-item>
-            <label class="el-form-item__label" style="width: auto;"
+            <label class="el-form-item__label" style="width: auto"
               >县(区)</label
             >
             <el-select
@@ -405,7 +407,7 @@
             </el-select>
           </el-form-item>
           <el-form-item>
-            <label class="el-form-item__label" style="width: auto;"
+            <label class="el-form-item__label" style="width: auto"
               >具体收货地址</label
             >
             <el-autocomplete
@@ -442,16 +444,16 @@ export default {
       options: [
         {
           value: "下单客户",
-          lable: "下单客户"
+          lable: "下单客户",
         },
         {
           value: "承运商",
-          lable: "承运商"
+          lable: "承运商",
         },
         {
           value: "车牌号",
-          lable: "车牌号"
-        }
+          lable: "车牌号",
+        },
       ],
       startTime: null,
       endTime: null,
@@ -467,41 +469,35 @@ export default {
       pos: 0,
       isCellClick: 0,
       columnIndexs: [
-        0,
-        1,
-        2,
-        3,
-        7,
-        8,
-        14,
-        16,
-        17,
-        18,
-        19,
-        20,
-        21,
-        22,
-        23,
-        24,
-        25,
-        26,
-        27,
-        29
+        0, 1, 2, 3, 7, 8, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+        29,
+      ],
+      mergeList: [
+        "someSignle",
+        "saleOrderStatus",
+        "shipperName",
+        "saler",
+        "capacityTel",
+        "orderNo",
+        "receiptAddress",
+        "arrivalAddress",
+        "outGateTime",
+        "entryGateTime",
+        "orderStatus",
+        "addressPlace",
+        "capacityNo",
+        "carrierName",
+        "consigneeName",
+        "index",
+        "truckNo",
+        "consigneeTel",
+        "isSelfMention"
       ],
       //钢材多拼车辆线路ID
       //索引从1-10为1-10拼路线ID
       lineSpelling: [
-        0,
-        110001,
-        110002,
-        110003,
-        110004,
-        110005,
-        110006,
-        110007,
-        110008,
-        110009,
-        110010
+        0, 110001, 110002, 110003, 110004, 110005, 110006, 110007, 110008,
+        110009, 110010,
       ],
       tableTitle: "销售钢材统计报表",
       //所有省
@@ -526,7 +522,7 @@ export default {
       place1: null,
       //省市县Id
       addressId: null,
-      addressRow: {}
+      addressRow: {},
     };
   },
   created() {},
@@ -540,14 +536,14 @@ export default {
       this.$confirm("确定反关闭该条分录?", "提示", {
         cancelButtonText: "确定",
         confirmButtonText: "取消",
-        center: true
+        center: true,
       }).then(() => {
         this.axios
           .post(
             "/api/v1/ams/adverseCloseSaleMaterial?saleMaterialId=" +
               row.saleMaterialId
           )
-          .then(res => {
+          .then((res) => {
             if (res.data.code == "200") {
               this.$message.success("反关闭成功");
               this.getSteelReport();
@@ -568,13 +564,13 @@ export default {
         lock: true,
         text: "正在导出Excel",
         spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
+        background: "rgba(0, 0, 0, 0.7)",
       });
       var title = this.tableTitle;
       let tHeader = [];
       let filterVal = [];
       console.log(this.$refs.tableRef);
-      this.$refs.tableRef.$children.forEach(item => {
+      this.$refs.tableRef.$children.forEach((item) => {
         if (item.label != undefined && item.prop != undefined) {
           if (tHeader.indexOf(item.label) === -1) {
             tHeader.push(item.label);
@@ -587,9 +583,9 @@ export default {
       this.downloadLoading = true;
       require.ensure([], () => {
         const {
-          export_json_to_excel
+          export_json_to_excel,
         } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
-        let data = this.tableData.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        let data = this.tableData.map((v) => filterVal.map((j) => v[j])); //3.formatJson格式转换
         export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
       });
       loading.close();
@@ -600,7 +596,7 @@ export default {
     cellClik(row, column, cell, event) {
       if (row.group != this.clickIndex) {
         // this.getSteelReport();
-        this.tableData.forEach(item => {
+        this.tableData.forEach((item) => {
           if (item.group == this.clickIndex) {
             this.$set(item, "isCapacityShow", 0);
             this.$set(item, "isCarrierShow", 0);
@@ -633,7 +629,7 @@ export default {
     },
     //承运商弹出层
     handleSelectCarrier(row, index, item) {
-      this.carrierList.forEach(item => {
+      this.carrierList.forEach((item) => {
         if (item.carrierName == row.carrierName) {
           row.newCarrierId = item.carrierId;
           row.carrierId = item.carrierId;
@@ -645,7 +641,7 @@ export default {
       if (queryString.length > 1) {
         this.axios
           .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
-          .then(res => {
+          .then((res) => {
             if (res.data.code == "200") {
               this.carrierList = [];
               if (res.data.data.length == 0) {
@@ -663,7 +659,7 @@ export default {
       }
     },
     createFilterCarrier(queryString) {
-      return restaurants => {
+      return (restaurants) => {
         return (
           restaurants.value1.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -675,7 +671,7 @@ export default {
       if (queryString.length > 3) {
         this.axios
           .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
-          .then(res => {
+          .then((res) => {
             this.capacityList = [];
             if (res.data.code == "200") {
               if (res.data.data.length == 0) {
@@ -694,7 +690,7 @@ export default {
       }
     },
     createFilter(queryString) {
-      return restaurants => {
+      return (restaurants) => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -703,7 +699,7 @@ export default {
     },
     //车牌号弹出层
     handleSelect(row, index) {
-      this.capacityList.forEach(item => {
+      this.capacityList.forEach((item) => {
         if (item.capacityNumber === row.capacityNo) {
           row.newsCapacityId = item.capacityId;
         }
@@ -723,11 +719,11 @@ export default {
           lock: true,
           text: "正在变更车牌号",
           spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)"
+          background: "rgba(0, 0, 0, 0.7)",
         });
         this.axios
           .post("/api/v1/ams/updateCapacityNumberInFactory", row)
-          .then(res => {
+          .then((res) => {
             if (res.data.code == 200) {
               this.$message.success("变更车牌号成功!");
               this.getSteelReport();
@@ -749,7 +745,7 @@ export default {
           return;
         }
         let i = 0;
-        this.tableData.forEach(e => {
+        this.tableData.forEach((e) => {
           if (row.group == e.group) {
             i++;
           }
@@ -763,11 +759,11 @@ export default {
           lock: true,
           text: "正在变更车牌号",
           spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)"
+          background: "rgba(0, 0, 0, 0.7)",
         });
         this.axios
           .post("/api/v1/ams/dispatchSteelOrder", arr)
-          .then(res => {
+          .then((res) => {
             if (res.data.code == "200") {
               this.$message.success("派车成功!");
               this.getSteelReport();
@@ -791,7 +787,7 @@ export default {
         lock: true,
         text: "修改电话号码中",
         spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
+        background: "rgba(0, 0, 0, 0.7)",
       });
       if (row.capacityTel == null || row.capacityTel == "") {
         this.$message.error("电话号码不能为空");
@@ -800,9 +796,9 @@ export default {
       this.axios
         .post("/api/v1/uc/updateDriverTel", {
           orderId: parseInt(row.orderId),
-          driverTel: row.capacityTel
+          driverTel: row.capacityTel,
         })
-        .then(res => {
+        .then((res) => {
           if (res.data.code == "200") {
             this.$message.success("修改成功");
             this.getSteelReport();
@@ -825,7 +821,7 @@ export default {
         confirmButtonText: "是",
         cancelButtonText: "否",
         center: true,
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
           let map = row;
@@ -834,11 +830,11 @@ export default {
             lock: true,
             text: "正在关闭车辆",
             spinner: "el-icon-loading",
-            background: "rgba(0, 0, 0, 0.7)"
+            background: "rgba(0, 0, 0, 0.7)",
           });
           this.axios
             .post("/api/v1/ams/updateCarAddress", map)
-            .then(res => {
+            .then((res) => {
               if (res.data.code == "200") {
                 this.$message.success("关闭车辆成功");
                 this.getSteelReport();
@@ -871,11 +867,11 @@ export default {
           lock: true,
           text: "正在修改承运商授权",
           spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)"
+          background: "rgba(0, 0, 0, 0.7)",
         });
         this.axios
           .post("/api/v1/ams/updateTruckNoCarrier", row)
-          .then(res => {
+          .then((res) => {
             if (res.data.code == "200") {
               this.$message.success("修改承运商授权成功");
               this.getSteelReport();
@@ -899,11 +895,11 @@ export default {
           lock: true,
           text: "正在授权承运商",
           spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)"
+          background: "rgba(0, 0, 0, 0.7)",
         });
         this.axios
           .post("/api/v1/ams/dispatchToCarrier", arr)
-          .then(res => {
+          .then((res) => {
             if (res.data.code == "200") {
               this.$message.success("授权承运商成功");
               this.getSteelReport();
@@ -934,7 +930,7 @@ export default {
     },
     //获取所有省数据
     getAllProvince() {
-      this.axios.post("/api/v1/uc/getAllProvince").then(res => {
+      this.axios.post("/api/v1/uc/getAllProvince").then((res) => {
         this.provinceList = res.data.data;
       });
     },
@@ -947,7 +943,7 @@ export default {
             "&i=" +
             new Date()
         )
-        .then(res => {
+        .then((res) => {
           this.cityList = res.data.data;
           // this.city = "";
           // this.county = "";
@@ -962,7 +958,7 @@ export default {
             "&i=" +
             new Date()
         )
-        .then(res => {
+        .then((res) => {
           this.countyList = res.data.data;
         });
     },
@@ -971,11 +967,13 @@ export default {
       let mapValue = {
         addressProvince: this.province,
         addressDistrict: this.city,
-        addressTown: this.county
+        addressTown: this.county,
       };
-      this.axios.post("/api/v1/uc/getPlaceByAllAddress", mapValue).then(res => {
-        this.addressId = res.data.data[0].addressId;
-      });
+      this.axios
+        .post("/api/v1/uc/getPlaceByAllAddress", mapValue)
+        .then((res) => {
+          this.addressId = res.data.data[0].addressId;
+        });
     },
     //收货地址弹出层
     handleSelect1(item) {
@@ -990,7 +988,7 @@ export default {
             "&index=" +
             queryString
         )
-        .then(res => {
+        .then((res) => {
           if (res.data.code == "200") {
             var restaurants = res.data.data;
             var results = queryString
@@ -1002,7 +1000,7 @@ export default {
         });
     },
     createFilter1(queryString) {
-      return restaurants => {
+      return (restaurants) => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -1015,7 +1013,7 @@ export default {
         lock: true,
         text: "正在修改收货地址",
         spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
+        background: "rgba(0, 0, 0, 0.7)",
       });
       let map = this.addressRow;
       map.isCloseEas = Number(1);
@@ -1024,7 +1022,7 @@ export default {
       map.shipperAddressId = this.addressId;
       this.axios
         .post("/api/v1/ams/updateCarAddress", map)
-        .then(res => {
+        .then((res) => {
           if (res.data.code == "200") {
             this.$message.success("修改收货地址成功!");
             this.getSteelReport();
@@ -1066,7 +1064,7 @@ export default {
           }
         }
         this.totalCapacity = data[data.length - 1].group + 1;
-        this.totalNumber = data.reduce(function(prev, item) {
+        this.totalNumber = data.reduce(function (prev, item) {
           return prev + item.materialNum;
         }, 0);
       }
@@ -1077,7 +1075,7 @@ export default {
         const _col = _row > 0 ? 1 : 0;
         return {
           rowspan: _row,
-          colspan: _col
+          colspan: _col,
         };
       }
     },
@@ -1087,11 +1085,11 @@ export default {
         lock: true,
         text: "修改物资件数中",
         spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
+        background: "rgba(0, 0, 0, 0.7)",
       });
       let map = {
         materialId: row.materialId,
-        materialNum: row.materialNum
+        materialNum: row.materialNum,
       };
       let arr = [];
       arr.push(map);
@@ -1099,11 +1097,11 @@ export default {
         orderId: row.orderId,
         saleOrderId: row.saleOrderId,
         saleOrderMaterialId: row.saleOrderMaterialId,
-        mapList: arr
+        mapList: arr,
       };
       this.axios
         .post("/api/v1/oms/updateMaterialMes", updateMap)
-        .then(res => {
+        .then((res) => {
           if (res.data.code == "200") {
             this.$message.success("修改物资数量成功");
             this.getSteelReport();
@@ -1127,7 +1125,7 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         center: true,
-        inputPlaceholder: "请输入关闭理由"
+        inputPlaceholder: "请输入关闭理由",
       })
         .then(({ value }) => {
           if (value != null || value != "") {
@@ -1135,7 +1133,7 @@ export default {
               lock: true,
               text: "正在关闭该条分录",
               spinner: "el-icon-loading",
-              background: "rgba(0, 0, 0, 0.7)"
+              background: "rgba(0, 0, 0, 0.7)",
             });
             let map = {
               orderId: row.orderId,
@@ -1143,11 +1141,11 @@ export default {
               saleMaterialId: row.saleMaterialId,
               reason: value,
               number: row.saleOrderNo,
-              closeEntryId: row.closeEntryId
+              closeEntryId: row.closeEntryId,
             };
             this.axios
               .post("/api/v1/ams/closeSteelMaterialId", map)
-              .then(res => {
+              .then((res) => {
                 if (res.data.code == "200") {
                   this.$message.success("关闭成功");
                   this.getSteelReport();
@@ -1219,7 +1217,7 @@ export default {
             "&saler=" +
             saler
         )
-        .then(res => {
+        .then((res) => {
           this.tableData = res.data.data;
           this.getSpanArr(res.data.data);
         });
@@ -1251,7 +1249,7 @@ export default {
             "&i=" +
             new Date()
         )
-        .then(res => {
+        .then((res) => {
           this.tableData = res.data.data;
           this.getSpanArr(res.data.data);
         });
@@ -1322,8 +1320,8 @@ export default {
         flexWidth = 500;
       }
       return flexWidth + "px";
-    }
-  }
+    },
+  },
 };
 </script>
 

部分文件因文件數量過多而無法顯示