Kaynağa Gözat

临时保存

yuhan 1 yıl önce
ebeveyn
işleme
7ee8631d4b

+ 2 - 27
itdmWeb/src/views/module-iTDM/weituo/modules/ItdmWeituoInfoForm.vue

@@ -9,8 +9,8 @@
     </a-steps>
     <div class="content">
       <step1 v-if="currentTab === 0" ref="data001" @nextStep="nextStep"   :disabled="disabled"/>
-      <step2 v-if="currentTab === 1" @prevStep="prevStep" @nextStep="nextStep"  :disabled="disabled" />
-      <step3 v-if="currentTab === 2" @submitForm="submitForm" @prevStep="prevStep" :disabled="disabled" />
+      <step2 v-if="currentTab === 1" @prevStep="prevStep" ref="ypxx" @nextStep="nextStep"  :disabled="disabled" />
+      <step3 v-if="currentTab === 2" @submitForm="submitForm" ref="syxx" @prevStep="prevStep" :disabled="disabled" />
     </div>
   </a-card>
 
@@ -142,31 +142,6 @@ export default {
       })
     },
 
-    // 临时保存
-    temporarySave(){
-      console.log(this.currentTab)
-      // this.confirmLoading = true
-      // this.weituomodel = JSON.parse(sessionStorage.getItem('data'))
-      // console.log(!sessionStorage.getItem('yangpin'))
-      // if(sessionStorage.getItem('yangpin')){
-      //   this.weituomodel.yangpins = JSON.parse(sessionStorage.getItem('yangpin'))
-      // }
-      // if(sessionStorage.getItem('yangpinkz')){
-      //   this.weituomodel.pinShiYans = JSON.parse(sessionStorage.getItem('yangpinkz'))
-      // }
-      // console.log(this.weituomodel)
-      // postAction('/weituo/itdmWeituoInfo/staging', this.weituomodel ).then((res) => {
-      //   if (res.success) {
-      //     this.$message.success(res.message)
-      //     this.$emit('ok')
-      //   } else {
-      //     this.$message.warning(res.message)
-      //   }
-      // }).finally(() => {
-      //   that.confirmLoading = false
-      // })
-    },
-
     handleCategoryChange(value, backObj) {
       this.model = Object.assign(this.model, backObj)
     }

+ 38 - 5
itdmWeb/src/views/module-iTDM/weituo/modules/ItdmWeituoInfoModal.vue

@@ -4,7 +4,7 @@
     :width="width"
     :visible="visible"
     switchFullscreen
-    @ok="handleOk"
+    @ok="temporarySave"
     :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     @cancel="handleCancel"
     cancelText="关闭"
@@ -14,6 +14,7 @@
 </template>
 
 <script>
+import { postAction  } from '@api/manage'
 
   import ItdmWeituoInfoForm from './ItdmWeituoInfoForm'
   export default {
@@ -65,10 +66,42 @@
         this.$emit('close');
         this.visible = false;
       },
-      handleOk () {
-        // console.log(this.$refs.realForm.$refs.)
-        // console.log(this.$refs.realForm.currentTab)
-        // this.$refs.realForm.temporarySave();
+      // 临时保存
+      temporarySave () {
+        var weituoInfo = {}
+        switch (this.$refs.realForm.currentTab) {
+          case 0:
+            console.log(this.$refs.realForm.$refs.data001.model)
+            weituoInfo = this.$refs.realForm.$refs.data001.model
+            break;
+          case 1:
+            // console.log(this.$refs.realForm.$refs.ypxx.model)
+            weituoInfo = JSON.parse(sessionStorage.getItem('data'))
+            weituoInfo.yangpins = this.$refs.realForm.$refs.ypxx.model.data
+            break;
+          case 2:
+            // console.log(this.$refs.realForm.$refs.syxx.model)
+            weituoInfo = JSON.parse(sessionStorage.getItem('data'))
+            weituoInfo.yangpins = JSON.parse(sessionStorage.getItem('yangpin'))
+            weituoInfo.pinShiYans = this.$refs.realForm.$refs.syxx.model
+            break;
+        
+          default:
+            break;
+        }
+        console.log(weituoInfo)
+        postAction('/weituo/itdmWeituoInfo/staging', weituoInfo ).then((res) => {
+          if (res.success) {
+            this.$message.success(res.message)
+            this.$emit('ok')
+            this.visible = false;
+          } else {
+            this.$message.warning(res.message)
+            // this.visible = false;
+          }
+        }).finally(() => {
+          // that.confirmLoading = false
+        })
       },
       submitCallback(){
         this.$emit('ok');

+ 1 - 5
itdmWeb/src/views/module-iTDM/weituo/modules/step/Step1.vue

@@ -17,7 +17,7 @@
             <a-select-option v-for="(item, index) in weituoClients" :key="index" :value="item.id" :label="item.weituiClient">
               <el-row>
                 <el-col :span="12">{{item.weituiClient}}</el-col>
-                <el-col :span="12">{{ item.weituiLxr }}</el-col>
+                <el-col :span="12" style="text-align: right;">{{ item.weituiLxr }}</el-col>
               </el-row>
             </a-select-option>
           </template>
@@ -227,10 +227,6 @@ export default {
         }
       })
     },
-    // 临时保存
-    temporarySave(){
-      console.log('step1')
-    }
   }
 
 }

+ 0 - 4
itdmWeb/src/views/module-iTDM/weituo/modules/step/Step2.vue

@@ -234,10 +234,6 @@ export default {
 
       this.$emit('prevStep')
     },
-    // 临时保存
-    temporarySave(){
-      console.log('step2')
-    }
 
   }
 }

+ 0 - 5
itdmWeb/src/views/module-iTDM/weituo/modules/step/Step3.vue

@@ -281,11 +281,6 @@ export default {
 
       this.$emit('prevStep')
     },
-    // 临时保存
-    temporarySave(){
-      console.log('step3')
-    }
-
   }
 }
 </script>