diff --git a/image/index/dept.png b/image/index/dept.png
new file mode 100644
index 0000000..d41648c
Binary files /dev/null and b/image/index/dept.png differ
diff --git a/image/index/local.png b/image/index/local.png
new file mode 100644
index 0000000..5e4ed06
Binary files /dev/null and b/image/index/local.png differ
diff --git a/pages/apply/approval/approval.js b/pages/apply/approval/approval.js
index f69d65b..ef426ec 100644
--- a/pages/apply/approval/approval.js
+++ b/pages/apply/approval/approval.js
@@ -62,12 +62,12 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
+ this.setData({itemId:options.id});
//this.getApprovalItemList();
this.groupList();
this.townList();
this.villageList();
this.getApprovalItemsById();
- // this.getApprovalItemList();
},
getApprovalItemsById(){
let _this = this
@@ -308,7 +308,19 @@ Page({
_this.setData({templateDetailList:list})
}
}
+
}
+ let li = this.data.templateDetailList
+ li = li.filter(function(e,i,s){
+ s[i].name = i+1
+ return true
+ })
+ this.setData({templateDetailList:li})
+ },
+ back:function(){
+ wx.navigateBack({
+ delta: 1
+ })
},
save:function(){
let _this = this
diff --git a/pages/index/index.js b/pages/index/index.js
index a252af3..c9bfd9f 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -295,7 +295,7 @@ Page({
}
})
},
- /* 获取区镇村*/
+ /* 获取账套*/
getBookList:function(){
let d = {
loginDeptID : this.data.userInfoObj.loginDeptId
@@ -441,7 +441,9 @@ Page({
lastCitys: this.data.citys,
lastAreas: this.data.areas,
regionValue: value,
- deptId:this.getRegionId('areas')
+ deptId:this.getRegionId('areas'),
+ bookName:"",
+ bookId:""
}, () => {
let data={
loginDeptID : this.getRegionId('areas')
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 8c78354..7d79f60 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -18,24 +18,24 @@
+
{{ region || "请选择" }}
-
+
+
+
+
{{array[index]|| bookName}}
-
-
- {{userInfoObj.allDeptName}}
-
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index 2eb0fd7..1c90d02 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -73,7 +73,14 @@
border-radius: 44rpx;
border:2rpx solid #2c8e68;
text-align: center;
- font-size: 28rpx;
+ font-size: 24rpx;
+}
+
+.information_header .task_wrap .flex_block .icon{
+ width: 30rpx;
+ height: 30rpx;
+ vertical-align: sub;
+ display:inline-block;
}
.information_header .task_wrap .flex_block .desc{
width: 115rpx;
@@ -105,7 +112,7 @@
.information_header .task_wrap .flex_block .event{
color: #2c8e68;
margin-left: -2%;
- padding:0 8rpx 0 5rpx;
+ padding:0 20rpx 0 20rpx;
}
diff --git a/pages/index/settle/eSign/index.js b/pages/index/settle/eSign/index.js
index 16c7631..404dc1c 100644
--- a/pages/index/settle/eSign/index.js
+++ b/pages/index/settle/eSign/index.js
@@ -12,16 +12,43 @@ Page({
isEmpty: true,
baseItem:"",
item:{},
+ url:"",
+ isShow:false
},
onLoad: function(options) {
- this.setData({baseItem:options.item});
- this.setData({item:JSON.parse(options.item)});
- console.log(this.data.item);
- var ctx = wx.createCanvasContext('handWriting');
- const data = {
- devicePixelRatio: pix,
- };
- signaturePad = new SignaturePad(ctx, data);
+ this.getUserInfo();
+ this.getBaseUrl()
+ },
+ /* 获取用户信息*/
+ getUserInfo(){
+ UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, {
+ success: (res) => {
+ if (res.code == API.SUCCESS_CODE) {
+ this.setData({item:res.user})
+ if(this.data.item.electronicSignature==null||this.data.item.electronicSignature==""){
+ this.setData({isShow:false})
+ var ctx = wx.createCanvasContext('handWriting');
+ const data = {
+ devicePixelRatio: pix,
+ };
+ signaturePad = new SignaturePad(ctx, data);
+ }else{
+ this.setData({isShow:true})
+ }
+ }
+ }
+ })
+ },
+ getBaseUrl:function(){
+ let params={
+ configKey: "system.attachment.url"}
+ UTIL.httpRequest(API.URL_GET_SYSCONFIG,params,{
+ success: (res) => {
+ if (res.code == API.SUCCESS_CODE) {
+ this.setData({url:res.rows[0].configValue+this.data.item.electronicSignature})
+ }
+ }
+ })
},
uploadScaleStart(e) {
const item = {
@@ -46,6 +73,12 @@ Page({
})
},
retDraw: function() {
+ this.setData({isShow:false})
+ var ctx = wx.createCanvasContext('handWriting');
+ const data = {
+ devicePixelRatio: pix,
+ };
+ signaturePad = new SignaturePad(ctx, data);
signaturePad.clear();
const isEmpty = signaturePad.isEmpty();
this.setData({
@@ -73,7 +106,6 @@ Page({
wx.canvasToTempFilePath({
canvasId: 'handWriting',
success: function(res) {
- console.log(res);
wx.uploadFile({
url: API.URL_POST_UPLOADFILE, //服务器地址
filePath:res.tempFilePath,//本地照片地址
@@ -84,11 +116,6 @@ Page({
},
success (res){
let dd = JSON.parse(res.data)
- // console.log(dd);
- // let a = _this.data.item
- // a.electronicSignature = dd.fileName
- // _this.setData({item:a});
- // _this.saveESign(JSON.stringify(_this.data.item));
if(dd.code==200){
wx.showToast({
title: dd.msg,
@@ -117,9 +144,12 @@ Page({
saveESign : function(item){
UTIL.httpRequest(API.URL_POST_USEREDIT,item,{
success: (res) => {
- console.log(res);
if (res.code == API.SUCCESS_CODE) {
- console.log(res);
+ wx.showToast({
+ title: "保存成功!",
+ duration: 2000,
+ icon:"success"
+ })
}
}
})
diff --git a/pages/index/settle/eSign/index.wxml b/pages/index/settle/eSign/index.wxml
index 475c5c2..5142fe5 100644
--- a/pages/index/settle/eSign/index.wxml
+++ b/pages/index/settle/eSign/index.wxml
@@ -9,8 +9,9 @@
-
手写签名
diff --git a/pages/index/settle/passWord/index.js b/pages/index/settle/passWord/index.js
index ccbe1d3..4fb979d 100644
--- a/pages/index/settle/passWord/index.js
+++ b/pages/index/settle/passWord/index.js
@@ -20,9 +20,17 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- this.setData({baseItem:options.item});
- this.setData({item:JSON.parse(options.item)});
- console.log(this.data.item);
+ this.getUserInfo()
+ },
+ /* 获取用户信息*/
+ getUserInfo(){
+ UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, {
+ success: (res) => {
+ if (res.code == API.SUCCESS_CODE) {
+ this.setData({item:res.user})
+ }
+ }
+ })
},
bindOldInput: function (e) {
console.log(e);
@@ -86,20 +94,6 @@ updatePassword(){
console.log(response);
}
})
- // UTIL.httpRequest(API.URL_POST_UPDATEPWD, d, {
- // success: (res) => {
- // console.log(res);
- // if (res.code == API.SUCCESS_CODE) {
-
- // }
- // },
- // fail:(res) => {
- // console.log(res);
- // },
- // complete:(res) => {
- // console.log(res);
- // }
- // })
}
},
back:function(){
diff --git a/utils/API.js b/utils/API.js
index f01d7fa..9b10539 100644
--- a/utils/API.js
+++ b/utils/API.js
@@ -95,6 +95,9 @@ const URL_POST_APPROVALITEMSEDIT = `${URL_PREFIX}/yinnong/approvalItems/edit`;
const URL_POST_TEMPLATEEDIT = `${URL_PREFIX}/service/templateDetail/editBatch`;
//审核事项申请
const URL_POST_APPROVALITEMSSUBMIT = `${URL_PREFIX}/yinnong/approvalItems/approvalItemsSubmit/`;
+//附件上传配置列表
+const URL_GET_SYSCONFIG = `${URL_PREFIX}/system/config/list`;
+
//汇票列表
const URL_GET_MONEYORDERLIST = `${URL_PREFIX}/yinnong/moneyorder/list`;
@@ -122,7 +125,6 @@ const URL_GET_APPROVALITEMS = `${URL_PREFIX}/yinnong/approvalItems/getApprovalIt
//通过审批事项id删除审批模板
const URL_GET_REMOVEAPPROVAL = `${URL_PREFIX}/yinnong/approvalItems/remove/`;
-
/****************接口地址end****************/
export {
@@ -167,6 +169,7 @@ export {
URL_POST_APPROVALITEMSEDIT,
URL_POST_TEMPLATEEDIT,
URL_POST_APPROVALITEMSSUBMIT,
+ URL_GET_SYSCONFIG,
URL_GET_MONEYORDERLIST,
URL_GET_PAYEESELECTLIST,
URL_GET_DEPOSITLIST,