Ver Fonte

Merge branch '03/30MainReset' into test

lex-xin há 4 anos atrás
pai
commit
5124916287

+ 26 - 24
src/views/businessManager/orderManager/financeManager.vue

@@ -883,7 +883,7 @@ export default {
         },
         data: qs.stringify(cleanDeep(data)),
         url,
-        responseType: "blob",
+        responseType: "json",
       };
       this.$confirm("您确定导出报表", "提示", {
         confirmButtonText: "确定",
@@ -893,30 +893,32 @@ export default {
         .then(() => {
           load.startLoading();
           axios(options).then((res) => {
-            let blob = new Blob([res.data], {
-              // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-              type: "application/vnd.ms-excel;charset=utf-8",
-              //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-            });
-            let objectUrl = URL.createObjectURL(blob);
-            let link = document.createElement("a");
-            let nowTime = new Date();
-            let ymd =
-              nowTime.getFullYear() +
-              "" +
-              (nowTime.getMonth() + 1) +
-              "" +
-              nowTime.getDate() +
-              "" +
-              nowTime.getHours() +
-              "" +
-              nowTime.getMinutes();
-            let fname = "报表导出" + new Date().getTime() + ".xls"; //下载文件的名字
-            link.href = objectUrl;
-            link.setAttribute("download", fname);
-            document.body.appendChild(link);
-            link.click();
             load.endLoading();
+            this.$message.info(res.data.data);
+            // let blob = new Blob([res.data], {
+            //   // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+            //   type: "application/vnd.ms-excel;charset=utf-8",
+            //   //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+            // });
+            // let objectUrl = URL.createObjectURL(blob);
+            // let link = document.createElement("a");
+            // let nowTime = new Date();
+            // let ymd =
+            //   nowTime.getFullYear() +
+            //   "" +
+            //   (nowTime.getMonth() + 1) +
+            //   "" +
+            //   nowTime.getDate() +
+            //   "" +
+            //   nowTime.getHours() +
+            //   "" +
+            //   nowTime.getMinutes();
+            // let fname = "报表导出" + new Date().getTime() + ".xls"; //下载文件的名字
+            // link.href = objectUrl;
+            // link.setAttribute("download", fname);
+            // document.body.appendChild(link);
+            // link.click();
+            // load.endLoading();
           });
         })
         .catch(() => {});

+ 11 - 34
src/views/businessManager/orderManager/income.vue

@@ -442,7 +442,7 @@ export default {
         },
         data: qs.stringify(cleanDeep(data)),
         url,
-        responseType: "blob",
+        responseType: "json",
       };
       this.$confirm("您确定导出报表", "提示", {
         confirmButtonText: "确定",
@@ -453,40 +453,17 @@ export default {
           load.startLoading();
           axios(options)
             .then((res) => {
-              let blob = new Blob([res.data], {
-                // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-                type: "application/vnd.ms-excel;charset=utf-8",
-                //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-              });
-              let text = new Response(blob).text();
-              text.then((res) => {
-                // 判断是否报错
-                if (res.indexOf("code") != -1) {
-                  let json = JSON.parse(res);
-                  this.$message.error(json.msg);
-                } else {
-                  let objectUrl = URL.createObjectURL(blob);
-                  let link = document.createElement("a");
-                  let nowTime = new Date();
-                  let ymd =
-                    nowTime.getFullYear() +
-                    "" +
-                    (nowTime.getMonth() + 1) +
-                    "" +
-                    nowTime.getDate() +
-                    "" +
-                    nowTime.getHours() +
-                    "" +
-                    nowTime.getMinutes();
-                  let fname = "报表导出" + new Date().getTime()+'.xls'; //下载文件的名字
-                  link.href = objectUrl;
-                  link.setAttribute("download", fname);
-                  document.body.appendChild(link);
-                  link.click();
-                }
-              });
-
               load.endLoading();
+              this.$message.info(res.data.data);
+              // this.$confirm(res.data.data, "提示", {
+              //   confirmButtonText: "确定",
+              //   cancelButtonText: "取消",
+              //   type: "warning",
+              // }).then(() => {
+
+              // }).catch(err => {
+
+              // })
             })
             .catch((error) => {
               this.$message.error("导出数据失败,请联系管理员");

+ 1 - 1
src/views/serverDetail/index.vue

@@ -80,7 +80,7 @@
             end-placeholder="结束日期"
             :clearable="false"
             @change="changeWeek"
-            :picker-options="bigin"
+            :picker-options="bigin()"
           >
           </el-date-picker>
         </el-form-item>

+ 29 - 5
src/views/teamDetail/componentClass/classCompound.vue

@@ -14,19 +14,36 @@
 
             <el-divider></el-divider>
           </div>
-          <el-button type="text" style="float: right" @click="clearCom"
+          <div class="topWrap">
+             <el-select
+            placeholder="请选择主班"
+            v-model="radio"
+            clearable
+            @change="changeMasterClass"
+          >
+            <el-option
+              v-for="(item, index) in dataList"
+              :label="item.name"
+              :value="item.id"
+              :key="index"
+            ></el-option>
+          </el-select>
+             <el-button type="text" style="float: right" @click="clearCom"
             >清空列表</el-button
           >
+          </div>
+
           <div>
-            <el-radio-group v-model="radio" @change="changeMasterClass">
+            <!-- <el-radio-group v-model="radio" @change="changeMasterClass"> -->
               <el-table
                 :data="dataList"
                 height="300px"
                 :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
               >
-                <el-table-column align="center" label="主班" width="110">
+                <el-table-column align="center" label="班级编号" width="110">
                   <template slot-scope="scope">
-                    <el-radio :label="scope.row.id"></el-radio>
+                    {{scope.row.id}}
+                    <!-- <el-radio :label="scope.row.id"></el-radio> -->
                   </template>
                 </el-table-column>
                 <el-table-column
@@ -69,7 +86,7 @@
                   </template>
                 </el-table-column>
               </el-table>
-            </el-radio-group>
+            <!-- </el-radio-group> -->
           </div>
           <el-button
             type="primary"
@@ -164,6 +181,9 @@ export default {
   },
   methods: {
     cancleCom(row) {
+      if(row.id== this.radio){
+        this.radio = ''
+      }
       this.$emit("cancleCompound", row);
     },
     clearCom() {
@@ -326,6 +346,10 @@ export default {
 /deep/.el-divider--horizontal {
   margin: 0 !important;
 }
+.topWrap{
+  margin: 10px 0;
+  padding: 0 20px 0 0;
+}
 .minus {
   float: right;
   line-height: 44px;