Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
226d6ba9e8
5 changed files with 32 additions and 12 deletions
  1. 2
      pages/storage/pound-info/index.wxml
  2. 7
      pages/storage/pound-list/index.js
  3. 1
      pages/storage/pound-list/index.json
  4. 33
      pages/storage/pound-list/index.wxml
  5. 1
      pages/storage/pound-list/index.wxss

2
pages/storage/pound-info/index.wxml

@ -62,7 +62,7 @@
</van-cell>
<submit-layout wx:if="{{form.status == 0 || form.status == 1}}">
<van-button type="danger" custom-style="height:88rpx;width:254rpx" bind:click="deleteForm" wx:if="{{form.status == 0 || form.status == 1}}">删除</van-button>
<van-button type="danger" custom-style="height:88rpx;width:254rpx" bind:click="deleteForm" wx:if="{{form.status == 0 || form.status == 1}}">取消磅单</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm" wx:if="{{form.status == 1}}">关联出货单</van-button>
</submit-layout>

7
pages/storage/pound-list/index.js

@ -1,7 +1,7 @@
// pages/process/order-list/index.js
import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog'
import { getPoundList } from "../../../api/saas"
import { getPoundList, deletePound } from "../../../api/saas"
const event = require('../../../utils/event')
const util = require('../../../utils/util')
const app = getApp()
@ -92,7 +92,7 @@ Scene({
cancelOrder: function(e){
Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => {
wx.showLoading({ title: '正在获取', mask: true })
cancelOrder(e.currentTarget.dataset.id).then(result => {
deletePound({id: e.currentTarget.dataset.id}).then(result => {
wx.hideLoading()
util.showToast('订单已经删除')
this.onRefreshList()
@ -106,6 +106,9 @@ Scene({
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index]
wx.navigateTo({ url: `/pages/storage/pound-info/index?id=${item.id}` })
},
submitForm: function(e){
wx.navigateTo({ url: `/pages/storage/order-create/index?id=${e.currentTarget.dataset.id}` })
},
onUnload: function(){
event.remove('OrderMessage', this)
}

1
pages/storage/pound-list/index.json

@ -2,6 +2,7 @@
"usingComponents": {
"refresh-view": "/components/refresh-view/index",
"van-button": "/components/button/index",
"van-icon": "/components/icon/index",
"van-cell": "/components/cell/index",
"van-divider": "/components/divider/index",
"van-loading": "/components/loading/index",

33
pages/storage/pound-list/index.wxml

@ -17,18 +17,35 @@
<view style="background-color:#f3f3f3;" wx:if="{{item.tipsTime}}">
<text class="text-sg" style="line-height:64rpx;padding-left:32rpx">{{item.tipsTime}}</text>
</view>
<view style="background-color:#f3f3f3;height:16rpx" wx:else></view>
<view class="item-content" data-page="{{pageIndex}}" data-index="{{index}}" bindtap="lookItem">
<view class="flex flex-justify">
<view class="text-df">磅单编号:{{item.id}}</view>
<view class="flex">
<view class="text-df" style="color:#FA541C" wx:if="{{item.status == 0}}">过磅中</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.status == 1}}">已过磅</view>
<view class="flex flex-justify" style="border-bottom: 1rpx solid #f3f3f3;padding-bottom:16rpx">
<view class="flex flex-center">
<van-icon name="/assets/image/icon-logoc.png" size="56rpx"/>
<view class="flex flex-center text-sg text-black van-ellipsis text-bold" style="justify-content: flex-start;max-width: 500rpx;">
<text style="margin-left:24rpx">磅单编号:{{item.id}}</text>
</view>
</view>
<view class="text-df" style="color:#FA541C" wx:if="{{item.status == 0}}">过磅中</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.status == 1}}">已过磅</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-gray">皮重(公斤):{{formate.minWeight(item.firstWeight, item.secondWeight)}}</view>
<view class="text-sm text-gray">毛重(公斤):{{formate.maxWeight(item.firstWeight, item.secondWeight)}}</view>
<view class="text-sm text-gray">净重(公斤):{{item.netWeight || '- -'}}</view>
<view class="text-sm text-black">皮重(公斤):</view>
<view class="text-sm text-black">{{formate.minWeight(item.firstWeight, item.secondWeight)}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black">毛重(公斤):</view>
<view class="text-sm text-black">{{formate.maxWeight(item.firstWeight, item.secondWeight)}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.netWeight}}">
<view class="text-sm text-black">净重(公斤):</view>
<view class="text-sm text-black">{{item.netWeight}}</view>
</view>
<view class="flex" style="justify-content: flex-end;margin-top:16rpx">
<van-button round plain type="default" custom-style="height:64rpx;width:180rpx" data-id="{{item.id}}"
bind:click="cancelOrder" wx:if="{{item.status == 0 || item.status == 1}}">取消磅单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:240rpx" data-id="{{item.id}}"
bind:click="submitForm" wx:if="{{item.status == 1}}">关联出货单</van-button>
</view>
</view>
</view>

1
pages/storage/pound-list/index.wxss

@ -1,7 +1,6 @@
/* pages/process/order-list/index.wxss */
.item-content{
padding: 20rpx 32rpx 20rpx 0rpx;
border-bottom:1rpx solid #f3f3f3;
margin-left:32rpx;
align-items: flex-start;
}
Loading…
Cancel
Save