Ver código fonte

确权调查移动端

wulanhaote
yujk 3 anos atrás
pai
commit
3f3689f96c
2 arquivos alterados com 28 adições e 2 exclusões
  1. +8
    -0
      src/api/authenticRight/index.js
  2. +20
    -2
      src/views/authenticRight/index.vue

+ 8
- 0
src/api/authenticRight/index.js Ver arquivo

@@ -62,3 +62,11 @@ export function listSamplingDept(data){
params:data params:data
}) })
} }
// 修改农户抽样
export function uploadFile(data) {
return request({
url: '/transaction/website/ocr/idcard',
method: 'post',
data: data
})
}

+ 20
- 2
src/views/authenticRight/index.vue Ver arquivo

@@ -111,7 +111,13 @@
label-width="120px" label-width="120px"
placeholder="被核查人姓名" placeholder="被核查人姓名"
:rules="[{ required: true, message: '请填写被核查人姓名' }]" :rules="[{ required: true, message: '请填写被核查人姓名' }]"
/>
>
<template #button>
<van-uploader :after-read="afterRead" v-model="fileList" :preview-image="false" :max-count="1">
<van-button icon="photograph" type="primary" size="mini">扫描身份证</van-button>
</van-uploader>
</template>
</van-field>
<van-field <van-field
v-model="xcdcform.idcardCheckedBy" v-model="xcdcform.idcardCheckedBy"
name="idcardCheckedBy" name="idcardCheckedBy"
@@ -474,7 +480,7 @@
getInvestigate, getInvestigate,
listSampling, listSamplingDept, listSampling, listSamplingDept,
updateInvestigate, updateInvestigate,
updateSampling
updateSampling, uploadFile
} from "../../api/authenticRight"; } from "../../api/authenticRight";
import {getDeptList} from "../../api/biddingHall"; import {getDeptList} from "../../api/biddingHall";
import {Dialog} from "vant"; import {Dialog} from "vant";
@@ -613,6 +619,7 @@
userId :null, userId :null,
nickName:null, nickName:null,
currentValue:null, currentValue:null,
fileList:[]
} }
}, },
created(){ created(){
@@ -631,6 +638,17 @@


}, },
methods:{ methods:{
afterRead(file) {
const data = new FormData();
data.append("file", this.fileList[0].file);
uploadFile(data).then(res => {
if(res.code == 200){
this.xcdcform.idcardCheckedBy = res.idcardCheckedBy
this.xcdcform.nameCheckedBy = res.nameCheckedBy
this.fileList=[]
}
})
},
changeFn(val) { changeFn(val) {
}, },
confirmFn(){ confirmFn(){


Carregando…
Cancelar
Salvar