luobang 2 tahun lalu
induk
melakukan
0a6db9d067

+ 1 - 1
build/utils.js

@@ -16,8 +16,8 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
+let devModules = ['index', 'statisticalReport', 'appoint']
 // let devModules = ['all']
-let devModules = ['all']
 
 // let devModules = ['index', 'ADMINISTRATORS']
 

+ 2 - 2
config/index.js

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

+ 16 - 0
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -1058,6 +1058,21 @@ export default {
     }
   },
   methods: {
+    getSaleDateOfReceipt() {
+      let loadTime1 = new Date(
+        new Date(new Date().toLocaleDateString()).getTime() +
+          (3600 * 1000 * 8 - 1)
+      ) // 当天8点前
+      let loadTime2 = new Date(
+        new Date(new Date().toLocaleDateString()).getTime() +
+          (3600 * 1000 * 32 - 1)
+      ) // 次天8点前
+      if (new Date().getTime() - loadTime1 > 0) {
+        this.saleDateOfReceipt = loadTime2
+      } else {
+        this.saleDateOfReceipt = loadTime1
+      }
+    },
     getRmsReceivingCompany() {
       this.axios.post('/api/v1/rmsReceivingCompany/map').then(res => {
         console.log(res.data)
@@ -2117,6 +2132,7 @@ export default {
     },
     //发送请求
     async sendRequest() {
+      this.getSaleDateOfReceipt()
       this.orderMakeSure = false
       //是否还有件数未填写
       var orderPlanWeightAllFill = 0

+ 16 - 0
src/views/appoint/components/saleContract/editSaleOrder.vue

@@ -958,6 +958,21 @@ export default {
     this.getAllSaleMessages()
   },
   methods: {
+    getSaleDateOfReceipt() {
+      let loadTime1 = new Date(
+        new Date(new Date().toLocaleDateString()).getTime() +
+          (3600 * 1000 * 8 - 1)
+      ) // 当天8点前
+      let loadTime2 = new Date(
+        new Date(new Date().toLocaleDateString()).getTime() +
+          (3600 * 1000 * 32 - 1)
+      ) // 次天8点前
+      if (new Date().getTime() - loadTime1 > 0) {
+        this.saleDateOfReceipt = loadTime2
+      } else {
+        this.saleDateOfReceipt = loadTime1
+      }
+    },
     getRmsReceivingCompany() {
       this.axios.post('/api/v1/rmsReceivingCompany/map').then(res => {
         console.log(res.data)
@@ -2002,6 +2017,7 @@ export default {
     },
     //发送请求
     async sendRequest() {
+      this.getSaleDateOfReceipt()
       //根据规格型号与物资名称获取对应的物资ID||确认规格型号格式是否正确
       //先把暂存区的数据清空
       this.temporarylist = []

+ 16 - 0
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -523,6 +523,21 @@ export default {
     }
   },
   methods: {
+    getSaleDateOfReceipt() {
+      let loadTime1 = new Date(
+        new Date(new Date().toLocaleDateString()).getTime() +
+          (3600 * 1000 * 8 - 1)
+      ) // 当天8点前
+      let loadTime2 = new Date(
+        new Date(new Date().toLocaleDateString()).getTime() +
+          (3600 * 1000 * 32 - 1)
+      ) // 次天8点前
+      if (new Date().getTime() - loadTime1 > 0) {
+        this.saleDateOfReceipt = loadTime2
+      } else {
+        this.saleDateOfReceipt = loadTime1
+      }
+    },
     //获取收款客户名称
     getRmsReceivingCompany() {
       this.axios.post('/api/v1/rmsReceivingCompany/name').then(res => {
@@ -737,6 +752,7 @@ export default {
       }
     },
     addExcelInport() {
+      this.getSaleDateOfReceipt()
       //加载虚拟
       const loading = this.$loading({
         lock: true,

+ 49 - 446
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -124,15 +124,6 @@
             <i class="el-icon-share"></i>批量授权</el-button
           >
         </el-form-item>
-        <!-- <el-form-item v-if="isShowOperate">
-          <el-button
-            type="primary"
-            @click="getMakeDate()"
-            v-if="!notRoutList.includes('batchCarrier')"
-          >
-            <i class="el-icon-finished"></i>获取制单日期</el-button
-          >
-        </el-form-item> -->
         <el-form-item v-if="isShowOperate">
           <el-button
             type="primary"
@@ -183,7 +174,7 @@
         individual-panel
         @resetTable="reset"
         @selection-change="handleSelectionChange()"
-        >
+      >
         <el-table-column
           type="selection"
           width="50"
@@ -1038,124 +1029,6 @@
         </div>
       </el-dialog>
     </div>
-    <!-- <div class="dialog">
-      <el-dialog
-        title="运单详情"
-        :visible.sync="centerDialogVisibleBatch"
-        width="90%"
-        center
-      >
-        <div class="steelMapClass">
-          <div class="steelMapClass2">
-            <div class="steelMapClass22">
-              <span>收货地址:</span>
-              <el-select
-                v-model="batchAddressProvince"
-                filterable
-                placeholder="请选择"
-                @change="onchangeProvince"
-                style="width:120px"
-                :disabled="notRoutList.includes('province')"
-              >
-                <el-option
-                  v-for="item in provinceList"
-                  :key="item.id"
-                  :label="item.addressProvince"
-                  :value="item.id"
-                ></el-option>
-              </el-select>
-              <el-select
-                v-model="batchAddressDistrict"
-                filterable
-                placeholder="请选择"
-                @change="onchangeCity"
-                style="width:120px"
-                :disabled="notRoutList.includes('city')"
-              >
-                <el-option
-                  v-for="item in cityList"
-                  :key="item.id"
-                  :label="item.addressDistrict"
-                  :value="item.id"
-                ></el-option>
-              </el-select>
-              <el-select
-                v-model="batchAddressTown"
-                filterable
-                placeholder="请选择"
-                @change="onchangeCounty"
-                style="width:120px"
-                :disabled="notRoutList.includes('country')"
-              >
-                <el-option
-                  v-for="item in countyList"
-                  :key="item.id"
-                  :label="item.addressTown"
-                  :value="item.id"
-                ></el-option>
-              </el-select>
-              <el-autocomplete
-                class="inline-input"
-                v-model="batchPlace"
-                :fetch-suggestions="querySearch1"
-                placeholder="请输入具体收货地址"
-                :trigger-on-focus="false"
-                @select="handleSelect1"
-                style="width:250px"
-                :disabled="notRoutList.includes('place')"
-              >
-              </el-autocomplete>
-              <el-button
-                type="success"
-                circle
-                @click="batchAddressClick"
-                v-if="!notRoutList.includes('addressClick')"
-                >提交</el-button
-              >
-            </div>
-          </div>
-          <div class="steelMapClass3">
-            <div class="steelMapClass32">
-              <span>收货客户电话:</span>
-              <el-input
-                v-model="steelMap.consigneeTel"
-                style="width:150px"
-                :disabled="notRoutList.includes('consigeeTel')"
-              ></el-input>
-              <el-button
-                type="success"
-                circle
-                @click="updateconsigneeTel"
-                v-if="!notRoutList.includes('consigeeTel')"
-                >提交</el-button
-              >
-            </div>
-            <div class="steelMapClass33">
-              <span>承运商:</span>
-              <el-autocomplete
-                style="width:120px"
-                v-model="steelMap.carrierName"
-                :fetch-suggestions="querySearchCarrier"
-                placeholder="请输入承运商"
-                @select="handleSelectCarrier"
-                :disabled="notRoutList.includes('carrierName')"
-              >
-              </el-autocomplete>
-              <el-button
-                type="success"
-                circle
-                @click="updateTruckCarrierDebounce"
-                v-if="!notRoutList.includes('carrierName')"
-                >提交</el-button
-              >
-            </div>
-          </div>
-        </div>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="centerDialogVisibleBatch = false">返 回</el-button>
-        </span>
-      </el-dialog>
-    </div> -->
     <div style="height: 100%">
       <vxe-modal
         width="1237"
@@ -1181,50 +1054,6 @@
         ><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"
@@ -1547,16 +1376,9 @@ export default {
       exceptionHandleVisible: false,
       batchCarrierName: null,
       batchCarrierVisible: false,
-      batchAddressProvince: '',
-      batchAddressDistrict: '',
-      batchAddressTown: '',
-      batchPlace: '',
-      centerDialogVisibleBatch: false,
-      reallyList: [],
       visibleList: [],
       itemHeight: 30,
       scrollTop: 0,
-      totalHeight: 0,
       debounceS: false,
       carNumber: '',
       //弹出框
@@ -1564,7 +1386,6 @@ export default {
       //根据车序号查询的值
       steelMap: {},
       //钢材子表数据
-      steelList: [],
       drawer: false,
       isShow3: false,
       isShow4: false,
@@ -1671,8 +1492,6 @@ export default {
       capacityList: [],
       carrierList: [],
       tableData: [],
-      //筛选条件1(客户)
-      filters1: [],
       spanArr: [],
       pos: 0,
       //需要合并列的名称
@@ -1743,11 +1562,7 @@ export default {
       //地址输入框的值
       addresText: '',
       //已选中省市县
-      address: null,
       //具体地址
-      place: null,
-      //暂存具体地址
-      place1: null,
       //省市县Id
       addressId: null,
       addressRow: {},
@@ -1755,7 +1570,6 @@ export default {
       src: '',
       isShow: false,
       srcList2: [],
-      src2: '',
       isShow2: false,
       input1: '',
       maxHeight: 700,
@@ -1803,11 +1617,6 @@ export default {
       dialogImageUrl: '',
       dialogVisible: false,
       isLoading: false,
-      batchList: [],
-      Address: {
-        requestUrl: '',
-        selectionType: 'radio'
-      },
       dialogFormVisible: false,
       addresText: null,
       originalPriceValue: null,
@@ -1861,21 +1670,7 @@ export default {
         '订单变更时间',
         '销售订单变更记录',
         '运输订单变更记录'
-      ],
-      ops: {
-        vuescroll: {},
-        scrollPanel: {},
-        rail: {
-          keepShow: true
-        },
-        bar: {
-          hoverStyle: true,
-          onlyShowBarOnScroll: false, //是否只有滚动的时候才显示滚动条
-          background: '#5f9ea0', //滚动条颜色
-          opacity: 0.8, //滚动条透明度
-          'overflow-x': 'hidden'
-        }
-      }
+      ]
     }
   },
   created() {
@@ -1906,7 +1701,7 @@ export default {
       ]
       this.noticeInterval = setInterval(() => {
         this.getinformation()
-      }, 1000 * 10)
+      }, 1000 * 180)
     }
     if (getCookie('orgCode') == 'shouhuokehu') {
       //如果是收货客户,则查询
@@ -1917,7 +1712,6 @@ export default {
         })
         .then(res => {
           this.columnNoRoutList = res.data
-          console.log(res)
         })
       this.notRoutList = ['select']
     }
@@ -1953,32 +1747,30 @@ export default {
       handler(val) {
         this.$nextTick(() => {
           //   debugger
-          if (val >= 0 && this.tableData.length > this.visibleList.length) {
-            if (
-              val >=
-              this.tableData.length * 30 -
-                document.querySelector('.el-table__body-wrapper').offsetHeight -
-                20
-            ) {
-              val =
-                this.tableData.length * 30 -
-                document.querySelector('.el-table__body-wrapper').offsetHeight
-            }
-            if (val <= 0) {
-              val = 0
-            }
-            const start = Math.floor(val / this.itemHeight)
-            this.visibleList = this.tableData.slice(
-              start,
-              start + Math.floor(this.maxHeight / this.itemHeight) + 1
-            )
-            this.getSpanArr(this.visibleList)
-            document.querySelector(
-              '.el-table__body-wrapper .el-table__body'
-            ).style.transform = `translateY(${val}px)`
 
-            this.debounceS = false
+          if (
+            val >=
+            this.tableData.length * 30 -
+              document.querySelector('.el-table__body-wrapper').offsetHeight -
+              20
+          ) {
+            val =
+              this.tableData.length * 30 -
+              document.querySelector('.el-table__body-wrapper').offsetHeight
           }
+          if (val <= 0) {
+            val = 0
+          }
+          const start = Math.floor(val / this.itemHeight)
+          this.visibleList = this.tableData.slice(
+            start,
+            start + Math.floor(this.maxHeight / this.itemHeight) + 1
+          )
+          this.getSpanArr(this.visibleList)
+          document.querySelector(
+            '.el-table__body-wrapper .el-table__body'
+          ).style.transform = `translateY(${val}px)`
+          this.debounceS = false
         })
       }
     }
@@ -2341,33 +2133,6 @@ export default {
         })
       }
     },
-    getMakeDate() {
-      if (this.$refs.tableRef.selection.length > 0) {
-        let easPrimaryList = []
-        easPrimaryList = this.$refs.tableRef.selection.map(e => {
-          return e.closeEntryId
-        })
-        this.axios
-          .post(
-            '/api/v1/ams/getMakeOrderDate',
-            {
-              easPrimaryList: easPrimaryList
-            },
-            { timeout: 3 * 60 * 1000 }
-          )
-          .then(res => {
-            if (res.data.code == '200') {
-              this.$message({
-                message: '获取成功',
-                type: 'success',
-                duration: '2500',
-                offset: '250'
-              })
-              this.getSteelReport()
-            }
-          })
-      }
-    },
     batchCarrierMakeSure() {
       console.log(this.batchCarrierName)
       let batchCarrierId = null
@@ -2439,131 +2204,6 @@ export default {
       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('我滚动了')
-    },
-    // batchAddressClick() {
-    //   const loading = this.$loading({
-    //     lock: true,
-    //     text: '正在修改收货地址',
-    //     spinner: 'el-icon-loading',
-    //     background: 'rgba(0, 0, 0, 0.7)'
-    //   })
-    //   this.batchList.forEach(e => {
-    //     e.addressProvince = this.batchAddressProvince
-    //     e.addressDistrict = this.batchAddressDistrict
-    //     e.place = this.batchPlace
-    //     e.isCloseEas = Number(1)
-    //     e.isNewCar = Number(1)
-    //     e.shipperAddressId = this.addressId
-    //     this.axios
-    //       .post('/api/v1/ams/updateCarAddress', e)
-    //       .then(res => {
-    //         if (res.data.code == '200') {
-    //           this.$message.success('修改收货地址成功!')
-    //           this.getSteelReport()
-    //         } else {
-    //           this.$message.error('修改失败,请联系管理员!')
-    //           this.getSteelReport()
-    //         }
-    //       })
-    //       .catch(() => {
-    //         this.$message.error('修改失败,请联系管理员!')
-    //         this.getSteelReport()
-    //       })
-    //   })
-    // },
-    // batchoperation() {
-    //   if (this.batchList.length > 0) {
-    //     console.log(this.batchList)
-    //     this.getAllProvince()
-    //     this.onchangeProvince()
-    //     this.onchangeCity()
-    //     this.centerDialogVisibleBatch = true
-    //   } else {
-    //     this.$message({
-    //       type: 'info',
-    //       offset: '250',
-    //       message: '请先选择'
-    //     })
-    //   }
-    // },
     openReceive() {
       if (Object.values(this.steelMap).length == 0) {
         this.$message.warning('请选择需要补录的实绩')
@@ -2701,10 +2341,6 @@ export default {
         }, delay)
       }
     },
-    // handleSelectionChange(selection) {
-    //   this.batchList = selection
-    //   console.log(selection)
-    // },
     //筛选
     filterChange(obj) {
       //承运商筛选,后续有待优化
@@ -3024,7 +2660,6 @@ export default {
         })
     },
     cellClik(row, column, cell, event) {
-      console.log(row)
       if (column.property == 'arrivalAddress') {
         if (row.orderNo && row.arrivalAddress) {
           this.downloadCapacityNo = row.capacityNo
@@ -3762,21 +3397,21 @@ export default {
     },
     //将序号确定下来
     getNodeNum(data) {
-      for (var i = 0; i < data.length; i++) {
-        if (i === 0) {
-          data[i].group = i
-          data[i].rowKey = i
-        } else {
-          // 判断当前元素与上一个元素是否相同
-          if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
-            data[i].group = data[i - 1].group
-            data[i].rowKey = i
-          } else {
-            data[i].group = data[i - 1].group + 1
-            data[i].rowKey = i
-          }
-        }
-      }
+      // for (var i = 0; i < data.length; i++) {
+      //   if (i === 0) {
+      //     data[i].group = i
+      //     data[i].rowKey = i
+      //   } else {
+      //     // 判断当前元素与上一个元素是否相同
+      //     if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
+      //       data[i].group = data[i - 1].group
+      //       data[i].rowKey = i
+      //     } else {
+      //       data[i].group = data[i - 1].group + 1
+      //       data[i].rowKey = i
+      //     }
+      //   }
+      // }
     },
     //记录每一行的合并数
     getSpanArr(data) {
@@ -3999,21 +3634,18 @@ export default {
             saler +
             '&easPrimaryId=' +
             easPrimaryId,
-          obj
+          obj,
+          { timeout: 5000000 }
         )
         .then(res => {
           this.tableData = res.data.data
           this.getNodeNum(this.tableData)
-          this.totalHeight += this.itemHeight
-          this.totalHeight += this.itemHeight
           this.visibleList = []
           this.maxHeight = window.innerHeight - 130
           this.visibleList = this.tableData.slice(
             0,
             Math.floor(this.maxHeight / this.itemHeight) + 1
           )
-          loading.close()
-          console.log(this.visibleList, 'this.visibleList')
           this.getSpanArr(this.visibleList)
           this.getTotalNum(this.tableData)
           this.maxHeight = window.innerHeight - 130
@@ -4103,7 +3735,8 @@ export default {
             carrierName +
             '&capacityNo=' +
             capacityNo,
-          this.filterMap
+          this.filterMap,
+          { timeout: 600000 }
         )
         .then(res => {
           this.tableData = res.data.data
@@ -4115,28 +3748,13 @@ export default {
               return e != '净重'
             })
           }
-          this.totalHeight += this.itemHeight
-          // this.visibleList = []
+          this.visibleList = []
           this.maxHeight = window.innerHeight - 130
           this.getNodeNum(this.tableData)
-          if (
-            this.visibleList.length != 0 &&
-            this.visibleList.length < this.tableData.length
-          ) {
-            let visSaleIds = this.visibleList.map(e => {
-              return e.saleOrderMaterialId
-            })
-            this.visibleList = this.tableData.filter(e => {
-              if (visSaleIds.indexOf(e.saleOrderMaterialId) != -1) {
-                return e
-              }
-            })
-          } else {
-            this.visibleList = this.tableData.slice(
-              0,
-              Math.floor(this.maxHeight / this.itemHeight) + 1
-            )
-          }
+          this.visibleList = this.tableData.slice(
+            0,
+            Math.floor(this.maxHeight / this.itemHeight) + 1
+          )
           this.getSpanArr(this.visibleList)
           this.getTotalNum(this.tableData)
           loading.close()
@@ -4303,20 +3921,5 @@ export default {
       }
     }
   }
-  .address {
-    .button-box {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-    }
-  }
 }
 </style>
-<!-- <style lang="scss">
-.el-table__body-wrapper {
-  overflow-y: auto;
-  .el-table__body {
-    position: absolute;
-  }
-}
-</style> -->