Quellcode durchsuchen

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

zyf vor 2 Jahren
Ursprung
Commit
98c122547e

+ 1 - 1
build/utils.js

@@ -15,7 +15,7 @@ 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', 'appoint', 'queue','inward','sale','RMS',]
+// let devModules = ['index', 'statisticalReport', 'queue']
 let devModules = ['all']
 //let devModules=['index']
 if (pathSrc.indexOf('node_modules') > -1) {

+ 1 - 1
config/index.js

@@ -73,7 +73,7 @@ let proxyTable = {
   // 所有数据的请求域名地址r
   '/api/v1': {
     target: 'http://172.16.33.166:80',
-    //target: 'http://localhost:8080',
+    // target: 'http://localhost:8080',
     // target: 'http://192.168.1.104:8080',
     ws: true,
     pathRewrite: {

+ 105 - 104
src/components/DilCommonUI/packages/table/src/table.js

@@ -1,4 +1,4 @@
-import Sortablejs from "sortablejs";
+import Sortablejs from 'sortablejs'
 export default {
   data() {
     return {
@@ -21,17 +21,17 @@ export default {
       // 保存表格所有页面所选中的数据
       dataRadioId: [],
       // 保存表格单选的数据 保存数据的id
-      dataRadioId: ""
-    };
+      dataRadioId: ''
+    }
   },
   created() {
     if (this.isHeigth) {
-      window.addEventListener("resize", this.getHeight);
-      this.getHeight();
+      window.addEventListener('resize', this.getHeight)
+      this.getHeight()
     }
-    this.dataCurrentPage = this.currentPage;
-    this.dataPageSize = this.pageSize;
-    this.requestData();
+    this.dataCurrentPage = this.currentPage
+    this.dataPageSize = this.pageSize
+    this.requestData()
   },
   mounted() {
     //行拖拽
@@ -41,37 +41,37 @@ export default {
   },
   methods: {
     getHeight() {
-      this.height = window.innerHeight - this.shiyHeigth;
+      this.height = window.innerHeight - this.shiyHeigth
     },
     // 通过请求获取数据
     requestData(options) {
-      let pageNum = undefined;
-      let pageSize = undefined;
+      let pageNum = undefined
+      let pageSize = undefined
 
       if (options) {
-        pageNum = options.pageNum;
-        pageSize = options.pageSize;
+        pageNum = options.pageNum
+        pageSize = options.pageSize
       }
 
       if (this.requestUrl) {
         // 处理请求地址逻辑
-        let url;
-        if (this.requestUrl.indexOf("//") > -1) {
-          url = this.requestUrl;
+        let url
+        if (this.requestUrl.indexOf('//') > -1) {
+          url = this.requestUrl
         } else {
-          url = this.requestUrl;
+          url = this.requestUrl
         }
         // 判断是否需要在请求体中放入参数
         if (this.requestQuery) {
-          this.dataRequestQuery = this.requestQuery;
+          this.dataRequestQuery = this.requestQuery
         }
-        let data = undefined;
+        let data = undefined
         for (const key in this.dataRequestQuery) {
-          const val = this.dataRequestQuery[key];
+          const val = this.dataRequestQuery[key]
 
           if (val || val == 0) {
-            if (!data) data = {};
-            data[key] = val;
+            if (!data) data = {}
+            data[key] = val
           }
         }
         //判断是否是带分页查询
@@ -86,16 +86,17 @@ export default {
               }
             })
             .then(response => {
-              let d = response.data.data;
-              this.dataTabel = d.list;
-              this.dataTotal = d.total;
+              let d = response.data.data
+              this.dataTabel = d.list
+              this.dataTotal = d.total
               //执行成功的回调
-              this.$emit("func", response.data.data);
-              this.refreshColumnData(d.columnData);
+              this.$emit('func', response.data.data)
+              this.refreshColumnData(d.columnData)
               //this.$refs.mainTable.getTableConfig();
-              this.isShow = true;
-            });
+              this.isShow = true
+            })
         } else {
+          this.dataCurrentPage = 1
           // 发送请求
           this.axios
             .post(url, data, {
@@ -106,27 +107,27 @@ export default {
               }
             })
             .then(response => {
-              let d = response.data.data;
-              this.dataTabel = d.list;
-              this.dataTotal = d.total;
+              let d = response.data.data
+              this.dataTabel = d.list
+              this.dataTotal = d.total
               //执行成功的回调
-              this.$emit("func", response.data.data);
-              this.refreshColumnData(d.columnData);
+              this.$emit('func', response.data.data)
+              this.refreshColumnData(d.columnData)
               //this.$refs.mainTable.getTableConfig();
-              this.isShow = true;
-            });
+              this.isShow = true
+            })
         }
       } else {
-        console.warn("requestUrl 参数不能为 null");
+        console.warn('requestUrl 参数不能为 null')
       }
     },
     // 刷新表头显示数据
     refreshColumnData(columnData) {
       // 如果前端有写表头,则加在后端表头前面
-      const d = this.columnData.concat(columnData);
+      const d = this.columnData.concat(columnData)
       // 把操作列拼接到最后一列
-      this.dataColumnData = d;
-      this.dataDropColumn = [].concat(this.dataColumnData);
+      this.dataColumnData = d
+      this.dataDropColumn = [].concat(this.dataColumnData)
     },
     // 排序回调
     sortChange({ column, prop, order }) {
@@ -151,108 +152,108 @@ export default {
 
       // 后端排序
       let s = {
-        ascending: "asc",
-        descending: "desc"
-      };
+        ascending: 'asc',
+        descending: 'desc'
+      }
 
       let value = {
         orderType: s[order] || undefined,
         orderField: order ? prop : undefined
-      };
+      }
 
-      this.setDataRequestQuery(value);
+      this.setDataRequestQuery(value)
     },
     // 更新请求参数
     setDataRequestQuery(value) {
-      let q = this.dataRequestQuery;
+      let q = this.dataRequestQuery
       for (const key in value) {
-        q[key] = value[key];
+        q[key] = value[key]
       }
-      this.requestData(q);
-      this.$emit("update:requestQuery", q);
-      this.dataRequestQuery = q;
+      this.requestData(q)
+      this.$emit('update:requestQuery', q)
+      this.dataRequestQuery = q
     },
     // 格式化字符串
     getString(str) {
       if (str != null && str != undefined && str.toString) {
-        return str.toString();
+        return str.toString()
       } else {
-        return str || "";
+        return str || ''
       }
     },
     // 当某一行被点击时会触发该事件
     rowClick(row, column, event) {
-      if (this.selectionType == "radio") {
+      if (this.selectionType == 'radio') {
         if (this.dataRadioId == row.ROW_ID) {
-          this.dataRadioId = "";
-          row = {};
+          this.dataRadioId = ''
+          row = {}
         } else {
-          this.dataRadioId = row.ROW_ID;
+          this.dataRadioId = row.ROW_ID
         }
-        this.$emit("radio-change", row);
+        this.$emit('radio-change', row)
       }
     },
     // 多选的选中行改变回调
     selectionChange(selection) {
       // this.dataSelection = selection;
       // 将多选中的数据抛出
-      this.$emit("selection-change", selection);
+      this.$emit('selection-change', selection)
     },
     // 当表格的筛选条件发生变化的时候会触发该事件,
     // 参数的值是一个对象,对象的 key 是 column 的 columnKey,对应的 value 为用户选择的筛选条件的数组。
     filterChange(filters) {
-      let value = {};
+      let value = {}
       for (const key in filters) {
-        value[key] = filters[key].length > 0 ? filters[key] : undefined;
+        value[key] = filters[key].length > 0 ? filters[key] : undefined
       }
       // 每次筛选时,都默认将页面改为第一页,避免数据过少时,显示没有数据
-      this.currentChange(1, false);
-      this.setDataRequestQuery(value);
+      this.currentChange(1, false)
+      this.setDataRequestQuery(value)
     },
     // 行拖拽
     rowDrop() {
-      const tbody = document.querySelector(".el-table__body-wrapper tbody");
-      const _this = this;
+      const tbody = document.querySelector('.el-table__body-wrapper tbody')
+      const _this = this
       Sortablejs.create(tbody, {
         onEnd({ newIndex, oldIndex }) {
-          const currRow = _this.dataTabel.splice(oldIndex, 1)[0];
-          _this.dataTabel.splice(newIndex, 0, currRow);
+          const currRow = _this.dataTabel.splice(oldIndex, 1)[0]
+          _this.dataTabel.splice(newIndex, 0, currRow)
         }
-      });
+      })
     },
     // 列拖拽
     columnDrop() {
-      const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
+      const wrapperTr = document.querySelector('.el-table__header-wrapper tr')
       this.sortablejs = Sortablejs.create(wrapperTr, {
         animation: 180,
         delay: 0,
-        handle: ".allowDrag",
+        handle: '.allowDrag',
         onEnd: evt => {
           // 因为序号列和单多选列不在数组中,所以需要进行偏移计算
-          const offset = this.dragColumnOffset;
-          evt.oldIndex -= offset;
-          evt.newIndex -= offset;
+          const offset = this.dragColumnOffset
+          evt.oldIndex -= offset
+          evt.newIndex -= offset
           // 换列
-          const oldItem = this.dataDropColumn[evt.oldIndex];
-          this.dataDropColumn.splice(evt.oldIndex, 1);
-          this.dataDropColumn.splice(evt.newIndex, 0, oldItem);
+          const oldItem = this.dataDropColumn[evt.oldIndex]
+          this.dataDropColumn.splice(evt.oldIndex, 1)
+          this.dataDropColumn.splice(evt.newIndex, 0, oldItem)
         }
-      });
+      })
     },
     // current-page 改变时会触发
     currentChange(val, isRequest = true) {
       if (isRequest) {
-        this.requestData({ pageNum: val });
+        this.requestData({ pageNum: val })
       }
       // 最后通知父节点页面改变
-      this.dataCurrentPage = val;
-      this.$emit("update:current-page", val);
+      this.dataCurrentPage = val
+      this.$emit('update:current-page', val)
     },
     // pageSize 改变时会触发
     sizeChange(val) {
-      this.dataPageSize = val;
-      this.requestData({});
-      this.$emit("update:size-change", val);
+      this.dataPageSize = val
+      this.requestData({})
+      this.$emit('update:size-change', val)
     }
   },
   computed: {
@@ -260,53 +261,53 @@ export default {
     dataSortable() {
       return function(item) {
         if (item.template) {
-          return false;
+          return false
         } else if (item.sortable) {
-          return item.sortable;
+          return item.sortable
         } else {
-          return this.sortable;
+          return this.sortable
         }
-      };
+      }
     },
     // 计算每列的最小宽度
     dataColumnMinWidth() {
       return function(item) {
-        let mw = 0;
+        let mw = 0
         if (this.dataSortable(item)) {
           // 如果使用排序功能
-          mw += 30;
+          mw += 30
         }
 
         if (item.filters && item.filters.length > 0) {
-          mw += 20;
+          mw += 20
         }
         if (item.label) {
-          mw += item.label.toString().length * 30;
+          mw += item.label.toString().length * 30
         }
-        return mw;
-      };
+        return mw
+      }
     },
     // 计算拖拽列的偏移差
     dragColumnOffset() {
-      let o = 0;
+      let o = 0
       if (this.showIndex) {
-        o++;
+        o++
       }
-      if (this.selectionType != "") {
-        o++;
+      if (this.selectionType != '') {
+        o++
       }
-      return o;
+      return o
     }
   },
   watch: {
     requestQuery: {
       deep: true,
       handler(val, oldVal) {
-        let q = this.dataRequestQuery;
+        let q = this.dataRequestQuery
         for (const key in val) {
-          q[key] = val[key] ? val[key] : undefined;
+          q[key] = val[key] ? val[key] : undefined
         }
-        this.setDataRequestQuery(q);
+        this.setDataRequestQuery(q)
       }
     }
   },
