浏览代码

no message

linwenxin 1 周之前
父节点
当前提交
3745f0799f

+ 4 - 0
src/packageEnter/pages/insurance/determineInfo/index.vue

@@ -16,6 +16,10 @@
               <text>保单名称</text>
               <text>保单名称</text>
               <text>{{ info.policyName }}</text>
               <text>{{ info.policyName }}</text>
             </view>
             </view>
+            <view class="module-view-single">
+              <text>保单类型</text>
+              <text>{{ { AC: '意外险', EM: '雇主险', IN: '工伤险', DS: '第三者责任险' }[info.type] }}</text>
+            </view>
             <view class="module-view-single" v-if="info.startTime">
             <view class="module-view-single" v-if="info.startTime">
               <text>生效日期</text>
               <text>生效日期</text>
               <text>{{ info.startTime }}</text>
               <text>{{ info.startTime }}</text>

+ 134 - 53
src/packageEnter/pages/insurance/myInsurance/index.vue

@@ -1,59 +1,83 @@
 <template>
 <template>
-  <zj-page-layout
-    :isScroll="true"
-    :refresherTriggered="refresherTriggered"
-    @refresherrefresh="refresherrefresh"
-    :hasFooter="true"
-  >
-    <view class="myInsurance">
-      <view class="myInsuranceCart" v-for="(item, index) in list" :key="index" @click="gopage(item)">
-        <view class="myInsuranceCartbuju xiangxia">
-          <view class="">
-            {{ item.policyName }}
+  <view style="width: 100%; height: 100vh; background: rgb(247, 248, 255)">
+    <zj-page-container>
+      <view class="toubuyangs">
+        <view class="toubuyangsTab">
+          <view class="toubuyangsTabItem" @click="tabQiehuan('AC')">
+            <view>已组队</view>
+            <view :class="{ hengxian: true, xuanzhong: tab == 'AC' }"> </view>
           </view>
           </view>
-          <view class="" style="color: red">
-            {{ { BZZ: '保障中', YSX: '失效', DSX: '待生效' }[item.policyOrderStatus] }}
+          <view class="toubuyangsTabItem" @click="tabQiehuan('DS')">
+            <view>待确认</view>
+            <view :class="{ hengxian: true, xuanzhong: tab == 'DS' }"></view>
           </view>
           </view>
         </view>
         </view>
-        <view class="">
-          <view class="xiangxia"> 所属网点:{{ item.websitName }} </view>
-          <view class="xiangxia"> 保单类型:{{ { AC: '意外险', EM: '雇主险', IN: '工伤险' }[item.type] }} </view>
-          <view class="xiangxia"> 保单编号:{{ item.policyNumber }} </view>
-          <view class="xiangxia"> 保单金额:{{ item.payAmount }} </view>
-          <view class="xiangxia" v-if="item.startTime && item.endTime">
-            有效时间:{{ item.startTime ? item.startTime.split(' ')[0] : '' }}~{{
-              item.endTime ? item.endTime.split(' ')[0] : ''
-            }}
-          </view>
-          <view class="xiangxia" v-else> 有效时间: </view>
-        </view>
-      </view>
-    </view>
-    <Loading :loadStatus="loadStatus" :dataList="list" />
-    <zjDialogPicker
-      ref="websitDialog"
-      :isShow="isShowWebsitDialog"
-      :multiple="false"
-      :styleType="2"
-      :title="'选择对应网点购买保险'"
-      :list="baoxiandangqianxianxitishi"
-      :keyName="'name'"
-      @cancel="isShowWebsitDialog = false"
-      @confirm="confirmWebsitDialog"
-    >
-    </zjDialogPicker>
-    <template slot="footer" v-if="!!baoxiandangqianxianxitishi.length">
-      <view class="bottom-container" style="box-sizing: border-box; padding: 20rpx">
-        <u-button text="去购买" shape="circle" type="primary" @click="isShowWebsitDialog = true"> </u-button>
       </view>
       </view>
