|
@@ -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() {
|