Browse Source

优化调整更好的变价模板配置项

master
李磊 3 years ago
parent
commit
cebc09334b
  1. 87
      src/components/drawerDialog/index.vue

87
src/components/drawerDialog/index.vue

@ -4,7 +4,7 @@
:visible.sync="drawer" :visible.sync="drawer"
size="90%" size="90%"
:destroy-on-close="true" :destroy-on-close="true"
:before-close="(done) => { $emit('closeTemplateDrawer') }" :before-close="beforeClose"
@open="open" @open="open"
> >
<template slot="title" width="100%"> <template slot="title" width="100%">
@ -503,11 +503,29 @@
label-width="150px" label-width="150px"
> >
<el-radio-group v-model="form.writeMode" @change="changeWriteMode"> <el-radio-group v-model="form.writeMode" @change="changeWriteMode">
<el-radio v-for="(item, writeModeIndex) in writeModes" :key="writeModeIndex" :label="writeModeIndex" :disabled="form.tableMode === 2"> <el-radio v-for="(item, writeModeIndex) in writeModes" :key="writeModeIndex" :label="writeModeIndex" :disabled="(form.tableMode === 0 && writeModeIndex === 1) || (form.tableMode === 1 && writeModeIndex !== 1)">
{{ item }} {{ item }}
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item
label="表格行寻找模式"
prop="tableRowFindMode"
label-width="150px"
>
<el-radio-group v-model="form.tableRowFindMode" @change="changeTableRowFindMode">
<el-tooltip class="item" effect="dark" content="达到当前行数限制,或未找到行时自动翻页继续寻找下一行" placement="top-start">
<el-radio :label="0">
自动
</el-radio>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="达到表格限定高度,将最后一行移除,在下一页继续写入" placement="top-start">
<el-radio :label="1">
表格高度限制
</el-radio>
</el-tooltip>
</el-radio-group>
</el-form-item>
<el-form-item <el-form-item
label="表格索引" label="表格索引"
prop="tableIndex" prop="tableIndex"
@ -517,7 +535,7 @@
v-model="form.tableIndex" v-model="form.tableIndex"
:min="0" :min="0"
:max="100" :max="100"
:disabled="form.tableMode === 2" :disabled="form.tableMode === 1"
/> />
<el-alert <el-alert
type="warning" type="warning"
@ -535,7 +553,7 @@
v-model="form.tableStartRow" v-model="form.tableStartRow"
:min="0" :min="0"
:max="100" :max="100"
:disabled="form.tableMode === 2" :disabled="form.tableMode === 1"
/> />
<el-alert <el-alert
type="warning" type="warning"
@ -553,7 +571,7 @@
v-model="form.tableRowCount" v-model="form.tableRowCount"
:min="0" :min="0"
:max="100" :max="100"
:disabled="form.tableMode === 2" :disabled="form.tableMode === 1 || form.tableRowFindMode === 1"
/> />
<el-alert <el-alert
type="warning" type="warning"
@ -571,7 +589,7 @@
v-model="form.affiliatedTableStartRow" v-model="form.affiliatedTableStartRow"
:min="0" :min="0"
:max="100" :max="100"
:disabled="form.tableMode === 2" :disabled="form.tableMode === 1"
/> />
<el-alert <el-alert
type="warning" type="warning"
@ -589,7 +607,7 @@
v-model="form.affiliatedTableRowCount" v-model="form.affiliatedTableRowCount"
:min="0" :min="0"
:max="100" :max="100"
:disabled="form.tableMode === 2" :disabled="form.tableMode === 1 || form.tableRowFindMode === 1"
/> />
<el-alert <el-alert
type="warning" type="warning"
@ -668,7 +686,7 @@ export default {
formTemplate: { formTemplate: {
tempName: '', tempName: '',
tempCategory: '', tempCategory: '',
bglx: '', bglx: 1,
jianyanleibie: '', jianyanleibie: '',
shebeizhongleidaima: '', shebeizhongleidaima: '',
shebeileibiedaima: '', shebeileibiedaima: '',
@ -677,23 +695,25 @@ export default {
withDicCode: '', withDicCode: '',
parentId: '', parentId: '',
version: '', version: '',
sort: '', sort: 0,
cleanState: '' cleanState: false,
showPageStatus: true
}, },
templateSettingId: '', templateSettingId: '',
dialogVisible1: false, dialogVisible1: false,
formLabelAlign: { formLabelAlign: {
field: '', field: '',
fieldMode: '1', fieldMode: 0,
indexFromRight: '', indexFromRight: '',
templateId: '', // id templateId: '', // id
templateSettingId: '' // id templateSettingId: '' // id
}, },
form: { form: {
templateId: '', templateId: '',
writeMode: 1, writeMode: 0,
tableIndex: 1, tableIndex: 1,
tableMode: 1, tableMode: 0,
tableRowFindMode: 0,
tableStartRow: 0, tableStartRow: 0,
tableRowCount: 0, tableRowCount: 0,
affiliatedTableStartRow: 0, affiliatedTableStartRow: 0,
@ -715,6 +735,9 @@ export default {
}, { }, {
value: 'OTHER', value: 'OTHER',
label: '其他' label: '其他'
}, {
value: 'HZD',
label: '回执单'
} }
], ],
jylbList: [], jylbList: [],
@ -750,29 +773,40 @@ export default {
methods: { methods: {
changeTableMode() { changeTableMode() {
switch (this.form.tableMode) { switch (this.form.tableMode) {
case 0:
this.form.writeMode = 0
this.form.tableIndex = 1
this.form.tableStartRow = 1
this.form.tableRowCount = this.form.tableRowFindMode ? 0 : 1
this.form.affiliatedTableStartRow = 0
this.form.affiliatedTableRowCount = 0
break
case 1: case 1:
this.form.writeMode = 1 this.form.writeMode = 1
break
case 2:
default:
this.form.writeMode = 2
this.form.tableIndex = 0 this.form.tableIndex = 0
this.form.tableStartRow = 0 this.form.tableStartRow = 0
this.form.tableRowCount = 0 this.form.tableRowCount = 0
this.form.affiliatedTableStartRow = 0 this.form.affiliatedTableStartRow = 0
this.form.affiliatedTableRowCount = 0 this.form.affiliatedTableRowCount = 0
break break
default:
break
} }
}, },
changeWriteMode() { changeWriteMode() {
switch (this.form.writeMode) { switch (this.form.writeMode) {
case 1: case 0:
case 2:
case 3: case 3:
case 4: this.form.tableMode = 0
this.form.tableMode = 1 this.form.tableIndex = 1
this.form.tableStartRow = 1
this.form.tableRowCount = this.form.tableRowFindMode ? 0 : 1
this.form.affiliatedTableStartRow = 0
this.form.affiliatedTableRowCount = 0
break break
case 2: case 1:
this.form.tableMode = 2 this.form.tableMode = 1
this.form.tableIndex = 0 this.form.tableIndex = 0
this.form.tableStartRow = 0 this.form.tableStartRow = 0
this.form.tableRowCount = 0 this.form.tableRowCount = 0
@ -783,6 +817,10 @@ export default {
break break
} }
}, },
changeTableRowFindMode() {
this.form.tableRowCount = 0
this.form.affiliatedTableRowCount = 0
},
close() { close() {
this.$refs.templateSettingForm.resetFields() this.$refs.templateSettingForm.resetFields()
}, },
@ -1108,6 +1146,11 @@ export default {
this.templateSettingId = row.id this.templateSettingId = row.id
this.$refs.settingList.toggleRowSelection(row) this.$refs.settingList.toggleRowSelection(row)
this.getDemoList(row.id) this.getDemoList(row.id)
},
beforeClose(done) {
this.list.length = 0
this.gridData.length = 0
this.$emit('closeTemplateDrawer')
} }
} }
} }

Loading…
Cancel
Save