-    </template>
-  </zj-page-layout>
+      <zj-page-fill>
+        <zj-page-layout
+          :isScroll="true"
+          :refresherTriggered="refresherTriggered"
+          @refresherrefresh="refresherrefresh"
+          :hasFooter="true"
+        >
+          <view class="myInsurance">
+            <view class="myInsuranceCart" v-for="(item, index) in list" :key="index" @click="gopage(item)">
+              <view class="myInsuranceCartbuju xiangxia">
+                <view class="">
+                  {{ item.policyName }}
+                </view>
+                <view class="" style="color: red">
+                  {{ { BZZ: '保障中', YSX: '失效', DSX: '待生效' }[item.policyOrderStatus] }}
+                </view>
+              </view>
+              <view class="">
+                <view class="xiangxia"> 所属网点:{{ item.websitName }} </view>
+                <view class="xiangxia">
+                  保单类型:{{ { AC: '意外险', EM: '雇主险', IN: '工伤险', DS: '第三者责任险' }[item.type] }}
+                </view>
+                <view class="xiangxia"> 保单编号:{{ item.policyNumber }} </view>
+                <view class="xiangxia"> 保单金额:{{ item.payAmount }} </view>
+                <view class="xiangxia" v-if="item.startTime && item.endTime">
+                  有效时间:{{ item.startTime ? item.startTime.split(' ')[0] : '' }}~{{
+                    item.endTime ? item.endTime.split(' ')[0] : ''
+                  }}
+                </view>
+                <view class="xiangxia" v-else> 有效时间: </view>
+              </view>
+            </view>
+          </view>
+          <Loading :loadStatus="loadStatus" :dataList="list" />
+          <zjDialogPicker
+            ref="websitDialog"
+            :isShow="isShowWebsitDialog"
+            :multiple="false"
+            :styleType="2"
+            :title="'选择对应网点购买保险'"
+            :list="baoxiandangqianxianxitishi"
+            :keyName="'name'"
+            @cancel="isShowWebsitDialog = false"
+            @confirm="confirmWebsitDialog"
+          >
+          </zjDialogPicker>
+          <template slot="footer" v-if="!!baoxiandangqianxianxitishi.length">
+            <view class="bottom-container" style="box-sizing: border-box; padding: 20rpx">
+              <u-button text="去购买" shape="circle" type="primary" @click="qugoumai"> </u-button>
+            </view>
+          </template>
+        </zj-page-layout>
+      </zj-page-fill>
+    </zj-page-container>
+  </view>
 </template>
 </template>
 <script>
 <script>
 import zjDialogPicker from '@/components/zj-dialog/zj-dialog-picker.vue'
 import zjDialogPicker from '@/components/zj-dialog/zj-dialog-picker.vue'
