Commit ae7ee1c1 by 李长胜

提交订单管理修改

1 parent 3215e507
......@@ -11,7 +11,7 @@ const getOrderList = (params = {}) => {
params.method = 'scrm.api.equity.order.list.get'
return http({
data: params,
returnAll:true
// returnAll:true
})
}
/** 获取海威账户余额*/
......
<template>
<div class="layout">
<div class="box">
<div class="box topBox">
<!-- <back /> -->
<el-button type="primary" class="backBtn" size="small" @click="$router.go(-1)">返回</el-button>
<div class="grid">
<div class="grid-item">订单编号:{{ detailInfo.orderCode }}</div>
<div class="grid-item">下单时间: {{ detailInfo.time }}</div>
</div>
</div>
<div class="box">
<div class="grayRow"></div>
<div class="grid">
<template v-for="(item, index) in detailInfoObj">
<div class="grid-item" :key="index">
<div class="grid-item top-grid-item" :key="index">
<div class="sub-title">{{ item.title }}</div>
<template v-for="(i, ind) in item.list">
<div class="item" :key="ind">
......@@ -29,7 +31,7 @@
<div class="grid-btn">
售后:
<template v-if="detailInfo.openRefund == 0">
<el-button type="primary" @click="openRefund">开启</el-button>
<el-button type="primary" @click="openRefund" size="small">开启</el-button>
</template>
<template v-else>
<span>已开启</span>
......@@ -39,20 +41,22 @@
</div>
</template>
</div>
</div>
<div class="tableWrap">
<d2-table :tableParams="tableParams" :tableData="tableData" :hasNum="false" :hasPage="false"></d2-table>
</div>
<div class="price-box">
<div class="price-item">
<div class="label">商品总价:</div>
<div class="value">{{ detailInfo.orderPrices }}元</div>
<div class="value">¥{{ detailInfo.orderPrices }}</div>
</div>
<div class="price-item">
<div class="label">优惠:</div>
<div class="value">0元</div>
<div class="value">¥0.00</div>
</div>
<div class="price-item">
<div class="label">实收金额:</div>
<div class="value">{{ detailInfo.orderPrices }}元</div>
<div class="value money">¥{{ detailInfo.orderPrices }}</div>
</div>
</div>
</div>
</div>
......@@ -66,7 +70,7 @@ export default {
mixins: [orderMixin],
data() {
return {
params:{},
params: {},
eventBus: new Vue(),
detailInfo: {},
detailInfoObj: [
......@@ -170,7 +174,7 @@ export default {
}
}
]
},
}
}
},
mounted() {
......@@ -212,19 +216,31 @@ export default {
}
</script>
<style src="@a/css/tao.css"></style>
<style >
<style lang="scss" scoped>
.price-box {
margin-left: 800px;
margin-top: 10px;
margin-top: 16px;
margin-right: 52px;
float: right;
}
.price-item {
width: 200px;
font-size: 14px;
font-weight: 400;
color: #333333;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.price-item .label {
width: 100px;
justify-content: space-between;
margin-bottom: 14px;
.label {
width: 80px;
text-align: right;
}
.money {
color: #eb4e4e;
}
}
.goods {
display: flex;
}
......@@ -236,4 +252,64 @@ export default {
.goods-info {
width: calc(100% - 110px);
}
.layout {
background-color: #fff;
margin: 0 20px 0 40px;
width: auto;
.topBox {
padding-top: 32px !important;
}
.box {
position: relative;
padding-top: 20px;
padding-left: 52px;
box-shadow: none;
.top-grid-item {
.item {
font-size: 14px;
font-weight: 400;
color: #333333;
margin-left: -30px;
.label {
// width: 71px;
text-align: right;
}
}
}
.grid-item {
.item,
.grid-btn {
font-size: 14px;
font-weight: 400;
color: #333333;
}
}
.backBtn {
position: absolute;
right: 20px;
top: 20px;
}
.grayRow {
position: absolute;
top: 18px;
left: 0;
width: 100%;
background-color: #f4f6fc;
z-index: 0;
height: 54px;
}
.sub-title {
position: relative;
z-index: 1;
margin-bottom: 40px !important;
font-size: 14px;
font-weight: 500;
color: #333333;
}
.tableWrap{
margin-left: -32px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="container">
<!-- <div class="container">
<div class="box">
<div class="layout">
<div class="search-box">
......@@ -61,6 +61,63 @@
</div>
</div>
</div>
</div> -->
<div class="equity-wrap">
<div class="equity-wrap contain">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row style="display: flex; align-items: center">
<el-form-item size="small" label="订单编号">
<el-input size="small" v-model="searchForm.orderCode" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item size="small" label="品牌名称">
<el-select size="small" v-model="searchForm.brandName" filterable placeholder="请选择" >
<el-option v-for="item in brandList" :key="item.brandId" :label="item.brandName" :value="item.brandName"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="商品名称">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small" ></el-input>
</el-form-item>
</el-row>
<el-row >
<el-form-item size="small" label="门店名称">
<el-input v-model="searchForm.merchantName" placeholder="请输入" size="small" ></el-input>
</el-form-item>
<el-form-item size="small" label="用户信息">
<el-input v-model="searchForm.userInfo" placeholder="请输入" size="small" ></el-input>
</el-form-item>
<el-form-item size="small" label="下单时间">
<el-date-picker size="small" v-model="searchForm.daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable v-if="flag" ref="table" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams"
:getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="goodsMsg" slot-scope="scope">
<div>订单编号:{{scope.scope.orderCode}}</div>
<div>{{scope.scope.brandName}}</div>
<div>{{scope.scope.appearance == 2 ? scope.scope.productName + scope.scope.denomination : scope.scope.productName}}</div>
</span>
<span slot="priceAmount" slot-scope="scope">
<div>{{scope.scope.salePrices}}元</div>
<div>{{scope.scope.goodsQuality}}张</div>
<div></div>
</span>
<span slot="userInfo" slot-scope="scope">
<div>{{scope.scope.accountName}}</div>
<div>{{scope.scope.mobile}}</div>
</span>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="jump(scope.scope, 'order')">查看详情</el-button>
</span>
</GLTable>
</div>
</div>
</template>
......@@ -71,8 +128,17 @@ export default {
mixins: [orderMixin, searchMixin],
data() {
return {
size: 'small',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
},
tabIndex: '',
flag: true,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchForm:{},
searchFormTable: {},
tableParams: {
listName: 'list',
getListApi: this.$apis.orderApi.getOrderList,
......@@ -80,35 +146,42 @@ export default {
tableColumns: [
{
label: '商品信息',
minWidth: '300',
width: '280',
align: 'left',
formatter(cell) {
let str = cell.appearance == 2 ? `<div>${cell.productName}${cell.denomination}</div>` : `<div>${cell.productName}</div>`
return `<div>订单编号:${cell.orderCode}</div><div>${cell.brandName}</div>${str}`
}
addHtml:'goodsMsg',
// formatter: (cell) => {
// let str = cell.appearance == 2 ? `${cell.productName}${cell.denomination}` : `${cell.productName}`
// return `订单编号:${cell.orderCode}
// ${cell.brandName}
// ${str}`
// }
},
{
label: '订单门店',
minWidth: '200',
formatter(cell) {
return cell.merchantName || ''
}
prop:'merchantName',
minWidth: '180',
// formatter(cell) {
// return cell.merchantName || ''
// }
},
{
label: '价格/数量',
minWidth: '200',
formatter(cell) {
return `${cell.salePrices}元\n${cell.goodsQuality}张`
}
addHtml:'priceAmount',
// width: '100',
// formatter(cell) {
// return `${cell.salePrices}元
// ${cell.goodsQuality}张`
// }
},
{
label: '实收金额',
prop: 'orderPrices',
minWidth: '200'
// width: '100'
},
{
label: '订单状态',
minWidth: '200',
// width: '100',
formatter: cell => {
return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus]
}
......@@ -116,8 +189,8 @@ export default {
{
label: '下单时间',
prop: 'validitDate',
minWidth: '200',
sortable: true,
width: '100',
// sortable: true,
formatter(cell) {
return cell.orderDate ? new Date(cell.orderDate).format('yyyy-MM-dd hh:mm:ss') : '- -'
}
......@@ -125,61 +198,110 @@ export default {
{
label: '用户信息',
minWidth: '200',
formatter(cell) {
return `${cell.accountName || ''}\n${cell.mobile || ''}`
}
addHtml:'userInfo'
// formatter(cell) {
// return `${cell.accountName || ''}
// ${cell.mobile || ''}`
// }
}
]
}
}
},
mounted() {},
methods: {}
methods: {
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.orderDateStart = this.searchForm.daterange[0] + ' 00:00:00'
this.searchFormTable.orderDateEnd = this.searchForm.daterange[1] + ' 23:59:59'
} else {
if (this.searchFormTable.orderDateStart) delete this.searchFormTable.orderDateStart && delete this.searchFormTable.orderDateEnd
}
delete this.searchFormTable.daterange
resolve()
})
},
setTableFinishFun() {
// 接收到的数据为空
if (!this.$refs.table.data.length) {
this.$refs.table.setTableHeightFun()
}
},
handleReset() {
this.flag = false
this.searchForm = {}
this.$nextTick(() => {
this.flag = true
})
},
handleSearch() {
this.$refs.table.refreshTable()
},
}
}
// <style src="@a/css/tao.css"></style>
</script>
<style src="@a/css/tao.css"></style>
<style >
.el-tabs__nav-wrap:after {
display: none;
}
.container {
width: 1160px;
height: 100%;
background: #f4f5fa;
padding: 0 20px 20px 40px;
position: absolute;
-webkit-box-sizing: border-box;
box-sizing: border-box;
top: 0;
left: 0;
overflow-y: auto;
}
.box {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
background: #fff;
padding: 20px;
<style lang="scss" scoped>
.el-form-item {
margin-bottom: 15px;
}
.formItem {
width: 190px;
.el-range-editor.is-active,
.el-range-editor.is-active:hover {
border-color: #5850ff;
width: 215px;
}
.table-box {
margin-top: 20px;
.el-range-editor--small.el-input__inner {
width: 215px;
}
.layout .search-box .top .item {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
font-size: 14px;
margin: 0 68px 30px 0;
/deep/ .contain .el-input--small .el-input__inner {
width: 215px;
}
// .el-tabs__nav-wrap:after {
// display: none;
// }
// .container {
// width: 1160px;
// height: 100%;
// background: #f4f5fa;
// padding: 0 20px 20px 40px;
// position: absolute;
// -webkit-box-sizing: border-box;
// box-sizing: border-box;
// top: 0;
// left: 0;
// overflow-y: auto;
// }
// .box {
// margin: 0;
// padding: 0;
// border: 0;
// outline: 0;
// font-size: 100%;
// vertical-align: baseline;
// background: transparent;
// background: #fff;
// padding: 20px;
// }
// .formItem {
// width: 190px;
// }
// .table-box {
// margin-top: 20px;
// }
// .layout .search-box .top .item {
// display: -webkit-box;
// display: -ms-flexbox;
// display: flex;
// -webkit-box-align: center;
// -ms-flex-align: center;
// align-items: center;
// font-size: 14px;
// margin: 0 68px 30px 0;
// }
</style>
\ No newline at end of file
......@@ -226,7 +226,7 @@ export default {
}
.grayRow{
position: absolute;
top: 0;
top: 0px;
left: 0;
width: 100%;
background-color: #F4F6FC;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!