''
liukangdong
2024-05-28 95809b417c79622743d7a622f5db25e2187d3650
''
已修改1个文件
78 ■■■■ 文件已修改
h5/pages/applicationRecord/applicationRecord.vue 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/applicationRecord/applicationRecord.vue
@@ -2,14 +2,39 @@
  <view class="box">
    <scroll-view scroll-x class="box_head">
      <view class="box_head_list">
        <view class="box_head_item active">全部</view>
        <view class="box_head_item">待审核</view>
        <view class="box_head_item">审核通过</view>
        <view class="box_head_item">审核驳回</view>
        <view
          class="box_head_item"
          :class="{ active: status == '' }"
          @click="tabsClick('')"
          >全部</view
        >
        <view
          class="box_head_item"
          @click="tabsClick('0')"
          :class="{ active: status == '0' }"
          >待审核</view
        >
        <view
          class="box_head_item"
          @click="tabsClick('2')"
          :class="{ active: status == '2' }"
          >审核通过</view
        >
        <view
          class="box_head_item"
          @click="tabsClick('3')"
          :class="{ active: status == '3' }"
          >审核驳回</view
        >
      </view>
    </scroll-view>
    <view class="box_list">
      <view @click="handleDetail(item.id)" class="box_list_item" v-for="(item, index) in list" :key="index">
      <view
        @click="handleDetail(item.id)"
        class="box_list_item"
        v-for="(item, index) in list"
        :key="index"
      >
        <view class="box_list_item_head">
          <text>{{ item.name }}的劳务入厂申请</text>
          <text class="loading">{{ statusMap[item.status] }}</text>
@@ -17,7 +42,11 @@
        <view class="box_list_item_nr">
          <view class="box_list_item_nr_item">
            <text>被访问人:</text>
            <text>{{ item.receptMemberDepartment }}-{{ item.receptMemberName }}</text>
            <text
              >{{ item.receptMemberDepartment }}-{{
                item.receptMemberName
              }}</text
            >
          </view>
          <view class="box_list_item_nr_item">
            <text>进厂时间:</text>
@@ -49,6 +78,8 @@
        capacity: 10
      },
      list: [],
      total: 0,
      status: '',
      statusMap: {
        0: '待审核',
@@ -64,22 +95,41 @@
  onLoad() {
    this.getList()
  },
  onReachBottom() {
    if (this.total > 10) {
      this.getList()
    }
  },
  methods: {
    handleDetail(id) {
      uni.navigateTo({
          url: "/pages/appointmentDetails/appointmentDetails?id="+ id
        url: "/pages/appointmentDetails/appointmentDetails?id=" + id
      })
    },
    tabsClick(val) {
      this.pagination.page = 0
      this.status = val
      this.getList()
    },
    getList() {
      const { pagination } = this
      const { pagination, status, list } = this
      pagination.page = pagination.page + 1
      getVisitedRecord({
         ...pagination,
         model: {
          openid: this.$store.state.openId
         } ,
        ...pagination,
        model: {
          openid: this.$store.state.openId,
          status
        },
      }).then(res => {
        this.list = res.data.records || []
        if (res.data.records.length > 0) {
          if(pagination.page === 1){
            this.list = res.data.records
          }else{
            this.list = [...list, ...res.data.records]
          }
          this.total = res.data.total
        }
      })
    }