luobang пре 2 година
родитељ
комит
40cc82640e

+ 1 - 1
build/utils.js

@@ -17,7 +17,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
 
 let devModules = ['all']
 let devModules = ['all']
-// let devModules = ['index', 'statisticalReport', 'inward']
+// let devModules = ['index', 'statisticalReport', 'sale']
 // let devModules = ['all']
 // let devModules = ['all']
 
 
 // let devModules = ['index', 'ADMINISTRATORS']
 // let devModules = ['index', 'ADMINISTRATORS']

+ 60 - 682
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailsOrderNew.vue

@@ -187,14 +187,18 @@
           <label
           <label
             class="el-form-item__label"
             class="el-form-item__label"
             style="width: auto;font-size: 16px;line-height: auto;"
             style="width: auto;font-size: 16px;line-height: auto;"
-            >车数/件数: {{ totalCapacity }}/{{ totalNumber }}
+            >车数/磅重/金额 {{ totalCapacity }}车/{{ totalNetWeight }}吨/{{
+              totalDetailsAmount
+            }}元
           </label>
           </label>
         </el-form-item>
         </el-form-item>
         <el-form-item v-show="activeName == 'second'">
         <el-form-item v-show="activeName == 'second'">
           <label
           <label
             class="el-form-item__label"
             class="el-form-item__label"
             style="width: auto;font-size: 16px;line-height: auto;"
             style="width: auto;font-size: 16px;line-height: auto;"
-            >车数/件数: {{ setteldTotalCapacity }}/{{ setteldTotalNumber }}
+            >车数/磅重/金额 {{ setteldTotalCapacity }}车/{{
+              totalNetWeightSettled
+            }}吨/{{ totalDetailsAmountSettled }}元
           </label>
           </label>
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
@@ -212,16 +216,10 @@
               style="width: 100%"
               style="width: 100%"
               :height="maxHeight"
               :height="maxHeight"
               :row-class-name="tableRowClassName"
               :row-class-name="tableRowClassName"
-              @cell-click="cellClik"
               @cell-mouse-enter="cellMouse1"
               @cell-mouse-enter="cellMouse1"
               @cell-mouse-leave="cellLeave1"
               @cell-mouse-leave="cellLeave1"
               @row-click="rowClick"
               @row-click="rowClick"
-              :cell-style="cellStyle"
               @filter-change="filterChange"
               @filter-change="filterChange"
-              :key="saleSteelKey"
-              id="salesLogisticsStat_saleSteelReports_table"
-              individual-panel
-              @resetTable="reset"
               @select="selectOne"
               @select="selectOne"
               @selection-change="handleSelectionChange()"
               @selection-change="handleSelectionChange()"
               @select-all="unSetteleAllselect"
               @select-all="unSetteleAllselect"
@@ -456,10 +454,7 @@
               border
               border
               style="width: 100%"
               style="width: 100%"
               :height="maxHeight"
               :height="maxHeight"
-              :cell-style="cellStyle"
               @filter-change="filterChange"
               @filter-change="filterChange"
-              id="salesLogisticsStat_saleSteelReports_table"
-              individual-panel
               @select-all="setteldAllselect"
               @select-all="setteldAllselect"
             >
             >
               <el-table-column
               <el-table-column
@@ -549,7 +544,7 @@
               >
               >
               </el-table-column>
               </el-table-column>
               <el-table-column
               <el-table-column
-                prop="materialActuallNum"
+                prop="materialNum"
                 label="累计检斤通知单辅助数量"
                 label="累计检斤通知单辅助数量"
                 align="center"
                 align="center"
                 width="150px"
                 width="150px"
@@ -964,7 +959,7 @@
         <el-form-item label="冲红备注">
         <el-form-item label="冲红备注">
           <el-input v-model="detailRemark" style="width:200px"></el-input>
           <el-input v-model="detailRemark" style="width:200px"></el-input>
         </el-form-item>
         </el-form-item>
-         <el-form-item label="凭证图片" style="">
+        <el-form-item label="凭证图片" style="">
           <el-upload
           <el-upload
             ref="detailsUpload"
             ref="detailsUpload"
             action="noAction"
             action="noAction"
