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',
sort: 'custom',
formatter: dateFormatter,

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

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

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

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

Loading…
Cancel
Save