Browse Source

1、订单相关页面存货选取方式变更

2、添加长白色按钮背景图
master
chenxuhui 7 years ago
parent
commit
ef12ac072d
7 changed files with 166 additions and 19 deletions
  1. BIN
      imgs/longWhiteBtn.png
  2. BIN
      imgs/whiteBtn.png
  3. +76
    -5
      pages/order/detail/detail.js
  4. +27
    -2
      pages/order/detail/detail.wxml
  5. +56
    -0
      pages/order/detail/detail.wxss
  6. +2
    -6
      pages/order/newBill/newBill.wxml
  7. +5
    -6
      pages/order/newBill/newBill.wxss

BIN
imgs/longWhiteBtn.png View File

Before After
Width: 1207  |  Height: 258  |  Size: 8.0 KiB

BIN
imgs/whiteBtn.png View File

Before After
Width: 577  |  Height: 258  |  Size: 6.9 KiB

+ 76
- 5
pages/order/detail/detail.js View File

@ -99,7 +99,8 @@ Page({
rowIdx: -1, rowIdx: -1,
dmo: {}, dmo: {},
dateTimeArray1: null, dateTimeArray1: null,
dateTime1: null
dateTime1: null,
backPage:'',
}, },
onLoad: function(options) { onLoad: function(options) {
@ -114,6 +115,26 @@ Page({
}) })
}, },
onShow: function () {
var that = this;
if (this.data.backPage == "goodsNameChoosePage") {
var goodsArr = app.globalData.goodsNameArray;
app.globalData.goodsNameArray = [];
if (goodsArr.length > 0) {
// 在此添加货品价格的请求
for (var i = 0; i < goodsArr.length; i++) {
let newobj = {};
this.data.dmo.Details.push(newobj);
var itemIndex = this.data.dmo.Details.length - 1;
var detail = this.data.dmo.Details[itemIndex];
detail.SaleGoods_ID = goodsArr[i].SaleGoods_ID;
detail.Goods_Name = goodsArr[i].Goods_Name;
GetGoodsInfo(this, this.data.dmo, detail);
}
}
}
},
/** /**
* 滑动切换tab * 滑动切换tab
*/ */
@ -409,13 +430,63 @@ Page({
}, },
add: function(e) { add: function(e) {
let newobj = {};
this.data.dmo.Details.push(newobj);
this.setData({
dmo: this.data.dmo
// let newobj = {};
// this.data.dmo.Details.push(newobj);
// this.setData({
// dmo: this.data.dmo
// })
var dmo = this.data.dmo;
if (dmo.Customer_ID == null) {
wx.showToast({
title: '请选择购货客户'
})
return;
}
if (dmo.AccountingUnit_ID == null) {
wx.showToast({
title: '请选择会计单位'
})
return;
}
wx.navigateTo({
url: '../../goodaNameChooseTemplate/goodaNameChooseTemplate?unitID=' + dmo.AccountingUnit_ID + '&customerID' + dmo.Customer_ID,
})
},
// 存货明细页面更多按钮
moreBtnClick: function (e) {
var that = this;
var itemList = [
"审核",
"撤销"
];
wx.showActionSheet({
itemList: itemList,
itemColor: "#2689f8",
success: function (res) {
// res.cancel 用户是不是点击了取消按钮
// res.tapIndex 数组元素的序号,从0开始
that.moreBtnClickedDetailInfo(itemList[res.tapIndex]);
}
}) })
}, },
// 更多 -> 撤销 -> 审核
moreBtnClickedDetailInfo: function (item) {
if (item == "审核") {
wx.showModal({
title: "提示",
content: "++++" + item + "++++",
})
} else {
wx.showModal({
title: "提示",
content: "++++" + item + "++++",
})
}
},
// 保存
submitForm: function() { submitForm: function() {
var dmo = this.data.dmo; var dmo = this.data.dmo;


+ 27
- 2
pages/order/detail/detail.wxml View File

@ -138,11 +138,36 @@
<view class='delete' catchtap='deleteItem' data-idx='{{idx}}'>删除</view> <view class='delete' catchtap='deleteItem' data-idx='{{idx}}'>删除</view>
</block> </block>
<view class='add' catchtap='add'>
<!-- <view class='add' catchtap='add'>
<image class="ico" src="/imgs/tianjia.png"></image> <image class="ico" src="/imgs/tianjia.png"></image>
</view> -->
<view class='imageView' catchtap='add'>
<image class='currentImage' src="/imgs/longWhiteBtn.png">
<view class='btnTextView'>
<text class='blueAddText'>添加存货</text>
</view>
</image>
</view>
<view class='bottomGroupView'>
<view class='imageViewNoMargin' catchtap='moreBtnClick'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'>
<text class='btnText'>更多</text>
</view>
</image>
</view>
<view class='imageViewNoMargin' catchtap='submitForm'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'>
<text class='btnText'>保存</text>
</view>
</image>
</view>
</view> </view>
<button class='submit' catchtap='submitForm' wx:if="{{dmo.BillState=='未审核'}}">保存</button>
<!-- <button class='submit' catchtap='submitForm' wx:if="{{dmo.BillState=='未审核'}}">保存</button> -->
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>


+ 56
- 0
pages/order/detail/detail.wxss View File

@ -228,3 +228,59 @@ page {
font-size: 18px; font-size: 18px;
color: rgb(48, 48, 48); color: rgb(48, 48, 48);
} }
.imageView {
height: 80px;
width: 100%;
margin-top: 20rpx;
position: relative;
align-items: center;
justify-content: center;
box-sizing: content-box;
}
.imageViewNoMargin{
height: 80px;
width: 100%;
margin-top: -10rpx;
position: relative;
align-items: center;
justify-content: center;
box-sizing: content-box;
}
.currentImage {
width: 100%;
height: 100%;
}
.bottomGroupView{
margin-top: -10rpx;
width: 100%;
height: 80px;
display: flex;
flex-direction: row;
}
.btnTextView {
position: absolute;
width: 100%;
top:0;
line-height: 65px;
text-align: center;
}
.btnText {
color: white;
font-size: 20px;
}
.goodsNameImageToTopFar{
height: calc(100% - 180px);
background:#EAF1F8;
}
.blueAddText{
color: #2689f8;
font-size: 20px;
}

+ 2
- 6
pages/order/newBill/newBill.wxml View File

@ -148,16 +148,14 @@
<!-- <button class='submit' catchtap='submitForm'>保存</button> --> <!-- <button class='submit' catchtap='submitForm'>保存</button> -->
<view class='imageView' catchtap='add'> <view class='imageView' catchtap='add'>
<image class='currentImage' src="/imgs/longBlueBtn.png">
<image class='currentImage' src="/imgs/longWhiteBtn.png">
<view class='btnTextView'> <view class='btnTextView'>
<text class='btnText'>添加存货</text>
<text class='blueAddText'>添加存货</text>
</view> </view>
</image> </image>
</view> </view>
<view class='bottomGroupView'> <view class='bottomGroupView'>
<view class='imageViewNoMargin' catchtap='moreBtnClick'> <view class='imageViewNoMargin' catchtap='moreBtnClick'>
<image class='currentImage' src="/imgs/blueBtn.png"> <image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'> <view class='btnTextView'>
@ -165,7 +163,6 @@
</view> </view>
</image> </image>
</view> </view>
<view class='imageViewNoMargin' catchtap='submitForm'> <view class='imageViewNoMargin' catchtap='submitForm'>
<image class='currentImage' src="/imgs/blueBtn.png"> <image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'> <view class='btnTextView'>
@ -173,7 +170,6 @@
</view> </view>
</image> </image>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>


+ 5
- 6
pages/order/newBill/newBill.wxss View File

@ -112,8 +112,6 @@ page {
} }
.add { .add {
display: flex;
flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-left: none; border-left: none;
@ -149,10 +147,6 @@ page {
background-color: #fff; background-color: #fff;
} }
.main-body {
background-color: #fff;
}
.submit { .submit {
margin-left: 5%; margin-left: 5%;
margin-top: 10%; margin-top: 10%;
@ -278,4 +272,9 @@ page {
.goodsNameImageToTopFar{ .goodsNameImageToTopFar{
height: calc(100% - 180px); height: calc(100% - 180px);
background:#EAF1F8; background:#EAF1F8;
}
.blueAddText{
color: #2689f8;
font-size: 20px;
} }

Loading…
Cancel
Save