jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -109,6 +109,6 @@ @GetMapping("/upDownMove") public AjaxResult upDownMove(OmProductionOrdeInfo omProductionOrdeInfo) { return toAjax(omProductionOrdeInfoService.upDownMove(omProductionOrdeInfo)); return omProductionOrdeInfoService.upDownMove(omProductionOrdeInfo); } } jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/mapper/OmProductionOrdeInfoMapper.java
@@ -59,4 +59,6 @@ * @return 结果 */ public int deleteOmProductionOrdeInfoByIds(Long[] ids); public Integer getMaxStreamNumber(); } jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java
@@ -1,5 +1,6 @@ package com.jcdm.main.om.productionOrde.service; import com.jcdm.common.core.domain.AjaxResult; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import java.util.List; @@ -60,5 +61,5 @@ */ public int deleteOmProductionOrdeInfoById(Long id); int upDownMove(OmProductionOrdeInfo omProductionOrdeInfo); AjaxResult upDownMove(OmProductionOrdeInfo omProductionOrdeInfo); } jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java
@@ -3,6 +3,7 @@ import java.util.List; import java.util.stream.Collectors; import com.jcdm.common.core.domain.AjaxResult; import com.jcdm.common.utils.DateUtils; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import com.jcdm.main.om.productionOrde.mapper.OmProductionOrdeInfoMapper; @@ -59,6 +60,8 @@ public int insertOmProductionOrdeInfo(OmProductionOrdeInfo omProductionOrdeInfo) { omProductionOrdeInfo.setCreateTime(DateUtils.getNowDate()); Integer streamNumber = omProductionOrdeInfoMapper.getMaxStreamNumber(); omProductionOrdeInfo.setStreamNumber(String.valueOf(streamNumber+1)); return omProductionOrdeInfoMapper.insertOmProductionOrdeInfo(omProductionOrdeInfo); } @@ -100,7 +103,7 @@ } @Override public int upDownMove(OmProductionOrdeInfo omProductionOrdeInfo) { public AjaxResult upDownMove(OmProductionOrdeInfo omProductionOrdeInfo) { long currentId = omProductionOrdeInfo.getFrontEndId(); List<OmProductionOrdeInfo> omProductionOrdeInfos = omProductionOrdeInfoService.selectOmProductionOrdeInfoList(omProductionOrdeInfo); List<Long> idList = omProductionOrdeInfos.stream() @@ -108,10 +111,14 @@ .collect(Collectors.toList()); int index = idList.indexOf(currentId); long moveId = 0L; if(omProductionOrdeInfo.getFlag().equals("up")){ moveId = idList.get(index - 1); }else { moveId = idList.get(index + 1); try { if(omProductionOrdeInfo.getFlag().equals("up")){ moveId = idList.get(index - 1); }else { moveId = idList.get(index + 1); } }catch (Exception e){ return AjaxResult.error("当前工单为最后一个或第一个,无法移动"); } OmProductionOrdeInfo currentInfo = new OmProductionOrdeInfo(); currentInfo.setId(currentId); @@ -125,6 +132,6 @@ omProductionOrdeInfoService.updateOmProductionOrdeInfo(moveOrdeInfos.get(0)); currentOrdeInfos.get(0).setStreamNumber(moveStreamNumber); omProductionOrdeInfoService.updateOmProductionOrdeInfo(currentOrdeInfos.get(0)); return 1; return AjaxResult.success("移动成功"); } } jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml
@@ -214,4 +214,8 @@ #{id} </foreach> </delete> <select id="getMaxStreamNumber" resultType="Integer"> SELECT MAX(stream_number) AS streamNumber FROM om_production_orde_info </select> </mapper> jcdm-ui/src/views/main/bs/ProductBom/index.vue
@@ -166,7 +166,7 @@ /> <!-- 添加或修改基础BOM对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} jcdm-ui/src/views/main/bs/ProductBomChild/index.vue
@@ -159,7 +159,7 @@ /> <!-- 添加或修改基础BOM子信息对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} jcdm-ui/src/views/main/bs/lineInfo/index.vue
@@ -84,26 +84,26 @@ </el-row> <el-table v-loading="loading" border :data="lineInfoList" @selection-change="handleSelectionChange" v-if="lineInfoList.length > 0"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="产线编号" align="center" prop="lineCode"> <el-table-column label="产线编号" width="120" align="center" prop="lineCode"> </el-table-column> <el-table-column :show-overflow-tooltip='true' label="产线名称" align="center" prop="lineName"> </el-table-column> <el-table-column label="车间编码" align="center" prop="workshopCode"> <el-table-column label="车间编码" width="120" align="center" prop="workshopCode"> </el-table-column> <el-table-column label="车间名称" align="center" prop="workshopName"> <el-table-column label="车间名称" width="120" align="center" prop="workshopName"> </el-table-column> <el-table-column label="状态" align="center" prop="status" width="80"> <template slot-scope="scope"> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> </template> </el-table-column> <el-table-column label="备注" align="center" prop="remarks"> <el-table-column label="备注" width="150" align="center" prop="remarks"> </el-table-column> <el-table-column label="创建人" align="center" prop="createUser" width="80"> <el-table-column label="创建人" align="center" prop="createUser" width="150"> </el-table-column> <el-table-column label="创建时间" align="center" prop="createTime" width="170"> </el-table-column> <el-table-column label="更新人" align="center" prop="updateUser" width="80"> <el-table-column label="更新人" align="center" prop="updateUser" width="150"> </el-table-column> <el-table-column label="更新时间" align="center" prop="updateTime" width="170"> </el-table-column> @@ -169,7 +169,7 @@ <!-- 添加或修改产线信息对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} @@ -182,20 +182,17 @@ <el-input v-model="form.lineName" placeholder="请输入产线名称" /> </el-form-item> <el-form-item label="车间编号" prop="workshopCode"> <el-input v-model="form.workshopCode" placeholder="请输入车间编号" /> </el-form-item> <el-form-item style="margin-left: -15px" label="车间编号" prop="workshopCode"> <el-select style="width: 93%" v-model="form.workshopCode" placeholder="请选择车间编号"> <el-select style="width: 100%" @change="handleSelectChange(form.workshopCode)" v-model="form.workshopCode" placeholder="请选择车间编号"> <el-option v-for="item in lineOptions" :key="item.lineCode" :label="item.lineName" :value="item.lineCode"> v-for="item in options" :key="item.workshopCode" :label="item.workshopCode" :value="item.workshopCode"> </el-option> </el-select> </el-form-item> <el-form-item label="车间名称" prop="workshopName"> <el-input v-model="form.workshopName" placeholder="请输入车间名称" /> <el-input disabled v-model="form.workshopName" placeholder="请输入车间名称" /> </el-form-item> <el-form-item label="状态" prop="status"> <el-radio-group v-model="form.status"> @@ -221,6 +218,7 @@ <script> import { listLineInfo, getLineInfo, delLineInfo, addLineInfo, updateLineInfo } from "@/api/main/bs/lineInfo/lineInfo"; import {listWorkshop} from "@/api/main/bs/workshop/workshop"; export default { name: "LineInfo", @@ -229,6 +227,7 @@ return { // 遮罩层 loading: true, options: [], titleName: 'test', // 选中数组 ids: [], @@ -282,8 +281,21 @@ }, created() { this.getList(); this.initWorkshop(); }, methods: { // 在这里编写处理选中事件的逻辑 handleSelectChange(selectedOption) { this.queryParams.workshopCode = selectedOption; listWorkshop(this.queryParams).then(response => { this.form.workshopName = response.rows[0].workshopName; }); }, initWorkshop(){ listWorkshop(this.queryParams).then(response => { this.options = response.rows; }); }, advancedQuery(){ this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true; }, jcdm-ui/src/views/main/bs/material/index.vue
@@ -160,7 +160,7 @@ /> <!-- 添加或修改物料信息对话框 --> <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="700px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} jcdm-ui/src/views/main/bs/processes/index.vue
@@ -135,7 +135,7 @@ /> <!-- 添加或修改工序信息对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} jcdm-ui/src/views/main/bs/technologyRoute/index.vue
@@ -153,16 +153,16 @@ /> <!-- 添加或修改工艺流程对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} </span> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="工艺流程编码" prop="routeCode"> <el-form-item label="流程编码" prop="routeCode"> <el-input v-model="form.routeCode" placeholder="请输入工艺流程编码" /> </el-form-item> <el-form-item label="工艺流程名称" prop="routeName"> <el-form-item label="流程名称" prop="routeName"> <el-input v-model="form.routeName" placeholder="请输入工艺流程名称" /> </el-form-item> <el-form-item label="产品编码" prop="productCode"> jcdm-ui/src/views/main/bs/technologyRouteChild/index.vue
@@ -184,7 +184,7 @@ /> <!-- 添加或修改工艺路线子信息对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} @@ -341,7 +341,7 @@ }, /** 返回按钮操作 */ handleClose() { const obj = { path: "/main/technologyRoute" }; const obj = { path: "/main/pm/technologyRoute" }; this.$tab.closeOpenPage(obj); }, /** 查询工艺路线子信息列表 */ jcdm-ui/src/views/main/bs/workshop/index.vue
@@ -77,22 +77,22 @@ <el-table v-loading="loading" border :data="workshopList" @selection-change="handleSelectionChange" v-if="workshopList.length > 0"> <el-table-column type="selection" width="55" align="center" /> <!-- <el-table-column label="id" align="center" prop="id" />--> <el-table-column label="车间编码" align="center" prop="workshopCode"> <el-table-column label="车间编码" width="120" align="center" prop="workshopCode"> </el-table-column> <el-table-column :show-overflow-tooltip='true' label="车间名称" align="center" prop="workshopName"> <el-table-column :show-overflow-tooltip='true' width="150" label="车间名称" align="center" prop="workshopName"> </el-table-column> <el-table-column label="状态" align="center" prop="status" width="80"> <template slot-scope="scope"> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> </template> </el-table-column> <el-table-column label="备注" align="center" prop="remarks"> <el-table-column label="备注" width="150" align="center" prop="remarks"> </el-table-column> <el-table-column label="创建人" align="center" prop="createUser" width="80"> <el-table-column label="创建人" align="center" prop="createUser" width="150"> </el-table-column> <el-table-column label="创建时间" align="center" prop="createTime" width="180"> </el-table-column> <el-table-column label="更新人" align="center" prop="updateUser" width="80"> <el-table-column label="更新人" align="center" prop="updateUser" width="150"> </el-table-column> <el-table-column label="更新时间" align="center" prop="updateTime" width="180"> </el-table-column> jcdm-ui/src/views/main/da/collectionParamConf/index.vue
@@ -199,7 +199,7 @@ /> <!-- 添加或修改采集参数配置对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} jcdm-ui/src/views/main/da/opcuaconfig/index.vue
@@ -198,7 +198,7 @@ /> <!-- 添加或修改OPCUA参数设置对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="所属模块" prop="module"> <el-input v-model="form.module" placeholder="请输入所属模块" /> jcdm-ui/src/views/main/da/paramCollection/index.vue
@@ -181,7 +181,7 @@ /> <!-- 添加或修改设备产品过程参数采集对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="工单编号" prop="workOrderNo"> <el-input v-model="form.workOrderNo" type="textarea" placeholder="请输入内容" /> jcdm-ui/src/views/main/da/passingStationCollection/index.vue
@@ -171,7 +171,7 @@ /> <!-- 添加或修改产品过站采集对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form-item label="工单编号" prop="workOrderNo"> <el-input v-model="form.workOrderNo" type="textarea" placeholder="请输入内容" /> jcdm-ui/src/views/main/em/equipmentAlarm/index.vue
@@ -149,7 +149,7 @@ /> <!-- 添加或修改设备报警对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="设备编号" prop="equipmentCode"> <el-input v-model="form.equipmentCode" placeholder="请输入设备编号" /> jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -265,7 +265,7 @@ /> <!-- 添加或修改生产工单对话框 --> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="1000px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} @@ -466,6 +466,7 @@ this.queryParams.idNums = ids this.queryParams.flag = 'up' upDownMove(this.queryParams).then(response => { this.$modal.msgSuccess("移动成功"); this.getList(); }); }, @@ -477,6 +478,7 @@ this.queryParams.idNums = ids this.queryParams.flag = 'down' upDownMove(this.queryParams).then(response => { this.$modal.msgSuccess("移动成功"); this.getList(); }); }, @@ -593,24 +595,35 @@ }, // 多选框选中数据 handleSelectionChange(selection) { // this.ids = selection.map(item => item.id) // const statusSize = selection.map(item => item.orderStatus) // const intArr = statusSize.map(str => parseInt(str)); // const sum = intArr.reduce((a, b) => a + b, 0); // this.single = selection.length!==1 // this.multiple = !selection.length // if(selection[0].orderStatus!== '1'||sum!==selection.length){ // this.single = true // this.multiple = true // } // if(selection.length > 1){ // this.move = true // }else { // this.move = false // } this.ids = selection.map(item => item.id) const statusSize = selection.map(item => item.orderStatus) const intArr = statusSize.map(str => parseInt(str)); const sum = intArr.reduce((a, b) => a + b, 0); this.single = selection.length!==1 this.multiple = !selection.length if(selection[0].orderStatus!== '1'||sum!==selection.length){ // this.single = selection.length!==1 // this.multiple = !selection.length this.move = selection.length!==1 if(!selection.length){ this.single = true this.multiple = true } if(selection.length > 1){ this.move = true }else { this.move = false if(selection[0].orderStatus === '1' && selection.length === 1){ this.single = false this.multiple = false } } // if (selection.length === 1) { // this.move = false; // } }, /** 新增按钮操作 */ jcdm-ui/src/views/main/om/workReport/index.vue
@@ -148,7 +148,7 @@ /> <!-- 添加或修改报工记录表对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <span slot="title"> <i class="el-icon-s-order"></i> {{titleName}} jcdm-ui/src/views/main/rm/repairRecord/index.vue
@@ -118,7 +118,7 @@ /> <!-- 添加或修改返修记录对话框 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="总成编码" prop="snCode"> <el-input v-model="form.snCode" placeholder="请输入总成编码" />