| @@ -1,11 +1,11 @@ | |||
| module.exports = { | |||
| DEV: { | |||
| URL_PREFIX: 'http://192.168.31.228/api', | |||
| URL_PREFIX: 'http://192.168.31.178/api', | |||
| }, | |||
| PRE: { | |||
| URL_PREFIX: 'http://192.168.31.228:8080/api', | |||
| URL_PREFIX: 'http://192.168.31.178:8080/api', | |||
| }, | |||
| PROD: { | |||
| URL_PREFIX: 'http://192.168.31.228:8080/api', | |||
| URL_PREFIX: 'http://192.168.31.178:8080/api', | |||
| } | |||
| } | |||
| @@ -5,7 +5,7 @@ | |||
| </view> | |||
| <!-- 付款单位开始 --> | |||
| <view class="top" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||
| <image src="../../image/apply/dress_icon.png" mode="widthFix"></image> | |||
| <image src="../../image/apply/dress_icon.png"></image> | |||
| <view class="top-tit">付款单位</view> | |||
| <view class="top-title">{{bookName}}</view> | |||
| </view> | |||
| @@ -7,6 +7,7 @@ | |||
| border-radius: 10px; | |||
| margin-top: 3vw; | |||
| overflow: hidden; | |||
| position: relative; | |||
| } | |||
| .top view{ | |||
| padding: 18px 15px; | |||
| @@ -16,7 +17,8 @@ | |||
| } | |||
| .top image{ | |||
| position: absolute; | |||
| width: 94%; | |||
| width: 100%; | |||
| height: 100%; | |||
| } | |||
| .top-title{ | |||
| flex: 1; | |||
| @@ -11,7 +11,20 @@ Page({ | |||
| isIPX: app.globalData.isIPX, | |||
| radio:'1', | |||
| active:0, | |||
| projectText:'', | |||
| balance:0, | |||
| showCapitalExpenditureType:false, | |||
| showApplyDate:false, | |||
| showTransferType:false, | |||
| showProject:false, | |||
| showProjectFundType:false, | |||
| showAccount:false, | |||
| capitalExpenditureTypeOptions:[], | |||
| transferTypeOptions:[], | |||
| projectOptions:[], | |||
| projectFundTypeOptions:[], | |||
| contractionOptions:[], | |||
| accountOptions:[], | |||
| form:{ | |||
| approvalItemTemplate:{ | |||
| approvalItems:'',//审批事项 | |||
| @@ -24,10 +37,12 @@ Page({ | |||
| dataType:'',//数据类型 | |||
| transfers:[{//事项信息集合以下是List对象信息 | |||
| capitalExpenditureType:'',//资金支出类别 | |||
| capitalExpenditureTypeText:'',//资金支出类别(展示用) | |||
| succeedAmount:'',//成功支付金额 | |||
| payer:'',//付款方 | |||
| payerAccount:'',//付款方账户 | |||
| bankType:'',//所属银行 | |||
| bankTypeText:'',//所属银行(展示用) | |||
| isPeers:'',//是否同行 | |||
| operatorCode:'',//操作员代码 | |||
| enterpriseCode:'',//企业编码 | |||
| @@ -40,7 +55,8 @@ Page({ | |||
| paymentTime:'',//支付时间 | |||
| bankPriority:'',//银行处理优先级 | |||
| clientPriority:'',//客户处理优先级 | |||
| transferType:'',//申请类型 | |||
| transferType:'',//付款方式 | |||
| transferTypeText:'',//付款方式(展示用) | |||
| requiredTransferTime:'',//要求转账时间 | |||
| remark:'',//付款事由 | |||
| startTime:'',//开票日期 | |||
| @@ -60,7 +76,24 @@ Page({ | |||
| }], | |||
| } | |||
| } | |||
| }, | |||
| projectForm:{ | |||
| projectId:'', | |||
| projectName:'', | |||
| projectContractor:'', | |||
| projectAmount:'', | |||
| projectBillNum:'', | |||
| projectFundType:'', | |||
| outId:'', | |||
| ynType:'1', | |||
| }, | |||
| contractionForm:{ | |||
| id:'', | |||
| name:'', | |||
| code:'', | |||
| totalAmount:'', | |||
| }, | |||
| accountForm:{} | |||
| }, | |||
| /** | |||
| @@ -95,6 +128,62 @@ Page({ | |||
| } | |||
| } | |||
| }) | |||
| // 资金支出类别字典查询 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'capital_expenditure_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| capitalExpenditureTypeOptions:res.data, | |||
| }) | |||
| } | |||
| }) | |||
| // 付款方式类型字典查询 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'transfer_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| transferTypeOptions:res.data, | |||
| }) | |||
| } | |||
| }) | |||
| // 项目工程列表 | |||
| UTIL.httpRequest(API.URL_GET_GETPROJECTLIST , {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| projectOptions:res.rows, | |||
| }) | |||
| } | |||
| }) | |||
| // 工程款类型字典查询 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'project_fund_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| projectFundTypeOptions:res.data, | |||
| }) | |||
| } | |||
| }) | |||
| // 获取合同信息列表 | |||
| UTIL.httpRequest(API.URL_GET_CONTRACTIONLIST , {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| contractionOptions:res.rows, | |||
| }) | |||
| } | |||
| }) | |||
| // 获取合同信息列表 | |||
| let prames = { | |||
| pageNum:1, | |||
| pageSize:999, | |||
| isPeers:'', | |||
| orderByColumn:'id', | |||
| isAsc:'asc', | |||
| status:'0' | |||
| } | |||
| UTIL.httpRequest(API.URL_GET_SELECTLIST , {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| contractionOptions:res.rows, | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| openBox(even){ | |||
| this.setData({ | |||
| @@ -102,10 +191,149 @@ Page({ | |||
| }) | |||
| }, | |||
| closeBox(even){ | |||
| console.log(even.currentTarget.dataset.name); | |||
| this.setData({ | |||
| [even.currentTarget.dataset.name]:false | |||
| }) | |||
| }, | |||
| onConfirm(event) { | |||
| this.setData({ | |||
| [event.currentTarget.dataset.name]: false, | |||
| [event.currentTarget.dataset.value]: UTIL.formatDate(event.detail), | |||
| }); | |||
| }, | |||
| onConfirmPick(event) { | |||
| console.log(event); | |||
| this.setData({ | |||
| [event.currentTarget.dataset.name]: false, | |||
| [event.currentTarget.dataset.value]: event.detail.value.dictValue, | |||
| [event.currentTarget.dataset.value+'Text']: event.detail.value.dictLabel, | |||
| }); | |||
| }, | |||
| onConfirmAccount(event) { | |||
| console.log(event); | |||
| var that = this; | |||
| // 所属银行字典查询 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| let array = res.data.filter(function (e) { return e.dictValue == event.detail.value.bankType; }); | |||
| this.setData({ | |||
| [event.currentTarget.dataset.name]: false, | |||
| [event.currentTarget.dataset.value+'.payer']: event.detail.value.accountName, | |||
| [event.currentTarget.dataset.value+'.payerAccount']: event.detail.value.bankAccountNumber, | |||
| [event.currentTarget.dataset.value+'.bankTypeText']: array[0].dictLabel, | |||
| [event.currentTarget.dataset.value+'.bankType']: event.detail.value.bankType, | |||
| balance:event.detail.value.balance, | |||
| }); | |||
| } | |||
| }) | |||
| }, | |||
| onConfirmaTransfer(event) { | |||
| console.log(event); | |||
| var that = this; | |||
| let perames = {}; | |||
| this.setData({ | |||
| [event.currentTarget.dataset.value+'.payer']: '', | |||
| [event.currentTarget.dataset.value+'.payerAccount']: '', | |||
| [event.currentTarget.dataset.value+'.bankTypeText']: '', | |||
| [event.currentTarget.dataset.value+'.bankType']: '', | |||
| balance:0, | |||
| }); | |||
| if(event.detail.value.dictValue == 1){//村账户查询参数 | |||
| perames = { | |||
| pageNum:1, | |||
| pageSize:999, | |||
| accountType:'102', | |||
| method:'post', | |||
| params: { | |||
| "townAccountType":"0" | |||
| } | |||
| } | |||
| // 付款方列表 | |||
| UTIL.httpRequest(API.URL_GET_SELECTACCOUNTLIST , perames, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| accountOptions:res.rows, | |||
| }) | |||
| } | |||
| }) | |||
| } | |||
| if(event.detail.value.dictValue == 2 || event.detail.value.dictValue == 10){//公务卡和现金提现查询参数 | |||
| perames = { | |||
| pageNum:1, | |||
| pageSize:999, | |||
| accountType:'102', | |||
| method:'GET', | |||
| villageAccountType:'' | |||
| } | |||
| // 付款方列表 | |||
| UTIL.httpRequest(API.URL_GET_ACCOUNTLIST , perames, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| accountOptions:res.rows, | |||
| }) | |||
| } | |||
| }) | |||
| } | |||
| if(event.detail.value.dictValue == 11){//现金使用查询参数 | |||
| perames = { | |||
| pageNum:1, | |||
| pageSize:999, | |||
| accountType:'101', | |||
| method:'GET' | |||
| } | |||
| // 付款方列表 | |||
| UTIL.httpRequest(API.URL_GET_ACCOUNTLIST , perames, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| accountOptions:res.rows | |||
| }) | |||
| } | |||
| }) | |||
| } | |||
| if(event.detail.value.dictValue == 4){//代管账户查询参数 | |||
| perames = { | |||
| pageNum:1, | |||
| pageSize:999, | |||
| accountType:'102', | |||
| method:'GET', | |||
| villageAccountType:'1' | |||
| } | |||
| // 付款方列表 | |||
| UTIL.httpRequest(API.URL_GET_ACCOUNTLIST , perames, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| accountOptions:res.rows, | |||
| }) | |||
| } | |||
| }) | |||
| } | |||
| this.setData({ | |||
| [event.currentTarget.dataset.name]: false, | |||
| [event.currentTarget.dataset.value+'.transferType']: event.detail.value.dictValue, | |||
| [event.currentTarget.dataset.value+'.transferTypeText']: event.detail.value.dictLabel, | |||
| }); | |||
| }, | |||
| onConfirmProject(event) { | |||
| console.log(event); | |||
| this.setData({ | |||
| [event.currentTarget.dataset.name]: false, | |||
| [event.currentTarget.dataset.value]: event.detail.value.projectName, | |||
| ['projectForm.projectId']: event.detail.value.id, | |||
| ['projectForm.projectContractor']: event.detail.value.projectContractor, | |||
| ['projectForm.projectAmount']: event.detail.value.projectAmount, | |||
| }); | |||
| }, | |||
| onConfirmContraction(event) { | |||
| console.log(event); | |||
| this.setData({ | |||
| [event.currentTarget.dataset.name]: false, | |||
| [event.currentTarget.dataset.value]: event.detail.value.name, | |||
| ['contractionForm.code']: event.detail.value.code, | |||
| ['contractionForm.totalAmount']: event.detail.value.totalAmount, | |||
| ['contractionForm.id']: event.detail.value.id, | |||
| }); | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| @@ -13,6 +13,7 @@ | |||
| "van-radio-group": "@vant/weapp/radio-group/index", | |||
| "van-field": "@vant/weapp/field/index", | |||
| "van-popup": "@vant/weapp/popup/index", | |||
| "van-picker": "@vant/weapp/picker/index" | |||
| "van-picker": "@vant/weapp/picker/index", | |||
| "van-calendar": "@vant/weapp/calendar/index" | |||
| } | |||
| } | |||
| @@ -18,36 +18,119 @@ | |||
| <text class="title">基础信息</text> | |||
| <view class="main-box table-box"> | |||
| <!-- <van-field label="申请流水号" value="{{ form.approvalItemTemplate.telephone }}" placeholder="请输入申请流水号" border="{{ false }}" bind:change="onChange" input-align="right"/> --> | |||
| <van-field label="申请时间" value="{{ form.approvalItemTemplate.transfers[index].applyDate }}" placeholder="请输入申请时间" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| <van-field label="申请时间" readonly is-link value="{{ form.approvalItemTemplate.transfers[index].applyDate }}" placeholder="请选择申请时间" border="{{ false }}" bind:change="onChange" input-align="right" bindtap="openBox" data-name="showApplyDate" /> | |||
| <van-calendar show="{{ showApplyDate }}" bind:close="closeBox" data-name="showApplyDate" bind:confirm="onConfirm" data-value="form.approvalItemTemplate.transfers[{{index}}].applyDate" show-confirm="{{ false }}" /> | |||
| <van-field label="合计支出" value="{{ form.approvalItemTemplate.transfers[index].expenditureAmount }}" placeholder="请输入合计支出" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| <van-field label="支出原因" value="{{ form.approvalItemTemplate.transfers[index].remark }}" placeholder="请输入支出原因" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| <van-popup show="{{showCapitalExpenditureType}}" round position="bottom" bind:close="closeBox" data-name="showCapitalExpenditureType"> | |||
| <van-picker | |||
| columns="{{columns}}" | |||
| bind:cancel="showCapitalExpenditureType = false" | |||
| bind:confirm="onConfirm" | |||
| columns="{{capitalExpenditureTypeOptions}}" | |||
| show-toolbar | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirmPick" | |||
| data-name="showCapitalExpenditureType" | |||
| data-value="form.approvalItemTemplate.transfers[{{index}}].capitalExpenditureType" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="资金支出类别" readonly value="{{ form.approvalItemTemplate.transfers[index].capitalExpenditureType }}" placeholder="请输入资金支出类别" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showCapitalExpenditureType"/> | |||
| </view> | |||
| <text class="title">关联项目</text> | |||
| <view class="main-box table-box"> | |||
| <van-field label="项目名称" value="{{ value }}" placeholder="请输入项目名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link/> | |||
| <van-field label="资金支出类别" readonly value="{{ form.approvalItemTemplate.transfers[index].capitalExpenditureTypeText }}" placeholder="请选择资金支出类别" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showCapitalExpenditureType"/> | |||
| </view> | |||
| <block wx:if="{{form.approvalItemTemplate.transfers[index].capitalExpenditureType == 2}}"> | |||
| <text class="title">关联项目</text> | |||
| <view class="main-box table-box"> | |||
| <van-popup show="{{showProject}}" round position="bottom" bind:close="closeBox" data-name="showProject"> | |||
| <van-picker | |||
| columns="{{projectOptions}}" | |||
| show-toolbar | |||
| value-key="projectName" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirmProject" | |||
| data-name="showProject" | |||
| data-value="projectForm.projectName" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="项目名称" readonly value="{{ projectForm.projectName }}" placeholder="请输入项目名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link bindtap="openBox" data-name="showProject"/> | |||
| <van-field label="承建单位" readonly value="{{ projectForm.projectContractor }}" placeholder="请输入承建单位" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| <van-field label="合同价款(元)" readonly value="{{ projectForm.projectAmount }}" placeholder="请输入合同价款(元)" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| <van-popup show="{{showProjectFundType}}" round position="bottom" bind:close="closeBox" data-name="showProjectFundType"> | |||
| <van-picker | |||
| columns="{{projectFundTypeOptions}}" | |||
| show-toolbar | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirmPick" | |||
| data-name="showProjectFundType" | |||
| data-value="projectForm.projectFundType" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="工程款类型" readonly value="{{ projectForm.projectFundTypeText }}" placeholder="请选择工程款类型" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showProjectFundType"/> | |||
| <van-field label="工程发票号" value="{{ projectForm.projectBillNum }}" placeholder="请输入工程发票号" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| </view> | |||
| </block> | |||
| <block wx:if="{{form.approvalItemTemplate.transfers[index].capitalExpenditureType == 4}}"> | |||
| <text class="title">关联合同</text> | |||
| <view class="main-box table-box"> | |||
| <van-popup show="{{showContraction}}" round position="bottom" bind:close="closeBox" data-name="showContraction"> | |||
| <van-picker | |||
| columns="{{contractionOptions}}" | |||
| show-toolbar | |||
| value-key="name" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirmContraction" | |||
| data-name="showContraction" | |||
| data-value="contractionForm.name" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="合同名称" readonly value="{{ contractionForm.name }}" placeholder="请选择合同名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link bindtap="openBox" data-name="showContraction"/> | |||
| <van-field label="合同编码" value="{{ contractionForm.code }}" placeholder="请输入合同编码" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| <van-field label="合同价款(元)" readonly value="{{ contractionForm.totalAmount }}" placeholder="请输入合同价款(元)" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| </view> | |||
| </block> | |||
| <text class="title">付款方信息</text> | |||
| <view class="main-box table-box"> | |||
| <!-- 付款方式无 --> | |||
| <van-field label="付款方式" value="{{ form.approvalItemTemplate.transfers[index].transferType }}" placeholder="请输入付款方式" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"/> | |||
| <van-popup show="{{showTransferType}}" round position="bottom" bind:close="closeBox" data-name="showTransferType"> | |||
| <van-picker | |||
| columns="{{transferTypeOptions}}" | |||
| show-toolbar | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirmaTransfer" | |||
| data-name="showTransferType" | |||
| data-value="form.approvalItemTemplate.transfers[{{index}}]" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="付款方式" readonly value="{{ form.approvalItemTemplate.transfers[index].transferTypeText }}" placeholder="请输入付款方式" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showTransferType"/> | |||
| <van-field value="{{ form.approvalItemTemplate.transfers[index].payer }}" placeholder="请输入付款方名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down"> | |||
| <van-popup show="{{showAccount}}" round position="bottom" bind:close="closeBox" data-name="showAccount"> | |||
| <van-picker | |||
| columns="{{accountOptions}}" | |||
| show-toolbar | |||
| value-key="accountName" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirmAccount" | |||
| data-name="showAccount" | |||
| data-value="form.approvalItemTemplate.transfers[{{index}}]" | |||
| /> | |||
| </van-popup> | |||
| <van-field readonly value="{{ form.approvalItemTemplate.transfers[index].payer }}" placeholder="请选择付款方名称" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="openBox" data-name="showAccount"> | |||
| <view slot="label"> | |||
| 付款方名称<van-tag plain type="danger" color="red" round style="margin-left:10px;">必填</van-tag> | |||
| 付款方<van-tag plain type="danger" color="red" round style="margin-left:10px;">必填</van-tag> | |||
| </view> | |||
| </van-field> | |||
| <van-field label="付款方账号" value="{{ form.approvalItemTemplate.transfers[index].payerAccount }}" placeholder="请输入付款方账号" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| <van-field label="所属银行" value="{{ form.approvalItemTemplate.transfers[index].bankType }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| <!-- 转账附言无 --> | |||
| <van-field label="转账附言" value="{{ form.approvalItemTemplate.transfers[index].remark }}" placeholder="请输入转账附言" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| <van-field readonly wx:if="{{form.approvalItemTemplate.transfers[index].transferType == 11}}" label="可用余额(元)" value="{{ balance }}" placeholder="可用余额" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| <block wx:else> | |||
| <van-field readonly label="付款方账号" value="{{ form.approvalItemTemplate.transfers[index].payerAccount }}" placeholder="请输入付款方账号" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| <van-field readonly label="所属银行" value="{{ form.approvalItemTemplate.transfers[index].bankTypeText }}" placeholder="请输入所属银行" border="{{ false }}" bind:change="onChange" input-align="right"/> | |||
| </block> | |||
| </view> | |||
| <text class="title">收款方信息</text> | |||
| <view class="center-box"> | |||
| @@ -50,6 +50,22 @@ const URL_GET_ACCOUNTLIST = `${URL_PREFIX}/cashier/account/list`; | |||
| //查看事项审批模板列表 | |||
| const URL_GET_APPROVALITEMSLIST = `${URL_PREFIX}/yinnong/approvalItems/list`; | |||
| //字典查询 | |||
| 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 { | |||
| @@ -74,5 +90,10 @@ export { | |||
| URL_POST_UPLOADFILE, | |||
| URL_POST_USEREDIT, | |||
| URL_GET_ACCOUNTLIST, | |||
| URL_GET_APPROVALITEMSLIST | |||
| URL_GET_APPROVALITEMSLIST, | |||
| URL_GET_GETDICTTYPE, | |||
| URL_GET_GETPROJECTLIST, | |||
| URL_GET_CONTRACTIONLIST, | |||
| URL_GET_SELECTLIST, | |||
| URL_GET_SELECTACCOUNTLIST | |||
| } | |||
| @@ -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) { | |||
| @@ -363,7 +363,25 @@ function js_date_time(unixtime) { | |||
| 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, | |||
| @@ -380,5 +398,6 @@ export { | |||
| getUserInfoFomWX, | |||
| convert_length, | |||
| isIPhoneX, | |||
| js_date_time | |||
| js_date_time, | |||
| formatDate | |||
| } | |||