更新
This commit is contained in:
parent
c641332a17
commit
baced9f6a1
@ -40,28 +40,17 @@ const {isVisible,title,id,api} = toRefs(props);
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
const handleClose = () => {
|
||||
emits('closeChangeOk',false);
|
||||
// alert(flag)
|
||||
}
|
||||
|
||||
// Akiraka 20230210 确认按钮 => 开始数据检查
|
||||
const handleConfirm = async () => {
|
||||
const {code}=api.value(id.value);
|
||||
if(code==200){
|
||||
const data=title.value=="确定启用吗?"?await api.value(id.value,{status:1}):await api.value(id.value);
|
||||
if(data.code==200){
|
||||
Message.success("成功");
|
||||
proxy.$refs.modalFormRef.resetFields();
|
||||
//proxy.$refs.modalFormRef.resetFields();
|
||||
}else{
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
emits('closeChangeOk',true);
|
||||
// api.value(id.value).then(response => {
|
||||
// // Akiraka 20230210 关闭弹窗
|
||||
// if(response.code==200){
|
||||
// Message.success("成功");
|
||||
// proxy.$refs.modalFormRef.resetFields();
|
||||
// }else{
|
||||
// proxy.$notification.error(response.message);
|
||||
// }
|
||||
// emits('closeChangeOk',true);
|
||||
// })
|
||||
}
|
||||
</script>
|
||||
@ -3,11 +3,18 @@
|
||||
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
||||
|
||||
<a-form-item field="user_name" label="账号名字">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.user_name" placeholder="请输入账号姓名" @press-enter="handleQuery" />
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.user_name" placeholder="请输入账号或者姓名" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="mobile" label="电话号码">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.mobile" placeholder="请输入电话号码" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<!-- <a-form-item field="status" label="启用状态">
|
||||
<a-select v-model="queryForm.status" placeholder="请选择启用状态" :style="{ width: '182px' }">
|
||||
<a-option :value="0">禁用</a-option>
|
||||
<a-option :value="1">正常</a-option>
|
||||
<a-option :value="2">删除</a-option>
|
||||
</a-select>
|
||||
</a-form-item> -->
|
||||
<a-form-item field="create_range_time" label="创建时间范围">
|
||||
<a-range-picker
|
||||
style="width: 260px"
|
||||
@ -163,12 +170,12 @@
|
||||
// Table Columns
|
||||
const columns = [
|
||||
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
|
||||
{ title: '就诊人名字', dataIndex: 'card_name' },
|
||||
{ title: '所属账号', dataIndex: 'user_name', width: 150 },
|
||||
{ title: '账号电话', dataIndex: 'mobile_mask' },
|
||||
{ title: '与账号关系', dataIndex: 'relation', slotName: 'relation' },
|
||||
{ title: '启用状态', dataIndex: 'status', slotName: 'status' },
|
||||
{ title: '操作', slotName: 'action', fixed: "right", width: 120 },
|
||||
{ title: '就诊人名字', dataIndex: 'card_name',width:200 },
|
||||
{ title: '所属账号', dataIndex: 'user_name', width:200 },
|
||||
{ title: '账号电话', dataIndex: 'mobile_mask',width:200 },
|
||||
{ title: '与账号关系', dataIndex: 'relation', slotName: 'relation',width: 150 },
|
||||
// { title: '启用状态', dataIndex: 'status', slotName: 'status' },
|
||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||
];
|
||||
|
||||
// Table Data
|
||||
|
||||
@ -8,6 +8,14 @@
|
||||
<a-form-item field="mobile" label="电话号码">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.mobile" placeholder="请输入电话号码" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="status" label="启用状态">
|
||||
<a-select v-model="queryForm.status" placeholder="请选择启用状态" :style="{ width: '182px' }">
|
||||
<!-- 状态0:禁用 1:正常 2:删除 -->
|
||||
<a-option :value="0">禁用</a-option>
|
||||
<a-option :value="1">正常</a-option>
|
||||
<a-option :value="2">删除</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="create_range_time" label="创建时间范围">
|
||||
<a-range-picker
|
||||
style="width: 260px"
|
||||
@ -184,7 +192,7 @@
|
||||
<a-form-item field="" label="" no-style>
|
||||
<a-space >
|
||||
<a-button type="primary" v-has="'admin:sysPatientList:disable'" status="danger" @click="handleChangeStatus('0')" v-if="modalForm.status==1">禁用</a-button>
|
||||
<a-button type="primary" status="success" @click="handleChangeStatus('1')" v-if="modalForm.status==0">启用</a-button>
|
||||
<a-button type="primary" v-has="'admin:sysPatientList:disable'" status="success" @click="handleChangeStatus('1')" v-if="modalForm.status==0">启用</a-button>
|
||||
</a-space>
|
||||
<!-- <a-space v-if="modalSatus=='edit'">
|
||||
<a-button type="primary" status="warning">拉黑</a-button>
|
||||
@ -214,6 +222,14 @@
|
||||
</template> -->
|
||||
</a-form>
|
||||
</a-modal>
|
||||
<isOkModal
|
||||
:isVisible="isVisible"
|
||||
:api="changeStatus"
|
||||
:title="'确定启用吗?'"
|
||||
:dealType="'status'"
|
||||
:id="modalForm.patient_id"
|
||||
@closeChangeOk="closeChangeOk"
|
||||
></isOkModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -235,6 +251,7 @@
|
||||
const formRules = reactive({
|
||||
disable_reason: [{ required: true, message: '请输入禁用理由' }]
|
||||
});
|
||||
const isVisible=ref(false);
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
getPatientInfo(pager);
|
||||
@ -360,15 +377,22 @@ const formRules = reactive({
|
||||
}
|
||||
})
|
||||
}
|
||||
//关闭启用弹框
|
||||
const closeChangeOk = () => {
|
||||
isVisible.value = false;
|
||||
modalVisible.value = false;
|
||||
handleQuery();
|
||||
};
|
||||
//改变用户状态
|
||||
const handleChangeStatus=async(status)=>{
|
||||
if(status==0){
|
||||
cur_parent_id.value=modalForm.patient_id;
|
||||
okVisible.value=true;
|
||||
}else{
|
||||
switchStatus(modalForm.patient_id,{
|
||||
status:1
|
||||
})
|
||||
isVisible.value=true
|
||||
// switchStatus(modalForm.patient_id,{
|
||||
// status:1
|
||||
// })
|
||||
}
|
||||
|
||||
// if(record.status==0){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user