luobang 2 年之前
父節點
當前提交
eee3824854

+ 5 - 1
build/utils.js

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

+ 5 - 0
config/index.js

@@ -72,8 +72,13 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址r
   '/api/v1': {
+<<<<<<< HEAD
     // target: 'http://172.16.33.166:80',
     target: 'http://localhost:8080',
+=======
+    target: 'http://172.16.33.166:80',
+    //target: 'http://localhost:8080',
+>>>>>>> ddf8bee055e4873393f3754b13584d7b24145dab
     // target: 'http://192.168.1.104:8080',
     ws: true,
     pathRewrite: {

+ 261 - 114
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailsOrderNew.vue

@@ -125,7 +125,7 @@
       </el-form>
     </div>
     <div class="table11">
-      <el-tabs v-model="activeName">
+      <el-tabs v-model="activeName" style="margin-left: 20px;">
         <el-tab-pane label="未结算" name="first">
           <div class="table">
             <el-table
@@ -246,6 +246,32 @@
                 :filters="filteraddressPlace"
               >
               </el-table-column>
+              <el-table-column
+                prop="actualAddress"
+                label="实际收货地址"
+                width="250px"
+                sortable
+                column-key="actualAddress"
+                :filters="filteraddressPlace"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="priceValue"
+                label="最终运价"
+                width="100px"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="detailsAmount"
+                label="最终运费"
+                width="100px"
+              ></el-table-column>
+              <el-table-column
+                prop="netWeight"
+                label="净重"
+                show-overflow-tooltip
+              >
+              </el-table-column>
               <el-table-column
                 prop="saleRemark"
                 column-key="saleRemark"
@@ -289,12 +315,6 @@
                 show-overflow-tooltip
               >
               </el-table-column>
-              <el-table-column
-                prop="netWeight"
-                label="净重"
-                show-overflow-tooltip
-              >
-              </el-table-column>
               <el-table-column
                 prop="arrivalAddress"
                 label="抵达地址"
@@ -321,28 +341,7 @@
                 width="150px"
               >
               </el-table-column>
-              <el-table-column
-                prop="priceValue"
-                label="系统建议运价"
-                width="100px"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="detailsAmount"
-                label="系统建议运费"
-                width="100px"
-              ></el-table-column>
-              <el-table-column
-                prop="futurePriceValue"
-                label="修改后的运价"
-                width="100px"
-              ></el-table-column>
-              <el-table-column
-                prop="futureDetailsAmount"
-                label="修改后的运费"
-                width="100px"
-              >
-              </el-table-column>
+
               <el-table-column
                 prop="orderNo"
                 label="运输订单号"
@@ -350,7 +349,6 @@
                 align="center"
               >
               </el-table-column>
-
               <el-table-column prop="saler" label="业务员" align="center">
               </el-table-column>
               <el-table-column
@@ -381,7 +379,7 @@
           <div class="table1">
             <el-table
               :data="visibleList1"
-              :span-method="objectSpanMethod"
+              :span-method="objectSpanMethod1"
               ref="tableRef1"
               border
               style="width: 100%; margin-top: 20px"
@@ -487,13 +485,30 @@
               </el-table-column>
               <el-table-column
                 prop="addressPlace"
-                label="收货地址"
+                label="实际收货地址"
                 width="250px"
                 sortable
                 column-key="addressPlace"
                 :filters="filteraddressPlace"
               >
               </el-table-column>
+              <el-table-column
+                prop="priceValue"
+                label="最终运价"
+                width="100px"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="detailsAmount"
+                label="最终运费"
+                width="100px"
+              ></el-table-column>
+              <el-table-column
+                prop="netWeight"
+                label="净重"
+                show-overflow-tooltip
+              >
+              </el-table-column>
               <el-table-column
                 prop="saleRemark"
                 column-key="saleRemark"
@@ -537,13 +552,6 @@
                 show-overflow-tooltip
               >
               </el-table-column>
-              <el-table-column
-                prop="netWeight"
-                label="净重"
-                show-overflow-tooltip
-              >
-              </el-table-column>
-
               <el-table-column
                 prop="arrivalAddress"
                 label="抵达地址"
@@ -570,28 +578,6 @@
                 width="150px"
               >
               </el-table-column>
-              <el-table-column
-                prop="priceValue"
-                label="系统建议运价"
-                width="100px"
-              >
-              </el-table-column>
-              <el-table-column
-                prop="detailsAmount"
-                label="系统建议运费"
-                width="100px"
-              ></el-table-column>
-              <el-table-column
-                prop="futurePriceValue"
-                label="修改后的运价"
-                width="100px"
-              ></el-table-column>
-              <el-table-column
-                prop="futureDetailsAmount"
-                label="修改后的运费"
-                width="100px"
-              >
-              </el-table-column>
               <el-table-column
                 prop="orderNo"
                 label="运输订单号"
@@ -726,7 +712,8 @@
       </div>
       <div class="opreation">
         <el-button @click="dialogFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click="makeSure">确 定</el-button>
+        <el-button type="primary" @click="makeSureAll">修改下货地址和单价</el-button>
+        <el-button type="primary" @click="makeSure">只修改单价</el-button>
       </div>
     </el-drawer>
   </div>
@@ -813,6 +800,7 @@ export default {
       capacityList: [],
       carrierList: [],
       tableData: [],
+      tableData1: [],
       //筛选条件1(客户)
       filters1: [],
       spanArr: [],
@@ -838,6 +826,7 @@ export default {
         '承运商',
         '客户',
         '收货地址',
+        '实际收货地址',
         '业务员',
         '送货单打印',
         '收货客户电话',
@@ -847,7 +836,41 @@ export default {
         '销售片区',
         '抵达时间',
         '签收时间',
-        '系统建议运价',
+        '最终运价',
+        '摘要'
+      ],
+      //需要合并列的名称(已结算)
+      mergeList1: [
+        '选择',
+        '序号',
+        '整车操作',
+        '销售订单状态',
+        '销售订单号',
+        '发货单位',
+        '司机电话',
+        '运输订单号',
+        '签收地址',
+        '签收时间',
+        '抵达地址',
+        '抵达时间',
+        '出厂时间',
+        '进厂时间',
+        '运单状态',
+        '车牌号',
+        '承运商',
+        '客户',
+        '收货地址',
+        '实际收货地址',
+        '业务员',
+        '送货单打印',
+        '收货客户电话',
+        '是否自提',
+        '订单日期',
+        '短信发送',
+        '销售片区',
+        '抵达时间',
+        '签收时间',
+        '最终运价',
         '摘要'
       ],
       //钢材多拼车辆线路ID
@@ -955,7 +978,8 @@ export default {
       makeSurePriceOrderList: [],
       makeSurePriceId: null,
       makeSurePlaceId: null,
-
+      detailsAmount: null,
+      mapValuenew:{},
       ops: {
         vuescroll: {},
         scrollPanel: {},
@@ -1043,6 +1067,7 @@ export default {
             start + Math.floor(this.maxHeight / this.itemHeight) + 1
           )
           this.getSpanArr(this.visibleList)
+          this.getSpanArr1(this.visibleList1)
         })
       }
     }
@@ -1131,7 +1156,7 @@ export default {
       }
     },
     updateDetailsOrderPrice() {
-      this.originalAddress = this.steelMap.addressPlace
+      this.originalAddress = this.steelMap.actualAddress
       this.originalPriceValue = this.steelMap.priceValue
       this.Address.requestUrl =
         '/api/v1/ams/getAddressDeliveryAddress?apiId=511&i=' + new Date()
@@ -1149,15 +1174,11 @@ export default {
       this.steelMap.priceId = val.priceid
       this.makeSurePriceId = val.priceid
       this.makeSurePlaceId = val.placeId
+      this.detailsAmount=val.detailsAmount
     },
+    //只修改单价
     makeSure() {
       //若没有单价Id
-      // let mapValue = {
-      //   orderId: this.steelMap.orderId,
-      //   priceId: this.steelMap.priceId,
-      //   placeId: this.steelMap.placeId,
-      //   detailsAmount: this.steelMap.mapList[0].detailsAmount
-      // }
       console.log(this.makeSurePriceOrderList)
       if (this.makeSurePriceOrderList.length == 0) {
         this.$message({
@@ -1169,7 +1190,6 @@ export default {
         return
       }
       let mapList = []
-      debugger
       this.makeSurePriceOrderList.forEach(e => {
         let map = {}
         map.orderId = e
@@ -1179,35 +1199,54 @@ export default {
       })
       let mapValue = {}
       mapValue.mapList = mapList
-      //是否确定修改详单地址!
-      this.$confirm('确定修改', '提示', {
-        confirmButtonText: '仅修改单价',
-        cancelButtonText: '修改下货地址和单价',
-        distinguishCancelAndClose: true,
-        type: 'warning',
-        center: true
-      })
-        .then(() => {
+      // //是否确定修改详单地址!
+      // this.$confirm('确定修改', '提示', {
+      //   confirmButtonText: '仅修改单价',
+      //   cancelButtonText: '修改下货地址和单价',
+      //   distinguishCancelAndClose: true,
+      //   type: 'warning',
+      //   center: true
+      // })
+      //   .then(() => {
           //初始化修改详单地址对话框的信息
-          this.axios
-            .post('/api/v1/bms/updateBatchDetailsOrder', mapValue)
-            .then(res => {
-              if (res.data.code == '200') {
-                this.$message.success('修改详单单价成功!')
-                this.$refs.tableRef.clearSelection()
-                //重置未结算详单表单信息
-                // this.operation(this.steelMap)
-                this.getSteelReport()
-                this.dialogFormVisible = false
-              } else {
-                this.$message.error('修改详单单价失败,请联系管理员!')
-                this.dialogFormVisible = false
-              }
-            })
+      this.axios
+        .post('/api/v1/bms/updateBatchDetailsOrder', mapValue)
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message.success('修改详单单价成功!')
+            this.$refs.tableRef.clearSelection()
+            //重置未结算详单表单信息
+            // this.operation(this.steelMap)
+            this.getSteelReport()
+            this.dialogFormVisible = false
+          } else {
+            this.$message.error('修改失败:'+res.data.data)
+            this.dialogFormVisible = false
+          }
         })
-        .catch(action => {
-          if (action === 'cancel') {
-            mapValue.updatePlace = 1
+    },
+    //修改单价和收货地址
+    makeSureAll(){
+      if (this.makeSurePriceOrderList.length == 0) {
+        this.$message({
+          type: 'success',
+          message: '请先选择需要修改的单价',
+          duration: 2000,
+          offset: '250'
+        })
+        return
+      }
+      let mapList = []
+      this.makeSurePriceOrderList.forEach(e => {
+        let map = {}
+        map.orderId = e
+        map.priceId = this.makeSurePriceId
+        map.placeId = this.makeSurePlaceId
+        mapList.push(map)
+      })
+      let mapValue = {}
+      mapValue.mapList = mapList
+      mapValue.updatePlace = 1
             this.axios
               .post('/api/v1/bms/updateBatchDetailsOrder', mapValue)
               .then(res => {
@@ -1217,11 +1256,11 @@ export default {
                   // this.operation(this.steelMap)
                   this.getSteelReport()
                   this.dialogFormVisible = false
+                }else {
+                  this.$message.error('修改失败:'+res.data.data)
+                  this.dialogFormVisible = false
                 }
               })
-          }
-          //初始化修改详单地址对话框的信息
-        })
     },
     hanleScroll() {
       console.log('我滚动了')
@@ -1695,7 +1734,9 @@ 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
@@ -1708,6 +1749,7 @@ export default {
           this.receipctPhotoClick(row.orderNo, 1)
         }
       }
+      this.$refs.tableRef.toggleRowSelection(row)
     },
     //反关闭运单
     reverseCloseOrder() {
@@ -1837,8 +1879,10 @@ export default {
       var title = this.tableTitle
       let tHeader = []
       let filterVal = []
-      console.log(this.$refs.tableRef)
-      this.$refs.tableRef.$children.forEach(item => {
+      if(this.activeName==='first'){
+        console.log("进入了1")
+        console.log(this.$refs.tableRef)
+        this.$refs.tableRef.$children.forEach(item => {
         if (item.label != undefined && item.prop != undefined) {
           if (tHeader.indexOf(item.label) === -1) {
             tHeader.push(item.label)
@@ -1856,6 +1900,27 @@ export default {
         let data = this.tableData.map(v => filterVal.map(j => v[j])) //3.formatJson格式转换
         export_json_to_excel(tHeader, data, title) // (title)导出的表格名称
       })
+      }else if(this.activeName === 'second'){
+        console.log(this.$refs.tableRef1)
+        this.$refs.tableRef1.$children.forEach(item => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label)
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop)
+          }
+        }
+      })
+      this.downloadLoading = true
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require('@/assets/excel/Export2Excel.js') //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData1.map(v => filterVal.map(j => v[j])) //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title) // (title)导出的表格名称
+      })
+      }
       loading.close()
     },
     changeScreen() {},
@@ -2406,6 +2471,28 @@ export default {
         }
       }
     },
+    getSpanArr1(data) {
+      //每次调用方法初始化
+      this.spanArr1 = []
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr1.push(1)
+          data[i].group = i
+          this.pos = 0
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
+            this.spanArr1[this.pos] += 1
+            data[i].group = data[i - 1].group
+            this.spanArr1.push(0)
+          } else {
+            this.spanArr1.push(1)
+            this.pos = i
+            data[i].group = data[i - 1].group + 1
+          }
+        }
+      }
+    },
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (this.mergeList.indexOf(column.label) != -1) {
         const _row = this.spanArr[rowIndex]
@@ -2416,6 +2503,16 @@ export default {
         }
       }
     },
