Commit 7c0124e5 by 杨明

fixed

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