@@ -316,18 +317,18 @@ export default {
     componentProxy: {
       props: {
         html: {
-          default: ""
+          default: ''
         },
         scope: {
           default() {
-            return {};
+            return {}
           }
         }
       },
       template: ``,
       created() {
-        this.$options.template = this.html;
+        this.$options.template = this.html
       }
     }
   }
-};
+}

+ 60 - 0
src/utils/base64ToBlob.js

@@ -0,0 +1,60 @@
+/**
+ * desc: base64对象转blob文件对象
+ * @param urlData  :数据的base64对象
+ * @param type  :类型 png,pdf,doc,mp3等;
+ * @returns {Blob}:Blob文件对象
+ */
+function base64ToBlob(urlData, type) {
+  let arr = urlData.split(',')
+  let array = arr[0].match(/:(.*?);/)
+  let mime = (array && array.length > 1 ? array[1] : type) || type
+  // 去掉url的头,并转化为byte
+  let bytes = window.atob(arr[1])
+  // 处理异常,将ascii码小于0的转换为大于0
+  let ab = new ArrayBuffer(bytes.length)
+  // 生成视图(直接针对内存):8位无符号整数,长度1个字节
+  let ia = new Uint8Array(ab)
+  for (let i = 0; i < bytes.length; i++) {
+    ia[i] = bytes.charCodeAt(i)
+  }
+  return new Blob([ab], {
+    type: mime
+  })
+}
+
+/**
+ * desc: 下载导出文件
+ * @param blob  :返回数据的blob对象或链接
+ * @param fileName  :下载后文件名标记
+ * @param fileType  :文件类 word(docx) excel(xlsx) ppt等
+ */
+function downloadExportFile(blob, fileName, fileType) {
+  let downloadElement = document.createElement('a')
+  let href = blob
+
+  if (typeof blob == 'string') {
+    downloadElement.target = '_blank'
+  } else {
+    href = window.URL.createObjectURL(blob) //创建下载的链接
+  }
+  console.log(href, 'href')
+  downloadElement.href = href
+  downloadElement.download = fileName + '.' + fileType //下载后文件名
+  document.body.appendChild(downloadElement)
+  downloadElement.click() //触发点击下载
+  document.body.removeChild(downloadElement) //下载完成移除元素
+  if (typeof blob != 'string') {
+    window.URL.revokeObjectURL(href) //释放掉blob对象
+  }
+}
+
+/**
+ * desc: base64转文件并下载
+ * @param base64 {String} : base64数据
+ * @param fileType {String} : 要导出的文件类型png,pdf,doc,mp3等
+ * @param fileName {String} : 文件名
+ */
+export function downloadFile(base64, fileName, fileType) {
+  let blob = base64ToBlob(base64, fileType) // 转成blob对象
+  downloadExportFile(blob, fileName, fileType) // 下载文件
+}

+ 42 - 3
src/views/TMS/components/bmsship/threeSectionFeeDetails.vue

@@ -21,7 +21,7 @@
         <i class="el-icon-refresh"></i>刷新
       </el-button>
     </div>
-    <dilTable v-bind.sync="option">
+    <dilTable v-bind.sync="option" @func="callback">
       <el-table-column fixed="right" label="操作" align="center" width="100">
         <template slot-scope="scope">
           <el-button @click="click(scope.row.resultId)" type="text" size="small"
