瀏覽代碼

Merge branch '02/23reviewBUG' into 11/24SAAS

mo 2 年之前
父節點
當前提交
2f2a2b14a9

+ 1 - 1
src/api/orderManager.js

@@ -271,7 +271,7 @@ export function takeEffectOfinstrumentInsurance(data) {
   return request2({
     url: api + '/musicGroup/takeEffectOfinstrumentInsurance',
     method: 'post',
-    requestType: 'form',
+    // requestType: 'form',
     data
   })
 }

+ 6 - 2
src/views/main/notClassStudent.vue

@@ -5,9 +5,9 @@
       <div class="squrt"></div>
       未在班级学员
       <filter-search
-      v-permission="'/teamCLassList/abnormal'"
+        v-if="permission('/main/notClassStudent')"
         :keys="['hasCourse']"
-        @reload="search"
+        @reload="reloadSearch"
         :moreKeys="['organId']"
       />
     </h2>
@@ -131,6 +131,7 @@ import pagination from "@/components/Pagination/index";
 import { queryNoClassMusicStudentInfo } from "./api.js";
 import { Export } from "@/utils/downLoadFile";
 import cleanDeep from "clean-deep";
+import { permission } from "@/utils/directivePage";
 import qs from "qs";
 export default {
   components: { pagination },
@@ -220,6 +221,9 @@ export default {
         "您确定导出未在班级学员?"
       );
     },
+    permission(str, parent) {
+      return permission(str, parent);
+    },
   },
 };
 </script>

+ 16 - 0
src/views/resetTeaming/components/payInfoDetail.vue

@@ -1286,6 +1286,22 @@ export default {
       // console.log(val,'form.currentTotalAmount');
       // this.$forceUpdate()
     },
