Browse Source

付费规则调整

qymljy 2 years ago
parent
commit
af458eab54

+ 44 - 9
src/SManagement/user/pay-orders/modules/add.vue

@@ -39,7 +39,7 @@
               </template>
             </el-table-column>
           </el-table>-->
-          <tableLayout :layout="tablecolsVersion" :data="versionList"  :opwidth="200" :custom="true"  height="370px" fixedName="operation" @rowClick="rowClick">
+          <tableLayout :layout="tablecolsVersion" :data="versionList"  :opwidth="200" :custom="true"   fixedName="operation" @rowClick="rowClick">
             <template v-slot:customcol="scope">
               <span v-if="scope.column.columnname === 'operation'" ></span>
               <p v-else>{{scope.column.data[scope.column.columnname] || '--'}}</p>
@@ -95,7 +95,7 @@
               <p v-else>{{scope.column.data[scope.column.columnname] || '--'}}</p>
             </template>
             <template v-slot:opreation="scope">
-              <el-checkbox :checked="scope.data.checkRow" @change="userCheck(scope.data)"></el-checkbox>
+              <el-checkbox :checked="scope.data.checkRow" @change="userCheck(scope.data)" :disabled="userLeader === scope.data.userid"></el-checkbox>
             </template>
           </tableLayout>
         </el-col>
@@ -111,7 +111,7 @@
               <p v-else>{{scope.column.data[scope.column.columnname] || ''}}</p>
             </template>
             <template v-slot:opreation="scope">
-              <el-checkbox :checked="scope.data.checkRow" @change="userCheck(scope.data)"></el-checkbox>
+              <el-checkbox :checked="scope.data.checkRow" @change="userCheck(scope.data)" :disabled="userLeader === scope.data.userid"></el-checkbox>
             </template>
           </tableLayout>
         </el-col>
@@ -172,7 +172,8 @@ export default {
       accountNum:0,
       amount:0,
       createNow:false,
-      sys_payswitch:'1'
+      sys_payswitch:'1',
+      userLeader:''
     }
   },
   components:{tableLayout},
