diff --git a/env/env.js b/env/env.js index 7a36baf..ed2622d 100644 --- a/env/env.js +++ b/env/env.js @@ -7,5 +7,6 @@ module.exports = { }, PROD: { URL_PREFIX: 'http://192.168.31.228:8080', + } } \ No newline at end of file diff --git a/image/apply/icon_exel.png b/image/apply/icon_exel.png new file mode 100644 index 0000000..1904ce9 Binary files /dev/null and b/image/apply/icon_exel.png differ diff --git a/utils/API.js b/utils/API.js index b078450..3e19e4a 100644 --- a/utils/API.js +++ b/utils/API.js @@ -57,6 +57,20 @@ const URL_GET_BOOKLISTBYDEPTID = `${URL_PREFIX}/finance/book/listByDeptId`; const URL_GET_CHANGEDEPT = `${URL_PREFIX}/system/user/changeDept`; //切换账套 const URL_GET_CHANGEBOOK = `${URL_PREFIX}/system/user/changeBook`; +//字典查询 +const URL_GET_GETDICTTYPE = `${URL_PREFIX}/system/dict/data/type/`; + +//项目工程列表 +const URL_GET_GETPROJECTLIST = `${URL_PREFIX}/yinnong/project/list`; + +//获取合同信息列表 +const URL_GET_CONTRACTIONLIST = `${URL_PREFIX}/contraction/info/list`; + +//查询收款账号列表 +const URL_GET_SELECTLIST = `${URL_PREFIX}/yinnong/payee/selectList`; + +//查询收款账号列表 +const URL_GET_SELECTACCOUNTLIST = `${URL_PREFIX}/cashier/account/accountList`; /****************接口地址end****************/ export { @@ -85,5 +99,10 @@ export { URL_GET_TREESELECTBYUSER, URL_GET_BOOKLISTBYDEPTID, URL_GET_CHANGEBOOK, - URL_GET_CHANGEDEPT + URL_GET_CHANGEDEPT, + URL_GET_GETDICTTYPE, + URL_GET_GETPROJECTLIST, + URL_GET_CONTRACTIONLIST, + URL_GET_SELECTLIST, + URL_GET_SELECTACCOUNTLIST } \ No newline at end of file diff --git a/utils/util.js b/utils/util.js index da62a2c..26a1cd7 100644 --- a/utils/util.js +++ b/utils/util.js @@ -114,14 +114,14 @@ function httpRequest(url, data, { let finalData = {}; Object.assign(finalData, data); - finalData.token = getApp().globalData.userInfo.token; + finalData.token = getApp().globalData.userInfo.token; wx.request({ url, - data: finalData, + data: finalData, method:data.method, timeout: 60000, header: { - 'Authorization':'Bearer '+getApp().globalData.userInfo.token, + 'Authorization':'Bearer '+getApp().globalData.userInfo.token }, success: function (response) { if (response.data && response.data._code == API.INVALID_USER_TOKEN_CODE) { @@ -345,6 +345,44 @@ function compareVersion(v1, v2) { } return 0 } + /** + * 获取当前年-月-日 时:分:秒 + */ +function js_date_time(unixtime) { + var date = new Date(unixtime); + var y = date.getFullYear(); + var m = date.getMonth() + 1; + m = m < 10 ? ('0' + m) : m; + var d = date.getDate(); + d = d < 10 ? ('0' + d) : d; + var h = date.getHours(); + h = h < 10 ? ('0' + h) : h; + var minute = date.getMinutes(); + var second = date.getSeconds(); + minute = minute < 10 ? ('0' + minute) : minute; + second = second < 10 ? ('0' + second) : second; + // return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;//年月日时分秒 + return y + '-' + m + '-' + d + ' ' + h + ':' + minute; +} +/** + * 获取当前年-月-日 + */ +function formatDate(unixtime) { + var date = new Date(unixtime); + var y = date.getFullYear(); + var m = date.getMonth() + 1; + m = m < 10 ? ('0' + m) : m; + var d = date.getDate(); + d = d < 10 ? ('0' + d) : d; + var h = date.getHours(); + h = h < 10 ? ('0' + h) : h; + var minute = date.getMinutes(); + var second = date.getSeconds(); + minute = minute < 10 ? ('0' + minute) : minute; + second = second < 10 ? ('0' + second) : second; + // return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;//年月日时分秒 + return y + '-' + m + '-' + d; +} export { getCurrentPageUrl, getCurrentPageUrlWithArgs, @@ -359,5 +397,7 @@ export { getLocationFromWX, getUserInfoFomWX, convert_length, - isIPhoneX + isIPhoneX, + js_date_time, + formatDate }