guhongwei 2 年之前
父節點
當前提交
1c2fab6812

+ 5 - 5
src/layout/analysis/form-1.vue

@@ -79,13 +79,13 @@ export default {
           this.$set(this, `adminInfo`, arr.data);
           this.$set(this, `adminInfo`, arr.data);
           let data = {
           let data = {
             user_id: this.user._id,
             user_id: this.user._id,
-            user_name: this.user.name,
+            user_name: this.user.phone,
             admin_id: this.adminInfo.id,
             admin_id: this.adminInfo.id,
             admin_name: this.adminInfo.name,
             admin_name: this.adminInfo.name,
-            apply_name: this.user.name,
-            inventor: this.user.name,
-            contact: this.user.name,
-            phone: this.user.phone,
+            apply_name: this.user.phone,
+            inventor: this.user.phone,
+            contact: this.user.phone,
+            phone: this.user.name,
             email: this.user.email,
             email: this.user.email,
             questions: {},
             questions: {},
             status: '0',
             status: '0',

+ 4 - 4
src/layout/apply/form-1.vue

@@ -138,10 +138,10 @@ export default {
       // 查詢用戶
       // 查詢用戶
       let data = {
       let data = {
         user_id: this.user.id,
         user_id: this.user.id,
-        user_name: this.user.name,
-        apply_name: this.user.name,
-        contact: this.user.name,
-        phone: this.user.phone,
+        user_name: this.user.phone,
+        apply_name: this.user.phone,
+        contact: this.user.phone,
+        phone: this.user.name,
         email: this.user.email,
         email: this.user.email,
         questions: {},
         questions: {},
       };
       };

+ 4 - 4
src/layout/apply/form-2.vue

@@ -110,13 +110,13 @@ export default {
       // 查詢用戶
       // 查詢用戶
       let data = {
       let data = {
         user_id: this.user.id,
         user_id: this.user.id,
-        user_name: this.user.name,
+        user_name: this.user.phone,
         admin_id: this.adminInfo.id,
         admin_id: this.adminInfo.id,
         admin_name: this.adminInfo.name,
         admin_name: this.adminInfo.name,
         agentmech_id: this.user.id,
         agentmech_id: this.user.id,
-        agentmech_name: this.user.name,
-        apply_name: this.user.name,
-        phone: this.user.phone,
+        agentmech_name: this.user.phone,
+        apply_name: this.user.phone,
+        phone: this.user.name,
         email: this.user.email,
         email: this.user.email,
         questions: {},
         questions: {},
       };
       };

+ 3 - 3
src/layout/assessment/form-1.vue

@@ -119,14 +119,14 @@ export default {
         admin_id: this.adminInfo.id,
         admin_id: this.adminInfo.id,
         admin_name: this.adminInfo.name,
         admin_name: this.adminInfo.name,
         user_id: this.user.id,
         user_id: this.user.id,
-        user_name: this.user.name,
+        user_name: this.user.phone,
         patent_id: value.id,
         patent_id: value.id,
         create_number: value.create_number,
         create_number: value.create_number,
         patent_name: value.name,
         patent_name: value.name,
         inventor: value.inventor,
         inventor: value.inventor,
         type: value.type,
         type: value.type,
-        contact: this.user.name,
-        phone: this.user.phone,
+        contact: this.user.phone,
+        phone: this.user.name,
         email: this.user.email,
         email: this.user.email,
         abstract: value.abstract,
         abstract: value.abstract,
         shared_value: value.shared_value,
         shared_value: value.shared_value,

+ 1 - 1
src/layout/chatCommon/chat.vue

@@ -111,7 +111,7 @@ export default {
           type: '1',
           type: '1',
           content: this.content,
           content: this.content,
           sender_id: this.user._id,
           sender_id: this.user._id,
-          sender_name: this.user.name,
+          sender_name: this.user.phone,
           receiver_id: this.adminInfo._id,
           receiver_id: this.adminInfo._id,
           receiver_name: this.adminInfo.name,
           receiver_name: this.adminInfo.name,
         };
         };

+ 43 - 6
src/layout/login/register-1.vue

@@ -3,9 +3,21 @@
     <van-row>
     <van-row>
       <van-col span="24" class="main">
       <van-col span="24" class="main">
         <van-form @submit="onSubmit" label-width="4em">
         <van-form @submit="onSubmit" label-width="4em">
-          <van-field v-model="form.name" name="name" label="姓名" placeholder="请填写姓名" :rules="[{ required: true, message: '姓名' }]" />
-          <van-field v-model="form.phone" name="phone" label="手机号" placeholder="请填写手机号" :rules="[{ required: true, message: '手机号' }]" />
-          <van-col span="24" class="tip"> 手机号作为登录平台唯一凭证,请谨慎填写! </van-col>
+          <van-field
+            readonly
+            clickable
+            name="code"
+            :value="form.code"
+            label="邀请码"
+            placeholder="点击选择"
+            @click="codeShow = true"
+            :rules="[{ required: true, message: '请选择邀请码' }]"
+          />
+          <van-popup v-model="codeShow" position="bottom">
+            <van-picker show-toolbar :columns="codeList" @confirm="codeFirm" value-key="name" @cancel="codeShow = false" />
+          </van-popup>
+          <van-field v-model="form.phone" name="phone" label="账号" placeholder="请填写账号" :rules="[{ required: true, message: '账号' }]" />
+          <van-col span="24" class="tip"> 账号作为登录平台唯一凭证,请谨慎填写! </van-col>
           <van-field
           <van-field
             v-model="form.password"
             v-model="form.password"
             type="password"
             type="password"
@@ -14,7 +26,7 @@
             placeholder="请填写登录密码"
             placeholder="请填写登录密码"
             :rules="[{ required: true, message: '登录密码' }]"
             :rules="[{ required: true, message: '登录密码' }]"
           />
           />
-          <van-field v-model="form.code" name="code" label="邀请码" placeholder="请填写邀请码" :rules="[{ required: true, message: '邀请码' }]" />
+          <van-field v-model="form.name" name="name" label="手机号" placeholder="请填写手机号" :rules="[{ required: true, message: '手机号' }]" />
           <van-field v-model="form.card" name="card" label="身份证号" placeholder="请填写身份证号" />
           <van-field v-model="form.card" name="card" label="身份证号" placeholder="请填写身份证号" />
           <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请填写电子邮箱" />
           <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请填写电子邮箱" />
           <van-field v-model="form.addr" name="addr" label="联系地址" placeholder="请填写联系地址" />
           <van-field v-model="form.addr" name="addr" label="联系地址" placeholder="请填写联系地址" />
@@ -39,6 +51,7 @@
 <script>
 <script>
 import { juris } from '@common/dict/index';
 import { juris } from '@common/dict/index';
 import { mapState, createNamespacedHelpers } from 'vuex';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: adminLogin } = createNamespacedHelpers('adminLogin');
 export default {
 export default {
   name: 'register-1',
   name: 'register-1',
   props: {
   props: {
@@ -49,10 +62,16 @@ export default {
     return {
     return {
       showPicker: false,
       showPicker: false,
       jurisList: juris,
       jurisList: juris,
+      // 邀请码
+      codeList: [],
+      codeShow: false,
     };
     };
   },
   },
-  created() {},
+  created() {
+    this.searchOther();
+  },
   methods: {
   methods: {
+    ...adminLogin(['query']),
     // 取消注册
     // 取消注册
     reseat() {
     reseat() {
       this.$router.push({ path: '/login' });
       this.$router.push({ path: '/login' });
@@ -64,12 +83,30 @@ export default {
     next() {
     next() {
       this.$emit('next');
       this.$emit('next');
     },
     },
-
     // 选择辖区
     // 选择辖区
     confirm(value) {
     confirm(value) {
       this.$set(this.form, `juris`, value);
       this.$set(this.form, `juris`, value);
       this.showPicker = false;
       this.showPicker = false;
     },
     },
+    // 选择邀请码
+    codeFirm(value) {
+      this.$set(this.form, `code`, value.code);
+      this.codeShow = false;
+    },
+    // 查询其他信息
+    async searchOther() {
+      let p1 = await this.query({ role: '1' });
+      if (this.$checkRes(p1)) {
+        let data = [];
+        for (const val of p1.data) {
+          let p2 = await this.query({ role: '2', pid: val.id });
+          if (this.$checkRes(p2)) {
+            data.push(...p2.data);
+          }
+        }
+        this.$set(this, `codeList`, data);
+      }
+    },
   },
   },
   computed: {
   computed: {
     ...mapState(['user']),
     ...mapState(['user']),

+ 1 - 0
src/util/test.js

@@ -0,0 +1 @@
+export const list = [];

+ 2 - 2
src/views/account/basic/parts/info-3.vue

@@ -4,9 +4,9 @@
       <van-col span="24" class="main">
       <van-col span="24" class="main">
         <van-form @submit="onSubmit">
         <van-form @submit="onSubmit">
           <van-field v-model="form.id" name="id" label="数据id" style="display: none" />
           <van-field v-model="form.id" name="id" label="数据id" style="display: none" />
-          <van-field v-model="form.name" name="name" label="姓名" placeholder="请填写姓名" :rules="[{ required: true, message: '姓名' }]" />
-          <van-field v-model="form.phone" name="phone" label="手机号" placeholder="请填写手机号" :rules="[{ required: true, message: '手机号' }]" />
           <van-field v-model="form.code" name="code" label="邀请码" placeholder="请填写邀请码" readonly />
           <van-field v-model="form.code" name="code" label="邀请码" placeholder="请填写邀请码" readonly />
+          <van-field v-model="form.phone" name="phone" label="账号" placeholder="请填写账号" readonly />
+          <van-field v-model="form.name" name="name" label="手机号" placeholder="请填写手机号" :rules="[{ required: true, message: '手机号' }]" />
           <van-field v-model="form.card" name="card" label="身份证号" placeholder="请填写身份证号" />
           <van-field v-model="form.card" name="card" label="身份证号" placeholder="请填写身份证号" />
           <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请填写电子邮箱" />
           <van-field v-model="form.email" name="email" label="电子邮箱" placeholder="请填写电子邮箱" />
           <van-field v-model="form.addr" name="addr" label="联系地址" placeholder="请填写联系地址" />
           <van-field v-model="form.addr" name="addr" label="联系地址" placeholder="请填写联系地址" />

+ 10 - 6
src/views/patent/admin/message/parts/form-1.vue

@@ -42,7 +42,7 @@
     <van-dialog class="dialog" v-model="dialog.show" :title="dialog.title" :show-confirm-button="false" show-cancel-button cancel-button-text="返回">
     <van-dialog class="dialog" v-model="dialog.show" :title="dialog.title" :show-confirm-button="false" show-cancel-button cancel-button-text="返回">
       <van-col span="24" class="one" v-if="dialog.type == '1'">
       <van-col span="24" class="one" v-if="dialog.type == '1'">
         <van-col span="24" class="one_1">
         <van-col span="24" class="one_1">
-          <van-search v-model="name" show-action placeholder="请输入姓名">
+          <van-search v-model="phone" show-action placeholder="请输入账号">
             <template #action>
             <template #action>
               <div @click="searchUser()">搜索</div>
               <div @click="searchUser()">搜索</div>
             </template>
             </template>
@@ -50,10 +50,13 @@
         </van-col>
         </van-col>
         <van-col span="24" class="one_2">
         <van-col span="24" class="one_2">
           <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
           <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
-            <van-col span="24" class="name"> {{ item.name }} </van-col>
+            <van-col span="24" class="name"> {{ item.phone }} </van-col>
             <van-col span="24" class="other">
             <van-col span="24" class="other">
               <van-col span="24" class="otherInfo">
               <van-col span="24" class="otherInfo">
-                联系电话:<span>{{ item.phone }}</span>
+                联系电话:<span>{{ item.name }}</span>
+              </van-col>
+              <van-col span="24" class="otherInfo">
+                机构代码:<span>{{ item.code }}</span>
               </van-col>
               </van-col>
             </van-col>
             </van-col>
             <van-col span="24" class="btn">
             <van-col span="24" class="btn">
@@ -83,7 +86,7 @@ export default {
     return {
     return {
       dialog: { show: false, titla: '查询用户', type: '1' },
       dialog: { show: false, titla: '查询用户', type: '1' },
       // 查询
       // 查询
-      name: '',
+      phone: '',
       list: [],
       list: [],
       limit: 3,
       limit: 3,
       total: 0,
       total: 0,
@@ -113,7 +116,7 @@ export default {
     },
     },
     // 查询用户
     // 查询用户
     async searchUser({ skip = 0, limit = this.limit, ...info } = {}) {
     async searchUser({ skip = 0, limit = this.limit, ...info } = {}) {
-      let res = await this.personalQuery({ skip, limit, name: this.name, ...info });
+      let res = await this.personalQuery({ skip, limit, phone: this.phone, ...info });
       if (this.$checkRes(res)) {
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);
         this.$set(this, `list`, res.data);
         this.$set(this, `total`, res.total);
         this.$set(this, `total`, res.total);
@@ -122,7 +125,7 @@ export default {
     // 确认选择
     // 确认选择
     conFirm(value) {
     conFirm(value) {
       this.$set(this.form, `to_id`, value.id);
       this.$set(this.form, `to_id`, value.id);
-      this.$set(this.form, `to_name`, value.name);
+      this.$set(this.form, `to_name`, value.phone);
       this.dialog = { show: false, title: '查询用户', type: '1' };
       this.dialog = { show: false, title: '查询用户', type: '1' };
     },
     },
   },
   },
@@ -163,6 +166,7 @@ export default {
           .otherInfo {
           .otherInfo {
             font-size: 14px;
             font-size: 14px;
             color: #666;
             color: #666;
+            margin: 0 0 5px 0;
             span {
             span {
               color: #000;
               color: #000;
             }
             }

+ 2 - 2
src/views/patent/parts/userTop.vue

@@ -8,10 +8,10 @@
           </van-col>
           </van-col>
           <van-col span="24" class="other">
           <van-col span="24" class="other">
             <van-col span="24" class="otherInfo">
             <van-col span="24" class="otherInfo">
-              {{ userInfo.name || '游客' }}
+              {{ userInfo.phone || '游客' }}
             </van-col>
             </van-col>
             <van-col span="24" class="otherInfo">
             <van-col span="24" class="otherInfo">
-              {{ userInfo.phone || '游客123456' }}
+              {{ userInfo.name || '游客123456' }}
             </van-col>
             </van-col>
           </van-col>
           </van-col>
         </van-col>
         </van-col>

+ 1 - 1
src/views/patent/user/chat/detail.vue

@@ -31,7 +31,7 @@ export default {
   methods: {
   methods: {
     ...problem_service(['fetch', 'create', 'update']),
     ...problem_service(['fetch', 'create', 'update']),
     search() {
     search() {
-      this.$set(this, `form`, { ask_id: this.user.id, ask_name: this.user.name });
+      this.$set(this, `form`, { ask_id: this.user.id, ask_name: this.user.phone });
     },
     },
     async onSubmit({ data }) {
     async onSubmit({ data }) {
       data.status = '0';
       data.status = '0';

+ 3 - 3
src/views/patent/user/patent/information/trans_create.vue

@@ -63,7 +63,7 @@ export default {
       // 查询专利评估报告
       // 查询专利评估报告
       let data = {
       let data = {
         user_id: this.user.id,
         user_id: this.user.id,
-        user_name: this.user.name,
+        user_name: this.user.phone,
         mech_id: this.mechInfo.id,
         mech_id: this.mechInfo.id,
         mech_name: this.mechInfo.name,
         mech_name: this.mechInfo.name,
         patent_id: this.patentInfo.id,
         patent_id: this.patentInfo.id,
@@ -71,8 +71,8 @@ export default {
         create_number: this.patentInfo.create_number,
         create_number: this.patentInfo.create_number,
         on_obligee: this.patentInfo.on_obligee,
         on_obligee: this.patentInfo.on_obligee,
         abstract: this.patentInfo.abstract || '',
         abstract: this.patentInfo.abstract || '',
-        contact: this.user.name,
-        phone: this.user.phone,
+        contact: this.user.phone,
+        phone: this.user.name,
         email: this.user.email,
         email: this.user.email,
         is_report: this.assessInfo ? true : false,
         is_report: this.assessInfo ? true : false,
         // report: this.assessInfo ? this.assessInfo.report : [],
         // report: this.assessInfo ? this.assessInfo.report : [],

+ 2 - 2
src/views/patent/user/patent/safe/index.vue

@@ -116,8 +116,8 @@ export default {
         let data = {
         let data = {
           admin_id: this.adminInfo.id,
           admin_id: this.adminInfo.id,
           user_id: this.user.id,
           user_id: this.user.id,
-          contact: this.user.name,
-          phone: this.user.phone,
+          contact: this.user.phone,
+          phone: this.user.name,
           email: this.user.email,
           email: this.user.email,
           questions: {},
           questions: {},
         };
         };

+ 1 - 1
src/views/patent/user/transaction/contract.vue

@@ -35,7 +35,7 @@ export default {
         let data = res.data;
         let data = res.data;
         let contract = {
         let contract = {
           transfer_id: this.user.id,
           transfer_id: this.user.id,
-          transfer: this.user.name,
+          transfer: this.user.phone,
           patent_id: data.patent_id,
           patent_id: data.patent_id,
           create_number: data.create_number,
           create_number: data.create_number,
           patent_name: data.patent_name,
           patent_name: data.patent_name,