升级Vue3,iView替换ElementPlus

- 删除babel配置、更新依赖与入口初始化
- 全量替换UI组件、样式适配,新增迁移文档与标签/过滤器自动化替换脚本
This commit is contained in:
lifenlong
2026-06-05 17:49:43 +08:00
parent 615ee91511
commit 832fda813b
322 changed files with 25693 additions and 24453 deletions

View File

@@ -2,33 +2,33 @@
<div>
<card _Title="收货地址" />
<div class="add-box">
<Form :model="formData" ref="form" label-position="left" :label-width="100" :rules="ruleInline">
<FormItem label="收件人" prop="name">
<i-input v-model="formData.name" placeholder="请输入收件人姓名" style="width: 600px"></i-input>
</FormItem>
<FormItem label="收件地区" prop="address">
<el-form :model="formData" ref="form" label-position="left" label-width="100px" :rules="ruleInline">
<el-form-item label="收件人" prop="name">
<el-input v-model="formData.name" placeholder="请输入收件人姓名" style="width: 600px"></el-input>
</el-form-item>
<el-form-item label="收件地区" prop="address">
<span>{{ formData.address || '暂无地址' }}</span>
<Button type="default" style="margin-left: 10px;" size="small" @click="$refs.map.open()">选择</Button>
</FormItem>
<FormItem label="详细地址" prop="detail">
<i-input v-model="formData.detail" placeholder="请输入详细地址" style="width: 600px"></i-input>
</FormItem>
<FormItem label="手机号码" prop="mobile">
<i-input v-model="formData.mobile" placeholder="请输入收件人手机号" style="width: 600px"></i-input>
</FormItem>
<FormItem label="地址别名">
<i-input v-model="formData.alias" length :maxlength="4" placeholder="请输入地址别名,例如公司" style="width: 600px">
</i-input>
</FormItem>
<FormItem label="默认地址">
<i-switch v-model="formData.isDefault" />
</FormItem>
</Form>
<el-button type="default" style="margin-left: 10px;" size="small" @click="$refs.map.open()">选择</el-button>
</el-form-item>
<el-form-item label="详细地址" prop="detail">
<el-input v-model="formData.detail" placeholder="请输入详细地址" style="width: 600px"></el-input>
</el-form-item>
<el-form-item label="手机号码" prop="mobile">
<el-input v-model="formData.mobile" placeholder="请输入收件人手机号" style="width: 600px"></el-input>
</el-form-item>
<el-form-item label="地址别名">
<el-input v-model="formData.alias" length :maxlength="4" placeholder="请输入地址别名,例如公司" style="width: 600px">
</el-input>
</el-form-item>
<el-form-item label="默认地址">
<el-switch v-model="formData.isDefault" />
</el-form-item>
</el-form>
</div>
<div class="mt_20">
<Button type="primary" class="mr_10" :loading="loading" @click="save">保存收货地址</Button>
<Button @click="$router.back()">返回</Button>
<el-button type="primary" class="mr_10" :loading="loading" @click="save">保存收货地址</el-button>
<el-button @click="$router.back()">返回</el-button>
</div>
<multipleMap ref="map" @callback="getAddress" />
@@ -124,15 +124,15 @@ export default {
if(val.type === 'select'){
const paths = val.data.map(item => item.name).join(',')
const ids = val.data.map(item => item.id).join(',')
this.$set(this.formData,'address',paths)
this.$set(this.formData,'consigneeAddressIdPath',ids)
this.formData['address'] = paths
this.formData['consigneeAddressIdPath'] = ids
const coord = val.data[val.data.length - 1].center.split(',')
this.formData.lat = coord[1]
this.formData.lon = coord[0]
}else{
this.$set(this.formData, "address", val.data.addr);
this.$set(this.formData, "consigneeAddressIdPath", val.data.addrId);
this.$set(this.formData, "detail", val.data.address);
this.formData["address"] = val.data.addr;
this.formData["consigneeAddressIdPath"] = val.data.addrId;
this.formData["detail"] = val.data.address;
this.formData.lat = val.data.position.lat;
this.formData.lon = val.data.position.lng;
}

View File

@@ -5,12 +5,12 @@
<!-- 搜索 筛选 -->
<div class="mb_20 box">
<div class="global_float_right">
<Input
<el-input
class="width_300"
search
enter-button
v-model="params.keywords"
@on-search="getList"
@keyup.enter="getList"
placeholder="请输入订单号搜索"
/>
</div>
@@ -18,18 +18,18 @@
<!-- 列表 -->
<empty v-if="orderList.length === 0"/>
<div class="order-content" v-else>
<template v-for="(order, onderIndex) in orderList">
<div class="order-list" :key="onderIndex">
<template v-for="(order, onderIndex) in orderList" :key="order.sn || onderIndex">
<div class="order-list">
<div class="order-header">
<div>
<div v-if="order.serviceStatus">{{ filterOrderStatus(order.serviceStatus) }}</div>
<div>
售后单号{{ order.sn }} &nbsp; &nbsp; &nbsp;{{ order.createTime }}
&nbsp; &nbsp;{{ order.memberName | secrecyMobile }}
&nbsp; &nbsp;{{ $filters.secrecyMobile( order.memberName ) }}
</div>
</div>
<div>
<span>申请退款金额<span class="global_color">{{ order.applyRefundPrice | unitPrice("¥") }}</span></span>
<span>申请退款金额<span class="global_color">{{ $filters.unitPrice(order.applyRefundPrice, "¥") }}</span></span>
</div>
</div>
<div class="order-body">
@@ -47,33 +47,31 @@
</div>
<div>
<!-- 订单基础操作 -->
<Button @click="goDetail(order.sn)" type="info" size="small">售后详情</Button>
<Button @click="openModal(order)"
<el-button @click="goDetail(order.sn)" type="info" size="small">售后详情</el-button>
<el-button @click="openModal(order)"
v-if="order.serviceStatus == 'PASS' &&
order.serviceType != 'RETURN_MONEY'"
type="warning" size="small">提交物流
</Button>
<Button @click="cancel(order.sn)" type="error" v-if="order.afterSaleAllowOperationVO.cancel" size="small">
</el-button>
<el-button @click="cancel(order.sn)" type="danger" v-if="order.afterSaleAllowOperationVO.cancel" size="small">
取消售后
</Button>
</el-button>
</div>
</div>
</div>
</template>
<Spin size="large" fix v-if="spinShow"></Spin>
<el-skeleton size="large" fix v-if="spinShow"></el-skeleton>
</div>
<!-- 分页 -->
<div class="page-size">
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-sizer>
</Page>
<el-pagination :total="total" @current-change="changePageNum"
@size-change="changePageSize"
:page-size="params.pageSize" layout="sizes, prev, pager, next"></el-pagination>
</div>
<Modal v-model="logisticsShow" width="530">
<p slot="header">
<el-dialog v-model="logisticsShow" width="530">
<template #header><p>
<span>提交物流信息</span>
</p>
</p></template>
<div>
<div class="goods-list modal-goods">
<img @click="goodsDetail(singleOrder.skuId, singleOrder.goodsId)" class="hover-color"
@@ -84,31 +82,30 @@
</div>
<div class="mt_10">
<span class="global_color"
>{{ singleOrder.flowPrice | unitPrice("¥") }} </span
>x {{ singleOrder.num }}
>{{ $filters.unitPrice(singleOrder.flowPrice, "¥") }} </span>x {{ singleOrder.num }}
</div>
</div>
</div>
<Form ref="form" :model="form" label-position="left" :label-width="100" :rules="rules">
<FormItem label="物流公司" prop="logisticsId">
<Select v-model="form.logisticsId" placeholder="请选择物流公司">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
</FormItem>
<FormItem label="物流单号" prop="logisticsNo">
<Input v-model="form.logisticsNo" placeholder="请填写物流单号"></Input>
</FormItem>
<FormItem label="发货时间" prop="mDeliverTime">
<DatePicker type="date" style="width:100%" v-model="form.mDeliverTime" @on-change="changeTime"
format="yyyy-MM-dd" placeholder="选择发货时间"></DatePicker>
</FormItem>
</Form>
<el-form ref="form" :model="form" label-position="left" label-width="100px" :rules="rules">
<el-form-item label="物流公司" prop="logisticsId">
<el-select v-model="form.logisticsId" placeholder="请选择物流公司">
<el-option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</el-option>
</el-select>
</el-form-item>
<el-form-item label="物流单号" prop="logisticsNo">
<el-input v-model="form.logisticsNo" placeholder="请填写物流单号"></el-input>
</el-form-item>
<el-form-item label="发货时间" prop="mDeliverTime">
<el-date-picker type="date" style="width:100%" v-model="form.mDeliverTime" @change="changeTime"
format="yyyy-MM-dd" placeholder="选择发货时间"></el-date-picker>
</el-form-item>
</el-form>
</div>
<div slot="footer" style="text-align: right">
<Button @click="logisticsShow = false">关闭</Button>
<Button type="primary" :loading="submitLoading" @click="submitDelivery">提交</Button>
</div>
</Modal>
<template #footer><div style="text-align: right">
<el-button @click="logisticsShow = false">关闭</el-button>
<el-button type="primary" :loading="submitLoading" @click="submitDelivery">提交</el-button>
</div></template>
</el-dialog>
</div>
</template>
@@ -324,7 +321,7 @@ export default {
}
}
.ivu-icon {
.el-icon {
color: #ff8f23;
cursor: pointer;
@@ -337,7 +334,7 @@ export default {
> div:nth-child(3) {
width: 100px;
.ivu-btn {
.el-button {
margin-bottom: 10px;
}
}

View File

@@ -2,12 +2,12 @@
<div class="order-detail">
<card _Title="售后详情" :_Size="16"></card>
<!-- 操作按钮 -->
<Card class="mb_10" v-if="(afterSale.serviceStatus == 'PASS' &&
<el-card class="mb_10" shadow="never" v-if="(afterSale.serviceStatus == 'PASS' &&
afterSale.serviceType != 'RETURN_MONEY') || (afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel)">
<Button type="success" @click="openModal" v-if="afterSale.serviceStatus == 'PASS' &&
afterSale.serviceType != 'RETURN_MONEY'" size="small">提交物流</Button>&nbsp;
<Button type="error" @click="cancel(afterSale.sn)" v-if="afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel" size="small">取消售后</Button>
</Card>
<el-button type="success" @click="openModal" v-if="afterSale.serviceStatus == 'PASS' &&
afterSale.serviceType != 'RETURN_MONEY'" size="small">提交物流</el-button>&nbsp;
<el-button type="danger" @click="cancel(afterSale.sn)" v-if="afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel" size="small">取消售后</el-button>
</el-card>
<div class="order-card">
<h3>{{afterSale.serviceName}}</h3>
<p class="global_color fontsize_18">{{ afterSale.orderStatusValue }}</p>
@@ -25,14 +25,13 @@
</div>
<div class="order-card">
<h3>售后进程</h3>
<Steps class="progress" :current="logList.length" direction="vertical">
<Step
:content="'操作人:'+ log.operatorName + ' ' + log.createTime"
<el-steps class="progress" :current="logList.length" direction="vertical">
<el-step :content="'操作人:'+ log.operatorName + ' ' + log.createTime"
:title="log.message"
v-for="(log, index) in logList"
:key="index"
></Step>
</Steps>
></el-step>
</el-steps>
</div>
<div class="order-card">
<h3 class="mb_10">服务单信息</h3>
@@ -41,10 +40,10 @@
<td>退款方式</td><td>{{afterSale.refundWay == 'ORIGINAL' ? '原路退回' : '账号退款'}}</td>
</tr>
<tr>
<td>申请退款金额</td><td>{{afterSale.applyRefundPrice | unitPrice('¥')}}</td>
<td>申请退款金额</td><td>{{ $filters.unitPrice(afterSale.applyRefundPrice, '¥') }}</td>
</tr>
<tr v-if="afterSale.actualRefundPrice">
<td>实际退款金额</td><td>{{afterSale.actualRefundPrice | unitPrice('¥')}}</td>
<td>实际退款金额</td><td>{{ $filters.unitPrice(afterSale.actualRefundPrice, '¥') }}</td>
</tr>
<template v-if="afterSale.refundWay === 'OFFLINE'">
<tr>
@@ -74,30 +73,30 @@
<img :src="img" width="200" height="200" @click="perviewImg(img)" class="hover-pointer" alt="">
</div>
</div>
<Modal v-model="logisticsShow" width="530">
<p slot="header">
<el-dialog v-model="logisticsShow" width="530">
<template #header><p>
<span>提交物流信息</span>
</p>
</p></template>
<div>
<Form ref="form" :model="form" label-position="left" :label-width="100" :rules="rules">
<FormItem label="物流公司" prop="logisticsId">
<Select v-model="form.logisticsId" placeholder="请选择物流公司">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
</FormItem>
<FormItem label="物流单号" prop="logisticsNo">
<Input v-model="form.logisticsNo" placeholder="请填写物流单号"></Input>
</FormItem>
<FormItem label="发货时间" prop="mDeliverTime">
<DatePicker type="date" style="width:100%" v-model="form.mDeliverTime" @on-change="changeTime" format="yyyy-MM-dd" placeholder="选择发货时间"></DatePicker>
</FormItem>
</Form>
<el-form ref="form" :model="form" label-position="left" label-width="100px" :rules="rules">
<el-form-item label="物流公司" prop="logisticsId">
<el-select v-model="form.logisticsId" placeholder="请选择物流公司">
<el-option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</el-option>
</el-select>
</el-form-item>
<el-form-item label="物流单号" prop="logisticsNo">
<el-input v-model="form.logisticsNo" placeholder="请填写物流单号"></el-input>
</el-form-item>
<el-form-item label="发货时间" prop="mDeliverTime">
<el-date-picker type="date" style="width:100%" v-model="form.mDeliverTime" @change="changeTime" format="yyyy-MM-dd" placeholder="选择发货时间"></el-date-picker>
</el-form-item>
</el-form>
</div>
<div slot="footer" style="text-align: right">
<Button @click="logisticsShow = false">关闭</Button>
<Button type="primary" :loading="submitLoading" @click="submitDelivery">提交</Button>
</div>
</Modal>
<template #footer><div style="text-align: right">
<el-button @click="logisticsShow = false">关闭</el-button>
<el-button type="primary" :loading="submitLoading" @click="submitDelivery">提交</el-button>
</div></template>
</el-dialog>
</div>
</template>
<script>
@@ -139,7 +138,7 @@ export default {
if (pattern3.test(this.afterSale.reason)) {
this.getReason(this.afterSale.serviceType)
} else {
this.$set(this.afterSale, 'reasonName', this.afterSale.reason)
this.afterSale['reasonName'] = this.afterSale.reason
}
}
})
@@ -150,7 +149,7 @@ export default {
this.reasonList = res.result
this.reasonList.forEach(e => {
if (e.id === this.afterSale.reason) {
this.$set(this.afterSale, 'reasonName', e.reason)
this.afterSale['reasonName'] = e.reason
}
})
}

View File

@@ -1,49 +1,51 @@
<template>
<div class="apply-after-sale">
<card _Title="申请售后"></card>
<Table
border
:columns="columns"
:data="goodsData"
>
<template slot-scope="{ row }" slot="goodsName">
<div style="padding:5px;display:flex;">
<img :src="row.image" style="vertical-align: top;" width="60" height="60" alt=""> <span class="ml_10">{{row.goodsName}}</span>
</div>
</template>
<template slot-scope="{ row }" slot="goodsPrice">
<div>{{row.applyRefundPrice | unitPrice('¥')}}</div>
</template>
</Table>
<el-table :data="goodsData" border>
<el-table-column label="商品名称">
<template #default="{ row }">
<div style="padding:5px;display:flex;">
<img :src="row.image" style="vertical-align: top;" width="60" height="60" alt="">
<span class="ml_10">{{ row.goodsName }}</span>
</div>
</template>
</el-table-column>
<el-table-column label="价格">
<template #default="{ row }">
<div>{{ $filters.unitPrice(row.applyRefundPrice, '¥') }}</div>
</template>
</el-table-column>
<el-table-column prop="num" label="购买数量" />
</el-table>
<div>
<Form :model="form" ref="form" class="mt_10" :rules="rules" :label-width="80">
<FormItem label="售后类别">
<RadioGroup v-model="form.serviceType" @on-change="changeReason" type="button" button-style="solid">
<Radio v-if="info.returnGoods" label="RETURN_GOODS">退货</Radio>
<Radio v-if="info.returnMoney" label="RETURN_MONEY">退款</Radio>
</RadioGroup>
</FormItem>
<FormItem label="提交数量" prop="num">
<Input type="number" v-model="form.num" style="width:260px" />
</FormItem>
<FormItem label="提交原因" prop="reason">
<Select v-model="form.reason" style="width:260px">
<Option v-for="item in reasonList" :value="item.id" :key="item.id">{{ item.reason }}</Option>
</Select>
</FormItem>
<FormItem label="问题描述" prop="problemDesc">
<Input type="textarea" :rows="4" maxlength="500" style="width:260px" show-word-limit v-model="form.problemDesc" />
</FormItem>
<FormItem label="图片信息">
<el-form :model="form" ref="form" class="mt_10" :rules="rules" label-width="80px">
<el-form-item label="售后类别">
<el-radio-group v-model="form.serviceType" @change="changeReason" type="button" button-style="solid">
<el-radio v-if="info.returnGoods" label="RETURN_GOODS">退货</el-radio>
<el-radio v-if="info.returnMoney" label="RETURN_MONEY">退款</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="提交数量" prop="num">
<el-input type="number" v-model="form.num" style="width:260px" />
</el-form-item>
<el-form-item label="提交原因" prop="reason">
<el-select v-model="form.reason" style="width:260px">
<el-option v-for="item in reasonList" :value="item.id" :key="item.id">{{ item.reason }}</el-option>
</el-select>
</el-form-item>
<el-form-item label="问题描述" prop="problemDesc">
<el-input type="textarea" :rows="4" maxlength="500" style="width:260px" show-word-limit v-model="form.problemDesc" />
</el-form-item>
<el-form-item label="图片信息">
<div style="display:flex;align-items:center;">
<div class="demo-upload-list" v-for="(img, index) in uploadList" :key="index">
<img :src="img">
<div class="demo-upload-list-cover">
<Icon type="ios-eye-outline" @click.native="handleView(img)"></Icon>
<Icon type="ios-trash-outline" @click.native="handleRemove(index)"></Icon>
<el-icon @click="handleView(img)"><View /></el-icon>
<el-icon @click="handleRemove(index)"><Delete /></el-icon>
</div>
</div>
<Upload
<el-upload
:show-upload-list="false"
:on-success="handleSuccess"
:before-upload="handleBeforeUpload"
@@ -52,44 +54,46 @@
:headers="accessToken"
style="display: inline-block;width:58px;">
<div class="hover-pointer icon-upload" style="">
<Icon type="md-add" size="20"></Icon>
<el-icon :size="20"><Plus /></el-icon>
</div>
</Upload>
</el-upload>
</div>
</FormItem>
<FormItem label="退款方式">
</el-form-item>
<el-form-item label="退款方式">
<div>{{info.refundWay == 'ORIGINAL' ? '原路退回' : '账号退款'}}</div>
</FormItem>
</el-form-item>
<template v-if="info.accountType === 'BANK_TRANSFER' && info.applyRefundPrice != 0">
<FormItem label="开户行" prop="bankDepositName">
<Input v-model="form.bankDepositName" type="text" placeholder="请输入银行开户行" style="width:260px" />
</FormItem>
<FormItem label="开户名" prop="bankAccountName">
<Input v-model="form.bankAccountName" type="text" placeholder="请输入银行开户名" style="width:260px" />
</FormItem>
<FormItem label="银行账号" prop="bankAccountNumber">
<Input v-model="form.bankAccountNumber" type="text" placeholder="请输入银行账号" style="width:260px" />
</FormItem>
<el-form-item label="开户行" prop="bankDepositName">
<el-input v-model="form.bankDepositName" type="text" placeholder="请输入银行开户行" style="width:260px" />
</el-form-item>
<el-form-item label="开户名" prop="bankAccountName">
<el-input v-model="form.bankAccountName" type="text" placeholder="请输入银行开户名" style="width:260px" />
</el-form-item>
<el-form-item label="银行账号" prop="bankAccountNumber">
<el-input v-model="form.bankAccountNumber" type="text" placeholder="请输入银行账号" style="width:260px" />
</el-form-item>
</template>
<FormItem label="返回方式" v-if="form.serviceType === 'RETURN_GOODS'">
<el-form-item label="返回方式" v-if="form.serviceType === 'RETURN_GOODS'">
<div>快递至第三方卖家</div>
</FormItem>
<FormItem>
<Button type="primary" @click="apply">提交申请</Button>
</FormItem>
</Form>
<Modal title="View Image" v-model="visible">
</el-form-item>
<el-form-item>
<el-button type="primary" @click="apply">提交申请</el-button>
</el-form-item>
</el-form>
<el-dialog title="View Image" v-model="visible">
<img :src="previewImage" v-if="visible" style="width: 100%">
</Modal>
</el-dialog>
</div>
</div>
</template>
<script>
import { Delete, Plus, View } from '@element-plus/icons-vue';
import { afterSaleReason, afterSaleInfo, applyAfterSale } from '@/api/member.js'
import { commonUrl } from '@/plugins/request.js';
import storage from '@/plugins/storage';
import * as RegExp from '@/plugins/RegExp'
export default {
components: { Delete, Plus, View },
data () {
const checkNum = (rule, value, callback) => {
if (value === '') {
@@ -104,11 +108,6 @@ export default {
}
};
return {
columns: [ // 表格表头
{title: '商品名称', slot: 'goodsName'},
{title: '价格', slot: 'goodsPrice'},
{title: '购买数量', key: 'num'}
],
goodsData: [], // 商品数据
reasonList: [], // 售后原因列表
info: {}, // 售后信息

View File

@@ -12,26 +12,26 @@
<div class="goods-con">
<img :src="orderGoods.image" class="hover-pointer" alt="" width="100" @click="goGoodsDetail(orderGoods.skuId, orderGoods.goodsId)">
<p class="hover-pointer color999" @click="goGoodsDetail(orderGoods.skuId, orderGoods.goodsId)">{{orderGoods.goodsName}}</p>
<p>{{orderGoods.goodsPrice | unitPrice('¥')}}</p>
<p>{{ $filters.unitPrice(orderGoods.goodsPrice, '¥') }}</p>
</div>
<div class="eval-con">
<div>
<span class="color999">投诉主题</span>
<Select v-model="form.complainTopic" style="width:260px;margin-bottom:10px">
<Option v-for="item in reasonList" :value="item.reason" :key="item.id">{{ item.reason }}</Option>
</Select>
<Input type="textarea" maxlength="500" show-word-limit :rows="4" placeholder="请输入投诉内容" v-model="form.content" />
<el-select v-model="form.complainTopic" style="width:260px;margin-bottom:10px">
<el-option v-for="item in reasonList" :value="item.reason" :key="item.id">{{ item.reason }}</el-option>
</el-select>
<el-input type="textarea" maxlength="500" show-word-limit :rows="4" placeholder="请输入投诉内容" v-model="form.content" />
</div>
<div style="display:flex;align-items:center;">
<div class="demo-upload-list" v-for="(img, index) in orderGoods.uploadList" :key="index">
<img :src="img">
<div class="demo-upload-list-cover">
<Icon type="ios-eye-outline" @click.native="handleView(img)"></Icon>
<Icon type="ios-trash-outline" @click.native="handleRemove(index)"></Icon>
<el-icon @click="handleView(img)"><View /></el-icon>
<el-icon @click="handleRemove(index)"><Delete /></el-icon>
</div>
</div>
<Upload
<el-upload
:show-upload-list="false"
:on-success="handleSuccess"
:before-upload="handleBeforeUpload"
@@ -40,25 +40,27 @@
:headers="accessToken"
style="display: inline-block;width:58px;">
<div class="hover-pointer icon-upload" style="">
<Icon type="ios-camera" size="20"></Icon>
<el-icon :size="20"><Camera /></el-icon>
</div>
</Upload>
</el-upload>
<div class="describe">上传投诉凭证最多5张</div>
</div>
</div>
</div>
<Button type="primary" class="mt_10" :loading="loading" @click="save">提交</Button>
<Modal title="View Image" v-model="visible">
<el-button type="primary" class="mt_10" :loading="loading" @click="save">提交</el-button>
<el-dialog title="View Image" v-model="visible">
<img :src="previewImage" v-if="visible" style="width: 100%">
</Modal>
</el-dialog>
</div>
</template>
<script>
import { Camera, Delete, View } from '@element-plus/icons-vue';
import { orderDetail } from '@/api/order.js';
import { afterSaleReason, handleComplain } from '@/api/member.js';
import { commonUrl } from '@/plugins/request.js';
import storage from '@/plugins/storage';
export default {
components: { Camera, Delete, View },
data () {
return {
order: {}, // 订单详情
@@ -85,7 +87,7 @@ export default {
afterSaleReason('COMPLAIN').then(res => {
if (res.success) {
this.reasonList = res.result
this.$set(this.form, 'complainTopic', res.result[0].reason)
this.form['complainTopic'] = res.result[0].reason
this.$forceUpdate()
}
})

View File

@@ -5,12 +5,12 @@
<div class="address-header">
<span>
{{ item.name }}
<Tag class="ml_10" v-if="item.isDefault" color="red">默认地址</Tag>
<Tag class="ml_10" v-if="item.alias" color="warning">{{item.alias}}</Tag>
<el-tag class="ml_10" v-if="item.isDefault" color="red">默认地址</el-tag>
<el-tag class="ml_10" v-if="item.alias" color="warning">{{item.alias}}</el-tag>
</span>
<div class="address-action">
<span @click="edit(item.id)"><Icon type="edit"></Icon>修改</span>
<span @click="del(item.id)"><Icon type="trash-a"></Icon>删除</span>
<span @click="edit(item.id)"><el-icon><Edit /></el-icon>修改</span>
<span @click="del(item.id)"><el-icon><Delete /></el-icon>删除</span>
</div>
</div>
<div class="address-content">
@@ -18,8 +18,7 @@
<span class="address-content-title"> :</span> {{ item.name }}
</p>
<p>
<span class="address-content-title">收货地区:</span
>{{ item.consigneeAddressPath | unitAddress }}
<span class="address-content-title">收货地区:</span>{{ $filters.unitAddress(item.consigneeAddressPath) }}
</p>
<p>
<span class="address-content-title">详细地址:</span> {{ item.detail }}
@@ -33,10 +32,12 @@
</template>
<script>
import { Delete, Edit } from '@element-plus/icons-vue';
import card from '@/components/card';
import { memberAddress, delMemberAddress } from '@/api/address.js';
export default {
components: { Delete, Edit },
name: 'MyAddress',
data () {

View File

@@ -6,12 +6,12 @@
<!-- 搜索 筛选 -->
<div class="mb_24 box" v-if="!homePage">
<div class="global_float_right" >
<Input
<el-input
class="width_300"
search
enter-button
v-model="params.keywords"
@on-search="getList"
@keyup.enter="getList"
placeholder="请输入订单号搜索"
/>
</div>
@@ -32,8 +32,8 @@
</div>
</div>
<div>
<Button v-if="order.orderStatus === 'COMPLETED'" @click="delOrder(order.sn)" class="del-btn mr_10 fontsize_16" style="margin-top:-5px;" type="text" icon="ios-trash-outline" size="small"></Button>
<span>{{ order.flowPrice | unitPrice("¥") }}</span>
<el-button v-if="order.orderStatus === 'COMPLETED'" @click="delOrder(order.sn)" class="del-btn mr_10 fontsize_16" style="margin-top:-5px;" type="text" icon="ios-trash-outline" size="small"></el-button>
<span>{{ $filters.unitPrice(order.flowPrice, "¥") }}</span>
</div>
</div>
<div class="order-body">
@@ -51,11 +51,11 @@
<div>
<div class="hover-color" @click="goodsDetail(goods.skuId, goods.goodsId)">{{ goods.name }}</div>
<div class="mt_10">
<span class="global_color">{{ goods.goodsPrice | unitPrice("¥") }} </span>x {{ goods.num }}
<span class="global_color">{{ $filters.unitPrice(goods.goodsPrice, "¥") }} </span>x {{ goods.num }}
<span style="margin-left: 10px;color: #ff9900;">{{refundPriceList(goods.isRefund)}}</span>
</div>
<Button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.sn, goodsIndex)" size="small" type="success" class="fontsize_12" style="position:relative;top:-22px;left:190px;margin-right:10px">评价</Button>
<Button v-if="goods.complainStatus == 'NO_APPLY'" @click="complain(order.sn, goodsIndex)" type="warning" class="fontsize_12" size="small" style="position:relative;top:-22px;left:190px">投诉</Button>
<el-button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.sn, goodsIndex)" size="small" type="success" class="fontsize_12" style="position:relative;top:-22px;left:190px;margin-right:10px">评价</el-button>
<el-button v-if="goods.complainStatus == 'NO_APPLY'" @click="complain(order.sn, goodsIndex)" type="warning" class="fontsize_12" size="small" style="position:relative;top:-22px;left:190px">投诉</el-button>
</div>
</div>
</div>
@@ -64,47 +64,41 @@
</div>
<div>
<!-- 订单基础操作 -->
<Button @click="orderDetail(order.sn)" type="info" size="small">订单详情</Button>
<Button @click="handleCancelOrder(order.sn)" type="error" v-if="order.allowOperationVO.cancel" size="small">取消订单</Button>
<Button @click="goPay(order.sn)" size="small" type="success" v-if="order.allowOperationVO.pay">去支付</Button>
<Button @click="received(order.sn)" size="small" type="warning" v-if="order.allowOperationVO.rog">确认收货</Button>
<el-button @click="orderDetail(order.sn)" type="info" size="small">订单详情</el-button>
<el-button @click="handleCancelOrder(order.sn)" type="danger" v-if="order.allowOperationVO.cancel" size="small">取消订单</el-button>
<el-button @click="goPay(order.sn)" size="small" type="success" v-if="order.allowOperationVO.pay">去支付</el-button>
<el-button @click="received(order.sn)" size="small" type="warning" v-if="order.allowOperationVO.rog">确认收货</el-button>
<!-- 售后 -->
<Button v-if="order.groupAfterSaleStatus && (order.groupAfterSaleStatus.includes('NOT_APPLIED')|| order.groupAfterSaleStatus.includes('PART_AFTER_SALE'))"
@click="applyAfterSale(order.orderItems)" size="small">申请售后</Button>
<el-button v-if="order.groupAfterSaleStatus && (order.groupAfterSaleStatus.includes('NOT_APPLIED')|| order.groupAfterSaleStatus.includes('PART_AFTER_SALE'))"
@click="applyAfterSale(order.orderItems)" size="small">申请售后</el-button>
</div>
</div>
</div>
<Spin size="large" fix v-if="spinShow"></Spin>
<el-skeleton size="large" fix v-if="spinShow"></el-skeleton>
</div>
<!-- 分页 -->
<div class="page-size" v-if="!homePage">
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-total
show-sizer>
</Page>
<el-pagination :total="total" @current-change="changePageNum"
@size-change="changePageSize"
:page-size="params.pageSize" layout="total, sizes, prev, pager, next"></el-pagination>
</div>
<!-- 选择售后商品 -->
<Modal v-model="afterSaleModal" title="请选择申请售后的商品">
<el-dialog v-model="afterSaleModal" title="请选择申请售后的商品">
<div>
<Table
border
:columns="afterSaleColumns"
:data="afterSaleArr"
@on-row-click="afterSaleSelect"
>
</Table>
<el-table :data="afterSaleArr" border @row-click="afterSaleSelect">
<el-table-column prop="name" label="商品名称" />
<el-table-column prop="goodsPrice" label="价格" />
</el-table>
</div>
<div slot="footer"></div>
</Modal>
<Modal v-model="cancelAvail" title="请选择取消订单原因" @on-ok="sureCancel" @on-cancel="cancelAvail = false">
<RadioGroup v-model="cancelParams.reason" vertical type="button" button-style="solid">
<Radio :label="item.reason" v-for="item in cancelReason" :key="item.id">
<template #footer><div></div></template>
</el-dialog>
<el-dialog v-model="cancelAvail" title="请选择取消订单原因" @ok="sureCancel" @cancel="cancelAvail = false">
<el-radio-group v-model="cancelParams.reason" vertical type="button" button-style="solid">
<el-radio :label="item.reason" v-for="item in cancelReason" :key="item.id">
{{item.reason}}
</Radio>
</RadioGroup>
</Modal>
</el-radio>
</el-radio-group>
</el-dialog>
</div>
</template>
@@ -140,10 +134,6 @@ export default {
total: 0, // 数据总数
spinShow: false, // 加载状态
afterSaleModal: false, // 选择售后商品模态框
afterSaleColumns: [ // 售后商品表头
{title: '商品名称', key: 'name'},
{title: '价格', key: 'goodsPrice'}
],
afterSaleArr: [], // 售后商品列表
cancelAvail: false, // 取消订单modal控制
cancelReason: [] // 取消订单原因
@@ -374,7 +364,7 @@ export default {
color: $theme_color;
}
}
.ivu-icon {
.el-icon {
color: #ff8f23;
cursor: pointer;
&:hover {
@@ -385,7 +375,7 @@ export default {
> div:nth-child(3) {
width: 100px;
.ivu-btn {
.el-button {
margin-bottom: 10px;
}
}

View File

@@ -1,37 +1,35 @@
<template>
<div class="order-detail" v-if="order.order">
<card _Title="订单详情" :_Size="16"></card>
<Card
<el-card
class="mb_10"
shadow="never"
v-if="
order.allowOperationVO.pay ||
order.allowOperationVO.rog ||
order.allowOperationVO.cancel
"
>
<Button
<el-button
type="success"
@click="goPay(order.order.sn)"
size="small"
v-if="order.allowOperationVO.pay"
>去支付</Button
>
<Button
>去支付</el-button>
<el-button
type="info"
@click="received(order.order.sn)"
size="small"
v-if="order.allowOperationVO.rog"
>确认收货</Button
>
<Button
type="error"
>确认收货</el-button>
<el-button
type="danger"
@click="handleCancelOrder(order.order.sn)"
v-if="order.allowOperationVO.cancel"
size="small"
>取消订单</Button
>
<Button v-if="order.allowOperationVO.showLogistics || orderPackage.length > 0 || logistics" type="info" @click="logisticsList()" size="small">查看物流</Button>
</Card>
>取消订单</el-button>
<el-button v-if="order.allowOperationVO.showLogistics || orderPackage.length > 0 || logistics" type="info" @click="logisticsList()" size="small">查看物流</el-button>
</el-card>
<p class="verificationCode" v-if="order.order.verificationCode">
核验码:<span>{{ order.order.verificationCode }}</span>
</p>
@@ -41,25 +39,24 @@
<div style="color: #999" class="operation-time">
操作时间:{{ order.order.updateTime || order.order.createTime }}
</div>
<Steps
<el-steps
class="progress"
:current="progressList.length"
direction="vertical"
>
<Step
:title="progress.message"
<el-step :title="progress.message"
:content="progress.createTime"
v-for="(progress, index) in progressList"
:key="index"
></Step>
</Steps>
></el-step>
</el-steps>
</div>
<div class="order-card" v-if="order.order.deliveryMethod === 'LOGISTICS' && order.order.orderType !== 'VIRTUAL'">
<h3>收货人信息</h3>
<p>收货人:{{ order.order.consigneeName }}</p>
<p>手机号码:{{ order.order.consigneeMobile | secrecyMobile }}</p>
<p>手机号码:{{ $filters.secrecyMobile( order.order.consigneeMobile ) }}</p>
<p>
收货地址:{{ order.order.consigneeAddressPath | unitAddress }}
收货地址:{{ $filters.unitAddress(order.order.consigneeAddressPath) }}
{{ order.order.consigneeDetail }}
</p>
</div>
@@ -128,9 +125,9 @@
收票人邮箱:{{ order.receipt.receiptEmail }}
</p>
<div v-if="Number(order.receipt.receiptStatus) === 1" class="receipt-action">
<Button size="small" type="primary" ghost @click="viewReceiptInvoice(order.receipt)">
<el-button size="small" type="primary" ghost @click="viewReceiptInvoice(order.receipt)">
查看发票
</Button>
</el-button>
</div>
</template>
<div v-else style="color: #999; margin-left: 5px">未开发票</div>
@@ -171,13 +168,13 @@
</div>
</td>
<td>{{ goods.id }}</td>
<td>{{ goods.goodsPrice | unitPrice("¥") }}</td>
<td>{{ $filters.unitPrice(goods.goodsPrice, "¥") }}</td>
<td>{{ goods.num }}</td>
<td>{{refundPriceList(goods.isRefund)}}</td>
<td>{{ goods.refundPrice | unitPrice("¥") }}</td>
<td>{{ (goods.goodsPrice * goods.num) | unitPrice("¥") }}</td>
<td>{{ $filters.unitPrice(goods.refundPrice, "¥") }}</td>
<td>{{ $filters.unitPrice((goods.goodsPrice * goods.num), "¥") }}</td>
<td>
<Button
<el-button
v-if="
goods.afterSaleStatus.includes('NOT_APPLIED') ||
goods.afterSaleStatus.includes('PART_AFTER_SALE')
@@ -186,23 +183,23 @@
type="info"
size="small"
class="mb_5"
>申请售后</Button
>申请售后</el-button
>
<Button
<el-button
v-if="goods.commentStatus == 'UNFINISHED'"
@click="comment(order.order.sn, goodsIndex)"
size="small"
type="success"
class="fontsize_12 mb_5"
>评价</Button
>评价</el-button
>
<Button
<el-button
v-if="goods.complainStatus == 'NO_APPLY'"
@click="complain(order.order.sn, goodsIndex)"
type="warning"
class="fontsize_12"
size="small"
>投诉</Button
>投诉</el-button
>
</td>
</tr>
@@ -214,68 +211,52 @@
<span>商品件数:</span><span>{{ order.order.goodsNum }}件</span>
</div>
<div>
<span>商品总价:</span
><span>{{ order.order.goodsPrice | unitPrice("¥") }}</span
><br />
<span>商品总价:</span><span>{{ $filters.unitPrice(order.order.goodsPrice, "¥") }}</span><br />
</div>
<div v-if="order.order.orderType !== 'VIRTUAL'">
<span>运费:</span
><span>+{{ order.order.freightPrice | unitPrice("¥") }}</span
><br />
<span>运费:</span><span>+{{ $filters.unitPrice(order.order.freightPrice, "¥") }}</span><br />
</div>
<div v-if="order.order.priceDetailDTO.couponPrice">
<span>优惠券:</span
><span
>-{{
order.order.priceDetailDTO.couponPrice || 0 | unitPrice("¥")
}}</span
>
<span>优惠券:</span><span
>-{{ $filters.unitPrice(order.order.priceDetailDTO.couponPrice || 0, "¥") }}</span>
</div>
<div v-if="order.order.priceDetailDTO.giftCardPrice">
<span>礼品卡抵扣:</span
><span
>-{{
order.order.priceDetailDTO.giftCardPrice || 0 | unitPrice("¥")
}}</span
>
<span>礼品卡抵扣:</span><span
>-{{ $filters.unitPrice(order.order.priceDetailDTO.giftCardPrice || 0, "¥") }}</span>
</div>
<div v-if="order.order.discountPrice">
<span>活动优惠:</span
><span>-{{ order.order.discountPrice | unitPrice("¥") }}</span>
<span>活动优惠:</span><span>-{{ $filters.unitPrice(order.order.discountPrice, "¥") }}</span>
</div>
<div v-if="order.order.priceDetailDTO.updatePrice">
<span>修改价格:</span
><span>{{ order.order.priceDetailDTO.updatePrice | unitPrice("¥") }}</span>
<span>修改价格:</span><span>{{ $filters.unitPrice(order.order.priceDetailDTO.updatePrice, "¥") }}</span>
</div>
<div>
<span>应付金额:</span>
<span class="actrual-price">{{
order.order.flowPrice | unitPrice("¥")
}}</span>
<span class="actrual-price">{{ $filters.unitPrice(order.order.flowPrice, "¥") }}</span>
</div>
</div>
</div>
<Modal
<el-dialog
v-model="cancelAvail"
title="请选择取消订单原因"
@on-ok="sureCancel"
@on-cancel="cancelAvail = false"
@ok="sureCancel"
@cancel="cancelAvail = false"
>
<RadioGroup
<el-radio-group
v-model="cancelParams.reason"
vertical
type="button"
button-style="solid"
>
<Radio :label="item.reason" v-for="item in cancelReason" :key="item.id">
<el-radio :label="item.reason" v-for="item in cancelReason" :key="item.id">
{{ item.reason }}
</Radio>
</RadioGroup>
</Modal>
</el-radio>
</el-radio-group>
</el-dialog>
<!--查询物流-->
<Modal v-model="logisticsModal" width="40">
<p slot="header"><span>查询物流</span></p>
<el-dialog v-model="logisticsModal" width="40">
<template #header><p><span>查询物流</span></p></template>
<div class="layui-layer-wrap">
<dl>
<dt>订单号:</dt>
@@ -331,10 +312,10 @@
</div>
</div>
</div>
<div slot="footer" style="text-align: right">
<Button @click="logisticsModal = false">取消</Button>
</div>
</Modal>
<template #footer><div style="text-align: right">
<el-button @click="logisticsModal = false">取消</el-button>
</div></template>
</el-dialog>
</div>
</template>
@@ -455,7 +436,7 @@ export default {
if (receiptId) {
const receiptRes = await receiptDetail(receiptId);
if (receiptRes && receiptRes.success && receiptRes.result) {
this.$set(this.order, "receipt", receiptRes.result);
this.order["receipt"] = receiptRes.result;
}
}
this.progressList = res.result.orderLogs;
@@ -592,7 +573,7 @@ export default {
color: $theme_color;
}
}
.ivu-icon {
.el-icon {
color: #ff8f23;
cursor: pointer;
&:hover {
@@ -698,15 +679,15 @@ table {
.layui-layer-wrap > .div-express-log {
max-height: 300px;
}
::v-deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar{
:deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar{
width: 1px;
height: 5px;
}
::v-deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar-thumb{
:deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar-thumb{
border-radius: 1em;
background-color: rgba(50,50,50,.3);
}
::v-deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar-track{
:deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar-track{
border-radius: 1em;
background-color: rgba(50,50,50,.1);
}