zhongtianhaoyuan 1 éve
szülő
commit
f470b897d3

+ 8 - 0
src/api/cargoOwnerManagement.js

@@ -23,6 +23,14 @@ export function postNews(data) {
      data: data,
   })
 }
+// 货主批量消息发送
+export function batchPostNews(data) {
+  return request({
+    url: '/newsInfo/api/batchSendNews',
+    method: 'post',
+     data: data,
+  })
+}
 // 货主任务列表
 export function getListLook(data) {
   return request({

+ 8 - 0
src/api/driverManagement.js

@@ -23,6 +23,14 @@ export function postNews(data) {
      data: data,
   })
 }
+// 司机批量消息发送
+export function batchPostNews(data) {
+  return request({
+    url: '/newsInfo/api/batchSendNews',
+    method: 'post',
+     data: data,
+  })
+}
 // 车辆审核列表
 export function getCarList(data) {
   return request({

+ 174 - 129
src/views/cargoOwnerManagement/empowerExamine.vue

@@ -5,7 +5,7 @@
       <div class="top_css">
         <el-row>
           <el-col :span="14" style="height: 45px">
-            <!-- <el-button type="primary">添加</el-button> -->
+            <el-button type="primary" @click="sendInfoClick">批量发送消息</el-button>
           </el-col>
           <el-col :span="10">
             <div class="screen">
@@ -19,8 +19,7 @@
         <el-row>
           <el-col>
             <div class="search_btn">
-              <div :class="search == '' ? 'search' : 'searchNo'" class="search_item search_block"
-                @click="searchBtn('')">
+              <div :class="search == '' ? 'search' : 'searchNo'" class="search_item search_block" @click="searchBtn('')">
                 全部
               </div>
               <div :class="search == 1 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(1)">
@@ -49,12 +48,14 @@
         </el-row>
       </div>
       <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="68vh" border
-        highlight-current-row>
-        <el-table-column type="index" width="60"  label="序号" align="center">
-            <template scope="scope">
-                <span>{{scope.$index + 1}}</span>
-                <!-- <span v-else>{{scope.$index}}</span> -->
-            </template>
+        highlight-current-row @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" :selectable="selectInit">
+        </el-table-column>
+        <el-table-column type="index" width="60" label="序号" align="center">
+          <template scope="scope">
+            <span>{{ scope.$index + 1 }}</span>
+            <!-- <span v-else>{{scope.$index}}</span> -->
+          </template>
         </el-table-column>
         <el-table-column prop="name" label="货主姓名" min-width="130"></el-table-column>
         <el-table-column prop="phone" label="账号" min-width="110"></el-table-column>
@@ -65,7 +66,8 @@
         <el-table-column prop="amountMoney" label="代理身份">
           <template slot-scope="scope">
             <el-popover placement="top-start" title="" width="200" trigger="hover">
-              <div style="white-space: pre-wrap;word-break: break-all;">{{scope.row.proxyIdentity? scope.row.proxyIdentity: '暂无代理企业'}}</div>
+              <div style="white-space: pre-wrap;word-break: break-all;">{{ scope.row.proxyIdentity ?
+                scope.row.proxyIdentity : '暂无代理企业' }}</div>
               <span class="btn_css" slot="reference">企业</span>
             </el-popover>
           </template>
@@ -91,7 +93,7 @@
         <el-table-column label="账户" min-width="180">
           <template slot-scope="scope">
             <el-popover placement="right" width="400" trigger="click" @show="getBillList(scope.row.commonId)">
-              <div v-if='billList.length>0' class="bill-content">
+              <div v-if='billList.length > 0' class="bill-content">
                 <div class="bill-item" v-for="(item, index) in billList" :key="index">
                   <div class="row1">
                     <div class="left">
@@ -101,16 +103,18 @@
                   </div>
                   <div class="row1">
                     <div class="left">
-                      <img v-if='item.rechargeUrl' style='width:20px;height:20px;' @click="enlarge(item.rechargeUrl)" :src="item.rechargeUrl" alt="">
+                      <img v-if='item.rechargeUrl' style='width:20px;height:20px;' @click="enlarge(item.rechargeUrl)"
+                        :src="item.rechargeUrl" alt="">
+                      <div>{{ item.orderNo }}</div>
                     </div>
                     <div class="right">{{ item.createDate }}</div>
                   </div>
                   <!-- <div class="row2">
-                    <div class="left">
-                      支付预付款
-                    </div>
-                    <div class="right">-1000</div>
-                  </div> -->
+                      <div class="left">
+                        支付预付款
+                      </div>
+                      <div class="right">-1000</div>
+                    </div> -->
                 </div>
               </div>
               <div v-else>暂无数据</div>
@@ -191,12 +195,12 @@
         <div class="form_css">
           <el-form ref="form" :model="form" label-width="80px">
             <!-- <el-checkbox-group v-model="form.checkList">
-							<el-checkbox label="证件照片不清晰"></el-checkbox>
-							<el-checkbox label="证件照片上传错误"></el-checkbox>
-							<el-checkbox label="身份信息填写错误"></el-checkbox>
-							<el-checkbox label="证件信息填写错误"></el-checkbox>
-							<el-checkbox label="其他"></el-checkbox>
-						</el-checkbox-group> -->
+  							<el-checkbox label="证件照片不清晰"></el-checkbox>
+  							<el-checkbox label="证件照片上传错误"></el-checkbox>
+  							<el-checkbox label="身份信息填写错误"></el-checkbox>
+  							<el-checkbox label="证件信息填写错误"></el-checkbox>
+  							<el-checkbox label="其他"></el-checkbox>
+  						</el-checkbox-group> -->
             <div style="margin-bottom: 20px">驳回原因描述(必填)</div>
             <el-input type="textarea" :rows="3" resize="none" placeholder="输入驳回原因,6-100个字" maxlength="100"
               v-model="form.rejectReasonDescription"></el-input>
@@ -222,7 +226,7 @@
         </div>
         <div class="Info_btn">
           <el-button @click="sendInfoClose">取消</el-button>
-          <el-button @click="submitInfo" type="primary">确定</el-button>
+          <el-button @click="submitInfo" type="primary" :loading="btnLoading">确定</el-button>
         </div>
       </div>
     </el-dialog>
@@ -274,8 +278,7 @@
       </div>
     </el-dialog>
     <!-- 账户信息 -->
-    <el-dialog :close-on-click-modal="false" title="账户信息" :visible.sync="payInfo" width="500px"
-      :before-close="payClose">
+    <el-dialog :close-on-click-modal="false" title="账户信息" :visible.sync="payInfo" width="500px" :before-close="payClose">
       <div v-if='paySee' class="pay">
         <div class="pay_css">
           <div class="title_css">收款人:</div>
@@ -295,24 +298,25 @@
         </div>
       </div>
       <!-- <img
-          :src="paySee.payeeAddressUrl"
-          class="user_item"
-          @click="enlarge(paySee.payeeAddressUrl)"
-        /> -->
+            :src="paySee.payeeAddressUrl"
+            class="user_item"
+            @click="enlarge(paySee.payeeAddressUrl)"
+          /> -->
     </el-dialog>
-    <el-dialog title="禁用天数" :close-on-click-modal='false' :visible.sync="forbiddenshow" width="400px" :before-close="forbiddenshowClose">
-       <el-form ref="form" label-width="80px">
-            <el-form-item label="禁用天数">
-              <el-input placeholder="输入禁用天数,当天起算" v-model="disabledDays"></el-input>
-            </el-form-item>
-            <div class="form_btn">
-              <el-button @click="forbiddenshowClose">取消</el-button>
-              <el-button @click="submitforbidden" type="primary">确定</el-button>
-            </div>
-          </el-form>
+    <el-dialog title="禁用天数" :close-on-click-modal='false' :visible.sync="forbiddenshow" width="400px"
+      :before-close="forbiddenshowClose">
+      <el-form ref="form" label-width="80px">
+        <el-form-item label="禁用天数">
+          <el-input placeholder="输入禁用天数,当天起算" v-model="disabledDays"></el-input>
+        </el-form-item>
+        <div class="form_btn">
+          <el-button @click="forbiddenshowClose">取消</el-button>
+          <el-button @click="submitforbidden" type="primary">确定</el-button>
+        </div>
+      </el-form>
     </el-dialog>
     <el-image-viewer v-if="imgsVisible" :on-close="closeImgViewer" :url-list="srcList" style="z-index: 9999" />
-  </div>
+</div>
 </template>
 <script>
 import {
@@ -323,12 +327,13 @@ import {
   editInfo,
   getInfo,
   theRecharge,
-  forbidden
+  forbidden,
+  batchPostNews,
 } from '@/api/cargoOwnerManagement';
 
- import {
-    uploadPath
-  } from '@/api/officialWebsiteManagement'
+import {
+  uploadPath
+} from '@/api/officialWebsiteManagement'
 export default {
   components: {
     'el-image-viewer': () =>
@@ -362,20 +367,32 @@ export default {
       paySee: {},
       rechargeShow: false,
       imageUrl: '',
-      rechargeData: {bankCard:''},
-      forbiddenshow:false,
-      disabledDays:'',
-      forbiddendata:{},
+      rechargeData: { bankCard: '' },
+      forbiddenshow: false,
+      disabledDays: '',
+      forbiddendata: {},
+      batchTips: false,//批量发送标识
+      btnLoading: false
     };
   },
   mounted() {
     this.getList();
   },
   methods: {
-    forbiddenshowClose(){
-        this.disabledDays=''
-        this.forbiddenshow=false
-      },
+    sendInfoClick() {
+      this.batchTips = true
+      this.sendInfo = true;
+    },
+    selectInit() {
+      return true;
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    forbiddenshowClose() {
+      this.disabledDays = ''
+      this.forbiddenshow = false
+    },
     seeInfo(val) {
       this.listLoading = true;
       getInfo({
@@ -389,7 +406,7 @@ export default {
               return
             }
             this.payInfo = true;
-            
+
           }
         })
         .catch(() => {
@@ -516,21 +533,21 @@ export default {
         });
     },
     switchChange(row, num) {
-        console.log(1111111)
-        this.forbiddendata=row
-        var _examine = {};
-        _examine.id = row.commonId;
-        let title;
-        if (num == 1) {
-          // _examine.flag = 3;
-          // title = "禁用后客户将无法使用所有功能,是否确定禁用?";
-          this.forbiddenshow=true
-          
-        } else if (num == 2) {
-          title = '确定重新启用该用户?';
-          _examine.disableFlag = 2;
-          _examine.identityFlag = 1;
-          this.$confirm(title, '提示', {
+      console.log(1111111)
+      this.forbiddendata = row
+      var _examine = {};
+      _examine.id = row.commonId;
+      let title;
+      if (num == 1) {
+        // _examine.flag = 3;
+        // title = "禁用后客户将无法使用所有功能,是否确定禁用?";
+        this.forbiddenshow = true
+
+      } else if (num == 2) {
+        title = '确定重新启用该用户?';
+        _examine.disableFlag = 2;
+        _examine.identityFlag = 1;
+        this.$confirm(title, '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning',
@@ -538,11 +555,11 @@ export default {
           this.listLoading = true;
           forbidden(_examine)
             .then((response) => {
-                this.$notify({
-                  title: '成功',
-                  message: '启用成功!',
-                  type: 'success',
-                });
+              this.$notify({
+                title: '成功',
+                message: '启用成功!',
+                type: 'success',
+              });
               this.getList();
               this.listLoading = false;
             })
@@ -550,37 +567,37 @@ export default {
               this.listLoading = false;
             });
         });
-        }
-      },
-      submitforbidden(){
-          if(!this.disabledDays){
-            this.$message.error('禁用天数不能为空');
-            return
-          }if(this.disabledDays<2){
-            this.$message.error('禁用天数输入错误');
-            return
-          }
-          var _examine={}
-          _examine.id = this.forbiddendata.commonId
-          _examine.disableFlag = 1;
-          _examine.identityFlag = 1;
-          _examine.disabledDays = this.disabledDays;
-          this.listLoading = true;
-          forbidden(_examine)
-            .then((response) => {
-                this.$notify({
-                  title: '成功',
-                  message: '禁用成功!',
-                  type: 'success',
-                });
-                this.forbiddenshow=false
-              this.getList();
-              this.listLoading = false;
-            })
-            .catch(() => {
-              this.listLoading = false;
-            });
-      },
+      }
+    },
+    submitforbidden() {
+      if (!this.disabledDays) {
+        this.$message.error('禁用天数不能为空');
+        return
+      } if (this.disabledDays < 2) {
+        this.$message.error('禁用天数输入错误');
+        return
+      }
+      var _examine = {}
+      _examine.id = this.forbiddendata.commonId
+      _examine.disableFlag = 1;
+      _examine.identityFlag = 1;
+      _examine.disabledDays = this.disabledDays;
+      this.listLoading = true;
+      forbidden(_examine)
+        .then((response) => {
+          this.$notify({
+            title: '成功',
+            message: '禁用成功!',
+            type: 'success',
+          });
+          this.forbiddenshow = false
+          this.getList();
+          this.listLoading = false;
+        })
+        .catch(() => {
+          this.listLoading = false;
+        });
+    },
     newInfo(row) {
       this.Info.newsTypeKey = 1;
       this.Info.newsType = '系统消息';
@@ -663,9 +680,9 @@ export default {
     },
     recharge(item) {
       // this.rechargeData = item
-      this.rechargeData.bankCard=item.bankCard
-      this.rechargeData.bankDeposit=item.bankDeposit
-      this.rechargeData.bankDepositBranch=item.bankDepositBranch
+      this.rechargeData.bankCard = item.bankCard
+      this.rechargeData.bankDeposit = item.bankDeposit
+      this.rechargeData.bankDepositBranch = item.bankDepositBranch
       this.rechargeData.name = item.name
       this.rechargeData.rechargeId = item.id;
       this.rechargeData.flag = 1;
@@ -736,20 +753,46 @@ export default {
         this.$message.error('消息内容字数应在10-100之间');
         return;
       }
-      this.listLoading = true;
-      postNews(this.Info)
-        .then((response) => {
-          this.$notify({
-            title: '成功',
-            message: '发送成功!',
-            type: 'success',
+      this.btnLoading = true
+        this.listLoading = true;
+        if(this.batchTips){//批量发送
+          let arr = []
+          for(let i = 0;i<this.multipleSelection.length;i++){
+            arr.push({reCommonId:this.multipleSelection[i].commonId,newsTitle:this.Info.newsTitle,newsContent:this.Info.newsContent})
+          }
+          batchPostNews({newsInfoList:arr})
+          .then((response) => {
+            this.$notify({
+              title: "成功",
+              message: "发送成功!",
+              type: "success",
+            });
+            this.sendInfoClose();
+            this.batchTips = false
+            this.btnLoading = false
+            this.listLoading = false;
+          })
+          .catch(() => {
+            this.listLoading = false;
+            this.btnLoading = false
           });
-          this.sendInfoClose();
-          this.listLoading = false;
-        })
-        .catch(() => {
-          this.loading = false;
-        });
+        }else{
+          postNews(this.Info)
+          .then((response) => {
+            this.$notify({
+              title: "成功",
+              message: "发送成功!",
+              type: "success",
+            });
+            this.sendInfoClose();
+            this.btnLoading = false
+            this.listLoading = false;
+          })
+          .catch(() => {
+            this.listLoading = false;
+            this.btnLoading = false
+          });
+        }
     },
     userSee(row) {
       this.idSee.cardAddressUrl = row.cardAddressUrl;
@@ -1052,16 +1095,18 @@ export default {
 .find::v-deep input.el-input__inner {
   border-radius: 0;
 }
-.bill-item{
-  border-bottom:1px solid #ccc;
+
+.bill-item {
+  border-bottom: 1px solid #ccc;
 }
-.bill-item:last-child{
-  border-bottom:1px solid transparent;
+
+.bill-item:last-child {
+  border-bottom: 1px solid transparent;
 }
-.row1{
+
+.row1 {
   display: flex;
   justify-content: space-between;
   align-items: center;
-  padding:5px;
-}
-</style>
+  padding: 5px;
+}</style>

+ 49 - 8
src/views/driverManagement/identityExamine.vue

@@ -5,7 +5,7 @@
       <div class="top_css">
         <el-row>
           <el-col :span="14" style="height: 45px">
-            <!-- <el-button type="primary">添加</el-button> -->
+            <el-button type="primary" @click="sendInfoClick">批量发送消息</el-button>
           </el-col>
           <el-col :span="10">
             <div class="screen">
@@ -51,7 +51,9 @@
           </el-col>
         </el-row>
       </div>
-      <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="68vh" border highlight-current-row>
+      <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="68vh" border highlight-current-row  @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" :selectable="selectInit">
+        </el-table-column>
         <el-table-column type="index" width="60"  label="序号" align="center">
             <template scope="scope">
                 <span>{{scope.$index + 1}}</span>
@@ -307,7 +309,7 @@
         </div>
         <div class="Info_btn">
           <el-button @click="sendInfoClose">取消</el-button>
-          <el-button @click="submitInfo" type="primary">确定</el-button>
+          <el-button @click="submitInfo" type="primary" :loading="btnLoading">确定</el-button>
         </div>
       </div>
     </el-dialog>
@@ -318,7 +320,7 @@
             </el-form-item>
             <div class="form_btn">
               <el-button @click="forbiddenshowClose">取消</el-button>
-              <el-button @click="submitforbidden" type="primary">确定</el-button>
+              <el-button @click="submitforbidden" type="primary" >确定</el-button>
             </div>
           </el-form>
     </el-dialog>
@@ -332,7 +334,8 @@
     postNews,
     billSee,
     editInfo,
-    forbidden
+    forbidden,
+    batchPostNews,
   } from "@/api/driverManagement";
   export default {
     data() {
@@ -374,7 +377,10 @@
         srcList: [],
         forbiddenshow:false,
         imgsVisible: false,
-        disabledDays:''
+        disabledDays:'',
+        multipleSelection:[],
+        batchTips:false,//批量发送标识
+        btnLoading:false
       };
     },
 
@@ -386,7 +392,16 @@
         import("element-ui/packages/image/src/image-viewer"),
     },
     methods: {
-      
+      sendInfoClick(){
+        this.batchTips = true
+        this.sendInfo = true;
+      },
+      selectInit() {
+      return true;
+    },
+    handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
       closeImgViewer() {
          this.srcList = []
         this.imgsVisible = false;
@@ -542,8 +557,31 @@
           this.$message.error("消息内容字数应在10-100之间");
           return;
         }
+        this.btnLoading = true
         this.listLoading = true;
-        postNews(this.Info)
+        if(this.batchTips){//批量发送
+          let arr = []
+          for(let i = 0;i<this.multipleSelection.length;i++){
+            arr.push({reCommonId:this.multipleSelection[i].commonId,newsTitle:this.Info.newsTitle,newsContent:this.Info.newsContent})
+          }
+          batchPostNews({newsInfoList:arr})
+          .then((response) => {
+            this.$notify({
+              title: "成功",
+              message: "发送成功!",
+              type: "success",
+            });
+            this.sendInfoClose();
+            this.batchTips = false
+            this.btnLoading = false
+            this.listLoading = false;
+          })
+          .catch(() => {
+            this.listLoading = false;
+            this.btnLoading = false
+          });
+        }else{
+          postNews(this.Info)
           .then((response) => {
             this.$notify({
               title: "成功",
@@ -551,11 +589,14 @@
               type: "success",
             });
             this.sendInfoClose();
+            this.btnLoading = false
             this.listLoading = false;
           })
           .catch(() => {
             this.listLoading = false;
+            this.btnLoading = false
           });
+        }
       },
       switchChange(row, num) {
         console.log(1111111)

+ 1 - 0
src/views/enterpriseManagement/enterpriseAudit.vue

@@ -70,6 +70,7 @@
                   <div class="row1">
                     <div class="left">
                       <img v-if='item.rechargeUrl' style='width:20px;height:20px;' @click="enlarge(item.rechargeUrl)" :src="item.rechargeUrl" alt="">
+                      <div >{{item.orderNo}}</div>
                     </div>
                     <div class="right">{{ item.createDate }}</div>
                   </div>