Commit 58625b1f authored by caimeng's avatar caimeng

新增委外 查询订单

强哥的根据坐标来查看用户位置信息
parent f588f49f
NODE_ENV=production NODE_ENV=production
VUE_APP_ENV=production VUE_APP_ENV=production
VUE_APP_SIGN_URL=https://sign.taimedias.com/index.html VUE_APP_SIGN_URL=https://sign.taimedias.com/dr/index.html
VUE_APP_API=https://drwater.dingrongxd.com VUE_APP_API=https://drwater.dingrongxd.com
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
<link type="favicon" rel="shortcut icon" href="favicon.ico"/> <link type="favicon" rel="shortcut icon" href="favicon.ico"/>
<link rel="stylesheet" href="css/index.css"> <link rel="stylesheet" href="css/index.css">
<script src="./aliyun-oss-sdk.min.js"></script> <script src="./aliyun-oss-sdk.min.js"></script>
<script src="./xlsx.mini.js"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=P1TIoUl1xL5z94liAUL5NkmQAOza1MZc"></script>
<link href="//mapopen.bj.bcebos.com/github/BMapGLLib/DrawingManager/src/DrawingManager.min.css" rel="stylesheet">
<script src="//mapopen.bj.bcebos.com/github/BMapGLLib/DrawingManager/src/DrawingManager.min.js"></script>
<script>//本地测试 <script>//本地测试
......
This diff is collapsed.
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<tr> <tr>
<td>操作</td> <td>操作</td>
<td> <td>
<template v-if="!type">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
...@@ -35,7 +36,8 @@ ...@@ -35,7 +36,8 @@
>代扣结清 >代扣结清
</el-button </el-button
> >
<el-button type="primary" size="mini" v-if="params.capitalCode === 'OWNBUSINESS'" @click="handleDevicePayment"> <el-button type="primary" size="mini" v-if="params.capitalCode === 'OWNBUSINESS'"
@click="handleDevicePayment">
分笔代扣 分笔代扣
</el-button> </el-button>
<template v-if="$permissionUtils.rolePermission('protocolSign')"> <template v-if="$permissionUtils.rolePermission('protocolSign')">
...@@ -43,6 +45,7 @@ ...@@ -43,6 +45,7 @@
@click="handleChangeCFBill">CF账单变更 @click="handleChangeCFBill">CF账单变更
</el-button> </el-button>
</template> </template>
</template>
</td> </td>
<td>减免金额</td> <td>减免金额</td>
<td>¥{{ loanVo.derateAmt }}</td> <td>¥{{ loanVo.derateAmt }}</td>
...@@ -139,7 +142,7 @@ ...@@ -139,7 +142,7 @@
label="结清时间" label="结清时间"
:formatter="dateFormats" :formatter="dateFormats"
></el-table-column> ></el-table-column>
<el-table-column fixed="right" align="center" width="120" label="操作"> <el-table-column fixed="right" v-if="!type" align="center" width="120" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
...@@ -334,6 +337,11 @@ export default { ...@@ -334,6 +337,11 @@ export default {
type: String, type: String,
required: false, required: false,
}, },
type: {
type: String,
desc: '用这个字段来判断,是否是委外,如果是委外,去掉操作菜单',
required: false,
},
params: { params: {
type: Object, type: Object,
required: true, required: true,
......
...@@ -66,11 +66,11 @@ ...@@ -66,11 +66,11 @@
</div> </div>
</el-collapse-item> </el-collapse-item>
<!-- 组件 --> <!-- 组件 -->
<el-collapse-item title="借款合同" name="2"> <el-collapse-item v-if="!type" title="借款合同" name="2">
<ContractList :params="applyInfo" v-if="$permissionUtils.rolePermission('lookAgreement')"></ContractList> <ContractList :params="applyInfo" v-if="$permissionUtils.rolePermission('lookAgreement')"></ContractList>
</el-collapse-item> </el-collapse-item>
<el-collapse-item title="账单详情" name="3"> <el-collapse-item title="账单详情" name="3">
<BillList :params="applyInfo"></BillList> <BillList :type="type" :params="applyInfo"></BillList>
</el-collapse-item> </el-collapse-item>
<el-collapse-item title="还款情况" name="4"> <el-collapse-item title="还款情况" name="4">
<RePayList :params="applyInfo"></RePayList> <RePayList :params="applyInfo"></RePayList>
...@@ -117,6 +117,10 @@ export default { ...@@ -117,6 +117,10 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
type: {
type: String,
required: true,
},
params: { params: {
type: Object, type: Object,
required: true, required: true,
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
class="login-btn" class="login-btn"
size="large" size="large"
type="info" type="info"
style="width: 362px"
@click="submit" @click="submit"
>登录 >登录
</el-button> </el-button>
......
...@@ -170,7 +170,26 @@ export default new Router({ ...@@ -170,7 +170,26 @@ export default new Router({
filter: true filter: true
} }
}, },
{
path: '/order/search',
name: 'Outsourcing',
component: resolve => require(['../views/order/search.vue'], resolve),
meta: {
title: '订单查询',
filter: true
}
},
] ]
},
{
path: '/track/index',
name: 'TrackIndex',
component: resolve => require(['../views/track/index.vue'], resolve),
meta: {
title: '人员轨迹',
filter: false
} }
},
] ]
}) })
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" width="80" label="签署地址"> <el-table-column align="center" width="80" label="签署地址">
<template slot-scope="scope"> <template slot-scope="scope">
<a target="_blank" :href="H5+'#/login?loanNo='+scope.row.loanNo">点击预览</a> <a target="_blank" :href="H5+'#/login?loanNo='+scope.row.tempId+'&id='+scope.row.id">点击预览</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="附件"> <el-table-column align="center" label="附件">
...@@ -204,6 +204,7 @@ export default { ...@@ -204,6 +204,7 @@ export default {
loanNo: "", loanNo: "",
protocolType: "", protocolType: "",
effectiveTime: '', effectiveTime: '',
id:''
}, },
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
...@@ -285,8 +286,8 @@ export default { ...@@ -285,8 +286,8 @@ export default {
type: "primary", type: "primary",
}).then(async () => { }).then(async () => {
try { try {
const {clientNo, loanNo} = row const {clientNo, loanNo,id} = row
const params = {clientNo, loanNo} const params = {clientNo, loanNo,id}
const res = await this.$$post('/protocol/cancelProtocol', {...params}) const res = await this.$$post('/protocol/cancelProtocol', {...params})
if (res.status === 200 && res.data.success) { if (res.status === 200 && res.data.success) {
this.$message.success('操作成功!'); this.$message.success('操作成功!');
...@@ -307,10 +308,11 @@ export default { ...@@ -307,10 +308,11 @@ export default {
/** 延期弹框 */ /** 延期弹框 */
handleDelay(row) { handleDelay(row) {
const {loanNo, clientNo, protocolType} = row; const {loanNo, clientNo, protocolType,id} = row;
this.delayForm.loanNo = loanNo; this.delayForm.loanNo = loanNo;
this.delayForm.clientNo = clientNo; this.delayForm.clientNo = clientNo;
this.delayForm.protocolType = protocolType; this.delayForm.protocolType = protocolType;
this.delayForm.id = id;
this.delayVisible = true; this.delayVisible = true;
}, },
/** 延期提交 */ /** 延期提交 */
......
.page-track{
width: 100vw;
height: 100vh;
overflow: auto;
box-sizing: border-box;
}
.aside-box{
box-sizing: border-box;
padding: 20px;
}
<template>
<div class="page-byh-service">
<block-header title="搜索"/>
<div class="page-search">
<el-form size="small" label-suffix=":" :inline="true" label-width="80px" ref="refForm" :model="form"
class="demo-form-inline">
<el-form-item prop="loanNo" label="借款编号">
<el-input
style="width: 260px"
clearable
v-model.trim="form.loanNo"
@keyup.enter.native="onSubmit"
placeholder="请输入"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
<el-button @click="onReset('refForm')">清空</el-button>
</el-form-item>
</el-form>
</div>
<block-header title="借款记录"></block-header>
<div class="block-box">
<el-table
border
size="mini"
:highlight-current-row="true"
:header-row-class-name="headerStyle"
:data="data" stripe style="width: 100%;">
<el-table-column align="center" width="140" prop="loanNo" label="借款编号"></el-table-column>
<el-table-column align="center" prop="gmtCreated" label="申请日期" :formatter="dateFormats"></el-table-column>
<el-table-column align="center" prop="startDate" label="放款日期" :formatter="dateFormats"></el-table-column>
<el-table-column align="center" prop="raiseAmt" label="放款本金"></el-table-column>
<el-table-column align="center" prop="productNameStr" label="产品名称"></el-table-column>
<el-table-column align="center" prop="capitalCodeStr" label="放款资方"
></el-table-column>
<el-table-column align="center" prop="serviceThemeName" label="服务费主体"
></el-table-column>
<el-table-column align="center" prop="status" label="借款单状态">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status==='AUDITED'" size="small">{{ loanStatusFormat(scope.row) }}
</el-tag>
<el-tag v-else-if="scope.row.status==='SETTLED'" size="small">{{ loanStatusFormat(scope.row) }}</el-tag>
<el-tag type="danger" v-else-if="scope.row.status==='OVERDUED'" size="small">
{{ loanStatusFormat(scope.row) }}
</el-tag>
<el-tag type="warning" v-else-if="scope.row.status==='SUBMITED'" size="small">
{{ loanStatusFormat(scope.row) }}
</el-tag>
<el-tag type="warning" v-else-if="scope.row.status==='BACKING'" size="small">
{{ loanStatusFormat(scope.row) }}
</el-tag>
<el-tag type="info" v-else size="small">{{ loanStatusFormat(scope.row) }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="settlePlanIndex" label="限制提前结清期数"></el-table-column>
<el-table-column align="center" prop="cancelMemo" label="备注"></el-table-column>
<el-table-column align="center" label="查看详情">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleClick(scope.row)">详情</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!--借款详情-->
<template v-if="visible">
<loan-detail
@handleClose="visible=false"
type="outsource"
:title="title"
:params="items"
:dialogVisible="visible"/>
</template>
</div>
</template>
<script>
import LoanDetail from "#/byh/componments/LoanDetail";
import SettleReport from "#/byh/componments/SettleReport";
import GenerateSettleReport from "#/byh/componments/GenerateSettleReport";
import * as moment from "moment";
export default {
name: "OrderSearch",
components: {
LoanDetail,
SettleReport,
GenerateSettleReport
},
data() {
return {
form: {
"current": 1,
"size": 10,
"loanNo": "BA20240123003382537098"
},
visible: false,
activeComponents: "BaseInfo",
title: "基本信息",
items: {},
mcDialogVisible: false,
mcItems: null,
mcTitle: "",
ActiveCom: "",
zyItem:"",
data: []
}
},
created() {
},
methods: {
/** 表格样式 */
headerStyle() {
return "tableHeaderStyle";
},
/** 初始化订单列表 **/
async init() {
try {
const params = this.form
const form = Object.assign({}, params)
const res = await this.$$post('/outsourcing/query', {...form})
if (res.status === 200 && res.data.success) {
this.data = [{...res.data.result}];
} else {
this.$message.error(res.data.message);
}
} catch (err) {
this.$Message.error(err || '系统异常');
console.log(err, '初始化协议列表错误')
}
},
/** 初始化协议枚举列表*/
async initAgreementEnum() {
try {
const res = await this.$$get('/protocol/selectProtocolEnumList')
if (res.status === 200 && res.data.success) {
this.EnumList = res.data.result;
} else {
this.$message.error(res.data.message);
}
} catch (err) {
this.$message.error(res || '初始化协议枚举列表报错');
}
},
/** 协议作废 */
async handleCancel(row) {
// 加个确认弹框
this.$confirm("是否确认作废协议?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "primary",
}).then(async () => {
try {
const {clientNo, loanNo,id} = row
const params = {clientNo, loanNo,id}
const res = await this.$$post('/protocol/cancelProtocol', {...params})
if (res.status === 200 && res.data.success) {
this.$message.success('操作成功!');
await this.init()
} else {
this.$message.error(res.data.message);
}
} catch (err) {
this.$message.error(res || '初始化协议枚举列表报错');
}
}).catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
},
/** 延期弹框 */
handleDelay(row) {
const {loanNo, clientNo, protocolType,id} = row;
this.delayForm.loanNo = loanNo;
this.delayForm.clientNo = clientNo;
this.delayForm.protocolType = protocolType;
this.delayForm.id = id;
this.delayVisible = true;
},
/** 延期提交 */
async delaySubmit() {
try {
const form = this.delayForm
const res = await this.$$post('/protocol/urlDelayed', {...form})
if (res.status === 200 && res.data.success) {
this.$message.success('操作成功!');
await this.init()
this.delayVisible = false;
} else {
this.$message.error(res.data.message);
}
} catch (err) {
this.$message.error(res || '延期失败');
}
},
/** 搜索提交 */
onSubmit() {
this.init()
},
handleCurrentChange(e) {
this.form.current = e;
this.init();
},
handleSizeChange(e) {
this.form.size = e;
this.form.current = 1;
this.init();
},
/** 预览大图 */
handlePreview(item, list) {
const cache = []
list.forEach(item => {
console.log(item, '==')
if (item.indexOf('mp4') === -1) {
cache.push(item)
}
})
},
/** 视频预览 */
handlePreviewVideo(item) {
console.log(item, 'nasha')
this.showvideoplay = true;
this.videourl = item;
},
/*日期*/
dateFormats: function (row, column) {
let date = row[column.property]
if (date === undefined) return '';
return moment(date).format("YYYY-MM-DD")
},
//借款单状态
loanStatusFormat: function (row) {
let status = row['status'];
return this.$enumUtils.toMsg('LoanStatuEnums', status);
},
capitalCodeFormat: function (row, column) {
let capitalCodeStr = row['capitalCodeStr'];
return this.$enumUtils.toMsg('CapitalEnums', capitalCodeStr);
},
// 切换选项卡
handleClick(row) {
console.log(row, '一行信息');
this.visible = true;
this.title = '借款详情';
this.items = {
...this.params,
...row
};
}
}
}
</script>
<style scoped>
.link-active, .link-null {
text-decoration: none;
}
.link-active {
color: #155bd4;
}
ul, li {
list-style: none;
margin: 0;
padding: 0;
}
.p-table {
margin-bottom: 20px;
}
.pages {
display: flex;
align-items: center;
justify-content: center;
}
</style>
.page-track{
width: 100vw;
height: 100vh;
overflow: auto;
box-sizing: border-box;
padding: 30px;
}
.aside-box{
box-sizing: border-box;
padding: 20px;
}
<template>
<div class="page-track">
<el-container>
<el-header style="height: auto">
<block-header title="搜索">
<el-upload class="upload-demo" :show-file-list="false" action="" :before-upload="beforeUpload"
:http-request="handleUpload">
<el-button size="small" icon="el-icon-plus" type="primary">导入数据</el-button>
</el-upload>
</block-header>
<div class="page-search">
<el-form label-suffix=":" size="small" :inline="true" label-width="80px" ref="refForm" :model="form"
class="demo-form-inline">
<el-form-item prop="loanNo" label="经度">
<el-input
clearable
v-model.trim="form.lng"
@keyup.enter.native="onSubmit"
placeholder="请输入"></el-input>
</el-form-item>
<template>
<el-form-item prop="protocolType" label="纬度">
<el-input
clearable
v-model.trim="form.lat"
@keyup.enter.native="onSubmit"
placeholder="请输入"></el-input>
</el-form-item>
</template>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
<el-button @click="onReset('refForm')">清空</el-button>
</el-form-item>
</el-form>
</div>
</el-header>
<el-container>
<el-main>
<!-- 列表 -->
<block-header title="地图展示"/>
<div class="map-box">
<div id="map" style="height: 685px"/>
</div>
</el-main>
<el-aside width="650px">
<div class="aside-box">
<block-header title="坐标详情"/>
<el-input type="textarea" rows="32" v-model="coordinate"></el-input>
</div>
</el-aside>
</el-container>
</el-container>
</div>
</template>
<script>
let BMap = {};
let map = {};
import Axios from 'axios'
export default {
name: "MapTrack",
data() {
return {
form: {
poi: 0,
lng: '116.404', // 纬度
lat: '39.915', // 经度
},
map: null,
coordinate: '',
point: [],
desc:[]
}
},
created() {
// 初始化地图
this.$nextTick(() => {
this.init([{lat: '39.915', lng: '116.404'}]);
});
},
methods: {
/** 初始化协议列表 **/
async init() {
try {
// 创建Map实例
BMap = window.BMapGL
this.map = new BMap.Map('map')
// 初始化地图,设置中心点坐标和地图级别
this.map.centerAndZoom(new window.BMapGL.Point(116.404, 39.915), 14)
// 设置地图显示的城市 此项是必须设置的
// this.map.setCurrentCity('成都')
// 启用滚轮放大缩小,默认禁用
this.map.enableScrollWheelZoom(true)
// 启用地图惯性拖拽,默认禁用
this.map.enableContinuousZoom(true)
} catch (err) {
console.log(err, '沃日')
this.$Message.error(err || '初始化地图报错');
}
},
/** 上传excel表格*/
async handleUpload(file) {
console.log(file, '沃日')
this.readWorkbookFromLocalFile(file.file, (workbook) => {
this.readWorkbook(workbook);
});
},
// 读取本地excel文件,读取Excel文件对象
readWorkbookFromLocalFile(file, callback) {
const reader = new FileReader();
reader.onload = function (e) {
const data = e.target.result;
const workbook = XLSX.read(data, {type: 'binary'});
console.log(workbook);
if (callback) callback(workbook);
};
reader.readAsBinaryString(file);
},
/** 转成cvs 要注意Execel表格内容不能包含英文的,不然解析出来的数据格式会有问题 */
readWorkbook(workbook) {
const sheetNames = workbook.SheetNames; // 工作表名称集合
const worksheet = workbook.Sheets[sheetNames[0]]; // 这里我们只读取第一张sheet
const csv = XLSX.utils.sheet_to_csv(worksheet);
const rows = csv.split('\n'); // 转化为数组
rows.shift(); // 最后一行没用的
const nRows = []
rows.forEach(item => {
const a = item.split(',')
const o = {
time: a[0],
lat: a[1],
lng: a[2]
}
nRows.push(o)
})
const xinRows = nRows.sort(this.dateData("time", true))
console.log(xinRows,'数据')
// 画坐标
xinRows.forEach(async item=>{
await this.handlePointSearch(item)
})
},
/** 上传前校验 */
beforeUpload(file) {
const fileDir = file.name;
const suffix = fileDir.substr(fileDir.lastIndexOf("."));
if (".xls" !== suffix && ".xlsx" !== suffix) {
this.$message.error('上传文件只能是 Excel 文件类型!');
return false;
}
return true;
},
/** 数组排序 */
// property是你需要排序传入的key,bol为true时是升序,false为降序
dateData(property, bol) {
return function (a, b) {
const value1 = a[property];
const value2 = b[property];
if (bol) {
// 升序
return Date.parse(value1) - Date.parse(value2);
} else {
// 降序
return Date.parse(value2) - Date.parse(value1)
}
}
},
/** 搜索提交 */
async onSubmit() {
if (!this.form.lat) {
return
}
if (!this.form.lng) {
return
}
const params = this.form
try {
await this.handlePointSearch(params)
} catch (err) {
}
},
getTime() {
let date = new Date(),
year = date.getFullYear(),
month = date.getMonth() + 1,
day = date.getDate(),
hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(),
minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(),
second = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
month >= 1 && month <= 9 ? (month = "0" + month) : "";
day >= 0 && day <= 9 ? (day = "0" + day) : "";
return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
},
/** 坐标查询 */
async handlePointSearch(params) {
const point = []
if (!params.time) params.time = this.getTime();
Axios({
url: "https://qryloct.market.alicloudapi.com/lundear/qryloct",
method: 'GET',
params: params,
headers: {
'Authorization': 'APPCODE 7c9180ba9d32452ebebc71a1a2632efc',
'Content-Type': 'multipart/form-data'
}
}).then((res) => {
if (res.status === 200) {
const result = res.data.result;
const {address} = result
const str = `时间: ${params.time},精度: ${params.lat},纬度: ${params.lng},${address};`
this.desc.push(str)
point.push({
lat: params.lat,
lng: params.lng
})
}
this.coordinate = this.desc.join('\n')
this.point = point
// 画点
if (point && point.length) {
point.forEach(item => {
const m = new window.BMapGL.Marker(new window.BMapGL.Point(item.lng, item.lat))
this.map.addOverlay(m);
})
}
}).catch((e) => {
console.log(e, '错误')
});
}
}
}
</script>
<style lang="less" src="./index.less" scoped></style>
...@@ -39,5 +39,9 @@ module.exports = { ...@@ -39,5 +39,9 @@ module.exports = {
}) })
) )
} }
config.externals = {
'BMap':'BMap',
'BMapLib':'BMapLib'
}
} }
}; };
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