copy from WMS/web/app/template/MyPluginName/Views/Pages/MyEntityName/MyEntityName.tsx
copy to HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsContainer/WmsContainer.tsx
文件从 WMS/web/app/template/MyPluginName/Views/Pages/MyEntityName/MyEntityName.tsx 复制 |
| | |
| | | import { defineComponent } from 'vue' |
| | | import type { Ref } from 'vue' |
| | | import BaseTable from '@/components/Table/Table' |
| | | import styles from './MyEntityName.module.scss' |
| | | import { useMyEntityName } from '../../../Controllers/MyEntityName' |
| | | import styles from './WmsContainer.module.scss' |
| | | import { useWmsContainer } from '../../../Controllers/WmsContainer' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import MyEntityNameDrawer from '../Dialog/MyEntityNameDrawer/MyEntityNameDrawer' |
| | | import WmsContainerDrawer from '../Dialog/WmsContainerDrawer/WmsContainerDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'MyEntityName', |
| | | name: 'WmsContainer', |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | |
| | | onError, |
| | | onSearch, |
| | | onRowClick, |
| | | onConfirmMyEntityName, |
| | | onConfirmWmsContainer, |
| | | onCheck, |
| | | onAddMyEntityName, |
| | | onAddWmsContainer, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useMyEntityName(props, ctx) |
| | | } = useWmsContainer(props, ctx) |
| | | |
| | | /** |
| | | * @returns 琛ㄦ牸 |
| | |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.myEntityNameList]: true, |
| | | [styles.wmscontainerList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/myPluginName/myEntityName/{id}/adjustsort/{sort}" |
| | | sortUrlTpl="/api/v1/hiawms/wmscontainer/{id}/adjustsort/{sort}" |
| | | v-model:dataSource={dataSource.value} |
| | | columns={columns} |
| | | contextMenu={contextMenu} |
| | |
| | | } |
| | | return () => { |
| | | return ( |
| | | <div class={styles.myEntityNameContent}> |
| | | <div class={styles.wmscontainerContent}> |
| | | {/* 娣诲姞/缂栬緫 */} |
| | | <MyEntityNameDrawer |
| | | <WmsContainerDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmMyEntityName} |
| | | onConfirm={onConfirmWmsContainer} |
| | | /> |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="myEntityName-add" |
| | | v-permission="wmscontainer-add" |
| | | icon="add-p" |
| | | onClick={onAddMyEntityName} |
| | | onClick={onAddWmsContainer} |
| | | type="primary" |
| | | > |
| | | 娣诲姞 |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <el-upload |
| | | v-permission="myEntityName-import" |
| | | v-permission="wmscontainer-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | | show-file-list={false} |
| | |
| | | onSuccess={onSuccess} |
| | | before-upload={onBeforeUpload} |
| | | headers={headers.value} |
| | | action="/api/v1/myPluginName/myEntityName/import" |
| | | action="/api/v1/hiawms/wmscontainer/import" |
| | | > |
| | | <IconButton icon="in">瀵煎叆</IconButton> |
| | | </el-upload> |
| | | |
| | | <IconButton |
| | | v-permission="myEntityName-output" |
| | | v-permission="wmscontainer-output" |
| | | icon="out" |
| | | onClick={onExport} |
| | | > |
| | |
| | | /> |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/myPluginName/myEntityName" |
| | | url="/api/v1/hiawms/wmscontainer" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |