From d1f542a841498ca257963c256863f4aa754fb856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Fri, 18 Oct 2024 18:08:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4=EF=BC=88?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=EF=BC=8C=E5=9C=A8=E5=81=9A=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=8D=95=E4=BB=B7=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/yh/price.js | 22 + src/api/yh/report.js | 44 ++ .../Business/Dept/DeptTreeSelect.vue | 18 + src/components/Business/Price/PriceDialog.vue | 322 +++++++++++ src/components/Business/Price/PriceInput.vue | 204 +++++++ src/utils/constants.js | 6 +- src/utils/mixins.js | 3 +- .../yh/price/components/VerifyPriceDialog.vue | 40 +- src/views/yh/price/index.vue | 70 ++- src/views/yh/report/index.vue | 509 ++++++++++++++++++ 10 files changed, 1195 insertions(+), 43 deletions(-) create mode 100644 src/api/yh/report.js create mode 100644 src/components/Business/Price/PriceDialog.vue create mode 100644 src/components/Business/Price/PriceInput.vue create mode 100644 src/views/yh/report/index.vue diff --git a/src/api/yh/price.js b/src/api/yh/price.js index 0d40128..71d7ff5 100644 --- a/src/api/yh/price.js +++ b/src/api/yh/price.js @@ -9,6 +9,20 @@ export function listPrice(query) { }) } +// 查询单价列表ByIds +export function listPriceByIds(priceIds) { + return request({ + url: '/yh/price/listByIds', + config: { + headers: { + repeatSubmit: false, + } + }, + method: 'post', + data: priceIds + }) +} + // 查询单价详细 export function getPrice(priceId) { return request({ @@ -78,3 +92,11 @@ export function disablePrice(priceId) { method: 'put' }) } + +// 单价启用 +export function enablePrice(priceId) { + return request({ + url: `/yh/price/${priceId}/enable`, + method: 'put' + }) +} diff --git a/src/api/yh/report.js b/src/api/yh/report.js new file mode 100644 index 0000000..0f7dcc7 --- /dev/null +++ b/src/api/yh/report.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询报表列表 +export function listReport(query) { + return request({ + url: '/yh/report/list', + method: 'get', + params: query + }) +} + +// 查询报表详细 +export function getReport(reportId) { + return request({ + url: '/yh/report/' + reportId, + method: 'get' + }) +} + +// 新增报表 +export function addReport(data) { + return request({ + url: '/yh/report', + method: 'post', + data: data + }) +} + +// 修改报表 +export function updateReport(data) { + return request({ + url: '/yh/report', + method: 'put', + data: data + }) +} + +// 删除报表 +export function delReport(reportId) { + return request({ + url: '/yh/report/' + reportId, + method: 'delete' + }) +} diff --git a/src/components/Business/Dept/DeptTreeSelect.vue b/src/components/Business/Dept/DeptTreeSelect.vue index 99f5aae..5ea5ec8 100644 --- a/src/components/Business/Dept/DeptTreeSelect.vue +++ b/src/components/Business/Dept/DeptTreeSelect.vue @@ -6,6 +6,10 @@ :placeholder="placeholder" :disabled="disabled" @select="onSelect" + :style="{ + height: height, + width: width + }" /> @@ -30,6 +34,14 @@ export default { disabled: { type: Boolean, default: false + }, + height: { + type: String, + default: '32px' + }, + width: { + type: String, + default: '100%' } }, data() { @@ -77,3 +89,9 @@ export default { } + + diff --git a/src/components/Business/Price/PriceDialog.vue b/src/components/Business/Price/PriceDialog.vue new file mode 100644 index 0000000..c8baf00 --- /dev/null +++ b/src/components/Business/Price/PriceDialog.vue @@ -0,0 +1,322 @@ + + + + + + diff --git a/src/components/Business/Price/PriceInput.vue b/src/components/Business/Price/PriceInput.vue new file mode 100644 index 0000000..1019e05 --- /dev/null +++ b/src/components/Business/Price/PriceInput.vue @@ -0,0 +1,204 @@ + + + + + + diff --git a/src/utils/constants.js b/src/utils/constants.js index 95f6738..93a5cd0 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -10,7 +10,7 @@ export const PriceStatus = { REJECT: "4", // 未通过 // 允许编辑 canEdit(status) { - return [this.WAIT_SUBMIT].includes(status); + return [this.WAIT_SUBMIT, this.REJECT].includes(status); }, // 允许提交 canSubmit(status) { @@ -27,5 +27,9 @@ export const PriceStatus = { // 允许禁用 canDisable(status) { return [this.PASS].includes(status); + }, + // 允许启用 + canEnable(status) { + return [this.PASS].includes(status); } } diff --git a/src/utils/mixins.js b/src/utils/mixins.js index e96ab52..f1b9b3c 100644 --- a/src/utils/mixins.js +++ b/src/utils/mixins.js @@ -1,7 +1,6 @@ - -// 视图 import {views} from "@/utils/constants"; +// 视图 export const $view = { props: { view: { diff --git a/src/views/yh/price/components/VerifyPriceDialog.vue b/src/views/yh/price/components/VerifyPriceDialog.vue index 510565b..7877cb2 100644 --- a/src/views/yh/price/components/VerifyPriceDialog.vue +++ b/src/views/yh/price/components/VerifyPriceDialog.vue @@ -1,22 +1,28 @@