update
This commit is contained in:
parent
d5ba177d14
commit
03ce8817be
@ -470,7 +470,7 @@ function mf(number, decimals, dec_point, thousands_sep) {
|
||||
var StateCode = {};
|
||||
var User_BindConnectModel = {};
|
||||
|
||||
;(function (factory) {
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
// AMD模式
|
||||
define(factory);
|
||||
@ -484,7 +484,7 @@ var User_BindConnectModel = {};
|
||||
window.SYS = {};
|
||||
}
|
||||
|
||||
|
||||
|
||||
SYS.VER = 'undefined' != typeof SYS.VER ? SYS.VER : '1.0.28';
|
||||
SYS.DEBUG = 'undefined' != typeof SYS.DEBUG ? SYS.DEBUG : 0;
|
||||
|
||||
|
||||
@ -21,8 +21,7 @@ $(function() {
|
||||
//defaultSelectValue : '-1',
|
||||
//defaultSelectValue : rowData.categoryId || '',
|
||||
showRoot : true
|
||||
}
|
||||
|
||||
}
|
||||
var categoryTree = Public.categoryTree($('#category_id'), opts, 'product_category');
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "lancer-admin",
|
||||
"name": "xiaofa-admin",
|
||||
"version": "2.0.12-dev",
|
||||
"private": true,
|
||||
"author": "Yutao",
|
||||
@ -26,6 +26,7 @@
|
||||
"dependencies": {
|
||||
"@logicflow/core": "^1.0.2",
|
||||
"@logicflow/extension": "^1.0.2",
|
||||
"@vuemap/vue-amap": "^0.1.17",
|
||||
"axios": "^0.26.1",
|
||||
"clipboard": "^2.0.10",
|
||||
"core-js": "^3.21.1",
|
||||
@ -95,11 +96,11 @@
|
||||
"svg-sprite-loader": "^6.0.11",
|
||||
"vab-templates": "^0.0.5",
|
||||
"vue-eslint-parser": "^8.0.1",
|
||||
"vue-template-compiler": "^2.6.14",
|
||||
"vue-plugin-utils": "1.0.3",
|
||||
"vue-template-compiler": "^2.6.14",
|
||||
"webpack": "4.46.0",
|
||||
"webpackbar": "^5.0.2",
|
||||
"webpack-ld": "^1.0.2"
|
||||
"webpack-ld": "^1.0.2",
|
||||
"webpackbar": "^5.0.2"
|
||||
},
|
||||
"gitHooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
|
||||
@ -524,7 +524,6 @@ var User_BindConnectModel = {};
|
||||
return SYS.CONFIG;
|
||||
}));
|
||||
|
||||
|
||||
// utils.js
|
||||
if ('undefined' == typeof window.verifyUtils)
|
||||
{
|
||||
|
||||
@ -25,6 +25,12 @@
|
||||
window.SYS = {CONFIG:{}, URL:{}};
|
||||
</script>
|
||||
|
||||
<!-- <script src="https://webapi.amap.com/maps?v=1.4.15&key=a00a7af766135e741fee8505247afb0b&plugin=AMap.CircleEditor"></script> -->
|
||||
<script>
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode:"07788e7ebd7e913985722bfc5986999f"
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="<%= VUE_APP_ADMIN_URL %>/config.js?v=<%= VUE_APP_VER %>"></script>
|
||||
<script type="text/javascript" src="<%= VUE_APP_ADMIN_URL %>/im/libs3.6.0.min.js?v=<%= VUE_APP_VER %>"></script>
|
||||
<script type="text/javascript" src="<%= VUE_APP_ADMIN_URL %>/im/im.js?v=<%= VUE_APP_VER %>"></script>
|
||||
|
||||
200
src/api/printer/printer.js
Normal file
200
src/api/printer/printer.js
Normal file
@ -0,0 +1,200 @@
|
||||
import request from '@/utils/request'
|
||||
import { URL } from '@/config'
|
||||
|
||||
|
||||
//总后台-获取小票机品牌列表
|
||||
export function getReceiptMachineList(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.getReceiptMachineList,
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
//总后台-添加小票机品牌
|
||||
/**
|
||||
* @param {
|
||||
* model_name:飞鹅云打印机PF-V7 打票机型号
|
||||
* intro:飞鹅云打印机PF-V7 打票机型号备注名
|
||||
* brand_name:飞鹅 品牌名
|
||||
* website_url:www.feieyun.com 官网URL
|
||||
* paper_with:58 纸张宽度
|
||||
* }
|
||||
* @returns
|
||||
*/
|
||||
export function addReceiptMachine(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.addReceiptMachine,
|
||||
method: 'post',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
//总后台-删除小票机品牌
|
||||
/**
|
||||
* @param { model_id }
|
||||
* @returns
|
||||
*/
|
||||
export function delectReceiptMachine(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.delectReceiptMachine,
|
||||
method: 'post',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
//总后台-更新小票机品牌
|
||||
/**
|
||||
* @param {
|
||||
* model_name:飞鹅云打印机PF-V7 打票机型号
|
||||
* intro:飞鹅云打印机PF-V7 打票机型号备注名
|
||||
* brand_name:飞鹅 品牌名
|
||||
* website_url:www.feieyun.com 官网URL
|
||||
* paper_with:58 纸张宽度
|
||||
* }
|
||||
* @returns
|
||||
*/
|
||||
export function updateReceiptMachine(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.updateReceiptMachine,
|
||||
method: 'post',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 商家端-获取打印机列表
|
||||
export function getPrinterList(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.getPrinterList,
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 商家端-获取打印机详情
|
||||
/**
|
||||
* @param {id} 打印机id
|
||||
* @returns
|
||||
*/
|
||||
export function getPrinterDetail(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.getPrinterDetail,
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 商家端-获取品牌列表
|
||||
/**
|
||||
* @param {count} 数量
|
||||
* @returns
|
||||
*/
|
||||
export function getPrinterModelList(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.getPrinterModelList,
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
// 商家端-获取打印区域列表
|
||||
/**
|
||||
* @param {count} 数量
|
||||
* @returns
|
||||
*/
|
||||
export function getPrinterflagList(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.getPrinterflagList,
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
// 商家端-添加打印机
|
||||
/**
|
||||
* @param {
|
||||
* model_id:1 打票机型号ID
|
||||
* printer_name:核销台打印机 打票机备注名
|
||||
* printer_sn:922441475 打票机编号
|
||||
* printer_key:r6ZXPvHH 打票机密钥
|
||||
* region_id:1 打票机摆放区域ID
|
||||
* paper_with:58 纸张宽度
|
||||
* printer_id:1 打票机自增ID
|
||||
* website_url:https://www.feieyun.com 打印机网站地址
|
||||
* } 数量
|
||||
* @returns
|
||||
*/
|
||||
|
||||
export function addPrinter(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.addPrinter,
|
||||
method: 'post',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
//商家端-删除打印机
|
||||
/**
|
||||
* @param { printer_id:0} 打票机自增ID
|
||||
* @returns
|
||||
*/
|
||||
export function delectPrinter(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.delectPrinter,
|
||||
method: 'post',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 商家端-更新打印机信息
|
||||
/**
|
||||
* @param {
|
||||
* model_id:1 打票机型号ID
|
||||
* printer_name:核销台打印机 打票机备注名
|
||||
* printer_sn:922441475 打票机编号
|
||||
* printer_key:r6ZXPvHH 打票机密钥
|
||||
* region_id:1 打票机摆放区域ID
|
||||
* paper_with:58 纸张宽度
|
||||
* printer_id:1 打票机自增ID
|
||||
* website_url:https://www.feieyun.com 打印机网站地址
|
||||
* } 数量
|
||||
* @returns
|
||||
*/
|
||||
|
||||
export function updatePrinterInfo(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.updatePrinterInfo,
|
||||
method: 'post',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
//商家端-更新打印机状态
|
||||
/**
|
||||
* @param {printer_id,status}
|
||||
* @returns
|
||||
*/
|
||||
|
||||
export function updatePrnterStatus(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.updatePrnterStatus,
|
||||
method: 'post',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 商家端-测试打印
|
||||
/**
|
||||
* @param {orderId} DD-20241112-1
|
||||
* @returns
|
||||
*/
|
||||
export function testPrinter(params){
|
||||
return request({
|
||||
url: URL.shop.store.printer.testPrinter,
|
||||
method: 'post',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
BIN
src/assets/time-selector.jpg
Normal file
BIN
src/assets/time-selector.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
BIN
src/assets/xiaofa-logo.png
Normal file
BIN
src/assets/xiaofa-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.8 KiB |
@ -1,5 +1,6 @@
|
||||
import Vue from 'vue'
|
||||
import BaiduMap from 'vue-baidu-map'
|
||||
// import BaiduMap from 'vue-baidu-map'
|
||||
import BaiduMap from './../components/baidu_Map_xiufu'
|
||||
|
||||
// 百度地图
|
||||
// Vue.use(BaiduMap, {
|
||||
@ -13,4 +14,5 @@ Vue.use(BaiduMap, {
|
||||
ak: 'xSeK5okwxCQbcwdGoOufv2EMuMdvsVFI',
|
||||
})
|
||||
|
||||
|
||||
export default BaiduMap
|
||||
|
||||
@ -28,69 +28,69 @@ prop:
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
keyword: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
location: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
export default {
|
||||
props: {
|
||||
keyword: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
key: '',
|
||||
addressList: [],
|
||||
loading: false,
|
||||
selectAddress: {},
|
||||
location: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
key: '',
|
||||
addressList: [],
|
||||
loading: false,
|
||||
selectAddress: {},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
keyword(newVal, oldVal) {
|
||||
this.key = newVal
|
||||
},
|
||||
// key(newVal, oldVal) {
|
||||
// this.getAddress({
|
||||
// value: newVal,
|
||||
// })
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
searchcomplete(results) {
|
||||
if (results && results.as) {
|
||||
this.addressList = results.as
|
||||
} else {
|
||||
this.addressList = {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
keyword(newVal, oldVal) {
|
||||
this.key = newVal
|
||||
},
|
||||
// key(newVal, oldVal) {
|
||||
// this.getAddress({
|
||||
// value: newVal,
|
||||
// })
|
||||
// },
|
||||
querySearchAsync(queryString, cb) {
|
||||
clearTimeout(this.timeout)
|
||||
this.timeout = setTimeout(() => {
|
||||
cb(this.createStateFilter())
|
||||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
searchcomplete(results) {
|
||||
if (results && results.as) {
|
||||
this.addressList = results.as
|
||||
} else {
|
||||
this.addressList = {}
|
||||
}
|
||||
},
|
||||
querySearchAsync(queryString, cb) {
|
||||
clearTimeout(this.timeout)
|
||||
this.timeout = setTimeout(() => {
|
||||
cb(this.createStateFilter())
|
||||
}, 500)
|
||||
},
|
||||
createStateFilter() {
|
||||
let addressList = this.addressList
|
||||
if (this.addressList.length > 0) {
|
||||
return addressList.map((address) => {
|
||||
return {
|
||||
value: address.address,
|
||||
lat: address.point.lat,
|
||||
lng: address.point.lng,
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
},
|
||||
getAddress(item) {
|
||||
this.$emit('getAddress', item)
|
||||
},
|
||||
change(val) {
|
||||
this.$emit('change', val)
|
||||
},
|
||||
createStateFilter() {
|
||||
let addressList = this.addressList
|
||||
if (this.addressList.length > 0) {
|
||||
return addressList.map((address) => {
|
||||
return {
|
||||
value: address.address,
|
||||
lat: address.point.lat,
|
||||
lng: address.point.lng,
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
},
|
||||
}
|
||||
getAddress(item) {
|
||||
this.$emit('getAddress', item)
|
||||
},
|
||||
change(val) {
|
||||
this.$emit('change', val)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,132 +1,161 @@
|
||||
<script>
|
||||
import commonMixin from '../base/mixins/common.js'
|
||||
import bindEvents from '../base/bindEvent.js'
|
||||
import {createPoint} from '../base/factory.js'
|
||||
import { createPoint } from '../base/factory.js'
|
||||
|
||||
export default {
|
||||
name: 'bm-circle',
|
||||
render () {},
|
||||
render() {},
|
||||
mixins: [commonMixin('overlay')],
|
||||
props: {
|
||||
center: {
|
||||
},
|
||||
radius: {
|
||||
},
|
||||
center: {},
|
||||
radius: {},
|
||||
strokeColor: {
|
||||
type: String
|
||||
type: String,
|
||||
},
|
||||
strokeWeight: {
|
||||
type: Number
|
||||
type: Number,
|
||||
},
|
||||
strokeOpacity: {
|
||||
type: Number
|
||||
type: Number,
|
||||
},
|
||||
strokeStyle: {
|
||||
type: String
|
||||
type: String,
|
||||
},
|
||||
fillColor: {
|
||||
type: String
|
||||
type: String,
|
||||
},
|
||||
fillOpacity: {
|
||||
type: Number
|
||||
type: Number,
|
||||
},
|
||||
massClear: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
default: true,
|
||||
},
|
||||
clicking: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
default: true,
|
||||
},
|
||||
editing: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'center.lng' (val, oldVal) {
|
||||
const {BMap, originInstance, isEditing, disableEditing, enableEditing, center, editing} = this
|
||||
'center.lng'(val, oldVal) {
|
||||
const {
|
||||
BMap,
|
||||
originInstance,
|
||||
isEditing,
|
||||
disableEditing,
|
||||
enableEditing,
|
||||
center,
|
||||
editing,
|
||||
} = this
|
||||
if (!isEditing) {
|
||||
disableEditing()
|
||||
const lng = val
|
||||
if (val.toString() !== oldVal.toString() && lng >= -180 && lng <= 180) {
|
||||
originInstance.setCenter(createPoint(BMap, {lng, lat: center.lat}))
|
||||
originInstance.setCenter(createPoint(BMap, { lng, lat: center.lat }))
|
||||
}
|
||||
editing && enableEditing()
|
||||
}
|
||||
},
|
||||
'center.lat' (val, oldVal) {
|
||||
const {BMap, originInstance, isEditing, disableEditing, enableEditing, center, editing} = this
|
||||
'center.lat'(val, oldVal) {
|
||||
const {
|
||||
BMap,
|
||||
originInstance,
|
||||
isEditing,
|
||||
disableEditing,
|
||||
enableEditing,
|
||||
center,
|
||||
editing,
|
||||
} = this
|
||||
if (!isEditing) {
|
||||
disableEditing()
|
||||
const lat = val
|
||||
if (val.toString() !== oldVal.toString() && lat >= -74 && lat <= 74) {
|
||||
originInstance.setCenter(createPoint(BMap, {lng: center.lng, lat}))
|
||||
originInstance.setCenter(createPoint(BMap, { lng: center.lng, lat }))
|
||||
}
|
||||
editing && enableEditing()
|
||||
}
|
||||
},
|
||||
radius (val, oldVal) {
|
||||
const {originInstance, isEditing, disableEditing, enableEditing, editing} = this
|
||||
radius(val, oldVal) {
|
||||
const {
|
||||
originInstance,
|
||||
isEditing,
|
||||
disableEditing,
|
||||
enableEditing,
|
||||
editing,
|
||||
} = this
|
||||
if (!isEditing) {
|
||||
disableEditing()
|
||||
originInstance.setRadius(val)
|
||||
editing && enableEditing()
|
||||
}
|
||||
},
|
||||
strokeColor (val) {
|
||||
strokeColor(val) {
|
||||
this.originInstance.setStrokeColor(val)
|
||||
},
|
||||
strokeOpacity (val) {
|
||||
strokeOpacity(val) {
|
||||
this.originInstance.setStrokeOpacity(val)
|
||||
},
|
||||
strokeWeight (val) {
|
||||
strokeWeight(val) {
|
||||
this.originInstance.setStrokeWeight(val)
|
||||
},
|
||||
strokeStyle (val) {
|
||||
strokeStyle(val) {
|
||||
this.originInstance.setStrokeStyle(val)
|
||||
},
|
||||
fillColor (val) {
|
||||
fillColor(val) {
|
||||
this.originInstance.setFillColor(val)
|
||||
},
|
||||
fillOpacity (val) {
|
||||
fillOpacity(val) {
|
||||
this.originInstance.setFillOpacity(val)
|
||||
},
|
||||
editing (val) {
|
||||
editing(val) {
|
||||
val ? this.enableEditing() : this.disableEditing()
|
||||
},
|
||||
massClear (val) {
|
||||
val ? this.originInstance.enableMassClear() : this.originInstance.disableMassClear()
|
||||
massClear(val) {
|
||||
val
|
||||
? this.originInstance.enableMassClear()
|
||||
: this.originInstance.disableMassClear()
|
||||
},
|
||||
clicking (val) {
|
||||
clicking(val) {
|
||||
this.reload()
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
dragStartHandler () {
|
||||
dragStartHandler() {
|
||||
this.isEditing = true
|
||||
},
|
||||
dragEndHandler () {
|
||||
dragEndHandler() {
|
||||
this.isEditing = false
|
||||
this.bindEditingNodeEvents()
|
||||
},
|
||||
bindEditingNodeEvents () {
|
||||
const {originInstance, editingKey, dragStartHandler, dragEndHandler} = this
|
||||
originInstance[editingKey].forEach($node => {
|
||||
bindEditingNodeEvents() {
|
||||
const { originInstance, editingKey, dragStartHandler, dragEndHandler } =
|
||||
this
|
||||
var key = editingKey
|
||||
if (editingKey == undefined) {
|
||||
key = 'nc'
|
||||
} else {
|
||||
key = editingKey
|
||||
}
|
||||
originInstance[key].forEach(($node) => {
|
||||
$node.addEventListener('dragstart', dragStartHandler)
|
||||
$node.addEventListener('dragend', dragEndHandler)
|
||||
})
|
||||
},
|
||||
enableEditing () {
|
||||
const {originInstance, bindEditingNodeEvents} = this
|
||||
enableEditing() {
|
||||
const { originInstance, bindEditingNodeEvents } = this
|
||||
originInstance.enableEditing()
|
||||
bindEditingNodeEvents()
|
||||
},
|
||||
disableEditing () {
|
||||
const {originInstance} = this
|
||||
disableEditing() {
|
||||
const { originInstance } = this
|
||||
originInstance.disableEditing()
|
||||
},
|
||||
getEditingKey (overlay) {
|
||||
getEditingKey(overlay) {
|
||||
const stack = []
|
||||
overlay.enableEditing()
|
||||
setTimeout(() => {
|
||||
@ -137,26 +166,53 @@ export default {
|
||||
}
|
||||
overlay.disableEditing()
|
||||
for (const key in overlay) {
|
||||
if (overlay[key] && overlay[key].length === 0 && ~stack.indexOf(key)) {
|
||||
if (
|
||||
overlay[key] &&
|
||||
overlay[key].length === 0 &&
|
||||
~stack.indexOf(key)
|
||||
) {
|
||||
this.editingKey = key
|
||||
}
|
||||
}
|
||||
}, 0)
|
||||
},
|
||||
load () {
|
||||
const {BMap, map, center, radius, strokeColor, strokeWeight, strokeOpacity, strokeStyle, fillColor, fillOpacity, editing, massClear, clicking, enableEditing, disableEditing, getEditingKey, editingKey} = this
|
||||
const overlay = new BMap.Circle(createPoint(BMap, {lng: center.lng, lat: center.lat}), radius, {
|
||||
load() {
|
||||
const {
|
||||
BMap,
|
||||
map,
|
||||
center,
|
||||
radius,
|
||||
strokeColor,
|
||||
strokeWeight,
|
||||
strokeOpacity,
|
||||
strokeStyle,
|
||||
fillColor,
|
||||
fillOpacity,
|
||||
// enableEditing: editing,
|
||||
enableMassClear: massClear,
|
||||
enableClicking: clicking
|
||||
})
|
||||
editing,
|
||||
massClear,
|
||||
clicking,
|
||||
enableEditing,
|
||||
disableEditing,
|
||||
getEditingKey,
|
||||
editingKey,
|
||||
} = this
|
||||
const overlay = new BMap.Circle(
|
||||
createPoint(BMap, { lng: center.lng, lat: center.lat }),
|
||||
radius,
|
||||
{
|
||||
strokeColor,
|
||||
strokeWeight,
|
||||
strokeOpacity,
|
||||
strokeStyle,
|
||||
fillColor,
|
||||
fillOpacity,
|
||||
// enableEditing: editing,
|
||||
enableMassClear: massClear,
|
||||
enableClicking: clicking,
|
||||
}
|
||||
)
|
||||
this.originInstance = overlay
|
||||
|
||||
map.addOverlay(overlay)
|
||||
bindEvents.call(this, overlay)
|
||||
// 解决圆形组件无法双向绑定的问题
|
||||
@ -164,7 +220,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
editing ? enableEditing() : disableEditing()
|
||||
}, 0)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
|
||||
/**
|
||||
* @description 导出网络配置
|
||||
**/
|
||||
|
||||
|
||||
let admin_url = process.env.VUE_APP_ADMIN_URL
|
||||
let base_url = process.env.VUE_APP_BASE_URL
|
||||
let api_url = process.env.VUE_APP_API_URL
|
||||
@ -1008,6 +1007,29 @@ let url = {
|
||||
del: api_url + '/admin/shop/shop-store-product-tag/del',
|
||||
},
|
||||
},
|
||||
printer:{
|
||||
//总后台-获取小票机品牌列表
|
||||
getReceiptMachineList:api_url + '/admin/shop/store/printer/model/page',
|
||||
addReceiptMachine:api_url + '/admin/shop/store/printer/model/add/new',
|
||||
delectReceiptMachine : api_url + '/admin/shop/store/printer/model/delete',
|
||||
updateReceiptMachine : api_url + '/admin/shop/store/printer/model/update',
|
||||
//商家端-获取打印机列表
|
||||
getPrinterList: api_url + '/admin/shop/store/printer/page',
|
||||
//商家端-获取打印机详情
|
||||
getPrinterDetail: api_url + '/admin/shop/store/printer/detail',
|
||||
//商家端-获取打印机品牌下拉列表
|
||||
getPrinterModelList: api_url + '/admin/shop/store/printer/model/list',
|
||||
//商家端-获取打印机区域列表
|
||||
getPrinterflagList: api_url + '/admin/shop/store/printer/region/list',
|
||||
addPrinter:api_url + '/admin/shop/store/printer/add/new',
|
||||
delectPrinter: api_url + '/admin/shop/store/printer/delete',
|
||||
//商家端-更新打印机信息
|
||||
updatePrinterInfo: api_url + '/admin/shop/store/printer/update',
|
||||
//商家端-更新打印机状态
|
||||
updatePrnterStatus: api_url + '/admin/shop/store/printer/status/update',
|
||||
//商家端-测试打印
|
||||
testPrinter:api_url + '/admin/shop/store/printer/print/order'
|
||||
}
|
||||
},
|
||||
user: {
|
||||
delivery: {
|
||||
@ -1303,6 +1325,9 @@ let url = {
|
||||
getList: api_url + '/admin/admin/admin-log-error/list',
|
||||
},
|
||||
},
|
||||
printer:{
|
||||
|
||||
}
|
||||
},
|
||||
order: {
|
||||
add: api_url + '/order/add',
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*/
|
||||
module.exports = {
|
||||
// 标题,此项修改后需要重启项目!!! (包括初次加载雪花屏的标题 页面的标题 浏览器的标题)
|
||||
title: '澜驰商城',
|
||||
title: '小发同城',
|
||||
// 标题分隔符
|
||||
titleSeparator: ' - ',
|
||||
// 标题是否反转
|
||||
@ -13,7 +13,7 @@ module.exports = {
|
||||
// 简写
|
||||
abbreviation: 'lancerdt Multi-Vendor Marketplace Platform',
|
||||
// pro版本copyright可随意修改
|
||||
copyright: 'Copyright 2024 上海澜驰数字科技有限公司 版权所有',
|
||||
copyright: 'Copyright 2024 小发同城科技有限公司 版权所有',
|
||||
// 缓存路由的最大数量
|
||||
keepAliveMaxNum: 20,
|
||||
// 路由模式,可选值为 history 或 hash
|
||||
@ -32,7 +32,7 @@ module.exports = {
|
||||
recordRoute: true,
|
||||
// 是否开启logo,不显示时设置false,请填写src/icon路径下的图标名称
|
||||
// 如需使用内置RemixIcon图标,请自行去logo组件切换注释代码(内置svg雪碧图较大,对性能有一定影响)
|
||||
logo: 'LOGO',
|
||||
logo: 'xiaofa-logo',
|
||||
// 语言类型zh、en
|
||||
i18n: 'zh',
|
||||
// 消息框消失时间
|
||||
|
||||
194
src/icon/xiaofa-logo.svg
Normal file
194
src/icon/xiaofa-logo.svg
Normal file
@ -0,0 +1,194 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="170px" height="170px" viewBox="0 0 170 170" enable-background="new 0 0 170 170" xml:space="preserve"> <image id="image0" width="170" height="170" x="0" y="0"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAAN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rKRioO57O7QD+0F1602gMzNAZqQm5BRntLkqhSqH6HbDtXMv2CMn4T10DHxxCUS7
|
||||
A6LdCcFmh+ioAyLts6VIkDoNKIMepF4LUq8D3bE9lDf0hOL67lD3vfWqFKUcSaEGQOI4iHanT6w2
|
||||
BwRLLdjTReAKiyFYrICXBW+pBVxu8FYbeJsThNsD/qeaBnS6GZIqBbRBC9poANQq0GYToFSAMhvB
|
||||
dO4IRdc8UGYTSIMOpF4HUq8FwSRTd8rx/8Frnpq5xcZcAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI0
|
||||
LTExLTA1VDIwOjMyOjA0KzAwOjAwENfFeAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNC0xMS0wNVQy
|
||||
MDozMjowNCswMDowMGGKfcQAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjQtMTEtMDVUMjA6MzI6
|
||||
MDQrMDA6MDA2n1wbAAAAAElFTkSuQmCC" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 15 KiB |
18
src/main.js
18
src/main.js
@ -3,21 +3,25 @@ import App from './App'
|
||||
import i18n from './i18n'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
// import baiduMap from './baiduMap'
|
||||
import baiduMap from './components/baidu_Map_xiufu'
|
||||
import baiduMap from './baiduMap'
|
||||
|
||||
import '@/vab'
|
||||
import './assets/css/diy.css'
|
||||
|
||||
//import VueAMap, {initAMapApiLoader} from '@vuemap/vue-amap';
|
||||
// import '@vuemap/vue-amap/dist/style.css'
|
||||
|
||||
|
||||
import { sprintf, translateTitle as __ } from '@/utils/i18n'
|
||||
|
||||
// Vue.use(VueAMap);
|
||||
|
||||
// initAMapApiLoader({
|
||||
// key: 'a00a7af766135e741fee8505247afb0b',
|
||||
// plugins:['AMap.CircleEditor'],
|
||||
// })
|
||||
|
||||
|
||||
Vue.use(baiduMap, {
|
||||
// ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
|
||||
ak: 'xSeK5okwxCQbcwdGoOufv2EMuMdvsVFI',
|
||||
})
|
||||
|
||||
/**
|
||||
* @description 正式环境默认使用mock,正式项目记得注释后再打包
|
||||
*/
|
||||
|
||||
@ -13,6 +13,26 @@ import icon from "../views/403.vue"
|
||||
*/
|
||||
export function convertRouter(asyncRoutes) {
|
||||
return asyncRoutes.map((route) => {
|
||||
|
||||
if(route.meta.title == '设置'){
|
||||
|
||||
const obj = {
|
||||
path: "/receiptMachine",
|
||||
"component":"@/views/settings/config/receiptMachine",
|
||||
name: "Vab86001",
|
||||
redirect: null,
|
||||
meta: {
|
||||
title: "小票机品牌",
|
||||
icon: "",
|
||||
noClosable: 0,
|
||||
hidden: null
|
||||
},
|
||||
menuHidden: false
|
||||
}
|
||||
|
||||
route.children.push(obj);
|
||||
}
|
||||
|
||||
if(route.meta.title == "基础"){
|
||||
|
||||
const cloudPrintRoute = {
|
||||
@ -44,7 +64,7 @@ export function convertRouter(asyncRoutes) {
|
||||
},
|
||||
{
|
||||
path: "/addCloudPrint",
|
||||
"component":"@/views/store/base/cloudPrint/addCloudPrint",
|
||||
"component":"@/views/store/base/cloudPrint/editCloudPrint",
|
||||
name: "Vab81002",
|
||||
redirect: null,
|
||||
meta: {
|
||||
@ -82,8 +102,8 @@ export function convertRouter(asyncRoutes) {
|
||||
menuHidden: false
|
||||
},
|
||||
{
|
||||
path: "/addTemplateManagement",
|
||||
"component":"@/views/store/base/cloudPrint/addTemplateManagement",
|
||||
path: "/templateManagementAdd",
|
||||
"component":"@/views/store/base/cloudPrint/editTemplateManagement",
|
||||
name: "Vab81005",
|
||||
redirect: null,
|
||||
meta: {
|
||||
@ -95,7 +115,7 @@ export function convertRouter(asyncRoutes) {
|
||||
menuHidden: false
|
||||
},
|
||||
{
|
||||
path: "/editTemplateManagement",
|
||||
path: "/templateManagementEdit",
|
||||
"component":"@/views/store/base/cloudPrint/editTemplateManagement",
|
||||
name: "Vab81006",
|
||||
redirect: null,
|
||||
@ -164,6 +184,45 @@ export function convertRouter(asyncRoutes) {
|
||||
},
|
||||
menuHidden: false
|
||||
},
|
||||
{
|
||||
path: "/selfPickUpSite",
|
||||
"component":"@/views/store/base/distributionSetup/selfPickUpSite",
|
||||
name: "Vab82004",
|
||||
redirect: null,
|
||||
meta: {
|
||||
title: "自提点列表",
|
||||
icon: "",
|
||||
noClosable: 0,
|
||||
hidden: true
|
||||
},
|
||||
menuHidden: false
|
||||
},
|
||||
{
|
||||
path: "/selfPickUpSiteAdd",
|
||||
"component":"@/views/store/base/distributionSetup/editSelfPickUpSite",
|
||||
name: "Vab82005",
|
||||
redirect: null,
|
||||
meta: {
|
||||
title: "编辑自提点",
|
||||
icon: "",
|
||||
noClosable: 0,
|
||||
hidden: true
|
||||
},
|
||||
menuHidden: false
|
||||
},
|
||||
{
|
||||
path: "/selfPickUpSiteEdit",
|
||||
"component":"@/views/store/base/distributionSetup/editSelfPickUpSite",
|
||||
name: "Vab82006",
|
||||
redirect: null,
|
||||
meta: {
|
||||
title: "编辑自提点",
|
||||
icon: "",
|
||||
noClosable: 0,
|
||||
hidden: true
|
||||
},
|
||||
menuHidden: false
|
||||
},
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'VabAppMain',
|
||||
}
|
||||
export default {
|
||||
name: 'VabAppMain',
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
<router-link to="/">
|
||||
<span class="logo">
|
||||
<!-- 使用自定义svg示例 -->
|
||||
<!--<vab-icon v-if="logo" :icon="logo" is-custom-svg />-->
|
||||
<vab-icon v-if="logo" :icon="avatar" is-custom-svg />
|
||||
<vab-icon v-if="logo" :icon="logo" is-custom-svg />
|
||||
<!-- <vab-icon v-if="logo" :icon="avatar" is-custom-svg /> -->
|
||||
</span>
|
||||
<span
|
||||
class="title"
|
||||
@ -24,143 +24,140 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getList } from '@/api/base/config'
|
||||
import { translateTitle as __ } from '@/utils/i18n'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getList } from '@/api/base/config'
|
||||
import { translateTitle as __ } from '@/utils/i18n'
|
||||
|
||||
export default {
|
||||
name: 'VabLogo',
|
||||
computed: {
|
||||
...mapGetters({
|
||||
logo: 'settings/logo',
|
||||
avatar: 'user/avatar',
|
||||
title: 'settings/title',
|
||||
theme: 'settings/theme',
|
||||
}),
|
||||
export default {
|
||||
name: 'VabLogo',
|
||||
computed: {
|
||||
...mapGetters({
|
||||
logo: 'settings/logo',
|
||||
avatar: 'user/avatar',
|
||||
title: 'settings/title',
|
||||
theme: 'settings/theme',
|
||||
}),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
site_name: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
__,
|
||||
async fetchData() {
|
||||
const { data } = await getList()
|
||||
this.site_name = data.site_name
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
site_name: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
__,
|
||||
async fetchData() {
|
||||
const { data } = await getList()
|
||||
this.site_name = data.site_name
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@mixin container {
|
||||
position: relative;
|
||||
height: $base-top-bar-height;
|
||||
overflow: hidden;
|
||||
line-height: $base-top-bar-height;
|
||||
background: transparent;
|
||||
}
|
||||
@mixin container {
|
||||
position: relative;
|
||||
height: $base-top-bar-height;
|
||||
overflow: hidden;
|
||||
line-height: $base-top-bar-height;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@mixin logo {
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
color: $base-title-color;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@mixin logo {
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
color: $base-title-color;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@mixin title {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
overflow: hidden;
|
||||
font-size: 20px;
|
||||
line-height: 55px;
|
||||
color: $base-title-color;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@mixin title {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
overflow: hidden;
|
||||
font-size: 20px;
|
||||
line-height: 55px;
|
||||
color: $base-title-color;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.logo-container {
|
||||
&-horizontal,
|
||||
&-common {
|
||||
@include container;
|
||||
.logo-container {
|
||||
&-horizontal,
|
||||
&-common {
|
||||
@include container;
|
||||
|
||||
.logo {
|
||||
svg,
|
||||
img {
|
||||
@include logo;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
@include title;
|
||||
.logo {
|
||||
svg,
|
||||
img {
|
||||
@include logo;
|
||||
}
|
||||
}
|
||||
|
||||
&-vertical,
|
||||
&-column,
|
||||
&-comprehensive,
|
||||
&-float {
|
||||
@include container;
|
||||
.title {
|
||||
@include title;
|
||||
}
|
||||
}
|
||||
|
||||
&-vertical,
|
||||
&-column,
|
||||
&-comprehensive,
|
||||
&-float {
|
||||
@include container;
|
||||
|
||||
height: $base-logo-height;
|
||||
line-height: $base-logo-height;
|
||||
text-align: center;
|
||||
|
||||
.logo {
|
||||
svg,
|
||||
img {
|
||||
@include logo;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
@include title;
|
||||
max-width: $base-left-menu-width - 60;
|
||||
}
|
||||
}
|
||||
|
||||
&-column {
|
||||
background: $base-column-second-menu-background !important;
|
||||
|
||||
.logo {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
display: block;
|
||||
width: $base-left-menu-width-min;
|
||||
height: $base-logo-height;
|
||||
line-height: $base-logo-height;
|
||||
text-align: center;
|
||||
|
||||
.logo {
|
||||
svg,
|
||||
img {
|
||||
@include logo;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
@include title;
|
||||
max-width: $base-left-menu-width - 60;
|
||||
}
|
||||
margin: 0;
|
||||
background: $base-column-first-menu-background;
|
||||
}
|
||||
|
||||
&-column {
|
||||
.title {
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
margin-left: $base-left-menu-width-min !important;
|
||||
color: $base-color-black !important;
|
||||
background: $base-column-second-menu-background !important;
|
||||
|
||||
.logo {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
display: block;
|
||||
width: $base-left-menu-width-min;
|
||||
height: $base-logo-height;
|
||||
margin: 0;
|
||||
background: $base-column-first-menu-background;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
margin-left: $base-left-menu-width-min !important;
|
||||
color: $base-color-black !important;
|
||||
background: $base-column-second-menu-background !important;
|
||||
@include title;
|
||||
}
|
||||
@include title;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//.vab-side-bar:not(.is-collapse) .logo{
|
||||
// margin-left: 21px;
|
||||
// float: left;
|
||||
//}
|
||||
//
|
||||
//.vab-side-bar:not(.is-collapse) .title{
|
||||
// float: left;
|
||||
// //line-height:60px;
|
||||
// margin-left:10px;
|
||||
//}
|
||||
|
||||
//.vab-side-bar:not(.is-collapse) .logo{
|
||||
// margin-left: 21px;
|
||||
// float: left;
|
||||
//}
|
||||
//
|
||||
//.vab-side-bar:not(.is-collapse) .title{
|
||||
// float: left;
|
||||
// //line-height:60px;
|
||||
// margin-left:10px;
|
||||
//}
|
||||
</style>
|
||||
|
||||
@ -36,196 +36,192 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { translateTitle } from '@/utils/i18n'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { translateTitle } from '@/utils/i18n'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'VabThemeSetting',
|
||||
computed: {
|
||||
...mapGetters({
|
||||
theme: 'settings/theme',
|
||||
}),
|
||||
export default {
|
||||
name: 'VabThemeSetting',
|
||||
computed: {
|
||||
...mapGetters({
|
||||
theme: 'settings/theme',
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
translateTitle,
|
||||
handleOpenTheme() {
|
||||
this.$baseEventBus.$emit('theme')
|
||||
},
|
||||
methods: {
|
||||
translateTitle,
|
||||
handleOpenTheme() {
|
||||
this.$baseEventBus.$emit('theme')
|
||||
},
|
||||
randomTheme() {
|
||||
this.$baseEventBus.$emit('random-theme')
|
||||
},
|
||||
buy() {
|
||||
window.open('https://vue-admin-beautiful.com/authorization')
|
||||
},
|
||||
getCode() {
|
||||
this.$prompt(
|
||||
'请输入秘钥(秘钥请在源码中查看,跳转后需登录购买时绑定的github账号)',
|
||||
'温馨提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
randomTheme() {
|
||||
this.$baseEventBus.$emit('random-theme')
|
||||
},
|
||||
buy() {
|
||||
window.open('https://vue-admin-beautiful.com/authorization')
|
||||
},
|
||||
getCode() {
|
||||
this.$prompt(
|
||||
'请输入秘钥(秘钥请在源码中查看,跳转后需登录购买时绑定的github账号)',
|
||||
'温馨提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
}
|
||||
)
|
||||
.then(({ value }) => {
|
||||
if (value !== 'vabp') {
|
||||
// 留给没有购买VueAdminBeautifulPro框架的人的赠言:既然你已经找到这里了,那说明你的能力很出众,也应该很喜欢这个框架吧,但是不绑定github账号依旧看不到源码的,所以加我qq买一个吧
|
||||
this.$baseMessage('秘钥不正确!', 'error', 'vab-hey-message-error')
|
||||
}
|
||||
)
|
||||
.then(({ value }) => {
|
||||
if (value !== 'vabp') {
|
||||
// 留给没有购买VueAdminBeautifulPro框架的人的赠言:既然你已经找到这里了,那说明你的能力很出众,也应该很喜欢这个框架吧,但是不绑定github账号依旧看不到源码的,所以加我qq买一个吧
|
||||
this.$baseMessage(
|
||||
'秘钥不正确!',
|
||||
'error',
|
||||
'vab-hey-message-error'
|
||||
)
|
||||
}
|
||||
let path = this.$route.path + '/index.vue'
|
||||
const _path = this.$route.path
|
||||
switch (_path) {
|
||||
case '/workbench':
|
||||
path = '/index/workbench.vue'
|
||||
break
|
||||
case '/vab/icon/remixIcon':
|
||||
path = '/vab/icon/remixIcon.vue'
|
||||
break
|
||||
case '/vab/icon/iconSelector':
|
||||
path = '/vab/icon/iconSelector.vue'
|
||||
break
|
||||
case '/vab/table/comprehensiveTable':
|
||||
path = '/vab/table/comprehensiveTable.vue'
|
||||
break
|
||||
case '/vab/table/inlineEditTable':
|
||||
path = '/vab/table/inlineEditTable.vue'
|
||||
break
|
||||
case '/vab/table/customTable':
|
||||
path = '/vab/table/customTable.vue'
|
||||
break
|
||||
case '/vab/form/comprehensiveForm':
|
||||
path = '/vab/form/comprehensiveForm.vue'
|
||||
break
|
||||
case '/vab/form/stepForm':
|
||||
path = '/vab/form/stepForm.vue'
|
||||
break
|
||||
case '/other/dynamicSegment/test1/1':
|
||||
path = '/other/dynamicSegment/test1.vue'
|
||||
break
|
||||
case '/other/dynamicSegment/test2?id=1':
|
||||
path = '/other/dynamicSegment/test2.vue'
|
||||
break
|
||||
case '/other/drag/dialogDrag':
|
||||
path = '/other/drag/dialogDrag.vue'
|
||||
break
|
||||
case '/other/drag/cardDrag':
|
||||
path = '/other/drag/cardDrag.vue'
|
||||
break
|
||||
case '/other/drag/flowSheetDrag':
|
||||
path = '/other/drag/flowSheetDrag.vue'
|
||||
break
|
||||
case '/vab/editor/richTextEditor':
|
||||
path = '/vab/editor/richTextEditor.vue'
|
||||
break
|
||||
case '/vab/editor/markdownEditor':
|
||||
path = '/vab/editor/markdownEditor.vue'
|
||||
break
|
||||
case '/other/menu1/menu1-1/menu1-1-1/menu1-1-1-1':
|
||||
path =
|
||||
'/other/nested/menu1/menu1-1/menu1-1-1/menu1-1-1-1/index.vue'
|
||||
break
|
||||
case '/other/excel/exportExcel':
|
||||
path = '/other/excel/exportExcel.vue'
|
||||
break
|
||||
case '/other/excel/exportSelectedExcel':
|
||||
path = '/other/excel/exportSelectedExcel.vue'
|
||||
break
|
||||
case '/other/excel/exportMergeHeaderExcel':
|
||||
path = '/other/excel/exportMergeHeaderExcel.vue'
|
||||
break
|
||||
}
|
||||
window.open(
|
||||
`https://gitee.com/lancerdt/lancerdt.git/blob/master/src/views${path}`
|
||||
)
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
removeLocalStorage() {
|
||||
localStorage.clear()
|
||||
location.reload()
|
||||
},
|
||||
let path = this.$route.path + '/index.vue'
|
||||
const _path = this.$route.path
|
||||
switch (_path) {
|
||||
case '/workbench':
|
||||
path = '/index/workbench.vue'
|
||||
break
|
||||
case '/vab/icon/remixIcon':
|
||||
path = '/vab/icon/remixIcon.vue'
|
||||
break
|
||||
case '/vab/icon/iconSelector':
|
||||
path = '/vab/icon/iconSelector.vue'
|
||||
break
|
||||
case '/vab/table/comprehensiveTable':
|
||||
path = '/vab/table/comprehensiveTable.vue'
|
||||
break
|
||||
case '/vab/table/inlineEditTable':
|
||||
path = '/vab/table/inlineEditTable.vue'
|
||||
break
|
||||
case '/vab/table/customTable':
|
||||
path = '/vab/table/customTable.vue'
|
||||
break
|
||||
case '/vab/form/comprehensiveForm':
|
||||
path = '/vab/form/comprehensiveForm.vue'
|
||||
break
|
||||
case '/vab/form/stepForm':
|
||||
path = '/vab/form/stepForm.vue'
|
||||
break
|
||||
case '/other/dynamicSegment/test1/1':
|
||||
path = '/other/dynamicSegment/test1.vue'
|
||||
break
|
||||
case '/other/dynamicSegment/test2?id=1':
|
||||
path = '/other/dynamicSegment/test2.vue'
|
||||
break
|
||||
case '/other/drag/dialogDrag':
|
||||
path = '/other/drag/dialogDrag.vue'
|
||||
break
|
||||
case '/other/drag/cardDrag':
|
||||
path = '/other/drag/cardDrag.vue'
|
||||
break
|
||||
case '/other/drag/flowSheetDrag':
|
||||
path = '/other/drag/flowSheetDrag.vue'
|
||||
break
|
||||
case '/vab/editor/richTextEditor':
|
||||
path = '/vab/editor/richTextEditor.vue'
|
||||
break
|
||||
case '/vab/editor/markdownEditor':
|
||||
path = '/vab/editor/markdownEditor.vue'
|
||||
break
|
||||
case '/other/menu1/menu1-1/menu1-1-1/menu1-1-1-1':
|
||||
path =
|
||||
'/other/nested/menu1/menu1-1/menu1-1-1/menu1-1-1-1/index.vue'
|
||||
break
|
||||
case '/other/excel/exportExcel':
|
||||
path = '/other/excel/exportExcel.vue'
|
||||
break
|
||||
case '/other/excel/exportSelectedExcel':
|
||||
path = '/other/excel/exportSelectedExcel.vue'
|
||||
break
|
||||
case '/other/excel/exportMergeHeaderExcel':
|
||||
path = '/other/excel/exportMergeHeaderExcel.vue'
|
||||
break
|
||||
}
|
||||
window.open(
|
||||
`https://gitee.com/lancerdt/lancerdt.git/blob/master/src/views${path}`
|
||||
)
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
}
|
||||
removeLocalStorage() {
|
||||
localStorage.clear()
|
||||
location.reload()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.vab-theme-setting {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
z-index: $base-z-index + 1;
|
||||
padding: 10px 0 0 0;
|
||||
.vab-theme-setting {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
z-index: $base-z-index + 1;
|
||||
padding: 10px 0 0 0;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background: $base-color-white;
|
||||
border: 1px solid $base-border-color;
|
||||
border-top-left-radius: $base-border-radius + 3;
|
||||
border-bottom-left-radius: $base-border-radius + 3;
|
||||
box-shadow: 0 0 50px 0 rgb(82 63 105 / 15%);
|
||||
transform: translateY(-50%);
|
||||
|
||||
> li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 8px 10px 10px;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background: $base-color-white;
|
||||
border: 1px solid $base-border-color;
|
||||
border-top-left-radius: $base-border-radius + 3;
|
||||
border-bottom-left-radius: $base-border-radius + 3;
|
||||
box-shadow: 0 0 50px 0 rgb(82 63 105 / 15%);
|
||||
transform: translateY(-50%);
|
||||
list-style: none;
|
||||
|
||||
> li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 8px 10px 10px;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
|
||||
&:nth-child(2) {
|
||||
[class*='ri-'] {
|
||||
animation: rotate 6s linear infinite;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
[class*='ri-'] {
|
||||
animation: rotate 6s linear infinite;
|
||||
}
|
||||
}
|
||||
|
||||
$colors: (
|
||||
1: #3698fd,
|
||||
2: #1bc3bb,
|
||||
3: #faa500,
|
||||
4: #b37feb,
|
||||
5: #ef4c5d,
|
||||
);
|
||||
$colors: (
|
||||
1: #3698fd,
|
||||
2: #1bc3bb,
|
||||
3: #faa500,
|
||||
4: #b37feb,
|
||||
5: #ef4c5d,
|
||||
);
|
||||
|
||||
@each $key, $color in $colors {
|
||||
&:nth-child(#{$key}) {
|
||||
a {
|
||||
color: $color;
|
||||
background: mix($base-color-white, $color, 90%);
|
||||
transition: color 0.15s ease, background-color 0.15s ease,
|
||||
border-color 0.15s ease, box-shadow 0.15s ease,
|
||||
-webkit-box-shadow 0.15s ease;
|
||||
@each $key, $color in $colors {
|
||||
&:nth-child(#{$key}) {
|
||||
a {
|
||||
color: $color;
|
||||
background: mix($base-color-white, $color, 90%);
|
||||
transition: color 0.15s ease, background-color 0.15s ease,
|
||||
border-color 0.15s ease, box-shadow 0.15s ease,
|
||||
-webkit-box-shadow 0.15s ease;
|
||||
|
||||
&:hover {
|
||||
color: $base-color-white;
|
||||
background: $color;
|
||||
}
|
||||
&:hover {
|
||||
color: $base-color-white;
|
||||
background: $color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
padding-top: 10px;
|
||||
text-align: center;
|
||||
background: #f6f8f9;
|
||||
border-radius: $base-border-radius + 3;
|
||||
a {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
padding-top: 10px;
|
||||
text-align: center;
|
||||
background: #f6f8f9;
|
||||
border-radius: $base-border-radius + 3;
|
||||
|
||||
p {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
font-size: $base-font-size-small;
|
||||
line-height: 25px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
p {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
font-size: $base-font-size-small;
|
||||
line-height: 25px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -13,9 +13,7 @@
|
||||
:rules="rules"
|
||||
>
|
||||
<div class="title">{{ title }}</div>
|
||||
<div class="title-tips">
|
||||
|
||||
</div>
|
||||
<div class="title-tips"></div>
|
||||
<el-form-item prop="user_account">
|
||||
<el-input
|
||||
v-model.trim="form.user_account"
|
||||
@ -94,303 +92,303 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import { translateTitle } from '@/utils/i18n'
|
||||
import { isPassword } from 'vue-plugin-utils'
|
||||
import { URL } from '@/config'
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import { translateTitle } from '@/utils/i18n'
|
||||
import { isPassword } from 'vue-plugin-utils'
|
||||
import { URL } from '@/config'
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
directives: {
|
||||
focus: {
|
||||
inserted(el) {
|
||||
el.querySelector('input').focus()
|
||||
},
|
||||
export default {
|
||||
name: 'Login',
|
||||
directives: {
|
||||
focus: {
|
||||
inserted(el) {
|
||||
el.querySelector('input').focus()
|
||||
},
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
clearInterval(this.timer)
|
||||
next()
|
||||
},
|
||||
data() {
|
||||
const validateUsername = (rule, value, callback) => {
|
||||
if ('' === value)
|
||||
callback(new Error(this.translateTitle('用户名不能为空')))
|
||||
else callback()
|
||||
}
|
||||
const validatePassword = (rule, value, callback) => {
|
||||
if (!isPassword(value))
|
||||
callback(new Error(this.translateTitle('密码不能少于6位')))
|
||||
else callback()
|
||||
}
|
||||
return {
|
||||
form: {
|
||||
user_account: '',
|
||||
user_password: '',
|
||||
verify_code: '',
|
||||
},
|
||||
rules: {
|
||||
user_account: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: validateUsername,
|
||||
},
|
||||
],
|
||||
user_password: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: validatePassword,
|
||||
},
|
||||
],
|
||||
verify_code: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
message: '验证码不能空',
|
||||
},
|
||||
],
|
||||
},
|
||||
loading: false,
|
||||
passwordType: 'password',
|
||||
redirect: undefined,
|
||||
timer: 0,
|
||||
codeUrl: URL.verifyCode,
|
||||
previewText: '',
|
||||
verify_token: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
title: 'settings/title',
|
||||
}),
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler(route) {
|
||||
this.redirect = (route.query && route.query.redirect) || '/'
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
clearInterval(this.timer)
|
||||
next()
|
||||
},
|
||||
data() {
|
||||
const validateUsername = (rule, value, callback) => {
|
||||
if ('' === value)
|
||||
callback(new Error(this.translateTitle('用户名不能为空')))
|
||||
else callback()
|
||||
}
|
||||
const validatePassword = (rule, value, callback) => {
|
||||
if (!isPassword(value))
|
||||
callback(new Error(this.translateTitle('密码不能少于6位')))
|
||||
else callback()
|
||||
}
|
||||
return {
|
||||
form: {
|
||||
user_account: '',
|
||||
user_password: '',
|
||||
verify_code: '',
|
||||
},
|
||||
rules: {
|
||||
user_account: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: validateUsername,
|
||||
},
|
||||
],
|
||||
user_password: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: validatePassword,
|
||||
},
|
||||
],
|
||||
verify_code: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
message: '验证码不能空',
|
||||
},
|
||||
],
|
||||
},
|
||||
loading: false,
|
||||
passwordType: 'password',
|
||||
redirect: undefined,
|
||||
timer: 0,
|
||||
codeUrl: URL.verifyCode,
|
||||
previewText: '',
|
||||
verify_token: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
title: 'settings/title',
|
||||
}),
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler(route) {
|
||||
this.redirect = (route.query && route.query.redirect) || '/'
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
mounted() {
|
||||
this.changeCode()
|
||||
if (URL.api_url == "https://demo.lancerdt.com") {
|
||||
this.form.user_account = 'demoadmin'
|
||||
this.form.user_password = '111111'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.changeCode()
|
||||
if (URL.api_url == 'https://demo.lancerdt.com') {
|
||||
this.form.user_account = 'demoadmin'
|
||||
this.form.user_password = '111111'
|
||||
}
|
||||
|
||||
// 为了演示效果,会在官网演示页自动登录到首页,正式开发可删除
|
||||
if (
|
||||
document.domain === 'vue-admin-beautiful.com' ||
|
||||
document.domain === 'chu1204505056.gitee.io'
|
||||
) {
|
||||
this.previewText = '(演示地址验证码可不填)'
|
||||
this.timer = setTimeout(() => {
|
||||
this.handleLogin()
|
||||
}, 5000)
|
||||
}
|
||||
// 为了演示效果,会在官网演示页自动登录到首页,正式开发可删除
|
||||
if (
|
||||
document.domain === 'vue-admin-beautiful.com' ||
|
||||
document.domain === 'chu1204505056.gitee.io'
|
||||
) {
|
||||
this.previewText = '(演示地址验证码可不填)'
|
||||
this.timer = setTimeout(() => {
|
||||
this.handleLogin()
|
||||
}, 5000)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions({
|
||||
login: 'user/login',
|
||||
}),
|
||||
translateTitle,
|
||||
handlePassword() {
|
||||
this.passwordType === 'password'
|
||||
? (this.passwordType = '')
|
||||
: (this.passwordType = 'password')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.password.focus()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapActions({
|
||||
login: 'user/login',
|
||||
}),
|
||||
translateTitle,
|
||||
handlePassword() {
|
||||
this.passwordType === 'password'
|
||||
? (this.passwordType = '')
|
||||
: (this.passwordType = 'password')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.password.focus()
|
||||
})
|
||||
},
|
||||
handleRoute() {
|
||||
return this.redirect === '/404' || this.redirect === '/403'
|
||||
? '/'
|
||||
: this.redirect
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.form.validate(async (valid) => {
|
||||
if (valid) {
|
||||
try {
|
||||
this.loading = true
|
||||
this.form.verify_token = this.verify_token
|
||||
let code = await this.login(this.form)
|
||||
if (1003 == code || 1005 == code) {
|
||||
this.changeCode()
|
||||
}
|
||||
|
||||
let routes = this.$router.options.routes
|
||||
if (routes) {
|
||||
if (!routes.some((route) => route.path === this.redirect)) {
|
||||
this.redirect = '/index'
|
||||
}
|
||||
}
|
||||
await this.$router.push(this.handleRoute())
|
||||
} finally {
|
||||
this.loading = false
|
||||
handleRoute() {
|
||||
return this.redirect === '/404' || this.redirect === '/403'
|
||||
? '/'
|
||||
: this.redirect
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.form.validate(async (valid) => {
|
||||
if (valid) {
|
||||
try {
|
||||
this.loading = true
|
||||
this.form.verify_token = this.verify_token
|
||||
let code = await this.login(this.form)
|
||||
if (1003 == code || 1005 == code) {
|
||||
this.changeCode()
|
||||
}
|
||||
|
||||
let routes = this.$router.options.routes
|
||||
if (routes) {
|
||||
if (!routes.some((route) => route.path === this.redirect)) {
|
||||
this.redirect = '/index'
|
||||
}
|
||||
}
|
||||
await this.$router.push(this.handleRoute())
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
changeCode() {
|
||||
// this.codeUrl = `https://www.oschina.net/action/user/captcha?timestamp=${new Date().getTime()}`
|
||||
this.verify_token = new Date().getTime()
|
||||
this.codeUrl = URL.verifyCode + '?verify_token=' + this.verify_token
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
changeCode() {
|
||||
// this.codeUrl = `https://www.oschina.net/action/user/captcha?timestamp=${new Date().getTime()}`
|
||||
this.verify_token = new Date().getTime()
|
||||
this.codeUrl = URL.verifyCode + '?verify_token=' + this.verify_token
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login-container {
|
||||
height: 100vh;
|
||||
background: url('~@/assets/login_images/background.jpg') center center fixed
|
||||
no-repeat;
|
||||
background-size: cover;
|
||||
.login-container {
|
||||
height: 100vh;
|
||||
background: url('~@/assets/login_images/background.jpg') center center fixed
|
||||
no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
position: relative;
|
||||
max-width: 100%;
|
||||
padding: 4.5vh;
|
||||
margin: calc((100vh - 475px) / 2) 5vw 5vw;
|
||||
overflow: hidden;
|
||||
background: url('~@/assets/login_images/login_form.png');
|
||||
background-size: 100% 100%;
|
||||
|
||||
.title {
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
color: $base-color-white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
.title-tips {
|
||||
margin-top: 29px;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
color: $base-color-white;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
margin: auto;
|
||||
display: inherit;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
margin-top: 5px;
|
||||
border: 0;
|
||||
font-size: 18px;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.forget-passwordword {
|
||||
width: 100%;
|
||||
margin-top: 40px;
|
||||
text-align: left;
|
||||
|
||||
.forget-password {
|
||||
width: 129px;
|
||||
height: 19px;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
color: rgba(92, 102, 240, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin-bottom: 10px;
|
||||
font-size: $base-font-size-default;
|
||||
color: $base-color-white;
|
||||
|
||||
span {
|
||||
&:first-of-type {
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title-container {
|
||||
position: relative;
|
||||
max-width: 100%;
|
||||
padding: 4.5vh;
|
||||
margin: calc((100vh - 475px) / 2) 5vw 5vw;
|
||||
overflow: hidden;
|
||||
background: url('~@/assets/login_images/login_form.png');
|
||||
background-size: 100% 100%;
|
||||
|
||||
.title {
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
color: $base-color-white;
|
||||
margin: 0 auto 40px auto;
|
||||
font-size: 34px;
|
||||
font-weight: bold;
|
||||
color: $base-color-blue;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.title-tips {
|
||||
margin-top: 29px;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
color: $base-color-white;
|
||||
}
|
||||
i {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 5px;
|
||||
z-index: $base-z-index;
|
||||
font-size: 16px;
|
||||
color: #ccc;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
margin: auto;
|
||||
display: inherit;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
margin-top: 5px;
|
||||
border: 0;
|
||||
font-size: 18px;
|
||||
.show-password {
|
||||
position: absolute;
|
||||
right: 25px;
|
||||
left: -35px;
|
||||
font-size: 16px;
|
||||
color: #ccc;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
::v-deep {
|
||||
.el-form-item {
|
||||
padding-right: 0;
|
||||
margin: 20px 0;
|
||||
color: #454545;
|
||||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px;
|
||||
|
||||
&__content {
|
||||
min-height: $base-input-height;
|
||||
line-height: $base-input-height;
|
||||
}
|
||||
|
||||
.forget-passwordword {
|
||||
width: 100%;
|
||||
margin-top: 40px;
|
||||
text-align: left;
|
||||
|
||||
.forget-password {
|
||||
width: 129px;
|
||||
height: 19px;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
color: rgba(92, 102, 240, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin-bottom: 10px;
|
||||
font-size: $base-font-size-default;
|
||||
color: $base-color-white;
|
||||
|
||||
span {
|
||||
&:first-of-type {
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title-container {
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
margin: 0 auto 40px auto;
|
||||
font-size: 34px;
|
||||
font-weight: bold;
|
||||
color: $base-color-blue;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
i {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 5px;
|
||||
z-index: $base-z-index;
|
||||
font-size: 16px;
|
||||
color: #d7dee3;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.show-password {
|
||||
position: absolute;
|
||||
right: 25px;
|
||||
left: -35px;
|
||||
font-size: 16px;
|
||||
color: #d7dee3;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
::v-deep {
|
||||
.el-form-item {
|
||||
padding-right: 0;
|
||||
margin: 20px 0;
|
||||
color: #454545;
|
||||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px;
|
||||
|
||||
&__content {
|
||||
min-height: $base-input-height;
|
||||
line-height: $base-input-height;
|
||||
}
|
||||
|
||||
&__error {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 18px;
|
||||
font-size: $base-font-size-small;
|
||||
line-height: 18px;
|
||||
color: $base-color-red;
|
||||
}
|
||||
}
|
||||
|
||||
.el-input {
|
||||
box-sizing: border-box;
|
||||
|
||||
input {
|
||||
height: 48px;
|
||||
padding-left: 35px;
|
||||
font-size: $base-font-size-default;
|
||||
line-height: 58px;
|
||||
background: #f6f4fc;
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.code {
|
||||
&__error {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
cursor: pointer;
|
||||
border-radius: $base-border-radius;
|
||||
top: 100%;
|
||||
left: 18px;
|
||||
font-size: $base-font-size-small;
|
||||
line-height: 18px;
|
||||
color: $base-color-red;
|
||||
}
|
||||
}
|
||||
|
||||
.el-input {
|
||||
box-sizing: border-box;
|
||||
|
||||
input {
|
||||
height: 48px;
|
||||
padding-left: 35px;
|
||||
font-size: $base-font-size-default;
|
||||
line-height: 58px;
|
||||
background: #f6f4fc;
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.code {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
cursor: pointer;
|
||||
border-radius: $base-border-radius;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
425
src/views/settings/config/receiptMachine.vue
Normal file
425
src/views/settings/config/receiptMachine.vue
Normal file
@ -0,0 +1,425 @@
|
||||
<template>
|
||||
<div class="receipt-machine-container">
|
||||
<div class="head">
|
||||
<div class="head-add-btn">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
type="primary"
|
||||
size="medium"
|
||||
@click="handleShowDialog"
|
||||
>
|
||||
添加小票机品牌
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="head-content">
|
||||
<span class="name">小票机名称:</span>
|
||||
<el-input
|
||||
placeholder="请输入自提点名称"
|
||||
suffix-icon="el-icon-search"
|
||||
v-model="brandName"
|
||||
size="medium"
|
||||
class="input-with-select"
|
||||
></el-input>
|
||||
<el-button type="primary" size="medium" @click="handleSearch">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button size="medium" @click="handleClear">清除条件</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:height="tableConfig.height"
|
||||
style="width: 100%"
|
||||
:stripe="true"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
v-for="(item, index) in tabColumn"
|
||||
:key="index"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
:width="item.width"
|
||||
>
|
||||
<template #default="{ row, $index }">
|
||||
<div class="" v-if="item.label == '操作'">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handleEdit(row, $index)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handleDelectReceipt(row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<!-- <el-button type="text" size="small">禁用</el-button> -->
|
||||
</div>
|
||||
<div v-else-if="item.label == '序号'">
|
||||
{{ $index + 1 }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ row[item.prop] }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog
|
||||
class="receipt-machine-dialog"
|
||||
:title="dialogTitle"
|
||||
:top="'40vh'"
|
||||
:width="'700px'"
|
||||
:visible.sync="showDialog"
|
||||
:before-close="handleCloseDialog"
|
||||
>
|
||||
<el-form
|
||||
ref="formDialog"
|
||||
class="form-dialog"
|
||||
:model="formDialog"
|
||||
:rules="formDialogRules"
|
||||
label-width="160px"
|
||||
>
|
||||
<el-form-item label="打票机型号" prop="model_name">
|
||||
<el-input
|
||||
v-model="formDialog.model_name"
|
||||
placeholder="飞鹅云打印机PF-V7"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="打票机型号备注名" prop="intro">
|
||||
<el-input
|
||||
v-model="formDialog.intro"
|
||||
placeholder="飞鹅云打印机PF-V7"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌名" prop="brand_name">
|
||||
<el-input
|
||||
v-model="formDialog.brand_name"
|
||||
placeholder="飞鹅"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="官网URL" prop="website_url">
|
||||
<el-input
|
||||
v-model="formDialog.website_url"
|
||||
placeholder="www.feieyun.com"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="纸张宽度" prop="paper_with">
|
||||
<el-input v-model="formDialog.paper_with" placeholder="58"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="handleCloseDialog">取 消</el-button>
|
||||
<el-button size="medium" type="primary" @click="handleSubmitForm">
|
||||
确 定
|
||||
</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-pagination
|
||||
background
|
||||
:current-page="params.pageNum"
|
||||
:layout="layout"
|
||||
:page-size="params.pageSize"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getReceiptMachineList,
|
||||
addReceiptMachine,
|
||||
delectReceiptMachine,
|
||||
updateReceiptMachine,
|
||||
} from '@/api/printer/printer'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showDialog: false,
|
||||
isEdit: false,
|
||||
dialogTitle: '添加小票机品牌',
|
||||
formDialog: {
|
||||
model_name: '',
|
||||
intro: '',
|
||||
brand_name: '',
|
||||
website_url: '',
|
||||
paper_with: '',
|
||||
},
|
||||
formDialogRules: {
|
||||
model_name: [
|
||||
{ required: true, message: '请输入打票机型号', trigger: 'blur' },
|
||||
],
|
||||
intro: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入打票机型号备注名',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
brand_name: [
|
||||
{ required: true, message: '请输入品牌名', trigger: 'blur' },
|
||||
],
|
||||
website_url: [
|
||||
{ required: true, message: '请输入官网URL', trigger: 'blur' },
|
||||
],
|
||||
paper_with: [
|
||||
{ required: true, message: '请输入纸张宽度', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
tableConfig: {
|
||||
height: window.innerHeight - 220 - 150,
|
||||
},
|
||||
layout: 'total, sizes, prev, pager, next, jumper',
|
||||
total: 0,
|
||||
params: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
brandName: null,
|
||||
tabColumn: [
|
||||
{
|
||||
prop: 'index',
|
||||
label: '序号',
|
||||
width: '51',
|
||||
},
|
||||
{
|
||||
prop: 'brand_name',
|
||||
label: '小票机品牌名称',
|
||||
},
|
||||
{
|
||||
prop: 'model_name',
|
||||
label: '小票机型号名称',
|
||||
},
|
||||
{
|
||||
prop: 'created_at',
|
||||
label: '创建时间',
|
||||
},
|
||||
{
|
||||
prop: 'paper_with',
|
||||
label: '纸张宽度',
|
||||
},
|
||||
{
|
||||
prop: 'operation',
|
||||
label: '操作',
|
||||
},
|
||||
],
|
||||
tableData: [
|
||||
{
|
||||
model_id: 1,
|
||||
brand_name: '飞鹅云打印机',
|
||||
model_name: '飞鹅云打印机PF-V5',
|
||||
intro: '飞鹅云打印机PF-V58-W',
|
||||
website_url: 'www.feieyun.com',
|
||||
paper_with: 58,
|
||||
status: 1,
|
||||
created_by: 1,
|
||||
updated_by: 1,
|
||||
created_at: '2024-10-29 15:17:01',
|
||||
updated_at: '2024-10-29 15:17:01',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getReceiptMachineList()
|
||||
},
|
||||
methods: {
|
||||
async getReceiptMachineList() {
|
||||
let res = await getReceiptMachineList(this.params)
|
||||
if (res && res.status == 200) {
|
||||
this.total = res.data.total
|
||||
this.tableData = res.data.items
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg || '服务器异常',
|
||||
})
|
||||
}
|
||||
},
|
||||
handleShowDialog() {
|
||||
this.showDialog = true
|
||||
},
|
||||
handleDelectReceipt(row) {
|
||||
this.$confirm('您确认删除这个小票机?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
let res = await delectReceiptMachine({ model_id: row.model_id })
|
||||
if (res && res.status == 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!',
|
||||
})
|
||||
this.getReceiptMachineList()
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除',
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSubmitForm() {
|
||||
this.$refs['formDialog'].validate(async (valid) => {
|
||||
if (valid) {
|
||||
let res = this.isEdit
|
||||
? await updateReceiptMachine(this.formDialog)
|
||||
: await addReceiptMachine(this.formDialog)
|
||||
if (res && res.status == 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: this.isEdit ? '修改成功' : '添加成功!',
|
||||
})
|
||||
this.showDialog = false
|
||||
this.isEdit = false
|
||||
this.getReceiptMachineList()
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSearch() {
|
||||
this.params = {
|
||||
keyword: this.brandName,
|
||||
...this.params,
|
||||
}
|
||||
this.getReceiptMachineList()
|
||||
},
|
||||
handleClear() {
|
||||
this.brandName = ''
|
||||
this.params = {
|
||||
pageNum: 1,
|
||||
paper_with: 20,
|
||||
}
|
||||
this.getReceiptMachineList()
|
||||
},
|
||||
handleSwitch() {},
|
||||
handleEdit(row) {
|
||||
this.showDialog = true
|
||||
this.isEdit = true
|
||||
this.formDialog = row
|
||||
},
|
||||
handleCloseDialog() {
|
||||
this.showDialog = false
|
||||
if (this.isEdit) {
|
||||
this.formDialog = {
|
||||
model_name: '',
|
||||
intro: '',
|
||||
brand_name: '',
|
||||
website_url: '',
|
||||
paper_with: '',
|
||||
}
|
||||
this.isEdit = false
|
||||
}
|
||||
},
|
||||
handleSizeChange(pageSize) {
|
||||
this.params.pageSize = pageSize
|
||||
this.getReceiptMachineList()
|
||||
},
|
||||
handleCurrentChange(pageNum) {
|
||||
this.params.pageNum = pageNum
|
||||
this.getReceiptMachineList()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.receipt-machine-container {
|
||||
padding: 0 20px !important;
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: inset 0 -1px 0 #efefef;
|
||||
|
||||
.head-add-btn {
|
||||
}
|
||||
|
||||
.head-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin: 20px 0;
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
margin: 0 10px;
|
||||
width: 270px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.receipt-machine-dialog {
|
||||
.el-dialog {
|
||||
border: 0;
|
||||
border-radius: 6px;
|
||||
background-clip: padding-box;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.el-dialog__header {
|
||||
padding: 12px 20px;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
|
||||
.el-dialog__title {
|
||||
font-size: 16px;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.el-dialog__headerbtn {
|
||||
top: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
padding: 40px 20px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
color: #666;
|
||||
min-height: 108px;
|
||||
overflow-y: auto;
|
||||
max-height: 620px;
|
||||
overflow: auto;
|
||||
|
||||
.form-dialog {
|
||||
min-height: 150px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 38px;
|
||||
width: 410px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__footer {
|
||||
border-top: 1px solid #f2f2f2;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.el-form-item__label {
|
||||
padding: 0 24px 0 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,746 +0,0 @@
|
||||
<template>
|
||||
<div class="addCloudPrint-container">
|
||||
|
||||
<div class="block-content block-content-set">
|
||||
<div class="title">打印机设置</div>
|
||||
<el-form ref="formSet" class="form-block" :model="form" label-width="120px" :rules="rules">
|
||||
<el-form-item label="活动名称" prop="activityName">
|
||||
<el-input v-model="form.activityName" :maxlength="20" placeholder="请输入内容" size="medium" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备品牌" prop="brand">
|
||||
<el-select size="medium" v-model="form.brand" placeholder="请选择活动区域">
|
||||
<el-option
|
||||
v-for="(item,index) of options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="打印机编号" prop="printerNumber">
|
||||
<el-input v-model="form.printerNumber" placeholder="请输入内容" size="medium"></el-input>
|
||||
<label class="tips">
|
||||
<label class="lable-name">找不到设备编号?
|
||||
<div class="lable-box">
|
||||
<div class="img"></div>
|
||||
</div>
|
||||
</label>
|
||||
</label>
|
||||
</el-form-item>
|
||||
<el-form-item label="打印机密钥" prop="printerKey">
|
||||
<el-input v-model="form.printerKey" placeholder="请输入打印机密钥" size="medium" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="URL" prop="url">
|
||||
<el-input v-model="form.url" placeholder="http://open.10ss.net:8888" size="medium" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="打印来源" class="form-activity-item" prop="activityType">
|
||||
<el-checkbox-group v-model="form.activityType" >
|
||||
<el-checkbox class="el-item-checkbox" label="收银台" name="type" ></el-checkbox>
|
||||
<el-checkbox class="el-item-checkbox" label="网店" name="type" ></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="纸张宽度" class="form-page-size-item">
|
||||
<el-radio-group v-model="form.resource">
|
||||
<el-radio class="el-item-radio" label="58">58mm</el-radio>
|
||||
<el-radio class="el-item-radio" label="80" :disabled="isDisabled" >80mm</el-radio>
|
||||
</el-radio-group>
|
||||
<div class="page-tips">80mm宽度仅支持“飞蛾打印机(新接口)”“芯烨云打印机”两种品牌。</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="block-content">
|
||||
<div class="title">商品订单</div>
|
||||
<el-table
|
||||
:data="tableOrderData"
|
||||
class="order-table"
|
||||
style="width: 100%">
|
||||
<el-table-column align="center" prop="printTimingName" label="打印时机">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="100px" prop="state" label="状态" class-name="table-column-item">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.state"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
|
||||
@change="handerState(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" size="medium" prop="tepOptions" label="使用模板" >
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="form.tepOptions[scope.$index]" placeholder="请选择小票模板" @change="handleTepOptions(scope.row,scope.$index)">
|
||||
<el-option
|
||||
v-for="(item,index) of tableOrderData[scope.$index].tepOptions"
|
||||
:key="item.value + index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="700" prop="printableItemTypesList" label="可打印商品类型">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox-group :true-label=1 :false-label=2 v-model="printableItemTypesCheckList[scope.$index]" class="checkbox-groups">
|
||||
<el-checkbox v-for="(item,index) of tableOrderData[scope.$index].printableItemTypesList"
|
||||
:key="index"
|
||||
:label="item.label">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="500" prop="orderLogisticsModeList" label="实体、批发商品需打印的订单物流方式">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox-group :true-label=1 :false-label=2 v-model="orderLogisticsModeCheckList[scope.$index]">
|
||||
<el-checkbox
|
||||
v-for="(item,index) of tableOrderData[scope.$index].orderLogisticsModeList"
|
||||
:key="index"
|
||||
:label="item.label">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="printConnectionNum" label="打印联数">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="tableOrderData[scope.$index].uniteOptions[scope.$index]" placeholder="请选择联数">
|
||||
<el-option
|
||||
v-for="(item,index) of tableOrderData[scope.$index].uniteOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px;">联</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="block-content">
|
||||
<div class="title">订单退款</div>
|
||||
<el-table
|
||||
:data="tableOrderData"
|
||||
class="order-table"
|
||||
style="width: 100%">
|
||||
<el-table-column align="center" prop="printTimingName" label="打印时机">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="100px" prop="state" label="状态" class-name="table-column-item">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.state"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
|
||||
@change="handerState(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" size="medium" prop="tepOptions" label="使用模板" >
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="form.tepOptions[scope.$index]" placeholder="请选择小票模板" @change="handleTepOptions(scope,scope.$index)">
|
||||
<el-option
|
||||
v-for="(item,index) of tableOrderData[scope.$index].tepOptions"
|
||||
:key="item.value + index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="700" prop="printableItemTypesList" label="可打印商品类型">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox-group :true-label=1 :false-label=2 v-model="printableItemTypesCheckList[scope.$index]" class="checkbox-groups">
|
||||
<el-checkbox v-for="(item,index) of tableOrderData[scope.$index].printableItemTypesList"
|
||||
:key="index"
|
||||
:label="item.label">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="500" prop="" label="">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="printConnectionNum" label="打印联数">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="tableOrderData[scope.$index].uniteOptions[scope.$index]" placeholder="请选择联数">
|
||||
<el-option
|
||||
v-for="(item,index) of tableOrderData[scope.$index].uniteOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px;">联</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="block-content">
|
||||
<div class="title">核销凭证</div>
|
||||
<el-table
|
||||
:data="tableOrderData"
|
||||
class="order-table"
|
||||
style="width: 100%">
|
||||
<el-table-column align="center" prop="printTimingName" label="打印时机">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="100px" prop="state" label="状态" class-name="table-column-item">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.state"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
|
||||
@change="handerState(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" size="medium" prop="tepOptions" label="使用模板" >
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="form.tepOptions[scope.$index]" placeholder="请选择小票模板">
|
||||
<el-option
|
||||
v-for="(item,index) of tableOrderData[scope.$index].tepOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="700" prop="printableItemTypesList" label="可打印商品类型">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox-group :true-label=1 :false-label=2 v-model="printableItemTypesCheckList[scope.$index]" class="checkbox-groups">
|
||||
<el-checkbox v-for="(item,index) of tableOrderData[scope.$index].printableItemTypesList"
|
||||
:key="index"
|
||||
:label="item.label">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="500" prop="" label=""></el-table-column>
|
||||
<el-table-column align="center" prop="printConnectionNum" label="打印联数">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="tableOrderData[scope.$index].uniteOptions[scope.$index]" placeholder="请选择联数">
|
||||
<el-option
|
||||
v-for="(item,index) of tableOrderData[scope.$index].uniteOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px;">联</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<el-button class="btn" size="medium">取消</el-button>
|
||||
<el-button class="btn" size="medium">测试打印</el-button>
|
||||
<el-button class="btn" size="medium" type="primary" @click="onSubmit">保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { forEachRight } from 'lodash';
|
||||
import { type } from 'vue-plugin-utils'
|
||||
export default {
|
||||
name:"addCloudPrint",
|
||||
data(){
|
||||
return{
|
||||
isDisabled:true,
|
||||
rules:{
|
||||
activityName:
|
||||
[
|
||||
{ required: true, message: '请输入打印机名称', trigger: 'blur' }
|
||||
],
|
||||
brand:
|
||||
[
|
||||
{ required: true, message: '请选择打印机品牌', trigger: 'change' }
|
||||
],
|
||||
printerNumber:
|
||||
[
|
||||
{ required: true, message: '请输入打印机编号', trigger: 'blur' }
|
||||
],
|
||||
activityType:
|
||||
[
|
||||
{ type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
|
||||
],
|
||||
printerKey:
|
||||
[
|
||||
{ required: true, message: '请输入打印机编号', trigger: 'blur' }
|
||||
],
|
||||
url:
|
||||
[
|
||||
{ required: true, message: '请填写URL', trigger: 'blur' },
|
||||
//{ pattern: /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/, message: '请输入有效的网址', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
options:[
|
||||
{
|
||||
value: '选项1',
|
||||
label: '365云打印S2(编号kdt2)'
|
||||
},
|
||||
{
|
||||
value: '选项2',
|
||||
label: '飞鹅打印机'
|
||||
}
|
||||
],
|
||||
form:{
|
||||
activityName:"",
|
||||
brand:"选项1",
|
||||
printerNumber:'',
|
||||
printerKey:'',
|
||||
url:'',
|
||||
activityType:[],
|
||||
tepOptions:[],
|
||||
resource:'58',
|
||||
},
|
||||
tepOptions:
|
||||
[
|
||||
{
|
||||
value: 1,
|
||||
label: '黄金糕'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '黄金糕2'
|
||||
}
|
||||
],
|
||||
printableItemTypesCheckList:
|
||||
[
|
||||
[1,2,3,4,5,6,7,8,9,10],[1,2,3,4,5,6,7,8,9,10]
|
||||
],
|
||||
orderLogisticsModeCheckList:
|
||||
[
|
||||
[1,2,3,4],
|
||||
[1,2,3,4]
|
||||
],
|
||||
tableOrderData:
|
||||
[
|
||||
{
|
||||
printTimingName:"下单打印",
|
||||
state:0,
|
||||
printableItemTypesList:
|
||||
[
|
||||
{
|
||||
label:1,
|
||||
name:"虚拟商品"
|
||||
},
|
||||
{
|
||||
label:2,
|
||||
name:"电子卡密"
|
||||
},
|
||||
{
|
||||
label:3,
|
||||
name:"计次时商品"
|
||||
},
|
||||
{
|
||||
label:4,
|
||||
name:"批发商品"
|
||||
},
|
||||
{
|
||||
label:5,
|
||||
name:"预约到店"
|
||||
},
|
||||
{
|
||||
label:6,
|
||||
name:"简牛生活"
|
||||
},
|
||||
{
|
||||
label:7,
|
||||
name:"当面付"
|
||||
},
|
||||
{
|
||||
label:8,
|
||||
name:"称重商品"
|
||||
},
|
||||
{
|
||||
label:9,
|
||||
name:"实体商品"
|
||||
},
|
||||
{
|
||||
label:10,
|
||||
name:"实体商品"
|
||||
},
|
||||
],
|
||||
orderLogisticsModeList:
|
||||
[
|
||||
{
|
||||
label:1,
|
||||
name:"快递"
|
||||
},
|
||||
{
|
||||
label:2,
|
||||
name:"自提"
|
||||
},
|
||||
{
|
||||
label:3,
|
||||
name:"同城配送"
|
||||
},
|
||||
{
|
||||
label:4,
|
||||
name:"无需物流"
|
||||
},
|
||||
],
|
||||
uniteOptions:
|
||||
[
|
||||
{
|
||||
value: 1,
|
||||
label: 1
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 2
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 3
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: 4
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
printTimingName:"付款后",
|
||||
state:1,
|
||||
printableItemTypesList:
|
||||
[
|
||||
{
|
||||
label:1,
|
||||
name:"虚拟商品"
|
||||
},
|
||||
{
|
||||
label:2,
|
||||
name:"电子卡密"
|
||||
},
|
||||
{
|
||||
label:3,
|
||||
name:"计次时商品"
|
||||
},
|
||||
{
|
||||
label:4,
|
||||
name:"批发商品"
|
||||
},
|
||||
{
|
||||
label:5,
|
||||
name:"预约到店"
|
||||
},
|
||||
{
|
||||
label:6,
|
||||
name:"简牛生活"
|
||||
},
|
||||
{
|
||||
label:7,
|
||||
name:"当面付"
|
||||
},
|
||||
{
|
||||
label:8,
|
||||
name:"称重商品"
|
||||
},
|
||||
{
|
||||
label:9,
|
||||
name:"实体商品"
|
||||
},
|
||||
{
|
||||
label:10,
|
||||
name:"实体商品"
|
||||
},
|
||||
],
|
||||
orderLogisticsModeList:
|
||||
[
|
||||
{
|
||||
label:1,
|
||||
name:"快递"
|
||||
},
|
||||
{
|
||||
label:2,
|
||||
name:"自提"
|
||||
},
|
||||
{
|
||||
label:3,
|
||||
name:"同城配送"
|
||||
},
|
||||
{
|
||||
label:4,
|
||||
name:"无需物流"
|
||||
},
|
||||
],
|
||||
uniteOptions:
|
||||
[
|
||||
{
|
||||
value: 1,
|
||||
label: 1
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 2
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 3
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: 4
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
form:{
|
||||
handler(val){
|
||||
if(val.value == '选项2'){
|
||||
this.isDisabled = false;
|
||||
}else{
|
||||
this.isDisabled = true;
|
||||
}
|
||||
},
|
||||
deep:true
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.getTepOptions();
|
||||
},
|
||||
methods:{
|
||||
getTepOptions(){
|
||||
|
||||
this.tableOrderData.forEach((item,index)=>{
|
||||
item.tepOptions = this.tepOptions;
|
||||
|
||||
})
|
||||
this.form.tepOptions = Array.from(Array(this.tableOrderData.length), item=>null);
|
||||
console.log("created",this.form);
|
||||
},
|
||||
handerState(item,index){
|
||||
//this.$set(this.tableOrderData,index,this.tableOrderData[index]);
|
||||
},
|
||||
handerStoreCheckbox(index){
|
||||
|
||||
},
|
||||
handleTepOptions(item,index){
|
||||
// this.tableOrderData[index].tepOptions[index].value = item;
|
||||
// console.log("handleTepOptions",this.tableOrderData);
|
||||
},
|
||||
onSubmit(){
|
||||
this.$refs['formSet'].validate((valid)=>{
|
||||
if(valid){
|
||||
let isError = false;
|
||||
let msg = '';
|
||||
this.tableOrderData.forEach((item,index) => {
|
||||
if(item.state == 1 && this.form.tepOptions[index] == null){
|
||||
isError = true;
|
||||
msg = '状态开启时请选择使用模板';
|
||||
}
|
||||
});
|
||||
if(isError){
|
||||
this.$baseMessage(msg, 'error')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" >
|
||||
.addCloudPrint-container{
|
||||
padding: 0 !important;
|
||||
background: #f6f8f9 !important;
|
||||
padding-bottom: 40px !important;
|
||||
|
||||
.title{
|
||||
padding: 20px;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.block-content{
|
||||
|
||||
margin-bottom: 20px;
|
||||
background: #fff;
|
||||
|
||||
&-set{
|
||||
|
||||
.el-input{
|
||||
width: 415px;
|
||||
height: 38px;
|
||||
}
|
||||
}
|
||||
|
||||
.form-block{
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.order-table{
|
||||
|
||||
padding: 20px 10px;
|
||||
|
||||
tbody{
|
||||
|
||||
tr {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
td{
|
||||
border-bottom: 10px solid #fff !important;
|
||||
background: #f6f8f9;
|
||||
|
||||
div{
|
||||
background: #f6f8f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.has-gutter{
|
||||
th{
|
||||
background: #fff;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item__label{
|
||||
padding: 0 15px 0 0 !important;
|
||||
}
|
||||
|
||||
.tips{
|
||||
|
||||
margin-left: 10px;
|
||||
color: #fb6638;
|
||||
|
||||
.lable-name{
|
||||
|
||||
position: relative;
|
||||
|
||||
&:hover{
|
||||
|
||||
.lable-box{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.lable-box{
|
||||
|
||||
position: absolute;
|
||||
top: -50px;
|
||||
left: 122px;
|
||||
padding: 8px 16px;
|
||||
width: 357px;
|
||||
height: 132px;
|
||||
background-color: #fff;
|
||||
background-clip: padding-box;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 6px rgba(0, 0, 0, .2);
|
||||
white-space: nowrap;
|
||||
opacity: 0;
|
||||
transition: opacity 0.4s ease-out;
|
||||
|
||||
&::after{
|
||||
content: "";
|
||||
display: block;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
border: 5px solid transparent;
|
||||
border-right: 5px solid white;
|
||||
position: relative;
|
||||
top: -60%;
|
||||
left: -26px;
|
||||
}
|
||||
|
||||
.img{
|
||||
position: relative;
|
||||
background-image: url(../../../../assets/sn.png);
|
||||
background-size: cover;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-activity-item,.form-page-size-item{
|
||||
|
||||
.el-form-item__content{
|
||||
margin-left: 123px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.page-tips{
|
||||
line-height: 20px;
|
||||
margin-top: 8px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.el-item-checkbox{
|
||||
|
||||
.el-checkbox__input{
|
||||
transform : scale(130%)
|
||||
}
|
||||
}
|
||||
|
||||
.el-item-radio{
|
||||
|
||||
.el-radio__input{
|
||||
transform : scale(130%)
|
||||
}
|
||||
|
||||
.el-radio__input.is-checked .el-radio__inner::after{
|
||||
transform: translate(-50%, -50%) scale(1.2) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-table_1_column_1{
|
||||
div{
|
||||
font-weight: bold !important;
|
||||
}
|
||||
}
|
||||
|
||||
.checkbox-groups{
|
||||
display: flex;
|
||||
flex-flow: wrap;
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.footer{
|
||||
position: fixed; /* 使用fixed定位 */
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 58px;
|
||||
background: #fff;
|
||||
color: white;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 10px 0;
|
||||
|
||||
.btn{
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,197 +1,285 @@
|
||||
<template>
|
||||
<div class="plotterManager-container">
|
||||
<div class="head">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
type="primary"
|
||||
size="medium"
|
||||
@click="handleSkip"
|
||||
>
|
||||
添加打印机
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span class="name">打印机名称:</span>
|
||||
<el-input
|
||||
placeholder="请输入打印机名称"
|
||||
suffix-icon="el-icon-search"
|
||||
v-model="inputData"
|
||||
size="medium"
|
||||
class="input-with-select">
|
||||
</el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="medium"
|
||||
@click="handleAdd"
|
||||
>
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button
|
||||
size="medium"
|
||||
@click="handleClear"
|
||||
>
|
||||
清除条件
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:height="tableConfig.height"
|
||||
:cell-class-name="handerColor"
|
||||
style="width: 100%">
|
||||
<el-table-column align="center" v-for="(item,index) in tabColumn" :key="index"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
>
|
||||
<template #default="{ row }" v-if="item.label == '操作'">
|
||||
<el-button type="text" size="small" @click="handleSkipEdit">编辑</el-button>
|
||||
<el-button type="text" size="small">删除</el-button>
|
||||
<el-button type="text" size="small">禁用</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
:current-page="queryForm.pageNum"
|
||||
:layout="layout"
|
||||
:page-size="queryForm.pageSize"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
<div class="plotterManager-container">
|
||||
<div class="head">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
type="primary"
|
||||
size="medium"
|
||||
@click="handleSkip"
|
||||
>
|
||||
添加打印机
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span class="name">打印机名称:</span>
|
||||
<el-input
|
||||
placeholder="请输入打印机名称"
|
||||
suffix-icon="el-icon-search"
|
||||
v-model="printerName"
|
||||
size="medium"
|
||||
class="input-with-select"
|
||||
></el-input>
|
||||
<el-button type="primary" size="medium" @click="handleSearch">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button size="medium" @click="handleClear">清除条件</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:height="tableConfig.height"
|
||||
:cell-class-name="handerColor"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
v-for="(item, index) in tabColumn"
|
||||
:key="index"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
>
|
||||
<template #default="{ row, $index }" v-if="item.label == '操作'">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handleSkipEdit(row, $index)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="text" size="small" @click="handerDelectPrint(row)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type="text" size="small" @click="handerDisabledPrint(row)">
|
||||
{{ row.status == '禁用' ? '启用' : '禁用' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
:current-page="params.pageNum"
|
||||
:layout="layout"
|
||||
:page-size="params.pageSize"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getPrinterList,
|
||||
delectPrinter,
|
||||
updatePrnterStatus,
|
||||
} from '@/api/printer/printer'
|
||||
export default {
|
||||
name:"plotterManager",
|
||||
data(){
|
||||
return{
|
||||
inputData:'',
|
||||
tableConfig: {
|
||||
height: window.innerHeight - 220 - 150,
|
||||
},
|
||||
queryForm: {
|
||||
stime: null,
|
||||
etime: null,
|
||||
kind_id:null,
|
||||
order_state_id:null,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
tabColumn:[
|
||||
{
|
||||
prop:"cloudName",
|
||||
label:"打印机名称",
|
||||
},
|
||||
{
|
||||
prop:"brand",
|
||||
label:"设备品牌",
|
||||
},
|
||||
{
|
||||
prop:"printSource",
|
||||
label:"打印来源",
|
||||
},
|
||||
{
|
||||
prop:"pageSize",
|
||||
label:"纸张大小",
|
||||
},
|
||||
{
|
||||
prop:"printReceipt",
|
||||
label:"打印小票",
|
||||
},
|
||||
{
|
||||
prop:"state",
|
||||
label:"状态",
|
||||
},
|
||||
{
|
||||
prop:"operation",
|
||||
label:"操作",
|
||||
}
|
||||
],
|
||||
tableData: [
|
||||
{
|
||||
|
||||
cloudName: '飞蛾',
|
||||
brand: '365云打印S2(编号kdt2)',
|
||||
printSource: '收银台',
|
||||
pageSize:"58mm",
|
||||
printReceipt:"",
|
||||
state:"启用",
|
||||
operation:"操作"
|
||||
},
|
||||
{
|
||||
cloudName: '飞蛾',
|
||||
brand: '365云打印S2(编号kdt2)',
|
||||
printSource: '收银台',
|
||||
pageSize:"58mm",
|
||||
printReceipt:"",
|
||||
state:"停用",
|
||||
operation:"操作"
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
handleSkip(){
|
||||
this.$router.push({path:"/addCloudPrint"})
|
||||
name: 'plotterManager',
|
||||
data() {
|
||||
return {
|
||||
layout: 'total, sizes, prev, pager, next, jumper',
|
||||
total: 0,
|
||||
printerName: '',
|
||||
tableConfig: {
|
||||
height: window.innerHeight - 220 - 150,
|
||||
},
|
||||
params: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
tabColumn: [
|
||||
{
|
||||
prop: 'printer_name',
|
||||
label: '打印机名称',
|
||||
},
|
||||
handleClear(){
|
||||
this.inputData = '';
|
||||
{
|
||||
prop: 'model_name',
|
||||
label: '设备品牌',
|
||||
},
|
||||
handleSkipEdit(){
|
||||
this.$router.push({path:"/editCloudPrint",query:{ printId : 1}})
|
||||
{
|
||||
prop: 'region',
|
||||
label: '打印来源',
|
||||
},
|
||||
handerColor({ row, column, rowIndex, columnIndex }){
|
||||
if(row){
|
||||
if(row.state == '启用' && columnIndex == 5){
|
||||
return "state-on";
|
||||
}
|
||||
if(row.state == '停用' && columnIndex == 5){
|
||||
return "state-off";
|
||||
}
|
||||
}
|
||||
{
|
||||
prop: 'paper_with',
|
||||
label: '纸张大小',
|
||||
},
|
||||
{
|
||||
prop: 'printReceipt',
|
||||
label: '打印小票',
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '状态',
|
||||
},
|
||||
{
|
||||
prop: 'operation',
|
||||
label: '操作',
|
||||
},
|
||||
],
|
||||
tableData: [
|
||||
{
|
||||
printer_name: '飞蛾',
|
||||
model_name: '365云打印S2(编号kdt2)',
|
||||
region: '收银台',
|
||||
paper_with: 58,
|
||||
printReceipt: '',
|
||||
status: 1,
|
||||
operation: '操作',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getPrinterList()
|
||||
},
|
||||
methods: {
|
||||
async handerDisabledPrint(item) {
|
||||
let res = await updatePrnterStatus({
|
||||
printer_id: item.printer_id,
|
||||
status: item.status == '禁用' ? 1 : 0,
|
||||
})
|
||||
if (res && res.status == 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: item.status == '禁用' ? '启动成功' : '禁用成功',
|
||||
})
|
||||
this.getPrinterList()
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
})
|
||||
}
|
||||
},
|
||||
handerDelectPrint(item) {
|
||||
this.$confirm('您确认删除这个打印机吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
let res = await delectPrinter({ printer_id: item.printer_id })
|
||||
if (res && res.status == 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!',
|
||||
})
|
||||
await this.getPrinterList()
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除',
|
||||
})
|
||||
})
|
||||
},
|
||||
async getPrinterList() {
|
||||
let res = await getPrinterList(this.params)
|
||||
if (res.status == 200) {
|
||||
this.total = res.data.total
|
||||
this.tableData = res.data.items
|
||||
this.tableData.forEach((item) => {
|
||||
item.paper_with += 'mm'
|
||||
if (item.status == 1) {
|
||||
item.status = '启用'
|
||||
} else {
|
||||
item.status = '禁用'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg || '服务器异常',
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSkip() {
|
||||
this.$router.push({ path: '/addCloudPrint' })
|
||||
},
|
||||
async handleClear() {
|
||||
this.printerName = ''
|
||||
this.params = {
|
||||
pageNum: 1,
|
||||
paper_with: 20,
|
||||
}
|
||||
await this.getPrinterList()
|
||||
},
|
||||
handleSkipEdit(row, index) {
|
||||
this.$router.push({
|
||||
path: '/editCloudPrint',
|
||||
query: { id: row.printer_id },
|
||||
})
|
||||
},
|
||||
handerColor({ row, column, rowIndex, columnIndex }) {
|
||||
if (row) {
|
||||
if (row.status == '启用' && columnIndex == 5) {
|
||||
return 'status-on'
|
||||
}
|
||||
if (row.status == '停用' && columnIndex == 5) {
|
||||
return 'status-off'
|
||||
}
|
||||
}
|
||||
},
|
||||
handleSearch() {
|
||||
this.params = {
|
||||
keyword: this.printerName,
|
||||
...this.params,
|
||||
}
|
||||
this.getPrinterList()
|
||||
},
|
||||
handleSizeChange(pageSize) {
|
||||
this.params.pageSize = pageSize
|
||||
this.getPrinterList()
|
||||
},
|
||||
handleCurrentChange(pageNum) {
|
||||
this.params.pageNum = pageNum
|
||||
this.getPrinterList()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.plotterManager-container {
|
||||
.head {
|
||||
padding-bottom: 20px;
|
||||
box-shadow: inset 0 -1px 0 #efefef;
|
||||
}
|
||||
|
||||
.head{
|
||||
padding-bottom: 20px;
|
||||
box-shadow: inset 0 -1px 0 #efefef;
|
||||
}
|
||||
.content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin: 20px 0;
|
||||
|
||||
.content{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin: 20px 0;
|
||||
.name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.name{
|
||||
font-weight: bold;
|
||||
}
|
||||
.input-with-select {
|
||||
margin: 0 10px;
|
||||
width: 270px;
|
||||
}
|
||||
}
|
||||
|
||||
.input-with-select{
|
||||
margin: 0 10px;
|
||||
width: 270px;
|
||||
}
|
||||
}
|
||||
.status- {
|
||||
&on {
|
||||
.cell {
|
||||
color: #48c978 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.state-{
|
||||
|
||||
&on{
|
||||
.cell{
|
||||
color: #48c978 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&off{
|
||||
.cell{
|
||||
color: red !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&off {
|
||||
.cell {
|
||||
color: red !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,218 +1,225 @@
|
||||
<template>
|
||||
<div class="plotterManager-container">
|
||||
<div class="head">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
type="primary"
|
||||
size="medium"
|
||||
@click="handleSkip"
|
||||
>
|
||||
添加新模板
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span class="name">模板名称:</span>
|
||||
<el-input
|
||||
placeholder="请输入模板名称"
|
||||
suffix-icon="el-icon-search"
|
||||
v-model="inputData"
|
||||
size="medium"
|
||||
class="input-with-select">
|
||||
</el-input>
|
||||
<span class="name">模板类型:</span>
|
||||
<el-select v-model="optionValue" placeholder="全部" size="medium" class="input-with-select">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="medium"
|
||||
@click="handleAdd"
|
||||
>
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button
|
||||
size="medium"
|
||||
@click="handleClear"
|
||||
>
|
||||
清除条件
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:height="tableConfig.height"
|
||||
:cell-class-name="handerColor"
|
||||
style="width: 100%">
|
||||
<el-table-column align="center" v-for="(item,index) in tabColumn" :key="index"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
>
|
||||
<template #default="{ row }" v-if="item.label == '操作'">
|
||||
<el-button type="text" size="small" @click="handleCheck">查看</el-button>
|
||||
<el-button type="text" size="small">编辑</el-button>
|
||||
<el-button type="text" size="small">禁用</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
:current-page="queryForm.pageNum"
|
||||
:layout="layout"
|
||||
:page-size="queryForm.pageSize"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
<receiptDialog ref="receiptDialog" />
|
||||
<div class="plotterManager-container">
|
||||
<div class="head">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
type="primary"
|
||||
size="medium"
|
||||
@click="handleSkipAdd"
|
||||
>
|
||||
添加新模板
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span class="name">模板名称:</span>
|
||||
<el-input
|
||||
placeholder="请输入模板名称"
|
||||
suffix-icon="el-icon-search"
|
||||
v-model="inputData"
|
||||
size="medium"
|
||||
class="input-with-select"
|
||||
></el-input>
|
||||
<span class="name">模板类型:</span>
|
||||
<el-select
|
||||
v-model="optionValue"
|
||||
placeholder="全部"
|
||||
size="medium"
|
||||
class="input-with-select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" size="medium" @click="handleAdd">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button size="medium" @click="handleClear">清除条件</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:height="tableConfig.height"
|
||||
:cell-class-name="handerColor"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
v-for="(item, index) in tabColumn"
|
||||
:key="index"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
>
|
||||
<template #default="{ row }" v-if="item.label == '操作'">
|
||||
<el-button type="text" size="small" @click="handleCheck">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button type="text" size="small" @click="handleSkipEdit()">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="text" size="small">禁用</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
:current-page="queryForm.pageNum"
|
||||
:layout="layout"
|
||||
:page-size="queryForm.pageSize"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
<receiptDialog ref="receiptDialog" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import receiptDialog from './receiptDialog'
|
||||
|
||||
export default {
|
||||
name:"plotterManager",
|
||||
components:{ receiptDialog },
|
||||
data(){
|
||||
return{
|
||||
inputData:'',
|
||||
optionValue:'',
|
||||
tableConfig: {
|
||||
height: window.innerHeight - 220 - 150,
|
||||
},
|
||||
options:
|
||||
[
|
||||
{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
},
|
||||
{
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
},
|
||||
],
|
||||
queryForm: {
|
||||
stime: null,
|
||||
etime: null,
|
||||
kind_id:null,
|
||||
order_state_id:null,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
tabColumn:[
|
||||
{
|
||||
prop:"tepName",
|
||||
label:"模版名称",
|
||||
},
|
||||
{
|
||||
prop:"tepType",
|
||||
label:"模版类型",
|
||||
},
|
||||
{
|
||||
prop:"state",
|
||||
label:"状态",
|
||||
},
|
||||
{
|
||||
prop:"createTime",
|
||||
label:"创建时间",
|
||||
},
|
||||
{
|
||||
prop:"operation",
|
||||
label:"操作",
|
||||
}
|
||||
],
|
||||
tableData: [
|
||||
{
|
||||
|
||||
tepName: '福家优鲜 线上超市',
|
||||
tepType: '订单打印',
|
||||
state:'已停用',
|
||||
createTime:"2024-05-07 14:47:55",
|
||||
operation:"操作"
|
||||
},
|
||||
{
|
||||
tepName: '飞蛾',
|
||||
tepType: '365云打印S2(编号kdt2)',
|
||||
state:"已使用",
|
||||
createTime:"2024-05-07 14:47:55",
|
||||
operation:"操作"
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
handleSkip(){
|
||||
this.$router.push({path:"/addTemplateManagement"})
|
||||
name: 'plotterManager',
|
||||
components: { receiptDialog },
|
||||
data() {
|
||||
return {
|
||||
total: 0,
|
||||
layout: 'total, sizes, prev, pager, next, jumper',
|
||||
queryForm: {
|
||||
stime: null,
|
||||
etime: null,
|
||||
kind_id: null,
|
||||
order_state_id: null,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
inputData: '',
|
||||
optionValue: '',
|
||||
tableConfig: {
|
||||
height: window.innerHeight - 220 - 150,
|
||||
},
|
||||
options: [
|
||||
{
|
||||
value: '选项1',
|
||||
label: '黄金糕',
|
||||
},
|
||||
handleClear(){
|
||||
this.inputData = '';
|
||||
{
|
||||
value: '选项2',
|
||||
label: '双皮奶',
|
||||
},
|
||||
handleCheck(){
|
||||
this.$refs['receiptDialog'].showDialog();
|
||||
],
|
||||
queryForm: {
|
||||
stime: null,
|
||||
etime: null,
|
||||
kind_id: null,
|
||||
order_state_id: null,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
tabColumn: [
|
||||
{
|
||||
prop: 'tepName',
|
||||
label: '模版名称',
|
||||
},
|
||||
handleAdd(){
|
||||
|
||||
{
|
||||
prop: 'tepType',
|
||||
label: '模版类型',
|
||||
},
|
||||
handleSizeChange(){
|
||||
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
},
|
||||
handleCurrentChange(){
|
||||
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
},
|
||||
handerColor({ row, column, rowIndex, columnIndex }){
|
||||
if(row){
|
||||
if(row.state == '已使用' && columnIndex == 2){
|
||||
return "state-on";
|
||||
}
|
||||
if(row.state == '已停用' && columnIndex == 2){
|
||||
return "state-off";
|
||||
}
|
||||
}
|
||||
{
|
||||
prop: 'operation',
|
||||
label: '操作',
|
||||
},
|
||||
],
|
||||
tableData: [
|
||||
{
|
||||
tepName: '福家优鲜 线上超市',
|
||||
tepType: '订单打印',
|
||||
state: '已停用',
|
||||
createTime: '2024-05-07 14:47:55',
|
||||
operation: '操作',
|
||||
},
|
||||
{
|
||||
tepName: '飞蛾',
|
||||
tepType: '365云打印S2(编号kdt2)',
|
||||
state: '已使用',
|
||||
createTime: '2024-05-07 14:47:55',
|
||||
operation: '操作',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSkipAdd() {
|
||||
this.$router.push({ path: '/templateManagementAdd' })
|
||||
},
|
||||
handleSkipEdit() {
|
||||
this.$router.push({ path: '/templateManagementEdit' })
|
||||
},
|
||||
handleClear() {
|
||||
this.inputData = ''
|
||||
},
|
||||
handleCheck() {
|
||||
this.$refs['receiptDialog'].showDialog()
|
||||
},
|
||||
handleAdd() {},
|
||||
handleSizeChange() {},
|
||||
handleCurrentChange() {},
|
||||
handerColor({ row, column, rowIndex, columnIndex }) {
|
||||
if (row) {
|
||||
if (row.state == '已使用' && columnIndex == 2) {
|
||||
return 'state-on'
|
||||
}
|
||||
if (row.state == '已停用' && columnIndex == 2) {
|
||||
return 'state-off'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.plotterManager-container {
|
||||
.head {
|
||||
padding-bottom: 20px;
|
||||
box-shadow: inset 0 -1px 0 #efefef;
|
||||
}
|
||||
|
||||
.head{
|
||||
padding-bottom: 20px;
|
||||
box-shadow: inset 0 -1px 0 #efefef;
|
||||
}
|
||||
.content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin: 20px 0;
|
||||
|
||||
.content{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin: 20px 0;
|
||||
.name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.name{
|
||||
font-weight: bold;
|
||||
}
|
||||
.input-with-select {
|
||||
margin: 0 10px;
|
||||
width: 270px;
|
||||
}
|
||||
}
|
||||
|
||||
.input-with-select{
|
||||
margin: 0 10px;
|
||||
width: 270px;
|
||||
}
|
||||
}
|
||||
.state- {
|
||||
&on {
|
||||
.cell {
|
||||
color: #48c978 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.state-{
|
||||
|
||||
&on{
|
||||
.cell{
|
||||
color: #48c978 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&off{
|
||||
.cell{
|
||||
color: red !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&off {
|
||||
.cell {
|
||||
color: red !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -116,226 +116,226 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { translateTitle as __ } from '@/utils/i18n'
|
||||
import Area from '@/components/VabArea/area'
|
||||
import keyword from '@/components/baiduMap/keyword'
|
||||
import { storeSetUp } from '@/api/store/base'
|
||||
import { translateTitle as __ } from '@/utils/i18n'
|
||||
import Area from '@/components/VabArea/area'
|
||||
import keyword from '@/components/baiduMap/keyword'
|
||||
import { storeSetUp } from '@/api/store/base'
|
||||
|
||||
export default {
|
||||
name: 'LocationEdit',
|
||||
components: { keyword, Area },
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
title: '',
|
||||
map_show: false,
|
||||
zoom: 15,
|
||||
mapCenter: { lng: '', lat: '' },
|
||||
rules: {
|
||||
store_district_id: [{ required: true, message: '省市区' }],
|
||||
export default {
|
||||
name: 'LocationEdit',
|
||||
components: { keyword, Area },
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
title: '',
|
||||
map_show: false,
|
||||
zoom: 15,
|
||||
mapCenter: { lng: '', lat: '' },
|
||||
rules: {
|
||||
store_district_id: [{ required: true, message: '省市区' }],
|
||||
|
||||
store_area: [{ required: true, message: '省市区' }],
|
||||
store_area: [{ required: true, message: '省市区' }],
|
||||
|
||||
store_address: [{ required: true, message: '详细地址' }],
|
||||
store_address: [{ required: true, message: '详细地址' }],
|
||||
|
||||
store_longitude: [{ required: true, message: '经度' }],
|
||||
store_latitude: [{ required: true, message: '纬度' }],
|
||||
store_opening_hours: [
|
||||
{ required: true, message: '请选择营业时间', trigger: 'blur' },
|
||||
],
|
||||
store_close_hours: [
|
||||
{ required: true, message: '请选择关闭时间', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
dialogFormVisible: false,
|
||||
queryArea: {
|
||||
province: { code: '', name: '' },
|
||||
city: { code: '', name: '' },
|
||||
district: { code: '', name: '' },
|
||||
},
|
||||
store_longitude: [{ required: true, message: '经度' }],
|
||||
store_latitude: [{ required: true, message: '纬度' }],
|
||||
store_opening_hours: [
|
||||
{ required: true, message: '请选择营业时间', trigger: 'blur' },
|
||||
],
|
||||
store_close_hours: [
|
||||
{ required: true, message: '请选择关闭时间', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
dialogFormVisible: false,
|
||||
queryArea: {
|
||||
province: { code: '', name: '' },
|
||||
city: { code: '', name: '' },
|
||||
district: { code: '', name: '' },
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
methods: {
|
||||
__,
|
||||
showEdit(row) {
|
||||
if (!row) {
|
||||
this.title = this.__('添加')
|
||||
} else {
|
||||
this.title = this.__('编辑')
|
||||
this.form = Object.assign({}, row)
|
||||
this.initData(row)
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.dialogFormVisible = true
|
||||
|
||||
//不允许同时为0
|
||||
if (this.form.store_longitude == 0 && this.form.store_latitude == 0) {
|
||||
this.form.store_longitude = ''
|
||||
this.form.store_latitude = ''
|
||||
}
|
||||
|
||||
this.$forceUpdate()
|
||||
},
|
||||
methods: {
|
||||
__,
|
||||
showEdit(row) {
|
||||
if (!row) {
|
||||
this.title = this.__('添加')
|
||||
} else {
|
||||
this.title = this.__('编辑')
|
||||
this.form = Object.assign({}, row)
|
||||
this.initData(row)
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
initData(row) {
|
||||
if (row.store_area) {
|
||||
this.form.store_area = row.store_area.split('/')
|
||||
}
|
||||
|
||||
//不允许同时为0
|
||||
if (this.form.store_longitude == 0 && this.form.store_latitude == 0) {
|
||||
this.form.store_longitude = ''
|
||||
this.form.store_latitude = ''
|
||||
}
|
||||
this.form.store_district_id = row.store_district_id.split('/')
|
||||
|
||||
this.$forceUpdate()
|
||||
},
|
||||
initData(row) {
|
||||
if (row.store_area) {
|
||||
this.form.store_area = row.store_area.split('/')
|
||||
}
|
||||
if (this.form.store_district_id.length > 0) {
|
||||
} else {
|
||||
this.form.store_district_id = ''
|
||||
}
|
||||
|
||||
this.form.store_district_id = row.store_district_id.split('/')
|
||||
this.initQueryArea(this.form.store_district_id, this.form.store_area)
|
||||
|
||||
if (this.form.store_district_id.length > 0) {
|
||||
} else {
|
||||
this.form.store_district_id = ''
|
||||
}
|
||||
|
||||
this.initQueryArea(this.form.store_district_id, this.form.store_area)
|
||||
|
||||
// 地图回显地位
|
||||
this.mapCenter.lat = this.form.store_latitude
|
||||
this.mapCenter.lng = this.form.store_longitude
|
||||
},
|
||||
|
||||
initQueryArea(store_district_id, store_area) {
|
||||
if (!store_district_id && store_area) return
|
||||
if (!store_area) return
|
||||
if (store_district_id[0]) {
|
||||
this.queryArea.province.code = store_district_id[0]
|
||||
}
|
||||
if (store_district_id[1]) {
|
||||
this.queryArea.city.code = store_district_id[1]
|
||||
}
|
||||
if (store_district_id[2]) {
|
||||
this.queryArea.district.code = store_district_id[2]
|
||||
}
|
||||
if (store_area[0]) {
|
||||
this.queryArea.province.name = store_area[0]
|
||||
}
|
||||
if (store_area[1]) {
|
||||
this.queryArea.city.name = store_area[1]
|
||||
}
|
||||
if (store_area[2]) {
|
||||
this.queryArea.district.name = store_area[2]
|
||||
}
|
||||
},
|
||||
|
||||
/***
|
||||
* 地图点击事件。
|
||||
*/
|
||||
getClickInfo(e) {
|
||||
this.mapCenter.lng = e.point.lng
|
||||
this.mapCenter.lat = e.point.lat
|
||||
|
||||
this.form.store_latitude = this.mapCenter.lat
|
||||
this.form.store_longitude = this.mapCenter.lng
|
||||
},
|
||||
syncCenterAndZoom(e) {
|
||||
const { lng, lat } = e.target.getCenter()
|
||||
this.mapCenter.lng = lng
|
||||
this.mapCenter.lat = lat
|
||||
this.zoom = e.target.getZoom()
|
||||
|
||||
console.info(this.zoom)
|
||||
console.info(this.mapCenter)
|
||||
|
||||
this.form.store_latitude = this.mapCenter.lat
|
||||
this.form.store_longitude = this.mapCenter.lng
|
||||
},
|
||||
getAddress(address) {
|
||||
console.info('address')
|
||||
console.info(address)
|
||||
this.form.store_address = address.value
|
||||
this.form.store_longitude = address.lng
|
||||
this.form.store_latitude = address.lat
|
||||
// 地图回显地位
|
||||
|
||||
this.mapCenter.lat = this.form.store_latitude
|
||||
this.mapCenter.lng = this.form.store_longitude
|
||||
},
|
||||
changeAddr(addr) {
|
||||
this.form.store_address = addr
|
||||
},
|
||||
close() {
|
||||
this.dialogFormVisible = false
|
||||
|
||||
this.form = {}
|
||||
this.queryArea = {
|
||||
province: { code: '', name: '' },
|
||||
city: { code: '', name: '' },
|
||||
district: { code: '', name: '' },
|
||||
}
|
||||
|
||||
this.$forceUpdate()
|
||||
},
|
||||
save() {
|
||||
console.info(this.mapCenter)
|
||||
let params = {}
|
||||
params = this.form
|
||||
|
||||
delete params.store_district_id
|
||||
|
||||
if (this.queryArea.province.name) {
|
||||
params.store_area = this.queryArea.province.name
|
||||
}
|
||||
if (this.queryArea.city.name) {
|
||||
params.store_area += '/' + this.queryArea.city.name
|
||||
}
|
||||
if (this.queryArea.district.name) {
|
||||
params.store_area += '/' + this.queryArea.district.name
|
||||
}
|
||||
|
||||
if (this.queryArea.province.code) {
|
||||
params.store_district_id = this.queryArea.province.code
|
||||
}
|
||||
if (this.queryArea.city.code) {
|
||||
params.store_district_id += '/' + this.queryArea.city.code
|
||||
}
|
||||
if (this.queryArea.district.code) {
|
||||
params.store_district_id += '/' + this.queryArea.district.code
|
||||
}
|
||||
|
||||
this.$refs['form'].validate(async (valid) => {
|
||||
if (valid) {
|
||||
// const chain_category_id =
|
||||
// params.chain_category_id[
|
||||
// params.chain_category_id.length - 1
|
||||
// ]
|
||||
// params.chain_category_id = chain_category_id
|
||||
|
||||
const { msg, status } = await storeSetUp(params)
|
||||
if (200 == status) {
|
||||
this.$baseMessage(msg, 'success')
|
||||
} else {
|
||||
this.$baseMessage(msg, 'error')
|
||||
}
|
||||
this.$emit('fetch-data')
|
||||
this.close()
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 地图回显地位
|
||||
this.mapCenter.lat = this.form.store_latitude
|
||||
this.mapCenter.lng = this.form.store_longitude
|
||||
},
|
||||
}
|
||||
|
||||
initQueryArea(store_district_id, store_area) {
|
||||
if (!store_district_id && store_area) return
|
||||
if (!store_area) return
|
||||
if (store_district_id[0]) {
|
||||
this.queryArea.province.code = store_district_id[0]
|
||||
}
|
||||
if (store_district_id[1]) {
|
||||
this.queryArea.city.code = store_district_id[1]
|
||||
}
|
||||
if (store_district_id[2]) {
|
||||
this.queryArea.district.code = store_district_id[2]
|
||||
}
|
||||
if (store_area[0]) {
|
||||
this.queryArea.province.name = store_area[0]
|
||||
}
|
||||
if (store_area[1]) {
|
||||
this.queryArea.city.name = store_area[1]
|
||||
}
|
||||
if (store_area[2]) {
|
||||
this.queryArea.district.name = store_area[2]
|
||||
}
|
||||
},
|
||||
|
||||
/***
|
||||
* 地图点击事件。
|
||||
*/
|
||||
getClickInfo(e) {
|
||||
this.mapCenter.lng = e.point.lng
|
||||
this.mapCenter.lat = e.point.lat
|
||||
|
||||
this.form.store_latitude = this.mapCenter.lat
|
||||
this.form.store_longitude = this.mapCenter.lng
|
||||
},
|
||||
syncCenterAndZoom(e) {
|
||||
const { lng, lat } = e.target.getCenter()
|
||||
this.mapCenter.lng = lng
|
||||
this.mapCenter.lat = lat
|
||||
this.zoom = e.target.getZoom()
|
||||
|
||||
console.info(this.zoom)
|
||||
console.info(this.mapCenter)
|
||||
|
||||
this.form.store_latitude = this.mapCenter.lat
|
||||
this.form.store_longitude = this.mapCenter.lng
|
||||
},
|
||||
getAddress(address) {
|
||||
console.info('address')
|
||||
console.info(address)
|
||||
this.form.store_address = address.value
|
||||
this.form.store_longitude = address.lng
|
||||
this.form.store_latitude = address.lat
|
||||
// 地图回显地位
|
||||
|
||||
this.mapCenter.lat = this.form.store_latitude
|
||||
this.mapCenter.lng = this.form.store_longitude
|
||||
},
|
||||
changeAddr(addr) {
|
||||
this.form.store_address = addr
|
||||
},
|
||||
close() {
|
||||
this.dialogFormVisible = false
|
||||
|
||||
this.form = {}
|
||||
this.queryArea = {
|
||||
province: { code: '', name: '' },
|
||||
city: { code: '', name: '' },
|
||||
district: { code: '', name: '' },
|
||||
}
|
||||
|
||||
this.$forceUpdate()
|
||||
},
|
||||
save() {
|
||||
console.info(this.mapCenter)
|
||||
let params = {}
|
||||
params = this.form
|
||||
|
||||
delete params.store_district_id
|
||||
|
||||
if (this.queryArea.province.name) {
|
||||
params.store_area = this.queryArea.province.name
|
||||
}
|
||||
if (this.queryArea.city.name) {
|
||||
params.store_area += '/' + this.queryArea.city.name
|
||||
}
|
||||
if (this.queryArea.district.name) {
|
||||
params.store_area += '/' + this.queryArea.district.name
|
||||
}
|
||||
|
||||
if (this.queryArea.province.code) {
|
||||
params.store_district_id = this.queryArea.province.code
|
||||
}
|
||||
if (this.queryArea.city.code) {
|
||||
params.store_district_id += '/' + this.queryArea.city.code
|
||||
}
|
||||
if (this.queryArea.district.code) {
|
||||
params.store_district_id += '/' + this.queryArea.district.code
|
||||
}
|
||||
|
||||
this.$refs['form'].validate(async (valid) => {
|
||||
if (valid) {
|
||||
// const chain_category_id =
|
||||
// params.chain_category_id[
|
||||
// params.chain_category_id.length - 1
|
||||
// ]
|
||||
// params.chain_category_id = chain_category_id
|
||||
|
||||
const { msg, status } = await storeSetUp(params)
|
||||
if (200 == status) {
|
||||
this.$baseMessage(msg, 'success')
|
||||
} else {
|
||||
this.$baseMessage(msg, 'error')
|
||||
}
|
||||
this.$emit('fetch-data')
|
||||
this.close()
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.map {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
.admin_info {
|
||||
margin-top: 20px;
|
||||
font-size: 18px;
|
||||
color: #b1eca4;
|
||||
}
|
||||
.sel_time {
|
||||
float: right;
|
||||
width: 325px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.map {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
.admin_info {
|
||||
margin-top: 20px;
|
||||
font-size: 18px;
|
||||
color: #b1eca4;
|
||||
}
|
||||
.sel_time {
|
||||
float: right;
|
||||
width: 325px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.el-form-item--small.el-form-item {
|
||||
}
|
||||
.el-form-item--small.el-form-item {
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,232 +1,358 @@
|
||||
<template>
|
||||
<div class="distributionMode-container">
|
||||
<div class="content-block">
|
||||
<div class="item">
|
||||
<div class="name">同城配送</div>
|
||||
<el-switch
|
||||
v-model="isCitySwitch"
|
||||
:active-text="switchText" @change="handleSwitchText">
|
||||
</el-switch>
|
||||
</div>
|
||||
<div class="item-2">
|
||||
<div class="tips">启用同城配送后,在配送范围内的买家可以选择同城配送,你可以接入第三方配送,也可以自己配送。</div>
|
||||
<div class="compile-block">
|
||||
<span class="compile-item">默认配送方式 </span>
|
||||
<span class="segmentation">|</span>
|
||||
<span class="compile-item" @click="skipu()">编辑同城配送</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="distributionMode-container">
|
||||
<div class="content-block">
|
||||
<div class="item">
|
||||
<div class="name">同城配送</div>
|
||||
<el-switch
|
||||
v-model="isCitySwitch"
|
||||
:active-text="switchText"
|
||||
@change="handleSwitchText"
|
||||
></el-switch>
|
||||
</div>
|
||||
<div class="item-2">
|
||||
<div class="tips">
|
||||
启用同城配送后,在配送范围内的买家可以选择同城配送,你可以接入第三方配送,也可以自己配送。
|
||||
</div>
|
||||
<div class="content-block">
|
||||
<div class="item">
|
||||
<div class="name">上门自提</div>
|
||||
<el-switch
|
||||
v-model="isCitySwitch"
|
||||
:active-text="switchText" @change="handleSwitchText">
|
||||
</el-switch>
|
||||
</div>
|
||||
<div class="item-2">
|
||||
<div class="tips">启用上门自提后,买家可以就近选择商品自提点,买家下单后,您需要确保买家指定的自提点商品库存充足。</div>
|
||||
<div class="compile-block">
|
||||
<span class="compile-item">查看自提点 </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="item-title">文字设置</div>
|
||||
<div class="item-block">
|
||||
<div class="item tips">修改文字后,手机端商城和PC端商城显示修改后的文字。</div>
|
||||
<div class="item">
|
||||
<div class="item-lable">同城配送</div>
|
||||
<el-input
|
||||
type="text"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.cityText"
|
||||
maxlength="4"
|
||||
show-word-limit
|
||||
class="item-input"
|
||||
>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-lable">上门自提</div>
|
||||
<el-input
|
||||
type="text"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.crvMoreText"
|
||||
maxlength="4"
|
||||
show-word-limit
|
||||
class="item-input"
|
||||
>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-lable">等待自提</div>
|
||||
<el-input
|
||||
type="text"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.awaitPickUpText"
|
||||
maxlength="4"
|
||||
show-word-limit
|
||||
class="item-input"
|
||||
>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-lable">配送时间</div>
|
||||
<el-input
|
||||
type="text"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.deliveryTimeText"
|
||||
maxlength="4"
|
||||
show-word-limit
|
||||
class="item-input"
|
||||
>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-lable">自提时间</div>
|
||||
<el-input
|
||||
type="text"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.pickUpTimeText"
|
||||
maxlength="4"
|
||||
show-word-limit
|
||||
class="item-input"
|
||||
>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-button class="btn" type="primary" size="medium">保存</el-button>
|
||||
</div>
|
||||
<div class="compile-block">
|
||||
<span class="compile-item" @click="handelShowDialog()">
|
||||
默认配送方式
|
||||
</span>
|
||||
<span class="segmentation">|</span>
|
||||
<span class="compile-item" @click="handleCitySkip()">
|
||||
编辑同城配送
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-block">
|
||||
<div class="item">
|
||||
<div class="name">上门自提</div>
|
||||
<el-switch
|
||||
v-model="isVisitSwitch"
|
||||
:active-text="visitSwitchText"
|
||||
@change="handleVisitSwitchText"
|
||||
></el-switch>
|
||||
</div>
|
||||
<div class="item-2">
|
||||
<div class="tips">
|
||||
启用上门自提后,买家可以就近选择商品自提点,买家下单后,您需要确保买家指定的自提点商品库存充足。
|
||||
</div>
|
||||
<div class="compile-block">
|
||||
<span class="compile-item" @click="handleVisitSkip()">
|
||||
查看自提点
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="item-title">文字设置</div>
|
||||
<div class="item-block">
|
||||
<div class="item tips">
|
||||
修改文字后,手机端商城和PC端商城显示修改后的文字。
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-lable">同城配送</div>
|
||||
<el-input
|
||||
type="text"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.cityText"
|
||||
maxlength="4"
|
||||
show-word-limit
|
||||
class="item-input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-lable">上门自提</div>
|
||||
<el-input
|
||||
type="text"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.crvMoreText"
|
||||
maxlength="4"
|
||||
show-word-limit
|
||||
class="item-input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-lable">等待自提</div>
|
||||
<el-input
|
||||
type="text"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.awaitPickUpText"
|
||||
maxlength="4"
|
||||
show-word-limit
|
||||
class="item-input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-lable">配送时间</div>
|
||||
<el-input
|
||||
type="text"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.deliveryTimeText"
|
||||
maxlength="4"
|
||||
show-word-limit
|
||||
class="item-input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="item-lable">自提时间</div>
|
||||
<el-input
|
||||
type="text"
|
||||
placeholder="请输入内容"
|
||||
v-model="form.pickUpTimeText"
|
||||
maxlength="4"
|
||||
show-word-limit
|
||||
class="item-input"
|
||||
></el-input>
|
||||
</div>
|
||||
<el-button class="btn" type="primary" size="medium">保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog
|
||||
class="default-delivery-dialog"
|
||||
:title="'默认配送方式'"
|
||||
:top="'40vh'"
|
||||
:width="'520px'"
|
||||
:visible.sync="showDialog"
|
||||
:before-close="handleCloseDialog"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
class="form-dialog"
|
||||
:model="formDialog"
|
||||
:rules="formDialogRules"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form-item label="默认配送方式" prop="distributionModeType">
|
||||
<el-select v-model="formDialog.distributionModeType">
|
||||
<el-option
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
placeholder="请默认配送方式"
|
||||
v-for="(item, index) of distributionModeOpction"
|
||||
:key="index"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="showDialog = false">取 消</el-button>
|
||||
<el-button size="medium" type="primary" @click="showDialog = false">
|
||||
确 定
|
||||
</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"distributionMode",
|
||||
data(){
|
||||
return{
|
||||
isCitySwitch:false,
|
||||
switchText:'关闭',
|
||||
form:{
|
||||
cityText:'同城配送',
|
||||
crvMoreText:'上门自提',
|
||||
awaitPickUpText:'等待自提',
|
||||
deliveryTimeText:'配送时间',
|
||||
pickUpTimeText:'自提时间'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
handleSwitchText(isSwitch){
|
||||
if(isSwitch){
|
||||
this.switchText = '开启'
|
||||
}else{
|
||||
this.switchText = '关闭'
|
||||
}
|
||||
name: 'distributionMode',
|
||||
data() {
|
||||
return {
|
||||
isCitySwitch: false,
|
||||
isVisitSwitch: false,
|
||||
showDialog: false,
|
||||
switchText: '关闭',
|
||||
visitSwitchText: '关闭',
|
||||
form: {
|
||||
cityText: '同城配送',
|
||||
crvMoreText: '上门自提',
|
||||
awaitPickUpText: '等待自提',
|
||||
deliveryTimeText: '配送时间',
|
||||
pickUpTimeText: '自提时间',
|
||||
},
|
||||
formDialog: {
|
||||
distributionModeType: 0,
|
||||
},
|
||||
formDialogRules: {
|
||||
distributionModeType: [
|
||||
{ required: true, message: '请选择默认配送方式', trigger: 'change' },
|
||||
],
|
||||
},
|
||||
distributionModeOpction: [
|
||||
{
|
||||
value: 0,
|
||||
label: '商家配送',
|
||||
},
|
||||
skipu(){
|
||||
this.$router.push({ path: '/localDelivery' });
|
||||
}
|
||||
{
|
||||
value: 1,
|
||||
label: '码科速送',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSwitchText(isSwitch) {
|
||||
if (isSwitch) {
|
||||
this.switchText = '开启'
|
||||
} else {
|
||||
this.switchText = '关闭'
|
||||
}
|
||||
},
|
||||
handleVisitSwitchText(isSwitch) {
|
||||
if (isSwitch) {
|
||||
this.visitSwitchText = '开启'
|
||||
} else {
|
||||
this.visitSwitchText = '关闭'
|
||||
}
|
||||
},
|
||||
handleVisitSkip() {
|
||||
this.$router.push({ path: '/selfPickUpSite' })
|
||||
},
|
||||
handleCitySkip() {
|
||||
this.$router.push({ path: '/localDelivery' })
|
||||
},
|
||||
handelShowDialog() {
|
||||
this.showDialog = true
|
||||
},
|
||||
handleCloseDialog() {
|
||||
this.showDialog = false
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.distributionMode-container{
|
||||
.distributionMode-container {
|
||||
padding: 0 !important;
|
||||
background: #f6f8f9 !important;
|
||||
|
||||
padding: 0 !important;
|
||||
background: #f6f8f9 !important;
|
||||
.content-block {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
margin-bottom: 24px;
|
||||
background: #fff;
|
||||
|
||||
.content-block{
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
margin-bottom: 24px;
|
||||
background: #fff;
|
||||
.item {
|
||||
display: flex;
|
||||
padding: 16px 20px;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
line-height: 1;
|
||||
|
||||
.item{
|
||||
display: flex;
|
||||
padding: 16px 20px;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
line-height: 1;
|
||||
|
||||
.name{
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.item-2{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
|
||||
|
||||
|
||||
.compile-block{
|
||||
color: #1890ff;
|
||||
|
||||
.segmentation{
|
||||
padding: 0 8px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.compile-item{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.name {
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.footer{
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
background: #fff;
|
||||
.item-2 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
|
||||
.item-title{
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
line-height: 1;
|
||||
.compile-block {
|
||||
color: #1890ff;
|
||||
|
||||
.segmentation {
|
||||
padding: 0 8px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.item-block{
|
||||
padding: 20px;
|
||||
|
||||
.tips{
|
||||
margin-bottom: 20px !important;
|
||||
}
|
||||
|
||||
.item{
|
||||
display: flex;
|
||||
margin-bottom: 30px;
|
||||
align-items:center;
|
||||
|
||||
&-lable{
|
||||
padding: 0 20px 0 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.item-input{
|
||||
width: 200px;
|
||||
height: 38px;
|
||||
|
||||
.el-input__inner{
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn{
|
||||
margin-left: 84px;
|
||||
}
|
||||
.compile-item {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
background: #fff;
|
||||
|
||||
.item-title {
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.item-block {
|
||||
padding: 20px;
|
||||
|
||||
.tips {
|
||||
margin-bottom: 20px !important;
|
||||
}
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
margin-bottom: 30px;
|
||||
align-items: center;
|
||||
|
||||
&-lable {
|
||||
padding: 0 20px 0 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.item-input {
|
||||
width: 200px;
|
||||
height: 38px;
|
||||
|
||||
.el-input__inner {
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-left: 84px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.default-delivery-dialog {
|
||||
.el-dialog {
|
||||
border: 0;
|
||||
border-radius: 6px;
|
||||
background-clip: padding-box;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.el-dialog__header {
|
||||
padding: 12px 20px;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
|
||||
.el-dialog__title {
|
||||
font-size: 16px;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.el-dialog__headerbtn {
|
||||
top: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
padding: 16px 20px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
color: #666;
|
||||
min-height: 108px;
|
||||
overflow-y: auto;
|
||||
max-height: 620px;
|
||||
overflow: auto;
|
||||
|
||||
.form-dialog {
|
||||
min-height: 150px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 38px;
|
||||
width: 198px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__footer {
|
||||
border-top: 1px solid #f2f2f2;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,221 @@
|
||||
export const distributionOpction =[
|
||||
{
|
||||
value:0,
|
||||
label:'飞速达'
|
||||
},
|
||||
{
|
||||
value:1,
|
||||
label:'快速达'
|
||||
},
|
||||
{
|
||||
value:2,
|
||||
label:'快速达-臻选型'
|
||||
},
|
||||
{
|
||||
value:3,
|
||||
label:'快速达-臻选型-45'
|
||||
},
|
||||
{
|
||||
value:4,
|
||||
label:'快速达-时效性'
|
||||
},
|
||||
{
|
||||
value:5,
|
||||
label:'快速达-普惠型'
|
||||
},
|
||||
{
|
||||
value:6,
|
||||
label:'及时达'
|
||||
},
|
||||
{
|
||||
value:7,
|
||||
label:'集中送'
|
||||
},
|
||||
{
|
||||
value:8,
|
||||
label:'跑腿-帮送'
|
||||
},
|
||||
{
|
||||
value:9,
|
||||
label:'及时达-新'
|
||||
},
|
||||
{
|
||||
value:10,
|
||||
label:'光速达-40'
|
||||
},
|
||||
{
|
||||
value:11,
|
||||
label:'光速达-45'
|
||||
},
|
||||
{
|
||||
value:12,
|
||||
label:'光速达-50'
|
||||
},
|
||||
{
|
||||
value:13,
|
||||
label:'光速达-55'
|
||||
},
|
||||
{
|
||||
value:14,
|
||||
label:'快速达-7590'
|
||||
},
|
||||
{
|
||||
value:15,
|
||||
label:'快速达-6090'
|
||||
},
|
||||
]
|
||||
|
||||
export const checkList = [
|
||||
{
|
||||
label:1,
|
||||
name:'商家配送'
|
||||
},
|
||||
{
|
||||
label:2,
|
||||
name:'第三方配送'
|
||||
}
|
||||
]
|
||||
|
||||
export const distributionList =[
|
||||
{
|
||||
label:1,
|
||||
imgUrl:require('@/assets/distribution_images/dada.png')
|
||||
},
|
||||
{
|
||||
label:2,
|
||||
imgUrl:require('@/assets/distribution_images/meituan.png')
|
||||
},
|
||||
{
|
||||
label:3,
|
||||
imgUrl:require('@/assets/distribution_images/sf.png')
|
||||
},
|
||||
{
|
||||
label:4,
|
||||
imgUrl:require('@/assets/distribution_images/ss.png')
|
||||
},
|
||||
{
|
||||
label:5,
|
||||
imgUrl:require('@/assets/distribution_images/uu.png')
|
||||
}
|
||||
]
|
||||
|
||||
export const goodsTypeData = {
|
||||
"1": "快餐",
|
||||
"2": "药品",
|
||||
"3": "百货",
|
||||
"4": "脏衣服收",
|
||||
"5": "干净衣服派",
|
||||
"6": "生鲜",
|
||||
"8": "高端饮品",
|
||||
"9": "现场勘验",
|
||||
"10": "快递",
|
||||
"12": "文件",
|
||||
"13": "蛋糕",
|
||||
"14": "鲜花",
|
||||
"15": "数码",
|
||||
"16": "服装",
|
||||
"17": "汽配",
|
||||
"18": "珠宝",
|
||||
"20": "披萨",
|
||||
"21": "中餐",
|
||||
"22": "水产",
|
||||
"27": "专人直送",
|
||||
"32": "中端饮品",
|
||||
"33": "便利店",
|
||||
"34": "面包糕点",
|
||||
"35": "火锅",
|
||||
"36": "证照",
|
||||
"40": "烧烤小龙虾",
|
||||
"41": "外部落地配",
|
||||
"47": "烟酒行",
|
||||
"48": "成人用品",
|
||||
"55": "宠物用品",
|
||||
"56": "母婴用品",
|
||||
"57": "美妆用品",
|
||||
"58": "家居建材",
|
||||
"59": "眼镜行",
|
||||
"60": "图文广告",
|
||||
"99": "其他"
|
||||
}
|
||||
|
||||
export const mapMinPriceTypeOpciotn = [
|
||||
{
|
||||
value:0,
|
||||
label:'商品原价'
|
||||
},
|
||||
{
|
||||
value:1,
|
||||
label:'商品折后价'
|
||||
},
|
||||
{
|
||||
value:2,
|
||||
label:'订单实付价'
|
||||
}
|
||||
]
|
||||
|
||||
export const freightReliefTypeOpction = [
|
||||
{
|
||||
value:0,
|
||||
label:'商品原价'
|
||||
},
|
||||
{
|
||||
value:1,
|
||||
label:'商品折后价'
|
||||
},
|
||||
]
|
||||
|
||||
export const weekListConfig =[
|
||||
{
|
||||
label:7,
|
||||
name:'周日',
|
||||
isDisabled:false
|
||||
},
|
||||
{
|
||||
label:1,
|
||||
name:'周一',
|
||||
isDisabled:false
|
||||
},
|
||||
{
|
||||
label:2,
|
||||
name:'周二',
|
||||
isDisabled:false
|
||||
},
|
||||
{
|
||||
label:3,
|
||||
name:'周三',
|
||||
isDisabled:false
|
||||
|
||||
},
|
||||
{
|
||||
label:4,
|
||||
name:'周四',
|
||||
isDisabled:false
|
||||
},
|
||||
{
|
||||
label:5,
|
||||
name:'周五',
|
||||
isDisabled:false
|
||||
},
|
||||
{
|
||||
label:6,
|
||||
name:'周六',
|
||||
isDisabled:false
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
export const periodOpction = [
|
||||
{
|
||||
value:0,
|
||||
label:'天'
|
||||
},
|
||||
{
|
||||
value:1,
|
||||
label:'小时'
|
||||
},
|
||||
{
|
||||
value:60,
|
||||
label:'分钟'
|
||||
},
|
||||
]
|
||||
|
||||
470
src/views/store/base/distributionSetup/editSelfPickUpSite.vue
Normal file
470
src/views/store/base/distributionSetup/editSelfPickUpSite.vue
Normal file
@ -0,0 +1,470 @@
|
||||
<template>
|
||||
<div class="edit-self-pick-up-site-container">
|
||||
<div class="block">
|
||||
<div class="head">自提点基本信息</div>
|
||||
<div class="content">
|
||||
<div class="left">
|
||||
<el-form ref="form" :model="form" label-width="180px" :rules="rules">
|
||||
<el-form-item label="自提点类型" prop="type">
|
||||
<el-radio-group v-model="form.type" @change="handleRadioType">
|
||||
<el-radio :label="0">使用已有门店</el-radio>
|
||||
<el-radio :label="1">自定义自提点</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<div v-if="form.type == 0">
|
||||
<el-form-item label="门店名称" prop="name">
|
||||
<el-select
|
||||
v-model="form.name"
|
||||
placeholder="请选择门店"
|
||||
class="input-address"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) of nameOpction"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="门店详细地址" prop="address">
|
||||
<el-input
|
||||
disabled
|
||||
class="input-address"
|
||||
v-model="form.address"
|
||||
placeholder="门店详细地址"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="门店营业时间" required>
|
||||
<div class="time-block">
|
||||
<el-time-picker
|
||||
class="input-time"
|
||||
type="date"
|
||||
placeholder="开始时间"
|
||||
v-model="form.time1"
|
||||
style="width: 100%"
|
||||
></el-time-picker>
|
||||
<span class="line">-</span>
|
||||
<el-time-picker
|
||||
class="input-time"
|
||||
placeholder="结束时间"
|
||||
v-model="form.time2"
|
||||
style="width: 100%"
|
||||
></el-time-picker>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="form.type == 1">
|
||||
<el-form-item label="自提点名称" prop="pickName">
|
||||
<el-input
|
||||
class="input-address"
|
||||
v-model="form.pickName"
|
||||
placeholder="请输入自提点名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="自提点所在地" prop="queryArea.city.name">
|
||||
<Area v-model="queryArea" width="400" />
|
||||
</el-form-item>
|
||||
<el-form-item label="自提点详细地址" prop="pickAddress">
|
||||
<keyword
|
||||
:keyword="form.pickAddress"
|
||||
:location="queryArea.city.name"
|
||||
:style="{ width: '400px' }"
|
||||
@getAddress="getAddress"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="门店营业时间" required>
|
||||
<div class="time-block">
|
||||
<el-form-item prop="pickTime1">
|
||||
<el-time-picker
|
||||
class="input-time"
|
||||
type="date"
|
||||
placeholder="开始时间"
|
||||
v-model="form.pickTime1"
|
||||
style="width: 100%"
|
||||
></el-time-picker>
|
||||
</el-form-item>
|
||||
<span class="line">-</span>
|
||||
<el-form-item prop="pickTime2">
|
||||
<el-time-picker
|
||||
class="input-time"
|
||||
placeholder="结束时间"
|
||||
v-model="form.pickTime2"
|
||||
style="width: 100%"
|
||||
></el-time-picker>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="right">
|
||||
<baidu-map class="map" :center="center" :zoom="15">
|
||||
<!-- <bm-overlay
|
||||
pane="labelPane"
|
||||
:class="{ sample: true }"
|
||||
v-if="showOverlay"
|
||||
@draw="draw"
|
||||
>
|
||||
<div>{{ form.pickName }}</div>
|
||||
</bm-overlay> -->
|
||||
<bm-marker v-if="showOverlay" :position="center" :dragging="true">
|
||||
<bm-label
|
||||
class="bm-lable"
|
||||
v-if="showOverlay"
|
||||
:content="form.pickName"
|
||||
:labelStyle="{
|
||||
fontSize: '12px',
|
||||
display: showOverlay ? 'table' : 'inline',
|
||||
}"
|
||||
:offset="{ width: -35, height: 35 }"
|
||||
/>
|
||||
</bm-marker>
|
||||
</baidu-map>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="block">
|
||||
<div class="head">自提点联系管理</div>
|
||||
<el-form
|
||||
class="bottom-form"
|
||||
ref="form"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item class="item-block">
|
||||
<el-form-item label="联系人" prop="contacts">
|
||||
<el-input
|
||||
class="input-address"
|
||||
v-model="form.contacts"
|
||||
placeholder="请输入联系人"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="联系电话"
|
||||
style="margin-left: 50px"
|
||||
prop="mobile"
|
||||
>
|
||||
<el-input
|
||||
class="input-address"
|
||||
v-model="form.mobile"
|
||||
placeholder="请输入自提点电话"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<el-button class="btn" size="medium">取消</el-button>
|
||||
<el-button class="btn" size="medium" type="primary" @click="handerSubmit">
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 校验手机
|
||||
const validateMobile = function (rule, value, callback) {
|
||||
const phoneRegex = /^1[3-9]\d{9}$/
|
||||
if (!value) {
|
||||
return callback(new Error('手机号码不能为空'))
|
||||
}
|
||||
if (!phoneRegex.test(value)) {
|
||||
return callback(new Error('请输入正确的手机号码'))
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
import Area from '@/components/VabArea/area'
|
||||
import keyword from '@/components/baiduMap/keyword'
|
||||
export default {
|
||||
components: { Area, keyword },
|
||||
data() {
|
||||
return {
|
||||
showOverlay: false,
|
||||
center: {
|
||||
lng: 0,
|
||||
lat: 0,
|
||||
},
|
||||
form: {
|
||||
type: 0,
|
||||
name: null,
|
||||
address: '',
|
||||
time1: '',
|
||||
time2: '',
|
||||
pickName: '',
|
||||
pickAddress: '',
|
||||
pickTime1: '',
|
||||
pickTime2: '',
|
||||
lng: 0,
|
||||
lat: 0,
|
||||
contacts: '',
|
||||
mobile: null,
|
||||
},
|
||||
queryArea: {
|
||||
province: { code: '', name: '' },
|
||||
city: { code: '', name: '' },
|
||||
district: { code: '', name: '' },
|
||||
},
|
||||
rules: {
|
||||
type: [
|
||||
{ required: true, message: '请选择自提点类型', trigger: 'change' },
|
||||
],
|
||||
name: [{ required: true, message: '请选择门店', trigger: 'change' }],
|
||||
address: [
|
||||
{ required: true, message: '请输入门店详细地址', trigger: 'blur' },
|
||||
],
|
||||
pickName: [
|
||||
{ required: true, message: '请输入自提点名称', trigger: 'blur' },
|
||||
],
|
||||
time1: [
|
||||
{
|
||||
type: 'date',
|
||||
required: true,
|
||||
message: '请选择开始时间',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
time2: [
|
||||
{
|
||||
type: 'date',
|
||||
required: true,
|
||||
message: '请选择结束时间',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
'queryArea.city.name': [
|
||||
{ required: true, message: '请选择自提点所在地', trigger: 'change' },
|
||||
],
|
||||
pickAddress: [
|
||||
{ required: true, message: '请输入自提点详细地址', trigger: 'blur' },
|
||||
],
|
||||
pickTime1: [
|
||||
{
|
||||
type: 'date',
|
||||
required: true,
|
||||
message: '请选择开始时间',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
pickTime2: [
|
||||
{
|
||||
type: 'date',
|
||||
required: true,
|
||||
message: '请选择结束时间',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
contacts: [
|
||||
{ required: true, message: '请输入联系人', trigger: 'blur' },
|
||||
],
|
||||
mobile: [
|
||||
{ required: true, message: '请输入自提点电话', trigger: 'blur' },
|
||||
{ validator: validateMobile.bind(this), trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
|
||||
nameOpction: [
|
||||
{
|
||||
value: 0,
|
||||
label: '岛内价',
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '哒哒',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
validateMobile() {},
|
||||
getAddress(address) {
|
||||
this.form.pickAddress = address.value
|
||||
this.form.lng = address.lng
|
||||
this.form.lat = address.lat
|
||||
this.center.lng = address.lng
|
||||
this.center.lat = address.lat
|
||||
this.showOverlay = true
|
||||
},
|
||||
draw({ el, BMap, map }) {
|
||||
const pixel = map.pointToOverlayPixel(
|
||||
new BMap.Point(this.center.lng, this.center.lat)
|
||||
)
|
||||
console.log(el)
|
||||
el.style.left = pixel.x - 60 + 'px'
|
||||
el.style.top = pixel.y - 20 + 'px'
|
||||
},
|
||||
handleRadioType(e) {
|
||||
if (e == 0) {
|
||||
this.showOverlay = false
|
||||
}
|
||||
},
|
||||
checkPickNameLength(text) {
|
||||
switch (text.length) {
|
||||
case 5:
|
||||
return -10
|
||||
|
||||
default:
|
||||
return0
|
||||
}
|
||||
},
|
||||
handerSubmit() {},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.edit-self-pick-up-site-container {
|
||||
padding: 10px !important;
|
||||
.block {
|
||||
.head {
|
||||
padding: 10px 20px 20px 20px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
box-shadow: inset 0 -1px 0 #efefef;
|
||||
}
|
||||
.content {
|
||||
padding: 60px 0;
|
||||
display: flex;
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
margin-left: 100px;
|
||||
|
||||
.map {
|
||||
width: 100%;
|
||||
height: 420px;
|
||||
|
||||
.sample {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
border: 1px solid blue;
|
||||
background-color: white;
|
||||
white-space: nowrap;
|
||||
cursor: default;
|
||||
padding: 3px;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
.BMapLabel {
|
||||
background: #000 !important;
|
||||
border: none !important;
|
||||
padding: 5px 10px !important;
|
||||
background: #0a87ff !important;
|
||||
font-weight: 500;
|
||||
border-radius: 3px;
|
||||
outline: none;
|
||||
color: #fff;
|
||||
box-shadow: 0px 2px 6px 2px rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.line {
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-form {
|
||||
padding: 50px 0;
|
||||
|
||||
.item-block {
|
||||
.el-form-item__content {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.input-address {
|
||||
.el-input__inner {
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.time-block {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.input-time {
|
||||
width: 127px !important;
|
||||
|
||||
.el-input__inner {
|
||||
width: 127px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-form-item__label {
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
|
||||
.el-radio__input {
|
||||
transform: scale(130%);
|
||||
}
|
||||
|
||||
.el-radio__inner {
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
.el-radio__input.is-checked .el-radio__inner::after {
|
||||
transform: translate(-50%, -50%) scale(1.2) !important;
|
||||
background-color: #1890ff !important;
|
||||
width: 5px !important;
|
||||
height: 5px !important;
|
||||
}
|
||||
|
||||
.el-checkbox__inner {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
|
||||
&::after {
|
||||
box-sizing: content-box;
|
||||
content: '';
|
||||
border: 2px solid #fff;
|
||||
border-left: 0;
|
||||
border-top: 0;
|
||||
height: 8px;
|
||||
width: 4px;
|
||||
left: 5px;
|
||||
top: 1px;
|
||||
position: absolute;
|
||||
transition: transform 0.15s ease-in 0.05s;
|
||||
transform-origin: center;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: fixed; /* 使用fixed定位 */
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 58px;
|
||||
background: #fff;
|
||||
color: white;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 10px 0;
|
||||
|
||||
.btn {
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,13 +1,172 @@
|
||||
<template>
|
||||
<div class="">物流接口</div>
|
||||
<div class="logisticsInterface-container">
|
||||
<div class="content" :style="{ height: minHeight + 'px' }">
|
||||
<el-form ref="form" class="form-dialog" :model="form" label-width="160px">
|
||||
<el-form-item label="类型选择" prop="">
|
||||
<el-radio-group v-model="form.typeSelect">
|
||||
<el-radio :label="0">快递鸟</el-radio>
|
||||
<el-radio :label="1">快递100</el-radio>
|
||||
<el-radio :label="2">阿里云</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="快递鸟套餐" prop="" v-if="form.typeSelect == 0">
|
||||
<el-radio-group v-model="form.setMeal">
|
||||
<el-radio :label="0">免费</el-radio>
|
||||
<el-radio :label="1">付费</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户ID" prop="" v-if="form.typeSelect == 0">
|
||||
<el-input clear="form-input" v-model="form.userID"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="API Key" prop="" v-if="form.typeSelect == 0">
|
||||
<el-input
|
||||
clear="form-input"
|
||||
v-model="form.kuaidiniaoApiKey"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="京东商家编码" prop="" v-if="form.typeSelect == 0">
|
||||
<el-input clear="form-input" v-model="form.code"></el-input>
|
||||
<div class="tips">
|
||||
若您使用京东物流,则需填写“京东商家编码”,否则将会造成物流信息无法查询
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="接口类型" prop="" v-if="form.typeSelect == 1">
|
||||
<el-radio-group v-model="form.apiType">
|
||||
<el-radio :label="0" disabled>免费版</el-radio>
|
||||
<el-radio :label="1">限量免费</el-radio>
|
||||
<el-radio :label="2">企业接口</el-radio>
|
||||
</el-radio-group>
|
||||
<div class="tips">因快递100接口变更,免费版功能暂时关闭</div>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="授权密钥(Key)"
|
||||
prop=""
|
||||
v-if="form.typeSelect == 1"
|
||||
>
|
||||
<el-input
|
||||
clear="form-input"
|
||||
v-model="form.kuaidi100ApiKey"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据缓存时间" prop="" v-if="form.typeSelect == 1">
|
||||
<el-input v-model="form.dataTimeNum">
|
||||
<label slot="append">分钟</label>
|
||||
</el-input>
|
||||
<div class="tips">
|
||||
正式接口可能存在次数限制问题,设置缓存时间后在指定时间内只调取缓存并不调用接口(数据可能会延迟)
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="APPCODE" prop="" v-if="form.typeSelect == 2">
|
||||
<el-input clear="form-input" v-model="form.ailiAPPCODE"></el-input>
|
||||
</el-form-item>
|
||||
<div class="tips" style="margin-left: 54px">
|
||||
提示:请到阿里云开通“
|
||||
<a
|
||||
href="https://market.aliyun.com/products/56928004/cmapi023201.html?spm=5176.730005.productlist.d_cmapi023201.29343524ubjjnd&innerSource=search_%E5%85%A8%E7%90%83%E5%BF%AB%E9%80%92%E7%89%A9%E6%B5%81%E6%9F%A5%E8%AF%A2#sku=yuncode1720100000"
|
||||
target="_blank"
|
||||
class="express"
|
||||
>
|
||||
全球快递物流查询
|
||||
</a>
|
||||
”服务,获取appcode填入此处
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<el-button class="btn" size="medium" type="primary" @click="handerSubmit">
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
minHeight: window.innerHeight - 220,
|
||||
form: {
|
||||
typeSelect: 0,
|
||||
setMeal: 0,
|
||||
userID: null,
|
||||
kuaidiniaoApiKey: null,
|
||||
code: null,
|
||||
apiType: 0,
|
||||
kuaidi100ApiKey: null,
|
||||
dataTimeNum: 5,
|
||||
ailiAPPCODE: null,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handerSubmit() {},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss">
|
||||
.logisticsInterface-container {
|
||||
position: relative;
|
||||
padding: 0 !important;
|
||||
background: #f6f8f9 !important;
|
||||
|
||||
.content {
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
|
||||
.tips {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: fixed; /* 使用fixed定位 */
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 58px;
|
||||
background: #fff;
|
||||
color: white;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 10px 0;
|
||||
|
||||
.btn {
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-input {
|
||||
width: 270px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
width: 270px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
}
|
||||
|
||||
.el-form-item__label {
|
||||
padding-right: 20px !important;
|
||||
}
|
||||
|
||||
.el-radio__input {
|
||||
transform: scale(130%);
|
||||
}
|
||||
|
||||
.el-radio__inner {
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
.el-radio__input.is-checked .el-radio__inner::after {
|
||||
transform: translate(-50%, -50%) scale(1.2) !important;
|
||||
background-color: #1890ff !important;
|
||||
width: 5px !important;
|
||||
height: 5px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
200
src/views/store/base/distributionSetup/selfPickUpSite.vue
Normal file
200
src/views/store/base/distributionSetup/selfPickUpSite.vue
Normal file
@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<div class="self-pick-up-site-container">
|
||||
<div class="head">
|
||||
<div class="head-add-btn">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
type="primary"
|
||||
size="medium"
|
||||
@click="handleSkip"
|
||||
>
|
||||
添加自提点
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="head-content">
|
||||
<span class="name">自提点名称:</span>
|
||||
<el-input
|
||||
placeholder="请输入自提点名称"
|
||||
suffix-icon="el-icon-search"
|
||||
v-model="inputData"
|
||||
size="medium"
|
||||
class="input-with-select"
|
||||
></el-input>
|
||||
<el-button type="primary" size="medium" @click="handleSearch">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button size="medium" @click="handleClear">清除条件</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:height="tableConfig.height"
|
||||
style="width: 100%"
|
||||
:stripe="true"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
v-for="(item, index) in tabColumn"
|
||||
:key="index"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
:width="item.width"
|
||||
>
|
||||
<template #default="{ row, $index }">
|
||||
<div class="" v-if="item.label == '操作'">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handleSkipEdit(row, $index)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="text" size="small">删除</el-button>
|
||||
<el-button type="text" size="small">禁用</el-button>
|
||||
</div>
|
||||
<div v-else-if="item.label == '状态'">
|
||||
<el-switch
|
||||
v-model="row[item.prop]"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ row[item.prop] }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
:current-page="queryForm.pageNum"
|
||||
:layout="layout"
|
||||
:page-size="queryForm.pageSize"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
total: 0,
|
||||
layout: 'total, sizes, prev, pager, next, jumper',
|
||||
queryForm: {
|
||||
stime: null,
|
||||
etime: null,
|
||||
kind_id: null,
|
||||
order_state_id: null,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
tableConfig: {
|
||||
height: window.innerHeight - 220 - 150,
|
||||
},
|
||||
inputData: null,
|
||||
tabColumn: [
|
||||
{
|
||||
prop: 'serialNumber',
|
||||
label: '序号',
|
||||
width: '51',
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '自提点名称',
|
||||
},
|
||||
{
|
||||
prop: 'address',
|
||||
label: '自提点地址',
|
||||
},
|
||||
{
|
||||
prop: 'contact',
|
||||
label: '自提点联系人',
|
||||
},
|
||||
{
|
||||
prop: 'mobile',
|
||||
label: '自提点联系电话',
|
||||
},
|
||||
{
|
||||
prop: 'time',
|
||||
label: '自提时间',
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
},
|
||||
{
|
||||
prop: 'operation',
|
||||
label: '操作',
|
||||
},
|
||||
],
|
||||
tableData: [
|
||||
{
|
||||
serialNumber: 1,
|
||||
name: '福家优先超市',
|
||||
address: '桂贵南路与郁江东路交汇处大龙城市广场1-3楼',
|
||||
contact: '赵福生',
|
||||
mobile: '13888888888',
|
||||
time: '07:30 - 22:30',
|
||||
state: 0,
|
||||
},
|
||||
{
|
||||
serialNumber: 2,
|
||||
name: '福家优先超市',
|
||||
address: '桂贵南路与郁江东路交汇处大龙城市广场1-3楼',
|
||||
contact: '赵福生',
|
||||
mobile: '13888888888',
|
||||
time: '07:30 - 22:30',
|
||||
state: 0,
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSkip() {
|
||||
this.$router.push({ path: '/selfPickUpSiteAdd' })
|
||||
},
|
||||
handleCurrentChange() {},
|
||||
handleSizeChange() {},
|
||||
handleSearch() {},
|
||||
handleClear() {},
|
||||
handleSwitch() {},
|
||||
handleSkipEdit() {
|
||||
this.$router.push({ path: '/selfPickUpSiteEdit' })
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.self-pick-up-site-container {
|
||||
padding: 0 20px !important;
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: inset 0 -1px 0 #efefef;
|
||||
|
||||
.head-add-btn {
|
||||
}
|
||||
|
||||
.head-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin: 20px 0;
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
margin: 0 10px;
|
||||
width: 270px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -193,125 +193,125 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { translateTitle as __ } from '@/utils/i18n'
|
||||
import { getConfig, edit } from '@/api/store/config'
|
||||
import { translateTitle as __ } from '@/utils/i18n'
|
||||
import { getConfig, edit } from '@/api/store/config'
|
||||
|
||||
export default {
|
||||
name: 'StoreConfig',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
sc_order_process: [],
|
||||
sc_order_return_process: [],
|
||||
export default {
|
||||
name: 'StoreConfig',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
sc_order_process: [],
|
||||
sc_order_return_process: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
__,
|
||||
async fetchData() {
|
||||
const { data } = await getConfig()
|
||||
if (data && data.sc_order_process) {
|
||||
this.sc_order_process = data.sc_order_process
|
||||
this.initProcess()
|
||||
}
|
||||
if (data && data.sc_order_return_process) {
|
||||
this.initReturnProcess()
|
||||
this.sc_order_return_process = data.sc_order_return_process
|
||||
}
|
||||
},
|
||||
created() {
|
||||
isProcessHighlight(code) {
|
||||
let index = this.sc_order_process.indexOf(code)
|
||||
return this.isHighlight(index)
|
||||
},
|
||||
isReturnProcessHighlight(code) {
|
||||
let index = this.sc_order_return_process.indexOf(code)
|
||||
return this.isHighlight(index)
|
||||
},
|
||||
isHighlight(index) {
|
||||
if (index === -1) {
|
||||
return 'circle'
|
||||
}
|
||||
return 'primary'
|
||||
},
|
||||
isProcessEnable(code) {
|
||||
let index = this.sc_order_process.indexOf(code)
|
||||
if (index === -1) {
|
||||
this.sc_order_process.push(code)
|
||||
} else {
|
||||
this.sc_order_process.splice(index, 1)
|
||||
}
|
||||
this.saveConfig()
|
||||
},
|
||||
isReturnProcessEnable(code) {
|
||||
let index = this.sc_order_return_process.indexOf(code)
|
||||
if (index === -1) {
|
||||
this.sc_order_return_process.push(code)
|
||||
} else {
|
||||
this.sc_order_return_process.splice(index, 1)
|
||||
}
|
||||
this.saveConfig()
|
||||
},
|
||||
async saveConfig() {
|
||||
this.sc_order_process.sort((a, b) => a - b)
|
||||
this.sc_order_return_process.sort((a, b) => a - b)
|
||||
const { msg, status } = await edit({
|
||||
sc_order_process: this.sc_order_process.toString(),
|
||||
sc_order_return_process: this.sc_order_return_process.toString(),
|
||||
})
|
||||
if (200 == status) {
|
||||
this.$baseMessage(msg, 'success')
|
||||
} else {
|
||||
this.$baseMessage(msg, 'error')
|
||||
}
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
__,
|
||||
async fetchData() {
|
||||
const { data } = await getConfig()
|
||||
if (data && data.sc_order_process) {
|
||||
this.sc_order_process = data.sc_order_process
|
||||
this.initProcess()
|
||||
}
|
||||
if (data && data.sc_order_return_process) {
|
||||
this.initReturnProcess()
|
||||
this.sc_order_return_process = data.sc_order_return_process
|
||||
}
|
||||
},
|
||||
isProcessHighlight(code) {
|
||||
let index = this.sc_order_process.indexOf(code)
|
||||
return this.isHighlight(index)
|
||||
},
|
||||
isReturnProcessHighlight(code) {
|
||||
let index = this.sc_order_return_process.indexOf(code)
|
||||
return this.isHighlight(index)
|
||||
},
|
||||
isHighlight(index) {
|
||||
if (index === -1) {
|
||||
return 'circle'
|
||||
}
|
||||
return 'primary'
|
||||
},
|
||||
isProcessEnable(code) {
|
||||
let index = this.sc_order_process.indexOf(code)
|
||||
if (index === -1) {
|
||||
this.sc_order_process.push(code)
|
||||
} else {
|
||||
this.sc_order_process.splice(index, 1)
|
||||
}
|
||||
this.saveConfig()
|
||||
},
|
||||
isReturnProcessEnable(code) {
|
||||
let index = this.sc_order_return_process.indexOf(code)
|
||||
if (index === -1) {
|
||||
this.sc_order_return_process.push(code)
|
||||
} else {
|
||||
this.sc_order_return_process.splice(index, 1)
|
||||
}
|
||||
this.saveConfig()
|
||||
},
|
||||
async saveConfig() {
|
||||
this.sc_order_process.sort((a, b) => a - b)
|
||||
this.sc_order_return_process.sort((a, b) => a - b)
|
||||
const { msg, status } = await edit({
|
||||
sc_order_process: this.sc_order_process.toString(),
|
||||
sc_order_return_process: this.sc_order_return_process.toString(),
|
||||
})
|
||||
if (200 == status) {
|
||||
this.$baseMessage(msg, 'success')
|
||||
} else {
|
||||
this.$baseMessage(msg, 'error')
|
||||
}
|
||||
this.fetchData()
|
||||
},
|
||||
initProcess() {
|
||||
let index = this.sc_order_process.indexOf(2020)
|
||||
if (index === -1) {
|
||||
this.sc_order_process.push(2020)
|
||||
}
|
||||
initProcess() {
|
||||
let index = this.sc_order_process.indexOf(2020)
|
||||
if (index === -1) {
|
||||
this.sc_order_process.push(2020)
|
||||
}
|
||||
|
||||
|
||||
index = this.sc_order_process.indexOf(2030)
|
||||
if (index === -1) {
|
||||
this.sc_order_process.push(2030)
|
||||
}
|
||||
},
|
||||
initReturnProcess() {
|
||||
let index = this.sc_order_return_process.indexOf(3100)
|
||||
if (index === -1) {
|
||||
this.sc_order_return_process.push(3100)
|
||||
}
|
||||
index = this.sc_order_process.indexOf(3105)
|
||||
if (index === -1) {
|
||||
this.sc_order_return_process.push(3105)
|
||||
}
|
||||
index = this.sc_order_process.indexOf(3125)
|
||||
if (index === -1) {
|
||||
this.sc_order_return_process.push(3125)
|
||||
}
|
||||
},
|
||||
index = this.sc_order_process.indexOf(2030)
|
||||
if (index === -1) {
|
||||
this.sc_order_process.push(2030)
|
||||
}
|
||||
},
|
||||
}
|
||||
initReturnProcess() {
|
||||
let index = this.sc_order_return_process.indexOf(3100)
|
||||
if (index === -1) {
|
||||
this.sc_order_return_process.push(3100)
|
||||
}
|
||||
index = this.sc_order_process.indexOf(3105)
|
||||
if (index === -1) {
|
||||
this.sc_order_return_process.push(3105)
|
||||
}
|
||||
index = this.sc_order_process.indexOf(3125)
|
||||
if (index === -1) {
|
||||
this.sc_order_return_process.push(3125)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.button-config {
|
||||
display: block;
|
||||
margin: auto;
|
||||
}
|
||||
.button-config {
|
||||
display: block;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.font-config {
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
.font-config {
|
||||
text-align: center;
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.button-config .el-icon-setting:before {
|
||||
font-size: x-large;
|
||||
}
|
||||
.button-config .el-icon-setting:before {
|
||||
font-size: x-large;
|
||||
}
|
||||
|
||||
.divider-config {
|
||||
margin: 24px 0 !important;
|
||||
}
|
||||
.divider-config {
|
||||
margin: 24px 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -57,7 +57,11 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-form-item :label="__('店铺banner')" label-width="150px" prop="store_banner">
|
||||
<el-form-item
|
||||
:label="__('店铺banner')"
|
||||
label-width="150px"
|
||||
prop="store_banner"
|
||||
>
|
||||
<upload
|
||||
height="48px"
|
||||
:image="storeForm.store_banner"
|
||||
@ -229,7 +233,12 @@
|
||||
<el-form-item
|
||||
label-width="150px"
|
||||
prop="img"
|
||||
style="margin-top: 30px; margin-left: -150px;height: 76px;line-height: 76px;"
|
||||
style="
|
||||
margin-top: 30px;
|
||||
margin-left: -150px;
|
||||
height: 76px;
|
||||
line-height: 76px;
|
||||
"
|
||||
>
|
||||
<upload
|
||||
height="76px"
|
||||
@ -254,9 +263,7 @@
|
||||
<el-form-item prop="check">
|
||||
<el-switch
|
||||
v-model="item.check"
|
||||
|
||||
active-text="启动"
|
||||
|
||||
inactive-text="停用"
|
||||
@change="handleEdit(getSlideShowForm())"
|
||||
/>
|
||||
@ -385,9 +392,7 @@
|
||||
<el-form-item :label="__('是否开票')" prop="check">
|
||||
<el-switch
|
||||
v-model="storeConfigForm.sc_is_enabled_invoice"
|
||||
|
||||
active-text="启动"
|
||||
|
||||
inactive-text="停用"
|
||||
@change="handleEdit(getStoreConfigForm())"
|
||||
/>
|
||||
@ -407,74 +412,258 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { translateTitle as __ } from '@/utils/i18n'
|
||||
import VabQuill from '@/extra/VabQuill'
|
||||
import Area from '@/components/VabArea/area'
|
||||
import upload from '@/components/upload'
|
||||
import tree from '@/components/universalTreeSelect.vue'
|
||||
import keyword from '@/components/baiduMap/keyword'
|
||||
import { get, storeSetUp } from '@/api/store/base'
|
||||
import { getTree } from '@/api/base/market/category'
|
||||
import { translateTitle as __ } from '@/utils/i18n'
|
||||
import VabQuill from '@/extra/VabQuill'
|
||||
import Area from '@/components/VabArea/area'
|
||||
import upload from '@/components/upload'
|
||||
import tree from '@/components/universalTreeSelect.vue'
|
||||
import keyword from '@/components/baiduMap/keyword'
|
||||
import { get, storeSetUp } from '@/api/store/base'
|
||||
import { getTree } from '@/api/base/market/category'
|
||||
|
||||
export default {
|
||||
name: 'SetUpShop',
|
||||
components: { VabQuill, Area, upload, keyword, tree },
|
||||
data() {
|
||||
return {
|
||||
tableConfig: {
|
||||
height: window.innerHeight - 220 - 90,
|
||||
export default {
|
||||
name: 'SetUpShop',
|
||||
components: { VabQuill, Area, upload, keyword, tree },
|
||||
data() {
|
||||
return {
|
||||
tableConfig: {
|
||||
height: window.innerHeight - 220 - 90,
|
||||
},
|
||||
test: 666,
|
||||
treeData: [],
|
||||
activeName: 'first',
|
||||
optionslist: [
|
||||
{
|
||||
value: '1001',
|
||||
label: this.__('免费停车'),
|
||||
},
|
||||
test: 666,
|
||||
treeData: [],
|
||||
activeName: 'first',
|
||||
optionslist: [
|
||||
{
|
||||
value: '1001',
|
||||
label: this.__('免费停车'),
|
||||
},
|
||||
{
|
||||
value: '1002',
|
||||
label: this.__('免费WiFi'),
|
||||
},
|
||||
{
|
||||
value: '1003',
|
||||
label: this.__('免费送货'),
|
||||
{
|
||||
value: '1002',
|
||||
label: this.__('免费WiFi'),
|
||||
},
|
||||
{
|
||||
value: '1003',
|
||||
label: this.__('免费送货'),
|
||||
},
|
||||
],
|
||||
value: '',
|
||||
options: {
|
||||
theme: 'snow',
|
||||
bounds: document.body,
|
||||
debug: 'warn',
|
||||
modules: {
|
||||
toolbar: {
|
||||
container: [
|
||||
['bold', 'italic', 'underline', 'strike'],
|
||||
[{ header: [1, 2, 3, 4, 5, 6, false] }],
|
||||
[{ size: ['small', false, 'large', 'huge'] }],
|
||||
[{ color: [] }, { background: [] }],
|
||||
['blockquote', 'code-block'],
|
||||
[{ list: 'ordered' }, { list: 'bullet' }],
|
||||
[{ script: 'sub' }, { script: 'super' }],
|
||||
[{ indent: '-1' }, { indent: '+1' }],
|
||||
[{ align: [] }],
|
||||
[{ direction: 'rtl' }],
|
||||
[{ font: [] }],
|
||||
['clean'],
|
||||
['link', 'image', 'vab-upload-image'],
|
||||
],
|
||||
},
|
||||
},
|
||||
placeholder: '',
|
||||
readOnly: false,
|
||||
},
|
||||
defaultProps: {
|
||||
label: 'category_name',
|
||||
children: 'children',
|
||||
disabled: 'disabled',
|
||||
},
|
||||
storeForm: {},
|
||||
slideShowForm: {
|
||||
store_slide: [
|
||||
{ img: '', check: true, name: '' },
|
||||
{ img: '', check: true, name: '' },
|
||||
{ img: '', check: true, name: '' },
|
||||
{ img: '', check: true, name: '' },
|
||||
{ img: '', check: true, name: '' },
|
||||
],
|
||||
value: '',
|
||||
options: {
|
||||
theme: 'snow',
|
||||
bounds: document.body,
|
||||
debug: 'warn',
|
||||
modules: {
|
||||
toolbar: {
|
||||
container: [
|
||||
['bold', 'italic', 'underline', 'strike'],
|
||||
[{ header: [1, 2, 3, 4, 5, 6, false] }],
|
||||
[{ size: ['small', false, 'large', 'huge'] }],
|
||||
[{ color: [] }, { background: [] }],
|
||||
['blockquote', 'code-block'],
|
||||
[{ list: 'ordered' }, { list: 'bullet' }],
|
||||
[{ script: 'sub' }, { script: 'super' }],
|
||||
[{ indent: '-1' }, { indent: '+1' }],
|
||||
[{ align: [] }],
|
||||
[{ direction: 'rtl' }],
|
||||
[{ font: [] }],
|
||||
['clean'],
|
||||
['link', 'image', 'vab-upload-image'],
|
||||
],
|
||||
},
|
||||
},
|
||||
placeholder: '',
|
||||
readOnly: false,
|
||||
},
|
||||
defaultProps: {
|
||||
label: 'category_name',
|
||||
children: 'children',
|
||||
disabled: 'disabled',
|
||||
},
|
||||
storeForm: {},
|
||||
slideShowForm: {
|
||||
},
|
||||
physicalStoreForm: {
|
||||
store_notice: undefined,
|
||||
store_o2o_tags: [],
|
||||
store_opening_hours: undefined,
|
||||
store_close_hours: undefined,
|
||||
store_discount: undefined,
|
||||
store_circle: undefined,
|
||||
},
|
||||
storeConfigForm: {
|
||||
sc_is_enabled_invoice: undefined,
|
||||
},
|
||||
form: {
|
||||
store_name: undefined,
|
||||
store_logo: undefined,
|
||||
store_slogan: undefined,
|
||||
store_address: undefined,
|
||||
store_longitude: '',
|
||||
store_latitude: '',
|
||||
str_store_area: undefined,
|
||||
store_tel: undefined,
|
||||
store_opening_hours: undefined,
|
||||
store_circle: undefined,
|
||||
store_discount: undefined,
|
||||
store_close_hours: undefined,
|
||||
store_qq: undefined,
|
||||
company_description: undefined,
|
||||
store_banner: undefined,
|
||||
store_ww: undefined,
|
||||
store_notice: undefined,
|
||||
store_o2o_tags: [],
|
||||
store_district_id: '',
|
||||
},
|
||||
queryArea: {
|
||||
province: { code: '', name: '' },
|
||||
city: { code: '', name: '' },
|
||||
district: { code: '', name: '' },
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.getTree()
|
||||
},
|
||||
methods: {
|
||||
getPhysicalStoreParams() {
|
||||
const form = this.physicalStoreForm
|
||||
let params = {
|
||||
store_notice: form.store_notice,
|
||||
store_o2o_tags: form.store_o2o_tags.toString(),
|
||||
store_opening_hours: form.store_opening_hours,
|
||||
store_close_hours: form.store_close_hours,
|
||||
store_discount: form.store_discount,
|
||||
store_circle: form.store_circle,
|
||||
}
|
||||
return params
|
||||
},
|
||||
getStoreParams() {
|
||||
const form = this.storeForm
|
||||
let params = {
|
||||
store_name: form.store_name,
|
||||
store_slogan: form.store_slogan,
|
||||
store_logo: form.store_logo,
|
||||
store_banner: form.store_banner,
|
||||
store_address: form.store_address,
|
||||
store_longitude: form.store_longitude,
|
||||
store_latitude: form.store_latitude,
|
||||
store_tel: form.store_tel,
|
||||
store_qq: form.store_qq,
|
||||
store_ww: form.store_ww,
|
||||
company_description: form.company_description,
|
||||
}
|
||||
|
||||
if (this.queryArea.province.name) {
|
||||
params.store_area = this.queryArea.province.name
|
||||
}
|
||||
if (this.queryArea.city.name) {
|
||||
params.store_area += '/' + this.queryArea.city.name
|
||||
}
|
||||
if (this.queryArea.district.name) {
|
||||
params.store_area += '/' + this.queryArea.district.name
|
||||
}
|
||||
|
||||
if (this.queryArea.province.code) {
|
||||
params.store_district_id = this.queryArea.province.code
|
||||
}
|
||||
if (this.queryArea.city.code) {
|
||||
params.store_district_id += '/' + this.queryArea.city.code
|
||||
}
|
||||
if (this.queryArea.district.code) {
|
||||
params.store_district_id += '/' + this.queryArea.district.code
|
||||
}
|
||||
|
||||
return params
|
||||
},
|
||||
getSlideShowForm() {
|
||||
const form = this.slideShowForm
|
||||
let params = {
|
||||
store_slide: JSON.stringify(form.store_slide),
|
||||
}
|
||||
return params
|
||||
},
|
||||
getStoreConfigForm() {
|
||||
const form = this.storeConfigForm
|
||||
let params = {
|
||||
sc_is_enabled_invoice: JSON.stringify(form.sc_is_enabled_invoice),
|
||||
}
|
||||
return params
|
||||
},
|
||||
__,
|
||||
upImage(image, index) {
|
||||
this.form.store_slide[index].img = image
|
||||
},
|
||||
|
||||
async handleEdit(params) {
|
||||
this.$baseConfirm(this.__('修改立马生效,是否继续?'), null, async () => {
|
||||
const { msg, status } = await storeSetUp(params)
|
||||
if (200 == status) {
|
||||
this.$baseMessage(msg, 'success')
|
||||
} else {
|
||||
this.$baseMessage(msg, 'error')
|
||||
}
|
||||
await this.fetchData()
|
||||
})
|
||||
},
|
||||
handleParams() {
|
||||
let params = Object.assign({}, this.form)
|
||||
params.store_o2o_tags = this.form.store_o2o_tags.toString()
|
||||
params.store_slide = JSON.stringify(params.store_slide)
|
||||
return params
|
||||
},
|
||||
async fetchData(params) {
|
||||
const { data } = await get({ params })
|
||||
this.initData(data)
|
||||
},
|
||||
async getTree() {
|
||||
const { data } = await getTree()
|
||||
console.log(data)
|
||||
if (data) {
|
||||
this.treeData = data
|
||||
} else {
|
||||
this.treeData = []
|
||||
}
|
||||
},
|
||||
initData(data) {
|
||||
this.physicalStoreForm = {
|
||||
store_notice: data.info.store_notice,
|
||||
store_opening_hours: data.info.store_opening_hours,
|
||||
store_close_hours: data.info.store_close_hours,
|
||||
store_discount: data.info.store_discount,
|
||||
store_circle: Number(data.store_circle),
|
||||
}
|
||||
this.storeConfigForm = {
|
||||
sc_is_enabled_invoice: data.sc_is_enabled_invoice,
|
||||
}
|
||||
if (data.store_o2o_tags) {
|
||||
this.physicalStoreForm.store_o2o_tags = data.store_o2o_tags.split(',')
|
||||
}
|
||||
|
||||
this.storeForm = {
|
||||
store_name: data.store_name,
|
||||
store_slogan: data.store_slogan,
|
||||
store_logo: data.store_logo,
|
||||
store_banner: data.info.store_banner,
|
||||
store_address: data.store_address,
|
||||
store_longitude: data.store_longitude,
|
||||
store_latitude: data.store_latitude,
|
||||
store_tel: data.info.store_tel,
|
||||
store_qq: data.info.store_qq,
|
||||
store_ww: data.info.store_ww,
|
||||
company_description: data.company.company_description,
|
||||
}
|
||||
|
||||
if (data.info.store_slide && data.info.store_slide.length > 0) {
|
||||
this.slideShowForm.store_slide = data.info.store_slide
|
||||
} else {
|
||||
this.slideShowForm = {
|
||||
store_slide: [
|
||||
{ img: '', check: true, name: '' },
|
||||
{ img: '', check: true, name: '' },
|
||||
@ -482,241 +671,53 @@
|
||||
{ img: '', check: true, name: '' },
|
||||
{ img: '', check: true, name: '' },
|
||||
],
|
||||
},
|
||||
physicalStoreForm: {
|
||||
store_notice: undefined,
|
||||
store_o2o_tags: [],
|
||||
store_opening_hours: undefined,
|
||||
store_close_hours: undefined,
|
||||
store_discount: undefined,
|
||||
store_circle: undefined,
|
||||
},
|
||||
storeConfigForm: {
|
||||
sc_is_enabled_invoice: undefined,
|
||||
},
|
||||
form: {
|
||||
store_name: undefined,
|
||||
store_logo: undefined,
|
||||
store_slogan: undefined,
|
||||
store_address: undefined,
|
||||
store_longitude: '',
|
||||
store_latitude: '',
|
||||
str_store_area: undefined,
|
||||
store_tel: undefined,
|
||||
store_opening_hours: undefined,
|
||||
store_circle: undefined,
|
||||
store_discount: undefined,
|
||||
store_close_hours: undefined,
|
||||
store_qq: undefined,
|
||||
company_description: undefined,
|
||||
store_banner: undefined,
|
||||
store_ww: undefined,
|
||||
store_notice: undefined,
|
||||
store_o2o_tags: [],
|
||||
store_district_id: '',
|
||||
},
|
||||
queryArea: {
|
||||
province: { code: '', name: '' },
|
||||
city: { code: '', name: '' },
|
||||
district: { code: '', name: '' },
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
const store_area = data.store_area.split('/')
|
||||
const store_district_id = data.store_district_id.split(',')
|
||||
|
||||
this.initQueryArea(store_district_id, store_area)
|
||||
this.form.store_o2o_flag = data.store_o2o_flag
|
||||
},
|
||||
initQueryArea(store_district_id, store_area) {
|
||||
if (!store_district_id && store_area) return
|
||||
if (store_district_id[0]) {
|
||||
this.queryArea.province.code = store_district_id[0]
|
||||
}
|
||||
if (store_district_id[1]) {
|
||||
this.queryArea.city.code = store_district_id[1]
|
||||
}
|
||||
if (store_district_id[2]) {
|
||||
this.queryArea.district.code = store_district_id[2]
|
||||
}
|
||||
if (store_area[0]) {
|
||||
this.queryArea.province.name = store_area[0]
|
||||
}
|
||||
if (store_area[1]) {
|
||||
this.queryArea.city.name = store_area[1]
|
||||
}
|
||||
if (store_area[2]) {
|
||||
this.queryArea.district.name = store_area[2]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.getTree()
|
||||
getAddress(address) {
|
||||
this.storeForm.store_address = address.value
|
||||
this.storeForm.store_longitude = address.lng
|
||||
this.storeForm.store_latitude = address.lat
|
||||
},
|
||||
methods: {
|
||||
getPhysicalStoreParams() {
|
||||
const form = this.physicalStoreForm
|
||||
let params = {
|
||||
store_notice: form.store_notice,
|
||||
store_o2o_tags: form.store_o2o_tags.toString(),
|
||||
store_opening_hours: form.store_opening_hours,
|
||||
store_close_hours: form.store_close_hours,
|
||||
store_discount: form.store_discount,
|
||||
store_circle: form.store_circle,
|
||||
}
|
||||
return params
|
||||
},
|
||||
getStoreParams() {
|
||||
const form = this.storeForm
|
||||
let params = {
|
||||
store_name: form.store_name,
|
||||
store_slogan: form.store_slogan,
|
||||
store_logo: form.store_logo,
|
||||
store_banner: form.store_banner,
|
||||
store_address: form.store_address,
|
||||
store_longitude: form.store_longitude,
|
||||
store_latitude: form.store_latitude,
|
||||
store_tel: form.store_tel,
|
||||
store_qq: form.store_qq,
|
||||
store_ww: form.store_ww,
|
||||
company_description: form.company_description,
|
||||
}
|
||||
|
||||
if (this.queryArea.province.name) {
|
||||
params.store_area = this.queryArea.province.name
|
||||
}
|
||||
if (this.queryArea.city.name) {
|
||||
params.store_area += '/' + this.queryArea.city.name
|
||||
}
|
||||
if (this.queryArea.district.name) {
|
||||
params.store_area += '/' + this.queryArea.district.name
|
||||
}
|
||||
|
||||
if (this.queryArea.province.code) {
|
||||
params.store_district_id = this.queryArea.province.code
|
||||
}
|
||||
if (this.queryArea.city.code) {
|
||||
params.store_district_id += '/' + this.queryArea.city.code
|
||||
}
|
||||
if (this.queryArea.district.code) {
|
||||
params.store_district_id += '/' + this.queryArea.district.code
|
||||
}
|
||||
|
||||
return params
|
||||
},
|
||||
getSlideShowForm() {
|
||||
const form = this.slideShowForm
|
||||
let params = {
|
||||
store_slide: JSON.stringify(form.store_slide),
|
||||
}
|
||||
return params
|
||||
},
|
||||
getStoreConfigForm() {
|
||||
const form = this.storeConfigForm
|
||||
let params = {
|
||||
sc_is_enabled_invoice: JSON.stringify(form.sc_is_enabled_invoice),
|
||||
}
|
||||
return params
|
||||
},
|
||||
__,
|
||||
upImage(image, index) {
|
||||
this.form.store_slide[index].img = image
|
||||
},
|
||||
|
||||
async handleEdit(params) {
|
||||
this.$baseConfirm(
|
||||
this.__('修改立马生效,是否继续?'),
|
||||
null,
|
||||
async () => {
|
||||
const { msg, status } = await storeSetUp(params)
|
||||
if (200 == status) {
|
||||
this.$baseMessage(msg, 'success')
|
||||
} else {
|
||||
this.$baseMessage(msg, 'error')
|
||||
}
|
||||
await this.fetchData()
|
||||
}
|
||||
)
|
||||
},
|
||||
handleParams() {
|
||||
let params = Object.assign({}, this.form)
|
||||
params.store_o2o_tags = this.form.store_o2o_tags.toString()
|
||||
params.store_slide = JSON.stringify(params.store_slide)
|
||||
return params
|
||||
},
|
||||
async fetchData(params) {
|
||||
const { data } = await get({ params })
|
||||
this.initData(data)
|
||||
},
|
||||
async getTree() {
|
||||
const { data } = await getTree()
|
||||
console.log(data)
|
||||
if (data) {
|
||||
this.treeData = data
|
||||
} else {
|
||||
this.treeData = []
|
||||
}
|
||||
},
|
||||
initData(data) {
|
||||
this.physicalStoreForm = {
|
||||
store_notice: data.info.store_notice,
|
||||
store_opening_hours: data.info.store_opening_hours,
|
||||
store_close_hours: data.info.store_close_hours,
|
||||
store_discount: data.info.store_discount,
|
||||
store_circle: Number(data.store_circle),
|
||||
}
|
||||
this.storeConfigForm = {
|
||||
sc_is_enabled_invoice: data.sc_is_enabled_invoice,
|
||||
}
|
||||
if (data.store_o2o_tags) {
|
||||
this.physicalStoreForm.store_o2o_tags = data.store_o2o_tags.split(',')
|
||||
}
|
||||
|
||||
this.storeForm = {
|
||||
store_name: data.store_name,
|
||||
store_slogan: data.store_slogan,
|
||||
store_logo: data.store_logo,
|
||||
store_banner: data.info.store_banner,
|
||||
store_address: data.store_address,
|
||||
store_longitude: data.store_longitude,
|
||||
store_latitude: data.store_latitude,
|
||||
store_tel: data.info.store_tel,
|
||||
store_qq: data.info.store_qq,
|
||||
store_ww: data.info.store_ww,
|
||||
company_description: data.company.company_description,
|
||||
}
|
||||
|
||||
if (data.info.store_slide && data.info.store_slide.length > 0) {
|
||||
this.slideShowForm.store_slide = data.info.store_slide
|
||||
} else {
|
||||
this.slideShowForm = {
|
||||
store_slide: [
|
||||
{ img: '', check: true, name: '' },
|
||||
{ img: '', check: true, name: '' },
|
||||
{ img: '', check: true, name: '' },
|
||||
{ img: '', check: true, name: '' },
|
||||
{ img: '', check: true, name: '' },
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
const store_area = data.store_area.split('/')
|
||||
const store_district_id = data.store_district_id.split(',')
|
||||
|
||||
this.initQueryArea(store_district_id, store_area)
|
||||
this.form.store_o2o_flag = data.store_o2o_flag
|
||||
},
|
||||
initQueryArea(store_district_id, store_area) {
|
||||
if (!store_district_id && store_area) return
|
||||
if (store_district_id[0]) {
|
||||
this.queryArea.province.code = store_district_id[0]
|
||||
}
|
||||
if (store_district_id[1]) {
|
||||
this.queryArea.city.code = store_district_id[1]
|
||||
}
|
||||
if (store_district_id[2]) {
|
||||
this.queryArea.district.code = store_district_id[2]
|
||||
}
|
||||
if (store_area[0]) {
|
||||
this.queryArea.province.name = store_area[0]
|
||||
}
|
||||
if (store_area[1]) {
|
||||
this.queryArea.city.name = store_area[1]
|
||||
}
|
||||
if (store_area[2]) {
|
||||
this.queryArea.district.name = store_area[2]
|
||||
}
|
||||
},
|
||||
getAddress(address) {
|
||||
this.storeForm.store_address = address.value
|
||||
this.storeForm.store_longitude = address.lng
|
||||
this.storeForm.store_latitude = address.lat
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.config-save {
|
||||
color: white;
|
||||
text-align: center;
|
||||
background-color: #2c2e30;
|
||||
padding: 12px;
|
||||
}
|
||||
.config-save {
|
||||
color: white;
|
||||
text-align: center;
|
||||
background-color: #2c2e30;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.config-save:hover {
|
||||
background-color: #3d3d3d;
|
||||
}
|
||||
.config-save:hover {
|
||||
background-color: #3d3d3d;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
// 开发工具控制台名字显示
|
||||
webpackBarName: 'lancer-admin',
|
||||
webpackBarName: 'xiaofa-admin',
|
||||
// 浏览器注释显示
|
||||
webpackBanner:
|
||||
' build: lancer-admin \n copyright: https://www.lancerdt.com \n time: ',
|
||||
' build: xiaofa-admin \n copyright: https://www.lancerdt.com \n time: ',
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user