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.npm.taobao.org/
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
electron_mirror=https://npm.taobao.org/mirrors/electron/
registry "https://registry.npmmirror.com"
sass_binary_site "https://npmmirror.com/mirrors/node-sass"
phantomjs_cdnurl "https://npmmirror.com/mirrors/phantomjs"
electron_mirror "https://npmmirror.com/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

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

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"
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:
version "0.19.2"
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"
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:
version "1.5.1"
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"
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"
resolved "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=
resolved "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
dependencies:
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"
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:
version "0.1.2"
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:
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:
version "0.1.8"
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"
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:
version "2.1.4"
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"
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:
version "7.3.1"
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"
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:
version "1.0.1"
resolved "https://registry.npm.taobao.org/prr/download/prr-1.0.1.tgz"

View File

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

View File

@ -53,11 +53,6 @@ export const getDistributionCash = (params) => {
export const auditDistributionCash = (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 width="1000" v-model="showOssManager" @on-ok="confirmUrls">
<OssManage ref="ossManage" @selected="handleCallback" />
<OssManage ref="ossManage" :isComponent="true" @selected="handleCallback" />
</Modal>
</div>
</template>

View File

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

View File

@ -276,19 +276,7 @@ export const otherRouter = {
title: "查看直播",
name: "live-detail",
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>
<div>
<Card>
<Row @keydown.enter.native="handleSearch">
<Row @keydown.enter.native.prevent="handleSearch">
<Form
ref="searchForm"
:model="searchForm"
@ -69,9 +69,8 @@
<script>
import {
getDistributionListData,
retreatDistribution,
resumeDistribution,
auditDistribution,
retreatDistribution
} from "@/api/distribution";
import { distributionStatusList } from "./dataJson.js";
export default {
@ -90,23 +89,19 @@ export default {
{
title: "会员名称",
key: "memberName",
minWidth: 200,
minWidth: 120,
tooltip: true,
},
{
title: "推广单数",
key: "distributionOrderCount",
minWidth: 200,
},
{
title: "推广人数",
key: "peopleNum",
minWidth: 200,
minWidth: 120,
width: 150,
},
{
title: "分销金额",
key: "rebateTotal",
minWidth: 200,
width: 150,
sortable: false,
render: (h, params) => {
return h("priceColorScheme", {props:{value:params.row.rebateTotal,color:this.$mainColor}} );
@ -114,9 +109,9 @@ export default {
},
{
title: "可提现金额",
title: "可金额",
key: "canRebate",
minWidth: 200,
width: 150,
sortable: false,
render: (h, params) => {
return h("priceColorScheme", {props:{value:params.row.canRebate,color:'green'}} );
@ -125,7 +120,7 @@ export default {
{
title: "冻结金额",
key: "commissionFrozen",
minWidth: 200,
width: 150,
sortable: false,
render: (h, params) => {
return h("priceColorScheme", {props:{value:params.row.commissionFrozen,color:'#347dda'}} );
@ -134,7 +129,7 @@ export default {
{
title: "状态",
key: "distributionStatus",
minWidth: 200,
width: 150,
sortable: false,
render: (h, params) => {
if (params.row.distributionStatus == "PASS") {
@ -153,7 +148,7 @@ export default {
key: "action",
align: "center",
fixed: "right",
minWidth: 200,
width: 140,
render: (h, params) => {
return h(
"div",
@ -163,42 +158,7 @@ export default {
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(
"Button",
{
@ -253,14 +213,6 @@ export default {
};
},
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() {
this.getDataList();

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<template>
<div>
<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">
<Form-item label="商品名称" prop="goodsName">
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px" />
@ -38,7 +38,7 @@
</template>
<script>
import { getDistributionGoods, delDistributionGoods } from "@/api/distribution";
import { delDistributionGoods, getDistributionGoods } from "@/api/distribution";
import vueQr from "vue-qr";
export default {
components: {
@ -102,6 +102,11 @@ export default {
},
},
{
title: "库存",
key: "quantity",
minWidth: 80,
},
{
title: "添加时间",
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"
/>
</Form-item>
<Form-item label="分销" prop="distributionName">
<Form-item label="分销" prop="distributionName">
<Input
type="text"
v-model="searchForm.distributionName"
@ -104,7 +104,7 @@
},
{
title: "分销",
title: "分销",
key: "distributionName",
tooltip: true,
minWidth:80,

View File

@ -1,7 +1,7 @@
<template>
<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>
<FormItem label="是否开启分销" prop="isOpen">
@ -10,110 +10,12 @@
<span slot="close">关闭</span>
</i-switch>
</FormItem>
<FormItem label="分销层级" prop="level">
<RadioGroup v-model="form.level" size="large">
<Radio label="1">1</Radio>
<Radio label="2">2</Radio>
</RadioGroup>
<FormItem label="分销关系绑定天数" prop="distributionDay">
<InputNumber :min="1" :max="365" style="width:100px;" v-model="form.distributionDay"></InputNumber>
</FormItem>
<FormItem label="分销模式" prop="mode">
<RadioGroup v-model="form.mode" size="large">
<Radio label="1">指定分销</Radio>
<Radio label="2">人人分销</Radio>
</RadioGroup>
<FormItem label="分销结算天数" prop="cashDay">
<InputNumber :min="0" :max="365" style="width:100px;" v-model="form.cashDay"></InputNumber>
</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>
<Button type="primary" @click="submit"></Button>
</FormItem>
@ -122,8 +24,8 @@
</template>
<script>
import {getSetting, setSetting} from "@/api/index";
import { setSetting, getSetting } from "@/api/index";
import { regular } from "@/utils";
export default {
name: "distributionSetting",
data() {
@ -131,36 +33,20 @@ export default {
form: {
//
isOpen: true,
level: 1, //
mode: 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, //
distributionDay: 0, //
cashDay: 0, //
},
// formRule: {
// isOpen: [
// regular.REQUIRED
// ],
// distributionDay: [
// regular.REQUIRED
// ],
// cashDay: [
// regular.REQUIRED
// ],
// }
formRule: {
isOpen: [
regular.REQUIRED
],
distributionDay: [
regular.REQUIRED
],
cashDay: [
regular.REQUIRED
],
}
};
},
methods: {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -375,7 +375,7 @@
<Modal width="1200px" v-model="picModalFlag">
<ossManage @callback="callbackSelected" ref="ossManage" />
<ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal>
<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;
}
}
</style>
<template>
<div class="search">
@ -61,7 +62,22 @@
</Button>
</Form>
</Row>
<div class="oss-operation padding-row">
<Row class="oss-manage-box">
<Col :span="isComponent?5:4">
<div class="file-list">
<div class="article-category mr_10">
<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"
@ -95,130 +111,201 @@
</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
>
<div>
<CheckboxGroup v-model="selectedOss" @on-change="selectOssChange">
<div class="img-box">
<div v-for="(item, index) in data" :key="index" class="img-item">
<Checkbox :label="item.id+','+item.url" class="check-box">
<template>
<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>-->
<img :src="item.url" alt="" />
<div v-if="item.isShowPreview" class="preview">
<div @click.prevent="download(item)"><Tooltip content="下载"><Icon type="md-cloud-download" size="18" /></Tooltip></div>
<div @click.prevent="remove(item)"><Tooltip content="删除"><Icon type="md-trash" size="18" /></Tooltip></div>
<div @click.prevent="showPic(item)"><Tooltip content="预览"><Icon type="ios-eye" size="22" /></Tooltip></div>
</div>
</div>
</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 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)"/>
</Checkbox>
<div>
<Tooltip :content="item.name" placement="bottom">
<div class="text">{{item.name}}</div>
</Tooltip>
</div>
</div>
</div>
</Card>
</CheckboxGroup>
</div>
<div class="page-box">
<Page :total="total" :page-size="searchForm.pageSize" show-elevator @on-change="pageChange" size="small" />
</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"
></Page>
</Col>
</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>
<!--<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"-->
<!--&gt;共计 {{ totalSize }} 存储量</span-->
<!--&gt;-->
<!--</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"-->
<!--&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>
</Row>
<Modal
@ -342,7 +429,6 @@ export default {
commonUrl, //
config, // api
fileDirectoryId: "",
groupFormValidate: {
id: [],
level: 0,
@ -384,7 +470,7 @@ export default {
fileKey: "",
fileType: "",
pageNumber: 1, //
pageSize: 10, //
pageSize: 27, //
sort: "createTime", //
order: "desc", //
startDate: "", //
@ -731,6 +817,27 @@ export default {
selectedGroupData: "",
insertOrUpdate: "insert",
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: {
@ -739,11 +846,64 @@ export default {
},
choose(val) {
if (val) this.selectImage = val
},
selectedOss(val) {
if (val) {
this.$emit("callback", {url: val[val.length-1].split(',')[1]});
}
}
},
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) {
console.log('handleContextMenu', val);
this.selectedGroupData = val;
},
//
@ -768,6 +928,7 @@ export default {
const res = await delFileDirectory(this.selectedGroupData.value);
if (res.success) {
this.$Message.success("删除成功!");
this.getDataList();
this.getAllList();
}
},
@ -870,7 +1031,7 @@ export default {
obj.level = item.level;
obj.expand = false;
obj.selected = false;
obj.contextmenu = true;
obj.contextmenu = false;
obj.parentId = item.parentId;
obj.children = this.getTree(item.children); //
arr.push(obj);
@ -881,6 +1042,7 @@ export default {
//
handleCateChange(data) {
if (data) {
this.selectedGroupData = data[0];
let {value, type, level} = data[0];
this.list.push({value, type, level});
@ -893,6 +1055,8 @@ export default {
}
this.searchForm.userEnums = type;
this.getDataList();
this.$set(this, 'selectedOss', []);
}
},
/**
* 选择
@ -903,7 +1067,7 @@ export default {
//
handleDropdown(name) {
if (name === "refresh") {
this.getDataList();
this.getDataList('refresh');
} else if (name === "removeAll") {
this.removeAll();
}
@ -981,7 +1145,7 @@ export default {
this.getDataList();
},
//
getDataList() {
getDataList(type = null) {
if (this.showType == "list") {
this.pageSizeOpts = [10, 20, 50];
} else {
@ -993,6 +1157,9 @@ export default {
this.data = res.result.records;
this.total = res.result.total;
if (type === 'refresh') {
this.$Message.success('刷新成功!');
}
});
},
//
@ -1064,16 +1231,15 @@ export default {
loading: true,
onOk: () => {
let ids = "";
this.selectList.forEach(function (e) {
ids += e.id + ",";
});
this.selectList.forEach(function (e) {ids += e.id + ",";});
ids = ids.substring(0, ids.length - 1);
deleteFile(ids).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$set(this, 'selectedOss', []);
// this.clearSelectAll();
this.init();
this.$Message.success("批量删除文件成功");
this.clearSelectAll();
this.getDataList();
}
})
.catch((err) => {
@ -1157,6 +1323,8 @@ export default {
if (!this.isComponent) {
//
this.init();
} else {
this.searchForm.pageSize =18; //
}
},
};

View File

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

View File

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

View File

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

View File

@ -2,22 +2,71 @@
// 统一请求路径前缀在libs/axios.js中修改
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) => {
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) => {
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>
<div class="form-item-view">
<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">
<div v-for="(item, __index) in baseInfoForm.goodsGalleryFiles" :key="__index"
class="demo-upload-list">
@ -110,27 +110,29 @@
<img :src="item"/>
<div class="demo-upload-list-cover">
<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>
</div>
</div>
</template>
</div>
</vuedraggable>
<Upload ref="upload"
:action="uploadFileUrl" :before-upload="handleBeforeUploadGoodsPicture"
:format="['jpg', 'jpeg', 'png', 'webp']"
:headers="{ ...accessToken }"
:max-size="2048" :on-error="() => { $Spin.hide(); }" :on-exceeded-size="handleMaxSize"
:on-format-error="handleFormatError" :on-progress="() => { $Spin.show(); }"
:on-success="handleSuccessGoodsPicture" :show-upload-list="false" multiple
style="margin-left: 10px"
type="drag">
<div style="width: 148px; height: 148px; line-height: 148px">
<Icon size="20" type="md-add"></Icon>
<!--<Upload ref="upload"-->
<!--:action="uploadFileUrl" :before-upload="handleBeforeUploadGoodsPicture"-->
<!--:format="['jpg', 'jpeg', 'png', 'webp']"-->
<!--:headers="{ ...accessToken }"-->
<!--:max-size="2048" :on-error="() => { $Spin.hide(); }" :on-exceeded-size="handleMaxSize"-->
<!--:on-format-error="handleFormatError" :on-progress="() => { $Spin.show(); }"-->
<!--:on-success="handleSuccessGoodsPicture" :show-upload-list="false" multiple-->
<!--style="margin-left: 10px"-->
<!--type="drag">-->
<!--<div style="width: 148px; height: 148px; line-height: 148px">-->
<!--<Icon size="20" type="md-add"></Icon>-->
<!--</div>-->
<!--</Upload>-->
</div>
</Upload>
<div style="width: 100%;display: flex;justify-content: start;margin-top: 10px;">
<Button @click="handleCLickImg('goodsGalleryFiles')" type="primary">上传图片</Button>
</div>
<Modal v-model="goodsPictureVisible" title="View Image">
<img v-if="goodsPictureVisible" :src="previewGoodsPicture" style="width: 100%"/>
@ -474,7 +476,7 @@
<!--<ossManage @callback="callbackSelected" ref="ossManage" />-->
<!--</Modal>-->
<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>
</div>
@ -490,7 +492,7 @@ import {uploadFile} from "@/libs/axios";
import {regular} from "@/utils";
import DPlayer from 'dplayer';
// import ossManage from "@/views/sys/oss-manage/ossManage";
import ossManage from "@/views/shop/ossManage";
import ossManage from "@/views/shop/ossManages";
export default {
@ -746,8 +748,9 @@ export default {
if (val && this.selectedFormBtnName == 'selectedSkuImages') {
this.selectedSku.images.push(val);
} else {
this.baseInfoForm[this.selectedFormBtnName].push(val);
this.baseInfoForm[this.selectedFormBtnName].push(val.url);
}
},
confirmUrls() {
if (this.selectedImage && this.selectedFormBtnName == 'selectedSkuImages') {

View File

@ -57,7 +57,7 @@
</Modal>
<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>
</div>
</template>

View File

@ -57,7 +57,7 @@
</Modal>
<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>
</div>
</template>
@ -65,7 +65,7 @@
<script>
import { uploadFile } from "@/libs/axios";
import vuedraggable from "vuedraggable";
import ossManage from "@/views/shop/ossManage";
import ossManage from "@/views/shop/ossManages";
export default {
name: "uploadPicThumb",
components: {

View File

@ -8,7 +8,7 @@
<Button @click="orderLogModal = true" type="primary">订单日志</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.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>
@ -299,7 +299,7 @@
</FormItem>
<FormItem label="详细地址" prop="consigneeDetail">
<Input v-model="addressForm.consigneeDetail" size="large" maxlength="11"></Input>
<Input v-model="addressForm.consigneeDetail" size="large"></Input>
</FormItem>
</Form>
</div>
@ -420,7 +420,7 @@
<Form :model="faceSheetForm" ref="faceSheetForm" v-if="facesheetFlag" :rules="faceSheetFormValidate">
<FormItem label="物流公司" prop="logisticsId" style="position: relative" :label-width="90">
<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>
</Select>
</FormItem>
@ -429,7 +429,7 @@
:rules="orderDeliverFormValidate" style="position: relative">
<FormItem label="物流公司" prop="logisticsId">
<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>
</Select>
</FormItem>
@ -1116,6 +1116,7 @@ export default {
}
})
} else {
console.log("this.orderDeliveryForm",this.orderDeliveryForm)
this.$refs['orderDeliveryForm'].validate((valid) => {
if (valid) {
API_Order.orderDelivery(this.sn, this.orderDeliveryForm).then(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -206,7 +206,7 @@
</template>
<script>
// import ossManage from "@/views/sys/oss-manage/ossManage";
import ossManage from "@/views/shop/ossManage";
import ossManage from "@/views/shop/ossManages";
export default {
props: {
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>
<hotzone ref="hotzone" @changeZone="changeZone"></hotzone>
<Modal width="1200px" v-model="picModelFlag">
<ossManage @callback="callbackSelected" ref="ossManage" />
<ossManage @callback="callbackSelected" :isComponent="true" ref="ossManage" />
</Modal>
</div>
</template>
<script>
// 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 { modelData } from "./config";
import ways from "@/views/lili-dialog/wap.js"; //