|
@@ -7,7 +7,7 @@
|
|
</view>
|
|
</view>
|
|
<view class="top-content-2">
|
|
<view class="top-content-2">
|
|
<view>来自</view>
|
|
<view>来自</view>
|
|
- <view class="top-content-green">{{title}}</view>
|
|
|
|
|
|
+ <view class="top-content-green">{{user.title}}</view>
|
|
<view>的邀请。</view>
|
|
<view>的邀请。</view>
|
|
</view>
|
|
</view>
|
|
<view class="top-content-3">
|
|
<view class="top-content-3">
|
|
@@ -18,7 +18,7 @@
|
|
<view v-if="grainMerchantList.length>0">
|
|
<view v-if="grainMerchantList.length>0">
|
|
<view v-for="(item,index) in grainMerchantList" :key="index">
|
|
<view v-for="(item,index) in grainMerchantList" :key="index">
|
|
<view v-if="item.cover!=1" :class="item.check?'item-select':'item'" @click="selectItem(item)">
|
|
<view v-if="item.cover!=1" :class="item.check?'item-select':'item'" @click="selectItem(item)">
|
|
- <img v-if="item.check" class="img" src="../../../static/img/select.png" alt="">
|
|
|
|
|
|
+ <image v-if="item.check" class="img" :src="img1" alt=""></image>
|
|
<view class="name">{{item.customerName}}</view>
|
|
<view class="name">{{item.customerName}}</view>
|
|
<view class="phone">
|
|
<view class="phone">
|
|
<view class="number">{{item.customerPhone}}</view>
|
|
<view class="number">{{item.customerPhone}}</view>
|
|
@@ -29,11 +29,11 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="nolist" v-if="grainMerchantList.length==0">
|
|
<view class="nolist" v-if="grainMerchantList.length==0">
|
|
- <img class="img" src="../../../static/img/nolist.png" alt="">
|
|
|
|
|
|
+ <image class="img" :src="img2" alt=""></image>
|
|
<view class="text">您还未认证个人粮商身份</view>
|
|
<view class="text">您还未认证个人粮商身份</view>
|
|
</view>
|
|
</view>
|
|
- <button v-if="grainMerchantList.length>0" class="custom-style" @click="submit">接受邀请</button>
|
|
|
|
- <button v-if="grainMerchantList.length==0" class="custom-style" @click="attestation">接受并去认证</button>
|
|
|
|
|
|
+ <button v-if="grainMerchantList.length>0" :class="isAllselect?'':'custom-style'" @click="submit">{{btnVal}}</button>
|
|
|
|
+ <button v-if="grainMerchantList.length==0" class="custom-style" @click="toGrainMerchantCertification()">接受并去认证</button>
|
|
</div>
|
|
</div>
|
|
</u-popup>
|
|
</u-popup>
|
|
</view>
|
|
</view>
|
|
@@ -46,23 +46,18 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ img1:require("../../../static/img/select.png"),
|
|
|
|
+ img2:require("../../../static/img/nolist.png"),
|
|
show: true,
|
|
show: true,
|
|
identityAuthenticationInfo: {},
|
|
identityAuthenticationInfo: {},
|
|
- title: "黑龙江中天昊元贸易有限公司",
|
|
|
|
- grainMerchantList: []
|
|
|
|
- // grainMerchantList: [{
|
|
|
|
- // name: "张三",
|
|
|
|
- // phone: "189****9999",
|
|
|
|
- // state: "已认证",
|
|
|
|
- // check: false
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // name: "李四",
|
|
|
|
- // phone: "189****9999",
|
|
|
|
- // state: "审核中",
|
|
|
|
- // check: false
|
|
|
|
- // }
|
|
|
|
- // ]
|
|
|
|
|
|
+ grainMerchantList: [],
|
|
|
|
+ selectID: "",
|
|
|
|
+ btnVal: "接受邀请",
|
|
|
|
+ user: {
|
|
|
|
+ title: '',
|
|
|
|
+ companyId: ''
|
|
|
|
+ },
|
|
|
|
+ isAllselect:false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -71,14 +66,31 @@
|
|
methods: {
|
|
methods: {
|
|
selectItem(item) {
|
|
selectItem(item) {
|
|
console.log("item", item)
|
|
console.log("item", item)
|
|
- item.check = !item.check
|
|
|
|
|
|
+ if(item.authenticationStatus=="已接受") return
|
|
|
|
+ for (let i = 0; i < this.grainMerchantList.length; i++) {
|
|
|
|
+ if (this.grainMerchantList[i].id == item.id) {
|
|
|
|
+ this.grainMerchantList[i].check = !this.grainMerchantList[i].check
|
|
|
|
+ if (this.grainMerchantList[i].check) {
|
|
|
|
+ this.selectID = this.grainMerchantList[i].id
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
//查询粮商身份
|
|
//查询粮商身份
|
|
selectGrainMerchantList() {
|
|
selectGrainMerchantList() {
|
|
//
|
|
//
|
|
},
|
|
},
|
|
- onLoad(e) {
|
|
|
|
- this.title = e.name
|
|
|
|
|
|
+ //粮商认证
|
|
|
|
+ toGrainMerchantCertification(){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ 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() {
|
|
onShow() {
|
|
this.getList()
|
|
this.getList()
|
|
@@ -90,7 +102,8 @@
|
|
pageSize: 100,
|
|
pageSize: 100,
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
commonId: this.userInfo.id,
|
|
commonId: this.userInfo.id,
|
|
- flag: 0
|
|
|
|
|
|
+ compId:this.user.companyId,
|
|
|
|
+ flag: 3
|
|
}, 'application/json;charset=UTF-8').then(res => {
|
|
}, 'application/json;charset=UTF-8').then(res => {
|
|
for (var i = 0; i < res.data.data.records.length; i++) {
|
|
for (var i = 0; i < res.data.data.records.length; i++) {
|
|
res.data.data.records[i].basis = "false"
|
|
res.data.data.records[i].basis = "false"
|
|
@@ -105,6 +118,16 @@
|
|
data[i].compName = data[i].compName.substring(0, 10) + "..."
|
|
data[i].compName = data[i].compName.substring(0, 10) + "..."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (data[i].authenticationStatus == "已接受") {
|
|
|
|
+ data[i].check = true
|
|
|
|
+ this.isAllselect = true
|
|
|
|
+ } else {
|
|
|
|
+ data[i].check = false
|
|
|
|
+ this.isAllselect = false
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.isAllselect){
|
|
|
|
+ this.btnVal = "已接受"
|
|
}
|
|
}
|
|
this.grainMerchantList = res.data.data.records
|
|
this.grainMerchantList = res.data.data.records
|
|
console.log(this.grainMerchantList)
|
|
console.log(this.grainMerchantList)
|
|
@@ -127,22 +150,51 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
submit() {
|
|
submit() {
|
|
- let _isAllCheck = false
|
|
|
|
- for (let i = 0; i < this.grainMerchantList.length; i++) {
|
|
|
|
- if (this.grainMerchantList[i].check) {
|
|
|
|
- _isAllCheck = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (!_isAllCheck) {
|
|
|
|
- this.$refs.uToast.show({
|
|
|
|
- title: '至少选择一个身份',
|
|
|
|
- type: "error",
|
|
|
|
- icon: false
|
|
|
|
|
|
+ if(this.isAllselect) return
|
|
|
|
+ // let _isAllCheck = false
|
|
|
|
+ // for (let i = 0; i < this.grainMerchantList.length; i++) {
|
|
|
|
+ // if (this.grainMerchantList[i].check) {
|
|
|
|
+ // _isAllCheck = true
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // if (!_isAllCheck) {
|
|
|
|
+ // this.$refs.uToast.show({
|
|
|
|
+ // title: '至少选择一个身份',
|
|
|
|
+ // type: "error",
|
|
|
|
+ // icon: false
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ console.log("this.user.compId",this.user.companyId)
|
|
|
|
+ this.$api.doRequest('get', '/identityAuthenticationInfo/saveCompanyIdentity', {
|
|
|
|
+ id: this.selectID,
|
|
|
|
+ compId:this.user.companyId,
|
|
|
|
+ }, 'application/json;charset=UTF-8').then(res => {
|
|
|
|
+ console.log(res);
|
|
|
|
+ if (res.statusCode == 200) {
|
|
|
|
+
|
|
|
|
+ this.getList()
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ .catch(res => {
|
|
|
|
+ if (res.message) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.message,
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: "接受邀请失败,请稍后再试。",
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
},
|
|
},
|
|
- //接受并认证
|
|
|
|
- attestation() {},
|
|
|
|
close() {
|
|
close() {
|
|
uni.navigateBack(-1)
|
|
uni.navigateBack(-1)
|
|
}
|
|
}
|
|
@@ -164,7 +216,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
.content-bottom {
|
|
.content-bottom {
|
|
- padding: 50rpx 50rpx 0 50rpx;
|
|
|
|
|
|
+ padding: 50rpx 50rpx 50rpx 50rpx;
|
|
|
|
|
|
.title {
|
|
.title {
|
|
font-size: 32rpx;
|
|
font-size: 32rpx;
|