|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- // pages/transaction/transactionDetail/transactionDetail.js
- import * as UTIL from '../../../utils/util.js';
- import * as API from '../../../utils/API.js';
- let EVN_CONFIG = require('../../../env/env');
-
- const app = getApp();
- Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- isIPX: app.globalData.isIPX,
- bankTypeOptions:[],
- form:{
- accountType:'1',
- status:'0'
- }
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- var that = this;
- // 所属银行 字典查询
- UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, {
- success: (res) => {
- that.setData({
- bankTypeOptions:res.data,
- })
- }
- })
- // 账户分类 字典查询
- UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'town_account_type', {method:'GET'}, {
- success: (res) => {
- that.setData({
- townAccountTypeOptions:res.data,
- })
- }
- })
- // 管控类型 字典查询
- UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'cashier_account_management_control_type', {method:'GET'}, {
- success: (res) => {
- that.setData({
- managementControlTypeOptions:res.data,
- })
- }
- })
-
- //中心账套查询
- UTIL.httpRequest(API.URL_GET_GETTACCOUNTCENTRAL, {method:'GET'}, {
- success: (res2) => {
- that.setData({
- centralBookIdOptions:res2.data,
- })
- }
- })
-
-
- },
- /**
- * 显示弹窗
- */
- showPopup(e){
- var that = this ;
- that.setData({
- [e.currentTarget.dataset.name]:true
- })
- },
- /**
- * 隐藏弹窗
- */
- closePopup(e){
- var that = this ;
- that.setData({
- [e.currentTarget.dataset.name]:false
- })
- },
- /**
- * 弹窗选择
- */
- onConfirm(e){
- console.log(e);
- var that = this ;
- that.setData({
- [e.currentTarget.dataset.formname]:e.detail.value.dictValue,
- [e.currentTarget.dataset.formname+'Text']:e.detail.value.dictLabel,
- [e.currentTarget.dataset.name]:false
- })
- },
- onConfirmBank(e){
- console.log(e);
- var that = this ;
- that.setData({
- [e.currentTarget.dataset.formname]:e.detail.value.dictValue,
- [e.currentTarget.dataset.formname+'Text']:e.detail.value.dictLabel,
- [e.currentTarget.dataset.name]:false,
- ["form.bankDeposit"]:'',
- ["form.payeePaymentLines"]:'',
- })
- //开户行查询
- UTIL.httpRequest(API.URL_GET_DEPOSITLIST, {method:'GET',bankType:e.detail.value.dictValue,status:'0'}, {
- success: (res2) => {
- that.setData({
- depositOptions:res2.rows,
- })
- }
- })
- },
- onConfirmaDeposit(e){
- console.log(e);
- var that = this ;
- that.setData({
- [e.currentTarget.dataset.formname]:e.detail.value.bankDeposit,
- [e.currentTarget.dataset.name]:false,
- ["form.payeePaymentLines"]:e.detail.value.payeePaymentLines
- })
- },
- /**
- * 中心账套弹窗选择
- */
- onConfirmBook(e){
- console.log(e);
- var that = this ;
- that.setData({
- [e.currentTarget.dataset.formname]:e.detail.value.id,
- [e.currentTarget.dataset.formname+'Text']:e.detail.value.bookName,
- [e.currentTarget.dataset.name]:false
- })
- //会计科目查询
- UTIL.httpRequest(API.URL_GET_GETACCOUNTCENTRAL, {method:'GET',bookId:e.detail.value.id}, {
- success: (res2) => {
- that.setData({
- centralSubjectIdOptions:res2.data,
- })
- }
- })
- },
- /**
- * 会计科目弹窗选择
- */
- onConfirmSubjectId(e){
- console.log(e);
- var that = this ;
- that.setData({
- [e.currentTarget.dataset.formname]:e.detail.value.subjectId,
- [e.currentTarget.dataset.formname+'Text']:e.detail.value.subjectName,
- [e.currentTarget.dataset.name]:false
- })
- },
- /**
- * 输入框change
- */
- inputChange(e){
- var that = this ;
- that.setData({
- [e.currentTarget.dataset.formname]:e.detail
- })
- },
- /**
- * 提交修改
- */
- goSubmit(e){
- var that = this ;
- console.log(that.data.form);
- that.data.form.method = 'POST';
- UTIL.httpRequest(API.URL_GET_GETTACCOUNTADD, that.data.form, {
- success: (res) => {
- console.log(res);
- wx.showToast({
- title: "提交成功!",
- duration: 2000,
- icon:"success",
- mask:true
- })
- setTimeout(function(){
- that.back()
- },2000)
- }
- })
- },
- onChange(even){
- console.log(even);
- this.setData({
- [even.currentTarget.dataset.formname]:even.detail
- })
- },
- back:function(){
- wx.navigateBack({
- delta: 1
- })
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
- }
- })
|