Jelajahi Sumber

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

luobang 2 tahun lalu
induk
melakukan
d3ec69b178

+ 31 - 1
src/views/WMS/components/port_deposit/unloadPortStock.vue

@@ -15,6 +15,13 @@
       </el-button>
     </div>
     <mergeRowTable v-bind.sync="option">
+      <el-table-column fixed="right" label="操作" width="60">
+          <template slot-scope="scope">
+              <el-button @click="detailclick3(scope.row)" type="text" size="small">
+                手动清场
+              </el-button>
+          </template>
+    </el-table-column>
     </mergeRowTable>
   </div>
 </template>
@@ -41,11 +48,34 @@ export default {
       console.log(item);
     },
     onclick() {
-      console.log(1);
+      this.option.requestUrl="/api/v1/wmsh/getUnloadPortStockList?apiId=497&i="+new Date();
     },
     btnclick(pathId) {
       this.$router.push("/path/addHomeworkPath/" + pathId);
     },
+     detailclick3(row){
+      console.log("row",row);
+       this.$confirm('确认清场?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+         this.axios.post("/api/v1/wmsh/clearWmshGridMaterial", row).then(res => {
+          console.log("res", res);
+          if(res.data.succeed){
+            this.$message.success("清场成功!");
+            this.onclick();
+          }else{
+            this.$message.error("清场失败!");
+          }
+        });
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '取消操作'
+          });          
+        });
+    },
   },
 };
 </script>

+ 72 - 2
src/views/inward/components/inwardFactory/timeTaskResult.vue

@@ -17,7 +17,7 @@
         <i class="el-icon-search"></i>查询
       </el-button>
       <!-- excel导出 -->
-      <el-button type="primary" @click="exportData()">
+      <el-button type="primary" @click="exportAllExcel()">
         <i class="el-icon-download"></i>导出(Excel)
       </el-button>
     </div>
