From 6b39390b4a03726e408b98454a16f4fef97f2fc5 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周六, 17 5月 2025 13:15:31 +0800
Subject: [PATCH] 2
---
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssemblyDrawer.ts | 34 +
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerDrawer/WmsMaterialContainerDrawer.module.scss | 3
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerQueryDrawer/WmsMaterialContainerQueryDrawer.module.scss | 3
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssemblyQueryDrawer.ts | 44 +
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerQueryDrawer/WmsMaterialContainerQueryDrawer.tsx | 71 ++
HIAWms/hiawms_web/.vscode/settings.json | 7
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssembly.ts | 275 ++++++++++
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssemblyDrawer.tsx | 190 +++++++
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.module.scss | 7
PipeLineLems/pipelinelems_web/src/config/menu.ts | 14
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.module.scss | 157 +++++
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly.ts | 54 ++
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.tsx | 80 ++
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/enum.ts | 15
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssemblyDrawer.ts | 44 +
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssemblyQueryDrawer.ts | 35 +
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx | 155 +++++
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/type/type.d.ts | 45 +
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerDrawer/WmsMaterialContainerDrawer.tsx | 61 ++
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/Config.ts | 27 +
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/File.ts | 31 +
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/index.ts | 14
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssembly.ts | 41 +
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/config/PipeAccessoryAssembly.json | 3
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssemblyQueryDrawer.tsx | 181 ++++++
25 files changed, 1,590 insertions(+), 1 deletions(-)
diff --git a/HIAWms/hiawms_web/.vscode/settings.json b/HIAWms/hiawms_web/.vscode/settings.json
index 9e26dfe..728a996 100644
--- a/HIAWms/hiawms_web/.vscode/settings.json
+++ b/HIAWms/hiawms_web/.vscode/settings.json
@@ -1 +1,6 @@
-{}
\ No newline at end of file
+{
+ "i18n-ally.localesPaths": [
+ "public/language",
+ "src/libs/Language/i18n"
+ ]
+}
\ No newline at end of file
diff --git a/PipeLineLems/pipelinelems_web/src/config/menu.ts b/PipeLineLems/pipelinelems_web/src/config/menu.ts
index 286eb63..f61ab9b 100644
--- a/PipeLineLems/pipelinelems_web/src/config/menu.ts
+++ b/PipeLineLems/pipelinelems_web/src/config/menu.ts
@@ -7,6 +7,13 @@
"notPage": false
},
{
+ "name": "绠¢檮浠惰閰�",
+ "path": "/information-base/PipeAccessoryAssembly",
+ "patchName": "PipeAccessoryAssembly",
+ "icon": "p",
+ "notPage": false
+ },
+ {
"name": "宸ュ崟绠$悊(鏂�)",
"path": "/information-base/OrderManagement-main",
"patchName": "OrderManagement-main",
@@ -50,6 +57,13 @@
"icon": "p",
"notPage": false
},
+ "PipeAccessoryAssembly": {
+ "name": "绠¢檮浠惰閰�",
+ "path": "/information-base/PipeAccessoryAssembly",
+ "patchName": "PipeAccessoryAssembly",
+ "icon": "p",
+ "notPage": false
+ },
"OrderManagement-main": {
"name": "宸ュ崟绠$悊(鏂�)",
"path": "/information-base/OrderManagement-main",
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/File.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/File.ts
new file mode 100644
index 0000000..9162fef
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/File.ts
@@ -0,0 +1,31 @@
+import { importFileToService, exportFileToClient } from '@/api/file'
+import { ElMessage } from 'element-plus'
+import { downloadFile } from '@/utils'
+import dayjs from 'dayjs'
+
+export const useFile = () => {
+ /**
+ * 瀵煎叆鏂囦欢
+ * @param url
+ */
+ const importFile = async (url: string, file: File) => {
+ const formData = new FormData()
+ formData.append('file', file)
+ await importFileToService(url, formData)
+ ElMessage('瀵煎叆鎴愬姛')
+ }
+ /**
+ * 瀵煎嚭鏂囦欢
+ * @param url
+ */
+ const exportFile = async (url: string, params: any, name: string) => {
+ const res = await exportFileToClient(url, params)
+ downloadFile(res, `${name}_${dayjs().format('YYYYMMDDHHMMss')}.xlsx`)
+ ElMessage.success('瀵煎嚭鎴愬姛')
+ }
+
+ return {
+ importFile,
+ exportFile,
+ }
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssembly.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssembly.ts
new file mode 100644
index 0000000..1c9df89
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssembly.ts
@@ -0,0 +1,275 @@
+import { ref, onMounted, reactive, Ref, nextTick, computed } from 'vue'
+import { injectModel } from '@/libs/Provider/Provider'
+import { WmsMaterialContainer } from '../Models/PipeAccessoryAssembly'
+import { ElMessage } from 'element-plus'
+import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox'
+import { useFile } from './File'
+
+interface CurrentType {
+ row: any
+ index: number
+}
+export const useWmsMaterialContainer = (props: any, ctx?: any) => {
+ const wmsMaterialContainer = injectModel<WmsMaterialContainer>('wmsMaterialContainer')
+ const { exportFile } = useFile()
+ /**
+ * 澶撮儴閰嶇疆
+ */
+ const headers = ref({})
+ /**
+ * 鍔ㄦ�佸垪閰嶇疆
+ */
+ const wmsMaterialContainerColumns = ref<Record<string, any>>([])
+ /**
+ * 鎼滅储鍊�
+ */
+ const search = ref('')
+
+ /**
+ * 鎺掑簭
+ */
+ const sort = ref(0)
+ /**
+ * 閫夋嫨椤�
+ */
+ const selection = ref([])
+ /**
+ * 褰撳墠閫変腑鐨勮
+ */
+ const current = ref<any>(null)
+ /**
+ * 鏁版嵁婧�
+ */
+ const dataSource: Ref<any[]> = ref([])
+
+ /**
+ * 琛ㄦ牸
+ */
+ const tableRef = ref()
+ const dialogConfig = reactive({
+ visible: false,
+ title: '',
+ isAdd: false,
+ })
+ const dialogConfigForQuery = reactive({
+ visible: false,
+ title: '',
+ isAdd: false,
+ })
+
+
+ const dialogSettingConfig = reactive({
+ visible: false,
+ title: '',
+ })
+
+ /**
+ * 鍒嗛〉鏁版嵁
+ */
+ const paginationParams = ref({})
+
+ /**
+ * 鎵撳紑璇︽儏
+ * @param row
+ */
+ const openDetail = (row: any) => {
+ current.value = row
+ dialogConfig.visible = true
+ dialogConfig.title = row.name
+ dialogConfig.isAdd = false
+ sort.value = row.sort
+ }
+
+ const contextMenu = [
+ {
+ label: '灞曞紑璇︽儏',
+ fn: (c: CurrentType) => {
+ current.value = null
+ sort.value = c.row.sort
+ nextTick(() => openDetail(c.row))
+ },
+ divided: true,
+ icon: 'o',
+ },
+ // {
+ // label: '鍚戜笂娣诲姞',
+ // fn: (c: CurrentType, pageNum: number) => {
+ // current.value = null
+ // sort.value = c.index + 1 + (pageNum - 1) * 50
+ // dialogConfig.visible = true
+ // dialogConfig.title = '娣诲姞'
+ // dialogConfig.isAdd = false
+ // },
+ // divided: true,
+ // icon: 'up',
+ // },
+ // {
+ // label: '鍚戜笅娣诲姞',
+ // fn: (c: CurrentType, pageNum: number) => {
+ // current.value = null
+ // sort.value = c.index + 2 + (pageNum - 1) * 50
+ // dialogConfig.visible = true
+ // dialogConfig.title = '娣诲姞'
+ // dialogConfig.isAdd = false
+ // },
+ // divided: true,
+ // icon: 'down',
+ // },
+ // {
+ // label: '鍒涘缓鍓湰',
+ // fn: async ({ row }: CurrentType) => {
+ // await wmsMaterialContainer.cloneData([row.id])
+ // ElMessage.success('鍒涘缓鍓湰鎴愬姛')
+ // tableRef.value?.getList()
+ // },
+ // divided: true,
+ // icon: 'copy',
+ // },
+ {
+ label: '鍒犻櫎',
+ fn: async (c: CurrentType) => {
+ const names = selection.value.map((item: { materialId: string }) => item.materialId)
+ ConfirmBox(
+ `鏄惁鍒犻櫎${names.length ? names.join(',') : c.row.materialId}`
+ ).then(async () => {
+ const ids = selection.value.map((item: { id: string }) => item.id)
+ await wmsMaterialContainer.deleteWmsMaterialContainers(ids.length ? ids : [c.row.id])
+ ElMessage.success('鍒犻櫎鎴愬姛')
+ tableRef.value.getList()
+ })
+ },
+ icon: 'close',
+ },
+ ]
+
+ const onCheck = (records: any) => {
+ selection.value = records
+ }
+
+ const onAddWmsMaterialContainer = () => {
+ const params = tableRef.value?.getPaginationParams()
+ current.value = null
+ dialogConfig.visible = true
+ dialogConfig.isAdd = true
+ dialogConfig.title = '娣诲姞'
+ sort.value = params.totalCount + 1
+ }
+
+ //鐐瑰嚮鎸夐挳銆愰珮绾ф煡璇€��
+ const onAdvancedQuery = () => {
+ const params = tableRef.value?.getPaginationParams()
+ current.value = null
+ dialogConfigForQuery.visible = true
+ dialogConfigForQuery.isAdd = true
+ dialogConfigForQuery.title = '楂樼骇鏌ヨ'
+ }
+
+ const onConfirmWmsMaterialContainer = async () => {
+ dialogConfig.visible = false
+ if (dialogConfig.isAdd) {
+ tableRef.value?.scrollToRow({
+ skip: true,
+ })
+ } else {
+ await tableRef.value?.getList()
+ }
+ }
+ /**
+ * 琛岀偣鍑绘椂鏇存柊current
+ */
+ const onRowClick = ({ row }: any) => {
+ if (dialogConfig.visible && current.value) {
+ current.value = row
+ }
+ }
+ /**
+ * 瀵煎嚭
+ */
+ const onExport = (data={}) => {
+ //const params = tableRef.value?.getParams()
+ exportFile('/api/v1/HIAWms/wmsMaterialContainer/export', data, 'wmsMaterialContainer')
+ }
+
+ /**
+ * 鍏抽敭瀛楁悳绱�
+ */
+ const onSearch = () => {
+ tableRef.value?.getList({
+ Filter: search.value,
+ })
+ }
+
+ /**
+ * 閲嶇疆琛ㄦ牸鏁版嵁
+ */
+ const reloadList = () => {
+ tableRef.value?.getList()
+ }
+ /**
+ * 涓婁紶鎴愬姛
+ */
+ const onSuccess = () => {
+ tableRef.value?.getList()
+ ElMessage.success('瀵煎叆鎴愬姛')
+ }
+ /**
+ * 澶辫触
+ * @param err
+ */
+ const onError = (err: any) => {
+ try {
+ const message = JSON.parse(err.message)
+ ElMessage.error(message.msg)
+ } catch (error) {
+ ElMessage.error('瀵煎叆澶辫触')
+ }
+ }
+ /**
+ * 涓婁紶閽╁瓙
+ */
+ const onBeforeUpload = (file: File) => {
+ const format = ['xlsx', 'xls', 'csv']
+ if (!format.includes(file.name.split('.')[1])) {
+ ElMessage.error('瀵煎叆鏂囦欢鏍煎紡涓嶆纭紝璇峰鍏�.xlsx/.xls涓�.csv鏍煎紡鐨勬枃浠�')
+ return false
+ }
+ return true
+ }
+
+ onMounted(() => {
+ headers.value = {
+ Authorization: `Bearer ${sessionStorage.getItem('Token')}`,
+ 'X-Project': sessionStorage.getItem('X-Project'),
+ }
+ })
+
+ ctx.expose({
+ reloadList,
+ })
+
+ return {
+ dataSource,
+ contextMenu,
+ dialogConfig,
+ dialogConfigForQuery,
+ dialogSettingConfig,
+ tableRef,
+ current,
+ search,
+ sort,
+ wmsMaterialContainerColumns,
+ paginationParams,
+ headers,
+ onBeforeUpload,
+ onError,
+ onSuccess,
+ openDetail,
+ onSearch,
+ onExport,
+ onRowClick,
+ onConfirmWmsMaterialContainer,
+ onCheck,
+ onAddWmsMaterialContainer,
+ onAdvancedQuery
+ }
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssemblyDrawer.tsx b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssemblyDrawer.tsx
new file mode 100644
index 0000000..61c6f7a
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssemblyDrawer.tsx
@@ -0,0 +1,190 @@
+import {
+ ref,
+ onMounted,
+ reactive,
+ computed,
+ Ref,
+ watch,
+ SetupContext,
+ h,
+} from 'vue'
+import { injectModel } from '@/libs/Provider/Provider'
+import { WmsMaterialContainerDrawer } from '../Models/PipeAccessoryAssemblyDrawer'
+import { ElMessage } from 'element-plus'
+import isEqual from 'lodash/isEqual'
+import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox'
+import { cloneDeep } from 'lodash'
+
+export const useWmsMaterialContainerDrawer = (props: any, ctx?: any) => {
+ const wmsMaterialContainerDrawer = injectModel<WmsMaterialContainerDrawer>(
+ 'wmsMaterialContainerDrawer'
+ )
+ /**
+ * 鐢ㄦ潵瀵规瘮鐨勫垵濮嬪寲鏁版嵁
+ */
+ const initiateData: Ref<Record<string, any>> = ref({})
+ const formData = ref<Record<string, any>>({})
+ // ref
+ const formRef = ref()
+
+ const disabled = ref(false)
+
+ const current = computed(() => {
+ return props.row || null
+ })
+
+ const datePicker = (attrs) => {
+ return (
+ <el-date-picker
+ type="date"
+ format="YYYY-MM-DD HH:mm:ss"
+ formatValue="YYYY-MM-DD HH:mm:ss"
+ {...attrs}
+ ></el-date-picker>
+ )
+ }
+
+ const dateTimePicker = (attrs) => {
+ return (
+ <el-date-picker
+ type="datetime"
+ format="YYYY-MM-DD HH:mm:ss"
+ {...attrs}
+ ></el-date-picker>
+ )
+ }
+
+ const visible = computed({
+ get() {
+ return props.modelValue
+ },
+ set(val) {
+ ctx.emit('update:modelValue', val)
+ },
+ })
+ /**
+ * 娣诲姞鐨刦orm瀛楁
+ */
+ const formItems = reactive([
+ {
+ label: '鎵樼洏缂栧彿',
+ prop: 'containerNo',
+ el: 'input',
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ユ墭鐩樼紪鍙�',
+ rules: [{ required: true, message: '鎵樼洏缂栧彿涓嶈兘涓虹┖', trigger: 'blur' }],
+ },
+ {
+ label: '鐗╂枡ID',
+ prop: 'materialId',
+ el: 'input',
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ョ墿鏂橧D',
+ rules: [{ required: true, message: '鐗╂枡ID涓嶈兘涓虹┖', trigger: 'blur' }],
+ },
+ ])
+ /**
+ * 鏍¢獙鏄惁鏈夋暟鎹彉鍖�
+ */
+ const checkIsEqualObject = () => {
+ const data = {
+ formData: formData.value,
+ }
+ const check = isEqual(initiateData.value, data)
+ return check
+ }
+
+ const onClose = (done: () => void) => {
+ if (visible.value) {
+ if (checkIsEqualObject()) {
+ visible.value = false
+ done && done()
+ } else {
+ ConfirmBox('鏄惁淇濆瓨璁剧疆锛�')
+ .then(() => {
+ onConfirm()
+ })
+ .catch(() => {
+ visible.value = false
+ done && done()
+ })
+ }
+ }
+ }
+ /**
+ * 淇濆瓨
+ */
+ const onConfirm = async () => {
+ await formRef.value?.validate()
+ const data = {
+ containerNo: formData.value.containerNo,
+ materialId: formData.value.materialId,
+ }
+ if (!current.value) {
+ await wmsMaterialContainerDrawer.addWmsMaterialContainer(data)
+ } else {
+ const id = current.value.id
+ await wmsMaterialContainerDrawer.updateWmsMaterialContainer(id, data)
+ }
+ ElMessage.success('淇濆瓨鎴愬姛')
+ ctx.emit('confirm')
+ }
+
+ const updateCheckData = () => {
+ initiateData.value = {
+ formData: {
+ ...formData.value,
+ },
+ }
+ }
+ const updateFormItemOptions = (propName: string, enumData: any[]) => {
+ const item = formItems.find((item) => item.prop === propName)
+ if (item && enumData) {
+ item.options = enumData.map((item) => ({
+ label: item.description,
+ value: item.value,
+ }))
+ }
+ }
+ /**
+ * 閫氱敤鏌ヨ鏋氫妇
+ */
+ const commonQueryEnumForFrom = async () => {}
+ commonQueryEnumForFrom()
+ /**
+ * 寮圭獥鎵撳紑鑾峰彇璇︽儏
+ */
+ const onOpen = async () => {
+ if (current.value) {
+ const res =
+ await wmsMaterialContainerDrawer.getWmsMaterialContainerDetail(
+ current.value
+ )
+
+ formData.value = {
+ containerNo: res.containerNo,
+ materialId: res.materialId,
+ id: res.id,
+ }
+ disabled.value = true
+ updateCheckData()
+ } else {
+ formData.value = {}
+
+ disabled.value = false
+ updateCheckData()
+ }
+ }
+
+ watch(() => current.value, onOpen)
+
+ return {
+ formItems,
+ formData,
+ visible,
+ formRef,
+ onOpen,
+ onClose,
+ onConfirm,
+ }
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssemblyQueryDrawer.tsx b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssemblyQueryDrawer.tsx
new file mode 100644
index 0000000..2689188
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssemblyQueryDrawer.tsx
@@ -0,0 +1,181 @@
+import {
+ ref,
+ onMounted,
+ reactive,
+ computed,
+ Ref,
+ watch,
+ SetupContext,
+ h,
+} from 'vue'
+import { injectModel } from '@/libs/Provider/Provider'
+import { WmsMaterialContainerDrawer } from '../Models/PipeAccessoryAssemblyDrawer'
+import { ElMessage } from 'element-plus'
+import isEqual from 'lodash/isEqual'
+import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox'
+import { cloneDeep } from 'lodash'
+
+export const useWmsMaterialContainerQueryDrawer = (props: any, ctx?: any) => {
+ const wmsMaterialContainerDrawer = injectModel<WmsMaterialContainerDrawer>(
+ 'WmsMaterialContainerDrawer'
+ )
+ /**
+ * 鐢ㄦ潵瀵规瘮鐨勫垵濮嬪寲鏁版嵁
+ */
+ const initiateData: Ref<Record<string, any>> = ref({})
+ const formData = ref<Record<string, any>>({})
+ // ref
+ const formRef = ref()
+
+ const disabled = ref(false)
+
+ const current = computed(() => {
+ return props.row || null
+ })
+
+ const inputNumber = (attrs) => {
+ return (
+ <el-input-number
+ min="1"
+ step="1"
+ precision="0"
+ {...attrs}
+ ></el-input-number>
+ )
+ }
+
+ const datePickerRange = (attrs) => {
+ return (
+ <el-date-picker
+ type="daterange"
+ value-format="YYYY-MM-DD HH:mm:ss"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ {...attrs}
+ ></el-date-picker>
+ )
+ }
+
+ const dateTimePickerRange = (attrs) => {
+ return (
+ <el-date-picker
+ type="datetimerange"
+ value-format="YYYY-MM-DD HH:mm:ss"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ {...attrs}
+ ></el-date-picker>
+ )
+ }
+
+ const visible = computed({
+ get() {
+ return props.modelValue
+ },
+ set(val) {
+ ctx.emit('update:modelValue', val)
+ },
+ })
+ /**
+ * 娣诲姞鐨刦orm瀛楁
+ */
+ const formItems = reactive([
+ {
+ label: '鎵樼洏缂栧彿',
+ prop: 'containerNo',
+ el: 'input',
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ユ墭鐩樼紪鍙�',
+ },
+ {
+ label: '鐗╂枡ID',
+ prop: 'materialId',
+ el: 'input',
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ョ墿鏂橧D',
+ },
+ ])
+ /**
+ * 鏍¢獙鏄惁鏈夋暟鎹彉鍖�
+ */
+ const checkIsEqualObject = () => {
+ const data = {
+ formData: formData.value,
+ }
+ const check = isEqual(initiateData.value, data)
+ return check
+ }
+ const commonGetFormData = () => {
+ const data = {
+ containerNo: formData.value.containerNo || '',
+ materialId: formData.value.materialId || '',
+ }
+ return data
+ }
+ const onClose = (done: () => void) => {
+ if (visible.value) {
+ visible.value = false
+ const data = commonGetFormData()
+ ctx.emit('close', data)
+ }
+ }
+ /**
+ * 纭鏌ヨ
+ */
+ const onConfirmQuery = async () => {
+ const data = commonGetFormData()
+ ctx.emit('confirmQuery', data)
+ }
+ /**
+ * 閲嶇疆鏌ヨ
+ */
+ const onReset = async () => {
+ formData.value = {}
+ formData.value.ContainerNo = ''
+ formData.value.MaterialId = ''
+ //鍚戠埗缁勪欢鍙戦�佽嚜瀹氫箟浜嬩欢
+ ctx.emit('restQuery')
+ }
+
+ const updateCheckData = () => {
+ initiateData.value = {
+ formData: {
+ ...formData.value,
+ },
+ }
+ }
+ const updateFormItemOptions = (propName: string, enumData: any[]) => {
+ const item = formItems.find((item) => item.prop === propName)
+ if (item && enumData) {
+ item.options = enumData.map((item) => ({
+ label: item.description,
+ value: item.value,
+ }))
+ }
+ }
+ /**
+ * 閫氱敤鏌ヨ鏋氫妇
+ */
+ const commonQueryEnumForFrom = async () => {}
+ commonQueryEnumForFrom()
+ /**
+ * 寮圭獥鎵撳紑鑾峰彇璇︽儏
+ */
+ const onOpen = async () => {
+ disabled.value = false
+ updateCheckData()
+ }
+
+ watch(() => current.value, onOpen)
+
+ return {
+ formItems,
+ formData,
+ visible,
+ formRef,
+ onOpen,
+ onClose,
+ onConfirmQuery,
+ onReset,
+ }
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssembly.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssembly.ts
new file mode 100644
index 0000000..9bcfa04
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssembly.ts
@@ -0,0 +1,41 @@
+import { Base } from '@/libs/Base/Base'
+import {
+ deleteWmsMaterialContainers,
+ addWmsMaterialContainer,
+ cloneData,
+} from './Service/PipeAccessoryAssembly'
+
+export class WmsMaterialContainer extends Base<{ [key: string]: any }> {
+ constructor() {
+ super({
+ data: [],
+ })
+ }
+ onMounted() {}
+ /**
+ * 鍒犻櫎
+ * @param id
+ * @returns
+ */
+ async deleteWmsMaterialContainers(ids: string[]) {
+ return deleteWmsMaterialContainers(ids)
+ }
+
+ /**
+ * 娣诲姞鏁版嵁
+ * @param data
+ * @returns
+ */
+ addWmsMaterialContainer(data: Record<string, any>) {
+ return addWmsMaterialContainer(data)
+ }
+
+ /**
+ * 鍏嬮殕
+ * @param ids
+ * @returns
+ */
+ cloneData(ids: string[]) {
+ return cloneData(ids)
+ }
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssemblyDrawer.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssemblyDrawer.ts
new file mode 100644
index 0000000..f1a806f
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssemblyDrawer.ts
@@ -0,0 +1,44 @@
+import { Base } from '@/libs/Base/Base'
+import {
+ addWmsMaterialContainer,
+ getWmsMaterialContainer,
+ updateWmsMaterialContainer,
+ getWmsEnumData,
+} from './Service/PipeAccessoryAssemblyDrawer'
+import { useGlobalState } from '@/libs/Store/Store'
+
+export class WmsMaterialContainerDrawer extends Base<{ [key: string]: any }> {
+ constructor() {
+ super({
+ data: [],
+ wmsMaterialContainer: {},
+ })
+ }
+
+ /**
+ * 娣诲姞
+ * @param data
+ */
+ async addWmsMaterialContainer(data: Record<string, any>) {
+ return addWmsMaterialContainer(data)
+ }
+ /**
+ * 鏇存柊
+ * @param data
+ */
+ async updateWmsMaterialContainer(id: string, data: Record<string, any>) {
+ return updateWmsMaterialContainer(id, data)
+ }
+
+ /**
+ * 鑾峰彇璇︽儏
+ */
+ async getWmsMaterialContainerDetail(current: any, id?: string) {
+ return getWmsMaterialContainer(id || current?.id)
+ }
+
+ // 鑾峰彇鏋氫妇鍊�
+ async getWmsEnumData(data: Record<string, any>) {
+ return getWmsEnumData(data)
+ }
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssemblyQueryDrawer.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssemblyQueryDrawer.ts
new file mode 100644
index 0000000..5714cba
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssemblyQueryDrawer.ts
@@ -0,0 +1,44 @@
+import { Base } from '@/libs/Base/Base'
+import {
+ addWmsMaterialContainer,
+ getWmsMaterialContainer,
+ updateWmsMaterialContainer,
+ getWmsEnumData,
+} from './Service/PipeAccessoryAssemblyQueryDrawer'
+import { useGlobalState } from '@/libs/Store/Store'
+
+export class WmsMaterialContainerQueryDrawer extends Base<{ [key: string]: any }> {
+ constructor() {
+ super({
+ data: [],
+ wmsMaterialContainer: {},
+ })
+ }
+
+ /**
+ * 娣诲姞
+ * @param data
+ */
+ async addWmsMaterialContainer(data: Record<string, any>) {
+ return addWmsMaterialContainer(data)
+ }
+ /**
+ * 鏇存柊
+ * @param data
+ */
+ async updateWmsMaterialContainer(id: string, data: Record<string, any>) {
+ return updateWmsMaterialContainer(id, data)
+ }
+
+ /**
+ * 鑾峰彇璇︽儏
+ */
+ async getWmsMaterialContainerDetail(current: any, id?: string) {
+ return getWmsMaterialContainer(id || current?.id)
+ }
+
+ // 鑾峰彇鏋氫妇鍊�
+ async getWmsEnumData(data: Record<string, any>) {
+ return getWmsEnumData(data)
+ }
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly.ts
new file mode 100644
index 0000000..9684a90
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly.ts
@@ -0,0 +1,54 @@
+import { Base } from '@/libs/Base/Base'
+const request = Base.request
+
+/**
+ * 娣诲姞
+ * @returns
+ */
+export const addWmsMaterialContainer = (data: any) => {
+ return request.post('/api/v1/HIAWms/wmsMaterialContainer', data)
+}
+
+/**
+ * 鎵归噺鍒犻櫎
+ * @returns
+ */
+export const deleteWmsMaterialContainers = (ids: string[]) => {
+ return request({
+ data: ids,
+ url: '/api/v1/HIAWms/wmsMaterialContainer',
+ method: 'delete',
+ })
+}
+
+/**
+ * 鍏嬮殕
+ * @returns
+ */
+export const cloneData = (data: any) => {
+ return request.post('/api/v1/HIAWms/wmsMaterialContainer/clone', data)
+}
+
+/**
+ * 鐗╂枡鍨嬪彿鍒楄〃
+ * @returns
+ */
+export const getMaterialModelList = () => {
+ return request.get(`/api/v1/hiawms/wmsenum/ModelList`)
+}
+
+/**
+ * 搴撲綅鍙峰垪琛�
+ * @returns
+ */
+export const getPlaceNoForStockList = (data: any) => {
+ return request.get(`/api/v1/hiawms/wmsenum/placelist?placeType=${data}`)
+}
+
+/**
+ * 鍏ュ簱
+ * @returns
+ */
+export const instock = (data: any) => {
+ return request.post('/api/v1/HIAWms/wmsinsstock/bindinstock', data)
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssemblyDrawer.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssemblyDrawer.ts
new file mode 100644
index 0000000..fae0103
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssemblyDrawer.ts
@@ -0,0 +1,34 @@
+import { Base } from '@/libs/Base/Base'
+const request = Base.request
+
+/**
+ * 娣诲姞
+ * @returns
+ */
+export const addWmsMaterialContainer = (data: any) => {
+ return request.post('/api/v1/HIAWms/wmsMaterialContainer', data)
+}
+
+/**
+ * 鑾峰彇璇︽儏
+ * @returns
+ */
+export const getWmsMaterialContainer = (id: string) => {
+ return request.get(`/api/v1/HIAWms/wmsMaterialContainer/${id}`)
+}
+
+/**
+ * 鏇存柊
+ * @returns
+ */
+export const updateWmsMaterialContainer = (id: string, data: Record<string, any>) => {
+ return request.put(`/api/v1/HIAWms/wmsMaterialContainer/${id}`, data)
+}
+
+/**
+ * 鑾峰彇鏋氫妇
+ * @returns
+ */
+export const getWmsEnumData = (data: any) => {
+ return request.post('/api/v1/HIAWms/WmsEnum', data)
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssemblyQueryDrawer.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssemblyQueryDrawer.ts
new file mode 100644
index 0000000..8f2a1a3
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssemblyQueryDrawer.ts
@@ -0,0 +1,35 @@
+import { Base } from '@/libs/Base/Base'
+const request = Base.request
+
+/**
+ * 娣诲姞
+ * @returns
+ */
+export const addWmsMaterialContainer = (data: any) => {
+ return request.post('/api/v1/HIAWms/wmsMaterialContainer', data)
+}
+
+/**
+ * 鑾峰彇璇︽儏
+ * @returns
+ */
+export const getWmsMaterialContainer = (id: string) => {
+ return request.get(`/api/v1/HIAWms/wmsMaterialContainer/${id}`)
+}
+
+/**
+ * 鏇存柊
+ * @returns
+ */
+export const updateWmsMaterialContainer = (id: string, data: Record<string, any>) => {
+ return request.put(`/api/v1/HIAWms/wmsMaterialContainer/${id}`, data)
+}
+
+/**
+ * 鑾峰彇鏋氫妇
+ * @returns
+ */
+export const getWmsEnumData = (data: any) => {
+ return request.post('/api/v1/HIAWms/WmsEnum', data)
+}
+
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerDrawer/WmsMaterialContainerDrawer.module.scss b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerDrawer/WmsMaterialContainerDrawer.module.scss
new file mode 100644
index 0000000..177adca
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerDrawer/WmsMaterialContainerDrawer.module.scss
@@ -0,0 +1,3 @@
+.drawer {
+ width: 800px;
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerDrawer/WmsMaterialContainerDrawer.tsx b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerDrawer/WmsMaterialContainerDrawer.tsx
new file mode 100644
index 0000000..d594ce8
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerDrawer/WmsMaterialContainerDrawer.tsx
@@ -0,0 +1,61 @@
+import { SetupContext, defineComponent } from 'vue'
+import BaseDrawer from '@/components/BaseDrawer/BaseDrawer'
+import styles from './WmsMaterialContainerDrawer.module.scss'
+import { useWmsMaterialContainerDrawer } from '../../../../Controllers/PipeAccessoryAssemblyDrawer.tsx'
+import DyForm from '@/components/DyForm/DyForm'
+
+// @ts-ignore
+export default defineComponent<{
+ [key: string]: any
+}>({
+ name: '寮圭獥',
+ props: {
+ modelValue: {
+ type: Boolean,
+ default: false,
+ },
+ title: {
+ type: String,
+ default: '',
+ },
+ row: {
+ type: Object,
+ },
+ sort: {
+ type: Number,
+ default: 0,
+ },
+ },
+ emits: ['update:modelValue', 'close', 'submit', 'confirm'],
+ setup(props: Record<string, any>, ctx: SetupContext) {
+ const {
+ onClose,
+ onConfirm,
+ onOpen,
+ formRef,
+ visible,
+ formItems,
+ formData,
+ } = useWmsMaterialContainerDrawer(props, ctx)
+ return () => (
+ <BaseDrawer
+ class={styles.drawer}
+ size="800px"
+ title={props.title || '娣诲姞'}
+ v-model={visible.value}
+ close-on-click-modal={true}
+ onConfirm={onConfirm}
+ onOpen={onOpen}
+ before-close={onClose}
+ onClose={onClose}
+ >
+ <DyForm
+ ref={formRef}
+ formData={formData.value}
+ labelWidth="106px"
+ formItemProps={formItems}
+ ></DyForm>
+ </BaseDrawer>
+ )
+ },
+})
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerQueryDrawer/WmsMaterialContainerQueryDrawer.module.scss b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerQueryDrawer/WmsMaterialContainerQueryDrawer.module.scss
new file mode 100644
index 0000000..177adca
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerQueryDrawer/WmsMaterialContainerQueryDrawer.module.scss
@@ -0,0 +1,3 @@
+.drawer {
+ width: 800px;
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerQueryDrawer/WmsMaterialContainerQueryDrawer.tsx b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerQueryDrawer/WmsMaterialContainerQueryDrawer.tsx
new file mode 100644
index 0000000..72fed0c
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/Dialog/WmsMaterialContainerQueryDrawer/WmsMaterialContainerQueryDrawer.tsx
@@ -0,0 +1,71 @@
+/*
+ * 鐗╂枡鍩虹淇℃伅鏌ヨ寮瑰嚭妗�
+*/
+import { SetupContext, defineComponent } from 'vue'
+import BaseQueryDrawer from '@/components/BaseQueryDrawer/BaseQueryDrawer'
+import styles from './WmsMaterialContainerQueryDrawer.module.scss'
+import { useWmsMaterialContainerQueryDrawer } from '../../../../Controllers/PipeAccessoryAssemblyQueryDrawer.tsx'
+import DyForm from '@/components/DyForm/DyForm'
+
+// @ts-ignore
+export default defineComponent<{
+ [key: string]: any
+}>({
+ name: '寮圭獥',
+ props: {
+ //鏋氫妇绫诲瀷瀛楀吀
+ enumListDict:{
+ type: Array as () => Array<{ key: string; value: object }>, // 瀹氫箟鏁扮粍鍏冪礌绫诲瀷
+ default: () => [] // 榛樿鍊�
+ },
+ modelValue: {
+ type: Boolean,
+ default: false,
+ },
+ title: {
+ type: String,
+ default: '',
+ },
+ row: {
+ type: Object,
+ },
+ sort: {
+ type: Number,
+ default: 0,
+ },
+ },
+ emits: ['update:modelValue', 'close', 'submit', 'confirmquery1'],
+ setup(props: Record<string, any>, ctx: SetupContext) {
+ const {
+ onClose,
+ onConfirmQuery,
+ onOpen,
+ onReset,
+ formRef,
+ visible,
+ formItems,
+ formData,
+ } = useWmsMaterialContainerQueryDrawer(props, ctx)
+ return () => (
+ <BaseQueryDrawer
+ class={styles.drawer}
+ size="800px"
+ title={props.title || '楂樼骇鏌ヨ'}
+ v-model={visible.value}
+ close-on-click-modal={true}
+ onReset={onReset}
+ onConfirmQueryForBase={onConfirmQuery}
+ onOpen={onOpen}
+ before-close={onClose}
+ onClose={onClose}
+ >
+ <DyForm
+ ref={formRef}
+ formData={formData.value}
+ labelWidth="106px"
+ formItemProps={formItems}
+ ></DyForm>
+ </BaseQueryDrawer>
+ )
+ },
+})
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/Config.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/Config.ts
new file mode 100644
index 0000000..5e6ddfc
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/Config.ts
@@ -0,0 +1,27 @@
+export const columns = [
+ {
+ type: 'seq',
+ width: 60,
+ title: '搴忓彿',
+ },
+ {
+ field: 'containerNo',
+ title: '鎵樼洏缂栧彿',
+},
+{
+ field: 'materialId',
+ title: '鐗╂枡ID',
+},
+{
+ field: 'sort',
+ title: '',
+},
+{
+ field: 'creationTime',
+ title: '鏄惁绂佺敤',
+},
+{
+ field: 'deletionTime',
+ title: '',
+},
+]
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.module.scss b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.module.scss
new file mode 100644
index 0000000..3bbdcc0
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.module.scss
@@ -0,0 +1,157 @@
+.pipeAccessoryAssemblyContent {
+ width: 100%;
+ height: 100%;
+
+ .pipeAccessoryAssemblyList {
+ width: 100%;
+ height: calc(100% - 70px);
+ }
+ .headerContent {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 43px;
+ }
+ .header {
+ margin-bottom: 12px;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ }
+}
+
+.tagBox {
+ width: auto;
+ min-width: 80px;
+ height: 24px;
+ background: #ffffff;
+ border-radius: 19px 19px 19px 19px;
+ opacity: 1;
+ border: 1px dashed #bcc4cc;
+ width: 50px;
+ height: 20px;
+ font-size: 14px;
+ font-family: PingFang SC, PingFang SC;
+ font-weight: 400;
+ color: #5a84ff;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ // cursor: pointer;
+}
+
+.group {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.groupTable {
+ width: 100%;
+}
+
+.overBox {
+ width: 100%;
+ height: calc(100% - 20px);
+ overflow: auto;
+ :global(.cs-collapse-item__header) {
+ background-color: #f1f1f1;
+ padding: 0 20px;
+ height: 35px;
+ font-size: 16px;
+ font-family: PingFang SC, PingFang SC;
+ font-weight: 500;
+ }
+ :global(.cs-collapse-item__content) {
+ padding-bottom: 0px;
+ }
+}
+.groupHeader {
+ width: 100%;
+ height: 30px;
+ background: #ccc;
+}
+
+.hideBlock {
+ display: none;
+}
+.queryForm {
+ padding: 10px;
+ background: #f5f7fa;
+ margin-bottom: 0px;
+ border-radius: 4px;
+
+ .el-form-item {
+ margin-right: 20px;
+ margin-bottom: 0;
+
+ // 缁熶竴杈撳叆妗嗗拰閫夋嫨妗嗙殑瀹藉害
+ .el-input, .el-select {
+ width: 200px; // 璁剧疆缁熶竴鐨勫搴�
+ }
+
+ // 閫夋嫨妗嗗唴閮ㄨ緭鍏ユ鏍峰紡
+ .el-select .el-input__wrapper {
+ height: 32px; // 涓庤緭鍏ユ楂樺害涓�鑷�
+ padding: 1px 11px; // 涓庤緭鍏ユ鍐呰竟璺濅竴鑷�
+ }
+
+ // 鏃ユ湡閫夋嫨鍣ㄥ搴�
+ .el-date-editor {
+ width: 220px;
+ }
+ }
+}
+
+// 濡傛灉闇�瑕佹洿绮剧‘鐨勬帶鍒讹紝鍙互鍗曠嫭璁剧疆
+.formItem {
+ width: 200px;
+
+ &.el-input, &.el-select {
+ width: 100%;
+ }
+}
+
+.pipeAccessoryAssemblyContent {
+ padding: 16px;
+ background: #fff;
+ border-radius: 4px;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
+ max-width: 500px; // 闄愬埗鏈�澶у搴�
+ margin: 0 auto; // 姘村钩灞呬腑
+ width: 90%; // 鍝嶅簲寮忓搴�
+
+ .h5Form {
+ display: flex;
+ flex-direction: column;
+ gap: 20px; // 琛ㄥ崟椤逛箣闂寸殑闂磋窛
+
+ .el-form-item {
+ margin-bottom: 0; // 绉婚櫎榛樿鐨勫簳閮ㄨ竟璺�
+ width: 100%; // 鍗犳弧鐖跺鍣ㄥ搴�
+ }
+
+ .el-form-item__label {
+ display: block;
+ text-align: left;
+ margin-bottom: 8px;
+ font-weight: 500;
+ }
+ }
+
+ .formInput {
+ width: 100%; // 杈撳叆妗嗗崰婊$埗瀹瑰櫒瀹藉害
+ }
+
+ .buttonGroup {
+ display: flex;
+ justify-content: center;
+ gap: 16px; // 鎸夐挳闂磋窛
+ margin-top: 16px;
+
+ .actionButton {
+ flex: 1; // 鎸夐挳骞冲潎鍒嗛厤绌洪棿
+ max-width: 200px; // 闄愬埗鎸夐挳鏈�澶у搴�
+ }
+ }
+}
\ No newline at end of file
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx
new file mode 100644
index 0000000..200869b
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx
@@ -0,0 +1,155 @@
+import { defineComponent, onMounted, ref } from 'vue'
+import type { Ref } from 'vue'
+import styles from './PipeAccessoryAssembly.module.scss'
+import {
+ ElInput,
+ ElForm,
+ ElFormItem,
+ ElButton,
+ ElSelect,
+ ElOption,
+ ElMessage,
+} from 'element-plus'
+import {
+ getPlaceNoForStockList,
+ getMaterialModelList,
+ instock,
+} from '@/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly'
+import { Message } from '@element-plus/icons-vue/dist/types'
+
+export default defineComponent({
+ name: 'PipeAccessoryAssembly',
+ setup() {
+ // 鏌ヨ琛ㄥ崟鏁版嵁
+ const queryForm = ref({
+ materialModel: '',
+ placeNo: '',
+ materialBatch: '',
+ stockNumber: '',
+ })
+
+ // 鏁版嵁婧�
+ const modelOptions = ref<Array<{ value: string; label: string }>>([])
+ const placeNoOptions = ref<Array<{ value: string; label: string }>>([])
+
+ onMounted(() => {
+ // 缁勪欢鎸傝浇鍚庤幏鍙栧瀷鍙峰垪琛ㄥ拰搴撲綅鍙峰垪琛�
+ getModelList()
+ getPlaceNoList()
+ })
+
+ // 缁勭洏鎿嶄綔
+ const handlePalletize = () => {
+ console.log('缁勭洏鎿嶄綔', queryForm.value)
+ // 杩欓噷娣诲姞缁勭洏閫昏緫
+ }
+
+ // 缁勭洏鍏ュ簱鎿嶄綔
+ const handlePalletizeStorage = () => {
+ console.log('缁勭洏鍏ュ簱鎿嶄綔', queryForm.value)
+ instock(queryForm.value), resetQueryForm()
+ ElMessage.success({
+ message: '缁勭洏鍏ュ簱鎴愬姛',
+ type: 'success',
+ })
+ // 杩欓噷娣诲姞缁勭洏鍏ュ簱閫昏緫
+ }
+
+ const resetQueryForm = () => {
+ queryForm.value.materialModel = ''
+ queryForm.value.placeNo = ''
+ queryForm.value.materialBatch = ''
+ queryForm.value.stockNumber = ''
+ }
+
+ const getModelList = async () => {
+ const models = await getMaterialModelList()
+ modelOptions.value = models.map((item: string) => ({
+ value: item.materialModel,
+ label: item.materialModelDesc,
+ }))
+ }
+
+ const getPlaceNoList = async () => {
+ const placeNos = await getPlaceNoForStockList(2)
+ console.log('搴撲綅鍙峰垪琛�:', placeNos)
+ placeNoOptions.value = placeNos.map((item: string) => ({
+ value: item.placeNo,
+ label: item.placeNoDesc,
+ }))
+ }
+
+ return () => {
+ return (
+ <div class={styles.PipeAccessoryAssemblyContent}>
+ <ElForm label-position="top" class={styles.h5Form}>
+ <ElFormItem label="鍨嬪彿">
+ <ElSelect
+ v-model={queryForm.value.materialModel}
+ placeholder="璇烽�夋嫨鍨嬪彿"
+ clearable
+ class={styles.formInput}
+ >
+ {modelOptions.value.map((item) => (
+ <ElOption
+ key={item.value}
+ label={item.label}
+ value={item.value}
+ />
+ ))}
+ </ElSelect>
+ </ElFormItem>
+ <ElFormItem label="搴撲綅鍙�">
+ <ElSelect
+ v-model={queryForm.value.placeNo}
+ placeholder="璇烽�夋嫨搴撲綅鍙�"
+ clearable
+ class={styles.formInput}
+ >
+ {placeNoOptions.value.map((item) => (
+ <ElOption
+ key={item.value}
+ label={item.label}
+ value={item.value}
+ />
+ ))}
+ </ElSelect>
+ </ElFormItem>
+ <ElFormItem label="鎵规鍙�">
+ <ElInput
+ v-model={queryForm.value.materialBatch}
+ placeholder="璇疯緭鍏ユ壒娆″彿"
+ clearable
+ class={styles.formInput}
+ />
+ </ElFormItem>
+ <ElFormItem label="鏁伴噺">
+ <ElInput
+ v-model={queryForm.value.stockNumber}
+ placeholder="璇疯緭鍏ユ暟閲�"
+ clearable
+ class={styles.formInput}
+ />
+ </ElFormItem>
+ <div class={styles.buttonGroup}>
+ {/* <ElButton
+ type="primary"
+ onClick={handlePalletize}
+ class={styles.actionButton}
+ >
+ 缁勭洏
+ </ElButton> */}
+ <ElButton
+ type="success"
+ onClick={handlePalletizeStorage}
+ class={styles.actionButton}
+ >
+ 缁勭洏鍏ュ簱
+ </ElButton>
+ </div>
+ </ElForm>
+ </div>
+ )
+ }
+ },
+})
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.module.scss b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.module.scss
new file mode 100644
index 0000000..b250814
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.module.scss
@@ -0,0 +1,7 @@
+.PipeAccessoryAssembly {
+ background-color: #fff;
+ border-radius: 5px 5px 0 0;
+ width: 100%;
+ height: 100%;
+ border: 1px solid #dbdbdb;
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.tsx b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.tsx
new file mode 100644
index 0000000..9a6f747
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.tsx
@@ -0,0 +1,80 @@
+import {
+ Component,
+ DefineComponent,
+ defineComponent,
+ markRaw,
+ ref,
+ SetupContext,
+ onMounted,
+} from 'vue'
+import styles from './PipeAccessoryAssembly.module.scss'
+import Tab from '@/components/Tab/Tab'
+import { useProvideModels } from '@/libs/Provider/app'
+import { usePermission } from '@/libs/Permission/Permission'
+import { permissionCodes } from '../enum'
+import { ModuleType, TabItem } from '../type/Type'
+import { getEntityNames } from '@/hooks/hook'
+import TabPane from '@/components/Tab/TabPane'
+
+const Models: ModuleType = import.meta.glob('./config/*.json', {
+ eager: true,
+})
+
+const entityNames = getEntityNames(Models)
+
+const nameToLabelMap = [{ name: 'PipeAccessoryAssembly', label: '缁勭洏鍏ュ簱' }]
+
+export default defineComponent({
+ name: 'PipeAccessoryAssembly',
+
+ setup(props, ctx: SetupContext) {
+ useProvideModels()
+ usePermission(props, permissionCodes)
+
+ const rf = ref<{
+ [key: string]: any
+ }>({})
+
+ const tabData = ref<TabItem[]>([])
+
+ const onTabChange = (v: string) => {
+ rf.value?.[v]?.reloadList()
+ }
+
+ const initTableData = async () => {
+ for (const i in entityNames) {
+ const name = entityNames[i]
+ const module = await import(`./Pages/${name}/${name}.tsx`)
+ const PipeAccessoryAssembly = markRaw(module.default)
+ const foundLabel =
+ nameToLabelMap.find((item) => item.name === name)?.label || name
+ tabData.value.push({
+ label: foundLabel,
+ name,
+ component: PipeAccessoryAssembly,
+ })
+ }
+ }
+
+ initTableData()
+
+ return () => {
+ return (
+ <div class={styles.PipeAccessoryAssembly}>
+ <Tab data={tabData.value} type="list" onTab={onTabChange}>
+ {tabData.value.map((widgetInfo) => {
+ const Widget: any = widgetInfo.component
+ return (
+ <TabPane label={widgetInfo.label} name={widgetInfo.name}>
+ <Widget
+ ref={(r: any) => (rf.value['PipeAccessoryAssembly'] = r)}
+ ></Widget>
+ </TabPane>
+ )
+ })}
+ </Tab>
+ </div>
+ )
+ }
+ },
+})
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/config/PipeAccessoryAssembly.json b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/config/PipeAccessoryAssembly.json
new file mode 100644
index 0000000..5280937
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/config/PipeAccessoryAssembly.json
@@ -0,0 +1,3 @@
+{
+ "name": "PipeAccessoryAssembly"
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/enum.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/enum.ts
new file mode 100644
index 0000000..780463e
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/enum.ts
@@ -0,0 +1,15 @@
+export interface TabType {
+ label: string
+ name: string
+ columns?: any[]
+ data?: any[]
+ isFooter: boolean
+ [key: string]: any
+}
+
+export const permissionCodes = {
+ 'PipeAccessoryAssembly-list': '鍒楄〃-鍒楄〃',
+ 'PipeAccessoryAssembly-add': '鍒楄〃-娣诲姞',
+ 'PipeAccessoryAssembly-import': '鍒楄〃-瀵煎叆',
+ 'PipeAccessoryAssembly-output': '鍒楄〃-杈撳嚭',
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/index.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/index.ts
new file mode 100644
index 0000000..546c227
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/index.ts
@@ -0,0 +1,14 @@
+import PipeAccessoryAssembly from './Views/PipeAccessoryAssembly'
+import Setting from '@/components/Setting/Setting'
+import { provider } from '@/provider/index'
+import p from '../../assets/svg/p.svg'
+
+export default {
+ is: 'PipeAccessoryAssembly',
+ name: '绠¢檮浠惰閰�',
+ category: 'run',
+ icon: p,
+ authorizationRequired: false,
+ canvasView: provider(PipeAccessoryAssembly),
+ settingsView: Setting,
+}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/type/type.d.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/type/type.d.ts
new file mode 100644
index 0000000..aa8d450
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/type/type.d.ts
@@ -0,0 +1,45 @@
+import { Component } from 'vue'
+
+export interface DataItemType {
+ id?: string
+ name?: string
+ code?: string
+ description?: string
+ label?: string
+ value?: string | number
+}
+
+export interface WmsMaterialContainerBaseType {
+ id?: string
+ name?: string
+ code?: string
+ value?: number
+ description?: string
+ options?: Array<DataItemType>
+ abilityValue?: number | string
+ data?: DataItemType
+ defaultValue?: string | number
+ flow: string
+}
+
+export interface FlowDefinitionType {
+ id?: string
+ name?: string
+ code?: string
+ description?: string
+}
+
+export type ModuleType = Record<
+ string,
+ {
+ default: Record<string, string>
+ name: string
+ }
+>
+
+export interface TabItem {
+ name: string
+ label: string
+ component: Component
+ hidden?: boolean
+}
--
Gitblit v1.9.3