按钮状态显示
This commit is contained in:
parent
92489a51ff
commit
a42389b4b7
@ -59,18 +59,26 @@ const rules = reactive({
|
||||
});
|
||||
// Akiraka 20230210 确认按钮 => 开始数据检查
|
||||
const handleConfirm = () => {
|
||||
proxy.$refs.modalFormRef.validate((valid) => {
|
||||
proxy.$refs.modalFormRef.validate(async(valid) => {
|
||||
if (!valid) {
|
||||
api.value(id.value,form).then(response => {
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
if(response.code==200){
|
||||
Message.success("取消成功");
|
||||
const {code}= await api.value(id.value,form);
|
||||
if(code==200){
|
||||
Message.success("取消成功");
|
||||
proxy.$refs.modalFormRef.resetFields();
|
||||
}else{
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
emits('closeChange',true);
|
||||
})
|
||||
}else{
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
emits('closeChange',true);
|
||||
// api.value(id.value,form).then(response => {
|
||||
// // Akiraka 20230210 关闭弹窗
|
||||
// if(response.code==200){
|
||||
// Message.success("取消成功");
|
||||
// proxy.$refs.modalFormRef.resetFields();
|
||||
// }else{
|
||||
// proxy.$notification.error(response.message);
|
||||
// }
|
||||
// emits('closeChange',true);
|
||||
// })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive, toRefs, getCurrentInstance } from 'vue';
|
||||
import {toRefs, getCurrentInstance } from 'vue';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
@ -44,16 +44,24 @@ const handleClose = () => {
|
||||
}
|
||||
|
||||
// Akiraka 20230210 确认按钮 => 开始数据检查
|
||||
const handleConfirm = () => {
|
||||
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);
|
||||
})
|
||||
const handleConfirm = async () => {
|
||||
const {code}=api.value(id.value);
|
||||
if(code==200){
|
||||
Message.success("成功");
|
||||
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>
|
||||
@ -52,4 +52,12 @@ export const formatDoctorTitle=(val)=>{
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
export const fromatReportStatus=(val)=>{
|
||||
//上报处方平台状态(0:未上报 1:已上报 2:上报失败))
|
||||
let data={0:'未上报', 1:'已上报', 2:'上报失败'}
|
||||
if(val || val==0){
|
||||
return data[val]
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
@ -422,6 +422,26 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">处方上报状态</div>
|
||||
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="" label="" >
|
||||
<div class="doctorInfo">
|
||||
<div class="infobox">
|
||||
<div class="row">
|
||||
<div class="nameDesc">上报状态:</div>
|
||||
<div class="desc">{{fromatReportStatus(modalForm.report_pre_status)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">操作</div>
|
||||
@ -429,17 +449,17 @@
|
||||
<a-row :gutter="24" style="margin-top: 35px">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="" label="" no-style>
|
||||
<a-space style="margin-right: 8px">
|
||||
<a-space style="margin-right: 8px" v-if="modalForm.report_pre_status==2">
|
||||
<a-button type="primary" @click="() =>{isVisible=true;order_product_id=modalForm.order_product_id;}"
|
||||
>上报处方平台</a-button
|
||||
>
|
||||
</a-space>
|
||||
<a-space style="margin-right: 8px" v-if="modalForm.order_product_status==2">
|
||||
<a-space style="margin-right: 8px" v-if="modalForm.order_product_status==2 || (modalForm.order_product_refund && modalForm.order_product_refund.product_refund_status==4) || (modalForm.order_product_refund && modalForm.order_product_refund.product_refund_status==5)">
|
||||
<a-button
|
||||
type="primary"
|
||||
v-has="'admin:sysProductList:cancel'"
|
||||
status="danger"
|
||||
@click="()=>{okVisible=true;cur_product_id=modalForm.order_inquiry_id;}"
|
||||
@click="()=>{okVisible=true;cur_product_id=modalForm.order_product_id;}"
|
||||
>取消药品订单</a-button
|
||||
>
|
||||
</a-space>
|
||||
@ -452,7 +472,7 @@
|
||||
<!-- 患者详情弹窗 -->
|
||||
<patientModal :patientVisible="patientVisible" :data="patientData" @patientVisibleChange="() => {patientVisible = false;}"></patientModal>
|
||||
<confirmModal :okVisible="okVisible" :api="cancelProduct" :dealType="'order_inquiry_id'" :id="cur_product_id" @closeChange="closeChange"></confirmModal>
|
||||
<isOkModal :isVisible="isVisible" :api="reportPrePscription" :title="'确定上报处方吗?'" :dealType="'order_product_id'" :id="order_product_id" @closeChangeOk="()=>{isVisible=false;order_product_id='';}"></isOkModal>
|
||||
<isOkModal :isVisible="isVisible" :api="reportPrePscription" :title="'确定上报处方吗?'" :dealType="'order_product_id'" :id="order_product_id" @closeChangeOk="closeChangeOk"></isOkModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -467,7 +487,7 @@ import {
|
||||
} from 'vue';
|
||||
import { productList, getProductDetail,cancelProduct,reportPrePscription} from '@/api/order/list';
|
||||
import { parseTime } from '@/utils/parseTime';
|
||||
import {formatDoctorTitle,formatPrescriptionStatus,formatPharmacistStatus,formatProductCancelReason} from "@/utils/format"
|
||||
import {formatDoctorTitle,fromatReportStatus,formatPrescriptionStatus,formatPharmacistStatus,formatProductCancelReason} from "@/utils/format"
|
||||
const IMG_URL=import.meta.env.VITE_IMG_URL;
|
||||
// Akiraka 20230210 删除数据
|
||||
const deleteData = ref([]);
|
||||
@ -653,13 +673,8 @@ const handleQuery = async () => {
|
||||
|
||||
getProductInfo(params);
|
||||
};
|
||||
//获取订单详情
|
||||
const handleDetail = async (record) => {
|
||||
modalVisible.value = true;
|
||||
modalTitle.value = '药品订单详情';
|
||||
const { code, data, message } = await getProductDetail(
|
||||
record.order_product_id
|
||||
);
|
||||
const getDetail=async(order_product_id)=>{
|
||||
const { code, data, message } = await getProductDetail(order_product_id);
|
||||
if (code == 200) {
|
||||
Object.assign(modalForm, data);
|
||||
let result=data.order_prescription;
|
||||
@ -685,6 +700,12 @@ const handleDetail = async (record) => {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//获取订单详情
|
||||
const handleDetail = (record) => {
|
||||
modalVisible.value = true;
|
||||
modalTitle.value = '药品订单详情';
|
||||
getDetail(record.order_product_id)
|
||||
|
||||
};
|
||||
const formatProductStatus = (val) => {
|
||||
@ -745,6 +766,14 @@ const closeChange=(data)=>{
|
||||
}
|
||||
|
||||
}
|
||||
//关闭上传处方平台弹框
|
||||
const closeChangeOk=(data)=>{
|
||||
order_product_id.value="";
|
||||
isVisible.value=false;
|
||||
if(data){
|
||||
getDetail(modalForm.order_product_id)
|
||||
}
|
||||
}
|
||||
// 重置搜索
|
||||
const handleResetQuery = () => {
|
||||
proxy.$refs.queryFormRef.resetFields();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user