| | |
| | | * @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"> |
| | | <el-select v-model="workmanshipForm.test0" style="width: 100%" placeholder="工序编号"> |
| | | <el-option v-for="item in testList" :key="item.id" :label="item.name" :value="item.id"/> |
| | | <el-select v-model="workmanshipForm.processId" style="width: 100%" placeholder="工序编号" @change="processChange"> |
| | | <el-option v-for="item in processCodeList" :key="item.id" :label="item.code" :value="item.id"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="工序名称"> |
| | | <el-select v-model="workmanshipForm.test0" style="width: 100%" placeholder="工序名称"> |
| | | <el-option v-for="item in testList" :key="item.id" :label="item.name" :value="item.id"/> |
| | | <el-select v-model="workmanshipForm.processId" style="width: 100%" placeholder="工序名称" @change="processChange"> |
| | | <el-option v-for="item in processNameList" :key="item.id" :label="item.name" :value="item.id"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="工种"> |
| | | <span>-</span> |
| | | <span>{{workmanshipForm.processTypeName}}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="工序顺序" prop="test0"> |
| | | <el-input-number v-model="workmanshipForm.num" :min="1" :max="10" @change="handleChange" /> |
| | | <el-form-item label="工序顺序" prop="sort"> |
| | | <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.test" style="width: 20%;margin-right: 12px;"> |
| | | <el-input v-model="workmanshipForm.d" style="width: 20%;margin-right: 12px;"> |
| | | <template #suffix>天</template> |
| | | </el-input> |
| | | <el-input v-model="workmanshipForm.test" style="width: 20%;margin-right: 12px;"> |
| | | <el-input v-model="workmanshipForm.h" style="width: 20%;margin-right: 12px;"> |
| | | <template #suffix>时</template> |
| | | </el-input> |
| | | <el-input v-model="workmanshipForm.test" style="width: 20%;margin-right: 12px;"> |
| | | <el-input v-model="workmanshipForm.m" style="width: 20%;margin-right: 12px;"> |
| | | <template #suffix>分</template> |
| | | </el-input> |
| | | <el-input v-model="workmanshipForm.test" style="width: 20%;"> |
| | | <el-input v-model="workmanshipForm.s" style="width: 20%;"> |
| | | <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.test"> |
| | | <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.test"> |
| | | <el-input v-model="workmanshipForm.disassemblyTime"> |
| | | <template #suffix>分</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="运输工时"> |
| | | <el-input v-model="workmanshipForm.test"> |
| | | <el-input v-model="workmanshipForm.transportTime"> |
| | | <template #suffix>分</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-col :span="12" v-if="workmanshipForm.processTypeName != '测量'"> |
| | | <el-form-item label="加工程序"> |
| | | <el-input v-model="workmanshipForm.test"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label=""> |
| | | <el-checkbox v-model="workmanshipForm.box" label="选择程序文件" size="small"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工艺包"> |
| | | <el-tree-select |
| | | @change = "parentIdChange" |
| | | v-if="workmanshipForm.isSelectProgramFiles" |
| | | @change = "programIdChange" |
| | | default-expand-all |
| | | v-model="workmanshipForm.test" |
| | | v-model="workmanshipForm.programId" |
| | | clearable |
| | | node-key="id" |
| | | placeholder="上级产品" |
| | | placeholder="加工程序" |
| | | ref="parentTree" |
| | | :data="parentData" |
| | | :data="programIdData" |
| | | check-strictly |
| | | :props="{ label: 'name' }" |
| | | style="width:100%;" |
| | | :render-after-expand="false" /> |
| | | <el-input v-if="!workmanshipForm.isSelectProgramFiles" v-model="workmanshipForm.programName"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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" v-if="workmanshipForm.processTypeName != '测量'"> |
| | | <el-form-item label="工艺包"> |
| | | <el-tree-select |
| | | @change = "bagIdChange" |
| | | default-expand-all |
| | | v-model="workmanshipForm.bagId" |
| | | clearable |
| | | node-key="id" |
| | | placeholder="工艺包" |
| | | ref="parentTree" |
| | | :data="bagIdData" |
| | | check-strictly |
| | | :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"> |
| | |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夹具"> |
| | | <el-button>关联夹具</el-button> |
| | | <el-button>批量关联</el-button> |
| | | <el-button type="primary" size="small" @click="isShowFirstFixtures = true" :disabled="isShowFirstFixtures">关联夹具</el-button> |
| | | <el-button size="small">批量关联</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- 添加夹具 --> |
| | | <el-col :span="24" v-if="isShowFirstFixtures"> |
| | | <el-row style="margin-top: 12px;margin-bottom: 12px;"> |
| | | <el-col :span="4"> |
| | | <el-tree-select |
| | | @change = "fixturesChange" |
| | | default-expand-all |
| | | v-model="fixturesFirstData.groupId" |
| | | clearable |
| | | size="small" |
| | | node-key="id" |
| | | placeholder="夹具组" |
| | | ref="fixturesFirstData" |
| | | :data="fixturesFirstTree" |
| | | check-strictly |
| | | :props="{ label: 'name' }" |
| | | style="width:100%;" |
| | | :render-after-expand="false" /> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-select v-model="fixturesFirstData.fixtureCode" size="small" style="width: 100%" placeholder="夹具编号" @change="fixtureCodeChange"> |
| | | <el-option v-for="item in fixtureCodeList" :key="item.code" :label="item.code" :value="item.code"/> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-input v-model="fixturesFirstData.name" disabled size="small" placeholder="夹具名称" style="padding-right: 20px;"></el-input> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-button type="primary" size="small" @click="saveFirstFixture">保存</el-button> |
| | | <el-button size="small" @click="cencelFirstFixture">取消</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> |
| | | <!-- 夹具table --> |
| | | <el-col :span="24"> |
| | | <el-table ref="multipleTableRef" :data="tableDataJQ" border style="width: 100%;margin-bottom:12px;" class="multipleTableRef"> |
| | | <el-table-column prop="code" label="夹具组"></el-table-column> |
| | | <el-table-column prop="name" label="夹具编号"></el-table-column> |
| | | <el-table-column prop="typeName" label="夹具名称"></el-table-column> |
| | | <el-table ref="multipleTableRef" :data="fixtures" border style="width: 100%;margin-bottom:12px;" class="multipleTableRef"> |
| | | <el-table-column prop="fixtureGroupName" label="夹具组"> |
| | | <template #default="scope">{{scope.row.fixtureGroupName}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="夹具编号"> |
| | | <template #default="scope">{{scope.row.fixtureCode}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="fixtureName" label="夹具名称"></el-table-column> |
| | | <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="fixtures_del(scope.row, scope.$index)">删除</el-button> |
| | | </template> |
| | | </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>关联刀具</el-button> |
| | | <el-button>批量关联</el-button> |
| | | <el-button type="primary" size="small" @click="isShowFirstTools = true" :disabled="isShowFirstTools">关联刀具</el-button> |
| | | <el-button size="small">批量关联</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-table ref="multipleTableRef" :data="tableDataDQ" border style="width: 100%;" class="multipleTableRef"> |
| | | <el-table-column prop="code" label="刀具类型"></el-table-column> |
| | | <el-table-column prop="name" label="刀具型号"></el-table-column> |
| | | <el-table-column prop="typeName" label="夹具编号"></el-table-column> |
| | | <!-- 添加刀具 --> |
| | | <el-col :span="24" v-if="isShowFirstTools"> |
| | | <el-row style="margin-top: 12px;margin-bottom: 12px;"> |
| | | <el-col :span="4"> |
| | | <el-tree-select |
| | | @change = "toolsChange" |
| | | default-expand-all |
| | | v-model="toolsFirstData.groupId" |
| | | clearable |
| | | size="small" |
| | | node-key="id" |
| | | placeholder="刀具组" |
| | | ref="toolsFirstData" |
| | | :data="toolsFirstTree" |
| | | check-strictly |
| | | :props="{ label: 'name' }" |
| | | style="width:100%;" |
| | | :render-after-expand="false" /> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-select v-model="toolsFirstData.test" size="small" style="width: 100%" placeholder="刀具型号"> |
| | | <el-option v-for="item in testList" :key="item.code" :label="item.code" :value="item.code"/> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-select v-model="fixturesFirstData.test" size="small" style="padding-right: 20px;" placeholder="刀具编号"> |
| | | <el-option v-for="item in testList" :key="item.code" :label="item.code" :value="item.code"/> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-button type="primary" size="small" @click="saveFirstTools">保存</el-button> |
| | | <el-button size="small" @click="cencelFirstTools">取消</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> |
| | | <!-- 刀具table --> |
| | | <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"> |
| | | <el-select v-model="item.test" style="width: 100%" placeholder="刀具型号"> |
| | | <el-option v-for="item in typeDQList" :key="item.id" :label="item.name" :value="item.id"/> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="刀具型号"> |
| | | <template #default="scope"> |
| | | <el-select v-model="item.test" style="width: 100%" placeholder="刀具型号"> |
| | | <el-option v-for="item in modelDQList" :key="item.id" :label="item.name" :value="item.id"/> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="typeName" label="夹具编号"> |
| | | <template #default="scope"> |
| | | <el-select v-model="item.test" style="width: 100%" placeholder="刀具型号"> |
| | | <el-option v-for="item in numDQList" :key="item.id" :label="item.name" :value="item.id"/> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <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-row> |
| | | </el-form> |
| | | <div style="margin-top:12px;"> |
| | | <el-button>取消</el-button> |
| | | <el-button type="primary">保存</el-button> |
| | | <el-button @click="closeDrawer">取消</el-button> |
| | | <el-button type="primary" @click="craftSave">保存</el-button> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | tableDataJQ: [], |
| | | tableDataDQ: [], |
| | | parentData: {}, |
| | | toolsFirstTree: {}, |
| | | isShowFirstTools: false, |
| | | fixtureCodeList: [], |
| | | isShowFirstFixtures: false, |
| | | toolsFirstData: { |
| | | test: "" |
| | | }, |
| | | fixturesFirstData: { |
| | | fixtureId: "", |
| | | fixtureCode: "", |
| | | name: "", |
| | | groupId: "" |
| | | }, |
| | | testList: [], |
| | | fixturesFirstTree: {}, |
| | | programIdData: {}, |
| | | numDQList: [], |
| | | modelDQList: [], |
| | | typeDQList: [], |
| | | fixtures: [], |
| | | tools: [], |
| | | bagIdData: {}, |
| | | testList: [], |
| | | processCodeList: [], |
| | | processNameList: [], |
| | | checkList: [{name:'频次抽检',code: 0},{name: '信号抽检',code: 1},{name: '首件检',code: 2},{name: '末件检',code: 3}], |
| | | workmanshipForm: { |
| | | test0: "", |
| | | test: "", |
| | | num: null, |
| | | box: false |
| | | checkListData: [], //测量 |
| | | meaMethodValue: null, //测量 |
| | | handlerMethod: "", //测量 |
| | | processCode: "", |
| | | processId: "", |
| | | processName: "", |
| | | processTypeName: "-", |
| | | sort: null, |
| | | d: "", |
| | | h: "", |
| | | m: "", |
| | | s: "", |
| | | prepareTime: "", |
| | | disassemblyTime: "", |
| | | transportTime: "", |
| | | programId: "", |
| | | programName: "", //加工顺序 |
| | | bagId: "", //工具包 |
| | | bagName: "", |
| | | isSelectProgramFiles: false |
| | | }, |
| | | workmanshipRules: { |
| | | |
| | | sort: [{ required: true, message: '请选择 工序顺序' }], |
| | | }, |
| | | } |
| | | }, |
| | | props: ["craftId","isClear"], |
| | | mounted() { |
| | | this.getToolingTree(); //夹具组tree |
| | | this.getCategoryTree(); //刀具类型 |
| | | this.getCateBag(); //工艺包 |
| | | this.getNumberAndName(); //工序编号和名称 |
| | | this.getCatalogueTree(); //加工程序 |
| | | }, |
| | | watch: { |
| | | isClear(val) { |
| | | if(val) { |
| | | this.resetAll(); |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | parentIdChange(val) { |
| | | closeDrawer() { |
| | | this.resetAll(); |
| | | this.$emit('success', {}); |
| | | }, |
| | | saveFirstTools() { |
| | | this.$message.error("请选择刀具类型"); |
| | | return; |
| | | }, |
| | | cencelFirstTools() { |
| | | this.isShowFirstTools = false; |
| | | this.toolsFirstData = { |
| | | // fixtureId: "", |
| | | // fixtureCode: "", |
| | | // name: "" |
| | | } |
| | | //this.fixtureCodeList = []; |
| | | }, |
| | | fixtures_del(row,index) { |
| | | this.fixtures.splice(index,1); |
| | | }, |
| | | fixtureCodeChange(value) { |
| | | this.fixtureCodeList.forEach(item=> { |
| | | if(item.code == value) { |
| | | this.fixturesFirstData.name = item.name; |
| | | this.fixturesFirstData.fixtureId = item.id; |
| | | this.fixturesFirstData.fixtureGroupName = item.fixtureGroupName; |
| | | this.fixturesFirstData.fixtureName = item.name; |
| | | } |
| | | }) |
| | | }, |
| | | saveFirstFixture() { |
| | | if(this.fixturesFirstData.fixtureCode == "") { |
| | | this.$message.error("请选择夹具"); |
| | | return; |
| | | } |
| | | this.fixturesFirstData.code = this.fixturesFirstData.fixtureCode; |
| | | this.fixtures.push(this.fixturesFirstData); |
| | | this.cencelFirstFixture(); |
| | | }, |
| | | cencelFirstFixture() { |
| | | this.isShowFirstFixtures = false; |
| | | this.fixturesFirstData = { |
| | | fixtureId: "", |
| | | fixtureCode: "", |
| | | name: "" |
| | | } |
| | | this.fixtureCodeList = []; |
| | | }, |
| | | fixturesChange(value) { |
| | | var row = this.$refs.fixturesFirstData.getCurrentNode(); |
| | | this.fixturesFirstData.groupName = row.name; |
| | | this.$HTTP.get(`/api/blade-cps/fixture/list?groupId=${value}`).then(res=> { |
| | | if(res.code == 200) { |
| | | this.fixtureCodeList = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | toolsChange(value) { |
| | | |
| | | }, |
| | | craftSave() { //保存 |
| | | if(this.isShowFirstFixtures) { |
| | | this.$message.error("请先保存当前关联的夹具"); |
| | | return; |
| | | } |
| | | if(this.isShowFirstTools) { |
| | | this.$message.error("请先保存当前关联的刀具"); |
| | | return; |
| | | } |
| | | var obj = Object.assign({},this.workmanshipForm); |
| | | 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); |
| | | this.resetAll(); |
| | | } |
| | | }) |
| | | }, |
| | | resetAll() { |
| | | this.workmanshipForm = { |
| | | processCode: "", |
| | | processId: "", |
| | | processName: "", |
| | | processTypeName: "-", |
| | | sort: null, |
| | | d: "", |
| | | h: "", |
| | | m: "", |
| | | s: "", |
| | | prepareTime: "", |
| | | disassemblyTime: "", |
| | | transportTime: "", |
| | | programId: "", |
| | | programName: "", //加工顺序 |
| | | bagId: "", //工具包 |
| | | bagName: "", |
| | | isSelectProgramFiles: false |
| | | }; |
| | | this.fixtures = []; |
| | | this.tools = []; |
| | | this.toolsFirstData = { |
| | | test: "" |
| | | }; |
| | | this.fixturesFirstData = { |
| | | fixtureId: "", |
| | | fixtureCode: "", |
| | | name: "", |
| | | groupId: "" |
| | | }; |
| | | }, |
| | | processChange(val) { |
| | | if(val) { |
| | | this.processCodeList.forEach(item=> { |
| | | if(val == item.id) { |
| | | this.workmanshipForm.processId = item.id; |
| | | this.workmanshipForm.processCode = item.code; |
| | | this.workmanshipForm.processName = item.name; |
| | | this.workmanshipForm.processTypeName = item.typeName; |
| | | this.workmanshipForm.processType = item.type; |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | getCatalogueTree() { //加工程序 |
| | | this.$HTTP.get("/api/blade-dnc/dnc-process-catalogue/art-tree").then(res=> { |
| | | if(res.code == 200) { |
| | | function ea(data) { |
| | | data.forEach(item=> { |
| | | if(item.children.length!=0) { |
| | | ea(item.children); |
| | | } |
| | | item.disabled = true; |
| | | }) |
| | | } |
| | | ea(res.data); |
| | | this.programIdData = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | getNumberAndName() { //工序编号和名称 |
| | | this.$HTTP.get("/api/blade-cps/process/page?current=1&size=-1&status=1").then(res=> { |
| | | if(res.code == 200) { |
| | | this.processCodeList = res.data.records; |
| | | this.processNameList = res.data.records; |
| | | } |
| | | }) |
| | | }, |
| | | getCateBag() { //工艺包 |
| | | this.$HTTP.get("/api/blade-dnc/dnc-process-catalogue/cate-art-bag-tree").then(res=> { |
| | | if(res.code == 200) { |
| | | function ea(data) { |
| | | data.forEach(item=> { |
| | | if(item.children) { |
| | | ea(item.children); |
| | | } |
| | | if(item.parentId <= 0) { |
| | | item.disabled = true; |
| | | } |
| | | }) |
| | | } |
| | | ea(res.data); |
| | | this.bagIdData = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | getCategoryTree() { //刀具类型 |
| | | this.$HTTP.get("/api/blade-tool/tool-category/tree").then(res=> { |
| | | if(res.code == 200) { |
| | | this.typeDQList = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | getToolingTree() { |
| | | var obj = { |
| | | groupCategory: 1, |
| | | groupType: "group_fixture" |
| | | } |
| | | this.$HTTP.post("/api/blade-cps/tray/tooling-tree",obj).then(res=> { |
| | | if(res.code == 200) { |
| | | this.fixturesFirstTree = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | programIdChange() { |
| | | |
| | | }, |
| | | bagIdChange(val) { |
| | | |
| | | }, |
| | | table_edit() { |
| | | |
| | | }, |
| | | 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) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .flexColumn { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | } |
| | | </style> |