+    objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList1.indexOf(column.label) != -1) {
+        const _row = this.spanArr1[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+    },
     //计算总件数和总车数
     getTotalNum(data) {
       //通过车序号的个数来计算车数
@@ -2601,12 +2698,25 @@ export default {
         )
         .then(res => {
           this.tableData = res.data.data
+          //遍历保留两位小数
+          this.tableData.forEach(e=>{
+              try {
+                  if(e.priceValue){
+                    e.priceValue=e.priceValue.toFixed(2);
+                  }
+                  if(e.detailsAmount){
+                    e.detailsAmount=e.detailsAmount.toFixed(2);
+                  }
+              } catch (error) {
+                  
+              }
+          })
           this.totalHeight += this.itemHeight
           this.visibleList = res.data.data
+          console.log(this.visibleList);
           console.log(this.visibleList, 'this.visibleList')
           this.getSpanArr(this.visibleList)
           this.getTotalNum(this.tableData)
-          loading.close()
           console.log(this.visibleList)
         })
       this.axios
@@ -2634,15 +2744,28 @@ export default {
           obj
         )
         .then(res => {
-          this.tableData = res.data.data
+          this.tableData1 = res.data.data
+          //遍历保留两位小数
+          this.tableData1.forEach(e=>{
+              try {
+                  if(e.priceValue){
+                    e.priceValue=e.priceValue.toFixed(2);
+                  }
+                  if(e.detailsAmount){
+                    e.detailsAmount=e.detailsAmount.toFixed(2);
+                  }
+              } catch (error) {
+                  
+              }
+          })
           this.totalHeight += this.itemHeight
           this.visibleList1 = res.data.data
           console.log(this.visibleList1, 'this.visibleList1')
-          this.getSpanArr(this.visibleList1)
+          this.getSpanArr1(this.visibleList1)
           this.getTotalNum(this.tableData)
-          loading.close()
           console.log(this.visibleList1)
         })
+        loading.close()
     },
     //重新获取表格数据
     refresh() {
@@ -2728,6 +2851,19 @@ export default {
         )
         .then(res => {
           this.tableData = res.data.data
+          //遍历保留两位小数
+          this.tableData.forEach(e=>{
+              try {
+                  if(e.priceValue){
+                    e.priceValue=e.priceValue.toFixed(2);
+                  }
+                  if(e.detailsAmount){
+                    e.detailsAmount=e.detailsAmount.toFixed(2);
+                  }
+              } catch (error) {
+                  
+              }
+          })
           this.totalHeight += this.itemHeight
           this.visibleList = []
           this.visibleList = this.tableData.slice(
@@ -2766,16 +2902,29 @@ export default {
           this.filterMap
         )
         .then(res => {
-          this.tableData = res.data.data
+          this.tableData1 = res.data.data
+          //遍历保留两位小数
+          this.tableData1.forEach(e=>{
+              try {
+                  if(e.priceValue){
+                    e.priceValue=e.priceValue.toFixed(2);
+                  }
+                  if(e.detailsAmount){
+                    e.detailsAmount=e.detailsAmount.toFixed(2);
+                  }
+              } catch (error) {
+                  
+              }
+          })
           this.totalHeight += this.itemHeight
           this.visibleList1 = []
-          this.visibleList1 = this.tableData.slice(
+          this.visibleList1 = this.tableData1.slice(
             0,
             Math.floor(this.maxHeight / this.itemHeight) + 1
           )
           console.log(this.visibleList1)
-          this.getSpanArr(this.visibleList1)
-          this.getTotalNum(this.tableData)
+          this.getSpanArr1(this.visibleList1)
+          this.getTotalNum(this.tableData1)
           loading.close()
         })
         .catch(() => {
@@ -2793,8 +2942,6 @@ export default {
     margin-top: 20px;
   }
   .table {
-    margin-left: 20px;
-    margin-top: 20px;
     .el-tooltip {
       width: auto !important;
     }

+ 55 - 14
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -355,11 +355,11 @@
         </el-table-column>
         <el-table-column prop="receiptTime" label="签收时间" width="150px">
         </el-table-column>
-        <el-table-column prop="priceValue" label="系统建议运价" width="100px">
+        <el-table-column prop="priceValue" label="实际运价" width="100px">
         </el-table-column>
         <el-table-column
           prop="detailsAmount"
-          label="系统建议运费"
+          label="实际运费"
           width="100px"
         ></el-table-column>
         <el-table-column
@@ -403,6 +403,13 @@
           show-overflow-tooltip
         >
         </el-table-column>
+        <el-table-column
+          prop="updateTime"
+          label="订单变更时间"
+          width="120px"
+          show-overflow-tooltip
+        >
+        </el-table-column>
       </el-table>
     </div>
     <div>
@@ -1050,6 +1057,7 @@
           <el-upload
             ref="arrival"
             list-type="picture-card"
+            :file-list="arriavlList"
             action="/api/v1/otms/addtmstruckArrivalResult"
             :limit="2"
             :on-change="fileChange1"
@@ -1065,6 +1073,7 @@
           <el-upload
             ref="receive"
             list-type="picture-card"
+            :file-list="receiveList"
             action="null"
             :limit="11"
             :on-change="fileChange2"
@@ -1292,6 +1301,8 @@ export default {
       orderNumber: null,
       capacityNumber: null,
       arrivalReceiving: false,
+      arriavlList:[],
+      receiveList:[],
       fileListArrival: [],
       fileListReceive: [],
       dialogImageUrl: '',
@@ -1572,6 +1583,38 @@ export default {
       this.orderNumber = row.orderNo
       this.capacityNumber = row.capacityNo
       this.arrivalReceiving = true
+      //抵达图片
+      this.axios
+        .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + row.orderNo)
+        .then(res => {
+          console.log("arrivalPhoto:",res);
+          if(res.data){
+            this.arriavlList=[];
+            res.data.forEach((e,index) => {
+              this.arriavlList.push({
+                name:"file"+index,
+                url:e
+              });
+            });
+            this.fileListArrival=this.arriavlList;
+          }
+        })
+      //签收图片
+      this.axios
+        .post('/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNo)
+        .then(res => {
+          console.log("ReceivingPhoto:",res);
+          if(res.data){
+            this.receiveList=[];
+            res.data.forEach((e,index) => {
+              this.receiveList.push({
+                name:"file"+index,
+                url:e
+              });
+            });
+            this.fileListReceive=this.receiveList;
+          }
+        })
     },
     arrivalAndReceive() {
       if (!this.location) {
@@ -1614,7 +1657,7 @@ export default {
         formData.append('resultArrivalAddress', this.location)
         formData.append('num', request.length)
         let options = {
-          url: '/api/v1/otms/addTmstruckReceiptResult',
+          url: '/api/v1/otms/addTmstruckReceiptResultForWeb',
           data: formData,
           method: 'post',
           headers: {
@@ -1623,14 +1666,8 @@ export default {
         }
         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)
-          }
+          this.$message.success('上传成功!')
+          this.closeUpload()
         })
       })
     },
@@ -2336,10 +2373,14 @@ export default {
               this.getSteelReport()
               loading.close()
             } else {
-              this.$message.error(res.data.data)
-              this.getSteelReport()
-              this.operation(this.steelMap)
               loading.close()
+              this.$alert(res.data.data,'提示',{
+                confirmButtonText:"确定",
+                callback:action=>{
+                   this.getSteelReport()
+                  this.operation(this.steelMap)
+                }
+              });
             }
           })
           .catch(() => {