19 changed files with 2276 additions and 339 deletions
@ -0,0 +1,143 @@ |
|||
import request from '@/utils/request' |
|||
// 商品档案
|
|||
export default { |
|||
|
|||
// 品牌品类 分类列表
|
|||
brandListPage: function(params) { |
|||
return request({ |
|||
url: '/customer/v1/restrictedbrand/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 品牌品类 通过sid删除一条或多条记录
|
|||
brandDelBySids: function(sid) { |
|||
return request({ |
|||
url: '/customer/v1/restrictedbrand/delBySid/'+ sid, |
|||
method: 'delete' |
|||
}) |
|||
}, |
|||
// 品牌品类 保存品牌品类
|
|||
saveBrand: function(params) { |
|||
return request({ |
|||
url: '/customer/v1/restrictedbrand/save', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 品牌品类 通过sid查询一条记录
|
|||
brandFetchBySid: function(sid) { |
|||
return request({ |
|||
url: '/customer/v1/restrictedbrand/fetchDetailsBySid/' + sid |
|||
}) |
|||
}, |
|||
|
|||
|
|||
|
|||
// 类别维护 类别列表
|
|||
classListPage: function(params) { |
|||
return request({ |
|||
url: '/customer/v1/restrictedcategory/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 品牌品类 通过sid删除一条或多条记录
|
|||
classDelBySids: function(sid) { |
|||
return request({ |
|||
url: '/customer/v1/restrictedcategory/delBySid/'+ sid, |
|||
method: 'delete' |
|||
}) |
|||
}, |
|||
// 品牌品类 保存品牌品类
|
|||
saveClass: function(params) { |
|||
return request({ |
|||
url: '/customer/v1/restrictedcategory/save', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 品牌品类 通过sid查询一条记录
|
|||
classFetchBySid: function(sid) { |
|||
return request({ |
|||
url: '/customer/v1/restrictedcategory/fetchDetailsBySid/' + sid |
|||
}) |
|||
}, |
|||
|
|||
|
|||
|
|||
|
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/v1/supplierbankinfo/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 保存新增记录
|
|||
saveOrUpdate: function(params) { |
|||
return request({ |
|||
url: '/v1/supplierbankinfo/save', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 通过sid删除一条或多条记录
|
|||
delBySids: function(params) { |
|||
return request({ |
|||
url: '/v1/supplierbankinfo/delBySids', |
|||
method: 'delete', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 通过sid查询一条记录
|
|||
fetchBySid: function(sid) { |
|||
return request({ |
|||
url: '/v1/supplierbankinfo/fetchDetailsBySid/' + sid |
|||
}) |
|||
}, |
|||
// 关联供应商--验证
|
|||
verification: function(params) { |
|||
return request({ |
|||
url: '/v1/supplierindex/verification', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 关联供应商--查看详情
|
|||
fetchDetailsBySid: function(data) { |
|||
return request({ |
|||
url: '/v1/supplierindex/fetchDetailsBySid/' + data, |
|||
method: 'get' |
|||
}) |
|||
}, |
|||
// 关联供应商--查看详情--保存
|
|||
save: function(data) { |
|||
return request({ |
|||
url: '/v1/supplierindex/save', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
|
|||
// 保存供应商
|
|||
saveSupplier: function(params) { |
|||
return request({ |
|||
url: '/v1/supplier/saveSupplier', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
|
|||
} |
@ -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.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 |
|||
} |
|||
} |
|||
} |
|||
</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.sid) |
|||
.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,262 @@ |
|||
<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.categorys" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="类别编号"> |
|||
<el-input v-model="queryParams.params.categoryKey" 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="categoryKey" label="类别编号" align="center" width="200" /> |
|||
<el-table-column prop="categorys" 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 './classManagementInfoAdd' |
|||
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: { |
|||
categoryKey: '', |
|||
categorys: '' |
|||
} |
|||
}, |
|||
} |
|||
}, |
|||
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.classListPage(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.queryParams.total = 0 |
|||
this.dataList = [] |
|||
} |
|||
}).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: { |
|||
categoryKey: '', |
|||
categorys: '' |
|||
} |
|||
} |
|||
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.classDelBySids(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 |
|||
} |
|||
} |
|||
} |
|||
</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.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.sid) |
|||
.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,297 @@ |
|||
<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-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 label="商品名称" align="center" width="110"> |
|||
<!-- <template slot-scope="scope"> |
|||
<span class="bluezi" @click="toInfo(scope.row)">{{ scope.row.codeUnified }}</span> |
|||
</template> --> |
|||
</el-table-column> |
|||
<el-table-column prop="name" label="分类" align="center" /> |
|||
<el-table-column prop="contacts" label="品牌" align="center" width="100" /> |
|||
<el-table-column prop="telephone" label="进货单价" align="center" width="110" /> |
|||
<el-table-column prop="address" label="规格" align="center" /> |
|||
<el-table-column prop="address" label="单位" align="center" /> |
|||
<el-table-column prop="address" label="生成厂家" align="center" /> |
|||
<el-table-column prop="address" 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" /> |
|||
<!-- 详情部分组件 --> |
|||
<divDetail v-show="viewState == 4" ref="divinfo" @doback="resetState" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supervise/supplierbankinfo' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import divAdd from './commodityManagementInfoAdd' |
|||
import divDetail from './commodityManagementInfoDetail' |
|||
export default { |
|||
name: 'SupplierBankInfoIndex', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
divAdd, |
|||
divDetail |
|||
}, |
|||
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: { |
|||
codeUnified: '', |
|||
name: '', |
|||
contacts: '', |
|||
bankAccountNumber: '', |
|||
legalRepresentative: '', |
|||
businessLicenseNo: '' |
|||
} |
|||
}, |
|||
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.queryParams.total = 0 |
|||
this.dataList = [] |
|||
} |
|||
}).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: { |
|||
codeUnified: '', |
|||
name: '', |
|||
contacts: '', |
|||
bankAccountNumber: '', |
|||
legalRepresentative: '', |
|||
businessLicenseNo: '' |
|||
} |
|||
} |
|||
this.loadList() |
|||
}, |
|||
// 新增 |
|||
toAdd() { |
|||
this.viewState = 2 |
|||
this.$refs['divadd'].showAdd() |
|||
}, |
|||
// 编辑 |
|||
toRelevancy(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divBankAdd'].showEdit(row) |
|||
}, |
|||
// 删除 |
|||
toRelevancyInfo(row) { |
|||
|
|||
let sids = [] |
|||
|
|||
sids.push(row.sid) |
|||
|
|||
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.delBySids(this.sids).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(() => {}) |
|||
}, |
|||
// 关闭 |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
}, |
|||
|
|||
resetState() { |
|||
this.viewState = 1 |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,130 @@ |
|||
<template> |
|||
<div > |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>{{ viewTitle }}</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> |
|||
<div class="item"> |
|||
<span class="item_text"><span class="icon" >*</span>商品名称:</span> |
|||
<el-input v-model="formobj.name" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
<div class="item"> |
|||
<span class="item_text"><span class="icon" >*</span>商品编码:</span> |
|||
<el-input v-model="formobj.codeUnified" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
<div class="item"> |
|||
<span class="item_text"><span class="icon" >*</span>分类:</span> |
|||
<el-select v-model="formobj.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> |
|||
</div> |
|||
<div class="item"> |
|||
<span class="item_text"><span class="icon" >*</span>品牌:</span> |
|||
<el-select v-model="formobj.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> |
|||
</div> |
|||
<div class="item"> |
|||
<span class="item_text"><span class="icon" >*</span>进货单价:</span> |
|||
<el-input v-model="formobj.address" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
<div class="item"> |
|||
<span class="item_text">规格:</span> |
|||
<el-input v-model="formobj.legalRepresentative" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
<div class="item"> |
|||
<span class="item_text">单位:</span> |
|||
<el-input v-model="formobj.bankName" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
<div class="item"> |
|||
<span class="item_text">生产厂家:</span> |
|||
<el-input v-model="formobj.bankAccount" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
<div class="item"> |
|||
<span class="item_text">保质期:</span> |
|||
<el-input v-model="formobj.bankAccountNumber" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
<div class="item" style="margin-bottom: 20px;"> |
|||
<span class="item_text"><span class="icon" >*</span>第二代码:</span> |
|||
<el-input v-model="formobj.businessLicenseNo" placeholder="" class="item_input" clearable /> |
|||
</div> |
|||
</el-card> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supervise/supplierbankinfo' |
|||
export default { |
|||
name: 'SupplierBankInfoIndex', |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
state_list: [{ |
|||
dictKey: 1, |
|||
dictValue: '通过审核' |
|||
}, |
|||
{ |
|||
dictKey: 2, |
|||
dictValue: '等待审核' |
|||
}, |
|||
{ |
|||
dictKey: 3, |
|||
dictValue: '审核被拒' |
|||
} |
|||
], |
|||
} |
|||
}, |
|||
methods: { |
|||
saveOrUpdate(){ |
|||
|
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
sid: '', |
|||
name: '', |
|||
codeUnified: '', |
|||
contacts: '', |
|||
telephone: '', |
|||
address: '', |
|||
bankAccount: '', |
|||
bankAccountNumber: '', |
|||
bankName: '', |
|||
legalRepresentative: '', |
|||
businessLicenseNo: '', |
|||
businessLicenseFiles: [], |
|||
contractFiles: [], |
|||
supplierContractInfoDto: { |
|||
handledBy: '', |
|||
signingOrganization: '', |
|||
contractNo: '', |
|||
contractValidity: '', |
|||
signingDepartment: '', |
|||
signatory: '', |
|||
contractPrice: '', |
|||
supplierSid: '' |
|||
} |
|||
} |
|||
this.$emit('doback') |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,282 @@ |
|||
<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-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 label="商品名称" align="center" width="110"> |
|||
<!-- <template slot-scope="scope"> |
|||
<span class="bluezi" @click="toInfo(scope.row)">{{ scope.row.codeUnified }}</span> |
|||
</template> --> |
|||
</el-table-column> |
|||
<el-table-column prop="name" label="分类" align="center" /> |
|||
<el-table-column prop="contacts" label="品牌" align="center" width="100" /> |
|||
<el-table-column prop="telephone" label="进货单价" align="center" width="110" /> |
|||
<el-table-column prop="address" label="规格" align="center" /> |
|||
<el-table-column prop="address" label="单位" align="center" /> |
|||
<el-table-column prop="address" label="生成厂家" align="center" /> |
|||
<el-table-column prop="address" 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> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supervise/supplierbankinfo' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
export default { |
|||
name: 'SupplierBankInfoIndex', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
}, |
|||
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: { |
|||
codeUnified: '', |
|||
name: '', |
|||
contacts: '', |
|||
bankAccountNumber: '', |
|||
legalRepresentative: '', |
|||
businessLicenseNo: '' |
|||
} |
|||
}, |
|||
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.queryParams.total = 0 |
|||
this.dataList = [] |
|||
} |
|||
}).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: { |
|||
codeUnified: '', |
|||
name: '', |
|||
contacts: '', |
|||
bankAccountNumber: '', |
|||
legalRepresentative: '', |
|||
businessLicenseNo: '' |
|||
} |
|||
} |
|||
this.loadList() |
|||
}, |
|||
toAdd() { |
|||
this.viewState = 2 |
|||
this.$refs['divadd'].showAdd() |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
}, |
|||
doDel() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '请选择至少一条记录进行删除操作' |
|||
}) |
|||
return |
|||
} |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
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.delBySids(this.sids).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> |
Loading…
Reference in new issue