Commit e129b723 authored by lixy's avatar lixy

Merge http://113.105.137.151:22280/youjj/cloud-platform-ui

# Conflicts:
#	src/router/index.js
parents cb564837 b1806089
import fetch from 'utils/fetch';
export function getObj(id) {
return fetch({
url: '/vehicle/branchCompany/stock/' + id,
method: 'get'
});
}
export function page(param) {
return fetch({
url: '/vehicle/branchCompany/stock/page',
method: 'get',
params: param
});
}
export function search(param) {
return fetch({
url: '/vehicle/branchCompany/stock/search',
method: 'get',
params: param
});
}
export function addObj(param) {
return fetch({
url: '/vehicle/branchCompany/stock',
method: 'put',
data: param
});
}
export function updateObj(param) {
return fetch({
url: '/vehicle/branchCompany/stock',
method: 'post',
data: param
});
}
export function delObj(id) {
return fetch({
url: '/vehicle/branchCompany/stock/' + id,
method: 'delete'
});
}
import fetch from 'utils/fetch';
export function getObj(id) {
return fetch({
url: '/vehicle/branchCompany/stock/apply/' + id,
method: 'get'
});
}
export function page(param) {
return fetch({
url: '/vehicle/branchCompany/stock/apply/page',
method: 'get',
params: param
});
}
export function delObj(id) {
return fetch({
url: '/vehicle/branchCompany/stock/apply/' + id,
method: 'delete'
});
}
export function buyStock(id) {
return fetch({
url: '/vehicle/branchCompany/stock/apply/buy',
method: 'post',
params: {
applyId: id
}
});
}
export function cancelApply(id) {
return fetch({
url: '/vehicle/branchCompany/stock/apply/cancel',
method: 'post',
params: {
applyId: id
}
});
}
import fetch from 'utils/fetch';
export function page(param) {
return fetch({
url: '/vehicle/departure/page',
method: 'get',
params: param
});
}
...@@ -21,50 +21,50 @@ export const constantRouterMap = [{ ...@@ -21,50 +21,50 @@ export const constantRouterMap = [{
component: _import('login/index'), component: _import('login/index'),
hidden: true hidden: true
}, },
{ {
path: '/authredirect', path: '/authredirect',
component: _import('login/authredirect'), component: _import('login/authredirect'),
hidden: true hidden: true
}, },
{ {
path: '/map', path: '/map',
component: _import('map'), component: _import('map'),
name: '地图', name: '地图',
hidden: true hidden: true
}, },
{ {
path: '/404', path: '/404',
component: _import('error/404'), component: _import('error/404'),
hidden: true hidden: true
}, },
{ {
path: '/401', path: '/401',
component: _import('error/401'), component: _import('error/401'),
hidden: true hidden: true
}, },
{ {
path: '/', path: '/',
component: Layout, component: Layout,
redirect: '/dashboard', redirect: '/dashboard',
name: '首页', name: '首页',
hidden: true, hidden: true,
children: [{ children: [{
path: 'dashboard', path: 'dashboard',
component: _import('dashboard/index') component: _import('dashboard/index')
}] }]
}, },
{ {
path: '/introduction', path: '/introduction',
component: Layout, component: Layout,
redirect: '/introduction/index', redirect: '/introduction/index',
icon: 'form', icon: 'form',
noDropdown: true, noDropdown: true,
children: [{ children: [{
path: 'index', path: 'index',
component: _import('introduction/index'), component: _import('introduction/index'),
name: '简述' name: '简述'
}] }]
} }
] ]
export default new Router({ export default new Router({
...@@ -177,27 +177,21 @@ export const asyncRouterMap = [{ ...@@ -177,27 +177,21 @@ export const asyncRouterMap = [{
component: _import('vehicle/accompanyingItem/index'), component: _import('vehicle/accompanyingItem/index'),
name: '随行物品管理', name: '随行物品管理',
authority: 'accompanyingItem' authority: 'accompanyingItem'
}] },
}, {
{ path: 'branchCompany/stock',
path: '/companyInfo', component: _import('branchCompany/stock/index'),
component: _import('baseInfo/companyInfo/index'), name: '分公司股权信息管理',
name: '公司信息', authority: 'branchCompany/stock'
authority: 'companyInfo' },
}, {
{ path: 'branchCompany/stockApply',
path: '/stockCrowd', component: _import('branchCompany/stockApply/index'),
component: _import('baseInfo/stockCrowd/index'), name: '分公司股权信息管理',
name: '股权众筹', authority: 'branchCompany/stockApply'
authority: 'stockCrowd' }
}, ]
{ }, {
path: '/stockCrowdDetail',
component: _import('baseInfo/stockCrowdDetail/index'),
name: '股权众筹详情页',
authority: 'stockCrowd'
},
{
path: '/vehicle', path: '/vehicle',
component: Layout, component: Layout,
name: '车辆管理', name: '车辆管理',
...@@ -221,6 +215,31 @@ export const asyncRouterMap = [{ ...@@ -221,6 +215,31 @@ export const asyncRouterMap = [{
component: _import('vehicle/vehicleWarningMsg/index'), component: _import('vehicle/vehicleWarningMsg/index'),
name: '车辆预警消息', name: '车辆预警消息',
authority: 'vehicleWarningMsg' authority: 'vehicleWarningMsg'
},
{
path: 'vehicleDepartureLog',
component: _import('vehicle/vehicleDepartureLog/index'),
name: '车辆出车记录',
authority: 'vehicleDepartureLog'
} }
] ]
}]; },
{
path: '/companyInfo',
component: _import('baseInfo/companyInfo/index'),
name: '公司信息',
authority: 'companyInfo'
},
{
path: '/stockCrowd',
component: _import('baseInfo/stockCrowd/index'),
name: '股权众筹',
authority: 'stockCrowd'
},
{
path: '/stockCrowdDetail',
component: _import('baseInfo/stockCrowdDetail/index'),
name: '股权众筹详情页',
authority: 'stockCrowd'
}
];
...@@ -60,6 +60,18 @@ ...@@ -60,6 +60,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="100" align="center" label="经度">
<template scope="scope">
<span>{{scope.row.longitude}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" label="纬度">
<template scope="scope">
<span>{{scope.row.latitude}}</span>
</template>
</el-table-column>
<el-table-column width="180" align="center" label="最后更新时间"> <el-table-column width="180" align="center" label="最后更新时间">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.updateTime?scope.row.updateTime:scope.row.createTime}}</span> <span>{{scope.row.updateTime?scope.row.updateTime:scope.row.createTime}}</span>
...@@ -91,7 +103,7 @@ ...@@ -91,7 +103,7 @@
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-select v-model.number="form.status" placeholder="请选择省份(直辖市)"> <el-select v-model.number="form.status" placeholder="请选择状态">
<el-option v-for="(val, key, index) in companyStatusAndCode " :key="val.code" :label="val.val" <el-option v-for="(val, key, index) in companyStatusAndCode " :key="val.code" :label="val.val"
:value="val.code"></el-option> :value="val.code"></el-option>
</el-select> </el-select>
...@@ -127,6 +139,14 @@ ...@@ -127,6 +139,14 @@
<el-input v-model="form.addrDetail" placeholder="请输入详细地址"></el-input> <el-input v-model="form.addrDetail" placeholder="请输入详细地址"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="经度" prop="longitude">
<el-input v-model.number="form.longitude" placeholder="请输入经度"></el-input>
</el-form-item>
<el-form-item label="纬度" prop="latitude">
<el-input v-model.number="form.latitude" placeholder="请输入纬度"></el-input>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel('form')">取 消</el-button> <el-button @click="cancel('form')">取 消</el-button>
...@@ -167,10 +187,28 @@ ...@@ -167,10 +187,28 @@
addrTown: undefined, addrTown: undefined,
addrDetail: undefined, addrDetail: undefined,
leader: undefined, leader: undefined,
longitude: undefined,
latitude: undefined,
leaderContactInfo: undefined, leaderContactInfo: undefined,
updateTime: undefined updateTime: undefined
}, },
rules: { rules: {
latitude: [
{
type: 'number',
required: false,
message: '请输入数字',
trigger: 'blur'
}
],
longitude: [
{
type: 'number',
required: false,
message: '请输入数字',
trigger: 'blur'
}
],
status: [ status: [
{ {
type: 'integer', type: 'integer',
...@@ -470,6 +508,8 @@ ...@@ -470,6 +508,8 @@
addrTown: undefined, addrTown: undefined,
addrDetail: undefined, addrDetail: undefined,
leader: undefined, leader: undefined,
longitude: undefined,
latitude: undefined,
leaderContactInfo: undefined, leaderContactInfo: undefined,
updateTime: undefined updateTime: undefined
}; };
......
<template>
<router-view></router-view>
</template>
This diff is collapsed.
<template>
<div class="app-container calendar-list-container">
<el-table :key='tableKey' :data="list" v-loading.body="listLoading"
border fit highlight-current-row
style="width: 100%">
<el-table-column align="center" label="ID" width="65">
<template scope="scope">
<span>{{scope.row.id}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="公司名称">
<template scope="scope">
<span>{{scope.row.companyName}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="申请人">
<template scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="联系方式">
<template scope="scope">
<span>{{scope.row.tel}}</span>
</template>
</el-table-column>
<el-table-column width="180" align="center" label="购买数量">
<template scope="scope">
<span>{{scope.row.count}}</span>
</template>
</el-table-column>
<el-table-column width="180" align="center" label="状态">
<template scope="scope">
<span>{{applyState[scope.row.state].label}}</span>
</template>
</el-table-column>
<el-table-column width="180" align="center" label="创建时间">
<template scope="scope">
<span>{{scope.row.createTime}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="150">
<template scope="scope">
<el-button v-if="btn_buy && scope.row.state == 0" size="small" type="success" @click="handleBuy(scope.row)">认购</el-button>
<el-button v-if="btn_cancel && scope.row.state == 0" size="small" type="success" @click="handleCancel(scope.row)">放弃</el-button>
<el-button v-if="btn_del" size="small" type="danger" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
</div>
</template>
<script>
import {
page,
delObj,
buyStock,
cancelApply
} from 'api/branchCompany/stockApply/index';
import { mapGetters } from 'vuex';
import rsCode from '../../../utils/rsCode';
export default {
name: 'branchCompanyStock',
data() {
return {
form: {
id: null,
companyId: null,
companyName: null,
name: null,
tel: null,
count: null,
state: null
},
rules: {
// companyName: [
// {
// required: true,
// message: '请输入用户',
// trigger: 'blur'
// }
// ],
},
applyState: {
'-1': {
key: -1,
label: '放弃购买'
},
0: {
key: 0,
label: '申请中'
},
1: {
key: 1,
label: '确认购买'
}
},
list: null,
total: null,
listLoading: true,
listQuery: {
page: 1,
limit: 20
},
dialogFormVisible: false,
dialogStatus: '',
btn_del: true,
btn_buy: true,
btn_cancel: true,
tableKey: 0
}
},
created() {
this.getList();
this.btn_del = this.elements['branchCompany/stockApply:btn_delete'];
},
computed: {
...mapGetters([
'elements'
]),
provinceRegions() {
return getSonRegionByCodes(1);
},
cityRegions() {
if (!this.$utils.isInteger(this.form.addrProvince)) {
return null;
}
return getSonRegionByCodes(this.form.addrProvince);
}
},
methods: {
handleBuy(row) {
this.$confirm('此操作将确认购买, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
buyStock(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
});
});
},
handleCancel(row) {
this.$confirm('此操作将放弃购买, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
cancelApply(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
});
});
},
handleDelete(row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
delObj(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '删除成功',
type: 'success',
duration: 2000
});
const index = this.list.indexOf(row);
this.list.splice(index, 1);
});
});
},
getList() {
this.listLoading = true;
page(this.listQuery)
.then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.listLoading = false;
})
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
}
}
}
</script>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment