Browse Source

特价申请列表页数据请求

master
chenxuhui 7 years ago
parent
commit
ae9cbc5b85
3 changed files with 35 additions and 26 deletions
  1. +0
    -4
      pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.js
  2. +35
    -21
      pages/specialOrderApplication/specialOrderApplication.js
  3. +0
    -1
      pages/specialOrderApplication/specialOrderApplication.wxml

+ 0
- 4
pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.js View File

@ -67,20 +67,16 @@ Page({
data: {
currentTab: 0,
winHeight: app.globalData.winHeight,
// 从哪个页面返回当前页面
backPage: "",
dateTimeArray: null,
dateTime: null,
startYear: 2018,
endYear: 2030,
// 用户数组
customerArr:[],
// 存货数组
goodsNameArr:[],
which: "",
idx: 0,
currency: [],


+ 35
- 21
pages/specialOrderApplication/specialOrderApplication.js View File

@ -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);
});
},
// 新建特价申请


+ 0
- 1
pages/specialOrderApplication/specialOrderApplication.wxml View File

@ -30,7 +30,6 @@
<image class='xinjian' bindtap="createNew" src="/imgs/create.png"></image>
<!-- <button class='chose' catchtap='bindDateChange'>{{searchDate}}</button> -->
<view class='searchView'>
<picker mode="date" value="{{date}}" start="2018-01-01" end="2037-12-31" bindchange="bindDateChange" fields='day'>
<view class="picker">筛选</view>


Loading…
Cancel
Save