陶杰
2024-12-18 daa0b51b0b3609c683da3066c2815d3e9eb42b3f
pages/goods/list/index.vue
@@ -1,9 +1,9 @@
<template>
  <el-bus-crud ref="crud" v-bind="tableConfig" />
  <el-bus-crud ref="crud" v-bind="tableConfig" ></el-bus-crud>
</template>
<script>
import { getSortConfig } from '@/utils/form-item-config'
import { getSortConfig,getGoodsCategoryListConfig} from '@/utils/form-item-config'
export default {
  data() {
    return {
@@ -106,7 +106,7 @@
                  hasAll: true,
                  childType: 'el-radio-button',
                },
                default: '',
                default: this.$route.query.status || '',
                span: 24,
                searchImmediately: true,
              },
@@ -161,25 +161,47 @@
                span: 24,
                searchImmediately: true,
              },
              // {
              //   label: '商品分类:',
              //   id: 'category',
              //   component: 'cascader-filter',
              //   el: {
              //     otherInterfaceUri: 'flower/api/flower/category/tree',
              //     props: {
              //       label: 'name',
              //       value: 'id',
              //       checkStrictly: true,
              //     },
              //     emitPath: false,
              //     style: 'width:100%',
              //     clearable: true,
              //     hasAll: true,
              //     childType: 'el-radio-button',
              //   },
              //   span: 24,
              //   searchImmediately: true,
              // },
              {
                label: '商品分类:',
                label: '商品分类',
                id: 'category',
                component: 'cascader-filter',
                type: 'bus-cascader',
                el: {
                  otherInterfaceUri: 'flower/api/flower/category/tree',
                  props: {
                    label: 'name',
                    value: 'id',
                    emitPath: false,
                    checkStrictly: true,
                  },
                  emitPath: false,
                  style: 'width:100%',
                  clearable: true,
                  hasAll: true,
                  childType: 'el-radio-button',
                  filterable: true,
                  style: 'width:100%',
                },
                span: 24,
                searchImmediately: true,
              },
              // {
              //   ...getGoodsCategoryListConfig(),
              //   id: 'category',
              // },
              { label: '商品名称:', id: 'name', type: 'input' },
              { label: '供应商:', id: 'supplierName', type: 'input' },
            ],
@@ -344,7 +366,12 @@
            atClick: (selected) => {
              this.$refs.crud.$refs.extraDialog[4].show({
                ids: selected.map((item) => item.id),
                limited: selected.length === 1 ? selected[0].limited : undefined,
                limited:
                  selected.length === 1
                    ? this.$elBusUtil.isTrueEmpty(selected[0].limited)
                      ? undefined
                      : selected[0].limited
                    : undefined,
              })
              return false
            },
@@ -553,12 +580,15 @@
                label: '限购数量:',
                id: 'limited',
                type: 'input-number',
                el: { precision: 0,  min:1, max: 99999999,  style: 'width:100%'},
                el: {
                  precision: 0,
                  min: 1,
                  max: 99999999,
                  style: 'width:100%',
                },
              },
            ],
            atConfirm: async (val) => {
              const { code } = await this.$elBusHttp.request(
                'flower/api/flower/list/limiteds',
                {