diff --git a/src/views/invoicing/configSuppliersApply/NuConfigSuppliersApply.api.ts b/src/views/invoicing/configSuppliersApply/NuConfigSuppliersApply.api.ts new file mode 100644 index 0000000..0a05461 --- /dev/null +++ b/src/views/invoicing/configSuppliersApply/NuConfigSuppliersApply.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/configSuppliersApply/nuConfigSuppliersApply/list', + save='/configSuppliersApply/nuConfigSuppliersApply/add', + edit='/configSuppliersApply/nuConfigSuppliersApply/edit', + deleteOne = '/configSuppliersApply/nuConfigSuppliersApply/delete', + deleteBatch = '/configSuppliersApply/nuConfigSuppliersApply/deleteBatch', + importExcel = '/configSuppliersApply/nuConfigSuppliersApply/importExcel', + exportXls = '/configSuppliersApply/nuConfigSuppliersApply/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/configSuppliersApply/NuConfigSuppliersApply.data.ts b/src/views/invoicing/configSuppliersApply/NuConfigSuppliersApply.data.ts new file mode 100644 index 0000000..3d02e46 --- /dev/null +++ b/src/views/invoicing/configSuppliersApply/NuConfigSuppliersApply.data.ts @@ -0,0 +1,86 @@ +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: 'suppliersName' + }, + { + title: '供应商性质', + align: "center", + dataIndex: 'suppliersNature_dictText' + }, + { + title: '供应商地址', + align: "center", + dataIndex: 'suppliersAddress' + }, + { + title: '负责人', + align: "center", + dataIndex: 'personInCharge' + }, + { + title: '联系电话', + align: "center", + dataIndex: 'contactNumber' + }, + { + title: '开户行', + align: "center", + dataIndex: 'openingBank' + }, + { + title: '开户行账号', + align: "center", + dataIndex: 'openingBankNo' + }, + { + title: '资质照片', + align: "center", + dataIndex: 'imgPath' + }, + { + title: '审核状态', + align: "center", + dataIndex: 'applyStatus', + customRender: ({ text, record }) => { + console.log(text); + var applyStatus = "" + if(text == '1'){ + applyStatus = "待审核" + }else if(text == '2'){ + applyStatus = "审核通过" + }else if(text == '3'){ + applyStatus = "审核未通过" + } + return applyStatus; + }, + }, + { + title: '审核备注', + align: "center", + dataIndex: 'applyContent' + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + suppliersName: {title: '供应商名称',order: 0,view: 'text', type: 'string',}, + suppliersNature: {title: '供应商性质 1代理商 2批发商 3制造商',order: 1,view: 'text', type: 'string',}, + 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: '供应状态 1正常供应 2暂停供应',order: 5,view: 'text', type: 'string',}, + openingBank: {title: '开户行',order: 6,view: 'text', type: 'string',}, + openingBankNo: {title: '开户行账号',order: 7,view: 'text', type: 'string',}, + wechartId: {title: '微信账号',order: 8,view: 'text', type: 'string',}, + imgPath: {title: '资质照片',order: 9,view: 'text', type: 'string',}, + applyStatus: {title: '审核状态',order: 10,view: 'text', type: 'string',}, + applyContent: {title: '审核备注',order: 11,view: 'text', type: 'string',}, +}; diff --git a/src/views/invoicing/configSuppliersApply/NuConfigSuppliersApplyList.vue b/src/views/invoicing/configSuppliersApply/NuConfigSuppliersApplyList.vue new file mode 100644 index 0000000..d7f3159 --- /dev/null +++ b/src/views/invoicing/configSuppliersApply/NuConfigSuppliersApplyList.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/src/views/invoicing/configSuppliersApply/components/NuConfigSuppliersApplyForm.vue b/src/views/invoicing/configSuppliersApply/components/NuConfigSuppliersApplyForm.vue new file mode 100644 index 0000000..54cf26e --- /dev/null +++ b/src/views/invoicing/configSuppliersApply/components/NuConfigSuppliersApplyForm.vue @@ -0,0 +1,223 @@ + + + + + diff --git a/src/views/invoicing/configSuppliersApply/components/NuConfigSuppliersApplyModal.vue b/src/views/invoicing/configSuppliersApply/components/NuConfigSuppliersApplyModal.vue new file mode 100644 index 0000000..cfa3ed9 --- /dev/null +++ b/src/views/invoicing/configSuppliersApply/components/NuConfigSuppliersApplyModal.vue @@ -0,0 +1,83 @@ + + + + + +