Browse Source

1、特价申请列表页面

2、特价申请新建页面
master
chenxuhui 7 years ago
parent
commit
e71c283e0f
15 changed files with 792 additions and 10 deletions
  1. +3
    -1
      app.json
  2. +5
    -3
      pages/guarantee/guarantee.js
  3. +1
    -1
      pages/homePage/homePage.js
  4. +1
    -0
      pages/homePage/homePage.wxss
  5. +8
    -0
      pages/saleForecastList/newBill/newBill.js
  6. +7
    -4
      pages/saleForecastList/saleForecastList.js
  7. +176
    -0
      pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.js
  8. +5
    -0
      pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.json
  9. +191
    -0
      pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.wxml
  10. +161
    -0
      pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.wxss
  11. +91
    -0
      pages/specialOrderApplication/specialOrderApplication.js
  12. +3
    -0
      pages/specialOrderApplication/specialOrderApplication.json
  13. +36
    -0
      pages/specialOrderApplication/specialOrderApplication.wxml
  14. +103
    -0
      pages/specialOrderApplication/specialOrderApplication.wxss
  15. +1
    -1
      utils/net.js

+ 3
- 1
app.json View File

@ -18,7 +18,9 @@
"pages/guarantee/selectbill/selectbill",
"pages/guarantee/detailshow/detailshow",
"pages/goodaNameChooseTemplate/goodaNameChooseTemplate",
"pages/customerChooseTemplate/customerChooseTemplate"
"pages/customerChooseTemplate/customerChooseTemplate",
"pages/specialOrderApplication/specialOrderApplication",
"pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder"
],
"window": {
"backgroundTextStyle": "light",


+ 5
- 3
pages/guarantee/guarantee.js View File

@ -7,10 +7,11 @@ var PageSizeN = 10
var PageIndexY = 0
var PageSizeY = 10
function getListN(that, PageIndex, PageSize) {
function getListN(that, PageIndex, PageSize, successation) {
let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/BusinessGuaranteeRpc/GetList';
let params = [0,PageIndex, PageSize];
network.transfer_request(method, params, function (res) {
successation();
that.setData({
arrayNN:res.result
})
@ -81,8 +82,9 @@ Page({
*/
onLoad: function (options) {
var that = this;
getListN(that, PageIndexN, PageSizeN)
getListY(that, PageIndexY, PageSizeY)
getListN(that, PageIndexN, PageSizeN, function (res){
getListY(that, PageIndexY, PageSizeY);
})
},
/**


+ 1
- 1
pages/homePage/homePage.js View File

@ -33,7 +33,7 @@ Page({
break;
// 特价申请
case "3":
transferURL = '/pages/orderList/orderList';
transferURL = '/pages/specialOrderApplication/specialOrderApplication';
break;
// 销售出库
case "4":


+ 1
- 0
pages/homePage/homePage.wxss View File

@ -2,6 +2,7 @@
page{
background:#EAF1F8;
height: 100%;
}
.imageContainer{


+ 8
- 0
pages/saleForecastList/newBill/newBill.js View File

@ -228,6 +228,14 @@ Page({
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
app.globalData.goodsNameArray = [];
app.globalData.customerArray = [];
},
/**
* 滑动切换tab
*/


+ 7
- 4
pages/saleForecastList/saleForecastList.js View File

@ -9,7 +9,7 @@ var getList = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleForecastRpc/GetL
// 未审核订单列表
function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize) {
function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, successaction) {
let getArr = [];
let method = getList;
let params = [{
@ -18,8 +18,9 @@ function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize) {
"PageIndex": UnCheckPageIndex,
"PageSize": UnCheckPageSize,
}];
// let params = [false, UnCheckPageIndex, UnCheckPageSize];
network.transfer_request(method, params, function (res) {
successaction();
var array = res.result;
if (array.length <= 0) {
wx.showToast({
@ -161,8 +162,10 @@ Page({
var that = this;
UnCheckPageIndex = 0;
CheckedPageIndex = 0;
getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize);
getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize);
getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, function (res){
getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize);
});
},
/**


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

@ -0,0 +1,176 @@
// pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.js
var network = require("../../../utils/net.js");
const app = getApp();
var dateTimePicker = require('../../../utils/dateTimePicker.js');
Page({
/**
* 页面的初始数据
*/
data: {
currentTab: 0,
winHeight: app.globalData.winHeight,
winWidth: 0,
detaileList: [1, 1, 3, 4, 5, 6, 7, 7, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 7, 7, 7],
dateTimeArray: null,
dateTime: null,
dateTimeArray1: null,
dateTime1: null,
startYear: 2018,
endYear: 2030,
// 用户数组
customerArr:[],
// 存货数组
goodsNameArr:[],
},
changeDateTime1(e) {
this.setData({
dateTime1: e.detail.value
});
},
// 添加客户
addCustomer: function(){
wx.navigateTo({
url: '../../customerChooseTemplate/customerChooseTemplate',
})
},
// 添加存货
addGoodsName: function(){
wx.navigateTo({
url: '../../goodaNameChooseTemplate/goodaNameChooseTemplate',
})
},
/**
* 滑动切换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
})
}
},
/**
* 存货明细保存按钮 点击新建单据 内部做逻辑判断 存储值是否都已经加载
*/
creatNewSpecialOrder:function (){
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)/";
},
/**
* 生命周期函数--监听页面加载
*/
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
});
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
var that = this;
// 返回的用户只能是一条,所以index只能为0
var currentCustomerArr = app.globalData.customerArray;
if (currentCustomerArr.length > 0) {
this.setData({
customerArr: currentCustomerArr,
})
}
// 获取存货 加载完成后计算价格政策
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)
}
this.setData({
goodsNameArr: backGoodsArr,
})
}
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
app.globalData.goodsNameArray = [];
app.globalData.customerArray = [];
},
})

