k94314517
2025-05-19 16e8c7adbee6c9ee9bac09a80d44d3bfd3fe2f0c
wx/pages/addPersonnel/addPersonnel.vue
@@ -19,7 +19,13 @@
               </view>
               <view class="box_head_info_list_item" v-if="info.type !== 1">
                  <view class="label">费用:</view>
                  <view class="value">{{info.price}}元</view>
                  <view class="value">
                     {{info.price}}元
                     <text v-if="info.timeUnit === 0">/天</text>
                     <text v-if="info.timeUnit === 1">/半月</text>
                     <text v-if="info.timeUnit === 2">/月</text>
                     <text v-if="info.timeUnit === 3">/年</text>
                  </view>
               </view>
            </view>
         </view>
@@ -38,6 +44,7 @@
                     <text>{{IdCard(item.idCard, 2)}}|{{IdCard(item.idCard, 3)}}岁</text>
                  </view>
                  <view class="top_b">身份证号:{{item.idCard}}</view>
                  <view class="top_b">备注:{{item.remark||''}}</view>
               </view>
               <view class="center"></view>
               <view class="bottom">
@@ -126,6 +133,7 @@
            </view>
         </view>
      </u-popup>
      <u-toast ref="uToast"></u-toast>
   </view>
</template>
@@ -144,8 +152,8 @@
      },
      computed: {
         totalPrice() {
            if (this.info && this.info.price) {
               return (this.list.length * this.info.price).toFixed(2)
            if (this.model && this.model.cyclePrice) {
               return (this.list.length * this.model.cyclePrice).toFixed(2)
            }
            return '0.00'
         }
@@ -156,7 +164,14 @@
            this.getDetails()
         }
         uni.$on('add', (data) => {
            this.list.unshift(data.model)
            if (JSON.stringify(this.list).indexOf(data.model.idCard) !== -1) {
               this.$refs.uToast.show({
                  type: 'default',
                  message: `[${data.model.name}]人员身份证重复`
               })
            } else {
               this.list.unshift(data.model)
            }
         })
      },
      methods: {
@@ -167,6 +182,7 @@
                  idcardNo: item.idCard,
                  duId: item.pqId,
                  duName: item.pqName,
                  remark:item.remark,
                  workTypeName: item.gzName,
                  worktypeId: item.gzId,
                  fee: this.info.price