@@ -1364,8 +1359,14 @@ export default {
       totalNumber: 0,
       totalNumber: 0,
       //合计车数
       //合计车数
       totalCapacity: 0,
       totalCapacity: 0,
+      //合计净重
+      totalNetWeight: 0,
+      //合计运费
+      totalDetailsAmount: 0,
       setteldTotalNumber: 0,
       setteldTotalNumber: 0,
       setteldTotalCapacity: 0,
       setteldTotalCapacity: 0,
+      totalDetailsAmountSettled: 0,
+      totalNetWeightSettled: 0,
       tableTitle: '销售统计报表',
       tableTitle: '销售统计报表',
       capacityList: [],
       capacityList: [],
       carrierList: [],
       carrierList: [],
@@ -1441,21 +1442,7 @@ export default {
         '最终运价',
         '最终运价',
         '摘要'
         '摘要'
       ],
       ],
-      //钢材多拼车辆线路ID
-      //索引从1-10为1-10拼路线ID
-      lineSpelling: [
-        0,
-        110001,
-        110002,
-        110003,
-        110004,
-        110005,
-        110006,
-        110007,
-        110008,
-        110009,
-        110010
-      ],
+
       tableTitle: '销售钢材统计报表',
       tableTitle: '销售钢材统计报表',
       //所有省
       //所有省
       provinceList: [],
       provinceList: [],
@@ -1623,12 +1610,6 @@ export default {
       ]
       ]
     }
     }
     //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
     //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
-    this.updateCapacityDebounce = this.debounce(() => {
-      this.updateCapacity()
-    }, 3000)
-    this.updateTruckCarrierDebounce = this.debounce(() => {
-      this.updateTruckCarrier()
-    }, 3000)
     this.cellMouse1 = this.debounce((row, column, cell) => {
     this.cellMouse1 = this.debounce((row, column, cell) => {
       this.cellMouse(row, column, cell)
       this.cellMouse(row, column, cell)
     }, 100)
     }, 100)
@@ -2220,32 +2201,32 @@ export default {
           detailAmount: this.detailAmount,
           detailAmount: this.detailAmount,
           detailRemark: this.detailRemark
           detailRemark: this.detailRemark
         }
         }
-        let _this=this;
-       new Promise((resolve, reject) => {
+        let _this = this
+        new Promise((resolve, reject) => {
           if (_this.detailsList.length > 0) {
           if (_this.detailsList.length > 0) {
-              //先上传备注图片
-              let formData = new window.FormData()
-              _this.detailsList.forEach((item, index) => {
-                formData.append('file' + index, item.raw)
-              })
-              let options = {
-                url: '/api/v1/uc/uploadPic',
-                data: formData,
-                method: 'post',
-                headers: {
-                  'Content-Type': 'multipart/form-data'
-                }
+            //先上传备注图片
+            let formData = new window.FormData()
+            _this.detailsList.forEach((item, index) => {
+              formData.append('file' + index, item.raw)
+            })
+            let options = {
+              url: '/api/v1/uc/uploadPic',
+              data: formData,
+              method: 'post',
+              headers: {
+                'Content-Type': 'multipart/form-data'
               }
               }
-              _this.axios(options).then(res => {
-                map.urls= res.data
-                _this.closeUpload2();
-                resolve('OK');
-              })
-          }else{
-            resolve('NoPIC');
+            }
+            _this.axios(options).then(res => {
+              map.urls = res.data
+              _this.closeUpload2()
+              resolve('OK')
+            })
+          } else {
+            resolve('NoPIC')
           }
           }
-        }).then((result)=>{
-          console.log(result);
+        }).then(result => {
+          console.log(result)
           this.axios.post('/api/v1/bms/addTruckDetail', map).then(res => {
           this.axios.post('/api/v1/bms/addTruckDetail', map).then(res => {
             if (res.data.status == 'succeed') {
             if (res.data.status == 'succeed') {
               this.$message.success('修改成功!')
               this.$message.success('修改成功!')
@@ -2257,7 +2238,7 @@ export default {
             this.showDetailsAdd = false
             this.showDetailsAdd = false
             this.isLoading = false
             this.isLoading = false
           })
           })
-        });
+        })
       }
       }
     },
     },
     openConsigneeUpd() {
     openConsigneeUpd() {
@@ -2676,67 +2657,6 @@ export default {
     //   this.capacityNumber = row.capacityNo
     //   this.capacityNumber = row.capacityNo
     //   this.arrivalReceiving = true
     //   this.arrivalReceiving = true
     // },
     // },
-    arrivalAndReceive() {
-      if (!this.location) {
-        this.$message.warning('请填写签收地址')
-        return
-      }
-      if (this.fileListArrival.length < 2) {
-        this.$message.warning('抵达图至少两张')
-        return
-      }
-      if (this.fileListReceive.length < 3) {
-        this.$message.warning('签收图最少三张')
-        return
-      }
-      this.isLoading = true
-      //上传抵达
-      let formData = new window.FormData()
-      formData.append('file1', this.fileListArrival[0].raw)
-      formData.append('file2', this.fileListArrival[1].raw)
-      formData.append('orderNumber', this.orderNumber)
-      formData.append('resultArrivalAddress', this.location)
-      let options = {
-        // 设置axios的参数
-        url: '/api/v1/otms/addtmstruckArrivalResult',
-        data: formData,
-        method: 'post',
-        headers: {
-          'Content-Type': 'multipart/form-data'
-        }
-      }
-      this.axios(options).then(res => {
-        console.log('arrivalRes:', res)
-        //上传签收
-        let formData = new window.FormData()
-        let request = ''
-        this.fileListReceive.forEach((item, index) => {
-          formData.append('file' + index, item.raw)
-        })
-        formData.append('orderNumber', this.orderNumber)
-        formData.append('resultArrivalAddress', this.location)
-        formData.append('num', request.length)
-        let options = {
-          url: '/api/v1/otms/addTmstruckReceiptResult',
-          data: formData,
-          method: 'post',
-          headers: {
-            'Content-Type': 'multipart/form-data'
-          }
-        }
-        this.axios(options).then(res => {
-          console.log('receiveRes:', res)
-          if (res.data.data == 4) {
-            this.$message.error('新增抵达失败!')
-            this.isLoading = false
-          } else {
-            this.$message.success('上传成功!')
-            this.closeUpload()
-            this.$router.go(0)
-          }
-        })
-      })
-    },
     fileChange1(file, fileList) {
     fileChange1(file, fileList) {
       this.statementList = fileList
       this.statementList = fileList
     },
     },
@@ -3045,16 +2965,7 @@ export default {
         this.filterSaleRemark.push(map)
         this.filterSaleRemark.push(map)
       })
       })
     },
     },