+    "form.calenderFeeType"(val,oldValue) {
+
+      if (val == "TEACHER"&&!oldValue) {
+        let arr = [];
+        this.form.eclass.forEach((item) => {
+          arr.push({
+            courseType: item.courseType,
+            teacherNumber: 0,
+            courseNumber: 0,
+            courseCurrentPrice: 0,
+          });
+        });
+
+        this.$set(this.form, "teacherFeeList", arr);
+      }
+    },
     async "form.musicGroupOrganizationCourseSettingId"(val) {
       // && !this.rowDetail !this.$route.query.calenderId
 

+ 3 - 3
src/views/teamBuild/components/teamBaseInfo.vue

@@ -514,7 +514,7 @@
         </el-form-item>
         <el-form-item
           label="是否赠送辅件"
-          prop="memberCourseShowFlag"
+          prop="isGiveAccessories"
           label-width="200px"
           :rules="[{ required: true, message: '是否赠送辅件不能为空' }]"
         >
@@ -533,8 +533,8 @@
           <el-switch
             v-model="topFrom.isGiveAccessories"
             :disabled="basdisabled"
-            :active-value="1"
-            :inactive-value="0"
+            :active-value="'true'"
+            :inactive-value="'false'"
           >
           </el-switch>
         </el-form-item>

+ 32 - 0
src/views/teamDetail/api.js

@@ -95,4 +95,36 @@ export const getConvertDeatil = data => request2({
   method: 'get'
 })
 
+// 获取乐团收货地址
+export const getMusicGroupAddr = data => request2({
+  url: '/api-web/musicGroupShippingAddress/queryPage',
+  data,
+  params: data,
+  method: 'get',
+  requestType: 'form'
+})
+
+// 新增收货地址
+export const addMusicGroupAddr = data => request2({
+  url: '/api-web/musicGroupShippingAddress/add',
+  data,
+  method: 'post',
+
+})
+// 修改收货地址
+export const resetMusicGroupAddr = data => request2({
+  url: '/api-web/musicGroupShippingAddress/update',
+  data,
+  method: 'post',
+
+})
+
+// 删除收货地址
+export const deleteMusicGroupAddr = data => request2({
+  url: '/api-web/musicGroupShippingAddress/delete',
+  data,
+  params: data,
+  method: 'post',
+  requestType: 'form'
+})
 // courseScheduleConvert/queryCourse

+ 36 - 311
src/views/teamDetail/teamDetailedList.vue

@@ -1,333 +1,58 @@
 <template>
-  <div class="">
-    <!-- m-container -->
-    <!-- <h2>
-      <el-page-header @back="onCancel"
-                      content="发放清单"></el-page-header>
-    </h2> -->
-    <!-- <div class="headWrap">
-      <div class="left">
-        <div class="headItem">
-          <p>乐团名称:<span>12345</span></p>
-        </div>
-        <div class="headItem">
-          <p>生成时间:<span>12345</span></p>
-        </div>
-        <div class="headItem">
-          <p>确认人:<span>12345</span></p>
-        </div>
-      </div>
-      <div class="right">
-      </div>
-    </div> -->
-    <div class="m-core">
-      <div class="tableWrap">
-        <el-table
-          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
-          :data="tableList"
-        >
-          <el-table-column label="商品编号" prop="sn" align="center">
-          </el-table-column>
-          <el-table-column label="商品名称" align="center" prop="name">
-          </el-table-column>
-          <el-table-column label="商品类型" align="center" prop="type">
-            <template slot-scope="scope">
-              <div>
-                {{ scope.row.type | shopType }}
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column label="具体型号" align="center" prop="specification">
-          </el-table-column>
-          <el-table-column label="数量统计" align="center" prop="sellCount">
-          </el-table-column>
-        </el-table>
-      </div>
-    </div>
-    <div class="btnWrap" style="margin-top: 20px">
-      <el-button
-        type="primary"
-        v-if="tableList.length > 0"
-        v-permission="'order/musicalListExport'"
-        @click="musicalListExport"
-        >订货清单导出</el-button
-      >
-      <el-button
-        type="primary"
-        v-if="tableList.length > 0"
-        v-permission="'order/musicalListDetailExport'"
-        @click="musicalListDetailExport"
-        >分发清单导出</el-button
-      >
-      <el-button
-        type="primary"
-        @click="onDelivery"
-        v-if="musicalStatus && $helpers.permission('musicGroup/takeEffectOfinstrumentInsurance')"
-        >确认发货</el-button>
-      <el-button
-        type="warning okBtn"
-        v-if="team_status == 'PREPARE'&&!hasVerifyMusicalList"
-        v-permission="'order/verifyMusicalList'"
-        @click="okDetailList"
-        >乐器清单确认</el-button
-      >
-      <!-- <div class="okBtn" v-permission="'order/verifyMusicalList'"
-           @click="okDetailList">确认</div> -->
-    </div>
+  <div class="teamDetailedList">
+    <el-tabs v-model="activeName">
+      <el-tab-pane label="已发清单" name="waitTeamList" v-permission="'order/getMusicalList'">
+        <endTeamList v-if="activeName=='waitTeamList'" />
+      </el-tab-pane>
+      <el-tab-pane label="待发清单" name="endTeamList"  v-permission="'order/getMusicalList/wait'">
+        <waitTeamList v-if="activeName=='endTeamList'"/>
+      </el-tab-pane>
+      <el-tab-pane label="收货地址" name="eidtTeamAddr" v-permission="'musicGroupShippingAddress/queryPage'">
+        <eidtTeamAddr v-if="activeName=='eidtTeamAddr'"/>
+      </el-tab-pane>
+
+    </el-tabs>
   </div>
 </template>
 <script>
-import { getTeamDetailList, getTeamBaseInfo } from "@/api/buildTeam";
-import { getTeamList } from "@/api/teamServer";
-import { verifyMusicalList, takeEffectOfinstrumentInsurance } from "@/api/orderManager";
-import axios from "axios";
-import qs from "qs";
-import { getToken, getTenantId } from "@/utils/auth";
-import load from "@/utils/loading";
+import waitTeamList from './teamListComponent/waitTeamList.vue'
+import endTeamList from './teamListComponent/endTeamList.vue'
+import eidtTeamAddr from './teamListComponent/eidtTeamAddr.vue'
 export default {
   data() {
     return {
-      teamid: "",
-      tableList: [],
-      Fsearch: null,
-      Frules: null,
-      team_status: "",
-      musicalInstrumentsProvideStatus: 0, // 是否确认发货  1已发货
-      hasVerifyMusicalList:true
+      activeName:'waitTeamList'
     };
   },
+  components:{
+    waitTeamList,
+    endTeamList,
+    eidtTeamAddr
+  },
   mounted() {
-    this.init();
+    this.$bus.$on("changeAddrTab", obj => {
+      this.activeName = obj;
+    });
+  },
+  beforeDestroy(){
+    this.$bus.$off("changeAddrTab", obj => {
+
+    });
   },
   activated() {
-    this.init();
+
   },
   computed: {
-    musicalStatus() {
-      const template = ['PREPARE', 'PROGRESS']
-      const teamStatus = this.$route.query.team_status
-      const status = template.includes(teamStatus)
-      console.log(this.musicalInstrumentsProvideStatus, status)
-      return !this.musicalInstrumentsProvideStatus && status ? true : false
-    }
+
   },
   methods: {
-    init() {
-      this.team_status = this.$route.query.team_status;
-      this.teamid = this.$route.query.id;
-      if (this.teamid) {
-        getTeamList({ musicGroupId: this.teamid }).then(res=>{
-          if(res.code == 200){
-            this.hasVerifyMusicalList = res?.data?.rows[0]?.hasVerifyMusicalList
-          }
-        })
-        getTeamDetailList({ musicGroupId: this.teamid }).then((res) => {
-          if (res.code == 200) {
-            this.tableList = res.data ? res.data : [];
-          }
-        });
-        this.getMusicInfo()
-      }
-    },
-    async getMusicInfo() {
-        await getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
-          if (res.code == 200) {
-            this.musicalInstrumentsProvideStatus = res.data?.musicGroup?.musicalInstrumentsProvideStatus
-          }
-        });
-    },
-    onCancel() {
-      this.$store.dispatch("delVisitedViews", this.$route);
-      this.$router.push({ path: "/teamList" });
-    },
-    onDelivery() {
-      this.$confirm('是否确认发货', "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(async () => {
-        try {
-          await takeEffectOfinstrumentInsurance({ musicGroupId: this.teamid })
-          this.$message.success('确定发货成功')
-          this.getMusicInfo()
-        } catch {
-          //
-        }
-      })
-    },
-    okDetailList() {
-      this.$confirm(`是否确认发放清单?`, "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          verifyMusicalList({ musicGroupId: this.teamid }).then((res) => {
-            if (res.code == 200) {
-               this.$store.dispatch("delVisitedViews", this.$route);
-              this.$router.push({
-                path: "/teamList",
-                query: { search: this.Fsearch, rules: this.Frules },
-              });
 
-            }
-          });
-        })
-        .catch(() => {});
-    },
-    musicalListExport() {
-      // 报表导出
-      let url = "/api-web/order/musicalListExport";
-      let data = {
-        musicGroupId: this.$route.query.id,
-      };
-      const options = {
-        method: "POST",
-        headers: {
-          Authorization: getToken(),
-          tenantId: getTenantId()
-        },
-        data: qs.stringify(data),
-        url,
-        responseType: "blob",
-      };
-      this.$confirm("您确定导出订货清单", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .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 text = new Response(blob).text();
-              text.then((res) => {
-                // 判断是否报错
-                if (res.indexOf("code") != -1) {
-                  let json = JSON.parse(res);
-                  if(json.code == 403) {
-                    this.$message.error(`登录过期,请重新登录!`)
-                    setTimeout(() => {
-                      this.$store.dispatch('user/resetToken').then(() => {
-                        location.reload()
-                      })
-                    }, 1000);
-                    return
-                  }
-                  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 = this.$route.query.id + "-" + ymd + "订货清单.xls"; //下载文件的名字
-                  link.href = objectUrl;
-                  link.setAttribute("download", fname);
-                  document.body.appendChild(link);
-                  link.click();
-                }
-              });
-              load.endLoading();
-            })
-            .catch((error) => {
-              this.$message.error("导出数据失败,请联系管理员");
-              load.endLoading();
-            });
-        })
-        .catch(() => {});
-    },
-    musicalListDetailExport() {
-      // 报表导出
-      let url = "/api-web/order/musicalListDetailExport";
-      let data = {
-        musicGroupId: this.$route.query.id,
-      };
-      const options = {
-        method: "POST",
-        headers: {
-          Authorization: getToken(),
-          tenantId: getTenantId()
-        },
-        data: qs.stringify(data),
-        url,
-        responseType: "blob",
-      };
-      this.$confirm("您确定导出分发清单", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .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 text = new Response(blob).text();
-              text.then((res) => {
-                // 判断是否报错
-                if (res.indexOf("code") != -1) {
-                  let json = JSON.parse(res);
-                  if(json.code == 403) {
-                    this.$message.error(`登录过期,请重新登录!`)
-                    setTimeout(() => {
-                      this.$store.dispatch('user/resetToken').then(() => {
-                        location.reload()
-                      })
-                    }, 1000);
-                    return
-                  }
-                  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 = this.$route.query.id + "-" + ymd + "分发清单.xls"; //下载文件的名字
-                  link.href = objectUrl;
-                  link.setAttribute("download", fname);
-                  document.body.appendChild(link);
-                  link.click();
-                }
-              });
-              load.endLoading();
-            })
-            .catch((error) => {
-              this.$message.error("导出数据失败,请联系管理员");
-              load.endLoading();
-            });
-        })
-        .catch(() => {});
-    },
   },
 };
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
+.teamDetailedList {
+  padding: 0 20px;
+}
 </style>

