租赁平台登录
This commit is contained in:
parent
8b1ecec6c1
commit
15c8119f94
|
|
@ -11,11 +11,11 @@ export function getSltAgreementInfo(query) {
|
|||
|
||||
|
||||
// 查询费用结算申请详情
|
||||
export function getSltInfo(query) {
|
||||
export function getSltInfo(params){
|
||||
return request({
|
||||
url: '/material/sltAgreementInfo/getSltInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -37,4 +37,3 @@ export function getSltInfo(query) {
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ export function checkCode(data) {
|
|||
|
||||
|
||||
|
||||
//南网机具认证中心登录
|
||||
//南网机具认证中心登录1
|
||||
export function SsoLogin(data) {
|
||||
return request({
|
||||
url: '/auth/onlineApprove',
|
||||
|
|
@ -100,4 +100,17 @@ export function SsoLogin(data) {
|
|||
}
|
||||
|
||||
|
||||
//南网机具认证中心登录2
|
||||
export function loginByMall(data) {
|
||||
return request({
|
||||
url: '/auth/loginByMall',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { login, logout, getInfo, refreshToken,checkCode,SsoLogin } from '@/api/login'
|
||||
import { login, logout, getInfo, refreshToken,checkCode,loginByMall } from '@/api/login'
|
||||
import { getToken, setToken, setExpiresIn, removeToken } from '@/utils/auth'
|
||||
import { Notification, MessageBox, Message, Loading } from 'element-ui'
|
||||
const user = {
|
||||
|
|
@ -55,7 +55,7 @@ const user = {
|
|||
})
|
||||
})
|
||||
},
|
||||
// 验证码 登录
|
||||
// 短信验证码 登录
|
||||
textLogin({ commit }, userInfo) {
|
||||
console.log(userInfo)
|
||||
let params = {
|
||||
|
|
@ -78,20 +78,20 @@ const user = {
|
|||
})
|
||||
})
|
||||
},
|
||||
|
||||
//机具租赁平台跳转登录---南网
|
||||
ssoLogin({ commit }, param) {
|
||||
return new Promise((resolve, reject) => {
|
||||
SsoLogin(param).then(res => {
|
||||
loginByMall(param).then(res => {
|
||||
console.log(res)
|
||||
let data = res.data
|
||||
if(res.code==200){
|
||||
console.log('登录成功1111111')
|
||||
// console.log('登录成功1111111')
|
||||
setToken(data.access_token)
|
||||
commit('SET_TOKEN', data.access_token)
|
||||
setExpiresIn(data.expires_in)
|
||||
commit('SET_EXPIRES_IN', data.expires_in)
|
||||
}else{
|
||||
console.log('登录失败22222222')
|
||||
// console.log('登录失败22222222')
|
||||
this.$modal.msgError('登录失败');
|
||||
}
|
||||
resolve()
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<el-button type="primary" size="mini" >维修明细导出</el-button>
|
||||
<el-button type="primary" size="mini" >报废明细导出</el-button>
|
||||
<el-button type="warning" size="mini" >全部明细导出</el-button>
|
||||
<el-button type="success" size="mini" >提交</el-button>
|
||||
<el-button type="success" size="mini" @click="handleAdd">提交</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="danger" size="mini" style="float: right;" @click="handleBack">返回</el-button>
|
||||
|
|
@ -20,107 +20,117 @@
|
|||
|
||||
|
||||
<div>
|
||||
<el-table v-loading="loading" :data="agreementList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="leaseList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column label="租赁费用明细" align="center">
|
||||
<el-table-column label="序号" align="center" type="index" width="60"/>
|
||||
<el-table-column label="结算单位名称" align="center" prop="agreementCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算工程名称" align="center" prop="contractCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备名称" align="center" prop="fileName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="signTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租赁单价" align="center" prop="projectName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租赁数量" align="center" prop="planStartTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租赁日期" align="center" prop="leaseDay" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="归还数量" align="center" prop="authPerson" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="归还日期 " align="center" prop="phone" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租赁天数" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="外部租赁费用" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算单位名称" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算工程名称" align="center" prop="projectName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="nuitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租赁单价" align="center" prop="leasePrice" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租赁数量" align="center" prop="num" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租赁日期" align="center" prop="startTime" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="归还数量" align="center" prop="" :show-overflow-tooltip="true" /> -->
|
||||
<el-table-column label="归还日期 " align="center" prop="endTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租赁天数" align="center" prop="leaseDays" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="外部租赁费用" align="center" prop="costs" :show-overflow-tooltip="true" />
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
<div style="width: 100%;text-align: right;padding: 20px 20px;">租赁费用小计:97010.08</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-table v-loading="loading" :data="agreementList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="repairList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column label="维修费用明细" align="center">
|
||||
<el-table-column label="序号" align="center" type="index" width="60"/>
|
||||
<el-table-column label="结算单位名称" align="center" prop="agreementCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算工程名称" align="center" prop="contractCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备名称" align="center" prop="fileName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="signTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="维修数量" align="center" prop="projectName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="维修费用" align="center" prop="planStartTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算单位名称" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算工程名称" align="center" prop="projectName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="nuitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="nuitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="维修状态" align="center" prop="repairStatus" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.repairStatus==0">未审核</span>
|
||||
<span v-if="scope.row.repairStatus==1">已审核</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="维修数量" align="center" prop="num" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="维修费用" align="center" prop="costs" :show-overflow-tooltip="true" />
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
<div style="width: 100%;text-align: right;padding: 20px 20px;">维修费用小计:230</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-table v-loading="loading" :data="agreementList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="scrapList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column label="报废费用明细" align="center">
|
||||
<el-table-column label="序号" align="center" type="index" width="60"/>
|
||||
<el-table-column label="结算单位名称" align="center" prop="agreementCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算工程名称" align="center" prop="contractCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备名称" align="center" prop="fileName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="signTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="报废数量" align="center" prop="projectName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="报废原因" align="center" prop="planStartTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="维修费用" align="center" prop="planStartTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算单位名称" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算工程名称" align="center" prop="projectName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="nuitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="报废数量" align="center" prop="num" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="报废原因" align="center" prop="scrapType" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.scrapType==0">自然</span>
|
||||
<span v-if="scope.row.scrapType==1">人为</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="维修费用" align="center" prop="costs" :show-overflow-tooltip="true" />
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
<div style="width: 100%;text-align: right;padding: 20px 20px;">报废费用小计:230</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-table v-loading="loading" :data="agreementList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="loseList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column label="丢失费用明细" align="center">
|
||||
<el-table-column label="序号" align="center" type="index" width="60"/>
|
||||
<el-table-column label="结算单位名称" align="center" prop="agreementCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算工程名称" align="center" prop="contractCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备名称" align="center" prop="fileName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="signTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="丢失数量" align="center" prop="projectName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="丢失费用" align="center" prop="planStartTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算单位名称" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算工程名称" align="center" prop="projectName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="nuitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="丢失数量" align="center" prop="num" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="丢失费用" align="center" prop="costs" :show-overflow-tooltip="true" />
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
<div style="width: 100%;text-align: right;padding: 20px 20px;">丢失费用小计:230</div>
|
||||
</div>
|
||||
|
||||
<el-dialog title="费用结算提交" :visible.sync="applyVisible" width="1000px">
|
||||
<div>
|
||||
<el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column label="报废费用明细" align="center">
|
||||
<el-table-column label="序号" align="center" type="index" width="60"/>
|
||||
<el-table-column label="结算单位名称" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="结算工程名称" align="center" prop="contractCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="报废数量" align="center" prop="num" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="报废原因" align="center" prop="planStartTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="维修费用" align="center" prop="costs" :show-overflow-tooltip="true" />
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="applyVisible=false">取 消</el-button>
|
||||
<el-button type="primary">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -205,11 +215,19 @@
|
|||
{ required: true, message: "通知内容不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
leaseList:[],//租赁费用列表
|
||||
repairList:[],//维修费用列表
|
||||
scrapList:[],//报废费用列表
|
||||
loseList:[],//丢失费用列表
|
||||
deptName: undefined,
|
||||
applyVisible:false,
|
||||
applyList:[]
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.rowData = this.$route.query.rowData;
|
||||
console.log(this.rowData)
|
||||
this.getDataAll();
|
||||
// this.getUnitList();
|
||||
// this.getProjectList();
|
||||
|
||||
|
|
@ -227,16 +245,28 @@
|
|||
})
|
||||
},
|
||||
|
||||
/** 查询字典类型列表 */
|
||||
getList() {
|
||||
/** 查询列表 */
|
||||
getDataAll() {
|
||||
this.loading = true;
|
||||
getAgreementList(this.queryParams).then(response => {
|
||||
this.agreementList = response.rows;
|
||||
this.total = response.total;
|
||||
getSltInfo(this.rowData).then(response => {
|
||||
// this.agreementList = response.rows;
|
||||
this.leaseList = response.data.leaseList;//租赁费用列表
|
||||
|
||||
this.repairList = response.data.repairList;//维修费用列表
|
||||
|
||||
this.scrapList = response.data.scrapList;//报废费用列表
|
||||
|
||||
this.loseList = response.data.loseList;//丢失费用列表
|
||||
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
//
|
||||
handleAdd() {
|
||||
this.applyVisible = true
|
||||
},
|
||||
//返回
|
||||
handleBack(){
|
||||
this.$tab.closeOpenPage({
|
||||
path:'/cost/cost/costApplyList',
|
||||
|
|
@ -251,20 +281,6 @@
|
|||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
// const agreementId = row.agreementId;
|
||||
// let param = {
|
||||
// agreementId:row.agreementId+''
|
||||
// }
|
||||
// this.$modal.confirm('是否确认删除该数据项?').then(function() {
|
||||
// return removeAgreement(param);
|
||||
// }).then(() => {
|
||||
// this.getList();
|
||||
// this.$modal.msgSuccess("删除成功");
|
||||
// }).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('material/agreementInfo/export', {
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: undefined,
|
||||
|
||||
sltStatus:'0'
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -217,7 +217,7 @@ export default {
|
|||
this.$tab.closeOpenPage({
|
||||
path:'/cost/cost/costApplyAdd',
|
||||
query:{
|
||||
isEdit:true
|
||||
rowData:[row]
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {getCodeImg,sendCode} from "@/api/login";
|
||||
import {getCodeImg,sendCode,loginByMall} from "@/api/login";
|
||||
import Cookies from "js-cookie";
|
||||
import {encrypt, decrypt} from '@/utils/jsencrypt'
|
||||
|
||||
|
|
@ -162,18 +162,29 @@ export default {
|
|||
readonlyFlag: true,
|
||||
show: 1,
|
||||
count: '',
|
||||
timer: null
|
||||
timer: null,
|
||||
loginParams:{}//登录页面地址栏参数
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function (route) {
|
||||
this.redirect = route.query && route.query.redirect;
|
||||
if(this.$route.query.redirect.split("?").length>0){
|
||||
let arr = this.$route.query.redirect.split("?")[1].split("&")||[]
|
||||
arr.forEach((item,index)=>{
|
||||
this.$set(this.loginParams, item.split("=")[0]+"", item.split("=")[1]);
|
||||
})
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log(this.$route.query.redirect.split("?")[1])
|
||||
if(JSON.stringify(this.loginParams) != '{}'){
|
||||
this.jumpLogin()
|
||||
}
|
||||
this.getCode();
|
||||
this.getCookie();
|
||||
},
|
||||
|
|
@ -193,8 +204,6 @@ export default {
|
|||
},
|
||||
//获取短信验证码
|
||||
getTextCode() {
|
||||
|
||||
|
||||
const regExp = /^1[3456789]\d{9}$/;
|
||||
if (regExp.test(this.loginForm.phone)) {
|
||||
console.log('手机号格式正确');
|
||||
|
|
@ -222,6 +231,7 @@ export default {
|
|||
}
|
||||
|
||||
},
|
||||
//短信登录
|
||||
textLogin(){
|
||||
// checkCode
|
||||
console.log(this.loginForm)
|
||||
|
|
@ -248,6 +258,24 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
//南网登录
|
||||
jumpLogin(){
|
||||
this.loading = true;
|
||||
let param = {
|
||||
token:this.loginParams.token,
|
||||
username:this.loginParams.userName
|
||||
}
|
||||
// console.log(param)
|
||||
this.$store.dispatch("ssoLogin", param).then(() => {
|
||||
//成功后会跳转页面入首页
|
||||
this.$router.push({path: this.redirect || "/"}).catch(() => {
|
||||
});
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
//失败返回南网登录页面
|
||||
// window.location.replace('https://test-sso.csgmall.com.cn/?client_id=549OWptc&theme=zhgc_storage&response_type=code&redirect_uri=https%3A%2F%2Ftest-cc.zhgkxt.com')
|
||||
});
|
||||
},
|
||||
getCookie() {
|
||||
const username = Cookies.get("username");
|
||||
const password = Cookies.get("password");
|
||||
|
|
|
|||
Loading…
Reference in New Issue