Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 59aef07d
authored
Jun 17, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
768080ea
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
95 additions
and
54 deletions
src/api/sign.js
src/components/d2-form/relateProDialog.vue
src/components/d2-table/TableHeadSearch.vue
src/components/d2-table/index.vue
src/views/customer/customerList.vue
src/views/goods/coupons/couponsDetail.vue
src/views/goods/coupons/index.vue
src/views/goods/coupons/storeList.vue
src/views/orderManage/orderDetail.vue
src/api/sign.js
View file @
59aef07
...
...
@@ -2,18 +2,23 @@
* @Author: limin
* @Date: 2019-08-26 18:02:49
* @Last Modified by: chenwq
* @Last Modified time: 202
0-11-27 22:22:25
* @Last Modified time: 202
1-06-16 14:19:46
*/
import
sha1
from
'sha1'
import
qs
from
'qs'
const
secret
=
window
.
location
.
href
.
includes
(
'dj.glsx.com.cn'
)
?
'4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const
sign
=
(
params
,
noSignAttr
=
[])
=>
{
delete
params
.
sign
var
objStr
=
qs
.
stringify
(
_
.
cloneDeep
(
params
),
{
arrayFormat
:
'indices'
,
encode
:
false
,
allowDots
:
true
})
var
objStr
=
qs
.
stringify
(
_
.
cloneDeep
(
params
),
{
arrayFormat
:
'indices'
,
allowDots
:
true
,
encodeValuesOnly
:
true
})
var
objVal
=
objStr
.
split
(
'&'
)
var
realObj
=
{}
objVal
.
forEach
(
item
=>
{
realObj
[
item
.
split
(
'='
)[
0
]]
=
item
.
split
(
'='
)[
1
]
const
idx
=
item
.
indexOf
(
'='
)
realObj
[
item
.
split
(
'='
)[
0
]]
=
decodeURIComponent
(
item
.
slice
(
idx
+
1
))
})
const
keys
=
Object
.
keys
(
realObj
).
sort
()
var
str
=
[]
...
...
src/components/d2-form/relateProDialog.vue
View file @
59aef07
...
...
@@ -209,6 +209,7 @@ export default {
var
targetItem
=
this
.
proList
.
find
(
item
=>
item
.
goodsCode
===
value
)
this
.
proInfo
.
goodsName
=
targetItem
.
goodsName
this
.
proInfo
.
goodsCode
=
targetItem
.
goodsCode
this
.
proInfo
.
sapCode
=
targetItem
.
sapCode
this
.
proInfo
.
thumbUrl
=
targetItem
.
thumbUrl
this
.
proInfo
.
goodsTypeName
=
targetItem
.
goodsTypeName
},
...
...
src/components/d2-table/TableHeadSearch.vue
View file @
59aef07
...
...
@@ -24,7 +24,7 @@
@
change=
"handleCheckedChange"
>
<el-checkbox
v-for=
"item in
optionList
"
v-for=
"item in
baseData[optionConfig.searchItemName]
"
:label=
"item[optionConfig.optionId]"
:key=
"item[optionConfig.optionId]"
@
change=
"handleCheckedChange"
...
...
@@ -64,9 +64,14 @@ export default {
default
:
()
=>
{
}
},
// 多选列表
optionList
:
{
type
:
Array
,
default
:
()
=>
[]
// optionList: {
// type: Array,
// default: () => []
// },
// 多选列表Obj
baseData
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
...
...
@@ -79,12 +84,12 @@ export default {
handleCheckedChange
(
value
)
{
const
checkedCount
=
value
.
length
this
.
checkAll
=
checkedCount
===
this
.
optionList
.
length
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
optionList
.
length
this
.
checkAll
=
checkedCount
===
this
.
baseData
[
this
.
optionConfig
.
searchItemName
]
.
length
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
baseData
[
this
.
optionConfig
.
searchItemName
]
.
length
},
handleCheckAllChange
(
val
)
{
this
.
checkedList
=
val
?
this
.
optionList
.
map
(
item
=>
item
[
this
.
optionConfig
.
optionId
])
:
[]
this
.
checkedList
=
val
?
this
.
baseData
[
this
.
optionConfig
.
searchItemName
]
.
map
(
item
=>
item
[
this
.
optionConfig
.
optionId
])
:
[]
this
.
isIndeterminate
=
false
},
...
...
src/components/d2-table/index.vue
View file @
59aef07
...
...
@@ -40,10 +40,10 @@
<template
slot=
"header"
>
<span>
{{
item
.
label
}}
</span>
<table-head-search
v-
if=
"item.optionList
"
:searchForm=
"
s
earchForm"
v-
show=
"item.optionConfig
"
:searchForm=
"
headS
earchForm"
:optionConfig=
"item.optionConfig"
:
optionList=
"item.optionList
"
:
baseData=
"baseData
"
@
handleTableHeadChange=
"handleTableHeadChange"
></table-head-search>
</
template
>
...
...
@@ -146,6 +146,17 @@ export default {
type
:
Object
,
default
:
()
=>
{
}
},
// 表格头部搜索条件 - start
headSearchForm
:
{
type
:
Object
,
default
:
()
=>
{
}
},
// 选项列表Obj
baseData
:
{
type
:
Object
,
default
:
()
=>
{}
},
// 表格头部搜索条件 - end
// 表格数据-外部传入
tableData
:
{
type
:
Array
,
...
...
src/views/customer/customerList.vue
View file @
59aef07
...
...
@@ -83,16 +83,16 @@
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
!
scope
.
row
.
firstOrderPay
?
''
:
(
!
scope
.
row
.
firstOrderPay
.
successDate
?
''
:
new
Date
(
scope
.
row
.
firstO
rderPay
.
successDate
).
toLocaleDateString
())
}}
</span>
<span>
{{
!
scope
.
row
.
orderPay
?
''
:
(
!
scope
.
row
.
orderPay
.
successDate
?
''
:
new
Date
(
scope
.
row
.
o
rderPay
.
successDate
).
toLocaleDateString
())
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"备注信息"
align=
"center"
prop=
"
firstO
rder.remark"
prop=
"
o
rder.remark"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
firstOrder
?
'无'
:
(
scope
.
row
.
firstOrder
.
remark
||
'无'
)
}}
</span>
<span>
{{
scope
.
row
.
order
?
(
scope
.
row
.
order
.
upgradeFlag
===
'N'
?
(
scope
.
row
.
order
.
customer
?
(
scope
.
row
.
order
.
customer
.
refusalReason
||
'无'
)
:
'无'
)
:
(
scope
.
row
.
order
.
remark
||
'无'
))
:
'无'
}}
</span>
</
template
>
</el-table-column>
</el-table-column>
...
...
@@ -107,7 +107,11 @@
label=
"推荐人"
align=
"center"
prop=
"employeeName"
></el-table-column>
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
order
?
scope
.
row
.
order
.
employeeName
:
''
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"园区店"
align=
"center"
...
...
@@ -117,7 +121,7 @@
<el-table-column
label=
"转化专员"
align=
"center"
prop=
"
firstO
rder.sellerName"
prop=
"
o
rder.sellerName"
></el-table-column>
</el-table-column>
<el-table-column
...
...
@@ -133,7 +137,7 @@
prop=
"source"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
source
===
3
?
'现场升级'
:
(
scope
.
row
.
source
===
5
?
'核销抵扣'
:
'系统录入'
)
}}
</span>
<span>
{{
scope
.
row
.
order
?
(
scope
.
row
.
order
.
source
===
3
?
'现场升级'
:
(
scope
.
row
.
order
.
source
===
5
?
'核销抵扣'
:
'系统录入'
)):
(
scope
.
row
.
source
===
3
?
'现场升级'
:
(
scope
.
row
.
source
===
5
?
'核销抵扣'
:
'系统录入'
)
)
}}
</span>
</
template
>
</el-table-column>
</el-table>
...
...
src/views/goods/coupons/couponsDetail.vue
View file @
59aef07
...
...
@@ -4,8 +4,10 @@
<d2-table
ref=
"couponsDetailTable"
:hasNum=
"false"
:baseData=
"baseData"
:sortObj=
"sortObj"
:searchForm=
"searchForm"
:searchForm=
"searchFormSearch"
:headSearchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
...
...
@@ -14,7 +16,7 @@
<span
slot=
"couponName"
slot-scope=
"scope"
>
{{
scope
.
scope
.
couponName
}}
(
{{
scope
.
scope
.
customerCouponCode
}}
)
</span></d2-table>
>
{{
scope
.
scope
.
couponName
}}
{{
scope
.
scope
.
customerCouponCode
}}
</span></d2-table>
</div>
</
template
>
...
...
@@ -73,8 +75,8 @@ export default {
searchItemName
:
'employeeNameList'
,
optionId
:
'confId'
,
optionLabel
:
'confValue'
}
,
optionList
:
[]
}
//
optionList: []
},
{
label
:
'核销状态'
,
prop
:
'usedFlag'
,
...
...
@@ -89,8 +91,8 @@ export default {
searchItemName
:
'usedFlagList'
,
optionId
:
'confId'
,
optionLabel
:
'confValue'
}
,
optionList
:
[{
confValue
:
'待核销'
,
confId
:
'N'
},
{
confValue
:
'已核销'
,
confId
:
'Y'
}]
}
//
optionList: [{ confValue: '待核销', confId: 'N' }, { confValue: '已核销', confId: 'Y' }]
},
{
label
:
'核销人'
,
prop
:
'sellerName'
,
...
...
@@ -98,8 +100,8 @@ export default {
searchItemName
:
'sellerNameList'
,
optionId
:
'confId'
,
optionLabel
:
'confValue'
}
,
optionList
:
[]
}
//
optionList: []
},
{
label
:
'核销时间'
,
prop
:
'usedTime'
,
...
...
@@ -109,6 +111,12 @@ export default {
return
cellValue
.
usedTime
?
Util
.
dateFormate
(
cellValue
.
usedTime
,
'YYYY-MM-DD HH:mm:ss'
)
:
''
}
}]
},
// 基本数据
baseData
:
{
employeeNameList
:
[],
sellerNameList
:
[],
usedFlagList
:
[{
confValue
:
'待核销'
,
confId
:
'N'
},
{
confValue
:
'已核销'
,
confId
:
'Y'
}]
}
}
},
...
...
@@ -121,13 +129,13 @@ export default {
},
mounted
()
{
this
.
getDistinctColumList
(
1
,
'employeeName'
)
this
.
getDistinctColumList
(
2
,
'sellerName'
)
this
.
getDistinctColumList
(
1
,
'employeeName
List
'
)
this
.
getDistinctColumList
(
2
,
'sellerName
List
'
)
},
methods
:
{
// columType属性类型(1:发券人;2:转化人)
getDistinctColumList
(
columType
,
tableColumnsProp
)
{
getDistinctColumList
(
columType
,
listName
)
{
getDistinctColum
({
columType
:
columType
,
currentPage
:
1
,
pageSize
:
100
}).
then
(
res
=>
{
var
tempArr
=
[]
res
.
forEach
(
item
=>
{
...
...
@@ -136,7 +144,8 @@ export default {
confValue
:
item
})
})
this
.
tableParams
.
tableColumns
[
this
.
findFormIdx
(
tableColumnsProp
)].
optionList
=
tempArr
this
.
baseData
[
listName
]
=
tempArr
// this.tableParams.tableColumns[this.findFormIdx(tableColumnsProp)].optionList = tempArr
})
},
// 找到在formList的位置,通过name来匹配
...
...
@@ -146,14 +155,13 @@ export default {
// 表格头部搜索-改变
handleTableHeadChange
({
searchItemName
,
checkedList
})
{
this
.
searchForm
[
searchItemName
]
=
_
.
cloneDeep
(
checkedList
)
this
.
keyDowmGetList
()
},
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
searchFormSearch
=
{
condition
:
{
...
this
.
parentSearchForm
,
...
this
.
searchForm
}
...
this
.
parentSearchForm
,
...
this
.
searchForm
}
resolve
()
})
...
...
src/views/goods/coupons/index.vue
View file @
59aef07
...
...
@@ -105,7 +105,7 @@ export default {
methods
:
{
handleSearch
()
{
console
.
log
(
this
.
activeName
)
//
console.log(this.activeName)
this
.
$refs
[
this
.
activeName
].
keyDowmGetList
()
},
...
...
src/views/goods/coupons/storeList.vue
View file @
59aef07
...
...
@@ -4,8 +4,10 @@
<d2-table
ref=
"couponsTable"
:hasNum=
"false"
:baseData=
"baseData"
:sortObj=
"sortObj"
:searchForm=
"searchForm"
:searchForm=
"searchFormSearch"
:headSearchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
...
...
@@ -85,8 +87,8 @@ export default {
searchItemName
:
'couponTypeList'
,
optionId
:
'goodsType'
,
optionLabel
:
'goodsTypeName'
}
,
optionList
:
[]
}
//
optionList: []
},
{
label
:
'区域'
,
parentProp
:
'yqMerchantInfo'
,
...
...
@@ -95,8 +97,8 @@ export default {
searchItemName
:
'regionList'
,
optionId
:
'confKey'
,
optionLabel
:
'confValue'
}
,
optionList
:
[]
}
//
optionList: []
},
{
label
:
'门店名称'
,
prop
:
'merchantName'
...
...
@@ -127,7 +129,7 @@ export default {
optionId
:
'confId'
,
optionLabel
:
'confLabel'
},
optionList
:
[{
confLabel
:
'启用'
,
confId
:
'Y'
},
{
confLabel
:
'停用'
,
confId
:
'N'
}],
//
optionList: [{ confLabel: '启用', confId: 'Y' }, { confLabel: '停用', confId: 'N' }],
formatter
:
cellValue
=>
{
return
{
'Y'
:
'启用'
,
...
...
@@ -138,7 +140,10 @@ export default {
},
// 基本数据
baseData
:
{
productTypeList
:
[]
productTypeList
:
[],
couponTypeList
:
[],
regionList
:
[],
enabledFlagList
:
[{
confLabel
:
'启用'
,
confId
:
'Y'
},
{
confLabel
:
'停用'
,
confId
:
'N'
}]
}
}
},
...
...
@@ -164,12 +169,15 @@ export default {
get
:
'd2admin/base/get'
}),
async
getBaseData
()
{
this
.
tableParams
.
tableColumns
[
this
.
findFormIdx
(
'couponTypeName'
)].
optionList
=
_
.
cloneDeep
(
await
this
.
get
(
BaseData
.
productType
))
// this.tableParams.tableColumns[this.findFormIdx('couponTypeName')].optionList = _.cloneDeep(await this.get(BaseData.productType))
this
.
baseData
.
couponTypeList
=
_
.
cloneDeep
(
await
this
.
get
(
BaseData
.
productType
))
this
.
$nextTick
()
},
getCommonConfig
()
{
commonConfigApi
({
confGroup
:
'MERCHANT_REGION'
}).
then
(
res
=>
{
this
.
tableParams
.
tableColumns
[
this
.
findFormIdx
(
'region'
)].
optionList
=
res
// this.tableParams.tableColumns[this.findFormIdx('region')].optionList = res
// console.log(this.tableParams.tableColumns[this.findFormIdx('region')])
this
.
baseData
.
regionList
=
res
this
.
$nextTick
()
})
},
...
...
@@ -181,13 +189,10 @@ export default {
this
.
$refs
.
couponsTable
.
refreshTable
()
},
beforeSearchFn
()
{
console
.
log
(
this
.
parentSearchForm
)
return
new
Promise
(
resolve
=>
{
this
.
searchFormSearch
=
{
condition
:
{
...
this
.
parentSearchForm
,
...
this
.
searchForm
}
...
this
.
parentSearchForm
,
...
this
.
searchForm
}
resolve
()
})
...
...
@@ -196,6 +201,7 @@ export default {
// 表格头部搜索-改变
handleTableHeadChange
({
searchItemName
,
checkedList
})
{
this
.
searchForm
[
searchItemName
]
=
_
.
cloneDeep
(
checkedList
)
this
.
keyDowmGetList
()
},
// 编辑
...
...
src/views/orderManage/orderDetail.vue
View file @
59aef07
...
...
@@ -86,8 +86,8 @@
prop=
"nums"
align=
"center"
label=
"数量(件)"
>
<
template
>
<span>
1
件
</span>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
number
}}
件
</span>
</
template
>
</el-table-column>
<el-table-column
...
...
@@ -189,7 +189,7 @@ export default {
mounted
()
{
this
.
detail
=
this
.
$route
.
params
.
detail
//
console.log(this.detail)
console
.
log
(
this
.
detail
)
},
methods
:
{
...
...
@@ -221,7 +221,8 @@ export default {
}
if
(
index
===
1
)
{
sums
[
index
]
=
this
.
detail
.
subOrderList
.
length
+
'件'
const
numberList
=
this
.
detail
.
subOrderList
.
map
(
item
=>
item
.
number
)
sums
[
index
]
=
(
numberList
.
length
?
numberList
.
reduce
((
preVal
,
curVal
)
=>
{
return
preVal
+
curVal
})
:
'0'
)
+
'件'
return
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment