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"
size="90%"
:destroy-on-close="true"
:before-close="(done) => { $emit('closeTemplateDrawer') }"
:before-close="beforeClose"
@open="open"
>
<template slot="title" width="100%">
@ -503,11 +503,29 @@
label-width="150px"
>
<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 }}
</el-radio>
</el-radio-group>
</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
label="表格索引"
prop="tableIndex"
@ -517,7 +535,7 @@
v-model="form.tableIndex"
:min="0"
:max="100"
:disabled="form.tableMode === 2"
:disabled="form.tableMode === 1"
/>
<el-alert
type="warning"
@ -535,7 +553,7 @@
v-model="form.tableStartRow"
:min="0"
:max="100"
:disabled="form.tableMode === 2"
:disabled="form.tableMode === 1"
/>
<el-alert
type="warning"
@ -553,7 +571,7 @@
v-model="form.tableRowCount"
:min="0"
:max="100"
:disabled="form.tableMode === 2"
:disabled="form.tableMode === 1 || form.tableRowFindMode === 1"
/>
<el-alert
type="warning"
@ -571,7 +589,7 @@
v-model="form.affiliatedTableStartRow"
:min="0"
:max="100"
:disabled="form.tableMode === 2"
:disabled="form.tableMode === 1"
/>
<el-alert
type="warning"
@ -589,7 +607,7 @@
v-model="form.affiliatedTableRowCount"
:min="0"
:max="100"
:disabled="form.tableMode === 2"
:disabled="form.tableMode === 1 || form.tableRowFindMode === 1"
/>
<el-alert
type="warning"
@ -668,7 +686,7 @@ export default {
formTemplate: {
tempName: '',
tempCategory: '',
bglx: '',
bglx: 1,
jianyanleibie: '',
shebeizhongleidaima: '',
shebeileibiedaima: '',
@ -677,23 +695,25 @@ export default {
withDicCode: '',
parentId: '',
version: '',
sort: '',
cleanState: ''
sort: 0,
cleanState: false,
showPageStatus: true
},
templateSettingId: '',
dialogVisible1: false,
formLabelAlign: {
field: '',
fieldMode: '1',
fieldMode: 0,
indexFromRight: '',
templateId: '', // id
templateSettingId: '' // id
},
form: {
templateId: '',
writeMode: 1,
writeMode: 0,
tableIndex: 1,
tableMode: 1,
tableMode: 0,
tableRowFindMode: 0,
tableStartRow: 0,
tableRowCount: 0,
affiliatedTableStartRow: 0,
@ -715,6 +735,9 @@ export default {
}, {
value: 'OTHER',
label: '其他'
}, {
value: 'HZD',
label: '回执单'
}
],
jylbList: [],
@ -750,29 +773,40 @@ export default {
methods: {
changeTableMode() {
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:
this.form.writeMode = 1
break
case 2:
default:
this.form.writeMode = 2
this.form.tableIndex = 0
this.form.tableStartRow = 0
this.form.tableRowCount = 0
this.form.affiliatedTableStartRow = 0
this.form.affiliatedTableRowCount = 0
break
default:
break
}
},
changeWriteMode() {
switch (this.form.writeMode) {
case 1:
case 0:
case 2:
case 3:
case 4:
this.form.tableMode = 1
this.form.tableMode = 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 2:
this.form.tableMode = 2
case 1:
this.form.tableMode = 1
this.form.tableIndex = 0
this.form.tableStartRow = 0
this.form.tableRowCount = 0
@ -783,6 +817,10 @@ export default {
break
}
},
changeTableRowFindMode() {
this.form.tableRowCount = 0
this.form.affiliatedTableRowCount = 0
},
close() {
this.$refs.templateSettingForm.resetFields()
},
@ -1108,6 +1146,11 @@ export default {
this.templateSettingId = row.id
this.$refs.settingList.toggleRowSelection(row)
this.getDemoList(row.id)
},
beforeClose(done) {
this.list.length = 0
this.gridData.length = 0
this.$emit('closeTemplateDrawer')
}
}
}

Loading…
Cancel
Save