+ 5
- 0
pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.json View File

@ -0,0 +1,5 @@
{
"navigationBarBackgroundColor": "white",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "特价申请新建"
}

+ 191
- 0
pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.wxml View File

@ -0,0 +1,191 @@
<!--pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.wxml-->
<view class="swiper-tab">
<view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">基本信息</view>
<view class="swiper-tab-second {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">客户明细</view>
<view class="swiper-tab-list {{currentTab==2 ? 'on' : ''}}" data-current="2" bindtap="swichNav">存货明细</view>
</view>
<swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{winHeight - 55}}px" bindchange="bindChange">
<!-- 基本信息 -->
<swiper-item class="swiper-items1">
<view class='backGroundContainer'>
<view class='baseitem'>
<text class='baseitem_key'>名称</text>
<view class='baseitem_value'>
{{customerName}}基本信息
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>日期</text>
<picker class='baseitem_value' mode="multiSelector" value="{{dateTime1}}" bindchange="changeDateTime1" range="{{dateTimeArray1}}">
<view>
{{dateTimeArray1[0][dateTime1[0]]}}-{{dateTimeArray1[1][dateTime1[1]]}}-{{dateTimeArray1[2][dateTime1[2]]}} {{dateTimeArray1[3][dateTime1[3]]}}:{{dateTimeArray1[4][dateTime1[4]]}}
</view>
</picker>
<!-- <view class='baseitem_value'>
{{customerName}}
</view> -->
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>会计单位</text>
<view class='baseitem_value'>
{{customerName}}
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>销售部门</text>
<view class='baseitem_value'>
{{customerName}}
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>摘要</text>
<view class='baseitem_value'>
{{customerName}}
</view>
</view>
<view class='horizontallineView'></view>
</view>
</swiper-item>
<!-- 客户明细 -->
<swiper-item class="swiper-items2">
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views'>
<view class='detaileListContainer'>
<block wx:for="{{customerArr}}" wx:key="item" wx:for-index="idx">
<template is="customerInfoTemplate" data="{{item}}" data="{{idx}}" />
</block>
</view>
<view class='imageView' catchtap='addCustomer'>
<image class='currentImage' src="/imgs/longBlueBtn.png">
<view class='btnTextView'>
<text class='btnText'>添加客户</text>
</view>
</image>
</view>
</scroll-view>
</swiper-item>
<!-- 存货详细 -->
<swiper-item class="swiper-items3">
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views'>
<view class='detaileListContainer'>
<block wx:for="{{goodsNameArr}}" wx:key="item" wx:for-index="idx">
<template is="goodsInfoTemplate" data="{{item}}" data="{{idx}}" />
</block>
</view>
<view class='imageView' catchtap='addGoodsName'>
<image class='currentImage' src="/imgs/longBlueBtn.png">
<view class='btnTextView'>
<text class='btnText'>添加存货</text>
</view>
</image>
</view>
<view class='imageView' catchtap='creatNewSpecialOrder'>
<image class='currentImage' src="/imgs/longBlueBtn.png">
<view class='btnTextView'>
<text class='btnText'>保存</text>
</view>
</image>
</view>
</scroll-view>
</swiper-item>
</swiper>
<template name="customerInfoTemplate">
<view class='listNumberView'>
客户明细:{{idx}}
</view>
<view class='baseitem'>
<text class='baseitem_key'>名称</text>
<view class='baseitem_value'>
{{customerName}}基本信息
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>客户类型</text>
<view class='baseitem_value'>
{{customerName}}
</view>
</view>
<view class='horizontallineView'></view>
<view class='delete' catchtap='deleteItem' data-idx='{{idx}}'>删除</view>
<view class='horizontallineView'></view>
</template>
<template name="goodsInfoTemplate">
<view class='listNumberView'>
存货明细:{{idx}}
</view>
<view class='baseitem'>
<text class='baseitem_key'>存货名称</text>
<view class='baseitem_value'>
单据明细{{customerName}}
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>原单价</text>
<view class='baseitem_value'>
{{customerName}}
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>特价</text>
<view class='baseitem_value'>
{{customerName}}
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>开始时间</text>
<view class='baseitem_value'>
{{customerName}}
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>结束时间</text>
<view class='baseitem_value'>
{{customerName}}
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>申请数量</text>
<view class='baseitem_value'>
{{customerName}}
</view>
</view>
<view class='horizontallineView'></view>
<view class='delete' catchtap='deleteItem' data-idx='{{idx}}'>删除</view>
<view class='horizontallineView'></view>
</template>

