diff --git a/src/api/baseInformation/srmDeliveryTerm.js b/src/api/baseInformation/srmDeliveryTerm.js index 08f4586..039acc7 100644 --- a/src/api/baseInformation/srmDeliveryTerm.js +++ b/src/api/baseInformation/srmDeliveryTerm.js @@ -12,5 +12,3 @@ export const updateDeliveryTerm = (params) => createAPI('/srmDeliveryTerm/update // 删除交货条款 export const deleteDeliveryTerm = (params) => createAPI('/srmDeliveryTerm/deleteDeliveryTerm', 'POST', params) -// 根据ID获取交货条款 -export const getDeliveryTermById = (params) => createAPI('/srmDeliveryTerm/getDeliveryTermById', 'POST', params) diff --git a/src/api/baseInformation/srmPaymentTerm.js b/src/api/baseInformation/srmPaymentTerm.js new file mode 100644 index 0000000..3fbfccf --- /dev/null +++ b/src/api/baseInformation/srmPaymentTerm.js @@ -0,0 +1,13 @@ +import { createAPI } from '@/utils/httpRequest.js' + +// 获取付款条款列表 +export const getPaymentTermListPaging = (params) => createAPI('/srmPaymentTerm/getPaymentTermListPaging', 'POST', params) + +// 新增付款条款 +export const savePaymentTerm = (params) => createAPI('/srmPaymentTerm/savePaymentTerm', 'POST', params) + +// 更新付款条款 +export const updatePaymentTerm = (params) => createAPI('/srmPaymentTerm/updatePaymentTerm', 'POST', params) + +// 删除付款条款 +export const deletePaymentTerm = (params) => createAPI('/srmPaymentTerm/deletePaymentTerm', 'POST', params) \ No newline at end of file diff --git a/src/views/modules/srmBaseInformation/srmDeliveryTerm.vue b/src/views/modules/srmBaseInformation/srmDeliveryTerm.vue index 26dfa21..7fe6c01 100644 --- a/src/views/modules/srmBaseInformation/srmDeliveryTerm.vue +++ b/src/views/modules/srmBaseInformation/srmDeliveryTerm.vue @@ -99,8 +99,7 @@ getDeliveryTermListWithPaging, saveDeliveryTerm, updateDeliveryTerm, - deleteDeliveryTerm, - getDeliveryTermById + deleteDeliveryTerm } from "@/api/baseInformation/srmDeliveryTerm.js" import excel from "@/utils/excel-util.js"; @@ -453,4 +452,4 @@ height: auto; line-height: 1.5; } - \ No newline at end of file + diff --git a/src/views/modules/srmBaseInformation/srmPaymentTerm.vue b/src/views/modules/srmBaseInformation/srmPaymentTerm.vue new file mode 100644 index 0000000..aaa6805 --- /dev/null +++ b/src/views/modules/srmBaseInformation/srmPaymentTerm.vue @@ -0,0 +1,537 @@ + + + + diff --git a/src/views/modules/srmBaseInformation/srmSupplierCurrency.vue b/src/views/modules/srmBaseInformation/srmSupplierCurrency.vue index 041b9b7..840bcd2 100644 --- a/src/views/modules/srmBaseInformation/srmSupplierCurrency.vue +++ b/src/views/modules/srmBaseInformation/srmSupplierCurrency.vue @@ -15,8 +15,9 @@ - 查询 - 新增 + 查询 + 新增 + 导出 @@ -28,45 +29,22 @@ v-loading="dataListLoading" style="width: 100%;"> - - - - - - + v-for="(item,index) in columnList" :key="index" + :sortable="item.columnSortable" + :prop="item.columnProp" + :header-align="item.headerAlign" + :show-overflow-tooltip="item.showOverflowTooltip" + :align="item.align" + :fixed="item.fixed==''?false:item.fixed" + :min-width="item.columnWidth" + :label="item.columnLabel"> - - - @@ -87,7 +65,7 @@ @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex" - :page-sizes="[10, 20, 50, 100]" + :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize" :total="totalPage" layout="total, sizes, prev, pager, next, jumper"> @@ -133,12 +111,30 @@ import { getCurrencyListWithPaging, addCurrency, updateCurrency, deleteCurrency } from '@/api/baseInformation/srmCurrency.js' +import excel from "@/utils/excel-util.js"; export default { name: "srmSupplierCurrency", + watch: { + searchData: { + deep: true, + handler: function (newV, oldV) { + this.searchData.currency = this.searchData.currency.toUpperCase() + } + }, + modalData: { + deep: true, + handler: function (newV, oldV) { + this.modalData.currency = this.modalData.currency.toUpperCase() + } + } + }, data() { return { - height: 300, + columnsProp:['createdBy','updateBy','status'], + // 导出 + exportName: "货币信息" + this.dayjs().format('YYYYMMDDHHmmss'), + height: 200, dataList:[], dataListLoading: false, pageIndex: 1, @@ -149,7 +145,9 @@ export default { currencyDesc: '', active: '', baseCurrency: '', - site: this.$store.state.user.site + site: this.$store.state.user.site, + page: 1, + limit: 10, }, modalFlag: false, modalTitle: '', @@ -160,8 +158,103 @@ export default { currencyDesc: '', site: this.$store.state.user.site, active: 'Y', - baseCurrency: 'N' + baseCurrency: 'N', + createBy: this.$store.state.user.name, + updateBy: this.$store.state.user.name }, + // 展示列集 + columnList: [ + { + userId: this.$store.state.user.name, + functionId: '812002', + serialNumber: '812002TableCurrency', + tableId: '812002Table', + tableName: "货币信息表", + columnProp: 'currency', + headerAlign: "center", + align: "center", + columnLabel: '货币代码', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: '812002', + serialNumber: '812002TableCurrencyDesc', + tableId: "812002Table", + tableName: "货币信息表", + columnProp: 'currencyDesc', + headerAlign: "center", + align: "left", + columnLabel: '货币描述', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, + { + userId: this.$store.state.user.name, + functionId: '812002', + serialNumber: '812002TableSite', + tableId: "812002Table", + tableName: "货币信息表", + columnProp: 'site', + headerAlign: "center", + align: "center", + columnLabel: '站点', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120, + }, + { + userId: this.$store.state.user.name, + functionId: '812002', + serialNumber: '812002TableActive', + tableId: "812002Table", + tableName: "货币信息表", + columnProp: 'active', + headerAlign: "center", + align: "center", + columnLabel: '状态', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 80, + }, + { + userId: this.$store.state.user.name, + functionId: '812002', + serialNumber: '812002TableBaseCurrency', + tableId: "812002Table", + tableName: "货币信息表", + columnProp: 'baseCurrency', + headerAlign: "center", + align: "center", + columnLabel: '基础货币', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100, + } + ], rules: { currency: [ { required: true, message: '请输入货币代码', trigger: 'blur' } @@ -179,15 +272,26 @@ export default { { required: true, message: '请选择是否基础货币', trigger: 'change' } ] }, + authSearch: false, + authSave: false, + authUpdate: false, + authDelete: false, + menuId: this.$route.meta.menuId || 'srmCurrency', } }, mounted() { this.$nextTick(() => { - this.height = window.innerHeight - 240; + this.height = window.innerHeight - 180; }) // 初始化数据 this.getDataList() }, + created () { + // 按钮控制 + this.getButtonAuthData() + // 无论是否有查询权限,都获取数据列表 + this.getDataList() + }, methods: { // 获取数据列表 getDataList() { @@ -244,6 +348,8 @@ export default { site: this.$store.state.user.site || this.$store.state.user.currentSite || '', // 设置默认值但不显示在界面上 active: 'Y', baseCurrency: 'N', + createBy: this.$store.state.user.name, + updateBy: this.$store.state.user.name, flag: '1' } this.$nextTick(() => { @@ -264,7 +370,10 @@ export default { currencyDesc: row.currencyDesc, site: row.site, active: row.active, - baseCurrency: row.baseCurrency + baseCurrency: row.baseCurrency, + createBy: row.createBy, + updateBy: this.$store.state.user.name, + flag: '2' } this.$nextTick(() => { if (this.$refs.modalForm) { @@ -341,6 +450,44 @@ export default { }).catch(() => { this.$message.info('已取消删除') }) + }, + + async exportExcel() { + const params = { + ...this.searchData, + limit: -1, + page: 1 + }; + + excel.exportTable({ + url: "/srmCurrency/getCurrencyListWithPaging", + columnMapping: this.columnList, + mergeSetting: [], + params: params, + fileName: this.exportName + ".xlsx", + // 返回包含rows字段的对象,让excel工具能够正确提取数据 + rowFetcher: res => { + if (res && res.data && res.data.code === 0) { + return { rows: res.data.data || [] }; + } + return { rows: [] }; + }, + columnFormatter: [], + dropColumns: [], + }); + }, + + //获取按钮的权限数据 + getButtonAuthData () { + let searchFlag = this.isAuth(this.menuId+":search") + let saveFlag = this.isAuth(this.menuId+":save") + let updateFlag = this.isAuth(this.menuId+":update") + let deleteFlag = this.isAuth(this.menuId+":delete") + //处理页面的权限数据 + this.authSearch = !searchFlag + this.authSave = !saveFlag + this.authUpdate = !updateFlag + this.authDelete = !deleteFlag } } } @@ -348,6 +495,6 @@ export default { + \ No newline at end of file diff --git a/src/views/modules/srmSupplier/supplierList.vue b/src/views/modules/srmSupplier/supplierList.vue index b1787e4..651e807 100644 --- a/src/views/modules/srmSupplier/supplierList.vue +++ b/src/views/modules/srmSupplier/supplierList.vue @@ -5,24 +5,23 @@ - Supplier No + 供应商编码 - + - + - - - + + 查询 - {{'导出'}} 新增 + {{'导出'}} @@ -511,31 +510,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1TaxCode', - tableId: '811001Table1', - tableName: '供应商信息', - columnProp: 'taxCode', - headerAlign: 'center', - align: 'left', - columnLabel: '税号', - columnWidth: '200', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: this.functionId, - serialNumber: '811001Table1Tax', + serialNumber: '811001Table1ABC', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'tax', + columnProp: 'abc', headerAlign: 'center', align: 'left', - columnLabel: '税率', + columnLabel: '供应商等级', columnWidth: '100', columnHidden: false, columnImage: false, @@ -547,13 +528,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1TaxNo', + serialNumber: '811001Table1Buyer', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'taxNo', + columnProp: 'buyer', headerAlign: 'center', align: 'left', - columnLabel: '税务编号', + columnLabel: '采购员', columnWidth: '100', columnHidden: false, columnImage: false, @@ -565,50 +546,14 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1Currency', - tableId: '811001Table1', - tableName: '供应商信息', - columnProp: 'currencyDesc', - headerAlign: 'center', - align: 'left', - columnLabel: '货币', - columnWidth: '80', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: this.functionId, - serialNumber: '811001Table1ABC', + serialNumber: '811001Table1SourcingStaff', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'abc', + columnProp: 'Sourcing Staff', headerAlign: 'center', align: 'left', - columnLabel: 'ABC等级', - columnWidth: '100', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: this.functionId, - serialNumber: '811001Table1Active', - tableId: '811001Table1', - tableName: '供应商信息', - columnProp: 'active', - headerAlign: 'center', - align: 'center', - columnLabel: '在用', - columnWidth: '100', + columnLabel: 'Sourcing 专员', + columnWidth: '120', columnHidden: false, columnImage: false, columnSortable: false, @@ -619,13 +564,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1Buyer', + serialNumber: '811001Table1Tax', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'buyer', + columnProp: 'taxCode', headerAlign: 'center', align: 'left', - columnLabel: '采购员', + columnLabel: '税率编号', columnWidth: '100', columnHidden: false, columnImage: false, @@ -637,13 +582,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1SourcingStaff', + serialNumber: '811001Table1PaymentTerm', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'Sourcing Staff', + columnProp: 'paymentTerm', headerAlign: 'center', align: 'left', - columnLabel: 'Sourcing 专员', + columnLabel: '付款条款', columnWidth: '120', columnHidden: false, columnImage: false, @@ -655,13 +600,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1PaymentTerm', + serialNumber: '811001Table1DeliveryTerm', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'paymentTerm', + columnProp: 'deliveryTerm', headerAlign: 'center', align: 'left', - columnLabel: '付款条款', + columnLabel: '交货条款', columnWidth: '120', columnHidden: false, columnImage: false, @@ -673,14 +618,14 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1DeliveryTerm', + serialNumber: '811001Table1Currency', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'deliveryTerm', + columnProp: 'currency', headerAlign: 'center', align: 'left', - columnLabel: '交货条款', - columnWidth: '120', + columnLabel: '货币', + columnWidth: '80', columnHidden: false, columnImage: false, columnSortable: false, @@ -715,7 +660,7 @@ export default { columnProp: 'phoneNo', headerAlign: 'center', align: 'left', - columnLabel: '手机号', + columnLabel: '联系人电话', columnWidth: '150', columnHidden: false, columnImage: false, @@ -733,7 +678,7 @@ export default { columnProp: 'Phone No2', headerAlign: 'center', align: 'left', - columnLabel: '手机号2', + columnLabel: '联系人电话2', columnWidth: '150', columnHidden: false, columnImage: false, @@ -751,7 +696,7 @@ export default { columnProp: 'Phone No3', headerAlign: 'center', align: 'left', - columnLabel: '手机号3', + columnLabel: '联系人电话3', columnWidth: '150', columnHidden: false, columnImage: false, @@ -763,13 +708,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1FaxNo', + serialNumber: '811001Table1Email', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'faxNo', + columnProp: 'email', headerAlign: 'center', align: 'left', - columnLabel: '传真号', + columnLabel: '邮箱', columnWidth: '150', columnHidden: false, columnImage: false, @@ -781,13 +726,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1OtherContact1', + serialNumber: '811001Table1Email2', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'otherContact1', + columnProp: 'email2', headerAlign: 'center', align: 'left', - columnLabel: '其他联系方式1', + columnLabel: '邮箱2', columnWidth: '150', columnHidden: false, columnImage: false, @@ -799,13 +744,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1OtherContact2', + serialNumber: '811001Table1FaxNo', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'otherContact2', + columnProp: 'faxNo', headerAlign: 'center', align: 'left', - columnLabel: '其他联系方式2', + columnLabel: '传真号', columnWidth: '150', columnHidden: false, columnImage: false, @@ -817,13 +762,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1OtherContact3', + serialNumber: '811001Table1OtherContact1', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'otherContact3', + columnProp: 'otherContact1', headerAlign: 'center', align: 'left', - columnLabel: '其他联系方式3', + columnLabel: '其他联系方式1', columnWidth: '150', columnHidden: false, columnImage: false, @@ -835,13 +780,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1Email', + serialNumber: '811001Table1OtherContact2', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'email', + columnProp: 'otherContact2', headerAlign: 'center', align: 'left', - columnLabel: '邮箱', + columnLabel: '其他联系方式2', columnWidth: '150', columnHidden: false, columnImage: false, @@ -853,13 +798,13 @@ export default { { userId: this.$store.state.user.name, functionId: this.functionId, - serialNumber: '811001Table1Email2', + serialNumber: '811001Table1OtherContact3', tableId: '811001Table1', tableName: '供应商信息', - columnProp: 'email2', + columnProp: 'otherContact3', headerAlign: 'center', align: 'left', - columnLabel: '邮箱2', + columnLabel: '其他联系方式3', columnWidth: '150', columnHidden: false, columnImage: false, @@ -1011,6 +956,24 @@ export default { sortLv: 0, status: true, fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: this.functionId, + serialNumber: '811001Table1Active', + tableId: '811001Table1', + tableName: '供应商信息', + columnProp: 'active', + headerAlign: 'center', + align: 'center', + columnLabel: '在用', + columnWidth: '100', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false } ], columnArray3: [