瀏覽代碼

新增批量修改电话

liyg 2 年之前
父節點
當前提交
ecc5bf90d1
共有 1 個文件被更改,包括 55 次插入0 次删除
  1. 55 0
      src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

+ 55 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -1245,6 +1245,24 @@
           >提交</el-button
           >提交</el-button
         >
         >
       </div>
       </div>
+      <div class="batchCapacityClass" style="margin:30px">
+        <el-form :inline="true">
+          <el-form-item>
+             <span>批量修改收货客户电话:</span>
+              <el-input
+                v-model="consigneeTel"
+                style="width:150px"
+                :disabled="notRoutList.includes('consigeeTel')"
+              ></el-input>
+              <el-button
+                type="success"
+                circle
+                @click="batchUpdateconsigneeTel"
+                v-if="!notRoutList.includes('consigeeTel')"
+                >提交</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
     </el-dialog>
     </el-dialog>
     <div class="dialog">
     <div class="dialog">
       <el-dialog
       <el-dialog
@@ -1502,6 +1520,7 @@ export default {
       toggleRowIds: [],
       toggleRowIds: [],
       capacityNo: null,
       capacityNo: null,
       capacityId: null,
       capacityId: null,
+      consigneeTel:null,
       batchCapacityList: [],
       batchCapacityList: [],
       batchCapacityVisible: false,
       batchCapacityVisible: false,
       isShowSaleLog: false,
       isShowSaleLog: false,
@@ -2464,6 +2483,7 @@ export default {
         this.onchangeProvince()
         this.onchangeProvince()
         this.onchangeCity()
         this.onchangeCity()
         this.addressId = this.steelMap.shipperAddressId
         this.addressId = this.steelMap.shipperAddressId
+        this.consigneeTel = this.steelMap.consigneeTel
       } else {
       } else {
         this.$message({
         this.$message({
           type: 'warning',
           type: 'warning',
@@ -3472,6 +3492,41 @@ export default {
           loading.close()
           loading.close()
         })
         })
     },
     },
+    //批量修改收货客户电话
+    batchUpdateconsigneeTel() {
+      const loading = this.$loading({
+        lock: true,
+        text: '修改电话号码中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      if (!this.consigneeTel) {
+        this.$message.error('电话号码不能为空')
+        loading.close()
+        return
+      }
+      this.batchCapacityList.forEach(row => {
+        this.axios
+        .post('/api/v1/ams/updateConsigneeTel', {
+          saleOrderNo: row.saleOrderNo,
+          saleOrderMaterialId: row.saleOrderMaterialId,
+          consigneeTel: this.consigneeTel
+        })
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message.success('修改成功')
+          } else {
+            this.$message.error('修改失败')
+          }
+        })
+        .catch(() => {
+          this.$message.error('修改失败')
+        })
+      })
+      this.getSteelReport()
+      loading.close()
+      this.batchCarrierVisible = false
+    },
     //关闭车辆金蝶分录
     //关闭车辆金蝶分录
     deleteEasEntryId() {
     deleteEasEntryId() {
       this.$confirm('确定关闭该车金蝶分录吗?', '提示', {
       this.$confirm('确定关闭该车金蝶分录吗?', '提示', {