Browse Source

2023-04-13

master
guoxing 2 years ago
parent
commit
518de3f6f2
  1. 4
      supervise-crm-ui/.env.development
  2. 50
      supervise-crm-ui/src/api/brank/brank.js
  3. 50
      supervise-crm-ui/src/api/enterprise/enterprise.js
  4. 50
      supervise-crm-ui/src/api/storehouse/storehouse.js
  5. 41
      supervise-crm-ui/src/router/modules/codemenu.js
  6. 311
      supervise-crm-ui/src/views/brank/brankAdd.vue
  7. 256
      supervise-crm-ui/src/views/brank/brankInfo.vue
  8. 243
      supervise-crm-ui/src/views/brank/index.vue
  9. 343
      supervise-crm-ui/src/views/enterprise/enterpriseAdd.vue
  10. 210
      supervise-crm-ui/src/views/enterprise/enterpriseInfo.vue
  11. 243
      supervise-crm-ui/src/views/enterprise/index.vue
  12. 246
      supervise-crm-ui/src/views/storehouse/index.vue
  13. 331
      supervise-crm-ui/src/views/storehouse/storehouseAdd.vue
  14. 198
      supervise-crm-ui/src/views/storehouse/storehouseInfo.vue

4
supervise-crm-ui/.env.development

@ -5,5 +5,5 @@ ENV = 'development'
VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址
VUE_APP_URL = "http://192.168.3.9:8112"
##VUE_APP_URL = "http://120.46.172.184:8111"
VUE_APP_URL = "http://192.168.3.173:8112"
##VUE_APP_URL = "http://8.130.39.13:8112"

50
supervise-crm-ui/src/api/brank/brank.js

