Browse Source

修改支持多终端

master
xh-pan1 2 years ago
parent
commit
a4de7535f0
  1. 6
      src/api/commodity.js
  2. 36
      src/api/shop.js
  3. 10
      src/api/shopSys.js
  4. 48
      src/layout/components/Navbar.vue
  5. 4
      src/store/modules/user.js
  6. 44
      src/styles/elDialog.scss
  7. 31
      src/utils/auth.js
  8. 10
      src/utils/request.js
  9. 4
      src/views/active/activeData.vue
  10. 2
      src/views/commodity/commodityList/commodityGroup.vue
  11. 1
      src/views/commodity/commodityList/index.vue
  12. 77
      src/views/commodity/commoditySystem/addCommodity.vue
  13. 2
      src/views/commodity/commoditySystem/index.vue
  14. 15
      src/views/customer/addClustering.vue
  15. 9
      src/views/customer/addOperate.vue
  16. 3
      src/views/customer/clusteringList/index.vue
  17. 7
      src/views/liveMenu/liveProduct/index.vue
  18. 9
      src/views/liveMenu/liveRoom/index.vue
  19. 237
      src/views/marketing/channelActivity/form.vue
  20. 128
      src/views/marketing/channelActivity/index.vue
  21. 273
      src/views/marketing/channelActivity/selectChannelCoupons.vue
  22. 6
      src/views/marketing/channelCoupons/form.vue
  23. 8
      src/views/marketing/channelManage/add.vue
  24. 1
      src/views/marketing/channelManage/index.vue
  25. 6
      src/views/marketing/compose/add.vue
  26. 5
      src/views/marketing/compose/index.vue
  27. 7
      src/views/marketing/coupon/add.vue
  28. 1
      src/views/marketing/coupon/index.vue
  29. 10
      src/views/marketing/discount/add.vue
  30. 1
      src/views/marketing/discount/index.vue
  31. 9
      src/views/marketing/group/add.vue
  32. 1
      src/views/marketing/group/index.vue
  33. 7
      src/views/marketing/price/add.vue
  34. 5
      src/views/marketing/price/index.vue
  35. 13
      src/views/marketing/scene/add.vue
  36. 5
      src/views/marketing/scene/index.vue
  37. 13
      src/views/marketing/spike/add.vue
  38. 1
      src/views/marketing/spike/index.vue
  39. 427
      src/views/order/aftersale/afterDetails.vue
  40. 584
      src/views/order/pending/pendDetails.vue
  41. 691
      src/views/shop/myshop/index.vue
  42. 14
      src/views/system/shopSys/edit.vue
  43. 160
      src/views/system/shopSys/index.vue

6
src/api/commodity.js

