Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { VNode, Component, DefineComponent } from 'vue' |
| | | |
| | | export interface OptionItemType { |
| | | label?: string |
| | | description?: string |
| | | name?: string |
| | | value: string | number |
| | | } |
| | | |
| | | export interface FormItemPropType { |
| | | prop?: string | Ref<string> |
| | | highSelectProp?: string | Ref<string> |
| | | label?: String | Ref<string> |
| | | rules?: any[] | Ref<any[]> |
| | | disabled?: boolean | Ref<boolean> |
| | | isDateControl?: boolean | Ref<boolean> |
| | | placeholder?: string | Ref<string> |
| | | type?: string | Ref<string> |
| | | width?: string | Ref<string> |
| | | el?: string | Component | DefineComponent | Ref<string> |
| | | options?: OptionItemType[] | any[] | Ref<any> |
| | | highSelectAttrs?: object | Ref<object> |
| | | isTitle?: boolean |
| | | title?:string | Component |
| | | [key: string]: any | Ref<string> |
| | | } |
| | | |
| | | export interface FormPropsType { |
| | | formData: { [key: string]: any } |
| | | formItemProps: FormItemPropType[] |
| | | [key: string]: any |
| | | } |
| | | |
| | | export interface PropsType { |
| | | formItemProps: FormItemPropType[] |
| | | formData: { [key: string]: any } |
| | | labelWidth: string |
| | | [key: string]: any |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .formStyle { |
| | | .formItem { |
| | | // ç§»é¤åºå®å®½åº¦éå¶ |
| | | width: auto !important; |
| | | margin-right: 0 !important; |
| | | } |
| | | |
| | | .formControl { |
| | | flex: 1; // 让æ§ä»¶å æ®å©ä½ç©ºé´ |
| | | min-width: 0; // å
许æ§ä»¶æ¶ç¼© |
| | | } |
| | | |
| | | .formItemLabel { |
| | | display: inline-flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | flex: 0 0 auto; |
| | | font-size: var(--cs-form-label-font-size); |
| | | color: var(--cs-text-color-regular); |
| | | height: 32px; |
| | | line-height: 32px; |
| | | padding: 0 12px 0 0; |
| | | box-sizing: border-box; |
| | | > img { |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | |
| | | :global(.cs-select) { |
| | | width: 100%; |
| | | } |
| | | |
| | | // ç§»é¤åºå®å®½åº¦è®¾ç½® |
| | | :global(.cs-form--inline .cs-form-item) { |
| | | width: auto !important; |
| | | } |
| | | |
| | | :global(.cs-form--inline .cs-form-item:nth-last-of-type(2n)) { |
| | | margin-right: 0 !important; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // import { ElInput } from "element-plus"; |
| | | import { |
| | | defineComponent, |
| | | PropType, |
| | | ref, |
| | | Ref, |
| | | SetupContext, |
| | | computed, |
| | | unref, |
| | | markRaw, |
| | | DefineComponent, |
| | | } from 'vue' |
| | | import styles from './DyFormForHighQuery.module.scss' |
| | | import ElInput from 'element-plus/es/components/input/index' |
| | | import Option from '@/components/Select/Option' |
| | | import Select from '@/components/Select/Select' |
| | | import SelectInput from '@/components/SelectInput/SelectInput' |
| | | import type { FormInstance } from 'element-plus' |
| | | import Icon from '../Icon/Icon' |
| | | import { |
| | | FormPropsType, |
| | | FormItemPropType, |
| | | PropsType, |
| | | OptionItemType, |
| | | } from './DyFormForHighQuery.d' |
| | | import Variable from '../Variable/Variable' |
| | | import Title from '../Title/Title' |
| | | import TextareaFlow from '../Flow/Flow' |
| | | import get from 'lodash/get' |
| | | import set from 'lodash/set' |
| | | |
| | | const formItemElementMap = markRaw<Record<string, any>>({ |
| | | input: ElInput, |
| | | select: Select, |
| | | selectInput: SelectInput, |
| | | variable: Variable, |
| | | textareaFlow: TextareaFlow, |
| | | }) |
| | | |
| | | const Type: Record<string, any> = { |
| | | select: 'select', |
| | | } |
| | | export default defineComponent<FormPropsType>({ |
| | | //@ts-ignore |
| | | name: 'å¨æè¡¨å', |
| | | props: { |
| | | labelWidth: { |
| | | type: String, |
| | | default: '100px', |
| | | }, |
| | | labelPosition: { |
| | | type: String, |
| | | default: 'left', |
| | | }, |
| | | formData: { |
| | | type: Object as PropType<{ [key: string]: any }>, |
| | | default: () => ({}), |
| | | }, |
| | | formItemProps: { |
| | | type: Array, |
| | | default: () => [], |
| | | }, |
| | | inLine: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | }, |
| | | setup(props: PropsType, { attrs, emit, expose }: SetupContext) { |
| | | const formRef = ref<FormInstance>() |
| | | const form: any = computed({ |
| | | get() { |
| | | return props.formData |
| | | }, |
| | | set(v) { |
| | | emit('update:formData', v) |
| | | }, |
| | | }) |
| | | |
| | | const currentWidgetModel = computed(() => { |
| | | return (path: string) => { |
| | | return get(form.value, path) |
| | | } |
| | | }) |
| | | |
| | | const validate = () => { |
| | | if (!formRef.value) return false |
| | | return new Promise((resolve, reject) => { |
| | | formRef.value?.validate((valid: boolean) => { |
| | | if (valid) { |
| | | resolve(true) |
| | | } else { |
| | | reject(false) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | const resetForm = () => { |
| | | if (!formRef.value) return false |
| | | formRef.value.resetFields() |
| | | } |
| | | |
| | | const formItemProps = computed(() => { |
| | | return props.formItemProps || [] |
| | | }) |
| | | |
| | | expose({ validate, resetForm }) |
| | | |
| | | const FormRender: any = ($props: any) => { |
| | | const item: FormItemPropType = $props.item |
| | | const options = $props.item.options || [] |
| | | if (item.el && Type[item.el as string]) { |
| | | return options.map((el: OptionItemType) => ( |
| | | <Option |
| | | label={el.label || el.description || el.name} |
| | | value={el.value} |
| | | ></Option> |
| | | )) |
| | | } |
| | | return null |
| | | } |
| | | const FormRenderForHighSelectOptions: any = ($props: any) => { |
| | | const item: FormItemPropType = $props.item |
| | | const options = $props.item.highSelectAttrs?.options || [] |
| | | if (1===1) { |
| | | return options.map((el: OptionItemType) => ( |
| | | <Option |
| | | label={el.label || el.description || el.name} |
| | | value={el.value} |
| | | ></Option> |
| | | )) |
| | | } |
| | | return null |
| | | } |
| | | |
| | | const onUpdateModelValue = (v: string | number, prop: string) => { |
| | | set(form.value, prop, v) |
| | | } |
| | | |
| | | return () => { |
| | | return ( |
| | | <div class={styles.formStyle}> |
| | | <el-form |
| | | labelPosition={props.labelPosition} |
| | | labelWidth={props.labelWidth} |
| | | model={form.value} |
| | | ref={formRef} |
| | | inline={props.inLine} |
| | | > |
| | | {formItemProps.value.map( |
| | | (item: FormItemPropType, index: number) => { |
| | | if (item.isTitle) { |
| | | if (typeof item.title === 'string') { |
| | | return ( |
| | | <Title style="margin-bottom: 10px">{item.title}</Title> |
| | | ) |
| | | } |
| | | return item.title |
| | | } |
| | | |
| | | const itemProps: FormItemPropType = {} |
| | | Object.entries(item).forEach(([key, value]) => { |
| | | itemProps[key] = unref(value) |
| | | }) |
| | | |
| | | const el = |
| | | typeof itemProps.el === 'string' |
| | | ? formItemElementMap[itemProps.el] |
| | | : itemProps.el || null |
| | | const Component = el |
| | | const el2 = |
| | | formItemElementMap['select']; |
| | | const ComponentForHighSelect = el2 |
| | | return Component && !item.isHide ? ( |
| | | |
| | | <el-form-item |
| | | label={itemProps.label} |
| | | prop={itemProps.prop} |
| | | rules={itemProps.rules} |
| | | key={itemProps.prop} |
| | | vSlots={ |
| | | itemProps.labelIcon |
| | | ? { |
| | | label: () => ( |
| | | <label class={styles.formitemPropsLabel}> |
| | | {itemProps.label} |
| | | <Icon icon={itemProps.labelIcon} /> |
| | | </label> |
| | | ), |
| | | } |
| | | : null |
| | | } |
| | | > |
| | | {/* æ·»å çæ¯è¾æä½ç¬¦éæ©å¨ */} |
| | | {/* 使ç¨flexå¸å±è®©ä¸ä¸ªå
ç´ å¨åä¸è¡ */} |
| | | <div class="flex items-center w-full" style="width:100%"> |
| | | {/* <el-select |
| | | size="small" |
| | | style="margin-right: 8px; min-width: 10px;" |
| | | > |
| | | <el-option label="çäº" value="2" /> |
| | | <el-option label="ä¸çäº" value="8" /> |
| | | </el-select> */} |
| | | {/* å½ç»ä»¶ç±»å䏿¯æ¥ææ§ä»¶æ¶æ¾ç¤ºComponentForHighSelect */} |
| | | {(!itemProps.isDateControl && ( |
| | | // ComponentForHighSelect çæ¸²æä»£ç |
| | | <ComponentForHighSelect style="width:150px;" |
| | | {...itemProps.highSelectAttrs} |
| | | modelValue={currentWidgetModel.value(itemProps.highSelectAttrs?.prop || '')} |
| | | onUpdate:modelValue={(val: string | number) => |
| | | onUpdateModelValue(val, itemProps.highSelectAttrs?.prop || '') |
| | | }> |
| | | <FormRenderForHighSelectOptions item={itemProps} /> |
| | | </ComponentForHighSelect> |
| | | ))} |
| | | {/* æ¥ææ§ä»¶æ¶çå ä½å
ç´ */} |
| | | {itemProps.isDateControl && <span style="width:150px;margin-right:8px;"></span>} |
| | | |
| | | |
| | | <Component |
| | | style={{ |
| | | width: itemProps.width, // é»è®¤å 满å©ä½å®½åº¦ |
| | | // width: itemProps.width , // é»è®¤å 满å©ä½å®½åº¦ |
| | | height: itemProps.height, |
| | | }} |
| | | {...itemProps} |
| | | // v-model={form.value[itemProps.prop as keyof any]} |
| | | modelValue={currentWidgetModel.value(itemProps.prop)} |
| | | onUpdate:modelValue={(val: string | number) => |
| | | onUpdateModelValue(val, itemProps.prop) |
| | | } |
| | | > |
| | | <FormRender item={itemProps} /> |
| | | </Component> |
| | | </div> |
| | | </el-form-item> |
| | | ) : null |
| | | } |
| | | )} |
| | | </el-form> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // å符串类æ¥è¯¢ |
| | | export const FILTER_MODE_OPTIONS_STRING = [ |
| | | { label: 'æ¨¡ç³æ¥è¯¢', value: 1 }, |
| | | { label: 'ç²¾åæ¥è¯¢', value: 2 }, |
| | | ]; |
| | | // æ°åç±»æ¥è¯¢ |
| | | export const FILTER_MODE_OPTIONS_NUM = [ |
| | | { label: 'ç²¾åæ¥è¯¢', value: 2 }, |
| | | { label: '大äºçäº', value: 3 }, |
| | | { label: 'å°äºçäº', value: 4 }, |
| | | { label: '大äº', value: 5 }, |
| | | { label: 'å°äº', value: 6 }, |
| | | { label: 'ä¸çäº', value: 7 }, |
| | | ]; |
| | | // boolæ¥è¯¢ |
| | | export const FILTER_MODE_OPTIONS_BOOL = [ |
| | | { label: 'ç²¾åæ¥è¯¢', value: 2 }, |
| | | { label: 'ä¸çäº', value: 7 }, |
| | | ]; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // æ¯ å¦(é«çº§æ¥è¯¢ç¨) |
| | | export const BOOLEAN_OPTIONS = [ |
| | | { label: 'æ¯', value: 'true'}, |
| | | { label: 'å¦', value: 'false' }, |
| | | ]; |
| | | |
| | | // æ¯ å¦(æ°å¢ãä¿®æ¹çé¢ä¸ç¨) |
| | | export const BOOLEAN_OPTIONS_AddEdit = [ |
| | | { label: 'æ¯', value: true}, |
| | | { label: 'å¦', value: false }, |
| | | ]; |
| | |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | // å¼å
¥å
Œ
±é项é
ç½® |
| | | import { |
| | | BOOLEAN_OPTIONS_AddEdit |
| | | } from '@/utils/commonOptionConstants'; |
| | | |
| | | export const useWorkPlanDrawer = (props: any, ctx?: any) => { |
| | | const workPlanDrawer = injectModel<WorkPlanDrawer>('workPlanDrawer') |
| | |
| | | placeholder: '请è¾å
¥è®¾å¤ä»£ç ', |
| | | }, |
| | | { |
| | | label: '工件åç§°', |
| | | prop: 'workpieceName', |
| | | label: '产线ç¼ç ', |
| | | prop: 'prodLineCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥ä»¶åç§°', |
| | | placeholder: '请è¾å
¥äº§çº¿ç¼ç ', |
| | | }, |
| | | { |
| | | label: 'è¹å·', |
| | | prop: 'shipNumber', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è¹å·', |
| | | }, |
| | | { |
| | | label: '项ç®å·', |
| | | prop: 'projectNumber', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥é¡¹ç®å·', |
| | | }, |
| | | { |
| | | label: 'å·¥åºåç§°', |
| | |
| | | productCode: formData.value.productCode, |
| | | workstationCode: formData.value.workstationCode, |
| | | equipmentCode: formData.value.equipmentCode, |
| | | workpieceName: formData.value.workpieceName, |
| | | prodLineCode: formData.value.prodLineCode, |
| | | shipNumber: formData.value.shipNumber, |
| | | projectNumber: formData.value.projectNumber, |
| | | processName: formData.value.processName, |
| | | pipeFittingCode: formData.value.pipeFittingCode, |
| | | preSerialNumber: formData.value.preSerialNumber, |
| | |
| | | productCode: res.productCode, |
| | | workstationCode: res.workstationCode, |
| | | equipmentCode: res.equipmentCode, |
| | | workpieceName: res.workpieceName, |
| | | prodLineCode: res.prodLineCode, |
| | | shipNumber: res.shipNumber, |
| | | projectNumber: res.projectNumber, |
| | | processName: res.processName, |
| | | pipeFittingCode: res.pipeFittingCode, |
| | | preSerialNumber: res.preSerialNumber, |
| | |
| | | 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 { |
| | | BOOLEAN_OPTIONS |
| | | } from '@/utils/commonOptionConstants'; |
| | | |
| | | export const useWorkPlanQueryDrawer = (props: any, ctx?: any) => { |
| | | const workPlanDrawer = injectModel<WorkPlanDrawer>('WorkPlanDrawer') |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ä»»å¡ç¼ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'taskCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '计åç¶æ', |
| | |
| | | option: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¡åç¶æ', |
| | | highSelectAttrs:{ |
| | | prop: 'workPlanStatus_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_BOOL |
| | | } |
| | | }, |
| | | { |
| | | label: 'å«æç¶æ', |
| | |
| | | option: [], |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å«æç¶æ', |
| | | highSelectAttrs:{ |
| | | prop: 'callMaterialStatus_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_BOOL |
| | | } |
| | | }, |
| | | { |
| | | label: 'åææ è¯', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åææ è¯', |
| | | highSelectAttrs:{ |
| | | prop: 'dataIdentifier_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'åæåå·', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åæåå·', |
| | | highSelectAttrs:{ |
| | | prop: 'materialMode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'é¿åº¦(mm)', |
| | |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥é¿åº¦(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'length_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'æç å
容', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æç å
容', |
| | | highSelectAttrs:{ |
| | | prop: 'markingContent_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'æç ä½ç½®', |
| | |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æç ä½ç½®', |
| | | highSelectAttrs:{ |
| | | prop: 'markingPosition_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'åå²ä½ç½®', |
| | |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥åå²ä½ç½®', |
| | | highSelectAttrs:{ |
| | | prop: 'cuttingPosition_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: '管段æ°é', |
| | |
| | | precision: 0, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡æ®µæ°é', |
| | | highSelectAttrs:{ |
| | | prop: 'quantity_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ³å
°å度(mm)', |
| | |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°å度(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'flangeThickness_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ³å
°ç´å¾(mm)', |
| | |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°ç´å¾(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'flangeInnerDiameter_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ³å
°å
¬ç§°åå', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°å
¬ç§°åå', |
| | | highSelectAttrs:{ |
| | | prop: 'weldingHeatInput_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ³å
°å²ç å
容', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ³å
°å²ç å
容', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeAllowableStress_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'å¥ç®¡é¿åº¦(mm)', |
| | |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¥ç®¡é¿åº¦(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeDiameter_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'å¥ç®¡ç´å¾(mm)', |
| | |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¥ç®¡ç´å¾(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeWallThickness_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'å·¥å代ç ', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥å代ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'factoryCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '产å代ç ', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥äº§å代ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'productCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'å·¥ä½ä»£ç ', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥ä½ä»£ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'workstationCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '设å¤ä»£ç ', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¾å¤ä»£ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'equipmentCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '工件åç§°', |
| | | prop: 'workpieceName', |
| | | label: '产线ç¼ç ', |
| | | prop: 'prodLineCode', |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥ä»¶åç§°', |
| | | 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: 'å·¥åºåç§°', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥åºåç§°', |
| | | highSelectAttrs:{ |
| | | prop: 'processName_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '管件ç¼ç ', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡ä»¶ç¼ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeFittingCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '顺åºå·', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥é¡ºåºå·', |
| | | highSelectAttrs:{ |
| | | prop: 'preSerialNumber_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '管段ç¼ç ', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡æ®µç¼ç ', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeSpecCode_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '管段åç§°', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ç®¡æ®µåç§°', |
| | | highSelectAttrs:{ |
| | | prop: 'pipeSectionName_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'å¤å¾(mm)', |
| | |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¤å¾(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'outerDiameter_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'å£å(mm)', |
| | |
| | | precision: 2, |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å£å(mm)', |
| | | highSelectAttrs:{ |
| | | prop: 'thickness_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_NUM |
| | | } |
| | | }, |
| | | { |
| | | label: 'æè´¨', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æè´¨', |
| | | highSelectAttrs:{ |
| | | prop: 'material_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'å·¥èºæµåç¼å·', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å·¥èºæµåç¼å·', |
| | | highSelectAttrs:{ |
| | | prop: 'processRouteNumber_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '计åå¼å§æ¶é´', |
| | |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¡åå¼å§æ¶é´', |
| | | isDateControl: true, // æ¾å¼æ è®°ä¸ºæ¥ææ§ä»¶ |
| | | }, |
| | | { |
| | | label: '计å宿æ¶é´', |
| | |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥è®¡å宿æ¶é´', |
| | | isDateControl: true, // æ¾å¼æ è®°ä¸ºæ¥ææ§ä»¶ |
| | | }, |
| | | { |
| | | label: 'çç»ä¿¡æ¯', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥çç»ä¿¡æ¯', |
| | | highSelectAttrs:{ |
| | | prop: 'teamInfo_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ¶é´æ³', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥æ¶é´æ³', |
| | | highSelectAttrs:{ |
| | | prop: 'timestamp_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'å建æ¶é´', |
| | |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å建æ¶é´', |
| | | isDateControl: true, // æ¾å¼æ è®°ä¸ºæ¥ææ§ä»¶ |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹æ¶é´', |
| | |
| | | width: '100%', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ä¿®æ¹æ¶é´', |
| | | isDateControl: true, // æ¾å¼æ è®°ä¸ºæ¥ææ§ä»¶ |
| | | }, |
| | | { |
| | | label: 'å建人', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å建人', |
| | | highSelectAttrs:{ |
| | | prop: 'creatorName_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹äºº', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥ä¿®æ¹äºº', |
| | | highSelectAttrs:{ |
| | | prop: 'lastModifierName_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | |
| | | el: 'input', |
| | | //disabled: disabled, |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | highSelectAttrs:{ |
| | | prop: 'remark_FilterMode', |
| | | el: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | options:FILTER_MODE_OPTIONS_STRING |
| | | } |
| | | }, |
| | | ]) |
| | | /** |
| | |
| | | const commonGetFormData=()=>{ |
| | | const data = { |
| | | taskCode: formData.value.taskCode || '', |
| | | taskCode_FilterMode: formData.value.taskCode_FilterMode || '', |
| | | workPlanStatus: formData.value.workPlanStatus || '', |
| | | workPlanStatus_FilterMode: formData.value.workPlanStatus_FilterMode || '', |
| | | callMaterialStatus: formData.value.callMaterialStatus || '', |
| | | callMaterialStatus_FilterMode: formData.value.callMaterialStatus_FilterMode || '', |
| | | dataIdentifier: formData.value.dataIdentifier || '', |
| | | dataIdentifier_FilterMode: formData.value.dataIdentifier_FilterMode || '', |
| | | materialMode: formData.value.materialMode || '', |
| | | materialMode_FilterMode: formData.value.materialMode_FilterMode || '', |
| | | length: formData.value.length || '', |
| | | length_FilterMode: formData.value.length_FilterMode || '', |
| | | markingContent: formData.value.markingContent || '', |
| | | markingContent_FilterMode: formData.value.markingContent_FilterMode || '', |
| | | markingPosition: formData.value.markingPosition || '', |
| | | markingPosition_FilterMode: formData.value.markingPosition_FilterMode || '', |
| | | cuttingPosition: formData.value.cuttingPosition || '', |
| | | cuttingPosition_FilterMode: formData.value.cuttingPosition_FilterMode || '', |
| | | quantity: formData.value.quantity || '', |
| | | quantity_FilterMode: formData.value.quantity_FilterMode || '', |
| | | flangeThickness: formData.value.flangeThickness || '', |
| | | flangeThickness_FilterMode: formData.value.flangeThickness_FilterMode || '', |
| | | flangeInnerDiameter: formData.value.flangeInnerDiameter || '', |
| | | flangeInnerDiameter_FilterMode: formData.value.flangeInnerDiameter_FilterMode || '', |
| | | weldingHeatInput: formData.value.weldingHeatInput || '', |
| | | weldingHeatInput_FilterMode: formData.value.weldingHeatInput_FilterMode || '', |
| | | pipeAllowableStress: formData.value.pipeAllowableStress || '', |
| | | pipeAllowableStress_FilterMode: formData.value.pipeAllowableStress_FilterMode || '', |
| | | pipeDiameter: formData.value.pipeDiameter || '', |
| | | pipeDiameter_FilterMode: formData.value.pipeDiameter_FilterMode || '', |
| | | pipeWallThickness: formData.value.pipeWallThickness || '', |
| | | pipeWallThickness_FilterMode: formData.value.pipeWallThickness_FilterMode || '', |
| | | factoryCode: formData.value.factoryCode || '', |
| | | factoryCode_FilterMode: formData.value.factoryCode_FilterMode || '', |
| | | productCode: formData.value.productCode || '', |
| | | productCode_FilterMode: formData.value.productCode_FilterMode || '', |
| | | workstationCode: formData.value.workstationCode || '', |
| | | workstationCode_FilterMode: formData.value.workstationCode_FilterMode || '', |
| | | equipmentCode: formData.value.equipmentCode || '', |
| | | workpieceName: formData.value.workpieceName || '', |
| | | equipmentCode_FilterMode: formData.value.equipmentCode_FilterMode || '', |
| | | prodLineCode: formData.value.prodLineCode || '', |
| | | prodLineCode_FilterMode: formData.value.prodLineCode_FilterMode || '', |
| | | shipNumber: formData.value.shipNumber || '', |
| | | shipNumber_FilterMode: formData.value.shipNumber_FilterMode || '', |
| | | projectNumber: formData.value.projectNumber || '', |
| | | projectNumber_FilterMode: formData.value.projectNumber_FilterMode || '', |
| | | processName: formData.value.processName || '', |
| | | processName_FilterMode: formData.value.processName_FilterMode || '', |
| | | pipeFittingCode: formData.value.pipeFittingCode || '', |
| | | pipeFittingCode_FilterMode: formData.value.pipeFittingCode_FilterMode || '', |
| | | preSerialNumber: formData.value.preSerialNumber || '', |
| | | preSerialNumber_FilterMode: formData.value.preSerialNumber_FilterMode || '', |
| | | pipeSpecCode: formData.value.pipeSpecCode || '', |
| | | pipeSpecCode_FilterMode: formData.value.pipeSpecCode_FilterMode || '', |
| | | pipeSectionName: formData.value.pipeSectionName || '', |
| | | pipeSectionName_FilterMode: formData.value.pipeSectionName_FilterMode || '', |
| | | outerDiameter: formData.value.outerDiameter || '', |
| | | outerDiameter_FilterMode: formData.value.outerDiameter_FilterMode || '', |
| | | thickness: formData.value.thickness || '', |
| | | thickness_FilterMode: formData.value.thickness_FilterMode || '', |
| | | material: formData.value.material || '', |
| | | material_FilterMode: formData.value.material_FilterMode || '', |
| | | processRouteNumber: formData.value.processRouteNumber || '', |
| | | processRouteNumber_FilterMode: formData.value.processRouteNumber_FilterMode || '', |
| | | plannedStartTime: formData.value.plannedStartTime || '', |
| | | plannedEndTime: formData.value.plannedEndTime || '', |
| | | teamInfo: formData.value.teamInfo || '', |
| | | teamInfo_FilterMode: formData.value.teamInfo_FilterMode || '', |
| | | timestamp: formData.value.timestamp || '', |
| | | timestamp_FilterMode: formData.value.timestamp_FilterMode || '', |
| | | creationTime: formData.value.creationTime || '', |
| | | lastModificationTime: formData.value.lastModificationTime || '', |
| | | creatorName: formData.value.creatorName || '', |
| | | creatorName_FilterMode: formData.value.creatorName_FilterMode || '', |
| | | lastModifierName: formData.value.lastModifierName || '', |
| | | remark: formData.value.remark || '', |
| | | lastModifierName_FilterMode: formData.value.lastModifierName_FilterMode || '', |
| | | remark: formData.value.remark || '', |
| | | remark_FilterMode: formData.value.remark_FilterMode || '', |
| | | } |
| | | return data; |
| | | } |
| | |
| | | const data =commonGetFormData(); |
| | | ctx.emit('confirmQuery', data) |
| | | } |
| | | /** |
| | | * éç½®å
Œ
±selectæ¥è¯¢ |
| | | */ |
| | | const onResetForHighSelect = async () => { |
| | | formData.value.taskCode_FilterMode = 1 |
| | | formData.value.workPlanStatus_FilterMode = 2 |
| | | formData.value.callMaterialStatus_FilterMode = 2 |
| | | formData.value.dataIdentifier_FilterMode = 1 |
| | | formData.value.materialMode_FilterMode = 1 |
| | | formData.value.length_FilterMode = 2 |
| | | formData.value.markingContent_FilterMode = 1 |
| | | formData.value.markingPosition_FilterMode = 2 |
| | | formData.value.cuttingPosition_FilterMode = 2 |
| | | formData.value.quantity_FilterMode = 2 |
| | | formData.value.flangeThickness_FilterMode = 2 |
| | | formData.value.flangeInnerDiameter_FilterMode = 2 |
| | | formData.value.weldingHeatInput_FilterMode = 1 |
| | | formData.value.pipeAllowableStress_FilterMode = 1 |
| | | formData.value.pipeDiameter_FilterMode = 2 |
| | | formData.value.pipeWallThickness_FilterMode = 2 |
| | | formData.value.factoryCode_FilterMode = 1 |
| | | formData.value.productCode_FilterMode = 1 |
| | | formData.value.workstationCode_FilterMode = 1 |
| | | formData.value.equipmentCode_FilterMode = 1 |
| | | formData.value.prodLineCode_FilterMode = 1 |
| | | formData.value.shipNumber_FilterMode = 1 |
| | | formData.value.projectNumber_FilterMode = 1 |
| | | formData.value.processName_FilterMode = 1 |
| | | formData.value.pipeFittingCode_FilterMode = 1 |
| | | formData.value.preSerialNumber_FilterMode = 1 |
| | | formData.value.pipeSpecCode_FilterMode = 1 |
| | | formData.value.pipeSectionName_FilterMode = 1 |
| | | formData.value.outerDiameter_FilterMode = 2 |
| | | formData.value.thickness_FilterMode = 2 |
| | | formData.value.material_FilterMode = 1 |
| | | formData.value.processRouteNumber_FilterMode = 1 |
| | | formData.value.teamInfo_FilterMode = 1 |
| | | formData.value.timestamp_FilterMode = 1 |
| | | formData.value.creatorName_FilterMode = 1 |
| | | formData.value.lastModifierName_FilterMode = 1 |
| | | formData.value.remark_FilterMode = 1 |
| | | } |
| | | /** |
| | | * éç½®æ¥è¯¢ |
| | | */ |
| | | const onReset = async () => { |
| | | formData.value = {} |
| | | onResetForHighSelect();//éç½®å
Œ
±selectæ¥è¯¢ |
| | | formData.value.taskCode = '' |
| | | formData.value.workPlanStatus = '' |
| | | formData.value.callMaterialStatus = '' |
| | |
| | | formData.value.productCode = '' |
| | | formData.value.workstationCode = '' |
| | | formData.value.equipmentCode = '' |
| | | formData.value.workpieceName = '' |
| | | formData.value.prodLineCode = '' |
| | | formData.value.shipNumber = '' |
| | | formData.value.projectNumber = '' |
| | | formData.value.processName = '' |
| | | formData.value.pipeFittingCode = '' |
| | | formData.value.preSerialNumber = '' |
| | |
| | | formData.value.plannedEndTime = '' |
| | | formData.value.teamInfo = '' |
| | | formData.value.timestamp = '' |
| | | formData.value.deletionTime = '' |
| | | formData.value.operationRemark = '' |
| | | formData.value.deleteRemark = '' |
| | | formData.value.remark = '' |
| | | formData.value.extraField1 = '' |
| | | formData.value.extraField2 = '' |
| | | formData.value.extraField3 = '' |
| | | formData.value.creationTime = '' |
| | | formData.value.lastModificationTime = '' |
| | | formData.value.creatorName = '' |
| | | formData.value.lastModifierName = '' |
| | | formData.value.remark = '' |
| | | //åç¶ç»ä»¶åéèªå®ä¹äºä»¶ |
| | | ctx.emit('restQuery'); |
| | | } |
| | |
| | | |
| | | } |
| | | commonQueryEnumForFrom() |
| | | onResetForHighSelect();//éç½®å
Œ
±selectæ¥è¯¢ |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | |
| | | import BaseQueryDrawer from '@/components/BaseQueryDrawer/BaseQueryDrawer' |
| | | import styles from './WorkPlanQueryDrawer.module.scss' |
| | | import { useWorkPlanQueryDrawer } from '../../../../Controllers/WorkPlanQueryDrawer.tsx' |
| | | import DyForm from '@/components/DyForm/DyForm' |
| | | import DyFormForHighQuery from '@/components/DyFormForHighQuery/DyFormForHighQuery' |
| | | |
| | | // @ts-ignore |
| | | export default defineComponent<{ |
| | |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | | > |
| | | <DyForm |
| | | <DyFormForHighQuery |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyForm> |
| | | ></DyFormForHighQuery> |
| | | </BaseQueryDrawer> |
| | | ) |
| | | }, |
| | |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'processName', |
| | | title: 'å·¥åºåç§°', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'pipeSpecCode', |
| | | title: '管段ç¼ç ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'pipeSectionName', |
| | | title: '管段åç§°', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'workPlanStatusDesc', |
| | | title: '计åç¶æ', |
| | | width:160, |
| | |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'workpieceName', |
| | | title: '工件åç§°', |
| | | field: 'prodLineCode', |
| | | title: '产线ç¼ç ', |
| | | width:160, |
| | | }, |
| | | |
| | | { |
| | | field: 'shipNumber', |
| | | title: 'è¹å·', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'projectNumber', |
| | | title: '项ç®å·', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'processName', |
| | | title: 'å·¥åºåç§°', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'pipeFittingCode', |
| | | title: '管件ç¼ç ', |
| | |
| | | title: '顺åºå·', |
| | | width:160, |
| | | }, |
| | | |
| | | { |
| | | field: 'pipeSpecCode', |
| | | title: '管段ç¼ç ', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'pipeSectionName', |
| | | title: '管段åç§°', |
| | | width:160, |
| | | }, |
| | | { |
| | | field: 'outerDiameter', |
| | | title: 'å¤å¾(mm)', |
| | |
| | | ElFormItem, |
| | | } from 'element-plus' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | // å¼å
¥å
Œ
±é项é
ç½® |
| | | import { |
| | | FILTER_MODE_OPTIONS_STRING |
| | | } from '@/components/DyFormForHighQuery/DyFormForHighQueryOptions'; |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | |
| | | // æ°å¢çæ¥è¯¢æ¡ä»¶ |
| | | const queryForm = ref({ |
| | | searchVal: '', |
| | | str_searchFormInputAttrs:[] |
| | | str_searchFormInputAttrs:[], |
| | | searchVal_FilterMode:'' |
| | | }) |
| | | //å®ä¹æ´ä½æ¨¡ç³æ¥è¯¢çåæ°ç»(注æï¼å¿
须大å°åè·å端çå®ä½ç±»å±æ§åä¸è´ï¼å¦åä¼å¯¼è´å¹é
ä¸å¯¹çé®é¢) |
| | | const _searchFormInputAttrs = ref([ |
| | | 'TaskCode','DataIdentifier','MaterialMode','MarkingContent','WeldingHeatInput','PipeAllowableStress','FactoryCode','ProductCode','WorkstationCode','EquipmentCode','WorkpieceName','ProcessName','PipeFittingCode','PreSerialNumber','PipeSpecCode','PipeSectionName','Material','ProcessRouteNumber','TeamInfo','Timestamp','CreatorName','LastModifierName','Remark' |
| | | '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 searchFormInputAttrs_Placeholder = ref('请è¾å
¥ä»»å¡ç¼ç /åææ è¯/åæåå·/æç å
容/æ³å
°å
¬ç§°åå/æ³å
°å²ç å
容/å·¥å代ç /产å代ç /å·¥ä½ä»£ç /设å¤ä»£ç /产线ç¼ç /è¹å·/项ç®å·/å·¥åºåç§°/管件ç¼ç /顺åºå·/管段ç¼ç /管段åç§°/æè´¨/å·¥èºæµåç¼å·/çç»ä¿¡æ¯/æ¶é´æ³/å建人/ä¿®æ¹äºº/夿³¨'); |
| | | |
| | | |
| | | // 卿æä¸¾é项 |
| | |
| | | } |
| | | } |
| | | |
| | | // ç»ä»¶æè½½æ¶è·åæä¸¾æ°æ® |
| | | onMounted(() => { |
| | | fetchEnumData() |
| | | }) |
| | | // å®ä¹ååºå¼æ¥è¯¢æ°æ® |
| | | 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 _curHighQueryData = ref({ searchVal: '',str_searchFormInputAttrs:[] }); |
| | | // æ°ççæ¥è¯¢æ¹æ³ï¼ä¸»é¡µé¢ä¸çæé®ãæ¥è¯¢ãï¼ |
| | | 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 resetQuery = () => { |
| | | queryForm.value.searchVal = '' |
| | | queryForm.value.searchVal_FilterMode = FILTER_MODE_OPTIONS_STRING[0]?.value || ''; |
| | | queryForm.value.str_searchFormInputAttrs=_searchFormInputAttrs.value; |
| | | } |
| | | //æ°ççå¯¼åºæ¹æ³ |
| | |
| | | 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; |
| | | } |
| | | //è·åé«çº§æ¥è¯¢å¼¹åºæ¡çæ¥è¯¢å¼ |
| | |
| | | ) |
| | | //ç»åæ¨¡ç³æ¥è¯¢ |
| | | filteredData.searchVal = queryForm.value.searchVal |
| | | filteredData.searchVal_FilterMode = queryForm.value.searchVal_FilterMode |
| | | filteredData.str_searchFormInputAttrs =_searchFormInputAttrs.value; |
| | | return filteredData; |
| | | } |
| | |
| | | |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | {/* <IconButton |
| | | <IconButton |
| | | v-permission="workPlan-add" |
| | | icon="add-p" |
| | | onClick={onAddWorkPlan} |
| | |
| | | > |
| | | æ·»å |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | |
| | | <el-divider direction="vertical" /> */} |
| | | <el-upload |
| | | v-permission="workPlan-import" |
| | | name="file" |
| | |
| | | /> |
| | | </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> |
| | |
| | | public SearchFilterModeEnum EquipmentCode_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// 工件åç§° |
| | | /// 产线ç¼ç |
| | | /// </summary> |
| | | public string WorkpieceName { get; set; } |
| | | public string ProdLineCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 工件åç§°-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// 产线ç¼ç -æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum WorkpieceName_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | public SearchFilterModeEnum ProdLineCode_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// è¹å· |
| | | /// </summary> |
| | | public string ShipNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¹å·-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum ShipNumber_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// 项ç®å· |
| | | /// </summary> |
| | | public string ProjectNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 项ç®å·-æ¥è¯¢å
³ç³»è¿ç®ç¬¦ |
| | | /// </summary> |
| | | public SearchFilterModeEnum ProjectNumber_FilterMode { get; set; }= SearchFilterModeEnum.æ¨¡ç³æ¥è¯¢; |
| | | |
| | | /// <summary> |
| | | /// å·¥åºåç§° |
| | |
| | | /// </summary> |
| | | //è¡¨ç¤ºæ¯ é«çº§æ¥è¯¢èå´æ¥è¯¢ç¹æ§ |
| | | [HighSearchRangeAttribute] |
| | | public List<string> PlannedStartTime { get; set; } |
| | | public string PlannedStartTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | //è¡¨ç¤ºæ¯ é«çº§æ¥è¯¢èå´æ¥è¯¢ç¹æ§ |
| | | [HighSearchRangeAttribute] |
| | | public List<string> PlannedEndTime { get; set; } |
| | | public string PlannedEndTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | //è¡¨ç¤ºæ¯ é«çº§æ¥è¯¢èå´æ¥è¯¢ç¹æ§ |
| | | [HighSearchRangeAttribute] |
| | | public List<string> CreationTime { get; set; } |
| | | public string CreationTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | //è¡¨ç¤ºæ¯ é«çº§æ¥è¯¢èå´æ¥è¯¢ç¹æ§ |
| | | [HighSearchRangeAttribute] |
| | | public List<string> LastModificationTime { get; set; } |
| | | public string LastModificationTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | //è¡¨ç¤ºæ¯ é«çº§æ¥è¯¢èå´æ¥è¯¢ç¹æ§ |
| | | [HighSearchRangeAttribute] |
| | | public List<string> DeletionTime { get; set; } |
| | | public string DeletionTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public bool? IsDisabled { get; set; } = false; |
| | | |
| | | /// <summary> |
| | | /// å建人 |
| | | /// </summary> |
| | | public string CreatorName { get; set; } |
| | | } |
| | |
| | | public string? EquipmentCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 工件åç§° |
| | | /// 产线ç¼ç |
| | | /// </summary> |
| | | public string? WorkpieceName { get; set; } |
| | | public string? ProdLineCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¹å· |
| | | /// </summary> |
| | | public string? ShipNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 项ç®å· |
| | | /// </summary> |
| | | public string? ProjectNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·¥åºåç§° |
| | |
| | | /// å建人ID |
| | | /// </summary> |
| | | public string? CreatorId { get; set; } |
| | | /// <summary> |
| | | /// å建人 |
| | | /// </summary> |
| | | public string CreatorName { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹äººID |
| | | /// </summary> |
| | | public string? LastModifierId { get; set; } |
| | | /// <summary> |
| | | /// ä¿®æ¹äººID |
| | | /// </summary> |
| | | public string? LastModifierId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å 餿¶é´ |
| | |
| | | public string? EquipmentCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 工件åç§° |
| | | /// 产线ç¼ç |
| | | /// </summary> |
| | | public string? WorkpieceName { get; set; } |
| | | public string? ProdLineCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¹å· |
| | | /// </summary> |
| | | public string? ShipNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 项ç®å· |
| | | /// </summary> |
| | | public string? ProjectNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·¥åºåç§° |
| | |
| | | public string EquipmentCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 工件åç§° |
| | | /// 产线ç¼ç |
| | | /// </summary> |
| | | [ExcelColumn(Name = "工件åç§°", Width = 25)] |
| | | public string WorkpieceName { get; set; } |
| | | [ExcelColumn(Name = "产线ç¼ç ", Width = 25)] |
| | | public string ProdLineCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¹å· |
| | | /// </summary> |
| | | [ExcelColumn(Name = "è¹å·", Width = 25)] |
| | | public string ShipNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 项ç®å· |
| | | /// </summary> |
| | | [ExcelColumn(Name = "项ç®å·", Width = 25)] |
| | | public string ProjectNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·¥åºåç§° |
| | |
| | | using System; |
| | | using MiniExcelLibs.Attributes; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// </summary> |
| | | public DateTime? PlannedEndTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¶é´ä¿¡æ¯ |
| | | /// çç»ä¿¡æ¯ |
| | | /// </summary> |
| | | public string TimeInfo { get; set; } |
| | | public string TeamInfo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¶é´æ³ |
| | | /// </summary> |
| | | public string Timestamp { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 产线ç¼ç |
| | | /// </summary> |
| | | public string ProdLineCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¹å· |
| | | /// </summary> |
| | | public string ShipNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 项ç®å· |
| | | /// </summary> |
| | | public string ProjectNumber { get; set; } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// æç ä½ç½® |
| | | /// </summary> |
| | | public decimal MarkingPosition { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå²ä½ç½® |
| | | /// </summary> |
| | | public decimal CuttingPosition { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å£å(mm) |
| | | /// </summary> |
| | | public decimal Thickness { get; set; } |
| | | } |
| | | } |
| | |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹äºº |
| | | /// </summary> |
| | | public string LastModifierName { get; set; } |
| | | } |
| | |
| | | using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.WorkPlan; |
| | | using CMS.Plugin.PipeLineLems.Domain.WorkPlan; |
| | | using CmsQueryExtensions.Entitys; |
| | | using System.Linq.Expressions; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Services; |
| | |
| | | Task<List<WorkPlanDto>> CloneAsync(IEnumerable<Guid> ids); |
| | | |
| | | |
| | | /// <summary> |
| | | /// æç
§ åææ è®° æ¥æ¾ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="name"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | Task<List<WorkPlan>> FindByDataIdentifierAsync(string dataIdentifier); |
| | | |
| | | /// <summary> |
| | | /// å é¤ä½ä¸è®¡å表 |
| | |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | Task ImportAsync(WorkPlansImportModel input, string userId,string userAccount); |
| | | Task ImportAsync(WorkPlansImportModel input, MyCurrentUser myCurrentUser); |
| | | |
| | | /// <summary> |
| | | /// 导åºä½ä¸è®¡å表 |
| | |
| | | throw new UserFriendlyException($"åææ è¯ä¸º '{callMaterialOrder.DataIdentifier}' çå«æè®°å½ç¶æä¸º '{callMaterialOrder.CallMaterialStatus}'ï¼ä¸å
è®¸å«æ"); |
| | | } |
| | | |
| | | //TODO:è¿éè°ç¨wmsç嫿æ¥å£ |
| | | |
| | | // æ´æ°æ°æ® |
| | | callMaterialOrder.MaterialBatch = GenerateRandomBatch();//wmsè¿åçåææ¹æ¬¡ |
| | | callMaterialOrder.WmsRetResult = "æå"; |
| | | callMaterialOrder.WmsTaskNo = GenerateRandomTaskNo(); |
| | | callMaterialOrder.CallMaterialStatus = Domain.Shared.Enums.CallMaterialStatusEnum.嫿宿; |
| | |
| | | await callMaterialOrderRepository.UpdateAsync(callMaterialOrder); |
| | | |
| | | //æ´æ°ä½ä¸è®¡å表 |
| | | var workPlanList = await workPlanRepository.FindByDataIdentifierAsync(callMaterialOrder.DataIdentifier); |
| | | var workPlanList = await workPlanRepository.GetListByFilterAsync(x => x.DataIdentifier == callMaterialOrder.DataIdentifier); |
| | | foreach (var item in workPlanList) |
| | | { |
| | | item.CallMaterialStatus = Domain.Shared.Enums.CallMaterialStatusEnum.嫿宿; |
| | |
| | | var callMaterialOrderRecord = new CallMaterialOrderRecord() |
| | | { |
| | | CallMaterialStatus = Domain.Shared.Enums.CallMaterialStatusEnum.嫿宿, |
| | | MaterialBatch = callMaterialOrder.MaterialBatch, |
| | | MaterialMode = callMaterialOrder.MaterialMode, |
| | | DataIdentifier = callMaterialOrder.DataIdentifier, |
| | | Quantity = 1, |
| | |
| | | // çæåç¼ |
| | | return $"WMS{timestamp}"; |
| | | } |
| | | |
| | | private string GenerateRandomBatch() |
| | | { |
| | | // è·åå½åæ¶é´æ³ï¼ä»1970-01-01 00:00:00 UTCå°ç°å¨çç§æ°ï¼ |
| | | long timestamp = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds(); |
| | | |
| | | // çæåç¼ |
| | | return $"Batch{timestamp}"; |
| | | } |
| | | } |
| | |
| | | using Volo.Abp.ObjectExtending; |
| | | using Volo.Abp.ObjectMapping; |
| | | using Volo.Abp.Users; |
| | | using CmsQueryExtensions.Entitys; |
| | | |
| | | namespace CMS.Plugin.PipeLineLems.Application.Implements; |
| | | |
| | |
| | | return ObjectMapper.Map<WorkPlan, WorkPlanDto>(await _workPlanRepository.GetAsync(id)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æç
§ åææ è®° æ¥æ¾ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="name"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public virtual async Task<List<WorkPlan>> FindByDataIdentifierAsync(string dataIdentifier) |
| | | { |
| | | return await _workPlanRepository.FindByDataIdentifierAsync(dataIdentifier); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å页è·åä½ä¸è®¡å表 |
| | |
| | | updateObj.ProductCode = input.ProductCode; |
| | | updateObj.WorkstationCode = input.WorkstationCode; |
| | | updateObj.EquipmentCode = input.EquipmentCode; |
| | | |
| | | |
| | | updateObj.ProcessName = input.ProcessName; |
| | | updateObj.PipeFittingCode = input.PipeFittingCode; |
| | | updateObj.PreSerialNumber = input.PreSerialNumber; |
| | |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="UserFriendlyException"></exception> |
| | | public async Task ImportAsync(WorkPlansImportModel input, string userId, string userAccount) |
| | | public async Task ImportAsync(WorkPlansImportModel input, MyCurrentUser myCurrentUser) |
| | | { |
| | | //è½¬æ¢æ°æ® |
| | | var result = ObjectMapper.Map<List<WorkPlansImportModel.WorkPlanImportModel>, List<WorkPlanInput>>(input.WorkPlans); |
| | | |
| | | //await CreatebyApsAsync(result); |
| | | await _sharedService.CommonCreatebyApsAsync(result, _serviceProvider, this, userId, userAccount); |
| | | await _sharedService.CommonCreatebyApsAsync(result, _serviceProvider, this, myCurrentUser.UserId, myCurrentUser.UserAccount); |
| | | // Check.NotNull(input, nameof(input)); |
| | | |
| | | // var workPlanCreateDtos = new List<(int RowIndex, WorkPlanCreateDto Item)>(); |
| | |
| | | public string MaterialMode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åææ¹æ¬¡ |
| | | /// </summary> |
| | | public string MaterialBatch { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å«æç¶æ |
| | | /// </summary> |
| | | public CallMaterialStatusEnum CallMaterialStatus { get; set; } |
| | |
| | | public string MaterialMode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åææ¹æ¬¡ |
| | | /// </summary> |
| | | public string MaterialBatch { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å«æç¶æ |
| | | /// </summary> |
| | | public CallMaterialStatusEnum CallMaterialStatus { get; set; } |
| | |
| | | /// <param name="name"></param> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | Task<bool> NameExistAsync(string name, Guid? id = null); |
| | | |
| | | Task<bool> NameExistAsync(string name, Guid? id = null); |
| | | |
| | | /// <summary> |
| | | /// è·åæå¤§æåºä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<int> GetMaxSortAsync(); |
| | | |
| | | |
| | | /// <summary> |
| | | /// æç
§ åææ è®° æ¥æ¾ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="name"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | Task<List<WorkPlan>> FindByDataIdentifierAsync(string dataIdentifier, CancellationToken cancellationToken = default); |
| | | |
| | | Task<int> GetMaxSortAsync(); |
| | | |
| | | /// <summary> |
| | | /// è·åå页å表ä½ä¸è®¡å表 |
| | | /// </summary> |
| | |
| | | /// <param name="whereConditions"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | Task<long> GetCountAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, CancellationToken cancellationToken = default); |
| | | |
| | | |
| | | Task<long> GetCountAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// ç©çå é¤ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="id">主é®ID</param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | Task DeletePermanentlyAsync(Guid id, CancellationToken cancellationToken = default); |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¹éç©çå é¤ä½ä¸è®¡å表ï¼ç´æ¥å é¤ï¼ä¸è½¯å é¤ï¼ |
| | | /// </summary> |
| | | /// <param name="ids">è¦å é¤ç主é®IDå表</param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | Task BatchDeletePermanentlyAsync(IEnumerable<Guid> ids, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æ¡ä»¶è·åä½ä¸è®¡å表å表 |
| | | /// </summary> |
| | | /// <param name="whereConditions"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | Task<List<WorkPlan>> GetListByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, CancellationToken cancellationToken = default); |
| | | |
| | | Task<List<WorkPlan>> GetListByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æ¡ä»¶è·åå个ä½ä¸è®¡å表 |
| | | /// </summary> |
| | |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="UserFriendlyException"></exception> |
| | | Task<WorkPlan> GetSingleByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, bool isâMultipleThrowException = false, CancellationToken cancellationToken = default); |
| | | Task<WorkPlan> GetSingleByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, bool isâMultipleThrowException = false, CancellationToken cancellationToken = default); |
| | | } |
| | |
| | | using CMS.Plugin.PipeLineLems.Domain.WorkPlan; |
| | | using CMS.Plugin.PipeLineLems.EntityFrameworkCore.Extensions; |
| | | using CmsQueryExtensions.Extension; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using System.Linq.Dynamic.Core; |
| | | using System.Linq.Expressions; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | |
| | | |
| | | namespace CMS.Plugin.PipeLineLems.EntityFrameworkCore.Repositories; |
| | | |
| | | using CMS.Plugin.PipeLineLems.Domain.WorkPlan; |
| | | using CMS.Plugin.PipeLineLems.EntityFrameworkCore.Extensions; |
| | | using CmsQueryExtensions.Extension; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using System.Linq.Dynamic.Core; |
| | | using System.Linq.Expressions; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | |
| | | |
| | | namespace CMS.Plugin.PipeLineLems.EntityFrameworkCore.Repositories; |
| | | |
| | | /// <summary> |
| | | /// ä½ä¸è®¡å表ä»å¨å®ç° |
| | | /// </summary> |
| | | public class EfCoreWorkPlanRepository : EfCoreRepository<ICMSPluginDbContext, WorkPlan, Guid>, IWorkPlanRepository |
| | | { |
| | | public class EfCoreWorkPlanRepository : EfCoreRepository<ICMSPluginDbContext, WorkPlan, Guid>, IWorkPlanRepository |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="EfCoreWorkPlanRepository"/> class. |
| | | /// </summary> |
| | | /// <param name="dbContextProvider">The database context provider.</param> |
| | | public EfCoreWorkPlanRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider) |
| | | : base(dbContextProvider) |
| | | { |
| | | } |
| | | |
| | | public EfCoreWorkPlanRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider) |
| | | : base(dbContextProvider) |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æç
§åç§°æ¥æ¾ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="name"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public virtual async Task<WorkPlan> FindByNameAsync(string name, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderByDescending(x => x.CreationTime) |
| | | .FirstOrDefaultAsync(t => t.TaskCode == name, GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æç
§ åææ è®° æ¥æ¾ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="name"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public virtual async Task<List<WorkPlan>> FindByDataIdentifierAsync(string dataIdentifier, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .Where(x => !x.IsDeleted) |
| | | .Where(t => t.DataIdentifier == dataIdentifier) |
| | | .OrderByDescending(x => x.CreationTime) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | public virtual async Task<WorkPlan> FindByNameAsync(string name, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderByDescending(x=>x.CreationTime) |
| | | .FirstOrDefaultAsync(t => t.TaskCode == name, GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éªè¯åç§°æ¯å¦åå¨ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="name">æ ¡éªå¼</param> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | public async Task<bool> NameExistAsync(string name, Guid? id = null) |
| | | { |
| | | return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).Where(x => !x.IsDeleted).AnyAsync(x => x.TaskCode == name); |
| | | } |
| | | |
| | | public async Task<bool> NameExistAsync(string name, Guid? id = null) |
| | | { |
| | | return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).Where(x => !x.IsDeleted).AnyAsync(x => x.TaskCode == name); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæå¤§æåºä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public async Task<int> GetMaxSortAsync() |
| | | { |
| | | var hasAny = await (await GetQueryableAsync()) |
| | | .Where(x => !x.IsDeleted).AnyAsync(); |
| | | if (!hasAny) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | var sort = await (await GetQueryableAsync()) |
| | | .Where(x => !x.IsDeleted).MaxAsync(x => x.Sort); |
| | | return sort + 1; |
| | | } |
| | | |
| | | public async Task<int> GetMaxSortAsync() |
| | | { |
| | | var hasAny = await (await GetQueryableAsync()) |
| | | .Where(x => !x.IsDeleted).AnyAsync(); |
| | | if (!hasAny) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | var sort = await (await GetQueryableAsync()) |
| | | .Where(x => !x.IsDeleted).MaxAsync(x => x.Sort); |
| | | return sort + 1; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå页å表ä½ä¸è®¡å表 |
| | | /// </summary> |
| | |
| | | /// <param name="includeDetails"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public async Task<List<WorkPlan>> GetListAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, bool includeDetails = false, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails(includeDetails) |
| | | .WhereIf(whereConditions != null, whereConditions.data) |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderByDescending(x => x.CreationTime) |
| | | .PageBy(skipCount, maxResultCount) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | public async Task<List<WorkPlan>> GetListAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, bool includeDetails = false, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails(includeDetails) |
| | | .WhereIf(whereConditions != null, whereConditions.data) |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderByDescending(x=>x.CreationTime) |
| | | .PageBy(skipCount, maxResultCount) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæ»æ°ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="whereConditions"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public async Task<long> GetCountAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetQueryableAsync()) |
| | | .WhereIf(whereConditions != null, whereConditions.data) |
| | | .Where(x => !x.IsDeleted) |
| | | .CountAsync(cancellationToken: GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | |
| | | public async Task<long> GetCountAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetQueryableAsync()) |
| | | .WhereIf(whereConditions != null, whereConditions.data) |
| | | .Where(x => !x.IsDeleted) |
| | | .CountAsync(cancellationToken: GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | |
| | | /// <inheritdoc /> |
| | | public override async Task<IQueryable<WorkPlan>> WithDetailsAsync() |
| | | { |
| | | return (await GetQueryableAsync()) |
| | | .Where(x => !x.IsDeleted).IncludeDetails(); |
| | | } |
| | | |
| | | public override async Task<IQueryable<WorkPlan>> WithDetailsAsync() |
| | | { |
| | | return (await GetQueryableAsync()) |
| | | .Where(x => !x.IsDeleted).IncludeDetails(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç©çå é¤ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="id">主é®ID</param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public virtual async Task DeletePermanentlyAsync(Guid id, CancellationToken cancellationToken = default) |
| | | { |
| | | var entity = await (await GetDbSetAsync()) |
| | | .FirstOrDefaultAsync(x => x.Id == id && !x.IsDeleted, GetCancellationToken(cancellationToken)); |
| | | |
| | | if (entity == null) |
| | | { |
| | | throw new Volo.Abp.Domain.Entities.EntityNotFoundException(typeof(WorkPlan), id); |
| | | } |
| | | |
| | | // 2. è·å DbContext å¹¶æ§è¡å é¤ |
| | | var dbContext = await GetDbContextAsync(); |
| | | |
| | | // ç´æ¥æ§è¡ SQL å é¤ |
| | | var sql = $"DELETE FROM scms_workplans WHERE Id ='{entity.Id.ToString()}'"; |
| | | await dbContext.Database.ExecuteSqlRawAsync(sql, cancellationToken); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¹éç©çå é¤ä½ä¸è®¡å表ï¼ç´æ¥å é¤ï¼ä¸è½¯å é¤ï¼ |
| | | /// </summary> |
| | | /// <param name="ids">è¦å é¤ç主é®IDå表</param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public virtual async Task BatchDeletePermanentlyAsync(IEnumerable<Guid> ids, CancellationToken cancellationToken = default) |
| | | { |
| | | // 1. æ¥è¯¢ç¬¦åæ¡ä»¶çå®ä½ï¼æªè½¯å é¤çè®°å½ï¼ |
| | | var entities = await (await GetDbSetAsync()) |
| | | .Where(x => ids.Contains(x.Id) && !x.IsDeleted) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | |
| | | if (!entities.Any()) |
| | | { |
| | | // å¦ææ²¡æéè¦å é¤çè®°å½ï¼ç´æ¥è¿åï¼é¿å
ä¸å¿
è¦çæ°æ®åºæä½ï¼ |
| | | return; |
| | | } |
| | | |
| | | // 2. è·å DbContext å¹¶æ§è¡æ¹éå é¤ |
| | | var dbContext = await GetDbContextAsync(); |
| | | |
| | | var idsToDelete = entities.Select(e => e.Id).ToList(); |
| | | |
| | | // ç´æ¥æ§è¡ SQL å é¤ |
| | | var sql = $"DELETE FROM scms_workplans WHERE Id IN ({string.Join(",", idsToDelete.Select(id => $"'{id}'"))})"; |
| | | await dbContext.Database.ExecuteSqlRawAsync(sql, cancellationToken); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æ¡ä»¶è·åä½ä¸è®¡å表å表 |
| | | /// </summary> |
| | | /// <param name="whereConditions"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public async Task<List<WorkPlan>> GetListByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .WhereIf(whereConditions != null, whereConditions) |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderByDescending(x => x.CreationTime) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | public async Task<List<WorkPlan>> GetListByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .WhereIf(whereConditions != null, whereConditions) |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderByDescending(x => x.CreationTime) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æ¡ä»¶è·åå个ä½ä¸è®¡å表 |
| | | /// </summary> |
| | |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="UserFriendlyException"></exception> |
| | | public async Task<WorkPlan> GetSingleByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, bool isâMultipleThrowException = false, CancellationToken cancellationToken = default) |
| | | { |
| | | if (isâMultipleThrowException) |
| | | { |
| | | var entitys = await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .WhereIf(whereConditions != null, whereConditions) |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderByDescending(x => x.CreationTime) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | if (entitys?.Count > 1) |
| | | { |
| | | throw new UserFriendlyException("æ¥è¯¢å°å¤æ¡è®°å½"); |
| | | } |
| | | return entitys?.FirstOrDefault(); |
| | | } |
| | | else |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .WhereIf(whereConditions != null, whereConditions) |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderByDescending(x => x.CreationTime) |
| | | .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | } |
| | | } |
| | | public async Task<WorkPlan> GetSingleByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, bool isâMultipleThrowException = false, CancellationToken cancellationToken = default) |
| | | { |
| | | if (isâMultipleThrowException) |
| | | { |
| | | var entitys = await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .WhereIf(whereConditions != null, whereConditions) |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderByDescending(x => x.CreationTime) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | if (entitys?.Count > 1) |
| | | { |
| | | throw new UserFriendlyException("æ¥è¯¢å°å¤æ¡è®°å½"); |
| | | } |
| | | return entitys?.FirstOrDefault(); |
| | | } |
| | | else |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .WhereIf(whereConditions != null, whereConditions) |
| | | .Where(x => !x.IsDeleted) |
| | | .OrderByDescending(x => x.CreationTime) |
| | | .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | } |
| | | } |
| | |
| | | using CMS.Framework.AspNetCore.Users; |
| | | using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.WorkPlan; |
| | | using CMS.Plugin.PipeLineLems.Application.Contracts.Services; |
| | | using CmsQueryExtensions.Entitys; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | |
| | | using System.Reflection; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | using CmsQueryExtensions.Entitys; |
| | | |
| | | namespace CMS.Plugin.PipeLineLems.Controller |
| | | { |
| | |
| | | /// <summary> |
| | | /// è·åä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <param name="id">主é®ID</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("{id}")] |
| | |
| | | /// <summary> |
| | | /// å页è·åä½ä¸è®¡å表çå表. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <param name="input">æ¥è¯¢åæ°</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("Page")] |
| | |
| | | /// <summary> |
| | | /// å建ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <param name="input">åå»ºåæ°</param> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPost] |
| | | public virtual Task<WorkPlanDto> CreateAsync(WorkPlanCreateDto input) |
| | | { |
| | | input.CreatorName = _currentUser.UserAccount;//å建人 |
| | | return _workPlanAppService.CreateAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <param name="id">主é®ID</param> |
| | | /// <param name="input">æ´æ°åæ°</param> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPut] |
| | | [Route("{id}")] |
| | | public virtual Task<WorkPlanDto> UpdateAsync(Guid id, WorkPlanUpdateDto input) |
| | | { |
| | | input.LastModifierName = _currentUser.UserAccount;//ä¿®æ¹äºº |
| | | return _workPlanAppService.UpdateAsync(id, input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
éä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="ids">Idéå.</param> |
| | | /// <param name="ids">Idéå</param> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPost] |
| | | [Route("Clone")] |
| | | public virtual Task<List<WorkPlanDto>> CloneAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | MyCurrentUser myCurrentUser = new MyCurrentUser() |
| | | { |
| | | UserAccount = _currentUser.UserAccount, |
| | | UserId = _currentUser.UserId |
| | | }; |
| | | return _workPlanAppService.CloneAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <param name="id">主é®ID</param> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpDelete] |
| | | [Route("{id}")] |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _workPlanAppService.DeleteAsync(id); |
| | | MyCurrentUser myCurrentUser = new MyCurrentUser() |
| | | { |
| | | UserAccount = _currentUser.UserAccount, |
| | | UserId = _currentUser.UserId |
| | | }; |
| | | return _workPlanAppService.DeleteAsync(id);//é»è¾å é¤ |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¹éå é¤ä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <param name="ids">主é®IDéå</param> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpDelete] |
| | | public virtual Task DeleteAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _workPlanAppService.DeleteManyAsync(ids); |
| | | MyCurrentUser myCurrentUser = new MyCurrentUser() |
| | | { |
| | | UserAccount = _currentUser.UserAccount, |
| | | UserId = _currentUser.UserId |
| | | }; |
| | | return _workPlanAppService.DeleteManyAsync(ids);//é»è¾å é¤ |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è°æ´æåºä½ä¸è®¡å表 |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <param name="id">主é®ID</param> |
| | | /// <returns></returns> |
| | | [HttpPut] |
| | | [Route("{id}/AdjustSort/{sort}")] |
| | |
| | | await file.CopyToAsync(stream); |
| | | stream.Seek(0L, SeekOrigin.Begin); |
| | | |
| | | var userAccount = _currentUser.UserAccount; |
| | | var userId = _currentUser.UserId; |
| | | MyCurrentUser myCurrentUser = new MyCurrentUser() |
| | | { |
| | | UserAccount = _currentUser.UserAccount, |
| | | UserId = _currentUser.UserId |
| | | }; |
| | | |
| | | var sheetNames = stream.GetSheetNames(); |
| | | var workPlanRows = sheetNames.Contains("é
ç½®") ? MiniExcel.Query<WorkPlansImportModel.WorkPlanImportModel>(stream, sheetName: "é
ç½®").ToList() : new(); |
| | | |
| | |
| | | throw new UserFriendlyException("è¯·æ£æ¥å¯¼å
¥çè¡¨æ ¼"); |
| | | } |
| | | |
| | | MyCurrentUser myCurrentUser = new MyCurrentUser() |
| | | { |
| | | UserAccount = _currentUser.UserAccount, |
| | | UserId = _currentUser.UserId |
| | | }; |
| | | await _workPlanAppService.ImportAsync(new WorkPlansImportModel |
| | | { |
| | | WorkPlans = workPlanRows, |
| | | }, userId, userAccount); |
| | | }, myCurrentUser); |
| | | |
| | | return Ok(); |
| | | } |
| | |
| | | |
| | | |
| | | //æ ¹æ®åææ è¯å¯»æ¾ ä½ä¸è®¡å |
| | | var workPlanList = await workPlanAppService.FindByDataIdentifierAsync(callMaterialOrder.DataIdentifier); |
| | | var workPlanList = await workPlanAppService.GetListByFilterAsync(x => x.DataIdentifier == callMaterialOrder.DataIdentifier); |
| | | if (workPlanList?.Count == 0) return;//ç»æ |
| | | |
| | | ////TODO:ææ¶çæäº§åID |
| | |
| | | pipeSpecCode3 = new_workPlanList[i].PipeSpecCode; |
| | | } |
| | | } |
| | | //è·å æ¹æ¬¡ |
| | | await callMaterialOrderAppService.wh |
| | | Dictionary<string, object?> keyValuePairs = new Dictionary<string, object?> |
| | | { |
| | | { "æç 工件1",code1}, |
| | |
| | | { "æç 管段ç¼ç ", new_workPlanList.First().PipeSpecCode }, |
| | | { "æç 管段åç§°", new_workPlanList.First().PipeSectionName }, |
| | | { "æç åæç®¡åå·", new_workPlanList.First().MaterialMode }, |
| | | { "æç åææ è¯", new_workPlanList.First().DataIdentifier } |
| | | { "æç åææ è¯", new_workPlanList.First().DataIdentifier }, |
| | | { "æç åæç®¡æ¹æ¬¡", new_workPlanList.First() }, |
| | | }; |
| | | _variableService.WriteValueAsync(keyValuePairs); |
| | | |
| | |
| | | |
| | | |
| | | //æ ¹æ®åææ è¯å¯»æ¾ ä½ä¸è®¡å |
| | | var workPlanList = await workPlanAppService.FindByDataIdentifierAsync(callMaterialOrder.DataIdentifier); |
| | | var workPlanList = await workPlanAppService.GetListByFilterAsync(x => x.DataIdentifier == callMaterialOrder.DataIdentifier); |
| | | if (workPlanList?.Count == 0) return;//ç»æ |
| | | |
| | | //TODO:ææ¶çæäº§åID |
| | |
| | | |
| | | |
| | | //æ ¹æ®åææ è¯å¯»æ¾ ä½ä¸è®¡å |
| | | var workPlanList = await workPlanAppService.FindByDataIdentifierAsync(callMaterialOrder.DataIdentifier); |
| | | var workPlanList = await workPlanAppService.GetListByFilterAsync(x => x.DataIdentifier == callMaterialOrder.DataIdentifier); |
| | | if (workPlanList?.Count == 0) return;//ç»æ |
| | | |
| | | ////TODO:ææ¶çæäº§åID |
| | |
| | | |
| | | |
| | | //æ ¹æ®åææ è¯å¯»æ¾ ä½ä¸è®¡å |
| | | var workPlanList = await workPlanAppService.FindByDataIdentifierAsync(callMaterialOrder.DataIdentifier); |
| | | var workPlanList = await workPlanAppService.GetListByFilterAsync(x => x.DataIdentifier == callMaterialOrder.DataIdentifier); |
| | | if (workPlanList?.Count == 0) return;//ç»æ |
| | | |
| | | //TODO:ææ¶çæäº§åID |