Browse Source

ui

feature/v1.6
xpz2018 4 years ago
parent
commit
712bab75a7
13 changed files with 56 additions and 29 deletions
  1. 2
      pages/process/order-info/index.js
  2. 10
      pages/process/outside-check-item/index.js
  3. 1
      pages/process/outside-check-item/index.json
  4. 32
      pages/process/outside-check-item/index.wxml
  5. 2
      pages/process/outside-check/index.js
  6. 2
      pages/process/outside-check/index.wxml
  7. 2
      pages/process/outside-info/index.js
  8. 7
      pages/process/outside-info/index.wxml
  9. 2
      pages/process/outside-item/index.wxml
  10. 8
      pages/process/outside-price/index.wxml
  11. 2
      pages/process/payment/index.wxml
  12. 13
      pages/storage/order-info/index.js
  13. 2
      pages/storage/order-info/index.wxml

2
pages/process/order-info/index.js

@ -72,7 +72,7 @@ Scene({
this.setData({ ['form.isDefault']: detail ? 1 : 0 }) this.setData({ ['form.isDefault']: detail ? 1 : 0 })
}, },
printOrder: function(){ printOrder: function(){
wx.showLoading({ title: '正在获取', mask: true })
wx.showLoading({ title: '正在处理', mask: true })
printOrder({id: this.data.form.id}).then(result => { printOrder({id: this.data.form.id}).then(result => {
wx.hideLoading() wx.hideLoading()
util.showToast('即将打印,请稍后') util.showToast('即将打印,请稍后')

10
pages/process/outside-check-item/index.js

@ -46,21 +46,21 @@ Component({
this.setData({ visible: false }) this.setData({ visible: false })
}, },
bindInput: function (e) { bindInput: function (e) {
this.data.item[e.currentTarget.id] = e.detail.value
this.data.item[e.currentTarget.id] = e.detail
if(e.currentTarget.id == 'deductPercent'){ if(e.currentTarget.id == 'deductPercent'){
if(util.isEmpty(e.detail.value) || Number(e.detail.value) <= 0){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
this.data.item.deductWeight = null this.data.item.deductWeight = null
this.data.item.deductPercent = null this.data.item.deductPercent = null
} else { } else {
this.data.item.deductWeight = math.divide(math.times(this.data.item.netWeight, Number(e.detail.value)), 100).toFixed(2)
this.data.item.deductWeight = math.divide(math.times(this.data.item.netWeight, Number(e.detail)), 100).toFixed(2)
} }
this.statAmount() this.statAmount()
} else if(e.currentTarget.id == 'deductWeight'){ } else if(e.currentTarget.id == 'deductWeight'){
if(util.isEmpty(e.detail.value) || Number(e.detail.value) <= 0){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
this.data.item.deductWeight = null this.data.item.deductWeight = null
this.data.item.deductPercent = null this.data.item.deductPercent = null
} else { } else {
this.data.item.deductPercent = math.times(math.divide(Number(e.detail.value), this.data.item.netWeight), 100).toFixed(2)
this.data.item.deductPercent = math.times(math.divide(Number(e.detail), this.data.item.netWeight), 100).toFixed(2)
} }
this.statAmount() this.statAmount()
} else if(e.currentTarget.id == 'settleUnitPrice'){ } else if(e.currentTarget.id == 'settleUnitPrice'){

1
pages/process/outside-check-item/index.json

@ -2,6 +2,7 @@
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"van-cell": "/components/cell/index", "van-cell": "/components/cell/index",
"van-field": "/components/field/index",
"van-checkbox": "/components/checkbox/index", "van-checkbox": "/components/checkbox/index",
"van-picker": "/components/picker/index", "van-picker": "/components/picker/index",
"van-popup": "/components/popup/index", "van-popup": "/components/popup/index",

32
pages/process/outside-check-item/index.wxml

@ -1,6 +1,6 @@
<!--pages/message/index.wxml--> <!--pages/message/index.wxml-->
<view style="height:16rpx" wx:if="{{index != 0 }}"></view> <view style="height:16rpx" wx:if="{{index != 0 }}"></view>
<van-cell clickable center is-link bind:click="showCategory">
<van-cell clickable center is-link arrow-direction="down" bind:click="showCategory">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black"> <view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
@ -9,7 +9,7 @@
<view class="{{item.productCategoryName ? 'text-black' : 'text-gray'}}">{{item.productCategoryName || '请选择废纸品类'}}</view> <view class="{{item.productCategoryName ? 'text-black' : 'text-gray'}}">{{item.productCategoryName || '请选择废纸品类'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell>
<!-- <van-cell>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black"> <view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
@ -18,14 +18,20 @@
<input id="settleUnitPrice" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" <input id="settleUnitPrice" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right"
maxlength="8" placeholder="请输入结算单价" value="{{item.settleUnitPrice || ''}}" bindinput="bindInput" /> maxlength="8" placeholder="请输入结算单价" value="{{item.settleUnitPrice || ''}}" bindinput="bindInput" />
</view> </view>
</van-cell>
</van-cell> -->
<van-field id="settleUnitPrice" value="{{ item.settleUnitPrice || '' }}" type="digit" placeholder="请输入结算单价" clearable input-align="right" bind:change="bindInput">
<view slot="label" class="flex text-black" style="width:240rpx">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 12px">*</view>
<text>结算单价(元/公斤)</text>
</view>
</van-field>
<van-cell> <van-cell>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">净重(公斤)</view> <view class="text-black">净重(公斤)</view>
<view class="{{item.netWeight ? 'text-black' : 'text-gray'}}">{{item.netWeight || ''}}</view> <view class="{{item.netWeight ? 'text-black' : 'text-gray'}}">{{item.netWeight || ''}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell>
<!-- <van-cell>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black" data-type="1" bindtap="changeDeductType"> <view class="flex flex-center text-black" data-type="1" bindtap="changeDeductType">
<van-checkbox value="{{ !item.sign || item.sign == 1 }}" icon-size="32rpx"></van-checkbox> <van-checkbox value="{{ !item.sign || item.sign == 1 }}" icon-size="32rpx"></van-checkbox>
@ -35,8 +41,14 @@
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量" placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量"
value="{{item.deductWeight || ''}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" /> value="{{item.deductWeight || ''}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" />
</view> </view>
</van-cell>
<van-cell>
</van-cell> -->
<van-field id="deductWeight" value="{{ item.deductWeight || '' }}" data-type="1" type="digit" placeholder="请输入扣重重量" clearable disabled="{{item.sign == 2}}" input-align="right" bind:change="bindInput" bind:click-input="changeDeductType">
<view slot="label" class="flex flex-center text-black" style="justify-content: flex-start" data-type="1" bindtap="changeDeductType">
<van-checkbox value="{{ !item.sign || item.sign == 1 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣重(公斤)</text>
</view>
</van-field>
<!-- <van-cell>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black" data-type="2" bindtap="changeDeductType"> <view class="flex flex-center text-black" data-type="2" bindtap="changeDeductType">
<van-checkbox value="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox> <van-checkbox value="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox>
@ -46,7 +58,13 @@
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣点比例" placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣点比例"
value="{{item.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" /> value="{{item.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" />
</view> </view>
</van-cell>
</van-cell> -->
<van-field id="deductPercent" value="{{ item.deductPercent || '' }}" type="digit" placeholder="请输入扣点比例" clearable disabled="{{item.sign == 2}}" input-align="right" bind:change="bindInput" data-type="2" maxlength="10" bind:click-input="changeDeductType" wx:if="{{status == 1}}">
<view slot="label" class="flex flex-center text-black" style="justify-content: flex-start" data-type="2" bindtap="changeDeductType">
<van-checkbox value="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣点(%)</text>
</view>
</van-field>
<van-cell> <van-cell>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">结算重量(公斤)</view> <view class="text-black">结算重量(公斤)</view>

2
pages/process/outside-check/index.js

@ -64,7 +64,7 @@ Scene({
if(this.data.form.onsideGrossWeight) { if(this.data.form.onsideGrossWeight) {
this.checkOrder() this.checkOrder()
} else { } else {
var message = '此订单没有厂内毛重数据,按照正常流程请刷卡过磅,获取厂内毛重数据,如果已经无法获取,请仔细查验纸品,确定没有问题后,进行审核。'
var message = '此订单没有厂内毛重数据,按照正常流程请刷卡过磅,获取厂内毛重数据,如果已经无法获取,请仔细查验纸品和相关数据,确定没有问题后,进行审核。'
Dialog.confirm({ title: '温馨提示', message, confirmButtonText: '确定审核' }).then(() => { Dialog.confirm({ title: '温馨提示', message, confirmButtonText: '确定审核' }).then(() => {
this.checkOrder() this.checkOrder()
}) })

2
pages/process/outside-check/index.wxml

@ -35,7 +35,7 @@
<outside-check-item form="{{form}}" item="{{item}}" index="{{index}}" list="{{paperList}}" columns="{{columns}}" bind:change="onProductChange"/> <outside-check-item form="{{form}}" item="{{item}}" index="{{index}}" list="{{paperList}}" columns="{{columns}}" bind:change="onProductChange"/>
</view> </view>
</view> </view>
<view style="height:16rpx"></view>
<submit-layout wx:if="{{form}}"> <submit-layout wx:if="{{form}}">
<view class="flex flex-center" style="flex:1;justify-content: flex-start"> <view class="flex flex-center" style="flex:1;justify-content: flex-start">
<text class="text-lg" wx:if="{{form.settleTotalAmount}}">金额:</text> <text class="text-lg" wx:if="{{form.settleTotalAmount}}">金额:</text>

2
pages/process/outside-info/index.js

@ -58,7 +58,7 @@ Scene({
}) })
}, },
printOrder: function(){ printOrder: function(){
wx.showLoading({ title: '正在获取', mask: true })
wx.showLoading({ title: '正在处理', mask: true })
printOrder({id: this.data.id}).then(result => { printOrder({id: this.data.id}).then(result => {
wx.hideLoading() wx.hideLoading()
util.showToast('即将打印,请稍后') util.showToast('即将打印,请稍后')

7
pages/process/outside-info/index.wxml

@ -1,4 +1,5 @@
<!--pages/process/order-check/index.wxml--> <!--pages/process/order-check/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">厂外收货</view> <view slot="content">厂外收货</view>
</cu-custom> </cu-custom>
@ -186,7 +187,7 @@
<van-cell clickable center> <van-cell clickable center>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">结算总金额(元)</view> <view class="text-black">结算总金额(元)</view>
<view class="text-gray">{{form.settleTotalAmount || '- -'}}</view>
<view class="text-gray">{{formate.formateAmount(form.settleTotalAmount, 2)}}</view>
</view> </view>
</van-cell> </van-cell>
</view> </view>
@ -194,14 +195,14 @@
<submit-layout wx:if="{{form && admin && form.orderStatus == 3}}"> <submit-layout wx:if="{{form && admin && form.orderStatus == 3}}">
<view class="flex flex-center" style="flex:1;justify-content: flex-start"> <view class="flex flex-center" style="flex:1;justify-content: flex-start">
<text class="text-lg" wx:if="{{form.settleTotalAmount}}">金额:</text> <text class="text-lg" wx:if="{{form.settleTotalAmount}}">金额:</text>
<text class="text-xxl text-price text-red" wx:if="{{form.settleTotalAmount}}">{{form.settleTotalAmount}}</text>
<text class="text-xxl text-price text-red" wx:if="{{form.settleTotalAmount}}">{{formate.formateAmount(form.settleTotalAmount, 2)}}</text>
</view> </view>
<van-button type="info" custom-style="height:88rpx;width:300rpx" bind:click="submitForm">通过审核</van-button> <van-button type="info" custom-style="height:88rpx;width:300rpx" bind:click="submitForm">通过审核</van-button>
</submit-layout> </submit-layout>
<submit-layout wx:if="{{form && admin && (form.orderStatus == 4 || form.orderStatus == 42)}}"> <submit-layout wx:if="{{form && admin && (form.orderStatus == 4 || form.orderStatus == 42)}}">
<view class="flex flex-center" style="flex:1;justify-content: flex-start"> <view class="flex flex-center" style="flex:1;justify-content: flex-start">
<text class="text-lg" wx:if="{{form.settleTotalAmount}}">金额:</text> <text class="text-lg" wx:if="{{form.settleTotalAmount}}">金额:</text>
<text class="text-xxl text-price text-red" wx:if="{{form.settleTotalAmount}}">{{form.settleTotalAmount}}</text>
<text class="text-xxl text-price text-red" wx:if="{{form.settleTotalAmount}}">{{formate.formateAmount(form.settleTotalAmount, 2)}}</text>
</view> </view>
<van-button type="info" custom-style="height:88rpx;width:300rpx" bind:click="paymentOrder" wx:if="{{form.orderStatus == 4}}">进行支付</van-button> <van-button type="info" custom-style="height:88rpx;width:300rpx" bind:click="paymentOrder" wx:if="{{form.orderStatus == 4}}">进行支付</van-button>
<van-button type="info" custom-style="height:88rpx;width:300rpx" bind:click="paymentOrder" wx:if="{{form.orderStatus == 42}}">客户结算</van-button> <van-button type="info" custom-style="height:88rpx;width:300rpx" bind:click="paymentOrder" wx:if="{{form.orderStatus == 42}}">客户结算</van-button>

2
pages/process/outside-item/index.wxml

@ -78,7 +78,7 @@
</view> </view>
</van-cell> --> </van-cell> -->
<van-field id="settleUnitPrice" value="{{ item.settleUnitPrice || '' }}" type="digit" placeholder="请输入结算单价" clearable input-align="right" bind:change="bindInput" wx:if="{{status == 1}}"> <van-field id="settleUnitPrice" value="{{ item.settleUnitPrice || '' }}" type="digit" placeholder="请输入结算单价" clearable input-align="right" bind:change="bindInput" wx:if="{{status == 1}}">
<view slot="label" class="flex text-black" style="width:200rpx">
<view slot="label" class="flex text-black" style="width:240rpx">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 12px">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 12px">*</view>
<text>结算单价(元/公斤)</text> <text>结算单价(元/公斤)</text>
</view> </view>

8
pages/process/outside-price/index.wxml

@ -108,8 +108,8 @@
</view> </view>
</van-cell> --> </van-cell> -->
<van-field id="offsiteTareWeight" value="{{ form.offsiteTareWeight || '' }}" type="digit" placeholder="请输入厂外皮重" clearable input-align="right" disabled="{{ form.orderStatus != 0}}" maxlength="8" bind:change="bindInput"> <van-field id="offsiteTareWeight" value="{{ form.offsiteTareWeight || '' }}" type="digit" placeholder="请输入厂外皮重" clearable input-align="right" disabled="{{ form.orderStatus != 0}}" maxlength="8" bind:change="bindInput">
<view slot="label" class="flex text-black" style="width:200rpx">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 12px">*</view>
<view slot="label" class="flex text-black" style="width:240rpx">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 12px" wx:if="{{ form.orderStatus == 0}}">*</view>
<text>厂外皮重(公斤)</text> <text>厂外皮重(公斤)</text>
</view> </view>
</van-field> </van-field>
@ -124,8 +124,8 @@
bindinput="bindInput" disabled="{{ form.orderStatus != 0}}"/> bindinput="bindInput" disabled="{{ form.orderStatus != 0}}"/>
</view> </view>
</van-cell> --> </van-cell> -->
<van-field id="offsiteGrossWeight" value="{{ form.offsiteTareWeight || '' }}" type="digit" placeholder="请输入厂外毛重" clearable input-align="right" disabled="{{ form.orderStatus != 0}}" maxlength="8" bind:change="bindInput">
<view slot="label" class="flex text-black" style="width:200rpx">
<van-field id="offsiteGrossWeight" value="{{ form.offsiteGrossWeight || '' }}" type="digit" placeholder="请输入厂外毛重" clearable input-align="right" disabled="{{ form.orderStatus != 0}}" maxlength="8" bind:change="bindInput">
<view slot="label" class="flex text-black" style="width:240rpx">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 12px" wx:if="{{ form.orderStatus == 0}}">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 12px" wx:if="{{ form.orderStatus == 0}}">*</view>
<text>厂外毛重(公斤)</text> <text>厂外毛重(公斤)</text>
</view> </view>

2
pages/process/payment/index.wxml

@ -69,7 +69,7 @@
<view style="height:16rpx" wx:if="{{orderList}}"></view> <view style="height:16rpx" wx:if="{{orderList}}"></view>
<submit-layout wx:if="{{orderList}}"> <submit-layout wx:if="{{orderList}}">
<van-button type="info" custom-style="height:88rpx;width:686rpx" disabled="{{amount==0}}" bind:click="paymentOrder">{{orderStatus == 42 ? '付款' : '结算'}}
<van-button type="info" custom-style="height:88rpx;width:686rpx" disabled="{{amount==0}}" bind:click="paymentOrder">{{orderStatus == 42 ? '结算' : '付款'}}
</van-button> </van-button>
</submit-layout> </submit-layout>

13
pages/storage/order-info/index.js

@ -1,7 +1,7 @@
// pages/storage/index/index.js // pages/storage/index/index.js
import Scene from '../../index/scene' import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog' import Dialog from '../../../components/dialog/dialog'
import { getOutOrderInfo, auditOutOrder } from "../../../api/saas"
import { getOutOrderInfo, auditOutOrder, printOrder } from "../../../api/saas"
const util = require('../../../utils/util') const util = require('../../../utils/util')
const event = require('../../../utils/event') const event = require('../../../utils/event')
const app = getApp() const app = getApp()
@ -88,8 +88,15 @@ Scene({
}) })
} }
}, },
printOrder: function(){
printOrderInfo: function(){
wx.showLoading({ title: '正在处理', mask: true })
printOrder({id: this.data.id, type: 2 }).then(result => {
wx.hideLoading()
util.showToast('即将打印,请稍后')
}).catch(err => {
wx.hideLoading()
util.showToast(err)
})
}, },
onChange: function({detail}) { onChange: function({detail}) {
this.setData({ activeNames: detail }) this.setData({ activeNames: detail })

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

@ -267,7 +267,7 @@
</submit-layout> </submit-layout>
<view style="border-radius: 50rpx;position:fixed;bottom:160rpx;right:50rpx" wx:if="{{orderInfo.status == 1 || orderInfo.status == 2}}"> <view style="border-radius: 50rpx;position:fixed;bottom:160rpx;right:50rpx" wx:if="{{orderInfo.status == 1 || orderInfo.status == 2}}">
<van-button round type="info" bind:click="printOrder" custom-style="width: 100rpx;height: 100rpx;">
<van-button round type="info" bind:click="printOrderInfo" custom-style="width: 100rpx;height: 100rpx;">
<van-icon name="printer" size="30px"/> <van-icon name="printer" size="30px"/>
</van-button> </van-button>
</view> </view>

Loading…
Cancel
Save