@ -2,10 +2,11 @@ import request from '@/utils/request'
//* ******************** 添加商品 *********************
// 选择商品分组查询
export function getGroupSelect(data) {
export function getGroupSelect(data, headers) {
return request({
url: '/product/getGroupSelect',
method: 'post',
headers : headers,
data
})
}
@ -80,10 +81,11 @@ export function getClassifyStart(data) {
}
// 商品分类
export function getClassify(data) {
export function getClassify(data,headers) {
return request({
url: '/product/getClassify',
method: 'post',
headers : headers,
data
})
}

36
src/api/shop.js

@ -1,5 +1,41 @@
import request from '@/utils/request'
// 店铺管理查询
export function shopListGetAll(data) {
return request({
url: '/shop/getAll',
method: 'post',
data
})
}
// 新增店铺
export function shopListSave(data) {
return request({
url: '/shop/save',
method: 'post',
data
})
}
// 店铺编辑查询
export function shopListGetById(data) {
return request({
url: '/shop/getById',
method: 'post',
data
})
}
// 修改店铺
export function shopListUpdate(data) {
return request({
url: '/shop/update',
method: 'post',
data
})
}
//* ******************** 素材管理 *********************
// 标签管理查询
export function tipsGetAll(data) {

10
src/api/shopSys.js

@ -2,18 +2,18 @@ import request from '@/utils/request'
//* ******************** 添加商品 *********************
// 店铺信息查询
export function shopSysGetById(data) {
export function businessGetById(data) {
return request({
url: '/shop/getById',
url: '/business/getById',
method: 'post',
data
})
}
// 修改店铺信息
export function shopSysUpdate(data) {
export function businessUpdate(data) {
return request({
url: '/shop/update',
url: '/business/update',
method: 'post',
data
})
@ -22,7 +22,7 @@ export function shopSysUpdate(data) {
// 支付认证
export function registerByXs(data) {
return request({
url: '/shop/registerByXs',
url: '/business/registerByXs',
method: 'post',
data
})

48
src/layout/components/Navbar.vue

@ -7,10 +7,24 @@
/>
<breadcrumb class="breadcrumb-container" />
<div class="right-menu">
<div class="projectmode">
<span>商家终端</span>
<el-switch
style="margin-left: 10px;"
v-model="isBusinessMode"
@change="changeBusinessMode()"
active-color="#3a68f2"
inactive-color="#E8EAEC">
</el-switch>
</div>
<template v-if="device !== 'mobile'">
<!-- <search id="header-search" class="right-menu-item" /> -->
<screenfull id="screenfull" class="right-menu-item hover-effect" />
</template>
<el-dropdown class="avatar-container" trigger="click">
<div class="avatar-wrapper" style="margin-left: 20px">
<img
@ -84,7 +98,7 @@
<script>
import { mapGetters } from 'vuex'
import { removeToken, removeshopID, removeUserId, setAvatar, getToken } from '@/utils/auth'
import { removeToken, removeBusinessId, removeUserId, setAvatar, getToken, setProject, getBusinessId } from '@/utils/auth'
import Breadcrumb from '@/components/Breadcrumb'
import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull'
@ -128,6 +142,7 @@ export default {
},
userAvatar: defaultAvatar,
action: uploadUrl,
isBusinessMode : false,
headers: {
'Authorization-business': getToken()
},
@ -160,6 +175,15 @@ export default {
}
},
methods: {
changeBusinessMode(){
console.log("changeBusinessMode:" + this.isBusinessMode)
if(this.isBusinessMode){
setProject("" + getBusinessId())
}else{
setProject("0")
}
this.$router.go(0)
},
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
@ -190,7 +214,7 @@ export default {
setTimeout(() => {
localStorage.clear()
removeToken()
removeshopID()
removeBusinessId()
removeUserId()
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
}, 2000)
@ -209,10 +233,13 @@ export default {
this.$refs['ruleForm'].clearValidate()
})
},
async refresh(){
},
async logout() {
localStorage.clear()
removeToken()
removeshopID()
removeBusinessId()
removeUserId()
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
},
@ -256,6 +283,21 @@ export default {
float: right;
height: 100%;
line-height: 50px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
align-items: center;
.projectmode{
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
justify-content: center;
align-items: center;
margin-right: 15px;
}
&:focus {
outline: none;

4
src/store/modules/user.js

@ -8,7 +8,7 @@ import {
removeToken,
setName,
setAvatar,
setShopId,
setBusinessId,
setUserId
} from '@/utils/auth'
import {
@ -66,7 +66,7 @@ const actions = {
setAvatar(data.avatar)
commit('SET_TOKEN', data.token)
setToken(data.token)
setShopId(data.shopId)
setBusinessId(data.businessId)
setUserId(data.businessUserId)
resolve()
location.reload()

44
src/styles/elDialog.scss

@ -1,5 +1,7 @@
.el-dialog {
border-radius: 10px;
margin-top: 10vh;
margin-bottom: 5vh;
}
.el-dialog__header {
@ -65,4 +67,46 @@ font-weight: 500;
}
.promissStyle{
margin-left: 10px;
}
.dialog-footer {
display: flex;
justify-content: flex-end;
align-items: center;
align-content: center;
flex-wrap: nowrap;
flex-direction: row;
.el-button {
margin: 0px 16px;
}
}
.el-form-item__label {
vertical-align: middle;
float: left;
padding: 0 12px 0 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
line-height: 36px;
text-align: left;
}
.el-radio__label {
vertical-align: middle;
padding: 0 12px 0 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
line-height: 36px;
text-align: left;
margin-left: 8px;
}

31
src/utils/auth.js

@ -1,7 +1,8 @@
import Cookies from 'js-cookie'
const TokenKey = 'cereShopBussesToken'
const shopID = 'cereShopId'
const project = 'project'
const businessID = 'cereBusinessId'
const roleName = 'roleName'
const avatar = 'avatar'
const roleUserId = 'roleUserId'
@ -10,8 +11,15 @@ const btns = 'buttonList'
export function getToken() {
return Cookies.get(TokenKey)
}
export function getShopId() {
return Cookies.get(shopID)
export function getBusinessId() {
return Cookies.get(businessID)
}
export function getProject() {
let curProject = sessionStorage.getItem(project)
if(!curProject){
curProject = "0"
}
return curProject
}
export function getUserId() {
return Cookies.get(roleUserId)
@ -26,8 +34,8 @@ export function setToken(token) {
export function setUserId(token) {
return Cookies.set(roleUserId, token)
}
export function setShopId(id) {
return Cookies.set(shopID, id)
export function setBusinessId(id) {
return Cookies.set(businessID, id)
}
export function setName(name) {
return localStorage.setItem(roleName, name)
@ -39,15 +47,24 @@ export function setBtns(name) {
return sessionStorage.setItem(btns, name)
}
export function setProject(name) {
return sessionStorage.setItem(project, name)
}
export function removeToken() {
return Cookies.remove(TokenKey)
}
export function removeshopID() {
return Cookies.remove(shopID)
export function removeBusinessId() {
removeProject();
return Cookies.remove(businessID)
}
export function removeUserId() {
return Cookies.remove(roleUserId)
}
export function removeProject() {
return Cookies.remove(project)
}
export function getBtnList() {
const list = JSON.parse(getBtns())

10
src/utils/request.js

@ -7,7 +7,8 @@ import store from '@/store'
import router from '@/router'
import {
getToken,
getShopId,
getBusinessId,
getProject,
removeToken
} from '@/utils/auth'
@ -30,7 +31,12 @@ service.interceptors.request.use(
config => {
if (store.getters.token) {
config.headers['Authorization-business'] = getToken()
config.headers['shopId'] = getShopId()
config.headers['businessId'] = getBusinessId()
let headerProject = config.headers['project']
if(!headerProject){
config.headers['project'] = getProject()
}
config.headers['Content-Type'] = 'application/json; charset=UTF-8'
// config.headers['type'] = ' business'
}

4
src/views/active/activeData.vue

@ -59,7 +59,7 @@
<script>
import {
getShopId
getBusinessId
} from '@/utils/auth'
import { getDatas } from '@/api/active'
@ -98,7 +98,7 @@ export default {
}
},
mounted() {
this.formInline.shopId = parseInt(getShopId())
this.formInline.shopId = parseInt(getBusinessId())
//
this.formInline.activityId = this.form.activityId
this.formInline.signId = this.form.signId

2
src/views/commodity/commodityList/commodityGroup.vue

@ -76,7 +76,7 @@
</div>
<div class="submitBox">
<el-button type="primary" @click="addGroup('ruleForm')"> </el-button>
<el-button type="danger" @click="closeAddGroup"> </el-button>
<el-button @click="closeAddGroup"> </el-button>
</div>
</div>
</div>

1
src/views/commodity/commodityList/index.vue

@ -101,7 +101,6 @@
:visible.sync="commidyVisible"
width="900px"
center
top="10vh"
:close-on-click-modal="false"
>
<CommGroup

77
src/views/commodity/commoditySystem/addCommodity.vue

@ -4,6 +4,14 @@
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<div class="detail_title">基础信息</div>
<el-form-item label="所属店铺:" prop="shopId">
<el-select v-model="form.shopId" placeholder="请选择所属店铺" clearable>
<el-option v-for="(item, index) in shopList" :key="index" :label="item.shopName"
:value="item.shopId" />
</el-select>
</el-form-item>
<el-form-item label="商品名称:" prop="productName">
<el-input v-model="form.productName" maxlength="50" class="form-content-item-input" placeholder="请输入商品名称" show-word-limit />
</el-form-item>
@ -12,7 +20,7 @@
<el-input v-model="form.productBrief" maxlength="50" class="form-content-item-input" placeholder="请输入卖点简介" show-word-limit />
</el-form-item>
<el-form-item label="官方分类:" prop="classifyId">
<el-form-item label="平台商品分类:" prop="classifyId">
<el-cascader v-model="form.classifyId" :options="classifyList" clearable :props="{
checkStrictly: false,
label: 'categoryName',
@ -21,13 +29,31 @@
}" @change="handleChangeCascader" />
</el-form-item>
<el-form-item label="商品分组:" prop="shopGroupId">
<el-form-item label="平台商品分组:" prop="shopGroupId">
<el-select v-model="form.shopGroupId" placeholder="请选择商品分组" clearable>
<el-option v-for="(item, index) in groupList" :key="index" :label="item.groupName"
:value="item.shopGroupId" />
</el-select>
</el-form-item>
<el-form-item label="商家商品分类:" prop="classifyBusinessId">
<el-cascader v-model="form.classifyBusinessId" :options="classifyBusinessList" clearable :props="{
checkStrictly: false,
label: 'categoryName',
value: 'id',
children: 'childs'
}" @change="handleChangePlatformCascader" />
</el-form-item>
<el-form-item label="商家商品分组:" prop="shopGroupBusinessId">
<el-select v-model="form.shopGroupBusinessId" placeholder="请选择商品分组" clearable>
<el-option v-for="(item, index) in groupBusinessList" :key="index" :label="item.groupName"
:value="item.shopGroupBusinessId" />
</el-select>
</el-form-item>
<el-form-item label="品牌:">
<el-select v-model="form.brandId" clearable placeholder="请选择品牌">
<el-option v-for="item in brandList" :key="item.id" :label="item.brandName" :value="item.id" />
@ -313,6 +339,7 @@ import {
import { uploadUrl } from '@/utils/request'
import { getToken } from '@/utils/auth'
import { storehouseGetAll } from '@/api/shopSys'
import { shopListGetAll } from '@/api/shop'
export default {
filters: {
@ -371,11 +398,14 @@ export default {
folderId: 1
},
form: {
shopId: '',
productId: null, //Id
productName: '', //
productBrief: '', //
shopGroupId: '', // id
classifyId: '', // id
shopPlatformGroupId: '', // id
classifyBusinessId: '', // id
supplierId: null, // Id
supplierName: '', //
brandId: null, // ID
@ -456,8 +486,13 @@ export default {
imgList: [],
//
groupList: [],
//
groupBusinessList: [],
//
shopList: [],
//
classifyList: [],
classifyBusinessList: [],
//
storehouseList: [],
//
@ -466,9 +501,12 @@ export default {
dialogVisible: false,
//
rules: {
shopId: [{ required: true, message: '请选择所属店铺', trigger: 'change' }],
productName: [{ required: true, message: '请输入商品名称', trigger: 'blur' }],
shopGroupId: [{ required: true, message: '请选择商品分组', trigger: 'change' }],
classifyId: [{ required: true, message: '请选择官方分类', trigger: 'change' }],
shopGroupId: [{ required: true, message: '请选择商家商品分组', trigger: 'change' }],
classifyId: [{ required: true, message: '请选择商家官方分类', trigger: 'change' }],
shopPlatformGroupId: [{ required: true, message: '请选择平台商品分组', trigger: 'change' }],
classifyBusinessId: [{ required: true, message: '请选择平台官方分类', trigger: 'change' }],
ifLogistics: [{ required: true, message: '请选择是否需要物流', trigger: 'change' }],
shelveState: [{ required: true, message: '请选择是否上架', trigger: 'change' }],
ifOversold: [{ required: true, message: '请选择是否允许超卖', trigger: 'change' }],
@ -506,7 +544,7 @@ export default {
},
},
mounted() {
this.headers.tenant = 'MDAwMA=='
// this.headers.tenant = 'MDAwMA=='
//
this.groups()
//
@ -517,6 +555,8 @@ export default {
this.getCredit()
//
this.getStorehouseList()
//
this.getShopList()
},
computed: {
skuAttrName() {
@ -550,6 +590,9 @@ export default {
handleChangeCascader() {
console.log(this.form.classifyId)
},
handleChangePlatformCascader() {
console.log(this.form.classifyBusinessId)
},
async getBrandList() {
const { data } = await getBrandList()
this.brandList = data
@ -649,11 +692,14 @@ export default {
reset() {
this.form = {
shopId : '',
productId: null, //Id
productName: '', //
productBrief: '', //
shopGroupId: '', // id
classifyId: '', // id
shopGroupBusinessId: '', // id
classifPlatformId: '', // id
supplierId: null, // Id
supplierName: '', //
brandId: null, // ID
@ -839,7 +885,9 @@ export default {
//
this.form.classifyId = Array.isArray(this.form.classifyId) ? this.form.classifyId[this.form.classifyId.length - 1] : this.form.classifyId
this.form.classifyBusinessId = Array.isArray(this.form.classifyBusinessId) ?
this.form.classifyBusinessId[this.form.classifyBusinessId.length - 1] : this.form.classifyBusinessId
if (this.productId) {
this.form.productId = this.productId
const res = await getClassifyUpdate(this.form)
@ -867,14 +915,22 @@ export default {
//
async groups() {
const res = await getGroupSelect({
})
}, {project : "2"})
this.groupList = res.data
const res1 = await getGroupSelect({
}, {project : "0"})
this.groupBusinessList = res1.data
},
//
//
async getStorehouseList() {
const res = await storehouseGetAll({ page: 1, pageSize: 100 })
this.storehouseList = res.data.list
},
//
async getShopList() {
const res = await shopListGetAll()
this.shopList = res.data
},
// --
async details() {
const res = await getClassifyGetById({ productId: this.productId })
@ -885,8 +941,11 @@ export default {
},
async selectList() {
const res = await getClassify()
const res = await getClassify({}, {project : "2"})
this.classifyList = this.filterList(res.data)
const res1 = await getClassify({}, {project : "0"})
this.classifyBusinessList = this.filterList(res1.data)
},
filterList(data) {
data.forEach(i => {

2
src/views/commodity/commoditySystem/index.vue

@ -58,6 +58,7 @@
</template>
</el-table-column>
<el-table-column prop="productName" label="商品名称" width="220" />
<el-table-column prop="shopName" label="店铺名称" width="220" />
<el-table-column prop="section" label="售价区间" show-overflow-tooltip />
<el-table-column prop="memberSection" label="会员价" show-overflow-tooltip />
<el-table-column prop="ifCredit" label="积分兑换" show-overflow-tooltip>
@ -191,7 +192,6 @@
:visible.sync="commidyVisible"
width="74%"
center
top="10vh"
:close-on-click-modal="false"
@before-close="closeModal"
@close="closeModal"

15
src/views/customer/addClustering.vue

@ -371,7 +371,6 @@ export default {
font-weight: 500;
}
.addCrowd {
margin-left: 200px;
.crowdOptions {
.condition {
margin-top: 30px;
@ -386,10 +385,13 @@ export default {
align-items: center;
.leftTit {
width: 100px;
text-align: right;
font-size: 14px;
color: #606260;
font-weight: 700;
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
line-height: 36px;
text-align: left;
padding-right: 12px;
}
.purchase {
@ -440,11 +442,6 @@ export default {
}
}
}
.pending {
padding: 30px;
background: #FFFFFF;
border-radius: 10px;
}
</style>
<style scoped>
.inputWide /deep/ .el-form-item__content {

9
src/views/customer/addOperate.vue

@ -1,9 +1,9 @@
<template>
<el-dialog :close-on-click-modal="false" :title="isAdd ? '新增运营计划' : '修改运营计划'" width="80%" :visible.sync="visible">
<el-dialog :close-on-click-modal="false" :title="isAdd ? '新增运营计划' : '修改运营计划'" width="60%" :visible.sync="visible">
<div>
<div class="addOperate">
<div class="addOperateBox">
<el-form ref="ruleForm" class="formBox" :model="addForm" label-width="150px" :rules="operateRules">
<el-form ref="ruleForm" class="formBox" :model="addForm" label-width="140px" :rules="operateRules">
<el-form-item label="计划名称" prop="operateName" class="inputW">
<el-input v-model="addForm.operateName" placeholder="请输入计划名称" oninput="value=value.replace(/\s+/g, '')" maxlength="20" />
</el-form-item>
@ -465,11 +465,8 @@ export default {
</script>
<style lang="scss" scoped>
.padding {
padding: 30px;
}
@import url("../../styles/elDialog.scss");
.addOperateBox {
margin-left: 200px;
.btnBox {
margin: 50px 0 0 150px;
}

3
src/views/customer/clusteringList/index.vue

@ -65,8 +65,7 @@
:close-on-click-modal="false"
title="人群客户"
:visible.sync="isDataVisible"
width="80%"
top="50px"
width="60%"
class="group-dialog"
>
<div class="tableBox">

7
src/views/liveMenu/liveProduct/index.vue

@ -26,7 +26,7 @@
</el-input>
</el-form-item>
<el-form-item>
<el-button style="margin-left: 20px" type="success" @click="addPro">添加直播商品</el-button>
<el-button style="margin-left: 20px" type="primary" @click="addPro">添加直播商品</el-button>
</el-form-item>
</el-form>
</nav>
@ -350,7 +350,7 @@
<el-button @click="addProShow = false"> </el-button>
<el-button
v-if="proShowState == 1"
type="success"
type="primary"
@click="addProSubmit"
> </el-button>
<el-button
@ -619,10 +619,9 @@ export default {
</script>
<style lang="scss" scpoed>
@import url("../../../styles/elDialog.scss");
.liveRoomPage {
padding: 32px 20px;
background: #FFFFFF;
border-radius: 10px;
nav {
.search {
line-height: 40px;

9
src/views/liveMenu/liveRoom/index.vue

@ -26,7 +26,7 @@
</el-input>
</el-form-item>
<el-form-item>
<el-button style="margin-left: 20px" type="success" @click="add">创建直播间</el-button>
<el-button style="margin-left: 20px" type="primary" @click="add">创建直播间</el-button>
</el-form-item>
</el-form>
</nav>
@ -417,7 +417,7 @@
<el-button @click="addLiveShow = false"> </el-button>
<el-button
v-if="LiveShowState == 1"
type="success"
type="primary"
:disabled="isDisabled"
@click="submitCU"
> </el-button>
@ -505,7 +505,7 @@
<!-- 新增用户 -->
<span slot="footer" class="dialog-footer">
<el-button @click="addProShow = false"> </el-button>
<el-button type="success" @click="addproSubmit"> </el-button>
<el-button type="primary" @click="addproSubmit"> </el-button>
</span>
</el-dialog>
</div>
@ -916,14 +916,13 @@ export default {
</script>
<style lang="scss" scpoed>
@import url("../../../styles/elDialog.scss");
img {
width: 100px;
height: 100px;
}
.liveRoomPage {
padding: 32px 20px;
background: #FFFFFF;
border-radius: 10px;
nav {
.search {
line-height: 40px;

237
src/views/marketing/channelActivity/form.vue

@ -7,162 +7,73 @@
-->
<template>
<div class="form_content">
<el-dialog
:close-on-click-modal="false"
:title="dialogOption.title"
:visible.sync="diaShow"
width="40%"
:before-close="handleClose"
>
<el-form
ref="form"
:model="form"
:rules="formRules"
label-width="120px"
>
<el-form-item
label="活动名称:"
prop="activityName"
>
<el-input
v-model="form.activityName"
show-word-limit
maxlength="15"
:disabled="form.isLook"
clearable
type="text"
placeholder="请输入渠道名称"
/>
<el-dialog :close-on-click-modal="false" :title="dialogOption.title" :visible.sync="diaShow" width="60%" center
:before-close="handleClose">
<el-form ref="form" :model="form" :rules="formRules" label-width="140px">
<el-form-item label="活动名称:" prop="activityName">
<el-input v-model="form.activityName" show-word-limit maxlength="15" :disabled="form.isLook" clearable
type="text" placeholder="请输入渠道名称" />
</el-form-item>
<el-form-item
label="备注:"
prop="remark"
>
<el-input
v-model="form.remark"
maxlength="200"
:disabled="form.isLook"
clearable
type="text"
placeholder="请输入备注"
/>
<el-form-item label="备注:" prop="remark">
<el-input v-model="form.remark" maxlength="200" :disabled="form.isLook" clearable type="text"
placeholder="请输入备注" />
</el-form-item>
<el-form-item
label="活动时间:"
prop="startTime"
>
<el-date-picker
v-model="activityTimeArr"
:disabled="form.isLook"
range-separator="至"
type="datetimerange"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
/>
<el-form-item label="活动时间:" prop="startTime">
<el-date-picker v-model="activityTimeArr" :disabled="form.isLook" range-separator="" type="datetimerange"
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" />
</el-form-item>
<el-form-item
label="活动发放数量:"
prop="publishCount"
>
<el-input-number
v-model="form.publishCount"
:disabled="form.isLook"
:controls="false"
:max="999999999"
:min="1"
/>
<el-form-item label="活动发放数量:" prop="publishCount">
<el-input-number v-model="form.publishCount" :disabled="form.isLook" :controls="false" :max="999999999"
:min="1" />
</el-form-item>
<el-form-item label="发放渠道券" prop="couponList">
<el-button
:disabled="form.isLook"
type="primary"
@click="showCouponSelect"
>请选择
<el-button :disabled="form.isLook" type="primary" @click="showCouponSelect">请选择
</el-button>
</el-form-item>
<el-form-item label=" ">
<el-table
ref="multipleTable"
:data="form.couponList"
border
:header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column
label="优惠券名称"
width="220"
>
<el-table ref="multipleTable" :data="form.couponList" border
:header-cell-style="{ background: '#EEF3FF', color: '#333333' }" tooltip-effect="dark" style="width: 100%">
<el-table-column label="优惠券名称" width="220">
<template slot-scope="scope">{{ scope.row.couponName }}</template>
</el-table-column>
<el-table-column
label="类型"
show-overflow-tooltip
>
<el-table-column label="类型" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.couponType === 1">满减券</span>
<span v-if="scope.row.couponType === 2">折扣券</span>
</template>
</el-table-column>
<el-table-column
label="状态"
show-overflow-tooltip
>
<el-table-column label="状态" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.state === 0">未开始</span>
<span v-if="scope.row.state === 1">进行中</span>
<span v-if="scope.row.state === 2">已结束</span>
</template>
</el-table-column>
<el-table-column
prop="content"
label="内容"
show-overflow-tooltip
/>
<el-table-column
prop="createTime"
label="创建时间"
show-overflow-tooltip
/>
<el-table-column
label="操作"
fixed="right"
>
<el-table-column prop="content" label="内容" show-overflow-tooltip />
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip />
<el-table-column label="操作" fixed="right">
<template v-slot="scope">
<el-button type="danger" :disabled="form.isLook" @click="handleDelSelectCoupon(scope.row)">删除</el-button>
<el-button :disabled="form.isLook" @click="handleDelSelectCoupon(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
<span
slot="footer"
class="dialog-footer"
>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button
:loading="loading"
type="primary"
@click="handleConfirm"
> </el-button>
<el-button :loading="loading" type="primary" @click="handleConfirm"> </el-button>
</span>
</el-dialog>
<SelectChannelCoupons
v-model="showSelect"
:default-selection="form.couponList"
:take-end="form.endTime"
:stock-number="form.publishCount"
@confirm="handleSelectChannelCoups"
/>
<SelectChannelCoupons v-model="showSelect" :default-selection="form.couponList" :take-end="form.endTime"
:stock-number="form.publishCount" @confirm="handleSelectChannelCoups" />
</div>
</template>
<script>
import SelectChannelCoupons from '@/views/marketing/channelActivity/selectChannelCoupons';
import { add, edit, getCouponsByActivityId } from '@/api/channelActivity';
const Form = function() {
const Form = function () {
this.id = null
this.activityName = null
this.remark = null
@ -353,8 +264,94 @@ export default {
lang="scss"
scoped
>
.form_content {
.el-form {
overflow: hidden;
.el-form-item {
label.el-form-item__label {
font-size: 16px !important;
color: red !important;
}
}
.detail_title {
font-size: 16px;
font-weight: 500;
padding-left: 10px;
line-height: 16px;
margin-bottom: 15px;
margin-top: 10px;
position: relative;
&::before {
content: "";
height: 16px;
width: 4px;
background-color: #183ECD;
position: absolute;
left: 0px;
display: block;
font-weight: 500;
}
}
}
.footer {
height: 80px;
line-height: 80px;
font-size: 24px;
position: relative;
border-top: 1px solid #e0e5eb;
.btn_list {
position: absolute;
right: 0;
top: 0;
height: 36px;
span {
padding: 0;
margin: 0;
width: 68px;
height: 36px;
line-height: 36px;
text-align: center;
display: inline-block;
/* font-size: 16px; */
border-radius: 4px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
&:hover {
cursor: pointer;
}
&:nth-child(1) {
background: rgba(255, 255, 255, 1);
order: 1px solid rgba(224, 229, 235, 1);
margin-right: 10px;
border: 1px solid rgba(224, 229, 235, 1);
}
&:nth-child(2) {
background: #183ECD;
color: #fff;
}
}
}
}
.timeInfo {
font-size: 12px;
color: #999999;
}
.el-input {
width: 400px;
}
</style>

128
src/views/marketing/channelActivity/index.vue

@ -7,130 +7,50 @@
-->
<template>
<div class="content">
<el-button
type="primary"
@click="handleEditForm"
>新增
<el-button type="primary" @click="handleEditForm">新增
</el-button>
<el-table
v-loading="loading"
:data="list"
:header-cell-style="tableOptions.headStyle"
class="table"
>
<el-table-column
type="selection"
/>
<el-table-column
prop="id"
label="活动ID"
width="180"
show-overflow-tooltip
/>
<el-table-column
prop="activityName"
label="活动名称"
width="180"
show-overflow-tooltip
/>
<el-table-column
prop="activityUrl"
label="活动链接"
show-overflow-tooltip
>
<el-table v-loading="loading" :data="list" :header-cell-style="tableOptions.headStyle" class="table">
<el-table-column type="selection" />
<el-table-column prop="id" label="活动ID" width="180" show-overflow-tooltip />
<el-table-column prop="activityName" label="活动名称" width="180" show-overflow-tooltip />
<el-table-column prop="activityUrl" label="活动链接" show-overflow-tooltip>
<template v-slot="scope">
<span
v-if="scope.row.activityUrl"
>{{ scope.row.activityUrl }}
<span v-if="scope.row.activityUrl">{{ scope.row.activityUrl }}
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column
prop="beginningAndEndingTime"
label="活动起止时间"
width="180"
:formatter="row=>row.startTime+' - '+row.endTime"
/>
<el-table-column
prop="status"
label="状态"
width="180"
>
<el-table-column prop="beginningAndEndingTime" label="活动起止时间" width="180"
:formatter="row => row.startTime + ' - ' + row.endTime" />
<el-table-column prop="status" label="状态" width="180">
<template v-slot="scope">
<el-tag
v-if="scope.row.state===0"
type="warning"
>未开始
<el-tag v-if="scope.row.state === 0" type="warning">未开始
</el-tag>
<el-tag
v-if="scope.row.state===1"
type="success"
>进行中
<el-tag v-if="scope.row.state === 1" type="success">进行中
</el-tag>
<el-tag
v-if="scope.row.state===2"
type="danger"
>已结束
<el-tag v-if="scope.row.state === 2" type="danger">已结束
</el-tag>
</template>
</el-table-column>
<el-table-column
prop="publishCount"
label="活动发放总数"
width="180"
/>
<el-table-column prop="publishCount" label="活动发放总数" width="180" />
<el-table-column
prop="releaseCount"
label="已发放总数"
width="180"
/>
<el-table-column
prop="address"
label="操作"
width="320"
fixed="right"
>
<el-table-column prop="releaseCount" label="已发放总数" width="180" />
<el-table-column prop="address" label="操作" width="320" fixed="right">
<template v-slot="scope">
<el-button
size="mini"
type="primary"
@click="handleCopeLink(scope.row)"
>复制链接
<el-button size="mini" type="primary" @click="handleCopeLink(scope.row)">复制链接
</el-button>
<el-button
size="mini"
type="warning"
@click="handleEditForm(scope.row,true)"
>详情
<el-button size="mini" type="warning" @click="handleEditForm(scope.row, true)">详情
</el-button>
<el-button
v-if="scope.row.state === 0"
size="mini"
type="warning"
@click="handleEditForm(scope.row)"
>编辑
<el-button v-if="scope.row.state === 0" size="mini" type="warning" @click="handleEditForm(scope.row)">编辑
</el-button>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)"
>删除
<el-button size="mini" @click="handleDelete(scope.row)">删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
layout="total, sizes, prev, pager, next, jumper"
:current-page="queryOptions.page"
:page-size="queryOptions.pageSize"
:page-sizes="tableOptions.pageSizes"
:total="tableOptions.total"
@size-change="(val)=>handlePageChange(val,1)"
@current-change="(val)=>handlePageChange(val,2)"
/>
<el-pagination background layout="total, sizes, prev, pager, next, jumper" :current-page="queryOptions.page"
:page-size="queryOptions.pageSize" :page-sizes="tableOptions.pageSizes" :total="tableOptions.total"
@size-change="(val) => handlePageChange(val, 1)" @current-change="(val) => handlePageChange(val, 2)" />
<ActiveForm v-model="showForm" :item="formItem" @confirm="handleGetTable" />
</div>
@ -208,7 +128,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
}).then(async () => {
//
this.loading = true
await del({ id: item.id })

273
src/views/marketing/channelActivity/selectChannelCoupons.vue

@ -6,184 +6,79 @@
* @LastEditTime: 2022/8/25
-->
<template>
<el-dialog
:close-on-click-modal="false"
title="选择渠道优惠券"
:visible.sync="diaShow"
width="60%"
append-to-body
:before-close="handleClose"
>
<el-dialog :close-on-click-modal="false" title="选择渠道优惠券" :visible.sync="diaShow" width="60%" append-to-body
:before-close="handleClose">
<div class="content">
<div class="content pending">
<div class="formSearch">
<el-form
:inline="true"
:model="formInline"
class="demo-form-inline"
>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="优惠券名称">
<el-input
v-model="formInline.couponName"
maxlength="20"
clearable
placeholder="请输入内容"
@blur="search"
/>
<el-input v-model="formInline.couponName" maxlength="20" clearable placeholder="请输入内容" @blur="search" />
</el-form-item>
<el-form-item label="优惠券类型">
<el-select
v-model="formInline.couponType"
placeholder="请选择优惠券类型"
@change="search"
>
<el-option
label="全部"
:value="null"
/>
<el-option
label="满减券"
value="1"
/>
<el-option
label="折扣券"
value="2"
/>
<el-select v-model="formInline.couponType" placeholder="请选择优惠券类型" @change="search">
<el-option label="全部" :value="null" />
<el-option label="满减券" value="1" />
<el-option label="折扣券" value="2" />
</el-select>
</el-form-item>
<el-form-item label="状态">
<el-select
v-model="formInline.state"
placeholder="请选择优惠券状态"
@change="search"
>
<el-option
label="全部"
:value="null"
/>
<el-option
label="未开始"
value="0"
/>
<el-option
label="进行中"
value="1"
/>
<el-option
label="已结束"
value="2"
/>
<el-select v-model="formInline.state" placeholder="请选择优惠券状态" @change="search">
<el-option label="全部" :value="null" />
<el-option label="未开始" value="0" />
<el-option label="进行中" value="1" />
<el-option label="已结束" value="2" />
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker
v-model="formInline.dates"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
@change="search"
/>
<el-date-picker v-model="formInline.dates" type="datetimerange" range-separator="" start-placeholder="开始日期"
end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" @change="search" />
</el-form-item>
<el-form-item>
<el-button
type="primary"
plain
@click="search"
>查询
<el-button type="primary" plain @click="search">查询
</el-button>
<el-button
type="primary"
plain
@click="clear"
>重置
</el-button>
<el-button
type="primary"
plain
@click="addActivity"
>新增
<el-button type="primary" plain @click="clear">重置
</el-button>
<!-- <el-button type="primary" plain @click="addActivity">新增
</el-button> -->
</el-form-item>
</el-form>
</div>
<!-- 表格 -->
<div class="tableBox">
<el-table
ref="multipleTable"
:data="tableData"
border
:header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
tooltip-effect="dark"
style="width: 100%"
:row-key="row=>row.shopCouponId"
@selection-change="handleTableSelection"
>
<el-table-column
type="selection"
reserve-selection
/>
<el-table-column
label="优惠券名称"
width="220"
>
<el-table ref="multipleTable" :data="tableData" border
:header-cell-style="{ background: '#EEF3FF', color: '#333333' }" tooltip-effect="dark" style="width: 100%"
:row-key="row => row.shopCouponId" @selection-change="handleTableSelection">
<el-table-column type="selection" reserve-selection />
<el-table-column label="优惠券名称" width="220">
<template slot-scope="scope">{{ scope.row.couponName }}</template>
</el-table-column>
<el-table-column
label="类型"
show-overflow-tooltip
>
<el-table-column label="类型" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.couponType === 1">满减券</span>
<span v-if="scope.row.couponType === 2">折扣券</span>
</template>
</el-table-column>
<el-table-column
label="状态"
show-overflow-tooltip
>
<el-table-column label="状态" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.state === 0">未开始</span>
<span v-if="scope.row.state === 1">进行中</span>
<span v-if="scope.row.state === 2">已结束</span>
</template>
</el-table-column>
<el-table-column
prop="content"
label="内容"
show-overflow-tooltip
/>
<el-table-column
prop="createTime"
label="创建时间"
show-overflow-tooltip
/>
<el-table-column prop="content" label="内容" show-overflow-tooltip />
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip />
</el-table>
<div class="fenye">
<el-pagination
:current-page="formInline.page"
:page-sizes="[10, 20, 50, 100]"
:page-size="10"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<el-pagination :current-page="formInline.page" :page-sizes="[10, 20, 50, 100]" :page-size="10"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
</div>
</div>
</div>
<span
slot="footer"
class="dialog-footer"
>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button
type="primary"
@click="handleConfirm"
> </el-button>
<el-button type="primary" @click="handleConfirm"> </el-button>
</span>
</el-dialog>
</template>
@ -387,10 +282,99 @@ export default {
//@import url(); css
@import url("../../../styles/elDialog.scss");
.pending {
padding: 30px;
background: #FFFFFF;
border-radius: 10px;
.content {
overflow: hidden;
.el-form-item {
label.el-form-item__label {
font-size: 16px !important;
color: red !important;
}
}
.detail_title {
font-size: 16px;
font-weight: 500;
padding-left: 10px;
line-height: 16px;
margin-bottom: 15px;
margin-top: 10px;
position: relative;
&::before {
content: "";
height: 16px;
width: 4px;
background-color: #183ECD;
position: absolute;
left: 0px;
display: block;
font-weight: 500;
}
}
::v-deep .el-form-item__label {
vertical-align: middle;
float: left;
padding: 0 12px 0 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
line-height: 36px;
text-align: left;
}
}
.footer {
height: 80px;
line-height: 80px;
font-size: 24px;
position: relative;
border-top: 1px solid #e0e5eb;
.btn_list {
position: absolute;
right: 0;
top: 0;
height: 36px;
span {
padding: 0;
margin: 0;
width: 68px;
height: 36px;
line-height: 36px;
text-align: center;
display: inline-block;
/* font-size: 16px; */
border-radius: 4px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
&:hover {
cursor: pointer;
}
&:nth-child(1) {
background: rgba(255, 255, 255, 1);
order: 1px solid rgba(224, 229, 235, 1);
margin-right: 10px;
border: 1px solid rgba(224, 229, 235, 1);
}
&:nth-child(2) {
background: #183ECD;
color: #fff;
}
}
}
}
.fenye {
@ -427,8 +411,3 @@ export default {
}
}
</style>
<style scoped>
.btnList /deep/ .delCls {
margin-left: 10px;
}
</style>

6
src/views/marketing/channelCoupons/form.vue

@ -5,7 +5,7 @@
<product-select ref="productSelect" />
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="doCancel">取消</el-button>
<el-button @click="doCancel">取消</el-button>
<el-button type="primary" @click="doSubmit">确认</el-button>
</div>
</el-dialog>
@ -118,3 +118,7 @@ export default {
}
}
</script>
<style lang='scss' scoped>
//@import url(); css
@import url("../../../styles/elDialog.scss");
</style>

8
src/views/marketing/channelManage/add.vue

@ -683,14 +683,6 @@ export default {
.addCoupon {
background: #FFFFFF;
.dialog-footer {
display: flex;
justify-content: center;
.el-button {
margin: 0px 16px;
}
}
.formBox {
.flexBox {
display: flex;

1
src/views/marketing/channelManage/index.vue

@ -222,7 +222,6 @@
:visible.sync="activityVisible"
width="900px"
center
top="10vh"
:close-on-click-modal="false"
@close="closeModal"
>

6
src/views/marketing/compose/add.vue

@ -152,7 +152,7 @@
type="primary"
@click="composeAdd('ruleForm')"
> </el-button>
<el-button type="danger" @click="goToList"> </el-button>
<el-button @click="goToList"> </el-button>
</span>
<!-- 新建分组弹框 -->
<el-dialog
@ -526,10 +526,6 @@ export default {
@import url("../../../styles/elDialog.scss");
.addGroupBuy {
background: #ffffff;
.dialog-footer {
display: flex;
justify-content: space-around;
}
.formBox {
.flexBox {
display: flex;

5
src/views/marketing/compose/index.vue

@ -81,7 +81,6 @@
:visible.sync="activityVisible"
width="1000px"
center
top="10vh"
:close-on-click-modal="false"
@close="closeModal"
>
@ -98,7 +97,7 @@
<script>
import ActivityCompose from '@/views/marketing/compose/add.vue'
import {
getShopId
getBusinessId
} from '@/utils/auth'
import { getComposeList, composeDelete, composeStart } from '@/api/marketing'
import activityMixin from '@/views/marketing/mixin/index.js'
@ -120,7 +119,7 @@ export default {
}
},
mounted() {
this.formInline.shopId = parseInt(getShopId())
this.formInline.shopId = parseInt(getBusinessId())
this.getAll(this.formInline)
},
methods: {

7
src/views/marketing/coupon/add.vue

@ -469,13 +469,6 @@ export default {
@import url("../../../styles/elDialog.scss");
.addCoupon {
background: #FFFFFF;
.dialog-footer {
display: flex;
justify-content: center;
.el-button {
margin: 0px 16px;
}
}
.formBox {
.flexBox {
display: flex;

1
src/views/marketing/coupon/index.vue

@ -100,7 +100,6 @@
:visible.sync="activityVisible"
width="900px"
center
top="10vh"
:close-on-click-modal="false"
@close="closeModal"
>

10
src/views/marketing/discount/add.vue

@ -54,7 +54,7 @@
<span slot="footer" class="dialog-footer">
<el-button v-show="!visitDetail" type="primary" @click="addSeckillFn('ruleForm')"> </el-button>
<el-button v-if="visitDetail" type="primary" @click="goToDiscount"> </el-button>
<el-button v-else type="danger" @click="goToDiscount"> </el-button>
<el-button v-else @click="goToDiscount"> </el-button>
</span>
<!-- 新建分组弹框 -->
<el-dialog
@ -410,13 +410,7 @@ export default {
@import url("../../../styles/elDialog.scss");
.addGroupBuy {
background: #FFFFFF;
.dialog-footer {
display: flex;
justify-content: center;
.el-button {
margin: 0px 16px;
}
}
.formBox {
margin-top: 20px;
.flexBox {

1
src/views/marketing/discount/index.vue

@ -78,7 +78,6 @@
:visible.sync="activityVisible"
width="700px"
center
top="10vh"
:close-on-click-modal="false"
@close="colseModal"
>

9
src/views/marketing/group/add.vue

@ -55,7 +55,7 @@
<span slot="footer" class="dialog-footer">
<el-button v-show="!visitDetail" type="primary" @click="addGroupBuyFn('ruleForm')"> </el-button>
<el-button v-if="visitDetail" type="primary" @click="goToGroupBuy"> </el-button>
<el-button v-else type="danger" @click="goToGroupBuy"> </el-button>
<el-button v-else @click="goToGroupBuy"> </el-button>
</span>
<!-- 新建分组弹框 -->
<el-dialog
@ -397,13 +397,6 @@ export default {
@import url("../../../styles/elDialog.scss");
.addGroupBuy {
background: #FFFFFF;
.dialog-footer {
display: flex;
justify-content: center;
.el-button {
margin: 0px 16px;
}
}
.formBox {
margin-top: 20px;
.flexBox {

1
src/views/marketing/group/index.vue

@ -78,7 +78,6 @@
:visible.sync="activityVisible"
width="700px"
center
top="10vh"
:close-on-click-modal="false"
@close="colseModal"
>

7
src/views/marketing/price/add.vue

@ -141,7 +141,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="priceAdd('ruleForm')"> </el-button>
<el-button type="danger" @click="goToList"> </el-button>
<el-button @click="goToList"> </el-button>
</span>
<!-- 新建分组弹框 -->
<el-dialog
@ -478,10 +478,7 @@ export default {
@import url("../../../styles/elDialog.scss");
.addGroupBuy {
background: #ffffff;
.dialog-footer {
display: flex;
justify-content: space-around;
}
.formBox {
.flexBox {
display: flex;

5
src/views/marketing/price/index.vue

@ -83,7 +83,6 @@
:visible.sync="activityVisible"
width="1000px"
center
top="10vh"
:close-on-click-modal="false"
>
<ActivityPrice
@ -98,7 +97,7 @@
<script>
import ActivityPrice from '@/views/marketing/price/add.vue'
import {
getShopId
getBusinessId
} from '@/utils/auth'
import { getPriceList, priceDelete, priceStart } from '@/api/marketing'
import activityMixin from '@/views/marketing/mixin/index.js'
@ -121,7 +120,7 @@ export default {
}
},
mounted() {
this.formInline.shopId = parseInt(getShopId())
this.formInline.shopId = parseInt(getBusinessId())
this.getAll(this.formInline)
},
methods: {

13
src/views/marketing/scene/add.vue

@ -2,7 +2,7 @@
<div class="addCoupon">
<!-- 新增用户 -->
<div class="addCouponBox">
<el-form ref="ruleForm" class="formBox" :model="addForm" label-width="150px" :rules="couponRules">
<el-form ref="ruleForm" class="formBox" :model="addForm" label-width="120px" :rules="couponRules">
<el-form-item label="营销类型">
<el-radio v-model="addForm.sceneType" :label="1">节日营销</el-radio>
<el-radio v-model="addForm.sceneType" :label="2">会员日营销</el-radio>
@ -169,7 +169,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addCouponFn('ruleForm')"> </el-button>
<el-button type="danger" @click="goToScene"> </el-button>
<el-button @click="goToScene"> </el-button>
</span>
<!-- 新建分组弹框 -->
<el-dialog
@ -243,7 +243,7 @@
<script>
import {
getShopId
getBusinessId
} from '@/utils/auth'
import { sceneUpate, sceneAdd, getMemberLevels, getCoupon, getSceneDetail } from '@/api/marketing'
@ -319,7 +319,7 @@ export default {
}
},
mounted() {
this.addForm.shopId = parseInt(getShopId())
this.addForm.shopId = parseInt(getBusinessId())
if (this.sceneId) {
this.getCouponInfo()
} else {
@ -585,10 +585,7 @@ export default {
@import url("../../../styles/elDialog.scss");
.addCoupon {
background: #FFFFFF;
.dialog-footer {
display: flex;
justify-content: space-around;
}
.formBox {
margin-top: 20px;
.el-input{

5
src/views/marketing/scene/index.vue

@ -69,7 +69,6 @@
:visible.sync="activityVisible"
width="1100px"
center
top="10vh"
:close-on-click-modal="false"
>
<ActiviyScene
@ -83,7 +82,7 @@
<script>
import ActiviyScene from '@/views/marketing/scene/add.vue'
import {
getShopId
getBusinessId
} from '@/utils/auth'
import { getSceneInfo, sceneDelete, sceneStart, sceneStop } from '@/api/marketing'
@ -106,7 +105,7 @@ export default {
}
},
mounted() {
this.shopId = parseInt(getShopId())
this.shopId = parseInt(getBusinessId())
this.getAll(this.formInline)
},
methods: {

13
src/views/marketing/spike/add.vue

@ -54,7 +54,7 @@
<span slot="footer" class="dialog-footer">
<el-button v-show="!visitDetail" type="primary" @click="addSeckillFn('ruleForm')"> </el-button>
<!-- <el-button v-if="visitDetail" type="primary" @click="goToSpike"> </el-button>-->
<el-button type="danger" @click="goToSpike"> </el-button>
<el-button @click="goToSpike"> </el-button>
</span>
<!-- 新建分组弹框 -->
<el-dialog
@ -408,15 +408,8 @@ export default {
//@import url(); css
@import url("../../../styles/elDialog.scss");
.addGroupBuy {
margin-top: 20px;
background: #FFFFFF;
.dialog-footer {
display: flex;
justify-content: center;
.el-button {
margin: 0px 16px;
}
}
padding: 0px;
.formBox {
margin-top: 20px;
.flexBox {

1
src/views/marketing/spike/index.vue

@ -78,7 +78,6 @@
:visible.sync="activityVisible"
width="700px"
center
top="10vh"
:close-on-click-modal="false"
@close="colseModal"
>

427
src/views/order/aftersale/afterDetails.vue

@ -1,125 +1,125 @@
<template>
<el-dialog :close-on-click-modal="false" title="详情" width="80%" :visible.sync="visible">
<div v-loading="loading" class="order_details">
<!-- <el-button plain @click="close">关闭</el-button> -->
<!-- 关闭 -->
<!-- <el-button icon="el-icon-close" class="close" @click="close" />-->
<div class="cotent">
<div class="left_part">
<div class="order_info">
<h2>售后信息</h2>
<ul>
<li>
<p>
<span>售后单号:</span>
<span>{{ order.afterFormid }}</span>
</p>
<p>
<span>订单ID:</span>
<span>{{ order.orderId }}</span>
</p>
</li>
<li>
<p>
<span>订单状态:</span>
<span v-if="order.state === 1">待付款</span>
<div class="baseinfo_row">
<div class="baseinfo_col">
<div class="item_title">售后信息</div>
<ul>
<li>
<p>
<span>售后单号:</span>
<span>{{ order.afterFormid }}</span>
</p>
</li>
<li>
<p>
<span>订单状态:</span>
<span v-if="order.state === 1">待付款</span>
<span v-if="order.state === 2">待发货</span>
<span v-if="order.state === 3">待收货</span>
<span v-if="order.state === 4">已完成</span>
<span v-if="order.state === 5">已取消</span>
</p>
<p>
<span>售后类型:</span>
<span v-if="order.afterType === 1">仅退款</span>
<span v-if="order.afterType === 2">退货退款</span>
</p>
</li>
<li>
<p>
<span>退款金额:</span>
<span>{{ order.price }}</span>
</p>
<p>
<span>买家账户:</span>
<span>{{ order.customerName }}</span>
</p>
</li>
<li>
<p>
<span>申请时间:</span>
<span>{{ order.createTime }}</span>
</p>
<p>
<span>最近处理时间:</span>
<span>{{ order.updateTime }}</span>
</p>
</li>
<li>
</p>
</li>
<li>
<p>
<span>退款金额:</span>
<span>{{ order.price }}</span>
</p>
</li>
<li>
<p>
<span>申请时间:</span>
<span>{{ order.createTime }}</span>
</p>
</li>
<li>
<p>
<span>备注:</span>
<span>{{ order.remark }}</span>
</li>
</ul>
</div>
<div class="goods_info">
<h2>商品信息</h2>
<div
v-for="(item, index) in order.products"
:key="index"
class="goods_list"
>
<!-- <div class="good_price">
<ul>
<li>
<p>商品总价: ¥{{ item.total }}</p>
<p>支付金额: ¥{{ order.price }}</p>
</li>
<li>
<p>物流费用: {{ order.logisticsPrice }}</p>
</li>
</ul>
</div> -->
<div class="good_details">
<ul>
<li>
<img :src="item.image">
<div class="details">
<p>{{ item.productName }}</p>
<div class="skuDetails">
<p
v-for="(detailsItem, detailsindex) of item.skuDetails"
:key="detailsindex"
>
{{ detailsItem.skuValue }}
</p>
</div>
<p>SKU: {{ item.skuId }}</p>
</p>
</li>
</ul>
</div>
<div class="baseinfo_col">
<div class="item_title" style="visibility:hidden">订单信息</div>
<ul>
<li>
<p>
<span>订单ID:</span>
<span>{{ order.orderId }}</span>
</p>
</li>
<li>
<p>
<span>售后类型:</span>
<span v-if="order.afterType === 1">仅退款</span>
<span v-if="order.afterType === 2">退货退款</span>
</p>
</li>
<li>
<p>
<span>买家账户:</span>
<span>{{ order.customerName }}</span>
</p>
</li>
<li>
<p>
<span>处理时间:</span>
<span>{{ order.updateTime }}</span>
</p>
</li>
</ul>
</div>
</div>
<div class="baseinfo_row">
<div class="baseinfo_col">
<div class="item_title">商品信息</div>
<el-table :data='order.products' style="width: 100%" class="product_table">
<el-table-column label="商品" width="400">
<template slot-scope="scope">
<div class="product_info">
<img :src="scope.row.image" class="product_img">
<div class="product_detail">
<div class="product_name">{{ scope.row.productName }}</div>
<div class="product_desc">
<p class="skuDetails">
<span v-for="(detailsItem, detailsindex) of scope.row.skuDetails" :key="detailsindex"
class="detail_span">
{{ detailsItem.skuName }}: {{ detailsItem.skuValue }}
</span>
</p>
<p>SKU: {{ scope.row.skuId }}</p>
</div>
</li>
<li class="cen">
<p>¥{{ `${item.productPrice} * ${item.number}` }}</p>
</li>
<li>
<p v-if="order.afterType === 1">仅退款</p>
<p v-if="order.afterType === 2">退货退款</p>
</li>
<li>
<p class="fontWeight">¥{{ item.total }}</p>
</li>
</ul>
<div class="totalRefund">
运费金额
<span class="fontWeight">¥{{ order.logisticsPrice }}</span>
</div>
<div class="totalRefund">
退款总金额
<span class="fontWeight">¥{{ order.price }}</span>
</div>
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="productPrice" label="价格">
</el-table-column>
<el-table-column prop="number" label="数量">
</el-table-column>
<el-table-column prop="total" label="小计">
</el-table-column>
</el-table>
<div class="product_total">
<div class="product_row"><span>商品总价:</span> <span>{{ order.orderPrice }}</span></div>
<div class="product_row"><span>运费金额:</span> <span>{{ order.logisticsPrice }}</span></div>
<div class="product_price"><span>退款总金额:</span> <span>{{ order.price }}</span></div>
</div>
<div class="logistics_info">
<h2>售后记录</h2>
<div class="after_sales_record">
</div>
</div>
<div class="baseinfo_row">
<div class="baseinfo_col">
<div class="item_title">协商历史</div>
<div class="after_sales_record">
<div
v-for="(item, index) in order.afterHistory"
:key="index"
@ -147,15 +147,13 @@
</div>
</div>
</div>
<div v-if="order.afterType !== 1" class="logistics_content">
<p class="logistics_title">
<span>物流公司: {{ order.express }}</span>
<span>运单号: {{ order.deliverFormid }}</span>
</p>
</div>
</div>
</div>
<div class="right_part">
</div>
<div class="baseinfo_row">
<div class="baseinfo_col">
<div class="item_title">售后状态</div>
<div v-if="showOne || showTwo" class="preO">
<div class="topTips">
<div class="leftImg">
@ -168,6 +166,7 @@
</div>
<div class="buyerR">买家说明:{{ order.explain }}</div>
</div>
<div v-if="showThree" class="preO">
<div class="topTips">
<div class="leftImg">
@ -181,19 +180,22 @@
<div class="buyerR">物流公司:{{ order.express }}</div>
<div class="buyerR">物流单号:{{ order.deliverFormid }}</div>
</div>
<div class="btnList">
<div v-if="showOne" class="lists">
<div class="btns" @click="agree(5)">同意退款申请</div>
<div class="btns" @click="agree(2)">拒绝退款申请</div>
</div>
<div v-if="showTwo" class="lists">
<div class="btns" @click="agree(1)">同意申请</div>
<div class="btns" @click="agree(2)">拒绝申请</div>
</div>
<div v-if="showThree" class="lists">
<div class="btns" @click="agree(3)">确认收货且退款</div>
<div class="btns" @click="agree(4)">货物有损拒绝退款</div>
</div>
</div>
</div>
<div class="baseinfo_row">
<div class="btnList">
<div v-if="showOne" class="lists">
<div class="btns" @click="agree(5)">同意退款申请</div>
<div class="btns" @click="agree(2)">拒绝退款申请</div>
</div>
<div v-if="showTwo" class="lists">
<div class="btns" @click="agree(1)">同意申请</div>
<div class="btns" @click="agree(2)">拒绝申请</div>
</div>
<div v-if="showThree" class="lists">
<div class="btns" @click="agree(3)">确认收货且退款</div>
<div class="btns" @click="agree(4)">货物有损拒绝退款</div>
</div>
</div>
</div>
@ -572,7 +574,143 @@ ul {
margin: 0;
padding: 0;
}
.item_title {
font-size: 16px;
font-weight: 500;
padding-left: 10px;
line-height: 16px;
margin-bottom: 15px;
margin-top: 10px;
position: relative;
color: #121F31;
&::before {
content: "";
height: 16px;
width: 4px;
background-color: #183ECD;
position: absolute;
left: 0px;
display: block;
font-weight: 500;
}
}
.order_details {
.baseinfo_row {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
justify-content: center;
align-items: flex-start;
.baseinfo_col {
flex: 1;
ul {
li {
p {
margin-top: 8px;
margin-bottom: 8px;
span {
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
}
}
}
}
}
}
.product_table {
.el-table__header {
background: #F2F5FA;
border: 1px solid #E3EAF4;
opacity: 0.72;
}
.cell {
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
}
.product_info {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
justify-content: center;
align-items: center;
padding: 15px;
.product_img {
width: 74px;
height: 74px;
background: #DEE4EC;
margin-right: 15px;
}
.product_detail {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
align-content: flex-start;
justify-content: center;
align-items: flex-start;
.product_name {
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
}
.product_desc {
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #828C9A;
}
}
}
}
.product_total {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
align-content: flex-end;
align-items: flex-end;
justify-content: center;
.product_row {
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
margin-top: 3px;
margin-bottom: 2px;
}
.product_price {
font-family: PingFang SC;
font-weight: bold;
color: #404F64;
line-height: 24px;
margin-top: 3px;
margin-bottom: 10px;
}
}
.close {
position: absolute;
right: 20px;
@ -767,19 +905,36 @@ ul {
font-size: 20px;
}
.btnList {
display: flex;
justify-content: center;
margin-top: 30px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: flex-end;
margin-top: 30px;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
align-items: center;
.lists {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
justify-content: center;
align-items: center;
.btns {
width: 200px;
width: 180px;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
background: #3a68f2;
margin-bottom: 20px;
margin-left: 20px;
border-radius: 5px;
cursor: pointer;
}

584
src/views/order/pending/pendDetails.vue

@ -1,131 +1,175 @@
<template>
<el-dialog :close-on-click-modal="false" title="详情" width="80%" :visible.sync="visible">
<div v-loading="loading" class="order_details">
<!-- <el-button icon="el-icon-close" class="close" @click="close" />-->
<div class="cotent">
<div class="left_part">
<div class="order_info">
<h2>订单信息</h2>
<ul>
<li>
<p>
<span>订单ID:</span>
<span>{{ order.orderId }}</span>
</p>
<p>
<span>支付单号:</span>
<span>{{ order.transactionId }}</span>
</p>
</li>
<li>
<p>
<span>订单状态:</span>
<span v-if="order.state === 1">待付款</span>
<span v-if="order.state === 2">待发货</span>
<span v-if="order.state === 3">待收货</span>
<span v-if="order.state === 4">已完成</span>
<span v-if="order.state === 5">已取消</span>
</p>
<p>
<span>售后状态:</span>
<span>{{ order.afterStateName }}</span>
</p>
</li>
<li>
<p>
<span>支付方式:</span>
<span v-if="order.paymentMode === 1">微信</span>
<span v-if="order.paymentMode === 2">支付宝</span>
</p>
<p>
<span>物流方案:</span>
<span>{{ order.logisticsName }}</span>
</p>
</li>
<li>
<p>
<span>创建时间:</span>
<span>{{ order.createTime }}</span>
</p>
<p>
<span>支付时间:</span>
<span>{{ order.paymentTime }}</span>
</p>
</li>
<li>
<p>备注:{{ order.remark }}</p>
</li>
</ul>
</div>
<div class="goods_info">
<h2>商品信息</h2>
<div
v-for="(item, index) in order.products"
:key="index"
class="goods_list"
>
<div class="good_price">
<ul>
<li>
<p>商品总价: ¥{{ order.orderPrice }}</p>
<p>支付金额: ¥{{ order.price }}</p>
</li>
<li>
<p>物流费用: {{ order.logisticsPrice }}</p>
</li>
</ul>
</div>
<div class="good_details">
<ul>
<li>
<img :src="item.image">
<div class="details">
<p>{{ item.productName }}</p>
<div class="baseinfo_row">
<div class="baseinfo_col">
<div class="item_title">订单信息</div>
<ul>
<li>
<p>
<span>订单ID:</span>
<span>{{ order.orderId }}</span>
</p>
</li>
<li>
<p>
<span>支付单号:</span>
<span>{{ order.transactionId }}</span>
</p>
</li>
<li>
<p>
<span>支付时间:</span>
<span>{{ order.paymentTime }}</span>
</p>
</li>
<li>
<p>
<span>创建时间:</span>
<span>{{ order.createTime }}</span>
</p>
</li>
</ul>
</div>
<div class="baseinfo_col">
<div class="item_title" style="visibility:hidden">订单信息</div>
<ul>
<li>
<p>
<span>订单状态:</span>
<span v-if="order.state === 1">待付款</span>
<span v-if="order.state === 2">待发货</span>
<span v-if="order.state === 3">待收货</span>
<span v-if="order.state === 4">已完成</span>
<span v-if="order.state === 5">已取消</span>
</p>
</li>
<li>
<p>
<span>物流方案:</span>
<span>{{ order.logisticsName }}</span>
</p>
</li>
<li>
<p>
<span>售后状态:</span>
<span>{{ order.afterStateName }}</span>
</p>
</li>
</ul>
</div>
<div class="baseinfo_col">
<div class="item_title">下单信息</div>
<ul>
<li>
<p>
<span>下单账户:</span>
<span>{{ order.customerName }}</span>
</p>
</li>
<li>
<p>
<span>历史订单总数:</span>
<span>{{ order.total }}</span>
</p>
</li>
<li>
<p>
<span>下单备注:</span>
<span>{{ order.remark }}</span>
</p>
</li>
</ul>
</div>
<div class="baseinfo_col">
<div class="item_title">收货信息</div>
<ul>
<li>
<p>
<span>姓名:</span>
<span>{{ order.receiveName }}</span>
</p>
</li>
<li>
<p>
<span>手机号:</span>
<span>{{ order.receivePhone }}</span>
</p>
</li>
<li>
<p>
<span>地址:</span>
<span>{{ order.receiveAdress }} {{ order.address }}</span>
</p>
</li>
</ul>
</div>
</div>
<div class="baseinfo_row">
<div class="baseinfo_col">
<div class="item_title">商品信息</div>
<el-table :data='order.products' style="width: 100%" class="product_table">
<el-table-column label="商品" width="400">
<template slot-scope="scope">
<div class="product_info">
<img :src="scope.row.image" class="product_img">
<div class="product_detail">
<div class="product_name">{{ scope.row.productName }}</div>
<div class="product_desc">
<p class="skuDetails">
<span
v-for="(detailsItem, detailsindex) of item.skuDetails"
:key="detailsindex"
class="detail_span"
>
<span v-for="(detailsItem, detailsindex) of scope.row.skuDetails" :key="detailsindex"
class="detail_span">
{{ detailsItem.skuName }}: {{ detailsItem.skuValue }}
</span>
</p>
<p>SKU: {{ item.skuId }}</p>
<p>SKU: {{ scope.row.skuId }}</p>
</div>
</li>
<li class="cen">
¥{{ `${item.productPrice} * ${item.number}` }}
</li>
<li>
{{ order.orderPrice }}
</li>
</ul>
</div>
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="productPrice" label="价格">
</el-table-column>
<el-table-column prop="number" label="数量">
</el-table-column>
<el-table-column prop="total" label="小计">
</el-table-column>
</el-table>
<div class="product_total">
<div class="product_row"><span>商品总价:</span> <span>{{ order.orderPrice }}</span></div>
<div class="product_row"><span>运费金额:</span> <span>{{ order.logisticsPrice }}</span></div>
<div class="product_price"><span>总金额:</span> <span>{{ order.price }}</span></div>
</div>
<!-- 未发货时物流信息显示去发货按钮 -->
<!-- <div class="logistics_info" v-show="order.logisticsName && order.logisticsNum"> -->
<div class="logistics_info">
<h2>物流信息</h2>
<!-- <p
v-if="!order.logisticsNum"
class="send_good"
@click="send"
>
去发货
</p>-->
<el-button
v-if="!order.logisticsNum && order.state == 2"
type="primary"
class="send_good"
@click="send"
>去发货</el-button>
<div v-else class="logistics_content">
<p class="logistics_title">
<span>物流公司: {{ order.express }}</span>
<span>运单号: {{ order.deliverFormid }}</span>
</div>
</div>
<div class="baseinfo_row">
<div class="baseinfo_col">
<div class="item_title">物流信息</div>
<el-button v-if="!order.logisticsNum && order.state == 2" type="primary" class="send_good"
@click="send">去发货</el-button>
<ul v-else>
<li v-if="order.express">
<p>
<span>物流公司:</span>
<span>{{ order.express }}</span>
</p>
<!-- <p
</li>
<li v-if="order.deliverFormid">
<p>
<span>运单号:</span>
<span>{{ order.deliverFormid }}</span>
</p>
</li>
</ul>
</div>
<div class="baseinfo_col">
<div class="item_title" style="visibility:hidden">物流信息</div>
<!-- <p
v-for="(item, index) in tracesList"
:key="index"
class="logistics_item"
@ -133,55 +177,22 @@
<span>{{ item.acceptTime }}</span>
<span>{{ acceptStation }}</span>
</p> -->
</div>
</div>
</div>
<div class="right_part">
<div class="pay_order_info">
<h2>下单人信息</h2>
<p>下单账户: {{ order.customerName }}</p>
<p>历史订单总数: {{ order.total }}</p>
<p>下单备注: {{ order.remark }}</p>
</div>
<div class="take_goods_info">
<h2>收货信息</h2>
<p>姓名: {{ order.receiveName }}</p>
<p>手机号: {{ order.receivePhone }}</p>
<p>地址: {{ order.receiveAdress }} {{ order.address }}</p>
</div>
</div>
</div>
<!-- 发货 -->
<el-dialog
:visible.sync="isVisible"
title="发货"
append-to-body
:close-on-click-modal="false"
>
<el-form
ref="sendGoodsForm"
:model="form"
:rules="rules"
label-width="80px"
>
<el-dialog :visible.sync="isVisible" title="发货" append-to-body :close-on-click-modal="false">
<el-form ref="sendGoodsForm" :model="form" :rules="rules" label-width="80px">
<el-form-item label="快递公司" prop="express">
<el-select v-model="form.express" filterable>
<el-option
v-for="(item, index) in companyList"
:key="index"
:label="item.dictName"
:value="item.dictId"
/>
<el-option v-for="(item, index) in companyList" :key="index" :label="item.dictName" :value="item.dictId" />
</el-select>
</el-form-item>
<el-form-item label="快递单号" prop="deliverFormid">
<el-input
v-model="form.deliverFormid"
maxlength="20"
oninput="value = value.replace(/[^\a-\z\A-\Z0-9]/g,'')"
/>
<el-input v-model="form.deliverFormid" maxlength="20"
oninput="value = value.replace(/[^\a-\z\A-\Z0-9]/g,'')" />
</el-form-item>
<!--
<!--
<el-form-item label="快递公司编号" prop="shipperCode" v-if="false">
<el-input v-model="form.shipperCode" />
</el-form-item>-->
@ -291,162 +302,145 @@ export default {
<style lang="scss" scoped>
@import url("../../../styles/elDialog.scss");
ul {
list-style: none;
margin: 0;
padding: 0;
}
.order_details {
h3 {
// margin-left: 20px;
margin: 20px 0 20px 20px;
font-weight: 700;
}
.close {
// float: right;
.item_title {
font-size: 16px;
font-weight: 500;
padding-left: 10px;
line-height: 16px;
margin-bottom: 15px;
margin-top: 10px;
position: relative;
color: #121F31;
&::before {
content: "";
height: 16px;
width: 4px;
background-color: #183ECD;
position: absolute;
right: 20px;
&:hover {
cursor: pointer;
}
left: 0px;
display: block;
font-weight: 500;
}
}
.cotent {
margin: 20px;
overflow: hidden;
font-size: 14px;
.goods_info,
.order_info,
.logistics_info,
.pay_order_info,
.take_goods_info {
background: #fff;
margin-bottom: 10px;
padding: 10px 20px;
}
.pay_order_info,
.take_goods_info{
p{
line-height: 30px;
}
}
h2 {
margin: 0;
font-weight: 400;
height: 40px;
line-height: 40px;
font-size: 18px;
text-align: -10px;
}
.left_part {
float: left;
width: calc(70% - 10px);
margin-right: 10px;
.order_info {
box-sizing: border-box;
ul {
padding: 10px 30px;
li {
overflow: hidden;
p {
width: 50%;
float: left;
.order_details {
.baseinfo_row {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
justify-content: center;
align-items: flex-start;
.baseinfo_col {
flex: 1;
ul {
li {
p {
margin-top: 8px;
margin-bottom: 8px;
span {
font-size: 14px;
line-height: 30px;
span {
&:nth-child(2) {
margin-left: 10px;
}
}
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
}
}
}
.remarks {
margin-left: 30px !important;
}
}
.goods_info {
.goods_list {
padding: 15px;
.good_price {
ul {
li {
&:nth-child(1) {
p {
width: 50%;
float: left;
}
}
p {
line-height: 30px;
}
}
}
border-bottom: 1px gray solid;
}
.good_details {
ul {
display: flex;
margin-top:20px;
li {
flex: 3;
display: flex;
justify-content: space-around;
align-items: center;
.details {
margin: 0 30px;
width: 180px;
line-height: 20px;
.skuDetails {
margin-top: 8px;
margin-bottom: 8px;
margin-right: 10px;
line-height: 1;
color: #9e9e9e;
.detail_span {
margin-right: 8px;
}
}
}
img {
width: 50px;
height: 50px;
}
}
}
}
}
}
}
.product_table {
.el-table__header {
background: #F2F5FA;
border: 1px solid #E3EAF4;
opacity: 0.72;
}
.cell {
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
}
.product_info {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: center;
justify-content: center;
align-items: center;
padding: 15px;
.product_img {
width: 74px;
height: 74px;
background: #DEE4EC;
margin-right: 15px;
}
.logistics_info {
.send_good {
display: block;
margin: 20px auto !important;
&:hover {
cursor: pointer;
}
.product_detail {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
align-content: flex-start;
justify-content: center;
align-items: flex-start;
.product_name {
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
}
.logistics_content {
padding: 0 10%;
.logistics_title {
span {
margin: 20px 0;
display: inline-block;
width: 45%;
}
}
.logistics_item {
span {
display: inline-block;
width: 30%;
}
}
.product_desc {
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #828C9A;
}
}
}
}
.product_total {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
align-content: flex-end;
align-items: flex-end;
justify-content: center;
.product_row {
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #404F64;
margin-top: 3px;
margin-bottom: 2px;
}
.right_part {
float: left;
width: 30%;
.product_price {
font-family: PingFang SC;
font-weight: bold;
color: #404F64;
line-height: 24px;
margin-top: 3px;
margin-bottom: 10px;
}
}
}

691
src/views/shop/myshop/index.vue

@ -0,0 +1,691 @@
<!-- -->
<template>
<div>
<div class="pending">
<!-- 搜索 -->
<div class="formSearch">
<el-form
:inline="true"
:model="formInline"
>
<el-form-item label="店铺名称">
<el-input
v-model="formInline.shopName"
maxlength="20"
placeholder="请输入店铺名称"
/>
</el-form-item>
<el-form-item label="店铺编码">
<el-input
v-model="formInline.shopCode"
maxlength="20"
placeholder="请输入店铺编码"
/>
</el-form-item>
<el-form-item label="负责人">
<el-input
v-model="formInline.chargePersonName"
maxlength="20"
placeholder="请输入负责人"
/>
</el-form-item>
<!-- <el-form-item label="合同状态">
<el-select
v-model="formInline.contractState"
placeholder="请选择"
>
<el-option
label="有效"
value="1"
/>
<el-option
label="无效"
value="0"
/>
</el-select>
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
plain
@click="onSubmit"
>查询
</el-button>
<el-button
type="success"
plain
@click="addbuss"
>新建店铺
</el-button>
</el-form-item>
</el-form>
</div>
<!-- 表格 -->
<div class="tableBox">
<el-table
ref="multipleTable"
:data="tableData"
border
:header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column
label="店铺名称"
width="220"
>
<template slot-scope="scope">{{ scope.row.shopName }}</template>
</el-table-column>
<el-table-column
prop="shopCode"
width="150"
label="店铺编码"
/>
<el-table-column
prop="chargePersonName"
width="80"
label="负责人"
/>
<el-table-column
prop="chargePersonPhone"
label="联系电话"
/>
<!-- <el-table-column label="合同状态">
<template slot-scope="scope">
<span v-if="scope.row.contractState === 0">无效</span>
<span v-if="scope.row.contractState === 1">有效</span>
</template>
</el-table-column> -->
<el-table-column
prop="createTime"
label="创建时间"
/>
<el-table-column
label="操作"
show-overflow-tooltip
>
<template slot-scope="scope">
<div class="btnList">
<el-button
type="text"
@click="seeMore(scope.row)"
>查看
</el-button>
<el-button
type="text"
@click="edit(scope.row)"
>编辑
</el-button>
<!-- <el-button
v-if="scope.row.state == 1"
type="text"
@click="del(scope.row)"
>禁用
</el-button>
<el-button
v-else
type="text"
@click="del(scope.row)"
>启用
</el-button> -->
<el-button
type="text"
@click="delshop(scope.row)"
>删除
</el-button>
</div>
</template>
</el-table-column>
</el-table>
<!-- <div class="fenye">
<el-pagination
:current-page="currentPage"
:page-sizes="[10, 20, 50, 100]"
:page-size="10"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div> -->
</div>
<!-- ******************************************************弹框开始****************************************************** -->
<!-- 新建店铺弹框 -->
<el-dialog
:title="
userState === 0
? '新增店铺'
: userState === 1
? '修改店铺'
: '查看店铺'
"
:visible.sync="dialogVisible"
width="30%"
center
:close-on-click-modal="false"
>
<el-form
ref="ruleFormInfo"
:model="ruleForm"
:rules="rulesInfo"
label-width="120px"
>
<el-form-item
label="店铺名称"
prop="shopName"
>
<el-input
v-model="ruleForm.shopName"
maxlength="20"
:disabled="disabled"
/>
</el-form-item>
<el-form-item
label="店铺编码"
prop="shopCode"
v-if="userState !== 0"
>
<el-input
v-model="ruleForm.shopCode"
maxlength="20"
:disabled="true"
/>
</el-form-item>
<el-form-item
label="店铺负责人"
prop="chargePersonName"
>
<el-input
v-model="ruleForm.chargePersonName"
maxlength="20"
:disabled="disabled"
/>
</el-form-item>
<el-form-item
label="负责人电话"
prop="chargePersonPhone"
>
<el-input
v-if="cpPhoneShow"
:value="hidden(ruleForm.chargePersonPhone,3,4)"
maxlength="11"
:disabled="disabled"
@focus="focuscpPhoneInput"
/>
<el-input
v-else
ref="cpPhoneCls"
v-model="ruleForm.chargePersonPhone"
maxlength="11"
clearable
:disabled="disabled"
@change="changecpPhoneInput"
/>
</el-form-item>
<el-form-item
label="店铺地址"
prop="shopAdress"
>
<el-input
ref="addressCls"
v-model="ruleForm.shopAdress"
maxlength="60"
:disabled="disabled"
/>
<!-- <div v-else @click="inputAddress">
<el-input :value="hidden(ruleForm.shopAdress, 1, 1)" :disabled="disabled" />
</div> -->
</el-form-item>
<!-- <el-form-item
label="生效日期"
prop="effectiveDate"
>
<el-date-picker
v-model="ruleForm.effectiveDate"
:disabled="disabled"
value-format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
/>
</el-form-item>
<el-form-item
label="生效年限"
prop="effectiveYear"
>
<el-input
v-model="ruleForm.effectiveYear"
type="text"
:disabled="disabled"
placeholder="请输入内容"
maxlength="4"
class="elipt"
style="width: 50%"
show-word-limit
/>
<span class="elspan"></span>
</el-form-item>
<el-form-item
label="合同状态"
prop="contractState"
>
<el-radio-group v-model="ruleForm.contractState">
<el-radio
:disabled="disabled"
:label="1"
>有效
</el-radio>
<el-radio
:disabled="disabled"
:label="0"
>无效
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="直播间审核"
prop="auditLive"
>
<el-radio-group v-model="ruleForm.auditLive">
<el-radio
:disabled="disabled"
:label="1"
>开启
</el-radio>
<el-radio
:disabled="disabled"
:label="0"
>关闭
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="直播间商品审核"
prop="auditLiveProduct"
>
<el-radio-group v-model="ruleForm.auditLiveProduct">
<el-radio
:disabled="disabled"
:label="1"
>开启
</el-radio>
<el-radio
:disabled="disabled"
:label="0"
>关闭
</el-radio>
</el-radio-group>
</el-form-item> -->
</el-form>
<span
slot="footer"
class="dialog-footer"
>
<el-button @click="closeFn"> </el-button>
<el-button
type="primary"
@click="addCheck()"
> </el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
// jsjsjson
// import from '';
import {
shopListGetAll,
shopListSave,
shopListGetById,
shopListUpdate,
shopListStart,
delshopById
} from '@/api/shop'
export default {
data () {
//
return {
//
dialogVisible: false,
loading: false,
formInline: {
shopName: '', //
shopCode: '', //
chargePersonName: '', //
page: '1', //
pageSize: '10' //
},
disabled: false,
ruleForm: {
shopName: '', //
chargePersonName: '', //
chargePersonPhone: '', //
shopAdress: '', //
},
showPhone: false,
showAddress: false,
userPhone: '',
showUserPhone: false,
newAddress: '',
personPhone: '',
rulesInfo: {
shopName: [
{ required: true, message: '请输入店铺名称', trigger: 'blur' }
],
chargePersonName: [
{ required: true, message: '请输入店铺负责人', trigger: 'blur' }
],
chargePersonPhone: [
{ required: true, message: '请输入负责人电话', trigger: 'blur' },
{
pattern: /^1[3456789]\d{9}$/,
message: '目前只支持中国大陆的手机号码'
}
],
shopAdress: [
{ required: true, message: '请输入地址', trigger: 'blur' }
]
},
total: 1,
tableData: [],
currentPage: 1,
userState: 1,
privacyTime: 0,
cpPhoneShow: true, //
shopPhoneShow: true //
}
},
// data
computed: {},
// data
watch: {},
// - 访this
created () {
},
// - 访DOM
mounted () {
this.getAll(this.formInline)
this.privacyTime = localStorage.getItem('privacyTime')
console.log(this.privacyTime)
},
//
methods: {
focusShopPhoneInput () {
this.shopPhoneShow = false
this.ruleForm.shopPhone = ''
//
this.$nextTick(() => {
this.$refs.shopPhoneCls.focus()
})
},
focuscpPhoneInput () {
this.cpPhoneShow = false
this.ruleForm.chargePersonPhone = ''
//
this.$nextTick(() => {
this.$refs.cpPhoneCls.focus()
})
},
changecpPhoneInput () {
},
handleSizeChange (val) {
this.formInline.pageSize = val
this.getAll(this.formInline)
},
handleCurrentChange (val) {
this.formInline.page = val
this.getAll(this.formInline)
},
handleClick (tab, event) {
console.log(tab, event)
},
onSubmit () {
this.getAll(this.formInline)
},
//
addbuss () {
this.userState = 0
this.disabled = false
this.newAddress = ''
this.personPhone = ''
this.ruleForm = {
shopName: '', //
shopCode:'',
chargePersonName: '', //
chargePersonPhone: '', //
shopAdress: '' //
}
this.dialogVisible = true
console.log(this.userState)
},
closeFn () {
this.$nextTick(() => {
this.$refs['ruleFormInfo'].clearValidate()
this.dialogVisible = false
})
},
//
addCheck () {
this.$refs['ruleFormInfo'].validate(valid => {
if (valid) {
console.log(this.userState)
console.log(this.ruleForm)
// if (this.personPhone !== '') {
// this.ruleForm.chargePersonPhone = this.personPhone
// }
if (this.newAddress !== '') {
this.ruleForm.shopAdress = this.newAddress
}
// if (this.userPhone !== '') {
// this.ruleForm.shopPhone = this.userPhone
// }
if (this.ruleForm.shopName === '') {
this.$message.error('请输入店铺名称')
return
}
// if (this.ruleForm.effectiveDate === '') {
// this.$message.error('')
// return
// }
// if (this.ruleForm.effectiveYear === '') {
// this.$message.error('')
// return
// }
if (!this.userState) {
shopListSave(this.ruleForm).then(res => {
console.log(res)
if (res.code === '') {
this.$message({
message: '新增成功',
type: 'success'
})
}
this.getAll(this.formInline)
this.dialogVisible = false
this.$refs.ruleForm.clearValidate()
})
} else {
shopListUpdate(this.ruleForm).then(res => {
console.log(res)
if (res.code === '') {
this.$message({
message: '修改成功',
type: 'success'
})
this.$refs.ruleForm.clearValidate()
}
this.getAll(this.formInline)
this.dialogVisible = false
})
}
} else {
console.log('error submit!!')
this.$message.error('请输入完整信息')
return false
}
})
},
//
async seeMore (row) {
this.showPhone = false
this.cpPhoneShow = true
this.shopPhoneShow = true
const res = await shopListGetById({ shopId: row.shopId })
if (res.code === '') {
this.userState = 3
this.disabled = true
this.ruleForm = res.data
this.dialogVisible = true
}
},
//
async edit (row) {
this.showPhone = false
this.personPhone = ''
this.userState = 1
this.disabled = false
this.cpPhoneShow = true
const res = await shopListGetById({ shopId: row.shopId })
this.ruleForm = res.data
this.dialogVisible = true
console.log(this.ruleForm)
},
//
async del (row) {
console.log(row)
if (row.state === 1) {
const res = await shopListStart({
shopName: row.shopName,
state: 0,
shopId: row.shopId
})
if (res.code === '') {
this.$message({
message: '停用成功',
type: 'success'
})
this.getAll(this.formInline)
}
} else {
const res = await shopListStart({
shopName: row.shopName,
state: 1,
shopId: row.shopId
})
if (res.code === '') {
this.$message({
message: '启用成功',
type: 'success'
})
this.getAll(this.formInline)
}
}
},
delshop (row) {
// todo
this.$confirm('此操作将永久删除该店铺, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const res = await delshopById({
shopId: row.shopId
})
if (res.code === '') {
this.$message({
message: '操作成功',
type: 'success'
})
this.getAll(this.formInline)
}
}).catch(() => {
})
},
// shopListGetAll
//
async getAll (formInline) {
const res = await shopListGetAll(formInline)
this.total = res.data.length
this.tableData = res.data
},
//
inputPhone () {
this.showPhone = true
this.personPhone = ''
this.$nextTick(() => {
this.$refs.phoneCls.focus()
})
},
//
inputAddress () {
this.showAddress = true
this.newAddress = ''
this.$nextTick(() => {
this.$refs.addressCls.focus()
})
},
//
inputUserPhone () {
this.showUserPhone = true
this.userPhone = ''
this.$nextTick(() => {
this.$refs.userPhoneCls.focus()
})
},
//
hidden (str, frontLen, endLen) {
let endLenData = 0
if (str.length !== 2) {
endLenData = endLen
}
const len = str.length - frontLen - endLenData
let xing = ''
for (let i = 0; i < len; i++) {
xing += '*'
}
return (
str.substring(0, frontLen) + xing + str.substring(str.length - endLenData)
)
}
}
}
</script>
<style
lang="scss"
scoped
>
@import url("../../../styles/elDialog.scss");
.pending {
padding: 30px;
background: #FFFFFF;
border-radius: 10px;
}
.btnList{
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-content: center;
justify-content: flex-start;
align-items: center;
}
.fenye {
margin-top: 20px;
}
.elipt {
width: 50%;
}
.elspan {
margin-left: 10px;
}
</style>

14
src/views/system/shopSys/edit.vue

@ -5,7 +5,7 @@
<div class="cardStyle">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span class="card_span">店铺设置</span>
<span class="card_span">商家设置</span>
<el-button class="btnShop" type="text" @click="save">保存</el-button>
<el-button
class="resBtn"
@ -19,8 +19,8 @@
<!-- 详情 -->
<div class="shopDetail">
<div class="shopDetail_l">
<div class="shopMsg">店铺信息</div>
<div class="logo">店铺logo</div>
<div class="shopMsg">商家信息</div>
<div class="logo">商家logo</div>
<div class="shopLogon">
<!-- 上传图片 -->
<div class="uploadWidth">
@ -39,16 +39,16 @@
</div>
</div>
<div class="common">
<div class="span_1">店铺名称</div>
<el-input v-model="shopObj.name" maxlength="20" placeholder="请输入店铺名称" />
<div class="span_1">商家名称</div>
<el-input v-model="shopObj.name" maxlength="20" placeholder="请输入商家名称" />
</div>
<div class="common">
<div class="span_1">发货地址</div>
<el-input v-model="shopObj.address" maxlength="60" placeholder="请输入发货地址" />
</div>
<div class="common">
<div class="span_1">店铺简介</div>
<el-input v-model="shopObj.det" maxlength="50" placeholder="请输入店铺简介" />
<div class="span_1">商家简介</div>
<el-input v-model="shopObj.det" maxlength="50" placeholder="请输入商家简介" />
</div>
<div class="common">
<div class="span_1">注册手机号</div>

160
src/views/system/shopSys/index.vue

@ -2,7 +2,7 @@
<div class="setting-shop-page">
<el-form ref="ruleForm" :model="storeDetails" :rules="rules" label-width="100px">
<div class="h5">
<div class="title">店铺信息</div>
<div class="title">商家信息</div>
<el-button
v-if="!disabled1"
type="text"
@ -16,9 +16,9 @@
>保存</el-button>
</div>
<div class="shop-details">
<el-form-item label="店铺logo">
<el-form-item label="商家logo">
<el-upload
:class="[{ 'avatar-uploader': !storeDetails.shopLogo }]"
:class="[{ 'avatar-uploader': !storeDetails.businessLogo }]"
:headers="headers"
:data="dataObj"
:action="action"
@ -27,8 +27,8 @@
:disabled="disabled1"
>
<img
v-if="storeDetails.shopLogo"
:src="storeDetails.shopLogo"
v-if="storeDetails.businessLogo"
:src="storeDetails.businessLogo"
class="avatar"
width="80"
height="80"
@ -36,46 +36,49 @@
<i v-else class="el-icon-plus avatar-uploader-icon" />
</el-upload>
</el-form-item>
<el-form-item label="店铺名称">
<el-input v-model="storeDetails.shopName" maxlength="20" :disabled="disabled1" />
<el-form-item label="商家名称">
<el-input v-model="storeDetails.businessName" maxlength="20" :disabled="disabled1" />
</el-form-item>
<el-form-item label="发货地址">
<el-input
v-model="storeDetails.shopAdress"
v-model="storeDetails.businessAdress"
maxlength="60"
:disabled="disabled1"
:resize="`${disabled1 ? 'none' : ''}`"
type="textarea"
/>
</el-form-item>
<el-form-item label="店铺简介">
<el-form-item label="商家简介">
<el-input
v-model="storeDetails.shopBrief"
v-model="storeDetails.businessBrief"
maxlength="50"
:disabled="disabled1"
:resize="`${disabled1 ? 'none' : ''}`"
type="textarea"
/>
</el-form-item>
<el-form-item label="注册手机号" prop="shopPhone">
<el-form-item label="负责人">
<el-input v-model="storeDetails.chargePersonName" maxlength="20" :disabled="disabled1" />
</el-form-item>
<el-form-item label="负责人手机号" prop="chargePersonPhone">
<el-input
v-if="shopPhoneShow"
:value="hidden(storeDetails.shopPhone,3,4)"
v-if="chargePersonPhoneShow"
:value="hidden(storeDetails.chargePersonPhone,3,4)"
maxlength="11"
:disabled="disabled1"
@focus="focusShopPhoneInput"
@focus="focuschargePersonPhoneInput"
/>
<el-input
v-else
ref="userPhoneCls"
v-model="storeDetails.shopPhone"
ref="phoneCls"
v-model="storeDetails.chargePersonPhone"
maxlength="11"
:disabled="disabled1"
/>
</el-form-item>
</div>
<div class="h5">
<div class="title">店铺认证</div>
<div class="title">商家认证</div>
</div>
<div class="shop-details" v-if="storeDetails.xsPayId && storeDetails.xsPayId.length > 0" style="overflow: hidden; line-height: 40px">
@ -103,46 +106,25 @@
支付信息认证
<el-button type="primary" style="float:right" @click="approve">立即认证</el-button>
</div>
<div class="h5">
<div class="title">退货地址</div>
<div class="title">商家跨境设置</div>
</div>
<div class="shop-details">
<el-form-item label="地址">
<el-input
v-model="storeDetails.shopReturn.returnAdress"
maxlength="60"
:disabled="disabled1"
/>
<el-form-item label="电商企业名称">
<el-input v-model="storeDetails.crossDetail.ebpname" :disabled="disabled1" />
</el-form-item>
<el-form-item label="联系人">
<el-input
v-model="storeDetails.shopReturn.returnPerson"
maxlength="20"
:disabled="disabled1"
/>
</el-form-item>
<el-form-item label="联系电话">
<el-input
v-if="returnPhoneShow"
:value="hidden(storeDetails.shopReturn.returnPhone,3,4)"
maxlength="11"
:disabled="disabled1"
@focus="focusReturnPhoneInput"
/>
<el-input
v-else
ref="returnPhoneCls"
v-model="storeDetails.shopReturn.returnPhone"
maxlength="11"
:disabled="disabled1"
/>
<el-form-item label="电商企业代码">
<el-input v-model="storeDetails.crossDetail.ebpcode" :disabled="disabled1" />
</el-form-item>
</div>
</el-form>
</div>
</template>
<script>
import { shopSysGetById, shopSysUpdate, registerByXs } from '@/api/shopSys';
import { businessGetById, businessUpdate, registerByXs } from '@/api/shopSys';
import { uploadUrl } from '@/utils/request';
import { getToken } from '@/utils/auth';
const PhoneRule = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
@ -177,37 +159,25 @@ export default {
headers: {
'Authorization-business': getToken(),
},
shopPhone: '',
userPhone: '',
showUserPhone: false,
chargePersonPhone: '',
action: uploadUrl,
dataObj: {
folderId: 1,
},
disabled1: true,
storeDetails: {
shopReturn: {},
},
privacyTime: 0,
shopPhoneShow: true,
returnPhoneShow: true,
oldShopPhone: '',
oldReturnPhone: '',
chargePersonPhoneShow: true,
oldchargePersonPhone: '',
rules: {
shopPhone: [
{ required: true, message: '请输入注册手机号', trigger: 'blur' },
{
pattern: /^1[3456789]\d{9}$/,
message: '目前只支持中国大陆的手机号码'
}
],
returnPhone: [
{ required: true, message: '请输入联系电话', trigger: 'blur' },
chargePersonPhone: [
{ required: false, message: '请输入负责人手机号', trigger: 'blur' },
{
pattern: /^1[3456789]\d{9}$/,
message: '目前只支持中国大陆的手机号码'
}
],
]
}
};
},
@ -216,25 +186,24 @@ export default {
this.privacyTime = localStorage.getItem('privacyTime');
},
methods: {
focusReturnPhoneInput() {
// shopReturn
if (!this.storeDetails.shopReturn) {
this.$set(this.storeDetails, 'shopReturn', {
returnPhone: null
})
}
this.oldReturnPhone = this.storeDetails.shopReturn.returnPhone
this.returnPhoneShow = false
},
focusShopPhoneInput() {
this.oldShopPhone = this.storeDetails.shopPhone
this.shopPhoneShow = false
this.storeDetails.shopPhone = ''
focuschargePersonPhoneInput() {
this.oldchargePersonPhone = this.storeDetails.chargePersonPhone
this.chargePersonPhoneShow = false
this.storeDetails.chargePersonPhone = ''
},
async getStoreDetails() {
const res = await shopSysGetById({});
const res = await businessGetById({});
if (res.code === '') {
this.storeDetails = res.data;
if(this.storeDetails.crossDetail == null){
this.storeDetails.crossDetail = {}
}
if(this.storeDetails.crossDetail.ebpname == null){
this.storeDetails.crossDetail.ebpname = ""
}
if(this.storeDetails.crossDetail.ebpcode == null){
this.storeDetails.crossDetail.ebpcode = ""
}
}
},
onSubmit() {
@ -243,27 +212,19 @@ export default {
//
editDisabled1(value) {
this.disabled1 = !this.disabled1;
this.showUserPhone = false;
if (value === 0) {
this.shopPhoneShow = true
this.returnPhoneShow = true
this.storeDetails.shopPhone = this.oldShopPhone ? this.oldShopPhone : this.storeDetails.shopPhone
this.storeDetails.shopReturn.returnPhone = this.oldReturnPhone ? this.oldReturnPhone : this.storeDetails.shopReturn.returnPhone
this.chargePersonPhoneShow = true
this.storeDetails.chargePersonPhone = this.oldchargePersonPhone ? this.oldchargePersonPhone : this.storeDetails.chargePersonPhone
}
},
async updateStore(ruleForm) {
this.$refs[ruleForm].validate(valid => {
console.log(this.storeDetails, 'this.storeDetails999')
if (!PhoneRule.test(this.storeDetails.shopReturn.returnPhone)) {
return this.$message.warning('请输入正确联系电话');
}
if (valid) {
shopSysUpdate(this.storeDetails).then(res => {
businessUpdate(this.storeDetails).then(res => {
if (res.code === '') {
this.getStoreDetails()
this.disabled1 = true;
this.returnPhoneShow = true
this.shopPhoneShow = true
this.chargePersonPhoneShow = true
this.$message({
message: '修改成功',
type: 'success',
@ -275,7 +236,7 @@ export default {
},
handleAvatarSuccess(response) {
const { url } = response.data;
this.storeDetails.shopLogo = url;
this.storeDetails.businessLogo = url;
},
approve() {
// this.$router.push({ path: '/setting/shop/wechat-approve' });
@ -290,20 +251,13 @@ export default {
})
},
//
inputShopPhone() {
// this.showShopPhone = true;
this.shopPhone = '';
inputchargePersonPhone() {
// this.showchargePersonPhone = true;
this.chargePersonPhone = '';
this.$nextTick(() => {
this.$refs.phoneCls.focus();
});
},
inputUserPhone() {
this.showUserPhone = true;
this.userPhone = '';
this.$nextTick(() => {
this.$refs.userPhoneCls.focus();
});
},
//
hidden(str, frontLen, endLen) {
if (!str) {

Loading…
Cancel
Save