+ 160 - 0
src/views/teamDetail/teamListComponent/eidtTeamAddr.vue

@@ -0,0 +1,160 @@
+<template>
+  <div class="">
+    <div class="">
+      <auth auths="musicGroupShippingAddress/add">
+        <el-button type="primary" class="addBtn" @click="addAddr">新建地址</el-button></auth>
+
+      <div class="tableWrap">
+        <el-table
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+        >
+          <el-table-column label="地址编号" prop="id" width="100px"  align="center">
+          </el-table-column>
+          <el-table-column label="省" align="left" prop="regionProvince">
+          </el-table-column>
+          <el-table-column label="市" align="left" prop="regionCity">
+          </el-table-column>
+          <el-table-column label="区" align="left" prop="regionCounty">
+          </el-table-column>
+          <el-table-column label="详细地址" align="left" prop="detailAddress">
+          </el-table-column>
+          <el-table-column label="操作" prop="sn" width="100px"  align="center">
+            <template slot-scope="scope">
+              <auth auths="musicGroupShippingAddress/update">
+              <el-button
+                @click="resetAddr(scope.row)"
+
+                type="text"
+                >修改</el-button
+              >
+            </auth>
+            <auth auths="musicGroupShippingAddress/delete">
+              <el-button
+                @click="deleteAddr(scope.row)"
+
+                type="text"
+                >删除</el-button
+              >
+            </auth>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          sync
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+    <el-dialog :visible.sync="addrVisiable" :title="activeRow&&activeRow.id?'修改地址':'新增地址'" width="500px">
+      <eidtAddr v-if="addrVisiable" :form="activeRow" ref='eidtAddr' @getList='getList'/>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="addrVisiable = false">取 消</el-button>
+        <el-button type="primary" @click="submitAddr"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+
+import { getMusicGroupAddr,deleteMusicGroupAddr} from '../api'
+import qs from "qs";
+import eidtAddr from './modals/eidtAddr.vue'
+import pagination from "@/components/Pagination/index";
+export default {
+  components:{pagination,eidtAddr},
+  data() {
+    return {
+      teamid: "",
+      tableList: [],
+      Fsearch: null,
+      Frules: null,
+      team_status: "",
+      musicalInstrumentsProvideStatus: 0, // 是否确认发货  1已发货
+      hasVerifyMusicalList:true,
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      activeRow:null,
+      addrVisiable:false
+    };
+  },
+  mounted() {
+    this.init();
+  },
+  activated() {
+    // this.init();
+  },
+  computed: {
+
+  },
+  methods: {
+    init() {
+      this.team_status = this.$route.query.team_status;
+      this.teamid = this.$route.query.id;
+      this.getList()
+
+    },
+    getList(){
+      this.addrVisiable=false;
+      if (this.teamid) {
+        // getTeamList({ musicGroupId: this.teamid }).then(res=>{
+        //   if(res.code == 200){
+        //     this.hasVerifyMusicalList = res?.data?.rows[0]?.hasVerifyMusicalList
+        //   }
+        // })
+        getMusicGroupAddr({ musicGroupId: this.teamid,page:this.rules.page,rows:this.rules.limit }).then((res) => {
+          if (res.code == 200) {
+            this.tableList = res.data.rows ? res.data.rows : [];
+            this.rules.total = res.data.total;
+          }
+        });
+        // this.getMusicInfo()
+      }
+    },
+    onCancel() {
+      this.$store.dispatch("delVisitedViews", this.$route);
+      this.$router.push({ path: "/teamList" });
+    },
+    resetAddr(row){
+      this.activeRow = row;
+      this.addrVisiable = true;
+    },
+   async deleteAddr(row){
+    try{
+      await this.$confirm("是否确认删除此收货地址?", "提示", {
+          type: "warning",
+        });
+      const res = await deleteMusicGroupAddr({id:row.id})
+      this.$message.success('删除成功')
+      this.getList()
+    }catch(e){
+      console.log(e)
+    }
+    },
+    addAddr(){
+      this.activeRow = null;
+      this.addrVisiable = true;
+    },
+    submitAddr(){
+      this.$refs.eidtAddr.submit()
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.addBtn {
+  margin-bottom: 20px;
+}
+</style>

+ 316 - 0
src/views/teamDetail/teamListComponent/endTeamList.vue

@@ -0,0 +1,316 @@
+<template>
+  <div class="">
+    <div class="">
+      <div class="tableWrap">
+        <el-table
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+        >
+          <el-table-column label="商品编号" prop="sn" align="center">
+          </el-table-column>
+          <el-table-column label="商品名称" align="center" prop="name">
+          </el-table-column>
+          <el-table-column label="商品类型" align="center" prop="type">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.type | shopType }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="具体型号" align="center" prop="specification">
+          </el-table-column>
+          <el-table-column label="数量统计" align="center" prop="sellCount">
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="btnWrap" style="margin-top: 20px">
+      <!-- <el-button
+        type="primary"
+        v-if="tableList.length > 0"
+        v-permission="'order/musicalListExport'"
+        @click="musicalListExport"
+        >订货清单导出</el-button
+      > -->
+      <el-button
+        type="primary"
+        v-if="tableList.length > 0"
+        v-permission="'order/musicalListDetailExport'"
+        @click="musicalListDetailExport"
+        >分发清单导出</el-button
+      >
+      <!-- <el-button
+        type="primary"
+        @click="onDelivery"
+        v-if="musicalStatus && $helpers.permission('musicGroup/takeEffectOfinstrumentInsurance')"
+        >确认发货</el-button> -->
+      <!-- <el-button
+        type="warning okBtn"
+        v-if="team_status == 'PREPARE'&&!hasVerifyMusicalList"
+        v-permission="'order/verifyMusicalList'"
+        @click="okDetailList"
+        >乐器清单确认</el-button
+      > -->
+      <!-- <div class="okBtn" v-permission="'order/verifyMusicalList'"
+           @click="okDetailList">确认</div> -->
+    </div>
+  </div>
+</template>
+<script>
+import { getTeamDetailList, getTeamBaseInfo } from "@/api/buildTeam";
+import { getTeamList } from "@/api/teamServer";
+import { verifyMusicalList, takeEffectOfinstrumentInsurance } from "@/api/orderManager";
+import axios from "axios";
+import qs from "qs";
+import { getToken, getTenantId } from "@/utils/auth";
+import load from "@/utils/loading";
+export default {
+  data() {
+    return {
+      teamid: "",
+      tableList: [],
+      Fsearch: null,
+      Frules: null,
+      team_status: "",
+      musicalInstrumentsProvideStatus: 0, // 是否确认发货  1已发货
+      hasVerifyMusicalList:true
+    };
+  },
+  mounted() {
+    this.init();
+  },
+  activated() {
+    this.init();
+  },
+  computed: {
+    musicalStatus() {
+      const template = ['PREPARE', 'PROGRESS']
+      const teamStatus = this.$route.query.team_status
+      const status = template.includes(teamStatus)
+      console.log(this.musicalInstrumentsProvideStatus, status)
+      return !this.musicalInstrumentsProvideStatus && status ? true : false
+    }
+  },
+  methods: {
+    init() {
+      this.team_status = this.$route.query.team_status;
+      this.teamid = this.$route.query.id;
+      if (this.teamid) {
+        // getTeamList({ musicGroupId: this.teamid }).then(res=>{
+        //   if(res.code == 200){
+        //     this.hasVerifyMusicalList = res?.data?.rows[0]?.hasVerifyMusicalList
+        //   }
+        // })
+        getTeamDetailList({ musicGroupId: this.teamid,deliveryStatus:'1' }).then((res) => {
+          if (res.code == 200) {
+            this.tableList = res.data ? res.data : [];
+          }
+        });
+        this.getMusicInfo()
+      }
+    },
+    async getMusicInfo() {
+        await getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
+          if (res.code == 200) {
+            this.musicalInstrumentsProvideStatus = res.data?.musicGroup?.musicalInstrumentsProvideStatus
+            this.hasVerifyMusicalList = res.data?.musicGroup?.hasVerifyMusicalList
+          }
+        });
+    },
+    onCancel() {
+      this.$store.dispatch("delVisitedViews", this.$route);
+      this.$router.push({ path: "/teamList" });
+    },
+    // onDelivery() {
+    //   this.$confirm('是否确认发货', "提示", {
+    //     confirmButtonText: "确定",
+    //     cancelButtonText: "取消",
+    //     type: "warning",
+    //   }).then(async () => {
+    //     try {
+    //       await takeEffectOfinstrumentInsurance({ musicGroupId: this.teamid })
+    //       this.$message.success('确定发货成功')
+    //       this.getMusicInfo()
+    //     } catch {
+    //       //
+    //     }
+    //   })
+    // },
+    okDetailList() {
+      this.$confirm(`是否确认发放清单?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          verifyMusicalList({ musicGroupId: this.teamid }).then((res) => {
+            if (res.code == 200) {
+               this.$store.dispatch("delVisitedViews", this.$route);
+              this.$router.push({
+                path: "/teamList",
+                query: { search: this.Fsearch, rules: this.Frules },
+              });
+
+            }
+          });
+        })
+        .catch(() => {});
+    },
+    musicalListExport() {
+      // 报表导出
+      let url = "/api-web/order/musicalListExport";
+      let data = {
+        musicGroupId: this.$route.query.id,
+        deliveryStatus:'1'
+      };
+      const options = {
+        method: "POST",
+        headers: {
+          Authorization: getToken(),
+          tenantId: getTenantId()
+        },
+        data: qs.stringify(data),
+        url,
+        responseType: "blob",
+      };
+      this.$confirm("您确定导出订货清单", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .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 text = new Response(blob).text();
+              text.then((res) => {
+                // 判断是否报错
+                if (res.indexOf("code") != -1) {
+                  let json = JSON.parse(res);
+                  if(json.code == 403) {
+                    this.$message.error(`登录过期,请重新登录!`)
+                    setTimeout(() => {
+                      this.$store.dispatch('user/resetToken').then(() => {
+                        location.reload()
+                      })
+                    }, 1000);
+                    return
+                  }
+                  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 = this.$route.query.id + "-" + ymd + "订货清单.xls"; //下载文件的名字
+                  link.href = objectUrl;
+                  link.setAttribute("download", fname);
+                  document.body.appendChild(link);
+                  link.click();
+                }
+              });
+              load.endLoading();
+            })
+            .catch((error) => {
+              this.$message.error("导出数据失败,请联系管理员");
+              load.endLoading();
+            });
+        })
+        .catch(() => {});
+    },
+    musicalListDetailExport() {
+      // 报表导出
+      let url = "/api-web/order/musicalListDetailExport";
+      let data = {
+        musicGroupId: this.$route.query.id,
+        deliveryStatus:'1'
+      };
+      const options = {
+        method: "POST",
+        headers: {
+          Authorization: getToken(),
+          tenantId: getTenantId()
+        },
+        data: qs.stringify(data),
+        url,
+        responseType: "blob",
+      };
+      this.$confirm("您确定导出分发清单", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .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 text = new Response(blob).text();
+              text.then((res) => {
+                // 判断是否报错
+                if (res.indexOf("code") != -1) {
+                  let json = JSON.parse(res);
+                  if(json.code == 403) {
+                    this.$message.error(`登录过期,请重新登录!`)
+                    setTimeout(() => {
+                      this.$store.dispatch('user/resetToken').then(() => {
+                        location.reload()
+                      })
+                    }, 1000);
+                    return
+                  }
+                  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 = this.$route.query.id + "-" + ymd + "分发清单.xls"; //下载文件的名字
+                  link.href = objectUrl;
+                  link.setAttribute("download", fname);
+                  document.body.appendChild(link);
+                  link.click();
+                }
+              });
+              load.endLoading();
+            })
+            .catch((error) => {
+              this.$message.error("导出数据失败,请联系管理员");
+              load.endLoading();
+            });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 136 - 0
src/views/teamDetail/teamListComponent/modals/deliverGoods.vue

@@ -0,0 +1,136 @@
+<template>
+  <div>
+    <el-form :model="forms" ref="form">
+      <el-form-item
+        label="物流公司"
+        prop="expressCompany"
+        :rules="[
+          { required: true, message: '请输入物流公司名称', trigger: 'blur' },
+        ]"
+      >
+        <el-input
+          v-model.trim="forms.expressCompany"
+          placeholder="请输入物流公司名称"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="物流单号"
+        prop="expressBillNo"
+        :rules="[
+          { required: true, message: '请输入物流单号', trigger: 'blur' },
+        ]"
+      >
+        <el-input
+          v-model.trim="forms.expressBillNo"
+          placeholder="请输入物流单号"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+      label="收货地址"
+        prop="addressId"
+        :rules="[
+          { required: true, message: '请选收货地址', trigger: 'change' },
+        ]"
+      >
+        <el-select
+          v-model.trim="forms.addressId"
+          filterable
+          placeholder="请选收货地址"
+          style="width:100%!important"
+          clearable
+        >
+          <el-option
+            v-for="item in addrList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+import { areaQueryChild, getParentArea } from "@/api/specialSetting";
+import { addMusicGroupAddr, getMusicGroupAddr } from "../../api";
+import {
+  takeEffectOfinstrumentInsurance,
+} from "@/api/orderManager";
+export default {
+  props: ["form"],
+  data() {
+    return {
+      forms: {
+        expressCompany: "",
+        expressBillNo: "",
+        addressId: "",
+      },
+      addrList: [],
+    };
+  },
+  async mounted() {
+    this.getAddrList()
+    if (this.form) {
+      // this.forms = { ...this.form };
+    }
+  },
+  methods: {
+    async getAddrList() {
+      this.teamid = this.$route.query.id;
+      try {
+        getMusicGroupAddr({
+          musicGroupId: this.teamid,
+          page: 1,
+          rows: 9999,
+        }).then(async (res) => {
+          try{
+          if (res.code == 200) {
+            this.addrList = (res.data.rows ? res.data.rows : []).map(item=>{
+              return {
+                value:item.id,
+                label:item.regionProvince+item.regionCity+item.regionCounty+item.detailAddress
+              }
+            });
+            console.log( this.addrList)
+            if (this.addrList.length < 1) {
+              await this.$confirm("当前乐团暂无收货地址,是否前去配置?", "提示", {
+                type: "warning",
+              });
+              this.$emit('close')
+              this.$bus.$emit("changeAddrTab",'eidtTeamAddr')
+            }
+          }
+        }catch(e){
+          console.log(e)
+        }
+        });
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    async submit() {
+      this.$refs.form.validate(async (flag) => {
+        if (flag) {
+          // 新增
+          try {
+            const res = await takeEffectOfinstrumentInsurance({ ...this.forms,musicGroupId:this.$route.query.id });
+            this.$message.success("发货成功");
+            this.$emit("getList");
+          } catch (e) {
+            console.log(e);
+          }
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.provinceWrap {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+</style>

+ 237 - 0
src/views/teamDetail/teamListComponent/modals/eidtAddr.vue

@@ -0,0 +1,237 @@
+<template>
+  <div>
+    <el-form :model="forms" ref="form">
+      <el-form-item
+        label="联系人"
+        prop="consigneeName"
+        :rules="[
+          { required: true, message: '请输入联系人姓名', trigger: 'blur' },
+        ]"
+      >
+        <el-input
+          v-model.trim="forms.consigneeName"
+          placeholder="请输入联系人姓名"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="手机号"
+        prop="mobile"
+        :rules="[{ required: true, message: '请输入手机号', trigger: 'blur' }]"
+      >
+        <el-input
+          v-model.trim="forms.mobile"
+          placeholder="请输入手机号"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="所在城市" required>
+        <br />
+        <div class="provinceWrap">
+          <el-form-item
+            prop="regionProvinceId"
+            :rules="[
+              { required: true, message: '请选择省', trigger: 'change' },
+            ]"
+            style="margin-right: 0"
+          >
+            <el-select
+              v-model.trim="forms.regionProvinceId"
+              filterable
+              placeholder="请选择省"
+              clearable
+              style="width: 148px !important; margin-right: 5px"
+              @change="onChangeProvince"
+            >
+              <el-option
+                v-for="item in provinceList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            prop="regionCityId"
+            :rules="[
+              { required: true, message: '请选择市', trigger: 'change' },
+            ]"
+            style="margin-right: 0"
+          >
+            <el-select
+              v-model.trim="forms.regionCityId"
+              filterable
+              :disabled="!forms.regionProvinceId"
+              style="width: 148px !important; margin-right: 5px"
+              placeholder="请选择市"
+              @change="onChangeCity"
+              clearable
+            >
+              <el-option
+                v-for="item in cityList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            prop="regionCountyId"
+            :rules="[
+              { required: true, message: '请选择地区', trigger: 'change' },
+            ]"
+            style="margin-right: 0"
+          >
+            <el-select
+              v-model.trim="forms.regionCountyId"
+              filterable
+              :disabled="!forms.regionCityId"
+              style="width: 148px !important"
+              placeholder="请选择地区"
+              clearable
+            >
+              <el-option
+                v-for="item in countyList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </div>
+      </el-form-item>
+      <el-form-item
+        label="详细地址"
+        prop="detailAddress"
+        :rules="[
+          { required: true, message: '请输入详细地址', trigger: 'blur' },
+        ]"
+      >
+        <el-input
+          v-model.trim="forms.detailAddress"
+          type="textarea"
+          :rows="3"
+          placeholder="请输入详细地址"
+        ></el-input>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+import { areaQueryChild, getParentArea } from "@/api/specialSetting";
+import { addMusicGroupAddr,resetMusicGroupAddr } from "../../api";
+export default {
+  props: ["form"],
+  data() {
+    return {
+      forms: {
+        consigneeName: "",
+        mobile: "",
+        detailAddress: "",
+        musicGroupId: "",
+        regionProvinceId: "",
+        regionCityId: "",
+        regionCountyId: "",
+
+      },
+      provinceList: [],
+      cityList: [],
+      countyList: [],
+    };
+  },
+  async mounted() {
+    if(this.form){
+      this.forms = {...this.form}
+    }
+    await this.getAreaList();
+    if (this.forms.regionCityId) {
+      await getParentArea({ id: this.forms.regionCityId }).then(async (res) => {
+        if (res.code == 200 && res.data) {
+          await this.getAreaList(res.data.id, "regionCityId", () => {
+            this.$set(this.forms, "regionProvinceId", res.data.id+'');
+            this.$set(this.forms, "regionCityId", this.forms.regionCityId );
+            this.$set(this.forms, "regionCountyId", this.forms.regionCountyId);
+          });
+        }
+      });
+      if (this.forms.regionCityId) {
+        await this.getAreaList(this.forms.regionCityId, "regionCountyId");
+        this.$set(this.forms, "regionCountyId", this.forms.regionCountyId);
+      }
+    } else {
+      this.$set(this.forms, "regionProvinceId", null);
+      this.$set(this.forms, "regionCityId", null);
+    }
+  },
+  methods: {
+    onChangeProvince(val) {
+      this.forms.regionCityId = null;
+      this.forms.regionCountyId = null;
+      this.getAreaList(val+'', "");
+    },
+    onChangeCity(val) {
+      this.forms.regionCountyId = null;
+      this.getAreaList(val+'', "regionCountyId");
+    },
+    getAreaList(parentId, type, callback) {
+      parentId = parentId ? parentId : 0;
+      areaQueryChild({ parentId: parentId }).then((res) => {
+        if (res.code == 200 && res.data) {
+          let tempData = [];
+          res.data.forEach((item) => {
+            tempData.push({
+              label: item.name,
+              value: item.id+'',
+            });
+          });
+          if (parentId) {
+            if (type == "regionCountyId") {
+              this.countyList = tempData;
+            } else {
+              this.cityList = tempData;
+            }
+          } else {
+            this.provinceList = tempData;
+          }
+
+          if (callback && typeof callback == "function") {
+            callback();
+          }
+        }
+      });
+    },
+    async submit() {
+      this.$refs.form.validate(async (flag) => {
+        if (flag) {
+          this.forms.musicGroupId = this.$route.query.id
+          if (this.forms.id) {
+            // 修改  resetMusicGroupAddr
+            try {
+              const res = await resetMusicGroupAddr({ ...this.forms });
+              this.$message.success("修改成功");
+              this.$emit("getList");
+            } catch (e) {
+              console.log(e);
+            }
+          } else {
+            // 新增
+            try {
+              const res = await addMusicGroupAddr({ ...this.forms });
+              this.$message.success("添加成功");
+              this.$emit("getList");
+            } catch (e) {
+              console.log(e);
+            }
+          }
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.provinceWrap {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+</style>

+ 356 - 0
src/views/teamDetail/teamListComponent/waitTeamList.vue

@@ -0,0 +1,356 @@
+<template>
+  <div class="">
+    <div class="">
+      <div class="tableWrap">
+        <el-table
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+
+        >
+        <!--   @selection-change="handleSelectionChange" -->
+          <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
+          <el-table-column label="商品编号" prop="sn" align="center">
+          </el-table-column>
+          <el-table-column label="商品名称" align="center" prop="name">
+          </el-table-column>
+          <el-table-column label="商品类型" align="center" prop="type">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.type | shopType }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="具体型号" align="center" prop="specification">
+          </el-table-column>
+          <el-table-column label="数量统计" align="center" prop="sellCount">
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="btnWrap" style="margin-top: 20px">
+      <el-button
+        type="primary"
+        v-if="tableList.length > 0"
+        v-permission="'order/musicalListExport'"
+        @click="musicalListExport"
+        >订货清单导出</el-button
+      >
+      <el-button
+        type="primary"
+        v-if="tableList.length > 0"
+        v-permission="'order/musicalListDetailExport'"
+        @click="musicalListDetailExport"
+        >分发清单导出</el-button
+      >
+      <!--  v-if="
+          musicalStatus &&
+          $helpers.permission('musicGroup/takeEffectOfinstrumentInsurance')
+        " -->
+      <el-button
+        type="primary"
+        @click="onDelivery"
+
+        >确认发货</el-button
+      >
+      <!-- <el-button
+        type="warning okBtn"
+        v-if="team_status == 'PREPARE' && !hasVerifyMusicalList"
+        v-permission="'order/verifyMusicalList'"
+        @click="okDetailList"
+        >乐器清单确认</el-button
+      > -->
+      <!-- <div class="okBtn" v-permission="'order/verifyMusicalList'"
+           @click="okDetailList">确认</div> -->
+    </div>
+    <el-dialog :visible.sync="addrVisiable" title="确认清单" width="500px">
+      <deliverGoods v-if="addrVisiable" :form="activeChiose" ref='deliverGoods' @close='()=>{addrVisiable = false}' @getList='getList'/>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="addrVisiable = false">取 消</el-button>
+        <el-button type="primary" @click="onsubmitDelivery"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+<script>
+import { getTeamDetailList, getTeamBaseInfo } from "@/api/buildTeam";
+import { getTeamList } from "@/api/teamServer";
+import {
+  verifyMusicalList,
+  takeEffectOfinstrumentInsurance,
+} from "@/api/orderManager";
+import deliverGoods from './modals/deliverGoods.vue'
+import axios from "axios";
+import qs from "qs";
+import { getToken, getTenantId } from "@/utils/auth";
+import load from "@/utils/loading";
+export default {
+  data() {
+    return {
+      teamid: "",
+      tableList: [],
+      Fsearch: null,
+      Frules: null,
+      team_status: "",
+      musicalInstrumentsProvideStatus: 0, // 是否确认发货  1已发货
+      hasVerifyMusicalList: true,
+      activeChiose:[],
+      addrVisiable:false
+    };
+  },
+  components:{deliverGoods},
+  mounted() {
+    this.init();
+  },
+  activated() {
+    this.init();
+  },
+  computed: {
+    musicalStatus() {
+      const template = ["PREPARE", "PROGRESS"];
+      const teamStatus = this.$route.query.team_status;
+      const status = template.includes(teamStatus);
+      console.log(this.musicalInstrumentsProvideStatus, status);
+      return !this.musicalInstrumentsProvideStatus && status ? true : false;
+    },
+  },
+  methods: {
+    init() {
+      this.team_status = this.$route.query.team_status;
+      this.teamid = this.$route.query.id;
+      if (this.teamid) {
+        // getTeamList({ musicGroupId: this.teamid }).then(res=>{
+        //   if(res.code == 200){
+        //     this.hasVerifyMusicalList = res?.data?.rows[0]?.hasVerifyMusicalList
+        //   }
+        // })
+          this.getList()
+        this.getMusicInfo();
+      }
+    },
+    getList(){
+      this.addrVisiable=false;
+      getTeamDetailList({ musicGroupId: this.teamid,deliveryStatus:'0' }).then((res) => {
+          if (res.code == 200) {
+            this.tableList = res.data ? res.data : [];
+          }
+        });
+    },
+    async getMusicInfo() {
+      await getTeamBaseInfo({ musicGroupId: this.teamid  }).then((res) => {
+        if (res.code == 200) {
+          this.musicalInstrumentsProvideStatus =
+            res.data?.musicGroup?.musicalInstrumentsProvideStatus;
+          this.hasVerifyMusicalList =
+            res.data?.musicGroup?.hasVerifyMusicalList;
+        }
+      });
+    },
+    handleSelectionChange (val) {
+      this.activeChiose = val
+    },
+    onCancel() {
+      this.$store.dispatch("delVisitedViews", this.$route);
+      this.$router.push({ path: "/teamList" });
+    },
+    onDelivery() {
+      // console.log('自动发货')
+      this.addrVisiable = true;
+      // return
+      // this.$confirm("是否确认发货", "提示", {
+      //   confirmButtonText: "确定",
+      //   cancelButtonText: "取消",
+      //   type: "warning",
+      // }).then(async () => {
+      //   try {
+      //     await takeEffectOfinstrumentInsurance({ musicGroupId: this.teamid });
+      //     this.$message.success("确定发货成功");
+      //     this.getMusicInfo();
+      //   } catch {
+      //     //
+      //   }
+      // });
+    },
+    onsubmitDelivery(){
+      this.$refs.deliverGoods.submit()
+      console.log('确认发货发货')
+    },
+    okDetailList() {
+      this.$confirm(`是否确认发放清单?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          verifyMusicalList({ musicGroupId: this.teamid }).then((res) => {
+            if (res.code == 200) {
+              this.$store.dispatch("delVisitedViews", this.$route);
+              this.$router.push({
+                path: "/teamList",
+                query: { search: this.Fsearch, rules: this.Frules },
+              });
+            }
+          });
+        })
+        .catch(() => {});
+    },
+    musicalListExport() {
+      // 报表导出
+      let url = "/api-web/order/musicalListExport";
+      let data = {
+        musicGroupId: this.$route.query.id,
+        deliveryStatus:'0'
+      };
+      const options = {
+        method: "POST",
+        headers: {
+          Authorization: getToken(),
+          tenantId: getTenantId(),
+        },
+        data: qs.stringify(data),
+        url,
+        responseType: "blob",
+      };
+      this.$confirm("您确定导出订货清单", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .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 text = new Response(blob).text();
+              text.then((res) => {
+                // 判断是否报错
+                if (res.indexOf("code") != -1) {
+                  let json = JSON.parse(res);
+                  if (json.code == 403) {
+                    this.$message.error(`登录过期,请重新登录!`);
+                    setTimeout(() => {
+                      this.$store.dispatch("user/resetToken").then(() => {
+                        location.reload();
+                      });
+                    }, 1000);
+                    return;
+                  }
+                  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 = this.$route.query.id + "-" + ymd + "订货清单.xls"; //下载文件的名字
+                  link.href = objectUrl;
+                  link.setAttribute("download", fname);
+                  document.body.appendChild(link);
+                  link.click();
+                }
+              });
+              load.endLoading();
+            })
+            .catch((error) => {
+              this.$message.error("导出数据失败,请联系管理员");
+              load.endLoading();
+            });
+        })
+        .catch(() => {});
+    },
+    musicalListDetailExport() {
+      // 报表导出
+      let url = "/api-web/order/musicalListDetailExport";
+      let data = {
+        musicGroupId: this.$route.query.id,
+        deliveryStatus:'0'
+      };
+      const options = {
+        method: "POST",
+        headers: {
+          Authorization: getToken(),
+          tenantId: getTenantId(),
+        },
+        data: qs.stringify(data),
+        url,
+        responseType: "blob",
+      };
+      this.$confirm("您确定导出分发清单", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .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 text = new Response(blob).text();
+              text.then((res) => {
+                // 判断是否报错
+                if (res.indexOf("code") != -1) {
+                  let json = JSON.parse(res);
+                  if (json.code == 403) {
+                    this.$message.error(`登录过期,请重新登录!`);
+                    setTimeout(() => {
+                      this.$store.dispatch("user/resetToken").then(() => {
+                        location.reload();
+                      });
+                    }, 1000);
+                    return;
+                  }
+                  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 = this.$route.query.id + "-" + ymd + "分发清单.xls"; //下载文件的名字
+                  link.href = objectUrl;
+                  link.setAttribute("download", fname);
+                  document.body.appendChild(link);
+                  link.click();
+                }
+              });
+              load.endLoading();
+            })
+            .catch((error) => {
+              this.$message.error("导出数据失败,请联系管理员");
+              load.endLoading();
+            });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+</style>