Browse Source

系统日历

master
zhang_li 1 year ago
parent
commit
ba86032870
  1. 48
      src/views/wms/basicDataManage/systemSetting/accountcalendar/accountcalendar.data.ts
  2. 10
      src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts
  3. 9
      src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue

48
src/views/wms/basicDataManage/systemSetting/accountcalendar/accountcalendar.data.ts

@ -1,7 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
const monthList = [{ label:'01', value:'01' },{ label:'02', value:'02' },{ label:'03', value:'03' },{ label:'04', value:'04' },{ label:'05', value:'05' },{ label:'06', value:'06' },{ label:'07', value:'07' },{ label:'08', value:'08' },{ label:'09', value:'09' },{ label:'10', value:'10' },{ label:'11', value:'11' },{ label:'12', value:'12' }]
/**
* @returns {Array}
*/
@ -14,6 +14,16 @@ export const Accountcalendar = useCrudSchemas(reactive<CrudSchema[]>([
width: 150,
fixed: 'left'
},
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'year',
dateFormat: 'YYYY',
valueFormat: 'x',
}
},
},
{
label: '月',
@ -22,6 +32,18 @@ export const Accountcalendar = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
form: {
component: 'Select',
api: () => monthList,
componentProps: {
style: {width:'100%'},
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
},
},
},
{
label: '描述',
@ -53,6 +75,14 @@ export const Accountcalendar = useCrudSchemas(reactive<CrudSchema[]>([
}
},
isSearch: true,
search: {
show: true,
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
}
}
},
{
label: '结束时间',
@ -76,6 +106,14 @@ export const Accountcalendar = useCrudSchemas(reactive<CrudSchema[]>([
}
},
isSearch: true,
search: {
show: true,
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
}
}
},
{
label: '转换生效时间',
@ -99,6 +137,14 @@ export const Accountcalendar = useCrudSchemas(reactive<CrudSchema[]>([
}
},
isSearch: true,
search: {
show: true,
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
}
}
},
{
label: '是否可用',

10
src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts

@ -86,7 +86,15 @@ export const Currencyexchange = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x',
}
},
isSearch: true
isSearch: true,
search: {
show: true,
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
}
}
},
{
label: '失效时间',

9
src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue

@ -29,7 +29,7 @@
>
<template #currency="{row}">
<el-button type="primary" link @click="openDetail(row, '货币', row.currency)">
<span>{{ row.currency }}</span>
<span>{{ formatter(row.currency) }}</span>
</el-button>
</template>
<template #action="{ row }">
@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'Currencyexchange' })
@ -202,7 +203,11 @@ const searchFormClick = (searchData) => {
}
getList() //
}
const formatter = (currency)=>{
console.log(getStrDictOptions(DICT_TYPE.CURRENCY))
let currencyStr = getStrDictOptions(DICT_TYPE.CURRENCY).filter(item=>currency==item.value)[0].label;
return currencyStr
}
/** 初始化 **/
onMounted(async() => {
getList()

Loading…
Cancel
Save