Commit 27d217f6 by 前端

代码提交

1 parent c42f4cf3
{ {
"name": "purchase", "name": "ordermanage",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
...@@ -11253,6 +11253,11 @@ ...@@ -11253,6 +11253,11 @@
"integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
"dev": true "dev": true
}, },
"rfdc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz",
"integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA=="
},
"rgb-regex": { "rgb-regex": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz",
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^2.0.8", "glsx-common": "^2.0.8",
"glsx-components": "^1.2.5", "glsx-components": "^1.2.5",
"rfdc": "^1.3.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuex": "^3.1.2" "vuex": "^3.1.2"
......
import { http } from '@/main'
const path = 'dj.api.'
const path2 = 'dj.api.smartcarlife.'
// 获取有关联关系的4s店列表
const listShop4sByRef = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}scenemerchantref.listShop4sByRef`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 根据4S店商户号查询二级流量方
const getDiversionMerchantRef = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path2}diversionMerchant.getDiversionMerchantRef`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { listShop4sByRef, getDiversionMerchantRef }
import { http } from '@/main'
const path = 'dj.api.smartcarlife.'
const path2 = 'scrm.api.shopmall.'
const getList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}ordermanage.page`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
const getOrderDetail = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}advanceOrder.detail`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
const getOrderCount = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}ordermanage.count`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 众筹活动订单查询列表
const shopmallOrderList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}shopmallOrder.pageList`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 订单详情
const goodsOrderDetail = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}goodsOrder.detail`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//根据园区店商户号获取4s列表
const getServiceStore = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.scenemerchantref.query4SRefByYqShop`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//众筹订单列表
// const getListApi = params => {
// params.method = `${path2}order.noSessionPage`
// params.routerMethod = `${path2}order.noSessionPage`
// return http({
// url: 'rop-scrm-boutiquecoupon/router',
// method: 'POST',
// data: params,
// sign: true
// })
// }
const getListApi = params => {
params.method = `${path2}order.noSessionPage`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getList, getOrderDetail, getOrderCount, shopmallOrderList, goodsOrderDetail, getServiceStore, getListApi }
import { http } from '@/main'
// const path = 'dj.api.smartcarlife.'
const path2 = 'dj.api.'
/** 获取园区店列表 - 园区店 */
const getParkStore = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.smartcarlife.api.yqMerchant.list`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
/** 获取园区店列表 - 流量来源 */
const getServiceStore = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path2}servicemerchantref.list`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取渠道列表
const getChannelType = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path2}channel.type.list`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getParkStore, getServiceStore, getChannelType }
// 新值,旧值,整数部分位数,小数部分位数,最小值,最大值,规则 // 订单状态
function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, maxValue, regRule) { export const orderStatusList = [
/* eslint-disable */
var reg = {
priceReg: /^\d[\d\.]*$/,
numReg: /^[1-9]\d*$/,
zNumReg: /^\d*$/
}
/* eslint-enable */
regRule = regRule || 'priceReg'
if (newValue && ((minValue && newValue < minValue) || (maxValue && newValue > maxValue))) {
return oldValue || ''
}
if (newValue && reg[regRule].test(newValue + '')) {
if (/\./.test(newValue)) {
newValue = newValue + ''
var interger = newValue.split('.')[0]
var point = newValue.split('.')[1]
var intergerNum = interger.length > intergerDigit ? oldValue.split('.')[0] : interger
var pointNum = point.length > pointDigit ? point.slice(0, pointDigit) : point
newValue = pointDigit ? intergerNum + '.' + pointNum : newValue.split('.')[0]
} else {
newValue = newValue.length > intergerDigit ? oldValue.slice(0, intergerDigit) : newValue
if (regRule == 'zNumReg') {
newValue = newValue.split('')[0] == '0' ? '0' : newValue
}
}
return newValue
} else {
return newValue ? oldValue : ''
}
}
const orderManageStatusList = [
{ confId: '1', confName: '未支付' },
{ confId: '2', confName: '已支付' },
{ confId: '3', confName: '已失效' },
{ confId: '4', confName: '已发货' },
{ confId: '5', confName: '已收货' },
{ confId: '6', confName: '待审核' },
{ confId: '7', confName: '审核成功' },
{ confId: '8', confName: '审核失败' },
{ confId: '9', confName: '待确认' },
{ confId: '10', confName: '退款中' },
{ confId: '11', confName: '已退款' },
{ confId: '12', confName: '退款失败' },
{ confId: '13', confName: '待发货' },
{ confId: '14', confName: '待安装' },
{ confId: '15', confName: '已安装' }
]
const orderSourceList = [
{ confId: '1', confName: '商城订单' },
{ confId: '2', confName: '直播订单' },
{ confId: '3', confName: '活动订单' }
]
const deliveryTypeList = [
{ confId: '1', confName: '到店核销' },
{ confId: '2', confName: '快递到家' }
]
//会员中心得状态list
const statusList = [
// {
// confId: '',
// confName: '全部'
// },
{ {
confId: 1, confId: 1,
confName: '生效中' confLabel: '待升级'
}, },
{ {
confId: 2, confId: 2,
confName: '已失效' confLabel: '战败'
}
]
//会员订单类型字典
const orderTypesList = [{
confId: 1,
confName: '套餐'
},
{
confId: 2,
confName: '会员卡'
}
]
const orderStatusList = [
// 2: '待收货',
// 3: '已完成',
// 4: '售后中',
// 5: '退款失败',
// 6: '已经退款',
{
confId: 2,
confName: '待收货'
}, },
{ {
confId: 3, confId: 3,
confName: '已完成' confLabel: '待支付'
}, },
{ {
confId: 4, confId: 4,
confName: '售后中' confLabel: '已支付'
}, },
{ /* {
confId: 5, confId: 5,
confName: '退款失败' confLabel: '已退款'
}, */ {
confId: 6,
confLabel: '已评价'
}, },
{ {
confId: 6, confId: 9,
confName: '已退款' confLabel: '已撤销'
}, },
{
confId: 10,
confLabel: '已关闭'
},
{
confId: 11,
confLabel: '错误订单'
},
{
confId: 12,
confLabel: '已退款'
}
] ]
const serviceStatusList = [{
confId: 1, // 升级状态
confName: '未生效' export const upgradeList = [
{
confId: 'Y',
confLabel: '已升级'
}, },
{ {
confId: 2, confId: 'N',
confName: '生效中' confLabel: '战败'
}, },
{ {
confId: 3, confId: 'R',
confName: '已失效' confLabel: '待升级'
} }
] ]
const memberTypeList = [{ // 施工状态
confId: 1, export const constructionList = [
confName: '正式会员' {
confId: 'Y',
confLabel: '已施工'
}, },
{ {
confId: 2, confId: 'N',
confName: '试用会员' confLabel: '未施工'
} }
] ]
const stateList = [{
confId: 0, // 分账状态
confName: '待上架' export const profitAllocationStatusList = [
{
confId: '1',
confLabel: '未分账'
}, },
{ {
confId: 1, confId: '2',
confName: '在售中' confLabel: '已分账'
}, },
{ {
confId: 2, confId: '4',
confName: '已下架' confLabel: '待分账'
}
]
// 订单来源
export const sourceList = [
{
confId: '1',
confLabel: '小程序订单'
}, },
{
confId: '7',
confLabel: '系统导入'
}
] ]
export { export const payType = {
limitPrice, 1: '微信支付',
orderManageStatusList, 2: '4S店支付',
orderSourceList, 3: 'POS机收款',
deliveryTypeList, 4: '支付宝支付'
statusList, }
serviceStatusList,
memberTypeList, export const businessType = [
stateList, {
orderTypesList, optionId: 1,
orderStatusList optionLabel: '1.2'
},
{
optionId: 2,
optionLabel: '1.3'
},
{
optionId: 3,
optionLabel: '2.0'
}
]
export const orderManageStatusList = [
{ confId: '1', confName: '待付款' },
{ confId: '2', confName: '已支付' },
{ confId: '3', confName: '已失效' },
// { confId: '21', confName: '待收货(待核销)' },
{ confId: '21', confName: '待核销' },
{ confId: '22', confName: '已核销' },
// { confId: '22', confName: '已收货(已核销)' },
{ confId: '6', confName: '待发货' },
// { confId: '7', confName: '待核销' },
// { confId: '8', confName: '已核销' },
{ confId: '9', confName: '售后中' },
{ confId: '10', confName: '售后完成' },
{ confId: '11', confName: '待审批' }
]
export const afterSaleStatusList = [
{ confId: '1', confName: '待审核' },
{ confId: '2', confName: '审核成功' },
{ confId: '3', confName: '审核失败' },
{ confId: '4', confName: '待确认' },
{ confId: '5', confName: '退款中' },
{ confId: '6', confName: '已退款' },
{ confId: '7', confName: '退款失败' }
]
export const orderSourceList = [
{ confId: '1', confName: '商城订单' },
{ confId: '2', confName: '直播订单' },
{ confId: '3', confName: '活动订单' },
{ confId: '4', confName: '众筹订单' }
]
export const deliveryTypeList = [
{ confId: '1', confName: '到店核销' },
{ confId: '2', confName: '快递到家' }
]
function getExplorer() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
browserType = 'IE'
} else if (ua.match(/firefox/) != null) {
browserType = '火狐'
} else if (ua.match(/ubrowser/) != null) {
browserType = 'UC'
} else if (ua.match(/opera/) != null) {
browserType = '欧朋'
} else if (ua.match(/bidubrowser/) != null) {
browserType = '百度'
} else if (ua.match(/metasr/) != null) {
browserType = '搜狗'
} else if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
browserType = 'QQ'
} else if (ua.match(/maxthon/) != null) {
browserType = '遨游'
} else {
browserType = '谷歌'
}
return browserType
}
function exportFn(url) {
let browserType = getExplorer()
if (browserType == 'QQ') {
window.open(url)
return
}
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = url
document.body.appendChild(iframe)
} }
// import Vue from 'vue'
import { Message, MessageBox, Loading } from "element-ui"
// import moment from 'moment'
import dayjs from "dayjs"
let loadingInstance = ""
export const Util = {
/**
* 简单alert
* title 标题
* message 内容
* className 自定义class
* showCancelButton 是否展示取消按钮
* confirmButtonText 确认按钮文案
* cancelButtonText 取消按钮文案
* confirmButtonColor 确认按钮颜色
* cancelButtonColor 取消按钮颜色
*/
msg: function (options) {
MessageBox({
title: options.title || "",
type: options.type || "error",
message: options.message || "",
className: options.className || "",
showCancelButton: options.showCancelButton || false,
confirmButtonText: options.confirmButtonText || "确认",
cancelButtonText: options.cancelButtonText || "取消",
confirmButtonColor: options.confirmButtonColor || "#1989fa",
cancelButtonColor: options.cancelButtonColor || "#000",
dangerouslyUseHTMLString: true,
callback: function (action, done) {
if (action == "confirm") {
if (options.success) {
options.success(done)
}
} else {
console.log(done)
// done()
}
}
})
/* Vue.$vux.alert.show({
title: options.title||'',
content: options.message||'',
onShow() {
options.onShow?(options.onShow)():'';
},
onHide() {
options.onHide?(options.onHide)():'';
}
}) */
},
/**
* 提示框
*/
Info: function (options) {
Message({
message: options.message || "提示",
type: options.type || "error",
duration: options.time || 2000,
onClose: options.onClose || ""
})
},
/**
* 轻提示
*/
Tips: function (options) {
Message({
message: options.message || "提示",
duration: options.duration || 3000,
type: options.type || "text",
icon: options.icon || ""
})
},
/**
* loading
*/
loading: function (message) {
loadingInstance = Loading.service({
text: message || "加载中..."
})
},
/**
* 关闭loading
*/
closeLoading: function () {
loadingInstance.close()
},
/**
* 校验手机号码格式
*/
checkPhone: function (mobile) {
const myreg =
/^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile)
},
/**
* 校验固定电话
*/
validationTel: function (tel) {
const reg = /^0[\d]{2,3}-[\d]{7,8}$/
return reg.test(tel)
},
/**
* 是否特殊字符
*/
isSpecialLetter: function (str) {
const reg = new RegExp(
"[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"
)
return reg.test(str)
},
/**
* 只能输入英文字母和数字,不能输入中文
*/
validationInput: function (str) {
const reg = /[^\w\.\/]/gi // eslint-disable-line
return reg.test(str)
},
/**
* 获取当前时间
*/
getCurrentDate: function () {
const time = new Date()
const y = time.getFullYear()
const m = time.getMonth() + 1
const d = time.getDate()
return {
date: y + "/" + m + "/" + d
}
},
/**
* 获取浏览器参数
*/
getUrlParams: function (name) {
const vars = []
let hash
const oParams = {}
const hashes = window.location.href
.slice(window.location.href.indexOf("?") + 1)
.split("&")
for (let i = 0; i < hashes.length; i++) {
hash = hashes[i].split("=")
vars.push(hash[0])
oParams[hash[0]] = hash[1]
}
console.log(vars)
if (name) {
return oParams[name]
} else {
return oParams
}
},
/**
* 根据当前时间,计算往后30天的日期
*/
getAfterDate: function (day) {
const date1 = new Date()
const date2 = new Date(date1)
let time = 30
if (day) {
time = day
}
date2.setDate(date1.getDate() + time)
const _date =
date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate()
return {
date: _date,
year: date2.getFullYear(),
month: date2.getMonth() + 1,
day: date2.getDate()
}
},
/**
* 日期格式转换
*/
dateFormate: function (str, type) {
let txt = "YYYY-MM-DD"
if (type) {
txt = type
}
const m = dayjs(str).format(txt)
return m
},
/**
* 字段截取
*/
cutStr: function (str, num) {
if (!str) {
return ""
}
let m = 10
let n = str
if (num) {
m = num
}
if (str.length > m) {
n = str.slice(0, m) + "..."
}
return n
},
// /**
// * 深克隆 所有原型链上的对象和属性
// * 例: const bar=deepClone(foo)
// * console.log(bar===foo) false
// * @param {*} obj
// */
deepClone: function (obj) {
const clone = require("rfdc")({ proto: false, circles: false })
return clone(obj)
},
// deepClone: function (obj) {
// // Handle the 3 simple types, and null or undefined or function
// if (obj == null || typeof obj !== "object") return obj
// // Handle Date
// if (obj instanceof Date) {
// const copy = new Date()
// copy.setTime(obj.getTime())
// return copy
// }
// // Handle Array or Object
// if ((obj instanceof Array) | (obj instanceof Object)) {
// const copy = obj instanceof Array ? [] : {}
// for (var attr in obj) {
// // if (Object.prototype.hasOwnProperty.call(attr)) {
// if (obj.hasOwnProperty(attr)) {
// copy[attr] = Util.deepClone(obj[attr])
// // console.log("copy[attr] ", copy[attr])
// }
// }
// return copy
// }
// throw new Error("Unable to clone obj! Its type isn't supported.")
// },
/**
* url下载文件
*
*/
downLoadFile: function (url) {
// console.log(row)
// return
const Temp = document.createElement("a")
// Temp.href = process.env.VUE_APP_BASE_URL + '/article/export.do?articleId=' + row.id
Temp.href = url
// console.log(url)
// console.log(Temp.href)
document.body.append(Temp)
Temp.click()
document.body.removeChild(Temp)
},
/**
* @param {Object} json
* @param {Object} type: 默认不传 ==>全部小写;传1 ==>全部大写;传2 ==>首字母大写
* 将json的key值进行大小写转换
*/
jsonKeysToCase: function (json, type) {
if (typeof json == "object") {
var tempJson = JSON.parse(JSON.stringify(json))
toCase(tempJson)
return tempJson
} else {
return json
}
function toCase(json) {
if (typeof json == "object") {
if (Array.isArray(json)) {
json.forEach(function (item) {
toCase(item)
})
} else {
for (var key in json) {
var item = json[key]
if (typeof item == "object") {
toCase(item)
}
delete json[key]
switch (type) {
case 1:
// key值全部大写
json[key.toLocaleUpperCase()] = item
break
case 2:
// key值首字母大写,其余小写
json[
key.substring(0, 1).toLocaleUpperCase() +
key.substring(1).toLocaleLowerCase()
] = item
break
default:
// 默认key值全部小写
json[key.toLocaleLowerCase()] = item
break
}
}
}
}
}
},
// 判断字段为空时显示
fieldShow: function (field, show) {
return field || show
},
// 整数补零显示两位小数
returnFloat: function (num) {
num = num.toString()
if (num.indexOf(".") != -1) {
let newVal = num.split(".")
if (newVal[1].length == 1) {
newVal = newVal.join(".")
newVal += "0"
num = newVal
}
} else {
num += ".00"
}
return num
}
}
export const showModal = Util.msg
export const showToast = Util.Info
export const showLoading = Util.loading
export const hideLoading = Util.closeLoading
export const deepClone = Util.deepClone
export const downLoadFile = Util.downLoadFile
export const returnFloat = Util.returnFloat
...@@ -8,6 +8,16 @@ const staticRoutes = Object.freeze([ ...@@ -8,6 +8,16 @@ const staticRoutes = Object.freeze([
path: '/orderManage/index', path: '/orderManage/index',
component: resolve => require([`@/views/orderManage/index.vue`], resolve), component: resolve => require([`@/views/orderManage/index.vue`], resolve),
meta: {} meta: {}
},
//精品升级订单详情
{
name: 'orderDetail',
path: '/orderManage/orderDetail',
component: resolve => require([`@/views/orderManage/orderDetail.vue`], resolve),
meta: {}
} }
]) ])
export default staticRoutes export default staticRoutes
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<GLTabs v-model="activeName" <GLTabs v-model="activeName"
:tabPaneList="tabPaneList" :tabPaneList="tabPaneList"
@tab-click="handleClick"></GLTabs> @tab-click="handleClick"></GLTabs>
<components :is="tabName"></components>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<!-- <div class="container"> <!-- <div class="container">
<GLCombiForm ref="showSearch" <GLCombiForm ref="showSearch"
...@@ -56,9 +57,12 @@ ...@@ -56,9 +57,12 @@
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { dateFormat } from '../../utils/index' import { dateFormat } from '../../utils/index'
import Order from "./components/order.vue"
import Crowdfunding from "./components/crowdfunding.vue"
export default { export default {
components: { components: {
Order,
Crowdfunding
}, },
data() { data() {
return { return {
...@@ -484,10 +488,12 @@ export default { ...@@ -484,10 +488,12 @@ export default {
handleClick() { handleClick() {
let arr = { let arr = {
1: "order", 1: "order",
2: "crowd-funding", 2: "crowdfunding",
3: "carDamage" 3: "carDamage"
} }
this.tabName = arr[+this.activeName] this.tabName = arr[+this.activeName]
console.log('this.tabName', this.tabName);
}, },
handleReset() { handleReset() {
this.tableSearchForm = {} this.tableSearchForm = {}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!