luobang 2 éve
szülő
commit
0bc2893231

+ 70 - 6
src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue

@@ -162,6 +162,18 @@
         </el-table-column>
         <el-table-column type="index" width="40" label="行号" align="center">
         </el-table-column>
+        <el-table-column
+          prop="saleOrderStatus"
+          label="订单状态"
+          align="center"
+          width="80px"
+          :filters="[
+            { text: '正常', value: '正常' },
+            { text: '关闭', value: '关闭' }
+          ]"
+          :filter-method="filterSaleOrderStatus"
+        >
+        </el-table-column>
         <el-table-column
           prop="saleRemark"
           label="摘要"
@@ -177,6 +189,8 @@
           width="120px"
           align="center"
           column-key="toTheStation"
+          :filters="filterToStationList"
+          :filter-method="filterToStation"
         >
         </el-table-column>
         <el-table-column
@@ -184,6 +198,8 @@
           label="收货单位"
           width="300px"
           align="center"
+          :filters="filterConsigneeList"
+          :filter-method="filterConsignee"
         >
           <template slot-scope="scope">
             <el-autocomplete
@@ -233,6 +249,8 @@
           label="物资名称"
           align="center"
           width="150px"
+          :filters="filtermaterialNameList"
+          :filter-method="filterMaterialName"
         >
         </el-table-column>
         <el-table-column
@@ -240,6 +258,8 @@
           label="规格"
           align="center"
           width="150px"
+          :filters="filtermaterialSpaList"
+          :filter-method="filterMaterialSpa"
         >
         </el-table-column>
         <el-table-column
@@ -256,6 +276,18 @@
           width="80px"
         >
         </el-table-column>
+        <el-table-column
+          prop="netWeightStatus"
+          label="出库状态"
+          align="center"
+          width="80px"
+          :filters="[
+            { text: '已出库', value: '已出库' },
+            { text: '未出库', value: '未出库' }
+          ]"
+          :filter-method="filterNetWeightStatus"
+        >
+        </el-table-column>
         <el-table-column
           prop="flId"
           label="分录ID"