@@ -180,9 +181,9 @@ export default {
     onShow(){
       this.dialogVisible = true
       this.queryVersion()
-      this.queryAccount()
+      /*this.queryAccount()*/
       this.queryInstructions()
-      this.creatOrder()
+     /* this.creatOrder()*/
     },
     /*新建订单*/
     async creatOrder(){
@@ -231,6 +232,7 @@ export default {
       this.versionList[0].checkRow = true
       this.modulesList = this.versionList[0].systemapp
       this.form.sys_site_systempartitionid = this.versionList[0].sys_site_systempartitionid
+      this.queryAccount()
     },
     /*获取可选账号*/
     async queryAccount(){
@@ -250,9 +252,38 @@ export default {
           checkRow:false
         }
       })
+      let date = new Date()
+      let dateNow = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
+      this.list.forEach((item)=>{
+        if (item.isleader === 1){
+          if (item.enddate[this.form.sys_site_systempartitionid]){
+            if (dateNow > item.enddate[this.form.sys_site_systempartitionid]){
+              item.checkRow = true
+              this.userLeader = item.userid
+            }
+          }else {
+            item.checkRow = true
+            this.userLeader = item.userid
+          }
+        }
+
+      })
+      this.list.forEach(item=>{
+        if (item.checkRow){
+          this.userids.push({
+            "isleader": item.isleader,
+            "userid": item.userid,
+            "sa_agentsid": item.sa_agentsid,
+            "enddate": item.enddate[this.form.sys_site_systempartitionid]
+          })
+        }
+      })
+      this.accountNum = this.userids.length
+      this.queryPrice()
     },
     /*选择版本*/
     onCheck(val){
+      this.userLeader = ''
       this.versionList.forEach(item=>{
         if (item.sys_site_systempartitionid === val.sys_site_systempartitionid){
           item.checkRow = true
@@ -274,11 +305,12 @@ export default {
     /*选择付费账号*/
     userCheck(val){
       this.userids = []
-      console.log(val)
-      val.checkRow ? this.list[val.index].checkRow = false : this.list[val.index].checkRow = true
+      console.log(val,2222)
+      if (this.userLeader !== val.userid){
+        val.checkRow ? this.list[val.index].checkRow = false : this.list[val.index].checkRow = true
+      }
       this.list.forEach(item=>{
         if (item.checkRow){
-          console.log(item.enddate[this.form.sys_site_systempartitionid])
           this.userids.push({
             "isleader": item.isleader,
             "userid": item.userid,
@@ -315,6 +347,7 @@ export default {
         this.dialogVisible = false
         this.createNow = false
         this.amount = 0
+        this.userLeader = ''
         this.$emit('onSuccess',this.form.sys_payorderid,this.form.orderno)
       }
 
@@ -322,6 +355,8 @@ export default {
     onClose(){
       this.dialogVisible = false
       this.createNow = false
+      this.userLeader = ''
+      this.amount = 0
     }
   },
   created() {

+ 7 - 4
src/SManagement/user/pay-orders/modules/payment.vue

@@ -57,14 +57,14 @@
           </span>
         </el-col>
         <el-col :span="24" class="div_span_top" v-if="list.sys_payincidence == '1'">
-          <tableLayout :layout="tablecolsAccount" :data="accountList" :opwidth="200" :custom="true"  :height="200 + 'px'">
+          <tableLayout :layout="tablecolsAccount" :data="accountList" :opwidth="200" :custom="true"  >
             <template v-slot:customcol="scope">
               <p >{{scope.column.data[scope.column.columnname] || '--'}}</p>
             </template>
           </tableLayout>
         </el-col>
         <el-col :span="24" class="div_span_top" v-if="list.sys_payincidence == '2'">
-          <tableLayout :layout="tablecolsMain" :data="accountList" :opwidth="200" :custom="true" :height="200 + 'px'" >
+          <tableLayout :layout="tablecolsMain" :data="accountList" :opwidth="200" :custom="true"  >
             <template v-slot:customcol="scope">
               <p >{{scope.column.data[scope.column.columnname] || '--'}}</p>
             </template>
@@ -77,9 +77,12 @@
           </span>
         </el-col>
         <el-col :span="24">
-            <vue-qr style="margin-left: 35%" :text="code_url" :size="200"></vue-qr>
+            <vue-qr style="margin-left: 30%" :text="code_url" :size="320"></vue-qr>
         </el-col>
-        <el-button style="margin-left: 40% !important;" @click="onClose" size="small" class="normal-btn-width">取 消</el-button>
+        <el-col :span="24">
+          <p style="color: #FA8C16;text-align: center;font-size: 16px">温馨提示:支持开具电子发票,如有需要,请到付费订单中开具</p>
+        </el-col>
+        <el-button style="margin-left: 40% !important;margin-top: 20px" @click="onClose" size="small" class="normal-btn-width">取 消</el-button>
       </el-row>
 <!--      <span slot="footer" >
         <el-button style="margin-right: 45% !important;margin-top: -200px" @click="onClose" size="small" class="normal-btn-width">取 消</el-button>

+ 2 - 2
src/components/table/index2.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-table :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data"
-              :height="height ? height : data.length <= 4?'260px':data.length <= 20?'calc(100vh - 420px)':'calc(100vh - 220px)'"
+              :height="height ? height : data.length <= 5?'':data.length <= 20?'calc(100vh - 420px)':'calc(100vh - 220px)'"
               :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
               :header-cell-style="{height:'40px',color:'#333',fontWeight:'400',fontSize:'14px',background:'#EEEEEE'}" size="mini"  @row-click="rowClick" style="width:100%"  border>
       <el-table-column v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="col.width" :fixed="col.columnname === fixedName?'right':false">
@@ -54,4 +54,4 @@ export default {
 </script>
 <style scoped>
 
-</style>
+</style>