Browse Source

完善

master
robin 7 years ago
parent
commit
4c8af360e7
12 changed files with 382 additions and 286 deletions
  1. +73
    -43
      pages/guarantee/detail/detail.js
  2. +78
    -67
      pages/guarantee/detail/detail.wxml
  3. +17
    -34
      pages/guarantee/detail/detail.wxss
  4. +64
    -29
      pages/guarantee/newbill/newbill.js
  5. +69
    -67
      pages/guarantee/newbill/newbill.wxml
  6. +6
    -2
      pages/guarantee/newbill/newbill.wxss
  7. +16
    -16
      pages/guarantee/selectbill/selectbill.js
  8. +9
    -9
      pages/guarantee/selectbill/selectbill.wxml
  9. +34
    -14
      pages/order/order.js
  10. +2
    -1
      pages/order/order.json
  11. +4
    -3
      pages/order/order.wxml
  12. +10
    -1
      pages/order/order.wxss

+ 73
- 43
pages/guarantee/detail/detail.js View File

@ -1,30 +1,30 @@
var network = require("../../../utils/net.js")
var timechage = require("../../../utils/dateTimeUtil.js")
var app = getApp()
var orderID=0;
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) {
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){
if (res.result.Customer_Name != null) {
var accountcustomerNew = [{
ID: res.result.Customer_ID,
Name: res.result.Customer_Name
}]
}
let accountUnitNew=[{
let accountUnitNew = [{
ID: res.result.AccountingUnit_ID,
Name: res.result.AccountingUnit_Name
}]
let departmentNew =[{
let departmentNew = [{
ID: res.result.Department_ID,
Name: res.result.Department_Name
}]
@ -56,7 +56,7 @@ function load(that, ID) {
function setDetails(that, ary) {
let array = []
let billMoney=0;
let billMoney = 0;
for (var i = 0; i < ary.length; i++) {
billMoney = billMoney + ary[i].Value
let data = "";
@ -69,7 +69,7 @@ function setDetails(that, ary) {
Value: ary[i].Value,
Customer_Name: ary[i].Customer_Name,
Date: data,
ID:ary[i].ID,
ID: ary[i].ID,
DmoTypeID: ary[i].DmoTypeID
}
array.push(dmo)
@ -90,7 +90,7 @@ function GetAccountCustomer(that, inputValue) {
"PageIndex": 0,
"PageSize": 100
}];
network.transfer_request(method, params, function (res) {
network.transfer_request(method, params, function(res) {
that.setData({
currency: res.result,
accountcustomer: res.result
@ -108,7 +108,7 @@ function GetAccountingUnit(that, inputValue) {
"PageIndex": 0,
"PageSize": 100
}];
network.transfer_request(method, params, function (res) {
network.transfer_request(method, params, function(res) {
that.setData({
currency: res.result,
accountUnit: res.result
@ -126,7 +126,7 @@ function GetDepartment(that, inputValue) {
"PageIndex": 0,
"PageSize": 100
}];
network.transfer_request(method, params, function (res) {
network.transfer_request(method, params, function(res) {
that.setData({
currency: res.result,
department: res.result
@ -140,7 +140,7 @@ function GetDepartment(that, inputValue) {
function GetCustomerAccountingUnitBalance(that, accoutUnitId, customerId) {
let method = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/GetCustomerAccountingUnitBalance";
let params = [accoutUnitId, customerId];
network.transfer_request(method, params, function (res) {
network.transfer_request(method, params, function(res) {
that.setData({
requestMoney: res.result,
guaranteeMoney: res.result + that.data.allBillMoney
@ -179,35 +179,66 @@ Page({
requestMoney: 0,
allBillMoney: 0,
array: [],
showView: false
showView: false,
winHeight: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
var that = this;
let ID = Number(options.ID);
orderID =ID;
orderID = ID;
wx.setNavigationBarTitle({
title: '业务担保单No.'+ID,
title: '业务担保单No.' + ID,
})
load(that, ID)
wx.getSystemInfo({
success: function(res) {
that.setData({
winHeight: res.windowHeight
});
}
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
onReady: function() {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
var tmpData = app.globalData.billInfo
var oldData = this.data.array
if (oldData.length > 0) {
tmpData.forEach(function (item, index, arrSelf) {
var has = false
for (var j = 0; j < oldData.length; j++) {
if (oldData[j].DmoTypeID == item.DmoTypeID && oldData[j].BillID == item.BillID) {
has = true;
break;
}
}
if (!has) {
oldData.push(item)
}
});
} else {
oldData = tmpData
}
this.setData({
array: app.globalData.billInfoUp
array: oldData
})
app.globalData.billInfo = []
let billMoney = 0;
if (this.data.array != null || this.data.array != "") {
for (var i = 0; i < this.data.array.length; i++) {
@ -223,41 +254,41 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
app.globalData.billInfoUp = [];
onUnload: function() {
app.globalData.billInfo = [];
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
bindguaranteeDateChange: function (e) {
bindguaranteeDateChange: function(e) {
this.setData({
guaranteedate: e.detail.value
})
},
bindpayDateChange: function (e) {
bindpayDateChange: function(e) {
this.setData({
paydate: e.detail.value
})
},
addBills: function (e) {
addBills: function(e) {
let accountCustomerId = this.data.accountcustomer[this.data.accountcustomerIndex].ID;
if (accountCustomerId == 0) {
wx.showToast({
@ -266,10 +297,10 @@ Page({
return;
}
wx.navigateTo({
url: '/pages/guaranteebillUp/guaranteebill?customerid=' + accountCustomerId,
url: '../selectbill/selectbill?customerid=' + accountCustomerId,
})
},
deleteItem: function (e) {
deleteItem: function(e) {
let idx = e.currentTarget.dataset.idx;
app.globalData.billInfoUp.splice(idx, 1)
this.setData({
@ -287,7 +318,7 @@ Page({
guaranteeMoney: billMoney + this.data.requestMoney
})
},
submitForm: function (e) {
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;
@ -310,14 +341,14 @@ Page({
let detailsArray = [];
for (var i = 0; i < this.data.array.length; i++) {
let id =0;
if(this.data.array[i].ID!=null){
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
ID: id
}
detailsArray.push(dmo)
}
@ -333,27 +364,26 @@ Page({
"GuaranteeMoney": this.data.guaranteeMoney,
"Details": detailsArray
}];
network.transfer_request(method, params, function (res) {
network.transfer_request(method, params, function(res) {
if (res.result == null) {
wx.showModal({
title: '提示',
content: '修改成功,是否返回上级列表',
success: function (res) {
if (res.cancel) {
} else {
success: function(res) {
if (res.cancel) {} else {
app.globalData.billInfoUp = [];
wx.navigateBack({
delta: 1
})
}
},
fail: function (res) { }
fail: function(res) {}
})
}
})
},
powerDrawer: function (e) {
powerDrawer: function(e) {
let that = this;
let x = e.currentTarget.dataset.x;
if (x == "结账客户") {
@ -366,7 +396,7 @@ Page({
let currentStatu = e.currentTarget.dataset.statu;
this.util(currentStatu)
},
itemclick: function (e) {
itemclick: function(e) {
var that = this;
var name = e.currentTarget.dataset.name;
var id = e.currentTarget.dataset.id;
@ -394,7 +424,7 @@ Page({
showModalStatus: false,
})
},
select: function (e) {
select: function(e) {
var that = this;
var which = e.currentTarget.dataset.item;
var value = e.detail.value;
@ -408,7 +438,7 @@ Page({
GetDepartment(that, value)
}
},
util: function (currentStatu) {
util: function(currentStatu) {
/* 动画部分 */
// 第1步:创建动画实例
var animation = wx.createAnimation({
@ -429,7 +459,7 @@ Page({
})
// 第5步:设置定时器到指定时候后,执行第二组动画
setTimeout(function () {
setTimeout(function() {
// 执行第二组动画
animation.opacity(1).rotateX(0).step();
// 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象


+ 78
- 67
pages/guarantee/detail/detail.wxml View File

@ -1,83 +1,94 @@
<!--pages/updataguarantee/updataguarantee.wxml-->
<view class='twoitem'>
<text>结账客户</text>
<text class='item_value'>{{accountcustomer[accountcustomerIndex].Name}}</text>
</view>
<scroll-view class='scroll-views'scroll-y="true" style="height:{{winHeight - 31}}px" >
<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'>{{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>
<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_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>
<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='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 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 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='itemview_h'>
<text class='text_name'>{{item.Customer_Name}}</text>
<text class='text_name'>日期:{{item.Date}}</text>
<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 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>
<button class="submit {{showView?'':'hide'}}" catchtap='addBills'>添加担保明细</button>
<button class="submit {{showView?'':'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 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>
<view class="btn_ok" bindtap="powerDrawer" data-statu="close">取消</view>
</view>
</scroll-view>

+ 17
- 34
pages/guarantee/detail/detail.wxss View File

@ -1,9 +1,10 @@
/* pages/updataguarantee/updataguarantee.wxss */
page {
background: rgb(240, 239, 245);
}
.twoitem{
.twoitem {
display: flex;
flex-direction: row;
justify-content: space-between;
@ -15,26 +16,17 @@ page {
padding-bottom: 20rpx;
}
.item_value{
.item_value {
width: 70%;
text-align: right
text-align: right;
}
.item_value1{
.item_value1 {
width: 60%;
text-align: right
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%;
@ -43,11 +35,11 @@ page {
background: linear-gradient(to right, #39c4fd, #539eef);
}
.custmer_list{
.custmer_list {
margin-top: 20rpx;
}
.custmer_list_view{
.custmer_list_view {
display: flex;
flex-direction: column;
padding-left: 5%;
@ -55,7 +47,7 @@ page {
background: white;
}
.itemview_h{
.itemview_h {
display: flex;
flex-direction: row;
justify-content: space-between;
@ -64,20 +56,21 @@ page {
padding-bottom: 10rpx;
}
.text_name{
.text_name {
font-size: 28rpx;
color: rgb(136, 136, 136);
}
.text_id{
.text_id {
font-size: 32rpx;
color: rgb(48, 48, 48);
}
.view_line_main{
background: white
.view_line_main {
background: white;
}
.view_line{
.view_line {
width: 92%;
height: 2rpx;
margin-left: 4%;
@ -99,14 +92,11 @@ page {
font-size: 30rpx;
}
.tips{
.tips {
font-size: 26rpx;
padding-top: 10rpx;
}
.hide {
display: none;
}
@ -115,10 +105,6 @@ page {
display: flex;
}
.drawer_screen {
width: 100%;
height: 100%;
@ -143,7 +129,6 @@ page {
border-radius: 3px;
}
.top {
height: 20%;
justify-content: center;
@ -164,7 +149,6 @@ page {
overflow-y: scroll; /*超出父盒子高度可滚动*/
}
.btn_ok {
padding: 10px;
font: 20px "microsoft yahei";
@ -173,7 +157,6 @@ page {
color: #3cc51f;
}
.grid1 {
width: 100%;
border-bottom: 1px solid #c3c3c3;
@ -184,4 +167,4 @@ page {
.text3 {
font-size: 18px;
color: rgb(48, 48, 48);
}
}

+ 64
- 29
pages/guarantee/newbill/newbill.js View File

@ -58,13 +58,13 @@ function GetDepartment(that, inputValue) {
})
}
function GetCustomerAccountingUnitBalance(that,accoutUnitId, customerId) {
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
requestMoney: res.result,
guaranteeMoney: res.result + that.data.allBillMoney
})
})
}
@ -91,9 +91,10 @@ Page({
paydate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'),
guaranteeMoney: '',
requestMoney:0,
allBillMoney:0,
array: []
requestMoney: 0,
allBillMoney: 0,
array: [],
winHeight: 0
},
/**
@ -110,6 +111,16 @@ Page({
Name: app.globalData.Department_Name
}],
})
var that = this
wx.getSystemInfo({
success: function(res) {
that.setData({
winHeight: res.windowHeight
});
}
});
},
/**
@ -118,25 +129,50 @@ Page({
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
var tmpData = app.globalData.billInfo
var oldData = this.data.array
if (oldData.length > 0) {
tmpData.forEach(function(item, index, arrSelf) {
var has = false
for (var j = 0; j < oldData.length; j++) {
if (oldData[j].DmoTypeID == item.DmoTypeID && oldData[j].BillID == item.BillID) {
has = true;
break;
}
}
if (!has) {
oldData.push(item)
}
});
} else {
oldData = tmpData
}
this.setData({
array: app.globalData.billInfo
array: oldData
})
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
}
app.globalData.billInfo = []
let billMoney = 0;
if (this.data.array != null || this.data.array != "") {
this.data.array.forEach(function(item, index, arrSelf) {
billMoney = billMoney + item.Value
});
// 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
guaranteeMoney: billMoney + this.data.requestMoney
})
},
/**
@ -212,14 +248,14 @@ Page({
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){
if (accountUnitId == 0) {
wx.showToast({
title: '请选择会计单位',
})
return;
}
if (departmentId==0){
if (departmentId == 0) {
wx.showToast({
title: '请选择部门',
})
@ -233,9 +269,9 @@ Page({
// }
let detailsArray = [];
for(var i=0;i<this.data.array.length;i++){
var dmo={
BillID:this.data.array[i].ID,
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)
@ -251,26 +287,25 @@ Page({
"GuaranteeMoney": this.data.guaranteeMoney,
"Details": detailsArray
}];
network.transfer_request(method, params, function (res) {
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=[];
success: function(res) {
if (res.cancel) {} else {
app.globalData.billInfo = [];
wx.navigateBack({
delta: 1
})
}
},
fail: function (res) { }
fail: function(res) {}
})
}
})
},
powerDrawer: function(e) {
@ -309,7 +344,7 @@ Page({
})
}
GetCustomerAccountingUnitBalance(that,that.data.accountUnit[that.data.accountUnitIndex].ID, that.data.accountcustomer[that.data.accountcustomerIndex].ID)
GetCustomerAccountingUnitBalance(that, that.data.accountUnit[that.data.accountUnitIndex].ID, that.data.accountcustomer[that.data.accountcustomerIndex].ID)
this.setData({
showModalStatus: false,


+ 69
- 67
pages/guarantee/newbill/newbill.wxml View File

@ -1,83 +1,85 @@
<!--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>
<scroll-view class='scroll-views' scroll-y="true" style="height:{{winHeight - 31}}px">
<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}}'>{{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>
<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_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>
<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='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 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.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='itemview_h'>
<text class='text_name'>{{item.Customer_Name}}</text>
<text class='text_name'>日期:{{item.Date}}</text>
<view class='view_line_main'>
<view class='view_line'></view>
</view>
<view class='delete' catchtap='deleteItem' data-idx='{{idx}}'>删除</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>
<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 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>
<view class="btn_ok" bindtap="powerDrawer" data-statu="close">取消</view>
</view>
</scroll-view>

+ 6
- 2
pages/guarantee/newbill/newbill.wxss View File

@ -26,8 +26,12 @@ page {
}
.submit {
margin-top: 50rpx;
margin-bottom: 30rpx;
margin-left: 5%;
margin-top: 10%;
width: 90%;
margin-right: 5%;
color: #fff;
background: linear-gradient(to right, #39c4fd, #539eef);
}
.custmer_list{


+ 16
- 16
pages/guarantee/selectbill/selectbill.js View File

@ -11,13 +11,13 @@ function getBillForDetail777(that,id){
let array=[];
for(var i=0;i<res.result.length;i++){
var dmo={
BillTypeID: res.result[i].BillTypeID,
BillTypeName: res.result[i].BillTypeName,
DmoTypeID: res.result[i].BillTypeID,
DmoTypeIDName: res.result[i].BillTypeName,
Customer_Name: res.result[i].Customer_Name,
ID:res.result[i].ID,
Money: res.result[i].Money,
BillID:res.result[i].ID,
Value: res.result[i].Money,
Date: timechage.formatTimeTwo(res.result[i].Date.substring(6, 19), 'Y-M-D')
}
}
array.push(dmo)
}
that.setData({
@ -33,11 +33,11 @@ function getBillForDetail792(that, id) {
let array = [];
for (var i = 0; i < res.result.length; i++) {
var dmo = {
BillTypeID: res.result[i].BillTypeID,
BillTypeName: res.result[i].BillTypeName,
DmoTypeID: res.result[i].BillTypeID,
DmoTypeIDName: res.result[i].BillTypeName,
Customer_Name: res.result[i].Customer_Name,
ID: res.result[i].ID,
Money: res.result[i].Money,
BillID: res.result[i].ID,
Value: res.result[i].Money,
Date: timechage.formatTimeTwo(res.result[i].Date.substring(6, 19), 'Y-M-D')
}
array.push(dmo)
@ -55,11 +55,11 @@ function getBillForDetail776(that, id) {
let array = [];
for (var i = 0; i < res.result.length; i++) {
var dmo = {
BillTypeID: res.result[i].BillTypeID,
BillTypeName: res.result[i].BillTypeName,
DmoTypeID: res.result[i].BillTypeID,
DmoTypeIDName: res.result[i].BillTypeName,
Customer_Name: res.result[i].Customer_Name,
ID: res.result[i].ID,
Money: res.result[i].Money,
BillID: res.result[i].ID,
Value: res.result[i].Money,
Date: timechage.formatTimeTwo(res.result[i].Date.substring(6, 19), 'Y-M-D')
}
array.push(dmo)
@ -171,7 +171,7 @@ Page({
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){
if (Number(this.data.arrayOutChoseID[i]) == this.data.arrayOut[j].BillID){
choseOut.push(this.data.arrayOut[j])
}
}
@ -179,7 +179,7 @@ Page({
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) {
if (Number(this.data.arrayCheckChoseID[i]) == this.data.arrayCheck[j].BillID) {
choseCheck.push(this.data.arrayCheck[j])
}
}
@ -187,7 +187,7 @@ Page({
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) {
if (Number(this.data.arrayBillChoseID[i]) == this.data.arrayBill[j].BillID) {
choseBill.push(this.data.arrayBill[j])
}
}


+ 9
- 9
pages/guarantee/selectbill/selectbill.wxml View File

@ -13,11 +13,11 @@
<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>
<checkbox class='mycheckbox' value='{{item.BillID}}'></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>
<text class='text_id'>No.{{item.BillID}}</text>
<text class='text_id'>金额:{{item.Value}}</text>
</view>
<view class='itemview_h'>
<text class='text_name'>{{item.Customer_Name}}</text>
@ -39,11 +39,11 @@
<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>
<checkbox class='mycheckbox' value='{{item.BillID}}'></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>
<text class='text_id'>No.{{item.BillID}}</text>
<text class='text_id'>金额:{{item.Value}}</text>
</view>
<view class='itemview_h'>
<text class='text_name'>{{item.Customer_Name}}</text>
@ -65,11 +65,11 @@
<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>
<checkbox class='mycheckbox' value='{{item.BillID}}'></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>
<text class='text_id'>No.{{item.BillID}}</text>
<text class='text_id'>金额:{{item.Value}}</text>
</view>
<view class='itemview_h'>
<text class='text_name'>{{item.Customer_Name}}</text>


+ 34
- 14
pages/order/order.js View File

@ -3,7 +3,7 @@ var app = getApp();
var network = require("../../utils/net.js")
var timechage = require("../../utils/dateTimeUtil.js")
var PageIndex = 0
var PageSize = 8
var PageSize = 10
var getListPath = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/GetList'
function getList(that, PageIndex, PageSize) {
@ -58,14 +58,20 @@ Page({
*/
data: {
array: [],
arry: []
arry: [],
scrollTop: 0,
scrollHeight: 0,
winHeight: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that = this;
PageIndex = 0
PageSize = 10
getList(that, PageIndex, PageSize)
},
/**
@ -80,9 +86,13 @@ Page({
*/
onShow: function() {
var that = this;
PageIndex = 0
PageSize = 8
getList(that, PageIndex, PageSize)
wx.getSystemInfo({
success: function (res) {
that.setData({
winHeight: res.windowHeight
});
}
});
},
/**
@ -112,19 +122,22 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
console.log('00000-----------')
},
onReachBottom: function() {
},
refesh: function() {
console.log('00000-----------')
var that = this;
PageIndex = 0;
PageSize = 10;
getList(that, PageIndex, PageSize)
wx.stopPullDownRefresh() //停止下拉刷新
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
console.log('baseUrl-----------')
//未审核订单滑动到底部加载
scrollLower: function(event) {
console.log('111111-----------')
var that = this;
PageIndex = PageIndex + 1;
PageSize = 10;
@ -146,6 +159,7 @@ Page({
setColor(that)
})
},
itemclick: function(e) {
wx.navigateTo({
url: 'detail/detail?ID=' + e.currentTarget.dataset.data.ID,
@ -160,5 +174,11 @@ Page({
wx.navigateTo({
url: 'query/query',
})
}
},
// 该方法绑定了页面滚动时的事件
scroll: function(event) {
this.setData({
scrollTop: event.detail.scrollTop
});
},
})

+ 2
- 1
pages/order/order.json View File

@ -1,4 +1,5 @@
{
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": true
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
}

+ 4
- 3
pages/order/order.wxml View File

@ -1,5 +1,5 @@
<!--pages/order/order.wxml-->
<view class="custmer_list">
<scroll-view scroll-y="true" class='scroll-views' style='height:{{winHeight -43}}px' bindscrolltolower="scrollLower" bindscrolltoupper="refesh">
<view class="custmer_list_view_main" wx:for="{{array}}" wx:key="item">
<view class='custmer_list_view' catchtap='itemclick' data-Data='{{item}}'>
<view class='phone_h'>
@ -15,6 +15,7 @@
<view class='view_line'></view>
</view>
</view>
</view>
</scroll-view>
<image class='xinjian' bindtap="createNew" src="/imgs/create.png"></image>
<button class='chose' catchtap='chose'>筛选</button>
<button class='chose' catchtap='chose'>筛选</button>

+ 10
- 1
pages/order/order.wxss View File

@ -1,7 +1,16 @@
/* pages/order/order.wxss */
page{
background: rgb(240, 239, 245)
background: rgb(240, 239, 245);
height: 100%;
}
.scroll-views {
width: 100%;
display: flex;
flex-direction: column;
}
.custmer_list{
margin-bottom: 10%;
}


Loading…
Cancel
Save