提交 0267eac5 编写于 作者: vino's avatar vino

运费配置

上级 f495f730
......@@ -90,4 +90,22 @@ export const closeShop = (storeId, status = 0) => {
})
};
export const brokerListAll = (params) => {
return fetch({
headers,
url: getBaseUrl('broker/admin/brokerListAll'),
method: 'post',
data: params,
description: '云鹊店铺-订单管理-药代列表',
})
};
export const brokerOwnerListAll = (params) => {
return fetch({
headers,
url: getBaseUrl('broker/admin/brokerOwnerListAll'),
method: 'post',
data: params,
description: '云鹊店铺-订单管理-招募人列表',
})
};
<template>
<div class="order-detail-wrapper">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="order-detail-content screenSet" id="screenSet">
<div class="header-title">店铺运费</div>
<div class="detail-all-info">
<div class="trade-info">
<div slot="header" class="clearfix">
<el-form ref="configForm"
:rules="setPriceRules"
:model="freightConfigForm"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<div v-for="(item, index) in freightConfigForm.freightList" :key="index">
<div style="margin-top: 10px;margin-left: 10px;">
<div style="float:left;margin-left: 20px;margin-top:10px;">0</div>
<div style="float:left;margin-left: 20px;margin-top:10px;"><</div>
<div style="float:left;margin-left: 20px;margin-top:10px;">订单金额</div>
<div style="float:left;margin-left: 20px;"><el-input-number v-model="item.price1"></el-input-number><span style="margin-left: 5px;"></span></div>
<div style="float:left;margin-left: 20px;margin-top:10px;">运费:</div>
<div style="float:left;margin-left: 20px;"><el-input-number v-model="item.price2"></el-input-number><span style="margin-left: 5px;"></span></div>
<div style="float:left;margin-left: 20px;margin-top:5px;" v-if="index > 0"><el-button type="danger" size="small" @click="del(index)">删除</el-button></div>
</div>
<div style="margin-top: 10px;margin-left: 10px;" v-if="index == 0">
<el-button type="primary" size="small" @click="add">添加条件</el-button>
</div>
</div>
<div style="float:left;margin-left: 20px;margin-top:5px;">提示文案</div>
<el-form-item label="运费说明" prop="commissionType">
<el-col :span="4">
<el-input></el-input>
</el-col>
</el-form-item>
<div style="margin-top: 60px;margin-left: 150px;">
<el-button type="primary" @click="save" center>保存</el-button>
<!--<el-button @click="cancle()">取 消</el-button>-->
</div>
</el-form>
</div>
</div>
<el-table :data="tableData" border class="item-table" style="width: 100%;margin-top: 30px;">
<el-table-column prop="goodsName" label="商品名称" min-width="100" align="center">
<template slot-scope="scope">
<div style="cursor: pointer;color: #449284" @click="goGoodsEdit(scope.row)">{{ scope.row.goodsName }}</div>
</template>
</el-table-column>
<el-table-column prop="size" label="规格" min-width="100" align="center"></el-table-column>
<el-table-column prop="goodsQuantity" label="数量" min-width="100" align="center">
<template slot-scope="scope">
<span>×{{ scope.row.goodsQuantity }}</span>
</template>
</el-table-column>
<el-table-column prop="price" label="单价" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.price | toFixed2 }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" min-width="100" align="center">
<template slot-scope="scope">
<span>{{orderDetailData.showStatusStr}}</span>
</template>
</el-table-column>
</el-table>
<div class="total-set">
<p><span>商品总额:</span><span>¥{{orderDetailData.totalPrice | toFixed2}}</span></p>
<p><span>优惠:</span><span>-¥{{orderDetailData.totalCouponFee | toFixed2}}</span></p>
<p><span>运费:</span><span>¥{{orderDetailData.expressFee | toFixed2}}</span></p>
<p class="total-price" v-if="showStatus == 1 || showStatus == 2 || showStatus == 3"><span>实付:</span><span>¥{{orderDetailData.amount | toFixed2}}</span></p>
<p class="total-price" v-if="showStatus == 4"><span>应付:</span><span>¥{{(orderDetailData.totalPrice)| toFixed2}}</span></p>
<p class="total-price" v-if="showStatus == 5"><span>实付:</span><span>¥0.00</span></p>
</div>
</div>
<send-set-dialog
:sendGoodsDialog="sendGoodsDialog"
:dialogTitle="dialogTitle"
:sendSetFormData="sendSetForm"
@closeSendSet="closeSendSet">
</send-set-dialog>
</div>
</div>
</template>
<script>
// import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue";
import { queryOrderDetail } from '@/utils/shop';
import SendSetDialog from "@/components/shop/send-set-dialog";
export default {
components: {
BreadCrumb,
SendSetDialog
},
data(){
return{
curmbFirst: '云鹊店铺',
curmbSecond: '运费配置',
storeId: null,
orderId: null,
showStatus: null,//订单展示状态,1已完成,2已发货,3待发货,4待支付,5交易关闭
storeType: null,//店铺类型,1供应商,2小药房,3医生小店
orderDetailData: {
amount: '',//订单实付总金额
createdTime: '',//下单时间
expressId: '',//物流id
expressName: '',//物流公司名称
receiverAddr: '',//收货地址
expressNo: '',//快递单号
expressStatus: '',//物流状态
finishTime: '',//成交时间
orderNo: '',//订单编号
orderStatus: '',//订单状态:1待支付,2支付中,3支付失败,4订单超时,5支付成功,6交易完成,7交易关闭
paymentTime: '',//支付时间
totalCouponFee: '',//优惠券金额
totalPrice: '',//订单总金额
remark: '',//备注
sendTime: '',//发货时间
payChannel: '',//支付方式
// showStatus: null,//订单展示状态,1已完成,2已发货,3待发货,4待支付,5交易关闭
},
tableData: [],
sendGoodsDialog: false,
dialogTitle: '',
sendSetForm: {},
freightConfigForm:{
freightList:[{
price1: '',
price2: ''
}],
commissionType: 1,
price1: '',
price2: '',
storeId: '',
goodsId: '',
maxPrice: ''
},
}
},
created() {
const {id, storeId, storeType} = this.$route.query;
this.orderId = id;
this.storeId = storeId;
this.storeType = storeType;
this.jumPathThird = `/order-manage?storeId=${this.storeId}`;
this.init();
},
methods: {
init() {
queryOrderDetail(this.orderId).then(res => {
if (res.code == '000000') {
const { goodsInfoDtoList } = res.data;
this.orderDetailData = {...res.data};
this.showStatus = res.data.showStatus;
this.tableData = goodsInfoDtoList;
}
})
},
showSendDialog() {
this.sendGoodsDialog = true;
this.sendSetForm = this.orderDetailData;
if (this.storeType == 1) {
this.dialogTitle = '发货设置'
}else {
this.dialogTitle = '配送设置'
}
},
closeSendSet(val) {
//保存操作
if (val.type == 2) {
this.init();
}
this.sendGoodsDialog = false;
},
//跳转至商品编辑页
goGoodsEdit(row) {
// this.$store.dispatch('goodsManage/changeGoodsInfo', {...row});
this.$router.push({
path: '/create-good',
query: {
id: row.goodsId,
storeId: this.storeId,
}
})
},
// 添加条件
add(){
this.freightConfigForm.freightList.push({price1: "", price2: ""});
},
// 删除
del(index){
this.freightConfigForm.freightList.splice(index, 1);
},
// 保存
save(){
}
},
filters: {
toFixed2: function (value) {
let val;
if (value) {
val = (value/100).toFixed(2);
}else {
val = 0.00
}
return val;
},
payChanelFormat: function (value) {
let str = '';
if(value == 1) {
str = '微信支付'
}
return str;
}
},
}
</script>
<style lang="scss">
.order-detail-wrapper{
.order-detail-content{
background: #fff;
padding: 10px;
.header-title{
padding: 10px 12px;
font-size: 13px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.detail-all-info{
.trade-status{
display: flex;
align-items: center;
justify-content: center;
padding: 30px 0;
text-align: center;
font-size: 24px;
img{
width: 25px;
height: 25px;
margin-right: 15px;
}
.set-icon{
color: #449284;
font-size: 28px;
margin-right: 10px;
}
}
.trade-info{
width: 100%;
box-sizing: border-box;
display: flex;
font-size: 13px;
justify-content: space-between;
.el-card__body{
padding-top: 10px;
}
.left-card{
width: 69%;
display: inline-block;
margin-right: 2%;
.trade-status1{
height: 26px;
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 5px;
.send-status{
margin-left: 10px;
display: inline-block;
}
}
}
.right-card{
width: 28%;
display: inline-block;
}
.left-card, .right-card{
p{
color: #838683;
line-height: 22px;
}
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both
}
}
.total-set{
text-align: right;
margin-top: 10px;
p{
font-size: 13px;
color: #999999;
line-height: 24px;
span:first-child{
display: inline-block;
width: 72px;
text-align: left;
}
span:last-child{
display: inline-block;
width: 90px;
}
}
.total-price{
font-size: 15px;
color: #333333;
margin-top: 5px;
}
}
}
}
.el-button--text{
color: #449284;
font-size: 14px;
&::after{
content: '';
position: relative;
height: 14px;
/*border-right: 1px solid #EBEEF5;*/
border-right: 1px solid #aaaaaa;
padding-right: 10px;
}
&:last-of-type{
&::after{
content: '';
position: relative;
width: 1px;
height: 14px;
border-right: none;
}
}
}
}
</style>
......@@ -114,15 +114,6 @@
></el-input>
</el-form-item>
</el-row>
<el-row style="margin: 50px 0 0 220px;">
<el-button
:disabled="btnDisabled"
type="primary"
size="small"
@click="beforSave()"
>保存</el-button
>
</el-row>
</el-form>
</div>
<div class="header-title">商品运费</div>
......@@ -151,7 +142,19 @@
</template>
</el-table-column>
</el-table>
<el-row style="margin: 50px 0 0 220px;">
<el-button
:disabled="btnDisabled"
type="primary"
size="small"
@click="beforSave()"
>保存</el-button>
<el-button
:disabled="btnDisabled"
size="small"
@click="cancleSave()"
>取消</el-button>
</el-row>
<el-dialog
:title="title"
:visible.sync="setAddVisible"
......@@ -379,6 +382,9 @@ export default {
if (res.code == "000000") {
this.getExpressFeeInfo();
this.$message({ type: "success", message: "保存成功!" });
this.$router.push({
path: `/shop-list`
})
} else {
this.$message({ type: "error", message: "保存失败!" });
}
......@@ -387,6 +393,36 @@ export default {
this.btnDisabled = false;
});
},
cancleSave(){
this.$router.push({
path: `/shop-list`
})
// this.$confirm(`是否取消?`, "", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning"
// // customClass: 'range-make-box',
// })
// .then(() => {
// // confirm
// vm.DELETE("rtc/liveAdmin/" + row.id, {}).then(res => {
// if (res.code == "000000") {
// vm.$message({
// type: "success",
// message: "删除成功"
// });
// this.getLiveList("", "");
// } else {
// vm.$message({
// type: "warning",
// message: res.message
// });
// }
// });
// })
// .catch(() => {});
},
// 查看商品详情
viewGoods(row){
// url = `/create-good?id=${row.goodsId}&storeId=${this.searchForm.storeId}&goodsType=${goodsType}&commissionFlag=${this.commissionFlag}`
......@@ -464,7 +500,7 @@ export default {
}
.freight-config-content {
margin-top: 60px;
min-height: 500px;
min-height: 400px;
.title {
border-bottom: 0.5px solid #e7e8e9;
padding-bottom: 6px;
......
......@@ -65,6 +65,8 @@
<p>下单时间:{{orderDetailData.createdTime}}</p>
<p v-if="(showStatus == 1 || showStatus == 2 || showStatus == 3) && orderDetailData.payChannel">支付方式:{{orderDetailData.payChannel | payChanelFormat}}</p>
<p v-if="showStatus == 1 || showStatus == 2 || showStatus == 3">支付时间:{{orderDetailData.paymentTime}}</p>
<p v-if="showStatus == 1 || showStatus == 2 || showStatus == 3">招募人:{{orderDetailData.ownerName}}</p>
<p v-if="showStatus == 1 || showStatus == 2 || showStatus == 3">所属药代:{{orderDetailData.brokerName}}</p>
<!--<p>发货时间:{{orderDetailData.sendTime}}</p>-->
<!--<p>成交时间:{{orderDetailData.finishTime}}</p>-->
</div>
......@@ -148,6 +150,8 @@
remark: '',//备注
sendTime: '',//发货时间
payChannel: '',//支付方式
ownerName:'',// 招募人姓名
brokerName:'',//药代名称
// showStatus: null,//订单展示状态,1已完成,2已发货,3待发货,4待支付,5交易关闭
},
tableData: [],
......
......@@ -26,6 +26,43 @@
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30" type="flex" style="margin-top: 10px">
<el-col :span="18">
<el-form-item label="招募人">
<el-select
v-model="searchForm.broker"
id="statusSelector"
placeholder="请输入招募人"
@change="changeOwner"
clearable
style="width:110%;height: 32px;line-height: 32px;"
>
<el-option
v-for="item in brokerOwnerList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="药代姓名">
<el-select
v-model="searchForm.brokerOwner"
id="statusSelector"
placeholder="请输入药代姓名"
clearable
style="width:110%;height: 32px;line-height: 32px;"
>
<el-option
v-for="item in brokerList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" style="text-align: right">
<el-button type="primary" size="small" @click="searchList">查询</el-button>
<el-button type="default" size="small" @click="resetForm" style="margin-left:0;">重置</el-button>
......@@ -81,6 +118,8 @@
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column prop="ownerName" label="招募人" min-width="100" align="center"></el-table-column>
<el-table-column prop="brokerName" label="所属药代" min-width="100" align="center"></el-table-column>
<el-table-column prop="comments" label="备注" min-width="100" align="center"></el-table-column>
<el-table-column label="操作" min-width="250" align="center" fixed="right">
<template slot-scope="scope">
......@@ -251,7 +290,7 @@
import BreadCrumb from "@/components/breadcrumb.vue";
import SendSetDialog from "@/components/shop/send-set-dialog";
import { getOrdersExportUrl } from "@/utils/yqrange/yqrangeApi";
import { queryOrderList, updateExpress, refundApply } from "@/utils/shop";
import { queryOrderList, updateExpress, refundApply, brokerListAll, brokerOwnerListAll} from "@/utils/shop";
import { toDecimal2 } from '@/utils';
export default {
......@@ -271,6 +310,8 @@
orderNo: '',
receiver: '',
orderDate: '',
broker:'',
brokerOwner:'',
pageNo: 1,
pageSize: 10,
},
......@@ -334,13 +375,19 @@
label: '支付用户',
value: 2,
},
]
],
ownerId:'',
brokerList:[],
brokerOwnerList:[],
}
},
created() {
console.log("order created() : enter");
this.searchForm.storeId = this.$route.query.storeId || 0,
this.searchList();
this.brokerListAll();
this.brokerOwnerListAll();
},
methods: {
searchList(){
......@@ -538,7 +585,34 @@
}
window.open(res.data);
});
},
// 云鹊店铺-订单管理-药代列表
brokerListAll(){
brokerListAll({ownerId:this.ownerId}).then(res => {
closeLoading(this);
if (res.code == '000000') {
this.brokerList = res.data;
}
})
},
//云鹊店铺-订单管理-招募人列表
brokerOwnerListAll(){
brokerOwnerListAll().then(res => {
closeLoading(this);
if (res.code == '000000') {
this.brokerOwnerList = res.data;
}
})
},
changeOwner(data) {
this.ownerId = data;
this.brokerListAll();
}
},
filters: {
toFixed2: function (value) {
......
......@@ -3,15 +3,19 @@
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="yqshop-content screenSet" id="screenSet">
<div class="header-title">云鹊店铺</div>
<el-form ref="searchForm" :model="searchForm" label-width="80px" label-suffix=":" :inline="true">
<el-form ref="searchForm" :model="searchForm" label-width="100px" label-suffix=":" :inline="true">
<el-row :gutter="30" type="flex" style="margin-top: 10px">
<el-col :span="18">
<el-col :span="6">
<el-form-item label="店铺名称">
<el-input v-model="searchForm.storeName" size="small" placeholder="请输入店铺名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="店铺ID">
<el-input v-model="searchForm.id" size="small" placeholder="请输入店铺ID"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="店铺类型">
<el-select
v-model="searchForm.type"
......@@ -26,6 +30,10 @@
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30" type="flex" style="margin-top: 10px">
<el-col :span="6">
<el-form-item label="分佣方式">
<el-select
v-model="searchForm.commissionType"
......@@ -41,6 +49,22 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="药代分佣方式">
<el-select
v-model="searchForm.commissionType"
placeholder="请选择分佣方式"
size="small"
clearable>
<el-option
v-for="item in commissionTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" style="text-align: right">
<el-button type="primary" size="small" @click="searchList">查询</el-button>
<el-button type="default" size="small" @click="resetForm" style="margin-left:0;">重置</el-button>
......@@ -96,6 +120,17 @@
<span v-if="scope.row.tradeStore.commissionType == 2">{{scope.row.tradeStore.commissionPrice | priceNum}}</span>
</template>
</el-table-column>
<el-table-column prop="commissionType" label="药代分佣方式" width="120" align="center">
<template slot-scope="scope">
<span>{{ scope.row.tradeStore.commissionType | commissionTypeFormat}}</span>
</template>
</el-table-column>
<el-table-column prop="commissionPrice" label="药代分佣" width="120" align="center">
<template slot-scope="scope">
<span v-if="scope.row.tradeStore.commissionType == 1">{{scope.row.tradeStore.commissionPrice | priceNum}}%</span>
<span v-if="scope.row.tradeStore.commissionType == 2">{{scope.row.tradeStore.commissionPrice | priceNum}}</span>
</template>
</el-table-column>
<el-table-column label="操作" min-width="230" align="center" fixed="right">
<template slot-scope="scope">
<div>
......@@ -135,6 +170,7 @@
label-position="right"
size="mini"
style="width: 100%;">
<el-form-item label="分佣方式" prop="commissionType">
<el-col :span="18">
<el-radio-group v-model="setPriceForm.commissionType" size="small" style="line-height: 45px;">
......@@ -150,6 +186,21 @@
</el-col>
</el-form-item>
<!-- <el-form-item label="药代分佣方式">-->
<!-- <el-col :span="18">-->
<!-- <el-radio-group v-model="setPriceForm.commissionType" size="small" style="line-height: 45px;">-->
<!-- <div>-->
<!-- <el-radio :label="1" style="float: left;margin-top: 5px;line-height: 20px;">按比例分佣(%)</el-radio>-->
<!-- <span style="float: right;width: 100px;"><el-input-number v-model="setPriceForm.commissionPrice1" size="small" :precision="2" :min="0"></el-input-number></span>-->
<!-- </div>-->
<!-- <div>-->
<!-- <el-radio :label="2" style="float: left;margin-top: 30px;line-height: 20px;">固定分佣金额(元)</el-radio>-->
<!-- <span style="float: right;width: 100px;margin-left: 14px;"><el-input-number v-model="setPriceForm.commissionPrice2" size="small" :precision="2" :min="0" :max="9999.99"></el-input-number></span>-->
<!-- </div>-->
<!-- </el-radio-group>-->
<!-- </el-col>-->
<!-- </el-form-item>-->
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册