diff --git a/klp-ui/src/components/DictSelect/index.vue b/klp-ui/src/components/DictSelect/index.vue index eae364f4..cb48fef6 100644 --- a/klp-ui/src/components/DictSelect/index.vue +++ b/klp-ui/src/components/DictSelect/index.vue @@ -8,10 +8,11 @@ style="width: 200px;" :multiple="multiple" collapse-tags> @@ -152,11 +153,12 @@ export default { props: { dictType: { type: String, default: '' }, editable: { type: Boolean, default: true }, - kisv: { type: Boolean, default: false }, + kisv: { type: Boolean, default: true }, value: { type: String, default: '' }, placeholder: { type: String, default: '请选择' }, refresh: { type: Boolean, default: true }, multiple: { type: Boolean, default: false }, + disables: { type: String, default: '' }, }, data() { return { @@ -199,7 +201,15 @@ export default { this.$emit('change', val) } } - } + }, + disabledOptions() { + return this.dictOptions.map(item => { + return { + ...item, + disabled: this.disabledFormat(item.dictValue) + } + }) + }, }, watch: { dictType: { @@ -235,6 +245,13 @@ export default { this.dictId = res.rows[0].dictId return this.dictId }, + disabledFormat(item) { + if (this.disables) { + const list = this.disables.split(',') + return list.includes(item) + } + return false + }, // 新增:刷新字典数据 async handleRefresh() { this.loading = true diff --git a/klp-ui/src/views/wms/hrm/records/meal.vue b/klp-ui/src/views/wms/hrm/records/meal.vue index 22a91760..06d297aa 100644 --- a/klp-ui/src/views/wms/hrm/records/meal.vue +++ b/klp-ui/src/views/wms/hrm/records/meal.vue @@ -163,11 +163,11 @@ - +
({{ form.dineInPeople || 0 }}人)
- +
({{ form.takeoutPeople || 0 }}人)