From d2c4004ad8538bcf6f177016f2107369f93df619 Mon Sep 17 00:00:00 2001
From: Mr Ke <kelq@hugeinfo.com.cn>
Date: Wed, 27 May 2020 11:45:24 +0800
Subject: [PATCH] 指纹仪
---
SunshineLnsMinApp/pages/rzcx/rzcx.js | 32 ++++++++++++++++++++------------
1 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/SunshineLnsMinApp/pages/rzcx/rzcx.js b/SunshineLnsMinApp/pages/rzcx/rzcx.js
index a378fa9..08c2214 100644
--- a/SunshineLnsMinApp/pages/rzcx/rzcx.js
+++ b/SunshineLnsMinApp/pages/rzcx/rzcx.js
@@ -16,13 +16,14 @@
evalList: {},
dataSet: {},
picturesInfo: {},
- entityId: ''
+ entityId: '',
+ approveLogs: []
},
/**
* 生命周期函数--监听页面加载
*/
- onLoad: function (options) {
+ onLoad: function(options) {
var that = this;
console.log(options)
let id = options.id
@@ -34,7 +35,7 @@
var userinfo = wx.getStorageSync("user");
wx.request({
url: app.globalData.url + '/api/entry/find?id=' + id + '&flag=' + flag,
- success: function (res) {
+ success: function(res) {
console.log(res.data)
// if (res.data.code == 0) {
console.log(res.data)
@@ -59,6 +60,7 @@
...res.data,
createrId: userinfo.id,
},
+ approveLogs: res.data.approveLogs || [],
entityId: res.data.id,
disabled,
evalList
@@ -73,7 +75,7 @@
})
},
- inputChange: function (e) {
+ inputChange: function(e) {
var name = e.currentTarget.dataset.name;
this.setData({
picturesInfo: {
@@ -84,9 +86,15 @@
},
- submit: function (e) {
+ submit: function(e) {
var picturesInfo = this.data.picturesInfo;
+ if (!picturesInfo.createrName) {
+ return app.showModal("请填写申请人姓名!");
+ }
+ if (this.data.evalList.evalList1019.length == 0) {
+ return app.showModal("请上传照片!");
+ }
if (!picturesInfo.reason) {
return app.showModal("请填写申请理由!");
}
@@ -99,14 +107,14 @@
header: {
"Content-Type": "application/json"
},
- success: function (res) {
+ success: function(res) {
// if (res.data.code == 0) {
wx.showToast({
title: '提交成功',
icon: 'success',
duration: 2000
})
- setTimeout(function () {
+ setTimeout(function() {
wx.reLaunch({
url: '../zhwj/zhwj',
})
@@ -122,24 +130,24 @@
},
// 删除图片
- clearImg: function (e) {
+ clearImg: function(e) {
var that = this;
app.clearImg(e, that)
},
//预览图片
- previewImage: function (e) {
+ previewImage: function(e) {
app.previewImage(e)
},
- uploadFiles: function (e) {
+ uploadFiles: function(e) {
var that = this;
wx.showActionSheet({
itemList: ['拍照上传', '选择图片'],
- success: function (res) {
+ success: function(res) {
app.joinPicture(e, that, 1019, that.data.entityId)
},
- fail: function (res) {}
+ fail: function(res) {}
})
},
})
\ No newline at end of file
--
Gitblit v1.8.0