fix(mes): 修复迁移 review 第一批 5 个 bug(B001 vue 误导入 P0 + B002-B005 P1)
parent
22e9081a45
commit
3f7134d3fc
|
|
@ -2,9 +2,9 @@
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { MesDvCheckRecordLineApi } from '#/api/mes/dv/checkrecord/line';
|
import type { MesDvCheckRecordLineApi } from '#/api/mes/dv/checkrecord/line';
|
||||||
|
|
||||||
import { computed, MesDvCheckResultEnum, MesDvSubjectTypeEnum, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { DICT_TYPE } from '@vben/constants';
|
import { DICT_TYPE, MesDvCheckResultEnum, MesDvSubjectTypeEnum } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { message, Modal } from 'ant-design-vue';
|
import { message, Modal } from 'ant-design-vue';
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { MesDvMaintenRecordLineApi } from '#/api/mes/dv/maintenrecord/line';
|
import type { MesDvMaintenRecordLineApi } from '#/api/mes/dv/maintenrecord/line';
|
||||||
|
|
||||||
import { computed, MesDvMaintenStatusEnum, MesDvSubjectTypeEnum, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { DICT_TYPE } from '@vben/constants';
|
import { DICT_TYPE, MesDvMaintenStatusEnum, MesDvSubjectTypeEnum } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { message, Modal } from 'ant-design-vue';
|
import { message, Modal } from 'ant-design-vue';
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { MesProProcessApi } from '#/api/mes/pro/process';
|
import type { MesProProcessApi } from '#/api/mes/pro/process';
|
||||||
import type { MesProProcessContentApi } from '#/api/mes/pro/process/content';
|
import type { MesProProcessContentApi } from '#/api/mes/pro/process/content';
|
||||||
|
|
||||||
import { DICT_TYPE, h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum, MesAutoCodeRuleCode } from '@vben/constants';
|
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button } from 'ant-design-vue';
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ import type { MesProRouteProcessApi } from '#/api/mes/pro/route/process';
|
||||||
import type { MesProRouteProductApi } from '#/api/mes/pro/route/product';
|
import type { MesProRouteProductApi } from '#/api/mes/pro/route/product';
|
||||||
import type { MesProRouteProductBomApi } from '#/api/mes/pro/route/productbom';
|
import type { MesProRouteProductBomApi } from '#/api/mes/pro/route/productbom';
|
||||||
|
|
||||||
import { DICT_TYPE, h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum, MesAutoCodeRuleCode } from '@vben/constants';
|
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button } from 'ant-design-vue';
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import type { MesQcTemplateApi } from '#/api/mes/qc/template';
|
||||||
import type { MesQcTemplateIndicatorApi } from '#/api/mes/qc/template/indicator';
|
import type { MesQcTemplateIndicatorApi } from '#/api/mes/qc/template/indicator';
|
||||||
import type { MesQcTemplateItemApi } from '#/api/mes/qc/template/item';
|
import type { MesQcTemplateItemApi } from '#/api/mes/qc/template/item';
|
||||||
|
|
||||||
import { DICT_TYPE, h, markRaw } from 'vue';
|
import { h, markRaw } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum, MesAutoCodeRuleCode } from '@vben/constants';
|
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button } from 'ant-design-vue';
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,14 @@ import type { MesWmBarcodeApi } from '#/api/mes/wm/barcode';
|
||||||
import type { MesWmBarcodeConfigApi } from '#/api/mes/wm/barcode/config';
|
import type { MesWmBarcodeConfigApi } from '#/api/mes/wm/barcode/config';
|
||||||
import type { DescriptionItemSchema } from '#/components/description';
|
import type { DescriptionItemSchema } from '#/components/description';
|
||||||
|
|
||||||
import { BarcodeBizTypeEnum, DICT_TYPE, h, markRaw } from 'vue';
|
import { h, markRaw } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum } from '@vben/constants';
|
import {
|
||||||
|
BarcodeBizTypeEnum,
|
||||||
|
CommonStatusEnum,
|
||||||
|
DICT_TYPE,
|
||||||
|
MesProWorkOrderStatusEnum,
|
||||||
|
} from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
import { formatDateTime } from '@vben/utils';
|
import { formatDateTime } from '@vben/utils';
|
||||||
|
|
||||||
|
|
@ -222,6 +227,7 @@ export function useFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
|
||||||
label: '工单',
|
label: '工单',
|
||||||
component: markRaw(ProWorkOrderSelect),
|
component: markRaw(ProWorkOrderSelect),
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
status: MesProWorkOrderStatusEnum.CONFIRMED,
|
||||||
onChange: (item: any) => syncBizDetail(formApi, item),
|
onChange: (item: any) => syncBizDetail(formApi, item),
|
||||||
},
|
},
|
||||||
dependencies: {
|
dependencies: {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { MesWmBarcodeApi } from '#/api/mes/wm/barcode';
|
import type { MesWmBarcodeApi } from '#/api/mes/wm/barcode';
|
||||||
|
|
||||||
import { BarcodeBizTypeEnum, computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { CommonStatusEnum } from '@vben/constants';
|
import { BarcodeBizTypeEnum, CommonStatusEnum } from '@vben/constants';
|
||||||
|
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,6 @@ export function useFormSchema(
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入入库单名称',
|
placeholder: '请输入入库单名称',
|
||||||
},
|
},
|
||||||
rules: 'required',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'receiptDate',
|
fieldName: 'receiptDate',
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import type { MesWmMaterialStockApi } from '#/api/mes/wm/materialstock';
|
||||||
|
|
||||||
import { markRaw } from 'vue';
|
import { markRaw } from 'vue';
|
||||||
|
|
||||||
|
import { useAccess } from '@vben/access';
|
||||||
import { DICT_TYPE } from '@vben/constants';
|
import { DICT_TYPE } from '@vben/constants';
|
||||||
|
|
||||||
import { MdItemSelect } from '#/views/mes/md/item/components';
|
import { MdItemSelect } from '#/views/mes/md/item/components';
|
||||||
|
|
@ -84,6 +85,7 @@ export function useGridColumns(
|
||||||
row: MesWmMaterialStockApi.MaterialStock,
|
row: MesWmMaterialStockApi.MaterialStock,
|
||||||
) => Promise<boolean | undefined>,
|
) => Promise<boolean | undefined>,
|
||||||
): VxeTableGridOptions<MesWmMaterialStockApi.MaterialStock>['columns'] {
|
): VxeTableGridOptions<MesWmMaterialStockApi.MaterialStock>['columns'] {
|
||||||
|
const { hasAccessByCodes } = useAccess();
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
field: 'itemCode',
|
field: 'itemCode',
|
||||||
|
|
@ -145,7 +147,12 @@ export function useGridColumns(
|
||||||
cellRender: {
|
cellRender: {
|
||||||
name: 'CellSwitch',
|
name: 'CellSwitch',
|
||||||
attrs: { beforeChange: onFrozenChange },
|
attrs: { beforeChange: onFrozenChange },
|
||||||
props: { checkedValue: true, unCheckedValue: false },
|
props: {
|
||||||
|
checkedValue: true,
|
||||||
|
// 冻结开关受更新权限控制,无权限时禁用,保持与源项目 v-hasPermi 一致
|
||||||
|
disabled: !hasAccessByCodes(['mes:wm-material-stock:update']),
|
||||||
|
unCheckedValue: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -500,7 +500,6 @@ export function useDetailFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入批次号',
|
placeholder: '请输入批次号',
|
||||||
},
|
},
|
||||||
rules: 'required',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'quantity',
|
fieldName: 'quantity',
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,14 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { MesWmStockTakingPlanApi } from '#/api/mes/wm/stocktaking/plan';
|
import type { MesWmStockTakingPlanApi } from '#/api/mes/wm/stocktaking/plan';
|
||||||
import type { MesWmStockTakingPlanParamApi } from '#/api/mes/wm/stocktaking/plan/param';
|
import type { MesWmStockTakingPlanParamApi } from '#/api/mes/wm/stocktaking/plan/param';
|
||||||
|
|
||||||
import { DICT_TYPE, h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum, MesAutoCodeRuleCode, MesWmStockTakingTypeEnum } from '@vben/constants';
|
import {
|
||||||
|
CommonStatusEnum,
|
||||||
|
DICT_TYPE,
|
||||||
|
MesAutoCodeRuleCode,
|
||||||
|
MesWmStockTakingTypeEnum,
|
||||||
|
} from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button } from 'ant-design-vue';
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { MesWmStockTakingPlanParamApi } from '#/api/mes/wm/stocktaking/plan/param';
|
import type { MesWmStockTakingPlanParamApi } from '#/api/mes/wm/stocktaking/plan/param';
|
||||||
|
|
||||||
import { computed, MesWmStockTakingParamTypeEnum, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { DICT_TYPE } from '@vben/constants';
|
import { DICT_TYPE, MesWmStockTakingParamTypeEnum } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { Form, message, Select, Textarea } from 'ant-design-vue';
|
import { Form, message, Select, Textarea } from 'ant-design-vue';
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@ import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { MesWmWarehouseAreaApi } from '#/api/mes/wm/warehouse/area';
|
import type { MesWmWarehouseAreaApi } from '#/api/mes/wm/warehouse/area';
|
||||||
|
|
||||||
import { DICT_TYPE, h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum, MesAutoCodeRuleCode } from '@vben/constants';
|
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button } from 'ant-design-vue';
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { MesDvCheckRecordLineApi } from '#/api/mes/dv/checkrecord/line';
|
import type { MesDvCheckRecordLineApi } from '#/api/mes/dv/checkrecord/line';
|
||||||
|
|
||||||
import { computed, MesDvCheckResultEnum, MesDvSubjectTypeEnum, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { DICT_TYPE } from '@vben/constants';
|
import { DICT_TYPE, MesDvCheckResultEnum, MesDvSubjectTypeEnum } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { ElButton, ElDialog, ElMessage } from 'element-plus';
|
import { ElButton, ElDialog, ElMessage } from 'element-plus';
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { MesDvMaintenRecordLineApi } from '#/api/mes/dv/maintenrecord/line';
|
import type { MesDvMaintenRecordLineApi } from '#/api/mes/dv/maintenrecord/line';
|
||||||
|
|
||||||
import { computed, MesDvMaintenStatusEnum, MesDvSubjectTypeEnum, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { DICT_TYPE } from '@vben/constants';
|
import { DICT_TYPE, MesDvMaintenStatusEnum, MesDvSubjectTypeEnum } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { ElButton, ElDialog, ElMessage } from 'element-plus';
|
import { ElButton, ElDialog, ElMessage } from 'element-plus';
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { MesProProcessApi } from '#/api/mes/pro/process';
|
import type { MesProProcessApi } from '#/api/mes/pro/process';
|
||||||
import type { MesProProcessContentApi } from '#/api/mes/pro/process/content';
|
import type { MesProProcessContentApi } from '#/api/mes/pro/process/content';
|
||||||
|
|
||||||
import { DICT_TYPE, h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum, MesAutoCodeRuleCode } from '@vben/constants';
|
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { ElButton } from 'element-plus';
|
import { ElButton } from 'element-plus';
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ import type { MesProRouteProcessApi } from '#/api/mes/pro/route/process';
|
||||||
import type { MesProRouteProductApi } from '#/api/mes/pro/route/product';
|
import type { MesProRouteProductApi } from '#/api/mes/pro/route/product';
|
||||||
import type { MesProRouteProductBomApi } from '#/api/mes/pro/route/productbom';
|
import type { MesProRouteProductBomApi } from '#/api/mes/pro/route/productbom';
|
||||||
|
|
||||||
import { DICT_TYPE, h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum, MesAutoCodeRuleCode } from '@vben/constants';
|
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { ElButton } from 'element-plus';
|
import { ElButton } from 'element-plus';
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import type { MesQcTemplateApi } from '#/api/mes/qc/template';
|
||||||
import type { MesQcTemplateIndicatorApi } from '#/api/mes/qc/template/indicator';
|
import type { MesQcTemplateIndicatorApi } from '#/api/mes/qc/template/indicator';
|
||||||
import type { MesQcTemplateItemApi } from '#/api/mes/qc/template/item';
|
import type { MesQcTemplateItemApi } from '#/api/mes/qc/template/item';
|
||||||
|
|
||||||
import { DICT_TYPE, h, markRaw } from 'vue';
|
import { h, markRaw } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum, MesAutoCodeRuleCode } from '@vben/constants';
|
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { ElButton } from 'element-plus';
|
import { ElButton } from 'element-plus';
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,14 @@ import type { MesWmBarcodeApi } from '#/api/mes/wm/barcode';
|
||||||
import type { MesWmBarcodeConfigApi } from '#/api/mes/wm/barcode/config';
|
import type { MesWmBarcodeConfigApi } from '#/api/mes/wm/barcode/config';
|
||||||
import type { DescriptionItemSchema } from '#/components/description';
|
import type { DescriptionItemSchema } from '#/components/description';
|
||||||
|
|
||||||
import { BarcodeBizTypeEnum, DICT_TYPE, h, markRaw } from 'vue';
|
import { h, markRaw } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum } from '@vben/constants';
|
import {
|
||||||
|
BarcodeBizTypeEnum,
|
||||||
|
CommonStatusEnum,
|
||||||
|
DICT_TYPE,
|
||||||
|
MesProWorkOrderStatusEnum,
|
||||||
|
} from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
import { formatDateTime } from '@vben/utils';
|
import { formatDateTime } from '@vben/utils';
|
||||||
|
|
||||||
|
|
@ -222,6 +227,7 @@ export function useFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
|
||||||
label: '工单',
|
label: '工单',
|
||||||
component: markRaw(ProWorkOrderSelect),
|
component: markRaw(ProWorkOrderSelect),
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
status: MesProWorkOrderStatusEnum.CONFIRMED,
|
||||||
onChange: (item: any) => syncBizDetail(formApi, item),
|
onChange: (item: any) => syncBizDetail(formApi, item),
|
||||||
},
|
},
|
||||||
dependencies: {
|
dependencies: {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { MesWmBarcodeApi } from '#/api/mes/wm/barcode';
|
import type { MesWmBarcodeApi } from '#/api/mes/wm/barcode';
|
||||||
|
|
||||||
import { BarcodeBizTypeEnum, computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { CommonStatusEnum } from '@vben/constants';
|
import { BarcodeBizTypeEnum, CommonStatusEnum } from '@vben/constants';
|
||||||
|
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,6 @@ export function useFormSchema(
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入入库单名称',
|
placeholder: '请输入入库单名称',
|
||||||
},
|
},
|
||||||
rules: 'required',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'receiptDate',
|
fieldName: 'receiptDate',
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import type { MesWmMaterialStockApi } from '#/api/mes/wm/materialstock';
|
||||||
|
|
||||||
import { markRaw } from 'vue';
|
import { markRaw } from 'vue';
|
||||||
|
|
||||||
|
import { useAccess } from '@vben/access';
|
||||||
import { DICT_TYPE } from '@vben/constants';
|
import { DICT_TYPE } from '@vben/constants';
|
||||||
|
|
||||||
import { MdItemSelect } from '#/views/mes/md/item/components';
|
import { MdItemSelect } from '#/views/mes/md/item/components';
|
||||||
|
|
@ -84,6 +85,7 @@ export function useGridColumns(
|
||||||
row: MesWmMaterialStockApi.MaterialStock,
|
row: MesWmMaterialStockApi.MaterialStock,
|
||||||
) => Promise<boolean | undefined>,
|
) => Promise<boolean | undefined>,
|
||||||
): VxeTableGridOptions<MesWmMaterialStockApi.MaterialStock>['columns'] {
|
): VxeTableGridOptions<MesWmMaterialStockApi.MaterialStock>['columns'] {
|
||||||
|
const { hasAccessByCodes } = useAccess();
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
field: 'itemCode',
|
field: 'itemCode',
|
||||||
|
|
@ -145,7 +147,12 @@ export function useGridColumns(
|
||||||
cellRender: {
|
cellRender: {
|
||||||
name: 'CellSwitch',
|
name: 'CellSwitch',
|
||||||
attrs: { beforeChange: onFrozenChange },
|
attrs: { beforeChange: onFrozenChange },
|
||||||
props: { activeValue: true, inactiveValue: false },
|
props: {
|
||||||
|
activeValue: true,
|
||||||
|
// 冻结开关受更新权限控制,无权限时禁用,保持与源项目 v-hasPermi 一致
|
||||||
|
disabled: !hasAccessByCodes(['mes:wm-material-stock:update']),
|
||||||
|
inactiveValue: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -501,7 +501,6 @@ export function useDetailFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入批次号',
|
placeholder: '请输入批次号',
|
||||||
},
|
},
|
||||||
rules: 'required',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'quantity',
|
fieldName: 'quantity',
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,14 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { MesWmStockTakingPlanApi } from '#/api/mes/wm/stocktaking/plan';
|
import type { MesWmStockTakingPlanApi } from '#/api/mes/wm/stocktaking/plan';
|
||||||
import type { MesWmStockTakingPlanParamApi } from '#/api/mes/wm/stocktaking/plan/param';
|
import type { MesWmStockTakingPlanParamApi } from '#/api/mes/wm/stocktaking/plan/param';
|
||||||
|
|
||||||
import { DICT_TYPE, h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum, MesAutoCodeRuleCode, MesWmStockTakingTypeEnum } from '@vben/constants';
|
import {
|
||||||
|
CommonStatusEnum,
|
||||||
|
DICT_TYPE,
|
||||||
|
MesAutoCodeRuleCode,
|
||||||
|
MesWmStockTakingTypeEnum,
|
||||||
|
} from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { ElButton } from 'element-plus';
|
import { ElButton } from 'element-plus';
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { MesWmStockTakingPlanParamApi } from '#/api/mes/wm/stocktaking/plan/param';
|
import type { MesWmStockTakingPlanParamApi } from '#/api/mes/wm/stocktaking/plan/param';
|
||||||
|
|
||||||
import { computed, MesWmStockTakingParamTypeEnum, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { DICT_TYPE } from '@vben/constants';
|
import { DICT_TYPE, MesWmStockTakingParamTypeEnum } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@ import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { MesWmWarehouseAreaApi } from '#/api/mes/wm/warehouse/area';
|
import type { MesWmWarehouseAreaApi } from '#/api/mes/wm/warehouse/area';
|
||||||
|
|
||||||
import { DICT_TYPE, h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { CommonStatusEnum, MesAutoCodeRuleCode } from '@vben/constants';
|
import { CommonStatusEnum, DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
|
||||||
import { getDictOptions } from '@vben/hooks';
|
import { getDictOptions } from '@vben/hooks';
|
||||||
|
|
||||||
import { ElButton } from 'element-plus';
|
import { ElButton } from 'element-plus';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue