Commit f1e5ee86 by 前端

ui修改

1 parent fc90098d
......@@ -11,7 +11,7 @@
</GLTable>
<!-- 生成弹窗 -->
<GLDialog title="生成无忧卡" mode="mid" v-if="addDialog" :visible.sync="addDialog" :before-close="handleClose" @onOk="submitForm('detailForm')" @onCancel="cancelDetailDialog">
<glsx-combi-form ref="product" labelWidth="154px" defaultWidth="360px" formRef="detailForm" :formObj="addDialogForm" :formData="addDialogFormData" :formRules="addDialogRules"></glsx-combi-form>
<glsx-combi-form ref="productCard" labelWidth="154px" defaultWidth="360px" formRef="detailForm" :formObj="addDialogForm" :formData="addDialogFormData" :formRules="addDialogRules"></glsx-combi-form>
</GLDialog>
</div>
</div>
......@@ -281,7 +281,7 @@ export default {
}
},
submitForm(formName) {
this.$refs.product.$refs[formName].validate(valid => {
this.$refs.productCard.$refs[formName].validate(valid => {
if (valid) {
this.$apis.addWorryFree.addCards(this.addDialogForm).then(res => {
if (res.code == '0') {
......
......@@ -2,7 +2,7 @@
<div class="equity-wrap">
<el-button type="primary" icon="el-icon-plus" size="small" @click="showDialog('add')"><span style="margin-left: 5px">新增特别约定</span></el-button>
<div class="equity-wrap contain" style="margin-top: 10px">
<GLCombiForm :rowNumber="1" ref="showSearch" :formObj="appointmentForm" :formData="searchFormData" @handleOk="submitForm('modifyForm')" @handleRest="seletTable('reset')"></GLCombiForm>
<GLCombiForm :rowNumber="1" ref="showSearch" :formObj="appointmentForm" :formData="searchFormData" @handleOk="seletTable('select')" @handleRest="seletTable('reset')"></GLCombiForm>
<el-button style="float:right;margin-bottom:10px;" size="small" @click="exportTable" class="selectBtn">导出</el-button>
<GLTable ref="appointmentTable" :searchForm="appointmentForm" :tableParams="tableParams" :pageConf="tablePageConf" :getListApi="getAppointmentList">
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
......@@ -14,30 +14,14 @@
</GLTable>
<!-- 修改界面弹窗 -->
<GLDialog :title="dialogTitle" mode="mid" class="detailDialog" v-if="modifyDialog" :visible.sync="modifyDialog" :before-close="handleClose" @onOk="submitForm('modifyForm')" @onCancel="cancelDialog">
<el-form :inline="true" :model="modifyDialogForm" :rules="modifyDialogRules" ref="modifyForm" label-width="120px" class="detailForm">
<div class="form">
<el-row>
<el-form-item label="名称:" prop="spaName">
<el-input v-model="modifyDialogForm.spaName" placeholder="请输入" size="small"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="特约内容" prop="spaContent" style="margin-top: 24px">
<el-input type="textarea" v-model="modifyDialogForm.spaContent" maxlength="200" placeholder="请输入"></el-input>
</el-form-item>
</el-row>
</div>
</el-form>
<!-- <span slot="footer" class="dialog-footer">
<el-button size="small" @click="cancelDialog">取 消</el-button>
<el-button size="small" type="primary" @click="submitForm('modifyForm')">确 定</el-button>
</span> -->
<glsx-combi-form ref="spaRef" labelWidth="154px" defaultWidth="360px" formRef="modifyForm" :formObj="modifyDialogForm" :formData="modifyDialogData" :formRules="modifyDialogRules"></glsx-combi-form>
</GLDialog>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
function date_format(date) {
var date2 = new Date(date)
var YY = date2.getFullYear() + '-'
......@@ -51,6 +35,9 @@ function date_format(date) {
import utils from '../../util/util'
export default {
name: '',
components:{
glsxCombiForm
},
data() {
return {
date_format,
......@@ -92,6 +79,22 @@ export default {
type: 'input'
}
],
modifyDialogData: [
{
type: 'input',
label: '特约名称',
name: 'spaName',
isClear: true,
},
{
type: 'input',
label: '特约内容',
name: 'spaContent',
isClear: true,
maxlength: 200,
inputType:'textarea',
}
],
isAdd: false,
getAppointmentList: this.$apis.appointmentApi.getAppointmentList,
dialogTitle: '',
......@@ -114,12 +117,11 @@ export default {
{
label: '特约名称',
prop: 'spaName',
width: 400
width: 400
},
{
label: '特约内容',
prop: 'spaContent',
line: 2,
width: 400
},
......@@ -164,7 +166,7 @@ export default {
this.modifyDialogForm = {}
},
submitForm(formName) {
this.$refs[formName].validate(valid => {
this.$refs.spaRef.$refs[formName].validate(valid => {
if (valid) {
this.$apis.appointmentApi.modifyAppointment(this.modifyDialogForm).then(res => {
if (res.code == '0') {
......@@ -174,7 +176,7 @@ export default {
})
this.modifyDialog = false
this.modifyDialogForm = {}
this.$refs.modifyForm.clearValidate()
this.$refs.spaRef.$refs.modifyForm.clearValidate()
this.$refs.appointmentTable.refreshTable()
} else {
this.$message({
......
......@@ -12,7 +12,7 @@
</div>
<!-- 详情弹窗 -->
<GLDialog title="修改无忧卡" v-if="detailDialog" :visible.sync="detailDialog" mode="mid" :before-close="handleClose" @onOk="submitForm('detailForm')" @onCancel="cancelDetailDialog">
<glsx-combi-form ref="product" labelWidth="154px" defaultWidth="360px" formRef="detailForm" :formObj="detailDialogForm" :formData="addDialogFormData" :formRules="addDialogRules"></glsx-combi-form>
<glsx-combi-form ref="product" labelWidth="154px" defaultWidth="360px" formRef="detailForm" :formObj="detailDialogForm" :formData="addDialogFormData" :formRules="detailDialogRules"></glsx-combi-form>
</GLDialog>
</div>
</template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!