luojie 1 month ago
parent
commit
4239d20d50
3 changed files with 27 additions and 20 deletions
  1. +16
    -16
      src/components/Template/CustomTable.vue
  2. +2
    -1
      src/components/Template/HandleFormItem.vue
  3. +9
    -3
      src/views/business/comps/template/comps/dl/DL008.vue

+ 16
- 16
src/components/Template/CustomTable.vue View File

@ -123,17 +123,15 @@
</div>
</template>
<template v-else-if="col.bodyType === 'checkbox'">
<div class="flex flex-wrap">
<HandleFormItem
:fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex"
:fieldItemLabel="fieldItemLabel"
type="checkbox"
v-model="row[col.prop]"
:item="getBodyItem(col, rowIndex)"
@change="onCheckboxChange(rowIndex, colIndex, col, $event)"
:error="hasError(rowIndex, colIndex, col.prop)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" />
</div>
<HandleFormItem
:fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex"
:fieldItemLabel="fieldItemLabel"
type="checkbox"
v-model="row[col.prop]"
:item="getBodyItem(col, rowIndex)"
@change="onCheckboxChange(rowIndex, colIndex, col, $event)"
:error="hasError(rowIndex, colIndex, col.prop)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" />
</template>
</div>
@ -550,17 +548,19 @@ export default {
}
}
} else if (col.bodyType === "checkbox") {
// checkbox - checkbox
//
if (col.required && !col.bodyDisabled) {
const hasChecked = Array.isArray(mainValue) ? mainValue.length > 0 : mainValue;
// checkbox
// checkboxactFill
if (!col.bodyDisabled && this.templateFillType === 'actFill') {
// checkboxtrue
// checkbox
const hasChecked = Array.isArray(mainValue) ? mainValue.length > 0 : mainValue === true;
if (!hasChecked) {
const errorItem = {
rowIndex,
colIndex,
field: col.prop,
label: this.$t(col.label),
error: `请选${this.$t(col.label)}`
error: `${this.$t(col.label)}`
};
errors.push(errorItem);
this.formErrors.push(errorItem);

+ 2
- 1
src/components/Template/HandleFormItem.vue View File

@ -1726,7 +1726,8 @@ export default {
textarea,
.el-select,
.clickable,
.el-date-editor {
.el-date-editor,
.el-checkbox__inner {
border-color: #ff5d5d;
box-shadow: 0 0 6px #ffc3c3 !important;

+ 9
- 3
src/views/business/comps/template/comps/dl/DL008.vue View File

@ -313,7 +313,7 @@ export default {
}
},
mounted() {
// 使
},
methods: {
//
@ -359,8 +359,14 @@ export default {
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
if (key === 'qxbd') {
this.$refs.cxqkqxbbInfoRef.updateFormData('pykssj', row.startDate)
if (key === 'cxqkqxbd') {
// MOCK:
const mockData = [
{"jlzb":"A","jzbh1":undefined,"jzbh2":undefined,"jzbh3":undefined,"jzbh4":undefined,"jzbh1Label":"001","jzbh2Label":"004","jzbh3Label":"007","jzbh4Label":"010"},
{"jlzb":"A","jzbh1":undefined,"jzbh2":undefined,"jzbh3":undefined,"jzbh4":undefined,"jzbh1Label":"002","jzbh2Label":"005","jzbh3Label":"008","jzbh4Label":"011"},
{"jlzb":"A","jzbh1":undefined,"jzbh2":undefined,"jzbh3":undefined,"jzbh4":undefined,"jzbh1Label":"003","jzbh2Label":"006","jzbh3Label":"009","jzbh4Label":"012"}
]
this.$refs[refConf.cxqk].updateDataSource(mockData)
}
},
//

Loading…
Cancel
Save