@@ -117,7 +117,9 @@ export default {
       direction: "rtl",
       orderId: 0,
       stepList: [],
-      tableTitle: "计时统计"
+      tableTitle: "计时统计",
+      exportAllList:[],
+      noSettleDetailsColumn:[]
     };
   },
   created() {
@@ -134,6 +136,74 @@ export default {
     }
   },
   methods: {
+    //导出excel的前置动作
+    exportAllExcel() {
+      let startTime = null
+      let endTime = null
+      let orgCode = null
+      let carrierSsoId = null
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
+      }
+      if (getCookie('orgCode') == 'chengyunshang') {
+        carrierSsoId = getCookie('userId')
+      }
+      if (
+        getCookie('orgCode') == 'dagangadmin' ||
+        getCookie('orgCode') == 'zidonghuabu' ||
+        getCookie('orgCode') == 'wuliuchuyunzhongxin'
+      ) {
+        orgCode = null
+      } else {
+        orgCode = getCookie('orgCode')
+      }
+      this.tableTitle = '计时统计'
+      this.axios
+        .post(
+          "/api/v1/tms/getAllTimeTaskResult?apiId=458&orderType=21&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&i=" +
+          new Date()
+        )
+        .then(res => {
+          console.log("进入了打印界面")
+          console.log(res.data.data)
+          this.exportAllList = res.data.data.list
+          this.noSettleDetailsColumn=res.data.data.columnData
+          this.exportAllReportToExcel(
+            this.tableTitle,
+            this.exportAllList,
+            this.noSettleDetailsColumn
+          )
+        })
+      },
+    //导出excel
+    exportAllReportToExcel(tableTitle, dataArr, columnData) {
+      var title = tableTitle
+      let tHeader = []
+      let filterVal = []
+      columnData.forEach(e1 => {
+        if (tHeader.indexOf(e1.label) === -1) {
+          tHeader.push(e1.label)
+        }
+        if (filterVal.indexOf(e1.prop) === -1) {
+          filterVal.push(e1.prop)
+        }
+      })
+      //导出为excel
+      this.downloadLoading = true
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require('@/assets/excel/Export2Excel.js') //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        // let list = this.$refs.excelDom.dataTabel;
+        let data = dataArr.map(v => filterVal.map(j => v[j])) //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title) // (title)导出的表格名称
+      })
+    },
     // -------查看物资详情(已拒绝)
     detailclick1(row) {
       // 记录重复点击次数

+ 94 - 2
src/views/inward/components/inwardSettlement/countDetailOrder.vue

@@ -15,7 +15,7 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="exportData()"
+      <el-button type="primary" @click="exportAllExcel()"
       ><i class="el-icon-download"></i>导出(Excel)</el-button
       >
     </div>
@@ -86,7 +86,9 @@ export default {
       //缓存当前选中的运输单价
       priceMap: {},
       formLabelWidth: "125px",
-      tableTitle: "内转计次计费详单"
+      tableTitle: "内转计次计费详单",
+      exportAllList:[],
+      noSettleDetailsColumn:[]
     };
   },
   created(){
@@ -94,6 +96,96 @@ export default {
      this.options2GetRequestUrl();
   },
   methods:{
+    exportAllExcel() {
+      let startTime = null
+      let endTime = null
+      let orgCode = null
+      let carrierSsoId = null
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
+      }
+      if (getCookie('orgCode') == 'chengyunshang') {
+        carrierSsoId = getCookie('userId')
+      }
+      if (
+        getCookie('orgCode') == 'dagangadmin' ||
+        getCookie('orgCode') == 'zidonghuabu' ||
+        getCookie('orgCode') == 'wuliuchuyunzhongxin'
+      ) {
+        orgCode = null
+      } else {
+        orgCode = getCookie('orgCode')
+      }
+      if (this.activeName == 'first') {
+        this.tableTitle = '未结算计费详单'
+        this.axios
+          .post(
+            "/api/v1/bms/getInwardWeightDetailsOrder?apiId=515&orderType=26&detailStatus=0" +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i" +
+            new Date()
+          )
+          .then(res => {
+            console.log(res.data.data)
+            this.exportAllList = res.data.data.list
+            this.noSettleDetailsColumn=res.data.data.columnData
+            this.exportAllReportToExcel(
+              this.tableTitle,
+              this.exportAllList,
+              this.noSettleDetailsColumn
+            )
+          })
+      } else if (this.activeName == 'second') {
+        this.tableTitle = '已结算计费详单'
+        this.axios
+          .post(
+            "/api/v1/bms/getInwardWeightDetailsOrder?apiId=515&orderType=26&detailStatus=0" +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i" +
+            new Date()
+          )
+          .then(res => {
+            this.exportAllList = res.data.data.list
+            this.noSettleDetailsColumn=res.data.data.columnData
+            this.exportAllReportToExcel(
+              this.tableTitle,
+              this.exportAllList,
+              this.settleDetailsColumn
+            )
+          })
+      }
+    },
+    //导出excel
+    exportAllReportToExcel(tableTitle, dataArr, columnData) {
+      var title = tableTitle
+      let tHeader = []
+      let filterVal = []
+      columnData.forEach(e1 => {
+        if (tHeader.indexOf(e1.label) === -1) {
+          tHeader.push(e1.label)
+        }
+        if (filterVal.indexOf(e1.prop) === -1) {
+          filterVal.push(e1.prop)
+        }
+      })
+      //导出为excel
+      this.downloadLoading = true
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require('@/assets/excel/Export2Excel.js') //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        // let list = this.$refs.excelDom.dataTabel;
+        let data = dataArr.map(v => filterVal.map(j => v[j])) //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title) // (title)导出的表格名称
+      })
+    },
     //未结算数据
     options1GetRequestUrl(){
     if(getCookie("orgCode") == "chengyunshang"){

+ 31 - 1
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -56,7 +56,7 @@ export default {
         },
         {
           prop: "tonnage1",
-          label: "二船吨位"
+          label: "二船吨位"
         },
         {
           label: "未到闸船舶",
@@ -197,6 +197,10 @@ export default {
         Object.keys(table_book.Sheets.Sheet1).forEach((key) => {
           if (key.indexOf('!') < 0) {
             table_book.Sheets.Sheet1[key].s = {
+              font:{
+                name:"宋体",
+                sz:10
+              },
               alignment: {//对齐方式
                 horizontal: 'center',//水平居中
                 vertical: 'center',//竖直居中
@@ -211,6 +215,7 @@ export default {
             }
           }
        })
+       this.addRangeBorder(table_book.Sheets.Sheet1['!merges'],table_book.Sheets.Sheet1);
        console.log("sheet:",table_book.Sheets.Sheet1);
         //导出
         let table_write = XLSXStyle.write(table_book, {
@@ -227,6 +232,31 @@ export default {
         }
         return table_write;
     },
+    addRangeBorder (range, ws) {
+      let cols = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
+      range.forEach(item => {
+        console.log(item)
+        let style = {
+          s: {
+            border: {
+              top: { style: 'thin' },
+              left: { style: 'thin' },
+              bottom: { style: 'thin' },
+              right: { style: 'thin' }
+            }
+          }
+        }
+        // 处理合并行
+        for (let i = item.s.c; i <= item.e.c; i++) {
+          ws[`${cols[i]}${Number(item.e.r) + 1}`] = ws[`${cols[i]}${Number(item.e.r) + 1}`] || style
+          // 处理合并列
+          for (let k = item.s.r + 2; k <= item.e.r + 1; k++) {
+            ws[cols[i] + k] = ws[cols[k] + item.e.r] || style
+          }
+        }
+      })
+      return ws;
+    },
     appendOne(Sheet,row){
       //从后面新增1行,并行合并
         let seArr=Sheet['!fullref'].split(":");

+ 16 - 10
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -951,15 +951,13 @@
             action="/api/v1/otms/addtmstruckArrivalResult"
             :limit="1"
             :on-change="fileChange1"
+            :on-preview="handlePictureCardPreview"
             :on-exceed="exceed"
             accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
             :auto-upload="false"
           >
             <i class="el-icon-plus"></i>
           </el-upload>
-          <el-dialog :visible.sync="dialogVisible1">
-            <img width="100%" :src="dialogImageUrl" alt="" />
-          </el-dialog>
         </el-form-item>
         <el-form-item label="签收图片(空货箱、质保书、签收单)">
           <el-upload
@@ -968,15 +966,13 @@
             action="null"
             :limit="5"
             :on-change="fileChange2"
+            :on-preview="handlePictureCardPreview"
             :on-exceed="exceed"
             accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
             :auto-upload="false"
           >
             <i class="el-icon-plus"></i>
           </el-upload>
-          <el-dialog :visible.sync="dialogVisible2">
-            <img width="100%" :src="dialogImageUrl" alt="" />
-          </el-dialog>
         </el-form-item>
       </el-form>
       <el-button
@@ -987,6 +983,9 @@
         >确定</el-button
       >
     </el-dialog>
+    <el-dialog :visible.sync="dialogVisible" width="80%">
+      <img width="100%" :src="dialogImageUrl" alt="" />
+    </el-dialog>
   </div>
 </template>
 
@@ -1190,8 +1189,7 @@ export default {
       fileListArrival: [],
       fileListReceive: [],
       dialogImageUrl: '',
-      dialogVisible1: false,
-      dialogVisible2: false,
+      dialogVisible: false,
       isLoading: false,
       batchList: []
     }
@@ -1355,11 +1353,15 @@ export default {
         this.$message.warning('该车未出厂,不允许签收')
         return
       }
-      if (row.arrivalAddress != null && row.arrivalAddress != null) {
+      if (row.arrivalAddress != null && row.receiptAddress != null) {
         this.$message.warning('该车已有抵达签收实绩,不允许签收')
         return
       }
-      this.location = row.addressPlace
+      if(row.arrivalAddress){
+        this.location = row.arrivalAddress;
+      }else{
+        this.location = row.addressPlace;
+      }
       this.orderNumber = row.orderNo
       this.capacityNumber = row.capacityNo
       this.arrivalReceiving = true
@@ -1433,6 +1435,10 @@ export default {
     exceed() {
       this.$message.warning('超出上传数量!')
     },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url;
+      this.dialogVisible = true;
+    },
     closeUpload() {
       this.arrivalReceiving = false
       this.$refs.arrival.clearFiles()

+ 15 - 0
src/views/statisticalReport/components/tableItem.vue

@@ -403,6 +403,11 @@ export default {
                 })
               })
             })
+            //处理打印字符串
+            this.stockString='万港库存:'+this.stockMap.stockTonnage+"吨:";
+            this.stockStringArr.forEach((item)=>{
+              this.stockString+=item.value;
+            });
           }
         })
     },
@@ -457,6 +462,11 @@ export default {
               })
             })
           })
+          //处理打印字符串
+          this.downStockString='下游港口库存:'+this.downStockMap.downStockTonnage+"吨:";
+          this.downStockStringArr.forEach((item)=>{
+            this.downStockString+=item.value;
+          });
         }
       })
     },
@@ -509,6 +519,11 @@ export default {
               })
             })
           })
+          //处理打印字符串
+          this.runStockString='在途货物:'+this.runStockMap.runStockTonnage+"吨:";
+          this.runStockStringArr.forEach((item)=>{
+            this.runStockString+=item.value;
+          });
         }
       })
     },