123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- <template>
- <view class="center">
- <view >
- <view class="title">粮商身份</view>
- <view class='cu-tag radius line-pink' @click="adddriver(1)">新增</view>
- <view v-for="(item , index) in businessman" :Key="index" >
-
-
- <view class="company">{{item.compName}}</view>
- <view class="guess-item" >
- <view class="infos" @click="navToDetailPage(1,item)">
- <view class="info">{{item.customerName}}
- <view class='cu-tag radius line-pink but'>{{item.authenticationStatus}}</view>
- </view>
- <view class="info">{{item.customerPhone}}</view>
-
-
- </view>
- <label>
- <checkbox :value="1" /><text>设置默认</text>
- </label>
- <view class='cu-tag radius line-pink ' @click="deleteLS(item)">删除</view>
- <view class='cu-tag radius line-pink ' @click="companyEdit(item)" >修改</view>
- <view class='cu-tag radius line-pink but'>更换手机号</view>
- </view>
- <hr>
- </view>
- </view>
- <view class="margin-top" >
- <view class="title">司机身份</view>
- <view class='cu-tag radius line-pink' @click="adddriver(2)">新增</view>
- <view v-for="(items , index) in drivers" :Key="index">
-
-
- <view class="guess-item" @click="navToDetailPage(2,items)">
- <view class="infos">
- <view class="info">{{items.driverName}}
- <view class='cu-tag radius line-pink but'>{{items.authenticationStatus}}</view>
- </view>
- <view class="info">{{items.driverPhone}}</view>
- </view>
- </view>
- <view class='cu-tag radius line-pink ' @click="deleteSJ(items)">删除</view>
- <view class='cu-tag radius line-pink ' @click="driverIdentityEdit(items)">修改</view>
- <view class='cu-tag radius line-pink but'>更换手机号</view>
- <hr>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex';
- export default {
- name: "buy",
- data() {
- return {
- PageCur: "buy",
- buyInfo: [],
- pages: 1, //页数
- limit: 10, //每次取条目数
- loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
- isLoadMore: false, //是否加载中
- showTran: true,
- scrollTop: 0,
- TabCur: 0,
- current: 1,
- identityAuthenticationInfo:{
- pageSize:10,
- currentPage:1,
- commonId:"",
- },
- businessman:[],
- drivers:[],
- deletes:{
- id:"",
- },
- };
- },
- onLoad(){
- this.getList()
- },
- computed: {
- ...mapState(['hasLogin','userInfo'])
- },
- methods: {
- driverIdentityEdit(items){
- uni.navigateTo({
- url: `/pageD/identity/driverIdentityEdit?id=${items.id}`
- })
- },
- companyEdit(item){
- uni.navigateTo({
- url: `/pageD/identity/companyIdentityEdit?id=${item.id}`
- })
- },
- deleteLS(item){
- uni.showModal({
- // title: '登录提示',
- content: '身份信息删除后不可恢复,是否确定删除?',
- showCancel: true,
- confirmText: '确定',
- success: (e) => {
- this.$api.doRequest('post','/identityAuthenticationInfo/api/deleteIdentityAuthenticationInfo',{id:item.id},'application/json;charset=UTF-8').then(res => {
- this.procurementPlanInfos = res.data.data.records
- if (res.errmsg == "Success") {
- this.$api.msg('删除成功!')
- this.getList()
- return
- }
-
- })
- .catch(res => {
- uni.showToast({
- title: res.errmsg,
- icon:'none',
- duration: 2000
- })
- });
- },
- fail: () => {},
- complete: () => {}
- })
- },
- deleteSJ(item){
- console.log(item.driverName)
- this.deletes = {}
- this.deletes.id = item.id
- uni.showModal({
- // title: '登录提示',
- content: '身份信息删除后不可恢复,是否确定删除?',
- showCancel: true,
- confirmText: '确定',
- success: (e) => {
- this.$api.doRequest('get','/driverViewInfo/api/deleteDriver',this.deletes,'application/json;charset=UTF-8').then(res => {
- this.procurementPlanInfos = res.data.data.records
- if (res.errmsg == "Success") {
- this.$api.msg('删除成功!')
- this.getList()
- return
- }
-
- })
- .catch(res => {
- uni.showToast({
- title: res.errmsg,
- icon:'none',
- duration: 2000
- })
- });
- },
- fail: () => {},
- complete: () => {}
- })
- },
- getList(){
- this.identityAuthenticationInfo.commonId = this.userInfo.id
- this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {pageSize:10,
- currentPage:1,
- commonId:this.userInfo.id},'application/json;charset=UTF-8').then(res => {
- console.log("成功连接")
-
-
- this.businessman = res.data.data.records
- })
- .catch(res => {
- uni.showToast({
- title: res.errmsg,
- icon: 'none',
- duration: 2000
- })
- });
-
- this.$api.doRequest('get', '/driverViewInfo/selectDriverInfoPage', {pageSize:10,
- currentPage:1,
- commonId:this.userInfo.id,flag:0},'application/json;charset=UTF-8').then(res => {
- console.log("成功连接")
-
- this.drivers = res.data.data.records
-
- console.log(this.drivers,"skalkdkk")
- })
- .catch(res => {
- uni.showToast({
- title: res.errmsg,
- icon: 'none',
- duration: 2000
- })
- });
- },
- adddriver(index) {
- if (index == 1) {
- uni.navigateTo({
- url: `/pageD/identity/companyIdentity`
- })
- } else {
- uni.navigateTo({
- url: `/pageD/identity/driverIdentity`
- })
- }
- },
- navToDetailPage(index,item) {
- if (index == 1) {
- uni.navigateTo({
- url: `/pageD/identity/companyIdentityLook?id=${item.id}`
- })
- } else {
- uni.navigateTo({
- url: `/pageD/identity/driverIdentityLook?id=${item.id}`
- })
- }
- }
- }
- }
- </script>
- <style>
- .center {
- padding: 10px 20px;
- }
- .title {
- font-size: 18px;
- font-weight: 900;
- margin-right: 20px;
- display: initial;
- }
- .company {
- font-size: 16px;
- margin-top: 10px;
- }
- .infos {
- /* margin: 10px 20px; */
- width: 100%;
- display: inline-table;
- }
- .info {
- line-height: 20px;
- }
- .but {
- right: 3px;
- float: right;
- }
- </style>
|