@@ -415,7 +447,11 @@ export default {
       zhuanxianPlanNum: 0,
       togglePlanNum: 0,
       tableRowIndex: '',
-      isRowClick: 0
+      isRowClick: 0,
+      filterConsigneeList: [],
+      filtermaterialSpaList: [],
+      filtermaterialNameList: [],
+      filterToStationList: []
     }
   },
   created() {
@@ -432,6 +468,12 @@ export default {
         this.zhuanxianPlanNum = this.tableData.filter(item => {
           return item.sendStation == '专用线'
         }).length
+        if (this.tableData.length > 0) {
+          this.filtermaterialSpaList = this.tableData[0].filtermaterialSpaList
+          this.filtermaterialNameList = this.tableData[0].filtermaterialNameList
+          this.filterToStationList = this.tableData[0].filterToStationList
+          this.filterConsigneeList = this.tableData[0].filterConsigneeList
+        }
       },
       deep: true,
       immediate: true
@@ -455,6 +497,28 @@ export default {
       window.innerHeight - document.querySelector('.head').offsetHeight - 40
   },
   methods: {
+    //筛选收货单位
+    filterConsignee(value, row, column) {
+      return row.receiveName == value
+    },
+    //筛选到站
+    filterToStation(value, row, column) {
+      return row.toTheStation == value
+    },
+    //筛选物资
+    filterMaterialName(value, row, column) {
+      return row.materialName == value
+    },
+    //筛选规格
+    filterMaterialSpa(value, row, column) {
+      return row.materialSpa == value
+    },
+    filterNetWeightStatus(value, row, column) {
+      return row.netWeightStatus == value
+    },
+    filterSaleOrderStatus(value, row, column) {
+      return row.saleOrderStatus == value
+    },
     rowClick(row, column, event) {
       console.log(row)
       this.tableRowIndex = row.saleMaterialId
@@ -599,11 +663,11 @@ export default {
     //修改发站
     changesendStation(row) {
       row.userName = getCookie('loginName')
-      this.axios.post('/api/v1/ams/updateInwardConsignee', row).then(res => {
-        if (res.data.code == '200') {
-          this.$message.success('保存成功')
-        }
-      })
+      // this.axios.post('/api/v1/ams/updateInwardConsignee', row).then(res => {
+      //   if (res.data.code == '200') {
+      //     this.$message.success('保存成功')
+      //   }
+      // })
     },
     operate(row) {
       row.userName = getCookie('loginName')

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

@@ -762,35 +762,35 @@ export default {
     },
     //筛选收货单位
     filterConsignee(value, row, column) {
-      return row.consigneeName === value
+      return row.consigneeName == value
     },
     //筛选卸货地点
     filterUnloadPlace(value, row, column) {
-      return row.unloadPoint === value
+      return row.unloadPoint == value
     },
     //筛选到站
     filterToStation(value, row, column) {
-      return row.arrivalStation === value
+      return row.arrivalStation == value
     },
     //筛选车牌号
     filterCapacity(value, row, column) {
-      return row.capacityNum === value
+      return row.capacityNum == value
     },
     //筛选物资
     filterMaterialName(value, row, column) {
-      return row.materialName === value
+      return row.materialName == value
     },
     //筛选规格
     filterMaterialSpa(value, row, column) {
-      return row.materialSpa === value
+      return row.materialSpa == value
     },
     //筛选进站日期
     filterEnStation(value, row, column) {
-      return row.EnStation === value
+      return row.EnStation == value
     },
     //筛选发出日期
     filterOutStation(value, row, column) {
-      return row.OutStation === value
+      return row.OutStation == value
     },
 
     //筛选类型

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

@@ -791,6 +791,10 @@ export default {
         this.filterMap.sendStation = row.sendStation
         this.onclick(this.filterMap)
       }
+      if (column.property == 'toTheStation') {
+        this.filterMap.toTheStation = row.toTheStation
+        this.onclick(this.filterMap)
+      }
       if (column.property == 'consigneeName') {
         this.filterMap.consigneeName = row.consigneeName
         this.onclick(this.filterMap)

+ 9 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -742,6 +742,15 @@
           v-if="!columnNoRoutList.includes('运输订单变更记录')"
         >
         </el-table-column>
+        <el-table-column
+          prop="materialPlanNumber"
+          column-key="materialPlanNumber"
+          key="materialPlanNumber"
+          label="理论件数"
+          align="center"
+          v-if="!columnNoRoutList.includes('理论件数')"
+        >
+        </el-table-column>
       </el-table>
     </div>
     <div>

+ 0 - 1
src/views/statisticalReport/components/salesLogisticsStatistics/unloadingSteelReports.vue

@@ -697,7 +697,6 @@ export default {
           //遍历数组
           let saleOrderListMap = []
           console.log(result)
-          debugger
           result.forEach((saleOrderList, index) => {
             let map = {}
             let arr = []

+ 130 - 3
src/views/statisticalReport/components/salesLogisticsStatistics/yawnReport.vue

@@ -37,6 +37,9 @@
         ref="yawnReport"
         style="width:100%;height:500px;float:left;margin-left:5px"
       >
+        <table class="title">
+          <th>{{ titleTXT }}钢材欠运力统计表</th>
+        </table>
         <div class="table">
           <el-table
             ref="yawnReportData"
@@ -167,18 +170,25 @@
               width="110px"
             >
             </el-table-column>
+            <el-table-column
+              align="center"
+              prop="unloadThoWeight"
+              label="未装(理计)"
+              width="110px"
+            >
+            </el-table-column>
             <el-table-column
               align="center"
               prop="trainWeight"
               label="车皮(磅重)"
-              width="80px"
+              width="100px"
             >
             </el-table-column>
             <el-table-column
               align="center"
               prop="trainThoWeight"
               label="车皮(理重)"
-              width="80px"
+              width="100px"
             >
             </el-table-column>
           </el-table>
@@ -205,7 +215,9 @@ export default {
         endTime: null
       },
       spanArr: [], // 用于存放需要合并的行的个数
-      spanIndex: 0 // 记录spanArr数组的下标
+      spanIndex: 0, // 记录spanArr数组的下标
+      titleTXT: '',
+      startTime: new Date()
     }
   },
   created() {
@@ -216,10 +228,29 @@ export default {
     let startTime = new Date(endTime.getTime())
     this.map.startTime = startTime
     this.map.endTime = endTime
+    this.startTime = startTime
+    this.titleTXT = `${this.startTime.getFullYear()}年${this.startTime.getMonth() +
+      1}月${this.startTime.getDate()}日08:00 - ${new Date(
+      sjTime(this.startTime) + 86400000
+    ).getFullYear()}年${new Date(sjTime(this.startTime) + 86400000).getMonth() +
+      1}月${new Date(sjTime(this.startTime) + 86400000).getDate()}日08:00`
   },
   mounted() {
     this.search()
   },
+  watch: {
+    startTime() {
+      console.log(this.startTime, 'this.startTime')
+      this.titleTXT = `${this.startTime.getFullYear()}年${this.startTime.getMonth() +
+        1}月${this.startTime.getDate()}日08:00 - ${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getFullYear()}年${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getMonth() + 1}月${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getDate()}日08:00`
+    }
+  },
   methods: {
     //查询装车数据
     search() {
@@ -233,6 +264,7 @@ export default {
         //   })
         //   return
         // }
+        this.startTime = this.map.startTime
         this.map.startTime = sjTime(this.map.startTime)
         this.map.endTime = sjTime(this.map.endTime)
       } else {
@@ -243,6 +275,12 @@ export default {
         })
         return
       }
+      const loading = this.$loading({
+        lock: true,
+        text: '正在获取数据',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
       this.axios.post('/api/v1/tms/yawnReport', this.map).then(res => {
         if (res.data.code == '200') {
           let countRow = {
@@ -265,6 +303,7 @@ export default {
             materialThoWeight: 0,
             trainWeight: 0,
             trainThoWeight: 0,
+            unloadThoWeight: 0,
             target: '合计'
           }
           res.data.data.forEach(item => {
@@ -287,6 +326,11 @@ export default {
                 (countRow.materialThoWeight * 1000 +
                   item.materialThoWeight * 1000) /
                 1000
+
+              countRow.unloadThoWeight =
+                (countRow.unloadThoWeight * 1000 +
+                  item.unloadThoWeight * 1000) /
+                1000
               countRow.trainWeight += item.trainWeight
               countRow.trainThoWeight += item.trainThoWeight
             }
@@ -301,14 +345,88 @@ export default {
             countRow.percent = 'NAL'
           }
           res.data.data.splice(res.data.data.length - 1, 0, countRow)
+          const map1 = res.data.data.reduce((result, item) => {
+            result[item.target] = result[item.target] || []
+            result[item.target].push(item)
+            return result
+          }, {})
+          let result = Object.values(map1)
+          result.forEach(arrayList => {
+            if (arrayList.length > 1) {
+              let countRow1 = {
+                EnNum: 0,
+                carrierName: '',
+                no: -1,
+                notEnNum: 0,
+                notSendNum: 0,
+                numCang: 0,
+                numGong: 0,
+                orderNum: 0,
+                percent: '',
+                planNum: 0,
+                quxiaoNum: 0,
+                unReceiveNum: 0,
+                receivedNum: 0,
+                queueNum: 0,
+                enFactoryNum: 0,
+                totalNet: 0,
+                materialThoWeight: 0,
+                trainWeight: 0,
+                trainThoWeight: 0,
+                unloadThoWeight: 0,
+                carrierName: '合计',
+                target: arrayList[0].target
+              }
+              arrayList.forEach(item => {
+                if (!item.target.includes('合计')) {
+                  countRow1.EnNum += item.EnNum
+                  countRow1.notEnNum += item.notEnNum
+                  countRow1.notSendNum += item.notSendNum
+                  countRow1.numCang += item.numCang
+                  countRow1.numGong += item.numGong
+                  countRow1.orderNum += item.orderNum
+                  countRow1.planNum += item.planNum
+                  countRow1.quxiaoNum += item.quxiaoNum
+                  countRow1.unReceiveNum += item.unReceiveNum
+                  countRow1.receivedNum += item.receivedNum
+                  countRow1.queueNum += item.queueNum
+                  countRow1.enFactoryNum += item.enFactoryNum
+                  countRow1.totalNet =
+                    (countRow1.totalNet * 1000 + item.totalNet * 1000) / 1000
+                  countRow1.materialThoWeight =
+                    (countRow1.materialThoWeight * 1000 +
+                      item.materialThoWeight * 1000) /
+                    1000
+                  countRow1.unloadThoWeight =
+                    (countRow1.unloadThoWeight * 1000 +
+                      item.unloadThoWeight * 1000) /
+                    1000
+                  countRow1.trainWeight += item.trainWeight
+                  countRow1.trainThoWeight += item.trainThoWeight
+                }
+              })
+              countRow1.percent =
+                (
+                  (countRow1.orderNum /
+                    (countRow1.planNum - countRow1.quxiaoNum)) *
+                  100
+                ).toFixed(2) + '%'
+              console.log(countRow1, 'countRow1')
+              arrayList.push(countRow1)
+            }
+          })
+          // console.log(result, 'result')
+          res.data.data = result.flat(1)
           // res.data.data.push(countRow)
           this.getSpanArr(res.data.data)
           this.yawnReportData = res.data.data
+          loading.close()
         } else {
           this.$message({
             type: 'error',
             message: res.data.data
           })
+          loading.close()
         }
       })
     },
@@ -401,4 +519,13 @@ export default {
     border: 1px, solid, #000 !important;
   }
 }
+.title {
+  display: flex;
+  justify-content: left;
+  align-items: center;
+  margin-left: 40px;
+  font-size: 30px;
+  font-weight: 700;
+  color: #000;
+}
 </style>