@@ -41,6 +41,7 @@
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
+import BigNumber from 'bignumber.js';
 export default {
   name: "homeworkPath",
   data() {
@@ -51,8 +52,8 @@ export default {
       option: {
         // 表格请求数据的地址
         requestUrl: null,
-        isshowSummary:true,
-        showSummaryList:['resultInspectionFee','realWeight','resultWaterTonnage','planWeight']
+        // isshowSummary:true,
+        // showSummaryList:['resultInspectionFee','realWeight','resultWaterTonnage','planWeight']
       },
     };
   },
@@ -69,6 +70,44 @@ export default {
       this.startTime.setSeconds(0);
       this.onclick();
     },
+    callback(param){
+      //自定义合计
+      console.log("param:",param);
+      let totalLoad=new BigNumber(0);
+      let totalInstuctions=new BigNumber(0);
+      let totalWater=new BigNumber(0);
+      let totalPlan=new BigNumber(0);
+      let content= null;
+      if(param.list.length<=0){
+        return;
+      }
+      param.list.forEach(row => {
+        if(row.realWeight && typeof row.realWeight == 'number'){
+          totalLoad = totalLoad.plus(new BigNumber(row.realWeight));
+        }
+        if(row.resultInspectionFee && typeof row.resultInspectionFee == 'number'){
+          totalInstuctions =totalInstuctions.plus(new BigNumber(row.resultInspectionFee));
+        }
+        if(row.resultWaterTonnage && typeof row.resultWaterTonnage == 'number'){
+          totalWater = totalWater.plus(new BigNumber(row.resultWaterTonnage));
+        }
+        if(row.planWeight && typeof row.planWeight == 'number'){
+          totalPlan = totalPlan.plus(new BigNumber(row.planWeight));
+        }
+      });
+      if(totalLoad && totalLoad.toFixed(4)>0){
+        content=new BigNumber(totalWater.times(100)).div(totalLoad).toFixed(2);
+      }
+      param.list.push({
+        ROW_ID:' ',
+        noticePort:'合计',
+        realWeight:totalLoad.toFixed(2),
+        resultInspectionFee:totalInstuctions.toFixed(2),
+        resultWaterTonnage:totalWater.toFixed(4),
+        planWeight:totalPlan.toFixed(2),
+        resultMoistureContent:content
+      });
+    },
     onclick() {
       let startTime = null;
       let endTime = null;

+ 90 - 88
src/views/appoint/components/saleContract/saleOrderCoproduct.vue

@@ -113,50 +113,50 @@
   </div>
 </template>
 <script>
-import { sjTime } from "@/utils/sharedJsFile";
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
-  name: "saleOrder",
+  name: 'saleOrder',
   data() {
     return {
       startTime: null,
       endTime: null,
-      activeName: "four",
+      activeName: 'four',
       drawer: false,
-      input: "",
-      index: "",
+      input: '',
+      index: '',
       carrierId: null,
       carrierName: null,
       option4: {
         // 表格请求数据的地址
         requestUrl:
-          "/api/v1/ams/getFuSaleOrderList?apiId=481" + "&deleted=" + Number(0),
-        selectionType: "select",
-        comparison: "saleNumber",
+          '/api/v1/ams/getFuSaleOrderList?apiId=481' + '&deleted=' + Number(0),
+        selectionType: 'select',
+        comparison: 'saleNumber',
         columnIndexs: [0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15]
       },
       option: {
         // 表格请求数据的地址
         requestUrl:
-          "/api/v1/ams/getFuSaleOrderList?apiId=481&deleted=" + Number(2),
-        comparison: "saleNumber",
+          '/api/v1/ams/getFuSaleOrderList?apiId=481&deleted=' + Number(2),
+        comparison: 'saleNumber',
         columnIndexs: [0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15]
       },
       carrier: {
-        requestUrl: "",
-        selectionType: "radio"
+        requestUrl: '',
+        selectionType: 'radio'
       },
       mapList: [],
       mapItemList: []
-    };
+    }
   },
   methods: {
     deleteSaleOrder(row) {
-      this.$prompt("此操作将关闭订单且下面的待运输订单,是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        inputPlaceholder: "请输入关闭原因-必填!!!",
+      this.$prompt('此操作将关闭订单且下面的待运输订单,是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputPlaceholder: '请输入关闭原因-必填!!!',
         center: true,
-        type: "warning"
+        type: 'warning'
       })
         .then(({ value }) => {
           if (value != null) {
@@ -164,110 +164,112 @@ export default {
               number: row.saleNumber,
               saleOrderId: row.saleOrderId,
               reason: value
-            };
+            }
             this.axios
-              .post("/api/v1/ams/deleteSaleOrderSame", mapValue)
+              .post(
+                '/api/v1/ams/deleteSaleOrderById?saleOrderId=' + row.saleOrderId
+              )
               .then(res => {
                 if (res.data.code == 200) {
-                  this.$message.success("关闭成功");
-                  this.refresh();
+                  this.$message.success('关闭成功')
+                  this.onclick()
                 }
-              });
+              })
           } else {
-            this.$message.error("请输入理由");
+            this.$message.error('请输入理由')
           }
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "取消输入"
-          });
-        });
+            type: 'info',
+            message: '取消输入'
+          })
+        })
     },
     checkSaleOrderDetails(saleOrderId) {
-      console.log(saleOrderId);
-      this.$router.push("saleOrderOODetails/" + saleOrderId);
+      console.log(saleOrderId)
+      this.$router.push('saleOrderOODetails/' + saleOrderId)
     },
     refresh() {
       this.option4.requestUrl =
-        "/api/v1/ams/getFuSaleOrderList?apiId=481&i=" +
+        '/api/v1/ams/getFuSaleOrderList?apiId=481&i=' +
         new Date() +
-        "&deleted=" +
-        Number(0);
+        '&deleted=' +
+        Number(0)
       this.option.requestUrl =
-        "/api/v1/ams/getFuSaleOrderList?apiId=481&i=" +
+        '/api/v1/ams/getFuSaleOrderList?apiId=481&i=' +
         new Date() +
-        "&deleted=" +
-        Number(2);
+        '&deleted=' +
+        Number(2)
     },
     handleClick(tab, event) {},
     onclick() {
-      let startTime = null;
-      let endTime = null;
+      let startTime = null
+      let endTime = null
       if (this.startTime && this.endTime) {
-        startTime = sjTime(this.startTime);
-        endTime = sjTime(this.endTime);
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
       }
-      if (this.activeName == "four") {
+      if (this.activeName == 'four') {
         this.option4.requestUrl =
-          "/api/v1/ams/getFuSaleOrderList?apiId=481&con=" +
+          '/api/v1/ams/getFuSaleOrderList?apiId=481&con=' +
           this.input +
-          "&deleted=" +
+          '&deleted=' +
           Number(0) +
-          "&startTime=" +
+          '&startTime=' +
           startTime +
-          "&endTime=" +
+          '&endTime=' +
           endTime +
-          "&i=" +
-          new Date();
+          '&i=' +
+          new Date()
       } else {
         this.option.requestUrl =
-          "/api/v1/ams/getFuSaleOrderList?apiId=481&con=" +
+          '/api/v1/ams/getFuSaleOrderList?apiId=481&con=' +
           this.input +
-          "&deleted=" +
+          '&deleted=' +
           Number(2) +
-          "&startTime=" +
+          '&startTime=' +
           startTime +
-          "&endTime=" +
+          '&endTime=' +
           endTime +
-          "&i=" +
-          new Date();
+          '&i=' +
+          new Date()
       }
     },
     //模糊查询承运商
     onclickCarrier() {
       this.carrier.requestUrl =
-        "/api/v1/uc/getCarrierListByLike?apiId=412&index=" +
+        '/api/v1/uc/getCarrierListByLike?apiId=412&index=' +
         this.index +
-        "&i=" +
-        new Date();
+        '&i=' +
+        new Date()
     },
     selectionChange(selection) {
-      this.mapList = [];
-      this.mapList = selection;
+      this.mapList = []
+      this.mapList = selection
     },
     currentRadioChange(row) {
-      (this.carrierId = row.carrierId), (this.carrierName = row.carrierName);
+      ;(this.carrierId = row.carrierId), (this.carrierName = row.carrierName)
     },
     empower() {
       if (this.mapList.length == 0) {
-        this.$message.warning("请先选择至少一个销售订单");
+        this.$message.warning('请先选择至少一个销售订单')
       } else {
         this.carrier.requestUrl =
-          "/api/v1/uc/getCarrierListByLike?apiId=412&i=" + new Date();
-        this.drawer = true;
+          '/api/v1/uc/getCarrierListByLike?apiId=412&i=' + new Date()
+        this.drawer = true
       }
     },
     selectMakeSure() {
-      this.index = null;
-      this.drawer = false;
+      this.index = null
+      this.drawer = false
       this.$confirm(
-        "是否确认授权选中的销售订单给承运商:(" + this.carrierName + ")",
-        "提示",
+        '是否确认授权选中的销售订单给承运商:(' + this.carrierName + ')',
+        '提示',
         {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
           center: true
         }
       )
@@ -277,43 +279,43 @@ export default {
             var mapItem = {
               //销售订单id
               saleOrderId: 0
-            };
-            mapItem.saleOrderId = item.saleOrderId;
-            this.mapItemList = [];
-            this.mapItemList.push(mapItem);
-          });
+            }
+            mapItem.saleOrderId = item.saleOrderId
+            this.mapItemList = []
+            this.mapItemList.push(mapItem)
+          })
           //初始化传递的参数
           let mapValue = {
             saleOrderIds: this.mapItemList,
             carrierId: this.carrierId
-          };
+          }
           this.axios