-    cellStyle({ row, column, rowIndex, columnIndex }) {
-      if (
-        column.property == 'arrivalAddress' ||
-        column.property == 'receiptAddress'
-      ) {
-        return { color: 'blue', height: '30px' }
-      } else {
-        return { height: '30px' }
-      }
-    },
+
     rowClick(row, column, event) {
     rowClick(row, column, event) {
       this.steelMap = {}
       this.steelMap = {}
       this.tableRowIndex = row.group
       this.tableRowIndex = row.group
@@ -3113,58 +3024,7 @@ export default {
           }
           }
         })
         })
     },
     },
-    cellClik(row, column, cell, event) {
-      console.log('点击事件')
-      console.log(row)
-      console.log(column)
-      if (column.property == 'arrivalAddress') {
-        if (row.orderNo && row.arrivalAddress) {
-          this.downloadCapacityNo = row.capacityNo
-          this.toPhotoClick(row.orderNo, 1)
-        }
-      }
-      if (column.property == 'receiptAddress') {
-        if (row.orderNo && row.receiptAddress) {
-          this.downloadCapacityNo = row.capacityNo
-          this.receipctPhotoClick(row.orderNo, 1)
-        }
-      }
-    },
-    //反关闭运单
-    reverseCloseOrder() {
-      this.axios
-        .post('/api/v1/ams/reverseCloseOrder', this.steelMap)
-        .then(res => {
-          this.operation(this.steelMap)
-          this.getSteelReport()
-        })
-    },
-    //筛选
-    //筛选客户
-    //点击操作弹出框
-    operation(row) {
-      this.isRowClick = 0
-      if (Object.values(this.steelMap).length == 0) {
-        this.$message.error('请点击需要执行更改操作的行!')
-        return
-      }
-      if (typeof row === 'undefined') {
-        row = this.steelMap
-      }
-      this.axios
-        .post(
-          '/api/v1/tms/getSteelReportDetailsBySmId?saleOrderMaterialId=' +
-            row.saleOrderMaterialId
-        )
-        .then(res => {
-          this.steelMap = res.data.data
-          this.addressId = row.shipperAddressId
-          this.getAllProvince()
-          this.onchangeProvince()
-          this.onchangeCity()
-          this.centerDialogVisible = true
-        })
-    },
+
     //查看抵达图
     //查看抵达图
     toPhotoClick(orderNo, num) {
     toPhotoClick(orderNo, num) {
       this.axios
       this.axios
@@ -3217,36 +3077,7 @@ export default {
           }
           }
         })
         })
     },
     },
