فهرست منبع

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper into master

seyason 1 سال پیش
والد
کامیت
91f7921512

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

@@ -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;

+ 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: '导入成功',

+ 17 - 3
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'">{{
               "导出"
@@ -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: '导入成功',