Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

zx 1 anno fa
parent
commit
1adb284971
20 ha cambiato i file con 156 aggiunte e 112 eliminazioni
  1. 7 1
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/ProdProcedureTeam.java
  2. 2 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/Report.java
  3. 1 1
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/mapper/UserMapper.java
  4. 2 3
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/PlanServiceImpl.java
  5. 19 5
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  6. 35 68
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/task/TimingTask.java
  7. 4 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/resources/application-privatedev.yml
  8. 2 2
      fhKeeper/formulahousekeeper/management-workshop/src/main/resources/application.yml
  9. 4 4
      fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/ProdProcedureTeamMapper.xml
  10. 1 13
      fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/UserMapper.xml
  11. BIN
      fhKeeper/formulahousekeeper/management-workshop/src/main/resources/upload/今日计划导入模板.xlsx
  12. BIN
      fhKeeper/formulahousekeeper/management-workshop/src/main/resources/upload/插单计划导入模板.xlsx
  13. BIN
      fhKeeper/formulahousekeeper/management-workshop/src/main/resources/upload/明日计划导入模板.xlsx
  14. 27 1
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/todayPlan/distribution.vue
  15. 9 1
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/fillReport.vue
  16. 2 2
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/workView.vue
  17. 17 3
      fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/orderInsert.vue
  18. 20 5
      fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponent.vue
  19. 3 2
      fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponentDetil.vue
  20. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

+ 7 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/ProdProcedureTeam.java

