fix: combinationActivity 调整
This commit is contained in:
parent
39df9be988
commit
c327f79177
@ -1,8 +1,6 @@
|
||||
import request from '@/config/axios'
|
||||
import { Sku, Spu } from '@/api/mall/product/spu'
|
||||
|
||||
// TODO @puhui999: combinationActivity.ts
|
||||
|
||||
export interface CombinationActivityVO {
|
||||
id?: number
|
||||
name?: string
|
@ -6,6 +6,7 @@
|
||||
:is-col="true"
|
||||
:rules="rules"
|
||||
:schema="allSchemas.formSchema"
|
||||
class="mt-10px"
|
||||
>
|
||||
<template #spuId>
|
||||
<el-button @click="spuSelectRef.open()">选择商品</el-button>
|
||||
@ -37,8 +38,8 @@
|
||||
<SpuSelect ref="spuSelectRef" :isSelectSku="true" @confirm="selectSpu" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import * as CombinationActivityApi from '@/api/mall/promotion/combination/combinationactivity'
|
||||
import { CombinationProductVO } from '@/api/mall/promotion/combination/combinationactivity'
|
||||
import * as CombinationActivityApi from '@/api/mall/promotion/combination/combinationActivity'
|
||||
import { CombinationProductVO } from '@/api/mall/promotion/combination/combinationActivity'
|
||||
import { allSchemas, rules } from './combinationActivity.data'
|
||||
import { SpuAndSkuList, SpuProperty, SpuSelect } from '@/views/mall/promotion/components'
|
||||
import { getPropertyList, RuleConfig } from '@/views/mall/product/spu/components'
|
@ -1,5 +1,5 @@
|
||||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
||||
import { dateFormatter, getNowDateTime } from '@/utils/formatTime'
|
||||
import { dateFormatter2 } from '@/utils/formatTime'
|
||||
|
||||
// 表单校验
|
||||
export const rules = reactive({
|
||||
@ -26,29 +26,49 @@ const crudSchemas = reactive<CrudSchema[]>([
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '活动时间',
|
||||
field: 'activityTime',
|
||||
formatter: dateFormatter,
|
||||
label: '活动开始时间',
|
||||
field: 'startTime',
|
||||
formatter: dateFormatter2,
|
||||
isSearch: true,
|
||||
search: {
|
||||
show: true,
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
valueFormat: 'x',
|
||||
type: 'datetimerange',
|
||||
rangeSeparator: '至'
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
type: 'daterange'
|
||||
}
|
||||
},
|
||||
form: {
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
valueFormat: 'x',
|
||||
type: 'datetimerange',
|
||||
rangeSeparator: '至'
|
||||
},
|
||||
value: [getNowDateTime().valueOf(), getNowDateTime().valueOf()],
|
||||
colProps: {
|
||||
span: 24
|
||||
type: 'date',
|
||||
valueFormat: 'x'
|
||||
}
|
||||
},
|
||||
table: {
|
||||
width: 120
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '活动结束时间',
|
||||
field: 'endTime',
|
||||
formatter: dateFormatter2,
|
||||
isSearch: true,
|
||||
search: {
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
type: 'daterange'
|
||||
}
|
||||
},
|
||||
form: {
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
type: 'date',
|
||||
valueFormat: 'x'
|
||||
}
|
||||
},
|
||||
table: {
|
||||
width: 120
|
||||
}
|
||||
},
|
||||
{
|
@ -63,7 +63,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { allSchemas } from './combinationActivity.data'
|
||||
import * as CombinationActivityApi from '@/api/mall/promotion/combination/combinationactivity'
|
||||
import * as CombinationActivityApi from '@/api/mall/promotion/combination/combinationActivity'
|
||||
import CombinationActivityForm from './CombinationActivityForm.vue'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { createImageViewer } from '@/components/ImageViewer'
|
Loading…
Reference in New Issue
Block a user