-    //反关闭整条分录
-    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.operation(this.steelMap)
-              this.getSteelReport()
-            } else {
-              this.$message.error('反关闭失败')
-              this.operation(this.steelMap)
-              this.getSteelReport()
-            }
-          })
-          .catch(() => {
-            this.$message.error('反关闭失败')
-            this.getSteelReport()
-          })
-      })
-    },
+
     //销售钢材报表导出excel
     //销售钢材报表导出excel
     exportAllReportToExcel() {
     exportAllReportToExcel() {
       const loading = this.$loading({
       const loading = this.$loading({
@@ -3379,344 +3210,9 @@ export default {
       }
       }
     },
     },
     //车牌号弹出层
     //车牌号弹出层
-    handleSelect() {
-      this.capacityList.forEach(item => {
-        if (item.capacityNumber === this.steelMap.capacityNo) {
-          this.steelMap.newsCapacityId = item.capacityId
-        }
-      })
-    },
-    updateCapacity() {
-      console.log('我只想测')
-      this.steelMap.capacityId = this.steelMap.newsCapacityId
-      if (this.steelMap.newsCapacityId == null) {
-        this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
-        return
-      }
-      if (
-        !(
-          isVehicleNumber(this.steelMap.capacityNo) ||
-          this.steelMap.capacityNo == '取消' ||
-          this.steelMap.capacityNo == '待定'
-        )
-      ) {
-        this.$message.error('请输入正确格式的车牌号!')
-        return
-      }
-      if (this.steelMap.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', this.steelMap)
-          .then(res => {
-            if (res.data.code == 200) {
-              this.$message.success('变更车牌号成功!')
-              this.operation(this.steelMap)
-              console.log('更改车牌号之后的变化')
-              console.log(res.data)
-              if (res.data.data.capacityTel != 0) {
-                console.log('进入了这个界面')
-                this.steelMap.capacityTel = res.data.data.capacityTel
-              } else {
-                this.axios
-                  .post(
-                    '/api/v1/ams/matchingDriverTelRecently?capacityNumber=' +
-                      this.steelMap.capacityNo
-                  )
-                  .then(res => {
-                    if (res.data.data != null) {
-                      this.steelMap.capacityTel = res.data.data
-                    }
-                  })
-              }
-              this.updateDriverTel()
-              this.getSteelReport()
-              loading.close()
-            } else {
-              this.$message.success('变更失败,请联系管理员')
-              this.operation(this.steelMap)
-              this.getSteelReport()
-              loading.close()
-            }
-          })
-          .catch(() => {
-            this.$message.success('变更失败,请联系管理员')
-            this.operation(this.steelMap)
-            this.getSteelReport()
-            loading.close()
-          })
-      } else {
-        if (this.steelMap.carrierIds == 0) {
-          this.$message.error('请先选择承运商!')
-          return
-        }
-        this.steelMap.lineId = this.lineSpelling[this.steelMap.mapList.length]
-        this.steelMap.driverTel = this.steelMap.capacityTel
-        this.steelMap.capacityNumber = this.steelMap.capacityNo
-        let arr = []
-        arr.push(this.steelMap)
-        const loading = this.$loading({
-          lock: true,
-          text: '正在派车,请稍候',
-          spinner: 'el-icon-loading',
-          background: 'rgba(0, 0, 0, 0.7)'
-        })
-        this.axios
-          .post('/api/v1/ams/dispatchSteelOrder', arr)
-          .then(res => {
-            if (res.data.code == '200') {
-              this.$message.success('派车成功!')
-              this.operation(this.steelMap)
-              this.axios
-                .post(
-                  '/api/v1/ams/matchingDriverTelRecently?capacityNumber=' +
-                    this.steelMap.capacityNo
-                )
-                .then(res => {
-                  if (res.data.data != null) {
-                    this.steelMap.capacityTel = res.data.data
-                    this.updateDriverTel()
-                  }
-                })
-              this.getSteelReport()
-              loading.close()
-            } else {
-              this.$message.error(res.data.data)
-              this.getSteelReport()
-              this.operation(this.steelMap)
-              loading.close()
-            }
-          })
-          .catch(() => {
-            this.$message.error(res.data.data)
-            this.operation(this.steelMap)
-            this.getSteelReport()
-            loading.close()
-          })
-      }
-    },
+
     //修改司机电话号码
     //修改司机电话号码
-    updateDriverTel() {
-      const loading = this.$loading({
-        lock: true,
-        text: '修改电话号码中',
-        spinner: 'el-icon-loading',
-        background: 'rgba(0, 0, 0, 0.7)'
-      })
-      if (
-        this.steelMap.capacityTel == null ||
-        this.steelMap.capacityTel == ''
-      ) {
-        this.$message.error('电话号码不能为空')
-        loading.close()
-        return
-      }
-      var regex = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/
-      if (!regex.test(this.steelMap.capacityTel)) {
-        this.$message.error('电话号码不符合规则')
-        loading.close()
-        return
-      }
-      this.axios
-        .post('/api/v1/uc/updateDriverTel', {
-          orderId: parseInt(this.steelMap.orderId),
-          saleOrderMaterialId: parseInt(this.steelMap.saleOrderMaterialId),
-          driverTel: this.steelMap.capacityTel
-        })
-        .then(res => {
-          if (res.data.code == '200') {
-            this.$message({
-              type: 'success',
-              duration: 2000,
-              message: '修改电话号码成功',
-              offset: 250
-            })
-            this.operation(this.steelMap)
-            this.getSteelReport()
-            loading.close()
-          } else {
-            this.$message.error('修改失败')
-            this.operation(this.steelMap)
-            this.getSteelReport()
-            loading.close()
-          }
-        })
-        .catch(() => {
-          this.$message.error('修改失败')
-          this.operation(this.steelMap)
-          this.getSteelReport()
-          loading.close()
-        })
-    },
     //修改收货客户电话
     //修改收货客户电话
-    updateconsigneeTel() {
-      const loading = this.$loading({
-        lock: true,
-        text: '修改电话号码中',
-        spinner: 'el-icon-loading',
-        background: 'rgba(0, 0, 0, 0.7)'
-      })
-      if (
-        this.steelMap.consigneeTel == null ||
-        this.steelMap.consigneeTel == ''
-      ) {
-        this.$message.error('电话号码不能为空')
-        return
-      }
-      this.axios
-        .post('/api/v1/ams/updateConsigneeTel', {
-          saleOrderNo: this.steelMap.saleOrderNo,
-          saleOrderMaterialId: this.steelMap.saleOrderMaterialId,
-          consigneeTel: this.steelMap.consigneeTel
-        })
-        .then(res => {
-          if (res.data.code == '200') {
-            this.$message.success('修改成功')
-            this.operation(this.steelMap)
-            this.getSteelReport()
-            loading.close()
-          } else {
-            this.$message.error('修改失败')
-            this.operation(this.steelMap)
-            this.getSteelReport()
-            loading.close()
-          }
-        })
-        .catch(() => {
-          this.$message.error('修改失败')
-          this.operation(this.steelMap)
-          this.getSteelReport()
-          loading.close()
-        })
-    },
-    //关闭车辆金蝶分录
-    deleteEasEntryId() {
-      this.$confirm('确定关闭该车金蝶分录吗?', '提示', {
-        confirmButtonText: '是',
-        cancelButtonText: '否',
-        center: true,
-        type: 'warning'
-      })
-        .then(() => {
-          let map = this.steelMap
-          map.operateName = getCookie('loginName')
-          map.isCloseEas = Number(0)
-          map.userName = getCookie('loginName')
-          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()
-                this.operation(this.steelMap)
-                loading.close()
-              } else {
-                this.$message.error('关闭车辆失败')
-                this.operation(this.steelMap)
-                this.getSteelReport()
-                loading.close()
-              }
-            })
-            .catch(() => {
-              this.$message.error('关闭车辆失败')
-              this.operation(this.steelMap)
-              this.getSteelReport()
-              loading.close()
-            })
-        })
-        .catch(() => {
-          this.$message.info('取消关闭')
-        })
-    },
-    //修改承运商授权
-    updateTruckCarrier() {
-      if (this.steelMap.newCarrierId == null) {
-        this.$message.warning('请注册承运商或者选中弹出层之后再提交!')
-        this.getSteelReport()
-        return
-      }
-      if (this.steelMap.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', this.steelMap)
-          .then(res => {
-            if (res.data.code == '200') {
-              this.$message.success('修改承运商授权成功')
-              this.operation(this.steelMap)
-              this.getSteelReport()
-              loading.close()
-            } else {
-              this.$message.error('修改失败,请联系管理员!')
-              this.operation(this.steelMap)
-              this.getSteelReport()
-              loading.close()
-            }
-          })
-          .catch(() => {
-            this.$message.error('修改失败,请联系管理员!')
-            this.operation(this.steelMap)
-            this.getSteelReport()
-            loading.close()
-          })
-      } else {
-        //授权承运商
-        let arr = []
-        arr.push(this.steelMap)
-        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.operation(this.steelMap)
-              this.getSteelReport()
-              loading.close()
-            } else {
-              this.$message.error('授权失败,请联系管理员')
-              this.operation(this.steelMap)
-              this.getSteelReport()
-              loading.close()
-            }
-          })
-          .catch(() => {
-            this.$message.error('授权失败,请联系管理员')
-            this.operation(this.steelMap)
-            this.getSteelReport()
-            loading.close()
-          })
-      }
-    },
-    updateAddress(row) {
-      this.drawer = true
-      this.addressRow = row
-      this.province = row.addressProvince
-      this.city = row.addressDistrict
-      this.county = row.addressTown
-      this.addressId = row.shipperAddressId
-      this.getAllProvince()
-      this.onchangeProvince()
-      this.onchangeCity()
-    },
     //获取所有省数据
     //获取所有省数据
     getAllProvince() {
     getAllProvince() {
       this.axios.post('/api/v1/uc/getAllProvince').then(res => {
       this.axios.post('/api/v1/uc/getAllProvince').then(res => {
@@ -3794,41 +3290,6 @@ export default {
         )
         )
       }
       }
     },
     },
-    //修改收货地址
-    addAddressClick() {
-      const loading = this.$loading({
-        lock: true,
-        text: '正在修改收货地址',
-        spinner: 'el-icon-loading',
-        background: 'rgba(0, 0, 0, 0.7)'
-      })
-      let map = this.steelMap
-      map.isCloseEas = Number(1)
-      map.isNewCar = Number(1)
-      map.shipperAddressId = this.addressId
-      map.userName = getCookie('loginName')
-      this.axios
-        .post('/api/v1/ams/updateCarAddress', map)
-        .then(res => {
-          if (res.data.code == '200') {
-            this.$message.success('修改收货地址成功!')
-            this.operation(this.steelMap)
-            this.getSteelReport()
-            loading.close()
-          } else {
-            this.$message.error('修改失败,请联系管理员!')
-            this.operation(this.steelMap)
-            this.getSteelReport()
-            loading.close()
-          }
-        })
-        .catch(() => {
-          this.$message.error('修改失败,请联系管理员!')
-          this.operation(this.steelMap)
-          this.getSteelReport()
-          loading.close()
-        })
-    },
     //记录每一行的合并数
     //记录每一行的合并数
     getSpanArr(data) {
     getSpanArr(data) {
       //每次调用方法初始化
       //每次调用方法初始化
@@ -3899,9 +3360,14 @@ export default {
         return e.saleOrderMaterialId
         return e.saleOrderMaterialId
       })
       })
       this.totalCapacity = Array.from(new Set(arr)).length
       this.totalCapacity = Array.from(new Set(arr)).length
