mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-26 12:39:36 +08:00
圣诞快乐
# v1.3 更新列表
1. 【新增】砍价
2. 【新增】拼团
3. 【新增】一号通
4. 【修复】商品sku 编辑时出现商品属性对应错误的问题
5. 【修复】商品推广海报生成二维码可能会出错的问题【小程序调试中】
6. 【修复】微信公众号和小程序头像可能获取不到的问题
7. 【修复】下单时可能会出错的问题
8. 【修复】pc管理端用户访问量
9. 【修复】微信退款
10. 【修复】管理端订单状态可能出现不正确的情况
11. 【修复】WEB管理端-菜单色调,短信API更新,首页用户访问量,系统设置tab是自动选择下一及表单
12. 【修复】系统设置出现更新不正确的问题
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<!--<el-tabs v-model="tableFrom.type" @tab-click="getList">-->
|
||||
<!--<el-tab-pane label="全部订单" name="" />-->
|
||||
<!--<el-tab-pane label="普通订单" name="1" />-->
|
||||
<!--<el-tab-pane label="拼团订单" name="2" />-->
|
||||
<!--<el-tab-pane label="秒杀订单" name="3" />-->
|
||||
<!--<el-tab-pane label="砍价订单" name="4" />-->
|
||||
<!--<el-tab-pane label="全部订单" name=""/>-->
|
||||
<!--<el-tab-pane label="普通订单" name="1"/>-->
|
||||
<!--<el-tab-pane label="拼团订单" name="2"/>-->
|
||||
<!--<el-tab-pane label="秒杀订单" name="3"/>-->
|
||||
<!--<el-tab-pane label="砍价订单" name="4"/>-->
|
||||
<!--</el-tabs>-->
|
||||
<div class="container">
|
||||
<el-form size="small" label-width="100px">
|
||||
@@ -32,7 +32,7 @@
|
||||
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" @change="onchangeTime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号:" class="width100">
|
||||
<el-input v-model="tableFrom.orderId" placeholder="请输入订单号" class="selWidth" size="small">
|
||||
<el-input v-model="tableFrom.orderId" placeholder="请输入订单号" class="selWidth" size="small" clearable>
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -83,11 +83,11 @@
|
||||
<span v-show="scope.row.isDel" style="color: #ED4014;display: block;">用户已删除</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column-->
|
||||
<!--prop="id"-->
|
||||
<!--label="订单类型"-->
|
||||
<!--min-width="150"-->
|
||||
<!--/>-->
|
||||
<el-table-column
|
||||
prop="orderType"
|
||||
label="订单类型"
|
||||
min-width="130"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="realName"
|
||||
label="用户信息"
|
||||
@@ -99,15 +99,17 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if=" scope.row.productList && scope.row.productList.length">
|
||||
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle">
|
||||
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle" style="flex-wrap: inherit;">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
:src="val.info.productInfo.image"
|
||||
:preview-src-list="[val.info.productInfo.image]"
|
||||
/>
|
||||
</div>
|
||||
<span class="tabBox_tit mr10">{{ val.info.productInfo.storeName + ' | ' }}{{ val.info.productInfo.attrInfo.suk ? val.info.productInfo.attrInfo.suk:'-' }}</span>
|
||||
<span class="tabBox_pice">{{ '¥'+ val.info.productInfo.attrInfo.price ? val.info.productInfo.attrInfo.price + ' x '+ val.info.cartNum : '-' }}</span>
|
||||
<div>
|
||||
<span class="tabBox_tit mr10">{{ val.info.productInfo.storeName + ' | ' }}{{ val.info.productInfo.attrInfo.suk ? val.info.productInfo.attrInfo.suk:'-' }}</span>
|
||||
<span class="tabBox_pice">{{ '¥'+ val.info.productInfo.attrInfo.price ? val.info.productInfo.attrInfo.price + ' x '+ val.info.cartNum : '-' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -161,7 +163,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.paid === false" type="text" size="small" @click="edit(scope.row)" class="mr10">编辑</el-button>
|
||||
<el-button v-if="scope.row.statusStr.key === 'notShipped' && scope.row.shippingType === 1 && scope.row.refundStatus !==2" type="text" size="small" class="mr10" @click="sendOrder(scope.row)">发送货</el-button>
|
||||
<el-button v-if="scope.row.shippingType === 2 && scope.row.statusStr.key === 'toBeWrittenOff' && scope.row.paid == true && scope.row.refundStatus === 0 && isWriteOff" type="text" size="small" class="mr10" @click="onWriteOff(scope.row)">立即核销</el-button>
|
||||
<el-button v-if="scope.row.shippingType === 2 && scope.row.statusStr.key === 'toBeWrittenOff' && scope.row.paid == true && scope.row.refundStatus === 0 " type="text" size="small" class="mr10" @click="onWriteOff(scope.row)">立即核销</el-button>
|
||||
<el-dropdown trigger="click">
|
||||
<span class="el-dropdown-link">
|
||||
更多<i class="el-icon-arrow-down el-icon--right" />
|
||||
@@ -171,7 +173,7 @@
|
||||
<el-dropdown-item @click.native="onOrderLog(scope.row.id)">订单记录</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="onOrderMark(scope.row)">订单备注</el-dropdown-item>
|
||||
<el-dropdown-item v-show="scope.row.statusStr.key === 'refunding'" @click.native="onOrderRefuse(scope.row)">拒绝退款</el-dropdown-item>
|
||||
<el-dropdown-item v-show="scope.row.statusStr.key === 'refunding' && ((parseFloat(scope.row.payPrice) > parseFloat(scope.row.refundPrice) || (scope.row.payPrice == 0 && [0,1].indexOf(scope.row.refundStatus) !== -1)))" @click.native="onOrderRefund(scope.row)">立即退款</el-dropdown-item>
|
||||
<el-dropdown-item v-show="scope.row.statusStr.key !== 'refunded' && ((parseFloat(scope.row.payPrice) >= parseFloat(scope.row.refundPrice) || (scope.row.payPrice == 0 && [0,1].indexOf(scope.row.refundStatus) !== -1)))" @click.native="onOrderRefund(scope.row)">立即退款</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="handleDelete(scope.row, scope.$index)">删除订单</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -419,6 +421,7 @@
|
||||
sendOrder(row) {
|
||||
this.$refs.send.modals = true;
|
||||
this.$refs.send.getList();
|
||||
this.$refs.send.sheetInfo();
|
||||
this.orderId = row.id;
|
||||
},
|
||||
// 订单删除
|
||||
@@ -474,7 +477,7 @@
|
||||
cancelButtonText: '取消',
|
||||
inputErrorMessage: '请输入订单备注',
|
||||
inputType: 'textarea',
|
||||
inputValue: row.mark,
|
||||
inputValue: row.remark,
|
||||
inputPlaceholder: '请输入订单备注',
|
||||
inputValidator: (value) => { if(!value) return '输入不能为空'}
|
||||
}).then(({value}) => {
|
||||
@@ -581,7 +584,7 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
.tabBox_tit {
|
||||
width: 60%;
|
||||
/*width: 60%;*/
|
||||
font-size: 12px !important;
|
||||
margin: 0 2px 0 10px;
|
||||
letter-spacing: 1px;
|
||||
|
||||
@@ -1,75 +1,108 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="订单信息"
|
||||
:visible.sync="dialogVisible"
|
||||
width="700px"
|
||||
v-if="orderDatalist"
|
||||
>
|
||||
<div class="description" v-loading="loading">
|
||||
<div class="title">用户信息</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">用户昵称:{{orderDatalist.user?orderDatalist.user.nickname:orderDatalist.realName}}</div>
|
||||
<div class="description-term">绑定电话:{{orderDatalist.user.phone ? orderDatalist.user.phone : '无'}}</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="title">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货信息': '收货信息'}}</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货人': '收货人'}}:{{orderDatalist.realName}}</div>
|
||||
<div class="description-term">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货电话': '收货电话'}}:{{orderDatalist.userPhone}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.statusStr.key !== 'toBeWrittenOff'">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货地址': '收货地址'}}:{{orderDatalist.userAddress}}</div>
|
||||
<div class="description-term">订单编号:{{orderDatalist.orderId}}</div>
|
||||
<div class="description-term">订单状态:{{orderDatalist.status | orderStatusFilter}}</div>
|
||||
<div class="description-term">商品总数:{{orderDatalist.totalNum}}</div>
|
||||
<div class="description-term">商品总价:{{orderDatalist.totalPrice}}</div>
|
||||
<div class="description-term">交付邮费:{{orderDatalist.payPostage}}</div>
|
||||
<div class="description-term">优惠券金额:{{orderDatalist.couponPrice}}</div>
|
||||
<div class="description-term">实际支付:{{orderDatalist.payPrice}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.refundPrice">退款金额:{{orderDatalist.refundPrice}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.useIntegral">使用积分:{{orderDatalist.useIntegral}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.backIntegral">退回积分:{{orderDatalist.backIntegral}}</div>
|
||||
<div class="description-term">创建时间:{{orderDatalist.createTime}}</div>
|
||||
<div class="description-term">支付方式:{{orderDatalist.payTypeStr}}</div>
|
||||
<div class="description-term">推广人:{{orderDatalist.spreadInfo.id + ' / ' +orderDatalist.spreadInfo.name}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">门店名称:{{orderDatalist.storeName}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">核销码:{{orderDatalist.user_phone}}</div>
|
||||
<div class="description-term">商家备注:{{orderDatalist.remark}}</div>
|
||||
<template v-if="orderDatalist.statusStr.key === 'toBeWrittenOff' && orderDatalist.systemStore">
|
||||
<div class="description-term">提货码:{{orderDatalist.verifyCode}}</div>
|
||||
<div class="description-term">门店名称:{{orderDatalist.systemStore.name}}</div>
|
||||
<div class="description-term">门店电话:{{orderDatalist.systemStore.phone}}</div>
|
||||
<div class="description-term">门店地址:{{orderDatalist.systemStore.address + orderDatalist.systemStore.detailedAddress}}</div>
|
||||
</template>
|
||||
<div>
|
||||
<el-dialog
|
||||
title="订单信息"
|
||||
:visible.sync="dialogVisible"
|
||||
width="700px"
|
||||
v-if="orderDatalist"
|
||||
>
|
||||
<div class="description" v-loading="loading">
|
||||
<div class="title">用户信息</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">用户昵称:{{orderDatalist.user?orderDatalist.user.nickname:orderDatalist.realName}}</div>
|
||||
<div class="description-term">绑定电话:{{orderDatalist.user.phone ? orderDatalist.user.phone : '无'}}</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="title">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货信息': '收货信息'}}</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货人': '收货人'}}:{{orderDatalist.realName}}</div>
|
||||
<div class="description-term">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货电话': '收货电话'}}:{{orderDatalist.userPhone}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.statusStr.key !== 'toBeWrittenOff'">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货地址': '收货地址'}}:{{orderDatalist.userAddress}}</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="title">订单信息</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">订单编号:{{orderDatalist.orderId}}</div>
|
||||
<div class="description-term" style="color: red">订单状态:{{orderDatalist.status | orderStatusFilter}}</div>
|
||||
<div class="description-term">商品总数:{{orderDatalist.totalNum}}</div>
|
||||
<div class="description-term">商品总价:{{orderDatalist.totalPrice}}</div>
|
||||
<div class="description-term">交付邮费:{{orderDatalist.payPostage}}</div>
|
||||
<div class="description-term">优惠券金额:{{orderDatalist.couponPrice}}</div>
|
||||
<div class="description-term">实际支付:{{orderDatalist.payPrice}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.refundPrice">退款金额:{{orderDatalist.refundPrice}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.useIntegral">使用积分:{{orderDatalist.useIntegral}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.backIntegral">退回积分:{{orderDatalist.backIntegral}}</div>
|
||||
<div class="description-term">创建时间:{{orderDatalist.createTime}}</div>
|
||||
<div class="description-term">支付方式:{{orderDatalist.payTypeStr}}</div>
|
||||
<div class="description-term">推广人:{{orderDatalist.spreadInfo.id + ' / ' +orderDatalist.spreadInfo.name}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">门店名称:{{orderDatalist.storeName}}</div>
|
||||
<div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">核销码:{{orderDatalist.user_phone}}</div>
|
||||
<div class="description-term">商家备注:{{orderDatalist.remark}}</div>
|
||||
<template v-if="orderDatalist.statusStr.key === 'toBeWrittenOff' && orderDatalist.systemStore">
|
||||
<div class="description-term">提货码:{{orderDatalist.verifyCode}}</div>
|
||||
<div class="description-term">门店名称:{{orderDatalist.systemStore.name}}</div>
|
||||
<div class="description-term">门店电话:{{orderDatalist.systemStore.phone}}</div>
|
||||
<div class="description-term">门店地址:{{orderDatalist.systemStore.address + orderDatalist.systemStore.detailedAddress}}</div>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<template v-if="orderDatalist.deliveryType === 'express'">
|
||||
<el-divider></el-divider>
|
||||
<div class="title">物流信息</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">快递公司:{{orderDatalist.deliveryName}}</div>
|
||||
<div class="description-term">快递单号:{{orderDatalist.deliveryId}}<el-button type="primary" size="mini" @click="openLogistics" style="margin-left: 5px">物流查询</el-button></div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="orderDatalist.deliveryType === 'send'">
|
||||
<el-divider></el-divider>
|
||||
<div class="title">配送信息</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">送货人姓名:{{orderDatalist.deliveryName}}</div>
|
||||
<div class="description-term">送货人电话:{{orderDatalist.deliveryId}}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="orderDatalist.mark">
|
||||
<el-divider></el-divider>
|
||||
<div class="title">用户备注</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">{{orderDatalist.mark}}</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<template v-if="orderDatalist.deliveryType === 'express'">
|
||||
<el-divider></el-divider>
|
||||
<div class="title">物流信息</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">快递公司:{{orderDatalist.deliveryName}}</div>
|
||||
<div class="description-term">快递单号:{{orderDatalist.deliveryId}}</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-if="orderDatalist"
|
||||
title="提示"
|
||||
:visible.sync="modal2"
|
||||
width="30%">
|
||||
<div class="logistics acea-row row-top">
|
||||
<div class="logistics_img"><img src="@/assets/imgs/expressi.jpg"></div>
|
||||
<div class="logistics_cent">
|
||||
<span class="mb10">物流公司:{{orderDatalist.deliveryName}}</span>
|
||||
<span>物流单号:{{orderDatalist.deliveryId}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="orderDatalist.deliveryType === 'send'">
|
||||
<el-divider></el-divider>
|
||||
<div class="title">配送信息</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">送货人姓名:{{orderDatalist.deliveryName}}</div>
|
||||
<div class="description-term">送货人电话:{{orderDatalist.deliveryId}}</div>
|
||||
</div>
|
||||
<div class="acea-row row-column-around trees-coadd">
|
||||
<div class="scollhide">
|
||||
<el-timeline :reverse="reverse">
|
||||
<el-timeline-item v-for="(item,i) in result" :key="i">
|
||||
<p class="time" v-text="item.time"></p>
|
||||
<p class="content" v-text="item.status"></p>
|
||||
</el-timeline-item>
|
||||
</el-timeline >
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="orderDatalist.mark">
|
||||
<el-divider></el-divider>
|
||||
<div class="title">用户备注</div>
|
||||
<div class="acea-row">
|
||||
<div class="description-term">{{orderDatalist.mark}}</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { orderDetailApi } from '@/api/order'
|
||||
import { orderDetailApi, getLogisticsInfoApi } from '@/api/order'
|
||||
export default {
|
||||
name: 'OrderDetail',
|
||||
props: {
|
||||
@@ -80,20 +113,34 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
reverse: true,
|
||||
dialogVisible: false,
|
||||
orderDatalist: null,
|
||||
loading: false
|
||||
loading: false,
|
||||
modal2: false,
|
||||
result: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
openLogistics () {
|
||||
this.getOrderData()
|
||||
this.modal2 = true;
|
||||
},
|
||||
// 获取订单物流信息
|
||||
getOrderData () {
|
||||
getLogisticsInfoApi({id:this.orderId}).then(async res => {
|
||||
this.result = res.result;
|
||||
})
|
||||
},
|
||||
getDetail(id) {
|
||||
this.loading = true
|
||||
orderDetailApi({id: id}).then(res => {
|
||||
this.orderDatalist = res
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.orderDatalist = null
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
@@ -102,20 +149,68 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.title{
|
||||
margin-bottom: 16px;
|
||||
color: #17233d;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
.description{
|
||||
&-term {
|
||||
display: table-cell;
|
||||
padding-bottom: 10px;
|
||||
line-height: 20px;
|
||||
width: 50%;
|
||||
font-size: 12px;
|
||||
.logistics {
|
||||
align-items: center;
|
||||
padding: 10px 0px;
|
||||
.logistics_img {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
margin-right: 12px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.logistics_cent {
|
||||
span {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.trees-coadd {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
.scollhide {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
margin-left: 18px;
|
||||
padding: 10px 0 10px 0;
|
||||
box-sizing: border-box;
|
||||
.content {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 12px;
|
||||
color: #2d8cf0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-bottom: 10px;
|
||||
color: #17233d;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.description {
|
||||
&-term {
|
||||
display: table-cell;
|
||||
padding-bottom: 5px;
|
||||
line-height: 20px;
|
||||
width: 50%;
|
||||
font-size: 12px;
|
||||
}
|
||||
/deep/ .el-divider--horizontal {
|
||||
margin: 12px 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog :visible.sync="modals" title="订单记录" class="order_box">
|
||||
<el-form ref="formItem" :model="formItem" label-width="110px" @submit.native.prevent>
|
||||
<el-dialog :visible.sync="modals" title="订单记录" class="order_box" :before-close="handleClose" width="600px">
|
||||
<el-form ref="formItem" :model="formItem" label-width="110px" @submit.native.prevent :rules="rules">
|
||||
<el-form-item label="选择类型:">
|
||||
<el-radio-group v-model="formItem.type" @change="changeRadio(formItem.type)">
|
||||
<el-radio label="1">发货</el-radio>
|
||||
@@ -9,25 +9,59 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<div v-if="formItem.type==='1'">
|
||||
<el-form-item label="快递公司:" prop="expressId"
|
||||
:rules="[{ required: true, message: '请选择快递公司', trigger: 'change' }]">
|
||||
<el-select v-model="formItem.expressId" style="width:80%;">
|
||||
<el-option v-for="(item,i) in express" :value="item.id" :key="i" :label="item.name"></el-option>
|
||||
<el-form-item label="发货类型:" prop="expressId">
|
||||
<el-radio-group v-model="formItem.expressRecordType" @change="changeRadio(formItem.expressRecordType)">
|
||||
<el-radio label="1">手动填写</el-radio>
|
||||
<el-radio label="2">电子面单打印</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="快递公司:" prop="expressCode">
|
||||
<el-select v-model="formItem.expressCode" filterable style="width:80%;" @change="onChangeExport(formItem.expressCode)">
|
||||
<el-option v-for="(item,i) in express" :value="item.code" :key="i" :label="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="快递单号:" prop="expressCode"
|
||||
:rules="[{ required: true, message: '请输入快递单号', trigger: 'blur' }]">
|
||||
<el-input v-model="formItem.expressCode" placeholder="请输入快递单号" style="width:80%;"></el-input>
|
||||
<el-form-item v-if="formItem.expressRecordType === '1'" label="快递单号:" prop="expressNumber">
|
||||
<el-input v-model="formItem.expressNumber" placeholder="请输入快递单号" style="width:80%;"></el-input>
|
||||
</el-form-item>
|
||||
<template v-if="formItem.expressRecordType === '2'">
|
||||
<el-form-item label="电子面单:" class="express_temp_id" prop="expressTempId">
|
||||
<div class="acea-row">
|
||||
<el-select v-model="formItem.expressTempId" placeholder="请选择电子面单" :class="[formItem.expressTempId?'width9':'width8']" @change="onChangeImg">
|
||||
<el-option v-for="(item,i) in exportTempList" :value="item.temp_id" :key="i" :label="item.title"></el-option>
|
||||
</el-select>
|
||||
<div v-if="formItem.expressTempId" style="position: relative;">
|
||||
<!--<span class="tempImg" @click="">预览</span>-->
|
||||
<div class="tempImgList ml10">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
style="width: 36px; height: 36px"
|
||||
:src="tempImg"
|
||||
:preview-src-list="[tempImg]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<Button v-if="formItem.expressTempId" type="text" @click="preview">预览</Button>-->
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="寄件人姓名:" prop="toName">
|
||||
<el-input v-model="formItem.toName" placeholder="请输入寄件人姓名" style="width:80%;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="寄件人电话:" prop="toTel">
|
||||
<el-input v-model="formItem.toTel" placeholder="请输入寄件人电话" style="width:80%;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="寄件人地址:" prop="toAddr">
|
||||
<el-input v-model="formItem.toAddr" placeholder="请输入寄件人地址" style="width:80%;"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</div>
|
||||
<div v-if="formItem.type==='2'">
|
||||
<el-form-item label="送货人姓名:" prop="expressId"
|
||||
:rules="[{ required: true, message: '请输入送货人姓名', trigger: 'blur' }]">
|
||||
<el-input v-model="formItem.expressId" placeholder="请输入送货人姓名" style="width:80%;"></el-input>
|
||||
<el-form-item label="送货人姓名:" prop="deliveryName">
|
||||
<el-input v-model="formItem.deliveryName" placeholder="请输入送货人姓名" style="width:80%;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="送货人电话:" prop="expressCode"
|
||||
:rules="[{ required: true, message: '请输入送货人电话', trigger: 'blur' }]">
|
||||
<el-input v-model="formItem.expressCode" placeholder="请输入送货人电话" style="width:80%;"></el-input>
|
||||
<el-form-item label="送货人电话:" prop="deliveryTel">
|
||||
<el-input v-model="formItem.deliveryTel" placeholder="请输入送货人电话" style="width:80%;"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -39,8 +73,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { orderSendApi } from '@/api/order'
|
||||
import { expressList } from '@/api/logistics';
|
||||
import { orderSendApi, sheetInfoApi } from '@/api/order'
|
||||
import { expressAllApi, exportTempApi } from '@/api/sms'
|
||||
const validatePhone = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error('请填写手机号'));
|
||||
} else if (!/^1[3456789]\d{9}$/.test(value)) {
|
||||
callback(new Error('手机号格式不正确!'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
export default {
|
||||
name: 'orderSend',
|
||||
props: {
|
||||
@@ -50,17 +93,78 @@
|
||||
return {
|
||||
formItem: {
|
||||
type: '1',
|
||||
expressRecordType: '1',
|
||||
expressId: '',
|
||||
expressCode: '',
|
||||
id: ''
|
||||
id: '',
|
||||
deliveryName: '',
|
||||
deliveryTel: '',
|
||||
// expressName: '',
|
||||
expressNumber:'',
|
||||
expressTempId: '',
|
||||
toAddr: '',
|
||||
toName: '',
|
||||
toTel: '',
|
||||
},
|
||||
modals: false,
|
||||
express: []
|
||||
express: [],
|
||||
exportTempList: [],
|
||||
tempImg: '',
|
||||
rules: {
|
||||
toName: [
|
||||
{ required: true, message: '请输寄件人姓名', trigger: 'blur' }
|
||||
],
|
||||
toTel: [
|
||||
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||
],
|
||||
toAddr: [
|
||||
{ required: true, message: '请输入寄件人地址', trigger: 'blur' }
|
||||
],
|
||||
expressCode: [
|
||||
{ required: true, message: '请选择快递公司', trigger: 'change' }
|
||||
],
|
||||
expressNumber: [
|
||||
{ required: true, message: '请输入快递单号', trigger: 'blur' }
|
||||
],
|
||||
expressTempId: [
|
||||
{ required: true, message: '请选择电子面单', trigger: 'change' }
|
||||
],
|
||||
deliveryName: [
|
||||
{ required: true, message: '请输入送货人姓名', trigger: 'blur' }
|
||||
],
|
||||
deliveryTel: [
|
||||
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
},
|
||||
methods: {
|
||||
// 默认信息
|
||||
sheetInfo () {
|
||||
sheetInfoApi().then(async res => {
|
||||
this.formItem.toAddr= res.exportToAddress || '';
|
||||
this.formItem.toName= res.exportToName || '';
|
||||
this.formItem.toTel= res.exportToTel || '';
|
||||
})
|
||||
},
|
||||
// 快递公司选择
|
||||
onChangeExport (val) {
|
||||
this.formItem.expressTempId = '';
|
||||
this.exportTemp(val);
|
||||
},
|
||||
// 电子面单模板
|
||||
exportTemp (val) {
|
||||
exportTempApi({ com: val }).then(async res => {
|
||||
this.exportTempList = res.data.data || [];
|
||||
})
|
||||
},
|
||||
onChangeImg (item) {
|
||||
this.exportTempList.map(i => {
|
||||
if (i.temp_id === item) this.tempImg = i.pic
|
||||
})
|
||||
},
|
||||
changeRadio (o) {
|
||||
if( o === '3'){
|
||||
this.formItem.expressId = ''
|
||||
@@ -69,8 +173,8 @@
|
||||
},
|
||||
// 物流公司列表
|
||||
getList () {
|
||||
expressList({ page: 1, limit: 999, isShow:1 }).then(async res => {
|
||||
this.express = res.list
|
||||
expressAllApi().then(async res => {
|
||||
this.express = res
|
||||
})
|
||||
},
|
||||
// 提交
|
||||
@@ -89,15 +193,39 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClose(){
|
||||
this.cancel('formItem');
|
||||
},
|
||||
cancel (name) {
|
||||
this.modals = false;
|
||||
this.$refs[name].resetFields();
|
||||
this.formItem.type = '1';
|
||||
this.formItem.expressRecordType = '1';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
.width8 {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.width9 {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.tempImgList {
|
||||
// opacity: 1;
|
||||
width: 38px !important;
|
||||
height: 30px !important;
|
||||
// margin-top: -30px;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
z-index: 11;
|
||||
img {
|
||||
width: 38px !important;
|
||||
height: 30px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user