|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title+'-列表', essential: true }]">
|
|
|
+ <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
|
|
|
<template slot-scope="{activeKey, data}">
|
|
|
<div :style="{
|
|
|
width: '100%',
|
|
@@ -18,6 +18,20 @@
|
|
|
</el-radio-group>
|
|
|
<br><br>
|
|
|
</div>
|
|
|
+ <el-dialog title="绑定辅助师傅" width="500px" :modal="true" :visible.sync="formDialogaddsf" :show-close="true"
|
|
|
+ :close-on-click-modal="false" :before-close="formCancelaa">
|
|
|
+ <zj-form-container ref="formRefaa" :form-data="formDataaa" :styleSwitch="false" :formAttributes="{
|
|
|
+ 'label-position': 'top'
|
|
|
+ }">
|
|
|
+ <zj-form-module title="绑定辅助师傅" label-width="100px" :showHade="false" :form-data="formDataaa"
|
|
|
+ :form-items="formItemsaa">
|
|
|
+ </zj-form-module>
|
|
|
+ </zj-form-container>
|
|
|
+ <div slot="footer">
|
|
|
+ <el-button size="mini" @click="formCancelaa">取 消</el-button>
|
|
|
+ <el-button size="mini" @click="queding">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</template-page>
|
|
|
</div>
|
|
|
<div v-if="~['examine', 'detail'].indexOf(activeKey)" style="box-sizing: border-box;padding: 16px;">
|
|
@@ -42,7 +56,7 @@
|
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
|
import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
|
|
|
-import { memberListPageV2, memberPageExport, getMemberDetail, memberAudit, memberInner } from "@/api/masterManagement";
|
|
|
+import { memberSlaveBind, memberListPageV2, memberPageExport, getMemberDetail, memberAudit, memberInner } from "@/api/masterManagement";
|
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
|
export default {
|
|
|
components: { TemplatePage },
|
|
@@ -66,9 +80,16 @@ export default {
|
|
|
formData: {
|
|
|
type: '工程师',
|
|
|
examineRemark: '',
|
|
|
- examineStatus:''
|
|
|
+ examineStatus: ''
|
|
|
+ },
|
|
|
+ examineStatus: '',
|
|
|
+ formDialogaddsf: false,
|
|
|
+ formDataaa: {
|
|
|
+ slaveUserId: "",
|
|
|
+ userId: "",
|
|
|
+ websitId: ""
|
|
|
},
|
|
|
- examineStatus: ''
|
|
|
+ suoyoushifu: []
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -140,9 +161,9 @@ export default {
|
|
|
},
|
|
|
render: (h, { props, onInput }) => {
|
|
|
var { value } = props
|
|
|
- console.log(this.formData.idCardImg)
|
|
|
+ console.log(this.formData.idCardImg)
|
|
|
return (
|
|
|
- this.formData.idCardImg? <el-image src={this.formData.idCardImg} style='width: 120px;height:120px' preview-src-list={[this.formData.idCardImg]} fit="fit"></el-image>:''
|
|
|
+ this.formData.idCardImg ? <el-image src={this.formData.idCardImg} style='width: 120px;height:120px' preview-src-list={[this.formData.idCardImg]} fit="fit"></el-image> : ''
|
|
|
)
|
|
|
}
|
|
|
}, {
|
|
@@ -176,9 +197,50 @@ export default {
|
|
|
rules: []
|
|
|
}
|
|
|
}]
|
|
|
+ },
|
|
|
+ formItemsaa() {
|
|
|
+ return [{
|
|
|
+ md: 24,
|
|
|
+ isShow: true,
|
|
|
+ name: 'el-select',
|
|
|
+ options: this.suoyoushifu,
|
|
|
+ attributes: { placeholder: '请输入' },
|
|
|
+ formItemAttributes: {
|
|
|
+ label: '选择师傅',
|
|
|
+ prop: 'slaveUserId',
|
|
|
+ rules: [...required]
|
|
|
+ },
|
|
|
+ events: {
|
|
|
+ change: (val) => {
|
|
|
+ if (val) {
|
|
|
+ this.formDataaa.websitId = this.suoyoushifu.find(item => item.value == val)?.websitId
|
|
|
+ } else {
|
|
|
+ this.formDataaa.websitId = ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ queding() {
|
|
|
+ this.$refs.formRefaa.validate((valid, invalidFields, errLabels) => {
|
|
|
+ if (valid) {
|
|
|
+ memberSlaveBind(this.formDataaa).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '绑定成功成功'
|
|
|
+ })
|
|
|
+ this.formCancelaa()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ formCancelaa() {
|
|
|
+ this.$refs?.formRefaa?.$refs?.inlineForm?.clearValidate()
|
|
|
+ this.$data.formDataaa = this.$options.data().formDataaa
|
|
|
+ this.formDialogaddsf = false
|
|
|
+ },
|
|
|
// 切换状态
|
|
|
changeType(val) {
|
|
|
this.$refs.pageRef.refreshList()
|
|
@@ -296,9 +358,18 @@ export default {
|
|
|
},
|
|
|
bindWorker: {
|
|
|
btnType: 'text',
|
|
|
+ conditions: ({ row, index, column }) => {
|
|
|
+ return row.examineStatus == 'OK'
|
|
|
+ },
|
|
|
click: ({ row, index, column }) => {
|
|
|
- memberListPageV2({"pageNum":1,"pageSize":-1,"params":[]}).then(res=>{
|
|
|
- res.data.records.filter(item=>item.id!=row.id)
|
|
|
+ memberListPageV2({ "pageNum": 1, "pageSize": -1, "params": [{"param":"b.examine_status","compare":"=","value":"OK"}] }).then(res => {
|
|
|
+ this.suoyoushifu = res.data.records.filter(item => item.id != row.id).map(item => ({
|
|
|
+ label: item.nickName,
|
|
|
+ value: item.userId,
|
|
|
+ websitId: item.websitId
|
|
|
+ }))
|
|
|
+ this.formDataaa.userId = row.userId
|
|
|
+ this.formDialogaddsf = true
|
|
|
})
|
|
|
}
|
|
|
},
|