Pārlūkot izejas kodu

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

zyf 2 gadi atpakaļ
vecāks
revīzija
2db6e350d7

+ 85 - 13
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -49,6 +49,20 @@
             v-if="activeName == 'first'"
           >
             <i class="upload2"></i>批量上传
+          </el-button>
+           <el-button
+            type="primary"
+            @click="batchDeleteFirst"
+            v-if="activeName == 'first'"
+          >
+            <i class="upload2"></i>批量删除
+          </el-button>
+           <el-button
+            type="primary"
+            @click="batchDeleteSecond"
+            v-if="activeName == 'second'"
+          >
+            <i class="upload2"></i>批量删除
           </el-button>
           <el-button
             type="primary"
@@ -134,7 +148,7 @@
                 <el-button
                   type="text"
                   size="small"
-                  @click="deleteclick(scope.row.saleOrderId)"
+                  @click="deleteclick(scope.row)"
                   >删除</el-button
                 >
                 <el-button
@@ -214,6 +228,7 @@
           <mergeRowTable
             v-bind.sync="option2"
             ref="table2"
+            @selection-change="selectionChange2"
             :pageSize="200"
             @func="func2"
           >
@@ -286,6 +301,7 @@ export default {
       option2: {
         // 表格请求数据的地址
         requestUrl: '',
+        selectionType: 'select',
         comparison: 'saleNumber',
         columnIndexs: [0, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
       },
@@ -343,6 +359,7 @@ export default {
       matSum1: null,
       matSum2: null,
       tableData: [],
+      secondList:[],
       saleDateOfReceipt: null,
       //销售订单主表数据
       saleOrderList: [
@@ -1092,7 +1109,13 @@ export default {
       console.log(selection)
       this.batchReportList = []
       this.batchReportList = selection
-      console.log(this.batchReportList)
+      console.log("firstList:",this.batchReportList)
+    },
+    selectionChange2(selection){
+      console.log(selection)
+      this.secondList = []
+      this.secondList = selection
+      console.log("secondList:",this.secondList)
     },
     refresh() {
       this.getRequestUrl()
@@ -1271,7 +1294,6 @@ export default {
     },
     //删除
     deleteclick(scope) {
-      let saleOrderId = scope
       this.$confirm('是否删除', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -1279,10 +1301,67 @@ export default {
         center: true
       })
         .then(() => {
-          this.axios
+         let rows=[];
+         rows.push(scope);
+         this.batchDelete(rows);
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '取消删除!'
+          })
+        })
+    },
+    batchDeleteFirst(){
+      let rows=this.batchReportList;
+      console.log("rows:",rows);
+      if(!rows || rows.length<=0){
+        this.$message.warning("请选中订单!");
+        return;
+      }
+      this.$confirm('是否删除', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+        center: true
+      })
+        .then(() => {
+         this.batchDelete(rows);
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '取消删除!'
+          })
+        })
+    },
+    batchDeleteSecond(){
+      let rows=this.secondList;
+      console.log("rows:",rows);
+      if(!rows || rows.length<=0){
+        this.$message.warning("请选中订单!");
+        return;
+      }
+      this.$confirm('是否删除', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+        center: true
+      })
+        .then(() => {
+         this.batchDelete(rows);
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '取消删除!'
+          })
+        })
+    },
+    batchDelete(rows){
+       this.axios
             .post(
-              '/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=' +
-                saleOrderId
+              '/api/v1/ams/deleteAmsSaleOrderBySaleOrderId',rows
             )
             .then(res => {
               if (res.data.code == '200') {
@@ -1293,13 +1372,6 @@ export default {
                 this.getRequestUrl()
               }
             })
-        })
-        .catch(() => {
-          this.$message({
-            type: 'info',
-            message: '取消删除!'
-          })
-        })
     }
   }
 }

+ 356 - 53
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -82,16 +82,26 @@
           </el-button>
         </el-form-item>
         <el-form-item v-if="isShowOperate">
-          <el-button type="primary" @click="checkTrans()"
+          <el-button
+            type="primary"
+            @click="checkTrans()"
+            v-if="!notRoutList.includes('checkTrans')"
             ><i class="el-icon-truck"></i>轨迹</el-button
           >
           <el-button type="primary" @click="operation()"
             ><i class="el-icon-edit"></i>更改</el-button
           >
