Commit 38520c69 authored by 赵茹林's avatar 赵茹林

Merge branch 'dev' of git.singsingenglish.com:new-sing/admin into dev

parents 70f9ea3a cf4b96f1
...@@ -39,7 +39,13 @@ ...@@ -39,7 +39,13 @@
<el-table-column prop="gift_num" label="赠品总数"> <el-table-column prop="gift_num" label="赠品总数">
</el-table-column> </el-table-column>
<el-table-column prop="stock_num" label="库存数量"></el-table-column> <el-table-column prop="stock_num" label="库存数量"></el-table-column>
<el-table-column prop="get_num" label="领取数量"></el-table-column> <el-table-column prop="get_num" label="领取数量">
<template slot-scope="scope">
<router-link class="get_num" :to="{name:'giftDeliverRecord', query: { id: scope.row.id}}" >
{{scope.row.get_num}}
</router-link>
</template>
</el-table-column>
<el-table-column prop="status" label="状态"> <el-table-column prop="status" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.status == 1">上架</div> <div v-if="scope.row.status == 1">上架</div>
...@@ -181,4 +187,7 @@ ...@@ -181,4 +187,7 @@
.container { .container {
padding: 20px; padding: 20px;
} }
.get_num {
color: #409EFF;
}
</style> </style>
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
data() { data() {
return { return {
searchFrom: { searchFrom: {
gift_id: '',
gift_name: '', gift_name: '',
gift_type: '', gift_type: '',
periods_title: '', periods_title: '',
...@@ -98,6 +99,7 @@ ...@@ -98,6 +99,7 @@
methods: { methods: {
getRecordList() { getRecordList() {
let json = { let json = {
gift_id: this.searchFrom.gift_id,
gift_name: this.searchFrom.gift_name, gift_name: this.searchFrom.gift_name,
gift_type: this.searchFrom.gift_type, gift_type: this.searchFrom.gift_type,
periods_title: this.searchFrom.periods_title, periods_title: this.searchFrom.periods_title,
...@@ -136,6 +138,10 @@ ...@@ -136,6 +138,10 @@
}, },
}, },
created() { created() {
let _query = this.$route.query;
if (_query && _query.id) {
this.searchFrom.gift_id = _query.id;
}
this.getRecordList(); this.getRecordList();
} }
} }
......
...@@ -870,7 +870,7 @@ ...@@ -870,7 +870,7 @@
}) })
}, },
getRelationGift() { getRelationGift() {
relationGiftApi().then(res => { relationGiftApi({status: 1}).then(res => {
this.relation_gift = res.list; this.relation_gift = res.list;
}); });
} }
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
:title="dialogObj.title" :title="dialogObj.title"
center center
append-to-body append-to-body
:visible.sync="dialogObj.show"> :visible.sync="dialogObj.show"
:close-on-click-modal="false">
<div v-if="dialogObj.gift_deliver" class="dialog-content"> <div v-if="dialogObj.gift_deliver" class="dialog-content">
<div class="dialog-text">物流已发货,不能修改赠品信息!</div> <div class="dialog-text">物流已发货,不能修改赠品信息!</div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -59,6 +60,13 @@ ...@@ -59,6 +60,13 @@
relationGiftApi({goods_id: this.dialogObj.goods_id}).then(res => { relationGiftApi({goods_id: this.dialogObj.goods_id}).then(res => {
this.selectedGiftList = res.list; this.selectedGiftList = res.list;
}); });
relationGiftApi({out_trade_no: this.dialogObj.out_trade_no}).then(res => {
let giftListArr = [];
res.list.forEach(i => {
giftListArr.push(i.id);
});
this.form.selectedGiftList = giftListArr;
});
}, },
sub() { sub() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
......
...@@ -540,23 +540,23 @@ export default [ ...@@ -540,23 +540,23 @@ export default [
} }
}, { }, {
value: '赠品配置', value: '赠品配置',
routerName: 'gitConfig', routerName: 'giftConfig',
path: '/gitConfig', path: '/giftConfig',
cover: '6-5', cover: '6-5',
router: { router: {
path: '/gitConfig', path: '/giftConfig',
name: 'gitConfig', name: 'giftConfig',
component: e => require(['@/components/gitConfig'], e), component: e => require(['@/components/giftConfig'], e),
} }
}, { }, {
value: '赠品领取记录', value: '赠品领取记录',
routerName: 'gitDeliverRecord', routerName: 'giftDeliverRecord',
path: '/gitDeliverRecord', path: '/giftDeliverRecord',
cover: '6-6', cover: '6-6',
router: { router: {
path: '/gitDeliverRecord', path: '/giftDeliverRecord',
name: 'gitDeliverRecord', name: 'giftDeliverRecord',
component: e => require(['@/components/gitDeliverRecord'], e), component: e => require(['@/components/giftDeliverRecord'], e),
} }
} }
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment