|
|
@@ -221,6 +221,12 @@
|
|
|
@click="handleRevenue(scope.row)"
|
|
|
v-hasPermi="['company:company:revenue']"
|
|
|
>分账配置</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-phone-outline"
|
|
|
+ @click="handleBatchCreateExtension(scope.row)"
|
|
|
+ >一键创建分机</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -753,6 +759,26 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!-- 批量创建分机 -->
|
|
|
+ <el-dialog title="批量创建分机" :visible.sync="extensionDialog.open" width="500px" append-to-body>
|
|
|
+ <el-form ref="extensionForm" :model="extensionForm" :rules="extensionRules" label-width="120px">
|
|
|
+ <el-form-item label="公司">
|
|
|
+ <el-input v-model="extensionDialog.companyName" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="生成数量" prop="createNum">
|
|
|
+ <el-input-number v-model="extensionForm.createNum" :min="1" :max="500" placeholder="请输入生成数量"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="分机密码" prop="password">
|
|
|
+ <el-input v-model="extensionForm.password" placeholder="请输入分机密码" style="width: 200px;"/>
|
|
|
+ <span style="color: #999; font-size: 12px; margin-left: 10px;">默认密码:123456</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitBatchCreateExtension" :loading="extensionDialog.loading">确 定</el-button>
|
|
|
+ <el-button @click="extensionDialog.open=false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -771,7 +797,8 @@ import {
|
|
|
resetPwd,
|
|
|
getDivConfig,
|
|
|
setDiv, exitMiniProgram,
|
|
|
- getGatewayCompanyList
|
|
|
+ getGatewayCompanyList,
|
|
|
+ batchCreateExtension
|
|
|
} from '@/api/his/company'
|
|
|
import { getFollowDoctorList } from '@/api/his/doctor'
|
|
|
import { docList } from '@/api/his/doctor'
|
|
|
@@ -969,6 +996,24 @@ export default {
|
|
|
open: false,
|
|
|
title: '批量修改小程序'
|
|
|
},
|
|
|
+ extensionDialog: {
|
|
|
+ open: false,
|
|
|
+ companyName: '',
|
|
|
+ companyId: null,
|
|
|
+ loading: false
|
|
|
+ },
|
|
|
+ extensionForm: {
|
|
|
+ createNum: 1,
|
|
|
+ password: '123456'
|
|
|
+ },
|
|
|
+ extensionRules: {
|
|
|
+ createNum: [
|
|
|
+ { required: true, message: '生成数量不能为空', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ password: [
|
|
|
+ { required: true, message: '分机密码不能为空', trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -1428,6 +1473,39 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ handleBatchCreateExtension(row) {
|
|
|
+ this.extensionDialog.companyName = row.companyName
|
|
|
+ this.extensionDialog.companyId = row.companyId
|
|
|
+ this.extensionForm.createNum = 1
|
|
|
+ this.extensionForm.password = '123456'
|
|
|
+ this.extensionDialog.open = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.extensionForm) {
|
|
|
+ this.$refs.extensionForm.clearValidate()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ submitBatchCreateExtension() {
|
|
|
+ this.$refs['extensionForm'].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.extensionDialog.loading = true
|
|
|
+ const param = {
|
|
|
+ companyId: this.extensionDialog.companyId,
|
|
|
+ createNum: this.extensionForm.createNum,
|
|
|
+ password: this.extensionForm.password
|
|
|
+ }
|
|
|
+ batchCreateExtension(param).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.msgSuccess('批量创建分机成功')
|
|
|
+ this.extensionDialog.open = false
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.extensionDialog.loading = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|