1
lzhe
2024-05-24 c9ce5e7f9a9ef52c66baf4f8a6e8d9e48b7cb251
src/views/console/product-process/process-route/addWorking.vue
@@ -13,10 +13,10 @@
      </div>
      <el-table ref="multipleTableRef" :data="tableData" border style="width: 100%" class="multipleTableRef" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" />
         <el-table-column prop="postCode" label="工序编号"></el-table-column>
         <el-table-column prop="postName" label="工序名称"></el-table-column>
         <el-table-column prop="postName" label="工种"></el-table-column>
         <el-table-column prop="postName" label="工序描述"></el-table-column>
         <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-column prop="description" label="工序描述"></el-table-column>
      </el-table>
      <el-pagination
         style="margin-top: 12px;"
@@ -57,9 +57,6 @@
      mounted() {
      },
      methods: {
         workingSubmit() {
         },
         addWorking() {
            this.$router.push({path: `/console/basic-data/work-process`});
         },
@@ -70,6 +67,7 @@
            this.$HTTP.get(`/api/blade-cps/process/page?current=${this.current}&size=${this.size}&keyword=`).then(res=> {
               if(res.code == 200) {
                  this.tableData = res.data.records;
                  this.totle = res.data.total;
               }
            })
         },
@@ -82,24 +80,10 @@
         },
         //表单提交方法
         workingSubmit(){
            var obj = Object.assign({},this.addWorkingForm);
            this.$refs.dialogForm.validate(async (valid) => {
               if (valid) {
                  this.isSaveing = true;
                  this.$HTTP.put("/api/blade-cps/craft-routing/update",obj).then(res=> {
                     this.isSaveing = false;
                     if(res.code == 200) {
                        this.$emit('success', this.addWorkingForm, this.mode);
                        this.visible = false;
                        this.$message.success("操作成功");
                     }else {
                        this.$alert(res.message, "提示", {type: 'error'});
                     }
                  })
               }else{
                  return false;
               }
            })
            this.$emit('success', this.selection, this.mode);
            this.visible = false;
            this.$message.success("操作成功");
            this.selection = [];
         },
         //表单注入数据
         setData(data,res){