merge conflict

master
misworga831 2024-02-28 09:14:38 +08:00
commit 3cefb40ccb
50 changed files with 2403 additions and 1172 deletions

View File

@ -1,5 +1,4 @@
# 默认依赖包指定淘宝源 registry "https://registry.npmmirror.com"
registry=https://registry.npm.taobao.org/ sass_binary_site "https://npmmirror.com/mirrors/node-sass"
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ phantomjs_cdnurl "https://npmmirror.com/mirrors/phantomjs"
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/ electron_mirror "https://npmmirror.com/mirrors/electron"
electron_mirror=https://npm.taobao.org/mirrors/electron/

View File

@ -1,110 +0,0 @@
import request, {Method} from '@/plugins/request.js';
/**
* 获取当前会员分销信息
*/
export function distribution () {
return request({
url: `/buyer/distribution/distribution`,
method: Method.GET,
needToken: true
});
}
/**
* 申请成为分销员
* @param idNumber 身份证号
* @param name 名字
*/
export function applyDistribution (params) {
return request({
url: `/buyer/distribution/distribution`,
method: Method.POST,
needToken: true,
params
});
}
/**
* 获取分销员订单列表
*/
export function getDistOrderList (params) {
return request({
url: `/buyer/distribution/order`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 获取分销员下级用户列表
*/
export function getDistMemberList (params) {
return request({
url: `/buyer/distribution/distribution/memberList`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 获取分销商商品列表
*/
export function getDistGoodsList (params) {
return request({
url: `/buyer/distribution/goods`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 分销员提现历史
*/
export function distCashHistory (params) {
return request({
url: `/buyer/distribution/cash`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 分销员-团队列表
*/
export function getDistGroupList (params) {
return request({
url: `/buyer/distribution/distribution/groupList`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 分销商提现
*/
export function distCash (params) {
return request({
url: `/buyer/distribution/cash`,
method: Method.POST,
needToken: true,
params
});
}
/**
* 绑定分销
* @param distributionId 商品分销ID
*/
export function getGoodsDistribution (distributionId) {
return request({
url: `/buyer/distribution/distribution/bindingDistribution/${distributionId}`,
method: Method.GET,
needToken: true
});
}

View File

@ -333,7 +333,92 @@ export function clearComplain (id) {
}); });
} }
/**
* 获取当前会员分销信息
*/
export function distribution () {
return request({
url: `/buyer/distribution/distribution`,
method: Method.GET,
needToken: true
});
}
/**
* 申请成为分销商
* @param idNumber 身份证号
* @param name 名字
*/
export function applyDistribution (params) {
return request({
url: `/buyer/distribution/distribution`,
method: Method.POST,
needToken: true,
params
});
}
/**
* 获取分销商订单列表
*/
export function getDistOrderList (params) {
return request({
url: `/buyer/distribution/order`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 获取分销商商品列表
*/
export function getDistGoodsList (params) {
return request({
url: `/buyer/distribution/goods`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 绑定解绑分销商品
* @param distributionGoodsId 分销商品id
* @param checked 分销商品id,true为绑定false为解绑
*/
export function selectDistGoods (params) {
return request({
url: `/buyer/distribution/goods/checked/${params.distributionGoodsId}`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 分销商提现历史
*/
export function distCashHistory (params) {
return request({
url: `/buyer/distribution/cash`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 分销商提现
*/
export function distCash (params) {
return request({
url: `/buyer/distribution/cash`,
method: Method.POST,
needToken: true,
params
});
}
/** /**
* 我的足迹 * 我的足迹

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<card _Title="我的分销"/> <card _Title="我的分销" />
<!-- 分销申请 --> <!-- 分销申请 -->
<div v-if="status === 0"> <div v-if="status === 0">
@ -12,8 +12,20 @@
<FormItem label="身份证号" prop="idNumber"> <FormItem label="身份证号" prop="idNumber">
<Input v-model="applyForm.idNumber"></Input> <Input v-model="applyForm.idNumber"></Input>
</FormItem> </FormItem>
<FormItem label="银行开户行" prop="settlementBankBranchName">
<Input v-model="applyForm.settlementBankBranchName"></Input>
</FormItem>
<FormItem label="银行开户名" prop="settlementBankAccountName">
<Input v-model="applyForm.settlementBankAccountName"></Input>
</FormItem>
<FormItem label="银行账号" prop="settlementBankAccountNum">
<Input v-model="applyForm.settlementBankAccountNum"></Input>
</FormItem>
<FormItem> <FormItem>
<Button type="primary" :loading="applyLoading" @click="apply"></Button> <Button type="primary" :loading="applyLoading" @click="apply"
>提交申请</Button
>
</FormItem> </FormItem>
</Form> </Form>
</div> </div>
@ -22,69 +34,43 @@
<Alert type="success"> <Alert type="success">
您提交的信息正在审核 您提交的信息正在审核
<template slot="desc" <template slot="desc"
>提交认证申请后工作人员将在三个工作日进行核对完成审核 >提交认证申请后工作人员将在三个工作日进行核对完成审核</template
</template
> >
</Alert> </Alert>
</div> </div>
<!-- 分销提现商品订单 --> <!-- 分销提现商品订单 -->
<div v-if="status === 2"> <div v-if="status === 2">
<div class="tips"> <div class="tips">
<p>分销下线付款之后会生成分销订单</p> <p>分销下线付款之后会生成分销订单</p>
<p>交易完成后返佣可提现</p> <p>
冻结金额用户提现金额即为冻结金额审核通过后扣除冻结金额审核拒绝之后冻结金额返回可提现金额
</p>
<p>可提现金额分销订单佣金T+1解冻后可变为可提现金额</p>
</div> </div>
<div class="box"> <div class="box">
<div class="mb_20 account-price"> <div class="mb_20 account-price">
<span class="subTips">可提现金额()</span> <span class="subTips">可提现金额</span>
<span class="fontsize_48 global_color">{{ result.canRebate | unitPrice }}</span> <span class="fontsize_48 global_color"
<span class="subTips">待结算</span> >{{ result.canRebate | unitPrice }}</span
<span class="">{{ result.commissionFrozen | unitPrice }}</span> >
<span class="subTips">总收益()</span> <span class="subTips">冻结金额</span>
<span class="">{{ result.rebateTotal | unitPrice }}</span> <span class="">{{ result.commissionFrozen | unitPrice }}</span>
<span class="subTips">返利总金额</span>
<span class="">{{ result.rebateTotal | unitPrice }}</span>
<Button <Button
type="primary" type="primary"
size="small" size="small"
class="ml_20" class="ml_20"
@click="withdrawApplyModal = true">申请提现 @click="withdrawApplyModal = true"
</Button> >申请提现</Button
>
</div> </div>
</div> </div>
<Tabs :value="tabName" @on-click="tabPaneChange"> <Tabs :value="tabName" @on-click="tabPaneChange">
<TabPane label="推广订单" name="order"> <TabPane label="已选商品" name="goodsChecked">
<Table stripe :columns="orderColumns" :data="orderData.records">
<template slot-scope="{ row }" slot="createTime">
<span>{{ row.createTime }}</span>
</template>
<template slot-scope="{ row }" slot="goodsName">
<span>{{ row.goodsName }}</span>
</template>
<template slot-scope="{ row }" slot="num">
<span>{{ row.num }}</span>
</template>
<template slot-scope="{ row }" slot="rebate">
<span>{{ row.rebate }}</span>
</template>
<template slot-scope="{ row }" slot="distributionOrderStatus">
<span v-if="row.distributionOrderStatus == 'NO_COMPLETED'"></span>
<span v-else-if="row.distributionOrderStatus == 'COMPLETE'">订单完成</span>
<span v-else-if="row.distributionOrderStatus == 'CANCEL'">订单取消</span>
<span v-else-if="row.distributionOrderStatus == 'REFUND'">订单退款</span>
</template>
</Table>
<div class="page-size">
<Page
:current="orderParams.pageNumber"
:total="orderData.total"
:page-size="orderParams.pageSize"
@on-change="changeOrderPage"
size="small"
show-total
show-elevator
></Page>
</div>
</TabPane>
<TabPane label="推广商品" name="goods">
<Table stripe :columns="goodsColumns" :data="goodsData.records"> <Table stripe :columns="goodsColumns" :data="goodsData.records">
<template slot-scope="{ row }" slot="name"> <template slot-scope="{ row }" slot="name">
<div <div
@ -93,21 +79,20 @@
linkTo( linkTo(
`/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}` `/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}`
) )
"> "
>
<img <img
style="vertical-align: top" style="vertical-align: top"
:src="row.thumbnail" :src="row.thumbnail"
width="60" width="60"
height="60" height="60"
alt=""/>&nbsp; {{ row.goodsName }} alt=""
/>&nbsp; {{ row.goodsName }}
</div> </div>
</template> </template>
<template slot-scope="{ row }" slot="price"> <template slot-scope="{ row }" slot="price">
<span> {{ row.price | unitPrice }}</span> <span> {{ row.price | unitPrice }}</span>
</template> </template>
<template slot-scope="{ row }" slot="firstProportion">
<span style="margin-left: 10px;"> {{ row.firstProportion }}%</span>
</template>
<template slot-scope="{ row }" slot="commission"> <template slot-scope="{ row }" slot="commission">
<span> {{ row.commission | unitPrice }}</span> <span> {{ row.commission | unitPrice }}</span>
</template> </template>
@ -116,8 +101,15 @@
type="success" type="success"
size="small" size="small"
style="margin-right: 5px" style="margin-right: 5px"
@click="fenxiao(row)">邀请好友 @click="fenxiao(row)"
</Button> >分销商品</Button
>
<Button
type="error"
size="small"
@click="selectGoods(row.id, false)"
>取消选择</Button
>
</template> </template>
</Table> </Table>
<div class="page-size"> <div class="page-size">
@ -132,30 +124,48 @@
></Page> ></Page>
</div> </div>
</TabPane> </TabPane>
<TabPane label="我的客户" name="member"> <TabPane label="未选商品" name="goodsUncheck">
<Table stripe :columns="memberColumns" :data="memberData.records"> <Table stripe :columns="goodsColumns" :data="goodsData.records">
<template slot-scope="{ row }" slot="nickName"> <template slot-scope="{ row }" slot="name">
<span>{{ row.nickName }}</span> <div
class="goods-msg"
@click="
linkTo(
`/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}`
)
"
>
<img
style="vertical-align: top"
:src="row.thumbnail"
width="60"
height="60"
alt=""
/>&nbsp; {{ row.goodsName }}
</div>
</template> </template>
<template slot-scope="{ row }" slot="orderPrice"> <template slot-scope="{ row }" slot="price">
<span>{{ row.orderPrice }}</span> <span> {{ row.price | unitPrice }}</span>
</template> </template>
<template slot-scope="{ row }" slot="rebatePrice"> <template slot-scope="{ row }" slot="commission">
<span>{{ row.rebatePrice }}</span> <span> {{ row.commission | unitPrice }}</span>
</template> </template>
<template slot-scope="{ row }" slot="orderNum"> <template slot-scope="{ row }" slot="action">
<span>{{ row.orderNum }}</span> <Button
</template> type="primary"
<template slot-scope="{ row }" slot="lastLoginDate"> size="small"
<span>{{ row.lastLoginDate }}</span> style="margin-right: 5px"
@click="selectGoods(row.id, true)"
>选择商品</Button
>
</template> </template>
</Table> </Table>
<div class="page-size"> <div class="page-size">
<Page <Page
:current="memberParams.pageNumber" :current="params.pageNumber"
:total="memberData.total" :total="goodsData.total"
:page-size="memberParams.pageSize" :page-size="params.pageSize"
@on-change="changeOrderPage" @on-change="changePage"
size="small" size="small"
show-total show-total
show-elevator show-elevator
@ -173,11 +183,13 @@
<template slot-scope="{ row }" slot="price"> <template slot-scope="{ row }" slot="price">
<span <span
v-if="row.distributionCashStatus == 'VIA_AUDITING'" v-if="row.distributionCashStatus == 'VIA_AUDITING'"
style="color: green"> style="color: green"
{{ row.price | unitPrice }}</span >
+{{ row.price | unitPrice }}</span
> >
<span v-else style="color: red"> <span v-else style="color: red">
{{ row.price | unitPrice }}</span> -{{ row.price | unitPrice }}</span
>
</template> </template>
<template slot-scope="{ row }" slot="status"> <template slot-scope="{ row }" slot="status">
<span> <span>
@ -187,7 +199,8 @@
: row.distributionCashStatus == "VIA_AUDITING" : row.distributionCashStatus == "VIA_AUDITING"
? "通过" ? "通过"
: "拒绝" : "拒绝"
}}</span> }}</span
>
</template> </template>
</Table> </Table>
<div class="page-size"> <div class="page-size">
@ -202,30 +215,6 @@
></Page> ></Page>
</div> </div>
</TabPane> </TabPane>
<TabPane label="我的团队" name="group">
<Table stripe :columns="groupColumns" :data="groupData.records">
<template slot-scope="{ row }" slot="memberName">
<span>{{ row.memberName }}</span>
</template>
<template slot-scope="{ row }" slot="distributionOrderPrice">
<span>{{ row.distributionOrderPrice }}</span>
</template>
<template slot-scope="{ row }" slot="distributionOrderCount">
<span>{{ row.distributionOrderCount }}</span>
</template>
</Table>
<div class="page-size">
<Page
:current="groupParams.pageNumber"
:total="groupData.total"
:page-size="groupParams.pageSize"
@on-change="changeOrderPage"
size="small"
show-total
show-elevator
></Page>
</div>
</TabPane>
</Tabs> </Tabs>
</div> </div>
<!-- 未开放 --> <!-- 未开放 -->
@ -233,8 +222,7 @@
<Alert type="error"> <Alert type="error">
分销功能暂未开启 分销功能暂未开启
<template slot="desc" <template slot="desc"
>提交认证申请后工作人员将在三个工作日进行核对完成审核 >提交认证申请后工作人员将在三个工作日进行核对完成审核</template
</template
> >
</Alert> </Alert>
</div> </div>
@ -251,8 +239,7 @@
<Alert type="success"> <Alert type="success">
您提交的申诉正在审核 您提交的申诉正在审核
<template slot="desc" <template slot="desc"
>提交认证申请后工作人员将在三个工作日进行核对完成审核 >提交认证申请后工作人员将在三个工作日进行核对完成审核</template
</template
> >
</Alert> </Alert>
</div> </div>
@ -263,18 +250,29 @@
</p> </p>
<div> <div>
<Input v-model="withdrawPrice" size="large" number maxlength="9" <Input v-model="withdrawPrice" size="large" number maxlength="9"
><span slot="append"></span></Input> ><span slot="append"></span></Input
>
</div> </div>
<div slot="footer" style="text-align: center"> <div slot="footer" style="text-align: center">
<Button type="primary" size="large" @click="withdraw"></Button> <Button type="primary" size="large" @click="withdraw"></Button>
</div> </div>
</Modal> </Modal>
<Modal v-model="qrcodeShow" title="分销商品" width="800"> <Modal v-model="qrcodeShow" title="分销商品" width="800">
<Alert type="warning"> 下载二维码或者复制链接分享商品</Alert> <Alert type="warning"> 下载二维码或者复制链接分享商品 </Alert>
<div class="qrcode"> <div class="qrcode">
<div style="width: 150px; height: 150px; "> <div style="width: 150px; height: 150px; border: 1px solid #eee">
<div class="qrcode-platform" style="margin-top: 100px">PC端</div> <vue-qr
<Button style="margin-left: 40px; margin-top: 65px" type="success" @click="copyUrlLink"></Button> :text="qrcode"
:callback="qrcodeData"
:margin="0"
colorDark="#000"
colorLight="#fff"
:size="150"
></vue-qr>
<div class="qrcode-platform">PC端</div>
<Button class="download-btn" type="success" @click="downloadQrcode"
>下载二维码</Button
>
</div> </div>
<div style="width: 150px; height: 150px; border: 1px solid #eee"> <div style="width: 150px; height: 150px; border: 1px solid #eee">
<vue-qr <vue-qr
@ -287,13 +285,13 @@
></vue-qr> ></vue-qr>
<div class="qrcode-platform">移动应用端</div> <div class="qrcode-platform">移动应用端</div>
<Button class="download-btn" type="success" @click="downloadQrcodeH5" <Button class="download-btn" type="success" @click="downloadQrcodeH5"
>下载二维码 >下载二维码</Button
</Button
> >
</div> </div>
</div> </div>
<div class="mt_10" style="margin-top: 100px;"> <div class="mt_10" style="margin-top: 100px;">
商品链接<Input style="width: 600px" v-model="qrcode"></Input>
</div> </div>
</Modal> </Modal>
</div> </div>
@ -306,98 +304,92 @@ import {
distCash, distCash,
distCashHistory, distCashHistory,
getDistGoodsList, getDistGoodsList,
getDistOrderList, selectDistGoods,
getDistMemberList, } from "@/api/member.js";
getDistGroupList import { IDCard } from "@/plugins/RegExp.js";
} from "@/api/distribution.js"; import { checkBankno } from "@/plugins/Foundation";
import {IDCard} from "@/plugins/RegExp.js";
import vueQr from "vue-qr"; import vueQr from "vue-qr";
export default { export default {
name: "Distribution", name: "Distribution",
components: {vueQr}, components: { vueQr },
data() { data() {
return { return {
config: require('@/config'), config:require('@/config'),
status: 0, // 0 1 2 3 status: 0, // 0 1 2 3
applyForm: {}, // applyForm: {}, //
rules: { rules: {
// //
name: [{required: true, message: "请输入真实姓名"}], name: [{ required: true, message: "请输入真实姓名" }],
idNumber: [ idNumber: [
{required: true, message: "请输入身份证号"}, { required: true, message: "请输入身份证号" },
{pattern: IDCard, message: "请输入正确的身份证号"}, { pattern: IDCard, message: "请输入正确的身份证号" },
],
settlementBankBranchName: [
{
required: true,
message: "请输入银行开户行",
//
trigger: "blur",
},
],
settlementBankAccountName: [
{
required: true,
message: "请输入银行开户名",
//
trigger: "blur",
},
],
//
settlementBankAccountNum: [
{
required: true,
message: "银行账号不正确",
//
trigger: "blur",
},
{
validator: (rule, value, callback) => {
// truefalse
// this.$u.test.mobile()truefalse
return checkBankno(value);
},
message: "银行账号不正确",
},
], ],
}, },
tabName: "order", // tab tabName: "goodsChecked", // tab
result: {}, // result: {}, //
applyLoading: false, // applyLoading: false, //
goodsLoading: false, // goodsLoading: false, //
orderLoading: false, //
withdrawApplyModal: false, // withdrawApplyModal: false, //
withdrawPrice: 0, // withdrawPrice: 0, //
goodsData: {}, // goodsData: {}, //
orderData:{}, //
memberData:{}, //
logData: {}, // logData: {}, //
groupData:{},//
orderColumns:[
//
{title: "下单时间", slot: "createTime", minWidth: 200},
{title: "商品名称", slot: "goodsName", minWidth: 200},
{title: "数量", slot: "num"},
{title: "佣金金额", slot: "rebate"},
{title: "状态", slot: "distributionOrderStatus"},
],
memberColumns:[
//
{title: "客户昵称", slot: "nickName", minWidth: 150},
{title: "成交额", slot: "orderPrice"},
{title: "佣金总额", slot: "rebatePrice"},
{title: "订单数", slot: "orderNum"},
{title: "最近下单时间", slot: "lastLoginDate", minWidth: 150},
],
goodsColumns: [ goodsColumns: [
// //
{title: "商品名称", slot: "name", width: 400}, { title: "商品名称", slot: "name", width: 400 },
{title: "商品价格", slot: "price"}, { title: "商品价格", slot: "price" },
{title: "佣金比例", slot: "firstProportion"}, { title: "佣金", slot: "commission" },
{title: "预计赚", slot: "commission"}, { title: "操作", slot: "action", minWidth: 120 },
{title: "操作", slot: "action", minWidth: 120},
], ],
logColumns: [ logColumns: [
// //
{title: "编号", slot: "sn"}, { title: "编号", slot: "sn" },
{title: "申请时间", slot: "time"}, { title: "申请时间", slot: "time" },
{title: "提现金额", slot: "price"}, { title: "提现金额", slot: "price" },
{title: "提现状态", slot: "status"}, { title: "提现状态", slot: "status" },
],
groupColumns: [
//
{title: "昵称", slot: "memberName"},
{title: "销售额", slot: "distributionOrderPrice"},
{title: "订单量", slot: "distributionOrderCount"},
], ],
params: { params: {
// //
pageNumber: 1, pageNumber: 1,
pageSize: 20, pageSize: 20,
sort: "createTime", checked: true,
order: "desc",
}, },
orderParams: { orderParams: {
// //
pageNumber: 1, pageNumber: 1,
pageSize: 20, pageSize: 20,
sort: "createTime",
order: "desc",
},
memberParams: {
//
pageNumber: 1,
pageSize: 20,
sort: "createTime",
order: "desc",
}, },
logParams: { logParams: {
// //
@ -406,15 +398,8 @@ export default {
sort: "createTime", sort: "createTime",
order: "desc", order: "desc",
}, },
groupParams: {
//
pageNumber: 1,
pageSize: 20,
sort: "createTime",
order: "desc",
},
qrcode: "", // qrcode: "", //
qrcodeH5: "",//H5 qrcodeH5:"",//H5
qrcodeShow: false, // qrcodeShow: false, //
base64Img: "", // base64 base64Img: "", // base64
base64ImgH5: "", // base64H5 base64ImgH5: "", // base64H5
@ -442,7 +427,7 @@ export default {
}, },
withdraw() { withdraw() {
// //
distCash({price: this.withdrawPrice}).then((res) => { distCash({ price: this.withdrawPrice }).then((res) => {
this.withdrawApplyModal = false; this.withdrawApplyModal = false;
this.price = 0; this.price = 0;
if (res.success) { if (res.success) {
@ -462,15 +447,6 @@ export default {
// H5base64 // H5base64
this.base64ImgH5 = data64; this.base64ImgH5 = data64;
}, },
copyUrlLink(){
navigator.clipboard.writeText(this.qrcode)
.then(() => {
this.$Message.success("复制成功!");
})
.catch(err => {
this.$Message.error("复制失败!");
});
},
downloadQrcode() { downloadQrcode() {
// //
let a = document.createElement("a"); // a let a = document.createElement("a"); // a
@ -479,7 +455,7 @@ export default {
a.href = this.base64Img; // URLa.href a.href = this.base64Img; // URLa.href
a.dispatchEvent(event); // a a.dispatchEvent(event); // a
}, },
downloadQrcodeH5() { downloadQrcodeH5(){
// H5 // H5
let a = document.createElement("a"); // a let a = document.createElement("a"); // a
let event = new MouseEvent("click"); // let event = new MouseEvent("click"); //
@ -489,33 +465,18 @@ export default {
}, },
tabPaneChange(tab) { tabPaneChange(tab) {
// tab // tab
if (tab === "goods") { if (tab === "goodsChecked") {
this.params.checked = true;
this.params.pageNUmber = 1;
this.getGoodsData();
} else if (tab === "goodsUncheck") {
this.params.checked = false; this.params.checked = false;
this.getGoodsData(); this.getGoodsData();
}else if (tab === "order") {
this.orderParams.checked = false;
this.getOrderData();
}else if (tab === "member") {
this.memberParams.checked = false;
this.getMemberData();
} else if (tab === "log") { } else if (tab === "log") {
this.logParams.pageNumber = 1; this.logParams.pageNumber = 1;
this.getLog(); this.getLog();
}else if (tab === "group") {
this.groupParams.pageNumber = 1;
this.getGroupData();
} }
}, },
changeOrderPage(val) {
//
this.orderParams.pageNumber = val;
this.getOrderData();
},
changeMemberPage(val) {
//
this.memberParams.pageNumber = val;
this.getMemberData();
},
changePage(val) { changePage(val) {
// //
this.params.pageNumber = val; this.params.pageNumber = val;
@ -526,6 +487,19 @@ export default {
this.logParams.pageNumber = val; this.logParams.pageNumber = val;
this.getLog(); this.getLog();
}, },
selectGoods(id, checked) {
//
let params = {
distributionGoodsId: id,
checked: checked,
};
selectDistGoods(params).then((res) => {
if (res.success) {
this.$Message.success("操作成功!");
this.getGoodsData();
}
});
},
fenxiao(row) { fenxiao(row) {
// //
this.qrcode = `${this.config.PC_DOMAIN}/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}&distributionId=${this.result.id}`; this.qrcode = `${this.config.PC_DOMAIN}/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}&distributionId=${this.result.id}`;
@ -533,18 +507,6 @@ export default {
this.goodsNameCurr = row.goodsName; this.goodsNameCurr = row.goodsName;
this.qrcodeShow = true; this.qrcodeShow = true;
}, },
getOrderData(){
//
getDistOrderList(this.orderParams).then((res) => {
if (res.success) this.orderData = res.result;
});
},
getMemberData(){
//
getDistMemberList(this.memberParams).then((res) => {
if (res.success) this.memberData = res.result;
});
},
getGoodsData() { getGoodsData() {
// //
getDistGoodsList(this.params).then((res) => { getDistGoodsList(this.params).then((res) => {
@ -557,14 +519,8 @@ export default {
if (res.success) this.logData = res.result; if (res.success) this.logData = res.result;
}); });
}, },
getGroupData() {
//
getDistGroupList(this.groupParams).then((res) => {
if (res.success) this.groupData = res.result;
});
},
// //
repaying() { repaying(){
applyDistribution().then((res) => { applyDistribution().then((res) => {
this.applyLoading = false; this.applyLoading = false;
if (res.success) { if (res.success) {
@ -581,14 +537,14 @@ export default {
let type = res.result.distributionStatus; let type = res.result.distributionStatus;
if (type === "PASS") { if (type === "PASS") {
this.status = 2; this.status = 2;
this.getOrderData(); this.getGoodsData();
} else if (type === "REFUSE") { } else if ( type === "REFUSE") {
this.status = 0; this.status = 0;
} else if (type === "RETREAT") { } else if (type === "RETREAT") {
this.status = 4; this.status = 4;
} else if (type === "APPEAL") { }else if (type === "APPEAL") {
this.status = 5; this.status = 5;
} else { }else {
this.status = 1; this.status = 1;
} }
} else if (!res.data.success && res.data.code === 22000) { } else if (!res.data.success && res.data.code === 22000) {
@ -607,35 +563,28 @@ export default {
.box { .box {
margin: 20px 0; margin: 20px 0;
} }
.page-size { .page-size {
margin: 15px 0px; margin: 15px 0px;
text-align: right; text-align: right;
} }
.account-price { .account-price {
font-weight: bold; font-weight: bold;
} }
.subTips { .subTips {
margin-left: 10px; margin-left: 10px;
} }
.fontsize_48 { .fontsize_48 {
font-size: 48px; font-size: 48px;
} }
.goods-msg { .goods-msg {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 3px; padding: 3px;
&:hover { &:hover {
color: $theme_color; color: $theme_color;
cursor: pointer; cursor: pointer;
} }
} }
.download-btn { .download-btn {
// position: relative; // position: relative;
// top: -200px; // top: -200px;
@ -643,31 +592,26 @@ export default {
margin-left: 25px; margin-left: 25px;
margin-top: 5px margin-top: 5px
} }
/deep/ .ivu-alert-message { /deep/ .ivu-alert-message {
p { p {
margin: 4px 0; margin: 4px 0;
} }
} }
.tips{
.tips { background:#f7f7f7;
background: #f7f7f7;
padding: 16px; padding: 16px;
border-radius: .4em; border-radius: .4em;
>p{
> p {
margin: 6px 0; margin: 6px 0;
} }
} }
.qrcode{
.qrcode {
display: flex; display: flex;
justify-content: space-evenly; justify-content: space-evenly;
padding-top: 10px padding-top: 10px
} }
.qrcode-platform{
.qrcode-platform {
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
margin: 5px; margin: 5px;

View File

@ -900,6 +900,15 @@ aws4@^1.2.1, aws4@^1.8.0:
resolved "https://registry.nlark.com/aws4/download/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" resolved "https://registry.nlark.com/aws4/download/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
integrity sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk= integrity sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk=
axios@1.2.3:
version "1.2.3"
resolved "https://registry.npmmirror.com/axios/-/axios-1.2.3.tgz#31a3d824c0ebf754a004b585e5f04a5f87e6c4ff"
integrity sha512-pdDkMYJeuXLZ6Xj/Q5J3Phpe+jbGdsSzlQaFVkMQzRUL05+6+tetX8TV3p4HrU4kzuO9bt+io/yGQxuyxA/xcw==
dependencies:
follow-redirects "^1.15.0"
form-data "^4.0.0"
proxy-from-env "^1.1.0"
axios@^0.19.2: axios@^0.19.2:
version "0.19.2" version "0.19.2"
resolved "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz" resolved "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz"
@ -912,6 +921,11 @@ balanced-match@^1.0.0:
resolved "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz" resolved "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
balloon-css@^1.0.3:
version "1.2.0"
resolved "https://registry.npmmirror.com/balloon-css/-/balloon-css-1.2.0.tgz#53d3fb4051264a278a58713bed6865845dbcaf4b"
integrity sha512-urXwkHgwp6GsXVF+it01485Z2Cj4pnW02ICnM0TemOlkKmCNnDLmyy+ZZiRXBpwldUXO+aRNr7Hdia4CBvXJ5A==
base64-js@^1.0.2: base64-js@^1.0.2:
version "1.5.1" version "1.5.1"
resolved "https://registry.npm.taobao.org/base64-js/download/base64-js-1.5.1.tgz" resolved "https://registry.npm.taobao.org/base64-js/download/base64-js-1.5.1.tgz"
@ -1671,10 +1685,10 @@ colorette@^1.2.2:
resolved "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz" resolved "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz"
integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==
combined-stream@^1.0.5, combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: combined-stream@^1.0.5, combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.5, combined-stream@~1.0.6:
version "1.0.8" version "1.0.8"
resolved "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" resolved "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha1-w9RaizT9cwYxoRCoolIGgrMdWn8= integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
dependencies: dependencies:
delayed-stream "~1.0.0" delayed-stream "~1.0.0"
@ -2456,6 +2470,15 @@ dotenv@^8.2.0:
resolved "https://registry.nlark.com/dotenv/download/dotenv-8.6.0.tgz?cache=0&sync_timestamp=1621628681571&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdotenv%2Fdownload%2Fdotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" resolved "https://registry.nlark.com/dotenv/download/dotenv-8.6.0.tgz?cache=0&sync_timestamp=1621628681571&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdotenv%2Fdownload%2Fdotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b"
integrity sha1-Bhr2ZNGff02PxuT/m1hM4jety4s= integrity sha1-Bhr2ZNGff02PxuT/m1hM4jety4s=
dplayer@^1.27.1:
version "1.27.1"
resolved "https://registry.npmmirror.com/dplayer/-/dplayer-1.27.1.tgz#2d7bb67b515b29a68edaec906a2904acd277dfd4"
integrity sha512-2laBMXs5V1B9zPwJ7eAIw/OBo+Xjvy03i4GHTk3Cg+IWbrq8rKMFO0fFr6ClAYotYOCcFGOvaJDkOZcgKllsCA==
dependencies:
axios "1.2.3"
balloon-css "^1.0.3"
promise-polyfill "8.3.0"
duplexer@^0.1.1: duplexer@^0.1.1:
version "0.1.2" version "0.1.2"
resolved "https://registry.npm.taobao.org/duplexer/download/duplexer-0.1.2.tgz" resolved "https://registry.npm.taobao.org/duplexer/download/duplexer-0.1.2.tgz"
@ -3001,6 +3024,11 @@ follow-redirects@1.5.10, follow-redirects@^1.0.0:
dependencies: dependencies:
debug "=3.1.0" debug "=3.1.0"
follow-redirects@^1.15.0:
version "1.15.5"
resolved "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020"
integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==
for-in@^0.1.3: for-in@^0.1.3:
version "0.1.8" version "0.1.8"
resolved "https://registry.npm.taobao.org/for-in/download/for-in-0.1.8.tgz" resolved "https://registry.npm.taobao.org/for-in/download/for-in-0.1.8.tgz"
@ -3023,6 +3051,15 @@ forever-agent@~0.6.1:
resolved "https://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz" resolved "https://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"
form-data@~2.1.1: form-data@~2.1.1:
version "2.1.4" version "2.1.4"
resolved "https://registry.nlark.com/form-data/download/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" resolved "https://registry.nlark.com/form-data/download/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1"
@ -6118,6 +6155,11 @@ promise-inflight@^1.0.1:
resolved "https://registry.npm.taobao.org/promise-inflight/download/promise-inflight-1.0.1.tgz" resolved "https://registry.npm.taobao.org/promise-inflight/download/promise-inflight-1.0.1.tgz"
integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM=
promise-polyfill@8.3.0:
version "8.3.0"
resolved "https://registry.npmmirror.com/promise-polyfill/-/promise-polyfill-8.3.0.tgz#9284810268138d103807b11f4e23d5e945a4db63"
integrity sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==
promise@^7.1.1: promise@^7.1.1:
version "7.3.1" version "7.3.1"
resolved "https://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" resolved "https://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"
@ -6133,6 +6175,11 @@ proxy-addr@~2.0.7:
forwarded "0.2.0" forwarded "0.2.0"
ipaddr.js "1.9.1" ipaddr.js "1.9.1"
proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
prr@~1.0.1: prr@~1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.npm.taobao.org/prr/download/prr-1.0.1.tgz" resolved "https://registry.npm.taobao.org/prr/download/prr-1.0.1.tgz"

View File

@ -1,5 +1,4 @@
# 默认依赖包指定淘宝源 registry "https://registry.npmmirror.com"
registry=https://registry.npm.taobao.org/ sass_binary_site "https://npmmirror.com/mirrors/node-sass"
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ phantomjs_cdnurl "https://npmmirror.com/mirrors/phantomjs"
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/ electron_mirror "https://npmmirror.com/mirrors/electron"
electron_mirror=https://npm.taobao.org/mirrors/electron/

View File

@ -53,11 +53,6 @@ export const getDistributionCash = (params) => {
export const auditDistributionCash = (id,params) => { export const auditDistributionCash = (id,params) => {
return postRequest(`/distribution/cash/audit/${id}`, params) return postRequest(`/distribution/cash/audit/${id}`, params)
} }
//分销会员列表
export const getDistributionMember = (id,params) => {
return getRequest(`/distribution/distribution/memberList/${id}`, params)
}
//查看分销团队列表
export const getDistributionGroup = (id,params) => {
return getRequest(`/distribution/distribution/groupList/${id}`, params)
}

View File

@ -57,7 +57,7 @@
</Modal> </Modal>
<Modal width="1000" v-model="showOssManager" @on-ok="confirmUrls"> <Modal width="1000" v-model="showOssManager" @on-ok="confirmUrls">
<OssManage ref="ossManage" @selected="handleCallback" /> <OssManage ref="ossManage" :isComponent="true" @selected="handleCallback" />
</Modal> </Modal>
</div> </div>
</template> </template>

View File

@ -47,7 +47,7 @@
</Modal> </Modal>
<Modal width="1200px" v-model="picModalFlag"> <Modal width="1200px" v-model="picModalFlag">
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" ref="ossManage" isComponent="true" />
</Modal> </Modal>
</div> </div>

View File

@ -276,19 +276,7 @@ export const otherRouter = {
title: "查看直播", title: "查看直播",
name: "live-detail", name: "live-detail",
component: () => import("@/views/promotions/live/live-detail.vue") component: () => import("@/views/promotions/live/live-detail.vue")
}, }
{
path: "group-list",
title: "分销团队",
name: "group-list",
component: () => import("@/views/distribution/distributionGroup.vue")
},
{
path: "distribution-member",
title: "分销会员列表",
name: "distribution-member",
component: () => import("@/views/distribution/distributionMember.vue")
},
] ]
}; };

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<Card> <Card>
<Row @keydown.enter.native="handleSearch"> <Row @keydown.enter.native.prevent="handleSearch">
<Form <Form
ref="searchForm" ref="searchForm"
:model="searchForm" :model="searchForm"
@ -68,10 +68,9 @@
<script> <script>
import { import {
getDistributionListData, getDistributionListData,
retreatDistribution, resumeDistribution,
resumeDistribution, retreatDistribution
auditDistribution,
} from "@/api/distribution"; } from "@/api/distribution";
import { distributionStatusList } from "./dataJson.js"; import { distributionStatusList } from "./dataJson.js";
export default { export default {
@ -90,23 +89,19 @@ export default {
{ {
title: "会员名称", title: "会员名称",
key: "memberName", key: "memberName",
minWidth: 200, minWidth: 120,
tooltip: true, tooltip: true,
}, },
{ {
title: "推广单数", title: "推广单数",
key: "distributionOrderCount", key: "distributionOrderCount",
minWidth: 200, minWidth: 120,
}, width: 150,
{
title: "推广人数",
key: "peopleNum",
minWidth: 200,
}, },
{ {
title: "分销金额", title: "分销金额",
key: "rebateTotal", key: "rebateTotal",
minWidth: 200, width: 150,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
return h("priceColorScheme", {props:{value:params.row.rebateTotal,color:this.$mainColor}} ); return h("priceColorScheme", {props:{value:params.row.rebateTotal,color:this.$mainColor}} );
@ -114,9 +109,9 @@ export default {
}, },
{ {
title: "可提现金额", title: "可金额",
key: "canRebate", key: "canRebate",
minWidth: 200, width: 150,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
return h("priceColorScheme", {props:{value:params.row.canRebate,color:'green'}} ); return h("priceColorScheme", {props:{value:params.row.canRebate,color:'green'}} );
@ -125,7 +120,7 @@ export default {
{ {
title: "冻结金额", title: "冻结金额",
key: "commissionFrozen", key: "commissionFrozen",
minWidth: 200, width: 150,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
return h("priceColorScheme", {props:{value:params.row.commissionFrozen,color:'#347dda'}} ); return h("priceColorScheme", {props:{value:params.row.commissionFrozen,color:'#347dda'}} );
@ -134,7 +129,7 @@ export default {
{ {
title: "状态", title: "状态",
key: "distributionStatus", key: "distributionStatus",
minWidth: 200, width: 150,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
if (params.row.distributionStatus == "PASS") { if (params.row.distributionStatus == "PASS") {
@ -153,7 +148,7 @@ export default {
key: "action", key: "action",
align: "center", align: "center",
fixed: "right", fixed: "right",
minWidth: 200, width: 140,
render: (h, params) => { render: (h, params) => {
return h( return h(
"div", "div",
@ -163,42 +158,7 @@ export default {
justifyContent: "center", justifyContent: "center",
}, },
}, },
[h( [
"Button",
{
props: {
type: "success",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.memberList(params.row);
},
},
},
"下级用户"
),
h(
"Button",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.groupList(params.row);
},
},
},
"团队列表"
),
h( h(
"Button", "Button",
{ {
@ -253,14 +213,6 @@ export default {
}; };
}, },
methods: { methods: {
//
groupList(row){
this.$router.push({ name: "group-list", query: { id: row.id } });
},
memberList(row){
this.$router.push({ name: "distribution-member", query: { id: row.id } });
},
// //
init() { init() {
this.getDataList(); this.getDataList();

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<Card> <Card>
<Row @keydown.enter.native="handleSearch"> <Row @keydown.enter.native.prevent="handleSearch">
<Form <Form
ref="searchForm" ref="searchForm"
:model="searchForm" :model="searchForm"
@ -53,7 +53,7 @@
</template> </template>
<script> <script>
import { getDistributionListData, auditDistribution } from "@/api/distribution"; import { auditDistribution, getDistributionListData } from "@/api/distribution";
export default { export default {
name: "distributionApply", name: "distributionApply",

View File

@ -1,15 +1,15 @@
<template> <template>
<div> <div>
<Card> <Card>
<Form ref="searchForm" :model="searchForm" class="search-form"> <Form ref="searchForm" @keydown.enter.native.prevent="handleSearch" :model="searchForm" class="search-form">
<Form-item label="会员名称" class="flex" prop="memberName"> <Form-item label="会员名称" class="flex" prop="memberName">
<Input <Input
type="text" v-model="searchForm.memberName" clearable type="text" placeholder="请输入会员名称" v-model="searchForm.memberName" clearable
style="width: 200px"></Input> style="width: 200px"></Input>
</Form-item> </Form-item>
<Form-item label="编号" class="flex"> <Form-item label="编号" class="flex">
<Input <Input
type="text" v-model="searchForm.sn" clearable type="text" placeholder="请输入编号" v-model="searchForm.sn" clearable
style="width: 200px"></Input> style="width: 200px"></Input>
</Form-item> </Form-item>
<Form-item label="状态" <Form-item label="状态"
@ -55,10 +55,10 @@
<script> <script>
import { import {
getDistributionCash, auditDistributionCash,
auditDistributionCash getDistributionCash
} from "@/api/distribution"; } from "@/api/distribution";
import {cashStatusList} from './dataJson' import { cashStatusList } from './dataJson';
export default { export default {
name: "distributionCash", name: "distributionCash",
data() { data() {

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<Card> <Card>
<Form @keydown.enter.native="handleSearch" ref="searchForm" :model="searchForm" inline :label-width="70" <Form @keydown.enter.native.prevent="handleSearch" ref="searchForm" :model="searchForm" inline :label-width="70"
class="search-form"> class="search-form">
<Form-item label="商品名称" prop="goodsName"> <Form-item label="商品名称" prop="goodsName">
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px" /> <Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px" />
@ -38,7 +38,7 @@
</template> </template>
<script> <script>
import { getDistributionGoods, delDistributionGoods } from "@/api/distribution"; import { delDistributionGoods, getDistributionGoods } from "@/api/distribution";
import vueQr from "vue-qr"; import vueQr from "vue-qr";
export default { export default {
components: { components: {
@ -102,6 +102,11 @@ export default {
}, },
}, },
{
title: "库存",
key: "quantity",
minWidth: 80,
},
{ {
title: "添加时间", title: "添加时间",
key: "createTime", key: "createTime",

View File

@ -1,103 +0,0 @@
<template>
<div>
<Card>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10"></Table>
<Row type="flex" justify="end" class="page padding-row">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page>
</Row>
</Card>
</div>
</template>
<script>
import {
getDistributionGroup
} from "@/api/distribution";
import {cashStatusList} from './dataJson'
export default {
name: "distributionGroup",
data() {
return {
id: "",//id
cashStatusList, //
loading: true, //
modalVisible: false, //
modalTitle: "", //
result: 'FAIL_AUDITING', //
searchForm: { //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
handleStatus:'edit',//
form: { //
sn: "",
memberName: "",
price: "",
},
submitLoading: false, //
columns: [
{
title: "昵称",
key: "memberName",
minWidth: 200
},
{
title: "销售额",
key: "distributionOrderPrice",
minWidth: 120
},
{
title: "订单量",
key: "distributionOrderCount",
minWidth: 120
},
],
data: [], //
total: 0 //
};
},
methods: {
//
init() {
this.getDataList();
},
//
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
},
//
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
//
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
//
getDataList() {
this.loading = true;
console.log(this.id);
//
getDistributionGroup(this.id,this.searchForm).then(res => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
},
mounted() {
this.id = this.$route.query.id;
this.init();
}
};
</script>

View File

@ -1,114 +0,0 @@
<template>
<div>
<Card>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10"></Table>
<Row type="flex" justify="end" class="page padding-row">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page>
</Row>
</Card>
</div>
</template>
<script>
import {
getDistributionCash,
auditDistributionCash, getDistributionMember
} from "@/api/distribution";
import {cashStatusList} from './dataJson'
export default {
name: "distributionMember",
data() {
return {
id: "",//id
cashStatusList, //
loading: true, //
modalVisible: false, //
modalTitle: "", //
result: 'FAIL_AUDITING', //
searchForm: { //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
handleStatus:'edit',//
form: { //
sn: "",
memberName: "",
price: "",
},
submitLoading: false, //
columns: [
{
title: "客户昵称",
key: "nickName",
minWidth: 200
},
{
title: "成交额",
key: "orderPrice",
minWidth: 120
},
{
title: "佣金总额",
key: "rebatePrice",
minWidth: 120
},
{
title: "订单数",
key: "orderNum",
minWidth: 130
},
{
title: "最近下单时间",
key: "lastLoginDate",
minWidth: 130
},
],
data: [], //
total: 0 //
};
},
methods: {
//
init() {
this.getDataList();
},
//
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
},
//
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
//
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
//
getDataList() {
this.loading = true;
console.log(this.id);
//
getDistributionMember(this.id,this.searchForm).then(res => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
},
mounted() {
this.id = this.$route.query.id;
this.init();
}
};
</script>

View File

@ -11,7 +11,7 @@
style="width: 200px" style="width: 200px"
/> />
</Form-item> </Form-item>
<Form-item label="分销" prop="distributionName"> <Form-item label="分销" prop="distributionName">
<Input <Input
type="text" type="text"
v-model="searchForm.distributionName" v-model="searchForm.distributionName"
@ -104,7 +104,7 @@
}, },
{ {
title: "分销", title: "分销",
key: "distributionName", key: "distributionName",
tooltip: true, tooltip: true,
minWidth:80, minWidth:80,

View File

@ -1,7 +1,7 @@
<template> <template>
<div style="background-color: #fff;"> <div style="background-color: #fff;">
<Form ref="form" :model="form" :label-width="120" style="padding: 10px;"> <Form ref="form" :model="form" :rules="formRule" :label-width="120" style="padding: 10px;">
<Divider orientation="left">分销设置</Divider> <Divider orientation="left">分销设置</Divider>
<FormItem label="是否开启分销" prop="isOpen"> <FormItem label="是否开启分销" prop="isOpen">
@ -10,110 +10,12 @@
<span slot="close">关闭</span> <span slot="close">关闭</span>
</i-switch> </i-switch>
</FormItem> </FormItem>
<FormItem label="分销层级" prop="level"> <FormItem label="分销关系绑定天数" prop="distributionDay">
<RadioGroup v-model="form.level" size="large"> <InputNumber :min="1" :max="365" style="width:100px;" v-model="form.distributionDay"></InputNumber>
<Radio label="1">1</Radio>
<Radio label="2">2</Radio>
</RadioGroup>
</FormItem> </FormItem>
<FormItem label="分销模式" prop="mode"> <FormItem label="分销结算天数" prop="cashDay">
<RadioGroup v-model="form.mode" size="large"> <InputNumber :min="0" :max="365" style="width:100px;" v-model="form.cashDay"></InputNumber>
<Radio label="1">指定分销</Radio>
<Radio label="2">人人分销</Radio>
</RadioGroup>
</FormItem> </FormItem>
<FormItem label="分销关系绑定" prop="binding">
<RadioGroup v-model="form.binding" size="large">
<Radio label="ALL">所有用户</Radio>
<Radio label="NEW">新用户</Radio>
</RadioGroup>
</FormItem>
<FormItem label="分销绑定模式" prop="validity">
<RadioGroup v-model="form.validity" size="large">
<Radio label="FOREVER">永久</Radio>
<Radio label="EXP">有效期</Radio>
</RadioGroup>
</FormItem>
<FormItem label="有效期天数" prop="validityDay">
<InputNumber :min="1" :max="365" style="width:200px;" v-model="form.validityDay"></InputNumber>
</FormItem>
<Divider orientation="left">返佣设置</Divider>
<FormItem label="佣金模式" prop="commissionModel">
<RadioGroup v-model="form.commissionModel" size="large">
<Radio label="1">平台承担</Radio>
<Radio label="2">商户承担</Radio>
</RadioGroup>
</FormItem>
<FormItem label="一级佣金比例" prop="firstCommission">
<InputNumber :min="0" :max="100"
v-model="form.firstCommission"
:formatter="value => `${value}%`"
:parser="value => value.replace('%', '')">
</InputNumber>
</FormItem>
<FormItem label="二级佣金比例" prop="secondaryCommission">
<InputNumber :min="0"
:max="100"
v-model="form.secondaryCommission"
:formatter="value => `${value}%`"
:parser="value => value.replace('%', '')">
</InputNumber>
</FormItem>
<FormItem label="自购返佣" prop="selfCommission">
<RadioGroup v-model="form.selfCommission" size="large">
<Radio label="1">开启</Radio>
<Radio label="2">关闭</Radio>
</RadioGroup>
</FormItem>
<FormItem label="推广返佣" prop="promotion">
<RadioGroup v-model="form.promotion" size="large">
<Radio label="1">开启</Radio>
<Radio label="2">关闭</Radio>
</RadioGroup>
</FormItem>
<FormItem label="每日最大推广数量" prop="maxPromotionNum">
<InputNumber :min="0" :max="1000" style="width:200px;" v-model="form.maxPromotionNum"></InputNumber>
</FormItem>
<!-- <Divider orientation="left">提现设置</Divider>-->
<!-- <FormItem label="佣金模式" prop="withdrawalType">-->
<!-- <RadioGroup v-model="form.withdrawalType" type="button" button-style="solid">-->
<!-- <Radio label="1">线下转账</Radio>-->
<!-- <Radio label="2">微信零钱</Radio>-->
<!-- </RadioGroup>-->
<!-- </FormItem>-->
<!-- <FormItem label="提现最低金额" prop="minPrice">-->
<!-- <Input type="number" style="width:200px;" v-model="form.minPrice">-->
<!-- </Input>-->
<!-- </FormItem>-->
<!-- <FormItem label="提现最高金额" prop="maxPrice">-->
<!-- <Input type="number" style="width:200px;" v-model="form.maxPrice">-->
<!-- </Input>-->
<!-- </FormItem>-->
<!-- <FormItem label="提现手续费" prop="fee">-->
<!-- <Input type="number" style="width:200px;" v-model="form.fee">-->
<!-- </Input>-->
<!-- </FormItem>-->
<!-- <FormItem label="是否支持银行卡" prop="withdrawalBank">-->
<!-- <i-switch size="large" v-model="form.withdrawalBank" :true-value="true" :false-value="false">-->
<!-- <span slot="open">开启</span>-->
<!-- <span slot="close">关闭</span>-->
<!-- </i-switch>-->
<!-- </FormItem>-->
<!-- <FormItem label="是否支持微信" prop="withdrawalWechat">-->
<!-- <i-switch size="large" v-model="form.withdrawalWechat" :true-value="true" :false-value="false">-->
<!-- <span slot="open">开启</span>-->
<!-- <span slot="close">关闭</span>-->
<!-- </i-switch>-->
<!-- </FormItem>-->
<!-- <FormItem label="是否支持支付宝" prop="withdrawalAli">-->
<!-- <i-switch size="large" v-model="form.withdrawalAli" :true-value="true" :false-value="false">-->
<!-- <span slot="open">开启</span>-->
<!-- <span slot="close">关闭</span>-->
<!-- </i-switch>-->
<!-- </FormItem>-->
<FormItem> <FormItem>
<Button type="primary" @click="submit"></Button> <Button type="primary" @click="submit"></Button>
</FormItem> </FormItem>
@ -122,8 +24,8 @@
</template> </template>
<script> <script>
import {getSetting, setSetting} from "@/api/index"; import { setSetting, getSetting } from "@/api/index";
import { regular } from "@/utils";
export default { export default {
name: "distributionSetting", name: "distributionSetting",
data() { data() {
@ -131,36 +33,20 @@ export default {
form: { form: {
// //
isOpen: true, isOpen: true,
level: 1, // distributionDay: 0, //
mode: 0, //(/) cashDay: 0, //
binding: "NEW", ///
validity: "FOREVER", ///
validityDay: 0, //
commissionModel: 0, ///
firstCommission: 0, //
secondaryCommission: 0, //
selfCommission: 0, //
promotion: 0, //广
maxPromotionNum: 0, //广
// withdrawalType: 0, //线/
// minPrice: 0, //
// maxPrice: 0, //
// fee: 0, //
// withdrawalBank: false, //
// withdrawalWechat: false, //
// withdrawalAli: false, //
}, },
// formRule: { formRule: {
// isOpen: [ isOpen: [
// regular.REQUIRED regular.REQUIRED
// ], ],
// distributionDay: [ distributionDay: [
// regular.REQUIRED regular.REQUIRED
// ], ],
// cashDay: [ cashDay: [
// regular.REQUIRED regular.REQUIRED
// ], ],
// } }
}; };
}, },
methods: { methods: {

View File

@ -184,17 +184,17 @@
</template> </template>
<script> <script>
import { import {
insertCategory, delCategory,
updateCategory, disableCategory,
getBrandListData, getBrandListData,
delCategory, getCategoryBrandListData,
getCategoryBrandListData, getCategorySpecListData,
saveCategoryBrand, getCategoryTree,
getSpecificationList, getSpecificationList,
getCategorySpecListData, insertCategory,
disableCategory, saveCategoryBrand,
saveCategorySpec, saveCategorySpec,
getCategoryTree, updateCategory,
} from "@/api/goods"; } from "@/api/goods";
import uploadPicInput from "@/components/lili/upload-pic-input"; import uploadPicInput from "@/components/lili/upload-pic-input";
@ -206,6 +206,7 @@ export default {
}, },
data() { data() {
return { return {
recordLevel:[], //
submitLoading: false, // submitLoading: false, //
categoryList: [], // categoryList: [], //
loading: false, // loading: false, //
@ -267,7 +268,6 @@ export default {
}, },
], ],
tableData: [], // tableData: [], //
categoryIndex: 0, // id
checkedCategoryChildren: "", // checkedCategoryChildren: "", //
}; };
}, },
@ -384,7 +384,7 @@ export default {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("添加成功"); this.$Message.success("添加成功");
this.getAllList(this.categoryIndex); this.getAllList();
this.modalVisible = false; this.modalVisible = false;
this.$refs.form.resetFields(); this.$refs.form.resetFields();
} }
@ -395,7 +395,7 @@ export default {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("修改成功"); this.$Message.success("修改成功");
this.getAllList(this.categoryIndex); this.getAllList();
this.modalVisible = false; this.modalVisible = false;
this.$refs.form.resetFields(); this.$refs.form.resetFields();
} }
@ -416,7 +416,7 @@ export default {
this.$Modal.remove(); this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.getAllList(0); this.getAllList();
} }
}); });
}, },
@ -425,6 +425,7 @@ export default {
// //
handleLoadData(item, callback) { handleLoadData(item, callback) {
this.recordLevel[item.level] = item.id;
if (item.level == 0) { if (item.level == 0) {
let categoryList = JSON.parse(JSON.stringify(this.categoryList)); let categoryList = JSON.parse(JSON.stringify(this.categoryList));
categoryList.forEach((val) => { categoryList.forEach((val) => {
@ -436,14 +437,14 @@ export default {
// //
setTimeout(() => { setTimeout(() => {
callback(val.children); callback(val.children);
}, 1000); }, 100);
} }
}); });
} else { } else {
this.deepCategoryChildren(item.id, this.categoryList); this.deepCategoryChildren(item.id, this.categoryList);
setTimeout(() => { setTimeout(() => {
callback(this.checkedCategoryChildren); callback(this.checkedCategoryChildren);
}, 1000); }, 100);
} }
}, },
@ -462,18 +463,30 @@ export default {
} }
}, },
// //
getAllList(parent_id) { getAllList() {
this.loading = true; this.loading = true;
getCategoryTree(parent_id).then((res) => { getCategoryTree().then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
localStorage.setItem("category", JSON.stringify(res.result)); localStorage.setItem("category", JSON.stringify(res.result));
this.categoryList = JSON.parse(JSON.stringify(res.result)); this.categoryList = JSON.parse(JSON.stringify(res.result));
this.tableData = res.result.map((item) => { this.tableData = res.result.map((item) => {
if (item.children.length != 0) { if(this.recordLevel[0] && item.id === this.recordLevel[0]) {
item.children = []; item._showChildren = true
item._loading = false; //
} if(this.recordLevel[1] && item.children){
item.children.map((child)=>{
if(this.recordLevel[1] && child.id === this.recordLevel[1]){
child._showChildren = true
}
})
}
}else{
if (item.children.length !== 0) {
item.children = [];
item._loading = false;
}
}
return item; return item;
}); });
} }

View File

@ -94,7 +94,7 @@
</Form> </Form>
</Modal> </Modal>
<Modal width="1200px" v-model="picModelFlag"> <Modal width="1200px" v-model="picModelFlag">
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
<multipleMap ref="map" @callback="selectedRegion"/> <multipleMap ref="map" @callback="selectedRegion"/>
</div> </div>

View File

@ -140,7 +140,7 @@
</Form> </Form>
</Modal> </Modal>
<Modal width="1200px" v-model="picModelFlag"> <Modal width="1200px" v-model="picModelFlag">
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
<multipleMap ref="map" @callback="selectedRegion" /> <multipleMap ref="map" @callback="selectedRegion" />
</div> </div>

View File

@ -349,7 +349,7 @@
<Button type="default" @click="$refs.map.open()"></Button> <Button type="default" @click="$refs.map.open()"></Button>
</FormItem> </FormItem>
<FormItem label="详细地址" prop="consigneeDetail"> <FormItem label="详细地址" prop="consigneeDetail">
<Input v-model="addressForm.consigneeDetail" size="large" maxlength="50"></Input> <Input v-model="addressForm.consigneeDetail" size="large" ></Input>
</FormItem> </FormItem>
</Form> </Form>
</div> </div>

View File

@ -84,7 +84,7 @@
<liliDialog ref="liliDialog" @selectedLink="selectedLink"></liliDialog> <liliDialog ref="liliDialog" @selectedLink="selectedLink"></liliDialog>
<!-- 选择图片 --> <!-- 选择图片 -->
<Modal width="1200px" v-model="picModelFlag" footer-hide> <Modal width="1200px" v-model="picModelFlag" footer-hide>
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
</div> </div>
</template> </template>

View File

@ -204,7 +204,7 @@
<liliDialog ref="liliDialog" @selectedLink="selectedLink"></liliDialog> <liliDialog ref="liliDialog" @selectedLink="selectedLink"></liliDialog>
<!-- 选择图片 --> <!-- 选择图片 -->
<Modal width="1200px" v-model="picModelFlag" footer-hide> <Modal width="1200px" v-model="picModelFlag" footer-hide>
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
</div> </div>
</template> </template>

View File

@ -80,7 +80,7 @@
<liliDialog ref="liliDialog" @selectedLink="selectedLink" :types="linkType"></liliDialog> <liliDialog ref="liliDialog" @selectedLink="selectedLink" :types="linkType"></liliDialog>
</div> </div>
<Modal width="1200px" v-model="picModelFlag"> <Modal width="1200px" v-model="picModelFlag">
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
</div> </div>
</div> </div>

View File

@ -83,7 +83,7 @@
></liliDialog> ></liliDialog>
</div> </div>
<Modal width="1200px" v-model="picModelFlag"> <Modal width="1200px" v-model="picModelFlag">
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
</div> </div>
</div> </div>

View File

@ -497,7 +497,7 @@
<hotzone ref="hotzone" @changeZone="changeZone"></hotzone> <hotzone ref="hotzone" @changeZone="changeZone"></hotzone>
<Modal width="1200px" v-model="picModelFlag"> <Modal width="1200px" v-model="picModelFlag">
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
</div> </div>
</template> </template>

View File

@ -307,7 +307,7 @@ export default {
pageSize: 10, // pageSize: 10, //
sort: "id", // sort: "id", //
order: "desc", // order: "desc", //
flowType: "PAY", // flowType: "PAY",
startDate: null, startDate: null,
endDate: null, endDate: null,
}, },

View File

@ -375,7 +375,7 @@
<Modal width="1200px" v-model="picModalFlag"> <Modal width="1200px" v-model="picModalFlag">
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
<Modal width="1200px" v-model="memberModalFlag"> <Modal width="1200px" v-model="memberModalFlag">

View File

@ -133,3 +133,131 @@
} }
} }
} }
.oss-manage-box {
.file-list {
height: 100%;
box-sizing: border-box;
border-right: 1px solid #e5e6eb;
padding: 16px 0 24px;
}
.pic-list {
height: 100%;
box-sizing: border-box;
padding: 0 0 24px 0;
}
.img-box {
width: 100%;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: flex-start;
align-content: flex-start;
margin-top: 20px;
.img-item {
width: 120px;
height: 158px;
box-sizing: border-box;
margin: 0 13px 8px;
position: relative;
.card {
width: 120px;
height: 120px;
border-radius: 8px;
border: 2px solid transparent;
overflow: hidden;
box-sizing: border-box;
position: relative;
img {
width: 100%;
height: 100%;
}
.checkbox {
position: absolute;
top: 10px;
right: 10px;
z-index: 1000;
}
.preview {
width: 100%;
height: 26px;
background-color: #ffffff;
text-align: center;
line-height: 30px;
color: #666666;
position: absolute;
left: 0;
bottom: 0;
display: flex;
flex-wrap: nowrap;
> div {
width: 100%;
flex: 1;
}
}
}
.card:hover,
.custom-checkbox-card-checked {
border: 2px solid #ff5c58;
}
.text {
width: 120px;
height: 36px;
cursor: pointer;
color: #252931;
font-size: 14px;
line-height: 36px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
}
}
.page-box {
display: flex;
justify-content: flex-end;
margin-top: 20px;
}
.pagination-box {
display: flex;
flex-direction: row-reverse;
}
/* Checkbox默认的样式 */
.check-box {
.ivu-checkbox {
position: absolute;
right: 10px;
top: 10px;
z-index: 100;
}
}
/* 覆盖iView默认的Checkbox样式 */
.ivu-checkbox-wrapper {
/*font-size: 16px; !* 修改字体大小 *!*/
/*color: #495060; !* 修改文本颜色 *!*/
/* 添加其他需要的样式 */
}
.ivu-checkbox-inner {
/*width: 20px; !* 修改选框大小 *!*/
/*height: 20px;*/
/*border-color: #dcdee2; !* 修改边框颜色 *!*/
/* 添加其他需要的样式 */
}
/* 当Checkbox被选中时的样式 */
.ivu-checkbox-checked .ivu-checkbox-inner {
/*background-color: #2db7f5; !* 修改选中时的背景颜色 *!*/
}
/* 当Checkbox不可用时的样式 */
.ivu-checkbox-disabled .ivu-checkbox-inner {
/*background-color: #e9e9e9; !* 修改禁用状态下的背景颜色 *!*/
}
.demo-tree-render .ivu-tree-title{
width: 94%;
}
}

View File

@ -27,6 +27,7 @@
margin: 0 10px; margin: 0 10px;
} }
} }
</style> </style>
<template> <template>
<div class="search"> <div class="search">
@ -61,164 +62,250 @@
</Button> </Button>
</Form> </Form>
</Row> </Row>
<div class="oss-operation padding-row">
<div> <Row class="oss-manage-box">
<Upload <Col :span="isComponent?5:4">
ref="up" <div class="file-list">
:action="commonUrl + '/common/common/upload/file'" <div class="article-category mr_10">
:data="{ <Tree :data="treeData" :render="renderContent" @on-select-change.self="handleCateChange" class="demo-tree-render"></Tree>
<div class="group-row flex" v-if="!isComponent">
<Button @click="handleClickAddGroup"></Button>
</div>
</div>
</div>
</Col>
<Col :span="isComponent?19:20">
<div class="pic-list">
<div>
<div class="oss-operation padding-row" style="display: flex;flex-direction: row-reverse;">
<div>
<Upload
ref="up"
:action="commonUrl + '/common/common/upload/file'"
:data="{
directoryPath: searchForm.fileDirectoryId, directoryPath: searchForm.fileDirectoryId,
}" }"
:headers="accessToken" :headers="accessToken"
:max-size="20480" :max-size="20480"
:on-error="handleError" :on-error="handleError"
:on-exceeded-size="handleMaxSize" :on-exceeded-size="handleMaxSize"
:on-success="handleSuccess" :on-success="handleSuccess"
:show-upload-list="false" :show-upload-list="false"
multiple multiple
style="display: inline-block" style="display: inline-block"
> >
<Button>上传图片</Button> <Button>上传图片</Button>
</Upload> </Upload>
<Dropdown @on-click="handleDropdown" v-if="!isComponent"> <Dropdown @on-click="handleDropdown" v-if="!isComponent">
<Button> <Button>
更多操作 更多操作
<Icon type="md-arrow-dropdown"/> <Icon type="md-arrow-dropdown"/>
</Button> </Button>
<DropdownMenu slot="list"> <DropdownMenu slot="list">
<DropdownItem name="refresh">刷新</DropdownItem> <DropdownItem name="refresh">刷新</DropdownItem>
<DropdownItem v-show="showType == 'list'" name="removeAll" <DropdownItem v-show="showType == 'list'" name="removeAll"
>批量删除 >批量删除
</DropdownItem> </DropdownItem>
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
</div> </div>
</div>
</div>
<Alert show-icon v-if="!isComponent">
已选择
<span>{{ selectCount }}</span>
<a class="select-clear" @click="clearSelectAll"></a>
<span v-if="selectCount > 0" style="margin-left: 15px"
>共计 {{ totalSize }} 存储量</span
>
</Alert>
<div v-show="showType === 'list'" >
<div class="flex">
<div class="article-category mr_10">
<Tree
:data="treeData"
@on-contextmenu="handleContextMenu"
@on-select-change="handleCateChange"
>
<template slot="contextMenu" v-if="!isComponent">
<DropdownItem @click.native="handleContextMenuEdit"
>编辑
</DropdownItem
>
<DropdownItem
style="color: #ed4014"
@click.native="handleContextMenuDelete"
>删除
</DropdownItem
>
</template>
</Tree>
<Alert v-if="!isComponent">/</Alert>
<div class="group-row flex" v-if="!isComponent">
<Button @click="handleClickAddGroup"></Button>
</div>
</div>
<Table
ref="table"
:columns="isComponent ? viewColumns : columns"
:data="data"
:loading="loading"
border
class="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
>
<template slot="fileKey" slot-scope="{ row }">
<a @click="copyFileUrl(row)">{{ row.fileKey }}</a>
</template>
</Table>
</div>
</div>
<div v-show="showType === 'thumb'">
<div class="oss-wrapper">
<Card v-for="(item, i) in data" :key="i" class="oss-card">
<div class="content">
<img
v-if="item.fileType.indexOf('image') >= 0"
:src="item.url"
class="img"
@click="showPic(item)"
/>
<div
v-else-if="item.fileType.indexOf('video') >= 0"
class="video"
@click="showVideo(item)"
>
<!-- 文件小于5MB显示video -->
<video v-if="item.fileSize < 1024 * 1024 * 5" class="cover">
<source :src="item.url"/>
</video>
<img class="play" src="@/assets/play.png"/>
</div>
<div v-else class="other">
<div class="name">{{ item.name }}</div>
<div class="key">{{ item.fileKey }}</div>
<div class="info">
文件类型{{ item.fileType }} 文件大小{{
((item.fileSize * 1.0) / (1024 * 1024)).toFixed(2)
}}
MB 创建时间{{ item.createTime }}
</div> </div>
</div> </div>
<div class="actions"> <div>
<div class="btn"> <CheckboxGroup v-model="selectedOss" @on-change="selectOssChange">
<Tooltip content="下载" placement="top"> <div class="img-box">
<Icon <div v-for="(item, index) in data" :key="index" class="img-item">
size="16" <Checkbox :label="item.id+','+item.url" class="check-box">
type="md-download" <template>
@click="download(item)" <div class="card" @mouseenter.active="onMouseOver(item, index)" @mouseleave.active="onMouseOut(item, index)">
/> <!--<div class="custom-checkbox-card-mask"><div class="custom-checkbox-card-mask-dot"/></div>-->
</Tooltip> <img :src="item.url" alt="" />
</div> <div v-if="item.isShowPreview" class="preview">
<div class="btn"> <div @click.prevent="download(item)"><Tooltip content="下载"><Icon type="md-cloud-download" size="18" /></Tooltip></div>
<Tooltip content="重命名" placement="top"> <div @click.prevent="remove(item)"><Tooltip content="删除"><Icon type="md-trash" size="18" /></Tooltip></div>
<Icon size="16" type="md-create" @click="rename(item)"/> <div @click.prevent="showPic(item)"><Tooltip content="预览"><Icon type="ios-eye" size="22" /></Tooltip></div>
</Tooltip> </div>
</div> </div>
<div class="btn-no"> </template>
<Tooltip content="删除" placement="top"> </Checkbox>
<Icon size="16" type="md-trash" @click="remove(item)"/> <div>
</Tooltip> <Tooltip :content="item.name" placement="bottom">
</div> <div class="text">{{item.name}}</div>
</Tooltip>
</div>
</div>
</div>
</CheckboxGroup>
</div>
<div class="page-box">
<Page :total="total" :page-size="searchForm.pageSize" show-elevator @on-change="pageChange" size="small" />
</div> </div>
</div> </div>
</Card> </Col>
</div> </Row>
<!--<div class="oss-operation padding-row">-->
<!--<div>-->
<!--<Upload-->
<!--ref="up"-->
<!--:action="commonUrl + '/common/common/upload/file'"-->
<!--:data="{-->
<!--directoryPath: searchForm.fileDirectoryId,-->
<!--}"-->
<!--:headers="accessToken"-->
<!--:max-size="20480"-->
<!--:on-error="handleError"-->
<!--:on-exceeded-size="handleMaxSize"-->
<!--:on-success="handleSuccess"-->
<!--:show-upload-list="false"-->
<!--multiple-->
<!--style="display: inline-block"-->
<!--&gt;-->
<!--<Button>上传图片</Button>-->
<!--</Upload>-->
<!--<Dropdown @on-click="handleDropdown" v-if="!isComponent">-->
<!--<Button>-->
<!--更多操作-->
<!--<Icon type="md-arrow-dropdown"/>-->
<!--</Button>-->
<!--<DropdownMenu slot="list">-->
<!--<DropdownItem name="refresh">刷新</DropdownItem>-->
<!--<DropdownItem v-show="showType == 'list'" name="removeAll"-->
<!--&gt;批量删除-->
<!--</DropdownItem>-->
<!--</DropdownMenu>-->
<!--</Dropdown>-->
<!--</div>-->
<!--</div>-->
</div> </div>
<Row class="mt_10" justify="end" type="flex">
<Page <!--<Alert show-icon v-if="!isComponent">-->
:current="searchForm.pageNumber" <!--已选择-->
:page-size="searchForm.pageSize" <!--<span>{{ selectCount }}</span> -->
:page-size-opts="pageSizeOpts" <!--<a class="select-clear" @click="clearSelectAll"></a>-->
:total="total" <!--<span v-if="selectCount > 0" style="margin-left: 15px"-->
show-elevator <!--&gt;共计 {{ totalSize }} 存储量</span-->
show-sizer <!--&gt;-->
show-total <!--</Alert>-->
size="small"
@on-change="changePage" <!--<div v-show="showType === 'list'" >-->
@on-page-size-change="changePageSize" <!--<div class="flex">-->
></Page> <!--<div class="article-category mr_10">-->
</Row> <!--<Tree-->
<!--:data="treeData"-->
<!--@on-contextmenu="handleContextMenu"-->
<!--@on-select-change="handleCateChange"-->
<!--&gt;-->
<!--<template slot="contextMenu" v-if="!isComponent">-->
<!--<DropdownItem @click.native="handleContextMenuEdit"-->
<!--&gt;编辑-->
<!--</DropdownItem-->
<!--&gt;-->
<!--<DropdownItem-->
<!--style="color: #ed4014"-->
<!--@click.native="handleContextMenuDelete"-->
<!--&gt;删除-->
<!--</DropdownItem-->
<!--&gt;-->
<!--</template>-->
<!--</Tree>-->
<!--<Alert v-if="!isComponent">/</Alert>-->
<!--<div class="group-row flex" v-if="!isComponent">-->
<!--<Button @click="handleClickAddGroup"></Button>-->
<!--</div>-->
<!--</div>-->
<!--<Table-->
<!--ref="table"-->
<!--:columns="isComponent ? viewColumns : columns"-->
<!--:data="data"-->
<!--:loading="loading"-->
<!--border-->
<!--class="table"-->
<!--sortable="custom"-->
<!--@on-sort-change="changeSort"-->
<!--@on-selection-change="changeSelect"-->
<!--&gt;-->
<!--<template slot="fileKey" slot-scope="{ row }">-->
<!--<a @click="copyFileUrl(row)">{{ row.fileKey }}</a>-->
<!--</template>-->
<!--</Table>-->
<!--</div>-->
<!--</div>-->
<!--<div v-show="showType === 'thumb'">-->
<!--<div class="oss-wrapper">-->
<!--<Card v-for="(item, i) in data" :key="i" class="oss-card">-->
<!--<div class="content">-->
<!--<img-->
<!--v-if="item.fileType.indexOf('image') >= 0"-->
<!--:src="item.url"-->
<!--class="img"-->
<!--@click="showPic(item)"-->
<!--/>-->
<!--<div-->
<!--v-else-if="item.fileType.indexOf('video') >= 0"-->
<!--class="video"-->
<!--@click="showVideo(item)"-->
<!--&gt;-->
<!--&lt;!&ndash; 文件小于5MB显示video &ndash;&gt;-->
<!--<video v-if="item.fileSize < 1024 * 1024 * 5" class="cover">-->
<!--<source :src="item.url"/>-->
<!--</video>-->
<!--<img class="play" src="@/assets/play.png"/>-->
<!--</div>-->
<!--<div v-else class="other">-->
<!--<div class="name">{{ item.name }}</div>-->
<!--<div class="key">{{ item.fileKey }}</div>-->
<!--<div class="info">-->
<!--文件类型{{ item.fileType }} 文件大小{{-->
<!--((item.fileSize * 1.0) / (1024 * 1024)).toFixed(2)-->
<!--}}-->
<!--MB 创建时间{{ item.createTime }}-->
<!--</div>-->
<!--</div>-->
<!--<div class="actions">-->
<!--<div class="btn">-->
<!--<Tooltip content="下载" placement="top">-->
<!--<Icon-->
<!--size="16"-->
<!--type="md-download"-->
<!--@click="download(item)"-->
<!--/>-->
<!--</Tooltip>-->
<!--</div>-->
<!--<div class="btn">-->
<!--<Tooltip content="重命名" placement="top">-->
<!--<Icon size="16" type="md-create" @click="rename(item)"/>-->
<!--</Tooltip>-->
<!--</div>-->
<!--<div class="btn-no">-->
<!--<Tooltip content="删除" placement="top">-->
<!--<Icon size="16" type="md-trash" @click="remove(item)"/>-->
<!--</Tooltip>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</Card>-->
<!--</div>-->
<!--</div>-->
<!--<Row class="mt_10" justify="end" type="flex">-->
<!--<Page-->
<!--:current="searchForm.pageNumber"-->
<!--:page-size="searchForm.pageSize"-->
<!--:page-size-opts="pageSizeOpts"-->
<!--:total="total"-->
<!--show-elevator-->
<!--show-sizer-->
<!--show-total-->
<!--size="small"-->
<!--@on-change="changePage"-->
<!--@on-page-size-change="changePageSize"-->
<!--&gt;</Page>-->
<!--</Row>-->
</Card> </Card>
</Row> </Row>
<Modal <Modal
@ -342,7 +429,6 @@ export default {
commonUrl, // commonUrl, //
config, // api config, // api
fileDirectoryId: "", fileDirectoryId: "",
groupFormValidate: { groupFormValidate: {
id: [], id: [],
level: 0, level: 0,
@ -384,7 +470,7 @@ export default {
fileKey: "", fileKey: "",
fileType: "", fileType: "",
pageNumber: 1, // pageNumber: 1, //
pageSize: 10, // pageSize: 27, //
sort: "createTime", // sort: "createTime", //
order: "desc", // order: "desc", //
startDate: "", // startDate: "", //
@ -731,6 +817,27 @@ export default {
selectedGroupData: "", selectedGroupData: "",
insertOrUpdate: "insert", insertOrUpdate: "insert",
groupLoading: false, groupLoading: false,
//
selectedOss: [],
myData: [
{
title: 'parent 1',
expand: true,
render: (h, { root, node, data }) => {
return h('span', {style: {display: 'inline-block', width: '100%'}}, [
h('span', [h("Icon", {type: 'ios-folder-outline', style: {marginRight: '8px'}}), h('span', data.title)]),
h('span', {style: {display: 'inline-block', float: 'right', marginRight: '32px'}},
[h("Button", {...this.buttonProps, icon: 'ios-add', type: 'primary', style: {width: '64px'}, onClick: () => { this.append(data) }})
])
]);
},
children: [
{title: 'child 1-1', expand: true, children: [{title: 'leaf 1-1-1', expand: true}, {title: 'leaf 1-1-2', expand: true}]},
{title: 'child 1-2', expand: true, children: [{title: 'leaf 1-2-1', expand: true}, {title: 'leaf 1-2-1', expand: true}]}
]
}
],
buttonProps: {type: 'default', size: 'small',},
}; };
}, },
watch: { watch: {
@ -739,11 +846,64 @@ export default {
}, },
choose(val) { choose(val) {
if (val) this.selectImage = val if (val) this.selectImage = val
},
selectedOss(val) {
if (val) {
this.$emit("callback", {url: val[val.length-1].split(',')[1]});
}
} }
}, },
methods: { methods: {
onMouseOver(item, index) {
this.$set(this.data[index], 'isShowPreview', true);
this.$forceUpdate();
},
onMouseOut(item, index) {
this.$set(this.data[index], 'isShowPreview', false);
},
//
selectOssChange(e) {
if (e) {
this.selectList = e.map(item => {return { id: item.split(',')[0]}});
this.selectCount = e.length;
// let size = 0;
// e.forEach((item) => {size += item.fileSize * 1.0;});
// this.totalSize = ((size * 1.0) / (1024 * 1024)).toFixed(2) + " MB";
this.$emit("selected", e);
}
},
//
pageChange(value) {
this.$set(this, 'selectedOss', []);
this.searchForm.pageNumber = value;
this.getDataList();
},
// tree
renderContent (h, { root, node, data }) {
return h('span', {style: {display: 'inline-block', width: '100%'}},
[
h('span', [h("Icon", {type: 'ios-paper-outline', style: {marginRight: '8px'}}), h('span', data.title)]),
h('span', {style: {display: 'inline-block', float: 'right', marginRight: '10px'}},
[
h("Dropdown", {style: {marginLeft: "4px"}},
[
h("Icon", {props: {type: 'ios-more', size: "20",}, style: {display: 'inline-block'}, on:{click: () => {}}}),
h("DropdownMenu", {slot: "list"
}, [
h("DropdownItem", { nativeOn:{click: () => {this.handleContextMenuEdit()}} }, "编辑"),
h("DropdownItem", { nativeOn:{click: () => {this.handleContextMenuDelete()}} }, "删除"),
])
]),
])
]);
},
handleContextMenu(val) { handleContextMenu(val) {
console.log('handleContextMenu', val);
this.selectedGroupData = val; this.selectedGroupData = val;
}, },
// //
@ -768,6 +928,7 @@ export default {
const res = await delFileDirectory(this.selectedGroupData.value); const res = await delFileDirectory(this.selectedGroupData.value);
if (res.success) { if (res.success) {
this.$Message.success("删除成功!"); this.$Message.success("删除成功!");
this.getDataList();
this.getAllList(); this.getAllList();
} }
}, },
@ -870,7 +1031,7 @@ export default {
obj.level = item.level; obj.level = item.level;
obj.expand = false; obj.expand = false;
obj.selected = false; obj.selected = false;
obj.contextmenu = true; obj.contextmenu = false;
obj.parentId = item.parentId; obj.parentId = item.parentId;
obj.children = this.getTree(item.children); // obj.children = this.getTree(item.children); //
arr.push(obj); arr.push(obj);
@ -881,18 +1042,21 @@ export default {
// //
handleCateChange(data) { handleCateChange(data) {
this.selectedGroupData = data[0]; if (data) {
let {value, type, level} = data[0]; this.selectedGroupData = data[0];
this.list.push({value, type, level}); let {value, type, level} = data[0];
this.searchForm.fileDirectoryId = value; this.list.push({value, type, level});
if (value === "0" || value === 0) { this.searchForm.fileDirectoryId = value;
delete this.searchForm.fileDirectoryId; if (value === "0" || value === 0) {
this.groupFormValidate.level = 0; delete this.searchForm.fileDirectoryId;
} else { this.groupFormValidate.level = 0;
this.groupFormValidate.level = Number(level) + 1; } else {
this.groupFormValidate.level = Number(level) + 1;
}
this.searchForm.userEnums = type;
this.getDataList();
this.$set(this, 'selectedOss', []);
} }
this.searchForm.userEnums = type;
this.getDataList();
}, },
/** /**
* 选择 * 选择
@ -903,7 +1067,7 @@ export default {
// //
handleDropdown(name) { handleDropdown(name) {
if (name === "refresh") { if (name === "refresh") {
this.getDataList(); this.getDataList('refresh');
} else if (name === "removeAll") { } else if (name === "removeAll") {
this.removeAll(); this.removeAll();
} }
@ -981,7 +1145,7 @@ export default {
this.getDataList(); this.getDataList();
}, },
// //
getDataList() { getDataList(type = null) {
if (this.showType == "list") { if (this.showType == "list") {
this.pageSizeOpts = [10, 20, 50]; this.pageSizeOpts = [10, 20, 50];
} else { } else {
@ -993,6 +1157,9 @@ export default {
this.data = res.result.records; this.data = res.result.records;
this.total = res.result.total; this.total = res.result.total;
if (type === 'refresh') {
this.$Message.success('刷新成功!');
}
}); });
}, },
// //
@ -1064,16 +1231,15 @@ export default {
loading: true, loading: true,
onOk: () => { onOk: () => {
let ids = ""; let ids = "";
this.selectList.forEach(function (e) { this.selectList.forEach(function (e) {ids += e.id + ",";});
ids += e.id + ",";
});
ids = ids.substring(0, ids.length - 1); ids = ids.substring(0, ids.length - 1);
deleteFile(ids).then((res) => { deleteFile(ids).then((res) => {
this.$Modal.remove(); this.$Modal.remove();
if (res.success) { if (res.success) {
this.$set(this, 'selectedOss', []);
// this.clearSelectAll();
this.init();
this.$Message.success("批量删除文件成功"); this.$Message.success("批量删除文件成功");
this.clearSelectAll();
this.getDataList();
} }
}) })
.catch((err) => { .catch((err) => {
@ -1157,6 +1323,8 @@ export default {
if (!this.isComponent) { if (!this.isComponent) {
// //
this.init(); this.init();
} else {
this.searchForm.pageSize =18; //
} }
}, },
}; };

View File

@ -75,7 +75,7 @@
</div> </div>
</Form> </Form>
<Modal width="1200px" v-model="picModelFlag"> <Modal width="1200px" v-model="picModelFlag">
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
</div> </div>

View File

@ -26,7 +26,7 @@
<Input type='number' v-model="formValidate.closeAfterSale"> <Input type='number' v-model="formValidate.closeAfterSale">
<span slot="append"></span> <span slot="append"></span>
</Input> </Input>
<span class="desc">订单完成后多少天内允许退单如果天数为0,不允许退单</span> <span class="desc">订单完成后多少天内允许退单如果天数为0,完成订单当天可以退单之后就不再允许</span>
</FormItem> </FormItem>
<FormItem label="已完成订单允许投诉" prop="closeComplaint"> <FormItem label="已完成订单允许投诉" prop="closeComplaint">
<Input type='number' v-model="formValidate.closeComplaint"> <Input type='number' v-model="formValidate.closeComplaint">
@ -54,9 +54,9 @@ export default {
autoEvaluation: "", autoEvaluation: "",
autoReceive: "", autoReceive: "",
closeAfterSale: "", closeAfterSale: "",
closeComplaint:"" closeComplaint: ""
}, },
result:"" result: ""
}; };
}, },
props: ["res", "type"], props: ["res", "type"],
@ -114,16 +114,20 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./style.scss"; @import "./style.scss";
.label-item { .label-item {
display: flex; display: flex;
} }
.ivu-input-wrapper { .ivu-input-wrapper {
width: 100px; width: 100px;
margin-right: 10px; margin-right: 10px;
} }
/deep/ .ivu-input { /deep/ .ivu-input {
width: 100px !important; width: 100px !important;
} }
.desc { .desc {
font-size: 12px; font-size: 12px;
color: #999; color: #999;

View File

@ -1,5 +1,4 @@
# 默认依赖包指定淘宝源 registry "https://registry.npmmirror.com"
registry=https://registry.npm.taobao.org/ sass_binary_site "https://npmmirror.com/mirrors/node-sass"
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ phantomjs_cdnurl "https://npmmirror.com/mirrors/phantomjs"
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/ electron_mirror "https://npmmirror.com/mirrors/electron"
electron_mirror=https://npm.taobao.org/mirrors/electron/

View File

@ -2,22 +2,71 @@
// 统一请求路径前缀在libs/axios.js中修改 // 统一请求路径前缀在libs/axios.js中修改
import {getRequest, postRequest, putRequest, deleteRequest, importRequest, getRequestWithNoToken} from '@/libs/axios'; import {getRequest, postRequest, putRequest, deleteRequest, importRequest, getRequestWithNoToken} from '@/libs/axios';
//获取分销设置
export const getDistributionSetting = (params) => { //获取分销商品列表
return getRequest(`/distribution/setting`, params) export const getDistributionGoods = (params) => {
return getRequest('/distribution/goods', params)
}
// 取消分销商品
export const distributionGoodsCancel = (id) => {
return deleteRequest(`/distribution/goods/cancel/${id}`)
}
// 选择分销商品
export const distributionGoodsCheck = (id,param) => {
return putRequest(`/distribution/goods/checked/${id}`,param)
}
//查询分销商
export const getDistributionListData = (params) => {
return getRequest('/distribution/getByPage', params)
}
//审核分销商
export const auditDistribution = (id, params) => {
return putRequest(`/distribution/audit/${id}`, params)
}
// 清退分销商
export const retreatDistribution = (id, params) => {
return putRequest(`/distribution/retreat/${id}`, params)
}
// 恢复分销商
export const resumeDistribution = (id, params) => {
return putRequest(`/distribution/resume/${id}`, params)
} }
//保存更新分销设置 //保存更新分销设置
export const saveDistributionSetting = (params) => { export const saveDistributionSetting = (params) => {
return putRequest('/distribution/setting', params) return postRequest('/distribution/setting/insertOrUpdate', params)
} }
//获取分销设置
export const getDistributionSetting = (id, params) => {
return getRequest(`/distribution/setting/get/${id}`, params)
}
//获取分销订单列表 //获取分销订单列表
export const getDistributionOrder = (params) => { export const getDistributionOrder = (params) => {
return getRequest('/distribution/order', params) return getRequest('/distribution/order', params)
} }
//获取分销商品列表
export const getDistributionGoods = (params) => { //删除分销商品
return getRequest('/distribution/goods', params) export const delDistributionGoods = (ids) => {
return deleteRequest(`/distribution/goods/delByIds/${ids}`)
} }
//获取分销佣金信息
export const getDistributionCash = (params) => {
return getRequest('/distribution/cash/getByPage', params)
}
//审核分销佣金申请
export const auditDistributionCash = (id,params) => {
return postRequest(`/distribution/cash/audit/${id}`, params)
}

View File

@ -1,96 +0,0 @@
<template>
<div class="search">
<Card style="margin-left: 10px">
<Tabs v-model="type">
<TabPane label="分销设置" name="INFO">
<Form ref="form" :model="form" :label-width="100" >
<FormItem label="是否开启分销" prop="isOpen" class="wangEditor">
<i-switch v-model="form.isOpen"></i-switch>
<span class="desc">开启分销则全店商品具有分销功能</span>
</FormItem>
<FormItem label="一级佣金比例" prop="isOpen">
<InputNumber :min="0" :max="99999" v-model="form.commission" type="number" maxlength="2"
clearable style="width: 20%"/>
</FormItem>
<FormItem label="二级分佣比例" prop="stockWarning">
<InputNumber :min="0" :max="99999" v-model="form.secondaryCommission" type="number"
maxlength="2"
clearable style="width: 20%"/>
</FormItem>
<Form-item>
<Button @click="handleSubmit" :loading="submitLoading" type="primary" style="margin-right: 5px">修改
</Button>
</Form-item>
</Form>
</TabPane>
</Tabs>
</Card>
</div>
</template>
<script>
import {getDistributionSetting, saveDistributionSetting} from "@/api/distribution";
export default {
name: "distributionSetting",
components: {},
data() {
return {
type: "INFO",
form: {
//
isOpen: false, //
commission: 0, //
secondaryCommission: 0, //
},
//
validate: {},
submitLoading: false, //
};
},
methods: {
//
init() {
this.getDistributionSetting();
},
//
getDistributionSetting() {
this.loading = true;
getDistributionSetting().then((res) => {
this.loading = false;
if (res.success) {
this.form = res.result;
}
});
},
//
handleSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.submitLoading = true;
saveDistributionSetting(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("修改成功");
this.getDistributionSetting();
}
});
}
});
},
},
mounted() {
this.init();
},
};
</script>
<style scoped lang="scss">
.desc {
margin-left: 10px;
color: #999;
}
</style>

View File

@ -102,7 +102,7 @@
<h4>商品规格及图片</h4> <h4>商品规格及图片</h4>
<div class="form-item-view"> <div class="form-item-view">
<FormItem class="form-item-view-el required" label="主图" prop="goodsGalleryFiles"> <FormItem class="form-item-view-el required" label="主图" prop="goodsGalleryFiles">
<div style="display: flex; flex-wrap: flex-start"> <div style="display: flex; flex-wrap: wrap;">
<vuedraggable :animation="200" :list="baseInfoForm.goodsGalleryFiles"> <vuedraggable :animation="200" :list="baseInfoForm.goodsGalleryFiles">
<div v-for="(item, __index) in baseInfoForm.goodsGalleryFiles" :key="__index" <div v-for="(item, __index) in baseInfoForm.goodsGalleryFiles" :key="__index"
class="demo-upload-list"> class="demo-upload-list">
@ -110,27 +110,29 @@
<img :src="item"/> <img :src="item"/>
<div class="demo-upload-list-cover"> <div class="demo-upload-list-cover">
<div> <div>
<Icon size="30" type="md-search" @click.native="handleViewGoodsPicture(item.url)"></Icon> <Icon size="30" type="md-search" @click.native="handleViewGoodsPicture(item)"></Icon>
<Icon size="30" type="md-trash" @click.native="handleRemoveGoodsPicture(item)"></Icon> <Icon size="30" type="md-trash" @click.native="handleRemoveGoodsPicture(item)"></Icon>
</div> </div>
</div> </div>
</template> </template>
</div> </div>
</vuedraggable> </vuedraggable>
<!--<Upload ref="upload"-->
<Upload ref="upload" <!--:action="uploadFileUrl" :before-upload="handleBeforeUploadGoodsPicture"-->
:action="uploadFileUrl" :before-upload="handleBeforeUploadGoodsPicture" <!--:format="['jpg', 'jpeg', 'png', 'webp']"-->
:format="['jpg', 'jpeg', 'png', 'webp']" <!--:headers="{ ...accessToken }"-->
:headers="{ ...accessToken }" <!--:max-size="2048" :on-error="() => { $Spin.hide(); }" :on-exceeded-size="handleMaxSize"-->
:max-size="2048" :on-error="() => { $Spin.hide(); }" :on-exceeded-size="handleMaxSize" <!--:on-format-error="handleFormatError" :on-progress="() => { $Spin.show(); }"-->
:on-format-error="handleFormatError" :on-progress="() => { $Spin.show(); }" <!--:on-success="handleSuccessGoodsPicture" :show-upload-list="false" multiple-->
:on-success="handleSuccessGoodsPicture" :show-upload-list="false" multiple <!--style="margin-left: 10px"-->
style="margin-left: 10px" <!--type="drag">-->
type="drag"> <!--<div style="width: 148px; height: 148px; line-height: 148px">-->
<div style="width: 148px; height: 148px; line-height: 148px"> <!--<Icon size="20" type="md-add"></Icon>-->
<Icon size="20" type="md-add"></Icon> <!--</div>-->
</div> <!--</Upload>-->
</Upload> </div>
<div style="width: 100%;display: flex;justify-content: start;margin-top: 10px;">
<Button @click="handleCLickImg('goodsGalleryFiles')" type="primary">上传图片</Button>
</div> </div>
<Modal v-model="goodsPictureVisible" title="View Image"> <Modal v-model="goodsPictureVisible" title="View Image">
<img v-if="goodsPictureVisible" :src="previewGoodsPicture" style="width: 100%"/> <img v-if="goodsPictureVisible" :src="previewGoodsPicture" style="width: 100%"/>
@ -474,7 +476,7 @@
<!--<ossManage @callback="callbackSelected" ref="ossManage" />--> <!--<ossManage @callback="callbackSelected" ref="ossManage" />-->
<!--</Modal>--> <!--</Modal>-->
<Modal v-model="picModalFlag" width="1200px" @on-ok="confirmUrls"> <Modal v-model="picModalFlag" width="1200px" @on-ok="confirmUrls">
<ossManage ref="ossManage" @callback="callbackSelected" @selected="(list)=>{ selectedImage = list}"/> <ossManage ref="ossManage" :isComponent="true" @callback="callbackSelected" @selected="(list)=>{ selectedImage = list}"/>
</Modal> </Modal>
</div> </div>
@ -490,7 +492,7 @@ import {uploadFile} from "@/libs/axios";
import {regular} from "@/utils"; import {regular} from "@/utils";
import DPlayer from 'dplayer'; import DPlayer from 'dplayer';
// import ossManage from "@/views/sys/oss-manage/ossManage"; // import ossManage from "@/views/sys/oss-manage/ossManage";
import ossManage from "@/views/shop/ossManage"; import ossManage from "@/views/shop/ossManages";
export default { export default {
@ -746,8 +748,9 @@ export default {
if (val && this.selectedFormBtnName == 'selectedSkuImages') { if (val && this.selectedFormBtnName == 'selectedSkuImages') {
this.selectedSku.images.push(val); this.selectedSku.images.push(val);
} else { } else {
this.baseInfoForm[this.selectedFormBtnName].push(val); this.baseInfoForm[this.selectedFormBtnName].push(val.url);
} }
}, },
confirmUrls() { confirmUrls() {
if (this.selectedImage && this.selectedFormBtnName == 'selectedSkuImages') { if (this.selectedImage && this.selectedFormBtnName == 'selectedSkuImages') {

View File

@ -57,7 +57,7 @@
</Modal> </Modal>
<Modal width="1000" v-model="showOssManager" @on-ok="confirmUrls"> <Modal width="1000" v-model="showOssManager" @on-ok="confirmUrls">
<OssManage ref="ossManage" @selected="(list)=>{ selectedImage = list}" @callback="handleCallback" /> <OssManage ref="ossManage" :isComponent="true" @selected="(list)=>{ selectedImage = list}" @callback="handleCallback" />
</Modal> </Modal>
</div> </div>
</template> </template>

View File

@ -57,7 +57,7 @@
</Modal> </Modal>
<Modal width="1200px" v-model="picModalFlag" @on-ok="confirmUrls"> <Modal width="1200px" v-model="picModalFlag" @on-ok="confirmUrls">
<ossManage @callback="callbackSelected" @selected="(list)=>{ selectedImage = list}" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" @selected="(list)=>{ selectedImage = list}" ref="ossManage" />
</Modal> </Modal>
</div> </div>
</template> </template>
@ -65,7 +65,7 @@
<script> <script>
import { uploadFile } from "@/libs/axios"; import { uploadFile } from "@/libs/axios";
import vuedraggable from "vuedraggable"; import vuedraggable from "vuedraggable";
import ossManage from "@/views/shop/ossManage"; import ossManage from "@/views/shop/ossManages";
export default { export default {
name: "uploadPicThumb", name: "uploadPicThumb",
components: { components: {

View File

@ -8,7 +8,7 @@
<Button @click="orderLogModal = true" type="primary">订单日志</Button> <Button @click="orderLogModal = true" type="primary">订单日志</Button>
<Button @click="printOrder" type="primary" ghost style="float:right;">打印发货单</Button> <Button @click="printOrder" type="primary" ghost style="float:right;">打印发货单</Button>
<Button v-if="allowOperation.take" @click="orderTake" type="primary"></Button> <Button v-if="allowOperation.take" @click="orderTake" type="primary"></Button>
<Button v-if="allowOperation.ship" @click="orderDeliver" type="primary"></Button> <!-- <Button v-if="allowOperation.ship" @click="orderDeliver" type="primary"></Button> -->
<Button v-if="allowOperation.ship" @click="groupShip" type="primary"></Button> <Button v-if="allowOperation.ship" @click="groupShip" type="primary"></Button>
@ -299,7 +299,7 @@
</FormItem> </FormItem>
<FormItem label="详细地址" prop="consigneeDetail"> <FormItem label="详细地址" prop="consigneeDetail">
<Input v-model="addressForm.consigneeDetail" size="large" maxlength="11"></Input> <Input v-model="addressForm.consigneeDetail" size="large"></Input>
</FormItem> </FormItem>
</Form> </Form>
</div> </div>
@ -420,7 +420,7 @@
<Form :model="faceSheetForm" ref="faceSheetForm" v-if="facesheetFlag" :rules="faceSheetFormValidate"> <Form :model="faceSheetForm" ref="faceSheetForm" v-if="facesheetFlag" :rules="faceSheetFormValidate">
<FormItem label="物流公司" prop="logisticsId" style="position: relative" :label-width="90"> <FormItem label="物流公司" prop="logisticsId" style="position: relative" :label-width="90">
<Select v-model="faceSheetForm.logisticsId" placeholder="请选择" style="width: 250px"> <Select v-model="faceSheetForm.logisticsId" placeholder="请选择" style="width: 250px">
<Option v-for="(item, i) in checkedLogistics" :key="i" :value="item.logisticsId">{{ item.name }} <Option v-for="(item, i) in checkedLogistics" :key="i" :value="item.id">{{ item.name }}
</Option> </Option>
</Select> </Select>
</FormItem> </FormItem>
@ -429,7 +429,7 @@
:rules="orderDeliverFormValidate" style="position: relative"> :rules="orderDeliverFormValidate" style="position: relative">
<FormItem label="物流公司" prop="logisticsId"> <FormItem label="物流公司" prop="logisticsId">
<Select v-model="orderDeliveryForm.logisticsId" placeholder="请选择" style="width: 250px"> <Select v-model="orderDeliveryForm.logisticsId" placeholder="请选择" style="width: 250px">
<Option v-for="(item, i) in checkedLogistics" :key="i" :value="item.logisticsId">{{ item.name }} <Option v-for="(item, i) in checkedLogistics" :key="i" :value="item.id">{{ item.name }}
</Option> </Option>
</Select> </Select>
</FormItem> </FormItem>
@ -1116,6 +1116,7 @@ export default {
} }
}) })
} else { } else {
console.log("this.orderDeliveryForm",this.orderDeliveryForm)
this.$refs['orderDeliveryForm'].validate((valid) => { this.$refs['orderDeliveryForm'].validate((valid) => {
if (valid) { if (valid) {
API_Order.orderDelivery(this.sn, this.orderDeliveryForm).then( API_Order.orderDelivery(this.sn, this.orderDeliveryForm).then(

View File

@ -100,7 +100,7 @@
import changeSize from "../directives/changeSize"; import changeSize from "../directives/changeSize";
import dragItem from "../directives/dragItem"; import dragItem from "../directives/dragItem";
// import ossManage from "@/views/sys/oss-manage/ossManage"; // import ossManage from "@/views/sys/oss-manage/ossManage";
import ossManage from "@/views/shop/ossManage"; import ossManage from "@/views/shop/ossManages";
export default { export default {
name: "Zone", name: "Zone",

View File

@ -231,7 +231,7 @@ import Recommend from "./modelList/recommend.vue";
import NotEnough from "./modelList/notEnough.vue"; import NotEnough from "./modelList/notEnough.vue";
import Seckill from "./modelList/seckill.vue"; import Seckill from "./modelList/seckill.vue";
// import ossManage from "@/views/sys/oss-manage/ossManage"; // import ossManage from "@/views/sys/oss-manage/ossManage";
import ossManage from "@/views/shop/ossManage"; import ossManage from "@/views/shop/ossManages";
export default { export default {
name: "modelFormItem", name: "modelFormItem",

View File

@ -121,7 +121,7 @@
<script> <script>
// import ossManage from "@/views/sys/oss-manage/ossManage"; // import ossManage from "@/views/sys/oss-manage/ossManage";
import ossManage from "@/views/shop/ossManage"; import ossManage from "@/views/shop/ossManages";
export default { export default {
name: "modelCarousel", name: "modelCarousel",
props: ["data"], props: ["data"],

View File

@ -85,14 +85,14 @@
></liliDialog> ></liliDialog>
<!-- 选择图片 --> <!-- 选择图片 -->
<Modal width="1200px" v-model="picModelFlag" footer-hide> <Modal width="1200px" v-model="picModelFlag" footer-hide>
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
// import ossManage from "@/views/sys/oss-manage/ossManage"; // import ossManage from "@/views/sys/oss-manage/ossManage";
import ossManage from "@/views/shop/ossManage"; import ossManage from "@/views/shop/ossManages";
export default { export default {
name: "modelCarousel", name: "modelCarousel",
props: ["data"], props: ["data"],

View File

@ -175,7 +175,7 @@
></liliDialog> ></liliDialog>
<!-- 选择图片 --> <!-- 选择图片 -->
<Modal width="1200px" v-model="picModelFlag" footer-hide> <Modal width="1200px" v-model="picModelFlag" footer-hide>
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
</div> </div>
</template> </template>

View File

@ -140,7 +140,7 @@
</template> </template>
<script> <script>
// import ossManage from "@/views/sys/oss-manage/ossManage"; // import ossManage from "@/views/sys/oss-manage/ossManage";
import ossManage from "@/views/shop/ossManage"; import ossManage from "@/views/shop/ossManages";
export default { export default {
props:{ props:{
data:{ data:{

View File

@ -206,7 +206,7 @@
</template> </template>
<script> <script>
// import ossManage from "@/views/sys/oss-manage/ossManage"; // import ossManage from "@/views/sys/oss-manage/ossManage";
import ossManage from "@/views/shop/ossManage"; import ossManage from "@/views/shop/ossManages";
export default { export default {
props: { props: {
data: { data: {

View File

@ -0,0 +1,263 @@
.search {
.oss-operation {
margin-bottom: 2vh;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
button {
margin-right: 5px;
}
}
}
.none {
display: none;
}
.oss-wrapper {
display: flex;
flex-wrap: wrap;
position: relative;
}
.oss-card {
margin: 10px 20px 10px 0;
width: 290px;
:hover {
.content .other .name {
color: #1890ff;
transition: color .3s;
}
}
cursor: pointer;
.ivu-card-body {
padding: 0;
}
.content {
display: flex;
flex-direction: column;
:hover {
.play {
transition: opacity .3s;
opacity: 1 !important;
}
}
.img {
height: 135px;
object-fit: cover;
}
.video {
height: 135px;
position: relative;
.cover {
height: 100%;
width: 100%;
object-fit: fill;
}
.play {
position: absolute;
top: 43px;
left: 117px;
height: 50px;
width: 50px;
opacity: 0.8;
}
}
.other {
padding: 16px;
height: 135px;
.name {
font-size: 16px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
color: rgba(0, 0, 0, .85);
font-weight: 500;
margin-bottom: 4px;
}
.key {
overflow: hidden;
text-overflow: ellipsis;
height: 45px;
word-break: break-all;
color: rgba(0, 0, 0, .45);
}
.info {
font-size: 12px;
color: rgba(0, 0, 0, .45);
overflow: hidden;
text-overflow: ellipsis;
height: 36px;
word-break: break-all;
}
}
.actions {
display: flex;
align-items: center;
height: 50px;
background: #f7f9fa;
border-top: 1px solid #e8e8e8;
i:hover {
color: #1890ff;
}
.btn {
display: flex;
justify-content: center;
width: 33.33%;
border-right: 1px solid #e8e8e8;
}
.btn-no {
display: flex;
justify-content: center;
width: 33.33%;
}
}
}
}
.oss-manage-box {
.file-list {
height: 100%;
box-sizing: border-box;
border-right: 1px solid #e5e6eb;
padding: 16px 0 24px;
}
.pic-list {
height: 100%;
box-sizing: border-box;
padding: 0 0 24px 0;
}
.img-box {
width: 100%;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: flex-start;
align-content: flex-start;
margin-top: 20px;
.img-item {
width: 120px;
height: 158px;
box-sizing: border-box;
margin: 0 13px 8px;
position: relative;
.card {
width: 120px;
height: 120px;
border-radius: 8px;
border: 2px solid transparent;
overflow: hidden;
box-sizing: border-box;
position: relative;
img {
width: 100%;
height: 100%;
}
.checkbox {
position: absolute;
top: 10px;
right: 10px;
z-index: 1000;
}
.preview {
width: 100%;
height: 26px;
background-color: #ffffff;
text-align: center;
line-height: 30px;
color: #666666;
position: absolute;
left: 0;
bottom: 0;
display: flex;
flex-wrap: nowrap;
> div {
width: 100%;
flex: 1;
}
}
}
.card:hover,
.custom-checkbox-card-checked {
border: 2px solid #ff5c58;
}
.text {
width: 120px;
height: 36px;
cursor: pointer;
color: #252931;
font-size: 14px;
line-height: 36px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
}
}
.page-box {
display: flex;
justify-content: flex-end;
margin-top: 20px;
}
.pagination-box {
display: flex;
flex-direction: row-reverse;
}
/* Checkbox默认的样式 */
.check-box {
.ivu-checkbox {
position: absolute;
right: 10px;
top: 10px;
z-index: 100;
}
}
/* 覆盖iView默认的Checkbox样式 */
.ivu-checkbox-wrapper {
/*font-size: 16px; !* 修改字体大小 *!*/
/*color: #495060; !* 修改文本颜色 *!*/
/* 添加其他需要的样式 */
}
.ivu-checkbox-inner {
/*width: 20px; !* 修改选框大小 *!*/
/*height: 20px;*/
/*border-color: #dcdee2; !* 修改边框颜色 *!*/
/* 添加其他需要的样式 */
}
/* 当Checkbox被选中时的样式 */
.ivu-checkbox-checked .ivu-checkbox-inner {
/*background-color: #2db7f5; !* 修改选中时的背景颜色 *!*/
}
/* 当Checkbox不可用时的样式 */
.ivu-checkbox-disabled .ivu-checkbox-inner {
/*background-color: #e9e9e9; !* 修改禁用状态下的背景颜色 *!*/
}
.demo-tree-render .ivu-tree-title{
width: 94%;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -221,13 +221,13 @@
></liliDialog> ></liliDialog>
<hotzone ref="hotzone" @changeZone="changeZone"></hotzone> <hotzone ref="hotzone" @changeZone="changeZone"></hotzone>
<Modal width="1200px" v-model="picModelFlag"> <Modal width="1200px" v-model="picModelFlag">
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
// import ossManage from "@/views/sys/oss-manage/ossManage"; // import ossManage from "@/views/sys/oss-manage/ossManage";
import ossManage from "@/views/shop/ossManage"; import ossManage from "@/views/shop/ossManages";
import hotzone from "@/views/shop/hotzone"; import hotzone from "@/views/shop/hotzone";
import { modelData } from "./config"; import { modelData } from "./config";
import ways from "@/views/lili-dialog/wap.js"; // import ways from "@/views/lili-dialog/wap.js"; //