diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.api.ts b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.api.ts new file mode 100644 index 0000000..74bd19b --- /dev/null +++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/bizSuppliers/nuBizSuppliersInfo/list', + save='/bizSuppliers/nuBizSuppliersInfo/add', + edit='/bizSuppliers/nuBizSuppliersInfo/edit', + deleteOne = '/bizSuppliers/nuBizSuppliersInfo/delete', + deleteBatch = '/bizSuppliers/nuBizSuppliersInfo/deleteBatch', + importExcel = '/bizSuppliers/nuBizSuppliersInfo/importExcel', + exportXls = '/bizSuppliers/nuBizSuppliersInfo/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +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(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.data.ts b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.data.ts new file mode 100644 index 0000000..332fbc5 --- /dev/null +++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.data.ts @@ -0,0 +1,84 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '供应商名称', + align: "center", + dataIndex: 'suppliersName' + }, + { + title: '供应商性质', + align: "center", + dataIndex: 'suppliersNature_dictText', + width: 100 + }, + { + title: '供应商地址', + align: "center", + dataIndex: 'suppliersAddress' + }, + { + title: '负责人', + align: "center", + dataIndex: 'personInCharge', + width: 100 + }, + { + title: '联系电话', + align: "center", + dataIndex: 'contactNumber', + width: 100 + }, + // { + // title: '供应状态', + // align: "center", + // dataIndex: 'supplyState_dictText' + // }, + { + title: '开户行', + align: "center", + dataIndex: 'openingBank', + width: 100 + }, + { + title: '开户行账号', + align: "center", + dataIndex: 'openingBankNo' + }, + { + title: '资质照片', + align: "center", + dataIndex: 'imgPath', + // customRender: render.renderImage, + customRender: ({ text }) => { + const imageUrl = text ? opeMediaAddress + text : opeMediaAddress + import.meta.env.VITE_DEFAULT_DIRECTIVE_PRE_PIC; + return render.renderImage({ text: imageUrl }); + }, + width: 100 + }, + // { + // title: '入驻日期', + // align: "center", + // dataIndex: 'createTime', + // width: 160 + // }, +]; + +// 高级查询数据 +export const superQuerySchema = { + suppliersName: {title: '供应商名称',order: 0,view: 'text', type: 'string',}, + suppliersNature: {title: '供应商性质',order: 1,view: 'list', type: 'string',dictCode: 'suppliers_nature',}, + suppliersAddress: {title: '供应商地址',order: 2,view: 'text', type: 'string',}, + personInCharge: {title: '负责人',order: 3,view: 'text', type: 'string',}, + contactNumber: {title: '联系电话',order: 4,view: 'text', type: 'string',}, + supplyState: {title: '供应状态',order: 5,view: 'list', type: 'string',dictCode: 'supply_status',}, + openingBank: {title: '开户行',order: 6,view: 'text', type: 'string',}, + openingBankNo: {title: '开户行账号',order: 7,view: 'text', type: 'string',}, + imgPath: {title: '资质照片',order: 8,view: 'image', type: 'string',}, + createTime: {title: '创建日期',order: 9,view: 'datetime', type: 'string',}, +}; diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersInfoList.vue b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfoList.vue new file mode 100644 index 0000000..a4d8b3e --- /dev/null +++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfoList.vue @@ -0,0 +1,198 @@ + + + + + diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersListModal.vue b/src/views/invoicing/bizSuppliers/NuBizSuppliersListModal.vue new file mode 100644 index 0000000..79a0328 --- /dev/null +++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersListModal.vue @@ -0,0 +1,75 @@ + + + + + + diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfo.api.ts b/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfo.api.ts new file mode 100644 index 0000000..97abc3b --- /dev/null +++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfo.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/bizSuppliers/nuBizSuppliersMaterialInfo/list', + save='/bizSuppliers/nuBizSuppliersMaterialInfo/add', + edit='/bizSuppliers/nuBizSuppliersMaterialInfo/edit', + deleteOne = '/bizSuppliers/nuBizSuppliersMaterialInfo/delete', + deleteBatch = '/bizSuppliers/nuBizSuppliersMaterialInfo/deleteBatch', + importExcel = '/bizSuppliers/nuBizSuppliersMaterialInfo/importExcel', + exportXls = '/allMaterialInfo/nuBizAllMaterialInfo/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +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(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfo.data.ts b/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfo.data.ts new file mode 100644 index 0000000..3c6b08c --- /dev/null +++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfo.data.ts @@ -0,0 +1,47 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '物料名称', + align: "center", + dataIndex: 'materialName' + }, + { + title: '规格型号', + align: "center", + dataIndex: 'specificationModel', + width: 140 + }, + { + title: '品牌型号', + align: "center", + dataIndex: 'brandType', + width: 200 + }, + { + title: '销售单价', + align: "center", + dataIndex: 'salesUnitPrice', + width: 100 + }, + { + title: '销售单位', + align: "center", + dataIndex: 'salesUnit', + width: 100 + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + suppliersId: {title: '供应商',order: 0,view: 'list', type: 'string',dictTable: "nu_biz_suppliers_info", dictCode: 'id', dictText: 'suppliers_name',}, + materialName: {title: '物料名称',order: 1,view: 'text', type: 'string',}, + specificationModel: {title: '规格型号',order: 2,view: 'text', type: 'string',}, + brandType: {title: '品牌型号',order: 3,view: 'text', type: 'string',}, + salesUnitPrice: {title: '销售单价',order: 4,view: 'number', type: 'number',}, + salesUnit: {title: '销售单位',order: 5,view: 'text', type: 'string',}, +}; diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfoList.vue b/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfoList.vue new file mode 100644 index 0000000..80d471b --- /dev/null +++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfoList.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersMateriallInfoModal.vue b/src/views/invoicing/bizSuppliers/NuBizSuppliersMateriallInfoModal.vue new file mode 100644 index 0000000..fdf49b6 --- /dev/null +++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersMateriallInfoModal.vue @@ -0,0 +1,76 @@ + + + + + + diff --git a/src/views/invoicing/bizSuppliers/components/NuBizSuppliersMaterialInfoForm.vue b/src/views/invoicing/bizSuppliers/components/NuBizSuppliersMaterialInfoForm.vue new file mode 100644 index 0000000..fb971b5 --- /dev/null +++ b/src/views/invoicing/bizSuppliers/components/NuBizSuppliersMaterialInfoForm.vue @@ -0,0 +1,176 @@ + + + + + diff --git a/src/views/invoicing/bizSuppliers/components/NuBizSuppliersMaterialInfoModal.vue b/src/views/invoicing/bizSuppliers/components/NuBizSuppliersMaterialInfoModal.vue new file mode 100644 index 0000000..92788b3 --- /dev/null +++ b/src/views/invoicing/bizSuppliers/components/NuBizSuppliersMaterialInfoModal.vue @@ -0,0 +1,77 @@ + + + + + + diff --git a/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue b/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue index bb86374..3e74302 100644 --- a/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue +++ b/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue @@ -34,10 +34,11 @@ - + - + @@ -57,12 +58,15 @@ import { useListPage } from '/@/hooks/system/useListPage'; import { columns, superQuerySchema } from './ConfigSuppliersInfo.data'; import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ConfigSuppliersInfo.api'; - import { downloadFile } from '/@/utils/common/renderUtils'; - import ConfigSuppliersInfoModal from './components/ConfigSuppliersInfoModal.vue' + import NuBizSuppliersListModal from '/@/views/invoicing/bizSuppliers/NuBizSuppliersListModal.vue' import JInput from '/@/components/Form/src/jeecg/components/JInput.vue'; import { useUserStore } from '/@/store/modules/user'; import { defHttp } from '/@/utils/http/axios'; + import { useMessage } from '/@/hooks/web/useMessage'; + + + const { createMessage } = useMessage(); const formRef = ref(); const queryParam = reactive({}); const toggleSearchStatus = ref(false); @@ -126,6 +130,11 @@ registerModal.value.disableSubmit = false; registerModal.value.add(); } + + function handleCheckAdd() { + registerModal.value.disableSubmit = false; + registerModal.value.checkAdd(); + } /** * 编辑事件 @@ -150,13 +159,6 @@ await deleteOne({ id: record.id }, handleSuccess); } - /** - * 批量删除事件 - */ - async function batchHandleDelete() { - await batchDelete({ ids: selectedRowKeys.value }, handleSuccess); - } - /** * 成功回调 */ @@ -198,6 +200,11 @@ onClick: handleWlQyty.bind(null, record), ifShow: record.izEnabled == 'Y' }, + { + label: '更新物料', + onClick: handleWlType.bind(null, record), + ifShow: record.wlType == '0' + }, ]; } @@ -210,6 +217,19 @@ searchQuery() }); } + + function handleWlType(record){ + console.log("🚀 ~ handleWlType ~ record:", record) + var params = {id:record.id} + defHttp.post({ url: '/invoicing/configSuppliersInfo/updateWlType', params ,timeout:100000}).then((res) => { + searchQuery() + }); + setTimeout(() => { + createMessage.success("更新成功!") + reload(); + }, 1000); + + } /** * 下拉操作栏 diff --git a/src/views/invoicing/pdd/NuInvoicingPddInfo.data.ts b/src/views/invoicing/pdd/NuInvoicingPddInfo.data.ts index 37a17ce..23ae650 100644 --- a/src/views/invoicing/pdd/NuInvoicingPddInfo.data.ts +++ b/src/views/invoicing/pdd/NuInvoicingPddInfo.data.ts @@ -36,12 +36,12 @@ export const columns: BasicColumn[] = [ dataIndex: 'medicationName' }, { - title: '货品名称', + title: '物料名称', align: "center", dataIndex: 'materialName' }, { - title: '货品编码', + title: '物料编码', align: "center", dataIndex: 'materialNo' }, @@ -66,7 +66,7 @@ export const columns: BasicColumn[] = [ dataIndex: 'cesl' }, { - title: '货品单位', + title: '物料单位', align: "center", dataIndex: 'materialUnits' }, @@ -106,9 +106,9 @@ export const superQuerySchema = { categoryId: {title: '物料类别',order: 9,view: 'text', type: 'string',}, typeId: {title: '物料类型',order: 10,view: 'text', type: 'string',}, medicationId: {title: '用药类型',order: 11,view: 'text', type: 'string',}, - materialName: {title: '货品名称',order: 12,view: 'text', type: 'string',}, - materialNo: {title: '货品编码',order: 13,view: 'text', type: 'string',}, + materialName: {title: '物料名称',order: 12,view: 'text', type: 'string',}, + materialNo: {title: '物料编码',order: 13,view: 'text', type: 'string',}, specificationModel: {title: '规格型号',order: 14,view: 'text', type: 'string',}, materialImg: {title: '物料图片',order: 15,view: 'text', type: 'string',}, - materialUnits: {title: '货品单位',order: 16,view: 'text', type: 'string',}, + materialUnits: {title: '物料单位',order: 16,view: 'text', type: 'string',}, }; diff --git a/src/views/invoicing/pdd/components/NuInvoicingPddInfoForm.vue b/src/views/invoicing/pdd/components/NuInvoicingPddInfoForm.vue index 102dabd..da3ad92 100644 --- a/src/views/invoicing/pdd/components/NuInvoicingPddInfoForm.vue +++ b/src/views/invoicing/pdd/components/NuInvoicingPddInfoForm.vue @@ -65,13 +65,13 @@ - - + + - - + + @@ -85,8 +85,8 @@ - - + +