mushencc 3 rokov pred
rodič
commit
086b6660f5

+ 8 - 3
src/views/leadMatch/roomList/edit.vue

@@ -27,15 +27,15 @@
         <Form :label-width="85" :model="formData">
           <FormItem label="项目编码:">
                <span  v-if="this.$route.query.type == 2">{{formData.project_number}}</span>
-            <Input size='small' v-model="formData.project_number" v-else />
+            <Input size='small' v-model="formData.project_number" v-else placeholder="请输入项目编码"/>
           </FormItem>
           <FormItem label="项目名称:">
            <span  v-if="this.$route.query.type == 2">{{formData.product_name}}</span>
-            <Input v-else size='small' v-model="formData.product_name"/>
+            <Input v-else size='small' v-model="formData.product_name" placeholder="请输入项目名称"/>
           </FormItem>
           <FormItem label="项目简称:">
              <span  v-if="this.$route.query.type == 2">{{formData.project_abbreviation}}</span>
-            <Input v-else size='small' v-model="formData.project_abbreviation"/>
+            <Input v-else size='small' v-model="formData.project_abbreviation" placeholder="请输入项目简称"/>
           </FormItem>
           <FormItem label="下单日期:">
               <span v-if="this.$route.query.type == 2">{{formData.start_time}}</span>
@@ -178,6 +178,9 @@ export default {
   },
   methods: {
        saveData(){
+         if(!this.formData.project_number){
+                this.$Message.warning('请填写项目编码!')
+         }else{
           let date = new Date();
          if(!this.formData.start_time){
              this.formData.start_time = date
@@ -194,6 +197,7 @@ export default {
                this.axios.post('/api/cut_order_del',{cut_order_product_id:this.del_id,order_type:2,cut_order_id:this.cut_order_id})
               }  
           });
+         }
       },
        search(item){
            this.add_tableColumns = [];
@@ -271,6 +275,7 @@ export default {
         this.formData.project_number = res.data.project_number;
         this.formData.product_name = res.data.project_name;
         this.formData.id = res.data.cut_order_id;
+        this.formData.project_abbreviation = res.data.abbreviation;
         this.formData.start_time =this.func.replaceDate(res.data.crt_time);
          if(this.infoNumber.length == 0){
              this.infoNumber.push(res.data.children)

+ 10 - 2
src/views/leadMatch/roomList/list.vue

@@ -134,10 +134,18 @@ export default {
       })
     },
     del(row){
-      console.log(row)
-          this.axios.post('/api/cut_order_delete',{cut_order_id:row.id,order_type:2}).then(()=>{
+           this.confirmDelete({
+                content:'是否删除?',
+                title:'房间删除',
+                type:'primary',
+                then:()=>{
+                      this.axios.post('/api/cut_order_delete',{cut_order_id:row.id,order_type:2}).then(()=>{
             this.initData()
           })
+                },
+                cancel:()=>{}
+            })
+         
     },
     gotoPage(type,row){
       //1 编辑 2 查看 3 新增

+ 8 - 3
src/views/leadMatch/weightMemo/edit.vue

@@ -27,15 +27,15 @@
         <Form :label-width="85" :model="formData">
           <FormItem label="项目编码:">
                <span  v-if="this.$route.query.type == 2">{{formData.project_number}}</span>
-            <Input size='small' v-model="formData.project_number" v-else />
+            <Input size='small' v-model="formData.project_number" v-else placeholder="请输入项目编码"/>
           </FormItem>
           <FormItem label="项目名称:">
            <span  v-if="this.$route.query.type == 2">{{formData.product_name}}</span>
-            <Input v-else size='small' v-model='formData.product_name'/>
+            <Input v-else size='small' v-model='formData.product_name' placeholder="请输入项目名称"/>
           </FormItem>
           <FormItem label="项目简称:">
              <span  v-if="this.$route.query.type == 2">{{formData.project_abbreviation}}</span>
-            <Input v-else size='small' v-model="formData.project_abbreviation"/>
+            <Input v-else size='small' v-model="formData.project_abbreviation" placeholder="请输入项目简称"/>
           </FormItem>
           <FormItem label="下单日期:">
             <span v-if="this.$route.query.type == 2">{{formData.start_time}}</span>
@@ -185,6 +185,9 @@ export default {
   },
   methods: {
       saveData(){
+          if(!this.formData.project_number){
+                this.$Message.warning('请填写项目编码!')
+         }else{
           let date = new Date();
          if(!this.formData.start_time){
              this.formData.start_time = date
@@ -201,6 +204,7 @@ export default {
                this.axios.post('/api/cut_order_del',{cut_order_product_id:this.del_id,order_type:1,cut_order_id:this.cut_order_id})
               }  
           });
+         }
       },
       search_data(row){
                 this.axios.post('/api/cut_order_open',{
@@ -249,6 +253,7 @@ export default {
         this.cut_order_id = res.data.cut_order_id;
         this.formData.project_number = res.data.project_number;
         this.formData.product_name = res.data.project_name;
+         this.formData.project_abbreviation = res.data.abbreviation;
         this.formData.id = res.data.cut_order_id;
         this.formData.start_time =this.func.replaceDate(res.data.crt_time);
         console.log(this.formData.start_time)

+ 10 - 2
src/views/leadMatch/weightMemo/list.vue

@@ -131,10 +131,18 @@ export default {
       })
     },
     del(row){
-      console.log(row)
-          this.axios.post('/api/cut_order_delete',{cut_order_id:row.id,order_type:1}).then(()=>{
+      this.confirmDelete({
+                content:'是否删除?',
+                title:'房间删除',
+                type:'primary',
+                then:()=>{
+                       this.axios.post('/api/cut_order_delete',{cut_order_id:row.id,order_type:1}).then(()=>{
             this.initData()
           })
+                },
+                cancel:()=>{}
+            })
+       
     },
     gotoPage(type,row){
       //1 编辑 2 查看 3 新增