Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui

# Conflicts:
#	seller/src/views/promotion/seckill/seckill.vue
master
Chopper 2021-08-12 17:12:13 +08:00
commit 2d2448ebba
11 changed files with 121 additions and 245 deletions

View File

@ -14,8 +14,8 @@
<div class="remarks-container" ref="itemGoodsComment"> <div class="remarks-container" ref="itemGoodsComment">
<div class="remarks-analyse-box"> <div class="remarks-analyse-box">
<div class="remarks-analyse-goods"> <div class="remarks-analyse-goods">
<i-circle :percent="skuDetail.grade || 100" stroke-color="#5cb85c"> <i-circle :percent="skuDetail.grade" stroke-color="#5cb85c">
<span class="remarks-analyse-num">{{skuDetail.grade || 100}}%</span> <span class="remarks-analyse-num">{{skuDetail.grade}}%</span>
<p class="remarks-analyse-title">好评率</p> <p class="remarks-analyse-title">好评率</p>
</i-circle> </i-circle>
</div> </div>
@ -206,6 +206,9 @@ export default {
}); });
window.addEventListener('scroll', this.handleScroll) window.addEventListener('scroll', this.handleScroll)
this.getList(); this.getList();
if (this.skuDetail.grade === null || this.skuDetail.grade === undefined) {
this.skuDetail.grade = 100
}
} }
}; };
</script> </script>

View File

@ -17,10 +17,10 @@ export default {
* @description api请求基础路径 * @description api请求基础路径
*/ */
api_dev: { api_dev: {
// common: 'http://192.168.0.100:8890', // common: 'http://192.168.0.101:8890',
// buyer: 'http://192.168.0.100:8888', // buyer: 'http://192.168.0.101:8888',
// seller: 'http://192.168.0.100:8889', // seller: 'http://192.168.0.101:8889',
// manager: 'http://192.168.0.100:8887' // manager: 'http://192.168.0.101:8887'
common: 'https://common-api.pickmall.cn', common: 'https://common-api.pickmall.cn',
buyer: 'https://buyer-api.pickmall.cn', buyer: 'https://buyer-api.pickmall.cn',

View File

@ -6,7 +6,7 @@
<!-- 店铺logo --> <!-- 店铺logo -->
<div class="shop-logo"> <div class="shop-logo">
<div> <div>
<img :src="storeMsg.storeLogo" height="50" alt=""> <img :src="storeMsg.storeLogo" height="80" alt="">
<div> <div>
<p>{{storeMsg.storeName || 'xx店铺'}}</p> <p>{{storeMsg.storeName || 'xx店铺'}}</p>
<p class="ellipsis" :alt="storeMsg.storeDesc" v-html="storeMsg.storeDesc"></p> <p class="ellipsis" :alt="storeMsg.storeDesc" v-html="storeMsg.storeDesc"></p>
@ -199,10 +199,6 @@ export default {
margin: 0 auto; margin: 0 auto;
align-items: center; align-items: center;
img {
width: 80px;
}
>div:nth-child(2){ >div:nth-child(2){
margin-left: 10px; margin-left: 10px;
flex: 1; flex: 1;
@ -212,9 +208,6 @@ export default {
width: 200px; width: 200px;
} }
} }
img {
height: 80px;
}
p:nth-child(1) { p:nth-child(1) {
font-size: 20px; font-size: 20px;
} }

View File

@ -240,6 +240,7 @@ export default {
if (res.success) { if (res.success) {
this.$Message.success('申请已提交,请等待审核') this.$Message.success('申请已提交,请等待审核')
this.distribution() this.distribution()
this.getLog()
} else { } else {
this.$Message.error(res.message) this.$Message.error(res.message)
} }

View File

@ -8,7 +8,7 @@
> >
<template slot-scope="{ row }" slot="goodsName"> <template slot-scope="{ row }" slot="goodsName">
<div style="padding:5px;display:flex;"> <div style="padding:5px;display:flex;">
<img :src="row.image" style="vertical-align: top;" width="60" alt=""> <span class="ml_10">{{row.goodsName}}</span> <img :src="row.image" style="vertical-align: top;" width="60" height="60" alt=""> <span class="ml_10">{{row.goodsName}}</span>
</div> </div>
</template> </template>
<template slot-scope="{ row }" slot="goodsPrice"> <template slot-scope="{ row }" slot="goodsPrice">

View File

@ -101,6 +101,8 @@ export default {
this.spinShow = false this.spinShow = false
if (res.success && res.result) { if (res.success && res.result) {
this.list = res.result; this.list = res.result;
} else {
this.list = []
} }
}); });
} }

