|
|
@ -12,7 +12,7 @@ |
|
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|
|
|
<el-row style="border-top: 1px solid #e0e3eb"> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">套餐名称</div> |
|
|
|
<div class="span-sty"><span class="addinputInfo">*</span>套餐名称</div> |
|
|
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.packageName" clearable placeholder="" /></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="16"> |
|
|
@ -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: '保存成功' }) |
|
|
|