Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-activity-center
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 7c0124e5
authored
Jul 27, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
3eff9a19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
583 additions
and
667 deletions
src/api/modules/orderManage.js
src/config/index.js
src/views/orderManage/index.vue
src/api/modules/orderManage.js
View file @
7c0124e
...
...
@@ -197,6 +197,27 @@ const importCrowdFundingOrder = params => {
noSignAttr
:
[
'file'
]
})
}
/**导入众筹订单 */
const
importOrder
=
params
=>
{
params
.
method
=
'scrm.api.shopmall.crowdFunding.order.import'
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
noSignAttr
:
[
'file'
]
})
}
/**根据导入记录id获取导入结果 */
const
importGetById
=
params
=>
{
params
.
method
=
'scrm.api.shopmall.crowdFunding.order.import.record.getById'
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
/**营销状态设为已完结 */
const
finishOrderStatus
=
params
=>
{
...
...
@@ -210,5 +231,4 @@ const finishOrderStatus = params => {
})
}
export
default
{
getInstallInfo
,
orderVerfication
,
signerOrder
,
getListApi
,
getCountApi
,
getOrderDetailApi
,
orderExportApi
,
writeOffApi
,
crowdFundWriteOffApi
,
crowdFundRefundApi
,
addDeliveryApi
,
examineDetailApi
,
examineAllowApi
,
confirmReceiptGoodsApi
,
updateOrderType
,
batchRefundOrder
,
importCrowdFundingOrder
,
finishOrderStatus
}
export
default
{
importGetById
,
importOrder
,
getInstallInfo
,
orderVerfication
,
signerOrder
,
getListApi
,
getCountApi
,
getOrderDetailApi
,
orderExportApi
,
writeOffApi
,
crowdFundWriteOffApi
,
crowdFundRefundApi
,
addDeliveryApi
,
examineDetailApi
,
examineAllowApi
,
confirmReceiptGoodsApi
,
updateOrderType
,
batchRefundOrder
,
importCrowdFundingOrder
,
finishOrderStatus
}
src/config/index.js
View file @
7c0124e
...
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-0
6-25 14:57:05
* @LastEditTime: 2023-0
7-24 10:07:00
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
...
...
@@ -19,8 +19,8 @@ export const fetchConfig = function(isEnv = true) {
// return Promise.resolve(cfg)
// }
//return window.fetch('https://', {}).then(res => res.json())
//
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config')
return
new
Http
().
get
(
'https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config'
)
return
new
Http
().
get
(
'https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config'
)
//
return new Http().get('https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config')
}
export
const
config
=
{
install
(
vue
,
cfg
)
{
...
...
src/views/orderManage/index.vue
View file @
7c0124e
...
...
@@ -4,45 +4,21 @@
<div
class=
"container"
>
<template
v-if=
"showTable"
>
<div
class=
"sticky"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<div
class=
"flex"
>
<div
class=
"flex-default tabs"
>
<el-tabs
v-model=
"searchForm.requestSource"
@
tab-click=
"handleTabClick"
>
<el-tab-pane
:label=
"i"
:name=
"index"
:key=
"index"
v-for=
"(i,index) in requestSourceList"
></el-tab-pane>
<el-tabs
v-model=
"searchForm.requestSource"
@
tab-click=
"handleTabClick"
>
<el-tab-pane
:label=
"i"
:name=
"index"
:key=
"index"
v-for=
"(i, index) in requestSourceList"
></el-tab-pane>
</el-tabs>
</div>
<div
class=
"btn-group"
>
<!--
<template
v-if=
"!hideStatus"
>
<el-button
class=
"default-blue-btn"
:size=
"size"
type=
"default"
@
click=
"visibleImportDialog(true)"
>
导入
</el-button>
</
template
>
-->
<template
v-if=
"!hideStatus"
>
<el-button
class=
"default-blue-btn"
:size=
"size"
type=
"default"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"visibleImportDialog(true)"
>
导入
</el-button>
<el-button
:size=
"size"
class=
"default-blue-btn"
@
click=
"downloadError(errorUrl)"
v-if=
"errorUrl"
>
下载导入失败数据
</el-button>
</
template
>
<
template
v-if=
"!hideStatus"
>
<el-button
class=
"default-blue-btn"
:size=
"size"
type=
"default"
@
click=
"handleExport"
>
导出
</el-button>
</
template
>
</div>
</div>
...
...
@@ -50,121 +26,48 @@
<!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<div
class=
"order-manage-table"
>
<div
class=
"table-tips"
>
<div
class=
"table-tips-text"
>
已生成有效订单{{ statisticsInfo.orderCount || 0 }}项 累计订单总额:{{ statisticsInfo.payPriceTotal || 0 }}元 累计退款总额:{{ statisticsInfo.refundTotal || 0 }} 元
</div>
<el-button
class=
"default-blue-btn refund-btn"
:size=
"size"
type=
"default"
@
click=
"batchRefundVisible = true"
:disabled=
"selectList.length == 0"
>
批量退款
</el-button>
<div
class=
"table-tips-text"
>
已生成有效订单{{ statisticsInfo.orderCount || 0 }}项 累计订单总额:{{ statisticsInfo.payPriceTotal || 0 }}元 累计退款总额:{{ statisticsInfo.refundTotal || 0 }} 元
</div>
<el-button
class=
"default-blue-btn refund-btn"
:size=
"size"
type=
"default"
@
click=
"batchRefundVisible = true"
:disabled=
"selectList.length == 0"
>
批量退款
</el-button>
</div>
<GLTable
ref=
"allOrderRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
@
selectionTable=
"selectionTable"
>
<div
slot=
"weChatName"
class=
"flex-align"
slot-scope=
"scope"
>
<img
v-if=
"scope.scope.weChatImageUrl"
class=
"img-36 pointer img-circle"
:src=
"scope.scope.weChatImageUrl"
/>
<GLTable
ref=
"allOrderRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
@
selectionTable=
"selectionTable"
>
<div
slot=
"weChatName"
class=
"flex-align"
slot-scope=
"scope"
>
<img
v-if=
"scope.scope.weChatImageUrl"
class=
"img-36 pointer img-circle"
:src=
"scope.scope.weChatImageUrl"
/>
<span
class=
"m-l-10"
>
{{ scope.scope.weChatName }}
</span>
<span
v-if=
"!scope.scope.shareAvatar && !scope.scope.weChatName"
>
-
</span>
</div>
<
template
slot=
"vinNo"
slot-scope=
"scope"
>
<
template
slot=
"vinNo"
slot-scope=
"scope"
>
{{
Array
.
isArray
(
scope
.
scope
.
vinNo
)
?
scope
.
scope
.
vinNo
[
0
]
:
scope
.
scope
.
vinNo
}}
<el-popover
popper-class=
"order-table-popover"
placement=
"right-start"
trigger=
"click"
>
<p
v-for=
"(item, index) in scope.scope.vinNo"
:key=
"index"
>
{{
item
}}
</p>
<span
class=
"car-no"
slot=
"reference"
v-show=
"Array.isArray(scope.scope.vinNo)"
>
...(
{{
scope
.
scope
.
vinNo
.
length
-
1
}}
)
</span>
<el-popover
popper-class=
"order-table-popover"
placement=
"right-start"
trigger=
"click"
>
<p
v-for=
"(item, index) in scope.scope.vinNo"
:key=
"index"
>
{{
item
}}
</p>
<span
class=
"car-no"
slot=
"reference"
v-show=
"Array.isArray(scope.scope.vinNo)"
>
...(
{{
scope
.
scope
.
vinNo
.
length
-
1
}}
)
</span>
</el-popover>
</
template
>
<div
slot=
"orderStatus"
slot-scope=
"scope"
>
<div
slot=
"orderStatus"
slot-scope=
"scope"
>
<span
:class=
"['table-circle', 'm-r-8', [2, 10, 22].includes(scope.scope.orderStatus) ? 'back-green' : [9].includes(scope.scope.orderStatus) ? 'back-blue' : [1, 21, 6].includes(scope.scope.orderStatus) ? 'back-orange' : 'back-grey']"
></span>
<span>
{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}
</span>
</div>
<div
slot=
"shareStaffName"
class=
"table-image"
slot-scope=
"scope"
>
<div
slot=
"shareStaffName"
class=
"table-image"
slot-scope=
"scope"
>
<div>
<img
v-if=
"scope.scope.shareStaffImageUrl"
class=
"img-36 pointer img-circle"
style=
"vertical-align: middle"
slot=
"reference"
:src=
"scope.scope.shareStaffImageUrl"
/>
<img
v-if=
"scope.scope.shareStaffImageUrl"
class=
"img-36 pointer img-circle"
style=
"vertical-align: middle"
slot=
"reference"
:src=
"scope.scope.shareStaffImageUrl"
/>
<span
class=
"m-l-10"
>
<span>
{{ scope.scope.shareStaffName }}
</span>
<span
class=
"txt-green"
v-if=
"scope.scope.shareStaffSource == 1"
>
@个微
</span>
<span
class=
"txt-orange"
v-if=
"scope.scope.shareStaffSource == 2"
>
@企微
</span>
<span
class=
"txt-blue"
v-if=
"scope.scope.shareStaffSource == 3"
>
@员工
</span>
<span
class=
"txt-green"
v-if=
"scope.scope.shareStaffSource == 1"
>
@个微
</span>
<span
class=
"txt-orange"
v-if=
"scope.scope.shareStaffSource == 2"
>
@企微
</span>
<span
class=
"txt-blue"
v-if=
"scope.scope.shareStaffSource == 3"
>
@员工
</span>
</span>
</div>
<span
v-if=
"!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName"
>
-
</span>
</div>
<div
slot=
"assignName"
slot-scope=
"scope"
>
<div
slot=
"assignName"
slot-scope=
"scope"
>
<div
class=
"flex-align"
>
<
template
v-if=
"scope.scope.assignStaffName"
>
<img
class=
"img-36 pointer img-circle"
v-if=
"scope.scope.assignStaffImageUrl"
:src=
"scope.scope.assignStaffImageUrl"
/>
<img
class=
"img-36 pointer img-circle"
v-if=
"scope.scope.assignStaffImageUrl"
:src=
"scope.scope.assignStaffImageUrl"
/>
<span
class=
"m-l-10"
>
<span>
{{
scope
.
scope
.
assignStaffName
}}
</span>
</span>
</
template
>
<
template
v-else-if=
"scope.scope.shareStaffName"
>
<img
class=
"img-36 pointer img-circle"
v-if=
"scope.scope.shareStaffImageUrl"
:src=
"scope.scope.shareStaffImageUrl"
/>
<img
class=
"img-36 pointer img-circle"
v-if=
"scope.scope.shareStaffImageUrl"
:src=
"scope.scope.shareStaffImageUrl"
/>
<span
class=
"m-l-10"
>
<span>
{{
scope
.
scope
.
shareStaffName
}}
</span>
</span>
...
...
@@ -172,48 +75,31 @@
<
template
v-else
>
<span>
{{
scope
.
scope
.
assignStaffName
||
scope
.
scope
.
shareStaffName
||
'-'
}}
</span>
</
template
>
<span
@
click=
"handlerAssign(scope.scope)"
class=
"assignLabel"
>
指派
</span>
<span
@
click=
"handlerAssign(scope.scope)"
class=
"assignLabel"
>
指派
</span>
</div>
</div>
<div
slot=
"orderType"
slot-scope=
"scope"
>
<el-switch
:value=
"scope.scope.orderType == 1 ? true : false"
class=
"switchStyle"
@
change=
"changeOrderType(scope.scope)"
active-text=
"是"
inactive-text=
"否"
></el-switch>
<div
slot=
"orderType"
slot-scope=
"scope"
>
<el-switch
:value=
"scope.scope.orderType == 1 ? true : false"
class=
"switchStyle"
@
change=
"changeOrderType(scope.scope)"
active-text=
"是"
inactive-text=
"否"
></el-switch>
</div>
<div
slot=
"marketingStatus"
slot-scope=
"scope"
>
<div
slot=
"marketingStatus"
slot-scope=
"scope"
>
<
template
v-if=
"scope.scope.marketingStatus"
>
<span
:class=
"['table-circle', 'm-r-8', [1, 2].includes(scope.scope.marketingStatus) ? 'back-green' : 'back-grey']"
></span>
</
template
>
<span>
{{ scope.scope.marketingStatus ?{
1:'已完结',
2:'已完结',
3:'未完结',
4:'已取消'
}[scope.scope.marketingStatus]: '-' }}
</span>
<span>
{{
scope.scope.marketingStatus
? {
1: '已完结',
2: '已完结',
3: '未完结',
4: '已取消'
}[scope.scope.marketingStatus]
: '-'
}}
</span>
</div>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
</div>
</GLTable>
</div>
...
...
@@ -221,59 +107,15 @@
<!-- 表格区域 - 全部订单/售后订单 - end -->
</div>
<!-- 快递信息 -->
<GLDialog
v-if=
"isExpressVisible"
title=
"输入快递信息"
mode=
"mid"
okText=
"确定"
cancelText=
"取消"
:visible
.
sync=
"isExpressVisible"
@
onOk=
"handleExpressConfirm"
@
onCancel=
"handleExpressClose"
>
<glsx-combi-form
class=
"small-content m-t-20"
ref=
"expressRef"
:isBlock=
"true"
defaultWidth=
"284px"
:isEdit=
"isEdit"
:formRef=
"editChildRef"
:formObj=
"expressForm"
:formData=
"expressFormData"
:formRules=
"expressRules"
></glsx-combi-form>
<GLDialog
v-if=
"isExpressVisible"
title=
"输入快递信息"
mode=
"mid"
okText=
"确定"
cancelText=
"取消"
:visible
.
sync=
"isExpressVisible"
@
onOk=
"handleExpressConfirm"
@
onCancel=
"handleExpressClose"
>
<glsx-combi-form
class=
"small-content m-t-20"
ref=
"expressRef"
:isBlock=
"true"
defaultWidth=
"284px"
:isEdit=
"isEdit"
:formRef=
"editChildRef"
:formObj=
"expressForm"
:formData=
"expressFormData"
:formRules=
"expressRules"
></glsx-combi-form>
</GLDialog>
<!-- 订单核销 -->
<GLDialog
v-if=
"isWriteOffVisible"
title=
"订单核销(请确保用户到店后核销,避免引起不必要问题)"
mode=
"mid"
okText=
"确定"
cancelText=
"取消"
:visible
.
sync=
"isWriteOffVisible"
@
onOk=
"handleWriteOffConfirm"
@
onCancel=
"handleWriteOffClose"
>
<glsx-combi-form
class=
"small-content m-t-20"
ref=
"writeOffRef"
:isBlock=
"true"
defaultWidth=
"284px"
:formRef=
"editChildRef"
:formObj=
"writeOffForm"
:formData=
"writeOffFormData"
:formRules=
"writeOffRules"
></glsx-combi-form>
<GLDialog
v-if=
"isWriteOffVisible"
title=
"订单核销(请确保用户到店后核销,避免引起不必要问题)"
mode=
"mid"
okText=
"确定"
cancelText=
"取消"
:visible
.
sync=
"isWriteOffVisible"
@
onOk=
"handleWriteOffConfirm"
@
onCancel=
"handleWriteOffClose"
>
<glsx-combi-form
class=
"small-content m-t-20"
ref=
"writeOffRef"
:isBlock=
"true"
defaultWidth=
"284px"
:formRef=
"editChildRef"
:formObj=
"writeOffForm"
:formData=
"writeOffFormData"
:formRules=
"writeOffRules"
></glsx-combi-form>
</GLDialog>
<!-- 退款审核 -->
<GLDialog
v-if=
"isExamineVisible"
bigTitle=
"退款审核"
mode=
"big"
:visible
.
sync=
"isExamineVisible"
@
onOk=
"handleExamineConfirm"
@
onCancel=
"handleExamineClose"
>
<GLDialog
v-if=
"isExamineVisible"
bigTitle=
"退款审核"
mode=
"big"
:visible
.
sync=
"isExamineVisible"
@
onOk=
"handleExamineConfirm"
@
onCancel=
"handleExamineClose"
>
<el-form
label-width=
"144px"
>
<el-form-item
label=
"售后类型"
>
<span>
{{ orderInfo.refundTypeName }}
</span>
...
...
@@ -288,15 +130,8 @@
<span>
{{ orderInfo.remark || '-' }}
</span>
</el-form-item>
<el-form-item
v-if=
"orderInfo.imgUrls"
>
<span
v-for=
"(item, index) in orderInfo.imgUrls"
:key=
"index"
>
<el-image
class=
"img-60"
:src=
"item"
:preview-src-list=
"[item]"
></el-image>
<span
v-for=
"(item, index) in orderInfo.imgUrls"
:key=
"index"
>
<el-image
class=
"img-60"
:src=
"item"
:preview-src-list=
"[item]"
></el-image>
</span>
</el-form-item>
<el-form-item
label=
"审核是否通过"
>
...
...
@@ -306,28 +141,12 @@
</el-radio-group>
</el-form-item>
<
template
v-if=
"orderInfo.refundType == 1 && examineForm.isAllowed == '1'"
>
<glsx-combi-form
ref=
"examineRef"
:isEdit=
"isEdit"
defaultWidth=
"284px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"examineForm"
:formData=
"examineFormData"
:formRules=
"examineRules"
></glsx-combi-form>
<glsx-combi-form
ref=
"examineRef"
:isEdit=
"isEdit"
defaultWidth=
"284px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"examineForm"
:formData=
"examineFormData"
:formRules=
"examineRules"
></glsx-combi-form>
</
template
>
</el-form>
</GLDialog>
<!-- 确认收货 -->
<GLDialog
v-if=
"isReceivingVisible"
bigTitle=
"确认收货"
mode=
"big"
:visible
.
sync=
"isReceivingVisible"
@
onOk=
"handleReceivingConfirm"
@
onCancel=
"handleReceivingClose"
>
<GLDialog
v-if=
"isReceivingVisible"
bigTitle=
"确认收货"
mode=
"big"
:visible
.
sync=
"isReceivingVisible"
@
onOk=
"handleReceivingConfirm"
@
onCancel=
"handleReceivingClose"
>
<el-form
label-width=
"140px"
>
<el-form-item
label=
"售后类型"
>
<span>
{{ orderInfo.refundTypeName }}
</span>
...
...
@@ -350,40 +169,19 @@
</el-form>
</GLDialog>
<!-- 指派员工 -->
<select-staff
v-if=
"isStaffVisible"
:merchantId=
"merchantId"
:orderCode=
"orderCode"
:dialogVisible=
"isStaffVisible"
@
handleStaffClose=
"handleStaffClose"
@
handleStaffConfirm=
"handleDialogConfirm"
></select-staff>
<select-staff
v-if=
"isStaffVisible"
:merchantId=
"merchantId"
:orderCode=
"orderCode"
:dialogVisible=
"isStaffVisible"
@
handleStaffClose=
"handleStaffClose"
@
handleStaffConfirm=
"handleDialogConfirm"
></select-staff>
<!-- 核销审批 -->
<GLDialog
v-if=
"writeOffApprovalVisible"
title=
"核销审批"
mode=
"mid"
:width=
"approvalInfo.verificationVoucher ? '':'400px'"
:visible
.
sync=
"writeOffApprovalVisible"
@
onCancel=
"handleApprovalClose"
@
onOk=
"handleApprovalConfirm"
:okText=
"approvalInfo.verificationVoucher ? '审批通过': '确定'"
:cancelText=
"approvalInfo.verificationVoucher ? '不通过': '取消'"
:orderCode=
"orderCode"
>
<GLDialog
v-if=
"writeOffApprovalVisible"
title=
"核销审批"
mode=
"mid"
:width=
"approvalInfo.verificationVoucher ? '' : '400px'"
:visible
.
sync=
"writeOffApprovalVisible"
@
onCancel=
"handleApprovalClose"
@
onOk=
"handleApprovalConfirm"
:okText=
"approvalInfo.verificationVoucher ? '审批通过' : '确定'"
:cancelText=
"approvalInfo.verificationVoucher ? '不通过' : '取消'"
:orderCode=
"orderCode"
>
<ul
v-if=
"approvalInfo.verificationVoucher"
class=
"approvalWrap"
>
<li
v-for=
"item in userInfo"
:key=
"item.key"
class=
"approvalInfoItem"
>
{{ item.label }}
<span
v-if=
"item.key!=
'verificationVoucher'"
>
{{ approvalInfo[item.key] || '--' }}
</span>
<el-image
v-else
style=
"width: 100px; height: 100px"
:src=
"approvalInfo[item.key]"
:preview-src-list=
"[approvalInfo[item.key]]"
></el-image>
{{ item.label }}
<span
v-if=
"item.key !=
'verificationVoucher'"
>
{{ approvalInfo[item.key] || '--' }}
</span>
<el-image
v-else
style=
"width: 100px; height: 100px"
:src=
"approvalInfo[item.key]"
:preview-src-list=
"[approvalInfo[item.key]]"
></el-image>
</li>
</ul>
<ul
v-else
>
<li
class=
"approvalInfoTips"
>
<img
class=
"tips-img"
src=
"@/assets/icon-info.png"
/>
<img
class=
"tips-img"
src=
"@/assets/icon-info.png"
/>
请确定是否核销此订单?
</li>
<li
class=
"approvalInfoItem"
>
员工名称: {{ approvalInfo.staffName }}
</li>
...
...
@@ -411,33 +209,17 @@
:selectData="selectData"></SelectMember>
</GLDialog> -->
<!-- 退款类型 -->
<GLDialog
mode=
"mid"
class=
"refund-dialog"
title=
"退款"
:visible
.
sync=
"refundVisible"
@
onCancel=
"refundVisible = !refundVisible"
@
onOk=
"refundFun"
>
<GLDialog
mode=
"mid"
class=
"refund-dialog"
title=
"退款"
:visible
.
sync=
"refundVisible"
@
onCancel=
"refundVisible = !refundVisible"
@
onOk=
"refundFun"
>
<div
class=
"gl-form-page gl-form-min"
>
<el-form
ref=
"form"
label-width=
"154px"
>
<el-form
ref=
"form"
label-width=
"154px"
>
<el-form-item
label=
"退款类型:"
>
<el-radio-group
v-model=
"refundParams.afterSaleType"
>
<div
class=
"refund-item"
>
<el-radio
v-model=
"radio"
label=
"2"
>
退定金
</el-radio>
<el-radio
v-model=
"radio"
label=
"2"
>
退定金
</el-radio>
<div
class=
"refund-tips"
>
选择此项不会扣减实际订单数
</div>
</div>
<div
class=
"refund-item"
>
<el-radio
v-model=
"radio"
label=
"1"
>
退订单
</el-radio>
<el-radio
v-model=
"radio"
label=
"1"
>
退订单
</el-radio>
<div
class=
"refund-tips"
>
选择此项会扣减实际订单数
</div>
</div>
</el-radio-group>
...
...
@@ -446,62 +228,23 @@
</div>
</GLDialog>
<!-- 批量退款 -->
<GLDialog
mode=
"big"
class=
"refund-dialog"
title=
"批量退款"
:visible
.
sync=
"batchRefundVisible"
@
onCancel=
"batchRefundVisible = !batchRefundVisible"
@
onOk=
"batchRefundOrder"
>
<div
class=
"list-tips m-b-10"
v-if=
"refundTips"
>
<img
class=
"tips-img"
src=
"@/assets/icon-info.png"
/>
<GLDialog
mode=
"big"
class=
"refund-dialog"
title=
"批量退款"
:visible
.
sync=
"batchRefundVisible"
@
onCancel=
"batchRefundVisible = !batchRefundVisible"
@
onOk=
"batchRefundOrder"
>
<div
class=
"list-tips m-b-10"
v-if=
"refundTips"
>
<img
class=
"tips-img"
src=
"@/assets/icon-info.png"
/>
<span
class=
"refund-dialog-tips"
>
请核对订单信息,并确定对以下订单发起批量退款!
</span>
<div
class=
"refund-dialog-tips-close el-dialog__close el-icon el-icon-close"
@
click=
"refundTips = false"
></div>
<div
class=
"refund-dialog-tips-close el-dialog__close el-icon el-icon-close"
@
click=
"refundTips = false"
></div>
</div>
<GLTable
:hasPage=
"false"
:tableData=
"selectList"
:tableParams=
"selectTableParams"
>
<div
slot=
"shareStaffName"
class=
"table-image"
slot-scope=
"scope"
>
<GLTable
:hasPage=
"false"
:tableData=
"selectList"
:tableParams=
"selectTableParams"
>
<div
slot=
"shareStaffName"
class=
"table-image"
slot-scope=
"scope"
>
<div>
<img
v-if=
"scope.scope.shareStaffImageUrl"
class=
"img-36 pointer img-circle"
style=
"vertical-align: middle"
slot=
"reference"
:src=
"scope.scope.shareStaffImageUrl"
/>
<img
v-if=
"scope.scope.shareStaffImageUrl"
class=
"img-36 pointer img-circle"
style=
"vertical-align: middle"
slot=
"reference"
:src=
"scope.scope.shareStaffImageUrl"
/>
<span
class=
"m-l-10"
>
<span>
{{ scope.scope.shareStaffName }}
</span>
<span
class=
"txt-green"
v-if=
"scope.scope.shareStaffSource == 1"
>
@个微
</span>
<span
class=
"txt-orange"
v-if=
"scope.scope.shareStaffSource == 2"
>
@企微
</span>
<span
class=
"txt-blue"
v-if=
"scope.scope.shareStaffSource == 3"
>
@员工
</span>
<span
class=
"txt-green"
v-if=
"scope.scope.shareStaffSource == 1"
>
@个微
</span>
<span
class=
"txt-orange"
v-if=
"scope.scope.shareStaffSource == 2"
>
@企微
</span>
<span
class=
"txt-blue"
v-if=
"scope.scope.shareStaffSource == 3"
>
@员工
</span>
</span>
</div>
<span
v-if=
"!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName"
>
-
</span>
...
...
@@ -509,52 +252,67 @@
</GLTable>
</GLDialog>
<!-- 导入 -->
<GLDialog
mode=
"mid"
class=
"import-dialog"
title=
"上传文件"
:visible
.
sync=
"importVisible"
@
onCancel=
"importVisible = !importVisible"
@
onOk=
"importFun"
>
<GLDialog
mode=
"small"
class=
"import-dialog"
title=
"上传文件"
:visible
.
sync=
"importVisible"
@
onCancel=
"importVisible = !importVisible"
@
onOk=
"importFun"
>
<div
class=
"gl-form-page gl-form-min"
>
<el-form
ref=
"form"
label-width=
"154px"
>
<el-form
ref=
"form"
label-width=
"104px"
>
<el-form-item
label=
"导入文件:"
>
<div
class=
"flex"
>
<el-input
v-model=
"file.fileName"
readonly
></el-input>
<div
class=
"import-button"
>
<el-button
class=
"default-btn"
:size=
"size"
type=
"default"
>
导入文件
<input
type=
"file"
class=
"upload-input"
accept=
".xlsx, .xls"
@
change=
"e => handleXlsxChange(e)"
ref=
"uploadInput"
/>
</el-button>
<el-button
class=
"download-btn"
type=
"text"
@
click=
"downloadXlsx"
>
模版下载
</el-button>
</div>
<!-- <el-input v-model="file.fileName" readonly></el-input> -->
<div
class=
"import-button"
>
<el-button
class=
"default-btn"
icon=
"el-icon-plus"
:size=
"size"
type=
"default"
>
导入文件
<input
type=
"file"
class=
"upload-input"
accept=
".xlsx, .xls"
@
change=
"e => handleXlsxChange(e)"
ref=
"uploadInput"
/>
</el-button>
<a
class=
"download-btn"
href=
"https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/众筹订单导入模板.xlsx"
>
模版下载
</a>
</div>
<div
class=
"import-tips"
v-if=
"file.fileName"
>
<i
class=
"el-icon-success"
></i>
文件上传成功({{ file.fileName }})
</div>
<div
class=
"import-tips"
v-else
>
支持扩展名:xlsx、xls、csv
</div>
</el-form-item>
</el-form>
</div>
</GLDialog>
<!-- 导入结果 -->
<GLDialog
v-for=
"item in tasks"
:key=
"item.id"
:before-close=
"
() => {
closeImport(item)
}
"
:visible
.
sync=
"item.importResultVisible"
title=
"导入结果"
mode=
"small"
:hasFooter=
"true"
type=
"success"
>
<
template
v-slot:default
>
<div
class=
"import-result"
>
<div
class=
"import-status"
><i
class=
"el-icon-success"
></i></div>
<div
class=
"import-desc"
>
{{
item
.
fileName
}}
导入完成
</div>
<div
class=
"import-num"
v-if=
"item.importResult && item.importResult.failAmount"
>
成功
<span>
{{
item
.
importResult
&&
item
.
importResult
.
successAmount
}}
</span>
条,失败
<span>
{{
item
.
importResult
&&
item
.
importResult
.
failAmount
}}
</span>
条
</div>
<div
class=
"import-num"
v-else
>
成功导入
<span>
{{
item
.
importResult
&&
item
.
importResult
.
successAmount
}}
</span>
条订单。
</div>
</div>
</
template
>
<
template
v-slot:footer
>
<div
class=
"import-footer"
>
<el-button
:size=
"size"
@
click=
"closeImport(item)"
>
完成
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"downloadError(item.importResult.failUrl)"
v-if=
"item.importResult && item.importResult.failAmount"
>
下载失败记录
</el-button>
</div>
</
template
>
</GLDialog>
</div>
</template>
...
...
@@ -585,7 +343,7 @@ const userInfo = [
{
label
:
'尾款凭证:'
,
key
:
'verificationVoucher'
}
,
}
]
export
default
{
name
:
'orderManage'
,
...
...
@@ -593,13 +351,15 @@ export default {
// SelectMember,
selectStaff
},
data
()
{
data
()
{
return
{
userInfo
,
isCancelVisible
:
false
,
cancelForm
:
{
reasonsForFailure
:
''
},
importResult
:
{},
tasks
:
[],
cancelRules
:
{
reasonsForFailure
:
[
{
...
...
@@ -771,7 +531,7 @@ export default {
orderCode
:
row
.
orderCode
,
afterSaleType
:
'2'
}
}
else
this
.
secondConfirm
(
'退款'
,
'请确定是否发起退款?'
,
'orderManage'
,
'crowdFundRefundApi'
,
{
orderCode
:
row
.
orderCode
,
afterSaleType
:
'1'
},
()
=>
{
},
this
.
searchForm
.
requestSource
!=
0
)
}
else
this
.
secondConfirm
(
'退款'
,
'请确定是否发起退款?'
,
'orderManage'
,
'crowdFundRefundApi'
,
{
orderCode
:
row
.
orderCode
,
afterSaleType
:
'1'
},
()
=>
{},
this
.
searchForm
.
requestSource
!=
0
)
}
}
},
...
...
@@ -860,7 +620,7 @@ export default {
this
.
secondConfirm
(
'设为已完结'
,
'请确定将此订单营销状态设为已完结?'
,
'orderManage'
,
'finishOrderStatus'
,
{
subOrderCode
:
row
.
orderCode
},
false
)
}
}
}
,
}
],
// 表格
getListApi
:
this
.
$apis
.
orderManage
.
getListApi
,
...
...
@@ -954,12 +714,12 @@ export default {
},
{
label
:
'活动名称'
,
prop
:
'activityName'
,
prop
:
'activityName'
}
]
},
importVisible
:
false
,
importResultVisible
:
false
,
file
:
{
fileName
:
''
,
fileType
:
''
...
...
@@ -969,211 +729,247 @@ export default {
}
},
mounted
()
{
mounted
()
{
this
.
getCrowdfundingOrderConfig
()
// this.getCount()
try
{
this
.
tasks
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'importTask'
))
||
[]
this
.
startTask
()
}
catch
(
e
)
{
console
.
log
(
e
)
}
},
computed
:
{
errorUrl
()
{
let
url
=
null
for
(
let
task
of
this
.
tasks
)
{
if
(
task
.
importResult
&&
task
.
importResult
.
failUrl
)
url
=
task
.
importResult
.
failUrl
}
return
url
}
},
beforeDestroy
()
{
for
(
let
task
of
this
.
tasks
)
{
clearInterval
(
task
.
timer
)
}
this
.
setStorage
()
},
methods
:
{
async
getCrowdfundingOrderConfig
()
{
startTask
()
{
// 启动所有任务
for
(
let
task
of
this
.
tasks
)
{
if
(
!
task
.
importResultVisible
&&
task
.
func
)
task
.
timer
=
setInterval
(()
=>
{
task
.
func
(
task
)
},
task
.
interval
)
}
},
async
getCrowdfundingOrderConfig
()
{
let
tableColumns
=
[
{
label
:
'客户名称'
,
prop
:
'customerName'
,
width
:
160
,
formatter
:
cellValue
=>
{
return
cellValue
.
customerName
||
'-'
}
},
{
label
:
'手机号'
,
prop
:
'customerPhone'
,
width
:
160
,
formatter
:
cellValue
=>
{
return
cellValue
.
customerPhone
||
'-'
}
},
{
label
:
'其他'
,
prop
:
'otherInformation'
,
width
:
210
},
{
label
:
'微信名称'
,
prop
:
'weChatName'
,
addHtml
:
'weChatName'
,
width
:
210
},
{
label
:
'推荐人'
,
prop
:
'shareStaffName'
,
width
:
210
,
addHtml
:
'shareStaffName'
},
{
label
:
'推荐人ID'
,
prop
:
'shareStaffId'
,
name
:
'shareStaffId'
,
width
:
210
,
},
{
label
:
'指派人'
,
prop
:
'assignName'
,
width
:
210
,
addHtml
:
'assignName'
},
{
label
:
'推荐人手机号'
,
prop
:
'shareStaffPhone'
,
width
:
160
,
formatter
:
cellValue
=>
{
return
cellValue
.
shareStaffPhone
||
'-'
}
},
{
label
:
'订单时间'
,
prop
:
'createdDate'
,
width
:
'180'
,
formatter
:
cellValue
=>
{
return
dayjs
(
cellValue
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
},
{
label
:
'支付时间'
,
prop
:
'payDate'
,
width
:
'180'
,
formatter
:
cellValue
=>
{
return
cellValue
.
payDate
?
dayjs
(
cellValue
.
payDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'-'
}
},
{
label
:
'核销时间'
,
prop
:
'verificationDate'
,
width
:
'180'
,
formatter
:
cellValue
=>
{
return
cellValue
.
verificationDate
?
dayjs
(
cellValue
.
verificationDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'-'
}
},
{
label
:
'车架号'
,
prop
:
'vinNo'
,
width
:
130
,
addHtml
:
'vinNo'
},
{
label
:
'订单状态'
,
prop
:
'orderStatus'
,
addHtml
:
'orderStatus'
,
width
:
160
},
{
label
:
'业务场景'
,
prop
:
'businessType'
,
{
label
:
'客户名称'
,
prop
:
'customerName'
,
width
:
160
,
formatter
:
cellValue
=>
{
return
cellValue
.
customerName
||
'-'
}
},
{
label
:
'手机号'
,
prop
:
'customerPhone'
,
width
:
160
,
formatter
:
cellValue
=>
{
return
cellValue
.
customerPhone
||
'-'
}
},
{
label
:
'其他'
,
prop
:
'otherInformation'
,
width
:
210
},
{
label
:
'微信名称'
,
prop
:
'weChatName'
,
addHtml
:
'weChatName'
,
width
:
210
},
{
label
:
'推荐人'
,
prop
:
'shareStaffName'
,
width
:
210
,
addHtml
:
'shareStaffName'
},
{
label
:
'推荐人ID'
,
prop
:
'shareStaffId'
,
name
:
'shareStaffId'
,
width
:
210
},
{
label
:
'指派人'
,
prop
:
'assignName'
,
width
:
210
,
addHtml
:
'assignName'
},
{
label
:
'推荐人手机号'
,
prop
:
'shareStaffPhone'
,
width
:
160
,
formatter
:
cellValue
=>
{
return
cellValue
.
shareStaffPhone
||
'-'
}
},
{
label
:
'订单时间'
,
prop
:
'createdDate'
,
width
:
'180'
,
formatter
:
cellValue
=>
{
return
dayjs
(
cellValue
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
},
{
label
:
'支付时间'
,
prop
:
'payDate'
,
width
:
'180'
,
formatter
:
cellValue
=>
{
return
cellValue
.
payDate
?
dayjs
(
cellValue
.
payDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'-'
}
},
{
label
:
'核销时间'
,
prop
:
'verificationDate'
,
width
:
'180'
,
formatter
:
cellValue
=>
{
return
cellValue
.
verificationDate
?
dayjs
(
cellValue
.
verificationDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'-'
}
},
{
label
:
'车架号'
,
prop
:
'vinNo'
,
width
:
130
,
addHtml
:
'vinNo'
},
{
label
:
'订单状态'
,
prop
:
'orderStatus'
,
addHtml
:
'orderStatus'
,
width
:
160
},
{
label
:
'业务场景'
,
prop
:
'businessType'
,
width
:
120
,
formatter
:
cellValue
=>
{
let
type
=
cellValue
.
businessType
if
(
type
)
{
return
businessType
.
find
(
item
=>
item
.
optionId
==
type
).
optionLabel
}
else
{
return
'-'
width
:
120
,
formatter
:
cellValue
=>
{
let
type
=
cellValue
.
businessType
if
(
type
)
{
return
businessType
.
find
(
item
=>
item
.
optionId
==
type
).
optionLabel
}
else
{
return
'-'
}
}
}
},
{
label
:
'线下订单'
,
prop
:
'isOffline'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
isOffline
==
1
?
'否'
:
cellValue
.
isOffline
==
0
?
'是'
:
'-'
}
},
{
label
:
'商品名称'
,
prop
:
''
,
width
:
'120'
,
formatter
:
cellValue
=>
{
return
cellValue
.
orderGoods
.
length
?
cellValue
.
orderGoods
.
map
(
item
=>
item
.
goodsName
).
join
(
','
)
:
'-'
}
},
{
label
:
'支付定金/元'
,
prop
:
'payPrice'
,
width
:
'120'
,
formatter
:
cellValue
=>
{
return
cellValue
.
payPrice
||
'0'
}
},
{
label
:
'活动名称'
,
prop
:
'activityName'
,
width
:
'120'
},
},
{
label
:
'线下订单'
,
prop
:
'isOffline'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
isOffline
==
1
?
'否'
:
cellValue
.
isOffline
==
0
?
'是'
:
'-'
}
},
{
label
:
'商品名称'
,
prop
:
''
,
width
:
'120'
,
formatter
:
cellValue
=>
{
return
cellValue
.
orderGoods
.
length
?
cellValue
.
orderGoods
.
map
(
item
=>
item
.
goodsName
).
join
(
','
)
:
'-'
}
},
{
label
:
'支付定金/元'
,
prop
:
'payPrice'
,
width
:
'120'
,
formatter
:
cellValue
=>
{
return
cellValue
.
payPrice
||
'0'
}
},
{
label
:
'活动名称'
,
prop
:
'activityName'
,
width
:
'120'
},
{
label
:
'门店信息'
,
prop
:
'merchantName'
,
line
:
1
,
width
:
280
},
{
label
:
'订单类型'
,
prop
:
'orderSource'
,
width
:
'100'
,
formatter
:
cellValue
=>
{
return
this
.
baseData
.
orderSourceList
.
map
(
item
=>
item
.
confId
).
includes
(
cellValue
.
orderSource
+
''
)
?
this
.
baseData
.
orderSourceList
.
find
(
item
=>
item
.
confId
==
cellValue
.
orderSource
).
confName
:
'-'
}
},
{
label
:
'测试单'
,
prop
:
'orderType'
,
width
:
'100'
,
addHtml
:
'orderType'
},
{
label
:
'退款类型'
,
prop
:
'afterSaleType'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
{
1
:
'退订单'
,
2
:
'退定金'
}[
cellValue
.
afterSaleType
]
||
'-'
}
},
{
label
:
'营销状态'
,
name
:
'marketingStatus'
,
width
:
180
,
addHtml
:
'marketingStatus'
,
},
{
label
:
'售后状态'
,
prop
:
'afterSaleStatus'
,
width
:
'100'
,
formatter
:
cellValue
=>
{
return
this
.
baseData
.
afterSaleStatusList
.
map
(
item
=>
item
.
confId
).
includes
(
cellValue
.
afterSaleStatus
+
''
)
?
this
.
baseData
.
afterSaleStatusList
.
find
(
item
=>
item
.
confId
==
cellValue
.
afterSaleStatus
).
confName
:
'-'
}
},
{
label
:
'结算方式'
,
prop
:
'deliveryType'
,
width
:
'100'
,
formatter
:
cellValue
=>
{
return
this
.
baseData
.
deliveryTypeList
.
map
(
item
=>
item
.
confId
).
includes
(
cellValue
.
deliveryType
+
''
)
?
this
.
baseData
.
deliveryTypeList
.
find
(
item
=>
item
.
confId
==
cellValue
.
deliveryType
).
confName
:
'-'
}
},
{
label
:
'订单编号'
,
prop
:
'orderCode'
,
width
:
'180'
},
{
label
:
'商户订单号'
,
prop
:
'outTradeNo'
,
width
:
'160'
,
formatter
:
cellValue
=>
{
return
cellValue
.
outTradeNo
||
'-'
{
label
:
'门店信息'
,
prop
:
'merchantName'
,
line
:
1
,
width
:
280
},
{
label
:
'订单类型'
,
prop
:
'orderSource'
,
width
:
'100'
,
formatter
:
cellValue
=>
{
return
this
.
baseData
.
orderSourceList
.
map
(
item
=>
item
.
confId
).
includes
(
cellValue
.
orderSource
+
''
)
?
this
.
baseData
.
orderSourceList
.
find
(
item
=>
item
.
confId
==
cellValue
.
orderSource
).
confName
:
'-'
}
},
{
label
:
'测试单'
,
prop
:
'orderType'
,
width
:
'100'
,
addHtml
:
'orderType'
},
{
label
:
'退款类型'
,
prop
:
'afterSaleType'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
{
1
:
'退订单'
,
2
:
'退定金'
}[
cellValue
.
afterSaleType
]
||
'-'
}
},
{
label
:
'营销状态'
,
name
:
'marketingStatus'
,
width
:
180
,
addHtml
:
'marketingStatus'
},
{
label
:
'订单来源'
,
name
:
'orderSourceType'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
{
0
:
'小程序订单'
,
1
:
'系统导入'
}[
cellValue
.
orderSourceType
]
||
'-'
}
},
{
label
:
'售后状态'
,
prop
:
'afterSaleStatus'
,
width
:
'100'
,
formatter
:
cellValue
=>
{
return
this
.
baseData
.
afterSaleStatusList
.
map
(
item
=>
item
.
confId
).
includes
(
cellValue
.
afterSaleStatus
+
''
)
?
this
.
baseData
.
afterSaleStatusList
.
find
(
item
=>
item
.
confId
==
cellValue
.
afterSaleStatus
).
confName
:
'-'
}
},
{
label
:
'结算方式'
,
prop
:
'deliveryType'
,
width
:
'100'
,
formatter
:
cellValue
=>
{
return
this
.
baseData
.
deliveryTypeList
.
map
(
item
=>
item
.
confId
).
includes
(
cellValue
.
deliveryType
+
''
)
?
this
.
baseData
.
deliveryTypeList
.
find
(
item
=>
item
.
confId
==
cellValue
.
deliveryType
).
confName
:
'-'
}
},
{
label
:
'订单编号'
,
prop
:
'orderCode'
,
width
:
'180'
},
{
label
:
'商户订单号'
,
prop
:
'outTradeNo'
,
width
:
'160'
,
formatter
:
cellValue
=>
{
return
cellValue
.
outTradeNo
||
'-'
}
}
}
],
],
searchFormData
=
[
{
label
:
'订单编号'
,
...
...
@@ -1254,12 +1050,12 @@ export default {
labelWidth
:
56
,
multiple
:
true
,
attrs
:
{
multipleLimit
:
10
,
multipleLimit
:
10
},
noFilter
:
false
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionLabel
:
'confName'
},
{
label
:
'客户姓名'
,
...
...
@@ -1319,7 +1115,7 @@ export default {
type
:
'select'
,
multiple
:
true
,
attrs
:
{
multipleLimit
:
10
,
multipleLimit
:
10
},
noFilter
:
false
,
optionList
:
[],
...
...
@@ -1375,7 +1171,7 @@ export default {
}
],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionLabel
:
'confName'
},
{
label
:
'线下订单'
,
...
...
@@ -1403,6 +1199,27 @@ export default {
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'marketingStatusList'
},
{
label
:
'订单来源'
,
name
:
'orderSourceType'
,
type
:
'select'
,
optionList
:
[
{
confId
:
null
,
confName
:
'全部'
},
{
confId
:
0
,
confName
:
'小程序订单'
},
{
confId
:
1
,
confName
:
'系统导入'
}
],
optionId
:
'confId'
,
optionLabel
:
'confName'
}
],
hideStatus
=
false
...
...
@@ -1435,7 +1252,7 @@ export default {
this
.
getOptionsList
(
'searchFormData'
)
this
.
getCrowdfundingParams
()
},
getParams
()
{
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchForm
.
createDate
?.
length
)
{
params
.
createdStartDateStr
=
new
Date
(
this
.
searchForm
.
createDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
...
...
@@ -1446,7 +1263,7 @@ export default {
return
params
},
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
tableSearchForm
=
this
.
getParams
()
delete
this
.
tableSearchForm
.
createDate
...
...
@@ -1454,7 +1271,7 @@ export default {
})
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
var
item
=
this
[
formName
].
find
(
k
=>
k
.
name
==
refreshSigle
)
var
index
=
this
[
formName
].
findIndex
(
k
=>
k
.
name
==
refreshSigle
)
...
...
@@ -1484,23 +1301,23 @@ export default {
}
},
//取消弹框,如果没有凭证,直接关闭
handleApprovalClose
()
{
if
(
this
.
approvalInfo
.
verificationVoucher
)
{
handleApprovalClose
()
{
if
(
this
.
approvalInfo
.
verificationVoucher
)
{
this
.
openPassDialog
()
}
else
{
}
else
{
this
.
writeOffApprovalVisible
=
false
}
},
// 确认不通过审批
confirmNoPass
(){
confirmNoPass
()
{
this
.
$refs
?.
cancelRef
?.
validate
(
valid
=>
{
if
(
valid
)
this
.
handleApprovalConfirm
(
1
)
if
(
valid
)
this
.
handleApprovalConfirm
(
1
)
})
},
// 确认通过审批
handleApprovalConfirm
(
type
)
{
handleApprovalConfirm
(
type
)
{
let
params
=
{
orderCode
:
this
.
orderCode
}
if
(
type
==
1
)
{
if
(
type
==
1
)
{
params
.
reasonsForFailure
=
this
.
cancelForm
.
reasonsForFailure
params
.
failureflag
=
true
}
...
...
@@ -1524,7 +1341,7 @@ export default {
this
.
isCancelVisible
=
true
},
// 核销审批
handleWriteOffApproval
(
val
)
{
handleWriteOffApproval
(
val
)
{
// val.orderCode = 'S2110081902337632'
this
.
orderCode
=
val
.
orderCode
this
.
$apis
.
orderManage
...
...
@@ -1532,28 +1349,29 @@ export default {
orderCode
:
val
.
orderCode
})
.
then
(
result
=>
{
if
(
result
)
{
if
(
result
.
verificationVoucher
)
{
if
(
result
)
{
if
(
result
.
verificationVoucher
)
{
result
.
confirmInstallTime
=
result
.
confirmInstallTime
?
dateFormat
(
result
.
confirmInstallTime
)
:
''
result
.
crowdFundingPrice
=
result
.
crowdFundingPrice
||
0
result
.
payPrice
=
result
.
payPrice
||
0
result
.
tailPrice
=
(
result
.
crowdFundingPrice
-
result
.
payPrice
)
+
'元'
result
.
tailPrice
=
result
.
crowdFundingPrice
-
result
.
payPrice
+
'元'
this
.
approvalInfo
=
result
this
.
writeOffApprovalVisible
=
true
}
else
{
}
else
{
this
.
$apis
.
orderManage
.
getInstallInfo
({
subOrderCode
:
val
.
orderCode
}).
then
(
result
=>
{
this
.
approvalInfo
=
result
this
.
writeOffApprovalVisible
=
true
})
.
getInstallInfo
({
subOrderCode
:
val
.
orderCode
})
.
then
(
result
=>
{
this
.
approvalInfo
=
result
this
.
writeOffApprovalVisible
=
true
})
}
}
})
})
},
// 订单指派
handlerAssign
(
item
)
{
handlerAssign
(
item
)
{
// this.
console
.
log
(
item
)
this
.
merchantId
=
item
.
merchantId
...
...
@@ -1561,7 +1379,7 @@ export default {
this
.
isStaffVisible
=
true
},
// 改变订单类型
changeOrderType
(
item
)
{
changeOrderType
(
item
)
{
console
.
log
(
item
)
let
params
=
{
subOrderCode
:
item
.
orderCode
,
...
...
@@ -1579,12 +1397,12 @@ export default {
// console.log(err)
// })
},
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
,
isResetPage
=
true
)
{
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
,
isResetPage
=
true
)
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
callback
:
utils
.
debounce
(
(
action
)
=>
{
callback
:
utils
.
debounce
(
action
=>
{
if
(
action
==
'confirm'
)
{
this
.
$apis
[
apiModule
][
apiName
](
apiParams
).
then
(
res
=>
{
this
.
$message
({
...
...
@@ -1602,7 +1420,7 @@ export default {
})
},
getCount
()
{
getCount
()
{
var
params
=
this
.
getParams
()
delete
params
.
createDate
// if(params.orderStatuses.includes('3')) return
...
...
@@ -1611,7 +1429,7 @@ export default {
})
},
handleDetail
(
row
)
{
handleDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/orderManage/orderDetail'
,
query
:
{
...
...
@@ -1621,7 +1439,7 @@ export default {
},
// 输入快递信息 - start
handleExpressClose
()
{
handleExpressClose
()
{
this
.
isExpressVisible
=
!
this
.
isExpressVisible
this
.
orderCode
=
''
this
.
expressForm
=
{
...
...
@@ -1630,7 +1448,7 @@ export default {
}
},
handleExpressConfirm
()
{
handleExpressConfirm
()
{
this
.
$refs
.
expressRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
expressForm
)
...
...
@@ -1650,14 +1468,14 @@ export default {
})
},
handleExpressInfo
(
row
)
{
handleExpressInfo
(
row
)
{
this
.
isExpressVisible
=
!
this
.
isExpressVisible
this
.
orderCode
=
row
.
orderCode
},
// 输入快递信息 - end
// 订单核销 - start
handleWriteOffClose
()
{
handleWriteOffClose
()
{
this
.
isWriteOffVisible
=
!
this
.
isWriteOffVisible
this
.
orderCode
=
''
this
.
writeOffForm
=
{
...
...
@@ -1665,7 +1483,7 @@ export default {
}
},
handleWriteOffConfirm
()
{
handleWriteOffConfirm
()
{
this
.
$refs
.
writeOffRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
writeOffForm
)
...
...
@@ -1685,17 +1503,17 @@ export default {
})
},
handleStaffClose
()
{
handleStaffClose
()
{
console
.
log
(
'dialogVisible'
)
this
.
isStaffVisible
=
!
this
.
isStaffVisible
},
handleDialogConfirm
()
{
handleDialogConfirm
()
{
this
.
handleStaffClose
()
this
.
handleSearch
()
},
handleWriteOff
(
row
)
{
handleWriteOff
(
row
)
{
if
(
row
.
orderSource
==
4
)
{
this
.
secondConfirm
(
'订单核销'
,
'请确定是否核销此订单?'
,
'orderManage'
,
'crowdFundWriteOffApi'
,
{
orderCode
:
row
.
orderCode
},
()
=>
{
},
this
.
searchForm
.
requestSource
!=
0
)
this
.
secondConfirm
(
'订单核销'
,
'请确定是否核销此订单?'
,
'orderManage'
,
'crowdFundWriteOffApi'
,
{
orderCode
:
row
.
orderCode
},
()
=>
{},
this
.
searchForm
.
requestSource
!=
0
)
return
true
}
this
.
isWriteOffVisible
=
!
this
.
isWriteOffVisible
...
...
@@ -1704,7 +1522,7 @@ export default {
// 订单核销 - end
// 退款审核 - start
handleExamineClose
()
{
handleExamineClose
()
{
this
.
isExamineVisible
=
!
this
.
isExamineVisible
this
.
orderCode
=
''
this
.
orderInfo
=
{}
...
...
@@ -1716,7 +1534,7 @@ export default {
}
},
submitExamine
(
params
)
{
submitExamine
(
params
)
{
this
.
$apis
.
orderManage
.
examineAllowApi
(
params
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
...
...
@@ -1730,7 +1548,7 @@ export default {
})
},
handleExamineConfirm
()
{
handleExamineConfirm
()
{
var
params
=
{
id
:
this
.
orderInfo
.
id
}
...
...
@@ -1749,7 +1567,7 @@ export default {
}
},
handleExamine
(
row
)
{
handleExamine
(
row
)
{
this
.
orderCode
=
row
.
orderCode
this
.
$apis
.
orderManage
.
examineDetailApi
({
orderCode
:
row
.
orderCode
}).
then
(
res
=>
{
this
.
orderInfo
=
res
||
{}
...
...
@@ -1761,13 +1579,13 @@ export default {
// 退款审核 - end
// 确认收货 - start
handleReceivingClose
()
{
handleReceivingClose
()
{
this
.
isReceivingVisible
=
!
this
.
isReceivingVisible
this
.
orderCode
=
''
this
.
orderInfo
=
{}
},
handleReceivingConfirm
()
{
handleReceivingConfirm
()
{
var
params
=
{
id
:
this
.
orderInfo
.
id
}
...
...
@@ -1784,7 +1602,7 @@ export default {
})
},
handleReceiving
(
row
)
{
handleReceiving
(
row
)
{
this
.
$apis
.
orderManage
.
examineDetailApi
({
orderCode
:
row
.
orderCode
}).
then
(
res
=>
{
this
.
orderInfo
=
res
||
{}
this
.
orderInfo
.
refundTypeName
=
[
1
,
2
,
3
].
includes
(
this
.
orderInfo
.
refundType
)
?
this
.
baseData
.
refundTypeList
.
find
(
item
=>
item
.
confId
==
this
.
orderInfo
.
refundType
+
''
).
confName
:
'-'
...
...
@@ -1794,49 +1612,48 @@ export default {
},
// 确认收货 - end
setTableFinishFun
()
{
setTableFinishFun
()
{
this
.
$refs
.
allOrderRef
.
data
.
forEach
(
item
=>
{
item
.
vinNo
=
item
.
vin
?
(
item
.
vin
.
split
(
','
).
length
>
1
?
item
.
vin
.
split
(
','
)
:
item
.
vin
)
:
'-'
})
//接收到的数据为空
this
.
$refs
.
allOrderRef
.
data
.
length
?
(
this
.
$refs
.
allOrderRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
allOrderRef
.
setTableHeightFun
()
this
.
getCount
()
},
handleSearch
()
{
handleSearch
()
{
// this.$refs.allOrderRef.refreshTable(true, false)
this
.
$refs
.
allOrderRef
.
refreshTable
()
},
handleTabClick
()
{
handleTabClick
()
{
this
.
handleSearch
()
},
handleExport
(
row
)
{
handleExport
(
row
)
{
var
params
=
this
.
getParams
()
this
.
$apis
.
orderManage
.
orderExportApi
(
params
).
then
(
res
=>
{
exportFn
(
res
)
})
},
handleReset
()
{
handleReset
()
{
this
.
searchForm
=
this
.
$options
.
data
.
call
(
this
).
searchForm
this
.
handleSearch
()
},
selectionTable
(
selectList
)
{
selectionTable
(
selectList
)
{
this
.
selectList
=
selectList
.
filter
(
e
=>
e
.
orderCode
)
},
async
refundFun
()
{
async
refundFun
()
{
let
{
refundParams
}
=
this
const
res
=
this
.
$apis
.
orderManage
.
crowdFundRefundApi
(
refundParams
)
this
.
refundVisible
=
false
this
.
searchForm
.
requestSource
!=
0
?
this
.
handleSearch
()
:
this
.
$refs
.
allOrderRef
.
refreshTable
(
false
)
},
async
getCrowdfundingParams
()
{
async
getCrowdfundingParams
()
{
/**参数类型 1:众筹活动名称(返回类型String),2:众筹活动门店 */
const
activity
=
await
this
.
$apis
.
seckillActivity
.
getCrowdfundingParams
({
parameterType
:
1
...
...
@@ -1868,7 +1685,7 @@ export default {
this
.
$set
(
this
.
searchFormData
[
merchantNamesIndex
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
merchantNameList
))
},
async
batchRefundOrder
()
{
async
batchRefundOrder
()
{
let
{
selectList
}
=
this
,
orderCodes
=
[]
console
.
table
(
selectList
)
...
...
@@ -1889,14 +1706,10 @@ export default {
}
},
handleXlsxChange
(
e
)
{
handleXlsxChange
(
e
)
{
let
[
file
]
=
e
.
srcElement
.
files
,
reader
=
new
FileReader
()
if
(
!
file
)
return
this
.
$notify
({
title
:
'提示'
,
message
:
'文件上传中,请稍后'
})
// 默认1MB
this
.
file
.
fileName
=
file
.
name
reader
.
readAsDataURL
(
file
)
...
...
@@ -1912,28 +1725,72 @@ export default {
})
}
},
importFun
()
{
let
{
file
:
{
fileType
,
fileName
}
}
=
this
if
(
fileType
)
this
.
$apis
.
orderManage
.
importCrowdFundingOrder
({
file
:
fileType
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
)
{
closeImport
(
task
)
{
task
.
importResultVisible
=
false
this
.
setStorage
()
},
//轮询导入结果接口
importGetById
(
task
)
{
this
.
$apis
.
orderManage
.
importGetById
({
id
:
task
.
id
}).
then
(
res
=>
{
if
(
res
.
status
)
{
clearInterval
(
task
.
timer
)
task
.
importResult
=
res
task
.
func
=
null
task
.
importResultVisible
=
true
this
.
$notify
({
title
:
'提示'
,
message
:
'订单导入成功
'
,
message
:
task
.
fileName
+
'导入完成
'
,
type
:
'success'
})
this
.
visibleImportDialog
()
this
.
searchForm
.
requestSource
!=
0
?
this
.
handleSearch
()
:
this
.
$refs
.
allOrderRef
.
refreshTable
(
false
)
this
.
setStorage
()
this
.
handleSearch
(
)
}
})
else
this
.
$message
.
error
(
fileName
?
'文件上传中,请稍后'
:
'请上传文件后,在点击确定'
)
},
setStorage
()
{
sessionStorage
.
setItem
(
'importTask'
,
JSON
.
stringify
(
this
.
tasks
))
},
async
importFun
()
{
let
{
file
:
{
fileType
,
fileName
}
}
=
this
if
(
fileType
)
{
let
id
=
await
this
.
$apis
.
orderManage
.
importOrder
({
file
:
fileType
})
downloadXlsx
()
{
this
.
visibleImportDialog
()
for
(
let
task
of
this
.
tasks
)
{
clearInterval
(
task
.
timer
)
}
this
.
tasks
.
push
({
id
,
interval
:
3000
,
func
:
this
.
importGetById
,
importResult
:
{},
importResultVisible
:
false
,
fileName
})
this
.
startTask
()
this
.
setStorage
()
}
// if (res) {
// this.$notify({
// title: '提示',
// message: '订单导入成功',
// type: 'success'
// })
// this.visibleImportDialog()
// }
// else this.$message.error(fileName ? '文件上传中,请稍后' : '请上传文件后,在点击确定')
},
downloadError
(
url
)
{
var
alink
=
document
.
createElement
(
'a'
)
alink
.
href
=
url
.
replace
(
/^https
?
:/
,
''
)
alink
.
click
()
alink
.
remove
()
// this.searchForm.requestSource != 0 ? this.handleSearch() : this.$refs.allOrderRef.refreshTable(false)
},
downloadXlsx
()
{
var
alink
=
document
.
createElement
(
'a'
)
alink
.
href
=
'//img02.glsx.com.cn/weapp/resource/saas/scrm/xlsx/订单导入模板.xlsx'
alink
.
setAttribute
(
'target'
,
'_blank'
)
...
...
@@ -1942,13 +1799,14 @@ export default {
alink
.
remove
()
},
visibleImportDialog
(
val
=
false
)
{
visibleImportDialog
(
val
=
false
)
{
if
(
this
.
$refs
?.
uploadInput
)
this
.
$refs
.
uploadInput
.
value
=
null
this
.
file
=
{
fileName
:
''
,
fileType
:
''
}
this
.
importVisible
=
val
if
(
!
val
)
this
.
importResultVisible
=
true
}
}
}
...
...
@@ -2076,7 +1934,7 @@ export default {
margin
:
0
8px
0
0
!important
;
}
}
.el-select
.el-select__tags
>
span
{
.el-select
.el-select__tags
>
span
{
width
:
80%
;
display
:
flex
!important
;
}
...
...
@@ -2087,12 +1945,15 @@ export default {
.el-dialog__body
{
height
:
70px
!important
;
min-height
:
70px
!important
;
max-height
:
70px
!important
;
}
.import-button
{
position
:
relative
;
margin-left
:
10px
;
margin
:
6px
;
display
:
flex
;
cursor
:
pointer
;
a
{
color
:
#5850ff
;
}
.upload-input
{
position
:
absolute
;
top
:
0
;
...
...
@@ -2104,10 +1965,45 @@ export default {
cursor
:
pointer
!important
;
}
}
.import-tips
{
font-size
:
14px
;
color
:
#999999
;
margin-top
:
-10px
;
height
:
20px
;
i
{
color
:
rgb
(
60
,
202
,
121
);
}
}
.download-btn
{
position
:
absolute
;
top
:
110%
;
right
:
0
;
margin-left
:
10px
;
}
.import-footer
{
display
:
flex
;
margin
:
auto
;
}
}
.import-result
{
text-align
:
center
;
.import-status
{
margin
:
10px
auto
;
i
{
color
:
rgb
(
60
,
202
,
121
);
font-size
:
48px
;
}
}
.import-desc
{
color
:
#333333
;
margin
:
10px
;
}
.import-num
{
color
:
#666666
ff
;
font-size
:
14px
;
span
{
color
:
#5850ff
ff
;
&:nth-child(2)
{
color
:
#eb4e4e
;
}
}
}
}
.btn-group
{
...
...
@@ -2115,25 +2011,25 @@ export default {
margin-left
:
8px
;
}
}
.approvalWrap
{
.approvalWrap
{
margin-left
:
84px
;
}
.noPassDialog
{
.tip{
.noPassDialog
{
.tip
{
margin-left
:
72px
;
width
:
522px
;
font-weight
:
400
;
font-size
:
14px
;
color
:
#666666
;
}
.form
{
.form
{
margin-top
:
16px
;
.el-form-item__label{
.el-form-item__label
{
height
:
32px
;
line-height
:
32px
;
padding-right
:
10px
;
}
.el-textarea__inner
{
.el-textarea__inner
{
font-family
:
auto
;
}
}
...
...
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