-          <el-button type="primary" @click="checkPoint()"
+          <el-button
+            type="primary"
+            @click="checkPoint()"
+            v-if="!notRoutList.includes('checkPoint')"
             ><i class="el-icon-map-location"></i>实时路径</el-button
           >
         </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="openReceive()" >
+            <i class="el-icon-document"></i>签收抵达</el-button>
+        </el-form-item>
         <el-form-item>
           <span style="margin-left: 1rem;font-size:16px">车数/件数:</span>
           <span style="font-size:16px"
@@ -197,9 +207,10 @@
         <el-table-column
           prop="materialSpe"
           label="物资规格"
+          column-key="materialSpe"
           align="center"
           sortable
-          show-overflow-tooltip
+          :filters="filtermaterialSpe"
           width="120px"
         >
         </el-table-column>
@@ -215,14 +226,16 @@
           label="收货地址"
           width="250px"
           sortable
-          show-overflow-tooltip
+          column-key="addressPlace"
+          :filters="filteraddressPlace"
         >
         </el-table-column>
         <el-table-column
           prop="orderStatus"
+          column-key="orderStatus"
           label="运单状态"
           align="center"
-          show-overflow-tooltip
+          :filters="filterorderStatus"
         >
         </el-table-column>
         <el-table-column
@@ -435,6 +448,7 @@
                 placeholder="请选择"
                 @change="onchangeProvince"
                 style="width:120px"
+                :disabled="notRoutList.includes('province')"
               >
                 <el-option
                   v-for="item in provinceList"
@@ -449,6 +463,7 @@
                 placeholder="请选择"
                 @change="onchangeCity"
                 style="width:120px"
+                :disabled="notRoutList.includes('city')"
               >
                 <el-option
                   v-for="item in cityList"
@@ -463,6 +478,7 @@
                 placeholder="请选择"
                 @change="onchangeCounty"
                 style="width:120px"
+                :disabled="notRoutList.includes('country')"
               >
                 <el-option
                   v-for="item in countyList"
@@ -479,25 +495,36 @@
                 :trigger-on-focus="false"
                 @select="handleSelect1"
                 style="width:250px"
+                :disabled="notRoutList.includes('place')"
               >
               </el-autocomplete>
-              <el-button type="success" circle @click="addAddressClick"
+              <el-button
+                type="success"
+                circle
+                @click="addAddressClick"
+                v-if="!notRoutList.includes('addressClick')"
                 >提交</el-button
               >
             </div>
             <div
               class="steelMapClass23"
               v-if="
-                steelMap.carStatus == 4 ||
+                (steelMap.carStatus == 4 ||
                   steelMap.carStatus == 5 ||
-                  steelMap.carStatus == null
+                  steelMap.carStatus == null) &&
+                  !notRoutList.includes('closeOrder')
               "
             >
               <el-button type="danger" round @click="deleteEasEntryId"
                 >关闭运单</el-button
               >
             </div>
-            <div class="steelMapClass23" v-if="steelMap.carStatus == 7">
+            <div
+              class="steelMapClass23"
+              v-if="
+                steelMap.carStatus == 7 && !notRoutList.includes('closeOrder')
+              "
+            >
               <el-button type="danger" round @click="reverseCloseOrder"
                 >反关闭运单</el-button
               >
@@ -509,8 +536,13 @@
               <el-input
                 v-model="steelMap.consigneeTel"
                 style="width:150px"
+                :disabled="notRoutList.includes('consigeeTel')"
               ></el-input>
-              <el-button type="success" circle @click="updateconsigneeTel"
+              <el-button
+                type="success"
+                circle
+                @click="updateconsigneeTel"
+                v-if="!notRoutList.includes('consigeeTel')"
                 >提交</el-button
               >
             </div>
@@ -522,9 +554,14 @@
                 :fetch-suggestions="querySearchCarrier"
                 placeholder="请输入承运商"
                 @select="handleSelectCarrier"
+                :disabled="notRoutList.includes('carrierName')"
               >
               </el-autocomplete>
-              <el-button type="success" circle @click="updateTruckCarrier"
+              <el-button
+                type="success"
+                circle
+                @click="updateTruckCarrierDebounce"
+                v-if="!notRoutList.includes('carrierName')"
                 >提交</el-button
               >
             </div>