+import zjPageContainer from '@/components/zj-page-container/zj-page-container.vue'
+import zjPageFill from '@/components/zj-page-container/zj-page-fill.vue'
 export default {
 export default {
   components: {
   components: {
-    zjDialogPicker
+    zjDialogPicker,
+    zjPageContainer,
+    zjPageFill
   },
   },
   data() {
   data() {
     return {
     return {
@@ -62,7 +86,8 @@ export default {
       websitId: '',
       websitId: '',
       baoxiandangqianxianxitishi: [],
       baoxiandangqianxianxitishi: [],
       isShowWebsitDialog: false,
       isShowWebsitDialog: false,
-      refresherTriggered: false
+      refresherTriggered: false,
+      tab: 'AC'
     }
     }
   },
   },
   onShow() {
   onShow() {
@@ -70,23 +95,43 @@ export default {
       title: '加载中'
       title: '加载中'
     })
     })
     this.loadStatus = 1
     this.loadStatus = 1
-    this.$api.post('/worker/myPolicy', { pageNum: 1, pageSize: -1 }).then(res => {
+    this.$api.post('/worker/myPolicy', { pageNum: 1, pageSize: -1, type: this.tab }).then(res => {
       this.$nextTick(() => {
       this.$nextTick(() => {
         uni.hideLoading()
         uni.hideLoading()
       })
       })
       this.loadStatus = 2
       this.loadStatus = 2
       this.list = res?.data?.records || []
       this.list = res?.data?.records || []
     })
     })
-    this.$api.post('/worker/myWebsit').then(res => {
-      this.baoxiandangqianxianxitishi = res.data
-    })
   },
   },
   methods: {
   methods: {
+    qugoumai() {
+      this.baoxiandangqianxianxitishi = []
+      if (this.tab == 'DS') {
+        this.$api.post('/worker/myDsWebsit').then(res => {
+          this.baoxiandangqianxianxitishi = res.data
+          this.isShowWebsitDialog = true
+        })
+      } else {
+        this.$api.post('/worker/myWebsit').then(res => {
+          this.baoxiandangqianxianxitishi = res.data
+          this.isShowWebsitDialog = true
+        })
+      }
+    },
+    tabQiehuan(index) {
+      this.tab = index
+      this.loadStatus = 1
+      this.$api.post('/worker/myPolicy', { pageNum: 1, pageSize: -1, type: this.tab }).then(res => {
+        this.loadStatus = 2
+        this.list = res?.data?.records || []
+      })
+    },
+
     // 触发下拉刷新
     // 触发下拉刷新
     refresherrefresh(e) {
     refresherrefresh(e) {
       this.refresherTriggered = true
       this.refresherTriggered = true
       this.loadStatus = 1
       this.loadStatus = 1
-      this.$api.post('/worker/myPolicy', { pageNum: 1, pageSize: -1 }).then(res => {
+      this.$api.post('/worker/myPolicy', { pageNum: 1, pageSize: -1, type: this.tab }).then(res => {
         this.$nextTick(() => {
         this.$nextTick(() => {
           this.refresherTriggered = false
           this.refresherTriggered = false
         })
         })
@@ -99,7 +144,9 @@ export default {
       this.$navToPage({
       this.$navToPage({
         url:
         url:
           '/packageEnter/pages/insurance/myInsuranceBuy/index?websitId=' +
           '/packageEnter/pages/insurance/myInsuranceBuy/index?websitId=' +
-          this?.baoxiandangqianxianxitishi?.[e[0]]?.websitId
+          this?.baoxiandangqianxianxitishi?.[e[0]]?.websitId +
+          '&xzType=' +
+          this.tab
       })
       })
     },
     },
     gopage(item) {
     gopage(item) {
@@ -127,6 +174,7 @@ export default {
       12.5px 12.5px 10px rgba(0, 0, 0, 0.035), 22.3px 22.3px 17.9px rgba(0, 0, 0, 0.042),
       12.5px 12.5px 10px rgba(0, 0, 0, 0.035), 22.3px 22.3px 17.9px rgba(0, 0, 0, 0.042),
       41.8px 41.8px 33.4px rgba(0, 0, 0, 0.05), 100px 100px 80px rgba(0, 0, 0, 0.07);
       41.8px 41.8px 33.4px rgba(0, 0, 0, 0.05), 100px 100px 80px rgba(0, 0, 0, 0.07);
     border-radius: 10rpx;
     border-radius: 10rpx;
+    background: #ffffff;
 
 
     .myInsuranceCartbuju {
     .myInsuranceCartbuju {
       display: flex;
       display: flex;
@@ -138,4 +186,37 @@ export default {
     }
     }
   }
   }
 }
 }
+
+.toubuyangs {
+  width: 100%;
+  height: auto;
+  box-sizing: border-box;
+  padding: 30rpx 30rpx 15rpx 30rpx;
+  .toubuyangsTab {
+    width: 100%;
+    height: auto;
+    padding: 30rpx;
+    box-sizing: border-box;
+    background: #fff;
+    border-radius: 20rpx;
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+    .toubuyangsTabItem {
+      box-sizing: border-box;
+      font-size: 32rpx;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      flex-direction: column;
+      .hengxian {
+        margin-top: 20rpx;
+        width: 100rpx;
+      }
+      .xuanzhong {
+        border-bottom: 4rpx solid #000;
+      }
+    }
+  }
+}
 </style>
 </style>

+ 32 - 27
src/packageEnter/pages/insurance/myInsuranceBuy/index.vue

@@ -5,6 +5,9 @@
         <view class="xiangxia"> 承保公司:{{ item.company }} </view>
         <view class="xiangxia"> 承保公司:{{ item.company }} </view>
         <view class="xiangxia"> 保单名称:{{ item.policyName }} </view>
         <view class="xiangxia"> 保单名称:{{ item.policyName }} </view>
         <view class="xiangxia"> 保单编号:{{ item.policyNumber }} </view>
         <view class="xiangxia"> 保单编号:{{ item.policyNumber }} </view>
+        <view class="xiangxia">
+          保单类型:{{ { AC: '意外险', EM: '雇主险', IN: '工伤险', DS: '第三者责任险' }[item.type] }}
+        </view>
         <view class="xiangxia"> 保单金额:{{ item.policyPrice }} </view>
         <view class="xiangxia"> 保单金额:{{ item.policyPrice }} </view>
         <view class="xiangxia"> 有效时间:{{ item.startTime.split(' ')[0] }}~{{ item.endTime.split(' ')[0] }} </view>
         <view class="xiangxia"> 有效时间:{{ item.startTime.split(' ')[0] }}~{{ item.endTime.split(' ')[0] }} </view>
       </view>
       </view>
@@ -21,39 +24,41 @@ export default {
       websitId: ''
       websitId: ''
     }
     }
   },
   },
-  onLoad({ websitId }) {
+  onLoad({ websitId, xzType }) {
     this.websitId = websitId
     this.websitId = websitId
     uni.showLoading({
     uni.showLoading({
       title: '加载中'
       title: '加载中'
     })
     })
     this.loadStatus = 1
     this.loadStatus = 1
-    this.$api.post('/worker/policy', { pageNum: 1, pageSize: -1, websitId }).then(res => {
-      this.list = res?.data?.records
-      this.loadStatus = 2
-      this.$nextTick(() => {
-        uni.hideLoading()
-        // setTimeout(() => {
-        //   if (this.list.length == 0) {
-        //     uni.showModal({
-        //       title: '提示',
-        //       // 提示文字
-        //       content: '保险方案没绑定网点,请联系工作人员!',
-        //       // 取消按钮的文字自定义
-        //       cancelText: '取消',
-        //       // 确认按钮的文字自定义
-        //       confirmText: '知道了',
-        //       success: function (res) {
-        //         if (res.confirm) {
-        //           // 执行确认后的操作
-        //         } else {
-        //           // 执行取消后的操作
-        //         }
-        //       }
-        //     })
-        //   }
-        // }, 250)
+    this.$api
+      .post(xzType == 'DS' ? '/worker/dsPolicy' : '/worker/policy', { pageNum: 1, pageSize: -1, websitId })
+      .then(res => {
+        this.list = res?.data?.records
+        this.loadStatus = 2
+        this.$nextTick(() => {
+          uni.hideLoading()
+          // setTimeout(() => {
+          //   if (this.list.length == 0) {
+          //     uni.showModal({
+          //       title: '提示',
+          //       // 提示文字
+          //       content: '保险方案没绑定网点,请联系工作人员!',
+          //       // 取消按钮的文字自定义
+          //       cancelText: '取消',
+          //       // 确认按钮的文字自定义
+          //       confirmText: '知道了',
+          //       success: function (res) {
+          //         if (res.confirm) {
+          //           // 执行确认后的操作
+          //         } else {
+          //           // 执行取消后的操作
+          //         }
+          //       }
+          //     })
+          //   }
+          // }, 250)
+        })
       })
       })
-    })
   },
   },
   methods: {
   methods: {
     gopage(item) {
     gopage(item) {

+ 1 - 1
src/packageEnter/pages/insurance/policyParticulars/index.vue

@@ -14,7 +14,7 @@
         </view>
         </view>
         <view class="page-content">
         <view class="page-content">
           <view class="page-title-view">
           <view class="page-title-view">
-            <text>{{ info.policyName }}</text>
+            <text>{{ { AC: '意外险', EM: '雇主险', IN: '工伤险', DS: '第三者责任险' }[info.type] }}</text>
             <image mode="aspectFit" src="/static/images/common/bpa.png"> </image>
             <image mode="aspectFit" src="/static/images/common/bpa.png"> </image>
           </view>
           </view>
           <view class="page-content-view">
           <view class="page-content-view">