物料分类、物料信息导入及对应模板下载
This commit is contained in:
parent
803ea5e440
commit
cee3aa81a1
|
|
@ -25,46 +25,68 @@
|
|||
<a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
|
||||
<SectionDivider :title="'长者信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="NUID" v-bind="validateInfos.nuId" id="ElderInfoForm-nuId" name="nuId">
|
||||
<a-input v-model:value="formData.nuId"></a-input>
|
||||
<!-- <span>{{ formData.nuId }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="护理单元">
|
||||
<a-input v-model:value="formData.nuId_dictText"></a-input>
|
||||
<!-- <j-dict-select-tag type='list' v-model:value="formData.nuId" :dictCode="`nu_base_info,nu_name,nu_id`"
|
||||
<a-col :span="24">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="NUID" v-bind="validateInfos.nuId" id="ElderInfoForm-nuId" name="nuId">
|
||||
<a-input v-model:value="formData.nuId"></a-input>
|
||||
<!-- <span>{{ formData.nuId }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="姓名" v-bind="validateInfos.name" id="ElderInfoForm-name" name="name">
|
||||
<a-input v-model:value="formData.name"></a-input>
|
||||
<!-- <span>{{ formData.name }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="身份证号码" v-bind="validateInfos.idCard" id="ElderInfoForm-idCard" name="idCard">
|
||||
<a-input v-model:value="formData.idCard"></a-input>
|
||||
<!-- <span>{{ formData.idCard }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="6" :push="2">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="护理单元">
|
||||
<a-input v-model:value="formData.nuId_dictText"></a-input>
|
||||
<!-- <j-dict-select-tag type='list' v-model:value="formData.nuId" :dictCode="`nu_base_info,nu_name,nu_id`"
|
||||
placeholder="请选择分类标签" allowClear @upDictCode="upNuNameFunc" />-->
|
||||
<!-- <span>{{ formData.nuId_dictText }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="姓名" v-bind="validateInfos.name" id="ElderInfoForm-name" name="name">
|
||||
<a-input v-model:value="formData.name"></a-input>
|
||||
<!-- <span>{{ formData.name }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="性别" v-bind="validateInfos.sex" id="ElderInfoForm-sex" name="sex">
|
||||
<a-input v-model:value="formData.sex"></a-input>
|
||||
<!-- <span>{{ formData.sex }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证号码" v-bind="validateInfos.idCard" id="ElderInfoForm-idCard" name="idCard">
|
||||
<a-input v-model:value="formData.idCard"></a-input>
|
||||
<!-- <span>{{ formData.idCard }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="出生日期" v-bind="validateInfos.dateOfBirth" id="ElderInfoForm-dateOfBirth"
|
||||
name="dateOfBirth">
|
||||
<a-date-picker v-model:value="formData.dateOfBirth" value-format="YYYY-MM-DD" format="YYYY年MM月DD日"
|
||||
style="width: 100%" />
|
||||
<!-- <span>{{ formData.dateOfBirth }}</span> -->
|
||||
</a-form-item>
|
||||
<!-- <span>{{ formData.nuId_dictText }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24">
|
||||
<a-form-item label="性别" v-bind="validateInfos.sex" id="ElderInfoForm-sex" name="sex">
|
||||
<a-input v-model:value="formData.sex"></a-input>
|
||||
<!-- <span>{{ formData.sex }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24">
|
||||
<a-form-item label="出生日期" v-bind="validateInfos.dateOfBirth" id="ElderInfoForm-dateOfBirth"
|
||||
name="dateOfBirth">
|
||||
<a-date-picker v-model:value="formData.dateOfBirth" value-format="YYYY-MM-DD"
|
||||
format="YYYY年MM月DD日" style="width: 100%" />
|
||||
<!-- <span>{{ formData.dateOfBirth }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="2" :push="3">
|
||||
<a-form-item label="" v-bind="validateInfos.headPath" id="ElderInfoForm-headPath" name="headPath">
|
||||
<j-image-upload :fileMax="1"
|
||||
:value="opeMediaAddress + (formData.headPath ? formData.headPath : mrtxPic)"></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
|
||||
|
||||
<a-col :span="12">
|
||||
<a-form-item label="民族" v-bind="validateInfos.national" id="ElderInfoForm-national" name="national">
|
||||
<a-input v-model:value="formData.national"></a-input>
|
||||
|
|
@ -115,13 +137,8 @@
|
|||
<!-- <span>{{ formData.issuingAuthority }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12">
|
||||
<a-form-item label="长者头像" v-bind="validateInfos.headPath" id="ElderInfoForm-headPath"
|
||||
name="headPath">
|
||||
<j-image-upload :fileMax="1" :value="opeMediaAddress + (formData.headPath?formData.headPath:mrtxPic)"></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
|
||||
</a-row>
|
||||
<a-row class="card-class" v-if="!detailSign || detailSign == 'jhr'">
|
||||
<a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
|
||||
|
|
@ -129,7 +146,8 @@
|
|||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="人像面" v-bind="validateInfos.guardianIdCardPositive"
|
||||
id="ElderInfoForm-guardianIdCardPositive" name="guardianIdCardPositive" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
id="ElderInfoForm-guardianIdCardPositive" name="guardianIdCardPositive" :labelCol="labelCol2"
|
||||
:wrapperCol="wrapperCol2">
|
||||
<j-image-upload :fileMax="1"
|
||||
:value="opeMediaAddress + formData.guardianIdCardPositive"></j-image-upload>
|
||||
</a-form-item>
|
||||
|
|
|
|||
|
|
@ -1,30 +1,43 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/invoicing/configMaterialInfo/list',
|
||||
save='/invoicing/configMaterialInfo/add',
|
||||
edit='/invoicing/configMaterialInfo/edit',
|
||||
editInfo='/invoicing/configMaterialInfo/editInfo',
|
||||
wlqianyi='/invoicing/configMaterialInfo/wlqianyi',
|
||||
save = '/invoicing/configMaterialInfo/add',
|
||||
edit = '/invoicing/configMaterialInfo/edit',
|
||||
editInfo = '/invoicing/configMaterialInfo/editInfo',
|
||||
wlqianyi = '/invoicing/configMaterialInfo/wlqianyi',
|
||||
deleteOne = '/invoicing/configMaterialInfo/delete',
|
||||
deleteBatch = '/invoicing/configMaterialInfo/deleteBatch',
|
||||
importExcel = '/invoicing/configMaterialInfo/importExcel',
|
||||
exportXls = '/invoicing/configMaterialInfo/exportXls',
|
||||
importMateriallInfo = '/invoicing/configMaterialInfo/importMateriallInfo',
|
||||
importType = '/invoicing/configMaterialInfo/importType',
|
||||
exportTypeExcel = '/invoicing/configMaterialInfo/exportTypeExcel',
|
||||
exportMateriallInfoExcel = '/invoicing/configMaterialInfo/exportMateriallInfoExcel',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* 物料分类导入模板下载
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
export const exportTypeExcel = Api.exportTypeExcel;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
* 物料信息导入模板下载
|
||||
* @param params
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
export const exportMateriallInfoExcel = Api.exportMateriallInfoExcel;
|
||||
|
||||
/**
|
||||
* 导入物料信息
|
||||
*/
|
||||
export const importMateriallInfo = Api.importMateriallInfo;
|
||||
|
||||
/**
|
||||
* 导入物料类别
|
||||
*/
|
||||
export const importType = Api.importType;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
|
|
@ -37,11 +50,11 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
|
|||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
export const deleteOne = (params, handleSuccess) => {
|
||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
|
|
@ -56,12 +69,12 @@ export const batchDelete = (params, handleSuccess) => {
|
|||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
|
|
@ -71,8 +84,8 @@ export const batchDelete = (params, handleSuccess) => {
|
|||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.editInfo : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
};
|
||||
export const wlqianyi = (params, isUpdate) => {
|
||||
let url = Api.wlqianyi;
|
||||
let url = Api.wlqianyi;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -50,13 +50,19 @@
|
|||
dictCode="iz_enabled" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-col :lg="12">
|
||||
<span style="float: right; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<div style="display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
|
||||
style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset">重置</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls">下载类别模板</a-button>
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined"
|
||||
@click="importMateriallType">导入类别</j-upload-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined"
|
||||
@click="exportMAteriallInfoExcel">下载物料模板</a-button>
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined"
|
||||
@click="onImportXls">导入物料</j-upload-button>
|
||||
</div>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
|
@ -253,7 +259,7 @@ import { ref, reactive, onMounted, computed } from 'vue';
|
|||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './ConfigMaterialInfo.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ConfigMaterialInfo.api';
|
||||
import { list, deleteOne, batchDelete, importMateriallInfo, importType, exportTypeExcel, exportMateriallInfoExcel } from './ConfigMaterialInfo.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import ConfigMaterialInfoModal from './components/ConfigMaterialInfoModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
|
@ -274,9 +280,11 @@ import WlqianyiModal from '/@/views/invoicing/ConfigMaterial/components/Wlqianyi
|
|||
import ConfigMaterialInfoListMenu from './ConfigMaterialInfoListMenu.vue';
|
||||
import { useResponsive } from '/@/hooks/web/useResponsive';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
import { useMethods } from '/@/hooks/system/useMethods';
|
||||
|
||||
const { handleExportXls, handleImportXls } = useMethods();
|
||||
const { screenEnum, screenWidth } = useResponsive();
|
||||
const { createMessage} = useMessage();
|
||||
const { createMessage } = useMessage();
|
||||
// 计算动态高度
|
||||
const scrollY = computed(() => {
|
||||
// 大屏幕(≥1600px)使用 71vh,否则使用 66.5vh
|
||||
|
|
@ -304,10 +312,8 @@ const registerMedicationDrawer = ref();
|
|||
const qianyiDrawer = ref();
|
||||
const wlqianyiDrawer = ref();
|
||||
|
||||
function handleHeaderSearch(item){
|
||||
console.log("🚀 ~ handleHeaderSearch ~ 11111item:", item)
|
||||
queryParam[item.key] = "*"+item.value+"*";
|
||||
console.log("🚀 ~ handleHeaderSearch ~ queryParam:", queryParam)
|
||||
function handleHeaderSearch(item) {
|
||||
queryParam[item.key] = "*" + item.value + "*";
|
||||
reload();
|
||||
}
|
||||
/**
|
||||
|
|
@ -356,15 +362,28 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "物料信息",
|
||||
url: getExportUrl,
|
||||
name: "物料分类导入模板",
|
||||
url: exportTypeExcel,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
url: importMateriallInfo,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
|
||||
async function exportMAteriallInfoExcel() {
|
||||
return handleExportXls('物料信息导入模板', exportMateriallInfoExcel, {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入物料类别
|
||||
* @param file
|
||||
*/
|
||||
function importMateriallType(file) {
|
||||
return handleImportXls(file, importType, handleSuccess || reload);
|
||||
}
|
||||
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: 24,
|
||||
|
|
@ -447,7 +466,7 @@ async function handleEdit(record: Recordable) {
|
|||
// });
|
||||
// }
|
||||
|
||||
if(sfjx == '1'){
|
||||
if (sfjx == '1') {
|
||||
return;
|
||||
}
|
||||
registerModal.value.disableSubmit = false;
|
||||
|
|
@ -534,17 +553,17 @@ async function handleWlQyty(record) {
|
|||
console.log("🚀 ~ handleWlQyty ~ record:", record)
|
||||
const izEnabled = record.izEnabled == 'Y' ? 'N' : "Y"
|
||||
var sfjx = "0";
|
||||
if("N"==izEnabled){
|
||||
await defHttp.get({ url: '/invoicing/blWarehouseMaterialInfo/queryWlsfzy', params: { wlId: record.id,nuId:null } }).then(res => {
|
||||
if ("N" == izEnabled) {
|
||||
await defHttp.get({ url: '/invoicing/blWarehouseMaterialInfo/queryWlsfzy', params: { wlId: record.id, nuId: null } }).then(res => {
|
||||
console.log("🚀 ~ handleQyty ~ res:", res)
|
||||
if(!res.success){
|
||||
if (!res.success) {
|
||||
createMessage.error(res.message);
|
||||
sfjx = "1";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(sfjx == '1'){
|
||||
if (sfjx == '1') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -596,7 +615,7 @@ function handleAddxj(data) {
|
|||
//编辑
|
||||
function handleFenleiEdit(data) {
|
||||
console.log("🚀 ~ handleEdit ~ data:", data)
|
||||
const params = { id: data.key, categoryId: data.categoryId, typeId: data.typeId,appCheckIconPath: data.appCheckIconPath,appIconPath: data.appIconPath }
|
||||
const params = { id: data.key, categoryId: data.categoryId, typeId: data.typeId, appCheckIconPath: data.appCheckIconPath, appIconPath: data.appIconPath }
|
||||
if (data.levle == 1) {
|
||||
params.categoryName = data.title
|
||||
registerDrawer.value.disableSubmit = false;
|
||||
|
|
@ -653,7 +672,7 @@ function searchQuery() {
|
|||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
Object.keys(queryParam).forEach(key => {
|
||||
Object.keys(queryParam).forEach(key => {
|
||||
queryParam[key] = null; // 或者 undefined、'' 根据你的需求
|
||||
});
|
||||
// queryParam.treeId = null;
|
||||
|
|
|
|||
|
|
@ -5,17 +5,17 @@
|
|||
<a-row class="card-class">
|
||||
<a-col :span="8" hidden>
|
||||
<a-form-item label="一级分类" v-bind="validateInfos.categoryId" id="ConfigMaterialInfoForm-categoryId" name="categoryId">
|
||||
<j-dict-select-tag type='list' v-model:value="formData.categoryId" dictCode="nu_config_material_category,category_name,id,iz_enabled = 0 and del_flag = 0" placeholder="请选择一级分类" @change="formData.typeId = null , formData.medicationId = null" disabled/>
|
||||
<!-- <j-dict-select-tag type='list' v-model:value="formData.categoryId" dictCode="nu_config_material_category,category_name,id,iz_enabled = 0 and del_flag = 0" placeholder="请选择一级分类" @change="formData.typeId = null , formData.medicationId = null" disabled/> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8" hidden>
|
||||
<a-form-item label="二级分类" v-bind="validateInfos.typeId" id="ConfigMaterialInfoForm-typeId" name="typeId">
|
||||
<j-dict-select-tag type='list' v-model:value="formData.typeId" :dictCode="`nu_config_material_type,type_name,id,category_id = ${formData.categoryId || -1} and iz_enabled = 0 and del_flag = 0 `" placeholder="请选择二级分类" @change="formData.medicationId = null" disabled />
|
||||
<!-- <j-dict-select-tag type='list' v-model:value="formData.typeId" :dictCode="`nu_config_material_type,type_name,id,category_id = ${formData.categoryId || -1} and iz_enabled = 0 and del_flag = 0 `" placeholder="请选择二级分类" @change="formData.medicationId = null" disabled /> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8" hidden>
|
||||
<a-form-item label="三级分类" v-bind="validateInfos.medicationId" id="ConfigMaterialInfoForm-medicationId" name="medicationId">
|
||||
<j-dict-select-tag type='list' v-model:value="formData.medicationId" :dictCode="`nu_config_material_medication,medication_name,id,type_id = ${formData.typeId || -1} and iz_enabled = 0 and del_flag = 0`" placeholder="请选择三级分类" disabled />
|
||||
<!-- <j-dict-select-tag type='list' v-model:value="formData.medicationId" :dictCode="`nu_config_material_medication,medication_name,id,type_id = ${formData.typeId || -1} and iz_enabled = 0 and del_flag = 0`" placeholder="请选择三级分类" disabled /> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
|
|
|
|||
Loading…
Reference in New Issue