From 05c47e0a832bbd2b8bafb732fc55c1ef8e9b97e0 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 21 5月 2025 11:41:47 +0800
Subject: [PATCH] 22
---
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssembly.ts | 24
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/Config.ts | 213 ++++++++++++
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssembly.ts | 14
PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx | 675 ++++++++++++++++++++++++++++-------------
4 files changed, 683 insertions(+), 243 deletions(-)
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssembly.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssembly.ts
index 1c9df89..382dd40 100644
--- a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssembly.ts
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Controllers/PipeAccessoryAssembly.ts
@@ -1,6 +1,6 @@
import { ref, onMounted, reactive, Ref, nextTick, computed } from 'vue'
import { injectModel } from '@/libs/Provider/Provider'
-import { WmsMaterialContainer } from '../Models/PipeAccessoryAssembly'
+import { PipeAccessoryAssembly } from '../Models/PipeAccessoryAssembly'
import { ElMessage } from 'element-plus'
import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox'
import { useFile } from './File'
@@ -9,8 +9,8 @@
row: any
index: number
}
-export const useWmsMaterialContainer = (props: any, ctx?: any) => {
- const wmsMaterialContainer = injectModel<WmsMaterialContainer>('wmsMaterialContainer')
+export const usePipeAccessoryAssembly = (props: any, ctx?: any) => {
+ const PipeAccessoryAssembly = injectModel<PipeAccessoryAssembly>('PipeAccessoryAssembly')
const { exportFile } = useFile()
/**
* 澶撮儴閰嶇疆
@@ -19,7 +19,7 @@
/**
* 鍔ㄦ�佸垪閰嶇疆
*/
- const wmsMaterialContainerColumns = ref<Record<string, any>>([])
+ const PipeAccessoryAssemblyColumns = ref<Record<string, any>>([])
/**
* 鎼滅储鍊�
*/
@@ -118,7 +118,7 @@
// {
// label: '鍒涘缓鍓湰',
// fn: async ({ row }: CurrentType) => {
- // await wmsMaterialContainer.cloneData([row.id])
+ // await PipeAccessoryAssembly.cloneData([row.id])
// ElMessage.success('鍒涘缓鍓湰鎴愬姛')
// tableRef.value?.getList()
// },
@@ -133,7 +133,7 @@
`鏄惁鍒犻櫎${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])
+ await PipeAccessoryAssembly.deletePipeAccessoryAssemblys(ids.length ? ids : [c.row.id])
ElMessage.success('鍒犻櫎鎴愬姛')
tableRef.value.getList()
})
@@ -146,7 +146,7 @@
selection.value = records
}
- const onAddWmsMaterialContainer = () => {
+ const onAddPipeAccessoryAssembly = () => {
const params = tableRef.value?.getPaginationParams()
current.value = null
dialogConfig.visible = true
@@ -164,7 +164,7 @@
dialogConfigForQuery.title = '楂樼骇鏌ヨ'
}
- const onConfirmWmsMaterialContainer = async () => {
+ const onConfirmPipeAccessoryAssembly = async () => {
dialogConfig.visible = false
if (dialogConfig.isAdd) {
tableRef.value?.scrollToRow({
@@ -187,7 +187,7 @@
*/
const onExport = (data={}) => {
//const params = tableRef.value?.getParams()
- exportFile('/api/v1/HIAWms/wmsMaterialContainer/export', data, 'wmsMaterialContainer')
+ exportFile('/api/v1/HIAWms/PipeAccessoryAssembly/export', data, 'PipeAccessoryAssembly')
}
/**
@@ -257,7 +257,7 @@
current,
search,
sort,
- wmsMaterialContainerColumns,
+ PipeAccessoryAssemblyColumns,
paginationParams,
headers,
onBeforeUpload,
@@ -267,9 +267,9 @@
onSearch,
onExport,
onRowClick,
- onConfirmWmsMaterialContainer,
+ onConfirmPipeAccessoryAssembly,
onCheck,
- onAddWmsMaterialContainer,
+ onAddPipeAccessoryAssembly,
onAdvancedQuery
}
}
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssembly.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssembly.ts
index 9bcfa04..95c2457 100644
--- a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssembly.ts
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/PipeAccessoryAssembly.ts
@@ -1,11 +1,11 @@
import { Base } from '@/libs/Base/Base'
import {
- deleteWmsMaterialContainers,
- addWmsMaterialContainer,
+ // deletePipeAccessoryAssemblys,
+ // addPipeAccessoryAssembly,
cloneData,
} from './Service/PipeAccessoryAssembly'
-export class WmsMaterialContainer extends Base<{ [key: string]: any }> {
+export class PipeAccessoryAssembly extends Base<{ [key: string]: any }> {
constructor() {
super({
data: [],
@@ -17,8 +17,8 @@
* @param id
* @returns
*/
- async deleteWmsMaterialContainers(ids: string[]) {
- return deleteWmsMaterialContainers(ids)
+ async deletePipeAccessoryAssemblys(ids: string[]) {
+ // return deletePipeAccessoryAssemblys(ids)
}
/**
@@ -26,8 +26,8 @@
* @param data
* @returns
*/
- addWmsMaterialContainer(data: Record<string, any>) {
- return addWmsMaterialContainer(data)
+ addPipeAccessoryAssembly(data: Record<string, any>) {
+ //return addPipeAccessoryAssembly(data)
}
/**
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
index 5e6ddfc..c52afc0 100644
--- a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/Config.ts
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/Config.ts
@@ -5,23 +5,218 @@
title: '搴忓彿',
},
{
- field: 'containerNo',
- title: '鎵樼洏缂栧彿',
+ field: 'son_TaskCode',
+ title: '瀛愪换鍔$紪鐮�',
+ width:160,
},
{
- field: 'materialId',
- title: '鐗╂枡ID',
+ field: 'taskCode',
+ title: '浠诲姟缂栫爜',
+ width:160,
},
{
- field: 'sort',
- title: '',
+ field: 'pipeSpecCode',
+ title: '绠℃缂栫爜',
+ width:160,
+},
+{
+ field: 'pipeSectionName',
+ title: '绠℃鍚嶇О',
+ width:160,
+},
+{
+ field: 'pipeSpecMode',
+ title: '绠℃鍨嬪彿',
+ width:160,
+},
+{
+ field: 'processName',
+ title: '宸ュ簭鍚嶇О',
+ width:160,
+},
+{
+ field: 'shipNumber',
+ title: '鑸瑰彿',
+ width:160,
+},
+{
+ field: 'projectNumber',
+ title: '椤圭洰鍙�',
+ width:160,
+},
+{
+ field: 'workPlanStatusDesc',
+ title: '璁″垝鐘舵��',
+ width:160,
+},
+{
+ field: 'callMaterialStatusDesc',
+ title: '鍙枡鐘舵��',
+ width:160,
+},
+{
+ field: 'processRouteNumber',
+ title: '宸ヨ壓娴佸悜缂栧彿',
+ width:160,
+},
+{
+ field: 'dataIdentifier',
+ title: '鍘熸枡鏍囪瘑',
+ width:160,
+},
+{
+ field: 'materialMode',
+ title: '鍘熸枡鍨嬪彿',
+ width:160,
+},
+{
+ field: 'length',
+ title: '闀垮害(mm)',
+ width:160,
+},
+{
+ field: 'markingContent',
+ title: '鎵撶爜鍐呭',
+ width:160,
+},
+{
+ field: 'markingPosition',
+ title: '鎵撶爜浣嶇疆',
+ width:160,
+},
+{
+ field: 'cuttingPosition',
+ title: '鍒囧壊浣嶇疆',
+ width:160,
+},
+{
+ field: 'quantity',
+ title: '绠℃鏁伴噺',
+ width:160,
+},
+{
+ field: 'flangeThickness',
+ title: '娉曞叞鍘氬害(mm)',
+ width:160,
+},
+{
+ field: 'flangeInnerDiameter',
+ title: '娉曞叞鐩村緞(mm)',
+ width:160,
+},
+{
+ field: 'weldingHeatInput',
+ title: '娉曞叞鍏О鍘嬪姏',
+ width:160,
+},
+{
+ field: 'pipeAllowableStress',
+ title: '娉曞叞鍐茬爜鍐呭',
+ width:160,
+},
+{
+ field: 'pipeDiameter',
+ title: '濂楃闀垮害(mm)',
+ width:160,
+},
+{
+ field: 'pipeWallThickness',
+ title: '濂楃鐩村緞(mm)',
+ width:160,
+},
+{
+ field: 'factoryCode',
+ title: '宸ュ巶浠g爜',
+ width:160,
+},
+{
+ field: 'productCode',
+ title: '浜у搧浠g爜',
+ width:160,
+},
+{
+ field: 'workstationCode',
+ title: '宸ヤ綅浠g爜',
+ width:160,
+},
+{
+ field: 'equipmentCode',
+ title: '璁惧浠g爜',
+ width:160,
+},
+{
+ field: 'prodLineCode',
+ title: '浜х嚎缂栫爜',
+ width:160,
+},
+{
+ field: 'pipeFittingCode',
+ title: '绠′欢缂栫爜',
+ width:160,
+},
+{
+ field: 'preSerialNumber',
+ title: '椤哄簭鍙�',
+ width:160,
+},
+{
+ field: 'outerDiameter',
+ title: '澶栧緞(mm)',
+ width:160,
+},
+{
+ field: 'thickness',
+ title: '澹佸帤(mm)',
+ width:160,
+},
+{
+ field: 'material',
+ title: '鏉愯川',
+ width:160,
+},
+{
+ field: 'plannedStartTime',
+ title: '璁″垝寮�濮嬫椂闂�',
+ width:180,
+},
+{
+ field: 'plannedEndTime',
+ title: '璁″垝瀹屾垚鏃堕棿',
+ width:180,
+},
+{
+ field: 'teamInfo',
+ title: '鐝粍淇℃伅',
+ width:160,
+},
+{
+ field: 'timestamp',
+ title: '鏃堕棿鎴�',
+ width:160,
},
{
field: 'creationTime',
- title: '鏄惁绂佺敤',
+ title: '鍒涘缓鏃堕棿',
+ width:180,
},
{
- field: 'deletionTime',
- title: '',
+ field: 'lastModificationTime',
+ title: '淇敼鏃堕棿',
+ width:180,
+},
+{
+ field: 'creatorName',
+ title: '鍒涘缓浜�',
+ width:160,
+},
+{
+ field: 'lastModifierName',
+ title: '淇敼浜�',
+ width:160,
+},
+{
+ field: 'remark',
+ title: '澶囨敞',
+ width:160,
},
]
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
index 91441ff..00c86cf 100644
--- a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx
+++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx
@@ -1,8 +1,13 @@
import { defineComponent, onMounted, ref } from 'vue'
import type { Ref } from 'vue'
import styles from './PipeAccessoryAssembly.module.scss'
+import { usePipeAccessoryAssembly } from '../../../Controllers/PipeAccessoryAssembly'
import pipeImage from '@/images/pipe-assembly-drawing-example.png'
-import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox'
+import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox'
+import { columns } from './Config'
+import TdButton from '@/components/TdButton/TdButton'
+import BaseTable from '@/components/Table/Table'
+import dayjs from 'dayjs'
import {
ElInput,
ElForm,
@@ -19,31 +24,111 @@
instock,
findSingleWorkPlanByFilter,
startProduction,
- finishProduction
+ finishProduction,
} from '@/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly'
import { Message } from '@element-plus/icons-vue/dist/types'
+interface RenderTableType {
+ url?: string
+ dataSource: Ref<any[]>
+ isDrag?: boolean
+ isChecked?: boolean
+ isHidePagination?: boolean
+ params?: Record<string, any>
+ autoHeight?: boolean
+}
+
export default defineComponent({
name: 'PipeAccessoryAssembly',
- setup() {
- // 鏌ヨ琛ㄥ崟鏁版嵁
-const queryForm = ref({
- pipeSpecCode: '',
- processRouteNumber: '',
- taskCode: '',
- length: '',
- projectNumber: '',
- shipNumber: '',
- material: '',
- outerDiameter: '',
- thickness: '',
- plannedStartTime: '',
- plannedEndTime: '',
- workstationCode: '',
- processName: '',
- equipmentCode: ''
-})
+ setup(props, ctx) {
+ const {
+ dataSource,
+ contextMenu,
+ dialogConfig,
+ dialogConfigForQuery,
+ tableRef,
+ current,
+ search,
+ sort,
+ headers,
+ onError,
+ onSearch,
+ onRowClick,
+ // onConfirmWorkTask,
+ onCheck,
+ // onAddWorkTask,
+ onAdvancedQuery,
+ onExport,
+ openDetail,
+ onSuccess,
+ onBeforeUpload,
+ } = usePipeAccessoryAssembly(props, ctx)
+ // 鏌ヨ琛ㄥ崟鏁版嵁
+ const queryForm = ref({
+ pipeSpecCode: '',
+ processRouteNumber: '',
+ taskCode: '',
+ length: '',
+ projectNumber: '',
+ shipNumber: '',
+ material: '',
+ outerDiameter: '',
+ thickness: '',
+ plannedStartTime: '',
+ plannedEndTime: '',
+ workstationCode: '',
+ processName: '',
+ equipmentCode: '',
+ })
+
+ 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' },
+ ])
+ const tableData2 = [
+ { 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' },
+ ]
+
+ const tableData3 = [
+ {
+ date: '2016-05-03',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-02',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-04',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ {
+ date: '2016-05-01',
+ name: 'Tom',
+ address: 'No. 189, Grove St, Los Angeles',
+ },
+ ]
// 鏁版嵁婧�
const modelOptions = ref<Array<{ value: string; label: string }>>([])
const placeNoOptions = ref<Array<{ value: string; label: string }>>([])
@@ -94,30 +179,31 @@
label: item.placeNoDesc,
}))
}
- const handleChange =async (value) => {
- console.log('杈撳叆鍐呭纭:', value); // 澶卞幓鐒︾偣鎴栧洖杞︽椂瑙﹀彂
- if(value==''){
- initQueryForm();
- return;
+ const handleChange = async (value) => {
+ console.log('杈撳叆鍐呭纭:', value) // 澶卞幓鐒︾偣鎴栧洖杞︽椂瑙﹀彂
+ if (value == '') {
+ initQueryForm()
+ return
}
// 鍦ㄦ澶勬坊鍔犱笟鍔¢�昏緫锛堝鏍¢獙銆佹彁浜ょ瓑锛�
- const param={
- pipeSpecCode:value,
- pipeSpecCode_FilterMode:2,//绮惧噯鏌ヨ
- processName:'瑁呴厤宸ュ簭',
- processName_FilterMode:2,//绮惧噯鏌ヨ
+ const param = {
+ pipeSpecCode: value,
+ pipeSpecCode_FilterMode: 2, //绮惧噯鏌ヨ
+ processName: '瑁呴厤宸ュ簭',
+ processName_FilterMode: 2, //绮惧噯鏌ヨ
}
- const workPlan = await findSingleWorkPlanByFilter(param);
- console.log('杩斿洖:'+workPlan);
- if(workPlan==''){
- ElMessage.error('娌℃湁鎵惧埌鏁版嵁');
- initQueryForm();
- }else{
- queryForm.value=workPlan;
+ const workPlan = await findSingleWorkPlanByFilter(param)
+ console.log('杩斿洖:' + workPlan)
+ if (workPlan == '') {
+ ElMessage.error('娌℃湁鎵惧埌鏁版嵁')
+ initQueryForm()
+ } else {
+ queryForm.value = workPlan
}
- };
- const initQueryForm=()=>{
- queryForm.value ={ pipeSpecCode: '',
+ }
+ const initQueryForm = () => {
+ queryForm.value = {
+ pipeSpecCode: '',
processRouteNumber: '',
taskCode: '',
length: '',
@@ -130,69 +216,203 @@
plannedEndTime: '',
workstationCode: '',
processName: '',
- equipmentCode: ''}
+ equipmentCode: '',
+ }
}
-
+//鎮ㄧ殑涓氬姟閫昏緫
+const paramForProcessRoute= {
+ processName: '娉曞叞鍐茬爜宸ュ簭',
+ ProcessName_FilterMode:2,//绮惧噯鏌ヨ
+ pipeSpecCode: queryForm.value.pipeSpecCode,
+ pipeSpecCode_FilterMode:2,//绮惧噯鏌ヨ
+}
+ // 鍒锋柊宸ヨ壓淇℃伅
+ const refreshProcessRoute = () => {
+ console.log('鎵ц 鍒锋柊宸ヨ壓淇℃伅')
+ // if (queryForm.value.pipeSpecCode == '') {
+ // ElMessage.error('璇疯緭鍏ョ娈电紪鐮�')
+ // return
+ // }
+
+ tableRef.value.getList(paramForProcessRoute)
+ }
// 寮�宸ヤ簨浠跺鐞�
const startWork = () => {
- console.log('鎵ц寮�宸ユ搷浣�');
- if(queryForm.value.pipeSpecCode==''){
- ElMessage.error('璇疯緭鍏ョ娈电紪鐮�');
+ 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);
- }
- })
- }
+ 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('璇疯緭鍏ョ娈电紪鐮�');
+ 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);
- }
- })
+ 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' }
- ]);
+ /**
+ * @returns 琛ㄦ牸
+ */
+ const RenderBaseTable = (props: RenderTableType) => {
+ const {
+ url,
+ dataSource,
+ isDrag,
+ isChecked,
+ isHidePagination,
+ params,
+ autoHeight,
+ maxHeight,
+ } = props
+
+ return (
+ <div
+ class={{
+ [styles.workTaskList]: true,
+ }}
+ >
+ <BaseTable
+ ref={tableRef}
+ url={url}
+ sortUrlTpl="/api/v1/PipeLineLems/workTask/{id}/adjustsort/{sort}"
+ v-model:dataSource={dataSource.value}
+ columns={columns}
+ contextMenu={contextMenu}
+ params={params}
+ isDrag={isDrag}
+ isChecked={isChecked}
+ autoHeight={autoHeight}
+ maxHeight={maxHeight}
+ onCheck={onCheck}
+ onRowClick={onRowClick}
+ isHidePagination={isHidePagination}
+ pageSize={20}
+ v-slots={{
+ plannedStartTime: ({ row }: any) => {
+ return (
+ <div>
+ {row.plannedStartTime != null
+ ? dayjs(row.plannedStartTime).format(
+ 'YYYY-MM-DD HH:mm:ss'
+ )
+ : '-'}
+ </div>
+ )
+ },
+ plannedEndTime: ({ row }: any) => {
+ return (
+ <div>
+ {row.plannedEndTime != null
+ ? dayjs(row.plannedEndTime).format('YYYY-MM-DD HH:mm:ss')
+ : '-'}
+ </div>
+ )
+ },
+ creationTime: ({ row }: any) => {
+ return (
+ <div>
+ {row.creationTime != null
+ ? dayjs(row.creationTime).format('YYYY-MM-DD HH:mm:ss')
+ : '-'}
+ </div>
+ )
+ },
+ lastModificationTime: ({ row }: any) => {
+ return (
+ <div>
+ {row.lastModificationTime != null
+ ? dayjs(row.lastModificationTime).format(
+ 'YYYY-MM-DD HH:mm:ss'
+ )
+ : '-'}
+ </div>
+ )
+ },
+ isDeleted: ({ row }: any) => {
+ return (
+ <div>
+ {row.isDeleted != null
+ ? row.isDeleted
+ ? '鏄�'
+ : '鍚�'
+ : '-'}
+ </div>
+ )
+ },
+ deletionTime: ({ row }: any) => {
+ return (
+ <div>
+ {row.deletionTime != null
+ ? dayjs(row.deletionTime).format('YYYY-MM-DD HH:mm:ss')
+ : '-'}
+ </div>
+ )
+ },
+ isDisabled: ({ row }: any) => {
+ return (
+ <div>
+ {row.isDisabled != null
+ ? row.isDisabled
+ ? '鏄�'
+ : '鍚�'
+ : '-'}
+ </div>
+ )
+ },
+ name: ({ row }: any) => {
+ return row?.name ? (
+ <TdButton
+ onClick={() => openDetail(row)}
+ text={<span style="color:#5a84ff">璇︽儏</span>}
+ icon="scale"
+ tip={row?.name}
+ hover
+ >
+ {row?.name}
+ </TdButton>
+ ) : (
+ '-'
+ )
+ },
+ }}
+ ></BaseTable>
+ </div>
+ )
+ }
return () => {
return (
@@ -200,134 +420,137 @@
class={styles.PipeAccessoryAssemblyContent}
style="overflow-y: auto !important; height: 100%;"
>
- <ElFormItem label="绠℃缂栫爜 ">
- <ElInput
- v-model={queryForm.value.pipeSpecCode}
- clearable
- class={styles.formInput}
- onInput={handleChange}
- />
- </ElFormItem>
+ <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" 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>
+ <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="宸ヤ綅浠g爜 ">
- <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="璁惧浠g爜 ">
- <ElInput
- v-model={queryForm.value.equipmentCode}
- disabled
- clearable
- class={styles.formInput}
- />
- </ElFormItem>
- {/* <ElFormItem label="璁惧鐘舵��">
+ <h2 class={styles.blockTitle}>褰撳墠宸ヤ綅/璁惧淇℃伅</h2>
+ <ElForm label-position="left">
+ <ElFormItem label="宸ヤ綅浠g爜 ">
+ <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="璁惧浠g爜 ">
+ <ElInput
+ v-model={queryForm.value.equipmentCode}
+ disabled
+ clearable
+ class={styles.formInput}
+ />
+ </ElFormItem>
+ {/* <ElFormItem label="璁惧鐘舵��">
<ElInput
v-model={queryForm.value.materialBatch}
disabled
@@ -335,7 +558,7 @@
class={styles.formInput}
/>
</ElFormItem> */}
- {/* <ElFormItem label="鎿嶄綔浜�">
+ {/* <ElFormItem label="鎿嶄綔浜�">
<ElInput
v-model={queryForm.value.materialBatch}
disabled
@@ -343,16 +566,38 @@
class={styles.formInput}
/>
</ElFormItem> */}
- </ElForm>
+ </ElForm>
{/* <div class="info-block">
<h2 class="block-title">宸ヨ壓淇℃伅</h2>
- <el-table stripe v-model:dataSource={tableData}>
+ <el-table stripe :data={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> */}
+ <div class="info-block">
+ <h2 class="block-title">宸ヨ壓淇℃伅</h2>
+ <div class={styles.actionButtons}>
+ <ElButton type="warning" onClick={refreshProcessRoute}>
+ 鍒锋柊
+ </ElButton>
+ </div>
+ {/* <el-table stripe :data="tableData3" style="width: 100%">
+ <el-table-column prop="date" label="Date" width="180" />
+ <el-table-column prop="name" label="Name" width="180" />
+ <el-table-column prop="address" label="Address" />
+ </el-table> */}
+ <RenderBaseTable
+ url="/api/v1/PipeLineLems/workTask/page"
+ dataSource={dataSource}
+ isChecked={true}
+ isDrag={true}
+ autoHeight={false}
+ maxHeight="500px"
+ params={paramForProcessRoute}
+ />
+ </div>
<h2 class="block-title">鍥剧焊</h2>
<img
src={pipeImage}
--
Gitblit v1.9.3