luobang 2 سال پیش
والد
کامیت
8173fa7b31
1فایلهای تغییر یافته به همراه110 افزوده شده و 83 حذف شده
  1. 110 83
      src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

+ 110 - 83
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -125,6 +125,16 @@
             <i class="el-icon-share"></i>批量</el-button
           >
         </el-form-item>
+        <el-form-item v-if="isShowOperateYeWuYuan">
+          <el-button type="primary" @click="exceptionHandle()">
+            <i class="el-icon-s-open"></i>
+            异常处理
+          </el-button>
+          <el-button type="primary" @click="mergeSplit()">
+            <i class="el-icon-pie-chart"></i>
+            合并或拆分
+          </el-button>
+        </el-form-item>
         <el-form-item v-if="isShowOperate">
           <el-dropdown>
             <el-button type="primary">
@@ -1170,71 +1180,71 @@
         </el-form>
       </div>
       <div class="steelMapClass22">
-          <span>收货地址:</span>
-          <el-select
-            v-model="steelMap.addressProvince"
-            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="steelMap.addressDistrict"
-            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="steelMap.addressTown"
-            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="steelMap.place"
-            :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="batchUpdateCarAddress"
-            v-if="!notRoutList.includes('addressClick')"
-            >提交</el-button
-          >
-        </div>
+        <span>收货地址:</span>
+        <el-select
+          v-model="steelMap.addressProvince"
+          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="steelMap.addressDistrict"
+          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="steelMap.addressTown"
+          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="steelMap.place"
+          :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="batchUpdateCarAddress"
+          v-if="!notRoutList.includes('addressClick')"
+          >提交</el-button
+        >
+      </div>
     </el-dialog>
     <div class="dialog">
       <el-dialog
@@ -1816,7 +1826,8 @@ export default {
       ],
       scrollUpdateSelectFlag: 0,
       scrollLeft: 0,
-      scrollLeftFlag: 0
+      scrollLeftFlag: 0,
+      isShowOperateYeWuYuan: false
     }
   },
   created() {
@@ -1863,6 +1874,9 @@ export default {
         })
       this.notRoutList = ['select']
     }
+    if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
+      this.isShowOperateYeWuYuan = true
+    }
     //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
     this.updateCapacityDebounce = this.debounce(() => {
       this.updateCapacity()
@@ -1974,7 +1988,7 @@ export default {
       this.scrollUpdateSelectFlag = 1
     })
     //基础数据查询
-    this.getAllProvince();
+    this.getAllProvince()
   },
   activated() {
     this.maxHeight =
@@ -2024,7 +2038,7 @@ export default {
           this.$message.error('请输入正确格式的车牌号!')
           return
         }
-        console.log("this.batchCapacityList",this.batchCapacityList);
+        console.log('this.batchCapacityList', this.batchCapacityList)
         this.batchCapacityList.forEach(row => {
           row.capacityId = this.capacityId
           row.capacityNumber = this.capacityNo
@@ -2032,8 +2046,8 @@ export default {
           row.isCheckGPS = this.isCheckGPS
           row.userId = getCookie('userId')
           if (row.carrierIds == 0) {
-              this.$message.error('请先授权承运商!')
-              return
+            this.$message.error('请先授权承运商!')
+            return
           }
           if (row.capacityIds != 0) {
             this.axios
@@ -2098,6 +2112,18 @@ export default {
     },
     mergeSplit() {
       //如果勾选了多条则执行合并操作,如果勾选了一条则执行拆分操作
+      if (
+        this.$refs.tableRef.selection.filter(e => {
+          return e.entryGateTime != null
+        }).length > 0
+      ) {
+        this.$message({
+          type: 'warning',
+          message: '该车已进厂不允许操作',
+          offset: '250',
+          duration: '2300'
+        })
+      }
       if (this.$refs.tableRef.selection.length == 1) {
         this.splitOrder()
       } else if (this.$refs.tableRef.selection.length > 1) {
@@ -2434,7 +2460,7 @@ export default {
     batchCarrier() {
       if (this.batchCarrierList.length > 0) {
         this.batchCarrierVisible = true
-        this.showBatchCapacity();
+        this.showBatchCapacity()
         this.onchangeProvince()
         this.onchangeCity()
         this.addressId = this.steelMap.shipperAddressId
@@ -2962,7 +2988,7 @@ export default {
     //点击操作弹出框
     operation(row) {
       // this.isRowClick = 0
-      this.isCheckGPS=true;
+      this.isCheckGPS = true
       if (Object.values(this.steelMap).length == 0) {
         this.$message.error('请点击需要执行更改操作的行!')
         return
@@ -3683,21 +3709,21 @@ export default {
         map.isNewCar = Number(1)
         map.shipperAddressId = this.addressId
         this.axios
-        .post('/api/v1/ams/updateCarAddress', map)
-        .then(res => {
-          if (res.data.code == '200') {
-            this.$message.success('修改收货地址成功!')
-          } else {
+          .post('/api/v1/ams/updateCarAddress', map)
+          .then(res => {
+            if (res.data.code == '200') {
+              this.$message.success('修改收货地址成功!')
+            } else {
+              this.$message.error('修改失败,请联系管理员!')
+            }
+          })
+          .catch(() => {
             this.$message.error('修改失败,请联系管理员!')
-          }
-        })
-        .catch(() => {
-          this.$message.error('修改失败,请联系管理员!')
-        })
+          })
       })
       this.getSteelReport()
       loading.close()
-      this.batchCarrierVisible=false;
+      this.batchCarrierVisible = false
     },
     //将序号确定下来
     // getNodeNum(data) {
@@ -4168,6 +4194,7 @@ export default {
 
     ::-webkit-scrollbar {
       height: 20px;
+      width: 10px;
       background-color: transparent;
     }
   }