|
@@ -32,7 +32,7 @@
|
|
<image class="img" :src="img2" alt=""></image>
|
|
<image class="img" :src="img2" alt=""></image>
|
|
<view class="text">您还未认证个人粮商身份</view>
|
|
<view class="text">您还未认证个人粮商身份</view>
|
|
</view>
|
|
</view>
|
|
- <button v-if="grainMerchantList.length>0" :class="isAllselect?'':'custom-style'" @click="submit">{{btnVal}}</button>
|
|
|
|
|
|
+ <button v-if="grainMerchantList.length>0" :class="flag?'':'custom-style'" @click="submit">{{btnVal}}</button>
|
|
<button v-if="grainMerchantList.length==0" class="custom-style" @click="toGrainMerchantCertification()">接受并去认证</button>
|
|
<button v-if="grainMerchantList.length==0" class="custom-style" @click="toGrainMerchantCertification()">接受并去认证</button>
|
|
</div>
|
|
</div>
|
|
</u-popup>
|
|
</u-popup>
|
|
@@ -57,12 +57,23 @@
|
|
title: '',
|
|
title: '',
|
|
companyId: ''
|
|
companyId: ''
|
|
},
|
|
},
|
|
- isAllselect:false
|
|
|
|
|
|
+ isAllselect:false,
|
|
|
|
+ flag : true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['hasLogin', 'userInfo'])
|
|
...mapState(['hasLogin', 'userInfo'])
|
|
},
|
|
},
|
|
|
|
+ onLoad(options) {
|
|
|
|
+ //#ifdef APP-PLUS
|
|
|
|
+ this.user.title = options.data.split(',')[2]
|
|
|
|
+ this.user.companyId = options.data.split(',')[1]
|
|
|
|
+ //#endif
|
|
|
|
+ console.log("options:",options,this.user.title,this.user.companyId)
|
|
|
|
+ },
|
|
|
|
+ onShow() {
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
selectItem(item) {
|
|
selectItem(item) {
|
|
console.log("item", item)
|
|
console.log("item", item)
|
|
@@ -86,18 +97,11 @@
|
|
url:'/pages/attestation/indexTwo'
|
|
url:'/pages/attestation/indexTwo'
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- onLoad(options) {
|
|
|
|
- //#ifdef APP-PLUS
|
|
|
|
- this.user.title = options.data.split(',')[2]
|
|
|
|
- this.user.companyId = options.data.split(',')[1]
|
|
|
|
- //#endif
|
|
|
|
- },
|
|
|
|
- onShow() {
|
|
|
|
- this.getList()
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
getList() {
|
|
getList() {
|
|
console.log(this.userInfo)
|
|
console.log(this.userInfo)
|
|
this.identityAuthenticationInfo.commonId = this.userInfo.id
|
|
this.identityAuthenticationInfo.commonId = this.userInfo.id
|
|
|
|
+ this.grainMerchantList = []
|
|
this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {
|
|
this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {
|
|
pageSize: 100,
|
|
pageSize: 100,
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
@@ -113,6 +117,10 @@
|
|
}
|
|
}
|
|
var data = res.data.data.records
|
|
var data = res.data.data.records
|
|
for (var i = 0; i < data.length; i++) {
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
|
+ if(data[i].authenticationStatus == "未通过")
|
|
|
|
+ {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
if (data[i].customerTypeFlag == 2) {
|
|
if (data[i].customerTypeFlag == 2) {
|
|
if (data[i].compName && data[i].compName.length > 10) {
|
|
if (data[i].compName && data[i].compName.length > 10) {
|
|
data[i].compName = data[i].compName.substring(0, 10) + "..."
|
|
data[i].compName = data[i].compName.substring(0, 10) + "..."
|
|
@@ -123,14 +131,15 @@
|
|
this.isAllselect = true
|
|
this.isAllselect = true
|
|
} else {
|
|
} else {
|
|
data[i].check = false
|
|
data[i].check = false
|
|
- this.isAllselect = false
|
|
|
|
|
|
+ this.isAllselect = false
|
|
|
|
+ this.flag = false
|
|
}
|
|
}
|
|
|
|
+ this.grainMerchantList.push(data[i])
|
|
}
|
|
}
|
|
- if(this.isAllselect){
|
|
|
|
|
|
+ if(this.flag){
|
|
this.btnVal = "已接受"
|
|
this.btnVal = "已接受"
|
|
}
|
|
}
|
|
- this.grainMerchantList = res.data.data.records
|
|
|
|
- console.log(this.grainMerchantList)
|
|
|
|
|
|
+ console.log("grainMerchantList",this.grainMerchantList)
|
|
|
|
|
|
})
|
|
})
|
|
.catch(res => {
|
|
.catch(res => {
|
|
@@ -150,7 +159,7 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
submit() {
|
|
submit() {
|
|
- if(this.isAllselect) return
|
|
|
|
|
|
+ if(this.flag) return
|
|
// let _isAllCheck = false
|
|
// let _isAllCheck = false
|
|
// for (let i = 0; i < this.grainMerchantList.length; i++) {
|
|
// for (let i = 0; i < this.grainMerchantList.length; i++) {
|
|
// if (this.grainMerchantList[i].check) {
|
|
// if (this.grainMerchantList[i].check) {
|
|
@@ -164,14 +173,13 @@
|
|
// icon: false
|
|
// icon: false
|
|
// })
|
|
// })
|
|
// }
|
|
// }
|
|
- console.log("this.user.compId",this.user.companyId)
|
|
|
|
|
|
+ console.log("this.user.compId",this.user.companyId,this.selectID)
|
|
this.$api.doRequest('get', '/identityAuthenticationInfo/saveCompanyIdentity', {
|
|
this.$api.doRequest('get', '/identityAuthenticationInfo/saveCompanyIdentity', {
|
|
id: this.selectID,
|
|
id: this.selectID,
|
|
compId:this.user.companyId,
|
|
compId:this.user.companyId,
|
|
}, 'application/json;charset=UTF-8').then(res => {
|
|
}, 'application/json;charset=UTF-8').then(res => {
|
|
console.log(res);
|
|
console.log(res);
|
|
- if (res.statusCode == 200) {
|
|
|
|
-
|
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
this.getList()
|
|
this.getList()
|
|
|
|
|
|
}
|
|
}
|