1
lzhe
2024-06-05 dcf9c9e0410fe1186239e3f8d6f7bdc789c08010
src/views/console/product-process/process-route/add-craft-version.vue
@@ -71,7 +71,7 @@
</template>
<script>
   import workmanship from './workmanship'  //工艺路线
import workmanship from './workmanship'  //工艺路线
   export default {
      name: 'add-craft',
      components: {workmanship},
@@ -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;
                     }
                  })
               }
            })
         }