|
|
|
@ -6,21 +6,21 @@ var timechage = require("../../utils/dateTimeUtil.js"); |
|
|
|
var UnCheckPageIndex = 0 |
|
|
|
var CheckedPageIndex = 0 |
|
|
|
var pageSize = 10 |
|
|
|
var getList = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleForecastRpc/GetList' |
|
|
|
var deleteItem = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleForecastRpc/Delete" |
|
|
|
var getList = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/MarketingActivityRpc/GetList' |
|
|
|
var deleteItem = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/MarketingActivityRpc/Delete" |
|
|
|
|
|
|
|
// 未审核订单列表
|
|
|
|
function getUnCheckOrderList(that, UnCheckPageIndex, pageSize, successaction) { |
|
|
|
function getUnCheckOrderList(that, UnCheckPageIndex, pageSize, activityDate, successaction) { |
|
|
|
let getArr = []; |
|
|
|
let method = getList; |
|
|
|
let params = [{ |
|
|
|
"BillState": 0, |
|
|
|
"Customer_ID": that.data.Customer_ID, |
|
|
|
"MarketingActivityDate": activityDate, |
|
|
|
"PageIndex": UnCheckPageIndex, |
|
|
|
"PageSize": pageSize, |
|
|
|
"PageIndex": pageSize, |
|
|
|
}]; |
|
|
|
|
|
|
|
network.transfer_request(method, params, function (res) { |
|
|
|
network.transfer_request(method, params, function(res) { |
|
|
|
successaction(); |
|
|
|
var array = res.result; |
|
|
|
if (array.length <= 0) { |
|
|
|
@ -35,8 +35,8 @@ function getUnCheckOrderList(that, UnCheckPageIndex, pageSize, successaction) { |
|
|
|
//添加单据状态的传递,在详情页面判断此值,进行是否允许提交的操作 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'), |
|
|
|
Customer_Name: array[i].Name, |
|
|
|
time: timechage.formatTimeTwo(array[i].MarketingActivityDate.substring(6, 19), 'Y/M/D'), |
|
|
|
workFlowName: array[i].DepartmentWorkFlow_Detail_Name, |
|
|
|
} |
|
|
|
getArr.push(dmo); |
|
|
|
@ -49,16 +49,16 @@ function getUnCheckOrderList(that, UnCheckPageIndex, pageSize, successaction) { |
|
|
|
} |
|
|
|
|
|
|
|
// 已审核订单列表
|
|
|
|
function getCheckedOrderList(that, CheckedPageIndex, pageSize) { |
|
|
|
function getCheckedOrderList(that, CheckedPageIndex, pageSize, activityDate) { |
|
|
|
let getArr = []; |
|
|
|
let method = getList; |
|
|
|
let params = [{ |
|
|
|
"BillState": 20, |
|
|
|
"Customer_ID": that.data.Customer_ID, |
|
|
|
"MarketingActivityDate": activityDate, |
|
|
|
"PageIndex": CheckedPageIndex, |
|
|
|
"PageSize": pageSize, |
|
|
|
}]; |
|
|
|
network.transfer_request(method, params, function (res) { |
|
|
|
network.transfer_request(method, params, function(res) { |
|
|
|
var array = res.result; |
|
|
|
if (array.length <= 0) { |
|
|
|
wx.showToast({ |
|
|
|
@ -72,8 +72,8 @@ function getCheckedOrderList(that, CheckedPageIndex, pageSize) { |
|
|
|
//添加单据状态的传递,在详情页面判断此值,进行是否允许提交的操作
|
|
|
|
orderState: false, |
|
|
|
orderID: array[i].ID, |
|
|
|
Customer_Name: array[i].Customer_Name, |
|
|
|
time: timechage.formatTimeTwo(array[i].Date.substring(6, 19), 'Y/M/D'), |
|
|
|
Customer_Name: array[i].Name, |
|
|
|
time: timechage.formatTimeTwo(array[i].MarketingActivityDate.substring(6, 19), 'Y/M/D'), |
|
|
|
workFlowName: array[i].DepartmentWorkFlow_Detail_Name, |
|
|
|
|
|
|
|
} |
|
|
|
@ -93,26 +93,40 @@ Page({ |
|
|
|
unCheckDataArr: [], |
|
|
|
currentTab: 0, |
|
|
|
winHeight: app.globalData.winHeight, |
|
|
|
searchDate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'), |
|
|
|
|
|
|
|
// searchDate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'),
|
|
|
|
searchDate: '', |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面显示 |
|
|
|
*/ |
|
|
|
onShow: function() { |
|
|
|
this.setData({ |
|
|
|
checkedDataArr: [], |
|
|
|
unCheckDataArr: [], |
|
|
|
}) |
|
|
|
var that = this; |
|
|
|
UnCheckPageIndex = 0; |
|
|
|
CheckedPageIndex = 0; |
|
|
|
getUnCheckOrderList(that, UnCheckPageIndex, pageSize, null, function(res) { |
|
|
|
getCheckedOrderList(that, CheckedPageIndex, pageSize, null); |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 时间检索条件发生变化,重新请求数据
|
|
|
|
bindDateChange: function(e) { |
|
|
|
this.setData({ |
|
|
|
searchDate: e.detail.value, |
|
|
|
checkedDataArr: [], |
|
|
|
unCheckDataArr: [], |
|
|
|
}) |
|
|
|
console.log(e.detail.value) |
|
|
|
// 装换成时间戳
|
|
|
|
let time = timechage.formatymdERTDate(this.data.searchDate); |
|
|
|
console.log(time) |
|
|
|
let time = timechage.formatymdERTDate(e.detail.value); |
|
|
|
var that = this; |
|
|
|
UnCheckPageIndex = 0; |
|
|
|
CheckedPageIndex = 0; |
|
|
|
getUnCheckOrderList(that, UnCheckPageIndex, pageSize, time, function(res) { |
|
|
|
getCheckedOrderList(that, CheckedPageIndex, pageSize, time); |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 新建特价申请
|
|
|
|
|