update
This commit is contained in:
23
package.json
23
package.json
@ -34,6 +34,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@riophae/vue-treeselect": "0.1.0",
|
"@riophae/vue-treeselect": "0.1.0",
|
||||||
|
"@vue/babel-plugin-transform-vue-jsx": "^1.2.1",
|
||||||
"axios": "0.18.1",
|
"axios": "0.18.1",
|
||||||
"clipboard": "2.0.4",
|
"clipboard": "2.0.4",
|
||||||
"codemirror": "^5.49.2",
|
"codemirror": "^5.49.2",
|
||||||
@ -44,6 +45,7 @@
|
|||||||
"element-ui": "^2.12.0",
|
"element-ui": "^2.12.0",
|
||||||
"file-saver": "1.3.8",
|
"file-saver": "1.3.8",
|
||||||
"fuse.js": "3.4.4",
|
"fuse.js": "3.4.4",
|
||||||
|
"js-beautify": "^1.10.2",
|
||||||
"js-cookie": "2.2.0",
|
"js-cookie": "2.2.0",
|
||||||
"jsencrypt": "^3.0.0-rc.1",
|
"jsencrypt": "^3.0.0-rc.1",
|
||||||
"jszip": "3.1.5",
|
"jszip": "3.1.5",
|
||||||
@ -53,24 +55,23 @@
|
|||||||
"path-to-regexp": "2.4.0",
|
"path-to-regexp": "2.4.0",
|
||||||
"qs": "^6.9.1",
|
"qs": "^6.9.1",
|
||||||
"screenfull": "4.2.0",
|
"screenfull": "4.2.0",
|
||||||
|
"sortablejs": "1.8.4",
|
||||||
"vue": "2.6.10",
|
"vue": "2.6.10",
|
||||||
"vue-count-to": "1.0.13",
|
"vue-count-to": "1.0.13",
|
||||||
"vue-cropper": "0.4.9",
|
"vue-cropper": "0.4.9",
|
||||||
"vue-highlightjs": "^1.3.3",
|
"vue-highlightjs": "^1.3.3",
|
||||||
"vue-router": "3.0.2",
|
"vue-router": "3.0.2",
|
||||||
"vue-splitpane": "1.0.4",
|
"vue-splitpane": "1.0.4",
|
||||||
|
"vue-ueditor-wrap": "^2.4.1",
|
||||||
|
"vuedraggable": "2.20.0",
|
||||||
"vuex": "3.1.0",
|
"vuex": "3.1.0",
|
||||||
"wangeditor": ">=3.0.0",
|
"wangeditor": ">=3.0.0",
|
||||||
"xlsx": "^0.11.16",
|
"xlsx": "^0.11.16"
|
||||||
"js-beautify": "^1.10.2",
|
|
||||||
"sortablejs": "1.8.4",
|
|
||||||
"vuedraggable": "2.20.0",
|
|
||||||
"vue-ueditor-wrap": "^2.4.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.0.0",
|
"@babel/core": "7.0.0",
|
||||||
"@babel/register": "7.0.0",
|
|
||||||
"@babel/parser": "^7.7.4",
|
"@babel/parser": "^7.7.4",
|
||||||
|
"@babel/register": "7.0.0",
|
||||||
"@vue/cli-plugin-babel": "3.5.3",
|
"@vue/cli-plugin-babel": "3.5.3",
|
||||||
"@vue/cli-plugin-eslint": "^3.9.1",
|
"@vue/cli-plugin-eslint": "^3.9.1",
|
||||||
"@vue/cli-plugin-unit-jest": "3.5.3",
|
"@vue/cli-plugin-unit-jest": "3.5.3",
|
||||||
@ -80,6 +81,8 @@
|
|||||||
"babel-core": "7.0.0-bridge.0",
|
"babel-core": "7.0.0-bridge.0",
|
||||||
"babel-eslint": "10.0.1",
|
"babel-eslint": "10.0.1",
|
||||||
"babel-jest": "23.6.0",
|
"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",
|
"chalk": "2.4.2",
|
||||||
"chokidar": "2.1.5",
|
"chokidar": "2.1.5",
|
||||||
"connect": "3.6.6",
|
"connect": "3.6.6",
|
||||||
@ -96,13 +99,11 @@
|
|||||||
"script-ext-html-webpack-plugin": "2.1.3",
|
"script-ext-html-webpack-plugin": "2.1.3",
|
||||||
"script-loader": "0.7.2",
|
"script-loader": "0.7.2",
|
||||||
"serve-static": "^1.13.2",
|
"serve-static": "^1.13.2",
|
||||||
|
"stylus": "^0.54.7",
|
||||||
|
"stylus-loader": "^3.0.2",
|
||||||
"svg-sprite-loader": "4.1.3",
|
"svg-sprite-loader": "4.1.3",
|
||||||
"svgo": "1.2.0",
|
"svgo": "1.2.0",
|
||||||
"vue-template-compiler": "2.6.10",
|
"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"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.9",
|
"node": ">=8.9",
|
||||||
|
@ -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 }
|
||||||
|
@ -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) {
|
export function addObj(obj) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/materialgroup',
|
url: 'api/materialgroup',
|
||||||
|
27
src/api/yxAppVersion.js
Normal file
27
src/api/yxAppVersion.js
Normal 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 }
|
46
src/api/yxStoreCustomer.js
Normal file
46
src/api/yxStoreCustomer.js
Normal 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 }
|
@ -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) {
|
export function editT(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/yxStoreOrder/check',
|
url: 'api/yxStoreOrder/check',
|
||||||
@ -77,3 +85,9 @@ export function getOrderDetail(id) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getNowOrderStatus(id) {
|
||||||
|
return request({
|
||||||
|
url: '/api/getNowOrderStatus/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -25,7 +25,7 @@ export function edit(data) {
|
|||||||
|
|
||||||
export function get() {
|
export function get() {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/yxSystemConfig?size=50',
|
url: 'api/yxSystemConfig?size=500',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 531 KiB |
@ -18,6 +18,9 @@ export default class Dict {
|
|||||||
ps.push(getDictDetail(n).then(data => {
|
ps.push(getDictDetail(n).then(data => {
|
||||||
this.dict[n].splice(0, 0, ...data.content)
|
this.dict[n].splice(0, 0, ...data.content)
|
||||||
data.content.forEach(d => {
|
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.dict[n], d.value, d)
|
||||||
Vue.set(this.dict.label[n], d.value, d.label)
|
Vue.set(this.dict.label[n], d.value, d.label)
|
||||||
})
|
})
|
||||||
|
@ -145,7 +145,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 { getPage, addObj, delObj, putObj } from '@/api/tools/material'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
@ -260,13 +260,13 @@ export default {
|
|||||||
this.materialgroupLoading = true
|
this.materialgroupLoading = true
|
||||||
materialgroupPage({
|
materialgroupPage({
|
||||||
total: 0, // 总页数
|
total: 0, // 总页数
|
||||||
currentPage: 1, // 当前页数
|
page: 1, // 当前页数
|
||||||
pageSize: 100, // 每页显示多少条
|
size: 100, // 每页显示多少条
|
||||||
ascs: [], // 升序字段
|
ascs: [], // 升序字段
|
||||||
descs: 'create_time'// 降序字段
|
sort: 'create_time,desc'// 降序字段
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.materialgroupLoading = false
|
this.materialgroupLoading = false
|
||||||
const materialgroupList = response.content
|
const materialgroupList = response
|
||||||
materialgroupList.unshift({
|
materialgroupList.unshift({
|
||||||
id: '-1',
|
id: '-1',
|
||||||
name: '全部分组'
|
name: '全部分组'
|
||||||
@ -466,7 +466,6 @@ export default {
|
|||||||
this.urls.forEach(item => {
|
this.urls.forEach(item => {
|
||||||
str += '<img src="' + item + '">'
|
str += '<img src="' + item + '">'
|
||||||
// this.$set(this.value, this.value.length, item)
|
// this.$set(this.value, this.value.length, item)
|
||||||
|
|
||||||
})
|
})
|
||||||
nowEditor.dialog.close(true)
|
nowEditor.dialog.close(true)
|
||||||
nowEditor.editor.setContent(str, true)
|
nowEditor.editor.setContent(str, true)
|
||||||
|
@ -146,7 +146,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 { getPage, addObj, delObj, putObj } from '@/api/tools/material'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
@ -256,13 +256,13 @@ export default {
|
|||||||
this.materialgroupLoading = true
|
this.materialgroupLoading = true
|
||||||
materialgroupPage({
|
materialgroupPage({
|
||||||
total: 0, // 总页数
|
total: 0, // 总页数
|
||||||
currentPage: 1, // 当前页数
|
page: 1, // 当前页数
|
||||||
pageSize: 100, // 每页显示多少条
|
size: 100, // 每页显示多少条
|
||||||
ascs: [], // 升序字段
|
ascs: [], // 升序字段
|
||||||
descs: 'create_time'// 降序字段
|
sort: 'create_time,desc'// 降序字段
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.materialgroupLoading = false
|
this.materialgroupLoading = false
|
||||||
const materialgroupList = response.content
|
const materialgroupList = response
|
||||||
materialgroupList.unshift({
|
materialgroupList.unshift({
|
||||||
id: '-1',
|
id: '-1',
|
||||||
name: '全部分组'
|
name: '全部分组'
|
||||||
|
@ -139,7 +139,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 { getPage, addObj, delObj, putObj } from '@/api/tools/material'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
@ -210,7 +210,7 @@ export default {
|
|||||||
])
|
])
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value: function (val) {
|
value: function(val) {
|
||||||
this.myValue = val
|
this.myValue = val
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -252,13 +252,13 @@ export default {
|
|||||||
this.materialgroupLoading = true
|
this.materialgroupLoading = true
|
||||||
materialgroupPage({
|
materialgroupPage({
|
||||||
total: 0, // 总页数
|
total: 0, // 总页数
|
||||||
currentPage: 1, // 当前页数
|
page: 1, // 当前页数
|
||||||
pageSize: 100, // 每页显示多少条
|
size: 100, // 每页显示多少条
|
||||||
ascs: [], // 升序字段
|
ascs: [], // 升序字段
|
||||||
descs: 'create_time'// 降序字段
|
sort: 'create_time,desc'// 降序字段
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.materialgroupLoading = false
|
this.materialgroupLoading = false
|
||||||
const materialgroupList = response.content
|
const materialgroupList = response
|
||||||
materialgroupList.unshift({
|
materialgroupList.unshift({
|
||||||
id: '-1',
|
id: '-1',
|
||||||
name: '全部分组'
|
name: '全部分组'
|
||||||
@ -454,7 +454,7 @@ export default {
|
|||||||
return isPic && isLt2M
|
return isPic && isLt2M
|
||||||
},
|
},
|
||||||
sureUrls() {
|
sureUrls() {
|
||||||
console.log('this.urls:'+this.urls)
|
console.log('this.urls:' + this.urls)
|
||||||
this.myValue = this.urls[0]
|
this.myValue = this.urls[0]
|
||||||
this.$emit('input', this.urls[0])
|
this.$emit('input', this.urls[0])
|
||||||
this.listDialogVisible = false
|
this.listDialogVisible = false
|
||||||
|
@ -2,7 +2,7 @@ module.exports = {
|
|||||||
/**
|
/**
|
||||||
* @description 网站标题
|
* @description 网站标题
|
||||||
*/
|
*/
|
||||||
title: 'YSHOP-3.1',
|
title: 'YSHOP-3.2',
|
||||||
/**
|
/**
|
||||||
* @description 是否显示 tagsView
|
* @description 是否显示 tagsView
|
||||||
*/
|
*/
|
||||||
@ -42,9 +42,9 @@ module.exports = {
|
|||||||
/**
|
/**
|
||||||
* 底部文字,支持html语法
|
* 底部文字,支持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号'
|
||||||
}
|
}
|
||||||
|
@ -419,3 +419,16 @@ export function downloadFile(obj, name, suffix) {
|
|||||||
link.click()
|
link.click()
|
||||||
document.body.removeChild(link)
|
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
|
||||||
|
}
|
||||||
|
@ -160,11 +160,16 @@
|
|||||||
<el-input type="text" v-model="scope.row.weight" :disabled="true"/>
|
<el-input type="text" v-model="scope.row.weight" :disabled="true"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<template slot-scope="scope">
|
||||||
<el-input type="text" v-model="scope.row.volume" :disabled="true"/>
|
<el-input type="text" v-model="scope.row.volume" :disabled="true"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -223,7 +228,8 @@ export default {
|
|||||||
pink_stock: 0,
|
pink_stock: 0,
|
||||||
pink_price: 0,
|
pink_price: 0,
|
||||||
weight: 0,
|
weight: 0,
|
||||||
volume: 0
|
volume: 0,
|
||||||
|
integral:0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 规格数据
|
// 规格数据
|
||||||
@ -262,6 +268,7 @@ export default {
|
|||||||
info: '',
|
info: '',
|
||||||
price: '',
|
price: '',
|
||||||
sort: 0,
|
sort: 0,
|
||||||
|
integral: 0,
|
||||||
sales: '',
|
sales: '',
|
||||||
stock: '',
|
stock: '',
|
||||||
addTime: '',
|
addTime: '',
|
||||||
@ -295,7 +302,8 @@ export default {
|
|||||||
cost: 0,
|
cost: 0,
|
||||||
ot_price: 0,
|
ot_price: 0,
|
||||||
stock: 0,
|
stock: 0,
|
||||||
bar_code: ''
|
bar_code: '',
|
||||||
|
integral:0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
header: [],
|
header: [],
|
||||||
@ -323,7 +331,8 @@ export default {
|
|||||||
weight: 0,
|
weight: 0,
|
||||||
volume: 0,
|
volume: 0,
|
||||||
brokerage: 0,
|
brokerage: 0,
|
||||||
brokerage_two: 0
|
brokerage_two: 0,
|
||||||
|
integral:0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
images: [],
|
images: [],
|
||||||
@ -506,7 +515,7 @@ export default {
|
|||||||
// 详情选择商品生成规格用
|
// 详情选择商品生成规格用
|
||||||
getInfoChooseGood (id) {
|
getInfoChooseGood (id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
getInfo(id).then(async res => {
|
getInfo(id==null?0:id).then(async res => {
|
||||||
let data = res.productInfo;
|
let data = res.productInfo;
|
||||||
if(data){
|
if(data){
|
||||||
that.attrs = data.items || [];
|
that.attrs = data.items || [];
|
||||||
|
@ -48,6 +48,13 @@ export default {
|
|||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
"form.product":function(val){
|
||||||
|
if(val){
|
||||||
|
this.getGoods(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false, dialog: false,
|
loading: false, dialog: false,
|
||||||
|
@ -166,11 +166,16 @@
|
|||||||
<el-input type="text" v-model="scope.row.weight" :disabled="true"/>
|
<el-input type="text" v-model="scope.row.weight" :disabled="true"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<template slot-scope="scope">
|
||||||
<el-input type="text" v-model="scope.row.volume" :disabled="true"/>
|
<el-input type="text" v-model="scope.row.volume" :disabled="true"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -230,7 +235,8 @@ export default {
|
|||||||
seckill_stock: 0,
|
seckill_stock: 0,
|
||||||
seckill_price: 0,
|
seckill_price: 0,
|
||||||
weight: 0,
|
weight: 0,
|
||||||
volume: 0
|
volume: 0,
|
||||||
|
integral:0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 规格数据
|
// 规格数据
|
||||||
@ -274,6 +280,7 @@ export default {
|
|||||||
sort: 0,
|
sort: 0,
|
||||||
sales: '',
|
sales: '',
|
||||||
stock: '',
|
stock: '',
|
||||||
|
integral: 0,
|
||||||
addTime: '',
|
addTime: '',
|
||||||
isHost: '',
|
isHost: '',
|
||||||
isShow: '',
|
isShow: '',
|
||||||
@ -304,7 +311,8 @@ export default {
|
|||||||
cost: 0,
|
cost: 0,
|
||||||
ot_price: 0,
|
ot_price: 0,
|
||||||
stock: 0,
|
stock: 0,
|
||||||
bar_code: ''
|
bar_code: '',
|
||||||
|
integral: 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
header: [],
|
header: [],
|
||||||
@ -332,6 +340,7 @@ export default {
|
|||||||
weight: 0,
|
weight: 0,
|
||||||
volume: 0,
|
volume: 0,
|
||||||
brokerage: 0,
|
brokerage: 0,
|
||||||
|
integral: 0,
|
||||||
brokerage_two: 0
|
brokerage_two: 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -552,6 +561,7 @@ export default {
|
|||||||
weight:0,
|
weight:0,
|
||||||
volume:0,
|
volume:0,
|
||||||
brokerage:0,
|
brokerage:0,
|
||||||
|
integral: 0,
|
||||||
brokerage_two:0
|
brokerage_two:0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -604,6 +614,7 @@ export default {
|
|||||||
weight:0,
|
weight:0,
|
||||||
volume:0,
|
volume:0,
|
||||||
brokerage:0,
|
brokerage:0,
|
||||||
|
integral: 0,
|
||||||
brokerage_two:0
|
brokerage_two:0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -99,7 +99,7 @@ export default {
|
|||||||
beforeInit() {
|
beforeInit() {
|
||||||
this.url = 'api/yxStoreProduct'
|
this.url = 'api/yxStoreProduct'
|
||||||
const sort = 'id,desc'
|
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 query = this.query
|
||||||
const type = query.type
|
const type = query.type
|
||||||
const value = query.value
|
const value = query.value
|
||||||
|
@ -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
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
width="55">
|
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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
newValue:this.value,
|
lastPage: 0,
|
||||||
|
selectGoods: new Map(),
|
||||||
|
newValue: this.value,
|
||||||
delLoading: false,
|
delLoading: false,
|
||||||
visible: false,
|
visible: false,
|
||||||
queryTypeOptions: [
|
queryTypeOptions: [
|
||||||
@ -126,11 +158,20 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
doSelect() {
|
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.$emit("selectGoods", this.newValue)
|
||||||
this.dialog = false
|
this.dialog = false
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
|
var map = this.selectGoods;
|
||||||
|
map.set(this.lastPage, val);
|
||||||
|
this.selectGoods = map;
|
||||||
this.multipleSelection = val;
|
this.multipleSelection = val;
|
||||||
},
|
},
|
||||||
toSelete() {
|
toSelete() {
|
||||||
@ -140,11 +181,13 @@ export default {
|
|||||||
beforeInit() {
|
beforeInit() {
|
||||||
this.url = 'api/yxStoreProduct'
|
this.url = 'api/yxStoreProduct'
|
||||||
const sort = 'id,desc'
|
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 query = this.query
|
||||||
const type = query.type
|
const type = query.type
|
||||||
const value = query.value
|
const value = query.value
|
||||||
if (type && value) { this.params[type] = value }
|
if (type && value) {
|
||||||
|
this.params[type] = value
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,87 +1,127 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="className" :style="{height:height,width:width}" />
|
<div :class="className" ref="chart" :style="{ height: height, width: width }" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from "echarts";
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require("echarts/theme/macarons"); // echarts theme
|
||||||
import { getOrderCount } from '@/api/visits'
|
import { getOrderCount } from "@/api/visits";
|
||||||
import { debounce } from '@/utils'
|
import { debounce } from "@/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
className: {
|
className: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'chart'
|
default: "chart",
|
||||||
},
|
},
|
||||||
width: {
|
width: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '100%'
|
default: "100%",
|
||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '300px'
|
default: "300px",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chart: null,
|
chart: null,
|
||||||
column: [],
|
column: [],
|
||||||
orderCountDatas: []
|
orderCountDatas: [],
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
getOrderCount().then(res => {
|
getOrderCount()
|
||||||
this.column = res.column,
|
.then((res) => {
|
||||||
this.orderCountDatas = res.orderCountDatas
|
(this.column = res.column),
|
||||||
}).then(() =>{
|
(this.orderCountDatas = res.orderCountDatas);
|
||||||
this.initChart()
|
|
||||||
})
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.initChart();
|
||||||
|
});
|
||||||
|
|
||||||
this.__resizeHandler = debounce(() => {
|
this.__resizeHandler = debounce(() => {
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
this.chart.resize()
|
this.chart.resize();
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100);
|
||||||
window.addEventListener('resize', this.__resizeHandler)
|
window.addEventListener("resize", this.__resizeHandler);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
window.removeEventListener('resize', this.__resizeHandler)
|
window.removeEventListener("resize", this.__resizeHandler);
|
||||||
this.chart.dispose()
|
this.chart.dispose();
|
||||||
this.chart = null
|
this.chart = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart() {
|
initChart() {
|
||||||
this.chart = echarts.init(this.$el, 'macarons')
|
this.chart = echarts.init(this.$refs.chart, "macarons");
|
||||||
|
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: "item",
|
||||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
formatter: "{a} <br/>{b} : {c} ({d}%)",
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
left: 'center',
|
left: "center",
|
||||||
bottom: '10',
|
bottom: "10",
|
||||||
data: this.column
|
data: this.column,
|
||||||
},
|
},
|
||||||
calculable: true,
|
calculable: true,
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '商品分类销售占总销售的比例',
|
name: "商品分类销售占总销售的比例",
|
||||||
type: 'pie',
|
type: "pie",
|
||||||
roseType: 'radius',
|
roseType: "radius",
|
||||||
radius: [15, 95],
|
radius: [15, 95],
|
||||||
center: ['50%', '38%'],
|
center: ["50%", "38%"],
|
||||||
data: this.orderCountDatas,
|
data: this.orderCountDatas,
|
||||||
animationEasing: 'cubicInOut',
|
animationEasing: "cubicInOut",
|
||||||
animationDuration: 2600
|
animationDuration: 2600,
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.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>
|
||||||
|
|
||||||
|
@ -1,96 +1,124 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-row :gutter="40" class="panel-group">
|
<div>
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<div class="divBox">
|
||||||
<div class="card-panel">
|
<el-row :gutter="24" class="baseInfo">
|
||||||
<div class="card-panel-icon-wrapper icon-people">
|
<el-col :xs="12" :sm="12" :lg="6" class="ivu-mb">
|
||||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
<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>
|
||||||
<div class="card-panel-description">
|
<div class="content" v-if="count">
|
||||||
<div class="card-panel-text">
|
<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>
|
<div class="acea-row row-between-wrapper">
|
||||||
<count-to :start-val="0" :end-val="count.userCount" :duration="2600" class="card-panel-num" />
|
<span class="content-time">今日订单数</span>
|
||||||
|
<span>{{ count.todayCount }} 单</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<el-col :xs="12" :sm="12" :lg="6" class="ivu-mb">
|
||||||
<div class="card-panel">
|
<el-card :bordered="false" dis-hover :padding="12">
|
||||||
<div class="card-panel-icon-wrapper icon-message">
|
<div slot="header" class="acea-row row-between-wrapper">
|
||||||
<svg-icon icon-class="order" class-name="card-panel-icon" />
|
<span>订单总数</span>
|
||||||
|
<el-tag type="success">全平台</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="content" v-if="count">
|
||||||
<div class="card-panel-text">
|
<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>
|
<div class="acea-row row-between-wrapper">
|
||||||
<count-to :start-val="0" :end-val="count.orderCount" :duration="3000" class="card-panel-num" />
|
<span class="content-time">昨日订单数</span>
|
||||||
|
<span>{{ count.lastWeekCount }} 单</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<el-col :xs="12" :sm="12" :lg="6" class="ivu-mb">
|
||||||
<div class="card-panel">
|
<el-card :bordered="false" dis-hover :padding="12">
|
||||||
<div class="card-panel-icon-wrapper icon-money">
|
<div slot="header" class="acea-row row-between-wrapper">
|
||||||
<svg-icon icon-class="money" class-name="card-panel-icon" />
|
<span>总金额</span>
|
||||||
|
<el-tag type="success">全平台</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="content" v-if="count">
|
||||||
<div class="card-panel-text">
|
<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>
|
<div class="acea-row row-between-wrapper">
|
||||||
<count-to :start-val="0" :end-val="count.priceCount" :duration="3200" class="card-panel-num" />
|
<span class="content-time">近七天订单数</span>
|
||||||
|
<span>{{ count.lastWeekCount }} 单</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<el-col :xs="12" :sm="12" :lg="6" class="ivu-mb">
|
||||||
<div class="card-panel" >
|
<el-card :bordered="false" dis-hover :padding="12">
|
||||||
<div class="card-panel-icon-wrapper icon-shopping">
|
<div slot="header" class="acea-row row-between-wrapper">
|
||||||
<svg-icon icon-class="shopping" class-name="card-panel-icon" />
|
<span>商品总数</span>
|
||||||
|
<el-tag type="success">全平台</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="content" v-if="count">
|
||||||
<div class="card-panel-text">
|
<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>
|
<div class="acea-row row-between-wrapper">
|
||||||
<count-to :start-val="0" :end-val="count.goodsCount" :duration="3600" class="card-panel-num" />
|
<span class="content-time">本月订单数</span>
|
||||||
|
<span>{{ count.monthCount }} 单</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import CountTo from 'vue-count-to'
|
import CountTo from "vue-count-to";
|
||||||
import { gett } from '@/api/visits'
|
import { gett } from "@/api/visits";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
CountTo
|
CountTo,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
count: { todayPrice: 0, todayCount: 0, proPrice: 0, proCount: 0,
|
count: {
|
||||||
monthPrice: 0, monthCount: 0, lastWeekCount: 0, lastWeekPrice: 0,
|
todayPrice: 0,
|
||||||
userCount: 0, orderCount: 0, priceCount: 0, goodsCount: 0}
|
todayCount: 0,
|
||||||
}
|
proPrice: 0,
|
||||||
|
proCount: 0,
|
||||||
|
monthPrice: 0,
|
||||||
|
monthCount: 0,
|
||||||
|
lastWeekCount: 0,
|
||||||
|
lastWeekPrice: 0,
|
||||||
|
userCount: 0,
|
||||||
|
orderCount: 0,
|
||||||
|
priceCount: 0,
|
||||||
|
goodsCount: 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
gett().then(res => {
|
gett().then((res) => {
|
||||||
this.count.todayPrice = res.todayPrice
|
this.count.todayPrice = res.todayPrice;
|
||||||
this.count.todayCount = res.todayCount
|
this.count.todayCount = res.todayCount;
|
||||||
this.count.proCount = res.proCount
|
this.count.proCount = res.proCount;
|
||||||
this.count.proPrice = res.proPrice
|
this.count.proPrice = res.proPrice;
|
||||||
|
|
||||||
this.count.monthPrice = res.monthPrice
|
this.count.monthPrice = res.monthPrice;
|
||||||
this.count.monthCount = res.monthCount
|
this.count.monthCount = res.monthCount;
|
||||||
this.count.lastWeekCount = res.lastWeekCount
|
this.count.lastWeekCount = res.lastWeekCount;
|
||||||
this.count.lastWeekPrice = res.lastWeekPrice
|
this.count.lastWeekPrice = res.lastWeekPrice;
|
||||||
|
|
||||||
this.count.userCount = res.userCount
|
this.count.userCount = res.userCount;
|
||||||
this.count.orderCount = res.orderCount
|
this.count.orderCount = res.orderCount;
|
||||||
this.count.priceCount = res.priceCount
|
this.count.priceCount = res.priceCount;
|
||||||
this.count.goodsCount = res.goodsCount
|
this.count.goodsCount = res.goodsCount;
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
.panel-group {
|
.panel-group {
|
||||||
margin-top: 18px;
|
margin-top: 18px;
|
||||||
|
|
||||||
.card-panel-col {
|
.card-panel-col {
|
||||||
@ -105,10 +133,8 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #666;
|
color: #666;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
|
box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
|
||||||
border-color: rgba(0, 0, 0, .05);
|
border-color: rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.icon-people {
|
.icon-people {
|
||||||
color: #40c9c6;
|
color: #40c9c6;
|
||||||
@ -123,7 +149,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon-shopping {
|
.icon-shopping {
|
||||||
color: #34bfa3
|
color: #34bfa3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-panel-icon-wrapper {
|
.card-panel-icon-wrapper {
|
||||||
@ -157,9 +183,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:550px) {
|
@media (max-width: 550px) {
|
||||||
.card-panel-description {
|
.card-panel-description {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -176,5 +202,40 @@ export default {
|
|||||||
float: none !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>
|
</style>
|
||||||
|
@ -1,50 +1,72 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-row :gutter="40" class="panel-group">
|
<div class="divBox">
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<el-row :gutter="24" class="dashboard-console-grid">
|
||||||
<div class="card-panel">
|
<el-col v-bind="grid" class="ivu-mb">
|
||||||
<div class="card-panel-icon-wrapper icon-people">
|
<el-card :bordered="false">
|
||||||
<svg-icon icon-class="today" class-name="card-panel-icon" />
|
<router-link :to="{ path: '/shop/cate' }">
|
||||||
</div>
|
<i class="el-icon-goods" style="color: #69c0ff" />
|
||||||
<div class="card-panel-description">
|
<p>商品管理</p>
|
||||||
<div class="card-panel-text">今日订单数</div>
|
</router-link>
|
||||||
<count-to :start-val="0" :end-val="count.todayCount" :duration="2600" class="card-panel-num" />
|
</el-card>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<el-col v-bind="grid" class="ivu-mb">
|
||||||
<div class="card-panel">
|
<el-card :bordered="false">
|
||||||
<div class="card-panel-icon-wrapper icon-message">
|
<router-link :to="{ path: '/member/member' }">
|
||||||
<svg-icon icon-class="ic-yesterday" class-name="card-panel-icon" />
|
<i class="el-icon-user" style="color: #95de64" />
|
||||||
</div>
|
<p>会员管理</p>
|
||||||
<div class="card-panel-description">
|
</router-link>
|
||||||
<div class="card-panel-text">昨日订单数</div>
|
</el-card>
|
||||||
<count-to :start-val="0" :end-val="count.proCount" :duration="3000" class="card-panel-num" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<el-col v-bind="grid" class="ivu-mb">
|
||||||
<div class="card-panel">
|
<el-card :bordered="false">
|
||||||
<div class="card-panel-icon-wrapper icon-money">
|
<router-link :to="{ path: '/order/order' }">
|
||||||
<svg-icon icon-class="seven" class-name="card-panel-icon" />
|
<i class="el-icon-s-order" style="color: #ff9c6e" />
|
||||||
</div>
|
<p>订单管理</p>
|
||||||
<div class="card-panel-description">
|
</router-link>
|
||||||
<div class="card-panel-text">近七天订单数</div>
|
</el-card>
|
||||||
<count-to :start-val="0" :end-val="count.lastWeekCount" :duration="3200" class="card-panel-num" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<el-col v-bind="grid" class="ivu-mb">
|
||||||
<div class="card-panel">
|
<el-card :bordered="false">
|
||||||
<div class="card-panel-icon-wrapper icon-shopping">
|
<router-link :to="{ path: '/syscoupon/coupon' }">
|
||||||
<svg-icon icon-class="monthlyview" class-name="card-panel-icon" />
|
<i class="el-icon-s-ticket" style="color: #b37feb" />
|
||||||
</div>
|
<p>电子券管理</p>
|
||||||
<div class="card-panel-description">
|
</router-link>
|
||||||
<div class="card-panel-text">本月订单数</div>
|
</el-card>
|
||||||
<count-to :start-val="0" :end-val="count.monthCount" :duration="3600" class="card-panel-num" />
|
</el-col>
|
||||||
</div>
|
<el-col v-bind="grid" class="ivu-mb">
|
||||||
</div>
|
<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-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import CountTo from 'vue-count-to'
|
import CountTo from 'vue-count-to'
|
||||||
@ -56,7 +78,14 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
count: { todayPrice: 0, todayCount: 0, proPrice: 0, proCount: 0,
|
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() {
|
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>
|
</style>
|
||||||
|
@ -24,7 +24,14 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chart: null
|
chart: null,
|
||||||
|
grid: {
|
||||||
|
xl: 3,
|
||||||
|
lg: 6,
|
||||||
|
md: 6,
|
||||||
|
sm: 8,
|
||||||
|
xs: 8,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -79,6 +79,10 @@
|
|||||||
label="日期框"
|
label="日期框"
|
||||||
value="Date"
|
value="Date"
|
||||||
/>
|
/>
|
||||||
|
<el-option
|
||||||
|
label="图片文件"
|
||||||
|
value="Imges"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -267,6 +271,7 @@ export default {
|
|||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.configLoading = true
|
this.configLoading = true
|
||||||
|
this.form.apiPath='';
|
||||||
update(this.form).then(res => {
|
update(this.form).then(res => {
|
||||||
this.notify('保存成功', 'success')
|
this.notify('保存成功', 'success')
|
||||||
this.form = res
|
this.form = res
|
||||||
|
@ -5,65 +5,94 @@
|
|||||||
<panel-group />
|
<panel-group />
|
||||||
<panel-group-t />
|
<panel-group-t />
|
||||||
|
|
||||||
<el-row :gutter="32">
|
<div class="divBox">
|
||||||
<el-col :xs="16" :sm="16" :lg="8">
|
<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-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>
|
<order-count></order-count>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="16" :sm="16" :lg="8">
|
<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>
|
||||||
|
|
||||||
<div class="chart-wrapper">
|
|
||||||
<p>本月成交额</p>
|
|
||||||
<bar-chart />
|
<bar-chart />
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="16" :sm="16" :lg="8">
|
<el-col
|
||||||
<div class="chart-wrapper">
|
:xl="8"
|
||||||
<p>本月订单数</p>
|
:lg="8"
|
||||||
|
:md="24"
|
||||||
|
:sm="24"
|
||||||
|
:xs="24"
|
||||||
|
class="ivu-mb mb10 dashboard-console-visit"
|
||||||
|
>
|
||||||
|
<span class="ivu-pl-8">本月订单数</span>
|
||||||
|
|
||||||
<pie-chart />
|
<pie-chart />
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from "vuex";
|
||||||
import PanelGroup from './dashboard/PanelGroup'
|
import PanelGroup from "./dashboard/PanelGroup";
|
||||||
import PanelGroupT from './dashboard/PanelGroupT'
|
import PanelGroupT from "./dashboard/PanelGroupT";
|
||||||
import PieChart from './dashboard/BarChartT'
|
import PieChart from "./dashboard/BarChartT";
|
||||||
import BarChart from './dashboard/BarChart'
|
import BarChart from "./dashboard/BarChart";
|
||||||
import { count } from '@/api/visits'
|
import { count } from "@/api/visits";
|
||||||
import YshopInfo from './dashboard/YshopInfo'
|
import YshopInfo from "./dashboard/YshopInfo";
|
||||||
import OrderCount from './dashboard/OrderCount'
|
import OrderCount from "./dashboard/OrderCount";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 记录访问,只有页面刷新或者第一次加载才会记录
|
* 记录访问,只有页面刷新或者第一次加载才会记录
|
||||||
*/
|
*/
|
||||||
count().then(res => {
|
count().then((res) => {});
|
||||||
})
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Dashboard',
|
name: "Dashboard",
|
||||||
components: {
|
components: {
|
||||||
PanelGroup,
|
PanelGroup,
|
||||||
PanelGroupT,
|
PanelGroupT,
|
||||||
PieChart,
|
PieChart,
|
||||||
BarChart,
|
BarChart,
|
||||||
YshopInfo,
|
YshopInfo,
|
||||||
OrderCount
|
OrderCount,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters(["roles"]),
|
||||||
'roles'
|
},
|
||||||
])
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
.dashboard-editor-container {
|
.dashboard-editor-container {
|
||||||
padding: 18px 22px 22px 22px;
|
padding: 18px 22px 22px 22px;
|
||||||
background-color: rgb(240, 242, 245);
|
background-color: rgb(240, 242, 245);
|
||||||
|
|
||||||
@ -72,5 +101,39 @@ export default {
|
|||||||
padding: 16px 16px 0;
|
padding: 16px 16px 0;
|
||||||
margin-bottom: 32px;
|
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>
|
</style>
|
||||||
|
@ -1,8 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<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">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form">
|
||||||
<h3 class="title">
|
<h3 class="title">
|
||||||
YSHOP后台管理系统-3.1
|
YSHOP后台管理系统-3.2
|
||||||
</h3>
|
</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
@ -32,6 +49,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</div>
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<div v-if="$store.state.settings.showFooter" id="el-login-footer">
|
<div v-if="$store.state.settings.showFooter" id="el-login-footer">
|
||||||
<span v-html="$store.state.settings.footerTxt" />
|
<span v-html="$store.state.settings.footerTxt" />
|
||||||
|
144
src/views/shop/appVersion/index.vue
Normal file
144
src/views/shop/appVersion/index.vue
Normal 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>
|
262
src/views/shop/customer/index.vue
Normal file
262
src/views/shop/customer/index.vue
Normal 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>
|
@ -50,6 +50,14 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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" v-if="formValidate.spec_type === 1" class="noForm">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@ -169,11 +177,16 @@
|
|||||||
<el-input type="text" v-model="scope.row.weight"/>
|
<el-input type="text" v-model="scope.row.weight"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<template slot-scope="scope">
|
||||||
<el-input type="text" v-model="scope.row.volume"/>
|
<el-input type="text" v-model="scope.row.volume"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -202,7 +215,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-bind="grid">
|
<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-input-number v-model="formValidate.give_integral" :min="0" placeholder="请输入积分" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -262,13 +275,15 @@
|
|||||||
</el-image>
|
</el-image>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="sku" label="规格" align="center" />
|
||||||
<el-table-column prop="price" label="售价" align="center" />
|
<el-table-column prop="price" label="售价" align="center" />
|
||||||
<el-table-column prop="cost" label="成本价" align="center" />
|
<el-table-column prop="cost" label="成本价" align="center" />
|
||||||
<el-table-column prop="ot_price" label="原价" align="center" />
|
<el-table-column prop="ot_price" label="原价" align="center" />
|
||||||
<el-table-column prop="stock" label="库存" align="center" />
|
<el-table-column prop="stock" label="库存" align="center" />
|
||||||
<el-table-column prop="bar_code" 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="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">
|
<el-table-column prop="volume" label="一级返佣" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input type="text" v-model="scope.row.brokerage"/>
|
<el-input type="text" v-model="scope.row.brokerage"/>
|
||||||
@ -375,7 +390,8 @@ export default {
|
|||||||
pink_stock: 0,
|
pink_stock: 0,
|
||||||
pink_price: 0,
|
pink_price: 0,
|
||||||
weight: 0,
|
weight: 0,
|
||||||
volume: 0
|
volume: 0,
|
||||||
|
integral:0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 规格数据
|
// 规格数据
|
||||||
@ -415,6 +431,7 @@ export default {
|
|||||||
is_good: 0,
|
is_good: 0,
|
||||||
is_postage: 0,
|
is_postage: 0,
|
||||||
is_sub: 0,
|
is_sub: 0,
|
||||||
|
is_integral: 0,
|
||||||
id: 0,
|
id: 0,
|
||||||
spec_type: 0,
|
spec_type: 0,
|
||||||
temp_id: '',
|
temp_id: '',
|
||||||
@ -426,7 +443,8 @@ export default {
|
|||||||
cost: 0,
|
cost: 0,
|
||||||
ot_price: 0,
|
ot_price: 0,
|
||||||
stock: 0,
|
stock: 0,
|
||||||
bar_code: ''
|
bar_code: '',
|
||||||
|
integral:0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
header: [],
|
header: [],
|
||||||
@ -454,7 +472,8 @@ export default {
|
|||||||
weight: 0,
|
weight: 0,
|
||||||
volume: 0,
|
volume: 0,
|
||||||
brokerage: 0,
|
brokerage: 0,
|
||||||
brokerage_two: 0
|
brokerage_two: 0,
|
||||||
|
integral: 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
images: [],
|
images: [],
|
||||||
@ -674,7 +693,8 @@ export default {
|
|||||||
weight:0,
|
weight:0,
|
||||||
volume:0,
|
volume:0,
|
||||||
brokerage:0,
|
brokerage:0,
|
||||||
brokerage_two:0
|
brokerage_two:0,
|
||||||
|
integral:0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,12 @@
|
|||||||
<el-table-column prop="price" label="商品价格" />
|
<el-table-column prop="price" label="商品价格" />
|
||||||
<el-table-column prop="sales" label="销量" />
|
<el-table-column prop="sales" label="销量" />
|
||||||
<el-table-column prop="stock" 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">
|
<el-table-column label="状态" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div @click="onSale(scope.row.id,scope.row.isShow)">
|
<div @click="onSale(scope.row.id,scope.row.isShow)">
|
||||||
|
@ -1,13 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div>
|
<div>
|
||||||
<el-steps :active="formatStepStatus(order._status)" finish-status="success" align-center>
|
<el-steps v-if="order.refundStatus===0" :active="orderStatus.size" align-center process-status="process" finish-status="success">
|
||||||
<el-step title="提交订单" :description="formatTime(order.createTime)"></el-step>
|
<el-step title="用户下单" :description="orderStatus.cacheKeyCreateOrder"></el-step>
|
||||||
<el-step title="支付订单" :description="formatTime(order.payTime)"></el-step>
|
<el-step title="待发货" :description="orderStatus.paySuccess"></el-step>
|
||||||
<el-step title="平台发货" :description="formatTime(order.deliveryTime)"></el-step>
|
<el-step title="待收货" :description="orderStatus.deliveryGoods"></el-step>
|
||||||
<el-step title="确认收货" :description="formatTime(order.receiveTime)"></el-step>
|
<el-step title="待评价" :description="orderStatus.userTakeDelivery"></el-step>
|
||||||
<el-step title="完成评价" :description="formatTime(order.commentTime)"></el-step>
|
<el-step title="已完成" :description="orderStatus.checkOrderOver"></el-step>
|
||||||
</el-steps>
|
</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>
|
</div>
|
||||||
<el-card shadow="never" style="margin-top: 15px">
|
<el-card shadow="never" style="margin-top: 15px">
|
||||||
<div class="operate-container">
|
<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-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>
|
||||||
<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">{{order.deliverySn | formatNull}}</el-col>
|
||||||
<el-col :span="4" class="table-cell">7天</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.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-col :span="4" class="table-cell">
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="top-start"
|
placement="top-start"
|
||||||
@ -373,7 +379,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { express, getOrderDetail } from '@/api/yxStoreOrder'
|
import { express, getOrderDetail,
|
||||||
|
getNowOrderStatus} from '@/api/yxStoreOrder'
|
||||||
import {formatTimeTwo} from '@/utils/index';
|
import {formatTimeTwo} from '@/utils/index';
|
||||||
import eForm from './form'
|
import eForm from './form'
|
||||||
import eRefund from './refund'
|
import eRefund from './refund'
|
||||||
@ -394,6 +401,7 @@ import eRemark from './remark'
|
|||||||
components: {eForm, eRefund, editOrder, eRemark},
|
components: {eForm, eRefund, editOrder, eRemark},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
orderStatus:null,
|
||||||
isAdd: false,
|
isAdd: false,
|
||||||
id: null,
|
id: null,
|
||||||
order: {
|
order: {
|
||||||
@ -566,6 +574,7 @@ import eRemark from './remark'
|
|||||||
shippingType: data.shippingType,
|
shippingType: data.shippingType,
|
||||||
isChannel: data.isChannel,
|
isChannel: data.isChannel,
|
||||||
isRemind: data.isRemind,
|
isRemind: data.isRemind,
|
||||||
|
payIntegral: data.payIntegral,
|
||||||
isSystemDel: data.isSystemDel
|
isSystemDel: data.isSystemDel
|
||||||
}
|
}
|
||||||
_this.dialog = true
|
_this.dialog = true
|
||||||
@ -625,6 +634,7 @@ import eRemark from './remark'
|
|||||||
shippingType: data.shippingType,
|
shippingType: data.shippingType,
|
||||||
isChannel: data.isChannel,
|
isChannel: data.isChannel,
|
||||||
isRemind: data.isRemind,
|
isRemind: data.isRemind,
|
||||||
|
payIntegral: data.payIntegral,
|
||||||
isSystemDel: data.isSystemDel
|
isSystemDel: data.isSystemDel
|
||||||
}
|
}
|
||||||
_this.dialog = true
|
_this.dialog = true
|
||||||
@ -683,6 +693,7 @@ import eRemark from './remark'
|
|||||||
shippingType: data.shippingType,
|
shippingType: data.shippingType,
|
||||||
isChannel: data.isChannel,
|
isChannel: data.isChannel,
|
||||||
isRemind: data.isRemind,
|
isRemind: data.isRemind,
|
||||||
|
payIntegral: data.payIntegral,
|
||||||
isSystemDel: data.isSystemDel
|
isSystemDel: data.isSystemDel
|
||||||
}
|
}
|
||||||
_this.dialog = true
|
_this.dialog = true
|
||||||
@ -741,6 +752,7 @@ import eRemark from './remark'
|
|||||||
shippingType: data.shippingType,
|
shippingType: data.shippingType,
|
||||||
isChannel: data.isChannel,
|
isChannel: data.isChannel,
|
||||||
isRemind: data.isRemind,
|
isRemind: data.isRemind,
|
||||||
|
payIntegral: data.payIntegral,
|
||||||
isSystemDel: data.isSystemDel
|
isSystemDel: data.isSystemDel
|
||||||
}
|
}
|
||||||
_this.dialog = true
|
_this.dialog = true
|
||||||
@ -765,6 +777,7 @@ import eRemark from './remark'
|
|||||||
init(){
|
init(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let id = that.$route.params.id || 0;
|
let id = that.$route.params.id || 0;
|
||||||
|
this.getNowOrderStatus();
|
||||||
getOrderDetail(id).then(response => {
|
getOrderDetail(id).then(response => {
|
||||||
this.order = response;
|
this.order = response;
|
||||||
this.userDTO = this.order.userDTO;
|
this.userDTO = this.order.userDTO;
|
||||||
@ -784,13 +797,19 @@ import eRemark from './remark'
|
|||||||
},
|
},
|
||||||
formatStepStatus(value) {
|
formatStepStatus(value) {
|
||||||
//todo 1-未付款 2-未发货 3-退款中 4-待收货 5-待评价 6-已完成 7-已退款
|
//todo 1-未付款 2-未发货 3-退款中 4-待收货 5-待评价 6-已完成 7-已退款
|
||||||
if (value === 2) {
|
if (value === 1) {
|
||||||
//待发货
|
//待发货
|
||||||
return 2;
|
return 1;
|
||||||
} else if (value === 4) {
|
} else if (value === 2) {
|
||||||
//已发货
|
//已发货
|
||||||
return 3;
|
return 3;
|
||||||
} else if (value === 6) {
|
} else if (value === 3) {
|
||||||
|
//已完成
|
||||||
|
return 4;
|
||||||
|
} else if (value === 4) {
|
||||||
|
//已完成
|
||||||
|
return 5;
|
||||||
|
} else if (value === 5) {
|
||||||
//已完成
|
//已完成
|
||||||
return 4;
|
return 4;
|
||||||
}else {
|
}else {
|
||||||
@ -949,7 +968,19 @@ import eRemark from './remark'
|
|||||||
showLogisticsDialog(){
|
showLogisticsDialog(){
|
||||||
this.express();
|
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>
|
</script>
|
||||||
|
@ -1,5 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '订单详情'" width="700px">
|
<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>
|
<el-card>
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span>收货信息</span>
|
<span>收货信息</span>
|
||||||
@ -65,8 +87,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { add, edit, express } from '@/api/yxStoreOrder'
|
import { add, edit, express,
|
||||||
import { parseTime } from '@/utils/index'
|
getNowOrderStatus } from '@/api/yxStoreOrder'
|
||||||
|
import {formatTimeTwo, parseTime} from '@/utils/index'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
isAdd: {
|
isAdd: {
|
||||||
@ -76,6 +99,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
orderStatus:null,
|
||||||
loading: false, dialog: false, expressInfo: [],
|
loading: false, dialog: false, expressInfo: [],
|
||||||
form: {
|
form: {
|
||||||
id: '',
|
id: '',
|
||||||
@ -138,6 +162,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'form': function(val) {
|
||||||
|
this.getNowOrderStatus();
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
parseTime,
|
parseTime,
|
||||||
cancel() {
|
cancel() {
|
||||||
@ -196,6 +225,28 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
console.log(err.response.data.message)
|
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() {
|
resetForm() {
|
||||||
this.dialog = false
|
this.dialog = false
|
||||||
@ -253,7 +304,18 @@ export default {
|
|||||||
isRemind: '',
|
isRemind: '',
|
||||||
isSystemDel: ''
|
isSystemDel: ''
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
getNowOrderStatus() {
|
||||||
|
let id = this.form.id || 0;
|
||||||
|
|
||||||
|
getNowOrderStatus(id)
|
||||||
|
.then(res => {
|
||||||
|
this.orderStatus = res;
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err.response.data.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
v-for="item in express"
|
v-for="item in express"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.name"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { add, edit, get } from '@/api/yxStoreOrder'
|
import { add, edit, get,updateDelivery } from '@/api/yxStoreOrder'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
isAdd: {
|
isAdd: {
|
||||||
@ -79,6 +79,21 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
doEdit() {
|
doEdit() {
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
}else{
|
||||||
edit(this.form).then(res => {
|
edit(this.form).then(res => {
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
@ -92,6 +107,8 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
resetForm() {
|
resetForm() {
|
||||||
this.dialog = false
|
this.dialog = false
|
||||||
|
@ -118,6 +118,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="payPrice" label="实际支付" />
|
<el-table-column prop="payPrice" label="实际支付" />
|
||||||
|
<el-table-column prop="payIntegral" label="消费积分" />
|
||||||
<el-table-column prop="payTypeName" label="支付状态" />
|
<el-table-column prop="payTypeName" label="支付状态" />
|
||||||
<el-table-column prop="statusName" label="订单状态">
|
<el-table-column prop="statusName" label="订单状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -159,6 +160,14 @@
|
|||||||
@click="edit(scope.row)"
|
@click="edit(scope.row)"
|
||||||
>
|
>
|
||||||
去发货</el-button>
|
去发货</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-dropdown-item>
|
<el-dropdown-item>
|
||||||
<el-button
|
<el-button
|
||||||
@ -275,7 +284,9 @@
|
|||||||
{ value: '1', label: '普通订单' },
|
{ value: '1', label: '普通订单' },
|
||||||
{ value: '2', label: '拼团订单' },
|
{ value: '2', label: '拼团订单' },
|
||||||
{ value: '3', label: '秒杀订单' },
|
{ value: '3', label: '秒杀订单' },
|
||||||
{ value: '4', label: '砍价订单' }
|
{ value: '4', label: '砍价订单' },
|
||||||
|
{ value: '5', label: '核销订单' },
|
||||||
|
{ value: '6', label: '积分订单' }
|
||||||
],
|
],
|
||||||
handleOptions: [
|
handleOptions: [
|
||||||
{value: '', label: '批量操作'},
|
{value: '', label: '批量操作'},
|
||||||
@ -396,7 +407,8 @@
|
|||||||
shippingType: data.shippingType,
|
shippingType: data.shippingType,
|
||||||
isChannel: data.isChannel,
|
isChannel: data.isChannel,
|
||||||
isRemind: data.isRemind,
|
isRemind: data.isRemind,
|
||||||
isSystemDel: data.isSystemDel
|
isSystemDel: data.isSystemDel,
|
||||||
|
_status:data._status
|
||||||
}
|
}
|
||||||
_this.dialog = true
|
_this.dialog = true
|
||||||
},
|
},
|
||||||
|
@ -113,23 +113,84 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
[CRUD.HOOK.afterToCU](crud, form) {
|
||||||
|
if (form.pid !== null) {
|
||||||
|
form.isTop = '0'
|
||||||
|
} else if (form.id !== null) {
|
||||||
|
form.isTop = '1'
|
||||||
|
}
|
||||||
form.enabled = `${form.enabled}`
|
form.enabled = `${form.enabled}`
|
||||||
// 获取所有部门
|
if (form.id != null) {
|
||||||
crudDept.getDepts({ enabled: true }).then(res => {
|
this.getSupDepts(form.id)
|
||||||
this.depts = res.content
|
} 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]() {
|
[CRUD.HOOK.afterValidateCU]() {
|
||||||
if (!this.form.pid) {
|
if (this.form.pid !== null && this.form.pid === this.form.id) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '上级部门不能为空',
|
message: '上级部门不能为空',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if (this.form.isTop === '1') {
|
||||||
|
this.form.pid = null
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
// 改变状态
|
// 改变状态
|
||||||
@ -156,5 +217,14 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</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>
|
</style>
|
||||||
|
@ -255,6 +255,9 @@ export default {
|
|||||||
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },
|
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },
|
||||||
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
|
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
|
roles: [
|
||||||
|
{ required: true, message: '请选择角色', trigger: 'blur' },
|
||||||
|
],
|
||||||
phone: [
|
phone: [
|
||||||
{ required: true, trigger: 'blur', validator: validPhone }
|
{ required: true, trigger: 'blur', validator: validPhone }
|
||||||
]
|
]
|
||||||
|
@ -41,7 +41,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
zones: ['华东', '华北', '华南', '北美', '东南亚'], dialog: false,
|
zones: ['华东', '华北', '华南', '北美', '东南亚'], dialog: false,
|
||||||
loading: false, form: { accessKey: '', secretKey: '', bucket: '', host: '', zone: '', type: '' },
|
loading: false,
|
||||||
|
form: { accessKey: '', secretKey: '', bucket: '', host: '', zone: '', type: '' },
|
||||||
rules: {
|
rules: {
|
||||||
accessKey: [
|
accessKey: [
|
||||||
{ required: true, message: '请输入accessKey', trigger: 'blur' }
|
{ required: true, message: '请输入accessKey', trigger: 'blur' }
|
||||||
@ -64,7 +65,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
get().then(res => {
|
get().then(res => {
|
||||||
|
if(res){
|
||||||
this.form = res
|
this.form = res
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doSubmit() {
|
doSubmit() {
|
||||||
|
@ -17,7 +17,17 @@
|
|||||||
<el-input v-model="form.api" :disabled="true" style="width: 370px;" />
|
<el-input v-model="form.api" :disabled="true" style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="微信分享图片">
|
<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>
|
||||||
<el-form-item label="微信分享标题">
|
<el-form-item label="微信分享标题">
|
||||||
<el-input v-model="form.wechat_share_title" style="width: 370px;" />
|
<el-input v-model="form.wechat_share_title" style="width: 370px;" />
|
||||||
@ -47,6 +57,8 @@ export default {
|
|||||||
mixins: [initData],
|
mixins: [initData],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
wechat_follow_imgArr:[],
|
||||||
|
imageArr: [],
|
||||||
delLoading: false,
|
delLoading: false,
|
||||||
form: {
|
form: {
|
||||||
wechat_name: '',
|
wechat_name: '',
|
||||||
@ -58,12 +70,12 @@ export default {
|
|||||||
wechat_encode: '',
|
wechat_encode: '',
|
||||||
wechat_encodingaeskey: '',
|
wechat_encodingaeskey: '',
|
||||||
wechat_share_img: '',
|
wechat_share_img: '',
|
||||||
imageArr: [],
|
wechat_follow_img: '',
|
||||||
wechat_qrcode: '',
|
wechat_qrcode: '',
|
||||||
wechat_type: '',
|
wechat_type: '',
|
||||||
wechat_share_title: '',
|
wechat_share_title: '',
|
||||||
wechat_share_synopsis: '',
|
wechat_share_synopsis: '',
|
||||||
api: 'http://你的H5端域名/api/wechat/serve',
|
api: 'http://你的yshop-app端域名/api/wechat/serve',
|
||||||
wechat_avatar: ''
|
wechat_avatar: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
@ -71,10 +83,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'form.imageArr': function(val) {
|
imageArr: function(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.form.wechat_share_img = val.join(',')
|
this.form.wechat_share_img = val.join(',')
|
||||||
}
|
}
|
||||||
|
},wechat_follow_imgArr: function(val) {
|
||||||
|
if (val) {
|
||||||
|
this.form.wechat_follow_img = val.join(',')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
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: {
|
methods: {
|
||||||
|
@ -71,6 +71,7 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
this.form.file_store_mode = parseInt(this.form.file_store_mode)
|
this.form.file_store_mode = parseInt(this.form.file_store_mode)
|
||||||
|
this.form.yshop_show_recharge = parseInt(this.form.yshop_show_recharge)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="商品小程序路径" prop="url" >
|
<el-form-item label="商品小程序路径" prop="url" >
|
||||||
<el-input v-model="form.url" style="width: 370px;" :disabled="isdisabled"/>
|
<el-input v-model="form.url" style="width: 370px;" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 1:一口价(只需要传入price,price2不传)-->
|
<!-- 1:一口价(只需要传入price,price2不传)-->
|
||||||
<!-- 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传)-->
|
<!-- 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传)-->
|
||||||
@ -104,10 +104,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column v-if="columns.visible('price')" prop="price" label="price" />-->
|
<!-- <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('price2')" prop="price2" label="price2" />-->
|
||||||
<el-table-column v-if="columns.visible('auditStatus')" prop="auditStatus" label="审核状态" >
|
<el-table-column v-if="columns.visible('auditStatus')" prop="auditStatus" label="审核状态" >
|
||||||
<!-- //0:未审核,1:审核中,2:审核通过,3审核失败-->
|
<!-- //0:未审核,1:审核中,2:审核通过,3审核失败-->
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>
|
<div>
|
||||||
<el-tag v-if="scope.row.auditStatus === 0" :type="''">未审核</el-tag>
|
<el-tag v-if="scope.row.auditStatus === 0" :type="''">未审核</el-tag>
|
||||||
@ -117,7 +117,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 1, 2:表示是为api添加商品,否则是直播控制台添加的商品-->
|
<!-- 1, 2:表示是为api添加商品,否则是直播控制台添加的商品-->
|
||||||
<el-table-column v-if="columns.visible('thirdPartyTag')" prop="thirdPartyTag" label="添加途径" >
|
<el-table-column v-if="columns.visible('thirdPartyTag')" prop="thirdPartyTag" label="添加途径" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>
|
<div>
|
||||||
@ -179,9 +179,6 @@ export default {
|
|||||||
coverImgUrl: [
|
coverImgUrl: [
|
||||||
{ required: true, message: '商品图片不能为空', trigger: 'blur' }
|
{ required: true, message: '商品图片不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
url: [
|
|
||||||
{ required: true, message: '商品小程序路径不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
priceType: [
|
priceType: [
|
||||||
{ required: true, message: '价格类型不能为空', trigger: 'blur' }
|
{ required: true, message: '价格类型不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
@ -205,6 +202,9 @@ export default {
|
|||||||
this.form.price = val.price
|
this.form.price = val.price
|
||||||
this.form.price2 = val.otPrice
|
this.form.price2 = val.otPrice
|
||||||
this.form.priceType = '3'
|
this.form.priceType = '3'
|
||||||
|
if(val.productId){
|
||||||
|
this.form.url="/pages/shop/GoodsCon/index?id="+val.productId
|
||||||
|
}
|
||||||
this.isdisabled=false;
|
this.isdisabled=false;
|
||||||
},
|
},
|
||||||
deep:true//对象内部的属性监听,也叫深度监听
|
deep:true//对象内部的属性监听,也叫深度监听
|
||||||
@ -301,7 +301,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.table-img {
|
.table-img {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: #ccc;
|
background: #ccc;
|
||||||
@ -313,5 +313,5 @@ export default {
|
|||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Reference in New Issue
Block a user