| | |
| | | </PropertyGroup> |
| | | |
| | | <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))"> |
| | | <CMSRootPath>D:\syc\CMS Editor</CMSRootPath> |
| | | <CMSRootPath>D:\Program Files\CMS Editor</CMSRootPath> |
| | | <OutputPath>$(CMSRootPath)\plugins\cms.plugin.hiawms</OutputPath> |
| | | </PropertyGroup> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 { WorkTask } from '../Models/WorkTask' |
| | | import { ElMessage } from 'element-plus' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { useFile } from './File' |
| | | |
| | | interface CurrentType { |
| | | row: any |
| | | index: number |
| | | } |
| | | export const useWorkTask = (props: any, ctx?: any) => { |
| | | const workTask = injectModel<WorkTask>('workTask') |
| | | const { exportFile } = useFile() |
| | | /** |
| | | * 头é¨é
ç½® |
| | | */ |
| | | const headers = ref({}) |
| | | /** |
| | | * 卿åé
ç½® |
| | | */ |
| | | const workTaskColumns = 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 workTask.cloneData([row.id]) |
| | | // ElMessage.success('åå»ºå¯æ¬æå') |
| | | // tableRef.value?.getList() |
| | | // }, |
| | | // divided: true, |
| | | // icon: 'copy', |
| | | // }, |
| | | { |
| | | label: 'å é¤', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map((item: { son_TaskCode: string }) => item.son_TaskCode) |
| | | ConfirmBox( |
| | | `æ¯å¦å é¤${names.length ? names.join(',') : c.row.son_TaskCode}` |
| | | ).then(async () => { |
| | | const ids = selection.value.map((item: { id: string }) => item.id) |
| | | await workTask.deleteWorkTasks(ids.length ? ids : [c.row.id]) |
| | | ElMessage.success('å 餿å') |
| | | tableRef.value.getList() |
| | | }) |
| | | }, |
| | | icon: 'close', |
| | | }, |
| | | ] |
| | | |
| | | const onCheck = (records: any) => { |
| | | selection.value = records |
| | | } |
| | | |
| | | const onAddWorkTask = () => { |
| | | 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 onConfirmWorkTask = 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/PipeLineLems/workTask/export', data, 'ä½ä¸ä»»å¡') |
| | | } |
| | | |
| | | /** |
| | | * å
³é®åæç´¢ |
| | | */ |
| | | 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, |
| | | workTaskColumns, |
| | | paginationParams, |
| | | headers, |
| | | onBeforeUpload, |
| | | onError, |
| | | onSuccess, |
| | | openDetail, |
| | | onSearch, |
| | | onExport, |
| | | onRowClick, |
| | | onConfirmWorkTask, |
| | | onCheck, |
| | | onAddWorkTask, |
| | | onAdvancedQuery |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { |
| | | ref, |
| | | onMounted, |
| | | reactive, |
| | | computed, |
| | | Ref, |
| | | watch, |
| | | SetupContext, |
| | | h, |
| | | } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WorkTaskDrawer } from '../Models/WorkTaskDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | // å¼å
¥å
Œ
±é项é
ç½® |
| | | import { |
| | | BOOLEAN_OPTIONS_AddEdit |
| | | } from '@/utils/commonOptionConstants'; |
| | | |
| | | export const useWorkTaskDrawer = (props: any, ctx?: any) => { |
| | | const workTaskDrawer = injectModel<WorkTaskDrawer>('workTaskDrawer') |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | 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 inputNumber = (attrs) => { |
| | | return ( |
| | | <el-input-number |
| | | min="1" |
| | | step="1" |
| | | precision="0" |
| | | {...attrs} |
| | | ></el-input-number> |
| | | ) |
| | | } |
| | | |
| | | const dateTimePicker = (attrs) => { |
| | | return ( |
| | | <el-date-picker |
| | | type="datetime" |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | formatValue="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: 'son_TaskCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åä»»å¡ç¼ç ', |
| | | rules: [{required: true, message: 'åä»»å¡ç¼ç ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'ä»»å¡ç¼ç ', |
| | | prop: 'taskCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ä»»å¡ç¼ç ', |
| | | rules: [{required: true, message: 'ä»»å¡ç¼ç ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '计åç¶æ', |
| | | prop: 'workPlanStatus', |
| | | el: 'select', |
| | | clearable:true, |
| | | options: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¡åç¶æ', |
| | | rules: [{required: true, message: '计åç¶æä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'å«æç¶æ', |
| | | prop: 'callMaterialStatus', |
| | | el: 'select', |
| | | clearable:true, |
| | | options: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å«æç¶æ', |
| | | rules: [{required: true, message: 'å«æç¶æä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'åææ è¯', |
| | | prop: 'dataIdentifier', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åææ è¯', |
| | | }, |
| | | { |
| | | label: 'åæåå·', |
| | | prop: 'materialMode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åæåå·', |
| | | }, |
| | | { |
| | | label: 'é¿åº¦(mm)', |
| | | prop: 'length', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥é¿åº¦(mm)', |
| | | rules: [{required: true, message: 'é¿åº¦(mm)ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'æç å
容', |
| | | prop: 'markingContent', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æç å
容', |
| | | }, |
| | | { |
| | | label: 'æç ä½ç½®', |
| | | prop: 'markingPosition', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æç ä½ç½®', |
| | | rules: [{required: true, message: 'æç ä½ç½®ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'åå²ä½ç½®', |
| | | prop: 'cuttingPosition', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åå²ä½ç½®', |
| | | rules: [{required: true, message: 'åå²ä½ç½®ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '管段æ°é', |
| | | prop: 'quantity', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 1, |
| | | precision: 0, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡æ®µæ°é', |
| | | rules: [{required: true, message: '管段æ°éä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'æ³å
°å度(mm)', |
| | | prop: 'flangeThickness', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°å度(mm)', |
| | | rules: [{required: true, message: 'æ³å
°å度(mm)ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'æ³å
°ç´å¾(mm)', |
| | | prop: 'flangeInnerDiameter', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°ç´å¾(mm)', |
| | | rules: [{required: true, message: 'æ³å
°ç´å¾(mm)ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'æ³å
°å
¬ç§°åå', |
| | | prop: 'weldingHeatInput', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°å
¬ç§°åå', |
| | | }, |
| | | { |
| | | label: 'æ³å
°å²ç å
容', |
| | | prop: 'pipeAllowableStress', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°å²ç å
容', |
| | | }, |
| | | { |
| | | label: 'å¥ç®¡é¿åº¦(mm)', |
| | | prop: 'pipeDiameter', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¥ç®¡é¿åº¦(mm)', |
| | | rules: [{required: true, message: 'å¥ç®¡é¿åº¦(mm)ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'å¥ç®¡ç´å¾(mm)', |
| | | prop: 'pipeWallThickness', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¥ç®¡ç´å¾(mm)', |
| | | rules: [{required: true, message: 'å¥ç®¡ç´å¾(mm)ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'å·¥å代ç ', |
| | | prop: 'factoryCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥å代ç ', |
| | | }, |
| | | { |
| | | label: '产å代ç ', |
| | | prop: 'productCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥äº§å代ç ', |
| | | }, |
| | | { |
| | | label: 'å·¥ä½ä»£ç ', |
| | | prop: 'workstationCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥ä½ä»£ç ', |
| | | }, |
| | | { |
| | | label: '设å¤ä»£ç ', |
| | | prop: 'equipmentCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¾å¤ä»£ç ', |
| | | }, |
| | | { |
| | | label: '产线ç¼ç ', |
| | | prop: 'prodLineCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥äº§çº¿ç¼ç ', |
| | | }, |
| | | { |
| | | label: 'è¹å·', |
| | | prop: 'shipNumber', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è¹å·', |
| | | }, |
| | | { |
| | | label: '项ç®å·', |
| | | prop: 'projectNumber', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥é¡¹ç®å·', |
| | | }, |
| | | { |
| | | label: 'å·¥åºåç§°', |
| | | prop: 'processName', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥åºåç§°', |
| | | }, |
| | | { |
| | | label: '管件ç¼ç ', |
| | | prop: 'pipeFittingCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡ä»¶ç¼ç ', |
| | | }, |
| | | { |
| | | label: '顺åºå·', |
| | | prop: 'preSerialNumber', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥é¡ºåºå·', |
| | | }, |
| | | { |
| | | label: '管段ç¼ç ', |
| | | prop: 'pipeSpecCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡æ®µç¼ç ', |
| | | }, |
| | | { |
| | | label: '管段åç§°', |
| | | prop: 'pipeSectionName', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡æ®µåç§°', |
| | | }, |
| | | { |
| | | label: 'å¤å¾(mm)', |
| | | prop: 'outerDiameter', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¤å¾(mm)', |
| | | rules: [{required: true, message: 'å¤å¾(mm)ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'å£å(mm)', |
| | | prop: 'thickness', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å£å(mm)', |
| | | rules: [{required: true, message: 'å£å(mm)ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'æè´¨', |
| | | prop: 'material', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æè´¨', |
| | | }, |
| | | { |
| | | label: 'å·¥èºæµåç¼å·', |
| | | prop: 'processRouteNumber', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥èºæµåç¼å·', |
| | | }, |
| | | { |
| | | label: '计åå¼å§æ¶é´', |
| | | prop: 'plannedStartTime', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(datePicker, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¡åå¼å§æ¶é´', |
| | | }, |
| | | { |
| | | label: '计å宿æ¶é´', |
| | | prop: 'plannedEndTime', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(datePicker, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¡å宿æ¶é´', |
| | | }, |
| | | { |
| | | label: 'çç»ä¿¡æ¯', |
| | | prop: 'teamInfo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥çç»ä¿¡æ¯', |
| | | }, |
| | | { |
| | | label: 'æ¶é´æ³', |
| | | prop: 'timestamp', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ¶é´æ³', |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | 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 = { |
| | | son_TaskCode: formData.value.son_TaskCode, |
| | | taskCode: formData.value.taskCode, |
| | | workPlanStatus: formData.value.workPlanStatus, |
| | | callMaterialStatus: formData.value.callMaterialStatus, |
| | | dataIdentifier: formData.value.dataIdentifier, |
| | | materialMode: formData.value.materialMode, |
| | | length: formData.value.length, |
| | | markingContent: formData.value.markingContent, |
| | | markingPosition: formData.value.markingPosition, |
| | | cuttingPosition: formData.value.cuttingPosition, |
| | | quantity: formData.value.quantity, |
| | | flangeThickness: formData.value.flangeThickness, |
| | | flangeInnerDiameter: formData.value.flangeInnerDiameter, |
| | | weldingHeatInput: formData.value.weldingHeatInput, |
| | | pipeAllowableStress: formData.value.pipeAllowableStress, |
| | | pipeDiameter: formData.value.pipeDiameter, |
| | | pipeWallThickness: formData.value.pipeWallThickness, |
| | | factoryCode: formData.value.factoryCode, |
| | | productCode: formData.value.productCode, |
| | | workstationCode: formData.value.workstationCode, |
| | | equipmentCode: formData.value.equipmentCode, |
| | | prodLineCode: formData.value.prodLineCode, |
| | | shipNumber: formData.value.shipNumber, |
| | | projectNumber: formData.value.projectNumber, |
| | | processName: formData.value.processName, |
| | | pipeFittingCode: formData.value.pipeFittingCode, |
| | | preSerialNumber: formData.value.preSerialNumber, |
| | | pipeSpecCode: formData.value.pipeSpecCode, |
| | | pipeSectionName: formData.value.pipeSectionName, |
| | | outerDiameter: formData.value.outerDiameter, |
| | | thickness: formData.value.thickness, |
| | | material: formData.value.material, |
| | | processRouteNumber: formData.value.processRouteNumber, |
| | | plannedStartTime: formData.value.plannedStartTime, |
| | | plannedEndTime: formData.value.plannedEndTime, |
| | | teamInfo: formData.value.teamInfo, |
| | | timestamp: formData.value.timestamp, |
| | | remark: formData.value.remark, |
| | | } |
| | | if (!current.value) { |
| | | await workTaskDrawer.addWorkTask(data) |
| | | } else { |
| | | const id = current.value.id |
| | | await workTaskDrawer.updateWorkTask(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 () => { |
| | | const workPlanStatusEnumEnum = await workTaskDrawer.getWmsEnumData({ |
| | | EnumName: 'WorkPlanStatusEnum', |
| | | }) |
| | | updateFormItemOptions('workPlanStatus', workPlanStatusEnumEnum) |
| | | const callMaterialStatusEnumEnum = await workTaskDrawer.getWmsEnumData({ |
| | | EnumName: 'CallMaterialStatusEnum', |
| | | }) |
| | | updateFormItemOptions('callMaterialStatus', callMaterialStatusEnumEnum) |
| | | |
| | | } |
| | | commonQueryEnumForFrom() |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | const onOpen = async () => { |
| | | if (current.value) { |
| | | const res = await workTaskDrawer.getWorkTaskDetail(current.value) |
| | | |
| | | formData.value = { |
| | | son_TaskCode: res.son_TaskCode, |
| | | taskCode: res.taskCode, |
| | | workPlanStatus: res.workPlanStatus, |
| | | callMaterialStatus: res.callMaterialStatus, |
| | | dataIdentifier: res.dataIdentifier, |
| | | materialMode: res.materialMode, |
| | | length: res.length, |
| | | markingContent: res.markingContent, |
| | | markingPosition: res.markingPosition, |
| | | cuttingPosition: res.cuttingPosition, |
| | | quantity: res.quantity, |
| | | flangeThickness: res.flangeThickness, |
| | | flangeInnerDiameter: res.flangeInnerDiameter, |
| | | weldingHeatInput: res.weldingHeatInput, |
| | | pipeAllowableStress: res.pipeAllowableStress, |
| | | pipeDiameter: res.pipeDiameter, |
| | | pipeWallThickness: res.pipeWallThickness, |
| | | factoryCode: res.factoryCode, |
| | | productCode: res.productCode, |
| | | workstationCode: res.workstationCode, |
| | | equipmentCode: res.equipmentCode, |
| | | prodLineCode: res.prodLineCode, |
| | | shipNumber: res.shipNumber, |
| | | projectNumber: res.projectNumber, |
| | | processName: res.processName, |
| | | pipeFittingCode: res.pipeFittingCode, |
| | | preSerialNumber: res.preSerialNumber, |
| | | pipeSpecCode: res.pipeSpecCode, |
| | | pipeSectionName: res.pipeSectionName, |
| | | outerDiameter: res.outerDiameter, |
| | | thickness: res.thickness, |
| | | material: res.material, |
| | | processRouteNumber: res.processRouteNumber, |
| | | plannedStartTime: res.plannedStartTime, |
| | | plannedEndTime: res.plannedEndTime, |
| | | teamInfo: res.teamInfo, |
| | | timestamp: res.timestamp, |
| | | remark: res.remark, |
| | | 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 { WorkTaskDrawer } from '../Models/WorkTaskDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | // å¼å
¥å
Œ
±é项é
ç½® |
| | | import { |
| | | FILTER_MODE_OPTIONS_STRING, |
| | | FILTER_MODE_OPTIONS_NUM, |
| | | FILTER_MODE_OPTIONS_BOOL |
| | | } from '@/components/DyFormForHighQuery/DyFormForHighQueryOptions'; |
| | | // å¼å
¥å
Œ
±è¡¨åå·¥å
·æä»¶ |
| | | import { collectFormDataForHighQuery,onResetForHighSelect,onResetForHighQuery } from '@/utils/myformUtils'; |
| | | import { |
| | | BOOLEAN_OPTIONS |
| | | } from '@/utils/commonOptionConstants'; |
| | | |
| | | export const useWorkTaskQueryDrawer = (props: any, ctx?: any) => { |
| | | const workTaskDrawer = injectModel<WorkTaskDrawer>('WorkTaskDrawer') |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | 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: 'son_TaskCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åä»»å¡ç¼ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'son_TaskCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'ä»»å¡ç¼ç ', |
| | | prop: 'taskCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ä»»å¡ç¼ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'taskCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '计åç¶æ', |
| | | prop: 'workPlanStatus', |
| | | el: 'select', |
| | | clearable:true, |
| | | option: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¡åç¶æ', |
| | | highSelectAttrs:{ |
| | | prop: 'workPlanStatus_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_BOOL |
| | | } |
| | | }, |
| | | { |
| | | label: 'å«æç¶æ', |
| | | prop: 'callMaterialStatus', |
| | | el: 'select', |
| | | clearable:true, |
| | | option: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å«æç¶æ', |
| | | highSelectAttrs:{ |
| | | prop: 'callMaterialStatus_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_BOOL |
| | | } |
| | | }, |
| | | { |
| | | label: 'åææ è¯', |
| | | prop: 'dataIdentifier', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åææ è¯', |
| | | highSelectAttrs:{ |
| | | prop: 'dataIdentifier_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'åæåå·', |
| | | prop: 'materialMode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åæåå·', |
| | | highSelectAttrs:{ |
| | | prop: 'materialMode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'é¿åº¦(mm)', |
| | | prop: 'length', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥é¿åº¦(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'length_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'æç å
容', |
| | | prop: 'markingContent', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æç å
容', |
| | | highSelectAttrs:{ |
| | | prop: 'markingContent_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'æç ä½ç½®', |
| | | prop: 'markingPosition', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æç ä½ç½®', |
| | | highSelectAttrs:{ |
| | | prop: 'markingPosition_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'åå²ä½ç½®', |
| | | prop: 'cuttingPosition', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åå²ä½ç½®', |
| | | highSelectAttrs:{ |
| | | prop: 'cuttingPosition_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: '管段æ°é', |
| | | prop: 'quantity', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 1, |
| | | precision: 0, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡æ®µæ°é', |
| | | highSelectAttrs:{ |
| | | prop: 'quantity_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ³å
°å度(mm)', |
| | | prop: 'flangeThickness', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°å度(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'flangeThickness_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ³å
°ç´å¾(mm)', |
| | | prop: 'flangeInnerDiameter', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°ç´å¾(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'flangeInnerDiameter_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ³å
°å
¬ç§°åå', |
| | | prop: 'weldingHeatInput', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°å
¬ç§°åå', |
| | | highSelectAttrs:{ |
| | | prop: 'weldingHeatInput_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ³å
°å²ç å
容', |
| | | prop: 'pipeAllowableStress', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°å²ç å
容', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeAllowableStress_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'å¥ç®¡é¿åº¦(mm)', |
| | | prop: 'pipeDiameter', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¥ç®¡é¿åº¦(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeDiameter_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'å¥ç®¡ç´å¾(mm)', |
| | | prop: 'pipeWallThickness', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¥ç®¡ç´å¾(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeWallThickness_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'å·¥å代ç ', |
| | | prop: 'factoryCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥å代ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'factoryCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '产å代ç ', |
| | | prop: 'productCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥äº§å代ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'productCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'å·¥ä½ä»£ç ', |
| | | prop: 'workstationCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥ä½ä»£ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'workstationCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '设å¤ä»£ç ', |
| | | prop: 'equipmentCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¾å¤ä»£ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'equipmentCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '产线ç¼ç ', |
| | | prop: 'prodLineCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥äº§çº¿ç¼ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'prodLineCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'è¹å·', |
| | | prop: 'shipNumber', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è¹å·', |
| | | highSelectAttrs:{ |
| | | prop: 'shipNumber_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '项ç®å·', |
| | | prop: 'projectNumber', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥é¡¹ç®å·', |
| | | highSelectAttrs:{ |
| | | prop: 'projectNumber_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'å·¥åºåç§°', |
| | | prop: 'processName', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥åºåç§°', |
| | | highSelectAttrs:{ |
| | | prop: 'processName_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '管件ç¼ç ', |
| | | prop: 'pipeFittingCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡ä»¶ç¼ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeFittingCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '顺åºå·', |
| | | prop: 'preSerialNumber', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥é¡ºåºå·', |
| | | highSelectAttrs:{ |
| | | prop: 'preSerialNumber_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '管段ç¼ç ', |
| | | prop: 'pipeSpecCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡æ®µç¼ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeSpecCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '管段åç§°', |
| | | prop: 'pipeSectionName', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡æ®µåç§°', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeSectionName_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'å¤å¾(mm)', |
| | | prop: 'outerDiameter', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¤å¾(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'outerDiameter_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'å£å(mm)', |
| | | prop: 'thickness', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(inputNumber, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | step: 0.01, |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å£å(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'thickness_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'æè´¨', |
| | | prop: 'material', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æè´¨', |
| | | highSelectAttrs:{ |
| | | prop: 'material_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'å·¥èºæµåç¼å·', |
| | | prop: 'processRouteNumber', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥èºæµåç¼å·', |
| | | highSelectAttrs:{ |
| | | prop: 'processRouteNumber_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '计åå¼å§æ¶é´', |
| | | prop: 'plannedStartTime', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(dateTimePickerRange, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¡åå¼å§æ¶é´', |
| | | isDateControl: true, // æ¾å¼æ è®°ä¸ºæ¥ææ§ä»¶ |
| | | }, |
| | | { |
| | | label: '计å宿æ¶é´', |
| | | prop: 'plannedEndTime', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(dateTimePickerRange, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¡å宿æ¶é´', |
| | | isDateControl: true, // æ¾å¼æ è®°ä¸ºæ¥ææ§ä»¶ |
| | | }, |
| | | { |
| | | label: 'çç»ä¿¡æ¯', |
| | | prop: 'teamInfo', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥çç»ä¿¡æ¯', |
| | | highSelectAttrs:{ |
| | | prop: 'teamInfo_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ¶é´æ³', |
| | | prop: 'timestamp', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ¶é´æ³', |
| | | highSelectAttrs:{ |
| | | prop: 'timestamp_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'å建æ¶é´', |
| | | prop: 'creationTime', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(dateTimePickerRange, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å建æ¶é´', |
| | | isDateControl: true, // æ¾å¼æ è®°ä¸ºæ¥ææ§ä»¶ |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹æ¶é´', |
| | | prop: 'lastModificationTime', |
| | | el: (props: any, { attrs }: SetupContext) => { |
| | | return h(dateTimePickerRange, { |
| | | ...props, |
| | | clearable: true, |
| | | ...attrs, |
| | | }) |
| | | }, |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ä¿®æ¹æ¶é´', |
| | | isDateControl: true, // æ¾å¼æ è®°ä¸ºæ¥ææ§ä»¶ |
| | | }, |
| | | { |
| | | label: 'å建人', |
| | | prop: 'creatorName', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å建人', |
| | | highSelectAttrs:{ |
| | | prop: 'creatorName_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹äºº', |
| | | prop: 'lastModifierName', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ä¿®æ¹äºº', |
| | | highSelectAttrs:{ |
| | | prop: 'lastModifierName_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | highSelectAttrs:{ |
| | | prop: 'remark_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | const checkIsEqualObject = () => { |
| | | const data = { |
| | | formData: formData.value, |
| | | } |
| | | const check = isEqual(initiateData.value, data) |
| | | return check |
| | | } |
| | | // /** |
| | | // * è·åè¡¨åæ°æ® - ä¼åç |
| | | // */ |
| | | // const commonGetFormData = () => { |
| | | // const data = {}; |
| | | |
| | | // // éå表åé
ç½®æ¶éæ°æ® |
| | | // formItems.forEach(item => { |
| | | // // æ¶éåºç¡å段 |
| | | // data[item.prop] = formData.value[item.prop] || ''; |
| | | |
| | | // // æ¶éè¿æ»¤æ¨¡å¼å段 |
| | | // if (item.highSelectAttrs && item.highSelectAttrs.prop) { |
| | | // const filterModeProp = item.highSelectAttrs.prop; |
| | | // data[filterModeProp] = formData.value[filterModeProp] || ''; |
| | | // } |
| | | // }); |
| | | |
| | | // return data; |
| | | // } |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | visible.value = false |
| | | const data =collectFormDataForHighQuery(formItems,formData); |
| | | ctx.emit('close', data) |
| | | } |
| | | } |
| | | /** |
| | | * 确认æ¥è¯¢ |
| | | */ |
| | | const onConfirmQuery = async () => { |
| | | const data =collectFormDataForHighQuery(formItems,formData); |
| | | ctx.emit('confirmQuery', data) |
| | | } |
| | | // /** |
| | | // * éç½®å
Œ
±selectæ¥è¯¢ |
| | | // */ |
| | | // const onResetForHighSelect = () => { |
| | | // // éåææè¡¨ååæ®µ |
| | | // formItems.forEach(item => { |
| | | // // æ£æ¥å段æ¯å¦æé«çº§æ¥è¯¢çè¿æ»¤æ¨¡å¼é
ç½® |
| | | // if (item.highSelectAttrs && item.highSelectAttrs.prop) { |
| | | // const filterModeProp = item.highSelectAttrs.prop; |
| | | // const options = item.highSelectAttrs.options || []; |
| | | |
| | | // // 妿åå¨é项ï¼å设置为第ä¸ä¸ªé项çå¼ |
| | | // if (options.length > 0) { |
| | | // // å设éé¡¹æ ¼å¼ä¸º { value, label } æç±»ä¼¼ç»æ |
| | | // const firstValue = options[0].value !== undefined ? options[0].value : options[0]; |
| | | // formData.value[filterModeProp] = firstValue; |
| | | // } |
| | | // } |
| | | // }); |
| | | // } |
| | | /** |
| | | * éç½®æ¥è¯¢ - ä¼åç |
| | | */ |
| | | const onReset = async () => { |
| | | // // 1. æ¸
空ææåºç¡å段ï¼ä¸å
å«è¿æ»¤æ¨¡å¼åæ®µï¼ |
| | | // const baseFields = formItems.reduce((acc, item) => { |
| | | // acc[item.prop] = ''; |
| | | // return acc; |
| | | // }, {}); |
| | | |
| | | // // 2. åºç¨åºç¡å段åå§å¼ |
| | | // formData.value = { ...baseFields }; |
| | | |
| | | onResetForHighQuery(formItems,formData); |
| | | |
| | | // 3. 使ç¨åææ¹æ³éç½®è¿æ»¤æ¨¡å¼å段 |
| | | onResetForHighSelect(formItems,formData); // ä¿çåææ¹æ³è°ç¨ |
| | | |
| | | // 4. åç¶ç»ä»¶åéèªå®ä¹äºä»¶ |
| | | 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 () => { |
| | | const workPlanStatusEnumEnum = await workTaskDrawer.getWmsEnumData({ |
| | | EnumName: 'WorkPlanStatusEnum', |
| | | }) |
| | | updateFormItemOptions('workPlanStatus', workPlanStatusEnumEnum) |
| | | const callMaterialStatusEnumEnum = await workTaskDrawer.getWmsEnumData({ |
| | | EnumName: 'CallMaterialStatusEnum', |
| | | }) |
| | | updateFormItemOptions('callMaterialStatus', callMaterialStatusEnumEnum) |
| | | |
| | | } |
| | | commonQueryEnumForFrom() |
| | | onResetForHighSelect(formItems,formData);//éç½®å
Œ
±selectæ¥è¯¢ |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | 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' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWorkTask = (data: any) => { |
| | | return request.post('/api/v1/PipeLineLems/workTask', data) |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @returns |
| | | */ |
| | | export const deleteWorkTasks = (ids: string[]) => { |
| | | return request({ |
| | | data: ids, |
| | | url: '/api/v1/PipeLineLems/workTask', |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @returns |
| | | */ |
| | | export const cloneData = (data: any) => { |
| | | return request.post('/api/v1/PipeLineLems/workTask/clone', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWorkTask = (data: any) => { |
| | | return request.post('/api/v1/PipeLineLems/workTask', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getWorkTask = (id: string) => { |
| | | return request.get(`/api/v1/PipeLineLems/workTask/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateWorkTask = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/PipeLineLems/workTask/${id}`, data) |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾ |
| | | * @returns |
| | | */ |
| | | export const getWmsEnumData = (data: any) => { |
| | | return request.post('/api/v1/WareCmsUtilityApi/WmsEnum', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWorkTask = (data: any) => { |
| | | return request.post('/api/v1/PipeLineLems/workTask', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getWorkTask = (id: string) => { |
| | | return request.get(`/api/v1/PipeLineLems/workTask/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateWorkTask = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/PipeLineLems/workTask/${id}`, data) |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾ |
| | | * @returns |
| | | */ |
| | | export const getWmsEnumData = (data: any) => { |
| | | return request.post('/api/v1/WareCmsUtilityApi/WmsEnum', data) |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | deleteWorkTasks, |
| | | addWorkTask, |
| | | cloneData, |
| | | } from './Service/WorkTask' |
| | | |
| | | export class WorkTask extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | }) |
| | | } |
| | | onMounted() {} |
| | | /** |
| | | * å é¤ |
| | | * @param id |
| | | * @returns |
| | | */ |
| | | async deleteWorkTasks(ids: string[]) { |
| | | return deleteWorkTasks(ids) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * @param data |
| | | * @returns |
| | | */ |
| | | addWorkTask(data: Record<string, any>) { |
| | | return addWorkTask(data) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @param ids |
| | | * @returns |
| | | */ |
| | | cloneData(ids: string[]) { |
| | | return cloneData(ids) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWorkTask, |
| | | getWorkTask, |
| | | updateWorkTask, |
| | | getWmsEnumData, |
| | | } from './Service/WorkTaskDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WorkTaskDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | workTask: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addWorkTask(data: Record<string, any>) { |
| | | return addWorkTask(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateWorkTask(id: string, data: Record<string, any>) { |
| | | return updateWorkTask(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getWorkTaskDetail(current: any, id?: string) { |
| | | return getWorkTask(id || current?.id) |
| | | } |
| | | |
| | | // è·åæä¸¾å¼ |
| | | async getWmsEnumData(data: Record<string, any>) { |
| | | return getWmsEnumData(data) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWorkTask, |
| | | getWorkTask, |
| | | updateWorkTask, |
| | | getWmsEnumData, |
| | | } from './Service/WorkTaskQueryDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WorkTaskQueryDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | workTask: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addWorkTask(data: Record<string, any>) { |
| | | return addWorkTask(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateWorkTask(id: string, data: Record<string, any>) { |
| | | return updateWorkTask(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getWorkTaskDetail(current: any, id?: string) { |
| | | return getWorkTask(id || current?.id) |
| | | } |
| | | |
| | | // è·åæä¸¾å¼ |
| | | async getWmsEnumData(data: Record<string, any>) { |
| | | return getWmsEnumData(data) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseDrawer from '@/components/BaseDrawer/BaseDrawer' |
| | | import styles from './WorkTaskDrawer.module.scss' |
| | | import { useWorkTaskDrawer } from '../../../../Controllers/WorkTaskDrawer.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, |
| | | } = useWorkTaskDrawer(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 './WorkTaskQueryDrawer.module.scss' |
| | | import { useWorkTaskQueryDrawer } from '../../../../Controllers/WorkTaskQueryDrawer.tsx' |
| | | import DyFormForHighQuery from '@/components/DyFormForHighQuery/DyFormForHighQuery' |
| | | |
| | | // @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, |
| | | } = useWorkTaskQueryDrawer(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} |
| | | > |
| | | <DyFormForHighQuery |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyFormForHighQuery> |
| | | </BaseQueryDrawer> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const columns = [ |
| | | { |
| | | type: 'seq', |
| | | width: 60, |
| | | title: 'åºå·', |
| | | }, |
| | | { |
| | | field: 'son_TaskCode', |
| | | title: 'åä»»å¡ç¼ç ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'taskCode', |
| | | title: 'ä»»å¡ç¼ç ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'workPlanStatusDesc', |
| | | title: '计åç¶æ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'callMaterialStatusDesc', |
| | | 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: 'å·¥å代ç ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'productCode', |
| | | title: '产å代ç ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'workstationCode', |
| | | title: 'å·¥ä½ä»£ç ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'equipmentCode', |
| | | title: '设å¤ä»£ç ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'prodLineCode', |
| | | title: '产线ç¼ç ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'shipNumber', |
| | | title: 'è¹å·', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'projectNumber', |
| | | title: '项ç®å·', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'processName', |
| | | title: 'å·¥åºåç§°', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'pipeFittingCode', |
| | | title: '管件ç¼ç ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'preSerialNumber', |
| | | title: '顺åºå·', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'pipeSpecCode', |
| | | title: '管段ç¼ç ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'pipeSectionName', |
| | | title: '管段åç§°', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'outerDiameter', |
| | | title: 'å¤å¾(mm)', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'thickness', |
| | | title: 'å£å(mm)', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'material', |
| | | title: 'æè´¨', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'processRouteNumber', |
| | | 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: 'å建æ¶é´', |
| | | width:180, |
| | | }, |
| | | { |
| | | field: 'lastModificationTime', |
| | | title: 'ä¿®æ¹æ¶é´', |
| | | width:180, |
| | | }, |
| | | { |
| | | field: 'creatorName', |
| | | title: 'å建人', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'lastModifierName', |
| | | title: 'ä¿®æ¹äºº', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '夿³¨', |
| | | width:160, |
| | | }, |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .workTaskContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .workTaskList { |
| | | 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%; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { computed, defineComponent, onMounted, reactive, ref } from 'vue' |
| | | import type { Ref } from 'vue' |
| | | import BaseTable from '@/components/Table/Table' |
| | | import styles from './WorkTask.module.scss' |
| | | import { useWorkTask } from '../../../Controllers/WorkTask' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import WorkTaskDrawer from '../Dialog/WorkTaskDrawer/WorkTaskDrawer' |
| | | import WorkTaskQueryDrawer from '../Dialog/WorkTaskQueryDrawer/WorkTaskQueryDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | | import { vPermission } from '@/libs/Permission/Permission' |
| | | import dayjs from 'dayjs' |
| | | import { |
| | | getWmsEnumData |
| | | } from '@/widgets/WorkTask/Models/Service/WorkTaskDrawer' |
| | | import { |
| | | ElInput, |
| | | ElSelect, |
| | | ElOption, |
| | | ElDatePicker, |
| | | ElForm, |
| | | ElFormItem, |
| | | } from 'element-plus' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | // å¼å
¥å
Œ
±é项é
ç½® |
| | | import { |
| | | FILTER_MODE_OPTIONS_STRING |
| | | } from '@/components/DyFormForHighQuery/DyFormForHighQueryOptions'; |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | | dataSource: Ref<any[]> |
| | | isDrag?: boolean |
| | | isChecked?: boolean |
| | | isHidePagination?: boolean |
| | | params?: Record<string, any> |
| | | autoHeight?: boolean |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'WorkTask', |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | | setup(props, ctx) { |
| | | const { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | dialogConfigForQuery, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | headers, |
| | | onError, |
| | | onSearch, |
| | | onRowClick, |
| | | onConfirmWorkTask, |
| | | onCheck, |
| | | onAddWorkTask, |
| | | onAdvancedQuery, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useWorkTask(props, ctx) |
| | | |
| | | //å®ä¹é«çº§æ¥è¯¢å¼ç¨ |
| | | const workTaskQueryDrawerRef=ref(null); |
| | | // æ°å¢çæ¥è¯¢æ¡ä»¶ |
| | | const queryForm = ref({ |
| | | searchVal: '', |
| | | str_searchFormInputAttrs:[], |
| | | searchVal_FilterMode:'' |
| | | }) |
| | | //å®ä¹æ´ä½æ¨¡ç³æ¥è¯¢çåæ°ç»(注æï¼å¿
须大å°åè·å端çå®ä½ç±»å±æ§åä¸è´ï¼å¦åä¼å¯¼è´å¹é
ä¸å¯¹çé®é¢) |
| | | const _searchFormInputAttrs = ref([ |
| | | 'Son_TaskCode','TaskCode','DataIdentifier','MaterialMode','MarkingContent','WeldingHeatInput','PipeAllowableStress','FactoryCode','ProductCode','WorkstationCode','EquipmentCode','ProdLineCode','ShipNumber','ProjectNumber','ProcessName','PipeFittingCode','PreSerialNumber','PipeSpecCode','PipeSectionName','Material','ProcessRouteNumber','TeamInfo','Timestamp','CreatorName','LastModifierName','Remark' |
| | | ]); |
| | | const searchFormInputAttrs_Placeholder = ref('请è¾å
¥åä»»å¡ç¼ç /ä»»å¡ç¼ç /åææ è¯/åæåå·/æç å
容/æ³å
°å
¬ç§°åå/æ³å
°å²ç å
容/å·¥å代ç /产å代ç /å·¥ä½ä»£ç /设å¤ä»£ç /产线ç¼ç /è¹å·/项ç®å·/å·¥åºåç§°/管件ç¼ç /顺åºå·/管段ç¼ç /管段åç§°/æè´¨/å·¥èºæµåç¼å·/çç»ä¿¡æ¯/æ¶é´æ³/å建人/ä¿®æ¹äºº/夿³¨'); |
| | | |
| | | |
| | | // 卿æä¸¾é项 |
| | | const enumOptions = reactive({ |
| | | workPlanStatus: [] as Array<{label: string; value: any }>, |
| | | callMaterialStatus: [] as Array<{label: string; value: any }>, |
| | | }) |
| | | |
| | | // è·åæä¸¾æ°æ® |
| | | const fetchEnumData = async () => { |
| | | try { |
| | | const workPlanStatusEnumData = await getWmsEnumData({ |
| | | EnumName: 'WorkPlanStatusEnum', |
| | | }) |
| | | enumOptions.workPlanStatus = workPlanStatusEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | const callMaterialStatusEnumData = await getWmsEnumData({ |
| | | EnumName: 'CallMaterialStatusEnum', |
| | | }) |
| | | enumOptions.callMaterialStatus = callMaterialStatusEnumData.map((item) => ({ |
| | | label: item.description, |
| | | value: item.value, |
| | | })) |
| | | |
| | | } catch (error) { |
| | | console.error('è·åæä¸¾æ°æ®å¤±è´¥:', error) |
| | | } |
| | | } |
| | | |
| | | // å®ä¹ååºå¼æ¥è¯¢æ°æ® |
| | | const _curHighQueryData = ref({ searchVal: '',str_searchFormInputAttrs:[],searchVal_FilterMode:'' }); |
| | | // ç»ä»¶æè½½æ¶è·åæä¸¾æ°æ® |
| | | onMounted(() => { |
| | | fetchEnumData() |
| | | queryForm.value.searchVal_FilterMode = FILTER_MODE_OPTIONS_STRING[0]?.value || ''; |
| | | _curHighQueryData.value.searchVal_FilterMode = queryForm.value.searchVal_FilterMode; |
| | | _curHighQueryData.value.str_searchFormInputAttrs = _searchFormInputAttrs.value; |
| | | }) |
| | | |
| | | // æ°ççæ¥è¯¢æ¹æ³ï¼ä¸»é¡µé¢ä¸çæé®ãæ¥è¯¢ãï¼ |
| | | const handleQueryForMain = async () => { |
| | | _curHighQueryData.value.searchVal = queryForm.value.searchVal; |
| | | _curHighQueryData.value.searchVal_FilterMode = queryForm.value.searchVal_FilterMode; |
| | | _curHighQueryData.value.str_searchFormInputAttrs = _searchFormInputAttrs.value; |
| | | tableRef.value.getList(_curHighQueryData.value) |
| | | } |
| | | // æ°ççæ¥è¯¢æ¹æ³ï¼é«çº§æ¥è¯¢ä¸çæé®ãæ¥è¯¢ãï¼ |
| | | const handleQuery = async (extraParams = {}) => { |
| | | let filteredData = commonGetHighQueryForm(extraParams); |
| | | commonSaveCurHighQueryData(filteredData); |
| | | tableRef.value.getList(filteredData) |
| | | } |
| | | // æ°ççæ¥è¯¢éç½® |
| | | const resetQuery = () => { |
| | | queryForm.value.searchVal = '' |
| | | queryForm.value.searchVal_FilterMode = FILTER_MODE_OPTIONS_STRING[0]?.value || ''; |
| | | queryForm.value.str_searchFormInputAttrs=_searchFormInputAttrs.value; |
| | | } |
| | | //æ°ççå¯¼åºæ¹æ³ |
| | | const handleExport=()=>{ |
| | | onExport(_curHighQueryData.value); |
| | | } |
| | | // æ°ççæ¥è¯¢å¼¹åºæ¡å
³éæ¹æ³ |
| | | const closeQuery = (extraParams={}) => { |
| | | let filteredData = commonGetHighQueryForm(extraParams); |
| | | console.log("closeQueryæ¹æ³"); |
| | | console.log(filteredData); |
| | | commonSaveCurHighQueryData(filteredData); |
| | | } |
| | | //ä¿åæ¥è¯¢å¼ |
| | | const commonSaveCurHighQueryData=(filteredData={})=>{ |
| | | _curHighQueryData.value = { ..._curHighQueryData.value, ...filteredData }; |
| | | _curHighQueryData.value.searchVal = queryForm.value.searchVal |
| | | _curHighQueryData.value.searchVal_FilterMode = queryForm.value.searchVal_FilterMode |
| | | _curHighQueryData.value.str_searchFormInputAttrs =_searchFormInputAttrs.value; |
| | | } |
| | | //è·åé«çº§æ¥è¯¢å¼¹åºæ¡çæ¥è¯¢å¼ |
| | | const commonGetHighQueryForm=(extraParams={})=>{ |
| | | // è¿æ»¤æ undefined çå¼ |
| | | let filteredData = Object.assign( |
| | | {}, |
| | | ...Object.entries(extraParams).map(([key, value]) => |
| | | value !== undefined ? { [key]: value } : {} |
| | | ) |
| | | ) |
| | | //ç»åæ¨¡ç³æ¥è¯¢ |
| | | filteredData.searchVal = queryForm.value.searchVal |
| | | filteredData.searchVal_FilterMode = queryForm.value.searchVal_FilterMode |
| | | filteredData.str_searchFormInputAttrs =_searchFormInputAttrs.value; |
| | | return filteredData; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @returns è¡¨æ ¼ |
| | | */ |
| | | const RenderBaseTable = (props: RenderTableType) => { |
| | | const { |
| | | url, |
| | | dataSource, |
| | | isDrag, |
| | | isChecked, |
| | | isHidePagination, |
| | | params, |
| | | autoHeight, |
| | | } = 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} |
| | | 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 ( |
| | | <div class={styles.workTaskContent}> |
| | | {/* æ·»å /ç¼è¾ */} |
| | | <WorkTaskDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmWorkTask} |
| | | /> |
| | | {/* é«çº§æ¥è¯¢ */} |
| | | <WorkTaskQueryDrawer |
| | | ref="workTaskQueryDrawerRef" |
| | | v-model={dialogConfigForQuery.visible} |
| | | title={dialogConfigForQuery.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirmQuery={handleQuery} |
| | | onRestQuery={resetQuery} |
| | | onClose={closeQuery} |
| | | /> |
| | | |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="workTask-add" |
| | | icon="add-p" |
| | | onClick={onAddWorkTask} |
| | | type="primary" |
| | | > |
| | | æ·»å |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | |
| | | <el-upload |
| | | v-permission="workTask-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | | show-file-list={false} |
| | | onError={onError} |
| | | onSuccess={onSuccess} |
| | | before-upload={onBeforeUpload} |
| | | headers={headers.value} |
| | | action="/api/v1/PipeLineLems/workTask/import" |
| | | > |
| | | <IconButton icon="in">导å
¥</IconButton> |
| | | </el-upload> |
| | | |
| | | <IconButton |
| | | v-permission="workTask-output" |
| | | icon="out" |
| | | onClick={handleExport} |
| | | > |
| | | å¯¼åº |
| | | </IconButton> |
| | | </div> |
| | | <ElFormItem style={{ marginTop: '15px' }}> |
| | | <ElFormItem label="å
³é®å"> |
| | | <el-tooltip |
| | | class="box-item" |
| | | effect="dark" |
| | | content={searchFormInputAttrs_Placeholder.value} |
| | | placement="top-start" |
| | | > |
| | | <ElInput |
| | | v-model={queryForm.value.searchVal} |
| | | placeholder={searchFormInputAttrs_Placeholder.value} |
| | | clearable |
| | | class={styles.formItem} |
| | | /> |
| | | </el-tooltip> |
| | | </ElFormItem> |
| | | <ElFormItem label="" style="width:100px;"> |
| | | <ElSelect |
| | | v-model={queryForm.value.searchVal_FilterMode} |
| | | placeholder="è¯·éæ©" |
| | | class={styles.formItem} |
| | | > |
| | | {FILTER_MODE_OPTIONS_STRING.map((option) => ( |
| | | <ElOption |
| | | key={option.value} |
| | | label={option.label} |
| | | value={option.value} |
| | | /> |
| | | ))} |
| | | </ElSelect> |
| | | </ElFormItem> |
| | | <IconButton type="primary" icon="search" onClick={handleQueryForMain}> |
| | | æ¥è¯¢ |
| | | </IconButton> |
| | | {/* <IconButton style="" icon="refresh" onClick={resetQuery}> |
| | | éç½® |
| | | </IconButton> */} |
| | | <IconButton |
| | | v-permission="workTask-add" |
| | | icon="search" |
| | | onClick={onAdvancedQuery} |
| | | type="primary" |
| | | > |
| | | é«çº§æ¥è¯¢ |
| | | </IconButton> |
| | | </ElFormItem> |
| | | </div> |
| | | |
| | | <RenderBaseTable |
| | | url="/api/v1/PipeLineLems/workTask/page" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |
| | | /> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .WorkTask { |
| | | 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 './WorkTask.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: 'WorkTask', label: 'ä½ä¸ä»»å¡' }] |
| | | |
| | | export default defineComponent({ |
| | | name: 'WorkTask', |
| | | |
| | | 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 WorkTask = markRaw(module.default) |
| | | const foundLabel = |
| | | nameToLabelMap.find((item) => item.name === name)?.label || name |
| | | tabData.value.push({ |
| | | label: foundLabel, |
| | | name, |
| | | component: WorkTask, |
| | | }) |
| | | } |
| | | } |
| | | |
| | | initTableData() |
| | | |
| | | return () => { |
| | | return ( |
| | | <div class={styles.WorkTask}> |
| | | <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['WorkTask'] = r)} |
| | | ></Widget> |
| | | </TabPane> |
| | | ) |
| | | })} |
| | | </Tab> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "WorkTask" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export interface TabType { |
| | | label: string |
| | | name: string |
| | | columns?: any[] |
| | | data?: any[] |
| | | isFooter: boolean |
| | | [key: string]: any |
| | | } |
| | | |
| | | export const permissionCodes = { |
| | | 'workTask-list': 'å表-å表', |
| | | 'workTask-add': 'å表-æ·»å ', |
| | | 'workTask-import': 'å表-导å
¥', |
| | | 'workTask-output': 'å表-è¾åº', |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import WorkTask from './Views/WorkTask' |
| | | import Setting from '@/components/Setting/Setting' |
| | | import { provider } from '@/provider/index' |
| | | import p from '../../assets/svg/p.svg' |
| | | |
| | | export default { |
| | | is: 'WorkTask', |
| | | name: 'ä½ä¸ä»»å¡', |
| | | category: 'run', |
| | | icon: p, |
| | | authorizationRequired: false, |
| | | canvasView: provider(WorkTask), |
| | | settingsView: Setting, |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Component } from 'vue' |
| | | |
| | | export interface DataItemType { |
| | | id?: string |
| | | name?: string |
| | | code?: string |
| | | description?: string |
| | | label?: string |
| | | value?: string | number |
| | | } |
| | | |
| | | export interface WorkTaskBaseType { |
| | | 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 |
| | | } |
| | |
| | | using CMS.Plugin.OrderManagement.Abstractions.Models; |
| | | using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.CallMaterialOrder; |
| | | using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.WorkPlan; |
| | | using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.WorkTask; |
| | | using CMS.Plugin.PipeLineLems.Application.Contracts.Services; |
| | | using CMS.Plugin.PipeLineLems.Domain.CallMaterialOrder; |
| | | using CMS.Plugin.PipeLineLems.Domain.CallMaterialOrderRecord; |
| | |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Newtonsoft.Json; |
| | | using Volo.Abp; |
| | | using Volo.Abp.ObjectMapping; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.PipeLineLems.Application.Implements; |
| | |
| | | //TODO:è¿éè°ç¨wmsç嫿æ¥å£ |
| | | try |
| | | { |
| | | //é¦å
夿åºåæ¯å¦åå¨ |
| | | var dto = await IsExistInWms(input.PipeSpecCode); |
| | | if (dto != null) |
| | | { |
| | | throw new UserFriendlyException($"å·²ç»åæ£è¿ï¼åºåå¨åºä½{dto.PlaceNo},æçå·{dto.ContainerNo}"); |
| | | } |
| | | |
| | | |
| | | WmsMaterialStockCreateDto param = new WmsMaterialStockCreateDto() |
| | | { |
| | | ContainerNo = input.ContinerNo, |
| | |
| | | }; |
| | | return response; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å建ä½ä¸è®¡å |
| | | /// </summary> |
| | |
| | | /// <param name="workPlanAppService"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="UserFriendlyException"></exception> |
| | | |
| | | public async Task<MesOrderResponse> CommonCreatebyApsAsync(List<WorkPlanInput> input, IServiceProvider _serviceProvider, |
| | | WorkPlanAppService workPlanAppService, |
| | | string userId, string userAccount |
| | |
| | | var orderManager = _serviceProvider.GetRequiredService<IOrderManager>(); |
| | | var productProvider = _serviceProvider.GetRequiredService<IProductProvider>(); |
| | | var formulaProvider = _serviceProvider.GetRequiredService<IFormulaProvider>(); |
| | | |
| | | var workTaskAppService = _serviceProvider.GetRequiredService<IWorkTaskAppService>(); |
| | | |
| | | List<OrderModel> orderModels = new List<OrderModel>(); |
| | | |
| | |
| | | insertObj.CreatorName = userAccount; |
| | | insertObj.Remark = "ç³»ç»å¯¼å
¥"; |
| | | await workPlanAppService.CreateAsync(insertObj); |
| | | |
| | | //å¢å æ°å¢è®¡åä»»å¡è¡¨æ°æ® ãEditby shaocx,2025-05-20ã |
| | | var org_insertTaskObj = ObjectMapper.Map<WorkPlanCreateDto, WorkTaskCreateDto>(insertObj); |
| | | org_insertTaskObj.Son_TaskCode = insertObj.TaskCode; |
| | | await workTaskAppService.CreateAsync(org_insertTaskObj); |
| | | if (insertObj.ProcessName == "åå²å·¥åº") |
| | | {//æ°å»º åæ£å·¥åº |
| | | var insertTaskObj = ObjectMapper.Map<WorkPlanCreateDto, WorkTaskCreateDto>(insertObj); |
| | | insertTaskObj.Son_TaskCode = insertObj.TaskCode + "_1"; |
| | | insertTaskObj.ProcessName = "忣工åº"; |
| | | await workTaskAppService.CreateAsync(insertTaskObj); |
| | | } |
| | | else if (insertObj.ProcessName == "è£
é
å·¥åº") |
| | | {//æ°å»º æ³å
°å²ç å·¥åº(å¤ä¸ª) |
| | | //ç®åææ¶ææä¸ä¸ªæ³å
° |
| | | var insertTaskObj = ObjectMapper.Map<WorkPlanCreateDto, WorkTaskCreateDto>(insertObj); |
| | | insertTaskObj.Son_TaskCode = insertObj.TaskCode + "_1"; |
| | | insertTaskObj.ProcessName = "æ³å
°å²ç å·¥åº"; |
| | | await workTaskAppService.CreateAsync(insertTaskObj); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | await uow.CompleteAsync(); |
| | | } |
| | | catch (Exception) |
| | | catch (Exception ex) |
| | | { |
| | | await uow.RollbackAsync(); |
| | | throw; |
| | | throw ex; |
| | | } |
| | | finally |
| | | { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 管段ç¼ç æ¯å¦åå¨åºåä¸ |
| | | /// </summary> |
| | | /// <param name="pipeSpecCode"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="UserFriendlyException"></exception> |
| | | public async Task<WmsMaterialStockDto> IsExistInWms(string pipeSpecCode) |
| | | { |
| | | //TODO:è¿éè°ç¨wmsçåºåæ¥è¯¢æ¥å£ |
| | | try |
| | | { |
| | | GetWmsMaterialStockInput param = new GetWmsMaterialStockInput() |
| | | { |
| | | RedundantField2 = pipeSpecCode, |
| | | RedundantField2_FilterMode = SearchFilterModeEnum.ç²¾åæ¥è¯¢ |
| | | }; |
| | | |
| | | string baseUrl = @"http://127.0.0.1:18000/api/v1/HIAWms/"; |
| | | string url = baseUrl + "LMesOperate/FindListByFilter"; |
| | | string json = JsonConvert.SerializeObject(param); |
| | | var result = HttpApiRequest.HttpPost(url, json); |
| | | var res = JsonConvert.DeserializeObject<CmsApiResponse<List<WmsMaterialStockDto>>>(result); |
| | | if (res.Code == 200) |
| | | { |
| | | var retData = res.Data as List<WmsMaterialStockDto>; |
| | | if (retData?.Count > 0) |
| | | { |
| | | return retData.First(); |
| | | } |
| | | return null; |
| | | |
| | | } |
| | | else |
| | | { |
| | | throw new UserFriendlyException(res.Message); |
| | | }; |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | throw; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// çæéæºçWmsTaskNo |
| | | /// </summary> |
| | | /// <returns>éæºçæçä»»å¡ç¼å·</returns> |
| | |
| | | |
| | | builder.ConfigureMyTestEntityName(); |
| | | builder.ConfigureWorkPlan(); |
| | | builder.ConfigureWorkTask(); |
| | | builder.ConfigureCallMaterialOrder(); |
| | | builder.ConfigureCallMaterialOrderRecord(); |
| | | |
| | |
| | | .HasColumnType("varchar(64)") |
| | | .HasComment("ä¿®æ¹äºº"); |
| | | |
| | | b.Property<string>("MaterialBatch") |
| | | .HasColumnType("longtext"); |
| | | |
| | | b.Property<string>("MaterialMode") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId") |
| | | .HasComment("ä¿®æ¹äººID"); |
| | | |
| | | b.Property<string>("MaterialBatch") |
| | | .HasColumnType("longtext"); |
| | | |
| | | b.Property<string>("MaterialMode") |
| | | .HasMaxLength(256) |
| | |
| | | |
| | | b.HasComment("ä½ä¸è®¡å表"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.PipeLineLems.Domain.WorkTask.WorkTask", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<int>("CallMaterialStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("å«æç¶æ"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp") |
| | | .HasComment("å¹¶åæ³"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime") |
| | | .HasComment("å建æ¶é´"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasMaxLength(36) |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId") |
| | | .HasComment("å建人ID"); |
| | | |
| | | b.Property<string>("CreatorName") |
| | | .HasMaxLength(64) |
| | | .HasColumnType("varchar(64)") |
| | | .HasComment("å建人"); |
| | | |
| | | b.Property<decimal>("CuttingPosition") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("åå²ä½ç½®"); |
| | | |
| | | b.Property<string>("DataIdentifier") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("åææ è¯"); |
| | | |
| | | b.Property<string>("DeleteRemark") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("å é¤å¤æ³¨"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasMaxLength(36) |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId") |
| | | .HasComment("å é¤äººID"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime") |
| | | .HasComment("å 餿¶é´"); |
| | | |
| | | b.Property<string>("EquipmentCode") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("设å¤ä»£ç "); |
| | | |
| | | b.Property<string>("ExtraField1") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("æ©å±å段1"); |
| | | |
| | | b.Property<string>("ExtraField2") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("æ©å±å段2"); |
| | | |
| | | b.Property<string>("ExtraField3") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("æ©å±å段3"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties") |
| | | .HasComment("æ©å±å±æ§"); |
| | | |
| | | b.Property<string>("FactoryCode") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("å·¥å代ç "); |
| | | |
| | | b.Property<decimal>("FlangeInnerDiameter") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("æ³å
°ç´å¾(mm)"); |
| | | |
| | | b.Property<decimal>("FlangeThickness") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("æ³å
°å度(mm)"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted") |
| | | .HasComment("æ¯å¦å é¤"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime") |
| | | .HasComment("ä¿®æ¹æ¶é´"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasMaxLength(36) |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId") |
| | | .HasComment("ä¿®æ¹äººID"); |
| | | |
| | | b.Property<string>("LastModifierName") |
| | | .HasMaxLength(64) |
| | | .HasColumnType("varchar(64)") |
| | | .HasComment("ä¿®æ¹äºº"); |
| | | |
| | | b.Property<decimal>("Length") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("é¿åº¦(mm)"); |
| | | |
| | | b.Property<string>("MarkingContent") |
| | | .HasMaxLength(1024) |
| | | .HasColumnType("varchar(1024)") |
| | | .HasComment("æç å
容"); |
| | | |
| | | b.Property<decimal>("MarkingPosition") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("æç ä½ç½®"); |
| | | |
| | | b.Property<string>("Material") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("æè´¨"); |
| | | |
| | | b.Property<string>("MaterialMode") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("åæåå·"); |
| | | |
| | | b.Property<string>("OperationRemark") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("æä½å¤æ³¨"); |
| | | |
| | | b.Property<decimal>("OuterDiameter") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("å¤å¾(mm)"); |
| | | |
| | | b.Property<string>("PipeAllowableStress") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("æ³å
°å²ç å
容"); |
| | | |
| | | b.Property<decimal>("PipeDiameter") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("å¥ç®¡é¿åº¦(mm)"); |
| | | |
| | | b.Property<string>("PipeFittingCode") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("管件ç¼ç "); |
| | | |
| | | b.Property<string>("PipeSectionName") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("管段åç§°"); |
| | | |
| | | b.Property<string>("PipeSpecCode") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("管段ç¼ç "); |
| | | |
| | | b.Property<decimal>("PipeWallThickness") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("å¥ç®¡ç´å¾(mm)"); |
| | | |
| | | b.Property<DateTime?>("PlannedEndTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasComment("计å宿æ¶é´"); |
| | | |
| | | b.Property<DateTime?>("PlannedStartTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasComment("计åå¼å§æ¶é´"); |
| | | |
| | | b.Property<string>("PreSerialNumber") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("顺åºå·"); |
| | | |
| | | b.Property<string>("ProcessName") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("å·¥åºåç§°"); |
| | | |
| | | b.Property<string>("ProcessRouteNumber") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("å·¥èºæµåç¼å·"); |
| | | |
| | | b.Property<string>("ProdLineCode") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("产线ç¼ç "); |
| | | |
| | | b.Property<string>("ProductCode") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("产å代ç "); |
| | | |
| | | b.Property<string>("ProjectNumber") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("项ç®å·"); |
| | | |
| | | b.Property<int>("Quantity") |
| | | .HasColumnType("int") |
| | | .HasComment("管段æ°é"); |
| | | |
| | | b.Property<string>("Remark") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<string>("ShipNumber") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("è¹å·"); |
| | | |
| | | b.Property<string>("Son_TaskCode") |
| | | .IsRequired() |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("åä»»å¡ç¼ç "); |
| | | |
| | | b.Property<int>("Sort") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("int") |
| | | .HasDefaultValue(0) |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("TaskCode") |
| | | .IsRequired() |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("ä»»å¡ç¼ç "); |
| | | |
| | | b.Property<string>("TeamInfo") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("çç»ä¿¡æ¯"); |
| | | |
| | | b.Property<decimal>("Thickness") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("å£å(mm)"); |
| | | |
| | | b.Property<string>("Timestamp") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("æ¶é´æ³"); |
| | | |
| | | b.Property<string>("WeldingHeatInput") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("æ³å
°å
¬ç§°åå"); |
| | | |
| | | b.Property<int>("WorkPlanStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("计åç¶æ"); |
| | | |
| | | b.Property<string>("WorkstationCode") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("å·¥ä½ä»£ç "); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("DataIdentifier"); |
| | | |
| | | b.HasIndex("PlannedEndTime"); |
| | | |
| | | b.HasIndex("PlannedStartTime"); |
| | | |
| | | b.HasIndex("Son_TaskCode") |
| | | .IsUnique(); |
| | | |
| | | b.ToTable("scms_worktasks", (string)null); |
| | | |
| | | b.HasComment("ä½ä¸ä»»å¡è¡¨"); |
| | | }); |
| | | #pragma warning restore 612, 618 |
| | | } |
| | | } |
| | |
| | | cd ../ |
| | | ::dotnet ef migrations add InitialCreate -c CMSPluginDbContext -o Migrations |
| | | dotnet ef migrations add Update1 -c CMSPluginDbContext -o Migrations |
| | | dotnet ef migrations add Update2 -c CMSPluginDbContext -o Migrations |
| | | ::dotnet ef migrations add Update2 -c CMSPluginDbContext -o Migrations |
| | | ::dotnet ef migrations add Update3 -c CMSPluginDbContext -o Migrations |
| | | cmd |
| | |
| | | FILTER_MODE_OPTIONS_NUM, |
| | | FILTER_MODE_OPTIONS_BOOL |
| | | } from '@/components/DyFormForHighQuery/DyFormForHighQueryOptions'; |
| | | // å¼å
¥å
Œ
±è¡¨åå·¥å
·æä»¶ |
| | | import { collectFormDataForHighQuery,onResetForHighSelect,onResetForHighQuery } from '@/utils/myformUtils'; |
| | | import { |
| | | BOOLEAN_OPTIONS |
| | | } from '@/utils/commonOptionConstants'; |
| | |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | visible.value = false |
| | | const data =commonGetFormData(); |
| | | const data =collectFormDataForHighQuery(formItems,formData); |
| | | ctx.emit('close', data) |
| | | } |
| | | } |
| | |
| | | * 确认æ¥è¯¢ |
| | | */ |
| | | const onConfirmQuery = async () => { |
| | | const data =commonGetFormData(); |
| | | const data =collectFormDataForHighQuery(formItems,formData); |
| | | ctx.emit('confirmQuery', data) |
| | | } |
| | | /** |
| | | * éç½®å
Œ
±selectæ¥è¯¢ |
| | | */ |
| | | const onResetForHighSelect = () => { |
| | | // éåææè¡¨ååæ®µ |
| | | formItems.forEach(item => { |
| | | // æ£æ¥å段æ¯å¦æé«çº§æ¥è¯¢çè¿æ»¤æ¨¡å¼é
ç½® |
| | | if (item.highSelectAttrs && item.highSelectAttrs.prop) { |
| | | const filterModeProp = item.highSelectAttrs.prop; |
| | | const options = item.highSelectAttrs.options || []; |
| | | |
| | | // 妿åå¨é项ï¼å设置为第ä¸ä¸ªé项çå¼ |
| | | if (options.length > 0) { |
| | | // å设éé¡¹æ ¼å¼ä¸º { value, label } æç±»ä¼¼ç»æ |
| | | const firstValue = options[0].value !== undefined ? options[0].value : options[0]; |
| | | formData.value[filterModeProp] = firstValue; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | /** |
| | | * éç½®æ¥è¯¢ - ä¼åç |
| | | */ |
| | | const onReset = async () => { |
| | | // 1. æ¸
空ææåºç¡å段ï¼ä¸å
å«è¿æ»¤æ¨¡å¼åæ®µï¼ |
| | | const baseFields = formItems.reduce((acc, item) => { |
| | | acc[item.prop] = ''; |
| | | return acc; |
| | | }, {}); |
| | | // 1. æ¸
空ææåºç¡å段ï¼ä¸å
å«è¿æ»¤æ¨¡å¼å段ï¼,åºç¨åºç¡å段åå§å¼ |
| | | onResetForHighQuery(formItems,formData); |
| | | |
| | | // 2. åºç¨åºç¡å段åå§å¼ |
| | | formData.value = { ...baseFields }; |
| | | // 2. 使ç¨åææ¹æ³éç½®è¿æ»¤æ¨¡å¼å段 |
| | | onResetForHighSelect(); |
| | | |
| | | // 3. 使ç¨åææ¹æ³éç½®è¿æ»¤æ¨¡å¼å段 |
| | | onResetForHighSelect(); // ä¿çåææ¹æ³è°ç¨ |
| | | |
| | | // 4. åç¶ç»ä»¶åéèªå®ä¹äºä»¶ |
| | | // 3. åç¶ç»ä»¶åéèªå®ä¹äºä»¶ |
| | | ctx.emit('restQuery'); |
| | | } |
| | | |