-      this.totalNumber = data.reduce(function(prev, item) {
-        return prev + item.materialNum
-      }, 0)
+      this.totalNetWeight =
+        data.reduce(function(prev, item) {
+          return prev + item.netWeight * 1000
+        }, 0) / 1000
+      this.totalDetailsAmount =
+        data.reduce((prev, item) => {
+          return prev + item.detailsAmount * 1000
+        }, 0) / 1000
     },
     },
     //计算总件数和总车数
     //计算总件数和总车数
     getTotalNumSettled(data) {
     getTotalNumSettled(data) {
@@ -3911,104 +3377,16 @@ export default {
         return e.saleOrderMaterialId
         return e.saleOrderMaterialId
       })
       })
       this.setteldTotalCapacity = Array.from(new Set(arr)).length
       this.setteldTotalCapacity = Array.from(new Set(arr)).length
-      this.setteldTotalNumber = data.reduce(function(prev, item) {
-        return prev + item.materialNum
-      }, 0)
-    },
-    //减少物资件数
-    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: this.steelMap.orderId,
-        saleOrderId: this.steelMap.saleOrderId,
-        saleOrderMaterialId: this.steelMap.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) {
-      if (this.steelMap.mapList.length == 1) {
-        this.deleteEasEntryId()
-        return
-      }
-      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: this.steelMap.orderId,
-              saleOrderMaterialId: this.steelMap.saleOrderMaterialId,
-              saleMaterialId: row.saleMaterialId,
-              reason: value,
-              number: this.steelMap.saleOrderNo,
-              closeEntryId: row.closeEntryId
-            }
-            this.axios
-              .post('/api/v1/ams/closeSteelMaterialId', map)
-              .then(res => {
-                if (res.data.code == '200') {
-                  this.$message.success('关闭成功')
-                  this.operation(this.steelMap)
-                  this.getSteelReport()
-                  loading.close()
-                } else {
-                  this.$message.error('关闭失败,请联系管理员')
-                  this.operation(this.steelMap)
-                  this.getSteelReport()
-                  loading.close()
-                }
-              })
-              .catch(() => {
-                this.$message.error('关闭失败,请联系管理员')
-                this.operation(this.steelMap)
-                this.getSteelReport()
-                loading.close()
-              })
-          }
-        })
-        .catch(() => {
-          this.$message.info('取消输入')
-        })
+      this.totalNetWeightSettled =
+        data.reduce(function(prev, item) {
+          return prev + item.netWeight * 1000
+        }, 0) / 1000
+      this.totalDetailsAmountSettled =
+        data.reduce((prev, item) => {
+          return prev + item.detailsAmount * 1000
+        }, 0) / 1000
     },
     },
