Commit 0fad7280 by zhangquan

联调

1 parent 79f56e26
import { http } from '@/main'
import { http, http_common } from '@/main'
const defaultPath = 'scrm.api.live.'
......@@ -44,7 +44,7 @@ const getZoneList = params => {
}
const pictureUpload = params => {
params.method = 'glsx.accounts.biz.common.pictureUpload'
return http({
return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
......
import { http } from '@/main'
const defaultPath = 'scrm.api.equity.order.config.'
const url = 'rop-scrm-equity/router'
const getListApi = params => {
params.method = `${defaultPath}page`
return http({
url,
method: 'POST',
data: params
})
}
const importDateApi = params => {
params.method = `${defaultPath}import`
return http({
url,
method: 'POST',
data: params
})
}
const getDetailApi = params => {
params.method = `${defaultPath}detail`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const exportDataApi = params => {
params.method = `${defaultPath}fail.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getListApi,
importDateApi,
getDetailApi,
exportDataApi
}
......@@ -19,3 +19,4 @@ start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http_brand = params => Vue.prototype.$http_brand(params)
export const http_common = params => Vue.prototype.$http_common(params)
import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton, GLTable , GLCombiForm, GLTableButton,GLDialog} from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton, GLTable, GLCombiForm, GLTableButton, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
......@@ -9,9 +9,12 @@ import 'glsx-components/dist/glsx-components.css'
let routes = []
let router = null
let instance = null
Vue.use(GLTable).use(GLCombiForm).use(GLTableButton).use(GLDialog)
Vue.use(GLTable)
.use(GLCombiForm)
.use(GLTableButton)
.use(GLDialog)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
let { response, request, request_brand, sign, secret } = await fetchConfig(common)
let { response, request, request_common, request_brand, sign, sign_common, secret } = await fetchConfig(common)
// request.baseURL = 'https://scrm.dev.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.dev.glsx.com.cn'
// globalState.session.token = 'scrm-base-6358b874-c112-4753-ac00-ec0cce769751-rop'
......@@ -26,6 +29,7 @@ export async function bootstrap({ history, common, messenger, globalState, route
// // Vue.prototype.$defaultStartDate = '2021-07-01'
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, headers: { TGT: globalState.session.token } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-811305a2-49a3-4e8a-b6dc-fb925c65c95c-rop' } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-811305a2-49a3-4e8a-b6dc-fb925c65c95c-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: '781f08c5-c443-46fd-80e1-f98d94673a73' } })
......
export const taskStutas = {
0: {
label: '待执行',
color: '#C6C6C6'
},
1: {
label: '部分成功',
color: '#FDB757'
},
2: {
label: '全部成功',
color: '#2CCA74'
}
}
export const shlftStutas = {
0: {
label: '待执行',
color: '#C6C6C6'
},
1: {
label: '部分上架',
color: '#FDB757'
},
2: {
label: '全部上架',
color: '#2CCA74'
}
}
<template>
<div class="container">
<div class="global-title">任务详情</div>
<div class="main">
<GLTable :pageSizes="pageSizes" ref="tableRef" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :getListApi="getListApi"></GLTable>
</div>
</div>
</template>
<script>
import util from '@/util/util'
export default {
name: 'index',
data() {
return {
size: 'small',
getListApi: this.$apis.task.getDetailApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
pageSizes: [10, 20, 30, 40, 50],
searchForm: {},
tableParams: {
listName: 'list',
tableOption: null,
tableColumns: [
{
label: '门店名称',
prop: 'merchantName'
},
{
label: '门店ID',
prop: 'merchantId'
},
{
label: '产品编号',
prop: 'skuCode'
},
{
label: '产品名称',
prop: 'skuName'
},
{
label: '数量',
prop: 'orderCount'
},
{
label: '单价(元)',
prop: 'unitPrice'
},
{
label: '商品状态',
prop: 'createdDate'
},
{
label: '商品状态描述',
prop: 'failReason'
},
{
label: '任务状态',
prop: 'updatedBy'
},
{
label: '任务状态描述',
prop: 'taskFailReason'
}
]
}
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = { id: this.$route.params.id }
resolve()
})
}
}
}
</script>
<style lang="scss" scoped>
.container {
background-color: #fff;
.main {
padding: 20px;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!