guhongwei 4 yıl önce
ebeveyn
işleme
3ee1f2a70c

+ 25 - 2
src/views/userDeclare/index.vue

@@ -36,6 +36,7 @@ import brief from './parts/brief.vue';
 import research from './parts/research.vue';
 import detailed from './parts/detailed.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: achieveApply } = createNamespacedHelpers('achieveApply');
 export default {
   name: 'index',
   props: {},
@@ -48,7 +49,7 @@ export default {
   data: function() {
     return {
       // 步骤
-      active: 1,
+      active: 4,
       // 基本信息
       basic: {
         achieve_date: '2021-03-18 15:54:57',
@@ -115,6 +116,7 @@ export default {
   },
   created() {},
   methods: {
+    ...achieveApply(['create']),
     //基本信息下一步
     basicBtn() {
       this.active = 2;
@@ -141,7 +143,7 @@ export default {
       this.active = 3;
     },
     // 提交申报
-    onSubmit() {
+    async onSubmit() {
       let data = {
         basic: this.basic,
         brief: this.brief,
@@ -149,6 +151,27 @@ export default {
         detailed: this.detailed,
       };
       console.log(data);
+      this.$alert(
+        '<strong><p>1:用户</p><p>当您进行成果申报时,系统会自动提取联系人和联系电话进行平台用户注册,您可用【联系电话】和【初始密码(123456)】进行登录查看。</p></strong>',
+        '信息提示',
+        {
+          dangerouslyUseHTMLString: true,
+          showConfirmButton: true,
+          showCancelButton: true,
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+        }
+      )
+        .then(async () => {
+          let res = await this.create(data);
+          if (this.$checkRes(res)) {
+            this.$message({
+              message: '申报成功,可登录平台进行查看审核状态',
+              type: 'success',
+            });
+          }
+        })
+        .catch(() => {});
     },
   },
   computed: {

+ 1 - 1
src/views/userDeclare/parts/detailed.vue

@@ -315,7 +315,7 @@ export default {
 
 <style lang="less" scoped>
 .detailed {
-  padding: 15px;
+  padding: 0 15px;
   .text {
     padding: 10px 0 10px 0;
     // border-bottom: 1px solid red;

+ 7 - 2
src/views/userDeclare/parts/research.vue

@@ -157,6 +157,9 @@ export default {
       this.form = {};
       this.dialog = false;
     },
+    search() {
+      this.$set(this, `list`, this.researchForm);
+    },
   },
   computed: {
     ...mapState(['user']),
@@ -168,10 +171,12 @@ export default {
     return { title: this.$route.meta.title };
   },
   watch: {
-    list: {
+    researchForm: {
       deep: true,
       immediate: true,
-      handler(val) {},
+      handler(val) {
+        this.search();
+      },
     },
   },
 };