From ca1e53e9d00ae68b95725b54534d820c7bcb94ba Mon Sep 17 00:00:00 2001 From: chenxuhui Date: Thu, 29 Nov 2018 13:20:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A2=84=E6=8A=A5=E5=92=8C?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 8 +- imgs/create.png | Bin 0 -> 11964 bytes pages/first/first.js | 26 - pages/first/first.json | 3 - pages/first/first.wxml | 4 - pages/first/first.wxss | 19 - pages/homePage/homePage.js | 2 +- pages/order/detail/detail.js | 871 +++++++++++++++++++ pages/order/detail/detail.json | 5 + pages/order/detail/detail.wxml | 215 +++++ pages/order/detail/detail.wxss | 232 +++++ pages/order/newBill/newBill.js | 769 ++++++++++++++++ pages/order/newBill/newBill.json | 5 + pages/order/newBill/newBill.wxml | 201 +++++ pages/order/newBill/newBill.wxss | 224 +++++ pages/order/order.js | 218 +++++ pages/order/order.json | 5 + pages/order/order.wxml | 52 ++ pages/order/order.wxss | 117 +++ pages/order/query/query.js | 194 +++++ pages/order/query/query.json | 3 + pages/order/query/query.wxml | 48 + pages/order/query/query.wxss | 94 ++ pages/saleForecastList/Detail/Detail.js | 726 ++++++++++++++++ pages/saleForecastList/Detail/Detail.json | 5 + pages/saleForecastList/Detail/Detail.wxml | 183 ++++ pages/saleForecastList/Detail/Detail.wxss | 229 +++++ pages/saleForecastList/newBill/newBill.js | 707 +++++++++++++++ pages/saleForecastList/newBill/newBill.json | 5 + pages/saleForecastList/newBill/newBill.wxml | 156 ++++ pages/saleForecastList/newBill/newBill.wxss | 220 +++++ pages/saleForecastList/query/query.js | 196 +++++ pages/saleForecastList/query/query.json | 3 + pages/saleForecastList/query/query.wxml | 25 + pages/saleForecastList/query/query.wxss | 94 ++ pages/saleForecastList/saleForecastList.js | 248 ++++++ pages/saleForecastList/saleForecastList.json | 5 + pages/saleForecastList/saleForecastList.wxml | 55 ++ pages/saleForecastList/saleForecastList.wxss | 113 +++ utils/dateTimePicker.js | 80 ++ 40 files changed, 6309 insertions(+), 56 deletions(-) create mode 100644 imgs/create.png delete mode 100644 pages/first/first.js delete mode 100644 pages/first/first.json delete mode 100644 pages/first/first.wxml delete mode 100644 pages/first/first.wxss create mode 100644 pages/order/detail/detail.js create mode 100644 pages/order/detail/detail.json create mode 100644 pages/order/detail/detail.wxml create mode 100644 pages/order/detail/detail.wxss create mode 100644 pages/order/newBill/newBill.js create mode 100644 pages/order/newBill/newBill.json create mode 100644 pages/order/newBill/newBill.wxml create mode 100644 pages/order/newBill/newBill.wxss create mode 100644 pages/order/order.js create mode 100644 pages/order/order.json create mode 100644 pages/order/order.wxml create mode 100644 pages/order/order.wxss create mode 100644 pages/order/query/query.js create mode 100644 pages/order/query/query.json create mode 100644 pages/order/query/query.wxml create mode 100644 pages/order/query/query.wxss create mode 100644 pages/saleForecastList/Detail/Detail.js create mode 100644 pages/saleForecastList/Detail/Detail.json create mode 100644 pages/saleForecastList/Detail/Detail.wxml create mode 100644 pages/saleForecastList/Detail/Detail.wxss create mode 100644 pages/saleForecastList/newBill/newBill.js create mode 100644 pages/saleForecastList/newBill/newBill.json create mode 100644 pages/saleForecastList/newBill/newBill.wxml create mode 100644 pages/saleForecastList/newBill/newBill.wxss create mode 100644 pages/saleForecastList/query/query.js create mode 100644 pages/saleForecastList/query/query.json create mode 100644 pages/saleForecastList/query/query.wxml create mode 100644 pages/saleForecastList/query/query.wxss create mode 100644 pages/saleForecastList/saleForecastList.js create mode 100644 pages/saleForecastList/saleForecastList.json create mode 100644 pages/saleForecastList/saleForecastList.wxml create mode 100644 pages/saleForecastList/saleForecastList.wxss create mode 100644 utils/dateTimePicker.js diff --git a/app.json b/app.json index c466604..2730238 100644 --- a/app.json +++ b/app.json @@ -2,6 +2,10 @@ "pages": [ "pages/homePage/homePage", "pages/login/login", + "pages/saleForecastList/saleForecastList", + "pages/saleForecastList/Detail/Detail", + "pages/saleForecastList/query/query", + "pages/saleForecastList/newBill/newBill", "pages/sendCargo/sendCargo", "pages/orderDetails/orderDetails", "pages/orderInquiry/orderInquiry", @@ -10,9 +14,7 @@ "pages/my/my", "pages/fenxiang/fenxiang", "pages/saleOutStore/saleOutStore", - "pages/saleOutStore/outStoreDetail/outStoreDetail", - "pages/first/first" - + "pages/saleOutStore/outStoreDetail/outStoreDetail" ], "window": { "backgroundTextStyle": "light", diff --git a/imgs/create.png b/imgs/create.png new file mode 100644 index 0000000000000000000000000000000000000000..0656ecd267cad25de17ce80f45309108033fb693 GIT binary patch literal 11964 zcmaKSbyOTrx9u?a;4ruoJh;0%49p;b;1Xoe!2$%AL5AQGEWtH61P|_zK=2TPOBh0c z1PBTC_g_j>hOT~&SdKBrFYRjaG35}^8;L?Aj4001D;)>1PB05BfP7$7{H zhZgh{{lvqA)=%Bc&&bQkFTl>n5up6c%ifVi+r!S;(a_QES&;XHqZ|N$$qF|%^D~3! z$vAj<2-y8&BM|6;ct8UHa*BZnI|nyMKNfpOXSk<4+evpH8w>oIJe#RFLShHGJ=8u0RaL5q5@t%&Vs_y($a!LB7!0!{0|oV zzCoUTc7gn!zK{ORpyuf7-~&ha!M!|L{$aGU_wx6XXM2eBzq;Uo_#awN-~Ue2L&5|D z?GS>(0z&_E>EDJB$p7Ee!{dLfeff>nV=jCJU<>mhGEJ9tp{JeZ!ybvs^sw~{5aL;F60lqx{GKWB9v^{^vPDwbkU= z9tZ^B@Mki@qSBIL5-O@{Lh8!G!s=4e>Ovw?l9DPS%3|uuk`gNa#;SQa_Op{}KC-57mXGVuQ#i}HWu`)};C{~U|Tf5Zwt1S9y* zxc*<`{O_g*@%&T#AJslo{zvzYo)2R8c~EskChju;;IXi_nzC`=>i5_9tqjio2lqDq zeal|Uy(is#6X}xA2qh%i@C%+bZ()cs;7W;ROgu~8iYdq;)xy)}WWUn0&(J0&9@dWN z4`hj95E|C)XKEM>Y=2g4^`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>8QLu!mB%Z3GW~m@xI_JvI&CP1P1`ge2wipY!C}>iTN+ IDz;Jo2YpP@5dZ)H literal 0 HcmV?d00001 diff --git a/pages/first/first.js b/pages/first/first.js deleted file mode 100644 index 7a8be66..0000000 --- a/pages/first/first.js +++ /dev/null @@ -1,26 +0,0 @@ -// pages/first/first.js -const app = getApp(); -var network = require("../../utils/net.js"); -var openid; - -Page({ - data: { - url:"", - }, - - onLoad: function(options) { - // var code = options.code; - var that = this; - wx.login({ - success: function (res) { - var code = res.code; - var itemUrl = "https://miniprogram.food988.com/WeixinBindPhonePage.aspx?code=" + code + "&state=bindphone"; - - that.setData({ - url: itemUrl, - }) - } - }); -}, - -}) \ No newline at end of file diff --git a/pages/first/first.json b/pages/first/first.json deleted file mode 100644 index 786c3b4..0000000 --- a/pages/first/first.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "navigationBarTitleText": "公众号绑定" -} \ No newline at end of file diff --git a/pages/first/first.wxml b/pages/first/first.wxml deleted file mode 100644 index 944bca6..0000000 --- a/pages/first/first.wxml +++ /dev/null @@ -1,4 +0,0 @@ - - - \ No newline at end of file diff --git a/pages/first/first.wxss b/pages/first/first.wxss deleted file mode 100644 index c250200..0000000 --- a/pages/first/first.wxss +++ /dev/null @@ -1,19 +0,0 @@ -/* pages/first/first.wxss */ -.testOne{ - color: #FFFFFF; - background: #2E8CF5; - margin-top: 20%; - margin-left: 5%; - width: 30%; - float: left; -} - - -.testTwo{ - color: #FFFFFF; - background: #2E8CF5; - margin-top: 20%; - margin-right: 5%; - width: 30%; - float: right; -} \ No newline at end of file diff --git a/pages/homePage/homePage.js b/pages/homePage/homePage.js index b42a1a5..7624432 100644 --- a/pages/homePage/homePage.js +++ b/pages/homePage/homePage.js @@ -43,7 +43,7 @@ Page({ switch (btnID) { // 找司机 case "1": - transferURL = '/pages/sendCargo/sendCargo'; + transferURL = '/pages/saleForecastList/saleForecastList'; break; // 对账单 case "2": diff --git a/pages/order/detail/detail.js b/pages/order/detail/detail.js new file mode 100644 index 0000000..087564e --- /dev/null +++ b/pages/order/detail/detail.js @@ -0,0 +1,871 @@ +// pages/orderinfo/orderinfo.js +var app = getApp() +var network = require("../../../utils/net.js") +var dateTimePicker = require('../../../utils/dateTimePicker.js'); +var utilll = require('../../../utils/util.js'); +var timechage = require("../../../utils/dateTimeUtil.js") +var orderID=0; + +var getAccountingUnit = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountingUnit"; +var getCustomer = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer"; +var getDept = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDepartment"; +var getGoods = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetGoodsWithUnitPrice"; +var getSaleKind = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetSaleKind"; +var getEmployee = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetEmployee"; +var getStore = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetStore" +var getTakeGoodsType = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetTakeGoods_Type" + +var load = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Load"; +let update = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Update'; + +function setTime(that){ + // 获取完整的年月日 时分秒,以及默认显示的数组 + var obj1 = dateTimePicker.dateTimePicker(that.data.startYear, that.data.endYear, that.data.loadTime); + // 精确到分的处理,将数组的秒去掉 + var lastArray = obj1.dateTimeArray.pop(); + var lastTime = obj1.dateTime.pop(); + + that.setData({ + dateTimeArray1: obj1.dateTimeArray, + dateTime1: obj1.dateTime + }); +} + +function GetAccountingUnit(that, inputValue) { + let method = getAccountingUnit; + let params = [{ + "InputValue": inputValue, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + unit: res.result + }) + }) + that.setData({ + which: "会计部门" + }) +} + +function GetCustomer(that, inputValue) { + let method = getCustomer; + let params = [{ + "InputValue": inputValue, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + customer: res.result + }) + }) + that.setData({ + which: "购货客户" + }) +} + +function GetDepartment(that, inputValue) { + let method = getDept; + 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 GetSaleKind(that, v) { + let method = getSaleKind; + let params = [{ + "InputValue": v, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + saletype: res.result + }) + }) + that.setData({ + which: "销售类型" + }) +} + +function GetEmployee(that, v) { + let method = getEmployee; + let params = [{ + "InputValue": v, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + employee: res.result + }) + }) + that.setData({ + which: "业务员" + }) +} + +function GetStore(that, v) { + let method = getStore; + let params = [{ + "InputValue": v, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + store: res.result + }) + }) + that.setData({ + which: "仓库" + }) +} + +function GetTakeGoodsType(that, v) { + let method = getTakeGoodsType; + let params = []; + network.transfer_request(method, params, function (res) { + console.log(res); + that.setData({ + currency: res.result, + takeGoodsType: res.result + }) + }) + that.setData({ + which: "配送方式" + }) +} + +function GetGoodsWithUnitPrice(that, v, date) { + let unitID = that.data.unit[that.data.isUnit].ID; + let customerID = that.data.customer[that.data.customerIndex].ID; + let method = getGoods; + let params = [{ + "Input": v, + "PageIndex": 0, + "PageSize": 100, + "Customer_ID": customerID, + "AccountingUnit_ID": unitID, + "Date": date + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + goods: res.result, + }) + }) +} + +Page({ + + /** + * 页面的初始数据 + */ + data: { + /** + * 页面配置 + */ + which: "", + winWidth: 0, + winHeight: app.globalData.winHeight, + // tab切换 + currentTab: 0, + obj: [], + goods: [], + idx: 0, + currency: [], + saletypeIndex: 0, + saletype: [{ + ID: 0, + Name: "请选择销售类型" + }], + departmentIndex: 0, + department: [{ + ID: 0, + Name: "请选择销售部门" + }], + customerIndex: 0, + customer: [{ + ID: 0, + Name: "请选择客户" + }], + isUnit: 0, + unit: [{ + ID: 0, + Name: "请选择会计单位" + }], + empIndex: 0, + employee: [{ + ID: 0, + Name: "请选择业务员" + }], + storeIndex: 0, + store: [{ + ID: 0, + Name: "请选择仓库" + }], + takeGoodsTypeIndex: 0, + takeGoodsType: [{ + ID: 0, + Name: "请选择配送方式" + }], + addrs: "", + remark: "", + dateTimeArray1: null, + dateTime1: null, + startYear: 2018, + endYear: 2030, + loadTime:"" + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var that = this; + let ID = Number(options.ID); + orderID = ID; + + let method = load; + let params = [ID]; + network.transfer_request(method, params, function (res) { + let customerOld=[{ + ID: res.result.Customer_ID, + Name: res.result.Customer_Name + }] + + let unitOld=[{ + ID: res.result.AccountingUnit_ID, + Name: res.result.AccountingUnit_Name + }] + + let departmentOld=[{ + ID: res.result.Department_ID, + Name: res.result.Department_Name + }] + + let saletypeOld =[{ + ID: res.result.SaleKind_ID, + Name: res.result.SaleKind_Name + }] + + let employeeOld = [{ + ID: res.result.Employee_ID, + Name: res.result.Employee_Name + }] + + let storeOld = [{ + ID: res.result.Store_ID, + Name: res.result.Store_Name + }] + + let takeGoodsTypeOld = [{ + Name: res.result.TakeGoods_Type + }] + + let addrrrr = res.result.DeliverAddress + let remark=res.result.Remark + let loadtimee = timechage.formatTimeTwo(res.result.LoadTime.substring(6, 19), 'Y-M-D h:m') + + let details=[]; + + for(var i =0;i + + + 基本信息 + 订单明细 + + + + + + + + + 购货客户 + + + {{customer[customerIndex].Name}} + + + + + + + 发货时间 + + + {{dateTimeArray1[0][dateTime1[0]]}}-{{dateTimeArray1[1][dateTime1[1]]}}-{{dateTimeArray1[2][dateTime1[2]]}} {{dateTimeArray1[3][dateTime1[3]]}}:{{dateTimeArray1[4][dateTime1[4]]}} + + + + + + + 会计单位 + + + {{unit[isUnit].Name}} + + + + + + 销售部门 + + + {{department[departmentIndex].Name}} + + + + + + 业务员 + + + {{employee[empIndex].Name}} + + + + + + 仓库 + + + {{store[storeIndex].Name}} + + + + + + 销售类型 + + + {{saletype[saletypeIndex].Name}} + + + + + + 配送方式 + + + {{takeGoodsType[takeGoodsTypeIndex].Name}} + + + + + + + 送货地址 + + + + + + 摘要 + + + + + + + + + + + + + + + + + + + + + + {{item.Name}} + + + + 取消 + + + + + + + + + + + 存货名称 + + {{obj[idx].Goods_Name}} + + + + + + 报货数量 + + + + + + + 辅 数 量 + + + + + + 单 价 + + + + + + 政策单价 + {{obj[idx].PolicyPrice}} + + + + + 删除 + + + + + + + + + + + + + + + + + + + + + + + + {{item.Goods_Name}} + + + + 取消 + + + \ No newline at end of file diff --git a/pages/order/detail/detail.wxss b/pages/order/detail/detail.wxss new file mode 100644 index 0000000..987952e --- /dev/null +++ b/pages/order/detail/detail.wxss @@ -0,0 +1,232 @@ +/* pages/orderinfo/orderinfo.wxss */ + +page { + background:#EAF1F8; + height: calc(100%-10px); +} + +.swiper-tab { + /* height: 30px; */ + margin: 10px 20px; + text-align: center; + line-height: 30px; + background: white; + display: flex; + flex-direction: row; + border-radius: 5px; + border: 1px solid#2E8CF5; + overflow: hidden; +} + +.swiper-tab-list { + height: 100%; + width: 50%; + font-size: 30rpx; + color: #777; +} + +.on { + background-color:#2E8CF5 ; + color: white; +} + +.swiper-box { + display: block; + height: 100%; + width: 100%; + overflow: hidden; +} + +.swiper-items1 { + height: 100%; + padding-top: 3%; +} + +.swiper-items2 { + height: 100%; +} + +.scroll-views { + height: 100%; +} + +.baseitem { + height: 60rpx; + background: #fff; + /* border-bottom: 0.1px solid #dbdbdb; */ + display: flex; + flex-direction: row; + align-items: center; + padding: 20rpx 20rpx; + font-size: 30rpx; + +} + +.horizontallineView { + height: 1rpx; + background-color: #dbdbdb; + margin-left: 20rpx; + margin-right: 0rpx; +} + +.baseitem_key { + color: #666; + width: 30%; + /* margin-left: 20rpx; */ +} + +.baseitem_value { + color: rgb(48, 48, 48); + /* margin-left: 20rpx; + margin-right: 20rpx; */ + width: 70%; + text-align: right; +} + +.baseitem_key2 { + color: #666; + width: 30%; + /* margin-left: 20rpx; */ +} + +.baseitem_value2 { + color: rgb(48, 48, 48); + /* margin-left: 20rpx; + margin-right: 20rpx; */ + width: 70%; + text-align: right; +} + +.baseitem_key1 { + color: #666; + width: 30%; + margin-left: 20rpx; +} + +.baseitem_value1 { + color: rgb(48, 48, 48); + /* margin-left: 20rpx; + margin-right: 20rpx; */ + width: 70%; + text-align: right; +} + + +.add { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + border-left: none; + background: #fff; + width: 100%; + margin-top: 20rpx; + border-top: 0.5px solid #e0e0e0; + border-bottom: 0.5px solid #e0e0e0; + padding-top: 20rpx; + padding-bottom: 20rpx; +} + +.ico { + height: 42rpx; + width: 42rpx; +} + +.delete { + width: 100%; + padding-top: 20rpx; + padding-bottom: 20rpx; + color: red; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + background: #fff; + font-size: 30rpx; +} + +.itemView { + margin-top: 20rpx; + background-color: #fff; +} + +.main-body{ + background-color: #fff; + +} + +.submit { + margin-left: 5%; + margin-top: 10%; + width: 90%; + margin-right: 5%; + color: #fff; + background: linear-gradient(to right, #39c4fd, #539eef); +} + +.drawer_screen { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1000; + background: #000; + opacity: 0.5; + overflow: hidden; +} + +.sousuo { + /* margin-right: 10%; + margin-left: 10%; */ + text-align: center; + background: #d6d8da; + height: 40px; + font-size: 28rpx; +} + +.drawer_content { + height: 500rpx; + overflow-y: scroll; /*超出父盒子高度可滚动*/ +} + +.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; +} + +.btn_ok { + padding: 10px; + font: 20px "microsoft yahei"; + text-align: center; + border-top: 1px solid #e8e8ea; + color: #2788f8; +} + +.top { + height: 20%; + justify-content: center; + align-items: center; +} + +.grid1 { + width: 100%; + border-bottom: 1px solid #c3c3c3; + /* padding-top: 5px; + padding-bottom: 10px; */ + padding-top: 16rpx; + padding-bottom: 16rpx; + text-align: center; +} + +.text3 { + font-size: 18px; + color: rgb(48, 48, 48); +} diff --git a/pages/order/newBill/newBill.js b/pages/order/newBill/newBill.js new file mode 100644 index 0000000..0de4e8a --- /dev/null +++ b/pages/order/newBill/newBill.js @@ -0,0 +1,769 @@ + +var app = getApp() +var network = require("../../../utils/net.js") +var dateTimePicker = require('../../../utils/dateTimePicker.js'); +var utilll = require('../../../utils/util.js'); + +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, + unit: res.result + }) + }) + that.setData({ + which: "会计部门" + }) +} + +function GetCustomer(that, inputValue) { + let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer"; + let params = [{ + "InputValue": inputValue, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function(res) { + that.setData({ + currency: res.result, + customer: 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 GetSaleKind(that, v) { + let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetSaleKind"; + let params = [{ + "InputValue": v, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function(res) { + that.setData({ + currency: res.result, + saletype: res.result + }) + }) + that.setData({ + which: "销售类型" + }) +} + +function GetEmployee(that, inputValue) { + let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetEmployee"; + let params = [{ + "InputValue": inputValue, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + employee: res.result + }) + }) + that.setData({ + which: "业务员" + }) +} + +function GetStore(that, inputValue) { + let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetStore"; + let params = [{ + "InputValue": inputValue, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + store: res.result + }) + }) + that.setData({ + which: "仓库" + }) +} + +function GetTakeGoodsType(that, inputValue) { + let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetTakeGoods_Type"; + let params = []; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + takeGoodsType: res.result + }) + }) + that.setData({ + which: "配送方式" + }) +} + +function GetGoodsWithUnitPrice(that, v, date) { + let unitID = that.data.unit[that.data.isUnit].ID; + let customerID = that.data.customer[that.data.customerIndex].ID; + let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetGoodsWithUnitPrice"; + let params = [{ + "Input": v, + "PageIndex": 0, + "PageSize": 100, + "Customer_ID": customerID, + "AccountingUnit_ID": unitID, + "Date": date + }]; + network.transfer_request(method, params, function(res) { + that.setData({ + goods: res.result, + }) + }) +} + +Page({ + + /** + * 页面的初始数据 + */ + data: { + /** + * 页面配置 + */ + which: "", + winWidth: 0, + winHeight: app.globalData.winHeight, + // tab切换 + currentTab: 0, + obj: [], + goods: [], + idx: 0, + currency: [], + saletypeIndex: 0, + saletype: [{ + ID: 0, + Name: "请选择销售类型" + }], + departmentIndex: 0, + department: [{ + ID: 0, + Name: "请选择销售部门" + }], + customerIndex: 0, + customer: [{ + ID: 0, + Name: "请选择客户" + }], + isUnit: 0, + unit: [{ + ID: 0, + Name: "请选择会计单位" + }], + empIndex: 0, + employee: [{ + ID: 0, + Name: "请选择业务员" + }], + storeIndex: 0, + store: [{ + ID: 0, + Name: "请选择仓库" + }], + takeGoodsTypeIndex: 0, + takeGoodsType: [{ + ID: 0, + Name: "请选择配送方式" + }], + addrs: "", + remark:"", + dateTimeArray: null, + dateTime: null, + dateTimeArray1: null, + dateTime1: null, + startYear: 2018, + endYear: 2030 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + + // 获取完整的年月日 时分秒,以及默认显示的数组 + var obj1 = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear); + // 精确到分的处理,将数组的秒去掉 + var lastArray = obj1.dateTimeArray.pop(); + var lastTime = obj1.dateTime.pop(); + + this.setData({ + dateTimeArray: obj1.dateTimeArray, + dateTime: obj1.dateTime, + dateTimeArray1: obj1.dateTimeArray, + dateTime1: obj1.dateTime + }); + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + + }, + /** + * 滑动切换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 + }) + } + }, + + getAddrs: function(e) { + this.data.addrs = e.detail.value; + }, + getRemark: function (e) { + this.data.remark = e.detail.value; + }, + add: function(e) { + + let newobj = { + Goods_Name: "请选择存货" + }; + + this.data.obj.push(newobj) + + let aaa = this.data.obj; + + this.setData({ + obj: aaa, + }) + }, + deleteItem: function(e) { + let idx = e.target.dataset.idx; + let deleteobj = this.data.obj; + deleteobj.splice(idx, 1) + this.setData({ + obj: deleteobj + }) + }, + + getGoodsNum: function(e) { + //值: + //e.detail.value + //设置的id + //e.target.dataset.index + let value = e.detail.value; + let idx = e.target.dataset.idx; + + let end = value.charAt(value.length - 1) + if (end != ".") { + + this.data.obj[idx].goodsNum = Number(value); + + let Goods_MainUnitRatio = this.data.obj[idx].Goods_MainUnitRatio + let Goods_SecondUnitRatio = this.data.obj[idx].Goods_SecondUnitRatio + let Goods_UnitConvertDirection = this.data.obj[idx].Goods_UnitConvertDirection + let RightRatio = this.data.obj[idx].RightRatio + let LeftRatio = this.data.obj[idx].LeftRatio + + var numberNumber = Number(value) / RightRatio * LeftRatio; + if (Goods_UnitConvertDirection == 0 || Goods_UnitConvertDirection == 1) { + let secondNumber = numberNumber / (Goods_MainUnitRatio) * (Goods_SecondUnitRatio); + this.data.obj[idx].goodsSecondNum = Number(secondNumber) + this.setData({ + obj: this.data.obj + }) + } + } + + }, + getSecondNum: function(e) { + let value = e.detail.value; + let idx = e.target.dataset.idx; + + let end = value.charAt(value.length - 1) + if (end != ".") { + this.data.obj[idx].goodsSecondNum = Number(value); + + let Goods_MainUnitRatio = this.data.obj[idx].Goods_MainUnitRatio + let Goods_SecondUnitRatio = this.data.obj[idx].Goods_SecondUnitRatio + let Goods_UnitConvertDirection = this.data.obj[idx].Goods_UnitConvertDirection + let RightRatio = this.data.obj[idx].RightRatio + let LeftRatio = this.data.obj[idx].LeftRatio + + var numberNumber = Number(value) / LeftRatio * RightRatio; + if (Goods_UnitConvertDirection == 0 || Goods_UnitConvertDirection == 2) { + let unitnumber = numberNumber / (Goods_SecondUnitRatio) * (Goods_MainUnitRatio); + this.data.obj[idx].goodsNum = Number(unitnumber) + this.setData({ + obj: this.data.obj + }) + } + } + }, + getPrice: function(e) { + let value = e.detail.value; + let idx = e.target.dataset.idx; + this.data.obj[idx].Price = Number(value); + }, + powerDrawer: function(e) { + let that = this; + let x = e.currentTarget.dataset.x; + if (x == "会计部门") { + GetAccountingUnit(that, "") + } else if (x == "购货客户") { + GetCustomer(that, "") + } else if (x == "部门") { + GetDepartment(that, "") + } else if (x == "销售类型") { + GetSaleKind(that, "") + } else if (x == "业务员") { + GetEmployee(that, "") + } else if (x == "仓库") { + GetStore(that, "") + } else if (x == "配送方式") { + GetTakeGoodsType(that, "") + } + let currentStatu = e.currentTarget.dataset.statu; + // if (e.currentTarget.dataset.idx != null) { + // let idxx = e.currentTarget.dataset.idx; + // this.setData({ + // idx: idxx + // }) + // } + this.util(currentStatu) + }, + powerDrawer1: function(e) { + let that = this; + let currentStatu = e.currentTarget.dataset.statu; + + let timestamp = Date.parse(new Date()); + let date = "/Date(" + timestamp + "+0800)/"; + GetGoodsWithUnitPrice(that, "", date) + + if (e.currentTarget.dataset.idx != null) { + let idxx = e.currentTarget.dataset.idx; + this.setData({ + idx: idxx + }) + } + this.util1(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({ + isUnit: idx + }) + } else if (which == "购货客户") { + that.setData({ + customerIndex: idx + }) + } else if (which == "部门") { + that.setData({ + departmentIndex: idx + }) + } else if (which == "销售类型") { + that.setData({ + saletypeIndex: idx + }) + } else if (which == "业务员") { + that.setData({ + empIndex: idx + }) + } else if (which == "仓库") { + that.setData({ + storeIndex: idx + }) + } else if (which == "配送方式") { + that.setData({ + takeGoodsTypeIndex: idx + }) + } + + this.setData({ + showModalStatus: false, + }) + }, + itemclick1: function(e) { + var that = this; + var name = e.currentTarget.dataset.name; + var id = e.currentTarget.dataset.data.SaleGoods_ID; + var pp = e.currentTarget.dataset.policyprice; + if(!pp) + pp=''; + + var price = e.currentTarget.dataset.data.Price; + var Goods_MainUnitRatio = e.currentTarget.dataset.data.Goods_MainUnitRatio + var Goods_SecondUnitRatio = e.currentTarget.dataset.data.Goods_SecondUnitRatio + var Goods_UnitConvertDirection = e.currentTarget.dataset.data.Goods_UnitConvertDirection + + if (e.currentTarget.dataset.data.RightRatio == null) { + this.data.obj[this.data.idx].RightRatio = Number(1) + } + if (e.currentTarget.dataset.data.LeftRatio == null) { + this.data.obj[this.data.idx].LeftRatio = Number(1) + } + this.data.obj[this.data.idx].Goods_MainUnitRatio = Number(Goods_MainUnitRatio) + this.data.obj[this.data.idx].Goods_SecondUnitRatio = Number(Goods_SecondUnitRatio) + this.data.obj[this.data.idx].SaleGoods_ID = Number(id); + this.data.obj[this.data.idx].Goods_Name = name; + this.data.obj[this.data.idx].Price = Number(price) + this.data.obj[this.data.idx].PolicyPrice = pp; + this.data.obj[this.data.idx].Goods_UnitConvertDirection = Number(Goods_UnitConvertDirection) + this.setData({ + showModalStatus1: false, + obj: that.data.obj + }) + }, + select: function(e) { + var that = this; + var which = e.currentTarget.dataset.item; + var value = e.detail.value; + if (which == "会计部门") { + GetAccountingUnit(that, value) + } else if (which == "购货客户") { + GetCustomer(that, value) + } else if (which == "部门") { + GetDepartment(that, value) + } else if (which == "销售类型") { + GetSaleKind(that, value) + } else if (which == "业务员") { + GetEmployee(that, value) + } else if (which == "仓库") { + GetStore(that, value) + } else if (which == "配送方式") { + GetTakeGoodsType(that, value) + } + }, + select1: function(e) { + var that = this; + var value = e.detail.value; + let timestamp = Date.parse(new Date()); + let date = "/Date(" + timestamp + "+0800)/"; + GetGoodsWithUnitPrice(that, value, date) + }, + submitForm: function() { + let unitID = this.data.unit[this.data.isUnit].ID; + let customerID = this.data.customer[this.data.customerIndex].ID; + let departmentID = this.data.department[this.data.departmentIndex].ID; + let saletypeID = this.data.saletype[this.data.saletypeIndex].ID; + let employeeID = this.data.employee[this.data.empIndex].ID; + let storeID = this.data.store[this.data.storeIndex].ID; + let takeGoodsTypeName = this.data.takeGoodsType[this.data.takeGoodsTypeIndex].Name; + + let year = this.data.dateTimeArray1[0][this.data.dateTime1[0]] + let month = this.data.dateTimeArray1[1][this.data.dateTime1[1]] + let date = this.data.dateTimeArray1[2][this.data.dateTime1[2]] + let hour = this.data.dateTimeArray1[3][this.data.dateTime1[3]] + let minu = this.data.dateTimeArray1[4][this.data.dateTime1[4]] + + let stringTime = year + "/" + month + "/" + date + " " + hour + ":" + minu + ":00" + let timestamp2 = Date.parse(new Date(stringTime)); + let update = "/Date(" + timestamp2 + "+0800)/"; + + if (customerID == 0) { + wx.showToast({ + title: '请选择购货客户' + }) + return; + } + if (unitID == 0) { + wx.showToast({ + title: '请选择会计单位' + }) + return; + } + + if (departmentID == 0) { + wx.showToast({ + title: '请选择销售部门', + }) + return; + } + if (employeeID == 0) { + wx.showToast({ + title: '请选择业务员', + }) + return; + } + if (storeID == 0) { + wx.showToast({ + title: '请选择仓库', + }) + return; + } + if (saletypeID == 0) { + wx.showToast({ + title: '请选择销售类型', + }) + return; + } + if (takeGoodsTypeName == "") { + wx.showToast({ + title: '请选择配送方式', + }) + return; + } + if (this.data.addrs == "") { + wx.showToast({ + title: '请填写送货地址', + }) + return; + } + + let detailsArray = []; + + for (var i = 0; i < this.data.obj.length; i++) { + if (this.data.obj[i].Goods_Name == "请选择存货") { + wx.showToast({ + title: '存货不能为空', + }) + return; + } + if (this.data.obj[i].goodsNum == null) { + wx.showToast({ + title: '报货数量不能为空', + }) + return; + } + if (this.data.obj[i].goodsSecondNum == null) { + wx.showToast({ + title: '辅数量不能为空', + }) + return; + } + if (this.data.obj[i].PolicyPrice=='') + this.data.obj[i].PolicyPrice=NaN; + var dmo = { + SaleGoods_ID: this.data.obj[i].SaleGoods_ID, + UnitNum: this.data.obj[i].goodsNum, + SecondNumber: this.data.obj[i].goodsSecondNum, + Price: this.data.obj[i].Price, + PolicyPrice: this.data.obj[i].PolicyPrice + } + detailsArray.push(dmo) + } + + + let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Insert'; + let params = [{ + "Customer_ID": customerID, + "LoadTime": update, + "AccountingUnit_ID": unitID, + "Department_ID": departmentID, + "SaleKind_ID": saletypeID, + "Employee_ID": employeeID, + "Store_ID": storeID, + "TakeGoods_Type": takeGoodsTypeName, + "DeliverAddress": this.data.addrs, + "Remark":this.data.remark, + "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 { + wx.navigateBack({ + delta: 1 + }) + } + }, + fail: function (res) { } + }) + } + }) + + }, + changeDateTime1(e) { + this.setData({ + dateTime1: e.detail.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()参数,返回值是日期和时间 + // var timet = utilll.formatTime(new Date()); + // 再通过setData更改Page()里面的data,动态更新页面的数据 + this.setData({ + // time: timet, + showModalStatus: true, + }); + } + }, + util1: 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({ + showModalStatus1: false + }); + } + }.bind(this), 200) + + // 显示 + if (currentStatu == "open") { + // 调用函数时,传入new Date()参数,返回值是日期和时间 + // var timet = utilll.formatTime(new Date()); + // 再通过setData更改Page()里面的data,动态更新页面的数据 + this.setData({ + // time: timet, + showModalStatus1: true + }); + } + } +}) \ No newline at end of file diff --git a/pages/order/newBill/newBill.json b/pages/order/newBill/newBill.json new file mode 100644 index 0000000..d15b8c7 --- /dev/null +++ b/pages/order/newBill/newBill.json @@ -0,0 +1,5 @@ +{ + "navigationBarBackgroundColor": "white", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "销售订单" +} \ No newline at end of file diff --git a/pages/order/newBill/newBill.wxml b/pages/order/newBill/newBill.wxml new file mode 100644 index 0000000..ed5cd51 --- /dev/null +++ b/pages/order/newBill/newBill.wxml @@ -0,0 +1,201 @@ + + + 基本信息 + 订单明细 + + + + + + + + 购货客户 + + + {{customer[customerIndex].Name}} + + + + + 发货时间 + + + {{dateTimeArray1[0][dateTime1[0]]}}-{{dateTimeArray1[1][dateTime1[1]]}}-{{dateTimeArray1[2][dateTime1[2]]}} {{dateTimeArray1[3][dateTime1[3]]}}:{{dateTimeArray1[4][dateTime1[4]]}} + + + + + + 会计单位 + + + {{unit[isUnit].Name}} + + + + + + + 销售部门 + + + {{department[departmentIndex].Name}} + + + + + 业务员 + + + {{employee[empIndex].Name}} + + + + + 仓库 + + + {{store[storeIndex].Name}} + + + + + 销售类型 + + + {{saletype[saletypeIndex].Name}} + + + + + 配送方式 + + + {{takeGoodsType[takeGoodsTypeIndex].Name}} + + + + + 送货地址 + + + + 摘要 + + + + + + + + + + + + + + + + + + + + + + {{item.Name}} + + + + 取消 + + + + + + + + + + + 存货名称 + + {{obj[idx].Goods_Name}} + + + + + + 报货数量 + + + + + 辅 数 量 + + + + + + + + 单 价 + + + + + 政策单价 + {{obj[idx].PolicyPrice}} + + + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + {{item.Goods_Name}} + + + + 取消 + + + \ No newline at end of file diff --git a/pages/order/newBill/newBill.wxss b/pages/order/newBill/newBill.wxss new file mode 100644 index 0000000..81cc92a --- /dev/null +++ b/pages/order/newBill/newBill.wxss @@ -0,0 +1,224 @@ +/* pages/saleforecast/saleforecast.wxss */ + +page { + background:#EAF1F8; + height: calc(100%-10px); +} + +.swiper-tab { + /* height: 30px; */ + margin: 10px 20px; + text-align: center; + line-height: 30px; + background: white; + display: flex; + flex-direction: row; + border-radius: 5px; + border: 1px solid#2E8CF5; + overflow: hidden; +} + +.swiper-tab-list { + height: 100%; + width: 50%; + font-size: 30rpx; + color: #777; +} + +.on { + background-color:#2E8CF5 ; + color: white; +} + +.swiper-box { + display: block; + height: 100%; + width: 100%; + overflow: hidden; +} + +.swiper-items1 { + height: 100%; + padding-top: 3%; +} + +.swiper-items2 { + height: 100%; +} + +.scroll-views { + height: 100%; +} + +.baseitem { + background: #fff; + width: 100%; + border-bottom: 0.1px solid #dbdbdb; + display: flex; + flex-direction: row; + align-items: center; + padding-top: 20rpx; + padding-bottom: 20rpx; + font-size: 30rpx; +} + +.baseitem_key { + color: #666; + width: 40%; + margin-left: 20rpx; +} + +.baseitem_value { + color: rgb(48, 48, 48); + margin-left: 20rpx; + margin-right: 20rpx; + width: 160%; + text-align: right; +} + +.baseitem_key2 { + color: #666; + width: 40%; + margin-left: 20rpx; +} + +.baseitem_value2 { + color: rgb(48, 48, 48); + margin-left: 20rpx; + margin-right: 20rpx; + width: 160%; + text-align: right; +} + +.baseitem_key1 { + color: #666; + width: 100%; + margin-left: 20rpx; +} + +.baseitem_value1 { + color: rgb(48, 48, 48); + margin-left: 20rpx; + margin-right: 20rpx; + width: 100%; + text-align: right; +} + +::-webkit-scrollbar { + width: 0; + height: 0; + color: transparent; +} + +.add { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + border-left: none; + background: #fff; + width: 100%; + margin-top: 20rpx; + border-top: 0.5px solid #e0e0e0; + border-bottom: 0.5px solid #e0e0e0; + padding-top: 20rpx; + padding-bottom: 20rpx; +} + +.ico { + height: 42rpx; + width: 42rpx; +} + +.delete { + width: 100%; + padding-top: 20rpx; + padding-bottom: 20rpx; + color: red; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + background: #fff; + font-size: 30rpx; +} + +.itemView { + margin-top: 20rpx; +} + +.submit { + margin-left: 5%; + margin-top: 10%; + width: 90%; + margin-right: 5%; + color: #fff; + background: linear-gradient(to right, #39c4fd, #539eef); +} + +.drawer_screen { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1000; + background: #000; + opacity: 0.5; + overflow: hidden; +} + +.sousuo { + /* margin-right: 10%; + margin-left: 10%; */ + text-align: center; + background: #d6d8da; + height: 40px; + font-size: 28rpx; +} + +.drawer_content { + height: 500rpx; + overflow-y: scroll; /*超出父盒子高度可滚动*/ +} + +.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; +} + +.btn_ok { + padding: 10px; + font: 20px "microsoft yahei"; + text-align: center; + border-top: 1px solid #e8e8ea; + color: #2788f8; +} + +.top { + height: 20%; + justify-content: center; + align-items: center; +} + +.grid1 { + width: 100%; + border-bottom: 1px solid #c3c3c3; + /* padding-top: 5px; + padding-bottom: 10px; */ + padding-top: 16rpx; + padding-bottom: 16rpx; + text-align: center; +} + +.text3 { + font-size: 18px; + color: rgb(48, 48, 48); +} diff --git a/pages/order/order.js b/pages/order/order.js new file mode 100644 index 0000000..b741457 --- /dev/null +++ b/pages/order/order.js @@ -0,0 +1,218 @@ +// pages/order/order.js +const app = getApp(); +var network = require("../../utils/net.js"); +var timechage = require("../../utils/dateTimeUtil.js"); +var PageSize = 10 +var UnCheckPageIndex = 0 +var CheckedPageIndex = 0 +var getListPath = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/GetList' +var deleteItem = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Delete" + +// 未审核订单列表 +function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, successaction) { + let getArr = []; + let method = getListPath; + let params = [{ + "BillState": 0, + "StartLoadTime": app.globalData.selectStartDate, + "EndLoadTime": app.globalData.selectEndDate, + "Customer_ID": app.globalData.selectCustomer_ID, + "PageIndex": UnCheckPageIndex, + "PageSize": PageSize, + }]; + + network.transfer_request(method, params, function (res) { + successaction(); + var array = res.result; + if (array.length <= 0) { + wx.showToast({ + title: '无数据更新', + }) + UnCheckPageIndex = UnCheckPageIndex - 1; + return; + } + for (var i = 0; i < array.length; i++) { + var dmo = { + orderState: true, + workFlowName: array[i].DepartmentWorkFlow_Detail_Name, + orderID: array[i].ID, + Customer_Name: array[i].Customer_Name, + time: timechage.formatTimeTwo(array[i].LoadTime.substring(6, 19), 'Y/M/D') + } + getArr.push(dmo); + } + let arrLast = that.data.unCheckDataArr.concat(getArr); + that.setData({ + unCheckDataArr: arrLast, + }) + }) +} + +// 已审核订单列表 +function getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize) { + + let getArr = []; + let method = getListPath; + let params = [{ + "BillState": 20, + "StartLoadTime": app.globalData.selectStartDate, + "EndLoadTime": app.globalData.selectEndDate, + "Customer_ID": app.globalData.selectCustomer_ID, + "PageIndex": CheckedPageIndex, + "PageSize": PageSize, + }]; + network.transfer_request(method, params, function (res) { + var array = res.result; + if (array.length <= 0) { + wx.showToast({ + title: '无数据更新', + }) + CheckedPageIndex = CheckedPageIndex - 1; + return; + } + for (var i = 0; i < array.length; i++) { + var dmo = { + //添加单据状态的传递,在详情页面判断此值,进行是否允许提交的操作 + orderState: false, + workFlowName: array[i].DepartmentWorkFlow_Detail_Name, + orderID: array[i].ID, + Customer_Name: array[i].Customer_Name, + time: timechage.formatTimeTwo(array[i].LoadTime.substring(6, 19),'Y/M/D') + } + getArr.push(dmo); + } + let arrLast = that.data.checkedDataArr.concat(getArr); + that.setData({ + checkedDataArr: arrLast, + }) + }) +} + +Page({ + + data: { + checkedDataArr: [], + unCheckDataArr: [], + winHeight: app.globalData.winHeight, + currentTab: 0, + }, + + /** + * 滑动切换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 + }) + } + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + this.setData({ + checkedDataArr: [], + unCheckDataArr: [], + }) + var that = this; + + UnCheckPageIndex = 0; + CheckedPageIndex = 0; + getUnCheckOrderList(that, UnCheckPageIndex, PageSize, function (res) { + getCheckedOrderList(that, CheckedPageIndex, PageSize); + + }); + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function() { + + PageSize = 10 + app.globalData.selectCustomer_ID = null + app.globalData.selectStartDate = null + app.globalData.selectEndDate = null + + }, + + //未审核订单滑动到底部加载 + unCheckedScrollLower: function (event) { + var that = this; + UnCheckPageIndex = UnCheckPageIndex + 1; + getUnCheckOrderList(that, UnCheckPageIndex, PageSize, function (res) { + + }); + }, + + //已审核订单滑动到底部加载 + checkedScrollLower: function (event) { + var that = this; + CheckedPageIndex = CheckedPageIndex + 1; + getCheckedOrderList(that, CheckedPageIndex, PageSize); + }, + + // 进入订单详情 + itemclick: function(e) { + wx.navigateTo({ + url: 'detail/detail?ID=' + e.currentTarget.dataset.orderid, + }) + }, + + // 长按删除一条单据 + longPressDelete: function (event) { + var that = this; + var itemID = event.currentTarget.dataset.orderid; + wx.showModal({ + title: '提示', + content: '确定要删除' + itemID + '号单据吗?', + success: function (res) { + if (res.confirm) { + var params = [itemID]; + network.transfer_request(deleteItem, params, function (res) { + wx.showToast({ + title: '操作成功', + }) + that.onShow(); + }) + } else if (res.cancel) { + console.log('点击取消了'); + return false; + } + } + }) + }, + + createNew: function(e) { + wx.navigateTo({ + url: 'newBill/newBill', + }) + }, + chose: function(e) { + wx.navigateTo({ + url: 'query/query', + }) + }, + // 该方法绑定了页面滚动时的事件 + scroll: function(event) { + this.setData({ + scrollTop: event.detail.scrollTop + }); + }, +}) \ No newline at end of file diff --git a/pages/order/order.json b/pages/order/order.json new file mode 100644 index 0000000..0cda146 --- /dev/null +++ b/pages/order/order.json @@ -0,0 +1,5 @@ +{ + "navigationBarBackgroundColor": "white", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "订单列表" +} \ No newline at end of file diff --git a/pages/order/order.wxml b/pages/order/order.wxml new file mode 100644 index 0000000..b35bc3c --- /dev/null +++ b/pages/order/order.wxml @@ -0,0 +1,52 @@ + + + 未审核 + 已审核 + + + + + + + + + + + + {{item.Customer_Name}} + 流程状态:{{item.workFlowName}} + + + No.{{item.orderID}} + 发货时间:{{item.time}} + + + + + + + + + + + + + + {{item.Customer_Name}} + 流程状态:{{item.workFlowName}} + + + No.{{item.orderID}} + 发货时间:{{item.time}} + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/order/order.wxss b/pages/order/order.wxss new file mode 100644 index 0000000..bc58ad1 --- /dev/null +++ b/pages/order/order.wxss @@ -0,0 +1,117 @@ +/* pages/order/order.wxss */ + +page { + background:#EAF1F8; + height: calc(100%-10px); +} + +.swiper-tab { + /* height: 30px; */ + margin: 10px 20px; + text-align: center; + line-height: 30px; + background: white; + display: flex; + flex-direction: row; + border-radius: 5px; + border: 1px solid#2E8CF5; + overflow: hidden; +} + +.swiper-tab-list { + height: 100%; + width: 50%; + font-size: 30rpx; + color: #777; +} + +.on { + background-color:#2E8CF5 ; + color: white; +} + +.swiper-box { + width: 100%; + display: block; + overflow: hidden; +} + +.custmer_list_view_main{ + background-color: #fff; +} + +.scroll-views { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} + +.custmer_list{ + margin-bottom: 10%; +} + +.custmer_list_view{ + display: flex; + flex-direction: column; + padding-left: 5%; + padding-top: 16rpx; + background: white; +} + + +.phone_h{ + display: flex; + flex-direction: row; + justify-content: space-between; + padding-top: 12rpx; + padding-right: 5%; + padding-bottom: 10rpx; +} + +.text_name{ + font-size: 32rpx; + color: rgb(48, 48, 48); +} + +.text_state{ + font-size: 28rpx; +} +.text_id{ + font-size: 28rpx; + color: rgb(136, 136, 136); +} + +.text_time{ + font-size: 28rpx; + color: rgb(136, 136, 136); +} + +.view_line_main{ + height: 1rpx; + background-color: #dbdbdb; + margin-left: 20rpx; + margin-right: 0rpx; +} + +.view_line{ + height: 1rpx; + margin-left: 20rpx; + margin-right: 0rpx; + background: #dbdbdb; +} + +.chose{ + width: 100%; + height: 40px; + position: fixed; + bottom: 0rpx; +} + +.xinjian{ + width: 160rpx; + height: 160rpx; + position: fixed; + bottom: 60rpx; + right: 20rpx; +} diff --git a/pages/order/query/query.js b/pages/order/query/query.js new file mode 100644 index 0000000..e8786f2 --- /dev/null +++ b/pages/order/query/query.js @@ -0,0 +1,194 @@ +// pages/orderSearch/orderSearch.js +var network = require("../../../utils/net.js") +var timechage = require("../../../utils/dateTimeUtil.js") +var app = getApp() + +function GetCustomer(that, inputValue) { + let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer"; + let params = [{ + "InputValue": inputValue, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + customer: res.result + }) + }) + that.setData({ + which: "购货客户" + }) +} + +Page({ + + /** + * 页面的初始数据 + */ + data: { + customerIndex: 0, + customer: [{ + ID: 0, + Name: "请选择购货客户" + }], + currency: [], + Sdate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'), + Edate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'), + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + bindSDateChange: function (e) { + this.setData({ + Sdate: e.detail.value + }) + }, + bindEDateChange: function (e) { + this.setData({ + Edate: e.detail.value + }) + }, + submitForm: function (e) { + let customerID = this.data.customer[this.data.customerIndex].ID; + let sDate = timechage.formatymdERTDate(this.data.Sdate); + let eDate = timechage.formatymdERTDate(this.data.Edate); + if (customerID == 0) { + app.globalData.selectCustomer_ID = null; + } else { + app.globalData.selectCustomer_ID = customerID; + } + app.globalData.selectStartDate = sDate; + app.globalData.selectEndDate = eDate; + + wx.navigateBack({ + delta: 1 + }) + }, + powerDrawer: function (e) { + let that = this; + let x = e.currentTarget.dataset.x; + if (x == "购货客户") { + GetCustomer(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({ + customerIndex: idx + }) + } + + this.setData({ + showModalStatus: false, + }) + }, + select: function (e) { + var that = this; + var which = e.currentTarget.dataset.item; + var value = e.detail.value; + if (which == "购货客户") { + GetCustomer(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/order/query/query.json b/pages/order/query/query.json new file mode 100644 index 0000000..a3d1541 --- /dev/null +++ b/pages/order/query/query.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "订单筛选" +} \ No newline at end of file diff --git a/pages/order/query/query.wxml b/pages/order/query/query.wxml new file mode 100644 index 0000000..58a8595 --- /dev/null +++ b/pages/order/query/query.wxml @@ -0,0 +1,48 @@ + + + 购货客户 + {{customer[customerIndex].Name}} + + + + + 开始日期 + + + {{Sdate}} + + + + + + + 结束日期 + + + {{Edate}} + + + + + + + + + + + + + + + + + + + + + {{item.Name}} + + + + 取消 + \ No newline at end of file diff --git a/pages/order/query/query.wxss b/pages/order/query/query.wxss new file mode 100644 index 0000000..75fab2f --- /dev/null +++ b/pages/order/query/query.wxss @@ -0,0 +1,94 @@ +/* pages/orderSearch/orderSearch.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 +} + +.submit { + margin-top: 50rpx; + margin-bottom: 30rpx; +} + + +.drawer_screen { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1000; + background: #000; + opacity: 0.5; + overflow: hidden; +} + +.sousuo { + /* margin-right: 10%; + margin-left: 10%; */ + text-align: center; + background: #d6d8da; + height: 40px; + font-size: 28rpx; +} + +.drawer_content { + height: 500rpx; + overflow-y: scroll; /*超出父盒子高度可滚动*/ +} + +.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; +} + +.btn_ok { + padding: 10px; + font: 20px "microsoft yahei"; + text-align: center; + border-top: 1px solid #e8e8ea; + color: #2788f8; +} + +.top { + height: 20%; + justify-content: center; + align-items: center; +} + +.grid1 { + width: 100%; + border-bottom: 1px solid #c3c3c3; + /* padding-top: 5px; + padding-bottom: 10px; */ + padding-top: 16rpx; + padding-bottom: 16rpx; + text-align: center; +} + +.text3 { + font-size: 18px; + color: rgb(48, 48, 48); +} diff --git a/pages/saleForecastList/Detail/Detail.js b/pages/saleForecastList/Detail/Detail.js new file mode 100644 index 0000000..0bdaa5d --- /dev/null +++ b/pages/saleForecastList/Detail/Detail.js @@ -0,0 +1,726 @@ +// pages/orderinfo/orderinfo.js +var app = getApp() +var network = require("../../../utils/net.js") +var dateTimePicker = require('../../../utils/dateTimePicker.js'); +var utilll = require('../../../utils/util.js'); +var timechage = require("../../../utils/dateTimeUtil.js") +var orderID = 0; + +var getAccountingUnit = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountingUnit"; +var getCustomer = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer"; +var getDept = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDepartment"; +var getGoods = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetGoodsWithUnitPrice"; +var getSaleKind = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetSaleKind" + +var load = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleForecastRpc/Load"; +let update = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleForecastRpc/Update'; + +function setTime(that) { + // 获取完整的年月日 时分秒,以及默认显示的数组 + var obj1 = dateTimePicker.dateTimePicker(that.data.startYear, that.data.endYear, that.data.loadTime); + // 精确到分的处理,将数组的秒去掉 + var lastArray = obj1.dateTimeArray.pop(); + var lastTime = obj1.dateTime.pop(); + + that.setData({ + dateTimeArray1: obj1.dateTimeArray, + dateTime1: obj1.dateTime + }); +} + +function GetAccountingUnit(that, inputValue) { + let method = getAccountingUnit; + let params = [{ + "InputValue": inputValue, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + unit: res.result + }) + }) + that.setData({ + which: "会计单位" + }) +} + +function GetCustomer(that, inputValue) { + let method = getCustomer + let params = [{ + "InputValue": inputValue, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + customer: res.result + }) + }) + that.setData({ + which: "购货客户" + }) +} + +function GetDepartment(that, inputValue) { + let method = getDept; + 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 GetSaleKind(that, v) { + let method = getSaleKind; + let params = [{ + "InputValue": v, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + saletype: res.result + }) + }) + that.setData({ + which: "销售类型" + }) +} + +function GetGoodsWithUnitPrice(that, v, date) { + let unitID = that.data.unit[that.data.isUnit].ID; + let customerID = that.data.customer[that.data.customerIndex].ID; + let method = getGoods; + let params = [{ + "Input": v, + "PageIndex": 0, + "PageSize": 100, + "Customer_ID": customerID, + "AccountingUnit_ID": unitID, + "Date": date + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + goods: res.result, + }) + }) +} + +Page({ + + /** + * 页面的初始数据 + */ + data: { + /** + * 页面配置 + */ + which: "", + winWidth: 0, + winHeight: app.globalData.winHeight, + // tab切换 + currentTab: 0, + obj: [], + goods: [], + idx: 0, + currency: [], + saletypeIndex: 0, + saletype: [{ + ID: 0, + Name: "请选择销售类型" + }], + departmentIndex: 0, + department: [{ + ID: 0, + Name: "请选择销售部门" + }], + customerIndex: 0, + customer: [{ + ID: 0, + Name: "请选择客户" + }], + isUnit: 0, + unit: [{ + ID: 0, + Name: "请选择会计单位" + }], + addrs: "", + dateTimeArray1: null, + dateTime1: null, + startYear: 2018, + endYear: 2030, + loadTime: "" + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var that = this; + let ID = Number(options.ID); + orderID = ID; + + let method = load; + let params = [ID]; + network.transfer_request(method, params, function (res) { + let customerOld = [{ + ID: res.result.Customer_ID, + Name: res.result.Customer_Name + }] + + let unitOld = [{ + ID: res.result.AccountingUnit_ID, + Name: res.result.AccountingUnit_Name + }] + + let departmentOld = [{ + ID: res.result.Department_ID, + Name: res.result.Department_Name + }] + + let saletypeOld = [{ + ID: res.result.SaleKind_ID, + Name: res.result.SaleKind_Name + }] + + let addrrrr = res.result.DeliverAddress + let loadtimee = timechage.formatTimeTwo(res.result.Date.substring(6, 19), 'Y-M-D h:m') + + let details = []; + + for (var i = 0; i < res.result.Details.length; i++) { + if (res.result.Details[i].RightRatio == null) { + var rightRatio = 1 + } + if (res.result.Details[i].LeftRatio == null) { + var leftRatio = 1 + } + var dmo = { + "Goods_Name": res.result.Details[i].Goods_Name, + "SaleGoods_ID": res.result.Details[i].SaleGoods_ID, + "goodsNum": res.result.Details[i].UnitNum, + "goodsSecondNum": res.result.Details[i].SecondNumber, + "Price": res.result.Details[i].Price, + "PolicyPrice": res.result.Details[i].PolicyPrice, + "Goods_MainUnitRatio": res.result.Details[i].Goods_MainUnitRatio, + "Goods_SecondUnitRatio": res.result.Details[i].Goods_SecondUnitRatio, + "Goods_UnitConvertDirection": res.result.Details[i].Goods_UnitConvertDirection, + "RightRatio": rightRatio, + "LeftRatio": leftRatio, + "ID": res.result.Details[i].ID + } + details.push(dmo) + } + + that.setData({ + customer: customerOld, + unit: unitOld, + department: departmentOld, + saletype: saletypeOld, + addrs: addrrrr, + loadTime: loadtimee, + obj: details + }) + setTime(that) + + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + /** + * 滑动切换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 + }) + } + }, + + getAddrs: function (e) { + this.data.addrs = e.detail.value; + }, + add: function (e) { + + let newobj = { + Goods_Name: "请选择存货" + }; + + this.data.obj.push(newobj) + + let aaa = this.data.obj; + + this.setData({ + obj: aaa, + }) + }, + deleteItem: function (e) { + let idx = e.target.dataset.idx; + let deleteobj = this.data.obj; + deleteobj.splice(idx, 1) + this.setData({ + obj: deleteobj + }) + }, + + getGoodsNum: function (e) { + //值: + //e.detail.value + //设置的id + //e.target.dataset.index + let value = e.detail.value; + let idx = e.target.dataset.idx; + + let end = value.charAt(value.length - 1) + if (end != ".") { + + this.data.obj[idx].goodsNum = Number(value); + + let Goods_MainUnitRatio = this.data.obj[idx].Goods_MainUnitRatio + let Goods_SecondUnitRatio = this.data.obj[idx].Goods_SecondUnitRatio + let Goods_UnitConvertDirection = this.data.obj[idx].Goods_UnitConvertDirection + let RightRatio = this.data.obj[idx].RightRatio + let LeftRatio = this.data.obj[idx].LeftRatio + + var numberNumber = Number(value) / RightRatio * LeftRatio; + if (Goods_UnitConvertDirection == 0 || Goods_UnitConvertDirection == 1) { + let secondNumber = numberNumber / (Goods_MainUnitRatio) * (Goods_SecondUnitRatio); + this.data.obj[idx].goodsSecondNum = Number(secondNumber) + this.setData({ + obj: this.data.obj + }) + } + } + + }, + getSecondNum: function (e) { + let value = e.detail.value; + let idx = e.target.dataset.idx; + + let end = value.charAt(value.length - 1) + if (end != ".") { + this.data.obj[idx].goodsSecondNum = Number(value); + + let Goods_MainUnitRatio = this.data.obj[idx].Goods_MainUnitRatio + let Goods_SecondUnitRatio = this.data.obj[idx].Goods_SecondUnitRatio + let Goods_UnitConvertDirection = this.data.obj[idx].Goods_UnitConvertDirection + let RightRatio = this.data.obj[idx].RightRatio + let LeftRatio = this.data.obj[idx].LeftRatio + + var numberNumber = Number(value) / LeftRatio * RightRatio; + if (Goods_UnitConvertDirection == 0 || Goods_UnitConvertDirection == 2) { + let unitnumber = numberNumber / (Goods_SecondUnitRatio) * (Goods_MainUnitRatio); + this.data.obj[idx].goodsNum = Number(unitnumber) + this.setData({ + obj: this.data.obj + }) + } + } + }, + getPrice: function (e) { + let value = e.detail.value; + let idx = e.target.dataset.idx; + this.data.obj[idx].Price = Number(value); + }, + powerDrawer: function (e) { + let that = this; + let x = e.currentTarget.dataset.x; + if (x == "会计单位") { + GetAccountingUnit(that, "") + } else if (x == "购货客户") { + GetCustomer(that, "") + } else if (x == "部门") { + GetDepartment(that, "") + } else if (x == "销售类型") { + GetSaleKind(that, "") + } + let currentStatu = e.currentTarget.dataset.statu; + this.util(currentStatu) + }, + powerDrawer1: function (e) { + let that = this; + let currentStatu = e.currentTarget.dataset.statu; + + let timestamp = Date.parse(new Date()); + let date = "/Date(" + timestamp + "+0800)/"; + GetGoodsWithUnitPrice(that, "", date) + + if (e.currentTarget.dataset.idx != null) { + let idxx = e.currentTarget.dataset.idx; + this.setData({ + idx: idxx + }) + } + this.util1(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({ + isUnit: idx + }) + } else if (which == "购货客户") { + that.setData({ + customerIndex: idx + }) + } else if (which == "部门") { + that.setData({ + departmentIndex: idx + }) + } else if (which == "销售类型") { + that.setData({ + saletypeIndex: idx + }) + } + + this.setData({ + showModalStatus: false, + }) + }, + itemclick1: function (e) { + var that = this; + var name = e.currentTarget.dataset.name; + var id = e.currentTarget.dataset.data.SaleGoods_ID; + var pp = e.currentTarget.dataset.policyprice; + var price = e.currentTarget.dataset.data.Price; + var Goods_MainUnitRatio = e.currentTarget.dataset.data.Goods_MainUnitRatio + var Goods_SecondUnitRatio = e.currentTarget.dataset.data.Goods_SecondUnitRatio + var Goods_UnitConvertDirection = e.currentTarget.dataset.data.Goods_UnitConvertDirection + + if (e.currentTarget.dataset.data.RightRatio == null) { + this.data.obj[this.data.idx].RightRatio = Number(1) + } + if (e.currentTarget.dataset.data.LeftRatio == null) { + this.data.obj[this.data.idx].LeftRatio = Number(1) + } + this.data.obj[this.data.idx].Goods_MainUnitRatio = Number(Goods_MainUnitRatio) + this.data.obj[this.data.idx].Goods_SecondUnitRatio = Number(Goods_SecondUnitRatio) + this.data.obj[this.data.idx].SaleGoods_ID = Number(id); + this.data.obj[this.data.idx].Goods_Name = name; + this.data.obj[this.data.idx].Price = Number(price) + this.data.obj[this.data.idx].PolicyPrice = Number(pp); + this.data.obj[this.data.idx].Goods_UnitConvertDirection = Number(Goods_UnitConvertDirection) + this.setData({ + showModalStatus1: false, + obj: that.data.obj + }) + }, + select: function (e) { + var that = this; + var which = e.currentTarget.dataset.item; + var value = e.detail.value; + if (which == "会计单位") { + GetAccountingUnit(that, value) + } else if (which == "购货客户") { + GetCustomer(that, value) + } else if (which == "部门") { + GetDepartment(that, value) + } else if (which == "销售类型") { + GetSaleKind(that, value) + } + }, + select1: function (e) { + var that = this; + var value = e.detail.value; + let timestamp = Date.parse(new Date()); + let date = "/Date(" + timestamp + "+0800)/"; + GetGoodsWithUnitPrice(that, value, date) + }, + submitForm: function () { + let unitID = this.data.unit[this.data.isUnit].ID; + let customerID = this.data.customer[this.data.customerIndex].ID; + let departmentID = this.data.department[this.data.departmentIndex].ID; + let saletypeID = this.data.saletype[this.data.saletypeIndex].ID; + + let year = this.data.dateTimeArray1[0][this.data.dateTime1[0]] + let month = this.data.dateTimeArray1[1][this.data.dateTime1[1]] + let date = this.data.dateTimeArray1[2][this.data.dateTime1[2]] + let hour = this.data.dateTimeArray1[3][this.data.dateTime1[3]] + let minu = this.data.dateTimeArray1[4][this.data.dateTime1[4]] + + let stringTime = year + "/" + month + "/" + date + " " + hour + ":" + minu + ":00" + let timestamp2 = Date.parse(new Date(stringTime)); + let update = "/Date(" + timestamp2 + "+0800)/"; + + if (customerID == 0) { + wx.showToast({ + title: '请选择购货客户' + }) + return; + } + if (unitID == 0) { + wx.showToast({ + title: '请选择会计单位' + }) + return; + } + + if (departmentID == 0) { + wx.showToast({ + title: '请选择销售部门', + }) + return; + } + + if (saletypeID == 0) { + wx.showToast({ + title: '请选择销售类型', + }) + return; + } + if (this.data.addrs == "") { + wx.showToast({ + title: '请填写送货地址', + }) + return; + } + + let detailsArray = []; + + for (var i = 0; i < this.data.obj.length; i++) { + if (this.data.obj[i].Goods_Name == "请选择存货") { + wx.showToast({ + title: '存货不能为空', + }) + return; + } + if (this.data.obj[i].goodsNum == null) { + wx.showToast({ + title: '报货数量不能为空', + }) + return; + } + if (this.data.obj[i].goodsSecondNum == null) { + wx.showToast({ + title: '辅数量不能为空', + }) + return; + } + var olddID = 0; + if (this.data.obj[i].ID == null) { + olddID = 0 + } else { + olddID = Number(this.data.obj[i].ID) + } + var dmo = { + SaleGoods_ID: this.data.obj[i].SaleGoods_ID, + UnitNum: this.data.obj[i].goodsNum, + SecondNumber: this.data.obj[i].goodsSecondNum, + Price: this.data.obj[i].Price, + PolicyPrice: this.data.obj[i].PolicyPrice, + ID: olddID + } + detailsArray.push(dmo) + } + + + let method = update; + let params = [{ + "Customer_ID": customerID, + "LoadTime": update, + "AccountingUnit_ID": unitID, + "Department_ID": departmentID, + "SaleKind_ID": saletypeID, + "DeliverAddress": this.data.addrs, + "Details": detailsArray, + "ID": orderID + }]; + + network.transfer_request(method, params, function (res) { + if (res.result == null) { + wx.showModal({ + title: '提示', + content: '修改成功,是否返回上级列表', + success: function (res) { + if (res.cancel) { + } else { + wx.navigateBack({ + delta: 1 + }) + } + }, + fail: function (res) { } + }) + } + }) + + }, + changeDateTime1(e) { + this.setData({ + dateTime1: e.detail.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()参数,返回值是日期和时间 + // var timet = utilll.formatTime(new Date()); + // 再通过setData更改Page()里面的data,动态更新页面的数据 + this.setData({ + // time: timet, + showModalStatus: true, + }); + } + }, + util1: 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({ + showModalStatus1: false + }); + } + }.bind(this), 200) + + // 显示 + if (currentStatu == "open") { + // 调用函数时,传入new Date()参数,返回值是日期和时间 + // var timet = utilll.formatTime(new Date()); + // 再通过setData更改Page()里面的data,动态更新页面的数据 + this.setData({ + // time: timet, + showModalStatus1: true + }); + } + } +}) \ No newline at end of file diff --git a/pages/saleForecastList/Detail/Detail.json b/pages/saleForecastList/Detail/Detail.json new file mode 100644 index 0000000..3ee66ef --- /dev/null +++ b/pages/saleForecastList/Detail/Detail.json @@ -0,0 +1,5 @@ +{ + "navigationBarBackgroundColor": "white", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "预报详情" +} \ No newline at end of file diff --git a/pages/saleForecastList/Detail/Detail.wxml b/pages/saleForecastList/Detail/Detail.wxml new file mode 100644 index 0000000..2e818b9 --- /dev/null +++ b/pages/saleForecastList/Detail/Detail.wxml @@ -0,0 +1,183 @@ + + + + + 基本信息 + 预报详细 + + + + + + + + + 购货客户 + + + {{customer[customerIndex].Name}} + + + + + + + 发货时间 + + + {{dateTimeArray1[0][dateTime1[0]]}}-{{dateTimeArray1[1][dateTime1[1]]}}-{{dateTimeArray1[2][dateTime1[2]]}} {{dateTimeArray1[3][dateTime1[3]]}}:{{dateTimeArray1[4][dateTime1[4]]}} + + + + + + + + 会计单位 + + + + {{unit[isUnit].Name}} + + + + + + 销售部门 + + + {{department[departmentIndex].Name}} + + + + + + + 销售类型 + + + {{saletype[saletypeIndex].Name}} + + + + + + 送货地址 + + + + + + + + + + + + + + + + + + + + + + + {{item.Name}} + + + + 取消 + + + + + + + + + + + + + 存货名称 + + {{obj[idx].Goods_Name}} + + + + + + 报货数量 + + + + + + 辅 数 量 + + + + + + 单 价 + + + + + + 政策单价 + {{obj[idx].PolicyPrice}} + + + + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + {{item.Goods_Name}} + + + + 取消 + + + \ No newline at end of file diff --git a/pages/saleForecastList/Detail/Detail.wxss b/pages/saleForecastList/Detail/Detail.wxss new file mode 100644 index 0000000..c35ca30 --- /dev/null +++ b/pages/saleForecastList/Detail/Detail.wxss @@ -0,0 +1,229 @@ +/* pages/orderinfo/orderinfo.wxss */ + +page { + background: #EAF1F8; + height: calc(100%-10px); +} +.swiper-tab { + /* height: 30px; */ + margin: 10px 20px; + text-align: center; + line-height: 30px; + background: white; + display: flex; + flex-direction: row; + border-radius: 5px; + border: 1px solid#2E8CF5; + overflow: hidden; +} + +.swiper-tab-list { + height: 100%; + width: 50%; + font-size: 30rpx; + color: #777; +} + +.on { + background-color:#2E8CF5 ; + color: white; +} + + +.swiper-box { + display: block; + width: 100%; + overflow: hidden; +} + +.swiper-items1 { + height: 100%; +} + +.swiper-items2 { + height: 100%; +} + +.scroll-views { + height: 100%; +} + +.backGroundContainer{ + background: #fff; +} + +.baseitem { + height: 60rpx; + background: #fff; + /* border-bottom: 0.1px solid #dbdbdb; */ + display: flex; + flex-direction: row; + align-items: center; + padding: 20rpx 20rpx; + font-size: 30rpx; + +} + +.horizontallineView { + height: 1rpx; + background-color: #dbdbdb; + margin-left: 20rpx; + margin-right: 0rpx; +} + +.baseitem_key { + color: #666; + width: 30%; + /* margin-left: 20rpx; */ +} + +.baseitem_value { + color: rgb(48, 48, 48); + /* margin-left: 20rpx; + margin-right: 20rpx; */ + width: 70%; + text-align: right; +} + +.baseitem_key2 { + color: #666; + width: 30%; + /* margin-left: 20rpx; */ +} + +.baseitem_value2 { + color: rgb(48, 48, 48); + /* margin-left: 20rpx; + margin-right: 20rpx; */ + width: 70%; + text-align: right; +} + +.baseitem_key1 { + color: #666; + width: 30%; + margin-left: 20rpx; +} + +.baseitem_value1 { + color: rgb(48, 48, 48); + /* margin-left: 20rpx; + margin-right: 20rpx; */ + width: 70%; + text-align: right; +} + +.add { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + border-left: none; + background: #fff; + width: 100%; + margin-top: 20rpx; + border-top: 0.5px solid #e0e0e0; + border-bottom: 0.5px solid #e0e0e0; + padding-top: 20rpx; + padding-bottom: 20rpx; +} + +.ico { + height: 42rpx; + width: 42rpx; +} + +.delete { + width: 100%; + padding-top: 20rpx; + padding-bottom: 20rpx; + color: red; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + background: #fff; + font-size: 30rpx; +} + +.itemView { + margin-top: 20rpx; + background: #fff; +} + +.submit { + margin-left: 5%; + margin-top: 10%; + width: 90%; + margin-right: 5%; + color: #fff; + background: linear-gradient(to right, #39c4fd, #539eef); +} + +.drawer_screen { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1000; + background: #000; + opacity: 0.5; + overflow: hidden; +} + +.sousuo { + /* margin-right: 10%; + margin-left: 10%; */ + text-align: center; + background: #d6d8da; + height: 40px; + font-size: 28rpx; +} + + +.drawer_content { + height: 500rpx; + overflow-y: scroll; /*超出父盒子高度可滚动*/ +} + +.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; +} + +.btn_ok { + padding: 10px; + font: 20px "microsoft yahei"; + text-align: center; + border-top: 1px solid #e8e8ea; + color: #2E8CF5; +} + +.top { + height: 20%; + justify-content: center; + align-items: center; +} + +.grid1 { + width: 100%; + border-bottom: 1px solid #c3c3c3; + /* padding-top: 5px; + padding-bottom: 10px; */ + padding-top: 16rpx; + padding-bottom: 16rpx; + text-align: center; +} + +.text3 { + font-size: 18px; + color: rgb(48, 48, 48); +} \ No newline at end of file diff --git a/pages/saleForecastList/newBill/newBill.js b/pages/saleForecastList/newBill/newBill.js new file mode 100644 index 0000000..05a6276 --- /dev/null +++ b/pages/saleForecastList/newBill/newBill.js @@ -0,0 +1,707 @@ +var app = getApp() +var network = require("../../../utils/net.js") +var dateTimePicker = require('../../../utils/dateTimePicker.js'); +var utilll = require('../../../utils/util.js'); + +var getAccountingUnit = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountingUnit"; +var getCustomer = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer"; +var getDept = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDepartment"; +var getGoods = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetGoodsWithUnitPrice"; +var getSaleKind = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetSaleKind" +var insert = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleForecastRpc/Insert'; + +function GetAccountingUnit(that, inputValue) { + let method = getAccountingUnit; + let params = [{ + "InputValue": inputValue, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function(res) { + that.setData({ + currency: res.result, + unit: res.result + }) + }) + that.setData({ + which: "会计部门" + }) +} + +function GetDepartment(that, inputValue) { + let method = getDept; + 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 GetSaleKind(that, v) { + let method = getSaleKind; + let params = [{ + "InputValue": v, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function(res) { + that.setData({ + currency: res.result, + saletype: res.result + }) + }) + that.setData({ + which: "销售类型" + }) +} + +function GetGoodsWithUnitPrice(that, v, date) { + let unitID = that.data.unit[that.data.isUnit].ID; + let customerID = that.data.customer[that.data.customerIndex].ID; + let method = getGoods; + let params = [{ + "Input": v, + "PageIndex": 0, + "PageSize": 100, + "Customer_ID": customerID, + "AccountingUnit_ID": unitID, + "Date": date + }]; + network.transfer_request(method, params, function(res) { + that.setData({ + goods: res.result, + }) + }) +} + +Page({ + + data: { + which: "", + winHeight: app.globalData.winHeight, + + // 从哪个页面返回当前页面 + backPage: "", + + // tab切换 + currentTab: 0, + // 存货数组 + obj: [], + goods: [], + idx: 0, + currency: [], + saletypeIndex: 0, + saletype: [{ + ID: 0, + Name: "请选择销售类型" + }], + departmentIndex: 0, + department: [{ + ID: 0, + Name: "请选择销售部门" + }], + customerIndex: 0, + customer: [{ + ID: 0, + Name: "请选择客户" + }], + isUnit: 0, + unit: [{ + ID: 0, + Name: "请选择会计单位" + }], + addrs: "", + dateTimeArray: null, + dateTime: null, + dateTimeArray1: null, + dateTime1: null, + startYear: 2018, + endYear: 2030 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + var that = this; + + // 获取完整的年月日 时分秒,以及默认显示的数组 + var obj1 = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear); + // 精确到分的处理,将数组的秒去掉 + var lastArray = obj1.dateTimeArray.pop(); + var lastTime = obj1.dateTime.pop(); + + this.setData({ + dateTimeArray: obj1.dateTimeArray, + dateTime: obj1.dateTime, + dateTimeArray1: obj1.dateTimeArray, + dateTime1: obj1.dateTime + }); + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + var that = this; + + if (that.data.backPage == "customerChoosePage") { + // 返回的用户只能是一条,所以index只能为0 + var customerArr = app.globalData.customerArray; + if (customerArr.length > 0) { + that.setData({ + customer: customerArr, + customerIndex: 0, + }) + } + } + + if (that.data.backPage == "goodsNameChoosePage") { + // 获取存货 加载完成后计算价格政策 + var goodsArr = app.globalData.goodsNameArray; + if (goodsArr.length > 0) { + let backGoodsArr = []; + for (var i = 0; i < goodsArr.length; i++) { + + var name = goodsArr[i].Goods_Name; + var id = goodsArr[i].SaleGoods_ID; + var pp = goodsArr[i].PolicyPrice; + var price = goodsArr[i].Price; + var mainUnitRatio = goodsArr[i].Goods_MainUnitRatio; + var secondUnitRatio = goodsArr[i].Goods_SecondUnitRatio; + var unitConvertDirection = goodsArr[i].Goods_UnitConvertDirection; + var rightRatio = goodsArr[i].RightRatio; + var leftRatio = goodsArr[i].LeftRatio; + + if (pp == null) { + pp = Number(0); + } + if (rightRatio == null) { + rightRatio = Number(1); + } + if (leftRatio == null) { + leftRatio = Number(1); + } + + let goodsNameObj = { + Goods_MainUnitRatio: Number(mainUnitRatio), + Goods_SecondUnitRatio: Number(secondUnitRatio), + SaleGoods_ID: Number(id), + Goods_Name: name, + Price: Number(price), + PolicyPrice: Number(pp), + Goods_UnitConvertDirection: Number(unitConvertDirection), + RightRatio: rightRatio, + LeftRatio: leftRatio, + } + backGoodsArr.push(goodsNameObj) + } + + that.setData({ + obj: backGoodsArr, + }) + } + } + + }, + + // 原有请求客户的方法,已经废弃 + GetCustomer: function() { + wx.navigateTo({ + url: '../../customerChooseTemplate/customerChooseTemplate?fromePage=newForecast', + }) + // let method = getCustomer; + // let params = [{ + // "InputValue": inputValue, + // "PageIndex": 0, + // "PageSize": 100 + // }]; + // network.transfer_request(method, params, function(res) { + // that.setData({ + // currency: res.result, + // customer: res.result + // }) + // }) + // that.setData({ + // which: "购货客户" + // }) + }, + + + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function() { + app.globalData.goodsNameArray = []; + app.globalData.customerArray = []; + }, + + /** + * 滑动切换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 + }) + } + }, + + // 添加地址 + getAddrs: function(e) { + this.data.addrs = e.detail.value; + }, + + // 添加存货 跳转存货选择页面 + add: function(e) { + var that = this; + let unitID = that.data.unit[that.data.isUnit].ID; + let customerID = that.data.customer[that.data.customerIndex].ID; + if (unitID && customerID) { + wx.navigateTo({ + url: '../../goodaNameChooseTemplate/goodaNameChooseTemplate?unitID=' + unitID + '&customerID' + customerID, + }) + } else { + wx.showModal({ + title: '提示', + content: '请先选择客户及会计单位', + }) + } + }, + + // 添加购货客户 跳转客户选择页面 + getCustomerItem: function() { + wx.navigateTo({ + url: '../../customerChooseTemplate/customerChooseTemplate?fromePage=newForecast', + }) + }, + + deleteItem: function(e) { + let idx = e.target.dataset.idx; + let deleteobj = this.data.obj; + deleteobj.splice(idx, 1) + this.setData({ + obj: deleteobj + }) + }, + + getGoodsNum: function(e) { + //值: + //e.detail.value + //设置的id + //e.target.dataset.index + let value = e.detail.value; + let idx = e.target.dataset.idx; + + let end = value.charAt(value.length - 1) + if (end != ".") { + + this.data.obj[idx].goodsNum = Number(value); + + let Goods_MainUnitRatio = this.data.obj[idx].Goods_MainUnitRatio + let Goods_SecondUnitRatio = this.data.obj[idx].Goods_SecondUnitRatio + let Goods_UnitConvertDirection = this.data.obj[idx].Goods_UnitConvertDirection + let RightRatio = this.data.obj[idx].RightRatio + let LeftRatio = this.data.obj[idx].LeftRatio + + var numberNumber = Number(value) / RightRatio * LeftRatio; + if (Goods_UnitConvertDirection == 0 || Goods_UnitConvertDirection == 1) { + let secondNumber = numberNumber / (Goods_MainUnitRatio) * (Goods_SecondUnitRatio); + this.data.obj[idx].goodsSecondNum = Number(secondNumber) + this.setData({ + obj: this.data.obj + }) + } + } + + }, + getSecondNum: function(e) { + let value = e.detail.value; + let idx = e.target.dataset.idx; + + let end = value.charAt(value.length - 1) + if (end != ".") { + this.data.obj[idx].goodsSecondNum = Number(value); + + let Goods_MainUnitRatio = this.data.obj[idx].Goods_MainUnitRatio + let Goods_SecondUnitRatio = this.data.obj[idx].Goods_SecondUnitRatio + let Goods_UnitConvertDirection = this.data.obj[idx].Goods_UnitConvertDirection + let RightRatio = this.data.obj[idx].RightRatio + let LeftRatio = this.data.obj[idx].LeftRatio + + var numberNumber = Number(value) / LeftRatio * RightRatio; + if (Goods_UnitConvertDirection == 0 || Goods_UnitConvertDirection == 2) { + let unitnumber = numberNumber / (Goods_SecondUnitRatio) * (Goods_MainUnitRatio); + this.data.obj[idx].goodsNum = Number(unitnumber) + this.setData({ + obj: this.data.obj + }) + } + } + }, + getPrice: function(e) { + let value = e.detail.value; + let idx = e.target.dataset.idx; + this.data.obj[idx].Price = Number(value); + }, + powerDrawer: function(e) { + let that = this; + let x = e.currentTarget.dataset.x; + if (x == "会计部门") { + GetAccountingUnit(that, "") + } else if (x == "购货客户") { + GetCustomer(that, "") + } else if (x == "部门") { + GetDepartment(that, "") + } else if (x == "销售类型") { + GetSaleKind(that, "") + } + let currentStatu = e.currentTarget.dataset.statu; + // if (e.currentTarget.dataset.idx != null) { + // let idxx = e.currentTarget.dataset.idx; + // this.setData({ + // idx: idxx + // }) + // } + this.util(currentStatu) + }, + powerDrawer1: function(e) { + let that = this; + let currentStatu = e.currentTarget.dataset.statu; + + let timestamp = Date.parse(new Date()); + let date = "/Date(" + timestamp + "+0800)/"; + GetGoodsWithUnitPrice(that, "", date) + + if (e.currentTarget.dataset.idx != null) { + let idxx = e.currentTarget.dataset.idx; + this.setData({ + idx: idxx + }) + } + this.util1(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({ + isUnit: idx + }) + } else if (which == "购货客户") { + that.setData({ + customerIndex: idx + }) + } else if (which == "部门") { + that.setData({ + departmentIndex: idx + }) + } else if (which == "销售类型") { + that.setData({ + saletypeIndex: idx + }) + } + + this.setData({ + showModalStatus: false, + }) + }, + // 选取货物后进行价格计算 + itemclick1: function(e) { + var that = this; + var name = e.currentTarget.dataset.name; + var id = e.currentTarget.dataset.data.SaleGoods_ID; + var pp = e.currentTarget.dataset.PolicyPrice; + var price = e.currentTarget.dataset.data.Price; + var Goods_MainUnitRatio = e.currentTarget.dataset.data.Goods_MainUnitRatio + var Goods_SecondUnitRatio = e.currentTarget.dataset.data.Goods_SecondUnitRatio + var Goods_UnitConvertDirection = e.currentTarget.dataset.data.Goods_UnitConvertDirection + + if (e.currentTarget.dataset.data.RightRatio == null) { + this.data.obj[this.data.idx].RightRatio = Number(1) + } + if (e.currentTarget.dataset.data.LeftRatio == null) { + this.data.obj[this.data.idx].LeftRatio = Number(1) + } + this.data.obj[this.data.idx].Goods_MainUnitRatio = Number(Goods_MainUnitRatio) + this.data.obj[this.data.idx].Goods_SecondUnitRatio = Number(Goods_SecondUnitRatio) + this.data.obj[this.data.idx].SaleGoods_ID = Number(id); + this.data.obj[this.data.idx].Goods_Name = name; + this.data.obj[this.data.idx].Price = Number(price) + this.data.obj[this.data.idx].PolicyPrice = Number(pp); + this.data.obj[this.data.idx].Goods_UnitConvertDirection = Number(Goods_UnitConvertDirection) + this.setData({ + showModalStatus1: false, + obj: that.data.obj + }) + }, + + select: function(e) { + var that = this; + var which = e.currentTarget.dataset.item; + var value = e.detail.value; + if (which == "会计部门") { + GetAccountingUnit(that, value) + } else if (which == "购货客户") { + GetCustomer(that, value) + } else if (which == "部门") { + GetDepartment(that, value) + } else if (which == "销售类型") { + GetSaleKind(that, value) + } + }, + select1: function(e) { + var that = this; + var value = e.detail.value; + let timestamp = Date.parse(new Date()); + let date = "/Date(" + timestamp + "+0800)/"; + GetGoodsWithUnitPrice(that, value, date) + }, + submitForm: function() { + let unitID = this.data.unit[this.data.isUnit].ID; + let customerID = this.data.customer[this.data.customerIndex].ID; + let departmentID = this.data.department[this.data.departmentIndex].ID; + let saletypeID = this.data.saletype[this.data.saletypeIndex].ID; + + let year = this.data.dateTimeArray1[0][this.data.dateTime1[0]] + let month = this.data.dateTimeArray1[1][this.data.dateTime1[1]] + let date = this.data.dateTimeArray1[2][this.data.dateTime1[2]] + let hour = this.data.dateTimeArray1[3][this.data.dateTime1[3]] + let minu = this.data.dateTimeArray1[4][this.data.dateTime1[4]] + + let stringTime = year + "/" + month + "/" + date + " " + hour + ":" + minu + ":00" + let timestamp2 = Date.parse(new Date(stringTime)); + let update = "/Date(" + timestamp2 + "+0800)/"; + + if (customerID == 0) { + wx.showToast({ + title: '请选择购货客户' + }) + return; + } + if (unitID == 0) { + wx.showToast({ + title: '请选择会计单位' + }) + return; + } + + if (departmentID == 0) { + wx.showToast({ + title: '请选择销售部门', + }) + return; + } + + if (saletypeID == 0) { + wx.showToast({ + title: '请选择销售类型', + }) + return; + } + if (this.data.addrs == "") { + wx.showToast({ + title: '请填写送货地址', + }) + return; + } + + let detailsArray = []; + + for (var i = 0; i < this.data.obj.length; i++) { + if (this.data.obj[i].Goods_Name == "请选择存货") { + wx.showToast({ + title: '存货不能为空', + }) + return; + } + if (this.data.obj[i].goodsNum == null) { + wx.showToast({ + title: '报货数量不能为空', + }) + return; + } + if (this.data.obj[i].goodsSecondNum == null) { + wx.showToast({ + title: '辅数量不能为空', + }) + return; + } + var dmo = { + SaleGoods_ID: this.data.obj[i].SaleGoods_ID, + UnitNum: this.data.obj[i].goodsNum, + SecondNumber: this.data.obj[i].goodsSecondNum, + Price: this.data.obj[i].Price, + PolicyPrice: this.data.obj[i].PolicyPrice + // PolicyPrice: 10 + } + detailsArray.push(dmo) + } + + + let method = insert; + let params = [{ + "Customer_ID": customerID, + // "LoadTime": update, + "Date": update, + "DeliveryTime": update, + "AccountingUnit_ID": unitID, + "Department_ID": departmentID, + "SaleKind_ID": saletypeID, + "DeliverAddress": this.data.addrs, + "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 { + wx.navigateBack({ + delta: 1 + }) + } + }, + fail: function(res) {} + }) + } + }) + + }, + changeDateTime1(e) { + this.setData({ + dateTime1: e.detail.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()参数,返回值是日期和时间 + // var timet = utilll.formatTime(new Date()); + // 再通过setData更改Page()里面的data,动态更新页面的数据 + this.setData({ + // time: timet, + showModalStatus: true, + }); + } + }, + util1: 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({ + showModalStatus1: false + }); + } + }.bind(this), 200) + + // 显示 + if (currentStatu == "open") { + // 调用函数时,传入new Date()参数,返回值是日期和时间 + // var timet = utilll.formatTime(new Date()); + // 再通过setData更改Page()里面的data,动态更新页面的数据 + this.setData({ + // time: timet, + showModalStatus1: true + }); + } + } +}) \ No newline at end of file diff --git a/pages/saleForecastList/newBill/newBill.json b/pages/saleForecastList/newBill/newBill.json new file mode 100644 index 0000000..f54f6e5 --- /dev/null +++ b/pages/saleForecastList/newBill/newBill.json @@ -0,0 +1,5 @@ +{ + "navigationBarBackgroundColor": "white", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "预报新建" +} \ No newline at end of file diff --git a/pages/saleForecastList/newBill/newBill.wxml b/pages/saleForecastList/newBill/newBill.wxml new file mode 100644 index 0000000..3f4d943 --- /dev/null +++ b/pages/saleForecastList/newBill/newBill.wxml @@ -0,0 +1,156 @@ + + 基本信息 + 预报详细 + + + + + + + + + 购货客户 + + + {{customer[customerIndex].Name}} + + + + + 发货时间 + + + {{dateTimeArray1[0][dateTime1[0]]}}-{{dateTimeArray1[1][dateTime1[1]]}}-{{dateTimeArray1[2][dateTime1[2]]}} {{dateTimeArray1[3][dateTime1[3]]}}:{{dateTimeArray1[4][dateTime1[4]]}} + + + + + + 会计单位 + + + {{unit[isUnit].Name}} + + + + + 销售部门 + + + {{department[departmentIndex].Name}} + + + + + 销售类型 + + + {{saletype[saletypeIndex].Name}} + + + + + 送货地址 + + + + + + + + + + + + + + + + + + + {{item.Name}} + + + + 取消 + + + + + + + + + + + + 存货名称 + + {{obj[idx].Goods_Name}} + + + + + + 报货数量 + + + + + 辅 数 量 + + + + + + + + 单 价 + + + + + 政策单价 + {{obj[idx].PolicyPrice}} + + + 删除 + + + + + + 选择存货 + + + + + + + + + + + + + + + + + + + + + + {{item.Goods_Name}} + + + + 取消 + + + + diff --git a/pages/saleForecastList/newBill/newBill.wxss b/pages/saleForecastList/newBill/newBill.wxss new file mode 100644 index 0000000..912129f --- /dev/null +++ b/pages/saleForecastList/newBill/newBill.wxss @@ -0,0 +1,220 @@ +/* pages/saleForecastList/saleForecastCreatNew/saleForecastCreatNew.wxss */ +page { + background: rgb(240, 239, 245); + height: calc(100%-10px); +} +.swiper-tab { + /* height: 30px; */ + margin: 10px 20px; + text-align: center; + line-height: 30px; + background: white; + display: flex; + flex-direction: row; + border-radius: 5px; + border: 1px solid#2E8CF5; + overflow: hidden; +} + +.swiper-tab-list { + height: 100%; + width: 50%; + font-size: 30rpx; + color: #777; +} + +.on { + background-color:#2E8CF5 ; + color: white; +} + +.swiper-box { + display: block; + width: 100%; + overflow: hidden; + margin-top: 3px; +} + +.swiper-items1 { + height: 100%; + /* padding-top: 3%; */ +} + +.swiper-items2 { + height: 100%; +} + +.scroll-views { + height: 100%; +} + +.baseitem { + background: #fff; + width: 100%; + border-bottom: 0.1px solid #dbdbdb; + display: flex; + flex-direction: row; + align-items: center; + padding-top: 20rpx; + padding-bottom: 20rpx; + font-size: 30rpx; +} + +.baseitem_key { + color: #666; + width: 40%; + margin-left: 20rpx; +} + +.baseitem_value { + color: rgb(48, 48, 48); + margin-left: 20rpx; + margin-right: 20rpx; + width: 160%; + text-align: right; +} + +.baseitem_key2 { + color: #666; + width: 40%; + margin-left: 20rpx; +} + +.baseitem_value2 { + color: rgb(48, 48, 48); + margin-left: 20rpx; + margin-right: 20rpx; + width: 160%; + text-align: right; +} + +.baseitem_key1 { + color: #666; + width: 100%; + margin-left: 20rpx; +} + +.baseitem_value1 { + color: rgb(48, 48, 48); + margin-left: 20rpx; + margin-right: 20rpx; + width: 100%; + text-align: right; +} + + +::-webkit-scrollbar { + width: 0; + height: 0; + color: transparent; +} + +.add { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + border-left: none; + background: #fff; + width: 100%; + margin-top: 20rpx; + border-top: 0.5px solid #e0e0e0; + border-bottom: 0.5px solid #e0e0e0; + padding-top: 20rpx; + padding-bottom: 20rpx; +} + +.ico { + height: 42rpx; + width: 42rpx; +} + +.delete { + width: 100%; + padding-top: 20rpx; + padding-bottom: 20rpx; + color: red; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + background: #fff; + font-size: 30rpx; +} + +.itemView { + margin-top: 20rpx; +} + +.submit { + margin-top: 50rpx; + margin-bottom: 30rpx; +} + +.drawer_screen { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1000; + background: #000; + opacity: 0.5; + overflow: hidden; +} + +.sousuo { + /* margin-right: 10%; + margin-left: 10%; */ + text-align: center; + background: #d6d8da; + height: 40px; + font-size: 28rpx; +} + + +.drawer_content { + height: 500rpx; + overflow-y: scroll; /*超出父盒子高度可滚动*/ +} + +.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; +} + +.btn_ok { + padding: 10px; + font: 20px "microsoft yahei"; + text-align: center; + border-top: 1px solid #e8e8ea; + color: #2E8CF5; +} + +.top { + height: 20%; + justify-content: center; + align-items: center; +} + +.grid1 { + width: 100%; + border-bottom: 1px solid #c3c3c3; + /* padding-top: 5px; + padding-bottom: 10px; */ + padding-top: 16rpx; + padding-bottom: 16rpx; + text-align: center; +} + +.text3 { + font-size: 18px; + color: rgb(48, 48, 48); +} diff --git a/pages/saleForecastList/query/query.js b/pages/saleForecastList/query/query.js new file mode 100644 index 0000000..8e0e691 --- /dev/null +++ b/pages/saleForecastList/query/query.js @@ -0,0 +1,196 @@ +var network = require("../../../utils/net.js") +var timechage = require("../../../utils/dateTimeUtil.js") +var app = getApp() +var getCustomer= "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer"; + +function GetCustomer(that, inputValue) { + let method = getCustomer; + let params = [{ + "InputValue": inputValue, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function (res) { + that.setData({ + currency: res.result, + customer: res.result + }) + }) + that.setData({ + which: "购货客户" + }) +} + +Page({ + + /** + * 页面的初始数据 + */ + data: { + customerIndex: 0, + customer: [{ + ID: 0, + Name: "请选择购货客户" + }], + currency: [], + Sdate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'), + Edate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'), + + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + bindSDateChange: function (e) { + this.setData({ + Sdate: e.detail.value + }) + }, + bindEDateChange: function (e) { + this.setData({ + Edate: e.detail.value + }) + }, + submitForm: function (e) { + let customerID = this.data.customer[this.data.customerIndex].ID; + let sDate = timechage.formatymdERTDate(this.data.Sdate); + let eDate = timechage.formatymdERTDate(this.data.Edate); + if (customerID == 0) { + app.globalData.selectCustomer_ID = null; + } else { + app.globalData.selectCustomer_ID = customerID; + } + app.globalData.saleOutStartDate = sDate; + app.globalData.saleOutEndDate = eDate; + + wx.navigateBack({ + delta: 1 + }) + }, + powerDrawer: function (e) { + let that = this; + let x = e.currentTarget.dataset.x; + if (x == "购货客户") { + GetCustomer(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({ + customerIndex: idx + }) + } + + this.setData({ + showModalStatus: false, + }) + }, + select: function (e) { + var that = this; + var which = e.currentTarget.dataset.item; + var value = e.detail.value; + if (which == "购货客户") { + GetCustomer(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/saleForecastList/query/query.json b/pages/saleForecastList/query/query.json new file mode 100644 index 0000000..94ff588 --- /dev/null +++ b/pages/saleForecastList/query/query.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "筛选" +} \ No newline at end of file diff --git a/pages/saleForecastList/query/query.wxml b/pages/saleForecastList/query/query.wxml new file mode 100644 index 0000000..6f8f3a8 --- /dev/null +++ b/pages/saleForecastList/query/query.wxml @@ -0,0 +1,25 @@ + + 购货客户 + {{customer[customerIndex].Name}} + + + + + + + + + + + + + + + + + {{item.Name}} + + + + 取消 + diff --git a/pages/saleForecastList/query/query.wxss b/pages/saleForecastList/query/query.wxss new file mode 100644 index 0000000..e02d51d --- /dev/null +++ b/pages/saleForecastList/query/query.wxss @@ -0,0 +1,94 @@ +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 +} + +.submit { + margin-top: 50rpx; + margin-bottom: 30rpx; +} + + +.drawer_screen { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1000; + background: #000; + opacity: 0.5; + overflow: hidden; +} + +.sousuo { + /* margin-right: 10%; + margin-left: 10%; */ + text-align: center; + background: #d6d8da; + height: 40px; + font-size: 28rpx; +} + + +.drawer_content { + height: 500rpx; + overflow-y: scroll; /*超出父盒子高度可滚动*/ +} + +.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; +} + +.btn_ok { + padding: 10px; + font: 20px "microsoft yahei"; + text-align: center; + border-top: 1px solid #e8e8ea; + color: #2E8CF5; +} + +.top { + height: 20%; + justify-content: center; + align-items: center; +} + +.grid1 { + width: 100%; + border-bottom: 1px solid #c3c3c3; + /* padding-top: 5px; + padding-bottom: 10px; */ + padding-top: 16rpx; + padding-bottom: 16rpx; + text-align: center; +} + +.text3 { + font-size: 18px; + color: rgb(48, 48, 48); +} diff --git a/pages/saleForecastList/saleForecastList.js b/pages/saleForecastList/saleForecastList.js new file mode 100644 index 0000000..726bcdb --- /dev/null +++ b/pages/saleForecastList/saleForecastList.js @@ -0,0 +1,248 @@ +const app = getApp(); +var network = require("../../utils/net.js"); +var timechage = require("../../utils/dateTimeUtil.js"); +var UnCheckPageIndex = 0 +var UnCheckPageSize = 10 +var CheckedPageIndex = 0 +var CheckedPageSize = 10 +var getList = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleForecastRpc/GetList' + +var deleteItem = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleForecastRpc/Delete" + +// 未审核订单列表 +function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, successaction) { + let getArr = []; + let method = getList; + let params = [{ + "BillState": 0, + "Customer_ID": that.data.Customer_ID, + "PageIndex": UnCheckPageIndex, + "PageSize": UnCheckPageSize, + }]; + + network.transfer_request(method, params, function(res) { + successaction(); + var array = res.result; + if (array.length <= 0) { + wx.showToast({ + title: '无数据更新', + }) + UnCheckPageIndex = UnCheckPageIndex - 1; + return; + } + for (var i = 0; i < array.length; i++) { + var dmo = { + // BillState: "未审核" + // Customer_Name: "陈旭辉" + // Date: "/Date(1540453380000+0800)/" + // DepartmentWorkFlow_Detail_Name: "初始" + // DepartmentWorkFlow_ID: 2 + // ID: 4 + // Money: 143 + // Number: 1 + // billType: array[i].BillType_Name, + //添加单据状态的传递,在详情页面判断此值,进行是否允许提交的操作 true : 可提交 + orderState: true, + orderID: array[i].ID, + Customer_Name: array[i].Customer_Name, + time: timechage.formatTimeTwo(array[i].Date.substring(6, 19), 'Y/M/D'), + workFlowName: array[i].DepartmentWorkFlow_Detail_Name, + } + getArr.push(dmo); + } + let arrLast = that.data.unCheckDataArr.concat(getArr); + that.setData({ + unCheckDataArr: arrLast, + }) + }) +} + +// 已审核订单列表 +function getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize) { + let getArr = []; + let method = getList; + let params = [{ + "BillState": 20, + "Customer_ID": that.data.Customer_ID, + "PageIndex": CheckedPageIndex, + "PageSize": CheckedPageSize, + }]; + // let params = [true, CheckedPageIndex, CheckedPageSize]; + network.transfer_request(method, params, function(res) { + var array = res.result; + if (array.length <= 0) { + wx.showToast({ + title: '无数据更新', + }) + CheckedPageIndex = CheckedPageIndex - 1; + return; + } + for (var i = 0; i < array.length; i++) { + var dmo = { + //添加单据状态的传递,在详情页面判断此值,进行是否允许提交的操作 + orderState: false, + orderID: array[i].ID, + Customer_Name: array[i].Customer_Name, + time: timechage.formatTimeTwo(array[i].Date.substring(6, 19), 'Y/M/D'), + workFlowName: array[i].DepartmentWorkFlow_Detail_Name, + + } + getArr.push(dmo); + } + let arrLast = that.data.checkedDataArr.concat(getArr); + that.setData({ + checkedDataArr: arrLast, + }) + }) +} + +Page({ + data: { + checkedDataArr: [], + unCheckDataArr: [], + currentTab: 0, + winHeight: app.globalData.winHeight, + Customer_ID: null, + }, + + createNew: function(e) { + wx.navigateTo({ + url: 'newBill/newBill', + }) + }, + + /** + * 滑动切换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 + }) + } + }, + //点击进入详情页面 + transToOrderDetail: function(event) { + var ID = event.currentTarget.dataset.detailitemid; + var State = event.currentTarget.dataset.detailitemstate; + wx.navigateTo({ + url: 'Detail/Detail?ID=' + ID + '&State=' + State, + }) + }, + + // 长按删除一条单据 + longPressDelete: function(event) { + var that =this; + var itemID = event.currentTarget.dataset.detailitemid; + var state = event.currentTarget.dataset.detailitemstate; + if (!state) { + wx.showModal({ + title: '提示', + content: '不能操作已审核单据', + }) + return; + } + wx.showModal({ + title: '提示', + content: '确定要删除'+ itemID +'号单据吗?', + success: function(res) { + if (res.confirm) { + var params = [itemID]; + network.transfer_request(deleteItem, params, function(res) { + wx.showToast({ + title: '操作成功', + }) + that.onShow(); + }) + } else if (res.cancel) { + console.log('点击取消了'); + return false; + } + + } + }) + + }, + + //点击进入筛选页面 + chose: function(e) { + wx.navigateTo({ + url: 'query/query', + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + + }, + + onShow: function(options) { + this.setData({ + checkedDataArr: [], + unCheckDataArr: [], + Customer_ID: app.globalData.selectCustomer_ID, + }) + var that = this; + UnCheckPageIndex = 0; + CheckedPageIndex = 0; + getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, function(res) { + getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize); + + }); + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function() { + + app.globalData.selectCustomer_ID = null + app.globalData.selectStartDate = null + app.globalData.selectEndDate = null + app.globalData.selectBillState = 0 + }, + //未审核订单滑动到底部加载 + unCheckedScrollLower: function(event) { + var that = this; + UnCheckPageIndex = UnCheckPageIndex + 1; + getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, function(res) { + + }); + }, + + //已审核订单滑动到底部加载 + CheckedScrollLower: function(event) { + var that = this; + CheckedPageIndex = CheckedPageIndex + 1; + getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize); + }, + /** + * 页面上拉触底事件的处理函数 + */ + // onReachBottom: function () { + // var that = this; + // if (this.data.currentTab === 0) { + // UnCheckPageIndex = UnCheckPageIndex + 1; + // getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize); + // } else { + // CheckedPageIndex = CheckedPageIndex + 1; + // getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize); + // } + + // }, +}) \ No newline at end of file diff --git a/pages/saleForecastList/saleForecastList.json b/pages/saleForecastList/saleForecastList.json new file mode 100644 index 0000000..573931e --- /dev/null +++ b/pages/saleForecastList/saleForecastList.json @@ -0,0 +1,5 @@ +{ + "navigationBarBackgroundColor": "white", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "销售预报" +} \ No newline at end of file diff --git a/pages/saleForecastList/saleForecastList.wxml b/pages/saleForecastList/saleForecastList.wxml new file mode 100644 index 0000000..f3c7de6 --- /dev/null +++ b/pages/saleForecastList/saleForecastList.wxml @@ -0,0 +1,55 @@ + + 未审核 + 已审核 + + + + + + + + +