@@ -536,8 +573,21 @@
                 :fetch-suggestions="querySearch"
                 placeholder="请输入车牌号"
                 @select="handleSelect()"
+                :disabled="
+                  notRoutList.includes('capacityNo') &&
+                    steelMap.capacityId != null
+                "
               ></el-autocomplete>
-              <el-button type="success" circle @click="updateCapacity"
+              <el-button
+                type="success"
+                circle
+                @click="updateCapacityDebounce"
+                v-if="
+                  !(
+                    notRoutList.includes('capacityNo') &&
+                    steelMap.capacityId != null
+                  )
+                "
                 >提交</el-button
               >
             </div>
@@ -569,38 +619,17 @@
               <span>状态更新时间:</span>
               <span>{{ steelMap.orderStatusTime }}</span>
             </div>
-            <div class="steelMapClass44">
-              <el-button type="success" circle @click="continue1"
-                >继续装</el-button
-              >
-            </div>
           </div>
           <div class="steelMapClass5">
             <div class="steelMapClass52" v-if="steelMap.arrivalAddress != null">
               <span>抵达地址:</span>
               <span>{{ steelMap.arrivalAddress }}</span>
-              <span class="steelMapClass521"
-                ><el-button
-                  type="success"
-                  icon="el-icon-money"
-                  circle
-                  @click="toPhotoClick(steelMap.orderNo, 0)"
-                ></el-button
-              ></span>
             </div>
           </div>
           <div class="steelMapClass6">
             <div class="steelMapClass62" v-if="steelMap.receiptAddress != null">
               <span>签收地址:</span>
               <span>{{ steelMap.receiptAddress }}</span>
-              <span class="steelMapClass621"
-                ><el-button
-                  type="success"
-                  icon="el-icon-money"
-                  circle
-                  @click="receipctPhotoClick(steelMap.orderNo, 0)"
-                ></el-button
-              ></span>
             </div>
           </div>
         </div>
@@ -635,21 +664,27 @@
                   type="primary"
                   @click="scope.row.materialNum--"
                   style="height:40px"
+                  v-if="!notRoutList.includes('materialNum')"
                 >
                   -
                 </button>
                 <input
                   v-model="scope.row.materialNum"
                   style="width:40px;height: 40px;font-size:16px;line-height: 40px;text-align: center;"
+                  :disabled="notRoutList.includes('materialNum')"
                 />
                 <button
                   type="primary"
                   @click="scope.row.materialNum--"
                   style="height:40px"
+                  v-if="!notRoutList.includes('materialNum')"
                 >
-                  +
+                  -
                 </button>
-                <el-button type="primary" @click="updateBillOrder(scope.row)"
+                <el-button
+                  type="primary"
+                  @click="updateBillOrder(scope.row)"
+                  v-if="!notRoutList.includes('materialNum')"
                   >提交</el-button
                 >
               </template>
@@ -688,14 +723,20 @@
                   type="text"
                   size="small"
                   @click="closeEasEntryId(scope.row)"
-                  v-if="scope.row.deletedStatus == null"
+                  v-if="
+                    scope.row.deletedStatus == null &&
+                      !notRoutList.includes('closeEntry')
+                  "
                   >关闭分录</el-button
                 >
                 <el-button
                   type="text"
                   size="small"
                   @click="adverseCloseSaleMaterial(scope.row)"
-                  v-if="scope.row.deletedStatus != null"
+                  v-if="
+                    scope.row.deletedStatus != null &&
+                      !notRoutList.includes('closeEntry')
+                  "
                   >反关闭分录</el-button
                 >
               </template>
@@ -770,6 +811,49 @@
         ><currentLocation :carNumber="carNumber"></currentLocation
       ></vxe-modal>
     </div>
