Commit c5b18e13 by 黑潮

update: 履约管理

parent 55f5b540
/**
* api
* 礼品管理
*/
import getFetch from './get-fetch.js';
import { welfarePrefix } from '@/config';
// 礼品相关接口
let performance = {
getDelivery: {
url: '/delivery-order/get-page-list',
method: 'post'
}, // 发货单
getPerformanceList: {
url: '/order/get-page-list',
method: 'post'
}, // 发货单
getApplicationList: '/stock/application-list'
};
performance = getFetch(performance, welfarePrefix);
export default { ...performance };
import Layout from '@/components/layout/layout';
export default [
{
path: '/performance',
component: Layout,
redirect: '/performance/delivery',
children: [
{
path: 'delivery',
component: () => import('@/views/performance-manage/delivery.vue'),
},
{
path: 'delivery-detail',
component: () => import('@/views/performance-manage/delivery-detail.vue'),
},
{
path: 'refund',
component: () => import('@/views/performance-manage/refund.vue'),
},
{
path: 'record',
component: () => import('@/views/performance-manage/record.vue'),
},
],
},
];
......@@ -5,6 +5,7 @@ import realGift from './real-gift';
import Layout from '@/components/layout/layout';
import virtualGift from './virtual-gift';
import stockRecord from './stock-record';
import Performance from './performance';
export const asyncRoutes = [
...gicCard,
......@@ -12,6 +13,7 @@ export const asyncRoutes = [
...realGift,
...virtualGift,
...stockRecord,
...Performance
];
......@@ -33,4 +35,4 @@ export const staticRoutes = [
},
];
export const routes = [ ...staticRoutes, ...asyncRoutes ];
\ No newline at end of file
export const routes = [ ...staticRoutes, ...asyncRoutes ];
<template>
<el-dialog :visible.sync="visible" title="批量发货" width="510px" @closed="$emit('close')">
<!-- <dm-upload-file></dm-upload-file> -->
<div>
成功<span>{{successCount}}</span>条,失败<span>{{failedCount}}</span>
</div>
<div>1.下载批量发货的模版;<el-link type="primary" href="/">点此下载</el-link></div>
<div>2.填入需要发货的发货单号、物流公司名称、物流公司编码、物流单号;</div>
<div>3.仅支持.xlsx .xls的文件导入,最多1000条信息,文件大小不超过2M;</div>
<div slot="footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="handleConfirm">确认</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
data() {
return {
visible: false,
successCount: 0,
failedCount: 0,
};
},
mounted() {
this.visible = true;
},
methods: {
handleConfirm() {
console.log(1);
},
}
};
</script>
<template>
<el-dialog :visible.sync="visible" title="物流发货" width="510px" @closed="$emit('close')">
<div>确认关闭发货单吗?</div>
<div>将恢复礼品的库存,若存在销售单请至商城应用查看退款。</div>
<dm-input type="textarea"></dm-input>
<div slot="footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="handleConfirm">确认</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
data() {
return {
visible: false,
successCount: 0,
failedCount: 0,
};
},
mounted() {
this.visible = true;
},
methods: {
handleConfirm() {
console.log(1);
},
}
};
</script>
<template>
<el-dialog :visible.sync="visible" title="物流发货" width="510px" @closed="$emit('close')">
<div>收货信息:</div>
<div>
物流公司:
<el-select>
<el-option label="商品名称" :value="1"></el-option>
</el-select>
</div>
<div>
物流单号:
<el-input></el-input>
</div>
<div slot="footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="handleConfirm">确认</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
data() {
return {
visible: false,
successCount: 0,
failedCount: 0,
};
},
mounted() {
this.visible = true;
},
methods: {
handleConfirm() {
console.log(1);
},
}
};
</script>
<template>
<el-dialog :visible.sync="visible" title="物流发货" width="510px" @closed="$emit('close')">
<div>收件人:{{1231}}</div>
<div>联系方式:{{1231}}</div>
<div>收货地址:{{1231}}</div>
<div>
快递公司:{{12312}} 运单号:{{123123}}
<el-button type="text" @click="handleModifyOrder"></el-button>
</div>
<div>
物流信息
</div>
<div slot="footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="handleConfirm">确认</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
data() {
return {
visible: false,
successCount: 0,
failedCount: 0,
};
},
mounted() {
this.visible = true;
},
methods: {
handleConfirm() {
console.log(1);
},
}
};
</script>
<template>
<div style="padding:20px">
<div>
<div>核销成功</div>
<div>仓库已核销,发货单完成</div>
</div>
<el-divider></el-divider>
<p>
发货单信息
</p>
<ul class="order-info">
<li>发货单号:</li>
<li>履约单号:</li>
<li>会员姓名:</li>
<li>会员卡号:</li>
<li>配货方式:</li>
<li>收货信息:</li>
</ul>
<el-table>
<el-table-column label="商品" width="300"></el-table-column>
<el-table-column label="商品编码"></el-table-column>
<el-table-column label="成本"></el-table-column>
<el-table-column label="数量"></el-table-column>
<el-table-column label="物流公司 | 运单号"></el-table-column>
</el-table>
</div>
</template>
<script>
export default {
name: 'DeliveryDetail',
};
</script>
<style lang="scss" scoped>
.order-info {
margin: 20px 0;
display: flex;
.li {
width: 33%;
margin: 10px 0
}
}
</style>
<template>
<el-tabs style="padding:20px" v-model="activeIndex">
<el-tab-pane label="全部" :name="''">
<delivery-list :type="''"></delivery-list>
</el-tab-pane>
<el-tab-pane :label="`未发货(${count})`" :name="0">
<delivery-list :type="0" @count="setCount"></delivery-list>
</el-tab-pane>
<el-tab-pane label="已发货" :name="1">
<delivery-list :type="1"></delivery-list>
</el-tab-pane>
</el-tabs>
</template>
<script>
import deliveryList from './delivery-list';
export default {
name: 'Delivery',
components: { deliveryList },
data() {
return {
activeIndex: '',
count: 0,
};
},
methods: {
setCount(value) {
this.count = value;
}
}
};
</script>
<template>
<div class="performance-record">
<header>
<el-select style="width:160px" v-model="query.appCode" placeholder="请选择来源" @change="handleSearch" clearable>
<el-option label="积分商城" :value="1"></el-option>
<el-option label="口令福利" :value="2"></el-option>
</el-select>
<el-select style="width:160px;margin-left:10px" placeholder="配货方式" v-model="query.deliveryType" @change="handleSearch" clearable>
<el-option label="物流发货" :value="1"></el-option>
<el-option label="门店自提" :value="2"></el-option>
<el-option label="文本券码" :value="3"></el-option>
</el-select>
<el-select style="width:160px;margin-left:10px" placeholder="履约状态" v-model="query.orderFlag" @change="handleSearch" clearable>
<el-option label="待履约" :value="0"></el-option>
<el-option label="已履约" :value="1"></el-option>
<el-option label="已关闭" :value="2"></el-option>
</el-select>
<el-input style="width:300px;margin-left:10px" placeholder="请输入关键词搜索" v-model="searchValue" clearable @keyup.enter.native="handleSearch" @change="handleSearch">
<el-select v-model="searchType" slot="prepend" style="width:140px;">
<el-option label="礼品名称" value="giftName"></el-option>
<el-option label="礼品编码" value="giftNo"></el-option>
<el-option label="sku编码" value="giftSkuCode"></el-option>
<el-option label="会员姓名" value="memberName"></el-option>
<el-option label="会员卡号" value="memberCardNo"></el-option>
<el-option label="履约单号" value="orderId"></el-option>
</el-select>
</el-input>
<el-date-picker class="w350" style="margin-left:10px" v-model="daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" @change="handleSearch"></el-date-picker>
<div style="float:right">
<el-button type="primary" @click="add">导出</el-button>
</div>
</header>
<el-table style="margin-top:20px" :data="list">
<el-table-column label="礼品信息" width="300">
<template slot-scope="{ row }">
<div class="goods-info">
<img class="imgs-style" :src="row.giftImgUrl" alt="" />
<div class="goods-text">
<div class="goods-text-name">
{{row.giftName}}
</div>
<div class="goods-text-info">
<div>
<span v-for="(item, i) in JSON.parse(row.giftSkuStrand)" :key="i">{{ item.specStandardName }}{{ item.specStandardValueName }} &nbsp;&nbsp;</span>
</div>
<div>SKU编码:{{ row.giftSkuCode }}</div>
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="数量" prop="exchangeQuantity"></el-table-column>
<el-table-column label="创建时间" sortable>
<template slot-scope="{ row }">
<p>{{ row.createTime | formatDate }}</p>
<p>{{ row.createTime | formatDate('time') }}</p>
</template>
</el-table-column>
<el-table-column label="履约单号">
<template slot-scope="{ row }">
<el-popover
placement="bottom-end"
width="200"
trigger="click">
<el-button type="text" slot="reference">{{row.orderId}}</el-button>
</el-popover>
</template>
</el-table-column>
<el-table-column label="会员信息">
<template slot-scope="{ row }">
<p>{{ row.memberName }}</p>
<p>{{ row.memberCardNo }}</p>
</template>
</el-table-column>
<el-table-column label="来源">
<template slot-scope="{ row }">
<p>{{ row.createTime | formatDate }}</p>
<p>{{ row.createTime | formatDate('time') }}</p>
</template>
</el-table-column>
<el-table-column label="履约状态">
<template slot-scope="{ row }">
{{orderFlagMap[row.orderFlag]}}
</template>
</el-table-column>
</el-table>
<dm-pagination
background
layout="total, sizes, prev, pager, next"
style="text-align: right"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.currentPage"
:page-sizes="[20, 40, 60, 80]"
:page-size="pager.pageSize"
:total="pager.totalCount">
</dm-pagination>
</div>
</template>
<script>
import fetch from '@/api/performance.js';
const { getPerformanceList } = fetch;
const orderFlagMap = {
0: '待履约',
1: '已履约',
2: '已关闭'
};
export default {
name: 'DeliveryList',
data() {
return {
pager: {
currentPage: 1,
pageSize: 20,
totalCount: 0,
},
list: [],
searchType: 'orderId',
searchValue: '',
query: {
deliveryType: '',
appCode: '',
startTime: '',
endTime: '',
orderFlag: ''
},
orderFlagMap
};
},
methods: {
handleWiped() {
this.$alert('自提核销', '请确认买家出示的提货码<div>{{123123}}</div>确认无误后,将商品交付给买家,确认核销后发货单完成', {
dangerouslyUseHTMLString: true,
confirmButtonText: '确认',
showClose: false,
});
},
async getList(sort = 'desc') {
let query = {
...this.query,
pageNum: this.pager.currentPage,
pageSize: this.pager.pageSize,
[this.searchType]: this.searchValue,
deliveryFlag: this.type,
sort
};
this.loading = true;
let { result: { result, totalCount } } = await getPerformanceList(query).finally(() => this.loading = false);
this.list = result || [];
this.totalCount = totalCount;
},
// 搜索
handleSearch() {
this.pager.currentPage = 1;
this.getList();
},
// 改变每页显示数量
handleSizeChange(pageSize) {
this.pager.currentPage = 1;
this.pager.pageSize = pageSize;
this.getList();
},
// 换页
handleCurrentChange(currentPage) {
this.pager.currentPage = currentPage;
this.getList();
},
},
filters: {
formatDate(ms, type = 'date') {
if (!ms) return '--';
const date = [];
const time = [];
ms = new Date(ms);
date.push(ms.getFullYear());
date.push((ms.getMonth() + 1).toString().padStart(2, '0'));
date.push(ms.getDate().toString().padStart(2, '0'));
time.push(ms.getHours().toString().padStart(2, '0'));
time.push(ms.getMinutes().toString().padStart(2, '0'));
time.push(ms.getSeconds().toString().padStart(2, '0'));
return {
date: date.join('-'),
time: time.join(':')
}[type];
}
},
computed: {
daterange: {
get() {
return [ this.query.startTime, this.query.endTime ];
},
set(v) {
[ this.query.startTime, this.query.endTime ] = v || [ '', '' ];
}
},
},
};
</script>
<style lang="scss" scoped>
.performance-record {
padding: 20px;
}
.goods-info {
height: 100%;
display: flex;
img {
width: 62px;
height: 62px;
border: 1px solid rgba(241, 243, 247, 1);
border-radius: 5px;
}
.goods-text {
margin-left: 18px;
font-size: 13px;
color: #303133;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.goods-text-info {
color: #909399;
font-size: 12px;
}
.goods-text-name {
margin-bottom: 5px;
line-height: 16px;
}
}
</style>
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