From cf008dbb6059fe42a384e8ab35e90c4d295b9dc7 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周日, 18 5月 2025 10:16:29 +0800 Subject: [PATCH] 获取 对象 --- PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly.ts | 9 + PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Services/IWorkPlanAppService.cs | 17 ++ PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.tsx | 2 PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanController.cs | 26 ++++ PipeLineLems/pipelinelems_web/src/images/pipe-assembly-drawing-example.png | 0 PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs | 53 ++++++++ PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.module.scss | 2 PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx | 250 +++++++++++++++++++++++++++++------------ 8 files changed, 283 insertions(+), 76 deletions(-) diff --git a/PipeLineLems/pipelinelems_web/src/images/pipe-assembly-drawing-example.png b/PipeLineLems/pipelinelems_web/src/images/pipe-assembly-drawing-example.png new file mode 100644 index 0000000..4f57200 --- /dev/null +++ b/PipeLineLems/pipelinelems_web/src/images/pipe-assembly-drawing-example.png Binary files differ diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly.ts b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly.ts index 9684a90..c73c49e 100644 --- a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly.ts +++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly.ts @@ -52,3 +52,12 @@ export const instock = (data: any) => { return request.post('/api/v1/HIAWms/wmsinsstock/bindinstock', data) } + + +/** + * 鏍规嵁 绠℃缂栫爜銆佸伐搴� 鏌ヨ 浣滀笟璁″垝 + * @returns + */ +export const findSingleWorkPlanByFilter = (data: any) => { + return request.post('/api/v1/PipeLineLems/WorkPlan/FindSingleByFilter', data) +} diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.module.scss b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.module.scss index a63ef3a..f0789b7 100644 --- a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.module.scss +++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.module.scss @@ -29,7 +29,7 @@ .el-form-item { margin-bottom: 0; // 绉婚櫎榛樿鐨勫簳閮ㄨ竟璺� - width: 100%; // 鍗犳弧鐖跺鍣ㄥ搴� + width: 100% !important; // 鍗犳弧鐖跺鍣ㄥ搴� } .el-form-item__label { diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx index 32c31fb..2f3a96f 100644 --- a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx +++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/Pages/PipeAccessoryAssembly/PipeAccessoryAssembly.tsx @@ -1,7 +1,7 @@ import { defineComponent, onMounted, ref } from 'vue' import type { Ref } from 'vue' import styles from './PipeAccessoryAssembly.module.scss' -import pipeImage from '@/images/pipe-assembly-drawing-example.png'; +import pipeImage from '@/images/pipe-assembly-drawing-example.png' import { ElInput, ElForm, @@ -16,6 +16,7 @@ getPlaceNoForStockList, getMaterialModelList, instock, + findSingleWorkPlanByFilter } from '@/widgets/PipeAccessoryAssembly/Models/Service/PipeAccessoryAssembly' import { Message } from '@element-plus/icons-vue/dist/types' @@ -23,12 +24,22 @@ name: 'PipeAccessoryAssembly', setup() { // 鏌ヨ琛ㄥ崟鏁版嵁 - const queryForm = ref({ - materialModel: '', - placeNo: '', - materialBatch: '', - stockNumber: '', - }) +const queryForm = ref({ + pipeSpecCode: '', + processRouteNumber: '', + taskCode: '', + length: '', + projectNumber: '', + shipNumber: '', + material: '', + outerDiameter: '', + thickness: '', + plannedStartTime: '', + plannedEndTime: '', + workstationCode: '', + processName: '', + equipmentCode: '' +}) // 鏁版嵁婧� const modelOptions = ref<Array<{ value: string; label: string }>>([]) @@ -80,10 +91,52 @@ label: item.placeNoDesc, })) } + const handleChange =async (value) => { + console.log('杈撳叆鍐呭纭:', value); // 澶卞幓鐒︾偣鎴栧洖杞︽椂瑙﹀彂 + // 鍦ㄦ澶勬坊鍔犱笟鍔¢�昏緫锛堝鏍¢獙銆佹彁浜ょ瓑锛� + const param={ + pipeSpecCode:value, + pipeSpecCode_FilterMode:2,//绮惧噯鏌ヨ + processName:'瑁呴厤宸ュ簭', + processName_FilterMode:2,//绮惧噯鏌ヨ + } + const workPlan = await findSingleWorkPlanByFilter(param); + console.log('杩斿洖:'+workPlan); + if(workPlan==''){ + ElMessage.error('娌℃湁鎵惧埌鏁版嵁'); + queryForm.value ={ pipeSpecCode: '', + processRouteNumber: '', + taskCode: '', + length: '', + projectNumber: '', + shipNumber: '', + material: '', + outerDiameter: '', + thickness: '', + plannedStartTime: '', + plannedEndTime: '', + workstationCode: '', + processName: '', + equipmentCode: ''} + }else{ + queryForm.value=workPlan; + } + }; return () => { return ( - <div class={styles.PipeAccessoryAssemblyContent} style="overflow-y: auto !important; height: 100%;"> + <div + class={styles.PipeAccessoryAssemblyContent} + style="overflow-y: auto !important; height: 100%;" + > + <ElFormItem label="绠℃缂栧彿"> + <ElInput + v-model={queryForm.value.pipeSpecCode} + clearable + class={styles.formInput} + onInput={handleChange} + /> + </ElFormItem> <div class={styles.actionButtons}> <ElButton type="warning">寮�宸�</ElButton> <ElButton type="warning">瀹屽伐</ElButton> @@ -91,85 +144,135 @@ <ElButton type="warning">鑷姩</ElButton> <ElButton type="warning">璐ㄦ</ElButton> </div> - - <h2 class={styles.blockTitle}>褰撳墠宸ヤ綅/璁惧淇℃伅</h2> - {/* <div class={styles.modelRrow}> */} - {/* <div> */} - <div class={styles.headerContent}> - <div class={styles.header}> - <ElForm label-position="right" class={styles.h5Form}> - <ElFormItem label="鍨嬪彿1"> - <ElSelect - v-model={queryForm.value.materialModel} - placeholder="璇烽�夋嫨鍨嬪彿" - clearable + <h2 class={styles.blockTitle}>褰撳墠浠诲姟</h2> + <ElForm label-position="left" > + + <ElFormItem label="鐗╂枡娴佸悜"> + <ElInput + v-model={queryForm.value.processRouteNumber} disabled + clearable class={styles.formInput} - > - {modelOptions.value.map((item) => ( - <ElOption - key={item.value} - label={item.label} - value={item.value} - /> - ))} - </ElSelect> + /> </ElFormItem> - <ElFormItem label="鍨嬪彿2"> - <ElSelect - v-model={queryForm.value.materialModel} - placeholder="璇烽�夋嫨鍨嬪彿" - clearable + <ElFormItem label="浠诲姟缂栧彿"> + <ElInput + v-model={queryForm.value.taskCode} disabled + clearable class={styles.formInput} - > - {modelOptions.value.map((item) => ( - <ElOption - key={item.value} - label={item.label} - value={item.value} - /> - ))} - </ElSelect> + /> </ElFormItem> - <ElFormItem label="鍨嬪彿3"> - <ElSelect - v-model={queryForm.value.materialModel} - placeholder="璇烽�夋嫨鍨嬪彿" - clearable + <ElFormItem label="绠℃闀垮害"> + <ElInput + v-model={queryForm.value.length} disabled + clearable class={styles.formInput} - > - {modelOptions.value.map((item) => ( - <ElOption - key={item.value} - label={item.label} - value={item.value} - /> - ))} - </ElSelect> + /> </ElFormItem> - <ElFormItem label="鍨嬪彿4"> - <ElSelect - v-model={queryForm.value.materialModel} - placeholder="璇烽�夋嫨鍨嬪彿" - clearable + <ElFormItem label="椤圭洰鍙�"> + <ElInput + v-model={queryForm.value.projectNumber} disabled + clearable class={styles.formInput} - > - {modelOptions.value.map((item) => ( - <ElOption - key={item.value} - label={item.label} - value={item.value} - /> - ))} - </ElSelect> + /> + </ElFormItem> + <ElFormItem label="鑸瑰彿"> + <ElInput + v-model={queryForm.value.shipNumber} + disabled + clearable + class={styles.formInput} + /> + </ElFormItem> + <ElFormItem label="鏉愯川"> + <ElInput + v-model={queryForm.value.material} + disabled + clearable + class={styles.formInput} + /> + </ElFormItem> + <ElFormItem label="澶栧緞"> + <ElInput + v-model={queryForm.value.outerDiameter} + disabled + clearable + class={styles.formInput} + /> + </ElFormItem> + <ElFormItem label="澹� 鍘�"> + <ElInput + v-model={queryForm.value.thickness} + disabled + clearable + class={styles.formInput} + /> + </ElFormItem> + <ElFormItem label="璁″垝寮�濮嬫椂闂�"> + <ElInput + v-model={queryForm.value.plannedStartTime} + disabled + clearable + class={styles.formInput} + /> + </ElFormItem> + <ElFormItem label="璁″垝瀹屾垚鏃堕棿"> + <ElInput + v-model={queryForm.value.plannedEndTime} + disabled + clearable + class={styles.formInput} + /> </ElFormItem> </ElForm> - </div> - </div> + + <h2 class={styles.blockTitle}>褰撳墠宸ヤ綅/璁惧淇℃伅</h2> + <ElForm label-position="left" > + <ElFormItem label="宸ヤ綅浠g爜"> + <ElInput + v-model={queryForm.value.workstationCode} + disabled + clearable + class={styles.formInput} + /> + </ElFormItem> + <ElFormItem label="宸ュ簭鍚嶇О"> + <ElInput + v-model={queryForm.value.processName} + disabled + clearable + class={styles.formInput} + /> + </ElFormItem> + <ElFormItem label="璁惧浠g爜"> + <ElInput + v-model={queryForm.value.equipmentCode} + disabled + clearable + class={styles.formInput} + /> + </ElFormItem> + {/* <ElFormItem label="璁惧鐘舵��"> + <ElInput + v-model={queryForm.value.materialBatch} + disabled + clearable + class={styles.formInput} + /> + </ElFormItem> */} + {/* <ElFormItem label="鎿嶄綔浜�"> + <ElInput + v-model={queryForm.value.materialBatch} + disabled + clearable + class={styles.formInput} + /> + </ElFormItem> */} + </ElForm> <div class="info-block"> <h2 class="block-title">宸ヨ壓淇℃伅</h2> @@ -186,7 +289,6 @@ style="height:1250px;" class="equipment-image" ></img> - </div> ) } diff --git a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.tsx b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.tsx index 9a6f747..0d03f55 100644 --- a/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.tsx +++ b/PipeLineLems/pipelinelems_web/src/widgets/PipeAccessoryAssembly/Views/PipeAccessoryAssembly.tsx @@ -22,7 +22,7 @@ const entityNames = getEntityNames(Models) -const nameToLabelMap = [{ name: 'PipeAccessoryAssembly', label: '缁勭洏鍏ュ簱' }] +const nameToLabelMap = [{ name: 'PipeAccessoryAssembly', label: '绠¢檮浠惰閰�' }] export default defineComponent({ name: 'PipeAccessoryAssembly', diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Services/IWorkPlanAppService.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Services/IWorkPlanAppService.cs index 1910392..4e92385 100644 --- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Services/IWorkPlanAppService.cs +++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Services/IWorkPlanAppService.cs @@ -1,3 +1,4 @@ +using Ao.Stock.Mirror; using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.WorkPlan; using CMS.Plugin.PipeLineLems.Domain.WorkPlan; using CmsQueryExtensions.Entitys; @@ -69,4 +70,20 @@ /// <returns></returns> /// <exception cref="UserFriendlyException"></exception> Task<WorkPlan> GetSingleByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, bool is鈥婱ultipleThrowException = false, CancellationToken cancellationToken = default); + + + /// <summary> + /// 鏍规嵁鏉′欢鑾峰彇浣滀笟璁″垝琛ㄥ垪琛� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + Task<List<WorkPlanDto>> FindListByFilterAsync(GetWorkPlanInput input, CancellationToken cancellationToken = default); + + /// <summary> + /// 鏍规嵁鏉′欢鑾峰彇鍗曚釜浣滀笟璁″垝琛� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + Task<WorkPlanDto> FindSingleByFilterAsync(GetWorkPlanInput input, CancellationToken cancellationToken = default); + } diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs index ce8adc5..01ffc44 100644 --- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs +++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs @@ -12,6 +12,7 @@ using Volo.Abp.ObjectMapping; using Volo.Abp.Users; using CmsQueryExtensions.Entitys; +using System.Collections.Generic; namespace CMS.Plugin.PipeLineLems.Application.Implements; @@ -543,4 +544,56 @@ { return await _workPlanRepository.GetSingleByFilterAsync(whereConditions, is鈥婱ultipleThrowException); } + + + /// <summary> + /// 鏍规嵁鏉′欢鑾峰彇浣滀笟璁″垝琛ㄥ垪琛� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + public virtual async Task<List<WorkPlanDto>> FindListByFilterAsync(GetWorkPlanInput input, CancellationToken cancellationToken = default) + { + Check.NotNull(input, nameof(input)); + + if (input.Sorting.IsNullOrWhiteSpace()) + { + input.Sorting = nameof(WorkPlan.Sort); + } + + #region 鍔ㄦ�佹瀯閫犳煡璇㈡潯浠� + + //鍔ㄦ�佹瀯閫犳煡璇㈡潯浠� + var whereConditions = DynamicGetQueryParams(input); + + #endregion + + var list = await _workPlanRepository.GetListByFilterAsync(whereConditions?.data); + + return new List<WorkPlanDto>(ObjectMapper.Map<List<WorkPlan>, List<WorkPlanDto>>(list)); + } + /// <summary> + /// 鏍规嵁鏉′欢鑾峰彇鍗曚釜浣滀笟璁″垝琛� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + public virtual async Task<WorkPlanDto> FindSingleByFilterAsync(GetWorkPlanInput input, CancellationToken cancellationToken = default) + { + Check.NotNull(input, nameof(input)); + + if (input.Sorting.IsNullOrWhiteSpace()) + { + input.Sorting = nameof(WorkPlan.Sort); + } + + #region 鍔ㄦ�佹瀯閫犳煡璇㈡潯浠� + + //鍔ㄦ�佹瀯閫犳煡璇㈡潯浠� + var whereConditions = DynamicGetQueryParams(input); + + #endregion + + var dataObj = await _workPlanRepository.GetSingleByFilterAsync(whereConditions?.data); + + return (ObjectMapper.Map<WorkPlan, WorkPlanDto>(dataObj)); + } } diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanController.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanController.cs index 7e797c8..16f075a 100644 --- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanController.cs +++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanController.cs @@ -11,6 +11,8 @@ using Volo.Abp; using Volo.Abp.Application.Dtos; using CmsQueryExtensions.Entitys; +using CMS.Plugin.PipeLineLems.Domain.WorkPlan; +using System.Linq.Expressions; namespace CMS.Plugin.PipeLineLems.Controller { @@ -63,6 +65,30 @@ } /// <summary> + /// 鏍规嵁鏉′欢鑾峰彇浣滀笟璁″垝琛ㄥ垪琛� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [Route("FindListByFilter")] + public virtual async Task<List<WorkPlanDto>> FindListByFilterAsync(GetWorkPlanInput input) + { + return await _workPlanAppService.FindListByFilterAsync(input); + } + /// <summary> + /// 鏍规嵁鏉′欢鑾峰彇鍗曚釜浣滀笟璁″垝琛� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [Route("FindSingleByFilter")] + public virtual async Task<WorkPlanDto> FindSingleByFilterAsync(GetWorkPlanInput input) + { + + return await _workPlanAppService.FindSingleByFilterAsync(input); + } + + /// <summary> /// 鍒涘缓浣滀笟璁″垝琛� /// </summary> /// <param name="input">鍒涘缓鍙傛暟</param> -- Gitblit v1.9.3