|
@@ -60,11 +60,16 @@
|
|
|
>分发清单导出</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
|
|
|
+ >乐器清单确认</el-button
|
|
|
>
|
|
|
<!-- <div class="okBtn" v-permission="'order/verifyMusicalList'"
|
|
|
@click="okDetailList">确认</div> -->
|
|
@@ -72,9 +77,9 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getTeamDetailList } from "@/api/buildTeam";
|
|
|
+import { getTeamDetailList, getTeamBaseInfo } from "@/api/buildTeam";
|
|
|
import { getTeamList } from "@/api/teamServer";
|
|
|
-import { verifyMusicalList } from "@/api/orderManager";
|
|
|
+import { verifyMusicalList, takeEffectOfinstrumentInsurance } from "@/api/orderManager";
|
|
|
import axios from "axios";
|
|
|
import qs from "qs";
|
|
|
import { getToken } from "@/utils/auth";
|
|
@@ -87,6 +92,7 @@ export default {
|
|
|
Fsearch: null,
|
|
|
Frules: null,
|
|
|
team_status: "",
|
|
|
+ musicalInstrumentsProvideStatus: 0, // 是否确认发货 1已发货
|
|
|
hasVerifyMusicalList:true
|
|
|
};
|
|
|
},
|
|
@@ -96,6 +102,15 @@ export default {
|
|
|
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;
|
|
@@ -111,12 +126,35 @@ export default {
|
|
|
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: "确定",
|