Commit 696948de by liwk

commit

1 parent 211b1e7f
......@@ -12,6 +12,7 @@ export const orderApi = {
getHwAccount(data = {}) {
return request(data, 'dj.api.get.equity.order.hw.account.balance.get')
},
}
// export const orderApi = {
// /**获取财务管理列表*/
......
......@@ -80,7 +80,7 @@ const getConfig = (url = URL + '/oss_rightsAndInterests') => {
}
/* eslint-disable no-new */
const render = App => {
new Vue({
window.vm = new Vue({
el: '#app',
mixins: [mixin],
render: h => h(App)
......
......@@ -305,7 +305,9 @@ export default {
}
.el-table .cell {
line-height: 14px;
white-space: pre-line;
}
.d2-table p {
margin: 10px 0;
}
......
import orderMixin from './orderMixin'
export {
orderMixin
}
\ No newline at end of file
export default {
data() {
return {
date: '',
searchObj: {},
statusEnum: {
0: '未支付',
1: '已支付',
2: '已发货',
3: '已完成',
4: '售后中',
5: '退款失败',
6: '已退款',
},
channlList: [{
label: '海威',
value: 'HW'
}],
statusList: [{
label: '待收货',
value: [1, 2]
}, {
label: '已完成',
value: [3]
}, {
label: '已退款',
value: [6]
},
{
label: '售后中',
value: [4]
}
],
appereanceList: [{
label: '卡券',
value: 1
}, {
label: '直充',
value: 2
}],
}
},
watch: {
'date' (n, o) {
let [orderDateStart, orderDateEnd] = n
this.searchObj.orderDateStart = orderDateStart ? `${orderDateStart} 00:00:00` : ''
this.searchObj.orderDateEnd = orderDateEnd ? `${orderDateEnd} 23:59:59` : ''
}
},
methods: {
search() {
this.$refs.table.refreshTable()
},
reset() {
this.date = ''
this.searchObj = {}
this.$nextTick(() => {
this.search()
})
},
handleClick({ name }) {
let orderStatus = name ? name.split(',').map(e => Number(e)) : ''
this.searchObj.orderStatus = orderStatus
this.$nextTick(() => {
this.search()
})
}
},
}
\ No newline at end of file
......@@ -131,53 +131,13 @@
<script type='text/ecmascript-6'>
import { orderApi } from '@api/api'
const statusEnum = {
0: '未支付',
1: '已支付',
2: '已发货',
3: '已完成',
4: '售后中',
5: '退款失败',
6: '已退款',
}
import { orderMixin } from '@/mixins'
export default {
name: '',
mixins: [orderMixin],
data () {
return {
date: '',
price: 0,
searchObj: {
},
statusList: [
{
label: '待收货',
value: 2
}, {
label: '已完成',
value: 3
}, {
label: '已退款',
value: 6
},
{
label: '售后中',
value: 4
}],
appereanceList: [
{
label: '卡券',
value: 1
}, {
label: '直充',
value: 2
}
],
channlList: [
{
label: '海威',
value: 'HW'
}
],
tableParams: {
listName: 'list',
showSummary: true,
......@@ -260,7 +220,7 @@ export default {
label: '订单状态',
minWidth: '200',
formatter (cell) {
return statusEnum[cell.orderStatus]
return window.vm.$children[0].statusEnum[cell.orderStatus]
}
},
{
......@@ -278,13 +238,6 @@ export default {
mounted () {
this.getHwAccount()
},
watch: {
'date' (n, o) {
let [orderDateStart, orderDateEnd] = n
this.searchObj.orderDateStart = orderDateStart ? `${orderDateStart} 00:00:00` : ''
this.searchObj.orderDateEnd = orderDateEnd ? `${orderDateEnd} 23:59:59` : ''
}
},
methods: {
getHwAccount () {
orderApi.getHwAccount().then(({ code, data }) => {
......@@ -293,16 +246,7 @@ export default {
}
})
},
search () {
this.$refs.table.refreshTable()
},
reset () {
this.date = ''
this.searchObj = {}
this.$nextTick(() => {
this.search()
})
}
}
}
</script>
......
......@@ -6,7 +6,7 @@
订单编号:
<div class="input">
<el-input
v-model="searchObj.no"
v-model="searchObj.orderCode"
placeholder=""
size="small"
></el-input>
......@@ -16,7 +16,7 @@
品牌名称:
<div class="input">
<el-input
v-model="searchObj.no"
v-model="searchObj.brandName"
placeholder=""
size="small"
></el-input>
......@@ -26,32 +26,32 @@
商品名称:
<div class="input">
<el-input
v-model="searchObj.no"
v-model="searchObj.productName"
placeholder=""
size="small"
></el-input>
</div>
</div>
<div class="item">
<!-- <div class="item">
渠道:
<el-select
v-model="searchObj.status"
v-model="searchObj.channl"
placeholder="请选择"
>
<el-option
v-for="item in statusList"
v-for="item in channlList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
</div> -->
<div class="item">
门店名称:
<div class="input">
<el-input
v-model="searchObj.user"
v-model="searchObj.merchantName"
placeholder=""
size="small"
></el-input>
......@@ -61,7 +61,7 @@
用户信息:
<div class="input">
<el-input
v-model="searchObj.user"
v-model="searchObj.userInfo"
placeholder=""
size="small"
></el-input>
......@@ -70,7 +70,7 @@
<div class="item">
下单时间:
<el-date-picker
v-model="searchObj.date"
v-model="date"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
......@@ -83,8 +83,14 @@
</div>
<div class="bottom">
<el-button-group>
<el-button type="primary">查询</el-button>
<el-button type="default">重置</el-button>
<el-button
type="primary"
@click="search"
>查询</el-button>
<el-button
type="default"
@click="reset"
>重置</el-button>
</el-button-group>
</div>
</div>
......@@ -95,11 +101,11 @@
>
<el-tab-pane
label="全部"
name="1"
name=""
></el-tab-pane>
<el-tab-pane
label="待收货"
name="2"
name="1,2"
></el-tab-pane>
<el-tab-pane
label="已完成"
......@@ -107,13 +113,14 @@
></el-tab-pane>
<el-tab-pane
label="退款丨售后"
name="4"
name="4,6"
></el-tab-pane>
</el-tabs>
<d2-table
ref="table"
:searchForm="searchObj"
:tableParams="tableParams"
:getListApi="listRequisitionMemberCard"
:getListApi="tableParams.getListApi"
:hasNum="false"
>
<span
......@@ -123,7 +130,7 @@
>
<el-button
type="text"
@click="startcollectiondetails(scope.scope)"
@click="jump(scope.scope)"
>查看详情</el-button>
</span>
</d2-table>
......@@ -132,53 +139,52 @@
</template>
<script type='text/ecmascript-6'>
import { orderApi } from '@api/api'
import { orderMixin } from '@/mixins'
export default {
name: '',
mixins: [orderMixin],
data () {
return {
searchObj: {
status: 1
},
tabIndex: '1',
statusList: [{
label: '广汇',
value: 1
}, {
label: '默认渠道',
value: 2
}],
tabIndex: '',
tableParams: {
listName: 'list',
getListApi: orderApi.getOrderList,
tableOption: true,
tableColumns: [
{
label: '商品信息',
prop: 'cardNo',
minWidth: '200'
minWidth: '300',
align: 'left',
formatter (cell) {
return `订单编号:${cell.orderCode}\n${cell.brandName}\n${cell.productName}`
}
},
{
label: '订单渠道',
prop: 'activationCode',
minWidth: '200',
formatter (cell) {
return cell.merchantName || ''
}
},
{
label: '价格/数量',
prop: 'sn',
minWidth: '200',
formatter (cell) {
return `${cell.costPrices}元\n${cell.goodsQuality}张`
}
},
{
label: '实收金额',
prop: 'mobile',
prop: 'orderPrices',
minWidth: '200'
// tagLabel: true
},
{
label: '订单状态',
prop: 'memberName',
minWidth: '200',
formatter: (cellValue) => {
return cellValue.memberCardDefine.memberName
formatter (cell) {
return window.vm.$children[0].statusEnum[cell.orderStatus]
}
},
{
......@@ -186,15 +192,15 @@ export default {
prop: 'validitDate',
minWidth: '200',
sortable: true,
formatter: (cellValue) => {
formatter (cell) {
return cell.orderDate ? new Date(cell.orderDate).format('yyyy-MM-dd hh:mm:ss') : '- -'
}
},
{
label: '用户信息',
prop: 'updatedDate',
minWidth: '200',
formatter: (cellValue) => {
return this.date_format(cellValue.updatedDate)
formatter (cell) {
return `${cell.accountName || ''}\n${cell.mobile || ''}`
}
},
......@@ -206,6 +212,9 @@ export default {
mounted () {
},
methods: {
jump ({ orderCode }) {
window.location.href = `./detail.html?orderCode=${orderCode}`
}
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!