党员申请自动带入名字身份证
This commit is contained in:
		@@ -71,7 +71,7 @@ export default {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          this.$store.dispatch('getUserInfo')
 | 
			
		||||
          if (res.data == 3 || res.data == 0) {
 | 
			
		||||
            uni.redirectTo({url: `./partyAuthApply`})
 | 
			
		||||
            uni.redirectTo({url: `./partyAuthApply?name=${name}&idNumber=${idNumber}`})
 | 
			
		||||
          } else {
 | 
			
		||||
            uni.redirectTo({url: "./partyAuthSuccess"})
 | 
			
		||||
          }
 | 
			
		||||
 
 | 
			
		||||
@@ -113,12 +113,16 @@ export default {
 | 
			
		||||
  computed: {
 | 
			
		||||
    ...mapState(['user'])
 | 
			
		||||
  },
 | 
			
		||||
  onLoad() {
 | 
			
		||||
  onLoad(o) {
 | 
			
		||||
    console.log(o);
 | 
			
		||||
    uni.setNavigationBarTitle({
 | 
			
		||||
      title: '申请党员'
 | 
			
		||||
    });
 | 
			
		||||
    if(this.user.partyId?.length > 0) {
 | 
			
		||||
      this.getDetail()
 | 
			
		||||
    } else {
 | 
			
		||||
      this.form.name = o.name
 | 
			
		||||
      this.form.idNumber = o.idNumber
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
@@ -132,15 +136,8 @@ export default {
 | 
			
		||||
    getDetail() {
 | 
			
		||||
      this.$instance.post(`/app/appparty/detail?id=${this.user.partyId}`).then(res=> {
 | 
			
		||||
        if(res?.data) {
 | 
			
		||||
          this.form.id = res.data.id
 | 
			
		||||
          this.form.name = res.data.name
 | 
			
		||||
          this.form.idNumber = res.data.idNumber
 | 
			
		||||
          this.form.phone = res.data.phone
 | 
			
		||||
          this.form.partyOrgId = res.data.partyOrgId
 | 
			
		||||
          this.form.partyOrgName = res.data.partyOrgName
 | 
			
		||||
          this.form.joinPartyTime = res.data.joinPartyTime
 | 
			
		||||
          this.form.partyType = res.data.partyType
 | 
			
		||||
          this.form.partyStatus = res.data.partyStatus
 | 
			
		||||
          this.form = res.data
 | 
			
		||||
          delete this.form.auditOpinion
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
@@ -168,7 +165,6 @@ export default {
 | 
			
		||||
        ...this.form,
 | 
			
		||||
      }).then(res => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          uni.$emit('update')
 | 
			
		||||
          this.$toast('提交成功')
 | 
			
		||||
          this.$store.dispatch('getUserInfo')
 | 
			
		||||
          uni.removeStorageSync('lastSelectedParty');
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,6 @@
 | 
			
		||||
          <b v-text="user.realName"/>
 | 
			
		||||
          <div class="color-999">{{ $dict.getLabel('sex', detail.sex) }} {{detail.age}}</div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <!-- <div class="blue" v-if="isOwner">户主</div> -->
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="card">
 | 
			
		||||
@@ -20,18 +19,6 @@
 | 
			
		||||
        <div v-else v-text="detail[row.prop]||'-'"/>
 | 
			
		||||
      </view>
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- <div class="card">
 | 
			
		||||
      <b class="title" v-text="`联络方式`"/>
 | 
			
		||||
      <view class="item" :class="{spb:!row.topLabel,flex:!row.topLabel}" v-for="row in contract" :key="row.prop">
 | 
			
		||||
        <span class="color-999" v-text="row.label"/>
 | 
			
		||||
        <div v-text="detail[row.prop]||'-'"/>
 | 
			
		||||
      </view>
 | 
			
		||||
    </div> -->
 | 
			
		||||
    <!-- <div class="fixed-bottom">
 | 
			
		||||
      <u-button type="primary" @click="apply">
 | 
			
		||||
        <text style="font-size: 16px" v-text="`申请修改`"/>
 | 
			
		||||
      </u-button>
 | 
			
		||||
    </div> -->
 | 
			
		||||
  </section>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
@@ -44,31 +31,16 @@ export default {
 | 
			
		||||
    return {
 | 
			
		||||
      detail: {},
 | 
			
		||||
      baseInfo: [
 | 
			
		||||
        // {label: "年龄", prop: "age"},
 | 
			
		||||
        {label: "身份证号", prop: "idNumber"},
 | 
			
		||||
        {label: "联系方式", prop: "phone"},
 | 
			
		||||
        {label: "党组织", prop: "partyOrgName"},
 | 
			
		||||
        {label: "入党时间", prop: "joinPartyTime"},
 | 
			
		||||
        {label: "党员类型", prop: "partyType", dict: "partyType"},
 | 
			
		||||
      ],
 | 
			
		||||
      // contract: [
 | 
			
		||||
      //   {label: "联系方式", prop: "phone"},
 | 
			
		||||
      //   {label: "现住址", prop: "currentAreaName"},
 | 
			
		||||
      //   {label: "详细住址", prop: "currentAddress", topLabel: true},
 | 
			
		||||
      //   {label: "户籍地址", prop: "householdAreaName"},
 | 
			
		||||
      //   {label: "详细地址", prop: "householdAddress", topLabel: true},
 | 
			
		||||
      // ]
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    ...mapState(['user']),
 | 
			
		||||
    // sexAge() {
 | 
			
		||||
    //   let {idNumber, gender} = this.$idCardNoUtil.getIdCardInfo(this.user.idNumber), age = this.$calcAge(idNumber)
 | 
			
		||||
    //   return `${this.$dict.getLabel("sex", gender) || ""} ${age ? age + "岁" : ""}`
 | 
			
		||||
    // },
 | 
			
		||||
    // isOwner() {
 | 
			
		||||
    //   return this.detail.householdName == 1
 | 
			
		||||
    // }
 | 
			
		||||
  },
 | 
			
		||||
  onLoad() {
 | 
			
		||||
    this.$dict.load('partyType','sex')
 | 
			
		||||
@@ -82,9 +54,6 @@ export default {
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    apply() {
 | 
			
		||||
      uni.navigateTo({url: "./partyAuthApply"})
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user