+
     //查询,输入查询条件
     //查询,输入查询条件
     onclick(obj) {
     onclick(obj) {
       this.selecteddetailsOrderAmount = 0
       this.selecteddetailsOrderAmount = 0

+ 20 - 3
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -174,15 +174,18 @@
                 <i class="el-icon-pie-chart"></i>
                 <i class="el-icon-pie-chart"></i>
                 控制列显隐
                 控制列显隐
               </el-button>
               </el-button>
+              <el-button type="primary" @click="openBlank">
+                另起一页
+              </el-button>
             </el-dropdown-menu>
             </el-dropdown-menu>
           </el-dropdown>
           </el-dropdown>
         </el-form-item>
         </el-form-item>
 
 
         <el-form-item>
         <el-form-item>
           <span style="width: auto;font-size: 16px;line-height: auto;"
           <span style="width: auto;font-size: 16px;line-height: auto;"
-            >车数/件数/取消: {{ totalCapacity }}/{{ totalNumber }}/{{
-              quxiaoCapacityNum
-            }}
+            >车数/件数/磅重/取消: {{ totalCapacity }}/{{ totalNumber }}/{{
+              totalNetWeight
+            }}/{{ quxiaoCapacityNum }}
           </span>
           </span>
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
@@ -1981,6 +1984,8 @@ export default {
       totalCapacity: 0,
       totalCapacity: 0,
       //取消车数
       //取消车数
       quxiaoCapacityNum: 0,
       quxiaoCapacityNum: 0,
+      //合计吨位
+      totalNetWeight: 0,
       tableTitle: '销售统计报表',
       tableTitle: '销售统计报表',
       capacityList: [],
       capacityList: [],
       carrierList: [],
       carrierList: [],
@@ -2417,6 +2422,16 @@ export default {
   },
   },
   computed: {},
   computed: {},
   methods: {
   methods: {
+    openBlank() {
+      let page = this.$router.resolve({
+        name: 'saleSteelReports',
+        query: { id: 0, e: 0 },
+        meta: {
+          title: '销售钢材报表'
+        }
+      })
+      window.open(page.href, '_blank')
+    },
     getColumShowHideScheme() {
     getColumShowHideScheme() {
       this.axios
       this.axios
         .post('/api/v1/uc/getColumShowHideScheme', {
         .post('/api/v1/uc/getColumShowHideScheme', {
@@ -5041,6 +5056,7 @@ export default {
             this.totalNumber = `${res.data.data[0].totalNumber}件`
             this.totalNumber = `${res.data.data[0].totalNumber}件`
             this.totalCapacity = `${res.data.data[0].totalCapacity}车`
             this.totalCapacity = `${res.data.data[0].totalCapacity}车`
             this.quxiaoCapacityNum = `${res.data.data[0].quxiaoCapacityNum}车`
             this.quxiaoCapacityNum = `${res.data.data[0].quxiaoCapacityNum}车`
+            this.totalNetWeight = `${res.data.data[0].totalNetWeight}吨`
             console.log(obj, 'obj')
             console.log(obj, 'obj')
             if (this.filterMap) {
             if (this.filterMap) {
               this.filterRefreshCtrl(res.data.data, this.filterMap)
               this.filterRefreshCtrl(res.data.data, this.filterMap)
@@ -5230,6 +5246,7 @@ export default {
             this.totalNumber = `${res.data.data[0].totalNumber}件`
             this.totalNumber = `${res.data.data[0].totalNumber}件`
             this.totalCapacity = `${res.data.data[0].totalCapacity}车`
             this.totalCapacity = `${res.data.data[0].totalCapacity}车`
             this.quxiaoCapacityNum = `${res.data.data[0].quxiaoCapacityNum}车`
             this.quxiaoCapacityNum = `${res.data.data[0].quxiaoCapacityNum}车`
+            this.totalNetWeight = `${res.data.data[0].totalNetWeight}吨`
             this.filterConsigneeList = res.data.data[0].filterConsigneeList
             this.filterConsigneeList = res.data.data[0].filterConsigneeList
             this.filterCarrierList = res.data.data[0].filterCarrierList
             this.filterCarrierList = res.data.data[0].filterCarrierList
             this.filterCapacityList = res.data.data[0].filterCapacityList
             this.filterCapacityList = res.data.data[0].filterCapacityList

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

@@ -45,6 +45,7 @@
         ref="tableRef"
         ref="tableRef"
         border
         border
         :row-style="{ height: '30px' }"
         :row-style="{ height: '30px' }"
+        @cell-dblclick="cellDbclick()"
       >
       >
         <el-table-column
         <el-table-column
           prop="carrierDirection"
           prop="carrierDirection"
@@ -324,35 +325,42 @@ export default {
   },
   },
   methods: {
   methods: {
     cellDbclick(row, column, cell, event) {
     cellDbclick(row, column, cell, event) {
-      console.log(row, column)
-      let filterMap = {
-        consigneeNameList: [],
-        truckRemarkList: [],
-        saleRemarkList: [],
-        saleOrderStatusList: [],
-        materialSpeList: [],
-        addressPlaceList: [],
-        orderStatusList: [],
-        saleAreaList: [],
-        materialNameList: [],
-        carrierList: [],
-        capacityList: [],
-        isContinueList: [],
-        spellNumList: []
-      }
-
-      if (column.label.includes('未上报')) {
-        filterMap.saleOrderStatusList = ['未上报']
-        filterMap.carrierList = [row.carrier]
-        filterMap.addressPlaceList = [row.carrierDirection]
-      }
-      this.$router.push({
-        name: 'saleSteelReports',
-        params: {
-          data: filterMap,
-          headColumnList: ['carrierName']
-        }
-      })
+      // console.log('双击')
+      // let page = this.$router.resolve({
+      //   name: 'saleSteelReports',
+      //   query: { id: 0, e: 0 },
+      //   meta: {
+      //     title: '销售钢材报表'
+      //   }
+      // })
+      // window.open(page.href, '_blank')
+      // let filterMap = {
+      //   consigneeNameList: [],
+      //   truckRemarkList: [],
+      //   saleRemarkList: [],
+      //   saleOrderStatusList: [],
+      //   materialSpeList: [],
+      //   addressPlaceList: [],
+      //   orderStatusList: [],
+      //   saleAreaList: [],
+      //   materialNameList: [],
+      //   carrierList: [],
+      //   capacityList: [],
+      //   isContinueList: [],
+      //   spellNumList: []
+      // }
+      // if (column.label.includes('未上报')) {
+      //   filterMap.saleOrderStatusList = ['未上报']
+      //   filterMap.carrierList = [row.carrier]
+      //   filterMap.addressPlaceList = [row.carrierDirection]
+      // }
+      // this.$router.push({
+      //   name: 'saleSteelReports',
+      //   params: {
+      //     data: filterMap,
+      //     headColumnList: ['carrierName']
+      //   }
+      // })
     },
     },
     showSummariesPosition() {
     showSummariesPosition() {
       // const table = document.querySelector('.main')
       // const table = document.querySelector('.main')

+ 1 - 1
src/views/statisticalReport/components/salesLogisticsStatistics/yawnReport.vue

@@ -174,7 +174,7 @@
             <el-table-column
             <el-table-column
               align="center"
               align="center"
               prop="unloadThoWeight"
               prop="unloadThoWeight"
-              label="未装(理)"
+              label="未装(理)"
               width="110px"
               width="110px"
             >
             >
             </el-table-column>
             </el-table-column>

+ 2 - 1
src/views/statisticalReport/router/index.js

@@ -300,7 +300,8 @@ const constantRouterMap = [
         name: 'saleSteelReports',
         name: 'saleSteelReports',
         meta: {
         meta: {
           code: 'xtpzgl-yhgl',
           code: 'xtpzgl-yhgl',
-          keepAlive: true
+          keepAlive: true,
+          title: '销售钢材报表'
         },
         },
         component: saleSteelReports
         component: saleSteelReports
       },
       },