mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 17:05:54 +08:00
物流公司切换禁用无效问题,pc退货添加物流信息回填,保存发票回显错误
This commit is contained in:
@@ -96,3 +96,22 @@ export function communication (params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 退换货服务 提交物流
|
||||
export function afterSaleDelivery (params) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/delivery/${params.afterSaleSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
});
|
||||
}
|
||||
// 获取退货可选物流公司
|
||||
export function getLogisticsCompany () {
|
||||
return request({
|
||||
url: `/buyer/logistics`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params: { pageNumber: 1, pageSize: 200, disabled: 'OPEN' }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,11 +4,6 @@
|
||||
<p slot="header">
|
||||
<span>发票信息</span>
|
||||
</p>
|
||||
<!-- <div>
|
||||
<div>为响应环保,自营全面启用电子普通发票,非自营发票由第三方商家实际开具。</div>
|
||||
<div>电子普通发票是税务机关认可的有效收付款凭证,与纸质普通发票具有同等法律效力,可用于报销入账、售后维权等。</div>
|
||||
<div>如商品由第三方卖家销售,发票类型及内容将由该卖家决定。</div>
|
||||
</div> -->
|
||||
<!-- 普通发票 -->
|
||||
<div class="nav-content">
|
||||
<Form :model="invoiceForm" ref="form" label-position="left" :rules="ruleInline" :label-width="110">
|
||||
@@ -55,15 +50,14 @@ export default {
|
||||
name: 'invoiceModal',
|
||||
data () {
|
||||
return {
|
||||
invoice: 1,
|
||||
invoice: 1, // 发票类型
|
||||
invoiceAvailable: false, // 模态框显隐
|
||||
loading: false, // 提交状态
|
||||
invoiceForm: {
|
||||
// 发票表单
|
||||
// 普票表单
|
||||
receiptTitle: '', // 发票抬头
|
||||
taxpayerId: '', // 纳税人识别号
|
||||
receiptContent: '商品明细', // 发票内容
|
||||
receiptContent: '商品明细' // 发票内容
|
||||
},
|
||||
type: 1, // 1 个人 2 单位
|
||||
ruleInline: {
|
||||
@@ -107,10 +101,9 @@ export default {
|
||||
let flage = true;
|
||||
|
||||
// 保存分为两种类型,个人以及企业
|
||||
const { type, receiptTitle, receiptContent } = JSON.parse(
|
||||
const { receiptTitle } = JSON.parse(
|
||||
JSON.stringify(this.invoiceForm)
|
||||
);
|
||||
|
||||
// 判断是否填写发票抬头
|
||||
if (!receiptTitle) {
|
||||
this.$Message.error('请填写发票抬头!');
|
||||
@@ -118,7 +111,7 @@ export default {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (type === 2) {
|
||||
if (this.type === 2) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (!valid) {
|
||||
flage = false;
|
||||
|
||||
@@ -17,15 +17,15 @@ export default {
|
||||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
// common: 'http://192.168.0.106:8890',
|
||||
// buyer: 'http://192.168.0.106:8888',
|
||||
// seller: 'http://192.168.0.106:8889',
|
||||
// manager: 'http://192.168.0.106:8887'
|
||||
common: 'http://192.168.0.101:8890',
|
||||
buyer: 'http://192.168.0.101:8888',
|
||||
seller: 'http://192.168.0.101:8889',
|
||||
manager: 'http://192.168.0.101:8887'
|
||||
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
seller: 'https://store-api.pickmall.cn',
|
||||
manager: 'https://admin-api.pickmall.cn'
|
||||
// common: 'https://common-api.pickmall.cn',
|
||||
// buyer: 'https://buyer-api.pickmall.cn',
|
||||
// seller: 'https://store-api.pickmall.cn',
|
||||
// manager: 'https://admin-api.pickmall.cn'
|
||||
},
|
||||
api_prod: {
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
|
||||
@@ -74,11 +74,11 @@ export default {
|
||||
})
|
||||
},
|
||||
changePage (val) { // 修改页码
|
||||
this.pageNumber = val
|
||||
this.params.pageNumber = val
|
||||
this.getHistory()
|
||||
},
|
||||
changePageSize (val) { // 修改页数
|
||||
this.param.pageSize = val
|
||||
this.params.pageSize = val
|
||||
this.params.pageNumber = 1
|
||||
this.getHistory()
|
||||
}
|
||||
|
||||
@@ -55,11 +55,14 @@
|
||||
<div>
|
||||
<!-- 订单基础操作 -->
|
||||
<Button @click="goDetail(order.sn)" size="small">售后详情</Button>
|
||||
<Button @click="openModal(order)" v-if="order.serviceStatus == 'PASS' &&
|
||||
order.serviceType != 'RETURN_MONEY'" size="small">提交物流</Button>
|
||||
|
||||
<Button @click="cancel(order.sn)" v-if="order.afterSaleAllowOperationVO.cancel" size="small">取消售后</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>+
|
||||
<Spin size="large" fix v-if="spinShow"></Spin>
|
||||
</div>
|
||||
<!-- 分页 -->
|
||||
@@ -70,11 +73,47 @@
|
||||
show-sizer>
|
||||
</Page>
|
||||
</div>
|
||||
<Modal v-model="logisticsShow" width="530">
|
||||
<p slot="header">
|
||||
<span>提交物流信息</span>
|
||||
</p>
|
||||
<div>
|
||||
<div class="goods-list modal-goods">
|
||||
<img @click="goodsDetail(singleOrder.skuId, singleOrder.goodsId)" class="hover-color" :src="singleOrder.goodsImage" alt="" />
|
||||
<div>
|
||||
<div class="hover-color" @click="goodsDetail(singleOrder.skuId, singleOrder.goodsId)">{{ singleOrder.goodsName }}</div>
|
||||
<div class="mt_10">
|
||||
<span class="global_color"
|
||||
>{{ singleOrder.flowPrice | unitPrice("¥") }} </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>
|
||||
</div>
|
||||
<div slot="footer" style="text-align: right">
|
||||
<Button @click="logisticsShow = false">关闭</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="submitDelivery">提交</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { afterSaleList, cancelAfterSale } from '@/api/member.js';
|
||||
import { afterSaleDelivery, getLogisticsCompany } from '@/api/order.js';
|
||||
import { afterSaleStatusList } from '../enumeration.js'
|
||||
export default {
|
||||
name: 'AfterSale',
|
||||
@@ -91,7 +130,22 @@ export default {
|
||||
// 状态数组
|
||||
afterSaleStatusList,
|
||||
total: 0, // 订单总数
|
||||
spinShow: false // 加载状态
|
||||
spinShow: false, // 加载状态
|
||||
companyList: [], // 物流公司列表
|
||||
logisticsShow: false, // 物流信息modal
|
||||
singleOrder: {}, // 单独的售后信息
|
||||
form: { // 物流信息数据
|
||||
afterSaleSn: '',
|
||||
logisticsId: '',
|
||||
logisticsNo: '',
|
||||
mDeliverTime: ''
|
||||
},
|
||||
rules: { // 必填校验
|
||||
logisticsId: [{ required: true, message: '请选择物流公司' }],
|
||||
logisticsNo: [{ required: true, message: '请填写物流编号' }],
|
||||
mDeliverTime: [{ required: true, message: '请选择发货时间' }]
|
||||
},
|
||||
submitLoading: false // 提交加载状态
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
@@ -158,6 +212,42 @@ export default {
|
||||
filterOrderStatus (status) { // 获取订单状态中文
|
||||
const ob = this.afterSaleStatusList.filter(e => { return e.status === status });
|
||||
return ob[0].name
|
||||
},
|
||||
// 获取物流公司列表
|
||||
getCompany () {
|
||||
getLogisticsCompany().then(res => {
|
||||
if (res.success) {
|
||||
this.companyList = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交物流信息
|
||||
submitDelivery () {
|
||||
this.submitLoading = true
|
||||
afterSaleDelivery(this.form).then(res => {
|
||||
if (res.success) {
|
||||
this.logisticsShow = false;
|
||||
this.$Message.success('提交成功')
|
||||
this.getList()
|
||||
}
|
||||
this.submitLoading = false
|
||||
}).catch(() => {
|
||||
this.submitLoading = false
|
||||
})
|
||||
},
|
||||
openModal (row) {
|
||||
console.log(row);
|
||||
this.singleOrder = row;
|
||||
this.form.afterSaleSn = row.sn
|
||||
this.logisticsShow = true;
|
||||
this.$refs.form.resetFields()
|
||||
if (!this.companyList.length) {
|
||||
this.getCompany()
|
||||
}
|
||||
},
|
||||
// 格式化时间
|
||||
changeTime (time) {
|
||||
this.form.mDeliverTime = time;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -207,20 +297,6 @@ export default {
|
||||
color: #999;
|
||||
padding: 10px;
|
||||
|
||||
.goods-list {
|
||||
width: 500px;
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
> div {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
> div:nth-child(2) {
|
||||
width: 150px;
|
||||
text-align: center;
|
||||
@@ -248,4 +324,21 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.goods-list {
|
||||
width: 500px;
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
> div {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.modal-goods{
|
||||
padding: 5px;
|
||||
background-color: #eee;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -397,8 +397,9 @@ export default {
|
||||
this.priceDetailDTO = res.result.priceDetailDTO;
|
||||
this.skuList = res.result.skuList;
|
||||
|
||||
res.result.receiptVO ? (this.invoiceData = res.result.receiptVO) : '';
|
||||
|
||||
if (res.result.receiptVO) {
|
||||
this.invoiceData = res.result.receiptVO
|
||||
}
|
||||
let notSupArea = res.result.notSupportFreight;
|
||||
this.selectedCoupon = {};
|
||||
if (res.result.platformCoupon) this.selectedCoupon.platformCoupon = res.result.platformCoupon;
|
||||
@@ -589,6 +590,7 @@ export default {
|
||||
this.$Spin.hide();
|
||||
});
|
||||
},
|
||||
// 优惠券可用范围
|
||||
useScope (type) {
|
||||
let goods = '全部商品';
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user