This commit is contained in:
chenjiajun
2021-04-13 14:24:26 +08:00
parent c2a7d375ec
commit 064fa6dc34
40 changed files with 1553 additions and 468 deletions

View File

@ -34,6 +34,7 @@
},
"dependencies": {
"@riophae/vue-treeselect": "0.1.0",
"@vue/babel-plugin-transform-vue-jsx": "^1.2.1",
"axios": "0.18.1",
"clipboard": "2.0.4",
"codemirror": "^5.49.2",
@ -44,6 +45,7 @@
"element-ui": "^2.12.0",
"file-saver": "1.3.8",
"fuse.js": "3.4.4",
"js-beautify": "^1.10.2",
"js-cookie": "2.2.0",
"jsencrypt": "^3.0.0-rc.1",
"jszip": "3.1.5",
@ -53,24 +55,23 @@
"path-to-regexp": "2.4.0",
"qs": "^6.9.1",
"screenfull": "4.2.0",
"sortablejs": "1.8.4",
"vue": "2.6.10",
"vue-count-to": "1.0.13",
"vue-cropper": "0.4.9",
"vue-highlightjs": "^1.3.3",
"vue-router": "3.0.2",
"vue-splitpane": "1.0.4",
"vue-ueditor-wrap": "^2.4.1",
"vuedraggable": "2.20.0",
"vuex": "3.1.0",
"wangeditor": ">=3.0.0",
"xlsx": "^0.11.16",
"js-beautify": "^1.10.2",
"sortablejs": "1.8.4",
"vuedraggable": "2.20.0",
"vue-ueditor-wrap": "^2.4.1"
"xlsx": "^0.11.16"
},
"devDependencies": {
"@babel/core": "7.0.0",
"@babel/register": "7.0.0",
"@babel/parser": "^7.7.4",
"@babel/register": "7.0.0",
"@vue/cli-plugin-babel": "3.5.3",
"@vue/cli-plugin-eslint": "^3.9.1",
"@vue/cli-plugin-unit-jest": "3.5.3",
@ -80,6 +81,8 @@
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"babel-plugin-dynamic-import-node": "2.3.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"chalk": "2.4.2",
"chokidar": "2.1.5",
"connect": "3.6.6",
@ -96,13 +99,11 @@
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",
"serve-static": "^1.13.2",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.0",
"vue-template-compiler": "2.6.10",
"babel-plugin-transform-remove-console": "^6.9.4",
"babel-plugin-dynamic-import-node": "2.3.0",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2"
"vue-template-compiler": "2.6.10"
},
"engines": {
"node": ">=8.9",

View File

@ -32,4 +32,12 @@ export function edit(data) {
})
}
export default { add, edit, del, getDepts }
export function getDeptSuperior(data) {
return request({
url: 'api/dept',
method: 'get',
data
})
}
export default { add, edit, del, getDepts, getDeptSuperior }

View File

@ -8,6 +8,14 @@ export function getPage(query) {
})
}
export function getList(query) {
return request({
url: 'api/materialgroup/list',
method: 'get',
params: query
})
}
export function addObj(obj) {
return request({
url: 'api/materialgroup',

27
src/api/yxAppVersion.js Normal file
View File

@ -0,0 +1,27 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/yxAppVersion',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/yxAppVersion/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/yxAppVersion',
method: 'put',
data
})
}
export default { add, edit, del }

View File

@ -0,0 +1,46 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/yxStoreCustomer',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/yxStoreCustomer/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/yxStoreCustomer',
method: 'put',
data
})
}
export function getqrcode() {
return request({
url: 'api/wxmp/qrcode',
method: 'get'
})
}
export function getOpenId(key) {
return request({
url: 'api/wxmp/getOpenId?key=' + key,
method: 'get'
})
}
export function getwechatCode() {
return request({
url: 'api/wxmp/wechatCode',
method: 'get'
})
}
export default { add, edit, del, getqrcode, getOpenId, getwechatCode }

View File

