Commit 0be0d418 by 杨北旺

新建v2.8.0改UI规范

1 parent e0284cc7
This diff could not be displayed because it is too large.
......@@ -14,7 +14,7 @@
"el-tree-transfer": "^2.4.7",
"element-ui": "^2.15.6",
"glsx-common": "^1.4.9",
"glsx-components": "^1.3.7",
"glsx-components": "^1.4.7",
"glsx-vue-components": "^1.0.15",
"jquery": "^3.6.0",
"vue": "^2.6.14",
......
.equity-wrap .contain {
background: #FFFFFF;
margin: 0 0 20px 0;
// margin: 0 0 20px 0;
padding: 20px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10);
// box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10);
}
.equity-wrap .contain .el-table__empty-text{
display: inline-block;
......@@ -128,6 +128,25 @@
margin: 0 0 30px 0;
padding-left: 8px;
}
.find_wrap{
background: #ffffff;
padding: 20px 15px;
// padding: 20px 20px 0px 20px;
}
.tableTopButton {
display: flex;
align-items: center;
justify-content: flex-end;
margin-bottom: 10px;
margin-right: 2px;
}
.pannel{
padding: 0 15px;
}
.table_wrap {
padding: 0 15px;
padding-bottom: 10px;
}
// .equity-wrap table {
// width: 98%;
......
import VueQuillEditor from 'vue-quill-editor'
import '@/components'
import VueBus from 'vue-bus'
import Vue from 'vue'
import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree, Dialog, Tabs, TabPane, Table, TableColumn, Pagination, RadioButton, Upload, Image, Loading, InputNumber } from 'element-ui'
import { GLButton,GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
// Vue.use(Button)
// Vue.use(ButtonGroup)
// Vue.use(Form)
// Vue.use(FormItem)
// Vue.use(Input)
// Vue.use(Radio)
// Vue.use(RadioGroup)
// Vue.use(Checkbox)
// Vue.use(CheckboxGroup)
// Vue.use(Switch)
// Vue.use(Select)
// Vue.use(Option)
// Vue.use(TimePicker)
// Vue.use(Col)
// Vue.use(DatePicker)
// Vue.use(Dialog)
// Vue.use(Tabs)
// Vue.use(TabPane)
// Vue.use(Table)
// Vue.use(TableColumn)
// Vue.use(Pagination)
// Vue.use(RadioButton)
// Vue.use(Upload)
Vue.use(GLTable)
Vue.use(VueQuillEditor)
Vue.use(VueBus)
// Vue.use(Image)
// Vue.use(Loading)
// Vue.use(InputNumber)
import ElementUI from 'element-ui'
Vue.use(ElementUI)
import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree, Card, Table, TableColumn, Pagination, Loading, Dialog, MessageBox, Upload, Tooltip, Tabs, TabPane, Container, Progress, Timeline, TimelineItem, Dropdown, DropdownMenu, Rate, Image, Drawer, Popover, Row } from 'element-ui'
Vue.use(Button)
Vue.use(ButtonGroup)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
Vue.use(Switch)
Vue.use(Select)
Vue.use(Option)
Vue.use(TimePicker)
Vue.use(Col)
Vue.use(DatePicker)
Vue.use(Tree)
Vue.use(Card)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Pagination)
Vue.use(Loading)
Vue.use(Dialog)
Vue.use(Upload)
Vue.use(Tooltip)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Progress)
Vue.use(Timeline)
Vue.use(TimelineItem)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(Rate)
Vue.use(Image)
Vue.use(Drawer)
Vue.use(Popover)
Vue.use(Row)
export const message = Message
export const messageBox = MessageBox
\ No newline at end of file
import Vue from 'vue'
import { message } from '@/plugins/element.js'
import ElementUI from 'element-ui'
import { message,messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton,GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton,GLTable, GLCombiForm, GLTableButton,GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
let routes = []
let router = null
let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
Vue.use(GLTable)
Vue.use(ElementUI)
Vue.use(GLCombiForm)
Vue.use(GLTableButton)
Vue.use(GLDialog)
export async function bootstrap({history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret } = await fetchConfig(globalState.configSwitch)
let newrequest = Object.assign({},request)
newrequest.baseURL = juedeDomain(request.baseURL)
......@@ -16,6 +24,8 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$new_http = new common.Http({ response, request:newrequest, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
......
<template>
<div class="equity-wrap">
<GLButton fn="新增商品" class="addGood" type="primary" icon="el-icon-plus" @click="jump">新增商品</GLButton>
<div class="equity-wrap contain">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="85px" label-position="right">
<GLButton fn="新增商品" size="small" class="addGood" type="primary" icon="el-icon-plus" @click="jump">新增商品</GLButton>
<div class="find_wrap">
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- <el-form :inline="true" style="width: 100%" :model="searchForm" label-width="85px" label-position="right">
<el-row style="display: flex; align-items: center; margin-bottom: 2px">
<el-form-item size="small" label="品牌名称">
<el-select clearable size="small" v-model="searchForm.brandName" filterable placeholder="请选择">
......@@ -12,9 +13,6 @@
<el-form-item size="small" label="商品名称">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
<!-- <el-form-item label="门店名称">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small" clearable></el-input>
</el-form-item> -->
<el-form-item size="small" label="提供方" style="margin-left: -10px">
<el-select clearable size="small" v-model="searchForm.supplier">
<el-option v-for="item in supplierList" :key="item.value" :label="item.label" :value="item.value"></el-option>
......@@ -38,20 +36,29 @@
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<div class="row-btns">
</el-form> -->
<div class="pannel tableTopButton">
<el-button size="small" @click="toggleAll">全选</el-button>
<GLButton fn="上架商品" size="small" type="primary" @click="batchOperation(1)">上架</GLButton>
<GLButton fn="下架商品" size="small" type="primary" @click="batchOperation(2)">下架</GLButton>
<GLButton fn="删除商品" size="small" type="primary" @click="batchOperation(-1)">删除</GLButton>
</div>
<GLTable v-if="flag" ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="tableParams.getListApi" :pageConf="pageConf">
<div class="table_wrap">
<GLTable ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi">
<div slot="table-btns" slot-scope="scope">
<GLButton fn="编辑商品" type="text" @click="jump(scope.scope)">编辑</GLButton>
<GLButton fn="复制商品" type="text" @click="copy(scope.scope)">复制</GLButton>
<el-button type="text" :disabled="!scope.scope.groupStatus || scope.scope.status != 1" @click="toCreateLine(scope.scope)">生成商品短链</el-button>
</div>
</GLTable>
</div>
<!-- <GLTable v-if="flag" ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="tableParams.getListApi" :pageConf="pageConf">
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="编辑商品" type="text" @click="jump(scope.scope)">编辑</GLButton>
<GLButton fn="复制商品" type="text" @click="copy(scope.scope)">复制</GLButton>
<el-button type="text" :disabled="!scope.scope.groupStatus||scope.scope.status!=1" @click="toCreateLine(scope.scope)">生成商品短链</el-button>
<el-button type="text" :disabled="!scope.scope.groupStatus || scope.scope.status != 1" @click="toCreateLine(scope.scope)">生成商品短链</el-button>
</span>
</GLTable>
</GLTable> -->
</div>
<!-- 推广弹窗 -->
<el-dialog title="商品短链" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false" width="576px" class="addCardsDialog">
......@@ -66,7 +73,7 @@
</div>
</template>
<script type='text/ecmascript-6'>
<script>
const cloneText = message => {
let input = document.createElement('input')
input.value = message
......@@ -85,9 +92,81 @@ export default {
url: url,
size: 'small',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
flag: true,
searchForm: {},
flag: false,
searchForm: {
brandName: '',
productName: '',
supplier: '',
productId: '',
status: '',
id: ''
},
searchFormData: [
{
label: '品牌名称',
name: 'brandName',
type: 'select',
optionList: [],
optionId: 'brandName',
optionLabel: 'brandName',
isClear: true
},
{
label: '商品名称',
name: 'productName',
type: 'input',
isClear: true
},
{
label: '提供方',
name: 'supplier',
type: 'select',
optionList: [
{
label: '海威',
value: 'HW'
}
],
optionId: 'value',
optionLabel: 'label',
isClear: true
},
{
label: '商品编码',
name: 'productId',
type: 'input',
isClear: true
},
{
label: '商品状态',
name: 'status',
type: 'select',
optionList: [
{
label: '上架',
value: '1'
},
{
label: '下架',
value: '2'
},
{
label: '待上架',
value: '0'
}
],
optionId: 'value',
optionLabel: 'label',
isClear: true
},
{
label: '商品ID',
name: 'id',
type: 'input',
isClear: true
}
],
buttonList: [],
supplierList: [
{
label: '海威',
......@@ -108,30 +187,30 @@ export default {
value: '0'
}
],
getListApi: this.$apis.orderApi.getGoodsList,
tableParams: {
listName: 'list',
mutiSelectName: 'goodsIndex',
mutiSelectUniqueKey: 'id',
tableOption: true,
getListApi: this.$apis.orderApi.getGoodsList,
// mutiSelectName: 'goodsIndex',
// mutiSelectUniqueKey: 'id',
tableOption: false,
tableColumns: [
{
label: '提供方',
width:150,
formatter: cell => {
return '海威'
}
},
{
label: '商品SKU',
formatter: cell => {
return cell.appearance == 1 ? `${cell.brandName || ''}${cell.productName || ''}` : `${cell.brandName || ''}${cell.productName || ''}${cell.denomination || ''}`
}
},
{
label: '会员价(元)',
width:150,
width: 150,
align:'right',
prop: 'salesPrice'
},
{
......@@ -139,7 +218,7 @@ export default {
sortable: true,
label: '销量',
width:110,
width: 150
// renderHeader: h => {
// return h('div', { class: 'table-header' }, [
// h('span', '销量'),
......@@ -151,7 +230,7 @@ export default {
},
{
label: '库存',
width:150,
width: 200,
sortable: true,
formatter: cell => {
return cell.stock == -1 ? '无限制' : cell.stock
......@@ -159,10 +238,17 @@ export default {
},
{
label: '商品状态',
width:110,
width: 110,
formatter: cell => {
return ['待上架', '上架', '下架'][cell.status]
}
},
{
label: '操作',
prop: '',
width: '200px',
fixed: 'right',
addHtml: 'table-btns'
}
]
},
......@@ -176,11 +262,12 @@ export default {
this.getAllBrandList()
},
methods: {
getGoodsListData() {},
handleClose() {
this.isVisible = !this.isVisible
},
copyLink(){
if(!this.shortLink)return
copyLink() {
if (!this.shortLink) return
cloneText(this.shortLink)
this.$message.success('复制成功')
this.handleClose()
......@@ -192,16 +279,22 @@ export default {
if (sapCode) {
base_info = `${base_info}&storeCode=${sapCode}`
}
const CHARGE_PATH = 'packageEquity/pages/commodity/chargeDetail/chargeDetail'
const MINI_PATH = 'packageEquity/pages/commodity/detail/detail'
const MINI_OPTIONS = {
supplier: row.supplier,
brandName: row.brandName,
id: row.id
brandName: row.brandName
}
if (row.appearance == 2) {
MINI_OPTIONS.icon = row.icon
}
if (row.appearance == 1) {
MINI_OPTIONS.id = row.id
}
const ENV = this.$custom_env
let query = `param=${encodeURIComponent(JSON.stringify(MINI_OPTIONS))}&${base_info}`
let para = {
path: MINI_PATH,
path: row.appearance == 2 ? CHARGE_PATH : MINI_PATH,
query,
appId: ENV.channel == 2 ? 'wxfe82b8d65d07808f' : 'wxe10067a63c1856ac',
envVersion: ENV.envVersion
......@@ -213,7 +306,9 @@ export default {
},
getAllBrandList() {
this.$apis.orderApi.getAllBrandList().then(res => {
this.goodsBrandList = res.data || []
// this.goodsBrandList = res.data || []
const item = this.searchFormData.find(item => item.name === 'brandName')
item.optionList = res.data
})
},
jump({ id, status }, copy) {
......@@ -277,11 +372,10 @@ export default {
handleReset() {
this.flag = false
this.searchForm = {}
this.$nextTick(() => {
this.flag = true
})
this.handleSearch()
},
handleSearch() {
this.flag = false
this.$refs.table.refreshTable()
},
// ['待上架', '上架', '下架'] //
......@@ -314,7 +408,6 @@ export default {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning',
center: true
})
.then(() => {
let target = 'deleteGoods'
......@@ -343,23 +436,20 @@ export default {
<style lang="scss" scoped>
.addGood {
margin-bottom: 20px;
// margin-left: 40px;
padding: 8px 16px;
// margin-bottom: 20px;
margin-bottom: 16px;
}
.con-wrap{
.con-wrap {
height: 191px;
.link{
.link {
width: 536px;
height: 62px;
background: #F9F9F9;
background: #f9f9f9;
font-size: 14px;
font-weight: 400;
color: #666666;
}
}
.flex_cc{
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
......
......@@ -4,6 +4,12 @@ const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
// const baseUrl = process.env.VUE_APP_BASE_URL;
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
// css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.13.0/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`]
}
module.exports = {
outputDir: `dist`,
publicPath,
......@@ -34,6 +40,11 @@ module.exports = {
}
},
chainWebpack: config => {
config.plugin('html').tap(args => {
// args[0].minify.removeComments = false;
args[0].cdn = cdn
return args
})
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
config.resolve.alias
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!