| | |
| | | getPlaceNoForStockList, |
| | | getMaterialModelList, |
| | | instock, |
| | | findSingleWorkPlanByFilter, |
| | | pick, |
| | | finishProduction |
| | | getPickRet, |
| | | pick |
| | | } from '@/widgets/PipeAccessoryPick/Models/Service/PipeAccessoryPick' |
| | | import { Message } from '@element-plus/icons-vue/dist/types' |
| | | |
| | |
| | | const queryForm = ref({ |
| | | pipeSpecCode: '', |
| | | continerNo:'', |
| | | placeNo:'', |
| | | processRouteNumber: '', |
| | | taskCode: '', |
| | | length: '', |
| | |
| | | |
| | | onMounted(() => { |
| | | // 组件挂载后获取型号列表和库位号列表 |
| | | getModelList() |
| | | getPlaceNoList() |
| | | // getModelList() |
| | | // getPlaceNoList() |
| | | }) |
| | | |
| | | // 组盘操作 |
| | |
| | | } |
| | | const handleChange =async (value) => { |
| | | console.log('输入内容确认:', value); // 失去焦点或回车时触发 |
| | | if(value==''){ |
| | | initQueryForm(); |
| | | return; |
| | | } |
| | | // 在此处添加业务逻辑(如校验、提交等) |
| | | const param={ |
| | | pipeSpecCode:value, |
| | | pipeSpecCode_FilterMode:2,//精准查询 |
| | | processName:'装配工序', |
| | | processName:'切割工序', |
| | | processName_FilterMode:2,//精准查询 |
| | | } |
| | | const workPlan = await findSingleWorkPlanByFilter(param); |
| | | const workPlan = await getPickRet(param); |
| | | console.log('返回:'+workPlan); |
| | | if(workPlan==''){ |
| | | if(workPlan.code!="200"){ |
| | | ElMessage.error('没有找到数据'); |
| | | queryForm.value ={ pipeSpecCode: '', |
| | | continerNo:'', |
| | | processRouteNumber: '', |
| | | taskCode: '', |
| | | length: '', |
| | | projectNumber: '', |
| | | shipNumber: '', |
| | | material: '', |
| | | outerDiameter: '', |
| | | thickness: '', |
| | | plannedStartTime: '', |
| | | plannedEndTime: '', |
| | | workstationCode: '', |
| | | processName: '', |
| | | equipmentCode: ''} |
| | | initQueryForm(); |
| | | }else{ |
| | | queryForm.value=workPlan; |
| | | queryForm.value=workPlan.data.workPlan; |
| | | |
| | | queryForm.value.placeNo=workPlan.data.placeNo; |
| | | queryForm.value.continerNo=workPlan.data.continerNo; |
| | | } |
| | | }; |
| | | |
| | | const initQueryForm=()=>{ |
| | | queryForm.value ={ pipeSpecCode: '', |
| | | continerNo:'', |
| | | placeNo:'', |
| | | processRouteNumber: '', |
| | | taskCode: '', |
| | | length: '', |
| | | projectNumber: '', |
| | | shipNumber: '', |
| | | material: '', |
| | | outerDiameter: '', |
| | | thickness: '', |
| | | plannedStartTime: '', |
| | | plannedEndTime: '', |
| | | workstationCode: '', |
| | | processName: '', |
| | | equipmentCode: ''} |
| | | } |
| | | |
| | | // 分拣事件处理 |
| | | const startWork = () => { |
| | |
| | | const param={ |
| | | pipeSpecCode:queryForm.value.pipeSpecCode, |
| | | continerNo:queryForm.value.continerNo, |
| | | placeNo:queryForm.value.placeNo |
| | | }; |
| | | |
| | | const ret = await pick(param); |
| | | console.log('返回:'+ret); |
| | | if(ret.code="200"){ |
| | | |
| | | if(ret.code=="200"){ |
| | | ElMessage.success('分拣成功'); |
| | | }else{ |
| | | ElMessage.error('分拣失败:'+ret.message); |
| | | } |
| | | }) |
| | | } |
| | | // 完工事件处理 |
| | | const finishWork = () => { |
| | | console.log('执行开工操作'); |
| | | if(queryForm.value.pipeSpecCode==''){ |
| | | ElMessage.error('请输入管段编码'); |
| | | return |
| | | } |
| | | ConfirmBox( |
| | | `确定要将管段编码${queryForm.value.pipeSpecCode}完工吗` |
| | | ).then(async () => { |
| | | //您的业务逻辑 |
| | | const param={ |
| | | pipeSpecCode:queryForm.value.pipeSpecCode, |
| | | processName:queryForm.value.processName, |
| | | }; |
| | | const ret = await finishProduction(param); |
| | | console.log('返回:'+ret); |
| | | if(ret.code="200"){ |
| | | ElMessage.success('完工成功'); |
| | | }else{ |
| | | ElMessage.error('完工失败:'+ret.message); |
| | | } |
| | | }) |
| | | } |
| | | // // 完工事件处理 |
| | | // const finishWork = () => { |
| | | // console.log('执行开工操作'); |
| | | // if(queryForm.value.pipeSpecCode==''){ |
| | | // ElMessage.error('请输入管段编码'); |
| | | // return |
| | | // } |
| | | // ConfirmBox( |
| | | // `确定要将管段编码${queryForm.value.pipeSpecCode}完工吗` |
| | | // ).then(async () => { |
| | | // //您的业务逻辑 |
| | | // const param={ |
| | | // pipeSpecCode:queryForm.value.pipeSpecCode, |
| | | // processName:queryForm.value.processName, |
| | | |
| | | // }; |
| | | // const ret = await finishProduction(param); |
| | | // console.log('返回:'+ret); |
| | | // if(ret.code="200"){ |
| | | // ElMessage.success('完工成功'); |
| | | // }else{ |
| | | // ElMessage.error('完工失败:'+ret.message); |
| | | // } |
| | | // }) |
| | | // } |
| | | const tableData = ref([ |
| | | { sequence: 1, flangeA: 'RF-200-1.6MPa', flangeB: 'WN-200-1.6MPa' }, |
| | | { sequence: 2, flangeA: 'WN-250-2.5MPa', flangeB: 'SO-250-2.5MPa' }, |
| | |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <ElFormItem label="库位号 "> |
| | | <ElInput |
| | | v-model={queryForm.value.placeNo} |
| | | clearable |
| | | class={styles.formInput} |
| | | /> |
| | | </ElFormItem> |
| | | <div class={styles.actionButtons}> |
| | | <ElButton type="warning" onClick={startWork}>分拣</ElButton> |
| | | {/* <ElButton type="warning" onClick={finishWork}>完工</ElButton> */} |