+ 161
- 0
pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.wxss View File

@ -0,0 +1,161 @@
/* pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.wxss */
page {
background:#EAF1F8;
height: calc(100%-10px);
}
.swiper-tab {
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-second{
height: 100%;
width: 50%;
font-size: 30rpx;
color: #777;
border-left: 1px solid#2E8CF5;
border-right: 1px solid#2E8CF5;
}
.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;
}
.swiper-items1{
height: 100%;
}
.swiper-items2{
height: 100%;
}
.backGroundContainer{
background: #fff;
}
.baseitem {
height: 60rpx;
/* border-bottom: 0.1px solid #dbdbdb; */
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx 20rpx;
font-size: 30rpx;
}
.baseitem_key {
color: #666;
width: 40%;
}
.baseitem_value {
color: rgb(48, 48, 48);
width: 60%;
text-align: right;
}
.horizontallineView {
height: 1rpx;
background-color: #dbdbdb;
margin-left: 20rpx;
margin-right: 0rpx;
}
.scroll-views{
height: 100%;
}
.detaileListContainer {
display: flex;
flex-direction: column;
background-color: #fff;
}
.listNumberView {
height: 40rpx;
background-color:#EAF1F8;
padding-left:20rpx;
padding-top: 30rpx;
padding-bottom: 10rpx;
font-size: 27rpx;
color: #666;
}
.listItem {
height: 60rpx;
line-height: 60rpx;
padding: 20rpx 20rpx;
justify-content: space-between;
font-size: 16px;
color: black;
}
.groupTwo{
display: flex;
flex-direction: row;
justify-content: space-around;
background-color: #fff;
}
.lightGray{
font-size: 30rpx;
color: #666;
}
.imageView {
height: 80px;
width: 100%;
margin-top: 20rpx;
position: relative;
align-items: center;
justify-content: center;
box-sizing: content-box;
}
.currentImage {
width: 100%;
height: 100%;
}
.btnTextView {
position: absolute;
width: 100%;
top:0;
line-height: 65px;
text-align: center;
}
.btnText {
color: white;
font-size: 20px;
}
.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;
}

+ 91
- 0
pages/specialOrderApplication/specialOrderApplication.js View File

