Commit 66a0a202 by cen

Merge branch 'SAAS+V5.0.0-1014' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.0.0-1014

2 parents f447045b 1adc4cfa
import http from '../request/signHttp'
// ${pathEnum.evaluation} // ${pathEnum.evaluation}
import { gscPost } from '../request/signHttp'
module.exports = { module.exports = {
/** 评估单列表 */ /** 评估单列表 */
evalOrderList(data) { evalOrderList(data) {
console.log(http) return gscPost(`/evalOrder/page`, {
return http.post(`/evalOrder/page`, {
...data ...data
}) })
}, },
/** 评估单详情 */ /** 评估单详情 */
evalOrderDetail(data) { evalOrderDetail(data) {
return http.post(`/evalOrder/detail`, { return gscPost(`/evalOrder/detail`, {
...data ...data
}) })
}, },
/** 评估单创建 */ /** 评估单创建 */
evalOrderCreate(data) { evalOrderCreate(data) {
return http.post(`/evalOrder/create`, { return gscPost(`/evalOrder/create`, {
...data ...data
}) })
}, },
/** 评估单分页状态数量 */ /** 评估单分页状态数量 */
evalOrderPageCount(data) { evalOrderPageCount(data) {
return http.post(`/evalOrder/pageCount`, { return gscPost(`/evalOrder/pageCount`, {
...data ...data
}) })
}, },
/** 评估单更新 */ /** 评估单更新 */
evalOrderUpdate(data) { evalOrderUpdate(data) {
return http.post(`/evalOrder/edit`, { return gscPost(`/evalOrder/edit`, {
...data ...data
}) })
}, },
/** 评估单重新报价 */ /** 评估单重新报价 */
evalOrderOwnerReQuote(data) { evalOrderOwnerReQuote(data) {
return http.post(`/evalOrder/ownerReQuote`, { return gscPost(`/evalOrder/ownerReQuote`, {
...data ...data
}) })
}, },
/** 签订买卖合同 */ /** 签订买卖合同 */
evalOrderSignContract(data) { evalOrderSignContract(data) {
return http.post(`/evalOrder/signingSaleContract`, { return gscPost(`/evalOrder/signingSaleContract`, {
...data ...data
}) })
}, },
/** 评估单取消合同 */ /** 评估单取消合同 */
evalOrderCancelContract(data) { evalOrderCancelContract(data) {
return http.post(`/evalOrder/cancelSaleContract`, { return gscPost(`/evalOrder/cancelSaleContract`, {
...data ...data
}) })
}, },
/** 评估单重新提交 */ /** 评估单重新提交 */
evalOrderConfirmVehicleDelivery(data) { evalOrderConfirmVehicleDelivery(data) {
return http.post(`/confirmVehicleDelivery/reSubmit`, { return gscPost(`/confirmVehicleDelivery/reSubmit`, {
...data ...data
}) })
}, },
/** 确认交车 */ /** 确认交车 */
confirmDelivery(data) { confirmDelivery(data) {
return http.post(`/confirmVehicleDelivery/confirmVehicleDelivery`, { return gscPost(`/confirmVehicleDelivery/confirmVehicleDelivery`, {
...data ...data
}) })
}, },
/** 支付定金 */ /** 支付定金 */
payDepositApplication(data) { payDepositApplication(data) {
return http.post(`/applyPayment/payDepositApplication`, { return gscPost(`/applyPayment/payDepositApplication`, {
...data ...data
}) })
}, },
/** 发起代保管协议签署 */ /** 发起代保管协议签署 */
signAgreement(data) { signAgreement(data) {
return http.post(`/applyPayment/payFinal`, { return gscPost(`/applyPayment/payFinal`, {
...data ...data
}) })
}, },
/** 检查代保管协议签署状态 */ /** 检查代保管协议签署状态 */
checkSignAgreement(data) { checkSignAgreement(data) {
return http.post(`/applyPayment/checkSignAgreement`, { return gscPost(`/applyPayment/checkSignAgreement`, {
...data ...data
}) })
}, },
/** 检查车辆是否存在重复评估单 */ /** 检查车辆是否存在重复评估单 */
checkRepeat(data) { checkRepeat(data) {
return http.post(`/evalOrder/checkRepeat`, { return gscPost(`/evalOrder/checkRepeat`, {
...data ...data
}) })
}, },
/** 车辆ocr识别 */ /** 车辆ocr识别 */
vinOcr(data) { vinOcr(data) {
return http.post(`/evalOrder/vinOcr`, { return gscPost(`/evalOrder/vinOcr`, {
...data ...data
}) })
}, },
/** 行驶证ocr识别 */ /** 行驶证ocr识别 */
carLicenseOcr(data) { carLicenseOcr(data) {
return http.post(`/evalOrder/carLicenseOcr`, { return gscPost(`/evalOrder/carLicenseOcr`, {
...data ...data
}) })
}, },
/** 获取合同详情 */ /** 获取合同详情 */
getContractDetail(data) { getContractDetail(data) {
return http.post(`/evalElectronicContract/getDetail`, { return gscPost(`/evalElectronicContract/getDetail`, {
...data ...data
}) })
}, },
/** 获取保管人列表 */ /** 获取保管人列表 */
getCustodyAgreementList(data) { getCustodyAgreementList(data) {
return http.post(`/custodyAgreement/custodyAgreementList`, { return gscPost(`/custodyAgreement/custodyAgreementList`, {
...data ...data
}) })
}, },
/** 新增保管人 */ /** 新增保管人 */
addCustodyAgreement(data) { addCustodyAgreement(data) {
return http.post(`/custodyAgreement/addCustodyAgreement`, { return gscPost(`/custodyAgreement/addCustodyAgreement`, {
...data ...data
}) })
}, },
/** 发送代保管人协议 */ /** 发送代保管人协议 */
sendCustodyAgreement(data) { sendCustodyAgreement(data) {
return http.post(`/custodyAgreement/sendCustodyAgreement`, { return gscPost(`/custodyAgreement/sendCustodyAgreement`, {
...data ...data
}) })
}, },
/** 销售协议预览 */ /** 销售协议预览 */
salesAgreementPreview(data) { salesAgreementPreview(data) {
return http.post(`/evalOrder/salesAgreementPreview`, { return gscPost(`/evalOrder/salesAgreementPreview`, {
...data ...data
}) })
} }
......
import http from '../request/http' import http from '../request/http'
import signHttp from '../request/signHttp' import { gscPost } from '../request/signHttp'
module.exports = { module.exports = {
/** 查询该店员工日报是否开启 */ /** 查询该店员工日报是否开启 */
staffDailyReportMerchantValid (data) { staffDailyReportMerchantValid (data) {
...@@ -41,7 +42,7 @@ module.exports = { ...@@ -41,7 +42,7 @@ module.exports = {
* 查询员工是否需要填写二手车日报 * 查询员工是否需要填写二手车日报
*/ */
checkUsedCarStaffDailyReportValid (data) { checkUsedCarStaffDailyReportValid (data) {
return signHttp.post('/carDailyReport/yesterday/check', { return gscPost('/carDailyReport/yesterday/check', {
...data ...data
}) })
}, },
......
import { add } from 'lodash' import { gscPost } from '../request/signHttp'
import http from '../request/signHttp'
module.exports = { module.exports = {
/** 二手车驻店日报列表 */ /** 二手车驻店日报列表 */
getCarDailyReportList(data) { getCarDailyReportList (data) {
return http.post('/carDailyReport/list', { return gscPost('/carDailyReport/list', {
...data ...data
}) })
}, },
/** /**
* 新增二手车驻店日报 * 新增二手车驻店日报
*/ */
addCarDailyReport(data) { addCarDailyReport (data) {
return http.post('/carDailyReport/add', { return gscPost('/carDailyReport/add', {
...data ...data
}) })
}, },
/** /**
* 二手车驻店日报详情 * 二手车驻店日报详情
*/ */
getCarDailyReportDetail(data) { getCarDailyReportDetail (data) {
return http.post('/carDailyReport/detail', { return gscPost('/carDailyReport/detail', {
...data ...data
}) })
}, },
/** /**
* 修改二手车驻店日报 * 修改二手车驻店日报
*/ */
editCarDailyReport(data) { editCarDailyReport (data) {
return http.post('/carDailyReport/edit', { return gscPost('/carDailyReport/edit', {
...data ...data
}) })
}, },
......
import { Request } from 'glsk-toolkit' import { Request } from 'glsk-toolkit'
import { signSecretKey, pathEnum, domain, djDomain, evaluationDomain, merchantDomain } from '../../env' module.exports = {
gscPost: (url, data, _config = {}) => {
const HOST = { if(!uni.$signHttp) uni.$signHttp = new Request(uni.signHttpConfig)
scrm: domain, return uni.$signHttp.post(url, data, _config)
dj: djDomain,
eva: evaluationDomain,
merchant: merchantDomain,
ip: 'http://192.168.1.169:8292'
}
const request = new Request({
baseURL: `${HOST['eva']}${pathEnum.evaluation}`,
timeout: 300000,
appId: signSecretKey.appKey,
appSecret: signSecretKey.secret,
session: {
requiresSession: true,
sessionParamName: 'sessionId',
sessionId: async () => await getSid()
},
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'code',
errId_logout_value: '21'
},
events: {
response: (responseData, config) => {
console.log('response事件触发', responseData, config)
},
timeout: 30000,
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'errId',
errId_logout_value: '21'
},
request: (request, config) => {
console.log('request事件触发', request, config)
},
error: (error, config) => {
console.log('error事件触发', error, config)
uni.hideLoading()
uni.showToast({
title: error.msg || '请求失败',
icon: 'none'
})
},
logout: config => {
console.log('logout事件触发', config)
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
uni.hideLoading()
if (currentPage.route != 'pages/common/login')
uni.reLaunch({
url: '/pages/common/login'
})
}
} }
}) }
async function getSid() {
const { sessionId } = uni.$storage?.get() || {}
console.log('sessionId3333322', sessionId)
return sessionId
}
export default request
\ No newline at end of file \ No newline at end of file
...@@ -15,7 +15,14 @@ import logger from './utils/logger' ...@@ -15,7 +15,14 @@ import logger from './utils/logger'
import { Storage } from './utils/cache/index' import { Storage } from './utils/cache/index'
import api from './api/index' import api from './api/index'
import Track from './utils/Track' import Track from './utils/Track'
import { signSecretKey, pathEnum, domain, djDomain, evaluationDomain, merchantDomain } from './env'
const HOST = {
scrm: domain,
dj: djDomain,
eva: evaluationDomain,
merchant: merchantDomain,
ip: 'http://192.168.1.169:8292'
}
uni.$api = api uni.$api = api
// uni.$lock = false // uni.$lock = false
uni.$storage = new Storage() uni.$storage = new Storage()
...@@ -26,6 +33,56 @@ uni.$logger = logger ...@@ -26,6 +33,56 @@ uni.$logger = logger
uni.$dbTempRecord = new DBRecord() uni.$dbTempRecord = new DBRecord()
uni.$dbManager = new DBManager() uni.$dbManager = new DBManager()
uni.$track = new Track() uni.$track = new Track()
uni.signHttpConfig = {
baseURL: `${HOST['eva']}${pathEnum.evaluation}`,
timeout: 300000,
appId: signSecretKey.appKey,
appSecret: signSecretKey.secret,
session: {
requiresSession: true,
sessionParamName: 'sessionId',
sessionId: _ => uni.$storage?.get('sessionId')
},
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'code',
errId_logout_value: '21'
},
events: {
response: (responseData, config) => {
console.log('response事件触发', responseData, config)
},
timeout: 30000,
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'errId',
errId_logout_value: '21'
},
request: (request, config) => {
console.log('request事件触发', request, config)
},
error: (error, config) => {
console.log('error事件触发', error, config)
return Promise.reject(error)
},
logout: config => {
console.log('logout事件触发', config)
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
uni.hideLoading()
if (currentPage.route != 'pages/common/login')
uni.reLaunch({
url: '/pages/common/login'
})
}
}
}
!(async _ => { !(async _ => {
await uni.$dbManager.init() await uni.$dbManager.init()
await uni.$dbTempRecord.init() await uni.$dbTempRecord.init()
......
<template> <template>
<view class="detail-box"> <view class="detail-box">
<view class="nav-bar"> <view class="nav-bar">
<view class="back" @click="backPage"> <view
<uni-icons type="left" :size="20" color="#000"></uni-icons> class="back"
@click="backPage"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view> </view>
<view class="title">展业工具</view> <view class="title">展业工具</view>
</view> </view>
...@@ -10,20 +17,46 @@ ...@@ -10,20 +17,46 @@
<view class="detail-left"> <view class="detail-left">
<view class="common-title">展业</view> <view class="common-title">展业</view>
<view class="content"> <view class="content">
<image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" /> <image
class="banner"
src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill"
/>
<template v-if="toolComponentName !== 'DailyReport'"> <template v-if="toolComponentName !== 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance> <Entrance @entranceClick="entranceClick"></Entrance>
</template> </template>
<template v-else> <template v-else>
<uni-calendar ref="calendar" :clearDate="false" :endDate="endDate" :showMonth="false" @monthSwitch="currentMonth = `${$event.year}-${$event.month}`" @change="currentDate = $event.fulldate" backgroundColor="transparent" :selected="selectedDays" :date="currentDate" /> <uni-calendar
ref="calendar"
:clearDate="false"
:endDate="endDate"
:showMonth="false"
@monthSwitch="currentMonth = `${$event.year}-${$event.month}`"
@change="currentDate = $event.fulldate"
backgroundColor="transparent"
:selected="selectedDays"
:date="currentDate"
/>
</template> </template>
</view> </view>
</view> </view>
<view class="detail-right"> <view class="detail-right">
<component :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" @setCalendarSelected="selectedDays = $event" /> <component
:is="toolComponentName"
@jump="jump"
:transmission-of-data="transmissionOfData"
:currentDate="currentDate"
:currentMonth="currentMonth"
@setCalendarSelected="selectedDays = $event"
/>
</view> </view>
</view> </view>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup> <NoticePopup
ref="notice"
title="重要提示"
text="当前页面暂未保存,是否确认退出"
type="warning"
></NoticePopup>
</view> </view>
</template> </template>
...@@ -53,7 +86,7 @@ export default { ...@@ -53,7 +86,7 @@ export default {
UploadProofOfPayment, UploadProofOfPayment,
OrderDetail OrderDetail
}, },
data() { data () {
return { return {
toolComponentName: '', toolComponentName: '',
transmissionOfData: null, transmissionOfData: null,
...@@ -63,16 +96,20 @@ export default { ...@@ -63,16 +96,20 @@ export default {
selectedDays: [] selectedDays: []
} }
}, },
onLoad(options) { onLoad (options) {
if (options.componentName) this.toolComponentName = options.componentName if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.currentDate = options.currentDate if (options.currentDate) this.setCurrentDate(options.currentDate)
uni.$on('jumpToDailyReport', currentDate => { uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport' this.toolComponentName = 'DailyReport'
if (currentDate) this.currentDate = currentDate if (currentDate) this.setCurrentDate(currentDate)
}) })
}, },
methods: { methods: {
async entranceClick(item) { setCurrentDate (currentDate) {
this.currentDate = currentDate
this.currentMonth = dayjs(currentDate).format('YYYY-MM')
},
async entranceClick (item) {
const noInterceptPage = ['DailyReport'] const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
// 保存当前选择的组件信息,但不立即切换 // 保存当前选择的组件信息,但不立即切换
...@@ -116,11 +153,11 @@ export default { ...@@ -116,11 +153,11 @@ export default {
// 打开弹窗 // 打开弹窗
this.$refs.notice.open() this.$refs.notice.open()
}, },
backPage() { backPage () {
uni.navigateBack() uni.navigateBack()
}, },
// name:跳转组件名,val:跳转参数 // name:跳转组件名,val:跳转参数
jump(name, val) { jump (name, val) {
this.toolComponentName = name this.toolComponentName = name
console.log(this.toolComponentName, val) console.log(this.toolComponentName, val)
if (val) { if (val) {
......
...@@ -96,6 +96,15 @@ ...@@ -96,6 +96,15 @@
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
const phoneRex = /^[1]([3-9])[0-9]{9}$/; const phoneRex = /^[1]([3-9])[0-9]{9}$/;
import { Request } from 'glsk-toolkit'
import { signSecretKey, pathEnum, domain, djDomain, evaluationDomain, merchantDomain } from '@/env'
const HOST = {
scrm: domain,
dj: djDomain,
eva: evaluationDomain,
merchant: merchantDomain,
ip: 'http://192.168.1.169:8292'
}
export default { export default {
data () { data () {
return { return {
...@@ -127,6 +136,8 @@ export default { ...@@ -127,6 +136,8 @@ export default {
} }
}, },
onLoad (options) { onLoad (options) {
console.log(HOST, '===')
this.setToolkitConfig()
if (options.mobile) this.mobile = options.mobile if (options.mobile) this.mobile = options.mobile
const noSignInUuid = uni.$storage.get('noSignInUuid') const noSignInUuid = uni.$storage.get('noSignInUuid')
if (noSignInUuid) this.autoLogin(noSignInUuid) if (noSignInUuid) this.autoLogin(noSignInUuid)
...@@ -275,7 +286,58 @@ export default { ...@@ -275,7 +286,58 @@ export default {
this[key] = numbers ? numbers.join('') : '' this[key] = numbers ? numbers.join('') : ''
this.dateKey[key] = Date.now() this.dateKey[key] = Date.now()
}, 0) }, 0)
} },
setToolkitConfig () {
uni.$signHttp = new Request({
baseURL: `${HOST['eva']}${pathEnum.evaluation}`,
timeout: 300000,
appId: signSecretKey.appKey,
appSecret: signSecretKey.secret,
session: {
requiresSession: true,
sessionParamName: 'sessionId',
sessionId: _ => uni.$storage?.get('sessionId')
},
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'code',
errId_logout_value: '21'
},
events: {
response: (responseData, config) => {
console.log('response事件触发', responseData, config)
},
timeout: 30000,
response: {
code_key: 'code',
code_success_value: '0',
data_key: 'data',
errId: 'errId',
errId_logout_value: '21'
},
request: (request, config) => {
console.log('request事件触发', request, config)
},
error: (error, config) => {
console.log('error事件触发', error, config)
return Promise.reject(error)
},
logout: config => {
console.log('logout事件触发', config)
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
uni.hideLoading()
if (currentPage.route != 'pages/common/login')
uni.reLaunch({
url: '/pages/common/login'
})
}
}
})
console.log(uni.$signHttp)
},
}, },
}; };
</script> </script>
......
...@@ -88,10 +88,10 @@ export default { ...@@ -88,10 +88,10 @@ export default {
}, },
onLoad (options) { onLoad (options) {
if (options.componentName) this.toolComponentName = options.componentName if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.currentDate = options.currentDate if (options.currentDate) this.setCurrentDate(options.currentDate)
uni.$on('jumpToDailyReport', currentDate => { uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport' this.toolComponentName = 'DailyReport'
if (currentDate) this.currentDate = currentDate if (currentDate) this.setCurrentDate(currentDate)
}) })
}, },
onBackPress (options) { onBackPress (options) {
...@@ -105,6 +105,10 @@ export default { ...@@ -105,6 +105,10 @@ export default {
return false return false
}, },
methods: { methods: {
setCurrentDate (currentDate) {
this.currentDate = currentDate
this.currentMonth = dayjs(currentDate).format('YYYY-MM')
},
async entranceClick (item) { async entranceClick (item) {
const noInterceptPage = ['DailyReport'] const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
......
...@@ -43,5 +43,6 @@ export const STORAGE_OBJECTKEY = { ...@@ -43,5 +43,6 @@ export const STORAGE_OBJECTKEY = {
noticeTopInfo: 'noticeTopInfo', noticeTopInfo: 'noticeTopInfo',
studyCenterPermission: 'studyCenterPermission', studyCenterPermission: 'studyCenterPermission',
caseInfo: 'caseInfo', caseInfo: 'caseInfo',
boutique_YQorderSetting: 'boutique_YQorderSetting' boutique_YQorderSetting: 'boutique_YQorderSetting',
sessionId:'sessionId'
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!