@@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Seyason
- * @since 2023-07-29
+ * @since 2023-08-02
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -74,6 +74,12 @@ public class ProdProcedureTeam extends Model<ProdProcedureTeam> {
     @TableField("plan_procedure_id")
     private Integer planProcedureId;
 
+    /**
+     * 员工执行状态:0-待接收,1-进行中,2-已完工,3-已中止(员工自己中止或者管理端中止)
+     */
+    @TableField("status")
+    private Integer status;
+
 
     @Override
     protected Serializable pkVal() {

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

@@ -125,6 +125,8 @@ public class Report extends Model<Report> {
     private Integer userProcedureTeamId;
 
 
+    @TableField(exist = false)
+    private Boolean isTerminated;
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 1 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/mapper/UserMapper.java

@@ -28,7 +28,7 @@ public interface UserMapper extends BaseMapper<User> {
                                                       @Param("companyId") Integer companyId,
                                                       @Param("departmentIds") List departmentIds, String keyword, Integer status, @Param("roleId") Integer roleId);
 
-    List<Map<String, Object>> getPushUserList(@Param("companyId") Integer companyId,Integer alertType, String date);
+    List<Map<String, Object>> getPushUserList(@Param("companyId") Integer companyId, String date);
 
     List<Map<String, Object>> getPushDingdingUserList(@Param("alertTime") String alertTime, String date);
 

+ 2 - 3
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/PlanServiceImpl.java

@@ -523,7 +523,7 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
                     List<TaskType> taskTypeList = taskTypeMapper.selectList(new QueryWrapper<TaskType>().eq("company_id", companyId));
 
                     if(taskChangeNoticeNumCell!=null){
-                        if(count(new QueryWrapper<Plan>().eq("product_scheduling_num",taskChangeNoticeNumCell.getStringCellValue()))>0){
+                        if(count(new QueryWrapper<Plan>().eq("task_change_notice_num",taskChangeNoticeNumCell.getStringCellValue()))>0){
                             msg.setError("已存在的任务变更通知号"+taskChangeNoticeNumCell.getStringCellValue());
                             return msg;
                         }
@@ -552,7 +552,7 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
                         plan.setMoneyOfJob(bigDecimal);
                     }
                     if(checkTypeCell!=null){
-                        switch (taskTypeNameCell.getStringCellValue()){
+                        switch (checkTypeCell.getStringCellValue()){
                             case "自检":
                                 plan.setCheckType(0);
                                 break;
@@ -617,7 +617,6 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
                                 p.setTotalWorkingHours(totalWorkingHours.doubleValue());
                                 planProcedureTotals.add(p);
                             }
-                            planProcedureTotalService.saveBatch(planProcedureTotals);
                             List<PlanProcedureTotal> totals = planProcedureTotals.stream().filter(ps -> ps.getPlanId().equals(plan.getId())).collect(Collectors.toList());
                             if(totals.size()>0){
                                 double sum = totals.stream().filter(t->t.getTotalWages()!=null).mapToDouble(PlanProcedureTotal::getTotalWages).sum();

+ 19 - 5
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -117,10 +117,11 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         LocalDate today = LocalDate.now();
         report.setCreateDate(today);
         report.setCompanyId(companyId);
+
         Plan plan = planMapper.selectById(report.getPlanId());
         if (plan.getPlanType() == 0) {
             //普通计划检查产品是否存在
-            Product product = productMapper.selectById(report.getProductId());
+            Product product = productMapper.selectById(plan.getProductId());
             if (product == null) {
                 httpRespMsg.setError("产品不存在,无法报工");
                 return httpRespMsg;
@@ -133,17 +134,23 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         ProdProcedureTeam prodProcedureTeam = prodProcedureTeamMapper.selectById(report.getUserProcedureTeamId());
         double curReportTime = 0.0;
         //查找上一次该工序的报工
+        Integer currentProgress = 0;
         Report lastReport = reportMapper.selectOne(new QueryWrapper<Report>().eq("creator_id", token).eq("prod_procedure_id", report.getProdProcedureId()).lt("create_date", today).orderByDesc("create_date").last("limit 1"));
+        //查找上次是否有报工,有的话取上次报工进度,没有的话取分配下来时的报工进度
         if (lastReport != null) {
             if (report.getProgress() <= lastReport.getProgress()) {
-                httpRespMsg.setError("进度必须大于上次报工进度("+lastReport.getProgress()+"%)");
+                httpRespMsg.setError("进度必须大于上次报工进度("+currentProgress+"%)");
                 return httpRespMsg;
             }
-            curReportTime = (prodProcedureTeam.getWorkTime() * (report.getProgress() - lastReport.getProgress())/100);
+            currentProgress = report.getProgress();
         } else {
-            curReportTime = (prodProcedureTeam.getWorkTime() * report.getProgress()/100);
+            if (report.getProgress() <= currentProgress) {
+                httpRespMsg.setError("进度必须大于上次报工进度("+currentProgress+"%)");
+                return httpRespMsg;
+            }
+            currentProgress = prodProcedureTeam.getProgress();
         }
-
+        curReportTime = (prodProcedureTeam.getWorkTime() * (report.getProgress() - currentProgress)/100);
         report.setWorkingTime(curReportTime);//本次报工的工时数
         report.setDeptId(plan.getStationId());
         if (plan.getPlanType() == 0) {
@@ -159,6 +166,13 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         }
         prodProcedureTeam.setUpdateTime(LocalDateTime.now());
         prodProcedureTeam.setProgress(report.getProgress());
+        if (report.getProgress() == 100) {
+            //完工了
+            prodProcedureTeam.setStatus(2);//顺利完工
+        } else if (report.getIsTerminated() != null && report.getIsTerminated().booleanValue()) {
+            prodProcedureTeam.setStatus(3);//中止
+        }
+
         if (existReport == null) {
             reportMapper.insert(report);
         } else {

+ 35 - 68
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/task/TimingTask.java

@@ -1,5 +1,6 @@
 package com.management.platform.task;
 
+import com.alibaba.excel.util.DateUtils;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -83,34 +84,13 @@ public class TimingTask {
     @Resource
     private UserMapper userMapper;
     @Resource
-    private DepartmentMapper departmentMapper;
-    @Resource
-    private ReportMapper reportMapper;
-    @Resource
-    private TimeAutoExcludeMapper timeAutoExcludeMapper;
-    @Resource
     private WxCorpInfoService wxCorpInfoService;
     @Resource
     private WxCorpInfoMapper wxCorpInfoMapper;
-    @Resource
-    private ReportLogMapper reportLogMapper;
-    @Resource
-    private OperationRecordService operationRecordService;
     @Value(value = "${upload.path}")
     private String path;
-
-    @Resource
-    private SysConfigMapper sysConfigMapper;
-    @Resource
-    private ThirdPartyInterfaceMapper thirdPartyInterfaceMapper;
-    @Resource
-    private ThirdPartyInterfaceService thirdPartyInterfaceService;
     @Resource
     private TimeTypeService timeTypeService;
-    @Resource
-    private SysRoleMapper sysRoleMapper;
-    @Resource
-    private UserService userService;
 
     private static final List<Integer> VALID_TOKEN_CHARS = new ArrayList<>();
     static {
@@ -187,54 +167,41 @@ public class TimingTask {
         DateTimeFormatter dt = DateTimeFormatter.ofPattern("HH:mm");
         String str = dt.format(now);
         String date = DateTimeFormatter.ofPattern("yyyy-MM-dd").format(localDate);
-        List<TimeType> typeList = timeTypeMapper.selectList(new QueryWrapper<TimeType>().isNotNull("alert_time")
-                .ge("alert_time", str));
-        typeList.forEach(t->{
-            if (str.equals(t.getAlertTime())) {
-                //节假日是否提醒
-                Boolean workDay = timeTypeService.isWorkDay(t.getCompanyId(), localDate);
-                if (!workDay){
-                    return;
-                }
-                //发送推送提醒
-                Company company = companyMapper.selectById(t.getCompanyId());
-                //过期公司不提醒
-                if(company.getExpirationDate().isBefore(LocalDateTime.now())){
-                    return;
-                }
-                //开通了OA功能,有请假模块的,需要把当前请假的排除掉
-                List<Map<String, Object>> userList = null;
-                if (company.getPackageOa() == 1) {
-                    userList = userMapper.getPushUserList(t.getCompanyId(),t.getAlertType(), date);
-                } else {
-                    userList = userMapper.getPushUserList(t.getCompanyId(),t.getAlertType(), null);
-                }
-
-                List<WxCorpInfo> cpList = wxCorpInfoMapper.selectList(new QueryWrapper<WxCorpInfo>().eq("company_id", t.getCompanyId()));
-                userList.forEach(u->{
-                    if (u.get("corpwxUserid") != null){
-                        //推送到企业微信
-                        String corpUid = (String) u.get("corpwxUserid");
-                        JSONObject json=new JSONObject();
-                        JSONArray dataJson=new JSONArray();
-                        JSONObject jsonObj=new JSONObject();
-                        jsonObj.put("key", "提示");
-                        jsonObj.put("value", StringUtils.isEmpty(t.getAlertMsg())?"":t.getAlertMsg());
-                        dataJson.add(jsonObj);
-                        if(isPrivateDeploy){
-                            json.put("content",StringUtils.isEmpty(t.getAlertMsg())?"":t.getAlertMsg()+"\\n<a href=\\\"https://open.weixin.qq.com/connect/oauth2/authorize?appid="+suitId+"&redirect_uri="+pcUrl+"/api/corpInsideWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect\\\">去填写</a>");
-                        }else {
-                            json.put("template_id","tty9TkCAAAYoevY-40ciWD5lDncDfR5w");
-                            json.put("url", "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://worktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect");
-                            json.put("content_item",dataJson);
-                        }
-                        if (cpList.size() > 0) {
-                            wxCorpInfoService.sendWXCorpTemplateMsg(cpList.get(0), corpUid, json);
-                        }
-                    }
-                });
+        List<WxCorpInfo> wxCorpInfoList = wxCorpInfoMapper.selectList(null);
+        for (WxCorpInfo wxCorpInfo : wxCorpInfoList) {
+            //节假日是否提醒
+            boolean workDay = WorkDayCalculateUtils.isWorkDay(localDate);
+            if (!workDay){
+                return;
+            }
+            //发送推送提醒
+            Company company = companyMapper.selectById(wxCorpInfo.getCompanyId());
+            //过期公司不提醒
+            if(company.getExpirationDate().isBefore(LocalDateTime.now())){
+                return;
             }
-        });
+            List<Map<String, Object>> userList = userMapper.getPushUserList(wxCorpInfo.getCompanyId(), date);
+            userList.forEach(u->{
+                if (u.get("corpwxUserid") != null){
+                    //推送到企业微信
+                    String corpUid = (String) u.get("corpwxUserid");
+                    JSONObject json=new JSONObject();
+                    JSONArray dataJson=new JSONArray();
+                    JSONObject jsonObj=new JSONObject();
+                    jsonObj.put("key", "提示");
+                    jsonObj.put("value", "请尽快填写昨日的报工");
+                    dataJson.add(jsonObj);
+                    if(isPrivateDeploy){
+                        json.put("content","请尽快填写昨日的报工"+"\\n<a href=\\\"https://open.weixin.qq.com/connect/oauth2/authorize?appid="+suitId+"&redirect_uri="+pcUrl+"/api/corpInsideWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect\\\">去填写</a>");
+                    }else {
+                        json.put("template_id","tty9TkCAAAYoevY-40ciWD5lDncDfR5w");
+                        json.put("url", "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://worktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect");
+                        json.put("content_item",dataJson);
+                    }
+                    wxCorpInfoService.sendWXCorpTemplateMsg(wxCorpInfo, corpUid, json);
+                }
+            });
+        }
     }
 
 }

+ 4 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/application-privatedev.yml

@@ -102,3 +102,7 @@ configEnv:
   isDev: false
   # 是否是私有化部署,企业内部应用
   isPrivateDeploy: true
+
+privateDeployURL:
+  pcUrl: http://devworkshop.ttkuaiban.com/api/corpInsideWXAuth
+  mobUrl: http://mobdevworkshop.ttkuaiban.com/api/corpInsideWXAuth

+ 2 - 2
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/application.yml

@@ -159,5 +159,5 @@ configEnv:
   isPrivateDeploy: true
 
 privateDeployURL:
-  pcUrl: http://devworkshop.ttkuaiban.com
-  mobUrl: http://mobdevworkshop.ttkuaiban.com
+  pcUrl: http://devworkshop.ttkuaiban.com/api/corpInsideWXAuth
+  mobUrl: http://mobdevworkshop.ttkuaiban.com/api/corpInsideWXAuth

+ 4 - 4
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/ProdProcedureTeamMapper.xml

@@ -14,14 +14,14 @@
         <result column="checker_name" property="checkerName" />
         <result column="update_time" property="updateTime" />
         <result column="plan_procedure_id" property="planProcedureId" />
+        <result column="status" property="status" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, company_id, user_id, work_time, job_of_money, progress, checker_id, checker_name, update_time, plan_procedure_id
+        id, company_id, user_id, work_time, job_of_money, progress, checker_id, checker_name, update_time, plan_procedure_id, status
     </sql>
 
-
     <select id="getReportForWorkList" resultType="java.util.HashMap" >
         SELECT a.*, plan_procedure_total.plan_id, plan_procedure_total.prod_procedure_id, date_format(plan.`start_date`,'%Y-%m-%d') as start_date, date_format(plan.`end_date`,'%Y-%m-%d') as end_date, plan.`plan_type`, plan.`product_scheduling_num`,plan.task_type_name,plan.task_name,plan.task_change_notice_num,
                product.`name` AS product_name,prod_procedure.name AS procedure_name, prod_procedure.check_type, plan.check_type as plan_check_type
@@ -30,7 +30,7 @@
                  LEFT JOIN plan ON plan.id = plan_procedure_total.plan_id
                  LEFT JOIN product ON product.id = plan.`product_id`
                  LEFT JOIN prod_procedure ON prod_procedure.id = plan_procedure_total.prod_procedure_id
-        where 1 = 1 and a.progress &lt; 100 and a.user_id=#{userId}
+        where 1 = 1 and a.status = 1 and a.user_id=#{userId}
         order by plan.id desc
     </select>
 
@@ -38,7 +38,7 @@
         SELECT a.*, plan_procedure_total.plan_id, plan_procedure_total.prod_procedure_id, date_format(plan.`start_date`,'%Y-%m-%d') as start_date, date_format(plan.`end_date`,'%Y-%m-%d') as end_date, plan.`plan_type`, plan.`product_scheduling_num`,plan.task_type_name,plan.task_name,plan.task_change_notice_num,
                product.`name` AS product_name,prod_procedure.name AS procedure_name, if(plan.plan_type=0,prod_procedure.check_type, plan.check_type) as check_type, plan.station_id
         FROM prod_procedure_team a
-            left join plan_procedure_total on plan_procedure_total.id = a.plan_procedure_id
+                 left join plan_procedure_total on plan_procedure_total.id = a.plan_procedure_id
                  LEFT JOIN plan ON plan.id = plan_procedure_total.plan_id
                  LEFT JOIN product ON product.id = plan.`product_id`
                  LEFT JOIN prod_procedure ON prod_procedure.id = plan_procedure_total.prod_procedure_id

+ 1 - 13
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/UserMapper.xml

@@ -123,19 +123,7 @@
         WHERE a.company_id = #{companyId}
         AND (a.wx_openid IS NOT NULL or corpwx_userid is not null)
         AND a.is_active = 1
-        AND a.report_status =0
-        <choose>
-            <when test="alertType!=null and alertType==1">
-                AND NOT EXISTS(SELECT 1 FROM report WHERE report.`creator_id` = a.id AND report.`create_date` = DATE_FORMAT(date_sub(NOW(),interval 1 day), '%Y-%m-%d'))
-            </when>
-            <otherwise>
-                AND NOT EXISTS(SELECT 1 FROM report WHERE report.`creator_id` = a.id AND report.`create_date` = DATE_FORMAT(NOW(), '%Y-%m-%d'))
-            </otherwise>
-        </choose>
-        <if test="date != null">
-            and not exists (select 1 from leave_sheet where owner_id = a.id and start_date &lt;= #{date} and end_date &gt;= #{date} and leave_sheet.status = 0)
-        </if>
-
+        AND NOT EXISTS(SELECT 1 FROM report WHERE report.`creator_id` = a.id AND report.`create_date` = DATE_FORMAT(NOW(), '%Y-%m-%d'))
     </select>
 
 

BIN
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/upload/今日计划导入模板.xlsx


BIN
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/upload/插单计划导入模板.xlsx


BIN
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/upload/明日计划导入模板.xlsx


+ 27 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/todayPlan/distribution.vue

@@ -99,7 +99,33 @@ export default {
     },
     // 下单计划
     placeAnOrder() {
-      console.log('点击了下单计划')
+      let ids=[this.id];
+      this.$axios.post(
+        "/plan/allocationPlan",
+        {
+          ids: ids.join(","),
+          planType: this.type
+        },
+        (res) => {
+          if (res.code == "ok") {
+            this.$message({
+              message: '下发成功',
+              type: "success",
+            });
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error",
+            });
+          }
+        },
+        (error) => {
+          this.$message({
+            message: error,
+            type: "error",
+          });
+        }
+      );
     },
     distributionProp(item, index) {
       if(this.beDeptList) {

+ 9 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/fillReport.vue

@@ -17,6 +17,13 @@
             <van-stepper v-model="reportForm.progress" step="10" :min="0" :max="100"/>
           </template>
         </van-cell>
+        <van-cell title="中止工作" v-if="reportForm.progress < 100">
+          <template>
+            <div style="float:right;">
+              <van-checkbox v-model="reportForm.isTerminated" />
+            </div>
+          </template>
+        </van-cell>
         <van-cell title="质检类型" :value="checkTypeTxt[reportForm.check_type]" v-if="reportForm.progress==100"/>
         <van-cell title="质检人" :value="reportForm.checker_name" is-link v-if="reportForm.progress==100" @click="showCheckerOptionList">
         </van-cell>
@@ -102,7 +109,8 @@ export default {
           prodProcedureId: this.reportForm.prod_procedure_id,
           progress: this.reportForm.progress,
           planId: this.reportForm.plan_id,
-          checkType: this.reportForm.check_type
+          checkType: this.reportForm.check_type,
+          isTerminated: this.reportForm.isTerminated
         };
         if (this.reportForm.progress == 100) {
           if (this.reportForm.check_type != 0) {

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/workView.vue

@@ -13,8 +13,8 @@
           <div class="distribution_box" v-for="item,index in prod.procedureList" :key="index" @click="reportItem(item)">
             <div>
               <van-row >
-                <van-col span="20">{{ prod.plan_type == 0?item.procedure_name : prod.task_change_notice_num}}</van-col>
-                <van-col span="4"><span style="color:goldenrod;font-size:16px;">{{ item.work_time }}</span> h</van-col>
+                <van-col span="19">{{ prod.plan_type == 0?item.procedure_name : prod.task_change_notice_num}}</van-col>
+                <van-col span="5" style="text-align:right;"><span style="color:goldenrod;font-size:16px;">{{ item.work_time }}</span> <span style="font-size:12px;">分钟</span></van-col>
               </van-row>
               <div style="margin-top:10px;text-align: center;">
                 <van-row gutter="20" >

+ 17 - 3
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/orderInsert.vue

@@ -20,9 +20,7 @@
           <el-link type="primary" :underline="false" @click="addPlan()">{{
             `新增${titleText}`
           }}</el-link>
-          <el-upload ref="upload" action="#" :limit="1" :http-request="importData" :show-file-list="false">
-            <el-link type="primary" :underline="false">{{ "导入" }}</el-link>
-          </el-upload>
+          <el-link type="primary" :underline="false" @click="importDataDialog=true">{{ "导入" }}</el-link>
           <el-link type="primary" :underline="false" @click="exportData()"
             :download="this.planType == 0 ? '今日计划' : this.planType == 1 ? '明日计划' : this.planType == 2 ? '插单计划' : '' + '.xlsx'">{{
               "导出"
@@ -215,6 +213,18 @@
         <el-button @click="foremanDetailDialog = false">关闭</el-button>
       </span>
     </el-dialog>
+
+    <!--导入计划 -->
+    <el-dialog :title="this.titleText+'导入'" :visible.sync="importDataDialog"  width="500px">
+        <p>1. 下载
+        <el-link type="primary" style="margin-left:5px;" :underline="false" :href="'./upload/'+'插单计划导入模板.xlsx'" :download="'插单计划导入模板.xlsx'">{{'插单计划导入模板.xlsx'}}</el-link>
+        </p>
+        <p style="display: flex;justify-content: center;">
+            <el-upload ref="upload"  action="#" :limit="1" :http-request="importData" :show-file-list="false">
+              <el-button type="primary" :underline="false" :loading="importingData">{{$t("other.startImporting")}}</el-button>
+            </el-upload>
+        </p>
+    </el-dialog>
   </div>
 </template>
   
@@ -246,6 +256,8 @@ export default {
       hasSetDeptList: [],
       titleName: "",
       taskTypeDialog:false,
+      importDataDialog:false,
+      importingData:false,
       todayPlanForm: {
         id: null,
         taskChangeNoticeNum: "",
@@ -697,6 +709,7 @@ export default {
     },
     // 导入数据
     importData(item) {
+      this.importingData = true;
       this.tableDataLoading = true;
       let formData = new FormData();
       formData.append("file", item.file);
@@ -705,6 +718,7 @@ export default {
         res => {
           this.$refs.upload.clearFiles();
           this.tableDataLoading = false;
+          this.importingData = true;
           if (res.code == "ok") {
             this.$message({
               message: '导入成功',

+ 20 - 5
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponent.vue

@@ -24,9 +24,7 @@
           <el-link type="primary" :underline="false" @click="addPlan()">{{
             `新增${titleText}`
           }}</el-link>
-          <el-upload ref="upload" action="#" :limit="1" :http-request="importData" :show-file-list="false">
-            <el-link type="primary" :underline="false">{{ "导入" }}</el-link>
-          </el-upload>
+          <el-link type="primary" :underline="false" @click="importDataDialog=true">{{ "导入" }}</el-link>
           <el-link type="primary" :underline="false" @click="exportData()"
             :download="this.planType == 0 ? '今日计划' : this.planType == 1 ? '明日计划' : this.planType == 2 ? '插单计划' : '' + '.xlsx'">{{
               "导出"
@@ -44,7 +42,7 @@
       </div>
 
       <!-- 各部分数据列表 -->
-      <el-table :data="tableData" style="width: 100%; flex: 1" v-loading="tableDataLoading"
+      <el-table :data="tableData" style="width: 100%;" height="0" v-loading="tableDataLoading"
         @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55"> </el-table-column>
         <el-table-column prop="productSchedulingNum" label="排产工单号" width="180">
@@ -200,6 +198,18 @@
         <el-button @click="foremanDetailDialog = false">关闭</el-button>
       </span>
     </el-dialog>
+
+    <!--导入计划 -->
+    <el-dialog :title="this.titleText+'导入'" :visible.sync="importDataDialog"  width="500px">
+        <p>1. 下载
+        <el-link type="primary" style="margin-left:5px;" :underline="false" :href="'./upload/'+this.titleText+'导入模板.xlsx'" :download="this.titleText+'导入模板.xlsx'">{{this.titleText+'导入模板.xlsx'}}</el-link>
+        </p>
+        <p style="display: flex;justify-content: center;">
+            <el-upload ref="upload"  action="#" :limit="1" :http-request="importData" :show-file-list="false">
+              <el-button type="primary" :underline="false" :loading="importingData">{{$t("other.startImporting")}}</el-button>
+            </el-upload>
+        </p>
+    </el-dialog>
   </div>
 </template>
   
@@ -230,6 +240,8 @@ export default {
           return v.getTime() < Date.now();
         }
       },
+      importDataDialog:false,
+      importingData:false,
       steelStampNumber: "",
       planDate: this.todayDate,
       deptSetDialog: false,
@@ -745,6 +757,7 @@ export default {
     },
     // 导入数据
     importData(item) {
+      this.importingData = true;
       this.tableDataLoading = true;
       let formData = new FormData();
       formData.append("file", item.file);
@@ -753,6 +766,7 @@ export default {
         res => {
           this.$refs.upload.clearFiles();
           this.tableDataLoading = false;
+          this.importingData = false;
           if (res.code == "ok") {
             this.$message({
               message: '导入成功',
@@ -848,7 +862,7 @@ export default {
   width: 100%;
   height: 100%;
   display: flex;
-  flex-wrap: wrap;
+  // flex-wrap: wrap;
   flex-direction: column;
   box-sizing: border-box;
   padding: 10px;
@@ -863,6 +877,7 @@ export default {
     flex: 1;
     display: flex;
     flex-direction: column;
+    overflow: auto;
   }
 
   .layout-container-floor {

+ 3 - 2
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponentDetil.vue

@@ -15,7 +15,7 @@
                 <el-table
                 :data="JobtableData"
                 :key="tableKey"
-                style="width: 100%;height: 80vh;"
+                style="width: 100%;"
                 v-loading="tableDataLoading">
                     <el-table-column label="工序名称">
                         <template slot-scope="scope">{{ scope.row.prodProcedure.name }}</template>
@@ -170,7 +170,8 @@ export default {
         height: 100%;
         display: flex;
         flex-wrap: wrap;
-        flex-direction: inherit;
+        // flex-direction: inherit;
+        flex-direction: column;
         box-sizing: border-box;
         // padding: 20px;
         .planComponentDetil-top, .planComponentDetil-con, .planComponentDetil-bon {

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -939,7 +939,7 @@ export default {
         }
       }
       return num
-    }selectCal
+    }
   },
   watch: {},
   created() {