View File

@ -59,7 +59,7 @@
<FormItem label="分类名称" prop="name"> <FormItem label="分类名称" prop="name">
<Input v-model="formAdd.name" clearable style="width: 100%" /> <Input v-model="formAdd.name" clearable style="width: 100%" />
</FormItem> </FormItem>
<FormItem label="分类图标" prop="image"> <FormItem label="分类图标" prop="image" v-if="formAdd.level === 2">
<upload-pic-input v-model="formAdd.image" style="width: 100%"></upload-pic-input> <upload-pic-input v-model="formAdd.image" style="width: 100%"></upload-pic-input>
</FormItem> </FormItem>
<FormItem label="排序值" prop="sortOrder" style="width: 345px"> <FormItem label="排序值" prop="sortOrder" style="width: 345px">
@ -83,7 +83,7 @@
<Modal :title="modalBrandTitle" v-model="modalBrandVisible" :mask-closable="false" :width="500"> <Modal :title="modalBrandTitle" v-model="modalBrandVisible" :mask-closable="false" :width="500">
<Form ref="brandForm" :model="brandForm" :label-width="100"> <Form ref="brandForm" :model="brandForm" :label-width="100">
<Select v-model="brandForm.categoryBrands" multiple> <Select v-model="brandForm.categoryBrands" filterable multiple>
<Option v-for="item in brandWay" :value="item.id" :key="item.id">{{ item.name }}</Option> <Option v-for="item in brandWay" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select> </Select>
@ -266,10 +266,12 @@ export default {
}, },
// //
addChildren(v) { addChildren(v) {
console.log(v);
this.modalType = 0; this.modalType = 0;
this.modalTitle = "添加子分类"; this.modalTitle = "添加子分类";
this.parentTitle = v.name; this.parentTitle = v.name;
this.formAdd.level = eval(v.level + "+1"); this.formAdd.level = eval(v.level + "+1");
this.formAdd.commissionRate = v.commissionRate;
this.showParent = true; this.showParent = true;
delete this.formAdd.id; delete this.formAdd.id;
this.formAdd.parentId = v.id; this.formAdd.parentId = v.id;

View File

@ -10,11 +10,11 @@
</DatePicker> </DatePicker>
</Form-item> </Form-item>
<Form-item label="筛选状态"> <Form-item label="筛选状态">
<Select v-model="searchForm.billStatus" style="width:160px"> <Select v-model="searchForm.billStatus" clearable style="width:160px">
<Option value="">全部</Option>
<Option value="OUT">已出账</Option> <Option value="OUT">已出账</Option>
<Option value="CHECK">已核对</Option> <Option value="CHECK">已对账</Option>
<Option value="COMPLETE">已完成</Option> <Option value="EXAMINE">已审核</Option>
<Option value="COMPLETE">已付款</Option>
</Select> </Select>
</Form-item> </Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>

View File

@ -37,9 +37,7 @@
<script> <script>
import { import {
getShopListData, getShopListData,
disableShop, shopAudit
enableBrand,
shopAudit,
} from "@/api/shops"; } from "@/api/shops";
import shopOperation from "./shopOperation"; import shopOperation from "./shopOperation";
export default { export default {
@ -99,7 +97,7 @@
"Tag", "Tag",
{ {
props: { props: {
color: params.row.selfOperated ? "default" : "primary", color: params.row.selfOperated ? "default" : "success",
}, },
}, },
params.row.selfOperated ? "自营" : "非自营" params.row.selfOperated ? "自营" : "非自营"
@ -121,48 +119,8 @@
align: "center", align: "center",
fixed: "right", fixed: "right",
render: (h, params) => { render: (h, params) => {
let enableOrDisable = ""; if (params.row.storeDisable == "APPLYING") {
if (params.row.storeDisable == "OPEN") { return h(
enableOrDisable = h(
"Button",
{
props: {
size: "small",
type: "error"
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.disable(params.row);
},
},
},
"关闭"
);
} else if (params.row.storeDisable == "CLOSED") {
enableOrDisable = h(
"Button",
{
props: {
type: "success",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.enable(params.row);
},
},
},
"开启"
);
} else if (params.row.storeDisable == "APPLYING") {
return h("div", [
h(
"Button", "Button",
{ {
props: { props: {
@ -172,80 +130,20 @@
style: { style: {
marginRight: "5px", marginRight: "5px",
}, },
on: {
click: () => {
this.audit(params.row);
},
},
},
"审核"
),
h(
"Button",
{
props: {
type: "primary",
size: "small",
},
style: {
marginRight: "5px",
},
on: { on: {
click: () => { click: () => {
this.edit(params.row); this.edit(params.row);
}, },
}, },
}, },
"修改" "查看"
), )
]);
} }
return h("div", [
h(
"Button",
{
props: {
size: "small",
},
style: {
marginRight: "5px",
display: this.selectedShop ? "inline-block" : "none",
},
on: {
click: () => {
this.callback(params.row);
},
},
},
"选择"
),
h(
"Button",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.edit(params.row);
},
},
},
"修改"
),
enableOrDisable,
]);
}, },
}, },
], ],
data: [], // data: [], //
total: 0, // total: 0 //
selectedShop: false, //
}; };
}, },
@ -296,76 +194,11 @@
this.total = this.data.length; this.total = this.data.length;
this.loading = false; this.loading = false;
}, },
// //
add() {
this.$router.push({ path: '/shop-operation'});
},
//
edit(v) { edit(v) {
this.$router.push({ path: '/shop-operation', query: { shopId: v.id } }); this.$router.push({ path: '/shop-operation', query: { shopId: v.id } });
}, },
//
disable(v) {
this.$Modal.confirm({
title: "确认关闭",
content: "您确认要关闭店铺 " + v.storeName + " ?",
loading: true,
onOk: () => {
disableShop(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
//
audit(v) {
this.$Modal.confirm({
title: "审核店铺",
content: "您确认要审核通过店铺 " + v.storeName + " ?",
okText: "通过",
cancelText: "驳回",
loading: true,
onOk: () => {
shopAudit(v.id, 0).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
onCancel: () => {
shopAudit(v.id, 1).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
//
enable(v) {
this.$Modal.confirm({
title: "确认开启",
content: "您确认要开启店铺 " + v.storeName + " ?",
loading: true,
onOk: () => {
enableBrand(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
}, },
mounted() { mounted() {
this.init(); this.init();

View File

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<Card> <Card>
<Button class="mb_10" v-if="shopForm.storeDisable === 'APPLYING'" type="primary" @click="audit"></Button>
<Tabs v-model="tabName" :animated="false" style="overflow: visible"> <Tabs v-model="tabName" :animated="false" style="overflow: visible">
<Form ref="shopForm" :model="shopForm" :label-width="130" label-position="right" :rules="shopValidate"> <Form ref="shopForm" :model="shopForm" :label-width="130" label-position="right" :rules="shopValidate">
<TabPane label="基本信息" class="tab" name="base"> <TabPane label="基本信息" class="tab" name="base">
@ -86,7 +87,7 @@
</div> </div>
</TabPane> </TabPane>
<!-- 入驻信息 --> <!-- 入驻信息 -->
<TabPane label="入驻信息" class="tab" name="sms"> <TabPane label="入驻信息" class="tab" name="entry">
<!-- 遮罩层 --> <!-- 遮罩层 -->
<div v-if="isRead" class="mask"></div> <div v-if="isRead" class="mask"></div>
<Divider orientation="left">公司信息</Divider> <Divider orientation="left">公司信息</Divider>
@ -190,7 +191,7 @@
</FormItem> </FormItem>
</TabPane> </TabPane>
<TabPane label="配送信息" class="tab" name="distribution"> <TabPane label="配送信息" class="tab" name="send">
<!-- 遮罩层 --> <!-- 遮罩层 -->
<FormItem label="达达编码" prop="ddCode"> <FormItem label="达达编码" prop="ddCode">
@ -199,11 +200,12 @@
</TabPane> </TabPane>
<TabPane label="结算信息" class="tab" name="settlement"> <TabPane label="结算信息" class="tab" name="settlement">
<Alert type="error">已添加<span class="theme_color">{{settlementCycle.length}}</span>个结算日最多可添加5个结算日当月不包含所设日期时将会顺延到下一个结算日</Alert>
<FormItem label="结算周期"> <FormItem label="结算周期">
<Tag v-for="item in settlementCycle" :key="item" :name="item" closable style="marrgin-left: 10px" @on-close="removesettlementCycle">{{ item }} <Tag v-for="item in settlementCycle" :key="item" :name="item" closable style="marrgin-left: 10px" @on-close="removesettlementCycle">{{ item }}
</Tag> </Tag>
<InputNumber :max="28" :min="1" v-model="day" v-show="settlementShow"></InputNumber> <InputNumber size="small" :max="31" :min="1" v-model="day" v-show="settlementShow"></InputNumber>
<Button type="default" @click="addsettlementCycle" size="small" v-if="addSettlementBtn" style="margin-left: 8px"> <Button type="default" @click="addsettlementCycle" size="small" v-if="addSettlementBtn && settlementCycle.length < 5" style="margin-left: 8px">
</Button> </Button>
<Button v-if="addSettlementConfirmBtn" type="default" @click="addsettlementCycleConfirm" size="small" style="margin-left: 8px"> <Button v-if="addSettlementConfirmBtn" type="default" @click="addsettlementCycleConfirm" size="small" style="margin-left: 8px">
</Button> </Button>
@ -212,8 +214,11 @@
</Form> </Form>
</Tabs> </Tabs>
<div align="center"> <div align="center">
<Button type="primary" @click="save" v-if="!isRead" style="width: 100px; margin-right: 5px">{{ shopId ? "" :
"保存" }} <Button type="info" v-show="tabNameList.indexOf(tabName)>0" class="mr_10" @click="prev"></Button>
<Button type="primary" v-show="tabNameList.indexOf(tabName)<4" @click="next"></Button>
<Button type="primary" v-show="tabNameList.indexOf(tabName) === 4" @click="save" v-if="!isRead">
{{ shopId ? "修改" : "保存" }}
</Button> </Button>
</div> </div>
</Card> </Card>
@ -233,7 +238,7 @@
import memberLayout from "@/views/member/list/index"; import memberLayout from "@/views/member/list/index";
import ossManage from "@/views/sys/oss-manage/ossManage"; import ossManage from "@/views/sys/oss-manage/ossManage";
import { getCategoryTree } from "@/api/goods"; import { getCategoryTree } from "@/api/goods";
import { shopDetail, shopAdd, shopEdit, getShopByMemberId } from "@/api/shops"; import { shopDetail, shopAdd, shopEdit, getShopByMemberId,shopAudit } from "@/api/shops";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input"; import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
import region from "@/views/lili-components/region"; import region from "@/views/lili-components/region";
import liliMap from "@/views/my-components/map/index"; import liliMap from "@/views/my-components/map/index";
@ -251,14 +256,16 @@ export default {
data() { data() {
return { return {
shopId: this.$route.query.shopId, // id shopId: this.$route.query.shopId, // id
isRead: false, // isRead: false, //
selectedFormBtnName: "", //form selectedFormBtnName: "", // form
picModalFlag: false, // picModalFlag: false, //
memberModalFlag: false, // memberModalFlag: false, //
settlementShow: false, // settlementShow: false, //
addSettlementConfirmBtn: false, // addSettlementConfirmBtn: false, //
addSettlementBtn: true, // addSettlementBtn: true, //
day: 0, // day: 1, //
tabName: 'base', // tabname
tabNameList: ['base', 'entry', 'category', 'send' ,'settlement'], // tabname
shopValidate: { shopValidate: {
// //
memberName: [ memberName: [
@ -433,14 +440,20 @@ export default {
}, },
// //
addsettlementCycleConfirm() { addsettlementCycleConfirm() {
console.warn(this.settlementCycle.includes(this.day + "")); if (!this.day) {
if (this.day !== null && !this.settlementCycle.includes(this.day + "")) { this.$Message.warning('请输入正确的结算周期1-31的整数')
this.settlementCycle.push(this.day); return
} }
if (this.settlementCycle.includes(this.day)) {
this.$Message.warning('已有该结算周期,不能重复输入')
return
}
this.settlementCycle.push(this.day);
this.addSettlementConfirmBtn = false; this.addSettlementConfirmBtn = false;
this.addSettlementBtn = true; this.addSettlementBtn = true;
this.settlementShow = false; this.settlementShow = false;
this.day = 1; this.day = 1;
}, },
// //
selectedRegion(val) { selectedRegion(val) {
@ -470,6 +483,14 @@ export default {
this.getShopDetail(); this.getShopDetail();
} }
}, },
next () { //
let index = this.tabNameList.indexOf(this.tabName) + 1
this.tabName = this.tabNameList[index]
},
prev () { //
let index = this.tabNameList.indexOf(this.tabName) - 1
this.tabName = this.tabNameList[index]
},
// //
getShopDetail() { getShopDetail() {
shopDetail(this.shopId).then((res) => { shopDetail(this.shopId).then((res) => {
@ -576,6 +597,35 @@ export default {
} }
}); });
}, },
//
audit() {
let id = this.$route.query.shopId
this.$Modal.confirm({
title: "审核店铺",
content: "您确认要审核通过该店铺?",
okText: "通过",
cancelText: "驳回",
loading: true,
onOk: () => {
shopAudit(id, 0).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.$router.push({name: 'shopAuth'})
}
});
},
onCancel: () => {
shopAudit(id, 1).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.$router.push({name: 'shopAuth'})
}
});
},
});
},
}, },
created() { created() {
this.init(); this.init();

View File

@ -325,39 +325,31 @@ util.initRouter = function (vm) { // 初始化路由
} }
if (!vm.$store.state.app.added) { if (!vm.$store.state.app.added) {
// 第一次加载 读取数据
let accessToken = window.localStorage.getItem('accessToken');
// 加载菜单 // 加载菜单
// axios.get(getMenuList, { headers: { 'accessToken': accessToken } }).then(res => { let menuData = result;
// let menuData = res.result; // 格式化数据,设置 空children 为 null
let menuData = result; for(let i =0;i<menuData.length;i++){
if (!menuData) { let t = menuData[i].children
return; for(let k = 0;k<t.length;k++){
} let tt = t[k].children;
// 格式化数据,设置 空children 为 null for(let z = 0;z<tt.length;z++){
for(let i =0;i<menuData.length;i++){ tt[z].children = null
let t = menuData[i].children // 给所有三级路由添加字段显示一级菜单name方便点击页签时的选中筛选
for(let k = 0;k<t.length;k++){ tt[z].firstRouterName = menuData[i].name
let tt = t[k].children;
for(let z = 0;z<tt.length;z++){
tt[z].children = null
// 给所有三级路由添加字段显示一级菜单name方便点击页签时的选中筛选
tt[z].firstRouterName = menuData[i].name
}
} }
} }
util.initAllMenuData(constRoutes, menuData); }
util.initRouterNode(otherRoutes, otherRouter); util.initAllMenuData(constRoutes, menuData);
// 添加所有主界面路由 util.initRouterNode(otherRoutes, otherRouter);
vm.$store.commit('updateAppRouter', constRoutes.filter(item => item.children.length > 0)); // 添加所有主界面路由
// 添加全局路由 vm.$store.commit('updateAppRouter', constRoutes.filter(item => item.children.length > 0));
vm.$store.commit('updateDefaultRouter', otherRoutes); // 添加全局路由
// 添加菜单路由 vm.$store.commit('updateDefaultRouter', otherRoutes);
util.initMenuData(vm, menuData); // 添加菜单路由
// 缓存数据 修改加载标识 util.initMenuData(vm, menuData);
window.localStorage.setItem('menuData', JSON.stringify(menuData)); // 缓存数据 修改加载标识
vm.$store.commit('setAdded', true); window.localStorage.setItem('menuData', JSON.stringify(menuData));
// }); vm.$store.commit('setAdded', true);
} else { } else {
// 读取缓存数据 // 读取缓存数据
let data = window.localStorage.getItem('menuData'); let data = window.localStorage.getItem('menuData');