|
@@ -1,81 +1,68 @@
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
|
- <el-dialog
|
|
|
|
|
- :visible.sync="showDialog"
|
|
|
|
|
- :title="title"
|
|
|
|
|
- :modal-append-to-body="false"
|
|
|
|
|
- style="text-align: left;"
|
|
|
|
|
- @close="closeDialog"
|
|
|
|
|
- :close-on-click-modal="false"
|
|
|
|
|
- width="900px"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-dialog :visible.sync="showDialog" :title="title" :modal-append-to-body="false" style="text-align: left;" @close="closeDialog" :close-on-click-modal="false" width="900px">
|
|
|
<div class="user-panel" v-loading="loading">
|
|
<div class="user-panel" v-loading="loading">
|
|
|
- <el-form
|
|
|
|
|
- ref="form"
|
|
|
|
|
- :model="formModel"
|
|
|
|
|
- :rules="ruleValidate"
|
|
|
|
|
- :label-width="'100px'"
|
|
|
|
|
- :inline="true"
|
|
|
|
|
- >
|
|
|
|
|
- <el-form-item label="师傅姓名" prop="realName">
|
|
|
|
|
- <el-input v-model="formModel.realName" placeholder="请输入真实姓名" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="师傅电话" prop="phone">
|
|
|
|
|
- <el-input v-model="formModel.phone" placeholder="请输入联系电话" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="身份证号" prop="idCard">
|
|
|
|
|
- <el-input v-model="formModel.idCard" placeholder="请输入身份证号" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="所在地区" prop="region">
|
|
|
|
|
- <el-input v-model="formModel.region" placeholder="请输入所在地区" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="性别" prop="gender">
|
|
|
|
|
- <el-input v-model="formModel.gender" placeholder="请输入性别" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="简介" prop="introduction">
|
|
|
|
|
- <el-input v-model="formModel.introduction" placeholder="请输入简介" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="服务信息" prop="serviceInfo">
|
|
|
|
|
- <el-input v-model="formModel.serviceInfo" placeholder="请输入服务信息" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="业务范围" prop="businessScope">
|
|
|
|
|
- <el-input v-model="formModel.businessScope" placeholder="请输入业务范围" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="推广码" prop="promoCode">
|
|
|
|
|
- <el-input v-model="formModel.promoCode" placeholder="请输入推广码" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="状态" prop="status">
|
|
|
|
|
- <el-input v-model="formModel.status" placeholder="请输入状态" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="会员等级" prop="level">
|
|
|
|
|
- <el-input v-model="formModel.level" placeholder="请输入会员等级" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="保证金" prop="businessCode">
|
|
|
|
|
- <el-input v-model="formModel.businessCode" placeholder="请输入统一社会信用代码" style="width: 300px"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="头像" prop="image">
|
|
|
|
|
- <el-upload
|
|
|
|
|
- style="width:300px"
|
|
|
|
|
- class="avatar-uploader"
|
|
|
|
|
- name="photoFile"
|
|
|
|
|
- :action="uploadUrl"
|
|
|
|
|
- :headers="headers"
|
|
|
|
|
- :data="uploadData"
|
|
|
|
|
- :show-file-list="false"
|
|
|
|
|
- :on-success="handleAvatarSuccess"
|
|
|
|
|
- :before-upload="beforeAvatarUpload">
|
|
|
|
|
- <img v-if="fileUrl" :src="fileUrl" class="avatar">
|
|
|
|
|
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
|
|
- </el-upload>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
|
|
+ <el-tabs type="border-card">
|
|
|
|
|
+ <el-tab-pane label="实名信息">
|
|
|
|
|
+ <el-descriptions class="margin-top" title="实名信息" :column="3" border>
|
|
|
|
|
+ <template slot="extra">
|
|
|
|
|
+ <el-button v-if="technicianModel.isVerified != true" type="primary" size="small" @click="checkedRealName">实名审核</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-descriptions-item>
|
|
|
|
|
+ <template slot="label">姓名</template>
|
|
|
|
|
+ {{technicianModel.realName}}
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item>
|
|
|
|
|
+ <template slot="label">性别</template>
|
|
|
|
|
+ <span v-if="technicianModel.gender == 1">男</span>
|
|
|
|
|
+ <span v-if="technicianModel.gender == 2">女</span>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item>
|
|
|
|
|
+ <template slot="label">身份证号</template>
|
|
|
|
|
+ {{technicianModel.idCard}}
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item>
|
|
|
|
|
+ <template slot="label">身份证照片</template>
|
|
|
|
|
+ <el-image v-for="url in technicianModel.idCardImageList" style="height: 224px" :key="url" :src="url"></el-image>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ </el-descriptions>
|
|
|
|
|
+ </el-tab-pane>
|
|
|
|
|
+ <el-tab-pane label="入驻信息">
|
|
|
|
|
+ <el-descriptions class="margin-top" title="入驻信息" :column="2" :size="size" border>
|
|
|
|
|
+ <template slot="extra">
|
|
|
|
|
+ <el-button v-if="technicianModel.status != '2'" type="primary" size="small" @click="checkedSettleIn">入驻审核</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-descriptions-item>
|
|
|
|
|
+ <template slot="label">服务地区</template>
|
|
|
|
|
+ {{technicianModel.region}}
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item>
|
|
|
|
|
+ <template slot="label">业务范围</template>
|
|
|
|
|
+ {{technicianModel.businessScope}}
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item>
|
|
|
|
|
+ <template slot="label">服务信息</template>
|
|
|
|
|
+ {{technicianModel.serviceInfo}}
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ </el-descriptions>
|
|
|
|
|
+ </el-tab-pane>
|
|
|
|
|
+ <el-tab-pane label="资质信息">
|
|
|
|
|
+ <el-descriptions class="margin-top" title="资质信息" :column="1" border>
|
|
|
|
|
+ <template slot="extra">
|
|
|
|
|
+ <el-button v-if="technicianModel.qualificationStatus != true" type="primary" size="small" @click="checkedQualification">资质审核</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-descriptions-item>
|
|
|
|
|
+ <template slot="label">资质照片</template>
|
|
|
|
|
+ <el-image v-for="url in technicianModel.qualificationList" style="height: 224px" :key="url" :src="url"></el-image>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ </el-descriptions>
|
|
|
|
|
+ </el-tab-pane>
|
|
|
|
|
+ </el-tabs>
|
|
|
</div>
|
|
</div>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
+ <!-- <span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="closeDialog">取 消</el-button>
|
|
<el-button @click="closeDialog">取 消</el-button>
|
|
|
- <el-button type="primary" @click="handleSubmit" :loading="submitting"
|
|
|
|
|
- >确 定</el-button
|
|
|
|
|
- >
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <el-button type="primary" @click="handleSubmit" :loading="submitting">确 定</el-button>
|
|
|
|
|
+ </span> -->
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -87,132 +74,106 @@
|
|
|
props: ["businessKey", "title"],
|
|
props: ["businessKey", "title"],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- showPwd: true,
|
|
|
|
|
- ruleValidate: {
|
|
|
|
|
- realName: [
|
|
|
|
|
- { required: true, message: "管理员姓名不能为空", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- phone: [
|
|
|
|
|
- { required: true, message: "联系电话不能为空", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- companyName: [
|
|
|
|
|
- { required: true, message: "企业名称不能为空", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- age: [
|
|
|
|
|
- { required: true, message: "年龄不能为空", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- gender: [
|
|
|
|
|
- { required: true, message: "性别不能为空", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
- roleList: [],
|
|
|
|
|
- formModel: {},
|
|
|
|
|
|
|
+ technicianModel: {},
|
|
|
showDialog: true,
|
|
showDialog: true,
|
|
|
loading: false,
|
|
loading: false,
|
|
|
submitting: false,
|
|
submitting: false,
|
|
|
- enterpriseList:[],
|
|
|
|
|
- //上传地址
|
|
|
|
|
- uploadUrl: Constant.serverUrl + "/uploadPicture",
|
|
|
|
|
- uploadData: {
|
|
|
|
|
- subFolder: "water-tank",
|
|
|
|
|
- },
|
|
|
|
|
- fileUrl: "",
|
|
|
|
|
- headers: {
|
|
|
|
|
- Authorization: getToken(),
|
|
|
|
|
- },
|
|
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
- },
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ showInfo() {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ self.loading = true;
|
|
|
|
|
+
|
|
|
|
|
+ technicianInfoApi.detail(self.businessKey).then(function(response) {
|
|
|
|
|
+ self.loading = false;
|
|
|
|
|
+ var jsonData = response.data;
|
|
|
|
|
+
|
|
|
|
|
+ if (jsonData.result) {
|
|
|
|
|
+ self.technicianModel = jsonData.data.technician;
|
|
|
|
|
+ console.log(self.technicianModel);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ self.$message.error(jsonData.message + "");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ self.loading = false;
|
|
|
|
|
+ }).catch((error)=>{
|
|
|
|
|
+ self.loading = false;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
closeDialog() {
|
|
closeDialog() {
|
|
|
this.$emit("close", false);
|
|
this.$emit("close", false);
|
|
|
},
|
|
},
|
|
|
- handleSubmit() {
|
|
|
|
|
|
|
+ checkedRealName(record){
|
|
|
var self = this;
|
|
var self = this;
|
|
|
|
|
|
|
|
- this.$refs["form"].validate((valid) => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- (function () {
|
|
|
|
|
- var id = self.formModel.id;
|
|
|
|
|
-
|
|
|
|
|
- if (id == null || id.length == 0) {
|
|
|
|
|
- return technicianInfoApi.add(self.formModel);
|
|
|
|
|
- } else {
|
|
|
|
|
- return technicianInfoApi.update(self.formModel);
|
|
|
|
|
- }
|
|
|
|
|
- })().then(function (response) {
|
|
|
|
|
- var jsonData = response.data;
|
|
|
|
|
-
|
|
|
|
|
- if (jsonData.result) {
|
|
|
|
|
- self.$message({
|
|
|
|
|
- message: "保存成功!",
|
|
|
|
|
- type: "success",
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- self.$emit("close", true);
|
|
|
|
|
- } else {
|
|
|
|
|
- self.$message({
|
|
|
|
|
- message: jsonData.message + "",
|
|
|
|
|
- type: "warning",
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.$confirm("是否确认审核?", "提示", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning"
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ technicianInfoApi.checkedRealName(self.businessKey).then(function(response) {
|
|
|
|
|
+ var jsonData = response.data;
|
|
|
|
|
+
|
|
|
|
|
+ if (jsonData.result) {
|
|
|
|
|
+ self.showInfo();
|
|
|
|
|
+
|
|
|
|
|
+ self.$message({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ message: "审核成功!"
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ checkedSettleIn(record){
|
|
|
|
|
+ var self = this;
|
|
|
|
|
|
|
|
- self.$emit("close", false);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.$confirm("是否确认审核?", "提示", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning"
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ technicianInfoApi.checkedSettleIn(self.businessKey).then(function(response) {
|
|
|
|
|
+ var jsonData = response.data;
|
|
|
|
|
+
|
|
|
|
|
+ if (jsonData.result) {
|
|
|
|
|
+ self.showInfo();
|
|
|
|
|
+
|
|
|
|
|
+ self.$message({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ message: "审核成功!"
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- handleAvatarSuccess(res, file) {
|
|
|
|
|
- var self = this;
|
|
|
|
|
- self.formModel.image = res.data;
|
|
|
|
|
|
|
+ checkedQualification(record){
|
|
|
|
|
+ var self = this;
|
|
|
|
|
|
|
|
- self.fileUrl =
|
|
|
|
|
- res.data + "?x-oss-process=image/resize,m_lfit,h_300,w_300";
|
|
|
|
|
|
|
+ this.$confirm("是否确认审核?", "提示", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning"
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ technicianInfoApi.checkedQualification(self.businessKey).then(function(response) {
|
|
|
|
|
+ var jsonData = response.data;
|
|
|
|
|
+
|
|
|
|
|
+ if (jsonData.result) {
|
|
|
|
|
+ self.showInfo();
|
|
|
|
|
+
|
|
|
|
|
+ self.$message({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ message: "审核成功!"
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- beforeAvatarUpload(file) {
|
|
|
|
|
- const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
|
|
- if (!isLt2M) {
|
|
|
|
|
- this.$message.error('上传头像图片大小不能超过 2MB!');
|
|
|
|
|
- }
|
|
|
|
|
- return isLt2M;
|
|
|
|
|
- }
|
|
|
|
|
},
|
|
},
|
|
|
async mounted() {
|
|
async mounted() {
|
|
|
var self = this;
|
|
var self = this;
|
|
|
- self.loading = true;
|
|
|
|
|
-
|
|
|
|
|
- (function () {
|
|
|
|
|
- if (self.businessKey != null && self.businessKey.length > 0) {
|
|
|
|
|
- return technicianInfoApi.edit(self.businessKey);
|
|
|
|
|
- } else {
|
|
|
|
|
- return technicianInfoApi.create();
|
|
|
|
|
- }
|
|
|
|
|
- })()
|
|
|
|
|
- .then((response) => {
|
|
|
|
|
- var jsonData = response.data;
|
|
|
|
|
-
|
|
|
|
|
- if (jsonData.result) {
|
|
|
|
|
- self.formModel = jsonData.data;
|
|
|
|
|
-
|
|
|
|
|
- let image = self.formModel.image;
|
|
|
|
|
- if (image != null) {
|
|
|
|
|
- self.fileUrl = image
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- self.showModal = true;
|
|
|
|
|
- } else {
|
|
|
|
|
- self.$message.error(jsonData.message + "");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- self.loading = false;
|
|
|
|
|
- })
|
|
|
|
|
- .catch((error) => {
|
|
|
|
|
- self.$message.error(error + "");
|
|
|
|
|
- self.loading = false;
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- components: {
|
|
|
|
|
|
|
+ self.showInfo();
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|