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 bbd1dfc8
authored
Jun 13, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
上架凭证 订单延迟分账 批量下架需求开发
1 parent
cc201344
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
325 additions
and
29 deletions
src/api/grounding.js
src/api/order.js
src/api/request.js
src/api/sys.base.js
src/plugin/axios/index.js
src/router/modules/903_productManagement.js
src/views/goods/grounding/components/detail.vue
src/views/goods/grounding/components/groundingForm.vue
src/views/goods/grounding/editGrounding.vue
src/views/goods/grounding/groundingDetail.vue
src/views/goods/grounding/images/PDF_thumbnail.png
src/views/goods/grounding/images/photo_thumbnail.png
src/views/goods/grounding/index.vue
src/views/goods/productManage/components/productForm.vue
src/views/orderManage/carDamage.vue
src/views/orderManage/crowdfundDetail.vue
src/views/orderManage/crowdfunding.vue
src/views/orderManage/order.vue
src/api/grounding.js
View file @
bbd1dfc
...
...
@@ -53,4 +53,10 @@ export function getAllGroupByCategory(data) {
export
function
getAllGoodsList
(
data
)
{
data
.
method
=
`
${
path
}
productManager.search`
return
request
(
data
,
'post'
)
}
// 批量下架
export
function
batchUpdateStatus
(
data
)
{
data
.
method
=
`
${
path
}
merchantGoodsInfo.updateBatchOffShelf`
return
request
(
data
,
'post'
)
}
\ No newline at end of file
src/api/order.js
View file @
bbd1dfc
...
...
@@ -135,3 +135,9 @@ export function getDivisionRecordByOrderCode(data) {
data
.
method
=
`
${
path2
}
getDivisionRecordByOrderCode`
return
request
(
data
,
"post"
)
}
// 取消分账
export
function
cancelDivideAccountsAPI
(
data
)
{
data
.
method
=
`
${
path2
}
order.cancelProfitAllocation`
return
request
(
data
,
"post"
)
}
src/api/request.js
View file @
bbd1dfc
...
...
@@ -10,6 +10,7 @@ import sign from "./sign"
import
RequestMethods
from
"./request.methods"
import
util
from
"@/libs/util.js"
import
{
baseConfig
}
from
"@/main"
import
axiosPackage
from
'axios'
const
request
=
(
params
=
{},
method
=
RequestMethods
.
GET
,
...
...
@@ -71,6 +72,7 @@ const request = (
}
// console.log(signWay[apiName], "baseApiName")
const
secret
=
baseConfig
[
baseApiName
].
secret
const
CancelToken
=
axiosPackage
.
CancelToken
var
reqData
=
method
===
RequestMethods
.
POST
?
{
...
...
@@ -79,6 +81,16 @@ const request = (
}
:
{
params
:
sign
(
params
,
noSignAttr
,
secret
,
signWay
[
apiName
])
}
reqData
=
reqData
=
Object
.
assign
(
reqData
,
options
,
{})
// 请求进度
if
(
params
?.
onProcess
)
{
reqData
.
onUploadProgress
=
params
.
onProcess
}
// 取消请求
if
(
params
?.
cancelFun
)
{
reqData
.
cancelToken
=
new
CancelToken
(
function
excutor
(
c
)
{
params
.
cancelFun
.
cancel
=
c
})
}
// console.log(method === RequestMethods.POST)
// console.log(url)
// console.log(options)
...
...
src/api/sys.base.js
View file @
bbd1dfc
...
...
@@ -90,3 +90,9 @@ export function queryFeeCategoryByType(data) {
data
.
method
=
`
${
path
}
smartcarlife.feeCategory.queryFeeCategoryByType`
return
request
(
data
,
RequestMethods
.
POST
)
}
// pdf上传
export
function
uploadPDF
(
data
)
{
data
.
method
=
`
${
path
}
smartcarlife.common.uploadPdf`
return
request
(
data
,
RequestMethods
.
POST
,
[
"file"
])
}
src/plugin/axios/index.js
View file @
bbd1dfc
...
...
@@ -184,7 +184,7 @@ service.interceptors.response.use(
break
}
}
if
(
error
&&
error
.
stack
.
indexOf
(
"timeout"
)
>
-
1
)
{
if
(
error
&&
error
?.
stack
?
.
indexOf
(
"timeout"
)
>
-
1
)
{
if
(
error
.
stack
.
indexOf
(
"5000ms"
))
{
error
.
message
=
"查询超时,请刷新页面重试!"
}
...
...
@@ -192,7 +192,7 @@ service.interceptors.response.use(
// console.log(error)
}
store
.
commit
(
"d2admin/loading/set"
,
false
)
errorLog
(
error
)
if
(
!
error
.
__CANCEL__
)
errorLog
(
error
)
// 取消请求 不做错误提示
return
Promise
.
reject
(
error
)
}
)
...
...
src/router/modules/903_productManagement.js
View file @
bbd1dfc
...
...
@@ -346,6 +346,14 @@ export const routerName = {
}
]
},
{
authId
:
"9030908"
,
parentId
:
"90309"
,
label
:
"批量下架"
,
category
:
"Button"
,
type
:
"primary"
,
handle
:
"handleBatchOffShelf"
}
],
component
:
_import
(
"goods/grounding/index"
)
},
...
...
src/views/goods/grounding/components/detail.vue
View file @
bbd1dfc
...
...
@@ -14,7 +14,7 @@
{{
i
.
title
}}
</p>
<div
class=
"flex_item"
>
<div
v-for=
"(item, index) in i.formBlock"
:key=
"index"
:class=
"(item.type === 'incidBox' || item.type === 'table') ? 'item message-box' : 'item'"
>
<div
v-for=
"(item, index) in i.formBlock"
:key=
"index"
:class=
"(item.type === 'incidBox' || item.type === 'table'
|| item.type === 'upload'
) ? 'item message-box' : 'item'"
>
<!-- 商品附带信息 -->
<div
v-if=
"formData['upgradeGoodsName'] && item.type === 'incidBox'"
>
<el-form-item
:prop=
"item.name"
...
...
@@ -77,6 +77,27 @@
<
relateStoreTable
v
-
if
=
"$$(formData['merchantGoodsRefList'], 'length')"
:
merchant
-
goods
-
ref
-
list
=
"formData['merchantGoodsRefList']"
:
isDetail
=
"true"
><
/relateStoreTable
>
<
/el-form-item
>
<
/div
>
<!--
图片文件
-->
<
div
v
-
else
-
if
=
"item.type === 'upload'"
>
<
div
v
-
if
=
"$$(formData[item.name], 'length')"
>
<
el
-
form
-
item
:
prop
=
"item.name"
:
label
=
"item.label ? item.label + ':' : ''"
:
id
=
"item.name"
:
label
-
width
=
"item.label ? '180px' : '0px'"
class
=
"dis-in-block"
style
=
"margin-bottom: 0"
>
<
div
class
=
"file_box"
>
<
div
class
=
"file_item"
v
-
for
=
"(subItem, subIndex) in formData[item.name]"
:
key
=
"subIndex"
>
<
div
class
=
"item_box"
@
click
=
"handleFileView(subItem)"
>
<
img
class
=
"image_icon"
v
-
if
=
"subItem.voucherFileUrl.includes('.png') || subItem.voucherFileUrl.includes('.jpg')"
src
=
"../images/photo_thumbnail.png"
/>
<
img
class
=
"image_icon"
v
-
if
=
"subItem.voucherFileUrl.includes('.pdf')"
src
=
"../images/PDF_thumbnail.png"
/>
<
span
class
=
"file_size"
>
文件大小:
{{
formatSize
(
subItem
.
fileSize
)
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/el-form-item
>
<
/div
>
<
/div
>
<
div
v
-
else
>
<
el
-
form
-
item
:
prop
=
"item.name"
:
label
=
"item.label ? (item.unit ? (membraneTypeList.includes(formData['goodsType']) ? item.label + `(元)/车` : (item.label + '(元)/件')) : item.label) + ':' : ''"
...
...
@@ -106,6 +127,11 @@
<
/el-button
>
<
/el-form-item
>
<
/el-form
>
<
el
-
image
-
viewer
v
-
if
=
"imgViewerVisible"
:
on
-
close
=
"closeImgViewer"
:
url
-
list
=
"imageFileArr"
:
initialIndex
=
"initialIndex"
/>
<
/div
>
<
/template
>
...
...
@@ -118,7 +144,8 @@ import relateStoreTable from "./relateStoreTable.vue"
export
default
{
name
:
'groundingForm'
,
components
:
{
relateStoreTable
relateStoreTable
,
'el-image-viewer'
:
()
=>
import
(
'element-ui/packages/image/src/image-viewer'
)
}
,
data
()
{
return
{
...
...
@@ -128,7 +155,11 @@ export default {
selectedValue
:
''
,
show
:
false
,
examineFlag
:
false
,
membraneTypeList
membraneTypeList
,
dialogObj
:
{
}
,
imageFileArr
:
[],
imgViewerVisible
:
false
,
initialIndex
:
0
}
}
,
...
...
@@ -169,6 +200,16 @@ export default {
}
}
,
deep
:
true
}
,
// 获取所有文件中的图片
'formData.voucherList'
:
{
handler
(
newVal
)
{
if
(
newVal
)
{
let
imageFileArr
=
newVal
.
filter
(
v
=>
v
.
voucherFileUrl
&&
(
v
.
voucherFileUrl
.
includes
(
'.png'
)
||
v
.
voucherFileUrl
.
includes
(
'jpg'
)))
this
.
imageFileArr
=
imageFileArr
.
map
(
item
=>
{
return
item
.
voucherFileUrl
}
)
}
}
,
deep
:
true
}
}
,
...
...
@@ -227,6 +268,42 @@ export default {
}
this
.
selectedValue
=
value
}
,
// 文件预览
handleFileView
(
item
)
{
if
(
item
?.
voucherFileUrl
?.
includes
(
'.pdf'
))
{
window
.
open
(
item
.
voucherFileUrl
)
// pdf文件新窗口打开直接预览
}
else
{
this
.
imgViewerVisible
=
true
this
.
imageFileArr
.
forEach
((
val
,
index
)
=>
{
// 图片使用elementImage图片预览组件
if
(
val
==
item
.
voucherFileUrl
)
this
.
initialIndex
=
index
}
)
}
}
,
closeImgViewer
()
{
this
.
imgViewerVisible
=
false
}
,
// 文件大小格式化
formatSize
(
byte
)
{
let
size
=
""
if
(
byte
<
0.1
*
1024
)
{
// 小于0.1KB,则转化成B
size
=
`${byte.toFixed(2)
}
B`
}
else
if
(
byte
<
0.1
*
1024
*
1024
)
{
// 小于0.1MB,则转化成KB
size
=
`${(byte / 1024).toFixed(2)
}
KB`
}
else
if
(
byte
<
0.1
*
1024
*
1024
*
1024
)
{
// 小于0.1GB,则转化成MB
size
=
`${(byte / (1024 * 1024)).toFixed(2)
}
MB`
}
const
sizeStr
=
`${size
}
`
// 转成字符串
const
index
=
sizeStr
.
indexOf
(
"."
)
// 获取小数点处的索引
const
dou
=
sizeStr
.
substr
(
index
+
1
,
2
)
// 获取小数点后两位的值
if
(
dou
==
"00"
)
{
// 判断后两位是否为00,如果是则删除00
return
sizeStr
.
substring
(
0
,
index
)
+
sizeStr
.
substr
(
index
+
3
,
2
)
}
return
size
}
,
// 处理金额补零
priceFilter
(
num
)
{
var
pow
=
Math
.
pow
(
10
,
2
)
...
...
@@ -268,6 +345,7 @@ export default {
flex
-
flow
:
wrap
;
.
item
{
flex
:
0
0
33
%
;
margin
-
bottom
:
10
px
;
}
.
message
-
box
{
flex
:
0
0
100
%
;
...
...
@@ -294,6 +372,29 @@ export default {
}
}
}
.
file_box
{
width
:
100
%
;
display
:
flex
;
flex
-
wrap
:
wrap
;
.
file_item
{
flex
:
0
0
20
%
;
display
:
flex
;
.
item_box
{
display
:
flex
;
align
-
items
:
center
;
cursor
:
pointer
;
.
image_icon
{
width
:
24
px
;
height
:
24
px
;
}
.
file_size
{
color
:
#
999999
;
font
-
size
:
14
px
;
margin
-
left
:
8
px
;
}
}
}
}
}
}
.
width_100
{
...
...
src/views/goods/grounding/components/groundingForm.vue
View file @
bbd1dfc
This diff is collapsed.
Click to expand it.
src/views/goods/grounding/editGrounding.vue
View file @
bbd1dfc
...
...
@@ -169,6 +169,13 @@ export default {
label
:
'上架门店'
,
isRequired
:
true
,
type
:
'button'
},
{
name
:
'voucherList'
,
label
:
'上架凭证'
,
type
:
'upload'
,
topTips
:
'支持扩展名:.pdf .jpg .png'
,
tips
:
'注:最多可上传30个文件'
,
maxPhotoNum
:
30
}]
}],
editData
:
{
...
...
@@ -186,7 +193,8 @@ export default {
minSellPrice
:
''
,
giveCostPrice
:
''
,
recoveryCostPrice
:
''
,
reconcilyCostPrice
:
''
reconcilyCostPrice
:
''
,
voucherList
:
[]
},
secondGoodsList
:
[],
goodsNameKeyword
:
''
,
...
...
@@ -329,8 +337,12 @@ export default {
confNameValue
:
res
?.
upgradeGoodsName
,
confTypeNameValue
:
`(
${
res
?.
goodsTypeName
}
/ ${res
?
.goodsName} /
$
{
res
?.
upgradeCommodityCode
})
`,
}]
res.voucherList.forEach(val => { // 处理上传进度 默认进度100%
if (val.voucherFileUrl) val.uploadProgress = 100
})
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => { return `
$
{
v
.
serviceName
}
-
$
{
v
.
serviceGrade
}
/${v.servicePeriod}` }
)?
.join
(
','
)
/
/
服务项目
res
.
merchantGoodsRefList
=
res
.
merchantGoodsRefList
||
[]
// 上架门店
res
.
voucherList
=
res
.
voucherList
||
[]
// 上架凭证
this
.
editData
=
res
||
{}
this
.
getSelectingList
(
defaultSelect
)
})
...
...
@@ -360,18 +372,30 @@ export default {
})
})
let
arr
=
[]
data
?.
merchantGoodsRefList
?.
forEach
(
val
=>
{
// 组合数据 防止请求参数过长
data
?.
merchantGoodsRefList
?.
forEach
(
val
=>
{
//
上架门店
组合数据 防止请求参数过长
arr
.
push
({
merchantId
:
val
.
merchantId
,
merchantName
:
val
.
merchantName
})
})
let
fileArr
=
[]
data
?.
voucherList
?.
forEach
(
val
=>
{
// 处理上传凭证数据 删除或取消上传并不会删除数组 只是将url置空
if
(
val
.
voucherFileUrl
)
{
fileArr
.
push
({
voucherFileUrl
:
val
.
voucherFileUrl
,
fileSize
:
val
.
fileSize
,
fileName
:
val
.
fileName
})
}
})
// 整理上传凭证数据
delete
formObj
?.
productType
let
params
=
{
saveDraft
:
num
!==
1
,
id
:
data
.
id
,
...
formObj
,
merchantGoodsRefList
:
arr
merchantGoodsRefList
:
arr
,
voucherList
:
fileArr
}
if
(
num
==
1
&&
!
baseConfig
.
supplierCode
.
includes
(
data
.
supplierCode
))
{
// 第三方商品无需走审核流程不用提示
this
.
$confirm
(
'<p>上架信息保存后,自动进入上架审核流程</p>是否确定保存?'
,
'提示'
,
{
...
...
src/views/goods/grounding/groundingDetail.vue
View file @
bbd1dfc
...
...
@@ -127,6 +127,10 @@ export default {
name
:
'merchantGoodsRefList'
,
label
:
'上架门店'
,
type
:
'table'
},
{
name
:
'voucherList'
,
label
:
'上架凭证'
,
type
:
'upload'
}]
},
{
title
:
'操作信息'
,
...
...
@@ -193,8 +197,9 @@ export default {
res
.
warrantyPeriod
=
res
.
upgradeGoods
?.
warrantyPeriod
res
.
serviceYears
=
res
.
upgradeGoods
?.
serviceYears
res
.
merchantGoodsRefList
=
res
.
merchantGoodsRefList
||
[]
res
.
thirdPartyCode
=
res
?.
upgradeGoods
?.
thirdPartyCode
||
''
,
res
.
entityCardFlag
=
res
?.
upgradeGoods
?.
entityCardFlag
res
.
thirdPartyCode
=
res
?.
upgradeGoods
?.
thirdPartyCode
||
''
res
.
entityCardFlag
=
res
?.
upgradeGoods
?.
entityCardFlag
res
.
voucherList
=
res
?.
voucherList
||
[]
this
.
editData
=
res
||
{}
this
.
$nextTick
(()
=>
{
this
.
show
=
true
...
...
src/views/goods/grounding/images/PDF_thumbnail.png
0 → 100644
View file @
bbd1dfc
1.63 KB
src/views/goods/grounding/images/photo_thumbnail.png
0 → 100644
View file @
bbd1dfc
1.4 KB
src/views/goods/grounding/index.vue
View file @
bbd1dfc
...
...
@@ -34,6 +34,10 @@
<span
style=
"
{display: inline-block;}">
<auth-button
category=
"Button"
:show-btn-ids=
"['9030903']"
/>
</span>
<!-- 批量下架 -->
<span
style=
"
{display: inline-block};margin-left: 10px">
<auth-button
category=
"Button"
:show-btn-ids=
"['9030908']"
/>
</span>
<!-- 导出 -->
<span
style=
"
{display: inline-block};margin-left: 10px">
<auth-button
category=
"Button"
:show-btn-ids=
"['9030902']"
/>
...
...
@@ -120,7 +124,7 @@
</template>
<
script
>
import
{
getProductTypeBySceneId
,
getList
}
from
'@api/product'
import
{
getGroundingManageList
,
updateGoodsStatus
,
batchReviewAPI
,
delGroundingById
}
from
'@api/grounding'
import
{
getGroundingManageList
,
updateGoodsStatus
,
batchReviewAPI
,
delGroundingById
,
batchUpdateStatus
}
from
'@api/grounding'
import
{
deepClone
,
Util
}
from
'@/common/util'
import
{
sceneCodeList
,
sceneList
}
from
'@/common/constants.js'
import
{
getParkStore
}
from
'@api/editCustomer'
...
...
@@ -513,11 +517,11 @@ export default {
})
},
selectableFn
(
row
)
{
var
isSelect
=
true
if
(
row
.
status
!==
4
)
{
// 仅待审核状态可勾选
isSelect
=
false
}
return
isSelect
//
var isSelect = true
//
if (row.status !== 4) { // 仅待审核状态可勾选
//
isSelect = false
//
}
return
true
},
handleReset
()
{
this
.
searchForm
=
{
...
...
@@ -609,7 +613,7 @@ export default {
})
},
handleUpOrDown
(
row
)
{
var
html
=
row
.
status
==
'0'
?
'上架
信息保存后,自动进入上架审核流程,是否确定保存
?'
:
'下架后对应的门店无法再使用该商品,是否确定下架?'
var
html
=
row
.
status
==
'0'
?
'上架
后重新进入审核流程;是否确定上架
?'
:
'下架后对应的门店无法再使用该商品,是否确定下架?'
this
.
$confirm
(
html
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -624,19 +628,30 @@ export default {
console
.
log
(
err
)
})
},
// 批量审核
handleBatchReview
()
{
var
selectedData
=
[]
if
(
this
.
$refs
.
groundingIndexTable
.
mutiSelectArr
.
groundingIndex
)
{
selectedData
=
this
.
$refs
.
groundingIndexTable
.
mutiSelectArr
.
groundingIndex
}
// 上架状态
let
status
=
selectedData
.
map
(
v
=>
{
return
v
.
status
})
||
[]
if
(
!
selectedData
.
length
)
{
this
.
$message
({
message
:
"请选择需要审核的
商品
"
,
message
:
"请选择需要审核的
记录
"
,
type
:
"warning"
,
showClose
:
true
})
return
false
}
if
(
status
.
includes
(
1
)
||
status
.
includes
(
0
)
||
status
.
includes
(
3
))
{
// 包含1已上架/0已下架/3草稿
this
.
$message
({
message
:
'请选择待审核的记录'
,
type
:
'warning'
,
showClose
:
true
})
return
false
}
this
.
$confirm
(
'审核通过后,商品完成上架,对应的门店可使用该商品,是否确定审核?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -650,6 +665,44 @@ export default {
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
// 批量下架
handleBatchOffShelf
()
{
var
selectedData
=
[]
if
(
this
.
$refs
.
groundingIndexTable
.
mutiSelectArr
.
groundingIndex
)
{
selectedData
=
this
.
$refs
.
groundingIndexTable
.
mutiSelectArr
.
groundingIndex
}
// 上架状态
let
status
=
selectedData
.
map
(
v
=>
{
return
v
.
status
})
||
[]
if
(
!
selectedData
.
length
)
{
this
.
$message
({
message
:
"请选择需要下架的记录"
,
type
:
"warning"
,
showClose
:
true
})
return
false
}
if
(
status
.
includes
(
4
)
||
status
.
includes
(
0
)
||
status
.
includes
(
3
))
{
// 包含4待审核/0已下架/3草稿
this
.
$message
({
message
:
'请选择已上架的记录'
,
type
:
'warning'
,
showClose
:
true
})
return
false
}
this
.
$confirm
(
'下架后对应的门店无法再使用该商品,是否确定下架?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
ids
=
selectedData
.
map
(
v
=>
{
return
v
.
id
})
||
[]
batchUpdateStatus
({
ids
:
ids
}).
then
(
res
=>
{
this
.
notice
.
okTips
()
this
.
$refs
.
groundingIndexTable
.
refreshTable
()
})
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
}
}
}
...
...
src/views/goods/productManage/components/productForm.vue
View file @
bbd1dfc
...
...
@@ -724,6 +724,7 @@ export default {
handleImgChange
(
e
,
targetItem
,
subIndex
=
0
)
{
var
reader
=
new
FileReader
()
var
fileInfo
=
e
.
srcElement
.
files
[
0
]
if
(
!
fileInfo
)
return
reader
.
readAsDataURL
(
fileInfo
)
reader
.
onload
=
e
=>
{
const
imgFile
=
e
.
target
.
result
...
...
@@ -737,6 +738,9 @@ export default {
}
else
{
this
.
formData
[
targetItem
.
name
][
subIndex
].
content
=
res
}
document
.
getElementById
(
`
${
targetItem
.
name
}
file`
).
value
=
""
}).
catch
(()
=>
{
document
.
getElementById
(
`
${
targetItem
.
name
}
file`
).
value
=
""
})
}
},
...
...
@@ -933,7 +937,7 @@ export default {
height
:
100%
;
position
:
absolute
;
width
:
88px
;
height
:
74
px
;
height
:
88
px
;
left
:
0
;
top
:
0
;
z-index
:
2
;
...
...
src/views/orderManage/carDamage.vue
View file @
bbd1dfc
...
...
@@ -163,6 +163,13 @@
@
click
=
"ruleHistory(scope.row)"
>
分账记录
<
/el-button
>
<!--
取消分账
分帐中状态
-->
<
el
-
button
type
=
"text"
size
=
"small"
v
-
if
=
"scope.row.profitAllocationStatus == 5"
@
click
=
"cancelRule(scope.row)"
>
取消分账
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
...
...
@@ -216,8 +223,9 @@ import {
getList
,
getOrderCount
,
waitinputorderCount
,
orderImport
,
getServiceStore
orderImport
,
getServiceStore
,
cancelDivideAccountsAPI
}
from
"@api/order"
import
{
getDiversionMerchantRef
}
from
"@api/merchant"
import
{
manageTypeList
,
BaseData
}
from
"@/common/constants"
...
...
@@ -271,7 +279,8 @@ export default {
profitAllocationStatusOpts
:
{
1
:
'未分账'
,
2
:
'已分账'
,
4
:
'待分账'
4
:
'待分账'
,
5
:
'分账中'
}
,
showFormData
:
[
{
...
...
@@ -526,6 +535,10 @@ export default {
{
confId
:
'4'
,
confLabel
:
'待分账'
}
,
{
confId
:
'5'
,
confLabel
:
'分账中'
}
],
}
,
...
...
@@ -896,6 +909,19 @@ export default {
this
.
ruleInfoVisible
=
true
}
,
// 取消分账
cancelRule
(
row
)
{
this
.
$confirm
(
'取消分帐后,订单按线下对账方式计算分润,收款金额统一分账至嘀加智慧云,请谨慎操作。是否确定取消?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'warning'
}
).
then
(()
=>
{
cancelDivideAccountsAPI
({
orderCode
:
row
.
orderCode
}
).
then
(
res
=>
{
this
.
notice
.
okTips
()
this
.
handleSearch
()
}
)
}
).
catch
(()
=>
{
}
)
}
,
ruleInfoDialogClose
(
flag
)
{
this
.
ruleInfoVisible
=
!
this
.
ruleInfoVisible
// if (flag)
{
...
...
src/views/orderManage/crowdfundDetail.vue
View file @
bbd1dfc
...
...
@@ -273,6 +273,10 @@ export default {
{
label
:
"退款备注"
,
name
:
'refundRemark'
},
{
label
:
'备注'
,
name
:
'remarks'
}
]
this
.
detailFormData
=
detailFormData
...
...
src/views/orderManage/crowdfunding.vue
View file @
bbd1dfc
...
...
@@ -160,6 +160,12 @@
标记已退款
</el-button>
</span>
<!-- 取消分账 分账中状态 -->
<span
v-if=
"scope.scope.ledgerStatus == '4'"
>
<el-button
type=
"text"
size=
"mini"
style=
"margin-left: 10px"
@
click=
"cancelRule(scope.scope)"
>
取消分账
</el-button>
</span>
</div>
</d2-table>
</div>
...
...
@@ -229,7 +235,7 @@ import {
}
from
"@/common/constants"
import
{
Util
,
deepClone
}
from
"@/common/util"
import
orderManage
from
"@api/orderManage"
import
{
batchUpdateToNotInput
,
batchUpdateConfirmInput
,
markAsRefunded
}
from
'@api/order'
import
{
batchUpdateToNotInput
,
batchUpdateConfirmInput
,
markAsRefunded
,
cancelDivideAccountsAPI
}
from
'@api/order'
import
chooseRuleDialog
from
'./chooseRuleDialog'
import
ruleInfoDialog
from
'./ruleInfoDialog'
export
default
{
...
...
@@ -374,7 +380,8 @@ export default {
{
confId
:
"0"
,
confName
:
"未分账"
},
{
confId
:
"1"
,
confName
:
"待确认"
},
{
confId
:
"2"
,
confName
:
"待分账"
},
{
confId
:
"3"
,
confName
:
"已分账"
}
{
confId
:
"3"
,
confName
:
"已分账"
},
{
confId
:
"4"
,
confName
:
"分账中"
}
]
},
...
...
@@ -872,7 +879,7 @@ export default {
prop
:
"ledgerStatus"
,
width
:
100
,
formatter
:
(
cellValue
)
=>
{
return
{
0
:
"未分账"
,
1
:
"待确认"
,
2
:
"待分账"
,
3
:
"已分账"
}[
cellValue
.
ledgerStatus
]
||
"-"
return
{
0
:
"未分账"
,
1
:
"待确认"
,
2
:
"待分账"
,
3
:
"已分账"
,
4
:
"分账中"
}[
cellValue
.
ledgerStatus
]
||
"-"
}
},
{
...
...
@@ -1319,6 +1326,18 @@ export default {
})
}).
catch
(()
=>
{
})
},
// 取消分账
cancelRule
(
row
)
{
this
.
$confirm
(
'取消分帐后,订单按线下对账方式计算分润,收款金额统一分账至嘀加智慧云,请谨慎操作。是否确定取消?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'warning'
}).
then
(()
=>
{
cancelDivideAccountsAPI
({}).
then
(
res
=>
{
this
.
notice
.
okTips
()
this
.
handleSearch
()
})
}).
catch
(()
=>
{})
},
ruleInfoDialogClose
(
flag
)
{
this
.
ruleInfoVisible
=
!
this
.
ruleInfoVisible
if
(
flag
)
{
...
...
src/views/orderManage/order.vue
View file @
bbd1dfc
...
...
@@ -158,6 +158,10 @@
@
click
=
"ruleHistory(scope.row)"
>
分账记录
<
/el-button
>
<
el
-
button
type
=
"text"
style
=
"margin-left: 0;"
size
=
"small"
v
-
if
=
"scope.row.profitAllocationStatus == 5"
@
click
=
"cancelRule(scope.row)"
>
取消分账
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
...
...
@@ -205,7 +209,7 @@
<
script
>
import
{
Util
}
from
'@/common/util'
import
{
getList
,
getOrderCount
,
waitinputorderCount
,
orderImport
}
from
'@api/order'
import
{
getList
,
getOrderCount
,
waitinputorderCount
,
orderImport
,
cancelDivideAccountsAPI
}
from
'@api/order'
import
{
getDiversionMerchantRef
,
listShop4sByRef
}
from
'@api/merchant'
import
{
manageTypeList
,
BaseData
}
from
'@/common/constants'
import
{
mapActions
,
mapState
,
mapMutations
}
from
'vuex'
...
...
@@ -255,7 +259,8 @@ export default {
profitAllocationStatusOpts
:
{
1
:
'未分账'
,
2
:
'已分账'
,
4
:
'待分账'
4
:
'待分账'
,
5
:
'分账中'
}
,
showFormData
:
[{
label
:
'订单状态'
,
...
...
@@ -482,6 +487,10 @@ export default {
{
confId
:
'4'
,
confLabel
:
'待分账'
}
,
{
confId
:
'5'
,
confLabel
:
'分账中'
}
],
parkServiceList
:
[],
...
...
@@ -576,7 +585,7 @@ export default {
'baseData.subShopMerchantList'
:
{
handler
(
val
)
{
console
.
log
(
'baseData.subShopMerchantList'
,
val
)
//
console.log('baseData.subShopMerchantList', val)
if
(
val
.
length
>
0
)
{
this
.
showFormData
[
this
.
findFormIdx
(
'subShopMerchantId'
)].
isHide
=
false
}
else
{
...
...
@@ -690,7 +699,7 @@ export default {
listShop4sByRef
({
scene
:
1
}
).
then
(
res
=>
{
console
.
log
(
'this.getAllServiceStore()'
,
res
)
//
console.log('this.getAllServiceStore()', res)
this
.
baseData
.
storeIdList
=
res
||
[]
this
.
getOptionsList
()
}
)
...
...
@@ -844,6 +853,19 @@ export default {
this
.
ruleInfoVisible
=
true
}
,
// 取消分账
cancelRule
(
row
)
{
this
.
$confirm
(
'取消分帐后,订单按线下对账方式计算分润,收款金额统一分账至嘀加智慧云,请谨慎操作。是否确定取消?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'warning'
}
).
then
(()
=>
{
cancelDivideAccountsAPI
({
orderCode
:
row
.
orderCode
}
).
then
(
res
=>
{
this
.
notice
.
okTips
()
this
.
handleSearch
()
}
)
}
).
catch
(()
=>
{
}
)
}
,
ruleInfoDialogClose
(
flag
)
{
this
.
ruleInfoVisible
=
!
this
.
ruleInfoVisible
// if (flag)
{
...
...
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