Browse Source

订单新建完成,发现时间筛选存在问题,待修复

master
chenxuhui 7 years ago
parent
commit
474384046d
9 changed files with 1675 additions and 850 deletions
  1. +17
    -75
      pages/order/detail/detail.js
  2. +1
    -0
      pages/order/detail/detail.wxml
  3. +308
    -590
      pages/order/newBill/newBill.js
  4. +117
    -158
      pages/order/newBill/newBill.wxml
  5. +33
    -27
      pages/order/newBill/newBill.wxss
  6. +769
    -0
      pages/order/newBill1/newBill.js
  7. +5
    -0
      pages/order/newBill1/newBill.json
  8. +201
    -0
      pages/order/newBill1/newBill.wxml
  9. +224
    -0
      pages/order/newBill1/newBill.wxss

+ 17
- 75
pages/order/detail/detail.js View File

@ -77,9 +77,6 @@ function GetCustomerInfo(dmo) {
Page({
/**
* 页面的初始数据
*/
data: {
currentTab: 0,
winHeight: app.globalData.winHeight,
@ -90,9 +87,6 @@ Page({
dateTime1: null
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that = this;
network.transfer_request(load, [Number(options.ID)], function(res) {
@ -105,54 +99,6 @@ Page({
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
/**
* 滑动切换tab
*/
@ -160,7 +106,6 @@ Page({
this.setData({
currentTab: e.detail.current
});
},
/**
* 点击tab切换
@ -174,6 +119,7 @@ Page({
})
}
},
changeDateTime1(e) {
this.data.dmo.LoadTime = e.detail.value;
this.setData({
@ -181,18 +127,21 @@ Page({
dmo: this.data.dmo
});
},
getAddrs: function(e) {
this.data.dmo.DeliverAddress = e.detail.value;
this.setData({
dmo: this.data.dmo
});
},
getRemark: function(e) {
this.data.dmo.Remark = e.detail.value;
this.setData({
dmo: this.data.dmo
});
},
powerDrawer: function(e) {
let x = e.currentTarget.dataset.x;
if (x == "存货") {
@ -215,11 +164,14 @@ Page({
});
this.util();
},
select: function(e) {
var value = e.detail.value;
var x = this.data.which;
this.showDialog(x, value);
},
showDialog: function(x, value) {
var method = null;
let params = [{
@ -256,9 +208,11 @@ Page({
}
GetBaseInfoList(this, method, params);
},
dialogClose: function(e) {
this.util();
},
util: function() {
/* 动画部分 */
// 第1步:创建动画实例
@ -267,18 +221,14 @@ Page({
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() {
// 执行第二组动画
@ -289,24 +239,13 @@ Page({
})
//关闭
// if (currentStatu == "open") {
this.setData({
showModalStatus: !this.data.showModalStatus,
});
// }
}.bind(this), 200)
// 显示
// if (currentStatu == "close") {
// 调用函数时,传入new Date()参数,返回值是日期和时间
// var timet = utilll.formatTime(new Date());
// 再通过setData更改Page()里面的data,动态更新页面的数据
// this.setData({
// // time: timet,
// showModalStatus: !this.data.showModalStatus,
// });
// }
},
itemclick: function(e) {
var x = this.data.which;
var item = e.currentTarget.dataset.item;
@ -314,7 +253,7 @@ Page({
switch (x) {
case "购货客户":
dmo.Customer_ID = item.ID;
dmo.Customer_Name = item.Name;
dmo.Customer_Name = item.Name;
GetCustomerInfo(dmo);
break;
case "会计部门":
@ -353,6 +292,7 @@ Page({
});
this.util();
},
getGoodsNum: function(e) {
let idx = e.target.dataset.idx;
var detail = this.data.dmo.Details[idx];
@ -374,6 +314,7 @@ Page({
dmo: this.data.dmo
})
},
getSecondNum: function(e) {
let idx = e.target.dataset.idx;
var detail = this.data.dmo.Details[idx];
@ -395,6 +336,7 @@ Page({
dmo: this.data.dmo
})
},
getPrice: function(e) {
let idx = e.target.dataset.idx;
let value = Number(e.detail.value);
@ -409,6 +351,7 @@ Page({
dmo: this.data.dmo
})
},
deleteItem: function(e) {
let idx = e.target.dataset.idx;
this.data.dmo.Details.splice(idx, 1)
@ -416,15 +359,15 @@ Page({
dmo: this.data.dmo
})
},
add: function(e) {
add: function(e) {
let newobj = {};
this.data.dmo.Details.push(newobj);
this.setData({
dmo: this.data.dmo
})
},
submitForm: function() {
var dmo = this.data.dmo;
let timestamp2 = Date.parse(dmo.LoadTime);
@ -506,7 +449,6 @@ Page({
}
}
let method = update;
let params = [{
"Customer_ID": dmo.Customer_ID,


+ 1
- 0
pages/order/detail/detail.wxml View File

@ -143,6 +143,7 @@
</scroll-view>
</swiper-item>
</swiper>
<view class="drawer_screen" catchtap="powerDrawer" data-statu="open" wx:if="{{showModalStatus}}"></view>
<view animation="{{animationData}}" class="drawer_box" wx:if="{{showModalStatus}}">
<view class='top'>


+ 308
- 590
pages/order/newBill/newBill.js
File diff suppressed because it is too large
View File


+ 117
- 158
pages/order/newBill/newBill.wxml View File

@ -1,4 +1,5 @@
<!--pages/saleforecast/saleforecast.wxml-->
<!--pages/orderinfo/orderinfo.wxml-->
<view class="swiper-tab">
<view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">基本信息</view>
<view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">订单明细</view>
@ -8,194 +9,152 @@
<!-- 基本信息 -->
<swiper-item class="swiper-items1">
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views'>
<view class='baseitem'>
<text class='baseitem_key'>购货客户</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseCustomer' value='{{customerIndex}}' range-key="name" range='{{customer}}'>
<text>{{customer[customerIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='购货客户' data-item='{{which}}'>
{{customer[customerIndex].Name}}
</view>
</view>
<view class='baseitem'>
<text class='baseitem_key'>发货时间</text>
<picker class='baseitem_value' mode="multiSelector" value="{{dateTime1}}" bindchange="changeDateTime1" range="{{dateTimeArray1}}">
<view class="tui-picker-detail">
{{dateTimeArray1[0][dateTime1[0]]}}-{{dateTimeArray1[1][dateTime1[1]]}}-{{dateTimeArray1[2][dateTime1[2]]}} {{dateTimeArray1[3][dateTime1[3]]}}:{{dateTimeArray1[4][dateTime1[4]]}}
<view class='main-body'>
<view class='baseitem'>
<text class='baseitem_key'>购货客户</text>
<view class='baseitem_value' bindtap="powerDrawer" data-x='购货客户'>
{{dmo.Customer_Name?dmo.Customer_Name:"请选择客户"}}
</view>
</picker>
</view>
<view class='baseitem'>
<text class='baseitem_key'>会计单位</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseUnit' value='{{isUnit}}' range-key="Name" range='{{unit}}'>
<text>{{unit[isUnit].Name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='会计部门' data-item='{{which}}'>
{{unit[isUnit].Name}}
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>发货时间</text>
<picker class='baseitem_value' mode="multiSelector" value="{{dmo.LoadTime}}" bindchange="changeDateTime1" range="{{dateTimeArray1}}">
<view class="tui-picker-detail">
{{dateTimeArray1[0][dateTime1[0]]}}-{{dateTimeArray1[1][dateTime1[1]]}}-{{dateTimeArray1[2][dateTime1[2]]}} {{dateTimeArray1[3][dateTime1[3]]}}:{{dateTimeArray1[4][dateTime1[4]]}}
</view>
</picker>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>销售部门</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseDepartment' value='{{departmentIndex}}' range-key="name" range='{{department}}'>
<text>{{department[departmentIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='部门' data-item='{{which}}'>
{{department[departmentIndex].Name}}
<view class='baseitem'>
<text class='baseitem_key'>会计单位</text>
<view class='baseitem_value' catchtap="powerDrawer" data-x='会计部门'>
{{dmo.AccountingUnit_Name?dmo.AccountingUnit_Name:"请选择会计单位"}}
</view>
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>业务员</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
<text>{{saletype[saletypeIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='业务员' data-item='{{which}}'>
{{employee[empIndex].Name}}
<view class='baseitem'>
<text class='baseitem_key'>销售部门</text>
<view class='baseitem_value' catchtap="powerDrawer" data-x='部门'>
{{dmo.Department_Name?dmo.Department_Name:"请选择销售部门"}}
</view>
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>仓库</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
<text>{{saletype[saletypeIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='仓库' data-item='{{which}}'>
{{store[storeIndex].Name}}
<view class='baseitem'>
<text class='baseitem_key'>业务员</text>
<view class='baseitem_value' catchtap="powerDrawer" data-x='业务员'>
{{dmo.Employee_Name?dmo.Employee_Name:"请选择业务员"}}
</view>
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>销售类型</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
<text>{{saletype[saletypeIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='销售类型' data-item='{{which}}'>
{{saletype[saletypeIndex].Name}}
<view class='baseitem'>
<text class='baseitem_key'>仓库</text>
<view class='baseitem_value' catchtap="powerDrawer" data-x='仓库'>
{{dmo.Store_Name?dmo.Store_Name:"请选择业务员"}}
</view>
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>配送方式</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
<text>{{saletype[saletypeIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='配送方式' data-item='{{which}}'>
{{takeGoodsType[takeGoodsTypeIndex].Name}}
<view class='baseitem'>
<text class='baseitem_key'>销售类型</text>
<view class='baseitem_value' catchtap="powerDrawer" data-x='销售类型'>
{{dmo.SaleKind_Name?dmo.SaleKind_Name:"请选择销售类型"}}
</view>
</view>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>送货地址</text>
<input class='baseitem_value' bindinput='getAddrs' placeholder='请输入送货地址' placeholder-style='color:rgb(202, 202, 202)'></input>
</view>
<view class='baseitem'>
<text class='baseitem_key'>摘要</text>
<input class='baseitem_value' bindinput='getRemark'></input>
</view>
<view class='baseitem'>
<text class='baseitem_key'>配送方式</text>
<view class='baseitem_value' catchtap="powerDrawer" data-x='配送方式'>
{{dmo.TakeGoods_Type?dmo.TakeGoods_Type:"请选择配送方式"}}
</view>
</view>
<view class='horizontallineView'></view>
<!-- <view class='baseitem'>
<text class='baseitem_key' space="emsp">摘 要</text>
<input class='baseitem_value' bindinput='getRemark' placeholder='请输入摘要' placeholder-style='color:rgb(202, 202, 202)'></input>
</view> -->
<!-- <button class='submit' catchtap='submitForm'>提交</button> -->
</scroll-view>
<view class='baseitem'>
<text class='baseitem_key'>送货地址</text>
<input class='baseitem_value' bindinput='getAddrs' placeholder='请输入送货地址' placeholder-style='color:rgb(202, 202, 202)' value="{{dmo.DeliverAddress}}"></input>
</view>
<view class='horizontallineView'></view>
<view class="drawer_screen" bindtap="powerDrawer" data-item='{{which}}' data-statu="close" wx:if="{{showModalStatus}}"></view>
<!--content-->
<!--使用animation属性指定需要执行的动画-->
<view animation="{{animationData}}" data-item='{{which}}' class="drawer_box" wx:if="{{showModalStatus}}">
<!--drawer content-->
<view class='top' data-item='{{which}}'>
<input data-item='{{which}}' class="sousuo" bindinput="select" placeholder='请输入搜索'>
</input>
</view>
<view class="drawer_content">
<block wx:for="{{currency}}" wx:key="item" wx:for-index="idx">
<view class="grid1" data-item='{{which}}' catchtap='itemclick' data-idx='{{idx}}' data-ID="{{item.ID}}" data-Name='{{item.Name}}'>
<text class='text3'>{{item.Name}}</text>
</view>
</block>
<view class='baseitem'>
<text class='baseitem_key'>摘要</text>
<input class='baseitem_value' bindinput='getRemark' value="{{dmo.Remark}}"></input>
</view>
<view class='horizontallineView'></view>
</view>
<view class="btn_ok" bindtap="powerDrawer" data-statu="close">取消</view>
</view>
</scroll-view>
</swiper-item>
<!-- 订单详细 -->
<swiper-item class="swiper-items2">
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views'>
<view class='main-body'>
<block wx:for="{{obj}}" wx:key="item" wx:for-index="idx">
<!-- <template is="fodder" data="{{...item}}"></template> -->
<view class='itemView'>
<view class='baseitem'>
<text class='baseitem_key2'>存货名称</text>
<view class='baseitem_value2' bindtap="powerDrawer1" data-statu="open" data-idx='{{idx}}'>
{{obj[idx].Goods_Name}}
</view>
<block wx:for="{{dmo.Details}}" wx:key="item" wx:for-index="idx">
<view class='itemView'>
<view class='baseitem'>
<text class='baseitem_key'>存货名称</text>
<view class='baseitem_value' bindtap="powerDrawer" data-idx='{{idx}}' data-x='存货'>
{{item.Goods_Name?item.Goods_Name:"请选择存货"}}
</view>
</view>
<view class='horizontallineView'></view>
<view class='twogroup'>
<view class='baseitem'>
<text class='baseitem_key1'>报货数量</text>
<input class='baseitem_value1' bindinput='getGoodsNum' placeholder='请输入报货数量' type='digit' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{obj[idx].goodsNum}}'></input>
</view>
<view class='baseitem'>
<text class='baseitem_key'>报货数量</text>
<input class='baseitem_value' bindinput='getGoodsNum' placeholder='请输入报货数量' type='digit' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{item.UnitNum}}'></input>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key1' space='ensp'>辅 数 量</text>
<input class='baseitem_value1' bindinput='getSecondNum' placeholder='请输入辅数量' type='digit' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{obj[idx].goodsSecondNum}}'></input>
</view>
</view>
<view class='twogroup'>
<view class='baseitem'>
<text class='baseitem_key1' space='emsp'>单 价</text>
<input class='baseitem_value1' type='digit' bindinput='getPrice' placeholder='请输入单价' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{obj[idx].Price}}'></input>
</view>
<view class='baseitem'>
<text class='baseitem_key' space='ensp'>辅 数 量</text>
<input class='baseitem_value' bindinput='getSecondNum' placeholder='请输入辅数量' type='digit' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{item.SecondNumber}}'></input>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key1'>政策单价</text>
<text class='baseitem_value1' data-idx='{{idx}}'>{{obj[idx].PolicyPrice}}</text>
</view>
</view>
<view class='delete' catchtap='deleteItem' data-idx='{{idx}}'>删除</view>
<view class='baseitem'>
<text class='baseitem_key' space='emsp'>单 价</text>
<input class='baseitem_value' type='digit' bindinput='getPrice' placeholder='请输入单价' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{item.Price}}'></input>
</view>
<view class='horizontallineView'></view>
<view class='baseitem'>
<text class='baseitem_key'>政策单价</text>
<text class='baseitem_value' data-idx='{{idx}}'>{{item.PolicyPrice}}</text>
</view>
</block>
<view class='add' catchtap='add'>
<image class="ico" src="/imgs/tianjia.png"></image>
<view class='horizontallineView'></view>
</view>
<view class='delete' catchtap='deleteItem' data-idx='{{idx}}'>删除</view>
</block>
<view class='add' catchtap='add'>
<image class="ico" src="/imgs/tianjia.png"></image>
</view>
<!-- <template name='fodder'>
</template> -->
<button class='submit' catchtap='submitForm'>提交</button>
<button class='submit' catchtap='submitForm'>保存</button>
</scroll-view>
<view class="drawer_screen" bindtap="powerDrawer1" data-statu="close" wx:if="{{showModalStatus1}}"></view>
<!--content-->
<!--使用animation属性指定需要执行的动画-->
<view animation="{{animationData}}" class="drawer_box" wx:if="{{showModalStatus1}}">
<!--drawer content-->
<view class='top'>
<input input class="sousuo" bindinput="select1" placeholder='请输入搜索'>
</input>
</view>
<view class="drawer_content">
<block wx:for="{{goods}}" wx:key="item">
<view class="grid1" catchtap='itemclick1' data-idx='{{idx}}' data-Name='{{item.Goods_Name}}' data-policyprice='{{item.PolicyPrice}}' data-data='{{item}}'>
<text class='text3'>{{item.Goods_Name}}</text>
</view>
</block>
</view>
<view class="btn_ok" bindtap="powerDrawer1" data-statu="close">取消</view>
</view>
</swiper-item>
</swiper>
</swiper>
<view class="drawer_screen" catchtap="powerDrawer" data-statu="open" wx:if="{{showModalStatus}}"></view>
<view animation="{{animationData}}" class="drawer_box" wx:if="{{showModalStatus}}">
<view class='top'>
<input class="sousuo" bindinput="select" placeholder='请输入搜索'>
</input>
</view>
<view class="drawer_content">
<block wx:for="{{currency}}" wx:key="item" wx:for-index="idx">
<view class="grid1" catchtap='itemclick' data-item='{{item}}'>
<text class='text3'>{{item.Name}}</text>
</view>
</block>
</view>
<view class="btn_ok" catchtap="dialogClose">取消</view>
</view>

+ 33
- 27
pages/order/newBill/newBill.wxss View File

@ -1,7 +1,7 @@
/* pages/saleforecast/saleforecast.wxss */
/* pages/orderinfo/orderinfo.wxss */
page {
background:#EAF1F8;
background: #eaf1f8;
height: calc(100%-10px);
}
@ -26,7 +26,7 @@ page {
}
.on {
background-color:#2E8CF5 ;
background-color: #2e8cf5;
color: white;
}
@ -51,65 +51,66 @@ page {
}
.baseitem {
height: 60rpx;
background: #fff;
width: 100%;
border-bottom: 0.1px solid #dbdbdb;
/* border-bottom: 0.1px solid #dbdbdb; */
display: flex;
flex-direction: row;
align-items: center;
padding-top: 20rpx;
padding-bottom: 20rpx;
padding: 20rpx 20rpx;
font-size: 30rpx;
}
.horizontallineView {
height: 1rpx;
background-color: #dbdbdb;
margin-left: 20rpx;
margin-right: 0rpx;
}
.baseitem_key {
color: #666;
width: 40%;
margin-left: 20rpx;
width: 30%;
/* margin-left: 20rpx; */
}
.baseitem_value {
color: rgb(48, 48, 48);
margin-left: 20rpx;
margin-right: 20rpx;
width: 160%;
/* margin-left: 20rpx;
margin-right: 20rpx; */
width: 70%;
height: 100%;
text-align: right;
}
.baseitem_key2 {
color: #666;
width: 40%;
margin-left: 20rpx;
width: 30%;
/* margin-left: 20rpx; */
}
.baseitem_value2 {
color: rgb(48, 48, 48);
margin-left: 20rpx;
margin-right: 20rpx;
width: 160%;
/* margin-left: 20rpx;
margin-right: 20rpx; */
width: 70%;
text-align: right;
}
.baseitem_key1 {
color: #666;
width: 100%;
width: 30%;
margin-left: 20rpx;
}
.baseitem_value1 {
color: rgb(48, 48, 48);
margin-left: 20rpx;
margin-right: 20rpx;
width: 100%;
/* margin-left: 20rpx;
margin-right: 20rpx; */
width: 70%;
text-align: right;
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.add {
display: flex;
flex-direction: row;
@ -145,6 +146,11 @@ page {
.itemView {
margin-top: 20rpx;
background-color: #fff;
}
.main-body {
background-color: #fff;
}
.submit {


+ 769
- 0
pages/order/newBill1/newBill.js View File

@ -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
});
}
}
})

+ 5
- 0
pages/order/newBill1/newBill.json View File

@ -0,0 +1,5 @@
{
"navigationBarBackgroundColor": "white",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "销售订单"
}

+ 201
- 0
pages/order/newBill1/newBill.wxml View File

@ -0,0 +1,201 @@
<!--pages/saleforecast/saleforecast.wxml-->
<view class="swiper-tab">
<view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">基本信息</view>
<view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">订单明细</view>
</view>
<swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{winHeight - 55}}px" bindchange="bindChange">
<!-- 基本信息 -->
<swiper-item class="swiper-items1">
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views'>
<view class='baseitem'>
<text class='baseitem_key'>购货客户</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseCustomer' value='{{customerIndex}}' range-key="name" range='{{customer}}'>
<text>{{customer[customerIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='购货客户' data-item='{{which}}'>
{{customer[customerIndex].Name}}
</view>
</view>
<view class='baseitem'>
<text class='baseitem_key'>发货时间</text>
<picker class='baseitem_value' mode="multiSelector" value="{{dateTime1}}" bindchange="changeDateTime1" range="{{dateTimeArray1}}">
<view class="tui-picker-detail">
{{dateTimeArray1[0][dateTime1[0]]}}-{{dateTimeArray1[1][dateTime1[1]]}}-{{dateTimeArray1[2][dateTime1[2]]}} {{dateTimeArray1[3][dateTime1[3]]}}:{{dateTimeArray1[4][dateTime1[4]]}}
</view>
</picker>
</view>
<view class='baseitem'>
<text class='baseitem_key'>会计单位</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseUnit' value='{{isUnit}}' range-key="Name" range='{{unit}}'>
<text>{{unit[isUnit].Name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='会计部门' data-item='{{which}}'>
{{unit[isUnit].Name}}
</view>
</view>
<view class='baseitem'>
<text class='baseitem_key'>销售部门</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseDepartment' value='{{departmentIndex}}' range-key="name" range='{{department}}'>
<text>{{department[departmentIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='部门' data-item='{{which}}'>
{{department[departmentIndex].Name}}
</view>
</view>
<view class='baseitem'>
<text class='baseitem_key'>业务员</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
<text>{{saletype[saletypeIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='业务员' data-item='{{which}}'>
{{employee[empIndex].Name}}
</view>
</view>
<view class='baseitem'>
<text class='baseitem_key'>仓库</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
<text>{{saletype[saletypeIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='仓库' data-item='{{which}}'>
{{store[storeIndex].Name}}
</view>
</view>
<view class='baseitem'>
<text class='baseitem_key'>销售类型</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
<text>{{saletype[saletypeIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='销售类型' data-item='{{which}}'>
{{saletype[saletypeIndex].Name}}
</view>
</view>
<view class='baseitem'>
<text class='baseitem_key'>配送方式</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
<text>{{saletype[saletypeIndex].name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='配送方式' data-item='{{which}}'>
{{takeGoodsType[takeGoodsTypeIndex].Name}}
</view>
</view>
<view class='baseitem'>
<text class='baseitem_key'>送货地址</text>
<input class='baseitem_value' bindinput='getAddrs' placeholder='请输入送货地址' placeholder-style='color:rgb(202, 202, 202)'></input>
</view>
<view class='baseitem'>
<text class='baseitem_key'>摘要</text>
<input class='baseitem_value' bindinput='getRemark'></input>
</view>
<!-- <view class='baseitem'>
<text class='baseitem_key' space="emsp">摘 要</text>
<input class='baseitem_value' bindinput='getRemark' placeholder='请输入摘要' placeholder-style='color:rgb(202, 202, 202)'></input>
</view> -->
<!-- <button class='submit' catchtap='submitForm'>提交</button> -->
</scroll-view>
<view class="drawer_screen" bindtap="powerDrawer" data-item='{{which}}' data-statu="close" wx:if="{{showModalStatus}}"></view>
<!--content-->
<!--使用animation属性指定需要执行的动画-->
<view animation="{{animationData}}" data-item='{{which}}' class="drawer_box" wx:if="{{showModalStatus}}">
<!--drawer content-->
<view class='top' data-item='{{which}}'>
<input data-item='{{which}}' class="sousuo" bindinput="select" placeholder='请输入搜索'>
</input>
</view>
<view class="drawer_content">
<block wx:for="{{currency}}" wx:key="item" wx:for-index="idx">
<view class="grid1" data-item='{{which}}' catchtap='itemclick' data-idx='{{idx}}' data-ID="{{item.ID}}" data-Name='{{item.Name}}'>
<text class='text3'>{{item.Name}}</text>
</view>
</block>
</view>
<view class="btn_ok" bindtap="powerDrawer" data-statu="close">取消</view>
</view>
</swiper-item>
<!-- 订单详细 -->
<swiper-item class="swiper-items2">
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views'>
<view class='main-body'>
<block wx:for="{{obj}}" wx:key="item" wx:for-index="idx">
<!-- <template is="fodder" data="{{...item}}"></template> -->
<view class='itemView'>
<view class='baseitem'>
<text class='baseitem_key2'>存货名称</text>
<view class='baseitem_value2' bindtap="powerDrawer1" data-statu="open" data-idx='{{idx}}'>
{{obj[idx].Goods_Name}}
</view>
</view>
<view class='twogroup'>
<view class='baseitem'>
<text class='baseitem_key1'>报货数量</text>
<input class='baseitem_value1' bindinput='getGoodsNum' placeholder='请输入报货数量' type='digit' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{obj[idx].goodsNum}}'></input>
</view>
<view class='baseitem'>
<text class='baseitem_key1' space='ensp'>辅 数 量</text>
<input class='baseitem_value1' bindinput='getSecondNum' placeholder='请输入辅数量' type='digit' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{obj[idx].goodsSecondNum}}'></input>
</view>
</view>
<view class='twogroup'>
<view class='baseitem'>
<text class='baseitem_key1' space='emsp'>单 价</text>
<input class='baseitem_value1' type='digit' bindinput='getPrice' placeholder='请输入单价' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{obj[idx].Price}}'></input>
</view>
<view class='baseitem'>
<text class='baseitem_key1'>政策单价</text>
<text class='baseitem_value1' data-idx='{{idx}}'>{{obj[idx].PolicyPrice}}</text>
</view>
</view>
<view class='delete' catchtap='deleteItem' data-idx='{{idx}}'>删除</view>
</view>
</block>
<view class='add' catchtap='add'>
<image class="ico" src="/imgs/tianjia.png"></image>
</view>
</view>
<!-- <template name='fodder'>
</template> -->
<button class='submit' catchtap='submitForm'>提交</button>
</scroll-view>
<view class="drawer_screen" bindtap="powerDrawer1" data-statu="close" wx:if="{{showModalStatus1}}"></view>
<!--content-->
<!--使用animation属性指定需要执行的动画-->
<view animation="{{animationData}}" class="drawer_box" wx:if="{{showModalStatus1}}">
<!--drawer content-->
<view class='top'>
<input input class="sousuo" bindinput="select1" placeholder='请输入搜索'>
</input>
</view>
<view class="drawer_content">
<block wx:for="{{goods}}" wx:key="item">
<view class="grid1" catchtap='itemclick1' data-idx='{{idx}}' data-Name='{{item.Goods_Name}}' data-policyprice='{{item.PolicyPrice}}' data-data='{{item}}'>
<text class='text3'>{{item.Goods_Name}}</text>
</view>
</block>
</view>
<view class="btn_ok" bindtap="powerDrawer1" data-statu="close">取消</view>
</view>
</swiper-item>
</swiper>

+ 224
- 0
pages/order/newBill1/newBill.wxss View File

@ -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);
}

Loading…
Cancel
Save