@ -23,6 +23,14 @@ export function edit(data) {
})
}
export function updateDelivery(data) {
return request({
url: 'api/yxStoreOrder/updateDelivery',
method: 'put',
data
})
}
export function editT(data) {
return request({
url: 'api/yxStoreOrder/check',
@ -77,3 +85,9 @@ export function getOrderDetail(id) {
})
}
export function getNowOrderStatus(id) {
return request({
url: '/api/getNowOrderStatus/' + id,
method: 'get'
})
}

View File

@ -25,7 +25,7 @@ export function edit(data) {
export function get() {
return request({
url: 'api/yxSystemConfig?size=50',
url: 'api/yxSystemConfig?size=500',
method: 'get'
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 531 KiB

View File

@ -18,6 +18,9 @@ export default class Dict {
ps.push(getDictDetail(n).then(data => {
this.dict[n].splice(0, 0, ...data.content)
data.content.forEach(d => {
if (parseInt(d.value).toString() != 'NaN') {
d.value = parseInt(d.value)
}
Vue.set(this.dict.dict[n], d.value, d)
Vue.set(this.dict.label[n], d.value, d.label)
})

View File

@ -145,7 +145,7 @@
</template>
<script>
import { getPage as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
import { getList as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
import { getPage, addObj, delObj, putObj } from '@/api/tools/material'
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
@ -260,13 +260,13 @@ export default {
this.materialgroupLoading = true
materialgroupPage({
total: 0, // 总页数
currentPage: 1, // 当前页数
pageSize: 100, // 每页显示多少条
page: 1, // 当前页数
size: 100, // 每页显示多少条
ascs: [], // 升序字段
descs: 'create_time'// 降序字段
sort: 'create_time,desc'// 降序字段
}).then(response => {
this.materialgroupLoading = false
const materialgroupList = response.content
const materialgroupList = response
materialgroupList.unshift({
id: '-1',
name: '全部分组'
@ -466,7 +466,6 @@ export default {
this.urls.forEach(item => {
str += '<img src="' + item + '">'
// this.$set(this.value, this.value.length, item)
})
nowEditor.dialog.close(true)
nowEditor.editor.setContent(str, true)

View File

@ -146,7 +146,7 @@
</template>
<script>
import { getPage as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
import { getList as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
import { getPage, addObj, delObj, putObj } from '@/api/tools/material'
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
@ -256,13 +256,13 @@ export default {
this.materialgroupLoading = true
materialgroupPage({
total: 0, // 总页数
currentPage: 1, // 当前页数
pageSize: 100, // 每页显示多少条
page: 1, // 当前页数
size: 100, // 每页显示多少条
ascs: [], // 升序字段
descs: 'create_time'// 降序字段
sort: 'create_time,desc'// 降序字段
}).then(response => {
this.materialgroupLoading = false
const materialgroupList = response.content
const materialgroupList = response
materialgroupList.unshift({
id: '-1',
name: '全部分组'

View File

@ -1,20 +1,20 @@
<template>
<div v-if="type == 'image'">
<div v-if="myValue != ''">
<ul class="el-upload-list el-upload-list--picture-card">
<ul class="el-upload-list el-upload-list--picture-card">
<li tabindex="0" class="el-upload-list__item is-ready" :style="'width: '+width+'px;height: '+height+'px'">
<div>
<img :src="myValue" alt="" class="el-upload-list__item-thumbnail">
<span class="el-upload-list__item-actions">
<span class="el-upload-list__item-delete" @click="deleteMaterial">
<i class="el-icon-delete" />
</span>
<span class="el-upload-list__item-delete" @click="deleteMaterial">
<i class="el-icon-delete" />
</span>
</span>
</div>
</li>
</ul>
</div>
<div v-else tabindex="0" class="el-upload el-upload--picture-card" :style="'width: '+width+'px;height: '+height+'px;'+'line-height:'+height+'px;'" @click="toSeleteMaterial">
<div v-else tabindex="0" class="el-upload el-upload--picture-card" :style="'width: '+width+'px;height: '+height+'px;'+'line-height:'+height+'px;'" @click="toSeleteMaterial">
<i class="el-icon-plus" />
</div>
@ -139,7 +139,7 @@
</template>
<script>
import { getPage as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
import { getList as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
import { getPage, addObj, delObj, putObj } from '@/api/tools/material'
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
@ -210,7 +210,7 @@ export default {
])
},
watch: {
value: function (val) {
value: function(val) {
this.myValue = val
}
},
@ -252,13 +252,13 @@ export default {
this.materialgroupLoading = true
materialgroupPage({
total: 0, // 总页数
currentPage: 1, // 当前页数
pageSize: 100, // 每页显示多少条
page: 1, // 当前页数
size: 100, // 每页显示多少条
ascs: [], // 升序字段
descs: 'create_time'// 降序字段
sort: 'create_time,desc'// 降序字段
}).then(response => {
this.materialgroupLoading = false
const materialgroupList = response.content
const materialgroupList = response
materialgroupList.unshift({
id: '-1',
name: '全部分组'
@ -454,7 +454,7 @@ export default {
return isPic && isLt2M
},
sureUrls() {
console.log('this.urls:'+this.urls)
console.log('this.urls:' + this.urls)
this.myValue = this.urls[0]
this.$emit('input', this.urls[0])
this.listDialogVisible = false

View File

@ -2,7 +2,7 @@ module.exports = {
/**
* @description 网站标题
*/
title: 'YSHOP-3.1',
title: 'YSHOP-3.2',
/**
* @description 是否显示 tagsView
*/
@ -42,9 +42,9 @@ module.exports = {
/**
* 底部文字支持html语法
*/
footerTxt: '© 2019 YSHOP <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License 2.0</a>',
footerTxt: '© 2019-2021 YSHOP <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">All Rights Reserved</a>',
/**
* 备案号
*/
caseNumber: '豫ICP备17049587号'
caseNumber: '豫ICP备17049587-2号'
}

View File

@ -419,3 +419,16 @@ export function downloadFile(obj, name, suffix) {
link.click()
document.body.removeChild(link)
}
export function RandomNumber() {
var min = 5; var max = 36
var randomStr = ''
var range = (max ? Math.round(Math.random() * (max - min)) + min : min)
var arr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
for (var i = 0; i < range; i++) {
var index = Math.round(Math.random() * (arr.length - 1))
randomStr += arr[index]
}
return randomStr
}

View File

@ -160,11 +160,16 @@
<el-input type="text" v-model="scope.row.weight" :disabled="true"/>
</template>
</el-table-column>
<el-table-column prop="volume" label="体积(m³" align="center">
<el-table-column prop="volume" label="体积(m³)" align="center">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.volume" :disabled="true"/>
</template>
</el-table-column>
<el-table-column prop="volume" label="所需兑换积分" align="center">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.integral"/>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
@ -223,7 +228,8 @@ export default {
pink_stock: 0,
pink_price: 0,
weight: 0,
volume: 0
volume: 0,
integral:0
}
],
// 规格数据
@ -262,6 +268,7 @@ export default {
info: '',
price: '',
sort: 0,
integral: 0,
sales: '',
stock: '',
addTime: '',
@ -295,7 +302,8 @@ export default {
cost: 0,
ot_price: 0,
stock: 0,
bar_code: ''
bar_code: '',
integral:0
}
],
header: [],
@ -323,7 +331,8 @@ export default {
weight: 0,
volume: 0,
brokerage: 0,
brokerage_two: 0
brokerage_two: 0,
integral:0
}
],
images: [],
@ -506,7 +515,7 @@ export default {
// 详情选择商品生成规格用
getInfoChooseGood (id) {
let that = this;
getInfo(id).then(async res => {
getInfo(id==null?0:id).then(async res => {
let data = res.productInfo;
if(data){
that.attrs = data.items || [];

View File

@ -48,6 +48,13 @@ export default {
required: true
}
},
watch: {
"form.product":function(val){
if(val){
this.getGoods(val)
}
}
},
data() {
return {
loading: false, dialog: false,

View File

@ -166,11 +166,16 @@
<el-input type="text" v-model="scope.row.weight" :disabled="true"/>
</template>
</el-table-column>
<el-table-column prop="volume" label="体积(m³" align="center">
<el-table-column prop="volume" label="体积(m³)" align="center">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.volume" :disabled="true"/>
</template>
</el-table-column>
<el-table-column prop="volume" label="所需兑换积分" align="center">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.integral"/>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
@ -230,7 +235,8 @@ export default {
seckill_stock: 0,
seckill_price: 0,
weight: 0,
volume: 0
volume: 0,
integral:0
}
],
// 规格数据
@ -274,6 +280,7 @@ export default {
sort: 0,
sales: '',
stock: '',
integral: 0,
addTime: '',
isHost: '',
isShow: '',
@ -304,7 +311,8 @@ export default {
cost: 0,
ot_price: 0,
stock: 0,
bar_code: ''
bar_code: '',
integral: 0
}
],
header: [],
@ -332,6 +340,7 @@ export default {
weight: 0,
volume: 0,
brokerage: 0,
integral: 0,
brokerage_two: 0
}
],
@ -552,6 +561,7 @@ export default {
weight:0,
volume:0,
brokerage:0,
integral: 0,
brokerage_two:0
}
]
@ -604,6 +614,7 @@ export default {
weight:0,
volume:0,
brokerage:0,
integral: 0,
brokerage_two:0
}
]

View File

@ -99,7 +99,7 @@ export default {
beforeInit() {
this.url = 'api/yxStoreProduct'
const sort = 'id,desc'
this.params = { page: this.page, size: this.size, sort: sort, isShow: 1, isDel: 0 }
this.params = { page: this.page, size: this.size, sort: sort, isShow: 1, isDel: 0 ,isIntegral:0}
const query = this.query
const type = query.type
const value = query.value

View File

@ -34,7 +34,7 @@
<!--表单组件-->
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;" @selection-change="handleSelectionChange" ref="multipleTable">
<el-table-column
type="selection"
width="55">
@ -96,9 +96,41 @@ export default {
}
}
},
watch: {
page: function (val) {
var map = this.selectGoods;
map.set(this.lastPage, this.multipleSelection);
this.selectGoods = map;
if (map.get(val)) {
this.multipleSelection = map.get(val);
}
this.lastPage = val;
},
data: function (val) {
const _this=this;
_this.$nextTick(()=> {
//获取map
var map = this.selectGoods;
//判断当前页是否有数据
var thePageData = map.get(this.page);
if (thePageData) {
thePageData.forEach(thePageData=>{
val.forEach(tableData=>{
if(tableData.id==thePageData.id){
this.$refs.multipleTable.toggleRowSelection(tableData,true);
}
})
})
}
})
}
},
data() {
return {
newValue:this.value,
lastPage: 0,
selectGoods: new Map(),
newValue: this.value,
delLoading: false,
visible: false,
queryTypeOptions: [
@ -126,11 +158,20 @@ export default {
})
},
doSelect() {
this.newValue = this.multipleSelection
this.newValue =[];
var dataList=this.selectGoods;
dataList.forEach(i=>{
i.forEach(j=>{
this.newValue.push(j)
})
})
this.$emit("selectGoods", this.newValue)
this.dialog = false
},
handleSelectionChange(val) {
var map = this.selectGoods;
map.set(this.lastPage, val);
this.selectGoods = map;
this.multipleSelection = val;
},
toSelete() {
@ -140,11 +181,13 @@ export default {
beforeInit() {
this.url = 'api/yxStoreProduct'
const sort = 'id,desc'
this.params = { page: this.page, size: this.size, sort: sort, isShow: 1, isDel: 0 }
this.params = {page: this.page, size: this.size, sort: sort, isShow: 1, isDel: 0,isIntegral:0}
const query = this.query
const type = query.type
const value = query.value
if (type && value) { this.params[type] = value }
if (type && value) {
this.params[type] = value
}
return true
}
}

View File

@ -1,87 +1,127 @@
<template>
<div :class="className" :style="{height:height,width:width}" />
<div :class="className" ref="chart" :style="{ height: height, width: width }" />
</template>
<script>
import echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import { getOrderCount } from '@/api/visits'
import { debounce } from '@/utils'
import echarts from "echarts";
require("echarts/theme/macarons"); // echarts theme
import { getOrderCount } from "@/api/visits";
import { debounce } from "@/utils";
export default {
props: {
className: {
type: String,
default: 'chart'
default: "chart",
},
width: {
type: String,
default: '100%'
default: "100%",
},
height: {
type: String,
default: '300px'
}
default: "300px",
},
},
data() {
return {
chart: null,
column: [],
orderCountDatas: []
}
orderCountDatas: [],
};
},
mounted() {
getOrderCount().then(res => {
this.column = res.column,
this.orderCountDatas = res.orderCountDatas
}).then(() =>{
this.initChart()
})
getOrderCount()
.then((res) => {
(this.column = res.column),
(this.orderCountDatas = res.orderCountDatas);
})
.then(() => {
this.initChart();
});
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
this.chart.resize();
}
}, 100)
window.addEventListener('resize', this.__resizeHandler)
}, 100);
window.addEventListener("resize", this.__resizeHandler);
},
beforeDestroy() {
if (!this.chart) {
return
return;
}
window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose()
this.chart = null
window.removeEventListener("resize", this.__resizeHandler);
this.chart.dispose();
this.chart = null;
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
this.chart = echarts.init(this.$refs.chart, "macarons");
this.chart.setOption({
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)",
},
legend: {
left: 'center',
bottom: '10',
data: this.column
left: "center",
bottom: "10",
data: this.column,
},
calculable: true,
series: [
{
name: '商品分类销售占总销售的比例',
type: 'pie',
roseType: 'radius',
name: "商品分类销售占总销售的比例",
type: "pie",
roseType: "radius",
radius: [15, 95],
center: ['50%', '38%'],
center: ["50%", "38%"],
data: this.orderCountDatas,
animationEasing: 'cubicInOut',
animationDuration: 2600
}
]
})
animationEasing: "cubicInOut",
animationDuration: 2600,
},
],
});
},
},
};
</script>
<style lang="scss" scoped>
.acea-row{
/deep/.el-avatar--small {
width: 22px;
height: 22px;
line-height: 22px;
}
}
}
</script>
.checkTime{
/deep/.el-radio__input{
display: none;
}
}
.ivu-pl-8{
margin-left: 8px;
font-size: 14px;
}
.divBox {
// padding: 0 20px !important;
}
.dashboard-console-visit {
/deep/.el-card__header{
padding: 14px 20px !important;
}
ul {
li {
list-style-type: none;
margin-top: 12px;
}
}
}
.ivu-mb{
margin-bottom: 10px;
}
</style>

View File

@ -1,180 +1,241 @@
<template>
<el-row :gutter="40" class="panel-group">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
会员总数
</div>
<count-to :start-val="0" :end-val="count.userCount" :duration="2600" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-message">
<svg-icon icon-class="order" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
订单总数
</div>
<count-to :start-val="0" :end-val="count.orderCount" :duration="3000" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-money">
<svg-icon icon-class="money" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
总金额
</div>
<count-to :start-val="0" :end-val="count.priceCount" :duration="3200" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" >
<div class="card-panel-icon-wrapper icon-shopping">
<svg-icon icon-class="shopping" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
商品总数
</div>
<count-to :start-val="0" :end-val="count.goodsCount" :duration="3600" class="card-panel-num" />
</div>
</div>
</el-col>
</el-row>
<div>
<div class="divBox">
<el-row :gutter="24" class="baseInfo">
<el-col :xs="12" :sm="12" :lg="6" class="ivu-mb">
<el-card :bordered="false" dis-hover :padding="12">
<div slot="header" class="acea-row row-between-wrapper">
<span>会员总数</span>
<el-tag type="success">全平台</el-tag>
</div>
<div class="content" v-if="count">
<span class="content-number spBlock mb15"><count-to :start-val="0" :end-val="count.userCount" :duration="2600" class="card-panel-num" /></span>
<el-divider></el-divider>
<div class="acea-row row-between-wrapper">
<span class="content-time">今日订单数</span>
<span>{{ count.todayCount }} 单</span>
</div>
</div>
</el-card>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="ivu-mb">
<el-card :bordered="false" dis-hover :padding="12">
<div slot="header" class="acea-row row-between-wrapper">
<span>订单总数</span>
<el-tag type="success">全平台</el-tag>
</div>
<div class="content" v-if="count">
<span class="content-number spBlock mb15"><count-to :start-val="0" :end-val="count.orderCount" :duration="3000" class="card-panel-num" /></span>
<el-divider></el-divider>
<div class="acea-row row-between-wrapper">
<span class="content-time">昨日订单数</span>
<span>{{ count.lastWeekCount }} 单</span>
</div>
</div>
</el-card>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="ivu-mb">
<el-card :bordered="false" dis-hover :padding="12">
<div slot="header" class="acea-row row-between-wrapper">
<span>总金额</span>
<el-tag type="success">全平台</el-tag>
</div>
<div class="content" v-if="count">
<span class="content-number spBlock mb15"><count-to :start-val="0" :end-val="count.priceCount" :duration="3200" class="card-panel-num" /></span>
<el-divider></el-divider>
<div class="acea-row row-between-wrapper">
<span class="content-time">近七天订单数</span>
<span>{{ count.lastWeekCount }} 单</span>
</div>
</div>
</el-card>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="ivu-mb">
<el-card :bordered="false" dis-hover :padding="12">
<div slot="header" class="acea-row row-between-wrapper">
<span>商品总数</span>
<el-tag type="success">全平台</el-tag>
</div>
<div class="content" v-if="count">
<span class="content-number spBlock mb15"><count-to :start-val="0" :end-val="count.goodsCount" :duration="3600" class="card-panel-num" /></span>
<el-divider></el-divider>
<div class="acea-row row-between-wrapper">
<span class="content-time">本月订单数</span>
<span>{{ count.monthCount }} </span>
</div>
</div>
</el-card>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import CountTo from 'vue-count-to'
import { gett } from '@/api/visits'
import CountTo from "vue-count-to";
import { gett } from "@/api/visits";
export default {
components: {
CountTo
CountTo,
},
data() {
return {
count: { todayPrice: 0, todayCount: 0, proPrice: 0, proCount: 0,
monthPrice: 0, monthCount: 0, lastWeekCount: 0, lastWeekPrice: 0,
userCount: 0, orderCount: 0, priceCount: 0, goodsCount: 0}
}
count: {
todayPrice: 0,
todayCount: 0,
proPrice: 0,
proCount: 0,
monthPrice: 0,
monthCount: 0,
lastWeekCount: 0,
lastWeekPrice: 0,
userCount: 0,
orderCount: 0,
priceCount: 0,
goodsCount: 0,
},
};
},
mounted() {
gett().then(res => {
this.count.todayPrice = res.todayPrice
this.count.todayCount = res.todayCount
this.count.proCount = res.proCount
this.count.proPrice = res.proPrice
gett().then((res) => {
this.count.todayPrice = res.todayPrice;
this.count.todayCount = res.todayCount;
this.count.proCount = res.proCount;
this.count.proPrice = res.proPrice;
this.count.monthPrice = res.monthPrice
this.count.monthCount = res.monthCount
this.count.lastWeekCount = res.lastWeekCount
this.count.lastWeekPrice = res.lastWeekPrice
this.count.monthPrice = res.monthPrice;
this.count.monthCount = res.monthCount;
this.count.lastWeekCount = res.lastWeekCount;
this.count.lastWeekPrice = res.lastWeekPrice;
this.count.userCount = res.userCount
this.count.orderCount = res.orderCount
this.count.priceCount = res.priceCount
this.count.goodsCount = res.goodsCount
})
}
}
this.count.userCount = res.userCount;
this.count.orderCount = res.orderCount;
this.count.priceCount = res.priceCount;
this.count.goodsCount = res.goodsCount;
});
},
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.panel-group {
margin-top: 18px;
.panel-group {
margin-top: 18px;
.card-panel-col {
margin-bottom: 32px;
}
.card-panel {
height: 108px;
cursor: pointer;
font-size: 12px;
position: relative;
overflow: hidden;
color: #666;
background: #fff;
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
border-color: rgba(0, 0, 0, .05);
.icon-people {
color: #40c9c6;
}
.icon-message {
color: #36a3f7;
}
.icon-money {
color: #f4516c;
}
.icon-shopping {
color: #34bfa3
}
.card-panel-icon-wrapper {
float: left;
margin: 14px 0 0 14px;
padding: 16px;
transition: all 0.38s ease-out;
border-radius: 6px;
}
.card-panel-icon {
float: left;
font-size: 48px;
}
.card-panel-description {
float: right;
font-weight: bold;
margin: 26px;
margin-left: 0px;
.card-panel-text {
line-height: 18px;
color: rgba(0, 0, 0, 0.45);
font-size: 16px;
margin-bottom: 12px;
}
.card-panel-num {
font-size: 20px;
}
}
}
.card-panel-col {
margin-bottom: 32px;
}
@media (max-width:550px) {
.card-panel-description {
display: none;
.card-panel {
height: 108px;
cursor: pointer;
font-size: 12px;
position: relative;
overflow: hidden;
color: #666;
background: #fff;
box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
border-color: rgba(0, 0, 0, 0.05);
.icon-people {
color: #40c9c6;
}
.icon-message {
color: #36a3f7;
}
.icon-money {
color: #f4516c;
}
.icon-shopping {
color: #34bfa3;
}
.card-panel-icon-wrapper {
float: none !important;
width: 100%;
height: 100%;
margin: 0 !important;
float: left;
margin: 14px 0 0 14px;
padding: 16px;
transition: all 0.38s ease-out;
border-radius: 6px;
}
.svg-icon {
display: block;
margin: 14px auto !important;
float: none !important;
.card-panel-icon {
float: left;
font-size: 48px;
}
.card-panel-description {
float: right;
font-weight: bold;
margin: 26px;
margin-left: 0px;
.card-panel-text {
line-height: 18px;
color: rgba(0, 0, 0, 0.45);
font-size: 16px;
margin-bottom: 12px;
}
.card-panel-num {
font-size: 20px;
}
}
}
}
@media (max-width: 550px) {
.card-panel-description {
display: none;
}
.card-panel-icon-wrapper {
float: none !important;
width: 100%;
height: 100%;
margin: 0 !important;
.svg-icon {
display: block;
margin: 14px auto !important;
float: none !important;
}
}
}
.baseInfo {
/deep/ .el-card__header {
padding: 15px 20px !important;
}
}
.ivu-mb {
margin-bottom: 10px;
}
.up,
.el-icon-caret-top {
color: #f5222d;
font-size: 12px;
opacity: 1 !important;
}
.down,
.el-icon-caret-bottom {
color: #39c15b;
font-size: 12px;
/*opacity: 100% !important;*/
}
.content {
&-number {
font-size: 30px;
}
&-time {
font-size: 14px;
/*color: #8C8C8C;*/
}
}
.spBlock {
display: block;
}
</style>

View File

@ -1,50 +1,72 @@
<template>
<el-row :gutter="40" class="panel-group">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="today" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">今日订单数</div>
<count-to :start-val="0" :end-val="count.todayCount" :duration="2600" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-message">
<svg-icon icon-class="ic-yesterday" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">昨日订单数</div>
<count-to :start-val="0" :end-val="count.proCount" :duration="3000" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-money">
<svg-icon icon-class="seven" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">近七天订单数</div>
<count-to :start-val="0" :end-val="count.lastWeekCount" :duration="3200" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-shopping">
<svg-icon icon-class="monthlyview" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">本月订单数</div>
<count-to :start-val="0" :end-val="count.monthCount" :duration="3600" class="card-panel-num" />
</div>
</div>
</el-col>
</el-row>
<div class="divBox">
<el-row :gutter="24" class="dashboard-console-grid">
<el-col v-bind="grid" class="ivu-mb">
<el-card :bordered="false">
<router-link :to="{ path: '/shop/cate' }">
<i class="el-icon-goods" style="color: #69c0ff" />
<p>商品管理</p>
</router-link>
</el-card>
</el-col>
<el-col v-bind="grid" class="ivu-mb">
<el-card :bordered="false">
<router-link :to="{ path: '/member/member' }">
<i class="el-icon-user" style="color: #95de64" />
<p>会员管理</p>
</router-link>
</el-card>
</el-col>
<el-col v-bind="grid" class="ivu-mb">
<el-card :bordered="false">
<router-link :to="{ path: '/order/order' }">
<i class="el-icon-s-order" style="color: #ff9c6e" />
<p>订单管理</p>
</router-link>
</el-card>
</el-col>
<el-col v-bind="grid" class="ivu-mb">
<el-card :bordered="false">
<router-link :to="{ path: '/syscoupon/coupon' }">
<i class="el-icon-s-ticket" style="color: #b37feb" />
<p>电子券管理</p>
</router-link>
</el-card>
</el-col>
<el-col v-bind="grid" class="ivu-mb">
<el-card :bordered="false">
<router-link :to="{ path: '/activity/combination' }">
<i class="el-icon-postcard" style="color: #ffd666" />
<p>营销管理</p>
</router-link>
</el-card>
</el-col>
<el-col v-bind="grid" class="ivu-mb">
<el-card :bordered="false">
<router-link :to="{ path: '/promoter/promoterconfig' }">
<i class="el-icon-notebook-1" style="color: #5cdbd3" />
<p>分销管理</p>
</router-link>
</el-card>
</el-col>
<el-col v-bind="grid" class="ivu-mb">
<el-card :bordered="false">
<router-link :to="{ path: '/price/extract' }">
<i class="el-icon-s-finance" style="color: #ff85c0" />
<p>财务管理</p>
</router-link>
</el-card>
</el-col>
<el-col v-bind="grid" class="ivu-mb">
<el-card :bordered="false">
<router-link :to="{ path: '/store/storeinfo' }">
<i class="el-icon-office-building" style="color: #ffc069" />
<p>门店管理</p>
</router-link>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import CountTo from 'vue-count-to'
@ -56,7 +78,14 @@ export default {
data() {
return {
count: { todayPrice: 0, todayCount: 0, proPrice: 0, proCount: 0,
monthPrice: 0, monthCount: 0, lastWeekCount: 0, lastWeekPrice: 0 }
monthPrice: 0, monthCount: 0, lastWeekCount: 0, lastWeekPrice: 0 },
grid: {
xl: 3,
lg: 3,
md: 6,
sm: 8,
xs: 8,
},
}
},
mounted() {
@ -134,4 +163,29 @@ export default {
}
}
}
.ivu-mb {
margin-bottom: 10px;
}
.divBox {
// padding: 0 20px !important;
}
.dashboard-console-grid {
text-align: center;
.ivu-card-body {
padding: 0;
}
i {
font-size: 32px;
}
a {
display: block;
color: inherit;
}
p {
margin-top: 8px;
}
}
</style>

View File

@ -24,7 +24,14 @@ export default {
},
data() {
return {
chart: null
chart: null,
grid: {
xl: 3,
lg: 6,
md: 6,
sm: 8,
xs: 8,
},
}
},
mounted() {

View File

@ -79,6 +79,10 @@
label="日期框"
value="Date"
/>
<el-option
label="图片文件"
value="Imges"
/>
</el-select>
</template>
</el-table-column>
@ -267,6 +271,7 @@ export default {
this.$refs['form'].validate((valid) => {
if (valid) {
this.configLoading = true
this.form.apiPath='';
update(this.form).then(res => {
this.notify('保存成功', 'success')
this.form = res

View File

@ -5,72 +5,135 @@
<panel-group />
<panel-group-t />
<el-row :gutter="32">
<el-col :xs="16" :sm="16" :lg="8">
<order-count></order-count>
</el-col>
<el-col :xs="16" :sm="16" :lg="8">
<div class="chart-wrapper">
<p>本月成交额</p>
<bar-chart />
<div class="divBox">
<el-card :bordered="false" dis-hover>
<div slot="header">
<div class="acea-row row-middle">
<el-avatar
icon="el-icon-s-operation"
size="small"
style="color: #1890ff; background: #e6f7ff; font-size: 13px"
/>
<span class="ivu-pl-8">统计</span>
</div>
</div>
</el-col>
<el-col :xs="16" :sm="16" :lg="8">
<div class="chart-wrapper">
<p>本月订单数</p>
<pie-chart />
</div>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col
:xl="8"
:lg="8"
:md="24"
:sm="24"
:xs="24"
class="ivu-mb mb10 dashboard-console-visit"
>
<span class="ivu-pl-8">商品分析</span>
<order-count></order-count>
</el-col>
<el-col
:xl="8"
:lg="8"
:md="24"
:sm="24"
:xs="24"
class="ivu-mb mb10 dashboard-console-visit"
>
<span class="ivu-pl-8">本月成交额</span>
<bar-chart />
</el-col>
<el-col
:xl="8"
:lg="8"
:md="24"
:sm="24"
:xs="24"
class="ivu-mb mb10 dashboard-console-visit"
>
<span class="ivu-pl-8">本月订单数</span>
<pie-chart />
</el-col>
</el-row>
</el-card>
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import PanelGroup from './dashboard/PanelGroup'
import PanelGroupT from './dashboard/PanelGroupT'
import PieChart from './dashboard/BarChartT'
import BarChart from './dashboard/BarChart'
import { count } from '@/api/visits'
import YshopInfo from './dashboard/YshopInfo'
import OrderCount from './dashboard/OrderCount'
import { mapGetters } from "vuex";
import PanelGroup from "./dashboard/PanelGroup";
import PanelGroupT from "./dashboard/PanelGroupT";
import PieChart from "./dashboard/BarChartT";
import BarChart from "./dashboard/BarChart";
import { count } from "@/api/visits";
import YshopInfo from "./dashboard/YshopInfo";
import OrderCount from "./dashboard/OrderCount";
/**
* 记录访问,只有页面刷新或者第一次加载才会记录
*/
count().then(res => {
})
* 记录访问,只有页面刷新或者第一次加载才会记录
*/
count().then((res) => {});
export default {
name: 'Dashboard',
name: "Dashboard",
components: {
PanelGroup,
PanelGroupT,
PieChart,
BarChart,
YshopInfo,
OrderCount
OrderCount,
},
computed: {
...mapGetters([
'roles'
])
}
}
...mapGetters(["roles"]),
},
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.dashboard-editor-container {
padding: 18px 22px 22px 22px;
background-color: rgb(240, 242, 245);
.dashboard-editor-container {
padding: 18px 22px 22px 22px;
background-color: rgb(240, 242, 245);
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
}
}
.acea-row {
/deep/.el-avatar--small {
width: 22px;
height: 22px;
line-height: 22px;
}
}
.checkTime {
/deep/.el-radio__input {
display: none;
}
}
.ivu-pl-8 {
margin-left: 8px;
font-size: 14px;
}
.divBox {
// padding: 0 20px !important;
}
.dashboard-console-visit {
/deep/.el-card__header {
padding: 14px 20px !important;
}
ul {
li {
list-style-type: none;
margin-top: 12px;
}
}
}
.ivu-mb {
margin-bottom: 10px;
}
</style>

View File

@ -1,8 +1,25 @@
<template>
<div class="login">
<div style="display:flex;justify-content:space-between;align-items: center;">
<div style="padding: 0 60px 0 0">
<h3 style="color: #ffffff;font-size: 24px;padding: 0;margin-bottom: 10px">
YSHOP单商户B2C电商系统
</h3>
<ul style="margin: 0;color: #ffffff;font-size: 15px;line-height: 25px;padding-left: 20px">
<li>Springboot2</li>
<li>MybatisPlus</li>
<li>SpringSecurity</li>
<li>Jwt</li>
<li>Redis</li>
<li>Vue</li>
</ul>
<h3 style="color: #ffffff;">
官网:https://www.yixiang.co
</h3>
</div>
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form">
<h3 class="title">
YSHOP后台管理系统-3.1
YSHOP后台管理系统-3.2
</h3>
<el-form-item prop="username">
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
@ -32,6 +49,7 @@
</el-button>
</el-form-item>
</el-form>
</div>
<!-- 底部 -->
<div v-if="$store.state.settings.showFooter" id="el-login-footer">
<span v-html="$store.state.settings.footerTxt" />

View File

@ -0,0 +1,144 @@
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission"/>
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
:title="crud.status.title" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="版本名称">
<el-input v-model="form.versionName" style="width: 370px;"/>
</el-form-item>
<el-form-item label="版本描述">
<el-input v-model="form.versionInfo" style="width: 370px;"/>
</el-form-item>
<el-form-item label="版本code">
<el-input v-model="form.versionCode" style="width: 370px;"/>
</el-form-item>
<el-form-item label="ios应用商店链接">
<el-input v-model="form.iosUrl" style="width: 370px;"/>
</el-form-item>
<el-form-item label="安卓下载链接">
<el-input v-model="form.androidUrl" style="width: 370px;"/>
</el-form-item>
<el-form-item label="是否强制升级">
<el-radio v-for="item in dict.force_update" :key="item.id" v-model="form.forceUpdate" :label="item.value">
{{ item.label }}
</el-radio>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;"
@selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55"/>
<el-table-column v-if="columns.visible('versionName')" prop="versionName" label="版本名称"/>
<el-table-column v-if="columns.visible('versionInfo')" prop="versionInfo" label="版本描述"/>
<el-table-column v-if="columns.visible('versionCode')" prop="versionCode" label="版本code"/>
<el-table-column v-if="columns.visible('iosUrl')" prop="iosUrl" label="ios store应用商店链接"/>
<el-table-column v-if="columns.visible('androidUrl')" prop="androidUrl" label="安卓下载链接"/>
<el-table-column v-if="columns.visible('forceUpdate')" prop="forceUpdate" label="是否强制升级">
<template slot-scope="scope">
{{ dict.label.force_update[scope.row.forceUpdate] }}
</template>
</el-table-column>
<el-table-column v-if="columns.visible('createTime')" prop="createTime" label="更新时间">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column v-permission="['admin','yxAppVersion:edit','yxAppVersion:del']" label="操作" width="150px"
align="center">
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="permission"
/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination/>
</div>
</div>
</template>
<script>
import crudYxAppVersion from '@/api/yxAppVersion'
import CRUD, {presenter, header, form, crud} from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import MaterialList from "@/components/material";
// crud交由presenter持有
const defaultCrud = CRUD({
title: 'app版本控制',
url: 'api/yxAppVersion',
sort: 'id,desc',
crudMethod: {...crudYxAppVersion}
})
const defaultForm = {
id: null,
isDel: null,
createTime: null,
updateTime: null,
versionCode: null,
versionName: null,
versionInfo: null,
iosUrl: null,
androidUrl: null,
forceUpdate: null
}
export default {
name: 'YxAppVersion',
components: {pagination, crudOperation, rrOperation, udOperation, MaterialList},
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()],
dicts: ['force_update'],
data() {
return {
permission: {
add: ['admin', 'yxAppVersion:add'],
edit: ['admin', 'yxAppVersion:edit'],
del: ['admin', 'yxAppVersion:del']
},
rules: {}
}
},
watch: {},
methods: {
// 获取数据前设置好接口地址
[CRUD.HOOK.beforeRefresh]() {
return true
}, // 新增与编辑前做的操作
[CRUD.HOOK.afterToCU](crud, form) {
},
}
}
</script>
<style scoped>
.table-img {
display: inline-block;
text-align: center;
background: #ccc;
color: #fff;
white-space: nowrap;
position: relative;
overflow: hidden;
vertical-align: middle;
width: 32px;
height: 32px;
line-height: 32px;
}
</style>

View File

@ -0,0 +1,262 @@
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-input
v-model="query.nickName"
clearable
placeholder="输入用户昵称"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<el-input
v-model="query.remark"
clearable
placeholder="输入备注"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<rrOperation :crud="crud" />
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<!--表单组件-->
<el-dialog
:close-on-click-modal="false"
:before-close="crud.cancelCU"
:visible.sync="crud.status.cu > 0"
:title="crud.status.title"
width="750px"
>
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="120px">
<el-form-item label="用户昵称">
<el-input v-model="form.nickName" style="width: 485px;" :disabled="true" />
</el-form-item>
<el-form-item label="openId">
<el-input v-model="form.openId" style="width: 485px;" :disabled="true" />
</el-form-item>
<el-form-item label="扫码获取">
<div class="qrcode_img">
<el-image :src="gzhsrc" class="qrcode">
<div slot="placeholder" class="image-slot">
加载中
<span class="dot">...</span>
</div>
</el-image>
<div class="attention">
<span class="demonstration">注:未关注公众号请先关注</span>
</div>
</div>
<div class="qrcode_img">
<el-image :src="src" class="qrcode">
<div slot="placeholder" class="image-slot">
加载中
<span class="dot">...</span>
</div>
</el-image>
</div>
</el-form-item>
<el-form-item label="备注" style="margin-top:40px">
<el-input v-model="form.remark" style="width: 485px;" />
</el-form-item>
<el-form-item label="是否启用">
<el-radio v-for="item in dict.is_enable" :key="item.id" v-model="form.isEnable" :label="item.value">{{ item.label }}</el-radio>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
size="small"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column v-if="columns.visible('id')" prop="id" label="id" />
<el-table-column v-if="columns.visible('nickName')" prop="nickName" label="用户昵称" />
<el-table-column v-if="columns.visible('openId')" prop="openId" label="用户标识" />
<el-table-column v-if="columns.visible('remark')" prop="remark" label="备注" />
<el-table-column v-if="columns.visible('isEnable')" prop="isEnable" label="是否启用">
<template slot-scope="scope">
{{ dict.label.is_enable[scope.row.isEnable] }}
</template>
</el-table-column>
<el-table-column v-if="columns.visible('createTime')" prop="createTime" label="创建时间">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column
v-permission="['admin','yzCustomer:edit','yzCustomer:del']"
label="操作"
width="150px"
align="center"
>
<template slot-scope="scope">
<udOperation :data="scope.row" :permission="permission" />
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
import crudYzCustomer from "@/api/yxStoreCustomer";
import CRUD, { presenter, header, form, crud } from "@crud/crud";
import rrOperation from "@crud/RR.operation";
import crudOperation from "@crud/CRUD.operation";
import udOperation from "@crud/UD.operation";
import pagination from "@crud/Pagination";
import { RandomNumber } from "@/utils/index";
// crud交由presenter持有
const defaultCrud = CRUD({
title: "消息通知",
url: "api/yxStoreCustomer",
sort: "id,desc",
crudMethod: { ...crudYzCustomer }
});
const defaultForm = {
id: null,
nickName: null,
openId: null,
remark: null,
createTime: null,
updateTime: null
};
export default {
name: "yxStoreCustomer",
components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()],
dicts: ['is_enable'],
data() {
return {
timer: null, //定时器
src: "",
gzhsrc: "",
permission: {
add: ["admin", "yzCustomer:add"],
edit: ["admin", "yzCustomer:edit"],
del: ["admin", "yzCustomer:del"]
},
rules: {}
};
},
created() {
this.init();
},
methods: {
// 获取数据前设置好接口地址
[CRUD.HOOK.beforeRefresh]() {
const query = this.query;
if (query.type && query.value) {
this.crud.params[query.type] = query.value;
}
return true;
},
[CRUD.HOOK.beforeToAdd]() {
this.randomStr = RandomNumber();
this.src =
process.env.VUE_APP_BASE_API + "/api/wxmp/qrcode?key=" + this.randomStr;
this.setIntervaltimer();
crudYzCustomer.getwechatCode()
//getOpenId("FK14YV17TURrFdyWG4")
.then(res => {
if (res != "") {
this.gzhsrc = res;
console.log(res);
}
})
.catch(err => {
console.log(err.response.data.message);
});
return true;
},
//新增与编辑前做的操作
[CRUD.HOOK.afterToCU](crud, form) {
},
[CRUD.HOOK.beforeToCU]() {
this.randomStr = RandomNumber();
this.src =
process.env.VUE_APP_BASE_API + "/api/wxmp/qrcode?key=" + this.randomStr;
this.setIntervaltimer();
return true;
},
[CRUD.HOOK.afterAddCancel]() {
clearInterval(this.timer);
this.timer = null;
return true;
},
[CRUD.HOOK.afterEditCancel]() {
clearInterval(this.timer);
this.timer = null;
return true;
},
[CRUD.HOOK.afterAddCancel]() {
clearInterval(this.timer);
this.timer = null;
return true;
},
init() {},
setIntervaltimer() {
if (this.timer != null) {
clearInterval(this.timer);
this.timer = null;
}
this.timer = setInterval(() => {
crudYzCustomer.getOpenId(this.randomStr)
//getOpenId("FK14YV17TURrFdyWG4")
.then(res => {
if (res != "") {
this.form.nickName = res.nickName;
this.form.openId = res.openId;
clearInterval(this.timer);
this.timer = null;
}
})
.catch(err => {
console.log(err.response.data.message);
});
}, 2000);
return this.timer;
}
}
};
</script>
<style scoped>
.qrcode_img {
width: 250px;
height: 250px;
float: left;
}
.qrcode_img .qrcode {
width: 100%;
height: 100%;
}
.attention {
line-height: 0px;
color: red;
margin-left: 20px;
font-size: 19px;
}
</style>

View File

@ -50,6 +50,14 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="开启积分兑换:" props="is_integral">
<el-radio-group v-model="formValidate.is_integral" @change="changeSpec">
<el-radio :label="0" class="radio">不开启</el-radio>
<el-radio :label="1">开启</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<!-- 多规格添加-->
<el-col :span="24" v-if="formValidate.spec_type === 1" class="noForm">
<el-col :span="24">
@ -169,11 +177,16 @@
<el-input type="text" v-model="scope.row.weight"/>
</template>
</el-table-column>
<el-table-column prop="volume" label="体积(m³" align="center">
<el-table-column prop="volume" label="体积(m³)" align="center">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.volume"/>
</template>
</el-table-column>
<el-table-column prop="volume" label="所需兑换积分" align="center">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.integral"/>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
@ -202,7 +215,7 @@
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-form-item label="积分:">
<el-form-item label="购买返回积分:">
<el-input-number v-model="formValidate.give_integral" :min="0" placeholder="请输入积分" />
</el-form-item>
</el-col>
@ -262,13 +275,15 @@
</el-image>
</template>
</el-table-column>
<el-table-column prop="sku" label="规格" align="center" />
<el-table-column prop="price" label="售价" align="center" />
<el-table-column prop="cost" label="成本价" align="center" />
<el-table-column prop="ot_price" label="原价" align="center" />
<el-table-column prop="stock" label="库存" align="center" />
<el-table-column prop="bar_code" label="商品编号" align="center" />
<el-table-column prop="weight" label="重量KG" align="center" />
<el-table-column prop="volume" label="体积(m³" align="center" />
<el-table-column prop="volume" label="体积(m³)" align="center" />
<el-table-column prop="integral" label="所需兑换积分" align="center" />
<el-table-column prop="volume" label="一级返佣" align="center">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.brokerage"/>
@ -375,7 +390,8 @@ export default {
pink_stock: 0,
pink_price: 0,
weight: 0,
volume: 0
volume: 0,
integral:0
}
],
// 规格数据
@ -415,6 +431,7 @@ export default {
is_good: 0,
is_postage: 0,
is_sub: 0,
is_integral: 0,
id: 0,
spec_type: 0,
temp_id: '',
@ -426,7 +443,8 @@ export default {
cost: 0,
ot_price: 0,
stock: 0,
bar_code: ''
bar_code: '',
integral:0
}
],
header: [],
@ -454,7 +472,8 @@ export default {
weight: 0,
volume: 0,
brokerage: 0,
brokerage_two: 0
brokerage_two: 0,
integral: 0
}
],
images: [],
@ -674,7 +693,8 @@ export default {
weight:0,
volume:0,
brokerage:0,
brokerage_two:0
brokerage_two:0,
integral:0
}
]
}

View File

@ -48,6 +48,12 @@
<el-table-column prop="price" label="商品价格" />
<el-table-column prop="sales" label="销量" />
<el-table-column prop="stock" label="库存" />
<el-table-column label="商品类型" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.isIntegral === 1" style="cursor: pointer" :type="'warning'">积分商品</el-tag>
<el-tag v-else style="cursor: pointer" :type=" 'info' ">普通商品</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<div @click="onSale(scope.row.id,scope.row.isShow)">

View File

@ -1,13 +1,19 @@
<template>
<div class="app-container">
<div>
<el-steps :active="formatStepStatus(order._status)" finish-status="success" align-center>
<el-step title="提交订单" :description="formatTime(order.createTime)"></el-step>
<el-step title="支付订单" :description="formatTime(order.payTime)"></el-step>
<el-step title="平台发货" :description="formatTime(order.deliveryTime)"></el-step>
<el-step title="确认收货" :description="formatTime(order.receiveTime)"></el-step>
<el-step title="完成评价" :description="formatTime(order.commentTime)"></el-step>
<el-steps v-if="order.refundStatus===0" :active="orderStatus.size" align-center process-status="process" finish-status="success">
<el-step title="用户下单" :description="orderStatus.cacheKeyCreateOrder"></el-step>
<el-step title="待发货" :description="orderStatus.paySuccess"></el-step>
<el-step title="待收货" :description="orderStatus.deliveryGoods"></el-step>
<el-step title="待评价" :description="orderStatus.userTakeDelivery"></el-step>
<el-step title="完成" :description="orderStatus.checkOrderOver"></el-step>
</el-steps>
<el-steps v-else :active="order.refundStatus+1" align-center process-status="process" finish-status="success">
<el-step title="用户下单" :description="orderStatus.cacheKeyCreateOrder"></el-step>
<el-step title="用户申请退款" :description="orderStatus.applyRefund"></el-step>
<el-step title="退款申请通过" :description="orderStatus.refundOrderSuccess"></el-step>
</el-steps>
</div>
<el-card shadow="never" style="margin-top: 15px">
<div class="operate-container">
@ -60,7 +66,7 @@
<el-col :span="4" class="table-cell-title">物流单号</el-col>
<el-col :span="4" class="table-cell-title">自动确认收货时间</el-col>
<el-col :span="4" class="table-cell-title">订单可得积分</el-col>
<el-col :span="4" class="table-cell-title">填空待补充</el-col>
<el-col :span="4" class="table-cell-title">消费积分</el-col>
<el-col :span="4" class="table-cell-title">活动信息</el-col>
</el-row>
<el-row>
@ -68,7 +74,7 @@
<el-col :span="4" class="table-cell">{{order.deliverySn | formatNull}}</el-col>
<el-col :span="4" class="table-cell">7</el-col>
<el-col :span="4" class="table-cell">{{order.gainIntegral}}</el-col>
<el-col :span="4" class="table-cell">{{order.growth}}</el-col>
<el-col :span="4" class="table-cell">{{order.payIntegral}}</el-col>
<el-col :span="4" class="table-cell">
<el-popover
placement="top-start"
@ -373,7 +379,8 @@
</div>
</template>
<script>
import { express, getOrderDetail } from '@/api/yxStoreOrder'
import { express, getOrderDetail,
getNowOrderStatus} from '@/api/yxStoreOrder'
import {formatTimeTwo} from '@/utils/index';
import eForm from './form'
import eRefund from './refund'
@ -394,6 +401,7 @@ import eRemark from './remark'
components: {eForm, eRefund, editOrder, eRemark},
data() {
return {
orderStatus:null,
isAdd: false,
id: null,
order: {
@ -566,6 +574,7 @@ import eRemark from './remark'
shippingType: data.shippingType,
isChannel: data.isChannel,
isRemind: data.isRemind,
payIntegral: data.payIntegral,
isSystemDel: data.isSystemDel
}
_this.dialog = true
@ -625,6 +634,7 @@ import eRemark from './remark'
shippingType: data.shippingType,
isChannel: data.isChannel,
isRemind: data.isRemind,
payIntegral: data.payIntegral,
isSystemDel: data.isSystemDel
}
_this.dialog = true
@ -683,6 +693,7 @@ import eRemark from './remark'
shippingType: data.shippingType,
isChannel: data.isChannel,
isRemind: data.isRemind,
payIntegral: data.payIntegral,
isSystemDel: data.isSystemDel
}
_this.dialog = true
@ -741,6 +752,7 @@ import eRemark from './remark'
shippingType: data.shippingType,
isChannel: data.isChannel,
isRemind: data.isRemind,
payIntegral: data.payIntegral,
isSystemDel: data.isSystemDel
}
_this.dialog = true
@ -765,6 +777,7 @@ import eRemark from './remark'
init(){
let that = this;
let id = that.$route.params.id || 0;
this.getNowOrderStatus();
getOrderDetail(id).then(response => {
this.order = response;
this.userDTO = this.order.userDTO;
@ -784,13 +797,19 @@ import eRemark from './remark'
},
formatStepStatus(value) {
//todo 1-未付款 2-未发货 3-退款中 4-待收货 5-待评价 6-已完成 7-已退款
if (value === 2) {
if (value === 1) {
//待发货
return 2;
} else if (value === 4) {
return 1;
} else if (value === 2) {
//已发货
return 3;
} else if (value === 6) {
} else if (value === 3) {
//已完成
return 4;
} else if (value === 4) {
//已完成
return 5;
} else if (value === 5) {
//已完成
return 4;
}else {
@ -949,7 +968,19 @@ import eRemark from './remark'
showLogisticsDialog(){
this.express();
}
}, //获取当前订单状态
getNowOrderStatus() {
let id = this.$route.params.id || 0;
getNowOrderStatus(id)
.then(res => {
this.orderStatus = res;
})
.catch(err => {
console.log(err.response.data.message);
});
},
}
}
</script>

View File

@ -1,5 +1,27 @@
<template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '订单详情'" width="700px">
<el-card>
<div slot="header">
<span>进度信息</span>
</div>
<el-steps
v-if="form.refundStatus===0"
:active="orderStatus.size"
align-center
process-status="process"
finish-status="success"
>
<el-step title="用户下单" :description="orderStatus.cacheKeyCreateOrder"></el-step>
<el-step title="待核销" :description="orderStatus.paySuccess"></el-step>
<el-step title="待评价" :description="orderStatus.orderVerific"></el-step>
<el-step title="已完成" :description="orderStatus.checkOrderOver"></el-step>
</el-steps>
<el-steps v-else :active="form.refundStatus+1" align-center process-status="process" finish-status="success">
<el-step title="用户下单" :description="orderStatus.cacheKeyCreateOrder"></el-step>
<el-step title="用户申请退款" :description="orderStatus.applyRefund"></el-step>
<el-step title="退款申请通过" :description="orderStatus.refundOrderSuccess"></el-step>
</el-steps>
</el-card>
<el-card>
<div slot="header">
<span>收货信息</span>
@ -65,8 +87,9 @@
</template>
<script>
import { add, edit, express } from '@/api/yxStoreOrder'
import { parseTime } from '@/utils/index'
import { add, edit, express,
getNowOrderStatus } from '@/api/yxStoreOrder'
import {formatTimeTwo, parseTime} from '@/utils/index'
export default {
props: {
isAdd: {
@ -76,6 +99,7 @@ export default {
},
data() {
return {
orderStatus:null,
loading: false, dialog: false, expressInfo: [],
form: {
id: '',
@ -138,6 +162,11 @@ export default {
}
}
},
watch: {
'form': function(val) {
this.getNowOrderStatus();
}
},
methods: {
parseTime,
cancel() {
@ -196,6 +225,28 @@ export default {
this.loading = false
console.log(err.response.data.message)
})
}, formatTime(time) {
if (time == null || time === '') {
return '';
}
let date = new Date(time);
return formatTimeTwo(date, 'yyyy-MM-dd hh:mm:ss')
},
formatStepStatus(value) {
//todo 1-未付款 2-未发货 3-退款中 4-待收货 5-待评价 6-已完成 7-已退款
if (value === 2) {
//待发货
return 2;
} else if (value === 4) {
//已发货
return 3;
} else if (value === 6) {
//已完成
return 4;
}else {
//待付款、已关闭、无限订单
return 1;
}
},
resetForm() {
this.dialog = false
@ -253,7 +304,18 @@ export default {
isRemind: '',
isSystemDel: ''
}
}
},
getNowOrderStatus() {
let id = this.form.id || 0;
getNowOrderStatus(id)
.then(res => {
this.orderStatus = res;
})
.catch(err => {
console.log(err.response.data.message);
});
},
}
}
</script>

View File

@ -8,7 +8,7 @@
v-for="item in express"
:key="item.id"
:label="item.name"
:value="item.id"
:value="item.name"
/>
</el-select>
</el-form-item>
@ -25,7 +25,7 @@
<script>
import { add, edit, get } from '@/api/yxStoreOrder'
import { add, edit, get,updateDelivery } from '@/api/yxStoreOrder'
export default {
props: {
isAdd: {
@ -79,19 +79,36 @@ export default {
})
},
doEdit() {
edit(this.form).then(res => {
this.resetForm()
this.$notify({
title: '操作成功',
type: 'success',
duration: 2500
if(this.form._status == 4){
updateDelivery(this.form).then(res => {
this.resetForm()
this.$notify({
title: '操作成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
this.loading = false
this.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
}else{
edit(this.form).then(res => {
this.resetForm()
this.$notify({
title: '操作成功',
type: 'success',
duration: 2500
})
this.loading = false
this.$parent.init()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
}
},
resetForm() {
this.dialog = false

View File

@ -118,6 +118,7 @@
</template>
</el-table-column>
<el-table-column prop="payPrice" label="实际支付" />
<el-table-column prop="payIntegral" label="消费积分" />
<el-table-column prop="payTypeName" label="支付状态" />
<el-table-column prop="statusName" label="订单状态">
<template slot-scope="scope">
@ -159,6 +160,14 @@
@click="edit(scope.row)"
>
去发货</el-button>
<el-button
v-if="scope.row._status == 4"
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']"
size="mini"
type="primary"
@click="edit(scope.row)"
>
修改快递</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button
@ -275,7 +284,9 @@
{ value: '1', label: '普通订单' },
{ value: '2', label: '拼团订单' },
{ value: '3', label: '秒杀订单' },
{ value: '4', label: '砍价订单' }
{ value: '4', label: '砍价订单' },
{ value: '5', label: '核销订单' },
{ value: '6', label: '积分订单' }
],
handleOptions: [
{value: '', label: '批量操作'},
@ -396,7 +407,8 @@
shippingType: data.shippingType,
isChannel: data.isChannel,
isRemind: data.isRemind,
isSystemDel: data.isSystemDel
isSystemDel: data.isSystemDel,
_status:data._status
}
_this.dialog = true
},

View File

@ -113,23 +113,84 @@ export default {
}
},
methods: {
getDeptDatas(tree, treeNode, resolve) {
const params = { pid: tree.id }
setTimeout(() => {
crudDept.getDepts(params).then(res => {
resolve(res.content)
})
}, 100)
},
// 新增与编辑前做的操作
[CRUD.HOOK.afterToCU](crud, form) {
if (form.pid !== null) {
form.isTop = '0'
} else if (form.id !== null) {
form.isTop = '1'
}
form.enabled = `${form.enabled}`
// 获取所有部门
crudDept.getDepts({ enabled: true }).then(res => {
this.depts = res.content
if (form.id != null) {
this.getSupDepts(form.id)
} else {
this.getDepts()
}
},
getSupDepts(id) {
var data={"pid":id};
crudDept.getDeptSuperior(data).then(res => {
const date = res.content
this.buildDepts(date)
this.depts = date
})
},
buildDepts(depts) {
depts.forEach(data => {
if (data.children) {
this.buildDepts(data.children)
}
if (data.hasChildren && !data.children) {
data.children = null
}
})
},
getDepts() {
crudDept.getDepts({ enabled: true }).then(res => {
this.depts = res.content.map(function(obj) {
if (obj.hasChildren) {
obj.children = null
}
return obj
})
})
},
// 获取弹窗内部门数据
loadDepts({ action, parentNode, callback }) {
if (action === LOAD_CHILDREN_OPTIONS) {
crudDept.getDepts({ enabled: true, pid: parentNode.id }).then(res => {
parentNode.children = res.content.map(function(obj) {
if (obj.hasChildren) {
obj.children = null
}
return obj
})
setTimeout(() => {
callback()
}, 100)
})
}
},
// 提交前的验证
[CRUD.HOOK.afterValidateCU]() {
if (!this.form.pid) {
if (this.form.pid !== null && this.form.pid === this.form.id) {
this.$message({
message: '上级部门不能为空',
type: 'warning'
})
return false
}
if (this.form.isTop === '1') {
this.form.pid = null
}
return true
},
// 改变状态
@ -156,5 +217,14 @@ export default {
}
</script>
<style scoped>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .vue-treeselect__control,::v-deep .vue-treeselect__placeholder,::v-deep .vue-treeselect__single-value {
height: 30px;
line-height: 30px;
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-input-number .el-input__inner {
text-align: left;
}
</style>

View File

@ -255,6 +255,9 @@ export default {
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
],
roles: [
{ required: true, message: '请选择角色', trigger: 'blur' },
],
phone: [
{ required: true, trigger: 'blur', validator: validPhone }
]

View File

@ -41,7 +41,8 @@ export default {
data() {
return {
zones: ['华东', '华北', '华南', '北美', '东南亚'], dialog: false,
loading: false, form: { accessKey: '', secretKey: '', bucket: '', host: '', zone: '', type: '' },
loading: false,
form: { accessKey: '', secretKey: '', bucket: '', host: '', zone: '', type: '' },
rules: {
accessKey: [
{ required: true, message: '请输入accessKey', trigger: 'blur' }
@ -64,7 +65,9 @@ export default {
methods: {
init() {
get().then(res => {
this.form = res
if(res){
this.form = res
}
})
},
doSubmit() {

View File

@ -17,7 +17,17 @@
<el-input v-model="form.api" :disabled="true" style="width: 370px;" />
</el-form-item>
<el-form-item label="微信分享图片">
<MaterialList v-model="form.imageArr" style="width: 370px" type="image" :num="1" :width="150" :height="150" />
<MaterialList v-model="imageArr" style="width: 370px" type="image" :num="1" :width="150" :height="150" />
</el-form-item>
<el-form-item label="关注二维码">
<MaterialList
v-model="wechat_follow_imgArr"
style="width: 500px"
type="image"
:num="1"
:width="150"
:height="150"
/>
</el-form-item>
<el-form-item label="微信分享标题">
<el-input v-model="form.wechat_share_title" style="width: 370px;" />
@ -47,6 +57,8 @@ export default {
mixins: [initData],
data() {
return {
wechat_follow_imgArr:[],
imageArr: [],
delLoading: false,
form: {
wechat_name: '',
@ -58,12 +70,12 @@ export default {
wechat_encode: '',
wechat_encodingaeskey: '',
wechat_share_img: '',
imageArr: [],
wechat_follow_img: '',
wechat_qrcode: '',
wechat_type: '',
wechat_share_title: '',
wechat_share_synopsis: '',
api: 'http://你的H5端域名/api/wechat/serve',
api: 'http://你的yshop-app端域名/api/wechat/serve',
wechat_avatar: ''
},
rules: {
@ -71,10 +83,14 @@ export default {
}
},
watch: {
'form.imageArr': function(val) {
imageArr: function(val) {
if (val) {
this.form.wechat_share_img = val.join(',')
}
},wechat_follow_imgArr: function(val) {
if (val) {
this.form.wechat_follow_img = val.join(',')
}
}
},
created() {
@ -88,7 +104,8 @@ export default {
}
})
this.form.imageArr = this.form.wechat_share_img.split(',')
this.imageArr = this.form.wechat_share_img.split(',')
this.wechat_follow_imgArr = this.form.wechat_follow_img.split(',')
})
},
methods: {

View File

@ -71,6 +71,7 @@ export default {
})
this.form.file_store_mode = parseInt(this.form.file_store_mode)
this.form.yshop_show_recharge = parseInt(this.form.yshop_show_recharge)
})
},
methods: {

View File

@ -26,62 +26,62 @@
</crudOperation>
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="800px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="140px">
<el-form-item label="选择商品" prop="coverImgeUrl" >
<cgood v-model="form.good":disabled="isdisabled" ></cgood>
</el-form-item>
<el-form-item label="商品封面图" prop="coverImgeUrl">
<single-pic v-model="form.coverImgeUrl" type="image" :num="1" :width="150" :height="150" />
<p style="color: #cf0f0f">图片规则图片尺寸最大300像素*300像素</p>
</el-form-item>
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="140px">
<el-form-item label="选择商品" prop="coverImgeUrl" >
<cgood v-model="form.good":disabled="isdisabled" ></cgood>
</el-form-item>
<el-form-item label="商品封面图" prop="coverImgeUrl">
<single-pic v-model="form.coverImgeUrl" type="image" :num="1" :width="150" :height="150" />
<p style="color: #cf0f0f">图片规则图片尺寸最大300像素*300像素</p>
</el-form-item>
<el-form-item label="商品小程序路径" prop="url" >
<el-input v-model="form.url" style="width: 370px;" :disabled="isdisabled"/>
</el-form-item>
<!-- 1一口价只需要传入priceprice2不传-->
<!-- 2价格区间price字段为左边界price2字段为右边界price和price2必传-->
<!-- 3显示折扣价price字段为原价price2字段为现价 price和price2必传-->
<el-form-item label="商品名称" prop="name" >
<el-input v-model="form.name" style="width: 370px;" :disabled="isdisabled"/>
</el-form-item>
<el-form-item label="价格类型" prop="priceType" >
<el-radio-group v-model="form.priceType" >
<el-radio :label="'1'" class="radio">一口价</el-radio>
<el-radio :label="'2'" class="radio">价格区间</el-radio>
<el-radio :label="'3'" class="radio">显示折扣价</el-radio>
</el-radio-group>
<p v-if="isdisabled" style="color: #cf0f0f">商品审核通过已入库,只能修改价格</p>
</el-form-item>
<el-col v-if="form.priceType=='1'" v-bind="grid">
<el-form-item label="一口价" prop="price" >
<el-input v-model="form.price" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col v-if="form.priceType=='2'" v-bind="grid">
<el-form-item label="最低价格" prop="price" >
<el-input v-model="form.price" style="width: 200px;"/>
</el-form-item>
</el-col>
<el-col v-if="form.priceType=='2'" v-bind="grid">
<el-form-item label="最高价格" prop="price2" >
<el-input v-model="form.price2" style="width: 200px;"/>
</el-form-item>
</el-col>
<el-col v-if="form.priceType=='3'" v-bind="grid">
<el-form-item label="市场价" prop="price" >
<el-input v-model="form.price" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col v-if="form.priceType=='3'" v-bind="grid">
<el-form-item label="现价" prop="price2" >
<el-input v-model="form.price2" style="width: 200px;"/>
</el-form-item>
</el-col>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
<el-form-item label="商品小程序路径" prop="url" >
<el-input v-model="form.url" style="width: 370px;" :disabled="true"/>
</el-form-item>
<!-- 1一口价只需要传入priceprice2不传-->
<!-- 2价格区间price字段为左边界price2字段为右边界price和price2必传-->
<!-- 3显示折扣价price字段为原价price2字段为现价 price和price2必传-->
<el-form-item label="商品名称" prop="name" >
<el-input v-model="form.name" style="width: 370px;" :disabled="isdisabled"/>
</el-form-item>
<el-form-item label="价格类型" prop="priceType" >
<el-radio-group v-model="form.priceType" >
<el-radio :label="'1'" class="radio">一口价</el-radio>
<el-radio :label="'2'" class="radio">价格区间</el-radio>
<el-radio :label="'3'" class="radio">显示折扣价</el-radio>
</el-radio-group>
<p v-if="isdisabled" style="color: #cf0f0f">商品审核通过已入库,只能修改价格</p>
</el-form-item>
<el-col v-if="form.priceType=='1'" v-bind="grid">
<el-form-item label="一口价" prop="price" >
<el-input v-model="form.price" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col v-if="form.priceType=='2'" v-bind="grid">
<el-form-item label="最低价格" prop="price" >
<el-input v-model="form.price" style="width: 200px;"/>
</el-form-item>
</el-col>
<el-col v-if="form.priceType=='2'" v-bind="grid">
<el-form-item label="最高价格" prop="price2" >
<el-input v-model="form.price2" style="width: 200px;"/>
</el-form-item>
</el-col>
<el-col v-if="form.priceType=='3'" v-bind="grid">
<el-form-item label="市场价" prop="price" >
<el-input v-model="form.price" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col v-if="form.priceType=='3'" v-bind="grid">
<el-form-item label="现价" prop="price2" >
<el-input v-model="form.price2" style="width: 200px;"/>
</el-form-item>
</el-col>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
@ -104,10 +104,10 @@
</div>
</template>
</el-table-column>
<!-- <el-table-column v-if="columns.visible('price')" prop="price" label="price" />-->
<!-- <el-table-column v-if="columns.visible('price2')" prop="price2" label="price2" />-->
<!-- <el-table-column v-if="columns.visible('price')" prop="price" label="price" />-->
<!-- <el-table-column v-if="columns.visible('price2')" prop="price2" label="price2" />-->
<el-table-column v-if="columns.visible('auditStatus')" prop="auditStatus" label="审核状态" >
<!-- //0未审核1审核中2:审核通过3审核失败-->
<!-- //0未审核1审核中2:审核通过3审核失败-->
<template slot-scope="scope">
<div>
<el-tag v-if="scope.row.auditStatus === 0" :type="''">未审核</el-tag>
@ -117,7 +117,7 @@
</div>
</template>
</el-table-column>
<!-- 1, 2表示是为api添加商品否则是直播控制台添加的商品-->
<!-- 1, 2表示是为api添加商品否则是直播控制台添加的商品-->
<el-table-column v-if="columns.visible('thirdPartyTag')" prop="thirdPartyTag" label="添加途径" >
<template slot-scope="scope">
<div>
@ -179,9 +179,6 @@ export default {
coverImgUrl: [
{ required: true, message: '商品图片不能为空', trigger: 'blur' }
],
url: [
{ required: true, message: '商品小程序路径不能为空', trigger: 'blur' }
],
priceType: [
{ required: true, message: '价格类型不能为空', trigger: 'blur' }
],
@ -199,12 +196,15 @@ export default {
},
watch:{
'form.good': {
handler(val,oldVal){
handler(val,oldVal){
this.form.productId = val.productId
this.form.name = val.storeName
this.form.price = val.price
this.form.price2 = val.otPrice
this.form.priceType = '3'
if(val.productId){
this.form.url="/pages/shop/GoodsCon/index?id="+val.productId
}
this.isdisabled=false;
},
deep:true//对象内部的属性监听,也叫深度监听
@ -301,17 +301,17 @@ export default {
</script>
<style scoped>
.table-img {
display: inline-block;
text-align: center;
background: #ccc;
color: #fff;
white-space: nowrap;
position: relative;
overflow: hidden;
vertical-align: middle;
width: 32px;
height: 32px;
line-height: 32px;
}
.table-img {
display: inline-block;
text-align: center;
background: #ccc;
color: #fff;
white-space: nowrap;
position: relative;
overflow: hidden;
vertical-align: middle;
width: 32px;
height: 32px;
line-height: 32px;
}
</style>