|
@@ -41,6 +41,21 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="身份证号码" :required="true">
|
|
|
|
+ <el-input v-model="workerForm.idCard" placeholder="请输入"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="身份证正面照" :required="true">
|
|
|
|
+ <ImageUpload :fileList="fileList" :limit="1" :isEdit="true" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" v-for="(item,index) in imgList" :key="index">
|
|
|
|
+ <el-form-item :label="item.dictValue" :required="true">
|
|
|
|
+ <ImageUpload :fileList="item.imgs" :limit="1" :isEdit="true" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -54,11 +69,13 @@
|
|
<script>
|
|
<script>
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
|
|
+import ImageUpload from '@/components/file-upload'
|
|
import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
|
|
import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
|
|
import { memberListService2,memberPageExport, getMemberDetail, memberAudit, memberInner, memberInsideInner, getWebsit } from "@/api/distributorManagement";
|
|
import { memberListService2,memberPageExport, getMemberDetail, memberAudit, memberInner, memberInsideInner, getWebsit } from "@/api/distributorManagement";
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
|
|
+import request from '@/utils/request'
|
|
export default {
|
|
export default {
|
|
- components: { TemplatePage },
|
|
|
|
|
|
+ components: { TemplatePage, ImageUpload },
|
|
mixins: [import_mixin,operation_mixin],
|
|
mixins: [import_mixin,operation_mixin],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -79,17 +96,19 @@ export default {
|
|
formDialogType: 0,
|
|
formDialogType: 0,
|
|
formDialogTitles: ["审核", "详情"],
|
|
formDialogTitles: ["审核", "详情"],
|
|
formDialog: false,
|
|
formDialog: false,
|
|
- dialogVisible: false,
|
|
|
|
|
|
+ dialogVisible: false,
|
|
formData: {
|
|
formData: {
|
|
- type: '工程师',
|
|
|
|
- examineRemark: ''
|
|
|
|
|
|
+ type: '工程师',
|
|
|
|
+ examineRemark: ''
|
|
},
|
|
},
|
|
- examineStatus: '',
|
|
|
|
- websitList: [],
|
|
|
|
- workerForm: {
|
|
|
|
- websitId: '',
|
|
|
|
- userId: '',
|
|
|
|
- }
|
|
|
|
|
|
+ examineStatus: '',
|
|
|
|
+ websitList: [],
|
|
|
|
+ workerForm: {
|
|
|
|
+ websitId: '',
|
|
|
|
+ userId: '',
|
|
|
|
+ },
|
|
|
|
+ fileList: [],
|
|
|
|
+ imgList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -183,6 +202,9 @@ export default {
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ created(){
|
|
|
|
+ this.getImgList()
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 切换状态
|
|
// 切换状态
|
|
changeType(val) {
|
|
changeType(val) {
|
|
@@ -200,6 +222,17 @@ export default {
|
|
console.log(error)
|
|
console.log(error)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ getImgList(){
|
|
|
|
+ request({
|
|
|
|
+ url: `/dictCompany/page`,
|
|
|
|
+ method: 'post',
|
|
|
|
+ data: { pageNum: 1, pageSize: -1, params: [{param: "a.dict_type", compare: "=", value: "WORKER_IMG"}] }
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ this.imgList = res.data.records.filter(item=>{
|
|
|
|
+ return item.imgs = []
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 列表导出函数
|
|
// 列表导出函数
|
|
exportList: memberPageExport,
|
|
exportList: memberPageExport,
|
|
// 表格列解析渲染数据更改
|
|
// 表格列解析渲染数据更改
|
|
@@ -265,7 +298,7 @@ export default {
|
|
click: ({ row, index, column }) => {
|
|
click: ({ row, index, column }) => {
|
|
memberInner({
|
|
memberInner({
|
|
type: 'GENERAL',
|
|
type: 'GENERAL',
|
|
- userIds: row.userId
|
|
|
|
|
|
+ userId: row.userId
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.$message({ type: 'success', message: '设为客户成功!' })
|
|
this.$message({ type: 'success', message: '设为客户成功!' })
|
|
@@ -325,13 +358,34 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
memberInner(){
|
|
memberInner(){
|
|
|
|
+ let workerImgs = []
|
|
|
|
+ for(var i = 0;i < this.imgList.length;i++){
|
|
|
|
+ if(this.imgList[i].imgs.length == 0){
|
|
|
|
+ return this.$message({ type: 'error', message: '请上传' + this.imgList[i].dictValue +'!' })
|
|
|
|
+ break;
|
|
|
|
+ }else{
|
|
|
|
+ workerImgs.push({
|
|
|
|
+ imgName: this.imgList[i].dictValue,
|
|
|
|
+ imgUrl: this.imgList[i].imgs.length>0?this.imgList[i].imgs[0].url:''
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if(!this.workerForm.websitId){
|
|
if(!this.workerForm.websitId){
|
|
return this.$message({ type: 'error', message: '请选择入驻网点!' })
|
|
return this.$message({ type: 'error', message: '请选择入驻网点!' })
|
|
|
|
+ }else if(!this.workerForm.idCard){
|
|
|
|
+ return this.$message({ type: 'error', message: '请输入身份证号码!' })
|
|
|
|
+ }else if(!/^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}[\dXx]$/g.test(this.workerForm.idCard)){
|
|
|
|
+ return this.$message({ type: 'error', message: '请输入正确的身份证号码!' })
|
|
|
|
+ }else if(this.fileList.length == 0){
|
|
|
|
+ return this.$message({ type: 'error', message: '请上传身份证正面照!' })
|
|
}
|
|
}
|
|
memberInner({
|
|
memberInner({
|
|
type: 'WORKER',
|
|
type: 'WORKER',
|
|
- userIds: this.workerForm.userId,
|
|
|
|
- websitId: this.workerForm.websitId
|
|
|
|
|
|
+ userId: this.workerForm.userId,
|
|
|
|
+ websitId: this.workerForm.websitId,
|
|
|
|
+ idCard: this.workerForm.idCard,
|
|
|
|
+ idCardImg: this.fileList.map(item => item.url).join(","),
|
|
|
|
+ workerImgs
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.dialogVisible = false
|
|
this.dialogVisible = false
|
|
this.$message({ type: 'success', message: '设置工程师成功!' })
|
|
this.$message({ type: 'success', message: '设置工程师成功!' })
|