copy from WMS/web/app/template/MyPluginName/Views/Pages/MyEntityName/MyEntityName.tsx
copy to HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsPlace/WmsPlace.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 './WmsPlace.module.scss' |
| | | import { useWmsPlace } from '../../../Controllers/WmsPlace' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import MyEntityNameDrawer from '../Dialog/MyEntityNameDrawer/MyEntityNameDrawer' |
| | | import WmsPlaceDrawer from '../Dialog/WmsPlaceDrawer/WmsPlaceDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'MyEntityName', |
| | | name: 'WmsPlace', |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | |
| | | onError, |
| | | onSearch, |
| | | onRowClick, |
| | | onConfirmMyEntityName, |
| | | onConfirmWmsPlace, |
| | | onCheck, |
| | | onAddMyEntityName, |
| | | onAddWmsPlace, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useMyEntityName(props, ctx) |
| | | } = useWmsPlace(props, ctx) |
| | | |
| | | /** |
| | | * @returns 琛ㄦ牸 |
| | |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.myEntityNameList]: true, |
| | | [styles.wmsplaceList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/myPluginName/myEntityName/{id}/adjustsort/{sort}" |
| | | sortUrlTpl="/api/v1/hiawms/wmsplace/{id}/adjustsort/{sort}" |
| | | v-model:dataSource={dataSource.value} |
| | | columns={columns} |
| | | contextMenu={contextMenu} |
| | |
| | | } |
| | | return () => { |
| | | return ( |
| | | <div class={styles.myEntityNameContent}> |
| | | <div class={styles.wmsplaceContent}> |
| | | {/* 娣诲姞/缂栬緫 */} |
| | | <MyEntityNameDrawer |
| | | <WmsPlaceDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmMyEntityName} |
| | | onConfirm={onConfirmWmsPlace} |
| | | /> |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="myEntityName-add" |
| | | v-permission="wmsplace-add" |
| | | icon="add-p" |
| | | onClick={onAddMyEntityName} |
| | | onClick={onAddWmsPlace} |
| | | type="primary" |
| | | > |
| | | 娣诲姞 |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <el-upload |
| | | v-permission="myEntityName-import" |
| | | v-permission="wmsplace-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/wmsplace/import" |
| | | > |
| | | <IconButton icon="in">瀵煎叆</IconButton> |
| | | </el-upload> |
| | | |
| | | <IconButton |
| | | v-permission="myEntityName-output" |
| | | v-permission="wmsplace-output" |
| | | icon="out" |
| | | onClick={onExport} |
| | | > |
| | |
| | | /> |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/myPluginName/myEntityName" |
| | | url="/api/v1/hiawms/wmsplace" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |