| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- export default {
- /** 请求 */
- request: {
- /** 前置通知 */
- BA: {},
- /** 后置通知 */
- AR: {
- truckInfo(res: 司机车辆管理信息) {
- const rv = [...res.personTruckList]
- if (res.truckId) {
- rv.push({
- carNumber: res.carNumber,
- /** 物流公司id */
- orgId: res.orgId,
- /** 物流公司名称 */
- orgName: res.orgName,
- })
- }
- return rv as PersonDriver对象[]
- },
- getAccountInfo(res: 司机账户余额信息): IAccountInfo {
- const accountInfo: IAccountInfo = {
- ...res,
- showBalance: { balance: '', suffix: '' },
- unit: '暂无余额',
- showDet: false,
- }
- accountInfo.orgName = func.convert.nullView(accountInfo.orgName)
- accountInfo.carNumber = func.convert.nullView(accountInfo.carNumber)
- if (res.orgId) {
- accountInfo.unit = '元'
- if (res.autoAccount === 1 && res.flag === 1) {
- accountInfo.showBalance.balance = `> ${res.limitAmount}`
- } else {
- accountInfo.showDet = true
- // accountInfo.showBalance.balance = res.totalBalance.toString()
- }
- // if (accountInfo.showBalance.balance.includes('.')) {
- // const balanceArr = accountInfo.showBalance.balance.split('.')
- // accountInfo.showBalance.balance = balanceArr[0]
- // accountInfo.showBalance.suffix = '.' + balanceArr[1]
- // }
- }
- return accountInfo
- },
- },
- /** 异常通知 */
- AT: {
- common({ args, res }) {
- // console.log(args,res)
- },
- },
- /** 最终通知 */
- AF: {},
- /** 环绕通知 */
- AA: {},
- },
- }
|