| | |
| | | <el-drawer v-model="drawer" title="添加工序" direction="rtl" :before-close="handleClose" size="60%" modal-class="viewData"> |
| | | <!-- 新增路线 --> |
| | | <div class="addworkmanship"> |
| | | <add-workmanship></add-workmanship> |
| | | <add-workmanship ref="addworkmanship" @success="handleSuccess" :isClear="isClear" :craftId="craftId"></add-workmanship> |
| | | </div> |
| | | </el-drawer> |
| | | </template> |
| | |
| | | props: ["isCustomization","craftId"], |
| | | data() { |
| | | return { |
| | | isClear: false, |
| | | drawer: false, |
| | | tableData: [], |
| | | selection: [], |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | 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=> { |
| | | if(res.code == 200) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | |
| | | handleClose(done) { |
| | | this.isClear = true; |
| | | done(); |
| | | }, |
| | | determineVersion() { |
| | | var that = this; |
| | |
| | | // this.getWorkDetail(); |
| | | // this.getPage1(); |
| | | }, |
| | | table_edit(row,index) { |
| | | |
| | | }, |
| | | table_del(row,index) { |
| | | this.$confirm(`确认要删除此工序吗?`, '', { |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableData.splice(index,1); |
| | | }).catch(() => { |
| | | |
| | | }) |
| | | }, |
| | | addRouteSuccess(selection) { |
| | | selection.forEach((item,i)=> { |
| | | item.index = i+1; |
| | |
| | | this.$refs.saveDialog.open(); |
| | | }) |
| | | } |
| | | }, |
| | | table_edit(row,index) { |
| | | this.drawer = true; |
| | | this.$nextTick(()=> { |
| | | this.$refs.addworkmanship.setData(row); |
| | | }) |
| | | }, |
| | | table_del(row,index) { |
| | | var that = this; |
| | | this.$confirm(`确认要删除此工序吗?`, '', { |
| | | type: 'warning' |
| | | }).then(() => { |
| | | var obj = { |
| | | mainProcess: [], |
| | | normalProcess: that.tableData, |
| | | removeIds: [row.id], |
| | | 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(() => { |
| | | |
| | | }) |
| | | } |
| | | } |
| | | } |