+    <el-dialog title="抵达签收" :visible.sync="arrivalReceiving" :before-close="closeUpload">
+      <el-form :inline="true" style="margin-left:20%">
+        <el-form-item label="车牌号码">
+          <el-input v-model="capacityNumber" disabled style="width:300px"></el-input>
+        </el-form-item>
+        <el-form-item label="签收地址">
+          <el-input v-model="location" style="width:300px"></el-input>
+        </el-form-item>
+        <el-form-item label="抵达图片(满货箱)">
+          <el-upload
+            ref="arrival"
+            list-type="picture-card"
+            action="/api/v1/otms/addtmstruckArrivalResult"
+            :limit="1"
+            :on-change="fileChange1"
+            :on-exceed="exceed"
+            accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
+            :auto-upload="false">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+          <el-dialog :visible.sync="dialogVisible1">
+            <img width="100%" :src="dialogImageUrl" alt="">
+          </el-dialog>
+        </el-form-item>
+        <el-form-item label="签收图片(空货箱、质保书、签收单)">
+           <el-upload
+            ref="receive"
+            list-type="picture-card"
+            action="null"
+            :limit="5"
+            :on-change="fileChange2"
+            :on-exceed="exceed"
+            accept=".jpg,.jpeg,.png,.gif,.bmp,.pdf,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
+            :auto-upload="false">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+          <el-dialog :visible.sync="dialogVisible2">
+            <img width="100%" :src="dialogImageUrl" alt="">
+          </el-dialog>
+        </el-form-item>
+      </el-form>
+      <el-button type="primary" @click="arrivalAndReceive" :loading="isLoading" style="margin-left:40%">确定</el-button>
+    </el-dialog>
   </div>
 </template>
 