@ -0,0 +1,50 @@
import request from '@/utils/request'
export default {
addInfo: function(data) {
return request({
baseURL: "/api/crm",
url: '/v1/loanbankinformation/save',
method: 'post',
data: data
});
},
fetchBySid: function(sid) {
return request({
baseURL: '/api/crm',
url: '/v1/loanbankinformation/getBankInfBySid/' + sid
})
},
updateData: function(data) {
return request({
baseURL: "/api/crm",
url: '/v1/loanbankinformation/update',
method: 'post',
data: data
});
},
delBySids: function(sid) {
return request({
baseURL: '/api/crm',
url: 'v1/loanbankinformation/delete/' + sid,
method: 'delete'
})
},
// 查询分页列表
listPage: function(params) {
return request({
baseURL: '/api/crm',
url: '/v1/loanbankinformation/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
}

50
supervise-crm-ui/src/api/enterprise/enterprise.js

@ -0,0 +1,50 @@
import request from '@/utils/request'
export default {
addInfo: function(data) {
return request({
baseURL: "/api/crm",
url: '/v1/enterpriseinformation/save',
method: 'post',
data: data
});
},
fetchBySid: function(sid) {
return request({
baseURL: '/api/crm',
url: '/v1/enterpriseinformation/getEnterpriseBySid/' + sid
})
},
updateData: function(data) {
return request({
baseURL: "/api/crm",
url: '/v1/enterpriseinformation/update',
method: 'post',
data: data
});
},
delBySids: function(sid) {
return request({
baseURL: '/api/crm',
url: '/v1/enterpriseinformation/delete/' + sid,
method: 'delete'
})
},
// 查询分页列表
listPage: function(params) {
return request({
baseURL: '/api/crm',
url: '/v1/enterpriseinformation/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
}

50
supervise-crm-ui/src/api/storehouse/storehouse.js

@ -0,0 +1,50 @@
import request from '@/utils/request'
export default {
addInfo: function(data) {
return request({
baseURL: "/api/crm",
url: '/v1/warehouselocation/save',
method: 'post',
data: data
});
},
fetchBySid: function(sid) {
return request({
baseURL: '/api/crm',
url: '/v1/warehouselocation/getWarehouseBySid//' + sid
})
},
updateData: function(data) {
return request({
baseURL: "/api/crm",
url: '/v1/warehouselocation/update',
method: 'post',
data: data
});
},
delBySids: function(sid) {
return request({
baseURL: '/api/crm',
url: '/v1/warehouselocation/delete/' + sid,
method: 'delete'
})
},
// 查询分页列表
listPage: function(params) {
return request({
baseURL: '/api/crm',
url: '/v1/warehouselocation/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
}

41
supervise-crm-ui/src/router/modules/codemenu.js

@ -13,5 +13,46 @@ const codemenu = [{
noCache: true
}
}]
},
{
path: '/brank',
component: Layout,
redirect: '/index',
children: [{
path: '/brank/index',
component: () => import('@/views//brank/index.vue'),
name: 'index',
meta: {
title: '银行管理',
noCache: true
}
}]
},
{
path: '/enterprise',
component: Layout,
redirect: '/index',
children: [{
path: '/enterprise/index',
component: () => import('@/views/enterprise/index.vue'),
name: 'index',
meta: {
title: '企业管理',
noCache: true
}
}]
},{
path: 'storehouse',
component: Layout,
redirect: '/index',
children: [{
path: '/storehouse/index',
component: () => import('@/views/storehouse/index.vue'),
name: 'index',
meta: {
title: '仓库管理',
noCache: true
}
}]
}]
export default codemenu

311
supervise-crm-ui/src/views/brank/brankAdd.vue

@ -0,0 +1,311 @@
<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>
</div>
<div>
<el-card class="box-card">
<div class="item">
<span class="item_text">银行名称</span>
<el-input v-model="formobj.bankName" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">银行简称</span>
<el-input v-model="formobj.bankAbbreviation" placeholder="" class="item_input" style="width: 520px;"
clearable />
</div>
<div class="item">
<span class="item_text">--</span>
<div class="item_input">
<el-select v-model="formobj.province" filterable placeholder="请选择省" class="addinputw" style="width:160px"
@change="getShen">
<el-option v-for="item in inputProvinceList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<el-select v-model="formobj.city" filterable placeholder="请选择市" class="addinputw"
style="width:160px;margin-left: 20px;margin-right: 20px;" @change="getShi">
<el-option v-for="item in inputCityList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<el-select v-model="formobj.county" filterable placeholder="请选择县" class="addinputw" style="width:160px"
@change="getXian">
<el-option v-for="item in inputCountyList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
</div>
</div>
<div class="item">
<span class="item_text">银行地址</span>
<el-input v-model="formobj.address" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">联系人员</span>
<el-input v-model="formobj.contacts" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">联系电话</span>
<el-input v-model="formobj.telephone" placeholder="" maxlength="11" class="item_input" style="width: 520px;"
clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/brank/brank'
import {
getCity,
getCounty,
getProvince
} from '@/api/portal/areaPicker' //
export default {
data() {
return {
submitdisabled: false,
formobj: {
sid: "",
psid: "",
bankName: "",
bankAbbreviation: "",
province: '',
city: "",
county: "",
address: "",
contacts: "",
telephone: ""
},
inputProvinceList: [],
inputCityList: [],
inputCountyList: [],
}
},
created() {
this.huoquSheng()
},
methods: {
saveOrUpdate() {
console.log(">>>>>>>>>222222", this.formobj)
if (this.formobj.sid) {
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
} else {
req.addInfo(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) {
console.log(">>>>>>>>>")
if (isreload === 'true') this.$emit('reloadlist')
if (this.formobj.psid) {
this.$emit('close', this.formobj.psid)
} else {
this.$emit('doback')
}
this.formobj = {
sid: "",
psid: "",
bankName: "",
bankAbbreviation: "",
province: '',
city: "",
county: "",
address: "",
contacts: "",
telephone: ""
}
},
showAdd(sid) {
this.formobj.psid = sid
},
showEdit(row) {
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
},
// --------------------------------------------------
huoquSheng() {
getProvince().then((res) => {
if (res.success) {
this.inputProvinceList = res.data
}
})
},
getShen(value) {
let bb = ''
this.inputProvinceList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
// codeprovince
this.formobj.province = bb.name
this.huoquShi(bb.sid)
},
huoquShi(sid1) {
var sid = {
sid: sid1
}
getCity(sid).then((res) => {
if (res.success) {
this.inputCityList = res.data
}
})
},
getShi(value) {
let bb = ''
this.inputCityList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.formobj.city = bb.name
this.huoquXian(bb.sid)
},
huoquXian(sid1) {
var sid = {
sid: sid1
}
getCounty(sid).then((res) => {
if (res.success) {
this.inputCountyList = res.data
}
})
},
getXian(value) {
let bb = ''
this.inputCountyList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.formobj.county = bb.name
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
font-size: 18px;
text-align: right;
}
.item_input {
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>

256
supervise-crm-ui/src/views/brank/brankInfo.vue

@ -0,0 +1,256 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>查看银行信息</div>
<div>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd">
<div class="titwu">银行信息</div>
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
<div>主体信息</div>
</div>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">银行名称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.bankName}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">银行简称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.bankAbbreviation}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">--</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.province}} - {{temp.city}} - {{temp.county}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">银行地址</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.address}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">联系人</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.contacts}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">联系电话</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.telephone}}</span>
</el-form-item>
</el-col>
</el-row>
<el-collapse v-model="activeNames">
<el-collapse-item title="人员信息" name="1">
<el-table v-loading="listLoading" :data="temp.managerList" border style="width: 100%;"
:row-style="{height: '40px'}">
<!-- <el-table-column type="selection" align="center" width="50"/> -->
<el-table-column label="序号" type="index" width="80" :index="indexMethod1" align="center" />
<el-table-column label="姓名" prop="name" align="center" />
<el-table-column label="电话" prop="telephone" align="center" />
<el-table-column label="职务" prop="post" align="center" />
</el-table>
</el-collapse-item>
</el-collapse>
<el-collapse v-model="activeNames">
<el-collapse-item name="2">
<template slot="title">
下属银行<span class="span" @click.stop="aaa()">添加</span>
</template>
<el-table v-loading="listLoading" :data="temp.pbank" border style="width: 100%;">
<!-- <el-table-column type="selection" align="center" width="50"/> -->
<el-table-column label="序号" type="index" width="80" :index="indexMethod2" align="center" />
<el-table-column label="操作" wid align="center" width="150">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toDetail(scope.row.sid)">查看</el-button>
<!-- <el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button> -->
<el-button type="primary" size="mini" @click="doDel(scope.row,temp.sid)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="银行名称" prop="bankName" align="center" />
<el-table-column label="银行简称" prop="bankAbbreviation" width="180" align="center" />
<el-table-column label="省 - 市 - 县" width="220" align="center">
<template slot-scope="scope">
<span>{{ scope.row.province }}</span>
<span>-{{ scope.row.city }}-</span>
<span>{{ scope.row.county }}</span>
</template>
</el-table-column>
<el-table-column label="地址" prop="address" align="center" />
<el-table-column label="联系人" prop="contacts" width="120" align="center" />
<el-table-column label="联系电话" prop="telephone" width="180" align="center" />
</el-table>
</el-collapse-item>
</el-collapse>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/brank/brank'
export default {
name: 'CustomerManagementInfo',
data() {
return {
listLoading: false,
activeNames: ['1', "2"],
temp: {} //
}
},
methods: {
aaa() {
this.$emit('dojump', this.temp.sid)
},
toDetail(sid) {
req.fetchBySid(sid)
.then(resp => {
if (resp.success) {
this.temp = resp.data
}
})
.catch(e => {})
},
// ID
doDel(row,sid) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.toDetail(sid)
this.$emit('reloadlist')
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
//
indexMethod1(index) {
// var pagestart = (this.listQuery.current - 1) * this.listQuery.size
// var pageindex = index + 1 + pagestart
return index + 1
},
//
indexMethod2(index) {
// var pagestart = (this.listQuery.current - 1) * this.listQuery.size
// var pageindex = index + 1 + pagestart
return index + 1
},
showAdd(sid) {
req.fetchBySid(sid)
.then(resp => {
if (resp.success) {
this.temp = resp.data
}
})
.catch(e => {
this.$emit('doback')
})
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.trightb {
display: flex;
align-items: center;
text-align: ;
justify-content: center;
}
.trightb_item {
padding-top: 5px;
}
.span {
margin-left: 50px;
font-size: 15px;
font-weight: 400;
}
/deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
}
</style>

243
supervise-crm-ui/src/views/brank/index.vue

@ -0,0 +1,243 @@
<template>
<div class="app-container">
<div v-show="viewState ==1">
<button-bar view-title="银行管理" ref="btnbar" :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 ref="listQueryform" :inline="true" :model="listQuery" label-width="80px" class="tab-header">
<el-form-item label="银行名称">
<el-input v-model="listQuery.params.bankName" maxlength="20" placeholder="请输入银行名称" class="addinputw"
clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleReset">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleFilter">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">银行信息列表</div>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</div>
<div class="">
<el-table v-loading="listLoading" :data="list" border style="width: 100%;">
<!-- <el-table-column type="selection" align="center" width="50"/> -->
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column label="操作" wid align="center" width="220">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button>
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="银行名称" prop="bankName" align="center" />
<el-table-column label="银行简称" prop="bankAbbreviation" width="180" align="center" />
<el-table-column label="省 - 市 - 县" width="200" align="center">
<template slot-scope="scope">
<span>{{ scope.row.province }}</span>
<span>-{{ scope.row.city }}-</span>
<span>{{ scope.row.county }}</span>
</template>
</el-table-column>
<el-table-column label="地址" prop="address" align="center" />
<el-table-column label="联系人" prop="contacts" width="120" align="center" />
<el-table-column label="联系电话" prop="telephone" width="180" align="center" />
</el-table>
</div>
<div class="pages">
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
<brankAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @close="close($event)" @reloadlist="getList" />
<brankInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @dojump="jump($event)" @reloadlist="getList"/>
</div>
</template>
<script>
import req from '@/api/brank/brank'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import brankAdd from './brankAdd.vue'
import brankInfo from './brankInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
brankAdd,
brankInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
btnList: [{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
list: [],
listQuery: {
current: 1,
size: 10,
params: {
bankName: '',
},
total: 0
},
viewState: 1
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.init()
//
},
methods: {
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
//
init() {
this.getList()
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleReset() {
this.listQuery.current = 1
this.getList()
},
//
handleFilter() {
this.listQuery = {
current: 1,
size: 10,
total: 0,
params: {
bankName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
toDetail(row) {
this.viewState = 4
this.$refs['divInfo'].showAdd(row.sid)
},
resetState() {
this.viewState = 1
},
jump(sid) {
console.log("jump",sid)
this.viewState = 2
this.$refs['divAdd'].showAdd(sid)
},
close(sid){
this.viewState = 4
this.$refs['divInfo'].showAdd(sid)
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

343
supervise-crm-ui/src/views/enterprise/enterpriseAdd.vue

@ -0,0 +1,343 @@
<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>
</div>
<div>
<el-card class="box-card">
<div class="item">
<span class="item_text">企业名称</span>
<el-input v-model="formobj.enterpriseName" placeholder="" class="item_input" style="width: 520px;"
clearable />
</div>
<div class="item">
<span class="item_text">企业简称</span>
<el-input v-model="formobj.enterpriseAbbreviation" placeholder="" class="item_input" style="width: 520px;"
clearable />
</div>
<div class="item">
<span class="item_text">营业执照</span>
<el-input v-model="formobj.businessLicenseNumber" placeholder="" class="item_input" style="width: 520px;"
clearable />
</div>
<div class="item">
<span class="item_text">企业法人</span>
<el-input v-model="formobj.juridicalPerson" placeholder="" class="item_input" style="width: 520px;"
clearable />
</div>
<div class="item">
<span class="item_text">联系人员</span>
<el-input v-model="formobj.contacts" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">联系电话</span>
<el-input v-model="formobj.telephone" placeholder="" maxlength="11" class="item_input" style="width: 520px;"
clearable />
</div>
<div class="item">
<span class="item_text">银行账户</span>
<el-input v-model="formobj.bankAccount" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">银行卡号</span>
<el-input v-model="formobj.accountNumber" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">开户行名称</span>
<el-input v-model="formobj.openingBankName" placeholder="" class="item_input"
style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">--</span>
<div class="item_input">
<el-select v-model="formobj.province" filterable placeholder="请选择省" class="addinputw" style="width:160px"
@change="getShen">
<el-option v-for="item in inputProvinceList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<el-select v-model="formobj.city" filterable placeholder="请选择市" class="addinputw"
style="width:160px;margin-left: 20px;margin-right: 20px;" @change="getShi">
<el-option v-for="item in inputCityList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<el-select v-model="formobj.county" filterable placeholder="请选择县" class="addinputw" style="width:160px"
@change="getXian">
<el-option v-for="item in inputCountyList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
</div>
</div>
<div class="item">
<span class="item_text">企业地址</span>
<el-input v-model="formobj.address" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/enterprise/enterprise'
import {
getCity,
getCounty,
getProvince
} from '@/api/portal/areaPicker' //
export default {
data() {
return {
submitdisabled: false,
formobj: {
sid: "",
enterpriseName: "",
enterpriseAbbreviation: "",
accountNumber: "",
bankAccount: "",
openingBankName: "",
juridicalPerson: "",
businessLicenseNumber: "",
province: '',
city: "",
county: "",
address: "",
contacts: "",
telephone: ""
},
inputProvinceList: [],
inputCityList: [],
inputCountyList: [],
}
},
created() {
this.huoquSheng()
},
methods: {
saveOrUpdate() {
console.log(">>>>>>>>>222222", this.formobj)
if (this.formobj.sid) {
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
} else {
req.addInfo(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) {
console.log(">>>>>>>>>")
if (isreload === 'true') this.$emit('reloadlist')
if (this.formobj.psid) {
this.$emit('close', this.formobj.psid)
} else {
this.$emit('doback')
}
this.formobj = {
sid: "",
enterpriseName: "",
enterpriseAbbreviation: "",
accountNumber: "",
bankAccount: "",
openingBankName: "",
juridicalPerson: "",
businessLicenseNumber: "",
province: '',
city: "",
county: "",
address: "",
contacts: "",
telephone: ""
}
},
showAdd(sid) {
this.formobj.psid = sid
},
showEdit(row) {
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
},
// --------------------------------------------------
huoquSheng() {
getProvince().then((res) => {
if (res.success) {
this.inputProvinceList = res.data
}
})
},
getShen(value) {
let bb = ''
this.inputProvinceList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
// codeprovince
this.formobj.province = bb.name
this.huoquShi(bb.sid)
},
huoquShi(sid1) {
var sid = {
sid: sid1
}
getCity(sid).then((res) => {
if (res.success) {
this.inputCityList = res.data
}
})
},
getShi(value) {
let bb = ''
this.inputCityList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.formobj.city = bb.name
this.huoquXian(bb.sid)
},
huoquXian(sid1) {
var sid = {
sid: sid1
}
getCounty(sid).then((res) => {
if (res.success) {
this.inputCountyList = res.data
}
})
},
getXian(value) {
let bb = ''
this.inputCountyList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.formobj.county = bb.name
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
font-size: 18px;
text-align: right;
}
.item_input {
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>

210
supervise-crm-ui/src/views/enterprise/enterpriseInfo.vue

@ -0,0 +1,210 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>查看企业信息</div>
<div>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd">
<div class="titwu">企业信息</div>
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
<div>基本信息</div>
</div>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">企业名称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.enterpriseName}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">企业简称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.enterpriseAbbreviation}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">企业法人</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.juridicalPerson}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">营业执照</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.businessLicenseNumber}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">联系人</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.contacts}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">联系电话</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.telephone}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">银行账户</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.bankAccount}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">银行卡号</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.accountNumber}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">开户银行</span>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item class="trightb_item">
<span>{{temp.openingBankName}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">--</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.province}} - {{temp.city}} - {{temp.county}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">企业地址</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.address}}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/enterprise/enterprise'
export default {
name: 'CustomerManagementInfo',
data() {
return {
temp: {} //
}
},
methods: {
showAdd(sid) {
req.fetchBySid(sid)
.then(resp => {
if (resp.success) {
this.temp = resp.data
}
})
.catch(e => {
this.$emit('doback')
})
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.trightb {
display: flex;
align-items: center;
text-align: ;
justify-content: center;
}
.trightb_item {
padding-top: 5px;
}
.span {
margin-left: 50px;
font-size: 15px;
font-weight: 400;
}
/deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
}
</style>

243
supervise-crm-ui/src/views/enterprise/index.vue

@ -0,0 +1,243 @@
<template>
<div class="app-container">
<div v-show="viewState ==1">
<button-bar view-title="企业管理" ref="btnbar" :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 ref="listQueryform" :inline="true" :model="listQuery" label-width="80px" class="tab-header">
<el-form-item label="企业名称">
<el-input v-model="listQuery.params.enterpriseName" maxlength="20" placeholder="请输入企业名称" class="addinputw"
clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleReset">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleFilter">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">企业信息列表</div>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</div>
<div class="">
<el-table v-loading="listLoading" :data="list" border style="width: 100%;">
<!-- <el-table-column type="selection" align="center" width="50"/> -->
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column label="操作" wid align="center" width="220">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button>
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="企业名称" prop="enterpriseName" align="center" />
<el-table-column label="企业简称" prop="enterpriseAbbreviation" width="180" align="center" />
<el-table-column label="省 - 市 - 县" width="200" align="center">
<template slot-scope="scope">
<span>{{ scope.row.province }}</span>
<span>-{{ scope.row.city }}-</span>
<span>{{ scope.row.county }}</span>
</template>
</el-table-column>
<el-table-column label="地址" prop="address" align="center" />
<el-table-column label="联系人" prop="contacts" width="120" align="center" />
<el-table-column label="联系电话" prop="telephone" width="180" align="center" />
</el-table>
</div>
<div class="pages">
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
<enterpriseAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @close="close($event)" @reloadlist="getList" />
<enterpriseInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @dojump="jump($event)" @reloadlist="getList"/>
</div>
</template>
<script>
import req from '@/api/enterprise/enterprise'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import enterpriseAdd from './enterpriseAdd.vue'
import enterpriseInfo from './enterpriseInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
enterpriseAdd,
enterpriseInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
btnList: [{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
list: [],
listQuery: {
current: 1,
size: 10,
params: {
bankName: '',
},
total: 0
},
viewState: 1
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.init()
//
},
methods: {
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
//
init() {
this.getList()
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleReset() {
this.listQuery.current = 1
this.getList()
},
//
handleFilter() {
this.listQuery = {
current: 1,
size: 10,
total: 0,
params: {
bankName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
toDetail(row) {
this.viewState = 4
this.$refs['divInfo'].showAdd(row.sid)
},
resetState() {
this.viewState = 1
},
jump(sid) {
console.log("jump",sid)
this.viewState = 2
this.$refs['divAdd'].showAdd(sid)
},
close(sid){
this.viewState = 4
this.$refs['divInfo'].showAdd(sid)
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

246
supervise-crm-ui/src/views/storehouse/index.vue

@ -0,0 +1,246 @@
<template>
<div class="app-container">
<div v-show="viewState ==1">
<button-bar view-title="库房管理" ref="btnbar" :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 ref="listQueryform" :inline="true" :model="listQuery" label-width="80px" class="tab-header">
<el-form-item label="库房地址">
<el-input v-model="listQuery.params.bankName" maxlength="20" placeholder="请输入库房地址" class="addinputw"
clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleReset">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleFilter">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">库房信息列表</div>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</div>
<div class="">
<el-table v-loading="listLoading" :data="list" border style="width: 100%;">
<!-- <el-table-column type="selection" align="center" width="50"/> -->
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column label="操作" wid align="center" width="220">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button>
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="库房地址" prop="address" align="center" />
<el-table-column label="省 - 市 - 县" width="200" align="center">
<template slot-scope="scope">
<span>{{ scope.row.province }}</span>
<span>-{{ scope.row.city }}-</span>
<span>{{ scope.row.county }}</span>
</template>
</el-table-column>
<el-table-column label="面积" prop="squareMeasure" width="100" align="center" />
<el-table-column label="层高" prop="floorHeight" width="80" align="center" />
<el-table-column label="价格" prop="price" width="100" align="center" />
<el-table-column label="性质" prop="properties" width="180" align="center" />
<el-table-column label="房源" prop="housingResources" width="80" align="center" />
<el-table-column label="联系人" prop="contacts" width="100" align="center" />
<el-table-column label="联系电话" prop="telephone" width="150" align="center" />
</el-table>
</div>
<div class="pages">
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
<storehouseAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @close="close($event)" @reloadlist="getList" />
<storehouseInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @dojump="jump($event)" @reloadlist="getList"/>
</div>
</template>
<script>
import req from '@/api/storehouse/storehouse'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import storehouseAdd from './storehouseAdd.vue'
import storehouseInfo from './storehouseInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
storehouseAdd,
storehouseInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
btnList: [{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
list: [],
listQuery: {
current: 1,
size: 10,
params: {
bankName: '',
},
total: 0
},
viewState: 1
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.init()
//
},
methods: {
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
//
init() {
this.getList()
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleReset() {
this.listQuery.current = 1
this.getList()
},
//
handleFilter() {
this.listQuery = {
current: 1,
size: 10,
total: 0,
params: {
bankName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
toDetail(row) {
this.viewState = 4
this.$refs['divInfo'].showAdd(row.sid)
},
resetState() {
this.viewState = 1
},
jump(sid) {
console.log("jump",sid)
this.viewState = 2
this.$refs['divAdd'].showAdd(sid)
},
close(sid){
this.viewState = 4
this.$refs['divInfo'].showAdd(sid)
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

331
supervise-crm-ui/src/views/storehouse/storehouseAdd.vue

@ -0,0 +1,331 @@
<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>
</div>
<div>
<el-card class="box-card">
<div class="item">
<span class="item_text">库房位置</span>
<el-input v-model="formobj.address" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">--</span>
<div class="item_input">
<el-select v-model="formobj.province" filterable placeholder="请选择省" class="addinputw" style="width:160px"
@change="getShen">
<el-option v-for="item in inputProvinceList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<el-select v-model="formobj.city" filterable placeholder="请选择市" class="addinputw"
style="width:160px;margin-left: 20px;margin-right: 20px;" @change="getShi">
<el-option v-for="item in inputCityList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<el-select v-model="formobj.county" filterable placeholder="请选择县" class="addinputw" style="width:160px"
@change="getXian">
<el-option v-for="item in inputCountyList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
</div>
</div>
<div class="item">
<span class="item_text">库房面积</span>
<el-input v-model="formobj.squareMeasure" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">库房层高</span>
<el-input v-model="formobj.floorHeight" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">库房价格</span>
<el-input v-model="formobj.price" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">库房性质</span>
<el-input v-model="formobj.properties" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">房源</span>
<el-input v-model="formobj.housingResources" placeholder="" class="item_input"
style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">联系人</span>
<el-input v-model="formobj.contacts" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">联系电话</span>
<el-input v-model="formobj.telephone" placeholder="" maxlength="11" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">备注</span>
<el-input v-model="formobj.remarks" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/storehouse/storehouse'
import {
getCity,
getCounty,
getProvince
} from '@/api/portal/areaPicker' //
export default {
data() {
return {
submitdisabled: false,
formobj: {
sid: "",
address: "",
squareMeasure: "",
floorHeight: "",
properties: "",
price: "",
housingResources: "",
province: '',
city: "",
county: "",
contacts: "",
telephone: "",
remarks: ""
},
inputProvinceList: [],
inputCityList: [],
inputCountyList: [],
}
},
created() {
this.huoquSheng()
},
methods: {
saveOrUpdate() {
console.log(">>>>>>>>>222222", this.formobj)
if (this.formobj.sid) {
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
} else {
req.addInfo(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) {
console.log(">>>>>>>>>")
if (isreload === 'true') this.$emit('reloadlist')
if (this.formobj.psid) {
this.$emit('close', this.formobj.psid)
} else {
this.$emit('doback')
}
this.formobj = {
sid: "",
address: "",
squareMeasure: "",
floorHeight: "",
properties: "",
price: "",
housingResources: "",
province: '',
city: "",
county: "",
contacts: "",
telephone: "",
remarks: ""
}
},
showAdd(sid) {
this.formobj.psid = sid
},
showEdit(row) {
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
},
// --------------------------------------------------
huoquSheng() {
getProvince().then((res) => {
if (res.success) {
this.inputProvinceList = res.data
}
})
},
getShen(value) {
let bb = ''
this.inputProvinceList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
// codeprovince
this.formobj.province = bb.name
this.huoquShi(bb.sid)
},
huoquShi(sid1) {
var sid = {
sid: sid1
}
getCity(sid).then((res) => {
if (res.success) {
this.inputCityList = res.data
}
})
},
getShi(value) {
let bb = ''
this.inputCityList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.formobj.city = bb.name
this.huoquXian(bb.sid)
},
huoquXian(sid1) {
var sid = {
sid: sid1
}
getCounty(sid).then((res) => {
if (res.success) {
this.inputCountyList = res.data
}
})
},
getXian(value) {
let bb = ''
this.inputCountyList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.formobj.county = bb.name
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
font-size: 18px;
text-align: right;
}
.item_input {
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>

198
supervise-crm-ui/src/views/storehouse/storehouseInfo.vue

@ -0,0 +1,198 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>查看库房信息</div>
<div>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd">
<div class="titwu">库房信息</div>
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
<div>基本信息</div>
</div>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">库房位置</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.address}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">--</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.province}} - {{temp.city}} - {{temp.county}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">库房面积</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.squareMeasure}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">库房层高</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.floorHeight}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">库房价格</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.price}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">库房性质</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.properties}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">房源</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.housingResources}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">备注</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.remarks}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">联系人</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.contacts}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">联系电话</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{temp.telephone}}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/storehouse/storehouse'
export default {
name: 'CustomerManagementInfo',
data() {
return {
temp: {} //
}
},
methods: {
showAdd(sid) {
req.fetchBySid(sid)
.then(resp => {
if (resp.success) {
this.temp = resp.data
}
})
.catch(e => {
this.$emit('doback')
})
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.trightb {
display: flex;
align-items: center;
text-align: ;
justify-content: center;
}
.trightb_item {
padding-top: 5px;
}
.span {
margin-left: 50px;
font-size: 15px;
font-weight: 400;
}
/deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
}
</style>
Loading…
Cancel
Save