Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

lxy_01 2 tygodni temu
rodzic
commit
2817a0e84e

+ 2 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/MealApplicationsController.java

@@ -132,9 +132,11 @@ public class MealApplicationsController {
     public HttpRespMsg getQrCode(HttpServletRequest request,String mealType, String factory){
         HttpRespMsg msg = new HttpRespMsg();
         LocalDateTime now = LocalDateTime.now();
+        MealTypes mealTypes = mealTypeService.getById(mealType);
         QueryWrapper<MealApplications> eq = new QueryWrapper<MealApplications>().eq("user_id", request.getHeader("token")).eq("meal_type_id", mealType).eq("factory_id", factory)
                 .eq("application_date", now.toLocalDate()).orderByDesc("applied_at").last("limit 1");
         MealApplications mealApplications = mealApplicationsService.getOne(eq);
+        mealApplications.setDeadlineTime(mealTypes.getDeadlineTime());
         if(mealApplications==null){
             return msg.fail("二维码不存在");
         }

+ 2 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/MealApplications.java

@@ -125,6 +125,8 @@ public class MealApplications extends Model<MealApplications> {
     private String factoryName;
     @TableField(exist = false)
     private String mealTypeName;
+    @TableField(exist = false)
+    private String deadlineTime;
 
     @Override
     protected Serializable pkVal() {

+ 4 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/meal/mealApplication.vue

@@ -8,7 +8,7 @@
     <van-tabs v-model:active="mealType" @change="onMealTypeChange">
       <van-tab v-for="item in meals"
                :key="item.id"
-               :title="item.name + (item.deadlineTime ? ' (申报截止时间:' + item.deadlineTime + ')' : '')"
+               :title="item.name"
                :name="item.id">
       </van-tab>
     </van-tabs>
@@ -44,6 +44,7 @@
       <div v-else class="no-qrcode">
         <van-icon name="qr" size="60" color="#c8c9cc" />
         <p class="no-qrcode-text">暂无二维码</p>
+        <p class="no-qrcode-text">申报截止时间:{{ this.deadlineTime }}</p>
       </div>
     </div>
 
@@ -100,6 +101,7 @@
       factories: [],
       qrcodeUrl: '',      // 二维码图片URL
       qrStatus: null,
+      deadlineTime:'',
       submitting: false,   // 提交状态
       cancelSubmitting: false,
       showCancelDialog: false,  // 控制取消弹窗显示
@@ -189,6 +191,7 @@
         if (res.code === 'ok' && res.data) {
           this.qrcodeUrl = res.data.qrCode || '';
           this.qrStatus = res.data.status;
+          this.deadlineTime = res.data.deadlineTime;
         } else {
           this.qrcodeUrl = '';
         }