diff --git a/pages/my/my.wxml b/pages/my/my.wxml index 2447d83..ddba981 100644 --- a/pages/my/my.wxml +++ b/pages/my/my.wxml @@ -1,2 +1 @@ - -pages/my/my.wxml + diff --git a/pages/saleForecastList/Detail/Detail.js b/pages/saleForecastList/Detail/Detail.js index e3be8f6..62e7b08 100644 --- a/pages/saleForecastList/Detail/Detail.js +++ b/pages/saleForecastList/Detail/Detail.js @@ -5,6 +5,16 @@ 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); @@ -19,7 +29,7 @@ function setTime(that) { } function GetAccountingUnit(that, inputValue) { - let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountingUnit"; + let method = getAccountingUnit; let params = [{ "InputValue": inputValue, "PageIndex": 0, @@ -32,12 +42,12 @@ function GetAccountingUnit(that, inputValue) { }) }) that.setData({ - which: "会计部门" + which: "会计单位" }) } function GetCustomer(that, inputValue) { - let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer"; + let method = getCustomer let params = [{ "InputValue": inputValue, "PageIndex": 0, @@ -55,7 +65,7 @@ function GetCustomer(that, inputValue) { } function GetDepartment(that, inputValue) { - let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDepartment"; + let method = getDept; let params = [{ "InputValue": inputValue, "PageIndex": 0, @@ -73,7 +83,7 @@ function GetDepartment(that, inputValue) { } function GetSaleKind(that, v) { - let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetSaleKind"; + let method = getSaleKind; let params = [{ "InputValue": v, "PageIndex": 0, @@ -93,7 +103,7 @@ function GetSaleKind(that, v) { 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 method = getGoods; let params = [{ "Input": v, "PageIndex": 0, @@ -163,7 +173,7 @@ Page({ let ID = Number(options.ID); orderID = ID; - let method = "/MainSystem/B3MiniProgramRpc/Rpcs/EmployeeRpc/SaleForecastRpc/Load"; + let method = load; let params = [ID]; network.transfer_request(method, params, function (res) { let customerOld = [{ @@ -399,7 +409,7 @@ Page({ powerDrawer: function (e) { let that = this; let x = e.currentTarget.dataset.x; - if (x == "会计部门") { + if (x == "会计单位") { GetAccountingUnit(that, "") } else if (x == "购货客户") { GetCustomer(that, "") @@ -435,7 +445,7 @@ Page({ var which = e.currentTarget.dataset.item; var idx = e.currentTarget.dataset.idx; - if (which == "会计部门") { + if (which == "会计单位") { that.setData({ isUnit: idx }) @@ -489,7 +499,7 @@ Page({ var that = this; var which = e.currentTarget.dataset.item; var value = e.detail.value; - if (which == "会计部门") { + if (which == "会计单位") { GetAccountingUnit(that, value) } else if (which == "购货客户") { GetCustomer(that, value) @@ -594,7 +604,7 @@ Page({ } - let method = '/MainSystem/B3MiniProgramRpc/Rpcs/ManagerRpc/OrderRpc/Update'; + let method = update; let params = [{ "Customer_ID": customerID, "LoadTime": update, diff --git a/pages/saleForecastList/newBill/newBill.js b/pages/saleForecastList/newBill/newBill.js index e0687fe..735e1fe 100644 --- a/pages/saleForecastList/newBill/newBill.js +++ b/pages/saleForecastList/newBill/newBill.js @@ -3,14 +3,22 @@ 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 = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountingUnit"; + let method = getAccountingUnit; let params = [{ "InputValue": inputValue, "PageIndex": 0, "PageSize": 100 }]; - network.transfer_request(method, params, function (res) { + network.transfer_request(method, params, function(res) { that.setData({ currency: res.result, unit: res.result @@ -22,13 +30,13 @@ function GetAccountingUnit(that, inputValue) { } function GetCustomer(that, inputValue) { - let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer"; + let method = getCustomer; let params = [{ "InputValue": inputValue, "PageIndex": 0, "PageSize": 100 }]; - network.transfer_request(method, params, function (res) { + network.transfer_request(method, params, function(res) { that.setData({ currency: res.result, customer: res.result @@ -40,13 +48,13 @@ function GetCustomer(that, inputValue) { } function GetDepartment(that, inputValue) { - let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDepartment"; + let method = getDept; let params = [{ "InputValue": inputValue, "PageIndex": 0, "PageSize": 100 }]; - network.transfer_request(method, params, function (res) { + network.transfer_request(method, params, function(res) { that.setData({ currency: res.result, department: res.result @@ -58,13 +66,13 @@ function GetDepartment(that, inputValue) { } function GetSaleKind(that, v) { - let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetSaleKind"; + let method = getSaleKind; let params = [{ "InputValue": v, "PageIndex": 0, "PageSize": 100 }]; - network.transfer_request(method, params, function (res) { + network.transfer_request(method, params, function(res) { that.setData({ currency: res.result, saletype: res.result @@ -78,7 +86,7 @@ function GetSaleKind(that, v) { 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 method = getGoods; let params = [{ "Input": v, "PageIndex": 0, @@ -87,7 +95,7 @@ function GetGoodsWithUnitPrice(that, v, date) { "AccountingUnit_ID": unitID, "Date": date }]; - network.transfer_request(method, params, function (res) { + network.transfer_request(method, params, function(res) { that.setData({ goods: res.result, }) @@ -144,7 +152,7 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad: function (options) { + onLoad: function(options) { var that = this; // 获取完整的年月日 时分秒,以及默认显示的数组 @@ -164,7 +172,7 @@ Page({ */ wx.getSystemInfo({ - success: function (res) { + success: function(res) { that.setData({ winWidth: res.windowWidth, winHeight: res.windowHeight @@ -177,14 +185,14 @@ Page({ /** * 生命周期函数--监听页面显示 */ - onShow: function () { + onShow: function() { }, /** * 滑动切换tab */ - bindChange: function (e) { + bindChange: function(e) { var that = this; that.setData({ @@ -195,7 +203,7 @@ Page({ /** * 点击tab切换 */ - swichNav: function (e) { + swichNav: function(e) { var that = this; @@ -208,10 +216,10 @@ Page({ } }, - getAddrs: function (e) { + getAddrs: function(e) { this.data.addrs = e.detail.value; }, - add: function (e) { + add: function(e) { let newobj = { Goods_Name: "请选择存货" @@ -225,7 +233,7 @@ Page({ obj: aaa, }) }, - deleteItem: function (e) { + deleteItem: function(e) { let idx = e.target.dataset.idx; let deleteobj = this.data.obj; deleteobj.splice(idx, 1) @@ -234,7 +242,7 @@ Page({ }) }, - getGoodsNum: function (e) { + getGoodsNum: function(e) { //值: //e.detail.value //设置的id @@ -264,7 +272,7 @@ Page({ } }, - getSecondNum: function (e) { + getSecondNum: function(e) { let value = e.detail.value; let idx = e.target.dataset.idx; @@ -288,12 +296,12 @@ Page({ } } }, - getPrice: function (e) { + getPrice: function(e) { let value = e.detail.value; let idx = e.target.dataset.idx; this.data.obj[idx].Price = Number(value); }, - powerDrawer: function (e) { + powerDrawer: function(e) { let that = this; let x = e.currentTarget.dataset.x; if (x == "会计部门") { @@ -314,7 +322,7 @@ Page({ // } this.util(currentStatu) }, - powerDrawer1: function (e) { + powerDrawer1: function(e) { let that = this; let currentStatu = e.currentTarget.dataset.statu; @@ -331,7 +339,7 @@ Page({ this.util1(currentStatu) }, - itemclick: function (e) { + itemclick: function(e) { var that = this; var name = e.currentTarget.dataset.name; var id = e.currentTarget.dataset.id; @@ -360,7 +368,7 @@ Page({ showModalStatus: false, }) }, - itemclick1: function (e) { + itemclick1: function(e) { var that = this; var name = e.currentTarget.dataset.name; var id = e.currentTarget.dataset.data.SaleGoods_ID; @@ -388,7 +396,7 @@ Page({ obj: that.data.obj }) }, - select: function (e) { + select: function(e) { var that = this; var which = e.currentTarget.dataset.item; var value = e.detail.value; @@ -402,14 +410,14 @@ Page({ GetSaleKind(that, value) } }, - select1: function (e) { + 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 () { + 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; @@ -491,7 +499,7 @@ Page({ } - let method = '/MainSystem/B3MiniProgramRpc/Rpcs/EmployeeRpc/SaleForecastRpc/Insert'; + let method = insert; let params = [{ "Customer_ID": customerID, // "LoadTime": update, @@ -504,20 +512,19 @@ Page({ "Details": detailsArray }]; - network.transfer_request(method, params, function (res) { + network.transfer_request(method, params, function(res) { if (res.result != null) { wx.showModal({ title: '新建订单No.' + res.result, content: '新建成功,是否返回首页', - success: function (res) { - if (res.cancel) { - } else { + success: function(res) { + if (res.cancel) {} else { wx.navigateBack({ delta: 1 }) } }, - fail: function (res) { } + fail: function(res) {} }) } }) @@ -529,7 +536,7 @@ Page({ }); }, - util: function (currentStatu) { + util: function(currentStatu) { /* 动画部分 */ // 第1步:创建动画实例 var animation = wx.createAnimation({ @@ -550,7 +557,7 @@ Page({ }) // 第5步:设置定时器到指定时候后,执行第二组动画 - setTimeout(function () { + setTimeout(function() { // 执行第二组动画 animation.opacity(1).rotateX(0).step(); // 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象 @@ -577,7 +584,7 @@ Page({ }); } }, - util1: function (currentStatu) { + util1: function(currentStatu) { /* 动画部分 */ // 第1步:创建动画实例 var animation = wx.createAnimation({ @@ -598,7 +605,7 @@ Page({ }) // 第5步:设置定时器到指定时候后,执行第二组动画 - setTimeout(function () { + setTimeout(function() { // 执行第二组动画 animation.opacity(1).rotateX(0).step(); // 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象 diff --git a/pages/saleForecastList/query/query.js b/pages/saleForecastList/query/query.js index 4c0e52b..a47f2f5 100644 --- a/pages/saleForecastList/query/query.js +++ b/pages/saleForecastList/query/query.js @@ -1,9 +1,10 @@ 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 = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer"; + let method = getCustomer; let params = [{ "InputValue": inputValue, "PageIndex": 0, diff --git a/pages/saleForecastList/saleForecastList.js b/pages/saleForecastList/saleForecastList.js index 09b435d..b9dcc2b 100644 --- a/pages/saleForecastList/saleForecastList.js +++ b/pages/saleForecastList/saleForecastList.js @@ -5,11 +5,13 @@ var UnCheckPageIndex = 0 var UnCheckPageSize = 10 var CheckedPageIndex = 0 var CheckedPageSize = 10 -var outStoreMethod = '/MainSystem/B3MiniProgramRpc/Rpcs/EmployeeRpc/SaleForecastRpc/GetList' +var getList = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleForecastRpc/GetList' + + // 未审核订单列表 function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize) { let getArr = []; - let method = outStoreMethod; + let method = getList; let params = [{ "BillState": 0, "Customer_ID": that.data.Customer_ID, @@ -55,7 +57,7 @@ function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize) { // 已审核订单列表 function getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize) { let getArr = []; - let method = outStoreMethod; + let method = getList; let params = [{ "BillState": 20, "Customer_ID": that.data.Customer_ID,