liu
2 天以前 f11bd0d8d9c1190340a445a67df9e43cdbde0a3e
src/views/mes/pro/feedback/detail/index.vue
@@ -7,15 +7,27 @@
import { Page } from '@vben/common-ui';
import { useTabs } from '@vben/hooks';
import { Card, Tabs } from 'ant-design-vue';
import { DICT_TYPE } from '@vben/constants';
import { Card, Table, Tabs } from 'ant-design-vue';
import { TableAction } from '#/adapter/vxe-table';
import { getFeedback } from '#/api/mes/pro/feedback';
import { DictTag } from '#/components/dict-tag';
import { useDescription } from '#/components/description';
import { useDetailSchema } from '../data';
import ItemConsumeList from '../modules/item-consume-list.vue';
import ProductProduceList from '../modules/product-produce-list.vue';
const paramColumns = [
  { title: '参数名称', dataIndex: 'paramName', key: 'paramName' },
  { title: '参数编码', dataIndex: 'paramCode', key: 'paramCode' },
  { title: '参数类型', dataIndex: 'paramType', key: 'paramType' },
  { title: '单位', dataIndex: 'unitMeasureName', key: 'unitMeasureName' },
  { title: '参数值', dataIndex: 'paramValue', key: 'paramValue' },
  { title: '是否必填', dataIndex: 'required', key: 'required' },
];
const props = defineProps<{ id: string }>();
@@ -62,6 +74,31 @@
    <Card class="min-h-[10%]">
      <Descriptions :data="feedback" />
    </Card>
    <Card v-if="feedback.paramValues && feedback.paramValues.length > 0" class="mt-3" title="工艺参数">
      <Table
        :columns="paramColumns"
        :data-source="feedback.paramValues"
        :pagination="false"
        row-key="detailId"
        size="small"
      >
        <template #bodyCell="{ column, record }">
          <template v-if="column.key === 'paramType'">
            <DictTag
              v-if="record.paramType !== undefined && record.paramType !== null"
              :type="DICT_TYPE.MES_PD_PARAM_TYPE"
              :value="record.paramType"
            />
          </template>
          <template v-else-if="column.key === 'required'">
            <DictTag
              :type="DICT_TYPE.INFRA_BOOLEAN_STRING"
              :value="record.required ? 'true' : 'false'"
            />
          </template>
        </template>
      </Table>
    </Card>
  </Page>
</template>