15 changed files with 1057 additions and 36 deletions
@ -0,0 +1,81 @@ |
|||
import request from '@/utils/request' |
|||
// 商品档案
|
|||
export default { |
|||
|
|||
// 品牌品类 分类列表
|
|||
brandListPage: function(params) { |
|||
return request({ |
|||
url: '/v1/restrictedbrand/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 品牌品类 通过sid删除一条或多条记录
|
|||
brandDelBySids: function(sid) { |
|||
return request({ |
|||
url: '/v1/restrictedbrand/delBySid/' + sid, |
|||
method: 'delete' |
|||
}) |
|||
}, |
|||
// 品牌品类 保存品牌品类
|
|||
saveBrand: function(params) { |
|||
return request({ |
|||
url: '/v1/restrictedbrand/save', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 品牌品类 通过sid查询一条记录
|
|||
brandFetchBySid: function(sid) { |
|||
return request({ |
|||
url: '/v1/restrictedbrand/fetchDetailsBySid/' + sid |
|||
}) |
|||
}, |
|||
|
|||
|
|||
|
|||
// 类别维护 类别列表
|
|||
classListPage: function(params) { |
|||
return request({ |
|||
url: '/v1/restrictedcategory/categoryListTree', |
|||
method: 'GET', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 类别维护 通过sid删除一条或多条记录
|
|||
classDelBySids: function(sid) { |
|||
return request({ |
|||
url: '/v1/restrictedcategory/delBySid/' + sid, |
|||
method: 'delete' |
|||
}) |
|||
}, |
|||
// 类别维护 保存品牌品类
|
|||
saveClass: function(params) { |
|||
return request({ |
|||
url: '/v1/restrictedcategory/save', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 类别维护 通过sid查询一条记录
|
|||
classFetchBySid: function(sid) { |
|||
return request({ |
|||
url: '/v1/restrictedcategory/fetchDetailsBySid/' + sid |
|||
}) |
|||
}, |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,265 @@ |
|||
<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-item label="品牌编号"> |
|||
<el-input v-model="queryParams.params.code" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<!-- <el-form-item label="审核"> |
|||
<el-select v-model="queryParams.params.completionStatusKey" filterable placeholder="请选择" clearable> |
|||
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" |
|||
:value="item.dictKey"></el-option> |
|||
</el-select> |
|||
</el-form-item> --> |
|||
<!-- <el-form-item label="法人 "> |
|||
<el-input v-model="queryParams.params.legalRepresentative" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="营业执照号码"> |
|||
<el-input v-model="queryParams.params.businessLicenseNo" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="银行账号"> |
|||
<el-input v-model="queryParams.params.bankAccountNumber" 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%" |
|||
@selection-change="handleSelectionChange"> |
|||
<!-- <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 prop="code" label="品牌编号" align="center" width="200" /> |
|||
<el-table-column prop="name" label="品牌名称" align="center" /> |
|||
<!-- <el-table-column prop="address" label="审核" 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 prop="bankAccount" label="银行帐户" align="center"/> |
|||
<el-table-column prop="bankAccountNumber" label="帐号" align="center"/> |
|||
<el-table-column prop="bankName" label="开户行名称" align="center"/> |
|||
<el-table-column prop="legalRepresentative" label="法人" align="center" width="100"/> |
|||
<el-table-column prop="businessLicenseNo" label="营业执照号码" align="center" width="170"/> --> |
|||
</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/supervise/commodityFile' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import divAdd from './brandManagementInfoAdd' |
|||
export default { |
|||
name: 'SupplierBankInfoIndex', |
|||
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: '关闭' |
|||
} |
|||
], |
|||
state_list: [{ |
|||
dictKey: 1, |
|||
dictValue: '通过审核' |
|||
}, |
|||
{ |
|||
dictKey: 2, |
|||
dictValue: '等待审核' |
|||
}, |
|||
{ |
|||
dictKey: 3, |
|||
dictValue: '审核被拒' |
|||
} |
|||
], |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
code: '', |
|||
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.brandListPage(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 |
|||
}) |
|||
}, |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 序号 |
|||
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: { |
|||
code: '', |
|||
name: '', |
|||
} |
|||
} |
|||
this.loadList() |
|||
}, |
|||
toAdd() { |
|||
this.viewState = 2 |
|||
this.$refs['divadd'].showAdd() |
|||
}, |
|||
|
|||
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.brandDelBySids(row.id).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 |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,157 @@ |
|||
<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> |
|||
|
|||
<el-card class="box-card"> |
|||
<div class="item"> |
|||
<span class="item_text">品牌名称:</span> |
|||
<el-input v-model="formobj.name" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
<div class="item"> |
|||
<span class="item_text">品牌编码:</span> |
|||
<el-input v-model="formobj.code" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
|
|||
</el-card> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supervise/commodityFile' |
|||
export default { |
|||
data() { |
|||
return { |
|||
submitdisabled: false, |
|||
formobj: { |
|||
sid: "", |
|||
name: "", |
|||
code: "" |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
saveOrUpdate() { |
|||
req.saveBrand(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: '', |
|||
name: '', |
|||
code: "" |
|||
} |
|||
this.$emit('doback') |
|||
}, |
|||
|
|||
showAdd() { |
|||
|
|||
}, |
|||
showEdit(row) { |
|||
req.brandFetchBySid(row.id) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
} |
|||
|
|||
}) |
|||
.catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss"> |
|||
|
|||
.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_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> |
@ -0,0 +1,309 @@ |
|||
<template> |
|||
<div class="container" style="display: flex;"> |
|||
<div class="org-tree"> |
|||
<el-tree :data="treedata" node-key="sid" :props="props" :default-expanded-keys="['1']" |
|||
@node-click="handleNodeClick"> |
|||
<span class="custom-tree-node" slot-scope="{ node, data }" @mouseenter="mouseenter(data)" |
|||
@mouseleave="mouseleave(data)" @click.stop.native> |
|||
<span>{{ node.label }}</span> |
|||
<span v-show="data.del" class="handle"> |
|||
<el-tooltip v-show="data.isEnd==='2'" class="item" effect="dark" content="新增" placement="top-start"> |
|||
<el-button type="text" size="mini" @click.stop="() => append(data)" icon="el-icon-circle-plus-outline"> |
|||
</el-button> |
|||
</el-tooltip> |
|||
<el-tooltip v-show="data.sid" class="item" effect="dark" content="修改" placement="top-start"> |
|||
<el-button type="text" size="mini" @click.stop="() => deit(data)" icon="el-icon-edit"> |
|||
</el-button> |
|||
</el-tooltip> |
|||
<!-- <el-tooltip v-show="data.sid" class="item" effect="dark" content="删除" placement="top-start"> |
|||
<el-button type="text" size="mini" @click.stop="() => remove(data)" icon="el-icon-delete"> |
|||
</el-button> |
|||
</el-tooltip> --> |
|||
</span> |
|||
</span> |
|||
</el-tree> |
|||
</div> |
|||
<el-dialog title="编辑类别" :visible.sync="dialogVisible" width="50%" class="edit"> |
|||
<table class="e-table" cellspacing="0"> |
|||
<tr> |
|||
<td>类别名称</td> |
|||
<td> |
|||
<el-input v-model="form.categorys" style="width:100%"></el-input> |
|||
</td> |
|||
<td>类别编码</td> |
|||
<td> |
|||
<el-input v-model="form.category_key" style="width:100%"></el-input> |
|||
</td> |
|||
</tr> |
|||
|
|||
</table> |
|||
<div slot="footer" class="text-center"> |
|||
<el-button type="primary" @click="nodeSave()">保 存</el-button> |
|||
<el-button @click="dialogVisible = false">返 回</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
<div class="org-table" v-show="isshow == 'table'"> |
|||
<!-- <div class="tab-header"> |
|||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="24"> |
|||
<el-form-item label="类别名称"> |
|||
<el-input v-model="page.params.name" clearable></el-input> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button @click="onSearch()">查询</el-button> |
|||
<el-button @click="resetSearch()">重置</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> --> |
|||
<!-- table --> |
|||
<el-table :data="tableData" default-expand-all border style="width: 100%;" :row-style="{height:'50px'}"> |
|||
<el-table-column prop="name" label="类别名称" align="center"></el-table-column> |
|||
<el-table-column prop="key" label="类别编码" align="center"></el-table-column> |
|||
<el-table-column prop="pName" label="父级类别" align="center"></el-table-column> |
|||
</el-table> |
|||
<!-- <pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" /> --> |
|||
</div> |
|||
|
|||
<!-- 新增、编辑页面 --> |
|||
<div class="org-table" v-show="isshow == 'edit'"> |
|||
<div class="tab-header"> |
|||
<el-form ref="form" :inline="true" :model="form" label-width="80px"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="16"> |
|||
<h4 style="margin: 0;line-height: 32px;"> {{ dialogTitle }}类别信息</h4> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item style="float: right;"> |
|||
<el-button type="primary" @click="save()">保 存</el-button> |
|||
<el-button @click="isshow = 'table'">返 回</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
<!-- center --> |
|||
<div class="ediut"> |
|||
<table class="e-table" cellspacing="0"> |
|||
<tr> |
|||
<td>类别名称</td> |
|||
<td> |
|||
<el-input v-model="form.categorys" style="width:100%"></el-input> |
|||
</td> |
|||
<td>类别编码</td> |
|||
<td> |
|||
<el-input v-model="form.category_key" style="width:100%"></el-input> |
|||
</td> |
|||
</tr> |
|||
|
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supervise/commodityFile' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
dialogTitle: '', |
|||
props: { |
|||
label: 'categorys', |
|||
children: 'children' |
|||
}, |
|||
tableData: [], |
|||
treedata: [], |
|||
form: { |
|||
psid: "", |
|||
sid: '', |
|||
categorys: '', |
|||
category_key: '', |
|||
}, |
|||
isshow: 'table', |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.getOrgTree() |
|||
}, |
|||
methods: { |
|||
handleNodeClick(data) { |
|||
|
|||
console.log('handleNodeClick:', data) |
|||
|
|||
this.isshow = 'table' |
|||
|
|||
this.tableData = [] |
|||
|
|||
this.tableData.push({ |
|||
name: data.categorys, |
|||
key: data.categoryKey, |
|||
pName: data.pname |
|||
}) |
|||
|
|||
}, |
|||
getOrgTree() { // 获取树形列表 |
|||
req.classListPage({}).then(res => { |
|||
if (res.success) { |
|||
console.log('返回子级11111:', res.data) |
|||
this.treedata = res.data |
|||
} |
|||
|
|||
}) |
|||
}, |
|||
save() { |
|||
console.log("save", this.form) |
|||
req.saveClass(this.form).then(res => { |
|||
if (res.success) { |
|||
console.log('save11111:', res) |
|||
this.getOrgTree() |
|||
this.isshow = 'table' |
|||
this.$message({ |
|||
message: res.msg, |
|||
type: 'success' |
|||
}) |
|||
} |
|||
|
|||
}) |
|||
|
|||
}, |
|||
append(data) { |
|||
console.log("点击新增", data) |
|||
this.dialogTitle = '新增' |
|||
this.isshow = 'edit' |
|||
|
|||
this.form = { |
|||
psid: data.sid, |
|||
sid: "", |
|||
grade:"", |
|||
categorys: "", |
|||
category_key: "", |
|||
} |
|||
|
|||
}, |
|||
deit(data) { // 节点编辑保存 |
|||
this.dialogVisible = true |
|||
console.log('编辑回显的数据', data) |
|||
this.form = { |
|||
psid: data.psid, |
|||
sid: data.sid, |
|||
grade:data.grade, |
|||
categorys: data.categorys, |
|||
category_key: data.categoryKey, |
|||
} |
|||
|
|||
}, |
|||
nodeSave() { // 节点编辑保存 |
|||
console.log('这是保存nodeSave(0', this.form) |
|||
|
|||
req.saveClass(this.form).then(res => { |
|||
if (res.success) { |
|||
this.getOrgTree() |
|||
this.dialogVisible = false |
|||
this.$message({ |
|||
message: res.msg, |
|||
type: 'success' |
|||
}) |
|||
} |
|||
|
|||
}) |
|||
|
|||
}, |
|||
mouseenter(data) { |
|||
this.$set(data, 'del', true) |
|||
}, |
|||
mouseleave(data) { |
|||
this.$set(data, 'del', false) |
|||
}, |
|||
onSearch() { |
|||
this.getPageList(this.page) |
|||
}, |
|||
resetSearch() { |
|||
this.page.params.name = '' |
|||
this.getPageList(this.page) |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
.el-icon-arrow-right:before { |
|||
content: '\e6e0'; |
|||
color: #727272; |
|||
} |
|||
</style> |
|||
|
|||
<style scoped="scoped" lang="scss"> |
|||
.org-tree { |
|||
width: 240px; |
|||
min-height: 100%; |
|||
box-sizing: border-box; |
|||
/*padding-right: 10px;*/ |
|||
border: 1px solid #edf1f7; |
|||
overflow: scroll; |
|||
} |
|||
|
|||
.org-table { |
|||
flex: 1; |
|||
// padding-left: 10px; |
|||
margin: 0 10px; |
|||
border: 1px solid #edf1f7; |
|||
min-height: 100%; |
|||
overflow-y: scroll; |
|||
|
|||
.ewm { |
|||
margin: 30px auto 0; |
|||
width: 560px; |
|||
} |
|||
|
|||
.ediut { |
|||
margin: 30px auto 0; |
|||
/*width:750px;*/ |
|||
} |
|||
} |
|||
|
|||
.custom-tree-node { |
|||
position: relative; |
|||
overflow: hidden; |
|||
width: 100%; |
|||
flex: 1; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
font-size: 14px; |
|||
padding-right: 8px; |
|||
} |
|||
|
|||
.handle { |
|||
position: absolute; |
|||
right: 0; |
|||
|
|||
.el-button--text { |
|||
font-size: 15px; |
|||
background-color: #FFFFFF; |
|||
} |
|||
} |
|||
|
|||
.my-tabs { |
|||
margin-top: 10px; |
|||
} |
|||
|
|||
.edit { |
|||
.el-form-item__label { |
|||
width: 100px !important; |
|||
display: inline-block !important; |
|||
} |
|||
|
|||
.el-input { |
|||
width: 70%; |
|||
} |
|||
} |
|||
|
|||
.td_left { |
|||
border-left: 0 solid #e6e9f0; |
|||
} |
|||
</style> |
@ -0,0 +1,157 @@ |
|||
<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> |
|||
|
|||
<el-card class="box-card"> |
|||
<div class="item"> |
|||
<span class="item_text">类别名称:</span> |
|||
<el-input v-model="formobj.categorys" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
<div class="item"> |
|||
<span class="item_text">类别编码:</span> |
|||
<el-input v-model="formobj.categoryKey" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
|
|||
</el-card> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supervise/commodityFile' |
|||
export default { |
|||
data() { |
|||
return { |
|||
submitdisabled: false, |
|||
formobj: { |
|||
sid: "", |
|||
categorys: "", |
|||
categoryKey: "" |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
saveOrUpdate() { |
|||
req.saveClass(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: '', |
|||
categorys: '', |
|||
categoryKey: "" |
|||
} |
|||
this.$emit('doback') |
|||
}, |
|||
|
|||
showAdd() { |
|||
|
|||
}, |
|||
showEdit(row) { |
|||
req.classFetchBySid(row.id) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
} |
|||
|
|||
}) |
|||
.catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss"> |
|||
|
|||
.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_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> |
Loading…
Reference in new issue