From 661084b101f24ed8971307dff71a8a0a8b2065bc Mon Sep 17 00:00:00 2001 From: robin <3504557@qq.com> Date: Fri, 9 Nov 2018 11:58:34 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E4=B8=9A=E5=8A=A1=E6=8B=85=E4=BF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 43 +- app.json | 7 +- imgs/guarantee.png | Bin 0 -> 11504 bytes pages/guarantee/detail/detail.js | 457 +++++++++++++++++++ pages/guarantee/detail/detail.json | 3 + pages/guarantee/detail/detail.wxml | 83 ++++ pages/guarantee/detail/detail.wxss | 187 ++++++++ pages/guarantee/detailshow/detailshow.js | 125 +++++ pages/guarantee/detailshow/detailshow.json | 3 + pages/guarantee/detailshow/detailshow.wxml | 49 ++ pages/guarantee/detailshow/detailshow.wxss | 92 ++++ pages/guarantee/guarantee.js | 235 ++++++++++ pages/guarantee/guarantee.json | 4 + pages/guarantee/guarantee.wxml | 55 +++ pages/guarantee/guarantee.wxss | 94 ++++ pages/guarantee/newbill/newbill.js | 378 +++++++++++++++ pages/guarantee/newbill/newbill.json | 3 + pages/guarantee/newbill/newbill.wxml | 83 ++++ pages/guarantee/newbill/newbill.wxss | 168 +++++++ pages/guarantee/selectbill/selectbill.js | 226 +++++++++ pages/guarantee/selectbill/selectbill.json | 3 + pages/guarantee/selectbill/selectbill.wxml | 89 ++++ pages/guarantee/selectbill/selectbill.wxss | 103 +++++ pages/main/main.js | 5 + pages/main/main.wxml | 6 +- pages/order/order.js | 4 +- pages/saleForecastList/saleForecastList.wxml | 4 +- 27 files changed, 2497 insertions(+), 12 deletions(-) create mode 100755 imgs/guarantee.png create mode 100644 pages/guarantee/detail/detail.js create mode 100644 pages/guarantee/detail/detail.json create mode 100644 pages/guarantee/detail/detail.wxml create mode 100644 pages/guarantee/detail/detail.wxss create mode 100644 pages/guarantee/detailshow/detailshow.js create mode 100644 pages/guarantee/detailshow/detailshow.json create mode 100644 pages/guarantee/detailshow/detailshow.wxml create mode 100644 pages/guarantee/detailshow/detailshow.wxss create mode 100644 pages/guarantee/guarantee.js create mode 100644 pages/guarantee/guarantee.json create mode 100644 pages/guarantee/guarantee.wxml create mode 100644 pages/guarantee/guarantee.wxss create mode 100644 pages/guarantee/newbill/newbill.js create mode 100644 pages/guarantee/newbill/newbill.json create mode 100644 pages/guarantee/newbill/newbill.wxml create mode 100644 pages/guarantee/newbill/newbill.wxss create mode 100644 pages/guarantee/selectbill/selectbill.js create mode 100644 pages/guarantee/selectbill/selectbill.json create mode 100644 pages/guarantee/selectbill/selectbill.wxml create mode 100644 pages/guarantee/selectbill/selectbill.wxss diff --git a/app.js b/app.js index de45fdc..aeefd6a 100644 --- a/app.js +++ b/app.js @@ -1,7 +1,36 @@ //app.js App({ onLaunch: function() { + // 展示本地存储能力 + var logs = wx.getStorageSync('logs') || [] + logs.unshift(Date.now()) + wx.setStorageSync('logs', logs) + // 登录 + wx.login({ + success: res => { + // 发送 res.code 到后台换取 openId, sessionKey, unionId + } + }) + // 获取用户信息 + wx.getSetting({ + success: res => { + if (res.authSetting['scope.userInfo']) { + // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 + wx.getUserInfo({ + success: res => { + // 可以将 res 发送给后台解码出 unionId + this.globalData.UserInfo = res.userInfo + // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 + // 所以此处加入 callback 以防止这种情况 + if (this.userInfoReadyCallback) { + this.userInfoReadyCallback(res) + } + } + }) + } + } + }) }, globalData: { PhoneNum: "", @@ -9,15 +38,17 @@ App({ AppName: "WeChat", AppId: "wx1a89a89a80318160", Cookie: "", - DecryptCookie:'', - UserInfo: null, - BaseUrl: "https://miniprogram.food988.com/Rest.aspx", + DecryptCookie: '', + UserInfo: null, + BaseUrl: "https://miniprogram.food988.com/Rest.aspx", LoginPath: "/MainSystem/MainSystem/Auth/WeixinLogin", - TransferUrl:'https://miniprogram.food988.com/RequestTransfer.aspx', - CustomerId:0, - SelectCustomer_ID:null, + TransferUrl: 'https://miniprogram.food988.com/RequestTransfer.aspx', + CustomerId: 0, + SelectCustomer_ID: null, SelectStartDate: null, SelectEndDate: null, SelectBillState: null, + billInfo: [], + billInfoUp: [] } }) \ No newline at end of file diff --git a/app.json b/app.json index c30b13c..4760eee 100644 --- a/app.json +++ b/app.json @@ -13,7 +13,12 @@ "pages/order/order", "pages/order/detail/detail", "pages/order/newBill/newBill", - "pages/order/query/query" + "pages/order/query/query", + "pages/guarantee/guarantee", + "pages/guarantee/detail/detail", + "pages/guarantee/newbill/newbill", + "pages/guarantee/selectbill/selectbill", + "pages/guarantee/detailshow/detailshow" ], "window": { "backgroundTextStyle": "light", diff --git a/imgs/guarantee.png b/imgs/guarantee.png new file mode 100755 index 0000000000000000000000000000000000000000..6ec390427e009dc193108f04fabe8d9daa8b6c82 GIT binary patch literal 11504 zcmaKSbyOVBwk{6AT_#v?83r3%gA7gxk`RIoKDZ1L9D>7O!5s!ka8Gaz1cJ<y*kq`n1F)%PlG}Kk}AJT+>ZUVfA zXKn9O`GgZu(h1tlly%f_C(s5U|b%3e+ zd)gZK>l#}7J6TKFuqnv1%KAw^5V+XFp{#x`&aPh4esXO8;+1~L|MOaqjrCs;xRV^) ze;H-0qsOZ3=4s0+1`-#r76yy3N=Si(#f79qz(7_JAz=wYAqhcYQ2`-gX(4fGQ7P8{ zzSthLdD_@X>#IQiTh~KLj?DoMcb66v^!4=x`HF(vJnaRArKF?;g+v5JL)_)kGR&L&KIkpE&|Emfv?*BvU>h<5v^w3~}eo%Ko zVUW;2Rr)tjN9X?!b#eJ0v=?08_J8gDe-e8czHzq|)VK9=^Y*lU=r}v}e^j|kD|^~P z;clLWZf?&1Zbdx@H@KUZgPS|6vN9{rOPH&To39t|zu-DL(i*N_aHy-bt%iym+XDdz z2D6ct5PmA83>H#Rk&sXl7FLy%QW6t^Ktxm}M8w5Zg{4IPEvw>Y?d@Xg3jepP&Hu`( z{zut=Ji*2NL9>djC(Os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t#Opr-6N3!578e631y+ir`(%8y%%dgj$U$6B0wc*BOcOIsQe}c z*Eif61eS%50zSM^cy37NStLCqS zR~=lo%3Tgv>EFpizR3d2m<0KlB%d#GlLrt64JlHJ`8V)v=Kxl=z$=Q5?Am#T5fQ?} zU3Fq4UHIDsM92HmIYN!v!_-qCe(C+BPg0t(y^?I#Z@O2yUV__q1Az1-YIvuZN9_1m}bZn$m-&bHdl ziL;Uxt^pZHWHP^EvacSp*Ia$AG6jk^@0o1*DkLbhKA(AcJ}VB(M1;AzG#Tb;>?FA0 z3}jL&68po)3Da%4o>av4aawLUbk?aLKnB&9#1 z9>SV_5f9NO+3lW43JG`0TyYGG9l*EZ8=XA9%{4%x&9ZU;V?+n0$Z+9RK}CrZZ-X-d zx(pd%Zf@JWfey@C=xG(lJH`gEyc)nG{juGeD8fN%D$tT;g1?()h$Z;b`AIs< z4;jIij-N?4RaY>~oJruqgu78Wzq&O$0;LX=7c%vpS>}wJn{LTG3riH!7B-&|YwZJ& ztRzCzFjn?Z4ru#lALJwcVqqhY=y17P?(SQx`%ZIGc)S{iPfbwe%yB6Uy!sJra)uVH zlwWdsU#X(&cF_Fwe*8X2Vy)X`IZHr^;JK}I{li|ei6WgeUb{gVy2NdD;N$)5Ts!A% znsjAT-SJ2J%j=$@uQ_uU2xvVW}0LjQB)+BAJf*7+8dd`w2(W3 zwR>3l(ziT_n#?g94D3^8_OO6ZGT?AM>A1N)2)qW|pNWk%a#X32`EUwNYjrT5eB8N= z-kG7Zr}huQxB0e{9~cmGRJeWQCU^Qj3#Ng5a6pEJlBs=6w*N|xdO2fS363jhEB literal 0 HcmV?d00001 diff --git a/pages/guarantee/detail/detail.js b/pages/guarantee/detail/detail.js new file mode 100644 index 0000000..25f3e75 --- /dev/null +++ b/pages/guarantee/detail/detail.js @@ -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, + }); + } + } +}) \ No newline at end of file diff --git a/pages/guarantee/detail/detail.json b/pages/guarantee/detail/detail.json new file mode 100644 index 0000000..7d65438 --- /dev/null +++ b/pages/guarantee/detail/detail.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "业务担保明细" +} \ No newline at end of file diff --git a/pages/guarantee/detail/detail.wxml b/pages/guarantee/detail/detail.wxml new file mode 100644 index 0000000..cb348c3 --- /dev/null +++ b/pages/guarantee/detail/detail.wxml @@ -0,0 +1,83 @@ + + + 结账客户 + {{accountcustomer[accountcustomerIndex].Name}} + + + + 会计单位 + {{accountUnit[accountUnitIndex].Name}} + + + + 部门 + {{department[departmentIndex].Name}} + + + + 担保日期 + + + {{guaranteedate}} + + + + + + 承诺回款日期 + + + {{paydate}} + + + + + + 担保金额 + {{guaranteeMoney}} + + + + + 担保明细{{idx+1}} + + + {{item.DmoTypeIDName}}No.{{item.BillID}} + 金额:{{item.Value}} + + + {{item.Customer_Name}} + 日期:{{item.Date}} + + + + + + 删除 + + + + + + + + + + + + + + + + + + + + + + {{item.Name}} + + + + 取消 + diff --git a/pages/guarantee/detail/detail.wxss b/pages/guarantee/detail/detail.wxss new file mode 100644 index 0000000..8d90478 --- /dev/null +++ b/pages/guarantee/detail/detail.wxss @@ -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); +} \ No newline at end of file diff --git a/pages/guarantee/detailshow/detailshow.js b/pages/guarantee/detailshow/detailshow.js new file mode 100644 index 0000000..ce060e0 --- /dev/null +++ b/pages/guarantee/detailshow/detailshow.js @@ -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 + + 结账客户 + {{Customer_Name}} + + + + 会计单位 + {{AccountingUnit_Name}} + + + + 部门 + {{Department_Name}} + + + + 担保日期 + {{guaranteedate}} + + + + 承诺回款日期 + {{CashBackDate}} + + + + 担保金额 + {{GuaranteeMoney}} + + + + + 担保明细{{idx+1}} + + + {{item.DmoTypeIDName}}No.{{item.BillID}} + 金额:{{item.Value}} + + + {{item.Customer_Name}} + 日期:{{item.Date}} + + + + + + + diff --git a/pages/guarantee/detailshow/detailshow.wxss b/pages/guarantee/detailshow/detailshow.wxss new file mode 100644 index 0000000..4c67bc1 --- /dev/null +++ b/pages/guarantee/detailshow/detailshow.wxss @@ -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; +} diff --git a/pages/guarantee/guarantee.js b/pages/guarantee/guarantee.js new file mode 100644 index 0000000..ae78560 --- /dev/null +++ b/pages/guarantee/guarantee.js @@ -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, + }) + } +}) \ No newline at end of file diff --git a/pages/guarantee/guarantee.json b/pages/guarantee/guarantee.json new file mode 100644 index 0000000..1c5038f --- /dev/null +++ b/pages/guarantee/guarantee.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "业务担保", + "enablePullDownRefresh": true +} \ No newline at end of file diff --git a/pages/guarantee/guarantee.wxml b/pages/guarantee/guarantee.wxml new file mode 100644 index 0000000..27cf5be --- /dev/null +++ b/pages/guarantee/guarantee.wxml @@ -0,0 +1,55 @@ + + + 未审核 + 已审核 + + + + + + + + + + + No.{{item.ID}} + 金额:{{item.GuaranteeMoney}} + + + {{item.Customer_Name}} + 担保日期:{{item.GuaranteeDate}} + + + + + + + + + + + + + + + + + + No.{{item.ID}} + 金额:{{item.GuaranteeMoney}} + + + {{item.Customer_Name}} + 担保日期:{{item.GuaranteeDate}} + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/guarantee/guarantee.wxss b/pages/guarantee/guarantee.wxss new file mode 100644 index 0000000..ae299e1 --- /dev/null +++ b/pages/guarantee/guarantee.wxss @@ -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); +} + diff --git a/pages/guarantee/newbill/newbill.js b/pages/guarantee/newbill/newbill.js new file mode 100644 index 0000000..7294fdb --- /dev/null +++ b/pages/guarantee/newbill/newbill.js @@ -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 + + 结账客户 + {{accountcustomer[accountcustomerIndex].Name}} + + + + 会计单位 + {{accountUnit[accountUnitIndex].Name}} + + + + 部门 + {{department[departmentIndex].Name}} + + + + 担保日期 + + + {{guaranteedate}} + + + + + + 承诺回款日期 + + + {{paydate}} + + + + + + 担保金额 + {{guaranteeMoney}} + + + + + 担保明细{{idx+1}} + + + {{item.BillTypeName}}No.{{item.ID}} + 金额:{{item.Money}} + + + {{item.Customer_Name}} + 日期:{{item.Date}} + + + + + + 删除 + + + + + + + + + + + + + + + + + + + + + + {{item.Name}} + + + + 取消 + \ No newline at end of file diff --git a/pages/guarantee/newbill/newbill.wxss b/pages/guarantee/newbill/newbill.wxss new file mode 100644 index 0000000..a28ab0b --- /dev/null +++ b/pages/guarantee/newbill/newbill.wxss @@ -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); +} \ No newline at end of file diff --git a/pages/guarantee/selectbill/selectbill.js b/pages/guarantee/selectbill/selectbill.js new file mode 100644 index 0000000..3392d8f --- /dev/null +++ b/pages/guarantee/selectbill/selectbill.js @@ -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 + 销售出库 + 客户验收 + 销售发票 + + + + + + + + + + + + + + No.{{item.ID}} + 金额:{{item.Money}} + + + {{item.Customer_Name}} + 日期:{{item.Date}} + + + + + + + + + + + + + + + + + + + + + No.{{item.ID}} + 金额:{{item.Money}} + + + {{item.Customer_Name}} + 日期:{{item.Date}} + + + + + + + + + + + + + + + + + + + + + No.{{item.ID}} + 金额:{{item.Money}} + + + {{item.Customer_Name}} + 日期:{{item.Date}} + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/guarantee/selectbill/selectbill.wxss b/pages/guarantee/selectbill/selectbill.wxss new file mode 100644 index 0000000..37d7787 --- /dev/null +++ b/pages/guarantee/selectbill/selectbill.wxss @@ -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%; +} \ No newline at end of file diff --git a/pages/main/main.js b/pages/main/main.js index 66931c6..a3b428f 100644 --- a/pages/main/main.js +++ b/pages/main/main.js @@ -86,4 +86,9 @@ Page({ url: '/pages/order/order', }) }, + guarantee: function(e) { + wx.navigateTo({ + url: '/pages/guarantee/guarantee', + }) + } }) \ No newline at end of file diff --git a/pages/main/main.wxml b/pages/main/main.wxml index d22e5a5..3e0dc18 100644 --- a/pages/main/main.wxml +++ b/pages/main/main.wxml @@ -11,5 +11,9 @@ 销售订单 - + + + + 业务担保 + diff --git a/pages/order/order.js b/pages/order/order.js index 9ec4968..63605da 100644 --- a/pages/order/order.js +++ b/pages/order/order.js @@ -3,7 +3,7 @@ var app = getApp(); var network = require("../../utils/net.js") var timechage = require("../../utils/dateTimeUtil.js") var PageIndex = 0 -var PageSize = 10 +var PageSize = 8 var getListPath = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/GetList' function getList(that, PageIndex, PageSize) { @@ -81,7 +81,7 @@ Page({ onShow: function() { var that = this; PageIndex = 0 - PageSize = 10 + PageSize = 8 getList(that, PageIndex, PageSize) }, diff --git a/pages/saleForecastList/saleForecastList.wxml b/pages/saleForecastList/saleForecastList.wxml index c92bc35..b2ec2dc 100644 --- a/pages/saleForecastList/saleForecastList.wxml +++ b/pages/saleForecastList/saleForecastList.wxml @@ -1,6 +1,6 @@ - 未审批 - 已审批 + 未审核 + 已审核