|
@@ -1,28 +1,129 @@
|
|
|
<template>
|
|
|
- <div class="eidtAddrWrap">
|
|
|
- <eidtAddr />
|
|
|
- <el-button class="saveBtn" type="primary">保 存</el-button>
|
|
|
+ <div class="">
|
|
|
+ <div class="">
|
|
|
+ <el-button type="primary" @click="addAddr">新建地址</el-button>
|
|
|
+ <div class="tableWrap">
|
|
|
+ <el-table
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ :data="tableList"
|
|
|
+ >
|
|
|
+ <el-table-column label="地址编号" prop="sn" width="100px" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="详细地址" align="left" prop="name">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" prop="sn" width="100px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ @click="resetAddr(scope.row)"
|
|
|
+
|
|
|
+ type="text"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ @click="deleteAddr(scope.row)"
|
|
|
+
|
|
|
+ type="text"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ </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="400px">
|
|
|
+ <eidtAddr v-if="addrVisiable" :form="activeRow"/>
|
|
|
+ <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 eidtAddr from './modals/eidtAddr'
|
|
|
+
|
|
|
+import { getMusicGroupAddr} from '../api'
|
|
|
+import qs from "qs";
|
|
|
+import eidtAddr from './modals/eidtAddr.vue'
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
export default {
|
|
|
- components:{
|
|
|
- eidtAddr
|
|
|
- },
|
|
|
- data(){
|
|
|
+ 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(){
|
|
|
+ console.log('getList')
|
|
|
+ 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){},
|
|
|
+ deleteAddr(row){},
|
|
|
+ addAddr(){
|
|
|
+ this.activeRow = null;
|
|
|
+ this.addrVisiable = true;
|
|
|
+ },
|
|
|
+ submitAddr(){}
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .eidtAddrWrap {
|
|
|
- width: 350px;
|
|
|
- }
|
|
|
- .saveBtn {
|
|
|
- float: right;
|
|
|
- }
|
|
|
</style>
|