luobang 2 年之前
父节点
当前提交
3300d1781a

+ 1 - 1
build/utils.js

@@ -20,7 +20,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 // let devModules = ['index', 'inward']
 // let devModules = ['index', 'inward']
 let devModules = ['all']
 let devModules = ['all']
 
 
-// let devModules = ['index', 'statisticalReport', 'inward']
+// let devModules = ['index', 'inward', 'statisticalReport']
 
 
 if (pathSrc.indexOf('node_modules') > -1) {
 if (pathSrc.indexOf('node_modules') > -1) {
   devModules = require('../../../cors.js').devModules
   devModules = require('../../../cors.js').devModules

+ 84 - 16
src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue

@@ -6,7 +6,7 @@
       <el-form :inline="true">
       <el-form :inline="true">
         <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
+            >订单时间:</label
           >
           >
           <el-date-picker
           <el-date-picker
             v-model="startTime"
             v-model="startTime"
@@ -68,6 +68,9 @@
             clearable
             clearable
           ></el-input>
           ></el-input>
         </el-form-item>
         </el-form-item>
+        <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="exportAllReportToExcel"
           <el-button type="primary" @click="exportAllReportToExcel"
             ><i class="el-icon-download"></i>Excel</el-button
             ><i class="el-icon-download"></i>Excel</el-button
@@ -77,9 +80,7 @@
           <el-button type="primary" @click="refresh">
           <el-button type="primary" @click="refresh">
             <i class="el-icon-refresh"></i>
             <i class="el-icon-refresh"></i>
           </el-button>
           </el-button>
-          <el-button type="primary" class="btn" @click="onclick">
-            <i class="el-icon-search"></i>
-          </el-button>
+
           <el-button type="primary" class="btn" @click="batchOperate"
           <el-button type="primary" class="btn" @click="batchOperate"
             >批量保存</el-button
             >批量保存</el-button
           >
           >
@@ -99,6 +100,7 @@
             size="mini"
             size="mini"
             v-model="sendStationId"
             v-model="sendStationId"
             @change="handleMulSendChange()"
             @change="handleMulSendChange()"
+            placeholder="请选择发站"
           >
           >
             <el-option
             <el-option
               v-for="item in sendStationList"
               v-for="item in sendStationList"
@@ -141,13 +143,7 @@
         >
         >
           <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
           <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
         </el-table-column>
         </el-table-column>
-        <el-table-column
-          prop="saleNo"
-          label="单据编号"
-          width="200px"
-          align="center"
-        >
-        </el-table-column>
+
         <el-table-column
         <el-table-column
           prop="saleRemark"
           prop="saleRemark"
           label="摘要"
           label="摘要"
@@ -253,19 +249,41 @@
           prop="materialNum"
           prop="materialNum"
           label="件数"
           label="件数"
           align="center"
           align="center"
-          width="150px"
+          width="80px"
         >
         >
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
           prop="materialWeight"
           prop="materialWeight"
           label="重量"
           label="重量"
           align="center"
           align="center"
+          width="80px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="flId"
+          label="分录ID"
+          align="center"
           width="150px"
           width="150px"
+          show-overflow-tooltip
         >
         >
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
-          prop="isPoundSale"
-          label="重量"
+          prop="saleNo"
+          label="单据编号"
+          width="200px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="sendStationOptionName"
+          label="发站修改人"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="consigneeOptionName"
+          label="收货单位修改人"
           align="center"
           align="center"
           width="150px"
           width="150px"
         >
         >
@@ -274,7 +292,7 @@
           prop="operate"
           prop="operate"
           label="操作"
           label="操作"
           align="center"
           align="center"
-          width="150px"
+          width="120px"
         >
         >
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-button type="text" @click="operate(scope.row)">保存</el-button>
             <el-button type="text" @click="operate(scope.row)">保存</el-button>
@@ -299,6 +317,10 @@ export default {
           value: '到站',
           value: '到站',
           lable: '到站'
           lable: '到站'
         },
         },
+        {
+          value: '发站',
+          lable: '发站'
+        },
         {
         {
           value: '收货单位',
           value: '收货单位',
           lable: '收货单位'
           lable: '收货单位'
@@ -306,6 +328,14 @@ export default {
         {
         {
           value: '调入部门',
           value: '调入部门',
           lable: '调入部门'
           lable: '调入部门'
+        },
+        {
+          value: '物资名称',
+          lable: '物资名称'
+        },
+        {
+          value: '规格型号',
+          lable: '规格型号'
         }
         }
       ],
       ],
       options1: [
       options1: [
@@ -313,6 +343,10 @@ export default {
           value: '到站',
           value: '到站',
           lable: '到站'
           lable: '到站'
         },
         },
+        {
+          value: '发站',
+          lable: '发站'
+        },
         {
         {
           value: '收货单位',
           value: '收货单位',
           lable: '收货单位'
           lable: '收货单位'
@@ -320,6 +354,14 @@ export default {
         {
         {
           value: '调入部门',
           value: '调入部门',
           lable: '调入部门'
           lable: '调入部门'
+        },
+        {
+          value: '物资名称',
+          lable: '物资名称'
+        },
+        {
+          value: '规格型号',
+          lable: '规格型号'
         }
         }
       ],
       ],
       input: null,
       input: null,
@@ -498,6 +540,7 @@ export default {
     },
     },
     //修改发站
     //修改发站
     changesendStation(row) {
     changesendStation(row) {
+      row.userName = getCookie('loginName')
       this.axios.post('/api/v1/ams/updateInwardConsignee', row).then(res => {
       this.axios.post('/api/v1/ams/updateInwardConsignee', row).then(res => {
         if (res.data.code == '200') {
         if (res.data.code == '200') {
           this.$message.success('保存成功')
           this.$message.success('保存成功')
@@ -505,6 +548,7 @@ export default {
       })
       })
     },
     },
     operate(row) {
     operate(row) {
+      row.userName = getCookie('loginName')
       this.axios
       this.axios
         .post('/api/v1/ams/updateInwardConsignee', row)
         .post('/api/v1/ams/updateInwardConsignee', row)
         .then(res => {
         .then(res => {
@@ -523,12 +567,16 @@ export default {
     },
     },
     //查询事件
     //查询事件
     onclick() {
     onclick() {
+      let obj = {}
       let startTime = null
       let startTime = null
       let endTime = null
       let endTime = null
       let totheStation = null
       let totheStation = null
       let consigneeName = null
       let consigneeName = null
       let transferIndep = null
       let transferIndep = null
       let remark = null
       let remark = null
+      let materialSpa = null
+      let materialName = null
+      let sendStation = null
       if (this.startTime && this.endTime) {
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime)
         startTime = sjTime(this.startTime)
         endTime = sjTime(this.endTime)
         endTime = sjTime(this.endTime)
@@ -539,6 +587,15 @@ export default {
         consigneeName = this.input
         consigneeName = this.input
       } else if (this.screen == '调入部门') {
       } else if (this.screen == '调入部门') {
         transferIndep = this.input
         transferIndep = this.input
+      } else if (this.screen == '物资名称') {
+        materialName = this.input
+        obj.materialName = materialName
+      } else if (this.screen == '规格型号') {
+        materialSpa = this.input
+        obj.materialSpa = materialSpa
+      } else if (this.screen == '发站') {
+        sendStation = this.input
+        obj.sendStation = sendStation
       } else {
       } else {
         remark = this.input
         remark = this.input
       }
       }
@@ -548,9 +605,19 @@ export default {
         consigneeName = this.input1
         consigneeName = this.input1
       } else if (this.screen1 == '调入部门') {
       } else if (this.screen1 == '调入部门') {
         transferIndep = this.input1
         transferIndep = this.input1
+      } else if (this.screen1 == '物资名称') {
+        materialName = this.input1
+        obj.materialName = materialName
+      } else if (this.screen1 == '规格型号') {
+        materialSpa = this.input1
+        obj.materialSpa = materialSpa
+      } else if (this.screen1 == '发站') {
+        sendStation = this.input1
+        obj.sendStation = sendStation
       } else {
       } else {
         remark = this.input1
         remark = this.input1
       }
       }
+
       this.axios
       this.axios
         .post(
         .post(
           '/api/v1/ams/getKucunList?startTime=' +
           '/api/v1/ams/getKucunList?startTime=' +
@@ -564,7 +631,8 @@ export default {
             '&transferIndep=' +
             '&transferIndep=' +
             transferIndep +
             transferIndep +
             '&remark=' +
             '&remark=' +
-            remark
+            remark,
+          obj
         )
         )
         .then(res => {
         .then(res => {
           this.tableData = res.data.data
           this.tableData = res.data.data

+ 258 - 168
src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue

@@ -46,6 +46,28 @@
             clearable
             clearable
           ></el-input>
           ></el-input>
         </el-form-item>
         </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-form-item>
           <el-button type="primary" class="btn" @click="onclick">
           <el-button type="primary" class="btn" @click="onclick">
             <i class="el-icon-search"></i>
             <i class="el-icon-search"></i>
@@ -299,7 +321,12 @@
           width="150px"
           width="150px"
         >
         >
         </el-table-column>
         </el-table-column>
-        <el-table-column label="操作" align="center" width="150px" prop="operation">
+        <el-table-column
+          label="操作"
+          align="center"
+          width="150px"
+          prop="operation"
+        >
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-button type="text" @click="operate(scope.row)">保存</el-button>
             <el-button type="text" @click="operate(scope.row)">保存</el-button>
           </template>
           </template>
@@ -311,8 +338,8 @@
 <script>
 <script>
 //需要设计-发站、移库/直发的表格筛选传递给后端
 //需要设计-发站、移库/直发的表格筛选传递给后端
 //需要设计-件数,重量,理重,标重,计费吨位的合计
 //需要设计-件数,重量,理重,标重,计费吨位的合计
-import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from "@/utils/util.js";
+import { sjTime } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
 export default {
 export default {
   data() {
   data() {
     return {
     return {
@@ -320,43 +347,80 @@ export default {
       endTime: null,
       endTime: null,
       options: [
       options: [
         {
         {
-          value: "发站",
-          lable: "发站"
+          value: '发站',
+          lable: '发站'
+        },
+        {
+          value: '收货单位',
+          lable: '收货单位'
         },
         },
         {
         {
-          value: "收货单位",
-          lable: "收货单位"
+          value: '车皮号',
+          lable: '车皮号'
         },
         },
         {
         {
-          value: "车皮号",
-          lable: "车皮号"
+          value: '到站',
+          lable: '到站'
         },
         },
         {
         {
-          value: "到站",
-          lable: "到站"
+          value: '物资名称',
+          lable: '物资名称'
+        },
+        {
+          value: '规格型号',
+          lable: '规格型号'
         }
         }
       ],
       ],
       input: null,
       input: null,
+      options1: [
+        {
+          value: '发站',
+          lable: '发站'
+        },
+        {
+          value: '收货单位',
+          lable: '收货单位'
+        },
+        {
+          value: '车皮号',
+          lable: '车皮号'
+        },
+        {
+          value: '到站',
+          lable: '到站'
+        },
+        {
+          value: '物资名称',
+          lable: '物资名称'
+        },
+        {
+          value: '规格型号',
+          lable: '规格型号'
+        }
+      ],
+      input1: null,
       tableData: [],
       tableData: [],
       screen: null,
       screen: null,
+      screen1: null,
       sumList: [
       sumList: [
-        "wagonBillWeight",
-        "wagonWeight",
-        "theoryWeight",
-        "materialWeight",
-        "materialNum"
+        'wagonBillWeight',
+        'wagonWeight',
+        'theoryWeight',
+        'materialWeight',
+        'materialNum'
       ],
       ],
-      operateName: "编辑",
+      operateName: '编辑',
       unloadPointList: [],
       unloadPointList: [],
       spanArr: [],
       spanArr: [],
-      mergeList: ["wagonNo","wagonBillWeight","OutStation"]
-    };
+      mergeList: ['wagonNo', 'wagonBillWeight', 'OutStation'],
+      filterMap: {}
+    }
   },
   },
   created() {
   created() {
-    this.getRequestUrl();
+    this.getRequestUrl()
   },
   },
   mounted() {
   mounted() {
-    this.showSummariesPosition();
+    this.showSummariesPosition()
   },
   },
   methods: {
   methods: {
     batchOperate() {
     batchOperate() {
@@ -368,67 +432,67 @@ export default {
             e.consigneeId != null &&
             e.consigneeId != null &&
             e.unloadPointId != null
             e.unloadPointId != null
           ) {
           ) {
-            item.unloadPointId = e.unloadPointId;
-            item.unloadPoint = e.unloadPoint;
+            item.unloadPointId = e.unloadPointId
+            item.unloadPoint = e.unloadPoint
           }
           }
-        });
-      });
+        })
+      })
       this.$refs.tableRef.data.forEach(row => {
       this.$refs.tableRef.data.forEach(row => {
-        row.personnelSsoId = getCookie("userId");
+        row.personnelSsoId = getCookie('userId')
         if (
         if (
-          (typeof row.EnStation == "object" ||
-            typeof row.EnStation == "string") &&
+          (typeof row.EnStation == 'object' ||
+            typeof row.EnStation == 'string') &&
           row.EnStation != null
           row.EnStation != null
         ) {
         ) {
-          row.EnStation = sjTime(new Date(row.EnStation));
+          row.EnStation = sjTime(new Date(row.EnStation))
         }
         }
         if (
         if (
-          (typeof row.OutStation == "object" ||
-            typeof row.OutStation == "string") &&
+          (typeof row.OutStation == 'object' ||
+            typeof row.OutStation == 'string') &&
           row.OutStation != null
           row.OutStation != null
         ) {
         ) {
-          row.OutStation = sjTime(new Date(row.OutStation));
+          row.OutStation = sjTime(new Date(row.OutStation))
         }
         }
-      });
+      })
       this.axios
       this.axios
-        .post("/api/v1/wms/listAfterInwardOutbound", this.$refs.tableRef.data)
+        .post('/api/v1/wms/listAfterInwardOutbound', this.$refs.tableRef.data)
         .then(res => {
         .then(res => {
-          if (res.data.code == "200") {
-            this.$message.success("批量保存成功");
-            this.getRequestUrl();
+          if (res.data.code == '200') {
+            this.$message.success('批量保存成功')
+            this.getRequestUrl()
           }
           }
-        });
-      console.log(this.$refs.tableRef.data);
+        })
+      console.log(this.$refs.tableRef.data)
     },
     },
     handleSelectWarehouse(row, index, item) {
     handleSelectWarehouse(row, index, item) {
-      console.log(item);
+      console.log(item)
       this.unloadPointList.forEach(e => {
       this.unloadPointList.forEach(e => {
         if (e.warehouseName == row.unloadPoint) {
         if (e.warehouseName == row.unloadPoint) {
-          row.unloadPointId = e.warehouseId;
-          row.unloadPoint = e.warehouseName;
+          row.unloadPointId = e.warehouseId
+          row.unloadPoint = e.warehouseName
         }
         }
-      });
+      })
     },
     },
     //边输边查卸货点
     //边输边查卸货点
     querySearchWarehouse(queryString, cb) {
     querySearchWarehouse(queryString, cb) {
       if (queryString.length >= 2) {
       if (queryString.length >= 2) {
         this.axios
         this.axios
-          .post("/api/v1/uc/selectUnloadingPoint?index=" + queryString)
+          .post('/api/v1/uc/selectUnloadingPoint?index=' + queryString)
           .then(res => {
           .then(res => {
-            console.log(res.data);
+            console.log(res.data)
             if (res.data.length > 0) {
             if (res.data.length > 0) {
-              console.log(res);
-              var restaurantsConsignee = res.data;
-              this.unloadPointList = res.data;
+              console.log(res)
+              var restaurantsConsignee = res.data
+              this.unloadPointList = res.data
               var results = queryString
               var results = queryString
                 ? restaurantsConsignee.filter(
                 ? restaurantsConsignee.filter(
                     this.createFilterConsignee(queryString)
                     this.createFilterConsignee(queryString)
                   )
                   )
-                : restaurantsConsignee;
+                : restaurantsConsignee
               // 调用 callback 返回建议列表的数据
               // 调用 callback 返回建议列表的数据
-              cb(results);
+              cb(results)
             }
             }
-          });
+          })
       }
       }
     },
     },
     createFilterConsignee(queryString) {
     createFilterConsignee(queryString) {
@@ -437,235 +501,261 @@ export default {
           restaurantsConsignee.value
           restaurantsConsignee.value
             .toLowerCase()
             .toLowerCase()
             .indexOf(queryString.toLowerCase()) > -1
             .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
+        )
+      }
     },
     },
     //修改合并行同步
     //修改合并行同步
-    mergeChange(row){
-      let index=this.tableData.indexOf(row);
-      for(let i=index;i<this.tableData.length && row.wagonNo==this.tableData[i].wagonNo && row.OutStation==this.tableData[i].OutStation;i++){
-        this.tableData[i].wagonBillWeight=row.wagonBillWeight;
+    mergeChange(row) {
+      let index = this.tableData.indexOf(row)
+      for (
+        let i = index;
+        i < this.tableData.length &&
+        row.wagonNo == this.tableData[i].wagonNo &&
+        row.OutStation == this.tableData[i].OutStation;
+        i++
+      ) {
+        this.tableData[i].wagonBillWeight = row.wagonBillWeight
       }
       }
     },
     },
     operate(row) {
     operate(row) {
-      row.personnelSsoId = getCookie("userId");
+      row.personnelSsoId = getCookie('userId')
       if (
       if (
-        (typeof row.EnStation == "object" ||
-          typeof row.EnStation == "string") &&
+        (typeof row.EnStation == 'object' ||
+          typeof row.EnStation == 'string') &&
         row.EnStation != null
         row.EnStation != null
       ) {
       ) {
-        row.EnStation = sjTime(new Date(row.EnStation));
+        row.EnStation = sjTime(new Date(row.EnStation))
       }
       }
       if (
       if (
-        (typeof row.OutStation == "object" ||
-          typeof row.OutStation == "string") &&
+        (typeof row.OutStation == 'object' ||
+          typeof row.OutStation == 'string') &&
         row.OutStation != null
         row.OutStation != null
       ) {
       ) {
-        row.OutStation = sjTime(new Date(row.OutStation));
+        row.OutStation = sjTime(new Date(row.OutStation))
       }
       }
-      console.log(typeof row.EnStation);
-      console.log(typeof row.OutStation);
+      console.log(typeof row.EnStation)
+      console.log(typeof row.OutStation)
       this.axios
       this.axios
-        .post("/api/v1/wms/afterInwardOutbound", row)
+        .post('/api/v1/wms/afterInwardOutbound', row)
         .then(res => {
         .then(res => {
-          if (res.data.code == "200") {
-            this.$message.success("保存成功");
-            this.getRequestUrl();
+          if (res.data.code == '200') {
+            this.$message.success('保存成功')
+            this.getRequestUrl()
           } else {
           } else {
-            this.$message.error(res.data.data);
-            this.getRequestUrl();
+            this.$message.error(res.data.data)
+            this.getRequestUrl()
           }
           }
         })
         })
         .catch(e => {
         .catch(e => {
-          this.$message.error(e);
-          this.getRequestUrl();
-        });
+          this.$message.error(e)
+          this.getRequestUrl()
+        })
     },
     },
     //查询事件
     //查询事件
     onclick() {
     onclick() {
-      let startTime = null;
-      let endTime = null;
-      let wagonNo = null;
-      let consigneeName = null;
-      let sendStation = null;
-      let toTheStation = null;
-      if (this.screen == "发站") {
-        sendStation = this.input;
-      } else if (this.screen == "到站") {
-        toTheStation = this.input;
-      } else if (this.screen == "收货单位") {
-        consigneeName = this.input;
-      } else if (this.screen == "车皮号") {
-        wagonNo = this.input;
+      let startTime = null
+      let endTime = null
+      let wagonNo = null
+      let consigneeName = null
+      let sendStation = null
+      let toTheStation = null
+      if (this.screen == '发站') {
+        sendStation = this.input
+      } else if (this.screen == '到站') {
+        toTheStation = this.input
+      } else if (this.screen == '收货单位') {
+        consigneeName = this.input
+      } else if (this.screen == '车皮号') {
+        wagonNo = this.input
+      } else if (this.screen == '物资名称') {
+        this.filterMap.materialName = this.input
+      } else if (this.screen == '规格型号') {
+        this.filterMap.materialSpa = this.input
+      }
+      if (this.screen1 == '发站') {
+        sendStation = this.input1
+      } else if (this.screen1 == '到站') {
+        toTheStation = this.input1
+      } else if (this.screen1 == '收货单位') {
+        consigneeName = this.input1
+      } else if (this.screen1 == '车皮号') {
+        wagonNo = this.input1
+      } else if (this.screen1 == '物资名称') {
+        this.filterMap.materialName = this.input1
+      } else if (this.screen1 == '规格型号') {
+        this.filterMap.materialSpa = this.input1
       }
       }
       if (this.startTime && this.endTime) {
       if (this.startTime && this.endTime) {
-        startTime = sjTime(this.startTime);
-        endTime = sjTime(this.endTime);
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
       }
       }
       this.axios
       this.axios
         .post(
         .post(
-          "/api/v1/oms/getWagonShippingDetails?startTime=" +
+          '/api/v1/oms/getWagonShippingDetails?startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&wagonNo=" +
+            '&wagonNo=' +
             wagonNo +
             wagonNo +
-            "&consigneeName=" +
+            '&consigneeName=' +
             consigneeName +
             consigneeName +
-            "&toTheStation=" +
+            '&toTheStation=' +
             toTheStation +
             toTheStation +
-            "&sendStation=" +
+            '&sendStation=' +
             sendStation +
             sendStation +
-            "&i=" +
-            new Date()
+            '&i=' +
+            new Date(),
+          this.filterMap
         )
         )
         .then(res => {
         .then(res => {
-          this.tableData = res.data.data;
-          this.showSummariesPosition();
-          this.getSpanArr(this.tableData);
-        });
+          this.tableData = res.data.data
+          this.showSummariesPosition()
+          this.getSpanArr(this.tableData)
+        })
     },
     },
     //获取后台数据
     //获取后台数据
     getRequestUrl() {
     getRequestUrl() {
       this.axios
       this.axios
         .post(
         .post(
-          "/api/v1/oms/getWagonShippingDetails?startTime=null&endTime=null&i=" +
+          '/api/v1/oms/getWagonShippingDetails?startTime=null&endTime=null&i=' +
             new Date()
             new Date()
         )
         )
         .then(res => {
         .then(res => {
-          console.log(res.data.data);
-          this.tableData = res.data.data;
-          this.getSpanArr(this.tableData);
-          this.showSummariesPosition();
-        });
+          console.log(res.data.data)
+          this.tableData = res.data.data
+          this.getSpanArr(this.tableData)
+          this.showSummariesPosition()
+        })
     },
     },
     //刷新
     //刷新
     refresh() {
     refresh() {
-      this.screen = null;
-      this.input = null;
-      this.getRequestUrl();
+      this.screen = null
+      this.input = null
+      this.getRequestUrl()
     },
     },
     //筛选发站
     //筛选发站
     filterSend(value, row, column) {
     filterSend(value, row, column) {
-      return row.sendStation === value;
+      return row.sendStation === value
     },
     },
     //筛选类型
     //筛选类型
     filterType(value, row, column) {
     filterType(value, row, column) {
-      return row.orderType === value;
+      return row.orderType === value
     },
     },
     //筛选是否入库数据
     //筛选是否入库数据
     filterDeleted(value, row, column) {
     filterDeleted(value, row, column) {
-      return row.wgmDelete === value;
+      return row.wgmDelete === value
     },
     },
     //将合计行置顶
     //将合计行置顶
     showSummariesPosition() {
     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的上面
+      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) {
     getSummaries(param) {
-      const { columns, data } = param;
-      const sums = [];
+      const { columns, data } = param
+      const sums = []
       columns.forEach((column, index) => {
       columns.forEach((column, index) => {
         //如果索引值为0,则展示‘合计’
         //如果索引值为0,则展示‘合计’
         if (index === 0) {
         if (index === 0) {
-          sums[index] = "合计";
-          return;
+          sums[index] = '合计'
+          return
         }
         }
         if (this.sumList.includes(column.property)) {
         if (this.sumList.includes(column.property)) {
-          const values = data.map(item => Number(item[column.property]));
+          const values = data.map(item => Number(item[column.property]))
           if (!values.every(value => isNaN(value))) {
           if (!values.every(value => isNaN(value))) {
             sums[index] = values.reduce((prev, curr) => {
             sums[index] = values.reduce((prev, curr) => {
-              const value = Number(curr);
+              const value = Number(curr)
               if (!isNaN(value)) {
               if (!isNaN(value)) {
-                return prev + curr;
+                return prev + curr
               } else {
               } else {
-                return prev;
+                return prev
               }
               }
-            }, 0);
-            sums[index] = sums[index].toFixed(2);
+            }, 0)
+            sums[index] = sums[index].toFixed(2)
             // console.log("sums");
             // console.log("sums");
             // console.log(sums[index]);
             // console.log(sums[index]);
           } else {
           } else {
-            sums[index] = "N/A";
+            sums[index] = 'N/A'
           }
           }
         }
         }
         //遍历数组,找到符合条件的列
         //遍历数组,找到符合条件的列
-      });
-      return sums;
+      })
+      return sums
     },
     },
     getSpanArr(data) {
     getSpanArr(data) {
       //每次调用方法初始化
       //每次调用方法初始化
-      this.spanArr = [];
+      this.spanArr = []
       for (var i = 0; i < data.length; i++) {
       for (var i = 0; i < data.length; i++) {
         if (i === 0) {
         if (i === 0) {
-          this.spanArr.push(1);
-          data[i].group = i;
-          this.pos = 0;
+          this.spanArr.push(1)
+          data[i].group = i
+          this.pos = 0
         } else {
         } else {
           // 判断当前元素与上一个元素是否相同
           // 判断当前元素与上一个元素是否相同
-          if (data[i].orderId === data[i - 1].orderId
-          &&  data[i].wagonNo === data[i - 1].wagonNo
-          && data[i].OutStation === data[i - 1].OutStation) {
-            this.spanArr[this.pos] += 1;
-            data[i].group = data[i - 1].group;
-            this.spanArr.push(0);
+          if (
+            data[i].orderId === data[i - 1].orderId &&
+            data[i].wagonNo === data[i - 1].wagonNo &&
+            data[i].OutStation === data[i - 1].OutStation
+          ) {
+            this.spanArr[this.pos] += 1
+            data[i].group = data[i - 1].group
+            this.spanArr.push(0)
           } else {
           } else {
-            this.spanArr.push(1);
-            this.pos = i;
-            data[i].group = data[i - 1].group + 1;
+            this.spanArr.push(1)
+            this.pos = i
+            data[i].group = data[i - 1].group + 1
           }
           }
         }
         }
       }
       }
     },
     },
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (this.mergeList.includes(column.property)) {
       if (this.mergeList.includes(column.property)) {
-        const _row = this.spanArr[rowIndex];
-        const _col = _row > 0 ? 1 : 0;
+        const _row = this.spanArr[rowIndex]
+        const _col = _row > 0 ? 1 : 0
         return {
         return {
           rowspan: _row,
           rowspan: _row,
           colspan: _col
           colspan: _col
-        };
+        }
       }
       }
     },
     },
     //导出Excel
     //导出Excel
     exportAllReportToExcel() {
     exportAllReportToExcel() {
-      console.log(this.$refs.tableRef);
+      console.log(this.$refs.tableRef)
       const loading = this.$loading({
       const loading = this.$loading({
         lock: true,
         lock: true,
-        text: "正在导出Excel",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
-      });
-      var title = "火车发运明细";
-      let tHeader = [];
-      let filterVal = [];
-      console.log(this.$refs.tableRef);
+        text: '正在导出Excel',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      var title = '火车发运明细'
+      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 (item.label != undefined && item.prop != undefined) {
           if (tHeader.indexOf(item.label) === -1) {
           if (tHeader.indexOf(item.label) === -1) {
-            tHeader.push(item.label);
+            tHeader.push(item.label)
           }
           }
           if (filterVal.indexOf(item.prop) === -1) {
           if (filterVal.indexOf(item.prop) === -1) {
-            filterVal.push(item.prop);
+            filterVal.push(item.prop)
           }
           }
         }
         }
-      });
-      this.downloadLoading = true;
+      })
+      this.downloadLoading = true
       require.ensure([], () => {
       require.ensure([], () => {
         const {
         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格式转换
-        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
-      });
-      loading.close();
+        } = 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>
 </script>
 <style lang="scss">
 <style lang="scss">
 #platformStockInfo {
 #platformStockInfo {

+ 127 - 32
src/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckPreview.vue

@@ -8,7 +8,6 @@
             v-model="screen"
             v-model="screen"
             placeholder="请选择需筛选的内容"
             placeholder="请选择需筛选的内容"
             clearable
             clearable
-            @change="changeScreen"
             style="width: 150px"
             style="width: 150px"
           >
           >
             <el-option
             <el-option
@@ -26,6 +25,28 @@
             clearable
             clearable
           ></el-input>
           ></el-input>
         </el-form-item>
         </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-form-item>
           <label class="el-form-item__label" style="width: auto"
           <label class="el-form-item__label" style="width: auto"
             >订单时间:</label
             >订单时间:</label
@@ -82,13 +103,6 @@
         >
         >
           <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
           <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
         </el-table-column>
         </el-table-column>
-        <el-table-column
-          prop="saleOrderNo"
-          label="单据编号"
-          width="200px"
-          align="center"
-        >
-        </el-table-column>
         <el-table-column
         <el-table-column
           prop="consigneeName"
           prop="consigneeName"
           label="收货单位"
           label="收货单位"
@@ -97,9 +111,9 @@
         >
         >
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
-          prop="sendStationName"
-          column-key="sendStationName"
-          label="车皮装车地点"
+          prop="sendStation"
+          column-key="sendStation"
+          label="发站"
           align="center"
           align="center"
           width="100px"
           width="100px"
           :filters="[
           :filters="[
@@ -108,22 +122,6 @@
           ]"
           ]"
           :filter-method="filterSend"
           :filter-method="filterSend"
         >
         >
-          <!-- 选择发站 -->
-          <template slot-scope="scope">
-            <el-select
-              disabled
-              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>
         <el-table-column
         <el-table-column
           prop="capacityNo"
           prop="capacityNo"
@@ -171,7 +169,7 @@
           prop="materialNum"
           prop="materialNum"
           label="物资件数"
           label="物资件数"
           align="center"
           align="center"
-          width="100px"
+          width="50px"
         >
         >
           <!-- <template slot-scope="scope">
           <!-- <template slot-scope="scope">
             <button
             <button
@@ -201,6 +199,21 @@
             >
             >
           </template> -->
           </template> -->
         </el-table-column>
         </el-table-column>
+        <el-table-column
+          prop="flId"
+          label="分录ID"
+          align="center"
+          width="120px"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleOrderNo"
+          label="单据编号"
+          width="200px"
+          align="center"
+        >
+        </el-table-column>
         <el-table-column
         <el-table-column
           prop="transInDep"
           prop="transInDep"
           label="调入部门"
           label="调入部门"
@@ -328,6 +341,8 @@ export default {
       clickIndex: null,
       clickIndex: null,
       input: null,
       input: null,
       screen: '',
       screen: '',
+      input1: null,
+      screen1: '',
       dialogTableVisible: false,
       dialogTableVisible: false,
       newsCapacityId: null,
       newsCapacityId: null,
       capacityNo: null,
       capacityNo: null,
@@ -340,6 +355,40 @@ export default {
         {
         {
           value: '车牌号',
           value: '车牌号',
           lable: '车牌号'
           lable: '车牌号'
+        },
+        {
+          value: '物资名称',
+          lable: '物资名称'
+        },
+        {
+          value: '规格型号',
+          lable: '规格型号'
+        },
+        {
+          value: '发站',
+          lable: '发站'
+        }
+      ],
+      options1: [
+        {
+          value: '收货单位',
+          lable: '收货单位'
+        },
+        {
+          value: '车牌号',
+          lable: '车牌号'
+        },
+        {
+          value: '物资名称',
+          lable: '物资名称'
+        },
+        {
+          value: '规格型号',
+          lable: '规格型号'
+        },
+        {
+          value: '发站',
+          lable: '发站'
         }
         }
       ],
       ],
       startTime: null,
       startTime: null,
@@ -369,7 +418,7 @@ export default {
         'transOutDep',
         'transOutDep',
         'transInDep',
         'transInDep',
         'capacityNo',
         'capacityNo',
-        'sendStationName',
+        'sendStation',
         'consigneeName',
         'consigneeName',
         'index'
         'index'
       ],
       ],
@@ -394,7 +443,8 @@ export default {
       lineZhuanxian: [0, 189987, 189988, 189989, 189990, 189991],
       lineZhuanxian: [0, 189987, 189988, 189989, 189990, 189991],
       sendStationId: null,
       sendStationId: null,
       sendStations: [],
       sendStations: [],
-      direction: 'rtl'
+      direction: 'rtl',
+      filterMap: {}
     }
     }
   },
   },
   mounted() {
   mounted() {
@@ -505,9 +555,23 @@ export default {
         this.$set(row, 'isCapacityShow', 1)
         this.$set(row, 'isCapacityShow', 1)
         this.clickIndex = row.group
         this.clickIndex = row.group
       }
       }
-      if (column.property == 'sendStationName') {
+      if (column.property == 'sendStation') {
         this.$set(row, 'isSendStationName', 1)
         this.$set(row, 'isSendStationName', 1)
         this.clickIndex = row.group
         this.clickIndex = row.group
+        this.filterMap.sendStation = row.sendStation
+        this.onclick(this.filterMap)
+      }
+      if (column.property == 'consigneeName') {
+        this.filterMap.consigneeName = row.consigneeName
+        this.onclick(this.filterMap)
+      }
+      if (column.property == 'materialSpe') {
+        this.filterMap.materialSpe = row.materialSpe
+        this.onclick(this.filterMap)
+      }
+      if (column.property == 'materialName') {
+        this.filterMap.materialName = row.materialName
+        this.onclick(this.filterMap)
       }
       }
       if (column.property == 'carrierName') {
       if (column.property == 'carrierName') {
         this.$set(row, 'isCarrierShow', 1)
         this.$set(row, 'isCarrierShow', 1)
@@ -1090,11 +1154,15 @@ export default {
     },
     },
     //查询,输入查询条件
     //查询,输入查询条件
     onclick() {
     onclick() {
+      let obj = this.filterMap
       let startTime = null
       let startTime = null
       let endTime = null
       let endTime = null
       let consigneeName = null
       let consigneeName = null
       let capacityNo = null
       let capacityNo = null
       let remark = null
       let remark = null
+      let sendStation = null
+      let materialSpe = null
+      let materialName = null
       if (this.startTime && this.endTime) {
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime)
         startTime = sjTime(this.startTime)
         endTime = sjTime(this.endTime)
         endTime = sjTime(this.endTime)
@@ -1103,6 +1171,31 @@ export default {
         consigneeName = this.input
         consigneeName = this.input
       } else if (this.screen == '车牌号') {
       } else if (this.screen == '车牌号') {
         capacityNo = this.input
         capacityNo = this.input
+      } else if (this.screen == '发站') {
+        sendStation = this.input
+        obj.sendStation = sendStation
+      } else if (this.screen == '规格型号') {
+        materialSpe = this.input
+        obj.materialSpe = materialSpe
+      } else if (this.screen == '物资名称') {
+        materialName = this.input
+        obj.materialName = materialName
+      } else {
+        remark = this.input
+      }
+      if (this.screen1 == '收货单位') {
+        consigneeName = this.input1
+      } else if (this.screen1 == '车牌号') {
+        capacityNo = this.input1
+      } else if (this.screen1 == '发站') {
+        sendStation = this.input1
+        obj.sendStation = sendStation
+      } else if (this.screen1 == '规格型号') {
+        materialSpe = this.input1
+        obj.materialSpe = materialSpe
+      } else if (this.screen1 == '物资名称') {
+        materialName = this.input1
+        obj.materialName = materialName
       } else {
       } else {
         remark = this.input
         remark = this.input
       }
       }
@@ -1119,7 +1212,8 @@ export default {
             '&consigneeName=' +
             '&consigneeName=' +
             consigneeName +
             consigneeName +
             '&capacityNo=' +
             '&capacityNo=' +
-            capacityNo
+            capacityNo,
+          obj
         )
         )
         .then(res => {
         .then(res => {
           this.tableData = res.data.data
           this.tableData = res.data.data
@@ -1128,6 +1222,7 @@ export default {
     },
     },
     //重新获取表格数据
     //重新获取表格数据
     refresh() {
     refresh() {
+      this.filterMap = {}
       this.getSteelReport()
       this.getSteelReport()
     },
     },
     //获取钢材订单报表
     //获取钢材订单报表

+ 29 - 13
src/views/statisticalReport/components/salesLogisticsStatistics/steelTransportReport.vue

@@ -59,7 +59,7 @@
         <el-table-column
         <el-table-column
           prop="carrierLine"
           prop="carrierLine"
           label="承运线路"
           label="承运线路"
-          width="200"
+          width="300"
           align="center"
           align="center"
           column-key="carrierLine"
           column-key="carrierLine"
           key="carrierLine"
           key="carrierLine"
@@ -76,37 +76,37 @@
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
           prop="noUploadPlanTruckNumber"
           prop="noUploadPlanTruckNumber"
-          label="销售未上报计划(车)"
+          label="销售未上报计划"
           align="center"
           align="center"
           column-key="noUploadPlanTruckNumber"
           column-key="noUploadPlanTruckNumber"
-          width="120"
+          width="110"
           key="noUploadPlanTruckNumber"
           key="noUploadPlanTruckNumber"
         >
         >
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
           prop="savePlanTruckNumber"
           prop="savePlanTruckNumber"
-          label="销售保存计划(车)"
+          label="销售保存计划"
           align="center"
           align="center"
           column-key="savePlanTruckNumber"
           column-key="savePlanTruckNumber"
-          width="100"
+          width="90"
           key="savePlanTruckNumber"
           key="savePlanTruckNumber"
         >
         >
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
           prop="submitPlanTruckNumber"
           prop="submitPlanTruckNumber"
-          label="销售保存计划(车)"
+          label="销售提交计划"
           align="center"
           align="center"
           column-key="submitPlanTruckNumber"
           column-key="submitPlanTruckNumber"
-          width="100"
+          width="90"
           key="submitPlanTruckNumber"
           key="submitPlanTruckNumber"
         >
         >
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
           prop="planTruckNumber"
           prop="planTruckNumber"
-          label="销售下达计划(车)"
+          label="销售审核计划"
           align="center"
           align="center"
           column-key="planTruckNumber"
           column-key="planTruckNumber"
-          width="100"
+          width="90"
           key="planTruckNumber"
           key="planTruckNumber"
         >
         >
         </el-table-column>
         </el-table-column>
@@ -119,10 +119,10 @@
           width="80"
           width="80"
         >
         >
         </el-table-column>
         </el-table-column>
-        <el-table-column label="安排运力(车)" align="center">
+        <el-table-column label="安排运力" align="center">
           <el-table-column
           <el-table-column
             prop="arrageTruckNumber"
             prop="arrageTruckNumber"
-            label="安排"
+            label="安排"
             align="center"
             align="center"
             column-key="arrageTruckNumber"
             column-key="arrageTruckNumber"
             key="arrageTruckNumber"
             key="arrageTruckNumber"
@@ -320,8 +320,24 @@ export default {
     //   }
     //   }
     // }
     // }
   },
   },
-  mounted() {},
+  mounted() {
+    this.showSummariesPosition()
+  },
   methods: {
   methods: {
+    showSummariesPosition() {
+      // const table = document.querySelector('.main')
+      const footer = document.querySelector('.main .el-table__footer-wrapper')
+      // const footerTable = document.querySelector(
+      //   '.main .el-table__footer-wrapper .el-table__footer .has-gutter'
+      // )
+      // console.log(footerTable, 'footerTable')
+      // console.log(footer, 'foo')
+      // footer.style.border = '1px,solid,#000'
+      footer.style.fontWeight = 700
+      // console.log(footer.style, 'foo')
+      // table.removeChild(footer); // 移除表格最下方的合计行
+      // table.insertBefore(footer, body); // 把合计行插入到表格body的上面
+    },
     onclick() {
     onclick() {
       this.titleTXT = `${this.startTime.getFullYear()}年${this.startTime.getMonth() +
       this.titleTXT = `${this.startTime.getFullYear()}年${this.startTime.getMonth() +
         1}月${this.startTime.getDate()}日08:00 - ${new Date(
         1}月${this.startTime.getDate()}日08:00 - ${new Date(
@@ -434,7 +450,7 @@ export default {
       // overflow-y: auto;
       // overflow-y: auto;
       // position: absolute !important;
       // position: absolute !important;
 
 
-      border: 20px, solid, #000 !important;
+      border: 1px, solid, #000 !important;
     }
     }
 
 
     .null {
     .null {