Commit a2c1a242 by cpa

修改商家端订单查询异常

parent 472f5074
...@@ -37,11 +37,9 @@ export const tableOption = { ...@@ -37,11 +37,9 @@ export const tableOption = {
{ {
"type": "input", "type": "input",
"label": "下单用户", "label": "下单用户",
// "prop": "takeName", "prop": "orderUser",
"prop": "realName",
search: true, search: true,
}, },
{ {
"type": "input", "type": "input",
"label": "商品名称", "label": "商品名称",
......
...@@ -28,6 +28,7 @@ axios.interceptors.request.use(config => { ...@@ -28,6 +28,7 @@ axios.interceptors.request.use(config => {
const token = store.getters.access_token const token = store.getters.access_token
if (token && !isToken) { if (token && !isToken) {
config.headers['Authorization'] = 'Bearer ' + token// token config.headers['Authorization'] = 'Bearer ' + token// token
console.log('Authorization'+'Bearer ' + token)
} }
if (TENANT_ID) { if (TENANT_ID) {
config.headers['TENANT-ID'] = TENANT_ID // 租户ID config.headers['TENANT-ID'] = TENANT_ID // 租户ID
......
...@@ -110,11 +110,9 @@ ...@@ -110,11 +110,9 @@
// 列表查询 // 列表查询
getList: function (page, params) { getList: function (page, params) {
this.tableLoading = true this.tableLoading = true
// 1.获取当前登陆用户ID // 1.获取当前登陆用户ID
let userInfo= JSON.parse(sessionStorage.getItem("linshenxs-userInfo")) let userInfo= JSON.parse(sessionStorage.getItem("linshenxs-userInfo"))
let account=userInfo.content.username let account=userInfo.content.username
getMerchantByAccount( getMerchantByAccount(
{account: account} {account: account}
).then(response => { ).then(response => {
......
...@@ -106,6 +106,7 @@ ...@@ -106,6 +106,7 @@
import {fetchList,shipsImmediatelyApi,delObj,cancelOrderApi} from '@/api/mall/merchantMallorder' import {fetchList,shipsImmediatelyApi,delObj,cancelOrderApi} from '@/api/mall/merchantMallorder'
import {tableOption} from '@/const/crud/mall/merchantMallorder' import {tableOption} from '@/const/crud/mall/merchantMallorder'
import {mapGetters} from 'vuex' import {mapGetters} from 'vuex'
import {getMerchantByAccount} from "@/api/mall/merchantMallgoods";
export default { export default {
name: 'businessorder', name: 'businessorder',
data() { data() {
...@@ -254,28 +255,49 @@ ...@@ -254,28 +255,49 @@
,{color: '#0bbd87',content: '快递送至【成都市】物流运转中心', timestamp: '2018-04-11'} ,{color: '#0bbd87',content: '快递送至【成都市】物流运转中心', timestamp: '2018-04-11'}
,{content: '快递送至【成都市】物流运转中心', timestamp: '2018-04-11'}] ,{content: '快递送至【成都市】物流运转中心', timestamp: '2018-04-11'}]
}, },
// 查看详情 // 查看详情
checkTheDetails(row){ checkTheDetails(row){
this.$router.push('/businessOrder/details?id=' + row.orderNo) this.$router.push('/businessOrder/details?id=' + row.orderNo)
}, },
// 列表查询 // 列表查询
getList(page, params) { getList(page, params) {
// 1.获取当前登陆用户ID
let userInfo= JSON.parse(sessionStorage.getItem("linshenxs-userInfo"))
let account=userInfo.content.username
getMerchantByAccount(
{account: account}
).then(response => {
fetchList(Object.assign({
current: page.currentPage,
size: page.pageSize,
// merchantId:response.data.data.id
merchantId:47
this.tableLoading = true }, params, this.searchForm)).then(response => {
if(page.currentPage=1){ this.tableData = response.data.data.records
page.currentPage=0 this.page.total = response.data.data.total
} this.tableLoading = false
fetchList(Object.assign({
current: page.currentPage,
size: page.pageSize
}, params, this.searchForm )).then(response => {
this.tableData = response.data.data.records
this.page.total = response.data.data.total
this.tableLoading = false
}).catch(() => { }).catch(() => {
this.tableLoading=false this.tableLoading = false
}) })
}).catch(() => {
this.tableLoading = false
})
//
// this.tableLoading = true
// if(page.currentPage=1){
// page.currentPage=0
// }
// fetchList(Object.assign({
// current: page.currentPage,
// size: page.pageSize
// }, params, this.searchForm )).then(response => {
// this.tableData = response.data.data.records
// this.page.total = response.data.data.total
// this.tableLoading = false
// }).catch(() => {
// this.tableLoading=false
// })
}, },
// 删除 // 删除
handleDel: function (row, index) { handleDel: function (row, index) {
......
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