Browse Source

定经机修改

master
songguoqiang 1 year ago
parent
commit
dd84749e81
  1. 18
      src/views/pszc/hrsizingmilldata108/hrSizingmilldata108.data.ts
  2. 64
      src/views/pszc/hrsizingmilldata108/index.vue
  3. 18
      src/views/pszc/hrsizingmilldata90/hrSizingmilldata90.data.ts
  4. 11
      src/views/pszc/hrsizingmilldata90/index.vue

18
src/views/pszc/hrsizingmilldata108/hrSizingmilldata108.data.ts

@ -89,7 +89,23 @@ export const HrSizingmilldata108 = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '创建时间', label: '开始时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '结束时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,

64
src/views/pszc/hrsizingmilldata108/index.vue

@ -1,7 +1,11 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="HrSizingmilldata108.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="HrSizingmilldata108.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -27,13 +31,17 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{row}"> <template #ivalue="{ row }">
<span>{{ timesFormatter(row.ivalue) }}</span>
</template>
<template #code="{ row }">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span> <span>{{ row.code }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -50,15 +58,18 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
/> />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import dayjs from 'dayjs'
import duration from 'dayjs/plugin/duration'
dayjs.extend(duration);
import download from '@/utils/download' import download from '@/utils/download'
import { HrSizingmilldata108,HrSizingmilldata108Rules } from './hrSizingmilldata108.data' import { HrSizingmilldata108, HrSizingmilldata108Rules } from './hrSizingmilldata108.data'
import * as HrSizingmilldata108Api from '@/api/pszc/hrsizingmilldata108' import * as HrSizingmilldata108Api from '@/api/pszc/hrsizingmilldata108'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
defineOptions({ name: 'HrSizingmilldata108' }) defineOptions({ name: 'HrSizingmilldata108' })
const message = useMessage() // const message = useMessage() //
@ -76,12 +87,12 @@ const updataTableColumns = (val) => {
// //
const searchTableParams = ref([ const searchTableParams = ref([
//{ //{
// formField: 'productItemCode', // formField: 'productItemCode',
// searchTableTitle: '', // searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas, // searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage // searchTablePage: ItembasicApi.getItembasicPage
//} //}
]) ])
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
@ -98,7 +109,7 @@ const HeadButttondata = [
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrSizingmilldata108:export'}), // // defaultButtons.defaultExportBtn({hasPermi:'wms:hrSizingmilldata108:export'}), //
// defaultButtons.defaultFreshBtn(null), // // defaultButtons.defaultFreshBtn(null), //
// defaultButtons.defaultFilterBtn(null), // // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null) //
// { // {
// label: '', // label: '',
// name: 'zdy', // name: 'zdy',
@ -111,16 +122,22 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') {
//
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') {
//
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') {
//
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') {
//
getList() getList()
} else if (val == 'filtrate') { // } else if (val == 'filtrate') {
} else { // //
} else {
//
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
@ -133,9 +150,11 @@ const butttondata = [
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') {
//
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') {
//
handleDelete(row.id) handleDelete(row.id)
} }
} }
@ -214,10 +233,13 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
const timesFormatter =(s) => {
return dayjs.duration(s, 'seconds').format('HH时mm分ss秒')
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
// importTemplateData.templateUrl = await HrSizingmilldata108Api.importTemplate() // importTemplateData.templateUrl = await HrSizingmilldata108Api.importTemplate()
}) })
</script> </script>

18
src/views/pszc/hrsizingmilldata90/hrSizingmilldata90.data.ts

@ -89,7 +89,23 @@ export const HrSizingmilldata90 = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '创建时间', label: '开始时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '结束时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,

11
src/views/pszc/hrsizingmilldata90/index.vue

@ -27,6 +27,10 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #ivalue="{ row }">
<span>{{ timesFormatter(row.ivalue) }}</span>
</template>
<template #code="{row}"> <template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span> <span>{{ row.code }}</span>
@ -58,6 +62,9 @@ import download from '@/utils/download'
import { HrSizingmilldata90,HrSizingmilldata90Rules } from './hrSizingmilldata90.data' import { HrSizingmilldata90,HrSizingmilldata90Rules } from './hrSizingmilldata90.data'
import * as HrSizingmilldata90Api from '@/api/pszc/hrSizingmilldata90' import * as HrSizingmilldata90Api from '@/api/pszc/hrSizingmilldata90'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import dayjs from 'dayjs'
import duration from 'dayjs/plugin/duration'
dayjs.extend(duration);
defineOptions({ name: 'HrSizingmilldata90' }) defineOptions({ name: 'HrSizingmilldata90' })
@ -214,6 +221,10 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
const timesFormatter =(s) => {
return dayjs.duration(s, 'seconds').format('HH时mm分ss秒')
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

Loading…
Cancel
Save