From 040486d9d8d08172be4464cc3f2fca36a9ed5d50 Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Fri, 24 May 2024 17:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=A5=97=E9=A4=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicinformation/setmeal/setmeal.vue | 10 +++++++-- .../basicinformation/setmeal/setmealAdd.vue | 21 +++++++++++++------ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/yxt-as-ui/src/views/basicinformation/setmeal/setmeal.vue b/yxt-as-ui/src/views/basicinformation/setmeal/setmeal.vue index 39a5a6ba6e..f8f9a526df 100644 --- a/yxt-as-ui/src/views/basicinformation/setmeal/setmeal.vue +++ b/yxt-as-ui/src/views/basicinformation/setmeal/setmeal.vue @@ -113,7 +113,9 @@ export default { total: 0, params: { packageName: '', - orgPath: '' + orgPath: '', + menuUrl: '', + userSid: '' } } } @@ -168,6 +170,8 @@ export default { // 查询列表信息 getList() { this.listLoading = true + this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') + this.listQuery.params.menuUrl = this.$route.path this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') req.listPage(this.listQuery).then(response => { this.listLoading = false @@ -193,7 +197,9 @@ export default { total: 0, params: { packageName: '', - orgPath: '' + orgPath: '', + menuUrl: '', + userSid: '' } } this.getList() diff --git a/yxt-as-ui/src/views/basicinformation/setmeal/setmealAdd.vue b/yxt-as-ui/src/views/basicinformation/setmeal/setmealAdd.vue index 552e8dd316..f7bf12613d 100644 --- a/yxt-as-ui/src/views/basicinformation/setmeal/setmealAdd.vue +++ b/yxt-as-ui/src/views/basicinformation/setmeal/setmealAdd.vue @@ -12,7 +12,7 @@ -
套餐名称
+
*套餐名称
@@ -178,7 +178,7 @@ import req from '@/api/basicinformation/setmeal' import maintenanceitem from '@/api/basicinformation/maintenanceitem' import additionitem from '@/api/basicinformation/additionitem' -import { getServiceType, selSubjectInfo } from '@/api/Common/dictcommons' +import { getOrgSidByPath, getServiceType, selSubjectInfo } from '@/api/Common/dictcommons' export default { name: 'SetMealAdd', @@ -245,16 +245,21 @@ export default { }, methods: { init() { - getServiceType({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { + getServiceType({ useOrgSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) }).then((res) => { if (res.success) { this.serviceType_list = res.data } }) - selSubjectInfo({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { + selSubjectInfo({ useOrgSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) }).then((res) => { if (res.success) { this.subject_list = res.data } }) + getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { + if (res.success) { + this.formobj.createOrgSid = res.data + } + }) }, showAdd() { this.viewTitle = '【新增】套餐' @@ -262,6 +267,8 @@ export default { this.$refs['form_obj'].clearValidate() }) this.init() + this.formobj.createBySid = window.sessionStorage.getItem('userSid') + this.formobj.useOrgSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) }, showEdit(row) { this.viewTitle = '【新增】套餐' @@ -516,11 +523,13 @@ export default { document.body.click() }, saveOrUpdate() { + if (this.formobj.packageName === '') { + this.$message({ showClose: true, type: 'error', message: '套餐名称不能为空' }) + return + } this.$refs['form_obj'].validate((valid) => { if (valid) { this.submitdisabled = true - this.formobj.createBySid = window.sessionStorage.getItem('userSid') - this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath') req.saveOrUpdate(this.formobj).then((res) => { if (res.success) { this.$message({ showClose: true, type: 'success', message: '保存成功' })