|
|
|
|
@ -31,6 +31,12 @@
|
|
|
|
|
<el-tag v-for="item in scope.row.site" type="danger" style="margin-right:10px">{{item.name}}</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="站点总账号" width="120" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-tag v-if="scope.row.is_site_master" type="success" size="small">是</el-tag>
|
|
|
|
|
<span v-else>否</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" @click="handleEdit(scope.row)">编辑</el-button>
|
|
|
|
|
@ -76,6 +82,10 @@
|
|
|
|
|
<el-option v-for="item in siteList" :label="item.name" :value="item.id"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="站点总账号">
|
|
|
|
|
<el-switch v-model="addForm.is_site_master" active-text="是" inactive-text="否" />
|
|
|
|
|
<span class="form-tip">开启后可在工作人员小程序审核本站陪护订单退款(需绑定站点)</span>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="addDialogVisible = false">取 消</el-button>
|
|
|
|
|
@ -109,7 +119,8 @@ export default {
|
|
|
|
|
newPassword: '',
|
|
|
|
|
name: '',
|
|
|
|
|
mobile: '',
|
|
|
|
|
site_id:''
|
|
|
|
|
site_id: '',
|
|
|
|
|
is_site_master: false
|
|
|
|
|
},
|
|
|
|
|
addRules: {
|
|
|
|
|
username: [
|
|
|
|
|
@ -191,7 +202,8 @@ export default {
|
|
|
|
|
newPassword: '',
|
|
|
|
|
name: '',
|
|
|
|
|
mobile: '',
|
|
|
|
|
site_id:''
|
|
|
|
|
site_id: '',
|
|
|
|
|
is_site_master: false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
@ -205,7 +217,13 @@ export default {
|
|
|
|
|
siteIds = row.site_id.split(",")
|
|
|
|
|
}
|
|
|
|
|
console.log("siteIds",siteIds.map(Number))
|
|
|
|
|
this.addForm = { ...row, password: '', newPassword: '',site_id: siteIds.map(Number)}
|
|
|
|
|
this.addForm = {
|
|
|
|
|
...row,
|
|
|
|
|
password: '',
|
|
|
|
|
newPassword: '',
|
|
|
|
|
site_id: siteIds.map(Number),
|
|
|
|
|
is_site_master: !!(row.is_site_master === true || row.is_site_master === 1 || row.is_site_master === '1')
|
|
|
|
|
}
|
|
|
|
|
console.log("this.addForm",this.addForm.site_id)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
@ -238,6 +256,7 @@ export default {
|
|
|
|
|
this.$refs.addFormRef.validate(async valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
let submitData = { ...this.addForm, site_id : this.addForm.site_id?this.addForm.site_id.join(","):''}
|
|
|
|
|
delete submitData.site
|
|
|
|
|
console.log("addForm",this.addForm)
|
|
|
|
|
// this.submitData.site_id = this.addForm.site_id?this.addForm.site_id.join(","):''
|
|
|
|
|
console.log("submitData",submitData)
|
|
|
|
|
@ -311,4 +330,12 @@ h1 {
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-tip {
|
|
|
|
|
display: block;
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #909399;
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|