@@ -846,6 +930,7 @@ export default {
       pos: 0,
       //需要合并列的名称
       mergeList: [
+        '选择',
         '序号',
         '整车操作',
         '销售订单状态',
@@ -939,7 +1024,8 @@ export default {
         'dagangadmin',
         'shichangxinxibu',
         'xiaoshouyewuyuan',
-        'zidonghuabu'
+        'zidonghuabu',
+        'chengyunshang'
       ],
       isShowOperate: false,
       filterConsigneeList: [],
@@ -947,13 +1033,52 @@ export default {
       filterCapacityList: [],
       filtermaterialNameList: [],
       filterSaleAreaList: [],
-      filterMap: {}
+      filterorderStatus: [],
+      filteraddressPlace: [],
+      filtermaterialSpe: [],
+      filterMap: {},
+      //权限控制
+      notRoutList: [],
+      location:null,
+      orderNumber:null,
+      capacityNumber:null,
+      arrivalReceiving:false,
+      fileListArrival:[],
+      fileListReceive:[],
+      dialogImageUrl: '',
+      dialogVisible1: false,
+      dialogVisible2: false,
+      isLoading:false
     }
   },
   created() {
     if (this.orgCodeList.includes(getCookie('orgCode'))) {
       this.isShowOperate = true
     }
+    if (getCookie('orgCode') == 'chengyunshang') {
+      this.notRoutList = [
+        'checkPoint',
+        'checkTrans',
+        'carrierName',
+        'consigeeTel',
+        'province',
+        'city',
+        'country',
+        'place',
+        'addressClick',
+        'closeOrder',
+        'materialNum',
+        'closeEntry',
+        'capacityNo'
+      ]
+    }
+    //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
+    this.updateCapacityDebounce = this.debounce(() => {
+      this.updateCapacity()
+    }, 3000)
+    this.updateTruckCarrierDebounce = this.debounce(() => {
+      this.updateTruckCarrier()
+    }, 3000)
     this.getSteelReport()
   },
   watch: {
@@ -980,23 +1105,116 @@ export default {
   },
   computed: {},
   methods: {
-    //继续装
-    continue1(row) {
-      let map = {
-        orderId: this.steelMap.orderId
+    openReceive() {
+      if (Object.values(this.steelMap).length == 0) {
+        this.$message.warning('请选择需要补录的实绩')
+        return
       }
-      console.log(map)
-      this.axios.post('/api/v1/oms/updateContinueStaus', map).then(res => {
-        if (res.data.code == '200') {
-          this.$message.success('修改成功')
-        } else {
-          this.$message.error('修改失败')
+      let row = this.steelMap;
+      if(!row.outGateTime){
+        this.$message.warning('该车未出厂,不允许签收')
+        return
+      }
+      if (row.arrivalAddress != null && row.arrivalAddress!=null) {
+        this.$message.warning('该车已有抵达签收实绩,不允许签收')
+        return
+      }
+      this.location=row.addressPlace;
+      this.orderNumber=row.orderNo;
+      this.capacityNumber=row.capacityNo;
+      this.arrivalReceiving=true;
+    },
+    arrivalAndReceive(){
+      if(!this.location){
+        this.$message.warning('请填写签收地址');
+        return;
+      }
+      if(this.fileListArrival.length < 1){
+        this.$message.warning('请上传抵达图片');
+        return;
+      }
+      if(this.fileListReceive.length < 3){
+        this.$message.warning('签收图最少三张');
+        return;
+      }
+      this.isLoading=true;
+      //上传抵达
+      let formData = new window.FormData();
+      formData.append("file",this.fileListArrival[0].raw);
+      formData.append("orderNumber",this.orderNumber);
+      formData.append("resultArrivalAddress",this.location);
+      let options = {  // 设置axios的参数
+         url: '/api/v1/otms/addtmstruckArrivalResult',
+         data: formData,
+         method: 'post',
+         headers: { 
+          'Content-Type': 'multipart/form-data'
+         }
+      }
+      this.axios(options).then((res) => {
+        console.log("arrivalRes:",res);
+        //上传签收
+        let formData = new window.FormData();
+        let request=''
+        this.fileListReceive.forEach((item,index)=>{
+          formData.append("file"+index,item.raw);
+        })
+        formData.append("orderNumber",this.orderNumber);
+        formData.append("resultArrivalAddress",this.location);
+        formData.append("num",request.length);
+        let options = { 
+         url: '/api/v1/otms/addTmstruckReceiptResult',
+         data: formData,
+         method: 'post',
+         headers: { 
+          'Content-Type': 'multipart/form-data'
+         }
         }
+        this.axios(options).then((res) => {
+          console.log("receiveRes:",res);
+          if(res.data.data==4){
+            this.$message.error("新增抵达失败!");
+            this.isLoading=false;
+          }else{
+            this.$message.success("上传成功!");
+            this.closeUpload();
+            this.$router.go(0);
+          }
+        });
       })
-      this.getSteelReport()
     },
+    fileChange1(file, fileList){
+      this.fileListArrival=fileList;
+    },
+    fileChange2(file, fileList){
+      this.fileListReceive=fileList;
+    },
+    exceed(){
+      this.$message.warning("超出上传数量!");
+    },
+    closeUpload(){
+      this.arrivalReceiving=false;
+      this.$refs.arrival.clearFiles();
+      this.$refs.receive.clearFiles();
+    },
+    //防抖函数--防止用户重复点击
+    debounce(func, delay) {
+      let timer = null
+      return function(...args) {
+        if (timer !== null) {
+          clearTimeout(timer)
+        }
+        timer = setTimeout(function() {
+          func.apply(this, args)
+        }, delay)
+      }
+    },
+    // handleSelectionChange(selection) {
+    //   console.log(selection)
+    // },
     //筛选
     filterChange(obj) {
+      //承运商筛选,后续有待优化
       if (typeof obj.carrierList != 'undefined' && obj.carrierList.length > 0) {
         this.filterMap.carrierList = obj.carrierList
       }
@@ -1006,6 +1224,7 @@ export default {
       ) {
         delete this.filterMap.carrierList
       }
+      //物资名称筛选,后续有待优化
       if (
         typeof obj.materialNameList != 'undefined' &&
         obj.materialNameList.length > 0
@@ -1018,12 +1237,14 @@ export default {
       ) {
         delete this.filterMap.materialNameList
       }
+      //车牌号筛选,后续有待优化
       if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length > 0) {
         this.filterMap.capacityList = obj.capacityNo
       }
       if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length == 0) {
         delete this.filterMap.capacityList
       }
+      //客户筛选,后续有待优化
       if (
         typeof obj.consigneeName != 'undefined' &&
         obj.consigneeName.length > 0
@@ -1036,6 +1257,7 @@ export default {
       ) {
         delete this.filterMap.consigneeNameList
       }
+      //销售片区筛选,后续有待优化
       if (
         typeof obj.saleAreaList != 'undefined' &&
         obj.saleAreaList.length > 0
@@ -1048,20 +1270,56 @@ export default {
       ) {
         delete this.filterMap.saleAreaList
       }
+      //物资规格筛选
+      if (typeof obj.materialSpe != 'undefined' && obj.materialSpe.length > 0) {
+        this.filterMap.materialSpeList = obj.materialSpe
+      }
+      if (
+        typeof obj.materialSpe != 'undefined' &&
+        obj.materialSpe.length == 0
+      ) {
+        delete this.filterMap.materialSpeList
+      }
+      //收货地址筛选
+      if (
+        typeof obj.addressPlace != 'undefined' &&
+        obj.addressPlace.length > 0
+      ) {
+        this.filterMap.addressPlaceList = obj.addressPlace
+      }
+      if (
+        typeof obj.addressPlace != 'undefined' &&
+        obj.addressPlace.length == 0
+      ) {
+        delete this.filterMap.addressPlaceList
+      }
+      if (typeof obj.orderStatus != 'undefined' && obj.orderStatus.length > 0) {
+        this.filterMap.orderStatusList = obj.orderStatus
+      }
+      if (
+        typeof obj.orderStatus != 'undefined' &&
+        obj.orderStatus.length == 0
+      ) {
+        delete this.filterMap.orderStatusList
+      }
       // if (obj)
       this.onclick(this.filterMap)
     },
     //控制筛选数组变化
     filterListChange() {
+      //客户筛选数组
       let consigneeNameList = this.tableData.map(e => {
         return e.consigneeName
       })
+      //承运商筛选数组
       let carrierNameList = this.tableData.map(e => {
         return e.carrierName
       })
+      //车牌号筛选数组
       let capacityList = this.tableData.map(e => {
         return e.capacityNo
       })
+      //物资筛选数组
       let materialNameList = this.tableData
         .map(e => {
           return e.materialName
@@ -1069,6 +1327,7 @@ export default {
         .filter(e => {
           return e != null
         })
+      //销售片区筛选数组
       let saleAreaList = this.tableData
         .map(e => {
           return e.areaName
@@ -1076,11 +1335,35 @@ export default {
         .filter(e => {
           return e != null
         })
+      let addressPlaceList = this.tableData
+        .map(e => {
+          return e.addressPlace
+        })
+        .filter(e => {
+          return e != null
+        })
+      let orderStatusList = this.tableData
+        .map(e => {
+          return e.orderStatus
+        })
+        .filter(e => {
+          return e != null
+        })
+      let materialSpeList = this.tableData
+        .map(e => {
+          return e.materialSpe
+        })
+        .filter(e => {
+          return e != null
+        })
       this.filterConsigneeList = []
       this.filterCarrierList = []
       this.filterCapacityList = []
       this.filtermaterialNameList = []
       this.filterSaleAreaList = []
+      this.filterorderStatus = []
+      this.filteraddressPlace = []
+      this.filtermaterialSpe = []
       Array.from(new Set(consigneeNameList)).forEach(e => {
         let map = {}
         map.text = e
@@ -1111,6 +1394,24 @@ export default {
         map.value = e
         this.filterSaleAreaList.push(map)
       })
+      Array.from(new Set(addressPlaceList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filteraddressPlace.push(map)
+      })
+      Array.from(new Set(orderStatusList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filterorderStatus.push(map)
+      })
+      Array.from(new Set(materialSpeList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filtermaterialSpe.push(map)
+      })
     },
     cellStyle({ row, column, rowIndex, columnIndex }) {
       if (
@@ -1389,7 +1690,8 @@ export default {
       console.log(queryString)
       if (
         (queryString != null && queryString != '' && queryString.length > 3) ||
-        queryString == '取消'
+        queryString == '取消' ||
+        queryString == '待定'
       ) {
         this.axios
           .post('/api/v1/uc/getCapacityByLike?index=' + queryString)
@@ -1428,6 +1730,7 @@ export default {
       })
     },
     updateCapacity() {
+      console.log('我只想测')
       this.steelMap.capacityId = this.steelMap.newsCapacityId
       if (this.steelMap.newsCapacityId == null) {
         this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
@@ -1435,7 +1738,8 @@ export default {
       }
       if (
         !isVehicleNumber(this.steelMap.capacityNo) &&
-        this.steelMap.capacityNo != '取消'
+        (this.steelMap.capacityNo != '取消' ||
+          this.steelMap.capacityNo != '待定')
       ) {
         this.$message.error('请输入正确格式的车牌号!')
         return
@@ -1657,7 +1961,6 @@ export default {
     },
     //修改承运商授权
     updateTruckCarrier() {
-      console.log(this.steelMap)
       if (this.steelMap.newCarrierId == null) {
         this.$message.warning('请注册承运商或者选中弹出层之后再提交!')
         this.getSteelReport()

+ 22 - 34
src/views/statisticalReport/components/salesLogisticsStatistics/unloadingSteelReports.vue

@@ -308,21 +308,11 @@
 </template>
 
 <script>
-import { sjTime, isVehicleNumber } from '@/utils/sharedJsFile'
+import { sjTime } from '@/utils/sharedJsFile'
 import { getCookie } from '@/utils/util.js'
 export default {
   data() {
     return {
-      carNumber: '',
-      //弹出框
-      centerDialogVisible: false,
-      //根据车序号查询的值
-      steelMap: {},
-      //钢材子表数据
-      steelList: [],
-      drawer: false,
-      isShow3: false,
-      isShow4: false,
       input: null,
       screen: '',
       screen1: '',
@@ -358,15 +348,11 @@ export default {
           lable: '车牌号'
         }
       ],
-      startTime: null,
-      endTime: null,
       //合计净重
       totalNumber: 0,
       //合计车数
       totalCapacity: 0,
       tableTitle: '销售统计报表',
-      capacityList: [],
-      carrierList: [],
       tableData: [],
       //筛选条件1(客户)
       filters1: [],
@@ -404,20 +390,7 @@ export default {
       ],
       //钢材多拼车辆线路ID
       //索引从1-10为1-10拼路线ID
-      lineSpelling: [
-        0,
-        110001,
-        110002,
-        110003,
-        110004,
-        110005,
-        110006,
-        110007,
-        110008,
-        110009,
-        110010
-      ],
-      tableTitle: '销售钢材统计报表',
+      tableTitle: '销售钢材未装货统计报表',
       //所有省
       provinceList: [],
       //选中的省
@@ -452,7 +425,6 @@ export default {
         'xiaoshouyewuyuan',
         'zidonghuabu'
       ],
-      isShowOperate: false,
       filterConsigneeList: [],
       filterCarrierList: [],
       filterCapacityList: [],
@@ -486,7 +458,9 @@ export default {
         'steelMeters',
         'isPoundSale'
       ],
-      saleDateOfReceipt: null
+      saleDateOfReceipt: null,
+      remarkDateNew: null,
+      remarkDateOld: null
     }
   },
   created() {
@@ -503,6 +477,8 @@ export default {
     } else {
       this.saleDateOfReceipt = loadTime1
     }
+    this.remarkDateNew = this.getRemarkDate()
+    this.remarkDateOld = this.getRemarkDateOld()
     this.getSteelReport()
   },
   watch: {
@@ -574,6 +550,9 @@ export default {
       }
     },
     addSaleOrder() {
+      //
+      let remark = '10.20钢材成都组'
+      console.log(remark.split(this.getRemarkDateOld)[0])
       const loading = this.$loading({
         lock: true,
         text: '正在快马加鞭为您生成上传销售订单,请稍候',
@@ -583,14 +562,14 @@ export default {
       let closeEntryList = []
       this.$refs.tableRef.selection.forEach(e => {
         let map = {}
-        e.saleRemark = `${this.getRemarkDate()}${e.areaName},直发${
-          e.addressDistrict
-        }`
+        e.saleRemark = this.remarkDateNew + e.saleRemark.split[1]
         map.saleMaterialId = e.saleMaterialId
         map.closeEntryId = e.closeEntryId
         map.number = e.saleOrderNo
         closeEntryList.push(map)
       })
+      console.log(this.$refs.tableRef.selection)
+      return
       const map1 = this.$refs.tableRef.selection.reduce((result, item) => {
         result[item.saleOrderNo] = result[item.saleOrderNo] || []
         result[item.saleOrderNo].push(item)
@@ -673,6 +652,15 @@ export default {
       }
       return `${month}.${day}`
     },
+    getRemarkDateOld() {
+      let day = new Date().getDate()
+      let month = new Date().getMonth() + 1
+      console.log(day)
+      if (day < 10) {
+        day = '0' + day
+      }
+      return `${month}.${day - 1}`
+    },
     //继续装
     //筛选
     filterChange(obj) {