-            .post("/api/v1/ams/saleOrderEmpowerCarrier", mapValue)
+            .post('/api/v1/ams/saleOrderEmpowerCarrier', mapValue)
             .then(res => {
-              if (res.data.code == "0") {
-                this.$message({ type: "success", message: "授权成功!" });
-                this.refresh();
+              if (res.data.code == '0') {
+                this.$message({ type: 'success', message: '授权成功!' })
+                this.refresh()
               }
-            });
+            })
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "取消授权!"
-          });
-        });
+            type: 'info',
+            message: '取消授权!'
+          })
+        })
     },
     seeclick(saleOrderId) {
-      this.$router.push("/saleOrderDetail/" + saleOrderId);
+      this.$router.push('/saleOrderDetail/' + saleOrderId)
     },
     click(saleOrderId) {
-      this.$router.push("/editSaleOrder/" + saleOrderId);
+      this.$router.push('/editSaleOrder/' + saleOrderId)
     },
     coproductSendClick(saleOrderId) {
-      this.$router.push("/addSaleOrderCoproductSend/" + saleOrderId);
+      this.$router.push('/addSaleOrderCoproductSend/' + saleOrderId)
     }
   }
-};
+}
 </script>
 <style lang="scss" scoped>
 .salePlan {

+ 1 - 1
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -303,7 +303,7 @@ export default {
         requestUrl: '',
         selectionType: 'select',
         comparison: 'saleNumber',
-        columnIndexs: [0, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
+        columnIndexs: [0, 1, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
       },
       option4: {
         // 表格请求数据的地址

+ 9 - 9
src/views/index/components/login.vue

@@ -107,13 +107,16 @@ export default {
           this.loginBtnLoading = true
           let form = JSON.parse(JSON.stringify(this.loginForm))
           form.app_code = 'web' //终端code暂时写死
+          //传递密码明文进去
           this.shaObj.update(form.password)
-          console.log(form.password)
+          console.log(form)
+          //获得密码的哈希值
           form.password = this.shaObj.getHash('HEX')
           console.log(form.password)
           this.store
             .dispatch('index/login/login', form)
             .then(res => {
+              console.log(res)
               if (res.code === '0') {
                 console.log('login resonse', res.data)
                 //  登录成功
@@ -132,7 +135,6 @@ export default {
                 setCookie('loginName', this.loginForm.loginName)
                 let info = JSON.parse(JSON.stringify(res.data.user))
                 for (let k in info) {
-                  console.log('k,', k)
                   if (
                     k === 'sysGroup' ||
                     k === 'sysCompanys' ||
@@ -148,8 +150,6 @@ export default {
                 // 判断用户集团公司情况跳转
                 let userInfo = res.data.user
                 let sRedirect = this.$route.query.redirect
-                console.log(userInfo)
-                console.log('userInfo')
                 // 超级管理员
                 if (userInfo.userCode === 'admin') {
                   if (userInfo.sysCompanys) {
@@ -223,13 +223,13 @@ export default {
                 // 提示
                 this.$message({
                   message: res.message,
-                  type: 'error'
+                  type: 'error',
+                  duration: 2000,
+                  offset: 300
                 })
-              }
-              this.loginBtnLoading = false
-              setTimeout(() => {
+                this.loginBtnLoading = false
                 this.$router.go(0)
-              }, 50)
+              }
             })
             .catch(() => {
               this.loginBtnLoading = false

+ 139 - 4
src/views/inward/components/inwardBillet/addInwardBillet.vue

@@ -182,12 +182,99 @@
         </div>
       </div>
     </div>
-
-    <div>
+    <div class="query">
+      <el-divider></el-divider>
+      <el-form :inline="true">
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;"
+            >发坯日期:</label
+          >
+          <el-date-picker
+            v-model="startTime"
+            type="date"
+            placeholder="开始日期"
+            style="width:150px"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="date"
+            placeholder="结束日期"
+            style="width:150px"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="班别" style="margin-left:10px">
+          <el-select
+            class="inline-select"
+            v-model="clazz"
+            style="width:150px"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.value"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="班次" style="margin-left:10px">
+          <el-select
+            class="inline-select"
+            v-model="shift"
+            style="width:150px"
+            clearable
+          >
+            <el-option
+              v-for="item in optionShift"
+              :key="item.value"
+              :label="item.value"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="卸货点">
+          <el-select
+            class="inline-select"
+            v-model="queryPoint"
+            style="width:150px"
+          >
+            <el-option
+              v-for="item in optionWarehouse"
+              :key="item.value"
+              :label="item.value"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="炉号" style="margin-left:10px">
+          <el-input
+            v-model="queryHeatNo"
+            style="width:250px"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item
+          ><el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i> </el-button
+        ></el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
       <mergeRowTable v-bind.sync="first" ref="table" :isShowGroup="false">
         <el-table-column label="操作" width="80px" fixed="right">
           <template slot-scope="scope">
-            <el-button type="text" @click="deleteOrder(scope)" size="mini">
+            <el-button
+              type="text"
+              @click="deleteOrder(scope)"
+              size="mini"
+              v-if="scope.row.orderStatus != '已收货'"
+            >
               删除
             </el-button>
           </template>
@@ -206,6 +293,10 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      queryPoint: null,
+      queryHeatNo: null,
+      startTime: null,
+      endTime: null,
       checkWeight: null,
       checkCount: null,
       checkHeatNo: null,
@@ -233,6 +324,14 @@ export default {
           value: '夜'
         }
       ],
+      optionWarehouse: [
+        {
+          value: '轧钢厂-一棒车间'
+        },
+        {
+          value: '轧钢厂-高线车间'
+        }
+      ],
       options: [
         {
           value: '甲'
@@ -305,7 +404,8 @@ export default {
       capacityIds: [],
       first: {
         // first请求数据的地址
-        requestUrl: ''
+        requestUrl: '',
+        requestQuery: {}
       },
       isMeter: '需要过磅'
     }
@@ -352,6 +452,35 @@ export default {
     }
   },
   methods: {
+    onclick() {
+      let startTime = null
+      let endTime = null
+      let obj = {}
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
+      }
+      if (this.clazz) {
+        obj.clazz = `%${this.clazz}%`
+      }
+      if (this.shift) {
+        obj.shift = `%${this.shift}%`
+      }
+      if (this.queryHeatNo) {
+        obj.queryHeatNo = `%${this.queryHeatNo}%`
+      }
+      if (this.queryPoint) {
+        obj.queryPoint = `%${this.queryPoint}%`
+      }
+      this.first.requestQuery = obj
+      this.first.requestUrl =
+        '/api/v1/ams/getBilletRequirementList?apiId=518&startTime=' +
+        startTime +
+        '&endTime=' +
+        endTime +
+        '&i=' +
+        new Date()
+    },
     getRequestUrl() {
       if (
         getCookie('orgCode') == 'dagangadmin' ||
@@ -622,6 +751,12 @@ export default {
       }
     }
   }
+  .query {
+    margin-left: 10px;
+  }
+  .table {
+    margin-left: 10px;
+  }
 }
 </style>
 <style>

+ 90 - 84
src/views/queue/components/qmsEnFacotory/queueFJumpLine.vue

@@ -172,15 +172,15 @@
 export default {
   data() {
     return {
-      capacityNo: "",
-      inputText: "",
+      capacityNo: '',
+      inputText: '',
       optionMa: {
         // 表格请求数据的地址
-        requestUrl: "",
+        requestUrl: '',
         // 控制显示多选列
-        selectionType: "select"
+        selectionType: 'select'
       },
-      activeName: "first",
+      activeName: 'first',
       tableData: [],
       tableData1: [],
       //存放每一行记录的合并数
@@ -198,86 +198,86 @@ export default {
       materialNameText: null,
       materialSpecificationText: null,
       materialModelText: null
-    };
+    }
   },
   watch: {
     activeName() {}
   },
   mounted() {
-    this.getSpellingArray();
-    this.getNoSpellingArray();
+    this.getSpellingArray()
+    this.getNoSpellingArray()
   },
   methods: {
     rowDbClick(row) {
-      this.materialList = [];
-      this.materialList.push(row);
-      this.makeSureMaterial();
+      this.materialList = []
+      this.materialList.push(row)
+      this.makeSureMaterial()
     },
     //物资模态框查询
     onclickMaterial1() {
       this.optionMa.requestUrl =
-        "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
+        '/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=' +
         this.materialNameText +
-        "&materialSpecificationText=" +
-        this.materialSpecificationText;
+        '&materialSpecificationText=' +
+        this.materialSpecificationText
     },
     onclickMaterial() {
-      this.table1 = true;
+      this.table1 = true
       this.optionMa.requestUrl =
-        "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
-      console.log("dasd");
+        '/api/v1/uc/getSteelMaterial?apiId=244&i=' + new Date()
+      console.log('dasd')
     },
     //返回选中的物资信息
     selectionChange2(selection) {
-      this.materialList1 = [];
-      this.materialList1 = selection;
-      this.materialList = this.materialList.concat(this.materialList1);
+      this.materialList1 = []
+      this.materialList1 = selection
+      this.materialList = this.materialList.concat(this.materialList1)
     },
     makeSureMaterial() {
-      console.log(this.materialList);
-      var materialIdList = [];
+      console.log(this.materialList)
+      var materialIdList = []
       this.materialList.forEach(e => {
         if (materialIdList.indexOf(e.materialId) == -1) {
-          materialIdList.push(e.materialId);
+          materialIdList.push(e.materialId)
         }
-      });
+      })
       let map = {
         materialList: materialIdList
-      };
-      this.materialList = [];
-      this.materialList1 = [];
-      if (this.activeName == "first") {
+      }
+      this.materialList = []
+      this.materialList1 = []
+      if (this.activeName == 'first') {
         this.axios
-          .post("/api/v1/qms/getQueueListByQueueUp?isSpelling=0", map)
+          .post('/api/v1/qms/getQueueListByQueueUp?isSpelling=0', map)
           .then(res => {
-            this.tableData1 = res.data.data;
-          });
+            this.tableData1 = res.data.data
+          })
       } else {
         this.axios
-          .post("/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1", map)
+          .post('/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1', map)
           .then(res => {
-            this.tableData = res.data.data;
-            this.getSpanArr(this.tableData);
-          });
+            this.tableData = res.data.data
+            this.getSpanArr(this.tableData)
+          })
       }
-      this.table1 = false;
+      this.table1 = false
     },
     //记录每一行的合并数
     getSpanArr(data) {
       //每次调用方法初始化
-      this.spanArr = [];
+      this.spanArr = []
       for (var i = 0; i < data.length; i++) {
         if (i === 0) {
-          this.spanArr.push(1);
-          this.pos = 0;
+          this.spanArr.push(1)
+          this.pos = 0
         } else {
           // 判断当前元素与上一个元素是否相同
           if (data[i].resultTotalId === data[i - 1].resultTotalId) {
-            this.spanArr[this.pos] += 1;
-            this.spanArr.push(0);
+            this.spanArr[this.pos] += 1
+            this.spanArr.push(0)
           } else {
-            this.spanArr.push(1);
-            this.pos = i;
+            this.spanArr.push(1)
+            this.pos = i
           }
         }
       }
@@ -293,95 +293,101 @@ export default {
         columnIndex === 10 ||
         columnIndex === 12
       ) {
-        const _row = this.spanArr[rowIndex];
-        const _col = _row > 0 ? 1 : 0;
+        const _row = this.spanArr[rowIndex]
+        const _col = _row > 0 ? 1 : 0
         return {
           rowspan: _row,
           colspan: _col
-        };
+        }
       }
     },
     handleClick() {
-      if (this.activeName == "first") {
-        this.getNoSpellingArray();
+      if (this.activeName == 'first') {
+        this.getNoSpellingArray()
       } else {
-        this.getSpellingArray();
+        this.getSpellingArray()
       }
     },
     getNoSpellingArray() {
       this.axios
-        .post("/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=" + new Date())
+        .post('/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=' + new Date())
         .then(res => {
-          this.tableData1 = res.data.data;
-        });
+          this.tableData1 = res.data.data
+        })
     },
     getSpellingArray() {
       this.axios
         .post(
-          "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=" +
+          '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=' +
             new Date()
         )
         .then(res => {
-          this.tableData = res.data.data;
-          console.log(this.tableData);
-          this.getSpanArr(this.tableData);
-        });
+          this.tableData = res.data.data
+          console.log(this.tableData)
+          this.getSpanArr(this.tableData)
+        })
     },
     onclick() {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=0?capacityNumber=" +
-          this.capacityNo +
-          "&i=" +
-          new Date();
+      if (this.activeName == 'first') {
+        this.axios
+          .post(
+            '/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=' +
+              new Date() +
+              '&capacityNumber=' +
+              this.capacityNo
+          )
+          .then(res => {
+            this.tableData1 = res.data.data
+          })
+        console.log('wzxxx')
       } else {
         this.axios
           .post(
-            "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=" +
+            '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=' +
               new Date() +
-              "&capacityNumber=" +
+              '&capacityNumber=' +
               this.capacityNo
           )
           .then(res => {
-            this.tableData = res.data.data;
-            this.getSpanArr(this.tableData);
-          });
+            this.tableData = res.data.data
+            this.getSpanArr(this.tableData)
+          })
       }
     },
     handleSelectionChange(selection) {
-      this.maplist = [];
-      this.maplist = selection;
+      this.maplist = []
+      this.maplist = selection
     },
     updateBill(scope) {
-      console.log(scope.row.capacityId);
+      console.log(scope.row.capacityId)
       this.$router.push(
         `/editBill/${scope.row.capacityId}/${scope.row.capacityNumber}`
-      );
+      )
     },
     filterArr(resultId) {
-      console.log("fdhjsaj");
+      console.log('fdhjsaj')
       this.filterArr1 = this.filterArr1.concat(
         this.tableData.filter(ele => ele.resultId == resultId)
-      );
+      )
     },
     allow() {
       if (this.maplist.length == 0) {
-        this.$message.error("请选择需要插队的车辆");
-        return;
+        this.$message.error('请选择需要插队的车辆')
+        return
       }
       let map = {
         mapList: this.maplist
-      };
-      this.axios.post("/api/v1/qms/queueCutInLine", map).then(res => {
-        if (res.data.code == "200") {
-          this.$message.success("插队成功,等待放行");
-          this.getNoSpellingArray();
-          this.getSpellingArray();
+      }
+      this.axios.post('/api/v1/qms/queueCutInLine', map).then(res => {
+        if (res.data.code == '200') {
+          this.$message.success('插队成功,等待放行')
+          this.getNoSpellingArray()
+          this.getSpellingArray()
         }
-      });
+      })
     }
   }
