Commit 7d2a8a90 by huangqy

提交

parent 0a8145d0
......@@ -22,6 +22,12 @@ require('../../node_modules/mini-ali-ui/es/flex/flex-item/index?hash=7da53690ff0
require('../../node_modules/mini-ali-ui/es/input-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/picker-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/multi-liner/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Icon/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/ImageIcon/index?hash=0ac898e91e50ea3432832138fbd892a389791f2b');
require('../../node_modules/antd-mini/es/List/ListItem/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Popup/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Picker/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/DatePicker/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tag/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/card/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/steps/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -32,6 +38,8 @@ require('../../node_modules/mini-ali-ui/es/popup/index?hash=7da53690ff015fafc40e
require('../../node_modules/mini-ali-ui/es/modal/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tips/tips-dialog/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/am-checkbox/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/avatar/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/am-radio/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/index/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/dashboard/dashboard?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/my/my?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -51,3 +59,5 @@ require('../../pages/myApply/myApply?hash=7da53690ff015fafc40ebbe2de99bf33c6f02a
require('../../pages/orderFinish/orderFinish?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysOrder/sysOrder?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/editUser/editUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/selectDepart/selectDepart?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/bindUser/bindUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -53,6 +53,12 @@ require('../../node_modules/mini-ali-ui/es/flex/flex-item/index?hash=7da53690ff0
require('../../node_modules/mini-ali-ui/es/input-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/picker-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/multi-liner/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Icon/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/ImageIcon/index?hash=0ac898e91e50ea3432832138fbd892a389791f2b');
require('../../node_modules/antd-mini/es/List/ListItem/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Popup/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Picker/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/DatePicker/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tag/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/card/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/steps/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -63,6 +69,8 @@ require('../../node_modules/mini-ali-ui/es/popup/index?hash=7da53690ff015fafc40e
require('../../node_modules/mini-ali-ui/es/modal/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tips/tips-dialog/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/am-checkbox/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/avatar/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/am-radio/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/index/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/dashboard/dashboard?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/my/my?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -82,6 +90,8 @@ require('../../pages/myApply/myApply?hash=7da53690ff015fafc40ebbe2de99bf33c6f02a
require('../../pages/orderFinish/orderFinish?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysOrder/sysOrder?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/editUser/editUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/selectDepart/selectDepart?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/bindUser/bindUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
}
self.bootstrapApp ? self.bootstrapApp({ success }) : success();
}
\ No newline at end of file
......@@ -22,6 +22,12 @@ require('../../node_modules/mini-ali-ui/es/flex/flex-item/index?hash=7da53690ff0
require('../../node_modules/mini-ali-ui/es/input-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/picker-item/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/multi-liner/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Icon/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/ImageIcon/index?hash=0ac898e91e50ea3432832138fbd892a389791f2b');
require('../../node_modules/antd-mini/es/List/ListItem/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Popup/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/Picker/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/antd-mini/es/DatePicker/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tag/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/card/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/steps/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -32,6 +38,8 @@ require('../../node_modules/mini-ali-ui/es/popup/index?hash=7da53690ff015fafc40e
require('../../node_modules/mini-ali-ui/es/modal/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/tips/tips-dialog/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/am-checkbox/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/avatar/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../node_modules/mini-ali-ui/es/am-radio/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/index/index?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/dashboard/dashboard?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/my/my?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -51,3 +59,5 @@ require('../../pages/myApply/myApply?hash=7da53690ff015fafc40ebbe2de99bf33c6f02a
require('../../pages/orderFinish/orderFinish?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/sysOrder/sysOrder?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/editUser/editUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/selectDepart/selectDepart?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
require('../../pages/bindUser/bindUser?hash=7da53690ff015fafc40ebbe2de99bf33c6f02acd');
......@@ -3,7 +3,7 @@
}
.page-submit {
position: fixed;
bottom: 10rpx;
bottom: 30rpx;
width: 100%;
}
......
......@@ -18,7 +18,7 @@ App({
globalData: {
// 域名,用于发送请求
host: 'http://122.112.148.157:7081',
service: 'http://122.112.148.157:7080',
service: 'https://122.112.148.157:7085',
userInfo : {}
},
onLaunch(options) {
......
......@@ -18,7 +18,9 @@
"pages/myApply/myApply",
"pages/orderFinish/orderFinish",
"pages/sysOrder/sysOrder",
"pages/editUser/editUser"
"pages/editUser/editUser",
"pages/selectDepart/selectDepart",
"pages/bindUser/bindUser"
],
"window": {
"defaultTitle": "智能车辆钥匙管理小程序",
......
{
"dependencies": {
"antd-mini": "^0.0.8",
"antd-mini": "^2.12.2",
"dingtalk-design-libs": "^0.0.24",
"gdt-jsapi": "^1.9.39",
"mini-ali-ui": "^1.4.1"
......
import http from '../../src/http';
import util from '../../src/libs/util';
import queue from '../../src/common/zzdmd'
Page({
data: {
id: ''
......@@ -12,7 +14,11 @@ Page({
carType: query.carType
})
}
},
},
onShow() {
// 页面显示
queue('addCar','添加车辆',"pages/addCar/addCar")
},
onClear(e) {
this.setData({
[e.target.dataset.field]: ''
......
{
"defaultTitle": "车辆操作",
"defaultTitle": "车辆操作",
"titleBarColor": "#fff",
"usingComponents": {
"input-item": "mini-ali-ui/es/input-item/index",
"picker-item": "mini-ali-ui/es/picker-item/index",
......
......@@ -19,24 +19,59 @@
name="isPolice"
onPickerTap="isPoliceCarPickerChange">车辆类型</picker-item>
<picker-item
data-field="reason"
placeholder="请选择"
value="{{reason}}"
layer="vertical"
name="reason"
onPickerTap="reasonPickerChange">任务类型</picker-item>
<input-item data-field="destination" placeholder="请输入" value="{{destination}}" layer="vertical" name="destination" clear="{{true}}" onClear="onClear">任务地点</input-item>
<picker-item data-field="start_time" placeholder="请选择" value="{{start_time}}" layer="vertical" name="start_time" onPickerTap="dateStartPicker">开始用车时间</picker-item>
<picker-item
data-field="reason"
placeholder="请选择"
value="{{reason}}"
layer="vertical"
name="reason"
onPickerTap="reasonPickerChange">任务类型</picker-item>
<input-item data-field="destination" placeholder="请输入" value="{{destination}}" layer="vertical" name="destination" clear="{{true}}" onClear="onClear">任务地点</input-item>
<input-item
data-field="start_time"
value="{{start_time}}"
layer="vertical"
name="start_time"
disabled='true'
placeholder="请选择">
开始用车时间
<date-picker
slot="extra"
placeholder="请选择开始用车时间"
precision="minute"
format="YYYY-MM-DD HH:mm"
onOk="handleStartOk"/>
</input-item>
<input-item
data-field="end_time"
value="{{end_time}}"
layer="vertical"
name="end_time"
disabled='true'
placeholder="请选择">
用车结束时间
<date-picker
slot="extra"
placeholder="请选择用车结束时间"
precision="minute"
format="YYYY-MM-DD HH:mm"
onOk="handleEndOk"/>
</input-item>
<!-- <picker-item
data-field="end_time"
placeholder="请选择"
value="{{end_time}}"
layer="vertical"
name="end_time"
onPickerTap="dateEndPicker">用车结束时间</picker-item>
<input-item data-field="timeNumber" value="{{timeNumber}}" layer="vertical" name="timeNumber" disabled='true'>时长</input-item>
onPickerTap="dateEndPicker">用车结束时间</picker-item> -->
<input-item data-field="timeNumber" value="{{timeNumber}}" layer="vertical" name="timeNumber" disabled='true'>时长(小时)</input-item>
<view class="page-submit">
<button type="primary" formType="submit" class="submit-btn">提交</button>
......
import http from '../../src/http';
import util from '../../src/libs/util';
import dd from 'gdt-jsapi';
import queue from '../../src/common/zzdmd'
Page({
data: {
......@@ -25,6 +26,10 @@ Page({
onLoad() {
this.getBorrowCode()
},
onShow() {
// 页面显示
queue('applyBorrowCar','申请借车',"pages/applyBorrowCar/applyBorrowCar")
},
getBorrowCode(){
http.get('/jeecg/sys/fillRule/testFillRule', {ruleCode: 'shop_order_num'}).then(res => {
if (res.success) {
......@@ -42,39 +47,53 @@ Page({
[e.target.dataset.field]: ''
});
},
dateStartPicker() {
const _this = this
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
success: (res) => {
this.setData({
start_time: res.date,
timeNumber: (_this.data.end_time && res.date) ? _this.getIntervalHour(res.date, _this.data.end_time) : 0
})
}
handleStartOk(date, format, e) {
this.setData({
start_time: format,
timeNumber: (this.data.end_time && format) ? this.getIntervalHour(format, this.data.end_time) : 0
})
},
dateEndPicker() {
const _this = this
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
success: (res) => {
this.setData({
end_time: res.date,
timeNumber: (_this.data.start_time && res.date) ? _this.getIntervalHour(_this.data.start_time, res.date) : 0
})
}
handleEndOk(date, format, e) {
this.setData({
end_time: format,
timeNumber: (this.data.start_time && format) ? this.getIntervalHour(this.data.start_time, format) : 0
})
},
// dateStartPicker() {
// const _this = this
// my.datePicker({
// format: 'yyyy-MM-dd HH:mm:ss',
// success: (res) => {
// this.setData({
// start_time: res.date,
// // timeNumber: (_this.data.end_time && res.date) ? _this.getIntervalHour(res.date, _this.data.end_time) : 0
// })
// },
// fail: (err) => {
// console.log(err);
// },
// })
// },
// dateEndPicker() {
// const _this = this
// my.datePicker({
// format: 'yyyy/MM/dd HH:mm:ss',
// success: (res) => {
// this.setData({
// end_time: res.date,
// // timeNumber: (_this.data.start_time && res.date) ? _this.getIntervalHour(_this.data.start_time, res.date) : 0
// })
// }
// })
// },
getIntervalHour(dt1,dt2) {
if(typeof(dt1)=="string") {
dt1=new Date(dt1.replace(/-/,'/'));
dt2=new Date(dt2.replace(/-/,'/'));
}
var res = dt2-dt1;
if(isNaN(res))
throw Error("invalid dates arguments");
return Math.trunc(res/(1000*60*60));
var ds1 = new Date(dt1.replace(/-/g, '/'))
var ds2 = new Date(dt2.replace(/-/g, '/'))
// 计算两个日期之间的毫秒差
const msDifference = ds2 - ds1;
// 将毫秒差转换为小时
const intervalHours = Math.round(msDifference / (1000 * 60 * 60));
return intervalHours;
},
carTypePickerChange() {
my.showActionSheet({
......
{
"defaultTitle": "用车申请",
"defaultTitle": "用车申请",
"titleBarColor": "#fff",
"usingComponents": {
"input-item": "mini-ali-ui/es/input-item/index",
"picker-item": "mini-ali-ui/es/picker-item/index",
"multi-liner": "mini-ali-ui/es/multi-liner/index"
"multi-liner": "mini-ali-ui/es/multi-liner/index",
"list-item": "antd-mini/es/List/ListItem/index",
"date-picker": "antd-mini/es/DatePicker/index"
},
"allowsBounceVertical": "NO"
}
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 94vh;" onScrollToLower="onScrollToLower">
<search-bar value="{{searchValue}}" focus="{{false}}" maxLength="{{20}}" showVoice="{{false}}" placeholder="搜索" onInput="handleInput"
onClear="handleClear"
showCancelButton="{{false}}" />
<page-result
type="empty"
brief ="当前并无用户数据"
local="{{false}}" a:if='{{userList.length === 0}}'/>
<view a:for="{{userList}}" a:else>
<list-item
thumb="../../src/assets/police.png"
upperSubtitle="{{item.roleCodeTxt}}"
lowerSubtitle="{{item.departIds_dictText}}"
onClick="onCheckClick"
data-info="{{item}}">
{{item.realname}}
<tag type="success" size="sm" slot="afterTitle">{{ item.username }}</tag>
<am-radio slot="extra" checked="{{item.checked}}"/>
</view>
<view class="page-submit">
<button type="primary" onTap="back" class="submit-btn">返回</button>
</view>
</scroll-view>
\ No newline at end of file
import http from '../../src/http/index'
import util from '../../src/libs/util'
import dd from 'gdt-jsapi';
import queue from '../../src/common/zzdmd'
Page({
data: {
pageNo: 1,
pageSize: 10,
searchValue: '',
userList: [],
timeId: 0
},
onLoad(query) {
console.log(query)
this.setData({
userId: getApp().globalData.userInfo.userId,
equipment_id: query.equipment_id,
userIds: query.userIds
})
this.getUserList()
},
onShow() {
// 页面显示
queue('sysUser','用户管理',"pages/sysUser/sysUser")
},
handleInput(value) {
this.setData({
searchValue: value,
});
clearTimeout(this.data.timeId) //清除定时器
this.data.timeId = setTimeout(()=>{
this.getUserList() //发送请求,间隔时间为1s
},1000)
},
handleClear() {
this.setData({
searchValue: '',
});
this.getUserList()
},
onCheckClick(e) {
let user = e.target.dataset.info
let index = this.data.userList.findIndex(i => i.id == user.id)
this.setData({
[`userList[${index}].checked`]: !user.checked
})
if(user.checked) {
this.setData({
userIds: this.data.userIds.split(',').filter(i => i != user.id).toString()
})
}
let arr1 = this.data.userList.filter(i => i.checked === true).map(j => j.id)
let arr2 = this.data.userIds.split(',')
if (arr2[0] != '') {
arr1 = [...arr1, ...arr2]
}
let users = Array.from(new Set(arr1)).toString()
http.post(getApp().globalData.service + '/api/T_Borrow/SetCarBindUser', {equipment_id: this.data.equipment_id, users: users}).then(res => {
if (res.Success) {
util.ddToast({ type: 'success', text: res.Message })
} else {
util.ddToast({ type: 'fail', text: res.Message })
}
})
},
getUserList() {
let params = {
pageNo: this.data.pageNo,
pageSize: this.data.pageSize,
realname: "*" + this.data.searchValue + "*"
}
http.get('/jeecg/sys/user/list', params).then(res => {
if (res.success) {
this.setData({
userList: res.result.records
})
this.data.userIds.split(',').forEach(element => {
let index = this.data.userList.findIndex(i => i.id == element)
this.setData({
[`userList[${index}].checked`]: true
})
});
} else {
util.ddToast({ type: 'fail', text: res.message })
}
})
},
onPullDownRefresh() {
this.setData({
pageSize: 10
})
this.getUserList()
setTimeout(() => {
dd.stopPullDownRefresh();
}, 100);
},
onScrollToLower(e) {
const _this = this
_this.setData({
pageSize: _this.data.pageSize + 8
})
this.getUserList();
},
editUser(e) {
let user = e.target.targetDataset.info
dd.redirectTo({
url: '../editUser/editUser?id=' + user.id + '&username=' + user.username + '&realname=' + user.realname +'&deptName=' + user.departIds_dictText
})
},
back() {
dd.redirectTo({
url: '../sysCar/sysCar'
})
}
});
{
"defaultTitle": "专车人员绑定",
"titleBarColor": "#fff",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"search-bar": "mini-ali-ui/es/search-bar/index",
"avatar": "antd-mini/es/Avatar/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"modal": "mini-ali-ui/es/modal/index",
"tag": "mini-ali-ui/es/tag/index",
"am-radio": "mini-ali-ui/es/am-radio/index"
}
}
......@@ -17,7 +17,7 @@
<view class="select">
<view class="box" a:for="{{select}}" a:key="{{index}}" data-index="{{index}}" onTap="skipSelect">
<view class="name">{{item.title}}</view>
<image class="row-arrow" src="http://122.112.148.157:5000/updateImg/箭头下.png" mode="aspectFill"></image>
<image class="row-arrow" src="../../src/assets/down.png" mode="aspectFill"></image>
</view>
</view>
<view class="filter-line" />
......
import http from '../../src/http'
import util from '../../src/libs/util';
import queue from '../../src/common/zzdmd'
Page({
data: {
pageNo: 1,
......@@ -17,6 +18,10 @@ Page({
onLoad() {
this.getTjList()
},
onShow() {
// 页面显示
queue('carTj','车辆统计',"pages/carTj/carTj")
},
getTjList() {
let data = {
tenant_id: getApp().globalData.tenantId,
......@@ -75,7 +80,6 @@ Page({
},
dateStartPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始出车时间',
success: (res) => {
this.setData({
......@@ -86,7 +90,6 @@ Page({
},
dateEndPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始结束时间',
success: (res) => {
this.setData({
......
{
"defaultTitle": "用车统计",
"titleBarColor": "#fff",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"list": "mini-ali-ui/es/list/index",
......
......@@ -22,7 +22,7 @@
<view class="select">
<view class="box" a:for="{{select}}" a:key="{{index}}" data-index="{{index}}" onTap="skipSelect">
<view class="name">{{item.title}}</view>
<image class="row-arrow" src="http://122.112.148.157:5000/updateImg/箭头下.png" mode="aspectFill"></image>
<image class="row-arrow" src="../../src/assets/down.png" mode="aspectFill"></image>
</view>
</view>
<view class="filter-line" />
......@@ -33,7 +33,7 @@
<view a:else>
<block a:for="{{logList}}">
<list-item
thumb="http://122.112.148.157:5000/updateImg/汽车.png"
thumb="../../src/assets/carL.png"
index="{{index}}"
arrow="{{false}}"
upperSubtitle="{{item.outInTime}}"
......
import http from '../../src/http'
import util from '../../src/libs/util';
import queue from '../../src/common/zzdmd'
Page({
data: {
pageNo: 1,
......@@ -20,6 +21,10 @@ Page({
this.getLogList()
this.getCarList()
},
onShow() {
// 页面显示
queue('carUseLog','车辆使用日志',"pages/carUseLog/carUseLog")
},
getLogList() {
let data = {
pageNo: this.data.pageNo,
......@@ -100,7 +105,6 @@ Page({
},
dateStartPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始出车时间',
success: (res) => {
this.setData({
......@@ -111,7 +115,6 @@ Page({
},
dateEndPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始结束时间',
success: (res) => {
this.setData({
......
{
"defaultTitle": "用车记录",
"titleBarColor": "#fff",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"list": "mini-ali-ui/es/list/index",
......
<view>
<view class="page-center">
<search-bar value="{{searchValue}}" focus="{{true}}" maxLength="{{20}}" showVoice="{{false}}" placeholder="搜索" onInput="handleInput"
onSubmit="searchSubmit"
onClear="handleClear"
showCancelButton="{{false}}" />
<picker-view value="{{value}}" onChange="onChange" class="my-picker">
......
......@@ -11,6 +11,7 @@ Page({
departList: [],
value: [0],
searchValue: '',
timeId: 0
},
onLoad(query) {
// 页面加载
......@@ -18,7 +19,7 @@ Page({
},
initDepart() {
const _this = this
http.get(this.data.url.getDepart).then(res => {
http.get(this.data.url.getDepart, {departName: this.data.searchValue}).then(res => {
if (res.success) {
_this.setData({
departList: res.result
......@@ -28,22 +29,20 @@ Page({
}
})
},
searchSubmit() {
let departName = fuzzyQuery(this.data.departList.map(i => i.departName), this.data.searchValue)[0]
let index = this.data.departList.findIndex(i => i.departName === departName)
this.setData({
value: [index]
})
},
handleInput(value) {
this.setData({
searchValue: value,
});
clearTimeout(this.data.timeId) //清除定时器
this.data.timeId = setTimeout(()=>{
this.initDepart() //发送请求,间隔时间为1s
},1000)
},
handleClear() {
this.setData({
searchValue: '',
});
this.initDepart()
},
onChange(e) {
this.setData({
......
......@@ -50,16 +50,19 @@ Page({
})
},
deptPickerChange() {
my.showActionSheet({
title: '选择用户部门',
items: this.data.deptList.map(i => i.departName),
cancelButtonText: '取消',
success: (res) => {
this.setData({
deptName: this.data.deptList.map(i => i.departName)[res.index]
});
},
});
dd.redirectTo({
url: '../selectDepart/selectDepart?id=' + this.data.id + '&username=' + this.data.username + '&realname=' + this.data.realname
})
// my.showActionSheet({
// title: '选择用户部门',
// items: this.data.deptList.map(i => i.departName),
// cancelButtonText: '取消',
// success: (res) => {
// this.setData({
// deptName: this.data.deptList.map(i => i.departName)[res.index]
// });
// },
// });
},
onChange(e) {
const { id } = e.currentTarget.dataset;
......@@ -78,7 +81,7 @@ Page({
let formData = {}
formData = e.detail.value
formData.id = this.data.id
formData.selecteddeparts = this.data.deptList.find(i => i.departName == this.data.deptName ).id
formData.selecteddeparts = this.data.deptList.find(i => i.departName == this.data.deptName).id
formData.selectedroles = this.data.roleList.filter(i => i.ctrlChecked).map(j => j.id).join(',')
http.post(getApp().globalData.host + '/jeecg/sys/user/edit', formData).then(res => {
if(res.success) {
......
{
"defaultTitle": "人员编辑",
"defaultTitle": "人员编辑",
"titleBarColor": "#fff",
"usingComponents": {
"list": "mini-ali-ui/es/list/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
......
......@@ -9,7 +9,9 @@
arrow="{{false}}"
last="{{index === (carList.length - 1)}}"
class="row-content"
key="{{index}}">
key="{{index}}"
data-info="{{item}}"
onClick="toOrderDetail">
{{item.pname}}-{{item.name}}
<view
slot="extra" class="row-extra">
......
......@@ -27,4 +27,12 @@ Page({
dd.stopPullDownRefresh();
}, 100);
},
toOrderDetail(e) {
let borrowId = e.target.dataset.info.borrowId
if (borrowId) {
dd.navigateTo({
url: '../orderDetail/orderDetail?id=' + borrowId
})
}
}
});
{
"defaultTitle": "钥匙监控",
"defaultTitle": "钥匙监控",
"titleBarColor": "#fff",
"usingComponents": {
"list": "mini-ali-ui/es/list/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
......
......@@ -22,4 +22,7 @@
</block>
</list>
</view>
<view style="position: absolute;bottom: 5px;margin: auto;width: 100%;text-align: center;">
V1.0.6
</view>
</view>
\ No newline at end of file
import { JY_MENU_QUERY, SHY_MENU_QUERY, SYS_MENU_QUERY, BMD_MENU_QUERY } from '../../src/common/constant';
import dd from 'gdt-jsapi';
import queue from '../../src/common/zzdmd'
Page({
data: {
radius: true,
......@@ -66,4 +67,8 @@ Page({
menuList: result
});
},
onShow() {
// 页面显示
queue('my','我的',"pages/my/my")
},
});
{
"defaultTitle": "我的",
"defaultTitle": "我的",
"titleBarColor": "#fff",
"component": false,
"usingComponents": {
"list": "mini-ali-ui/es/list/index",
......
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 100vh;" onScrollToLower="onScrollToLower">
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 94vh;" onScrollToLower="onScrollToLower">
<view>
<picker onChange="bindObjPickerChange" value="{{arrIndex}}" range="{{stateObjectArray}}" range-key="name">
<view class="row">
......
import http from '../../src/http'
import util from '../../src/libs/util';
import dd from 'gdt-jsapi';
import queue from '../../src/common/zzdmd'
Page({
data: {
stateObjectArray: [
......@@ -46,6 +46,10 @@ Page({
}
this.getOrderList()
},
onShow() {
// 页面显示
queue('myApply','我的申请',"pages/myApply/myApply")
},
getOrderList() {
let state = this.data.stateObjectArray[this.data.arrIndex].id
let data = {
......
{
"defaultTitle": "我的申请",
"titleBarColor": "#fff",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"tabs": "mini-ali-ui/es/tabs/index",
......
import http from '../../src/http'
import util from '../../src/libs/util';
import dd from 'gdt-jsapi';
import queue from '../../src/common/zzdmd'
Page({
data: {
orderInfo: {},
......@@ -23,6 +23,10 @@ Page({
this.getDetail(query.id)
}
},
onShow() {
// 页面显示
queue('orderDetail','订单明细',"pages/orderDetail/orderDetail")
},
getDetail(id) {
this.getById(id)
},
......
{
"defaultTitle": "订单详情",
"defaultTitle": "订单详情",
"titleBarColor": "#fff",
"usingComponents": {
"button": "mini-ali-ui/es/button/index",
"title": "mini-ali-ui/es/title/index",
......
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 100vh;" onScrollToLower="onScrollToLower">
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 94vh;" onScrollToLower="onScrollToLower">
<view>
<picker onChange="bindObjPickerChange" value="{{arrIndex}}" range="{{stateObjectArray}}" range-key="name">
<view class="row">
......
{
"defaultTitle": "已审批",
"titleBarColor": "#fff",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"tabs": "mini-ali-ui/es/tabs/index",
......
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 100vh;" onScrollToLower="onScrollToLower">
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 94vh;" onScrollToLower="onScrollToLower">
<page-result
type="empty"
brief ="当前并无订单数据"
......
{
"defaultTitle": "待审批",
"titleBarColor": "#fff",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"tabs": "mini-ali-ui/es/tabs/index",
......
.page-center {
position:absolute;
left: 18%;
top: 18%;
}
/* .my-picker {
background: #EFEFF4;
} */
.submit-btn {
margin-top: 50rpx;
}
\ No newline at end of file
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 94vh;" onScrollToLower="onScrollToLower">
<search-bar value="{{searchValue}}" focus="{{true}}" maxLength="{{20}}" showVoice="{{false}}" placeholder="搜索" onInput="handleInput"
onClear="handleClear"
showCancelButton="{{false}}" />
<page-result
type="empty"
brief ="当前并无部门数据"
local="{{false}}" a:if='{{carList.length === 0}}'/>
<view a:for="{{departList}}" a:else>
<list-item
arrow="{{false}}"
onClick="onItemClick"
data-info="{{item}}">
{{item.departName}}
</list-item>
</view>
</scroll-view>
\ No newline at end of file
import http from '../../src/http/index'
import util from '../../src/libs/util'
import dd from 'gdt-jsapi';
Page({
data: {
pageNo: 1,
pageSize: 10,
url: {
getDepart: '/jeecg/sys/sysDepart/listAll'
},
searchValue: '',
timeId: 0
},
onLoad(query) {
if (query.id) {
this.setData({
id: query.id,
username: query.username,
realname: query.realname,
})
}
this.initDepart()
},
handleInput(value) {
this.setData({
searchValue: value,
});
clearTimeout(this.data.timeId) //清除定时器
this.data.timeId = setTimeout(()=>{
this.initDepart() //发送请求,间隔时间为1s
},1000)
},
handleClear() {
this.setData({
searchValue: '',
});
this.initDepart()
},
initDepart() {
const _this = this
http.get(this.data.url.getDepart, {departName: this.data.searchValue}).then(res => {
if (res.success) {
_this.setData({
departList: res.result
})
} else {
util.ddToast({ type: 'fail', text: res.message })
}
})
},
onItemClick(e) {
let info = e.target.dataset.info
dd.redirectTo({
url: '../editUser/editUser?deptName=' + info.departName + '&id=' +this.data.id + '&username=' + this.data.username + '&realname=' + this.data.realname
})
},
});
{
"defaultTitle": "选择部门",
"titleBarColor": "#fff",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"search-bar": "mini-ali-ui/es/search-bar/index",
"list-item": "mini-ali-ui/es/list/list-item/index",
"modal": "mini-ali-ui/es/modal/index",
"avatar": "mini-ali-ui/es/avatar/index"
}
}
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 90vh;" onScrollToLower="onScrollToLower">
<search-bar value="{{searchValue}}" focus="{{true}}" maxLength="{{20}}" showVoice="{{false}}" placeholder="搜索" onInput="handleInput"
onSubmit="searchSubmit"
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 94vh;" onScrollToLower="onScrollToLower">
<search-bar value="{{searchValue}}" focus="{{false}}" maxLength="{{20}}" showVoice="{{false}}" placeholder="搜索" onInput="handleInput"
onClear="handleClear"
showCancelButton="{{false}}" />
<page-result
......@@ -9,14 +8,15 @@
local="{{false}}" a:if='{{carList.length === 0}}'/>
<view a:for="{{carList}}" a:else>
<list-item
thumb="http://122.112.148.157:5000/updateImg/汽车.png"
thumb="../../src/assets/carL.png"
upperSubtitle="{{item.name}}"
lowerSubtitle="{{item.policeCar === 0 ? '警车' : '非警车'}}">
lowerSubtitle="{{item.policeCar === 0 ? '警车' : '非警车'}}"
onClick="toBindUser"
data-info="{{item}}">
{{item.carNumber}}
<view slot="extra">
{{item.boxName}}
{{item.users.length > 0 ? item.nameStr : '公共用车'}}
</view>
<!-- <avatar name="{{item.carNumber}}" desc="{{item.carType}}" src="http://122.112.148.157:5000/updateImg/汽车.png" /> -->
</list-item>
</view>
</scroll-view>
\ No newline at end of file
import http from '../../src/http/index'
import util from '../../src/libs/util'
import dd from 'gdt-jsapi';
import queue from '../../src/common/zzdmd'
Page({
data: {
pageNo: 1,
pageSize: 10,
searchValue: ''
searchValue: '',
timeId: 0
},
onLoad() {
this.setData({
......@@ -14,10 +16,18 @@ Page({
})
this.getCarList()
},
onShow() {
// 页面显示
queue('sysCar','车辆管理',"pages/sysCar/sysCar")
},
handleInput(value) {
this.setData({
searchValue: value,
});
clearTimeout(this.data.timeId) //清除定时器
this.data.timeId = setTimeout(()=>{
this.getCarList() //发送请求,间隔时间为1s
},1000)
},
handleClear() {
this.setData({
......@@ -34,10 +44,10 @@ Page({
pageSize: this.data.pageSize,
carNumber: this.data.searchValue
}
http.post(getApp().globalData.service + '/api/T_Equipment/GetList', data).then(res => {
http.post(getApp().globalData.service + '/api/T_Borrow/FindCarBindUser', data).then(res => {
if (res.Success) {
this.setData({
carList: res.result.records
carList: res.result.map((data, index) => ({...data, nameStr: data.users.map(i => i.realname).join(',')}))
})
} else {
util.ddToast({ type: 'fail', text: res.Message })
......@@ -65,10 +75,10 @@ Page({
url: '../addCar/addCar'
})
},
editCar(e) {
let car = e.target.targetDataset.info
toBindUser(e) {
let car = e.target.dataset.info
dd.redirectTo({
url: '../addCar/addCar?id=' +car.id + '&carNumber=' + car.carNumber + '&carType=' + car.carType
url: '../bindUser/bindUser?equipment_id='+car.equipment_id + '&userIds=' + car.users.map(i => i.user_id).join(',')
})
}
});
{
"defaultTitle": "车辆管理",
"titleBarColor": "#fff",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"search-bar": "mini-ali-ui/es/search-bar/index",
......
......@@ -11,7 +11,7 @@
<view a:else>
<block a:for="{{logList}}">
<list-item
thumb="http://122.112.148.157:5000/updateImg/sysOrder.png"
thumb="../../src/assets/sysOrder.png"
index="{{index}}"
arrow="{{false}}"
upperSubtitle="{{item.start_time}}"
......
......@@ -122,7 +122,6 @@ Page({
},
dateStartPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始出车时间',
success: (res) => {
this.setData({
......@@ -133,7 +132,6 @@ Page({
},
dateEndPicker() {
my.datePicker({
format: 'yyyy-MM-dd HH:mm',
title: '选择始结束时间',
success: (res) => {
this.setData({
......
{
"defaultTitle": "订单管理",
"titleBarColor": "#fff",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"list": "mini-ali-ui/es/list/index",
......
{
"defaultTitle": "设置",
"titleBarColor": "#fff",
"usingComponents": {
"tips-dialog": "mini-ali-ui/es/tips/tips-dialog/index",
"am-button": "mini-ali-ui/es/button/index",
......
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 100vh;" onScrollToLower="onScrollToLower">
<search-bar value="{{searchValue}}" focus="{{true}}" maxLength="{{20}}" showVoice="{{false}}" placeholder="搜索" onInput="handleInput"
onSubmit="searchSubmit"
onClear="handleClear"
showCancelButton="{{false}}" />
<scroll-view scroll-y="{{true}}" enable-back-to-top="{{true}}" style="height: 94vh;" onScrollToLower="onScrollToLower" lower-threshold="{{300}}">
<search-bar value="{{searchValue}}" focus="{{false}}" maxLength="{{20}}" showVoice="{{false}}" placeholder="搜索" onInput="handleInput"
onClear="handleClear"
showCancelButton="{{false}}" />
<page-result
type="empty"
brief ="当前并无用户数据"
local="{{false}}" a:if='{{userList.length === 0}}'/>
<view a:for="{{userList}}" a:else>
<list-item
thumb="http://122.112.148.157:5000/updateImg/police.png"
thumb="../../src/assets/police.png"
upperSubtitle="{{item.roleCodeTxt}}"
lowerSubtitle="{{item.departIds_dictText}}">
{{item.realname}}
......
import http from '../../src/http/index'
import util from '../../src/libs/util'
import dd from 'gdt-jsapi';
import queue from '../../src/common/zzdmd'
Page({
data: {
pageNo: 1,
......@@ -9,7 +9,7 @@ Page({
searchValue: '',
roleList: [
{roleId: 'e51758fa916c881624b046d26bd09230', name: '领导'},
{roleId: '1429329085694271710', name: '白名单'},
// {roleId: '1429329085694271710', name: '白名单'},
{roleId: '1429329085699571714', name: '普通用户'},
],
modalOpened: false,
......@@ -17,6 +17,7 @@ Page({
{ text: '取消' },
{ text: '确定', extClass: 'buttonBold' },
],
timeId: 0
},
onLoad() {
this.setData({
......@@ -25,10 +26,18 @@ Page({
this.getUserList()
this.getRoleList()
},
onShow() {
// 页面显示
queue('sysUser','用户管理',"pages/sysUser/sysUser")
},
handleInput(value) {
this.setData({
searchValue: value,
});
clearTimeout(this.data.timeId) //清除定时器
this.data.timeId = setTimeout(()=>{
this.getUserList() //发送请求,间隔时间为1s
},1000)
},
handleClear() {
this.setData({
......@@ -36,9 +45,9 @@ Page({
});
this.getUserList()
},
searchSubmit() {
this.getUserList()
},
// searchSubmit() {
// this.getUserList()
// },
onModalClick() {
this.setData({
qrCodeModal: false,
......
{
"defaultTitle": "用户管理",
"titleBarColor": "#fff",
"usingComponents": {
"page-result": "mini-ali-ui/es/page-result/index",
"search-bar": "mini-ali-ui/es/search-bar/index",
......
......@@ -4,7 +4,7 @@ import dd from 'gdt-jsapi';
function login() {
// getApp().globalData.userInfo = {userId: '772477', name: '黄麒宇', roleCodeList: ['jy', 'gly', 'cgkld'],sysDepart: {id: '813f982a4b71457a92003463120a2725', departName: '办公室'}}
// getApp().globalData.userInfo = {userId: '3104288', name: '黄麒宇', roleCodeList: ['jy', 'gly', 'cgkld', 'bmld'],sysDepart: {id: 'f8c3b870748a4b7ea90cdf3a14ccb710', departName: '办公室'}}
// if (!getApp().globalData.userInfo.sysDepart) {
// dd.redirectTo({ url: '/pages/changeCrop/changeCrop' })
// } else {
......
......@@ -45,7 +45,7 @@ export const SYS_MENU_QUERY = [
{
thumb: '../../src/assets/car.png',
page: '../sysCar/sysCar',
title: '车辆列表'
title: '车辆管理'
},
{
thumb: '../../src/assets/carUseLog.png',
......
//接收3个参数:page_id,page_name,page_url
module.exports= function queue(metaId, metaName,metaPath) {
module.exports = function queue(metaId, metaName,metaPath) {
var app = getApp();
app.aplus.aplus_queue.push({
'action':'aplus.sendPV',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论