ソースを参照

付费规则调整

qymljy 1 年間 前
コミット
f64724e575

+ 23 - 1
src/SManagement/user/pay-orders/index.vue

@@ -82,20 +82,42 @@ export default {
       this.total = res.total
       this.currentPage = res.pageNumber
     },
-    onSuccess(id,orderno){
+    async onSuccess(id,orderno){
       this.listData()
       let that = this
       this.$refs.payment.dialogVisible = true
       this.$refs.payment.queryCode(orderno)
       this.$refs.payment.queryAccount(id)
       this.$refs.payment.queryData(id)
+      const res = await this.$api.requested({
+        "classname": "system.payorder.payorder",
+        "method": "query_userauth",
+        "content": {
+        }
+      })
+     /* this.auth_data = res.data
+      sessionStorage.setItem('module_info', JSON.stringify(this.auth_data))
+      console.log(this.auth_data,'222')*/
       this.payChangeFun(function(a) {
         a.result  = () => {
           that.$refs.payment.dialogVisible = false
+          that.queryAuth()
           that.listData()
         }
       })
     },
+    async queryAuth(){
+      const res = await this.$api.requested({
+        "classname": "system.payorder.payorder",
+        "method": "query_userauth",
+        "content": {
+          "nocache":true
+        }
+      })
+      this.auth_data = res.data
+      console.log(this.auth_data)
+      sessionStorage.setItem('module_info', JSON.stringify(this.auth_data))
+    },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
       this.param.content.pageSize = val

+ 15 - 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"   fixedName="operation" @rowClick="rowClick">
+          <tableLayout ref="version" :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>
@@ -84,7 +84,7 @@
           <span>选择付费账号:</span>
         </el-col>
         <el-col :span="24" class="div_top" v-if="sys_payincidence == '1'">
-          <tableLayout :layout="tablecolsAccount" :data="list"  :opwidth="200" :custom="true"  height="370px" fixedName="operation">
+          <tableLayout ref="account1" :layout="tablecolsAccount" :data="list"  :opwidth="200" :custom="true"  height="240px" fixedName="operation">
             <template v-slot:customcol="scope">
               <span v-if="scope.column.columnname === 'operation'" ></span>
               <span v-else-if="scope.column.columnname === 'enddate'">
@@ -100,7 +100,7 @@
           </tableLayout>
         </el-col>
         <el-col :span="24" class="div_top" v-if="sys_payincidence == '2'">
-          <tableLayout :layout="tablecolsMain" :data="list"  :opwidth="200" :custom="true"  height="370px" fixedName="operation">
+          <tableLayout ref="account2" :layout="tablecolsMain" :data="list"  :opwidth="200" :custom="true"  height="370px" fixedName="operation">
             <template v-slot:customcol="scope">
               <span v-if="scope.column.columnname === 'operation'" ></span>
               <span v-else-if="scope.column.columnname === 'enddate'">
@@ -180,10 +180,10 @@ export default {
   methods:{
     onShow(){
       this.dialogVisible = true
-      this.queryVersion()
+
       /*this.queryAccount()*/
       this.queryInstructions()
-     /* this.creatOrder()*/
+      this.creatOrder()
     },
     /*新建订单*/
     async creatOrder(){
@@ -194,6 +194,7 @@ export default {
       })
       this.form.sys_payorderid = res.data.sys_payorderid
       this.form.orderno = res.data.orderno
+      this.queryVersion()
     },
     /*查询付费说明*/
     async queryInstructions(){
@@ -233,6 +234,7 @@ export default {
       this.modulesList = this.versionList[0].systemapp
       this.form.sys_site_systempartitionid = this.versionList[0].sys_site_systempartitionid
       this.queryAccount()
+      this.$refs.version.$refs.myTable.doLayout()
     },
     /*获取可选账号*/
     async queryAccount(){
@@ -280,10 +282,13 @@ export default {
       })
       this.accountNum = this.userids.length
       this.queryPrice()
+      this.$refs.account1.$refs.myTable.doLayout()
+      this.$refs.account2.$refs.myTable.doLayout()
     },
     /*选择版本*/
     onCheck(val){
       this.userLeader = ''
+      this.userids = []
       this.versionList.forEach(item=>{
         if (item.sys_site_systempartitionid === val.sys_site_systempartitionid){
           item.checkRow = true
@@ -293,7 +298,7 @@ export default {
         }
         this.modulesList = val.systemapp
       })
-      this.userids = []
+
      /* this.list.forEach(item=>{
         if (item.checkRow){
           item.checkRow = false
@@ -305,7 +310,6 @@ export default {
     /*选择付费账号*/
     userCheck(val){
       this.userids = []
-      console.log(val,2222)
       if (this.userLeader !== val.userid){
         val.checkRow ? this.list[val.index].checkRow = false : this.list[val.index].checkRow = true
       }
@@ -327,7 +331,6 @@ export default {
     },
     onSubmit(){
       this.createNow = true
-      this.form.remarks = ''
       this.queryPrice()
     },
     /*获取订单价格*/
@@ -348,15 +351,18 @@ export default {
         this.createNow = false
         this.amount = 0
         this.userLeader = ''
+        this.form.remarks = ''
+        this.accountNum = 0
         this.$emit('onSuccess',this.form.sys_payorderid,this.form.orderno)
       }
-
     },
     onClose(){
       this.dialogVisible = false
       this.createNow = false
       this.userLeader = ''
+      this.form.remarks = ''
       this.amount = 0
+      this.accountNum = 0
     }
   },
   created() {

+ 28 - 9
src/SManagement/user/pay-orders/modules/detail.vue

@@ -9,10 +9,10 @@
         <el-col :sapn="24">
           <span class="title-style">订单详情</span>
         </el-col>
-        <el-col :span="4" class="span-top">
+        <el-col :span="6" class="span-top">
           <span>付费订单号:{{list.orderno || '--'}}</span>
         </el-col>
-        <el-col :span="4" class="span-top">
+        <el-col :span="6" class="span-top">
           <span >付费状态:
              <span v-if="list.ispaid == '0'" style="color: red">未付费</span>
             <span v-else-if="list.ispaid == '3'" style="color: #afb0be">已取消</span>
@@ -20,24 +20,24 @@
           </span>
 
         </el-col>
-        <el-col :span="4" class="span-top">
+        <el-col :span="6" class="span-top">
           <span >付费金额(元):
             <span style="color: red">{{tool.formatAmount(list.amount,2) || '--'}}</span>
           </span>
         </el-col>
-        <el-col :span="4" class="span-top">
+        <el-col :span="6" class="span-top">
           <span>付费类型:{{list.sys_payincidence == '1'?'按账号付费':'按主体付费'}}</span>
         </el-col>
-        <el-col :span="4" class="span-top">
+        <el-col :span="6" class="span-top">
           <span>付费时间:{{list.paytime || '--'}}</span>
         </el-col>
-        <el-col :span="4" class="span-top">
+        <el-col :span="6" class="span-top">
           <span>付费人:{{list.createby || '--'}}</span>
         </el-col>
-        <el-col :span="4" class="span-top">
+        <el-col :span="6" class="span-top">
           <span>付款渠道:{{list.paymode || '--'}}</span>
         </el-col>
-        <el-col :span="4" class="span-top">
+        <el-col :span="6" class="span-top">
           <span>备注:{{list.remarks || '--'}}</span>
         </el-col>
       </el-row>
@@ -172,6 +172,7 @@ export default {
       height:'',
       total:0,
       currentPage:0,
+      auth_data:'',
       param:{
         "classname": "system.payorder.payorder",
         "method": "detail_userlist",
@@ -180,6 +181,7 @@ export default {
           "pageNumber": 1,
           "pageSize": 20,
           "where": {
+            "nocache":true,
             "condition": ""
           }
         }
@@ -193,6 +195,7 @@ export default {
         "classname": "system.payorder.payorder",
         "method": "detail",
         "content": {
+          "nocache":true,
           "sys_payorderid": this.$route.query.id
         },
       })
@@ -225,11 +228,27 @@ export default {
       this.$refs.payment.queryCode(this.list.orderno)
       console.log(this)
       this.payChangeFun(function(a) {
-        a.result  = () => {
+        console.log(a)
+        a.result  =  () => {
           that.$refs.payment.dialogVisible = false
+
+          /*this.$router.push('/main')*/
+          that.queryAuth()
           that.queryData()
         }
       })
+    },
+    async queryAuth(){
+      const res = await this.$api.requested({
+        "classname": "system.payorder.payorder",
+        "method": "query_userauth",
+        "content": {
+          "nocache":true
+        }
+      })
+      this.auth_data = res.data
+      console.log(this.auth_data)
+      sessionStorage.setItem('module_info', JSON.stringify(this.auth_data))
     }
   },
   mounted() {

+ 12 - 11
src/SManagement/user/pay-orders/modules/payment.vue

@@ -11,46 +11,46 @@
         </el-col>
         <el-col :span="24">
           <div class="div_border">
-            <el-col :span="6" class="div_span_top">
+            <el-col :span="8" class="div_span_top">
               <span>付费订单号:{{list.orderno}}</span>
             </el-col>
-            <el-col :span="6" class="div_span_top">
+            <el-col :span="8" class="div_span_top">
               <span>付费状态:
                 <span v-if="list.ispaid == '0' || list.ispaid == '2'" style="color: red">未付费</span>
                 <span v-else>已付费</span>
               </span>
             </el-col>
-            <el-col :span="6" class="div_span_top">
+            <el-col :span="8" class="div_span_top">
               <span>付费金额(元):
                 <span style="color: red"> {{tool.formatAmount(list.amount,2)}}</span>
               </span>
             </el-col>
-            <el-col :span="6" class="div_span_top">
+            <el-col :span="8" class="div_span_top">
               <span>付费版本:{{list.partitionname}}</span>
             </el-col>
-            <el-col :span="6" class="div_span_top">
+            <el-col :span="8" class="div_span_top">
               <span>付费类型:{{list.sys_payincidence == '1'?'按账号付费':'按主体付费'}}</span>
             </el-col>
-            <el-col :span="12" class="div_span_top">
+            <el-col :span="8" class="div_span_top">
               <span>备注:{{list.remarks}}</span>
             </el-col>
           </div>
         </el-col>
       </el-row>
-      <el-row :gutter="20" style="margin-top: 20px">
+<!--      <el-row :gutter="20" style="margin-top: 20px">
         <el-col :span="24" >
           <span class="span_title">付费版本:
             <span style="color: #4f7bfd;font-weight: bold;font-size: 17px">{{list.partitionname}}</span>
           </span>
         </el-col>
-<!--        <el-col :span="24" class="div_span_top">
+&lt;!&ndash;        <el-col :span="24" class="div_span_top">
           <tableLayout :layout="tablecolsModule" :data="moduleList" :opwidth="200" :custom="true"  :height="200 + 'px'" >
             <template v-slot:customcol="scope">
               <p >{{scope.column.data[scope.column.columnname] || '&#45;&#45;'}}</p>
             </template>
           </tableLayout>
-        </el-col>-->
-      </el-row>
+        </el-col>&ndash;&gt;
+      </el-row>-->
       <el-row :gutter="20" style="margin-top: 20px">
         <el-col :span="24" >
           <span class="span_title">付费账号:
@@ -80,7 +80,7 @@
             <vue-qr style="margin-left: 30%" :text="code_url" :size="320"></vue-qr>
         </el-col>
         <el-col :span="24">
-          <p style="color: #FA8C16;text-align: center;font-size: 16px">温馨提示:支持开具电子发票,如有需要,请到费订单中开具</p>
+          <p style="color: #FA8C16;text-align: center;font-size: 16px;margin-top: 20px">温馨提示:请使用微信扫码支付</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>
@@ -111,6 +111,7 @@ export default {
           "pageNumber": 1,
           "pageSize": 99,
           "where": {
+            "nocache":true,
             "condition": ""
           }
         }

+ 7 - 3
src/SManagement/user/team-manage/components/detail.vue

@@ -3,7 +3,7 @@
     <div class="container normal-panel normal-margin  flex-between">
       <el-row>
         <el-col :span="24">
-          <div class="title-style">订单信息</div>
+          <div class="title-style">账号详情</div>
         </el-col>
       </el-row>
       <el-row :gutter="20" style="font-size: 15px;margin-top: 20px">
@@ -29,14 +29,17 @@
             </span>
         </el-col>
         <el-col :span="6" class="col-top">
-          <span>有无付费:{{$route.query.data.status}}</span>
+          <span>有无付费:
+            <span v-if="$route.query.data.status === '未付费'" style="color: red">{{$route.query.data.status}}</span>
+            <span v-else-if="$route.query.data.status === '已付费'" style="color: green">{{$route.query.data.status}}</span>
+          </span>
         </el-col>
       </el-row>
     </div>
     <div class="container normal-panel">
       <el-row>
         <el-col :span="24">
-          <div class="title-style inline-16">账号详情</div>
+          <div class="title-style inline-16">付费信息</div>
           <el-button size="small" type="primary" @click="payOrder">账号付费</el-button>
         </el-col>
       </el-row>
@@ -68,6 +71,7 @@ export default {
         "classname": "sale.team.team",
         "method": "queryPaid",
         "content": {
+          "nocache":true,
           "userid": this.$route.query.id,
           "pageNumber": 1,
           "pageSize": 999999,

+ 1 - 0
src/SManagement/user/team-manage/index.vue

@@ -89,6 +89,7 @@ export default {
           "pageNumber": 1,
           "pageSize": 20,
           "where": {
+            "nocache":true,
             "condition": ""
           }
         }

+ 5 - 2
src/components/layout/modules/aside.vue

@@ -50,7 +50,7 @@ export default {
       } else {
         if (this.auth_data[0].isneedpay){
           this.activePath = '/mask'
-          this.$router.replace({path:'/mask',meta:{title: '无权限333'}})
+          this.$router.replace({path:'/mask',meta:{title: '无权限'}})
           this.open()
         }else {
           this.activePath = this.$route.path
@@ -61,7 +61,7 @@ export default {
       this.isneedpay = val.isneedpay
       this.activePath = this.$route.path
       if (val.isneedpay){
-        this.$router.replace({path:'/mask',meta:{title: '无权限333'} })
+        this.$router.replace({path:'/mask',meta:{title: '无权限'} })
         this.open()
       }
     },
@@ -95,6 +95,7 @@ export default {
         this.auth_data = active_modules.apps
       })
       .catch(async (action) => {
+        this.$router.push('/home')
         if (action === 'cancel' && this.usertype == '22'){
           const res = await this.$api.requested({
             "classname": "system.payorder.payorder",
@@ -109,6 +110,8 @@ export default {
               type: 'success'
             });
           }
+          console.log("关闭取消")
+
         }
 
       });

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

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-table :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data"
+    <el-table ref="myTable" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data"
               :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>

+ 0 - 1
src/views/select_accounts/index.vue

@@ -40,7 +40,6 @@ export default {
         "content": {
         }
       })
-
       this.auth_data = res.data
       sessionStorage.setItem('module_info', JSON.stringify(this.auth_data))
       this.$router.push('/main')