Browse Source

1111

master
guoxing 1 year ago
parent
commit
32a0231212
  1. 10
      src/api/baseinfo/brands/brand.js
  2. 12
      src/api/baseinfo/category/category.js
  3. 10
      src/api/baseinfo/factory/factory.js
  4. 8
      src/api/baseinfo/goods/goods.js
  5. 49
      src/api/baseinfo/unit/unit.js
  6. 155
      src/layout/components/Sidebar/index.vue
  7. 82
      src/router/index.js
  8. 245
      src/views/baseInfo/unit/index.vue
  9. 210
      src/views/baseInfo/unit/unitAdd.vue
  10. 19
      src/views/login/login.vue

10
src/api/baseinfo/brands/brand.js

@ -5,7 +5,7 @@ export default {
// 查询分页列表 // 查询分页列表
listPage: function(params) { listPage: function(params) {
return request({ return request({
url: '/base/basegoodsbrand/listPage', url: '/wms/apiadmin/base/basegoodsbrand/listPage',
method: 'post', method: 'post',
data: params, data: params,
}) })
@ -14,7 +14,7 @@ export default {
// 类别查询 // 类别查询
getAllBrand: function(params) { getAllBrand: function(params) {
return request({ return request({
url: '/base/basegoodsbrand/getAllType', url: '/wms/apiadmin/base/basegoodsbrand/listAll',
method: 'get' method: 'get'
}) })
}, },
@ -23,7 +23,7 @@ export default {
// 修改是否可用状态 // 修改是否可用状态
updateIsEnable: function(sid,isEnable) { updateIsEnable: function(sid,isEnable) {
return request({ return request({
url: '/base/basegoodsbrand/updateIsEnable/'+sid+"/"+isEnable url: '/wms/apiadmin/base/basegoodsbrand/updateIsEnable/'+sid+"/"+isEnable
}); });
}, },
@ -31,7 +31,7 @@ export default {
// 新增、保存 // 新增、保存
saveBrands: function(data) { saveBrands: function(data) {
return request({ return request({
url: '/base/basegoodsbrand/saveOrUpdate', url: '/wms/apiadmin/base/basegoodsbrand/saveOrUpdate',
method: 'post', method: 'post',
data: data data: data
}); });
@ -40,7 +40,7 @@ export default {
// 初始化 // 初始化
initBrands: function(data) { initBrands: function(data) {
return request({ return request({
url: '/base/basegoodsbrand/initialization/' + data, url: '/wms/apiadmin/base/basegoodsbrand/initialization/' + data,
method: 'get' method: 'get'
}); });
}, },

12
src/api/baseinfo/category/category.js

@ -5,7 +5,7 @@ export default {
// 查询分页列表 // 查询分页列表
listPage: function(params) { listPage: function(params) {
return request({ return request({
url: '/base/basegoodstype/listPage', url: '/wms/apiadmin/base/basegoodstype/listPage',
method: 'post', method: 'post',
data: params, data: params,
}) })
@ -14,7 +14,7 @@ export default {
// 类别查询 // 类别查询
getAllType: function(params) { getAllType: function(params) {
return request({ return request({
url: '/base/basegoodstype/getAllType', url: '/wms/apiadmin/base/basegoodstype/listAll',
method: 'get' method: 'get'
}) })
}, },
@ -23,21 +23,21 @@ export default {
// 修改是否可用状态 // 修改是否可用状态
updateIsEnable: function(sid, isEnable) { updateIsEnable: function(sid, isEnable) {
return request({ return request({
url: '/base/basegoodstype/updateIsEnable/' + sid + "/" + isEnable url: '/wms/apiadmin/base/basegoodstype/updateIsEnable/' + sid + "/" + isEnable
}); });
}, },
// 修改是否一品一码 // 修改是否一品一码
updateIsGoodsID: function(sid, isGoodsID) { updateIsGoodsID: function(sid, isGoodsID) {
return request({ return request({
url: '/base/basegoodstype/updateIsGoodsID/' + sid + "/" + isGoodsID url: '/wms/apiadmin/base/basegoodstype/updateIsGoodsID/' + sid + "/" + isGoodsID
}); });
}, },
// 新增、保存 // 新增、保存
saveTypes: function(data) { saveTypes: function(data) {
return request({ return request({
url: '/base/basegoodstype/saveOrUpdate', url: '/wms/apiadmin/base/basegoodstype/saveOrUpdate',
method: 'post', method: 'post',
data: data data: data
}); });
@ -46,7 +46,7 @@ export default {
// 初始化 // 初始化
initTypes: function(data) { initTypes: function(data) {
return request({ return request({
url: '/base/basegoodstype/initialization/' + data, url: '/wms/apiadmin/base/basegoodstype/initialization/' + data,
method: 'get' method: 'get'
}); });
}, },

10
src/api/baseinfo/factory/factory.js

@ -5,7 +5,7 @@ export default {
// 查询分页列表 // 查询分页列表
listPage: function(params) { listPage: function(params) {
return request({ return request({
url: '/base/basemanufacturer/listPage', url: '/wms/apiadmin/base/basemanufacturer/listPage',
method: 'post', method: 'post',
data: params, data: params,
}) })
@ -14,7 +14,7 @@ export default {
// 厂家查询 // 厂家查询
getAllFacturer: function(params) { getAllFacturer: function(params) {
return request({ return request({
url: '/base/basemanufacturer/getAllType', url: '/wms/apiadmin/base/basemanufacturer/listAll',
method: 'get' method: 'get'
}) })
}, },
@ -22,7 +22,7 @@ export default {
// 修改是否可用状态 // 修改是否可用状态
updateIsEnable: function(sid,isEnable) { updateIsEnable: function(sid,isEnable) {
return request({ return request({
url: '/base/basemanufacturer/updateIsEnable/'+sid+"/"+isEnable url: '/wms/apiadmin/base/basemanufacturer/updateIsEnable/'+sid+"/"+isEnable
}); });
}, },
@ -30,7 +30,7 @@ export default {
// 新增、保存 // 新增、保存
saveFacturer: function(data) { saveFacturer: function(data) {
return request({ return request({
url: '/base/basemanufacturer/saveOrUpdate', url: '/wms/apiadmin/base/basemanufacturer/saveOrUpdate',
method: 'post', method: 'post',
data: data data: data
}); });
@ -39,7 +39,7 @@ export default {
// 初始化 // 初始化
initFacturer: function(data) { initFacturer: function(data) {
return request({ return request({
url: '/base/basemanufacturer/initialization/' + data, url: '/wms/apiadmin/base/basemanufacturer/initialization/' + data,
method: 'get' method: 'get'
}); });
}, },

8
src/api/baseinfo/goods/goods.js

@ -5,7 +5,7 @@ export default {
// 查询分页列表 // 查询分页列表
listPage: function(params) { listPage: function(params) {
return request({ return request({
url: '/base/basegoodsspu/listPage', url: '/wms/apiadmin/base/basegoodsspu/listPage',
method: 'post', method: 'post',
data: params, data: params,
}) })
@ -14,14 +14,14 @@ export default {
// 修改是否可用状态 // 修改是否可用状态
updateIsEnable: function(sid, isEnable) { updateIsEnable: function(sid, isEnable) {
return request({ return request({
url: '/base/basegoodsspu/updateIsEnable/' + sid + "/" + isEnable url: '/wms/apiadmin/base/basegoodsspu/updateIsEnable/' + sid + "/" + isEnable
}); });
}, },
// 新增、保存 // 新增、保存
saveGoods: function(data) { saveGoods: function(data) {
return request({ return request({
url: '/base/basegoodsspu/saveOrUpdate', url: '/wms/apiadmin/base/basegoodsspu/saveOrUpdate',
method: 'post', method: 'post',
data: data data: data
}); });
@ -30,7 +30,7 @@ export default {
// 初始化 // 初始化
initGoods: function(data) { initGoods: function(data) {
return request({ return request({
url: '/base/basegoodsspu/initialization/' + data, url: '/wms/apiadmin/base/basegoodsspu/initialization/' + data,
method: 'get' method: 'get'
}); });
}, },

49
src/api/baseinfo/unit/unit.js

@ -0,0 +1,49 @@
import request from '@/utils/request'
export default {
// 查询分页列表
listPage: function(params) {
return request({
url: '/wms/apiadmin/base/basegoodsunit/listPage',
method: 'post',
data: params,
})
},
// 单位查询
getAllUnit: function(params) {
return request({
url: '/wms/apiadmin/base/basegoodsunit/listAll',
method: 'get'
})
},
// 修改是否可用状态
updateIsEnable: function(sid,isEnable) {
return request({
url: '/wms/apiadmin/base/basegoodsunit/updateIsEnable/'+sid+"/"+isEnable
});
},
// 新增、保存
saveUnits: function(data) {
return request({
url: '/wms/apiadmin/base/basegoodsunit/saveOrUpdate',
method: 'post',
data: data
});
},
// 初始化
initUnits: function(data) {
return request({
url: '/base/basegoodsunit/initialization/' + data,
method: 'get'
});
},
}

155
src/layout/components/Sidebar/index.vue

@ -1,29 +1,33 @@
<template> <template>
<div :class="{ 'has-logo': showLogo }"> <div :class="{ 'has-logo': showLogo }">
<logo v-if="showLogo" :collapse="isCollapse"/> <logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu :default-active="$route.path" :background-color="variables.menuBg" :text-color="variables.menuText" :unique-opened="false" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical"> <el-menu :default-active="$route.path" :background-color="variables.menuBg" :text-color="variables.menuText"
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path"/> :unique-opened="false" :active-text-color="variables.menuActiveText" :collapse-transition="false"
mode="vertical">
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
</el-menu> </el-menu>
</el-scrollbar> </el-scrollbar>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import {
import Logo from './Logo' mapGetters
import SidebarItem from './SidebarItem' } from 'vuex'
import variables from '@/styles/variables.scss' import Logo from './Logo'
import { import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
import {
getrolemenus, getrolemenus,
loginDetails loginDetails
} from '@/api/system/Role/role.js' } from '@/api/system/Role/role.js'
import { import {
getStorage getStorage
} from '@/utils/auth' } from '@/utils/auth'
import Layout from '@/layout' import Layout from '@/layout'
export default { export default {
components: { components: {
SidebarItem, SidebarItem,
Logo Logo
@ -36,8 +40,7 @@ export default {
sourceSid: '', sourceSid: '',
userSid: '' userSid: ''
}, },
routes: [ routes: [{
{
alwaysShow: true, alwaysShow: true,
component: 'baseInfo', component: 'baseInfo',
meta: { meta: {
@ -46,46 +49,55 @@ export default {
}, },
name: '/baseInfo', name: '/baseInfo',
path: '/baseInfo', path: '/baseInfo',
children: [ children: [{
// { alwaysShow: true,
// alwaysShow: true, component: 'brands',
// component: 'brands', meta: {
// meta: { icon: 'el-icon-help',
// icon: 'el-icon-help', title: '品牌管理'
// title: '' },
// }, name: '/baseInfo/brands',
// name: '/baseInfo/brands', path: '/baseInfo/brands'
// path: '/baseInfo/brands' }, {
// }, { alwaysShow: true,
// alwaysShow: true, component: 'category',
// component: 'category', meta: {
// meta: { icon: 'el-icon-help',
// icon: 'el-icon-help', title: '类别管理'
// title: '' },
// }, name: '/baseInfo/category',
// name: '/baseInfo/category', path: '/baseInfo/category'
// path: '/baseInfo/category' },
// }, {
// { alwaysShow: true,
// alwaysShow: true, component: 'unit',
// component: 'goods', meta: {
// meta: { icon: 'el-icon-help',
// icon: 'el-icon-help', title: '单位管理'
// title: '' },
// }, name: '/baseInfo/unit',
// name: '/baseInfo/goods', path: '/baseInfo/unit'
// path: '/baseInfo/goods' },
// }, {
// { alwaysShow: true,
// alwaysShow: true, component: 'factory',
// component: 'factory', meta: {
// meta: { icon: 'el-icon-help',
// icon: 'el-icon-help', title: '厂家管理'
// title: '' },
// }, name: '/baseInfo/factory',
// name: '/baseInfo/factory', path: '/baseInfo/factory'
// path: '/baseInfo/factory' },
// }, {
alwaysShow: true,
component: 'goods',
meta: {
icon: 'el-icon-help',
title: '商品管理'
},
name: '/baseInfo/goods',
path: '/baseInfo/goods'
},
{ {
alwaysShow: true, alwaysShow: true,
component: 'warehouse', component: 'warehouse',
@ -318,14 +330,15 @@ export default {
meta: { meta: {
title: '库存查询' title: '库存查询'
}, },
children: [ children: [{
{
path: '/inventory/inventory', path: '/inventory/inventory',
component: () => import('@/views/inventory/inventory.vue'), component: () => import('@/views/inventory/inventory.vue'),
name: 'Inventory', name: 'Inventory',
meta: { title: '库存查询', noCache: true } meta: {
title: '库存查询',
noCache: true
} }
] }]
}, },
{ {
path: '/storageage', path: '/storageage',
@ -334,14 +347,15 @@ export default {
meta: { meta: {
title: '库龄查询' title: '库龄查询'
}, },
children: [ children: [{
{
path: '/storageage/storageage', path: '/storageage/storageage',
component: () => import('@/views/storageage/storageage.vue'), component: () => import('@/views/storageage/storageage.vue'),
name: 'StorageAge', name: 'StorageAge',
meta: { title: '库龄查询', noCache: true } meta: {
title: '库龄查询',
noCache: true
} }
] }]
}, },
{ {
path: '/carryover', path: '/carryover',
@ -350,18 +364,23 @@ export default {
meta: { meta: {
title: '结转查询' title: '结转查询'
}, },
children: [ children: [{
{
path: '/carryover/carryforwardrecord', path: '/carryover/carryforwardrecord',
component: () => import('@/views/carryover/carryforwardrecord.vue'), component: () => import('@/views/carryover/carryforwardrecord.vue'),
name: 'CarryForwardRecord', name: 'CarryForwardRecord',
meta: { title: '结转记录查询', noCache: true } meta: {
title: '结转记录查询',
noCache: true
}
}, },
{ {
path: '/carryover/carryoverstock', path: '/carryover/carryoverstock',
component: () => import('@/views/carryover/carryoverstock.vue'), component: () => import('@/views/carryover/carryoverstock.vue'),
name: 'CarryoverStock', name: 'CarryoverStock',
meta: { title: '结转库存查询', noCache: true } meta: {
title: '结转库存查询',
noCache: true
}
} }
] ]
} }
@ -448,5 +467,5 @@ export default {
return menus return menus
} }
} }
} }
</script> </script>

82
src/router/index.js

@ -55,14 +55,15 @@ export const constantRoutes = [
meta: { meta: {
title: '库存查询' title: '库存查询'
}, },
children: [ children: [{
{
path: '/inventory/inventory', path: '/inventory/inventory',
component: () => import('@/views/inventory/inventory.vue'), component: () => import('@/views/inventory/inventory.vue'),
name: 'Inventory', name: 'Inventory',
meta: { title: '库存查询', noCache: true } meta: {
title: '库存查询',
noCache: true
} }
] }]
}, },
{ {
path: '/storageage', path: '/storageage',
@ -71,14 +72,15 @@ export const constantRoutes = [
meta: { meta: {
title: '库龄查询' title: '库龄查询'
}, },
children: [ children: [{
{
path: '/storageage/storageage', path: '/storageage/storageage',
component: () => import('@/views/storageage/storageage.vue'), component: () => import('@/views/storageage/storageage.vue'),
name: 'StorageAge', name: 'StorageAge',
meta: { title: '库龄查询', noCache: true } meta: {
title: '库龄查询',
noCache: true
} }
] }]
}, },
{ {
path: '/carryover', path: '/carryover',
@ -87,18 +89,23 @@ export const constantRoutes = [
meta: { meta: {
title: '结转查询' title: '结转查询'
}, },
children: [ children: [{
{
path: '/carryover/carryforwardrecord', path: '/carryover/carryforwardrecord',
component: () => import('@/views/carryover/carryforwardrecord.vue'), component: () => import('@/views/carryover/carryforwardrecord.vue'),
name: 'CarryForwardRecord', name: 'CarryForwardRecord',
meta: { title: '结转记录查询', noCache: true } meta: {
title: '结转记录查询',
noCache: true
}
}, },
{ {
path: '/carryover/carryoverstock', path: '/carryover/carryoverstock',
component: () => import('@/views/carryover/carryoverstock.vue'), component: () => import('@/views/carryover/carryoverstock.vue'),
name: 'CarryoverStock', name: 'CarryoverStock',
meta: { title: '结转库存查询', noCache: true } meta: {
title: '结转库存查询',
noCache: true
}
} }
] ]
}, },
@ -109,7 +116,53 @@ export const constantRoutes = [
meta: { meta: {
title: '基础信息' title: '基础信息'
}, },
children: [ children: [{
path: 'brands',
name: 'brands',
component: () => import('@/views/baseInfo/brands/index'),
meta: {
title: '品牌管理',
icon: 'product-list'
}
},
{
path: 'category',
name: 'category',
component: () => import('@/views/baseInfo/category/index'),
meta: {
title: '类别管理',
icon: 'product-add'
}
}, {
path: 'unit',
name: 'unit',
component: () => import('@/views/baseInfo/unit/index'),
meta: {
title: '单位管理',
icon: 'product-add'
},
hidden: true
},
{
path: 'factory',
name: 'factory',
component: () => import('@/views/baseInfo/factory/index'),
meta: {
title: '厂家管理',
icon: 'product-add'
},
hidden: true
},
{
path: 'goods',
name: 'goods',
component: () => import('@/views/baseInfo/goods/index'),
meta: {
title: '商品管理',
icon: 'product-add'
},
hidden: true
},
{ {
path: 'warehouse', path: 'warehouse',
name: 'warehouse', name: 'warehouse',
@ -160,8 +213,7 @@ export const constantRoutes = [
meta: { meta: {
title: '库存信息' title: '库存信息'
}, },
children: [ children: [{
{
path: 'inOutStorage', path: 'inOutStorage',
name: 'inOutStorage', name: 'inOutStorage',
component: () => import('@/views/warehouse/inOutStorage/index'), component: () => import('@/views/warehouse/inOutStorage/index'),

245
src/views/baseInfo/unit/index.vue

@ -0,0 +1,245 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="单位列表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">
{{ searchxianshitit }}
</el-button>
<div v-show="isSearchShow" class="search">
<el-form :inline="true" class="tab-header">
<el-form-item label="单位名称">
<el-input v-model="queryParams.params.name" placeholder="" clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</div>
</div>
</div>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit">单位列表</div>
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
</template>
</el-table-column>
<el-table-column label="是否可用" align="center" width="140">
<template slot-scope="scope">
<el-switch v-model="scope.row.isEnable" active-text="" inactive-text="" active-value="1"
inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
</template>
</el-table-column>
<el-table-column prop="unitName" label="单位名称" align="center" />
<el-table-column prop="remarks" label="单位备注" align="center" />
</el-table>
</div>
<!-- End 项目列表 -->
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div>
</div>
</div>
<!-- End 查询和其列表部分 -->
<!-- 新增修改部分组件 -->
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
</div>
</template>
<script>
import req from '@/api/baseinfo/unit/unit.js'
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import divAdd from './unitAdd.vue'
export default {
components: {
ButtonBar,
Pagination,
pageye,
divAdd
},
data() {
return {
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: false,
searchxianshitit: '显示查询条件',
tableLoading: false,
dataList: [],
btnList: [{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
name: ''
}
},
sids: []
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.loadList()
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
loadList() {
this.tableLoading = true
req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false
if (resp.success) {
const data = resp.data
this.queryParams.total = data.total
this.dataList = data.records
} else {
// resp.code
this.dataList = []
this.queryParams.total = 0
}
}).catch(() => {
this.tableLoading = false
})
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
name: ''
}
}
this.loadList()
},
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd()
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
toRelevancy(row) {
this.viewState = 3
this.$refs['divadd'].showEdit(row)
},
toRelevancyInfo(row) {
const tip = '请确认是否删除所选品牌?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.deleteGoods(row.sid).then((resp) => {
loading.close()
if (resp.success) {
this.$message({
type: 'success',
message: resp.msg,
showClose: true
})
this.loadList()
} else {
// resp.code
}
}).catch(e => {
loading.close()
})
}).catch(() => {})
},
resetState() {
this.viewState = 1
},
enableChange(sid, state) {
console.log('sid', sid)
console.log('state', state)
req.updateIsEnable(sid, state).then((resp) => {
if (resp.success) {
this.$message({
type: 'success',
message: '状态已更新',
showClose: true
})
} else { // resp.code
}
}).catch(e => {
console.log(e)
})
}
}
}
</script>
<style scoped>
</style>

210
src/views/baseInfo/unit/unitAdd.vue

@ -0,0 +1,210 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>单位信息</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="listconadd">
<el-card class="box-card">
<div class="item">
<span class="item_text">单位名称</span>
<el-input v-model="formobj.unitName" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">单位备注</span>
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
</div>
<!-- <div class="item">
<span class="item_text">品牌故事</span>
<el-input v-model="formobj.brandStory" placeholder="" class="item_input" clearable />
</div> -->
<!-- <div class="item" style="margin-bottom: 100px;margin-top: 100px;">
<div style="flex: 1;display: flex;flex-direction: row;align-items: center;">
<span class="item_text2" >品牌Logo</span>
<upload ref="uploadImg2" v-model="imgList" style="margin-top: 20px;" class="item_input2" :limit="1"
bucket="map" :class="{ hide: hideUploadBtn }" :upload-data="{ type: '0001' }" @change="backData" />
</div>
<div style="flex: 1;display: flex;flex-direction: row;align-items: center;">
<span class="item_text2">专区大图</span>
<upload ref="uploadImg2" v-model="imgList2" style="margin-top: 20px;" class="item_input2" :limit="1"
bucket="map" :class="{ hide: hideUploadBtn2 }" :upload-data="{ type: '0001' }" @change="backData2" />
</div>
</div> -->
<!-- <div class="item" style="margin-bottom: 100px;margin-top: 100px;">
<span class="item_text">品牌Logo</span>
<upload ref="uploadImg" v-model="imgList" style="" class="item_input" :limit="1"
bucket="map" :class="{ hide: hideUploadBtn }" :upload-data="{ type: '0001' }" @change="backData" />
</div> -->
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/baseinfo/unit/unit.js'
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao.vue'
export default {
components: {
upload,
},
data() {
return {
submitdisabled: false,
formobj: {
sid: '',
unitName: '',
remarks: '',
},
}
},
created() {
// this.initData()
},
methods: {
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
req.saveUnits(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: '',
unitName: '',
remarks: '',
}
this.$emit('doback')
},
showAdd() {
},
showEdit(row) {
req.initUnits(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
},
}
}
</script>
<style lang="scss" scoped>
//
::v-deep .hide {
.el-upload--picture-card {
display: none !important;
}
}
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_text2 {
flex: 1;
font-size: 18px;
text-align: right;
}
.item_input2 {
flex: 1;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.item_right {
flex: 1;
justify-items: center;
.item_right_list_text {
font-size: 16px;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
}
}
</style>

19
src/views/login/login.vue

@ -153,7 +153,7 @@
window.sessionStorage.setItem('userName', response.data.userName) window.sessionStorage.setItem('userName', response.data.userName)
console.log(" token", sessionStorage.getItem('token')) console.log(" token", sessionStorage.getItem('token'))
}else{ } else {
loading.close() loading.close()
} }
@ -193,11 +193,12 @@
<style lang="scss"> <style lang="scss">
.el-input__inner {
border: none; // .el-input__inner {
color: #000; // border: none;
font-size: 16px; // color: #000;
} // font-size: 16px;
// }
input:-webkit-autofill { input:-webkit-autofill {
-webkit-box-shadow: 0 0 0px 1000px white inset; -webkit-box-shadow: 0 0 0px 1000px white inset;
@ -314,8 +315,7 @@
.input { .input {
margin-top: 10px; margin-top: 10px;
width: 100%; width: 100%;
height: 45px; height: 50px;
border-bottom: 1px #ccc solid;
} }
} }
@ -330,8 +330,7 @@
.input { .input {
margin-top: 10px; margin-top: 10px;
width: 100%; width: 100%;
height: 45px; height: 50px;
border-bottom: 1px #ccc solid;
} }
.sendCode1 { .sendCode1 {

Loading…
Cancel
Save