| @ -0,0 +1,457 @@ | |||
| var network = require("../../../utils/net.js") | |||
| var timechage = require("../../../utils/dateTimeUtil.js") | |||
| var app = getApp() | |||
| var orderID=0; | |||
| function load(that, ID) { | |||
| let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/Load'; | |||
| let params = [ID]; | |||
| network.transfer_request(method, params, function (res) { | |||
| let DepartmentWorkFlow_Detail_Name = res.result.DepartmentWorkFlow_Detail_Name | |||
| let istrue = false; | |||
| if (DepartmentWorkFlow_Detail_Name == "初始") { | |||
| istrue = true; | |||
| } | |||
| if (res.result.Customer_Name!=null){ | |||
| var accountcustomerNew = [{ | |||
| ID: res.result.Customer_ID, | |||
| Name: res.result.Customer_Name | |||
| }] | |||
| } | |||
| let accountUnitNew=[{ | |||
| ID: res.result.AccountingUnit_ID, | |||
| Name: res.result.AccountingUnit_Name | |||
| }] | |||
| let departmentNew =[{ | |||
| ID: res.result.Department_ID, | |||
| Name: res.result.Department_Name | |||
| }] | |||
| if (res.result.GuaranteeDate != null) { | |||
| that.setData({ | |||
| guaranteedate: timechage.formatTimeTwo(res.result.GuaranteeDate.substring(6, 19), 'Y-M-D'), | |||
| }) | |||
| } | |||
| if (res.result.CashBackDate != null) { | |||
| that.setData({ | |||
| paydate: timechage.formatTimeTwo(res.result.CashBackDate.substring(6, 19), 'Y-M-D') | |||
| }) | |||
| } | |||
| if (res.result.GuaranteeMoney != null) { | |||
| that.setData({ | |||
| guaranteeMoney: res.result.GuaranteeMoney, | |||
| }) | |||
| } | |||
| that.setData({ | |||
| accountcustomer: accountcustomerNew, | |||
| accountUnit: accountUnitNew, | |||
| department: departmentNew, | |||
| showView: istrue | |||
| }) | |||
| setDetails(that, res.result.Details) | |||
| GetCustomerAccountingUnitBalance(that, that.data.accountUnit[that.data.accountUnitIndex].ID, that.data.accountcustomer[that.data.accountcustomerIndex].ID) | |||
| }) | |||
| } | |||
| function setDetails(that, ary) { | |||
| let array = [] | |||
| let billMoney=0; | |||
| for (var i = 0; i < ary.length; i++) { | |||
| billMoney = billMoney + ary[i].Value | |||
| let data = ""; | |||
| if (ary[i].Date != null) { | |||
| data = timechage.formatTimeTwo(ary[i].Date.substring(6, 19), 'Y-M-D') | |||
| } | |||
| var dmo = { | |||
| DmoTypeIDName: ary[i].DmoTypeIDName, | |||
| BillID: ary[i].BillID, | |||
| Value: ary[i].Value, | |||
| Customer_Name: ary[i].Customer_Name, | |||
| Date: data, | |||
| ID:ary[i].ID, | |||
| DmoTypeID: ary[i].DmoTypeID | |||
| } | |||
| array.push(dmo) | |||
| } | |||
| app.globalData.billInfoUp = array; | |||
| that.setData({ | |||
| array: array, | |||
| allBillMoney: billMoney | |||
| }) | |||
| } | |||
| function GetAccountCustomer(that, inputValue) { | |||
| let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountCustomer"; | |||
| let params = [{ | |||
| "InputValue": inputValue, | |||
| "PageIndex": 0, | |||
| "PageSize": 100 | |||
| }]; | |||
| network.transfer_request(method, params, function (res) { | |||
| that.setData({ | |||
| currency: res.result, | |||
| accountcustomer: res.result | |||
| }) | |||
| }) | |||
| that.setData({ | |||
| which: "结账客户" | |||
| }) | |||
| } | |||
| function GetAccountingUnit(that, inputValue) { | |||
| let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountingUnit"; | |||
| let params = [{ | |||
| "InputValue": inputValue, | |||
| "PageIndex": 0, | |||
| "PageSize": 100 | |||
| }]; | |||
| network.transfer_request(method, params, function (res) { | |||
| that.setData({ | |||
| currency: res.result, | |||
| accountUnit: res.result | |||
| }) | |||
| }) | |||
| that.setData({ | |||
| which: "会计单位" | |||
| }) | |||
| } | |||
| function GetDepartment(that, inputValue) { | |||
| let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDepartment"; | |||
| let params = [{ | |||
| "InputValue": inputValue, | |||
| "PageIndex": 0, | |||
| "PageSize": 100 | |||
| }]; | |||
| network.transfer_request(method, params, function (res) { | |||
| that.setData({ | |||
| currency: res.result, | |||
| department: res.result | |||
| }) | |||
| }) | |||
| that.setData({ | |||
| which: "部门" | |||
| }) | |||
| } | |||
| function GetCustomerAccountingUnitBalance(that, accoutUnitId, customerId) { | |||
| let method = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/GetCustomerAccountingUnitBalance"; | |||
| let params = [accoutUnitId, customerId]; | |||
| network.transfer_request(method, params, function (res) { | |||
| that.setData({ | |||
| requestMoney: res.result, | |||
| guaranteeMoney: res.result + that.data.allBillMoney | |||
| }) | |||
| }) | |||
| } | |||
| Page({ | |||
| /** | |||
| * 页面的初始数据 | |||
| */ | |||
| data: { | |||
| currency: [], | |||
| accountcustomerIndex: 0, | |||
| accountcustomer: [{ | |||
| ID: 0, | |||
| Name: "请选择结账客户" | |||
| }], | |||
| accountUnitIndex: 0, | |||
| accountUnit: [{ | |||
| ID: 0, | |||
| Name: "请选择会计单位" | |||
| }], | |||
| departmentIndex: 0, | |||
| department: [{ | |||
| ID: 0, | |||
| Name: "请选择部门" | |||
| }], | |||
| guaranteedate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'), | |||
| paydate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'), | |||
| guaranteeMoney: '', | |||
| requestMoney: 0, | |||
| allBillMoney: 0, | |||
| array: [], | |||
| showView: false | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function (options) { | |||
| var that = this; | |||
| let ID = Number(options.ID); | |||
| orderID =ID; | |||
| wx.setNavigationBarTitle({ | |||
| title: '业务担保单No.'+ID, | |||
| }) | |||
| load(that, ID) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onReady: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow: function () { | |||
| this.setData({ | |||
| array: app.globalData.billInfoUp | |||
| }) | |||
| let billMoney = 0; | |||
| if (this.data.array != null || this.data.array != "") { | |||
| for (var i = 0; i < this.data.array.length; i++) { | |||
| billMoney = billMoney + this.data.array[i].Value | |||
| } | |||
| } | |||
| this.setData({ | |||
| allBillMoney: billMoney, | |||
| guaranteeMoney: billMoney + this.data.requestMoney | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function () { | |||
| app.globalData.billInfoUp = []; | |||
| }, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| */ | |||
| onPullDownRefresh: function () { | |||
| }, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom: function () { | |||
| }, | |||
| bindguaranteeDateChange: function (e) { | |||
| this.setData({ | |||
| guaranteedate: e.detail.value | |||
| }) | |||
| }, | |||
| bindpayDateChange: function (e) { | |||
| this.setData({ | |||
| paydate: e.detail.value | |||
| }) | |||
| }, | |||
| addBills: function (e) { | |||
| let accountCustomerId = this.data.accountcustomer[this.data.accountcustomerIndex].ID; | |||
| if (accountCustomerId == 0) { | |||
| wx.showToast({ | |||
| title: '请选择结账客户', | |||
| }) | |||
| return; | |||
| } | |||
| wx.navigateTo({ | |||
| url: '/pages/guaranteebillUp/guaranteebill?customerid=' + accountCustomerId, | |||
| }) | |||
| }, | |||
| deleteItem: function (e) { | |||
| let idx = e.currentTarget.dataset.idx; | |||
| app.globalData.billInfoUp.splice(idx, 1) | |||
| this.setData({ | |||
| array: app.globalData.billInfoUp | |||
| }) | |||
| let billMoney = 0; | |||
| if (this.data.array != null || this.data.array != "") { | |||
| for (var i = 0; i < this.data.array.length; i++) { | |||
| billMoney = billMoney + this.data.array[i].Value | |||
| } | |||
| } | |||
| this.setData({ | |||
| allBillMoney: billMoney, | |||
| guaranteeMoney: billMoney + this.data.requestMoney | |||
| }) | |||
| }, | |||
| submitForm: function (e) { | |||
| let accountCustomerId = this.data.accountcustomer[this.data.accountcustomerIndex].ID; | |||
| let accountUnitId = this.data.accountUnit[this.data.accountUnitIndex].ID; | |||
| let departmentId = this.data.department[this.data.departmentIndex].ID; | |||
| let guaranteeDate = timechage.formatymdERTDate(this.data.guaranteedate); | |||
| let payDate = timechage.formatymdERTDate(this.data.paydate); | |||
| if (accountUnitId == 0) { | |||
| wx.showToast({ | |||
| title: '请选择会计单位', | |||
| }) | |||
| return; | |||
| } | |||
| if (departmentId == 0) { | |||
| wx.showToast({ | |||
| title: '请选择部门', | |||
| }) | |||
| return | |||
| } | |||
| let detailsArray = []; | |||
| for (var i = 0; i < this.data.array.length; i++) { | |||
| let id =0; | |||
| if(this.data.array[i].ID!=null){ | |||
| id = this.data.array[i].ID | |||
| } | |||
| var dmo = { | |||
| BillID: this.data.array[i].BillID, | |||
| DmoTypeID: this.data.array[i].DmoTypeID, | |||
| ID:id | |||
| } | |||
| detailsArray.push(dmo) | |||
| } | |||
| let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/Update'; | |||
| let params = [{ | |||
| "ID": orderID, | |||
| "Customer_ID": accountCustomerId, | |||
| "AccountingUnit_ID": accountUnitId, | |||
| "Department_ID": departmentId, | |||
| "GuaranteeDate": guaranteeDate, | |||
| "CashBackDate": payDate, | |||
| "GuaranteeMoney": this.data.guaranteeMoney, | |||
| "Details": detailsArray | |||
| }]; | |||
| network.transfer_request(method, params, function (res) { | |||
| if (res.result == null) { | |||
| wx.showModal({ | |||
| title: '提示', | |||
| content: '修改成功,是否返回上级列表', | |||
| success: function (res) { | |||
| if (res.cancel) { | |||
| } else { | |||
| app.globalData.billInfoUp = []; | |||
| wx.navigateBack({ | |||
| delta: 1 | |||
| }) | |||
| } | |||
| }, | |||
| fail: function (res) { } | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| powerDrawer: function (e) { | |||
| let that = this; | |||
| let x = e.currentTarget.dataset.x; | |||
| if (x == "结账客户") { | |||
| GetAccountCustomer(that, "") | |||
| } else if (x == "会计单位") { | |||
| GetAccountingUnit(that, "") | |||
| } else if (x == "部门") { | |||
| GetDepartment(that, "") | |||
| } | |||
| let currentStatu = e.currentTarget.dataset.statu; | |||
| this.util(currentStatu) | |||
| }, | |||
| itemclick: function (e) { | |||
| var that = this; | |||
| var name = e.currentTarget.dataset.name; | |||
| var id = e.currentTarget.dataset.id; | |||
| var which = e.currentTarget.dataset.item; | |||
| var idx = e.currentTarget.dataset.idx; | |||
| if (which == "结账客户") { | |||
| that.setData({ | |||
| accountcustomerIndex: idx | |||
| }) | |||
| } | |||
| if (which == "会计单位") { | |||
| that.setData({ | |||
| accountUnitIndex: idx | |||
| }) | |||
| } | |||
| if (which == "部门") { | |||
| that.setData({ | |||
| departmentIndex: idx | |||
| }) | |||
| } | |||
| this.setData({ | |||
| showModalStatus: false, | |||
| }) | |||
| }, | |||
| select: function (e) { | |||
| var that = this; | |||
| var which = e.currentTarget.dataset.item; | |||
| var value = e.detail.value; | |||
| if (which == "结账客户") { | |||
| GetAccountCustomer(that, value) | |||
| } | |||
| if (which == "会计单位") { | |||
| GetAccountingUnit(that, value) | |||
| } | |||
| if (which == "部门") { | |||
| GetDepartment(that, value) | |||
| } | |||
| }, | |||
| util: function (currentStatu) { | |||
| /* 动画部分 */ | |||
| // 第1步:创建动画实例 | |||
| var animation = wx.createAnimation({ | |||
| duration: 200, //动画时长 | |||
| timingFunction: "linear", //线性 | |||
| delay: 0 //0则不延迟 | |||
| }); | |||
| // 第2步:这个动画实例赋给当前的动画实例 | |||
| this.animation = animation; | |||
| // 第3步:执行第一组动画 | |||
| animation.opacity(0).rotateX(-100).step(); | |||
| // 第4步:导出动画对象赋给数据对象储存 | |||
| this.setData({ | |||
| animationData: animation.export() | |||
| }) | |||
| // 第5步:设置定时器到指定时候后,执行第二组动画 | |||
| setTimeout(function () { | |||
| // 执行第二组动画 | |||
| animation.opacity(1).rotateX(0).step(); | |||
| // 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象 | |||
| this.setData({ | |||
| animationData: animation | |||
| }) | |||
| //关闭 | |||
| if (currentStatu == "close") { | |||
| this.setData({ | |||
| showModalStatus: false, | |||
| }); | |||
| } | |||
| }.bind(this), 200) | |||
| // 显示 | |||
| if (currentStatu == "open") { | |||
| // 调用函数时,传入new Date()参数,返回值是日期和时间 | |||
| // 再通过setData更改Page()里面的data,动态更新页面的数据 | |||
| this.setData({ | |||
| showModalStatus: true, | |||
| }); | |||
| } | |||
| } | |||
| }) | |||
| @ -0,0 +1,3 @@ | |||
| { | |||
| "navigationBarTitleText": "业务担保明细" | |||
| } | |||
| @ -0,0 +1,83 @@ | |||
| <!--pages/updataguarantee/updataguarantee.wxml--> | |||
| <view class='twoitem'> | |||
| <text>结账客户</text> | |||
| <text class='item_value'>{{accountcustomer[accountcustomerIndex].Name}}</text> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>会计单位</text> | |||
| <text class='item_value'>{{accountUnit[accountUnitIndex].Name}}</text> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>部门</text> | |||
| <text class='item_value' bindtap="powerDrawer" data-statu="open" data-x='部门' data-item='{{which}}'>{{department[departmentIndex].Name}}</text> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>担保日期</text> | |||
| <picker class='item_value' mode="date" value="{{guaranteedate}}" start="2018-01-01" end="2037-12-31" bindchange="bindguaranteeDateChange"> | |||
| <view class="picker"> | |||
| {{guaranteedate}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>承诺回款日期</text> | |||
| <picker class='item_value1' mode="date" value="{{paydate}}" start="2018-01-01" end="2037-12-31" bindchange="bindpayDateChange"> | |||
| <view class="picker"> | |||
| {{paydate}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>担保金额</text> | |||
| <text class='item_value'>{{guaranteeMoney}}</text> | |||
| </view> | |||
| <view class="custmer_list"> | |||
| <view class="custmer_list_view_main" wx:for="{{array}}" wx:key="item" wx:for-index="idx"> | |||
| <view class='tips'>担保明细{{idx+1}}</view> | |||
| <view class='custmer_list_view' data-Data='{{item}}'> | |||
| <view class='itemview_h'> | |||
| <text class='text_id'>{{item.DmoTypeIDName}}No.{{item.BillID}}</text> | |||
| <text class='text_id'>金额:{{item.Value}}</text> | |||
| </view> | |||
| <view class='itemview_h'> | |||
| <text class='text_name'>{{item.Customer_Name}}</text> | |||
| <text class='text_name'>日期:{{item.Date}}</text> | |||
| </view> | |||
| </view> | |||
| <view class='view_line_main'> | |||
| <view class='view_line'></view> | |||
| </view> | |||
| <view class="delete {{showView?'show':'hide'}}" catchtap='deleteItem' data-idx='{{idx}}'>删除</view> | |||
| </view> | |||
| </view> | |||
| <button class="submit {{showView?'show':'hide'}}" catchtap='addBills'>添加单据</button> | |||
| <button class="submit2 {{showView?'show':'hide'}}" catchtap='submitForm'>保存</button> | |||
| <view class="drawer_screen" bindtap="powerDrawer" data-item='{{which}}' data-statu="close" wx:if="{{showModalStatus}}"></view> | |||
| <!--content--> | |||
| <!--使用animation属性指定需要执行的动画--> | |||
| <view animation="{{animationData}}" data-item='{{which}}' class="drawer_box" wx:if="{{showModalStatus}}"> | |||
| <!--drawer content--> | |||
| <view class='top' data-item='{{which}}'> | |||
| <input data-item='{{which}}' class="sousuo" bindinput="select" placeholder='请输入搜索'> | |||
| </input> | |||
| </view> | |||
| <view class="drawer_content"> | |||
| <block wx:for="{{currency}}" wx:key="item" wx:for-index="idx"> | |||
| <view class="grid1" data-item='{{which}}' catchtap='itemclick' data-idx='{{idx}}' data-ID="{{item.ID}}" data-Name='{{item.Name}}'> | |||
| <text class='text3'>{{item.Name}}</text> | |||
| </view> | |||
| </block> | |||
| </view> | |||
| <view class="btn_ok" bindtap="powerDrawer" data-statu="close">取消</view> | |||
| </view> | |||
| @ -0,0 +1,187 @@ | |||
| /* pages/updataguarantee/updataguarantee.wxss */ | |||
| page { | |||
| background: rgb(240, 239, 245); | |||
| } | |||
| .twoitem{ | |||
| display: flex; | |||
| flex-direction: row; | |||
| justify-content: space-between; | |||
| padding-right: 5%; | |||
| padding-left: 5%; | |||
| background: #fff; | |||
| border-bottom: 1rpx solid #dbdbdb; | |||
| padding-top: 20rpx; | |||
| padding-bottom: 20rpx; | |||
| } | |||
| .item_value{ | |||
| width: 70%; | |||
| text-align: right | |||
| } | |||
| .item_value1{ | |||
| width: 60%; | |||
| text-align: right | |||
| } | |||
| .submit { | |||
| margin-top: 50rpx; | |||
| margin-bottom: 30rpx; | |||
| display: flex; | |||
| flex-direction: row; | |||
| align-items: center; | |||
| justify-content: center; | |||
| } | |||
| .submit2 { | |||
| margin-left: 5%; | |||
| margin-top: 10%; | |||
| width: 90%; | |||
| margin-right: 5%; | |||
| color: #fff; | |||
| background: linear-gradient(to right, #39c4fd, #539eef); | |||
| } | |||
| .custmer_list{ | |||
| margin-top: 20rpx; | |||
| } | |||
| .custmer_list_view{ | |||
| display: flex; | |||
| flex-direction: column; | |||
| padding-left: 5%; | |||
| padding-top: 16rpx; | |||
| background: white; | |||
| } | |||
| .itemview_h{ | |||
| display: flex; | |||
| flex-direction: row; | |||
| justify-content: space-between; | |||
| padding-top: 10rpx; | |||
| padding-right: 5%; | |||
| padding-bottom: 10rpx; | |||
| } | |||
| .text_name{ | |||
| font-size: 28rpx; | |||
| color: rgb(136, 136, 136); | |||
| } | |||
| .text_id{ | |||
| font-size: 32rpx; | |||
| color: rgb(48, 48, 48); | |||
| } | |||
| .view_line_main{ | |||
| background: white | |||
| } | |||
| .view_line{ | |||
| width: 92%; | |||
| height: 2rpx; | |||
| margin-left: 4%; | |||
| margin-right: 4%; | |||
| background: rgb(219, 219, 219); | |||
| } | |||
| .delete { | |||
| width: 100%; | |||
| padding-top: 20rpx; | |||
| padding-bottom: 20rpx; | |||
| color: red; | |||
| display: flex; | |||
| flex-direction: row; | |||
| align-items: center; | |||
| justify-content: center; | |||
| background: #fff; | |||
| border-bottom: 2rpx solid rgb(219, 219, 219); | |||
| font-size: 30rpx; | |||
| } | |||
| .tips{ | |||
| font-size: 26rpx; | |||
| padding-top: 10rpx; | |||
| } | |||
| .hide { | |||
| display: none; | |||
| } | |||
| .show { | |||
| display: flex; | |||
| } | |||
| .drawer_screen { | |||
| width: 100%; | |||
| height: 100%; | |||
| position: fixed; | |||
| top: 0; | |||
| left: 0; | |||
| z-index: 1000; | |||
| background: #000; | |||
| opacity: 0.5; | |||
| overflow: hidden; | |||
| } | |||
| .drawer_box { | |||
| width: 650rpx; | |||
| overflow: hidden; | |||
| position: fixed; | |||
| top: 50%; | |||
| left: 0; | |||
| z-index: 1001; | |||
| background: #fafafa; | |||
| margin: -150px 50rpx 0 50rpx; | |||
| border-radius: 3px; | |||
| } | |||
| .top { | |||
| height: 20%; | |||
| justify-content: center; | |||
| align-items: center; | |||
| } | |||
| .sousuo { | |||
| margin-right: 10%; | |||
| margin-left: 10%; | |||
| text-align: center; | |||
| background: #d6d8da; | |||
| height: 40px; | |||
| font-size: 28rpx; | |||
| } | |||
| .drawer_content { | |||
| height: 500rpx; | |||
| overflow-y: scroll; /*超出父盒子高度可滚动*/ | |||
| } | |||
| .btn_ok { | |||
| padding: 10px; | |||
| font: 20px "microsoft yahei"; | |||
| text-align: center; | |||
| border-top: 1px solid #e8e8ea; | |||
| color: #3cc51f; | |||
| } | |||
| .grid1 { | |||
| width: 100%; | |||
| border-bottom: 1px solid #c3c3c3; | |||
| padding-top: 5px; | |||
| padding-bottom: 10px; | |||
| } | |||
| .text3 { | |||
| font-size: 18px; | |||
| color: rgb(48, 48, 48); | |||
| } | |||
| @ -0,0 +1,125 @@ | |||
| // pages/updataguaranteeno/updataguaranteeno.js已审核 | |||
| var network = require("../../../utils/net.js") | |||
| var timechage = require("../../../utils/dateTimeUtil.js") | |||
| function load(that,ID){ | |||
| let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/Load'; | |||
| let params = [ID]; | |||
| network.transfer_request(method, params, function (res) { | |||
| if (res.result.GuaranteeDate!=null){ | |||
| that.setData({ | |||
| guaranteedate: timechage.formatTimeTwo(res.result.GuaranteeDate.substring(6, 19), 'Y-M-D'), | |||
| }) | |||
| } | |||
| if (res.result.CashBackDate!=null){ | |||
| that.setData({ | |||
| CashBackDate: timechage.formatTimeTwo(res.result.CashBackDate.substring(6, 19), 'Y-M-D') | |||
| }) | |||
| } | |||
| if (res.result.GuaranteeMoney!=null){ | |||
| that.setData({ | |||
| GuaranteeMoney: res.result.GuaranteeMoney, | |||
| }) | |||
| } | |||
| that.setData({ | |||
| Customer_Name: res.result.Customer_Name, | |||
| AccountingUnit_Name: res.result.AccountingUnit_Name, | |||
| Department_Name: res.result.Department_Name, | |||
| }) | |||
| setDetails(that,res.result.Details) | |||
| }) | |||
| } | |||
| function setDetails(that,ary){ | |||
| let array=[] | |||
| for(var i=0;i<ary.length;i++){ | |||
| let data=""; | |||
| if (ary[i].Date!=null){ | |||
| data = timechage.formatTimeTwo(ary[i].Date.substring(6, 19), 'Y-M-D') | |||
| } | |||
| var dmo={ | |||
| DmoTypeIDName: ary[i].DmoTypeIDName, | |||
| BillID: ary[i].BillID, | |||
| Value: ary[i].Value, | |||
| Customer_Name: ary[i].Customer_Name, | |||
| Date: data | |||
| } | |||
| array.push(dmo) | |||
| } | |||
| that.setData({ | |||
| array: array | |||
| }) | |||
| } | |||
| Page({ | |||
| /** | |||
| * 页面的初始数据 | |||
| */ | |||
| data: { | |||
| array:[], | |||
| Customer_Name:"", | |||
| AccountingUnit_Name:"", | |||
| Department_Name:"", | |||
| guaranteedate:"", | |||
| CashBackDate:"", | |||
| GuaranteeMoney:"" | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function (options) { | |||
| var that = this; | |||
| let ID = Number(options.ID) | |||
| wx.setNavigationBarTitle({ | |||
| title: '业务担保单No.' + ID, | |||
| }) | |||
| load(that,ID) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onReady: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function () { | |||
| }, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| */ | |||
| onPullDownRefresh: function () { | |||
| }, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom: function () { | |||
| }, | |||
| }) | |||
| @ -0,0 +1,3 @@ | |||
| { | |||
| "navigationBarTitleText": "业务担保明细" | |||
| } | |||
| @ -0,0 +1,49 @@ | |||
| <!--pages/updataguaranteeno/updataguaranteeno.wxml--> | |||
| <view class='twoitem'> | |||
| <text>结账客户</text> | |||
| <text class='item_value'>{{Customer_Name}}</text> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>会计单位</text> | |||
| <text class='item_value'>{{AccountingUnit_Name}}</text> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>部门</text> | |||
| <text class='item_value' >{{Department_Name}}</text> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>担保日期</text> | |||
| <text class='item_value'>{{guaranteedate}}</text> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>承诺回款日期</text> | |||
| <text class='item_value1'>{{CashBackDate}}</text> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>担保金额</text> | |||
| <text class='item_value'>{{GuaranteeMoney}}</text> | |||
| </view> | |||
| <view class="custmer_list"> | |||
| <view class="custmer_list_view_main" wx:for="{{array}}" wx:key="item" wx:for-index="idx"> | |||
| <view class='tips'>担保明细{{idx+1}}</view> | |||
| <view class='custmer_list_view' data-Data='{{item}}'> | |||
| <view class='itemview_h'> | |||
| <text class='text_id'>{{item.DmoTypeIDName}}No.{{item.BillID}}</text> | |||
| <text class='text_id'>金额:{{item.Value}}</text> | |||
| </view> | |||
| <view class='itemview_h'> | |||
| <text class='text_name'>{{item.Customer_Name}}</text> | |||
| <text class='text_name'>日期:{{item.Date}}</text> | |||
| </view> | |||
| </view> | |||
| <view class='view_line_main'> | |||
| <view class='view_line'></view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| @ -0,0 +1,92 @@ | |||
| /* pages/updataguaranteeno/updataguaranteeno.wxss */ | |||
| page { | |||
| background: rgb(240, 239, 245); | |||
| } | |||
| .twoitem{ | |||
| display: flex; | |||
| flex-direction: row; | |||
| justify-content: space-between; | |||
| padding-right: 5%; | |||
| padding-left: 5%; | |||
| background: #fff; | |||
| border-bottom: 1rpx solid #dbdbdb; | |||
| padding-top: 20rpx; | |||
| padding-bottom: 20rpx; | |||
| } | |||
| .item_value{ | |||
| width: 70%; | |||
| text-align: right | |||
| } | |||
| .item_value1{ | |||
| width: 60%; | |||
| text-align: right | |||
| } | |||
| .submit { | |||
| margin-top: 50rpx; | |||
| margin-bottom: 30rpx; | |||
| } | |||
| .custmer_list{ | |||
| margin-top: 20rpx; | |||
| } | |||
| .custmer_list_view{ | |||
| display: flex; | |||
| flex-direction: column; | |||
| padding-left: 5%; | |||
| padding-top: 16rpx; | |||
| background: white; | |||
| } | |||
| .itemview_h{ | |||
| display: flex; | |||
| flex-direction: row; | |||
| justify-content: space-between; | |||
| padding-top: 10rpx; | |||
| padding-right: 5%; | |||
| padding-bottom: 10rpx; | |||
| } | |||
| .text_name{ | |||
| font-size: 28rpx; | |||
| color: rgb(136, 136, 136); | |||
| } | |||
| .text_id{ | |||
| font-size: 32rpx; | |||
| color: rgb(48, 48, 48); | |||
| } | |||
| .view_line_main{ | |||
| background: white | |||
| } | |||
| .view_line{ | |||
| width: 92%; | |||
| height: 2rpx; | |||
| margin-left: 4%; | |||
| margin-right: 4%; | |||
| background: rgb(219, 219, 219); | |||
| } | |||
| .delete { | |||
| width: 100%; | |||
| padding-top: 20rpx; | |||
| padding-bottom: 20rpx; | |||
| color: red; | |||
| display: flex; | |||
| flex-direction: row; | |||
| align-items: center; | |||
| justify-content: center; | |||
| background: #fff; | |||
| border-bottom: 2rpx solid rgb(219, 219, 219); | |||
| font-size: 30rpx; | |||
| } | |||
| .tips{ | |||
| font-size: 26rpx; | |||
| padding-top: 10rpx; | |||
| } | |||
| @ -0,0 +1,235 @@ | |||
| // pages/guarantee/guarantee.js | |||
| var network = require("../../utils/net.js") | |||
| var timechage = require("../../utils/dateTimeUtil.js") | |||
| var PageIndexN = 0 | |||
| var PageSizeN = 10 | |||
| var PageIndexY = 0 | |||
| var PageSizeY = 10 | |||
| function getListN(that, PageIndex, PageSize) { | |||
| let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/GetList'; | |||
| let params = [0,PageIndex, PageSize]; | |||
| network.transfer_request(method, params, function (res) { | |||
| that.setData({ | |||
| arrayNN:res.result | |||
| }) | |||
| setTimeN(that) | |||
| }) | |||
| } | |||
| function setTimeN(that){ | |||
| let array = []; | |||
| for (var i = 0; i < that.data.arrayNN.length;i++){ | |||
| var dmo={ | |||
| ID: that.data.arrayNN[i].ID, | |||
| GuaranteeMoney: that.data.arrayNN[i].GuaranteeMoney, | |||
| Customer_Name: that.data.arrayNN[i].Customer_Name, | |||
| GuaranteeDate: timechage.formatTimeTwo(that.data.arrayNN[i].GuaranteeDate.substring(6, 19), 'Y-M-D') | |||
| } | |||
| array.push(dmo); | |||
| } | |||
| that.setData({ | |||
| arrayN: array | |||
| }) | |||
| } | |||
| function getListY(that, PageIndex, PageSize) { | |||
| let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/GetList'; | |||
| let params = [20, PageIndex, PageSize]; | |||
| network.transfer_request(method, params, function (res) { | |||
| that.setData({ | |||
| arrayYY: res.result | |||
| }) | |||
| setTimeY(that) | |||
| }) | |||
| } | |||
| function setTimeY(that) { | |||
| let array = []; | |||
| for (var i = 0; i < that.data.arrayYY.length; i++) { | |||
| var dmo = { | |||
| ID: that.data.arrayYY[i].ID, | |||
| GuaranteeMoney: that.data.arrayYY[i].GuaranteeMoney, | |||
| Customer_Name: that.data.arrayYY[i].Customer_Name, | |||
| GuaranteeDate: timechage.formatTimeTwo(that.data.arrayYY[i].GuaranteeDate.substring(6, 19), 'Y-M-D') | |||
| } | |||
| array.push(dmo); | |||
| } | |||
| that.setData({ | |||
| arrayY: array | |||
| }) | |||
| } | |||
| Page({ | |||
| /** | |||
| * 页面的初始数据 | |||
| */ | |||
| data: { | |||
| winWidth: 0, | |||
| winHeight: 0, | |||
| // tab切换 | |||
| currentTab: 0, | |||
| arrayN:[], | |||
| arrayY: [], | |||
| arrayNN:[], | |||
| arrayYY:[] | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function (options) { | |||
| var that = this; | |||
| /** | |||
| * 获取系统信息 | |||
| */ | |||
| wx.getSystemInfo({ | |||
| success: function (res) { | |||
| that.setData({ | |||
| winWidth: res.windowWidth, | |||
| winHeight: res.windowHeight | |||
| }); | |||
| } | |||
| }); | |||
| getListN(that, PageIndexN, PageSizeN) | |||
| getListY(that, PageIndexY, PageSizeY) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onReady: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function () { | |||
| PageIndexN = 0 | |||
| PageSizeN = 10 | |||
| PageIndexY = 0 | |||
| PageSizeY = 10 | |||
| this.setData({ | |||
| arrayN: [], | |||
| arrayY: [], | |||
| arrayNN: [], | |||
| arrayYY: [] | |||
| }) | |||
| }, | |||
| upperN:function(e){ | |||
| var that = this; | |||
| PageIndexN = 0 | |||
| PageSizeN = 10 | |||
| getListN(that, PageIndexN, PageSizeN) | |||
| }, | |||
| upperY:function(e){ | |||
| var that = this; | |||
| PageIndexY = 0 | |||
| PageSizeY = 10 | |||
| getListY(that, PageIndexY, PageSizeY) | |||
| }, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| * scroll-view的存在屏蔽了下拉刷新 | |||
| */ | |||
| onPullDownRefresh: function () { | |||
| // var that = this; | |||
| // if(this.data.currentTab==0){ | |||
| // PageIndexN = 0 | |||
| // PageSizeN = 10 | |||
| // getListN(that, PageIndexN, PageSizeN) | |||
| // }else{ | |||
| // PageIndexY = 0 | |||
| // PageSizeY = 10 | |||
| // getListY(that, PageIndexY, PageSizeY) | |||
| // } | |||
| // wx.stopPullDownRefresh() //停止下拉刷新 | |||
| }, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom: function () { | |||
| var that = this; | |||
| if(this.data.currentTab == 0){ | |||
| PageIndexN = PageIndexN+1; | |||
| PageSizeN = 10; | |||
| let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/GetList'; | |||
| let params = [0, PageIndexN, PageSizeN]; | |||
| network.transfer_request(method, params, function (res) { | |||
| let addarry = that.data.arrayNN.concat(res.result) | |||
| that.setData({ | |||
| arrayNN:addarry | |||
| }) | |||
| setTimeN(that) | |||
| }) | |||
| }else{ | |||
| PageIndexY = PageIndexY + 1; | |||
| PageSizeY = 10; | |||
| let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/GetList'; | |||
| let params = [20, PageIndexY, PageSizeY]; | |||
| network.transfer_request(method, params, function (res) { | |||
| let addarry = that.data.arrayYY.concat(res.result) | |||
| that.setData({ | |||
| arrayYY:addarry | |||
| }) | |||
| setTimeY(that) | |||
| }) | |||
| } | |||
| }, | |||
| /** | |||
| * 滑动切换tab | |||
| */ | |||
| bindChange: function (e) { | |||
| var that = this; | |||
| that.setData({ | |||
| currentTab: e.detail.current | |||
| }); | |||
| }, | |||
| /** | |||
| * 点击tab切换 | |||
| */ | |||
| swichNav: function (e) { | |||
| var that = this; | |||
| if (this.data.currentTab === e.target.dataset.current) { | |||
| return false; | |||
| } else { | |||
| that.setData({ | |||
| currentTab: e.target.dataset.current | |||
| }) | |||
| } | |||
| }, | |||
| createNew:function(e){ | |||
| wx.navigateTo({ | |||
| url: 'newbill/newbill', | |||
| }) | |||
| }, | |||
| itemclickN:function(e){ | |||
| wx.navigateTo({ | |||
| url: 'detail/detail?ID='+e.currentTarget.dataset.data.ID, | |||
| }) | |||
| }, | |||
| itemclickY:function(e){ | |||
| wx.navigateTo({ | |||
| url: 'detailshow/detailshow?ID=' + e.currentTarget.dataset.data.ID, | |||
| }) | |||
| } | |||
| }) | |||
| @ -0,0 +1,4 @@ | |||
| { | |||
| "navigationBarTitleText": "业务担保", | |||
| "enablePullDownRefresh": true | |||
| } | |||
| @ -0,0 +1,55 @@ | |||
| <!--pages/guarantee/guarantee.wxml--> | |||
| <view class="swiper-tab"> | |||
| <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">未审核</view> | |||
| <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">已审核</view> | |||
| </view> | |||
| <swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{winHeight - 31}}px" bindchange="bindChange"> | |||
| <!-- 未审核 --> | |||
| <swiper-item class="swiper-items"> | |||
| <scroll-view scroll-x="false" scroll-y="true" bindscrolltoupper="upperN" class='scroll-views'> | |||
| <view class="custmer_list"> | |||
| <view class="custmer_list_view_main" wx:for="{{arrayN}}" wx:key="item"> | |||
| <view class='custmer_list_view' catchtap='itemclickN' data-Data='{{item}}'> | |||
| <view class='itemview_h'> | |||
| <text class='text_id'>No.{{item.ID}}</text> | |||
| <text class='text_id'>金额:{{item.GuaranteeMoney}}</text> | |||
| </view> | |||
| <view class='itemview_h'> | |||
| <text class='text_name'>{{item.Customer_Name}}</text> | |||
| <text class='text_name'>担保日期:{{item.GuaranteeDate}}</text> | |||
| </view> | |||
| </view> | |||
| <view class='view_line_main'> | |||
| <view class='view_line'></view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </scroll-view> | |||
| </swiper-item> | |||
| <!-- 已审核 --> | |||
| <swiper-item class="swiper-items"> | |||
| <scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltoupper="upperY"> | |||
| <view class="custmer_list"> | |||
| <view class="custmer_list_view_main" wx:for="{{arrayY}}" wx:key="item"> | |||
| <view class='custmer_list_view' catchtap='itemclickY' data-Data='{{item}}'> | |||
| <view class='itemview_h'> | |||
| <text class='text_id'>No.{{item.ID}}</text> | |||
| <text class='text_id'>金额:{{item.GuaranteeMoney}}</text> | |||
| </view> | |||
| <view class='itemview_h'> | |||
| <text class='text_name'>{{item.Customer_Name}}</text> | |||
| <text class='text_name'>担保日期:{{item.GuaranteeDate}}</text> | |||
| </view> | |||
| </view> | |||
| <view class='view_line_main'> | |||
| <view class='view_line'></view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </scroll-view> | |||
| </swiper-item> | |||
| </swiper> | |||
| <image class='xinjian' bindtap="createNew" src="/imgs/create.png"></image> | |||
| @ -0,0 +1,94 @@ | |||
| /* pages/guarantee/guarantee.wxss */ | |||
| page { | |||
| background: rgb(240, 239, 245); | |||
| } | |||
| .xinjian{ | |||
| width: 160rpx; | |||
| height: 160rpx; | |||
| position: fixed; | |||
| bottom: 60rpx; | |||
| right: 60rpx; | |||
| } | |||
| .swiper-tab { | |||
| width: 100%; | |||
| border-bottom: 2rpx solid #777; | |||
| text-align: center; | |||
| line-height: 80rpx; | |||
| background: white; | |||
| } | |||
| .swiper-tab-list { | |||
| font-size: 30rpx; | |||
| display: inline-block; | |||
| width: 50%; | |||
| color: #777; | |||
| } | |||
| .on { | |||
| color: #2788f8; | |||
| border-bottom: 2rpx solid #2788f8; | |||
| } | |||
| .swiper-box { | |||
| display: block; | |||
| height: 100%; | |||
| width: 100%; | |||
| overflow: hidden; | |||
| } | |||
| .swiper-items { | |||
| height: 100%; | |||
| padding-top: 3%; | |||
| } | |||
| .scroll-views { | |||
| height: 99%; | |||
| } | |||
| ::-webkit-scrollbar { | |||
| width: 0; | |||
| height: 0; | |||
| color: transparent; | |||
| } | |||
| .custmer_list_view{ | |||
| display: flex; | |||
| flex-direction: column; | |||
| padding-left: 5%; | |||
| padding-top: 16rpx; | |||
| background: white; | |||
| } | |||
| .itemview_h{ | |||
| display: flex; | |||
| flex-direction: row; | |||
| justify-content: space-between; | |||
| padding-top: 10rpx; | |||
| padding-right: 5%; | |||
| padding-bottom: 10rpx; | |||
| } | |||
| .text_name{ | |||
| font-size: 28rpx; | |||
| color: rgb(136, 136, 136); | |||
| } | |||
| .text_id{ | |||
| font-size: 32rpx; | |||
| color: rgb(48, 48, 48); | |||
| } | |||
| .view_line_main{ | |||
| background: white | |||
| } | |||
| .view_line{ | |||
| width: 92%; | |||
| height: 2rpx; | |||
| margin-left: 4%; | |||
| margin-right: 4%; | |||
| background: rgb(219, 219, 219); | |||
| } | |||
| @ -0,0 +1,378 @@ | |||
| // pages/createguarantee/createguarantee.js | |||
| var network = require("../../../utils/net.js") | |||
| var timechage = require("../../../utils/dateTimeUtil.js") | |||
| var app = getApp() | |||
| function GetAccountCustomer(that, inputValue) { | |||
| let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountCustomer"; | |||
| let params = [{ | |||
| "InputValue": inputValue, | |||
| "PageIndex": 0, | |||
| "PageSize": 100 | |||
| }]; | |||
| network.transfer_request(method, params, function(res) { | |||
| that.setData({ | |||
| currency: res.result, | |||
| accountcustomer: res.result | |||
| }) | |||
| }) | |||
| that.setData({ | |||
| which: "结账客户" | |||
| }) | |||
| } | |||
| function GetAccountingUnit(that, inputValue) { | |||
| let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountingUnit"; | |||
| let params = [{ | |||
| "InputValue": inputValue, | |||
| "PageIndex": 0, | |||
| "PageSize": 100 | |||
| }]; | |||
| network.transfer_request(method, params, function(res) { | |||
| that.setData({ | |||
| currency: res.result, | |||
| accountUnit: res.result | |||
| }) | |||
| }) | |||
| that.setData({ | |||
| which: "会计单位" | |||
| }) | |||
| } | |||
| function GetDepartment(that, inputValue) { | |||
| let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDepartment"; | |||
| let params = [{ | |||
| "InputValue": inputValue, | |||
| "PageIndex": 0, | |||
| "PageSize": 100 | |||
| }]; | |||
| network.transfer_request(method, params, function(res) { | |||
| that.setData({ | |||
| currency: res.result, | |||
| department: res.result | |||
| }) | |||
| }) | |||
| that.setData({ | |||
| which: "部门" | |||
| }) | |||
| } | |||
| function GetCustomerAccountingUnitBalance(that,accoutUnitId, customerId) { | |||
| let method = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/GetCustomerAccountingUnitBalance"; | |||
| let params = [accoutUnitId, customerId]; | |||
| network.transfer_request(method, params, function(res) { | |||
| that.setData({ | |||
| requestMoney:res.result, | |||
| guaranteeMoney:res.result+that.data.allBillMoney | |||
| }) | |||
| }) | |||
| } | |||
| Page({ | |||
| /** | |||
| * 页面的初始数据 | |||
| */ | |||
| data: { | |||
| currency: [], | |||
| accountcustomerIndex: 0, | |||
| accountcustomer: [{ | |||
| ID: 0, | |||
| Name: "请选择结账客户" | |||
| }], | |||
| accountUnitIndex: 0, | |||
| accountUnit: [], | |||
| departmentIndex: 0, | |||
| department: [], | |||
| guaranteedate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'), | |||
| paydate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'), | |||
| guaranteeMoney: '', | |||
| requestMoney:0, | |||
| allBillMoney:0, | |||
| array: [] | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function(options) { | |||
| this.setData({ | |||
| accountUnit: [{ | |||
| ID: app.globalData.AccountingUnit_ID, | |||
| Name: app.globalData.AccountingUnit_Name | |||
| }], | |||
| department: [{ | |||
| ID: app.globalData.Department_ID, | |||
| Name: app.globalData.Department_Name | |||
| }], | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onReady: function() { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow: function() { | |||
| this.setData({ | |||
| array: app.globalData.billInfo | |||
| }) | |||
| let billMoney=0; | |||
| if(this.data.array!=null || this.data.array!=""){ | |||
| for(var i =0;i<this.data.array.length;i++){ | |||
| billMoney = billMoney + this.data.array[i].Money | |||
| } | |||
| } | |||
| this.setData({ | |||
| allBillMoney: billMoney, | |||
| guaranteeMoney: billMoney+this.data.requestMoney | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function() { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function() { | |||
| app.globalData.billInfo = []; | |||
| }, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| */ | |||
| onPullDownRefresh: function() { | |||
| }, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom: function() { | |||
| }, | |||
| bindguaranteeDateChange: function(e) { | |||
| this.setData({ | |||
| guaranteedate: e.detail.value | |||
| }) | |||
| }, | |||
| bindpayDateChange: function(e) { | |||
| this.setData({ | |||
| paydate: e.detail.value | |||
| }) | |||
| }, | |||
| addBills: function(e) { | |||
| let accountCustomerId = this.data.accountcustomer[this.data.accountcustomerIndex].ID; | |||
| if (accountCustomerId == 0) { | |||
| wx.showToast({ | |||
| title: '请选择结账客户', | |||
| }) | |||
| return; | |||
| } | |||
| wx.navigateTo({ | |||
| url: '../selectbill/selectbill?customerid=' + accountCustomerId, | |||
| }) | |||
| }, | |||
| deleteItem: function(e) { | |||
| let idx = e.currentTarget.dataset.idx; | |||
| app.globalData.billInfo.splice(idx, 1) | |||
| this.setData({ | |||
| array: app.globalData.billInfo | |||
| }) | |||
| let billMoney = 0; | |||
| if (this.data.array != null || this.data.array != "") { | |||
| for (var i = 0; i < this.data.array.length; i++) { | |||
| billMoney = billMoney + this.data.array[i].Money | |||
| } | |||
| } | |||
| this.setData({ | |||
| allBillMoney: billMoney, | |||
| guaranteeMoney: billMoney + this.data.requestMoney | |||
| }) | |||
| }, | |||
| submitForm: function(e) { | |||
| let accountCustomerId = this.data.accountcustomer[this.data.accountcustomerIndex].ID; | |||
| let accountUnitId = this.data.accountUnit[this.data.accountUnitIndex].ID; | |||
| let departmentId = this.data.department[this.data.departmentIndex].ID; | |||
| let guaranteeDate = timechage.formatymdERTDate(this.data.guaranteedate); | |||
| let payDate = timechage.formatymdERTDate(this.data.paydate); | |||
| if (accountUnitId==0){ | |||
| wx.showToast({ | |||
| title: '请选择会计单位', | |||
| }) | |||
| return; | |||
| } | |||
| if (departmentId==0){ | |||
| wx.showToast({ | |||
| title: '请选择部门', | |||
| }) | |||
| return | |||
| } | |||
| // if (this.data.guaranteeMoney==''){ | |||
| // wx.showToast({ | |||
| // title: '请添加担保单', | |||
| // }) | |||
| // return | |||
| // } | |||
| let detailsArray = []; | |||
| for(var i=0;i<this.data.array.length;i++){ | |||
| var dmo={ | |||
| BillID:this.data.array[i].ID, | |||
| DmoTypeID: this.data.array[i].BillTypeID | |||
| } | |||
| detailsArray.push(dmo) | |||
| } | |||
| let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/Insert'; | |||
| let params = [{ | |||
| "Customer_ID": accountCustomerId, | |||
| "AccountingUnit_ID": accountUnitId, | |||
| "Department_ID": departmentId, | |||
| "GuaranteeDate": guaranteeDate, | |||
| "CashBackDate": payDate, | |||
| "GuaranteeMoney": this.data.guaranteeMoney, | |||
| "Details": detailsArray | |||
| }]; | |||
| network.transfer_request(method, params, function (res) { | |||
| if (res.result != null) { | |||
| wx.showModal({ | |||
| title: '新建业务担保单No.' + res.result, | |||
| content: '新建成功,是否返回首页', | |||
| success: function (res) { | |||
| if (res.cancel) { | |||
| } else { | |||
| app.globalData.billInfo=[]; | |||
| wx.navigateBack({ | |||
| delta: 1 | |||
| }) | |||
| } | |||
| }, | |||
| fail: function (res) { } | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| powerDrawer: function(e) { | |||
| let that = this; | |||
| let x = e.currentTarget.dataset.x; | |||
| if (x == "结账客户") { | |||
| GetAccountCustomer(that, "") | |||
| } else if (x == "会计单位") { | |||
| GetAccountingUnit(that, "") | |||
| } else if (x == "部门") { | |||
| GetDepartment(that, "") | |||
| } | |||
| let currentStatu = e.currentTarget.dataset.statu; | |||
| this.util(currentStatu) | |||
| }, | |||
| itemclick: function(e) { | |||
| var that = this; | |||
| var name = e.currentTarget.dataset.name; | |||
| var id = e.currentTarget.dataset.id; | |||
| var which = e.currentTarget.dataset.item; | |||
| var idx = e.currentTarget.dataset.idx; | |||
| if (which == "结账客户") { | |||
| that.setData({ | |||
| accountcustomerIndex: idx | |||
| }) | |||
| } | |||
| if (which == "会计单位") { | |||
| that.setData({ | |||
| accountUnitIndex: idx | |||
| }) | |||
| } | |||
| if (which == "部门") { | |||
| that.setData({ | |||
| departmentIndex: idx | |||
| }) | |||
| } | |||
| GetCustomerAccountingUnitBalance(that,that.data.accountUnit[that.data.accountUnitIndex].ID, that.data.accountcustomer[that.data.accountcustomerIndex].ID) | |||
| this.setData({ | |||
| showModalStatus: false, | |||
| }) | |||
| }, | |||
| select: function(e) { | |||
| var that = this; | |||
| var which = e.currentTarget.dataset.item; | |||
| var value = e.detail.value; | |||
| if (which == "结账客户") { | |||
| GetAccountCustomer(that, value) | |||
| } | |||
| if (which == "会计单位") { | |||
| GetAccountingUnit(that, value) | |||
| } | |||
| if (which == "部门") { | |||
| GetDepartment(that, value) | |||
| } | |||
| }, | |||
| util: function(currentStatu) { | |||
| /* 动画部分 */ | |||
| // 第1步:创建动画实例 | |||
| var animation = wx.createAnimation({ | |||
| duration: 200, //动画时长 | |||
| timingFunction: "linear", //线性 | |||
| delay: 0 //0则不延迟 | |||
| }); | |||
| // 第2步:这个动画实例赋给当前的动画实例 | |||
| this.animation = animation; | |||
| // 第3步:执行第一组动画 | |||
| animation.opacity(0).rotateX(-100).step(); | |||
| // 第4步:导出动画对象赋给数据对象储存 | |||
| this.setData({ | |||
| animationData: animation.export() | |||
| }) | |||
| // 第5步:设置定时器到指定时候后,执行第二组动画 | |||
| setTimeout(function() { | |||
| // 执行第二组动画 | |||
| animation.opacity(1).rotateX(0).step(); | |||
| // 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象 | |||
| this.setData({ | |||
| animationData: animation | |||
| }) | |||
| //关闭 | |||
| if (currentStatu == "close") { | |||
| this.setData({ | |||
| showModalStatus: false, | |||
| }); | |||
| } | |||
| }.bind(this), 200) | |||
| // 显示 | |||
| if (currentStatu == "open") { | |||
| // 调用函数时,传入new Date()参数,返回值是日期和时间 | |||
| // 再通过setData更改Page()里面的data,动态更新页面的数据 | |||
| this.setData({ | |||
| showModalStatus: true, | |||
| }); | |||
| } | |||
| } | |||
| }) | |||
| @ -0,0 +1,3 @@ | |||
| { | |||
| "navigationBarTitleText": "业务担保新建" | |||
| } | |||
| @ -0,0 +1,83 @@ | |||
| <!--pages/createguarantee/createguarantee.wxml--> | |||
| <view class='twoitem'> | |||
| <text>结账客户</text> | |||
| <text class='item_value' bindtap="powerDrawer" data-statu="open" data-x='结账客户' data-item='{{which}}'>{{accountcustomer[accountcustomerIndex].Name}}</text> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>会计单位</text> | |||
| <text class='item_value' bindtap="powerDrawer" data-statu="open" data-x='会计单位' data-item='{{which}}'>{{accountUnit[accountUnitIndex].Name}}</text> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>部门</text> | |||
| <text class='item_value' bindtap="powerDrawer" data-statu="open" data-x='部门' data-item='{{which}}'>{{department[departmentIndex].Name}}</text> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>担保日期</text> | |||
| <picker class='item_value' mode="date" value="{{guaranteedate}}" start="2018-01-01" end="2037-12-31" bindchange="bindguaranteeDateChange"> | |||
| <view class="picker"> | |||
| {{guaranteedate}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>承诺回款日期</text> | |||
| <picker class='item_value1' mode="date" value="{{paydate}}" start="2018-01-01" end="2037-12-31" bindchange="bindpayDateChange"> | |||
| <view class="picker"> | |||
| {{paydate}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view class='twoitem'> | |||
| <text>担保金额</text> | |||
| <text class='item_value'>{{guaranteeMoney}}</text> | |||
| </view> | |||
| <view class="custmer_list"> | |||
| <view class="custmer_list_view_main" wx:for="{{array}}" wx:key="item" wx:for-index="idx"> | |||
| <view class='tips'>担保明细{{idx+1}}</view> | |||
| <view class='custmer_list_view' catchtap='itemclick' data-Data='{{item}}'> | |||
| <view class='itemview_h'> | |||
| <text class='text_id'>{{item.BillTypeName}}No.{{item.ID}}</text> | |||
| <text class='text_id'>金额:{{item.Money}}</text> | |||
| </view> | |||
| <view class='itemview_h'> | |||
| <text class='text_name'>{{item.Customer_Name}}</text> | |||
| <text class='text_name'>日期:{{item.Date}}</text> | |||
| </view> | |||
| </view> | |||
| <view class='view_line_main'> | |||
| <view class='view_line'></view> | |||
| </view> | |||
| <view class='delete' catchtap='deleteItem' data-idx='{{idx}}'>删除</view> | |||
| </view> | |||
| </view> | |||
| <button class='submit' catchtap='addBills'>添加单据</button> | |||
| <button class='submit' catchtap='submitForm'>提交</button> | |||
| <view class="drawer_screen" bindtap="powerDrawer" data-item='{{which}}' data-statu="close" wx:if="{{showModalStatus}}"></view> | |||
| <!--content--> | |||
| <!--使用animation属性指定需要执行的动画--> | |||
| <view animation="{{animationData}}" data-item='{{which}}' class="drawer_box" wx:if="{{showModalStatus}}"> | |||
| <!--drawer content--> | |||
| <view class='top' data-item='{{which}}'> | |||
| <input data-item='{{which}}' class="sousuo" bindinput="select" placeholder='请输入搜索'> | |||
| </input> | |||
| </view> | |||
| <view class="drawer_content"> | |||
| <block wx:for="{{currency}}" wx:key="item" wx:for-index="idx"> | |||
| <view class="grid1" data-item='{{which}}' catchtap='itemclick' data-idx='{{idx}}' data-ID="{{item.ID}}" data-Name='{{item.Name}}'> | |||
| <text class='text3'>{{item.Name}}</text> | |||
| </view> | |||
| </block> | |||
| </view> | |||
| <view class="btn_ok" bindtap="powerDrawer" data-statu="close">取消</view> | |||
| </view> | |||
| @ -0,0 +1,168 @@ | |||
| /* pages/createguarantee/createguarantee.wxss */ | |||
| page { | |||
| background: rgb(240, 239, 245); | |||
| } | |||
| .twoitem{ | |||
| display: flex; | |||
| flex-direction: row; | |||
| justify-content: space-between; | |||
| padding-right: 5%; | |||
| padding-left: 5%; | |||
| background: #fff; | |||
| border-bottom: 1rpx solid #dbdbdb; | |||
| padding-top: 20rpx; | |||
| padding-bottom: 20rpx; | |||
| } | |||
| .item_value{ | |||
| width: 70%; | |||
| text-align: right | |||
| } | |||
| .item_value1{ | |||
| width: 60%; | |||
| text-align: right | |||
| } | |||
| .submit { | |||
| margin-top: 50rpx; | |||
| margin-bottom: 30rpx; | |||
| } | |||
| .custmer_list{ | |||
| margin-top: 20rpx; | |||
| } | |||
| .custmer_list_view{ | |||
| display: flex; | |||
| flex-direction: column; | |||
| padding-left: 5%; | |||
| padding-top: 16rpx; | |||
| background: white; | |||
| } | |||
| .itemview_h{ | |||
| display: flex; | |||
| flex-direction: row; | |||
| justify-content: space-between; | |||
| padding-top: 10rpx; | |||
| padding-right: 5%; | |||
| padding-bottom: 10rpx; | |||
| } | |||
| .text_name{ | |||
| font-size: 28rpx; | |||
| color: rgb(136, 136, 136); | |||
| } | |||
| .text_id{ | |||
| font-size: 32rpx; | |||
| color: rgb(48, 48, 48); | |||
| } | |||
| .view_line_main{ | |||
| background: white | |||
| } | |||
| .view_line{ | |||
| width: 92%; | |||
| height: 2rpx; | |||
| margin-left: 4%; | |||
| margin-right: 4%; | |||
| background: rgb(219, 219, 219); | |||
| } | |||
| .delete { | |||
| width: 100%; | |||
| padding-top: 20rpx; | |||
| padding-bottom: 20rpx; | |||
| color: red; | |||
| display: flex; | |||
| flex-direction: row; | |||
| align-items: center; | |||
| justify-content: center; | |||
| background: #fff; | |||
| border-bottom: 2rpx solid rgb(219, 219, 219); | |||
| font-size: 30rpx; | |||
| } | |||
| .tips{ | |||
| font-size: 26rpx; | |||
| padding-top: 10rpx; | |||
| } | |||
| .drawer_screen { | |||
| width: 100%; | |||
| height: 100%; | |||
| position: fixed; | |||
| top: 0; | |||
| left: 0; | |||
| z-index: 1000; | |||
| background: #000; | |||
| opacity: 0.5; | |||
| overflow: hidden; | |||
| } | |||
| .drawer_box { | |||
| width: 650rpx; | |||
| overflow: hidden; | |||
| position: fixed; | |||
| top: 50%; | |||
| left: 0; | |||
| z-index: 1001; | |||
| background: #fafafa; | |||
| margin: -150px 50rpx 0 50rpx; | |||
| border-radius: 3px; | |||
| } | |||
| .top { | |||
| height: 20%; | |||
| justify-content: center; | |||
| align-items: center; | |||
| } | |||
| .sousuo { | |||
| margin-right: 10%; | |||
| margin-left: 10%; | |||
| text-align: center; | |||
| background: #d6d8da; | |||
| height: 40px; | |||
| font-size: 28rpx; | |||
| } | |||
| .drawer_content { | |||
| height: 500rpx; | |||
| overflow-y: scroll; /*超出父盒子高度可滚动*/ | |||
| } | |||
| .btn_ok { | |||
| padding: 10px; | |||
| font: 20px "microsoft yahei"; | |||
| text-align: center; | |||
| border-top: 1px solid #e8e8ea; | |||
| color: #2E8CF5; | |||
| } | |||
| .grid1 { | |||
| width: 100%; | |||
| border-bottom: 1px solid #c3c3c3; | |||
| padding-top: 5px; | |||
| padding-bottom: 10px; | |||
| } | |||
| .text3 { | |||
| font-size: 18px; | |||
| color: rgb(48, 48, 48); | |||
| } | |||
| @ -0,0 +1,226 @@ | |||
| var network = require("../../../utils/net.js") | |||
| var timechage = require("../../../utils/dateTimeUtil.js") | |||
| var app = getApp() | |||
| var customerid=0; | |||
| function getBillForDetail777(that,id){ | |||
| let method = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/GetBillForDetail"; | |||
| let params = [id,777]; | |||
| network.transfer_request(method, params, function (res) { | |||
| let array=[]; | |||
| for(var i=0;i<res.result.length;i++){ | |||
| var dmo={ | |||
| BillTypeID: res.result[i].BillTypeID, | |||
| BillTypeName: res.result[i].BillTypeName, | |||
| Customer_Name: res.result[i].Customer_Name, | |||
| ID:res.result[i].ID, | |||
| Money: res.result[i].Money, | |||
| Date: timechage.formatTimeTwo(res.result[i].Date.substring(6, 19), 'Y-M-D') | |||
| } | |||
| array.push(dmo) | |||
| } | |||
| that.setData({ | |||
| arrayOut:array | |||
| }) | |||
| }) | |||
| } | |||
| function getBillForDetail792(that, id) { | |||
| let method = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/GetBillForDetail"; | |||
| let params = [id, 792]; | |||
| network.transfer_request(method, params, function (res) { | |||
| let array = []; | |||
| for (var i = 0; i < res.result.length; i++) { | |||
| var dmo = { | |||
| BillTypeID: res.result[i].BillTypeID, | |||
| BillTypeName: res.result[i].BillTypeName, | |||
| Customer_Name: res.result[i].Customer_Name, | |||
| ID: res.result[i].ID, | |||
| Money: res.result[i].Money, | |||
| Date: timechage.formatTimeTwo(res.result[i].Date.substring(6, 19), 'Y-M-D') | |||
| } | |||
| array.push(dmo) | |||
| } | |||
| that.setData({ | |||
| arrayCheck: array | |||
| }) | |||
| }) | |||
| } | |||
| function getBillForDetail776(that, id) { | |||
| let method = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/GetBillForDetail"; | |||
| let params = [id, 776]; | |||
| network.transfer_request(method, params, function (res) { | |||
| let array = []; | |||
| for (var i = 0; i < res.result.length; i++) { | |||
| var dmo = { | |||
| BillTypeID: res.result[i].BillTypeID, | |||
| BillTypeName: res.result[i].BillTypeName, | |||
| Customer_Name: res.result[i].Customer_Name, | |||
| ID: res.result[i].ID, | |||
| Money: res.result[i].Money, | |||
| Date: timechage.formatTimeTwo(res.result[i].Date.substring(6, 19), 'Y-M-D') | |||
| } | |||
| array.push(dmo) | |||
| } | |||
| that.setData({ | |||
| arrayBill: array | |||
| }) | |||
| }) | |||
| } | |||
| Page({ | |||
| /** | |||
| * 页面的初始数据 | |||
| */ | |||
| data: { | |||
| winWidth: 0, | |||
| winHeight: 0, | |||
| // tab切换 | |||
| currentTab: 0, | |||
| arrayOut:[], | |||
| arrayCheck: [], | |||
| arrayBill:[], | |||
| arrayOutChoseID:[], | |||
| arrayCheckChoseID:[], | |||
| arrayBillChoseID:[] | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function (options) { | |||
| customerid = Number(options.customerid) | |||
| var that = this; | |||
| /** | |||
| * 获取系统信息 | |||
| */ | |||
| wx.getSystemInfo({ | |||
| success: function (res) { | |||
| that.setData({ | |||
| winWidth: res.windowWidth, | |||
| winHeight: res.windowHeight | |||
| }); | |||
| } | |||
| }); | |||
| getBillForDetail777(that, customerid) | |||
| getBillForDetail792(that, customerid) | |||
| getBillForDetail776(that, customerid) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onReady: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function () { | |||
| }, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| */ | |||
| onPullDownRefresh: function () { | |||
| }, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom: function () { | |||
| }, | |||
| checkboxOutChange:function(e){ | |||
| this.setData({ | |||
| arrayOutChoseID:e.detail.value | |||
| }) | |||
| }, | |||
| checkboxCheckChange:function(e){ | |||
| this.setData({ | |||
| arrayCheckChoseID: e.detail.value | |||
| }) | |||
| }, | |||
| checkboxBillChange:function(e){ | |||
| this.setData({ | |||
| arrayBillChoseID: e.detail.value | |||
| }) | |||
| }, | |||
| submitForm:function(e){ | |||
| let choseOut=[] | |||
| for (var i = 0; i < this.data.arrayOutChoseID.length;i++){ | |||
| for(var j=0;j<this.data.arrayOut.length;j++){ | |||
| if (Number(this.data.arrayOutChoseID[i]) == this.data.arrayOut[j].ID){ | |||
| choseOut.push(this.data.arrayOut[j]) | |||
| } | |||
| } | |||
| } | |||
| let choseCheck =[] | |||
| for (var i = 0; i < this.data.arrayCheckChoseID.length; i++) { | |||
| for (var j = 0; j < this.data.arrayCheck.length; j++) { | |||
| if (Number(this.data.arrayCheckChoseID[i]) == this.data.arrayCheck[j].ID) { | |||
| choseCheck.push(this.data.arrayCheck[j]) | |||
| } | |||
| } | |||
| } | |||
| let choseBill =[] | |||
| for (var i = 0; i < this.data.arrayBillChoseID.length; i++) { | |||
| for (var j = 0; j < this.data.arrayBill.length; j++) { | |||
| if (Number(this.data.arrayBillChoseID[i]) == this.data.arrayBill[j].ID) { | |||
| choseBill.push(this.data.arrayBill[j]) | |||
| } | |||
| } | |||
| } | |||
| choseOut = choseOut.concat(choseCheck).concat(choseBill) | |||
| app.globalData.billInfo = app.globalData.billInfo.concat(choseOut) | |||
| wx.navigateBack({ | |||
| delta: 1 | |||
| }) | |||
| }, | |||
| /** | |||
| * 滑动切换tab | |||
| */ | |||
| bindChange: function (e) { | |||
| var that = this; | |||
| that.setData({ | |||
| currentTab: e.detail.current | |||
| }); | |||
| }, | |||
| /** | |||
| * 点击tab切换 | |||
| */ | |||
| swichNav: function (e) { | |||
| var that = this; | |||
| if (this.data.currentTab === e.target.dataset.current) { | |||
| return false; | |||
| } else { | |||
| that.setData({ | |||
| currentTab: e.target.dataset.current | |||
| }) | |||
| } | |||
| }, | |||
| }) | |||
| @ -0,0 +1,3 @@ | |||
| { | |||
| "navigationBarTitleText": "选择单据" | |||
| } | |||
| @ -0,0 +1,89 @@ | |||
| <view class="swiper-tab"> | |||
| <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">销售出库</view> | |||
| <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">客户验收</view> | |||
| <view class="swiper-tab-list {{currentTab==2 ? 'on' : ''}}" data-current="2" bindtap="swichNav">销售发票</view> | |||
| </view> | |||
| <swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{winHeight - 31}}px" bindchange="bindChange"> | |||
| <!-- 销售出库 --> | |||
| <swiper-item class="swiper-items"> | |||
| <scroll-view scroll-x="false" scroll-y="true" class='scroll-views'> | |||
| <checkbox-group bindchange="checkboxOutChange" class="custmer_list"> | |||
| <view class="custmer_list_view_main" wx:for="{{arrayOut}}" wx:key="item"> | |||
| <view class='listvalue_item'> | |||
| <checkbox class='mycheckbox' value='{{item.ID}}'></checkbox> | |||
| <view class='custmer_list_view' data-Data='{{item}}'> | |||
| <view class='itemview_h'> | |||
| <text class='text_id'>No.{{item.ID}}</text> | |||
| <text class='text_id'>金额:{{item.Money}}</text> | |||
| </view> | |||
| <view class='itemview_h'> | |||
| <text class='text_name'>{{item.Customer_Name}}</text> | |||
| <text class='text_name'>日期:{{item.Date}}</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view class='view_line_main'> | |||
| <view class='view_line'></view> | |||
| </view> | |||
| </view> | |||
| </checkbox-group> | |||
| </scroll-view> | |||
| </swiper-item> | |||
| <!-- 客户验收 --> | |||
| <swiper-item class="swiper-items"> | |||
| <scroll-view scroll-x="false" scroll-y="true" class='scroll-views'> | |||
| <checkbox-group bindchange="checkboxCheckChange" class="custmer_list"> | |||
| <view class="custmer_list_view_main" wx:for="{{arrayCheck}}" wx:key="item"> | |||
| <view class='listvalue_item'> | |||
| <checkbox class='mycheckbox' value='{{item.ID}}'></checkbox> | |||
| <view class='custmer_list_view' data-Data='{{item}}'> | |||
| <view class='itemview_h'> | |||
| <text class='text_id'>No.{{item.ID}}</text> | |||
| <text class='text_id'>金额:{{item.Money}}</text> | |||
| </view> | |||
| <view class='itemview_h'> | |||
| <text class='text_name'>{{item.Customer_Name}}</text> | |||
| <text class='text_name'>日期:{{item.Date}}</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view class='view_line_main'> | |||
| <view class='view_line'></view> | |||
| </view> | |||
| </view> | |||
| </checkbox-group> | |||
| </scroll-view> | |||
| </swiper-item> | |||
| <!-- 销售发票 --> | |||
| <swiper-item class="swiper-items"> | |||
| <scroll-view scroll-x="false" scroll-y="true" class='scroll-views'> | |||
| <checkbox-group bindchange="checkboxBillChange" class="custmer_list"> | |||
| <view class="custmer_list_view_main" wx:for="{{arrayBill}}" wx:key="item"> | |||
| <view class='listvalue_item'> | |||
| <checkbox class='mycheckbox' value='{{item.ID}}'></checkbox> | |||
| <view class='custmer_list_view' data-Data='{{item}}'> | |||
| <view class='itemview_h'> | |||
| <text class='text_id'>No.{{item.ID}}</text> | |||
| <text class='text_id'>金额:{{item.Money}}</text> | |||
| </view> | |||
| <view class='itemview_h'> | |||
| <text class='text_name'>{{item.Customer_Name}}</text> | |||
| <text class='text_name'>日期:{{item.Date}}</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view class='view_line_main'> | |||
| <view class='view_line'></view> | |||
| </view> | |||
| </view> | |||
| </checkbox-group> | |||
| </scroll-view> | |||
| </swiper-item> | |||
| </swiper> | |||
| <button class='submit' catchtap='submitForm'>提交</button> | |||
| @ -0,0 +1,103 @@ | |||
| /* pages/guaranteebill/guaranteebill.wxss */ | |||
| page { | |||
| background: rgb(240, 239, 245); | |||
| } | |||
| .swiper-tab { | |||
| width: 100%; | |||
| border-bottom: 2rpx solid #777; | |||
| text-align: center; | |||
| line-height: 80rpx; | |||
| background: white; | |||
| } | |||
| .swiper-tab-list { | |||
| font-size: 30rpx; | |||
| display: inline-block; | |||
| width: 33%; | |||
| color: #777; | |||
| } | |||
| .on { | |||
| color: #2788f8; | |||
| border-bottom: 2rpx solid #2788f8; | |||
| } | |||
| .swiper-box { | |||
| display: block; | |||
| height: 100%; | |||
| width: 100%; | |||
| overflow: hidden; | |||
| } | |||
| .swiper-items { | |||
| height: 100%; | |||
| padding-top: 3%; | |||
| } | |||
| .scroll-views { | |||
| height: 100%; | |||
| } | |||
| ::-webkit-scrollbar { | |||
| width: 0; | |||
| height: 0; | |||
| color: transparent; | |||
| } | |||
| .listvalue_item{ | |||
| display: flex; | |||
| flex-direction: row; | |||
| background: white; | |||
| } | |||
| .mycheckbox{ | |||
| display: flex; | |||
| flex-direction: row; | |||
| align-items: center; | |||
| justify-content: center; | |||
| padding-left: 2%; | |||
| } | |||
| .custmer_list_view{ | |||
| display: flex; | |||
| flex-direction: column; | |||
| padding-left: 2%; | |||
| padding-top: 16rpx; | |||
| width: 100%; | |||
| } | |||
| .itemview_h{ | |||
| display: flex; | |||
| flex-direction: row; | |||
| justify-content: space-between; | |||
| padding-top: 10rpx; | |||
| padding-right: 5%; | |||
| padding-bottom: 10rpx; | |||
| } | |||
| .text_name{ | |||
| font-size: 28rpx; | |||
| color: rgb(136, 136, 136); | |||
| } | |||
| .text_id{ | |||
| font-size: 32rpx; | |||
| color: rgb(48, 48, 48); | |||
| } | |||
| .view_line_main{ | |||
| background: white | |||
| } | |||
| .view_line{ | |||
| width: 100%; | |||
| height: 2rpx; | |||
| background: rgb(219, 219, 219); | |||
| } | |||
| .submit{ | |||
| position: fixed; | |||
| bottom: 60rpx; | |||
| width: 90%; | |||
| margin-left: 5%; | |||
| margin-right: 5%; | |||
| } | |||