| | |
| | | "notPage": false |
| | | }, |
| | | { |
| | | "name": "管éä»¶è£
é
", |
| | | "path": "/information-base/PipeAccessoryAssembly", |
| | | "patchName": "PipeAccessoryAssembly", |
| | | "name": "管éä»¶çæ¥", |
| | | "path": "/information-base/PipeAccessoryWeld", |
| | | "patchName": "PipeAccessoryWeld", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | { |
| | | "name": "MyPluginName", |
| | | "path": "/information-base/MyPluginName", |
| | | "patchName": "MyPluginName", |
| | | "name": "管éä»¶è£
é
", |
| | | "path": "/information-base/PipeAccessoryAssembly", |
| | | "patchName": "PipeAccessoryAssembly", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | |
| | | "path": "/information-base/OrderManagement-main", |
| | | "patchName": "OrderManagement-main", |
| | | "icon": "order", |
| | | "notPage": false |
| | | }, |
| | | { |
| | | "name": "MyPluginName", |
| | | "path": "/information-base/MyPluginName", |
| | | "patchName": "MyPluginName", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | { |
| | |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | "PipeAccessoryWeld": { |
| | | "name": "管éä»¶çæ¥", |
| | | "path": "/information-base/PipeAccessoryWeld", |
| | | "patchName": "PipeAccessoryWeld", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | "PipeAccessoryAssembly": { |
| | | "name": "管éä»¶è£
é
", |
| | | "path": "/information-base/PipeAccessoryAssembly", |
| | | "patchName": "PipeAccessoryAssembly", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | "MyPluginName": { |
| | | "name": "MyPluginName", |
| | | "path": "/information-base/MyPluginName", |
| | | "patchName": "MyPluginName", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | |
| | | "icon": "order", |
| | | "notPage": false |
| | | }, |
| | | "MyPluginName": { |
| | | "name": "MyPluginName", |
| | | "path": "/information-base/MyPluginName", |
| | | "patchName": "MyPluginName", |
| | | "icon": "p", |
| | | "notPage": false |
| | | }, |
| | | "Http": { |
| | | "name": "API请æ±", |
| | | "path": "/information-base/Http", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, Ref, nextTick, computed } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsMaterialContainer } from '../Models/PipeAccessoryWeld' |
| | | 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 |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { |
| | | ref, |
| | | onMounted, |
| | | reactive, |
| | | computed, |
| | | Ref, |
| | | watch, |
| | | SetupContext, |
| | | h, |
| | | } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsMaterialContainerDrawer } from '../Models/PipeAccessoryWeldDrawer' |
| | | 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) |
| | | }, |
| | | }) |
| | | /** |
| | | * æ·»å çformåæ®µ |
| | | */ |
| | | 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: '请è¾å
¥ç©æID', |
| | | 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, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { |
| | | ref, |
| | | onMounted, |
| | | reactive, |
| | | computed, |
| | | Ref, |
| | | watch, |
| | | SetupContext, |
| | | h, |
| | | } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsMaterialContainerDrawer } from '../Models/PipeAccessoryWeldDrawer' |
| | | 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) |
| | | }, |
| | | }) |
| | | /** |
| | | * æ·»å çformåæ®µ |
| | | */ |
| | | const formItems = reactive([ |
| | | { |
| | | label: 'æçç¼å·', |
| | | prop: 'containerNo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æçç¼å·', |
| | | }, |
| | | { |
| | | label: 'ç©æID', |
| | | prop: 'materialId', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç©æID', |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | 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, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | deleteWmsMaterialContainers, |
| | | addWmsMaterialContainer, |
| | | cloneData, |
| | | } from './Service/PipeAccessoryWeld' |
| | | |
| | | 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) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsMaterialContainer, |
| | | getWmsMaterialContainer, |
| | | updateWmsMaterialContainer, |
| | | getWmsEnumData, |
| | | } from './Service/PipeAccessoryWeldDrawer' |
| | | 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) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsMaterialContainer, |
| | | getWmsMaterialContainer, |
| | | updateWmsMaterialContainer, |
| | | getWmsEnumData, |
| | | } from './Service/PipeAccessoryWeldQueryDrawer' |
| | | 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) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ® ç®¡æ®µç¼ç ãå·¥åº æ¥è¯¢ ä½ä¸è®¡å |
| | | * @returns |
| | | */ |
| | | export const findSingleWorkPlanByFilter = (data: any) => { |
| | | return request.post('/api/v1/PipeLineLems/WorkPlan/FindSingleByFilter', data) |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ® ä»»å¡ç¼å·è¿è¡å¼å·¥ |
| | | * @returns |
| | | */ |
| | | export const startProduction = (data: any) => { |
| | | return request.post('/api/v1/PipeLineLems/WorkPlanPublic/startProduction', data) |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ® ä»»å¡ç¼å·è¿è¡å®å·¥ |
| | | * @returns |
| | | */ |
| | | export const finishProduction = (data: any) => { |
| | | return request.post('/api/v1/PipeLineLems/WorkPlanPublic/finishProduction', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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) |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseDrawer from '@/components/BaseDrawer/BaseDrawer' |
| | | import styles from './WmsMaterialContainerDrawer.module.scss' |
| | | import { useWmsMaterialContainerDrawer } from '../../../../Controllers/PipeAccessoryWeldDrawer.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> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * ç©æåºç¡ä¿¡æ¯æ¥è¯¢å¼¹åºæ¡ |
| | | */ |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseQueryDrawer from '@/components/BaseQueryDrawer/BaseQueryDrawer' |
| | | import styles from './WmsMaterialContainerQueryDrawer.module.scss' |
| | | import { useWmsMaterialContainerQueryDrawer } from '../../../../Controllers/PipeAccessoryWeldQueryDrawer.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> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const columns = [ |
| | | { |
| | | type: 'seq', |
| | | width: 60, |
| | | title: 'åºå·', |
| | | }, |
| | | { |
| | | field: 'containerNo', |
| | | title: 'æçç¼å·', |
| | | }, |
| | | { |
| | | field: 'materialId', |
| | | title: 'ç©æID', |
| | | }, |
| | | { |
| | | field: 'sort', |
| | | title: '', |
| | | }, |
| | | { |
| | | field: 'creationTime', |
| | | title: 'æ¯å¦ç¦ç¨', |
| | | }, |
| | | { |
| | | field: 'deletionTime', |
| | | title: '', |
| | | }, |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .pipeAccessoryWeldContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | // height: 100% !important; |
| | | // overflow-y: auto !important; /* å
容è¶
åºæ¶æ¾ç¤ºæ»å¨æ¡ */ |
| | | // padding-bottom: 20px; /* é¿å
å
容被åºé¨é®æ¡ */ |
| | | |
| | | .pipeAccessoryWeldList { |
| | | 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; |
| | | } |
| | | |
| | | .h5Form { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20px; // 表å项ä¹é´çé´è· |
| | | |
| | | .el-form-item { |
| | | margin-bottom: 0; // ç§»é¤é»è®¤çåºé¨è¾¹è· |
| | | width: 100% !important; // å æ»¡ç¶å®¹å¨å®½åº¦ |
| | | } |
| | | |
| | | .el-form-item__label { |
| | | display: block; |
| | | text-align: left; |
| | | margin-bottom: 8px; |
| | | font-weight: 500; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .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%; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | .newPageContent { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 20px; |
| | | padding: 20px; |
| | | background-color: white; |
| | | |
| | | .info-block { |
| | | background-color: #f9f9f9; |
| | | border: 1px solid #eaeaea; |
| | | border-radius: 5px; |
| | | padding: 20px; |
| | | width: calc(33.33% - 20px); |
| | | |
| | | .block-title { |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | margin-bottom: 15px; |
| | | } |
| | | |
| | | .info-tags { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 10px; |
| | | |
| | | .info-tag { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 5px; |
| | | |
| | | .tag-label { |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 10px; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .equipment-image { |
| | | width: 100%; |
| | | height: auto; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .status-normal { |
| | | color: green; |
| | | } |
| | | } |
| | | |
| | | .process-table { |
| | | width: 100%; |
| | | margin-top: 20px; |
| | | |
| | | .el-table { |
| | | border: 1px solid #eaeaea; |
| | | border-radius: 5px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | .modelRrow { |
| | | display: flex; /* å¼¹æ§å¸å± */ |
| | | gap: 20px; /* æ§ä»¶é´è· */ |
| | | align-items: center; /* åç´å±
ä¸ */ |
| | | margin-bottom: 12px; /* åºé¨é´è· */ |
| | | width: 100%; |
| | | |
| | | .el-form-item { |
| | | flex: 1 !important; /* ååç©ºé´ */ |
| | | margin-bottom: 0; |
| | | max-width: none; // ç§»é¤æå¤§å®½åº¦éå¶ |
| | | } |
| | | |
| | | .el-select { |
| | | width: 100%; // ç¡®ä¿Selectå æ»¡ç¶å®¹å¨å®½åº¦ |
| | | |
| | | // ç§»é¤å¯è½å½±å宽度çå
鍿 ·å¼ |
| | | .el-input__wrapper { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | // ååºå¼è®¾è®¡ |
| | | @media (max-width: 1200px) { |
| | | .model-row { |
| | | flex-wrap: wrap; |
| | | |
| | | .el-form-item { |
| | | flex: 1 0 calc(50% - 10px); // å¨ä¸çå±å¹ä¸æ¯è¡æ¾ç¤º2个 |
| | | margin-bottom: 10px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | @media (max-width: 768px) { |
| | | .model-row { |
| | | flex-direction: column; |
| | | |
| | | .el-form-item { |
| | | width: 100%; // å¨å°å±å¹ä¸æ¯è¡æ¾ç¤º1个 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 10px; |
| | | margin-top: 20px; |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { defineComponent, onMounted, ref } from 'vue' |
| | | import type { Ref } from 'vue' |
| | | import styles from './PipeAccessoryWeld.module.scss' |
| | | import pipeImage from '@/images/pipe-Weld-drawing-example.png' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { |
| | | ElInput, |
| | | ElForm, |
| | | ElFormItem, |
| | | ElButton, |
| | | ElSelect, |
| | | ElOption, |
| | | ElMessage, |
| | | ElCol, |
| | | } from 'element-plus' |
| | | import { |
| | | getPlaceNoForStockList, |
| | | getMaterialModelList, |
| | | instock, |
| | | findSingleWorkPlanByFilter, |
| | | startProduction, |
| | | finishProduction |
| | | } from '@/widgets/PipeAccessoryWeld/Models/Service/PipeAccessoryWeld' |
| | | import { Message } from '@element-plus/icons-vue/dist/types' |
| | | |
| | | export default defineComponent({ |
| | | name: 'PipeAccessoryWeld', |
| | | setup() { |
| | | // æ¥è¯¢è¡¨åæ°æ® |
| | | const queryForm = ref({ |
| | | pipeSpecCode: '', |
| | | processRouteNumber: '', |
| | | taskCode: '', |
| | | length: '', |
| | | projectNumber: '', |
| | | shipNumber: '', |
| | | material: '', |
| | | outerDiameter: '', |
| | | thickness: '', |
| | | plannedStartTime: '', |
| | | plannedEndTime: '', |
| | | workstationCode: '', |
| | | processName: '', |
| | | equipmentCode: '' |
| | | }) |
| | | |
| | | // æ°æ®æº |
| | | 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, |
| | | })) |
| | | } |
| | | const handleChange =async (value) => { |
| | | console.log('è¾å
¥å
容确认:', value); // 失å»ç¦ç¹æå车æ¶è§¦å |
| | | // 卿¤å¤æ·»å ä¸å¡é»è¾ï¼å¦æ ¡éªãæäº¤çï¼ |
| | | const param={ |
| | | pipeSpecCode:value, |
| | | pipeSpecCode_FilterMode:2,//ç²¾åæ¥è¯¢ |
| | | processName:'çæ¥å·¥åº', |
| | | processName_FilterMode:2,//ç²¾åæ¥è¯¢ |
| | | } |
| | | const workPlan = await findSingleWorkPlanByFilter(param); |
| | | console.log('è¿å:'+workPlan); |
| | | if(workPlan==''){ |
| | | ElMessage.error('æ²¡ææ¾å°æ°æ®'); |
| | | queryForm.value ={ pipeSpecCode: '', |
| | | processRouteNumber: '', |
| | | taskCode: '', |
| | | length: '', |
| | | projectNumber: '', |
| | | shipNumber: '', |
| | | material: '', |
| | | outerDiameter: '', |
| | | thickness: '', |
| | | plannedStartTime: '', |
| | | plannedEndTime: '', |
| | | workstationCode: '', |
| | | processName: '', |
| | | equipmentCode: ''} |
| | | }else{ |
| | | queryForm.value=workPlan; |
| | | } |
| | | }; |
| | | |
| | | // å¼å·¥äºä»¶å¤ç |
| | | const startWork = () => { |
| | | console.log('æ§è¡å¼å·¥æä½'); |
| | | if(queryForm.value.pipeSpecCode==''){ |
| | | ElMessage.error('请è¾å
¥ç®¡æ®µç¼ç '); |
| | | return |
| | | } |
| | | ConfirmBox( |
| | | `ç¡®å®è¦å°ç®¡æ®µç¼ç ${queryForm.value.pipeSpecCode}å¼å·¥å` |
| | | ).then(async () => { |
| | | //æ¨çä¸å¡é»è¾ |
| | | const param={ |
| | | taskCode:queryForm.value.taskCode, |
| | | }; |
| | | const ret = await startProduction(param); |
| | | console.log('è¿å:'+ret); |
| | | if(ret.code="200"){ |
| | | ElMessage.success('å¼å·¥æå'); |
| | | }else{ |
| | | ElMessage.error('å¼å·¥å¤±è´¥:'+ret.message); |
| | | } |
| | | }) |
| | | } |
| | | // å®å·¥äºä»¶å¤ç |
| | | const finishWork = () => { |
| | | console.log('æ§è¡å¼å·¥æä½'); |
| | | if(queryForm.value.pipeSpecCode==''){ |
| | | ElMessage.error('请è¾å
¥ç®¡æ®µç¼ç '); |
| | | return |
| | | } |
| | | ConfirmBox( |
| | | `ç¡®å®è¦å°ç®¡æ®µç¼ç ${queryForm.value.pipeSpecCode}å®å·¥å` |
| | | ).then(async () => { |
| | | //æ¨çä¸å¡é»è¾ |
| | | const param={ |
| | | pipeSpecCode:queryForm.value.pipeSpecCode, |
| | | processName:queryForm.value.processName, |
| | | }; |
| | | const ret = await finishProduction(param); |
| | | console.log('è¿å:'+ret); |
| | | if(ret.code="200"){ |
| | | ElMessage.success('å®å·¥æå'); |
| | | }else{ |
| | | ElMessage.error('å®å·¥å¤±è´¥:'+ret.message); |
| | | } |
| | | }) |
| | | } |
| | | const tableData = ref([ |
| | | { sequence: 1, flangeA: 'RF-200-1.6MPa', flangeB: 'WN-200-1.6MPa' }, |
| | | { sequence: 2, flangeA: 'WN-250-2.5MPa', flangeB: 'SO-250-2.5MPa' }, |
| | | { sequence: 3, flangeA: 'PL-300-1.0MPa', flangeB: 'RF-300-1.0MPa' }, |
| | | { sequence: 4, flangeA: 'SO-150-2.0MPa', flangeB: 'WN-150-2.0MPa' }, |
| | | { sequence: 5, flangeA: 'RF-400-1.6MPa', flangeB: 'PL-400-1.6MPa' }, |
| | | { sequence: 6, flangeA: 'WN-200-4.0MPa', flangeB: 'SO-200-4.0MPa' }, |
| | | { sequence: 7, flangeA: 'SO-300-1.6MPa', flangeB: 'RF-300-1.6MPa' }, |
| | | { sequence: 8, flangeA: 'PL-250-1.0MPa', flangeB: 'WN-250-1.0MPa' }, |
| | | { sequence: 9, flangeA: 'RF-150-2.5MPa', flangeB: 'SO-150-2.5MPa' }, |
| | | { sequence: 10, flangeA: 'WN-400-2.0MPa', flangeB: 'PL-400-2.0MPa' } |
| | | ]); |
| | | |
| | | |
| | | return () => { |
| | | return ( |
| | | <div |
| | | class={styles.PipeAccessoryWeldContent} |
| | | style="overflow-y: auto !important; height: 100%;" |
| | | > |
| | | <ElFormItem label="管段ç¼ç "> |
| | | <ElInput |
| | | v-model={queryForm.value.pipeSpecCode} |
| | | clearable |
| | | class={styles.formInput} |
| | | onInput={handleChange} |
| | | /> |
| | | </ElFormItem> |
| | | <div class={styles.actionButtons}> |
| | | <ElButton type="warning" onClick={startWork}>å¼å·¥</ElButton> |
| | | <ElButton type="warning" onClick={finishWork}>å®å·¥</ElButton> |
| | | {/* <ElButton type="warning">æå</ElButton> |
| | | <ElButton type="warning">èªå¨</ElButton> |
| | | <ElButton type="warning">è´¨æ£</ElButton> */} |
| | | </div> |
| | | |
| | | <h2 class={styles.blockTitle}>å½åä»»å¡</h2> |
| | | <ElForm label-position="left" > |
| | | |
| | | <ElFormItem label="ç©ææµå "> |
| | | <ElInput |
| | | v-model={queryForm.value.processRouteNumber} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="ä»»å¡ç¼å· "> |
| | | <ElInput |
| | | v-model={queryForm.value.taskCode} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="管段é¿åº¦ "> |
| | | <ElInput |
| | | v-model={queryForm.value.length} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="é¡¹ç® å·"> |
| | | <ElInput |
| | | v-model={queryForm.value.projectNumber} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="è¹ å·"> |
| | | <ElInput |
| | | v-model={queryForm.value.shipNumber} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="æ è´¨"> |
| | | <ElInput |
| | | v-model={queryForm.value.material} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="å¤ å¾"> |
| | | <ElInput |
| | | v-model={queryForm.value.outerDiameter} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="å£ å"> |
| | | <ElInput |
| | | v-model={queryForm.value.thickness} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="计åå¼å§æ¶é´"> |
| | | <ElInput |
| | | v-model={queryForm.value.plannedStartTime} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="计å宿æ¶é´"> |
| | | <ElInput |
| | | v-model={queryForm.value.plannedEndTime} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | </ElForm> |
| | | |
| | | <h2 class={styles.blockTitle}>å½åå·¥ä½/设å¤ä¿¡æ¯</h2> |
| | | <ElForm label-position="left" > |
| | | <ElFormItem label="å·¥ä½ä»£ç "> |
| | | <ElInput |
| | | v-model={queryForm.value.workstationCode} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="å·¥åºåç§° "> |
| | | <ElInput |
| | | v-model={queryForm.value.processName} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="设å¤ä»£ç "> |
| | | <ElInput |
| | | v-model={queryForm.value.equipmentCode} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | {/* <ElFormItem label="设å¤ç¶æ"> |
| | | <ElInput |
| | | v-model={queryForm.value.materialBatch} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> */} |
| | | {/* <ElFormItem label="æä½äºº"> |
| | | <ElInput |
| | | v-model={queryForm.value.materialBatch} |
| | | disabled |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> */} |
| | | </ElForm> |
| | | |
| | | {/* <div class="info-block"> |
| | | <h2 class="block-title">å·¥èºä¿¡æ¯</h2> |
| | | <el-table stripe v-model:dataSource={tableData}> |
| | | <el-table-column prop="sequence" label="åº"></el-table-column> |
| | | <el-table-column prop="flangeA" label="æ³å
°A"></el-table-column> |
| | | <el-table-column prop="flangeB" label="æ³å
°B"></el-table-column> |
| | | </el-table> |
| | | </div> */} |
| | | <h2 class="block-title">å¾çº¸</h2> |
| | | <img |
| | | src={pipeImage} |
| | | alt="设å¤å¾ç" |
| | | style="height:1250px;" |
| | | class="equipment-image" |
| | | ></img> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .PipeAccessoryWeld { |
| | | background-color: #fff; |
| | | border-radius: 5px 5px 0 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | border: 1px solid #dbdbdb; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { |
| | | Component, |
| | | DefineComponent, |
| | | defineComponent, |
| | | markRaw, |
| | | ref, |
| | | SetupContext, |
| | | onMounted, |
| | | } from 'vue' |
| | | import styles from './PipeAccessoryWeld.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: 'PipeAccessoryWeld', label: '管éä»¶çæ¥' }] |
| | | |
| | | export default defineComponent({ |
| | | name: 'PipeAccessoryWeld', |
| | | |
| | | 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 PipeAccessoryWeld = markRaw(module.default) |
| | | const foundLabel = |
| | | nameToLabelMap.find((item) => item.name === name)?.label || name |
| | | tabData.value.push({ |
| | | label: foundLabel, |
| | | name, |
| | | component: PipeAccessoryWeld, |
| | | }) |
| | | } |
| | | } |
| | | |
| | | initTableData() |
| | | |
| | | return () => { |
| | | return ( |
| | | <div class={styles.PipeAccessoryWeld}> |
| | | <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['PipeAccessoryWeld'] = r)} |
| | | ></Widget> |
| | | </TabPane> |
| | | ) |
| | | })} |
| | | </Tab> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "PipeAccessoryWeld" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export interface TabType { |
| | | label: string |
| | | name: string |
| | | columns?: any[] |
| | | data?: any[] |
| | | isFooter: boolean |
| | | [key: string]: any |
| | | } |
| | | |
| | | export const permissionCodes = { |
| | | 'PipeAccessoryWeld-list': 'å表-å表', |
| | | 'PipeAccessoryWeld-add': 'å表-æ·»å ', |
| | | 'PipeAccessoryWeld-import': 'å表-导å
¥', |
| | | 'PipeAccessoryWeld-output': 'å表-è¾åº', |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import PipeAccessoryWeld from './Views/PipeAccessoryWeld' |
| | | import Setting from '@/components/Setting/Setting' |
| | | import { provider } from '@/provider/index' |
| | | import p from '../../assets/svg/p.svg' |
| | | |
| | | export default { |
| | | is: 'PipeAccessoryWeld', |
| | | name: '管éä»¶çæ¥', |
| | | category: 'run', |
| | | icon: p, |
| | | authorizationRequired: false, |
| | | canvasView: provider(PipeAccessoryWeld), |
| | | settingsView: Setting, |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 |
| | | } |
| | |
| | | { "åå²è¿ç«ä¿¡å·", "åå²è¿ç«ä¿¡å·(æè¿°)" }, |
| | | |
| | | { "è£
é
å®å·¥ä¿¡å·", "è£
é
å®å·¥ä¿¡å·(æè¿°)" }, |
| | | { "çæ¥å®å·¥ä¿¡å·", "çæ¥å®å·¥ä¿¡å·(æè¿°)" }, |
| | | }; |
| | | |
| | | // å建ééçå¬ |
| | |
| | | _ = Task.Run(async () => |
| | | { |
| | | await HanlderForå®å·¥ä¿¡å·WhenFalseAsync("è£
é
"); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | if (changed.Name == "çæ¥å®å·¥ä¿¡å·") |
| | | { |
| | | if (changed.New?.Value.SafeString().ToBool() == true) |
| | | { |
| | | _ = Task.Run(async () => |
| | | { |
| | | await HanlderForçæ¥å®å·¥ä¿¡å·Async(); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | _ = Task.Run(async () => |
| | | { |
| | | await HanlderForå®å·¥ä¿¡å·WhenFalseAsync("çæ¥"); |
| | | }); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// çæ¥å®å·¥ä¿¡å·=trueæ¶ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private async Task HanlderForçæ¥å®å·¥ä¿¡å·Async() |
| | | { |
| | | |
| | | var workPlanAppService = _serviceProvider.GetRequiredService<IWorkPlanAppService>(); |
| | | var workPlanRepository = _serviceProvider.GetRequiredService<IWorkPlanRepository>(); |
| | | var callMaterialOrderAppService = _serviceProvider.GetRequiredService<ICallMaterialOrderAppService>(); |
| | | |
| | | var pipeSpecCode = await _variableService.ReadValueAsync("çæ¥ç®¡æ®µç¼ç "); |
| | | |
| | | if (string.IsNullOrEmpty(pipeSpecCode?.Content?.Value.SafeString().ToString())) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | |
| | | |
| | | var myPipeSpecCode = pipeSpecCode.Content.Value.SafeString().ToString(); |
| | | CallMaterialOrder callMaterialOrder = null; |
| | | try |
| | | { |
| | | var sharedService = _serviceProvider.GetRequiredService<SharedService>(); |
| | | var userName = await _variableService.ReadValueAsync("çæ¥äºº"); |
| | | MyCurrentUser myCurrentUser = new MyCurrentUser() |
| | | { |
| | | UserAccount = userName.Content.Value.SafeString().ToString() |
| | | }; |
| | | sharedService.CompleteAssemblyProcess(_serviceProvider, new Application.Contracts.Dtos.WorkPlan.CompleteAssemblyProcessInput() { PipeSpecCode = myPipeSpecCode, ProcessName = "çæ¥å·¥åº" }, myCurrentUser); |
| | | |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å®å·¥ä¿¡å·=falseæ¶ |
| | | /// </summary> |
| | | /// <returns></returns> |