@ -0,0 +1,91 @@
// pages/specialOrderApplication/specialOrderApplication.js
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
winHeight: app.globalData.winHeight,
unCheckDataArr: [1, 2, 3, 4, 5, 6, 6, 8, 1, 2, 3, 4, 5, 6, 6, 8, 1, 2, 3, 4, 5, 6, 6, 8, 1, 2, 3, 4, 5, 6, 6, 8],
},
// 新建特价申请
creatNew:function(){
wx.navigateTo({
url: 'creatNewSpecialOrder/creatNewSpecialOrder',
})
},
// 按搜索条件查询
goToSearch:function(){
},
// 页面滚动到顶
cscrollViewScrollUpper: function (){
},
// 页面滚动到底
scrollViewScrollLower: function (){
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

+ 3
- 0
pages/specialOrderApplication/specialOrderApplication.json View File

@ -0,0 +1,3 @@
{
"navigationBarTitleText": "特价申请"
}

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

@ -0,0 +1,36 @@
<!--pages/specialOrderApplication/specialOrderApplication.wxml-->
<view class='searchView'>
<view class='imput_goodsName' catchtap='goToSearch'>选择搜索条件</view>
<view class='storageView' catchtap='creatNew'>新建</view>
</view>
<view class='pageContainer' style='height:{{winHeight-50}}px'>
<scroll-view class="scroll-views" scroll-x="false" scroll-y="true" bindscrolltoupper="cscrollViewScrollUpper" bindscrolltolower="scrollViewScrollLower">
<block wx:for="{{unCheckDataArr}}" wx:key="item">
<template is="specialOrderApplicationTemplate" data="{{item}}" />
</block>
</scroll-view>
</view>
<template name="specialOrderApplicationTemplate">
<view class='listContainer'>
<view class='listItem' catchtap='transToOrderDetail' data-detailitemid='{{item.orderID}}' data-detailitemstate='{{item.orderState}}'>
<view class='topView'>
<view class='goodsNum'>
<text class='goodsIDText'>{{item.orderID}}审核状态</text>
</view>
<view class='goodsMoney'>
<text class='goodsIDText'>{{item.workFlowState}}招远72号店</text>
</view>
</view>
<view class='bottomView'>
<view class='goodsNum'>
<text class='goodsNumText'>{{item.Customer_Name}}单号:32364</text>
</view>
<view class='goodsMoney'>
<text class='goodsMoneyText'>{{item.time}}未审核</text>
</view>
</view>
</view>
<view class='horizontallineView'></view>
</view>
</template>

+ 103
- 0
pages/specialOrderApplication/specialOrderApplication.wxss View File

@ -0,0 +1,103 @@
/* pages/specialOrderApplication/specialOrderApplication.wxss */
page {
background:#EAF1F8;
}
.searchView{
margin: 20rpx 20rpx;
height: 30px;
display: flex;
flex-direction: row;
}
.imput_goodsName{
border: 1rpx solid rgb(236, 231, 231);
color:rgb(202, 202, 202);
height: 30px;
width: 85%;
border-radius: 10rpx;
background-color: #fff;
text-align: center;
line-height: 30px;
}
.storageView{
height: 100%;
padding-top: 10rpx;
width: 15%;
color: orange;
text-align: center;
justify-content: center;
font-size: 20px;
}
.pageContainer {
margin-top: 10px;
width: 100%;
display: block;
overflow: hidden;
}
.scroll-views {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}
.listContainer{
background-color: #fff;
}
.listItem{
display: flex;
flex-direction: column;
padding: 20rpx 20rpx;
background: white;
}
.horizontallineView {
height: 1rpx;
background-color: #dbdbdb;
margin-left: 20rpx;
margin-right: 0rpx;
}
.topView{
height: 50%;
width: 100%;
display: flex;
flex-direction: row;
}
.bottomView{
margin-top: 10rpx;
height: 50%;
width: 100%;
display: flex;
flex-direction: row;
}
.goodsNum{
height: 100%;
width: 50%;
}
.goodsMoney{
height: 100%;
width: 50%;
text-align: right;
}
.goodsIDText{
font-size: 16px;
}
.goodsNumText{
font-size: 14px;
color: #666;
}
.goodsMoneyText{
font-size: 14px;
color: #666;
}

+ 1
- 1
utils/net.js View File

@ -106,7 +106,7 @@ function transfer_request(method, params, successaction) {
if (res.data.error != null) {
if (res.data.error.code == 401) {
wx.request({
url: app.globalData.transferUrl,
url: app.globalData.tranferBaseUrl,
data: {
"DecryptCookie": app.globalData.cookie,
"CustomerId": app.globalData.globalCustomerID,


Loading…
Cancel
Save