| src/views/console/product-process/process-route.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/console/product-process/process-route/add-craft-version.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/console/product-process/process-route/addWorking.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/console/product-process/process-route/addWorkmanship.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/console/product-process/process-route/workmanship.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/console/product-process/process-route.vue
@@ -47,6 +47,7 @@ </div> <div class="correlation-product-line">关联产线<span>千文科技</span></div> <div class="process-main-content"> <!-- isCustomization 新建/步骤 --> <workmanship :isCustomization="true" :craftId="craftId"></workmanship> </div> </div> @@ -120,7 +121,7 @@ this.craftId = item.id; }, addVision() { this.$router.push({path: `/console/product-process/process-route/add-craft-version`,query: {id:this.id}}) this.$router.push({path: `/console/product-process/process-route/add-craft-version`,query: {id:this.id,craftId:this.craftId}}) }, addRoute() { this.$router.push({path: `/console/product-process/process-route/add-craft`,query: {id:this.id}}) src/views/console/product-process/process-route/add-craft-version.vue
@@ -153,14 +153,16 @@ } }) }, setStep0() { goStep1() { var obj = Object.assign({},this.addStepForm0); obj.craftId = this.$route.query.id; obj.id = this.$route.query.craftId; this.$refs.dialogForm0.validate(async (valid) => { if (valid) { this.$HTTP.post(`/api/blade-cps/production-craft-version/insert?craftId=${this.$route.query.id}`,obj).then(res=> { this.$HTTP.put(`/api/blade-cps/production-craft-version/update`,obj).then(res=> { if(res.code == 200) { this.active = 1; this.getVersionDetail(res.data.id); //this.getVersionDetail(res.data.id); }else { this.$alert(res.message, "提示", {type: 'error'}); } @@ -186,7 +188,7 @@ }, next() { if(this.active == 0) { this.setStep0(); this.goStep1(); }else if(this.active == 1) { }else if(this.active == 2) { @@ -197,6 +199,11 @@ this.$HTTP.get(`/api/blade-cps/craft-routing/detail?id=${this.$route.query.id}`).then(res=> { if(res.code == 200) { this.detail = res.data; res.data.dtos.forEach(item=> { if(item.id == this.$route.query.craftId) { this.addStepForm0.name = item.name; } }) } }) } src/views/console/product-process/process-route/addWorking.vue
@@ -2,7 +2,7 @@ * @Author: lzhe lzhe@example.com * @Date: 2024-05-24 11:25:26 * @LastEditors: lzhe lzhe@example.com * @LastEditTime: 2024-05-24 15:24:10 * @LastEditTime: 2024-05-27 14:11:14 * @FilePath: /src/views/console/product-process/process-route/addWorking.vue * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE --> src/views/console/product-process/process-route/addWorkmanship.vue
@@ -2,12 +2,12 @@ * @Author: lzhe lzhe@example.com * @Date: 2024-05-24 11:25:26 * @LastEditors: lzhe lzhe@example.com * @LastEditTime: 2024-05-24 15:24:10 * @LastEditTime: 2024-05-27 17:55:54 * @FilePath: /src/views/console/product-process/process-route/addWorking.vue * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE --> <template> <el-form :inline="true" :model="workmanshipForm" :rules="workmanshipRules" label-width="80px" class="form-view-data"> <el-form :inline="true" :model="workmanshipForm" :rules="workmanshipRules" label-width="100px" class="form-view-data"> <el-row> <el-col :span="24"> <el-form-item label="工序编号" prop="test0"> @@ -33,7 +33,7 @@ <el-input-number v-model="workmanshipForm.sort" :min="1" :max="10" @change="handleChange" /> </el-form-item> </el-col> <el-col :span="24"> <el-col :span="24" v-if="workmanshipForm.processTypeName != '测量'"> <el-form-item label="标准用时"> <el-input v-model="workmanshipForm.d" style="width: 20%;margin-right: 12px;"> <template #suffix>天</template> @@ -49,14 +49,14 @@ </el-input> </el-form-item> </el-col> <el-col :span="8"> <el-col :span="8" v-if="workmanshipForm.processTypeName != '测量'"> <el-form-item label="准备工时"> <el-input v-model="workmanshipForm.prepareTime"> <template #suffix>分</template> </el-input> </el-form-item> </el-col> <el-col :span="8"> <el-col :span="8" v-if="workmanshipForm.processTypeName != '测量'"> <el-form-item label="装卸工时"> <el-input v-model="workmanshipForm.disassemblyTime"> <template #suffix>分</template> @@ -70,7 +70,7 @@ </el-input> </el-form-item> </el-col> <el-col :span="12"> <el-col :span="12" v-if="workmanshipForm.processTypeName != '测量'"> <el-form-item label="加工程序"> <el-tree-select v-if="workmanshipForm.isSelectProgramFiles" @@ -89,12 +89,12 @@ <el-input v-if="!workmanshipForm.isSelectProgramFiles" v-model="workmanshipForm.programName"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-col :span="12" v-if="workmanshipForm.processTypeName != '测量'"> <el-form-item label=""> <el-checkbox v-model="workmanshipForm.isSelectProgramFiles" label="选择程序文件" size="small"/> </el-form-item> </el-col> <el-col :span="12"> <el-col :span="12" v-if="workmanshipForm.processTypeName != '测量'"> <el-form-item label="工艺包"> <el-tree-select @change = "bagIdChange" @@ -109,6 +109,25 @@ :props="{ label: 'name' }" style="width:100%;" :render-after-expand="false" /> </el-form-item> </el-col> <el-col :span="24" v-if="workmanshipForm.processTypeName == '测量'"> <el-form-item label="测量方式"> <el-checkbox-group v-model="workmanshipForm.checkListData" class="flexColumn"> <el-checkbox v-for="item in checkList" :label="item.name"></el-checkbox> </el-checkbox-group> </el-form-item> <el-input-number v-model="workmanshipForm.meaMethodValue" :min="1" :max="10" /> <span style="margin-left: 12px;">维护为0,则为必检工序;维护为非0,则为频次抽检</span> </el-col> <el-col :span="24" v-if="workmanshipForm.processTypeName == '测量'"> <el-form-item label="不合格处理方式"> <el-radio-group v-model="workmanshipForm.handlerMethod" class="flexColumn"> <el-radio :label="0">出线</el-radio> <el-radio :label="1">返线,上一序返工</el-radio> <el-radio :label="2">返线,执行后续工序</el-radio> <el-radio :label="3">HMI选择</el-radio> </el-radio-group> </el-form-item> </el-col> <el-col :span="24"> @@ -172,7 +191,7 @@ </el-table-column> </el-table> </el-col> <el-col :span="24"> <el-col :span="24" v-if="workmanshipForm.processTypeName != '测量'"> <el-form-item label="刀具"> <el-button type="primary" size="small" @click="isShowFirstTools = true" :disabled="isShowFirstTools">关联刀具</el-button> <el-button size="small">批量关联</el-button> @@ -214,7 +233,7 @@ </el-row> </el-col> <!-- 刀具table --> <el-col :span="24"> <el-col :span="24" v-if="workmanshipForm.processTypeName != '测量'"> <el-table ref="multipleTableRef" :data="tools" border style="width: 100%;" class="multipleTableRef"> <el-table-column prop="code" label="刀具类型"> <template #default="scope"> @@ -281,7 +300,11 @@ testList: [], processCodeList: [], processNameList: [], checkList: [{name:'频次抽检',code: 0},{name: '信号抽检',code: 1},{name: '首件检',code: 2},{name: '末件检',code: 3}], workmanshipForm: { checkListData: [], //测量 meaMethodValue: null, //测量 handlerMethod: "", //测量 processCode: "", processId: "", processName: "", @@ -394,6 +417,18 @@ obj.id = ""; obj.fixtures = this.fixtures; obj.tools = this.tools; console.log(this.workmanshipForm.checkListData) //for测量 var meaMethodArray = []; for (let name of this.workmanshipForm.checkListData) { for (let item of this.checkList) { if (item.name === name) { meaMethodArray.push(item.code); } } } obj.meaMethod = meaMethodArray.join(","); return; this.$HTTP.post(`/api/blade-cps/production-craft-process/insert?versionId=${this.craftId}`,[obj]).then(res=> { if(res.code == 200) { this.$emit('success', obj); @@ -518,9 +553,20 @@ setData(data) { this.$HTTP.get(`/api/blade-cps/production-craft-process/get/${data.id}`).then(res=> { if(res.code == 200) { //for测量 var meaMethodArray = []; for (let name of res.data.meaMethod) { for (let item of this.checkList) { if (item.code === name) { meaMethodArray.push(item.name); } } } this.workmanshipForm = res.data; this.workmanshipForm.checkListData = meaMethodArray; this.fixtures = res.data.fixtures; this.tools = res.data.tools; console.log(res.data,123) } }) @@ -530,4 +576,9 @@ </script> <style scoped> .flexColumn { display: flex; flex-direction: column; align-items: flex-start; } </style> src/views/console/product-process/process-route/workmanship.vue
@@ -2,7 +2,7 @@ * @Author: lzhe lzhe@example.com * @Date: 2024-05-24 11:25:26 * @LastEditors: lzhe lzhe@example.com * @LastEditTime: 2024-05-24 15:05:44 * @LastEditTime: 2024-05-27 16:58:03 * @FilePath: /src/views/console/product-process/process-route/workmanship.vue * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE --> @@ -13,13 +13,13 @@ <div style="margin-bottom: 12px;"> <el-button type="primary" @click="table_open">新增</el-button> <el-button type="primary" v-if="isCustomization" @click="determineVersion">定版</el-button> <el-button disabled>并序</el-button> <el-button :disabled="mergeDisabled" @click="mergeBtn">并序</el-button> </div> <el-table ref="multipleTableRef0" :data="tableData" border style="width: 100%" class="multipleTableRef" @selection-change="HandleSelectionChange" @row-click="rowClick"> <el-table-column type="selection" width="55" /> <el-table ref="multipleTableRef0" :data="tableData" row-key="id" border :tree-props="{ children: 'children', hasChildren: 'has' }" style="width: 100%" class="multipleTableRef" @selection-change="HandleSelectionChange" @row-click="rowClick" default-expand-all> <el-table-column type="selection" :selectable="setSelectable" width="55" /> <el-table-column prop="index" label="工序顺序"> <template #default="scope"> <span>{{scope.row.index}}</span> <span>{{scope.row.index || "-"}}</span> </template> </el-table-column> <el-table-column prop="processCode" label="工序编号"></el-table-column> @@ -27,7 +27,8 @@ <el-table-column fixed="right" label="操作" width="200px"> <template #default="scope"> <el-button text type="primary" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button> <el-button text type="primary" size="small" @click="table_del(scope.row, scope.$index)">删除</el-button> <el-button text type="primary" size="small" @click="table_del(scope.row, scope.$index)" v-if="scope.row.index">删除</el-button> <el-button text type="primary" size="small" @click="table_remove(scope.row, scope.$index)" v-if="!scope.row.index">移除</el-button> </template> </el-table-column> </el-table> @@ -49,17 +50,49 @@ <add-workmanship ref="addworkmanship" @success="handleSuccess" :isClear="isClear" :craftId="craftId"></add-workmanship> </div> </el-drawer> <!-- 并序弹窗 --> <el-dialog title="并序" v-model="mergeVisible" :width="500" destroy-on-close> <el-form :inline="true" ref="mergeVisibleData" :model="mergeVisibleData" :rules="mergeVisibleRules" label-width="80px"> <el-row> <el-col :span="24"> <el-form-item label="工序编号" prop="processCode" style="width: 100%"> <el-input v-model="mergeVisibleData.processCode" placeholder="请输入工序编号" clearable></el-input> </el-form-item> </el-col> <el-col :span="24"> <el-form-item label="工序名称" prop="processName" style="width: 100%"> <el-input v-model="mergeVisibleData.processName" placeholder="请输入工序名称" clearable></el-input> </el-form-item> </el-col> </el-row> </el-form> <template #footer> <el-button @click="cencelMerge" >取消</el-button> <el-button v-if="mode!='show'" type="primary" :loading="isSaveing" @click="mergeSubmit">确定</el-button> </template> </el-dialog> </template> <script> import addWorkmanship from './addWorkmanship' import saveDialog from './addWorking' import { rowProps } from 'element-plus'; export default { name: 'workmanship', components: {saveDialog,addWorkmanship}, props: ["isCustomization","craftId"], data() { return { mergeVisibleData: { processCode: "", processName: "" }, mergeVisibleRules: { processCode:[{required: true, message: '请输入工序编号'}], processName:[{required: true, message: '请输入工序名称'}] }, mergeVisible: false, mergeDisabled: true, isClear: false, drawer: false, tableData: [], @@ -79,18 +112,71 @@ } }, methods: { setSelectable(row,rowIndex) { return !row.children && row.index; }, cencelMerge() { this.mergeVisible=false; this.mergeVisibleData = { processCode: "", processName: "" }; }, mergeSubmit() { var that = this; this.selection.forEach(item=> { item.versionProcessId = item.id; }); var obj = { parallelVO: this.selection, processCode: this.mergeVisibleData.processCode, processName: this.mergeVisibleData.processName, sort: 1, versionId: this.craftId } this.$refs.mergeVisibleData.validate(async (valid) => { if (valid) { that.$HTTP.post("/api/blade-cps/production-craft-process/save-parallel",obj).then(res=> { if(res.code == 200) { that.mergeVisible = false; that.$message.success("操作成功"); that.getcraftlList(); }else { that.$alert(res.message, "提示", {type: 'error'}); } }) }else{ return false; } }) }, mergeBtn() { this.mergeVisible = true; }, handleSuccess(value) { this.drawer = false; this.isClear = false; this.getcraftlList(); }, getcraftlList() { this.$HTTP.get(`/api/blade-cps/production-craft-version/detail/${this.craftId}`).then(res=> { // this.$HTTP.get(`/api/blade-cps/production-craft-version/detail/${this.craftId}`).then(res=> { // if(res.code == 200) { // res.data.processList.forEach((item,index)=> { // item.index = index + 1; // }); // this.tableData = res.data.processList; // } // }) this.$HTTP.get(`/api/blade-cps/production-craft-process/child-tree?versionId=${this.craftId}`).then(res=> { if(res.code == 200) { res.data.processList.forEach((item,index)=> { res.data.forEach((item,index)=> { if(item.children && item.children.length > 0) { item.disabled = true; } item.index = index + 1; }); this.tableData = res.data.processList; }) this.tableData = res.data; } }) }, @@ -103,12 +189,13 @@ this.$confirm(`工艺路线定版后,不支持编辑、删除、添加工序,请确认是否定版?`, '', { type: 'warning' }).then(() => { // this.$HTTP.delete("/api/blade-cps/production-craft-version/remove/"+that.delIconId).then(res=> { // if(res.code == 200) { // that.$message.success("操作成功"); // that.getDetail(); // } // }) this.$HTTP.put(`/api/blade-cps/production-craft-version/fix-version/${this.craftId}`).then(res=> { if(res.code == 200) { that.$message.success("操作成功"); }else { this.$message.error(res.msg); } }) }).catch(() => { }) @@ -126,6 +213,11 @@ }, HandleSelectionChange(selection) { this.selection = selection; if(this.selection.length >= 2) { this.mergeDisabled = false; }else { this.mergeDisabled = true; } }, table_open() { if(this.isCustomization) { //首页的新建 @@ -163,6 +255,37 @@ }).catch(() => { }) }, table_remove(row,index) { var that = this; var tableData = []; this.tableData.forEach(item=> { if(item.children && item.children.lenght !=0) { item.children.forEach(item1=> { tableData.push(item1); }) }else { tableData.push(item); } }) this.$confirm(`此工序移除后,原并序将会转化为常规序。确定移除吗?`, '', { type: 'warning' }).then(() => { var obj = { mainProcess: [], normalProcess: tableData, removeIds: [row.parentId], versionId: that.craftId } this.$HTTP.post(`/api/blade-cps/production-craft-process/child-process-update`,obj).then(res=> { if(res.code == 200) { that.$message.success("操作成功"); that.getcraftlList(); } }) }).catch(() => { }) } } }