Commit 78a6d726 by chenxin

fix: build 卡券bug

parent cd2393c4
.ml40[data-v-86ccfca6]{margin-left:40px}.filter-block[data-v-86ccfca6]{color:#303133;background:#f7f8fa;padding:20px;margin-bottom:20px}.filter-block span[data-v-86ccfca6]{margin-left:10px;margin-right:10px;line-height:20px}.card[data-v-86ccfca6]{padding-left:70px;min-height:70px;position:relative}.card img[data-v-86ccfca6]{position:absolute;left:0;top:0;width:60px;height:60px;border-radius:4px}.card .name[data-v-86ccfca6]{color:#303133;padding-top:8px;margin-bottom:7px;line-height:22px}.el-icon-delete[data-v-3e211f3a]{display:inline-block;font-size:17px;padding:9px;margin-right:10px;color:#909399;border:1px solid #e4e7ed;border-radius:50%;vertical-align:middle;cursor:pointer;position:relative;top:-60px}.el-icon-delete[data-v-3e211f3a]:hover{background:#fef0f0;border:1px solid #fbc4c4;color:#f5222d}
\ No newline at end of file
.ml40[data-v-04c6aa56]{margin-left:40px}.filter-block[data-v-04c6aa56]{color:#303133;background:#f7f8fa;padding:20px;margin-bottom:20px}.filter-block span[data-v-04c6aa56]{margin-left:10px;margin-right:10px;line-height:20px}.card[data-v-04c6aa56]{padding-left:70px;min-height:70px;position:relative}.card img[data-v-04c6aa56]{position:absolute;left:0;top:0;width:60px;height:60px;border-radius:4px}.card .name[data-v-04c6aa56]{color:#303133;padding-top:8px;margin-bottom:7px;line-height:22px}.el-icon-delete[data-v-3e211f3a]{display:inline-block;font-size:17px;padding:9px;margin-right:10px;color:#909399;border:1px solid #e4e7ed;border-radius:50%;vertical-align:middle;cursor:pointer;position:relative;top:-60px}.el-icon-delete[data-v-3e211f3a]:hover{background:#fef0f0;border:1px solid #fbc4c4;color:#f5222d}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -48,7 +48,7 @@
<script src="//web-1251519181.file.myqcloud.com/components/preview-img.1.0.3.js"></script><!-- 图片预览 -->
<script src="//web-1251519181.file.myqcloud.com/components/delete.1.1.4.js"></script><!-- 删除轻弹窗 -->
<script src="//web-1251519181.file.myqcloud.com/components/input-number.1.0.10.js"></script><!-- 输入框 -->
<script src="//web-1251519181.file.myqcloud.com/components/welfare-selector.0.0.3.js"></script><!-- 福利选择器 -->
<script src="//web-1251519181.file.myqcloud.com/components/welfare-selector.0.0.4.js"></script><!-- 福利选择器 -->
<script src="//web-1251519181.file.myqcloud.com/components/acc-group-select.1.0.5.js"></script><!-- 账号分组组件 -->
<script src="//web-1251519181.file.myqcloud.com/components/editor.1.1.13.js"></script><!-- 富文本编辑器 -->
</body>
......
......@@ -47,6 +47,7 @@
import { mapState } from 'vuex';
import asideMenu from './aside-menu.vue';
import switchPage from '@/components/libs/switch-page';
import { reRreshRoute } from '@/utils/index';
import { dealMkStorage } from '@/utils/common';
import commonApi from '@/api/common.js';
const { getSubappList } = commonApi;
......@@ -136,6 +137,12 @@ export default {
return !(this.project == '' || this.project == 'index');
}
},
watch: {
currentAreaId(newv, oldV) {
// 有左侧的根据监听currentAreaId的变化
reRreshRoute();
},
}
};
</script>
......
......@@ -14,6 +14,7 @@
<el-table-column prop="outStock" label="历史履约库存" min-width="120"> </el-table-column>
</el-table>
<!-- <div class="clearfix">
没有分页
<dm-pagination class="fr mb0" v-if="tableList.length" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></dm-pagination>
</div> -->
<span slot="footer" class="dialog-footer">
......@@ -82,7 +83,22 @@ export default {
...this.listParams
}).then(res => {
this.loading = false;
this.tableList = res.result.page.result || [];
let tableList = res.result.page.result || [];
if(tableList.length) {
const count = res.result.page.result.reduce((total, current) => {
total.remainedStock += current.remainedStock;
total.preStock += current.preStock;
total.outStock += current.outStock;
}, {
'appName': '合计',
'activityName': '',
'remainedStock': 0,
'preStock': 0,
'outStock': 0,
});
tableList = tableList.unshift(count); // 追加
}
this.tableList = tableList; // 无分页
}).catch(() => {
this.loading = false;
});
......
......@@ -22,13 +22,13 @@
<el-col :span="12" class="mb20">已占用:<span>{{ info.occupyStock || 0 }}</span></el-col>
<el-col :span="12" class="mb20">总库存:<span>{{ info.totalStock || 0 }}</span></el-col>
<el-col :span="12">已履约:<span>{{ info.outStock || 0 }}</span></el-col>
<el-col :span="12" v-if="type == 1 || type == 2">待履约:<span>{{ info.reStock || 0 }}</span></el-col>
<el-col :span="12" v-if="type == 1 || type == 2">待履约:<span>{{ info.preStock || 0 }}</span></el-col>
</el-row>
</div>
</div>
<!-- 实物礼品才有sku列表 -->
<el-table :data="skuList" v-if="type == 1" style="width: calc(100% - 40px)" max-height="200" class="ml20 mr20 mb10 el-table-list-mini-empty">
<el-table-column prop="num" label="SKU信息" min-width="180">
<el-table-column prop="giftSkuName" label="SKU信息" min-width="180" show-overflow-tooltip>
<template slot-scope="scope">
<div style="display:flex;align-items:center;">
<img :src="scope.row.giftSkuImgUrl" width="40" height="40" class="mr10" />
......@@ -40,7 +40,7 @@
<el-table-column prop="totalStock" label="总库存" min-width="150"></el-table-column>
<el-table-column prop="occupyStock" label="已占用" min-width="150"></el-table-column>
<el-table-column prop="remainedStock" label="可占库存" min-width="150"></el-table-column>
<el-table-column prop="num" label="已履约" min-width="150"></el-table-column>
<el-table-column prop="outStock" label="已履约" min-width="150"></el-table-column>
</el-table>
<act-dialog :dialog-visible.sync="dialogVisible" :welfare-id="$route.query.id"></act-dialog>
</div>
......
......@@ -34,7 +34,7 @@
</div>
<el-table tooltip-effect="dark" :data="tableList" style="width:100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="卡券包信息" min-width="200" fixed="left">
<el-table-column label="卡券包信息" min-width="200" fixed="left" show-overflow-tooltip>
<template slot-scope="scope">
<div class="card">
<img :src="scope.row.imgUrl" draggable="false" />
......
......@@ -95,10 +95,8 @@
<i class="el-icon-question cursor fz12 gray-lighter" slot="reference" style="position:relative;"></i>
</el-popover>
{{ scope.row.remainedStock || 0 }}
<!-- && scope.row.customCodeFlag == 0 -->
<el-button v-if="[1, 2].includes(scope.row._status)" @click="preAdjustStock(scope.row)" class="hover-btn" icon="el-icon-edit-outline ml5" type="text"></el-button>
<!-- && scope.row.customCodeFlag == 2 -->
<el-button v-if="[1, 2].includes(scope.row._status)" class="hover-btn ml5" @click="uploadCode(scope.row)" icon="iconfont-market4 icon-shangchuan" type="text"></el-button>
<el-button v-if="[1, 2].includes(scope.row._status)" @click="preAdjustStock(scope.row) && scope.row.customCodeFlag == 0" class="hover-btn" icon="el-icon-edit-outline ml5" type="text"></el-button>
<el-button v-if="[1, 2].includes(scope.row._status) && scope.row.customCodeFlag == 2" class="hover-btn ml5" @click="uploadCode(scope.row)" icon="iconfont-market4 icon-shangchuan" type="text"></el-button>
</template>
</el-table-column>
<el-table-column label="卡券状态" min-width="120">
......
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