-};
+}
 </script>
 <style lang="scss" scoped>
 .sale {

+ 57 - 55
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -121,6 +121,7 @@
               type="selection"
               width="55"
               reserve-selection
+              :selectable="selectInit"
             ></el-table-column>
             <el-table-column type="index" width="50"> </el-table-column>
             <el-table-column prop="capacityNumber" label="车牌号" fit>
@@ -355,21 +356,21 @@ export default {
       this.axios.post('/api/v1/qms/ctrlZQueueAllow', map).then(res => {
         if (res.data.code == 200) {
           this.$message({
-            message:"撤销成功",
-            type:'success',
-            duration:2000,
-            center:true,
-            offset:100
+            message: '撤销成功',
+            type: 'success',
+            duration: 2000,
+            center: true,
+            offset: 100
           })
           this.getNoSpellingArray()
           this.getSpellingArray()
         } else {
           this.$message({
-            message:"撤单失败",
-            type:'error',
-            duration:2000,
-            center:true,
-            offset:100
+            message: '撤单失败',
+            type: 'error',
+            duration: 2000,
+            center: true,
+            offset: 100
           })
         }
       })
@@ -520,12 +521,13 @@ export default {
         columnIndex === 1 ||
         columnIndex === 2 ||
         columnIndex === 3 ||
-        columnIndex === 9 ||
+        columnIndex === 4 ||
         columnIndex === 10 ||
         columnIndex === 11 ||
         columnIndex === 12 ||
         columnIndex === 13 ||
-        columnIndex === 14
+        columnIndex === 14 ||
+        columnIndex === 15
       ) {
         const _row = this.spanArr[rowIndex]
         const _col = _row > 0 ? 1 : 0
@@ -611,14 +613,14 @@ export default {
           }
         }
       }
-      //限制只取第一个去掉
-      // if (
-      //   !this.maplist.some(e => {
-      //     return e.ROW_ID == 1;
-      //   })
-      // ) {
-      //   this.$refs.mutiData.clearSelection();
-      // }
+      // 限制只取第一个去掉
+      if (
+        !this.maplist.some(e => {
+          return e.ROW_ID == 1
+        })
+      ) {
+        this.$refs.mutiData.clearSelection()
+      }
     },
     updateBill(scope) {
       console.log(scope.row.capacityId)
@@ -635,11 +637,11 @@ export default {
     allow() {
       if (this.maplist.length == 0) {
         this.$message({
-          message:"请选择需要放行的车辆",
-          type:'error',
-          duration:2000,
-          center:true,
-          offset:100
+          message: '请选择需要放行的车辆',
+          type: 'error',
+          duration: 2000,
+          center: true,
+          offset: 100
         })
         return
       }
@@ -651,11 +653,11 @@ export default {
           this.maplist[i].id == 'null'
         ) {
           this.$message({
-            message:"请选择装货点",
-            type:'error',
-            duration:2000,
-            center:true,
-            offset:100
+            message: '请选择装货点',
+            type: 'error',
+            duration: 2000,
+            center: true,
+            offset: 100
           })
           return
         }
@@ -665,11 +667,11 @@ export default {
         console.log('warehouse', warehouse)
         if (warehouse && warehouse.carQueue >= 20) {
           this.$message({
-            message:"该仓库已经有20辆车在排队,不允许放行!",
-            type:'error',
-            duration:2000,
-            center:true,
-            offset:100
+            message: '该仓库已经有20辆车在排队,不允许放行!',
+            type: 'error',
+            duration: 2000,
+            center: true,
+            offset: 100
           })
           return
         }
@@ -691,11 +693,11 @@ export default {
       this.axios.post('/api/v1/qms/allowEnFactory', map).then(res => {
         if (res.data.code == '200') {
           this.$message({
-            message:"放行成功,等待进厂",
-            type:'success',
-            duration:2000,
-            center:true,
-            offset:100
+            message: '放行成功,等待进厂',
+            type: 'success',
+            duration: 2000,
+            center: true,
+            offset: 100
           })
           this.maplist = []
           this.$refs.mutiData.clearSelection()
@@ -710,11 +712,11 @@ export default {
           this.start()
         } else {
           this.$message({
-            message:"请按顺序勾选",
-            type:'error',
-            duration:2000,
-            center:true,
-            offset:100
+            message: '请按顺序勾选',
+            type: 'error',
+            duration: 2000,
+            center: true,
+            offset: 100
           })
           this.maplist = []
           this.$refs.mutiData.clearSelection()
@@ -743,19 +745,19 @@ export default {
         console.log(res)
         if (res.data.code == '200') {
           this.$message({
-            message:"更新装货点成功",
-            type:'success',
-            duration:2000,
-            center:true,
-            offset:100
+            message: '更新装货点成功',
+            type: 'success',
+            duration: 2000,
+            center: true,
+            offset: 100
           })
         } else {
           this.$message({
-            message:"更新装货点失败",
-            type:'error',
-            duration:2000,
-            center:true,
-            offset:100
+            message: '更新装货点失败',
+            type: 'error',
+            duration: 2000,
+            center: true,
+            offset: 100
           })
         }
       })

+ 20 - 0
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -220,6 +220,26 @@ export default {
                   right: { style: 'thin' }
               }
             }
+            //库存三列特殊对待
+            if(table_book.Sheets.Sheet1[key].t=='s' && table_book.Sheets.Sheet1[key].v && (table_book.Sheets.Sheet1[key].v.includes('下游港口库存') || table_book.Sheets.Sheet1[key].v.includes('万港库存') || table_book.Sheets.Sheet1[key].v.includes('在途货物'))){
+              
+              table_book.Sheets.Sheet1[key].s = {
+              font:{
+                name:"宋体",
+                sz:10
+              },
+              alignment: {
+                vertical: 'center',
+                wrapText: true,
+              },
+              border: { 
+                  top: { style: 'thin' },
+                  bottom: { style: 'thin' },
+                  left: { style: 'thin' },
+                  right: { style: 'thin' }
+              }
+            }
+            }
           }
        })
        //表头字体重新设置

+ 280 - 80
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -302,12 +302,7 @@
           show-overflow-tooltip
         >
         </el-table-column>
-        <el-table-column
-          prop="receiptTime"
-          label="抵达时间"
-          width="280px"
-          show-overflow-tooltip
-        >
+        <el-table-column prop="receiptTime" label="抵达时间" width="150px">
         </el-table-column>
         <el-table-column
           prop="receiptAddress"
@@ -316,19 +311,20 @@
           show-overflow-tooltip
         >
         </el-table-column>
-        <el-table-column
-          prop="arrivalTime"
-          label="签收时间"
-          width="280px"
-          show-overflow-tooltip
-        >
+        <el-table-column prop="arrivalTime" label="签收时间" 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="orderNo"
           label="运输订单号"
           width="180px"
           align="center"
-          show-overflow-tooltip
         >
         </el-table-column>
         <el-table-column
@@ -336,22 +332,15 @@
           label="司机电话"
           width="120px"
           align="center"
-          show-overflow-tooltip
         >
         </el-table-column>
-        <el-table-column
-          prop="saler"
-          label="业务员"
-          align="center"
-          show-overflow-tooltip
-        >
+        <el-table-column prop="saler" label="业务员" align="center">
         </el-table-column>
         <el-table-column
           prop="shipperName"
           label="发货单位"
           width="170px"
           align="center"
-          show-overflow-tooltip
         >
         </el-table-column>
         <el-table-column
@@ -359,7 +348,6 @@
           label="收货客户电话"
           width="120px"
           align="center"
-          show-overflow-tooltip
         >
         </el-table-column>
         <el-table-column prop="isSelfMention" label="是否自提" align="center">
@@ -369,13 +357,12 @@
           label="销售订单号"
           width="200px"
           align="center"
-          show-overflow-tooltip
         >
         </el-table-column>
         <el-table-column
           prop="closeEntryId"
           label="金蝶分录ID"
-          width="100px"
+          width="120px"
           show-overflow-tooltip
         >
         </el-table-column>
@@ -383,28 +370,32 @@
     </div>
     <div>
       <vxe-modal
-        width="549px"
-        height="731px"
+        width="80%"
+        height="80%"
         v-model="isShow3"
         show-footer
         class="vxeModal"
       >
-        <div class="demo-image__preview">
-          <el-image style=" height:731px;text-align:center;" :src="src">
+        <div class="demo-image__preview" v-for="(item, i) in srcList" :key="i">
+          <span>{{ item.title }}</span>
+          <el-image
+            :src="item.src"
+            fit="fill"
+            @click.prevent.right="receiveClick(item.src, '抵达')"
+          >
             <div slot="error" class="image-slot">
               <span>司机未上传图片</span>
             </div>
           </el-image>
         </div>
       </vxe-modal>
-      <vxe-modal width="549px" height="731px" v-model="isShow4" show-footer>
-        <div
-          class="demo-image__preview"
-          v-for="item in srcList2"
-          :key="item.src"
-        >
-          <span>{{ item.title }}</span>
-          <el-image style="height:731px;text-align:center" :src="item.src">
+      <vxe-modal width="80%" height="80%" v-model="isShow4">
+        <div class="demo-image__preview" v-for="(item, i) in srcList2" :key="i">
+          <el-image
+            :src="item.src"
+            fit="fill"
+            @click.prevent.right="receiveClick(item.src, '签收')"
+          >
             <div slot="error" class="image-slot">
               <span>司机未上传图片</span>
             </div>
@@ -631,6 +622,19 @@
               <span>{{ steelMap.receiptAddress }}</span>
             </div>
           </div>
+          <div class="steelMapClass7">
+            <div class="steelMapClass72" v-if="steelMap.priceValue != null">
+              <span>系统建议运价:</span>
+              <span>{{ steelMap.priceValue }}</span>
+              <el-button
+                type="success"
+                circle
+                @click="updateDetailsOrderPrice"
+                v-if="!notRoutList.includes('capacityNo')"
+                >修改</el-button
+              >
+            </div>
+          </div>
         </div>
         <div class="table1">
           <el-table
@@ -705,6 +709,8 @@
             <el-table-column prop="netWeight" label="净重"> </el-table-column>
             <el-table-column prop="loadTime" label="装货时间" width="130px">
             </el-table-column>
+            <el-table-column prop="detailsAmount" label="运费" width="130px">
+            </el-table-column>
             <el-table-column
               prop="closeEntryId"
               label="金蝶分录ID"
@@ -755,11 +761,21 @@
             title="抵达上传照片"
           >
             <div class="demo-image__preview">
-              <el-image style=" height:731px;text-align:center;" :src="src">
-                <div slot="error" class="image-slot">
-                  <span>司机未上传图片</span>
-                </div>
-              </el-image>
+              <div
+                class="demo-image__preview"
+                v-for="(item, index) in srcList"
+                :key="index"
+              >
+                <span>{{ item.title }}</span>
+                <el-image
+                  style="height:731px;text-align:center"
+                  :src="item.src"
+                >
+                  <div slot="error" class="image-slot">
+                    <span>司机未上传抵达图片</span>
+                  </div>
+                </el-image>
+              </div>
             </div>
           </vxe-modal>
           <vxe-modal
@@ -777,7 +793,7 @@
               <span>{{ item.title }}</span>
               <el-image style="height:731px;text-align:center" :src="item.src">
                 <div slot="error" class="image-slot">
-                  <span>司机未上传图片</span>
+                  <span>司机未上传签收图片</span>
                 </div>
               </el-image>
             </div>
@@ -928,12 +944,56 @@
         ><currentLocation :carNumber="carNumber"></currentLocation
       ></vxe-modal>
     </div>
+    <el-drawer
+      title="修改详单地址"
+      :visible.sync="dialogFormVisible"
+      size="40%"
+    >
+      <!--        <el-form-item label="原详单地址" :label-width="formLabelWidth">-->
+      原详单地址
+      <el-input
+        style="width:250px"
+        v-model="originalAddress"
+        disabled
+      ></el-input>
+      <label>原单价</label>
+      <el-input
+        style="width:100px"
+        v-model="originalPriceValue"
+        disabled
+      ></el-input>
+      <!--        </el-form-item>-->
+      <!---->
+      <el-input
+        v-model="addresText"
+        placeholder="请输入内容"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        @keyup.native.enter="selectAddresClick"
+      ></el-input>
+      <el-button type="primary" @click="selectAddresClick"
+        ><i class="el-icon-search"></i>查询</el-button
+      >
+      <div class="tablecls">
+        <!-- 查询所有的运输单价 -->
+        <vue-scorll :ops="ops" style="width: 100%;height: 100%">
+          <dilTable
+            v-bind.sync="Address"
+            @radio-change="currentRadioChange2"
+            :drawer="aaadrawer"
+          ></dilTable>
+        </vue-scorll>
+      </div>
+      <div class="opreation">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="makeSure">确 定</el-button>
+      </div>
+    </el-drawer>
     <el-dialog
       title="抵达签收"
       :visible.sync="arrivalReceiving"
       :before-close="closeUpload"
     >
-      <el-form :inline="true" style="margin-left:20%">
+      <el-form style="margin-left:20%">
         <el-form-item label="车牌号码">
           <el-input
             v-model="capacityNumber"
@@ -942,14 +1002,14 @@
           ></el-input>
         </el-form-item>
         <el-form-item label="签收地址">
-          <el-input v-model="location" style="width:300px"></el-input>
+          <el-input v-model="location" style="width:400px"></el-input>
         </el-form-item>
-        <el-form-item label="抵达图片(满货箱)">
+        <el-form-item label="抵达图片(车头、满货箱)" style="">
           <el-upload
             ref="arrival"
             list-type="picture-card"
             action="/api/v1/otms/addtmstruckArrivalResult"
-            :limit="1"
+            :limit="2"
             :on-change="fileChange1"
             :on-preview="handlePictureCardPreview"
             :on-exceed="exceed"
@@ -994,6 +1054,7 @@ import { sjTime, isVehicleNumber } from '@/utils/sharedJsFile'
 import { getCookie } from '@/utils/util.js'
 import PathView from './mapTest.vue'
 import currentLocation from './currentLocation.vue'
+import { downloadFile } from '@/utils/base64ToBlob.js'
 export default {
   components: {
     PathView,
@@ -1100,7 +1161,8 @@ export default {
         '短信发送',
         '销售片区',
         '抵达时间',
-        '签收时间'
+        '签收时间',
+        '系统建议运价'
       ],
       //钢材多拼车辆线路ID
       //索引从1-10为1-10拼路线ID
@@ -1148,7 +1210,7 @@ export default {
       src2: '',
       isShow2: false,
       input1: '',
-      maxHeight: window.innerHeight - 140,
+      maxHeight: 700,
       //轨迹窗口
       value7: false,
       //实时路径窗口
@@ -1191,7 +1253,31 @@ export default {
       dialogImageUrl: '',
       dialogVisible: false,
       isLoading: false,
-      batchList: []
+      batchList: [],
+      Address: {
+        requestUrl: '',
+        selectionType: 'radio'
+      },
+      dialogFormVisible: false,
+      addresText: null,
+      originalPriceValue: null,
+      originalAddress: null,
+      aaadrawer: false,
+      downloadCapacityNo: null,
+      ops: {
+        vuescroll: {},
+        scrollPanel: {},
+        rail: {
+          keepShow: true
+        },
+        bar: {
+          hoverStyle: true,
+          onlyShowBarOnScroll: false, //是否只有滚动的时候才显示滚动条
+          background: '#5f9ea0', //滚动条颜色
+          opacity: 0.8, //滚动条透明度
+          'overflow-x': 'hidden'
+        }
+      }
     }
   },
   created() {
@@ -1266,19 +1352,13 @@ export default {
   },
   computed: {},
   mounted() {
-    // window.onresize = () => {
-    //   return (() => {
-    //     console.log('wjll')
-    //     this.maxHeight = window.innerHeight - 150
-    //   })()
-    // }
     let that = this
-    window.addEventListener('resize', function() {
-      console.log('wjll')
-      console.log(window)
-
-      that.maxHeight =
-        window.innerHeight - that.$refs.tableRef.$el.offsetTop - 150
+    this.$nextTick(() => {
+      window.onresize = () => {
+        return (() => {
+          this.maxHeight = window.innerHeight - 150
+        })()
+      }
     })
     this.$refs.tableRef.bodyWrapper.addEventListener('scroll', e => {
       if (this.debounceS) return
@@ -1286,7 +1366,7 @@ export default {
       this.scrollTop = e.target.scrollTop
       setTimeout(() => {
         this.debounceS = false
-      }, 100)
+      }, 50)
     })
   },
   activated() {
@@ -1294,6 +1374,87 @@ export default {
   },
   computed: {},
   methods: {
+    receiveClick(src, title) {
+      // this.dialogImageUrl = src
+      downloadFile(src, `${this.downloadCapacityNo}${title}照片`, '.jpg')
+      // this.dialogVisible = true
+    },
+    selectAddresClick() {
+      if (this.addresText) {
+        this.Address.requestUrl =
+          '/api/v1/ams/getAddressDeliveryAddress?apiId=511&con=' +
+          this.addresText
+      } else {
+        this.Address.requestUrl =
+          '/api/v1/ams/getAddressDeliveryAddress?apiId=511&i=' + new Date()
+      }
+    },
+    updateDetailsOrderPrice() {
+      this.originalAddress = this.steelMap.addressPlace
+      this.originalPriceValue = this.steelMap.priceValue
+      this.Address.requestUrl =
+        '/api/v1/ams/getAddressDeliveryAddress?apiId=511&i=' + new Date()
+      this.dialogFormVisible = true
+    },
+    currentRadioChange2(val) {
+      //若具体地址有值,清空值
+      if (this.place != null) {
+        this.place = null
+      }
+      this.steelMap.placeId = val.placeId
+      this.steelMap.address = val.address
+      this.steelMap.addressId = val.addressId
+      this.steelMap.priceId = val.priceid
+    },
+    makeSure() {
+      //若没有单价Id
+      let mapValue = {
+        orderId: this.steelMap.orderId,
+        priceId: this.steelMap.priceId,
+        placeId: this.steelMap.placeId
+      }
+      //是否确定修改详单地址!
+      this.$confirm('确定修改', '提示', {
+        confirmButtonText: '仅修改单价',
+        cancelButtonText: '修改下货地址和单价',
+        distinguishCancelAndClose: true,
+        type: 'warning',
+        center: true
+      })
+        .then(() => {
+          //初始化修改详单地址对话框的信息
+          this.axios
+            .post('/api/v1/bms/updateDetailsOrder', mapValue)
+            .then(res => {
+              if (res.data.code == '0') {
+                this.$message.success('修改详单单价成功!')
+                //重置未结算详单表单信息
+                this.operation(this.steelMap)
+                this.getSteelReport()
+                this.dialogFormVisible = false
+              } else {
+                this.$message.error('修改详单单价失败,请联系管理员!')
+                this.dialogFormVisible = false
+              }
+            })
+        })
+        .catch(action => {
+          if (action === 'cancel') {
+            mapValue.updatePlace = 1
+            this.axios
+              .post('/api/v1/bms/updateDetailsOrder', mapValue)
+              .then(res => {
+                if (res.data.code == '0') {
+                  this.$message.success('修改详单单价和地址成功!')
+                  this.operation(this.steelMap)
+                  this.getSteelReport()
+                  this.dialogFormVisible = false
+                }
+              })
+          }
+          //初始化修改详单地址对话框的信息
+        })
+    },
     hanleScroll() {
       console.log('我滚动了')
     },
@@ -1353,14 +1514,10 @@ export default {
         this.$message.warning('该车未出厂,不允许签收')
         return
       }
-      if (row.arrivalAddress != null && row.receiptAddress != null) {
-        this.$message.warning('该车已有抵达签收实绩,不允许签收')
-        return
-      }
-      if(row.arrivalAddress){
-        this.location = row.arrivalAddress;
-      }else{
-        this.location = row.addressPlace;
+      if (row.arrivalAddress) {
+        this.location = row.arrivalAddress
+      } else {
+        this.location = row.addressPlace
       }
       this.orderNumber = row.orderNo
       this.capacityNumber = row.capacityNo
@@ -1371,8 +1528,8 @@ export default {
         this.$message.warning('请填写签收地址')
         return
       }
-      if (this.fileListArrival.length < 1) {
-        this.$message.warning('请上传抵达图片')
+      if (this.fileListArrival.length < 2) {
+        this.$message.warning('抵达图至少两张')
         return
       }
       if (this.fileListReceive.length < 3) {
@@ -1382,7 +1539,8 @@ export default {
       this.isLoading = true
       //上传抵达
       let formData = new window.FormData()
-      formData.append('file', this.fileListArrival[0].raw)
+      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 = {
@@ -1436,11 +1594,12 @@ export default {
       this.$message.warning('超出上传数量!')
     },
     handlePictureCardPreview(file) {
-      this.dialogImageUrl = file.url;
-      this.dialogVisible = true;
+      this.dialogImageUrl = file.url
+      this.dialogVisible = true
     },
     closeUpload() {
       this.arrivalReceiving = false
+      this.isLoading = false
       this.$refs.arrival.clearFiles()
       this.$refs.receive.clearFiles()
     },
@@ -1666,9 +1825,10 @@ export default {
         column.property == 'arrivalAddress' ||
         column.property == 'receiptAddress'
       ) {
-        return 'color : blue', 'height:30px'
+        return { color: 'blue', height: '30px' }
+      } else {
+        return { height: '30px' }
       }
-      return 'height:30px'
     },
     rowClick(row, column, event) {
       this.steelMap = {}
@@ -1732,11 +1892,13 @@ export default {
       console.log(row)
       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)
         }
       }
@@ -1782,13 +1944,19 @@ export default {
         .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + orderNo)
         .then(res => {
           this.srcList = []
-          this.src = res.data.data
+          this.srcList.push({
+            title: '车头照片',
+            src: res.data[0]
+          })
+          this.srcList.push({
+            title: '满货箱照片',
+            src: res.data[1]
+          })
           if (num == 1) {
             this.isShow3 = true
           } else {
             this.isShow = true
           }
-          this.srcList.push(res.data.data)
         })
     },
     //查看实时路径
@@ -2106,7 +2274,12 @@ export default {
         })
         .then(res => {
           if (res.data.code == '200') {
-            this.$message.success('修改成功')
+            this.$message({
+              type: 'success',
+              duration: 2000,
+              message: '修改电话号码成功',
+              offset: 250
+            })
             this.operation(this.steelMap)
             this.getSteelReport()
             loading.close()
@@ -2556,6 +2729,7 @@ export default {
       let remark = null
       let saler = null
       let easPrimaryId = null
+      let consigneeSsoId = null
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime)
         endTime = sjTime(this.endTime)
@@ -2566,6 +2740,10 @@ export default {
       if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
         saler = getCookie('loginName')
       }
+      if (getCookie('orgCode') == 'shouhuokehu') {
+        consigneeSsoId = getCookie('userId')
+        obj.consigneeSsoId = consigneeSsoId
+      }
       if (this.screen == '客户') {
         consigneeName = this.input
       } else if (this.screen == '承运商') {
@@ -2707,6 +2885,7 @@ export default {
             0,
             Math.floor(this.maxHeight / this.itemHeight) + 1
           )
+          console.log(this.visibleList)
           this.getSpanArr(this.visibleList)
           this.getTotalNum(this.tableData)
           loading.close()
@@ -2734,13 +2913,21 @@ export default {
     /deep/ .el-table__body {
       overflow-y: auto;
       position: absolute !important;
+      tr:hover > td {
+        background-color: #fff;
+      }
     }
+
     ::-webkit-scrollbar {
       // width: 20px;
       height: 20px;
       background-color: transparent;
     }
   }
+  .demo-image__preview {
+    // width: 100%;
+    // height: 100%;
+  }
   .dialog {
     .steelMapClass {
       .steelMapClass1 {
@@ -2838,6 +3025,19 @@ export default {
           margin-right: 10px;
         }
       }
+
+      .steelMapClass7 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass72 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
     }
     .table1 {
       margin-left: 20px;

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

@@ -412,10 +412,11 @@ export default {
               })
             })
             //处理打印字符串
-            this.stockString='万港库存:'+this.stockMap.stockTonnage+"吨:";
-            this.stockStringArr.forEach((item)=>{
-              this.stockString+=item.value;
-            });
+            this.stockString =
+              '万港库存:' + this.stockMap.stockTonnage + '吨:'
+            this.stockStringArr.forEach(item => {
+              this.stockString += item.value
+            })
           }
         })
     },
@@ -471,10 +472,11 @@ export default {
             })
           })
           //处理打印字符串
-          this.downStockString='下游港口库存:'+this.downStockMap.downStockTonnage+"吨:";
-          this.downStockStringArr.forEach((item)=>{
-            this.downStockString+=item.value;
-          });
+          this.downStockString =
+            '下游港口库存:' + this.downStockMap.downStockTonnage + '吨:'
+          this.downStockStringArr.forEach(item => {
+            this.downStockString += item.value
+          })
         }
       })
     },
@@ -511,7 +513,7 @@ export default {
             }
           })
           console.log(arr1, 'arr1')
-          let index = 1.1
+          let index = 3.1
           arr1.forEach(e => {
             this.runStockStringArr.push({
               class: 'type',
@@ -520,18 +522,21 @@ export default {
               }吨:`
             })
             index = index + 0.1
+            //按物资分
+            let temp = [];
             e.forEach(e1 => {
               this.runStockStringArr.push({
                 class: 'normal',
-                value: `${e1['materialName']}:${e1['gmTonnage']}吨;`
+                value: `${e1['materialName']}:/“${e1['resultForeignShipName']}”/${e1['gmTonnage']}吨;`
               })
             })
           })
           //处理打印字符串
-          this.runStockString='在途货物:'+this.runStockMap.runStockTonnage+"吨:";
-          this.runStockStringArr.forEach((item)=>{
-            this.runStockString+=item.value;
-          });
+          this.runStockString =
+            '在途货物:' + this.runStockMap.runStockTonnage + '吨:'
+          this.runStockStringArr.forEach(item => {
+            this.runStockString += item.value
+          })
         }
       })
     },
@@ -579,9 +584,31 @@ export default {
         one: spanOneArr
       }
     },
+    flitterData1(arr) {
+      var spanOneArr = []
+      let concatOne = 0
+      arr.forEach((item, index) => {
+        if (index === 0) {
+          spanOneArr.push(1)
+        } else {
+          // name 修改
+          if (item.materialType === arr[index - 1].materialType) {
+            // 第一列需合并相同内容的判断条件
+            spanOneArr[concatOne] += 1
+            spanOneArr.push(0)
+          } else {
+            spanOneArr.push(1)
+            concatOne = index
+          }
+        }
+      })
+      return {
+        one: spanOneArr
+      }
+    },
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (columnIndex === 0) {
-        const _row = this.flitterData(this.tableData).one[rowIndex]
+        const _row = this.flitterData1(this.tableData).one[rowIndex]
         const _col = _row > 0 ? 1 : 0
         return {
           rowspan: _row,