Browse Source

no message

feature/v1.5
xpz2018 4 years ago
parent
commit
a6c0e5123e
4 changed files with 11 additions and 148 deletions
  1. 7
      pages/process/order-info/index.js
  2. 26
      pages/process/payment/index.js
  3. 1
      pages/process/payment/index.json
  4. 125
      pages/process/payment/index.wxml

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

@ -79,6 +79,13 @@ Scene({
this.setData({ ['form.checking']: !this.data.form.checking }) this.setData({ ['form.checking']: !this.data.form.checking })
}, },
paymentOrder: function(){ paymentOrder: function(){
let pages = getCurrentPages() //当前页面栈
for (let index = 0; index < pages.length; index++) {
if (pages[index].route.indexOf('pages/process/payment/index') >= 0) {
wx.navigateBack()
return
}
}
const that = this const that = this
wx.navigateTo({ wx.navigateTo({
url: `/pages/process/payment/index?channel=1`, url: `/pages/process/payment/index?channel=1`,

26
pages/process/payment/index.js

@ -1,7 +1,7 @@
// pages/process/payment/index.js // pages/process/payment/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 { getPeymentList, paymentOrder, getFactoryOrderInfo, getSideOrderInfo, getCustomerInfo } from "../../../api/saas"
import { getPeymentList, paymentOrder, getSideOrderInfo, getCustomerInfo } from "../../../api/saas"
const event = require('../../../utils/event') const event = require('../../../utils/event')
const util = require('../../../utils/util') const util = require('../../../utils/util')
const math = require('../../../utils/math') //导入模块 const math = require('../../../utils/math') //导入模块
@ -29,10 +29,7 @@ Scene({
payRemark: '' payRemark: ''
}, },
settleType: '1', settleType: '1',
requesting: false,
popup: false,
show: false,
detail: null
requesting: false
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
@ -64,10 +61,6 @@ Scene({
var productName = '' var productName = ''
for (let index = 0; index < result.data.productCategoryInfos.length; index++) { for (let index = 0; index < result.data.productCategoryInfos.length; index++) {
const element = result.data.productCategoryInfos[index] const element = result.data.productCategoryInfos[index]
// element.fileList = []
// for (let k = 0; k < element.weightNoteImages.length; k++) {
// element.fileList.push({url: element.weightNoteImages[k]})
// }
if(util.isEmpty(productName)){ if(util.isEmpty(productName)){
productName = element.productCategoryName productName = element.productCategoryName
} else { } else {
@ -155,16 +148,9 @@ Scene({
var item = this.data.orderList[e.currentTarget.dataset.index] var item = this.data.orderList[e.currentTarget.dataset.index]
if(!util.isEmpty(item.scrapPaperReceiptId)){ if(!util.isEmpty(item.scrapPaperReceiptId)){
wx.navigateTo({ url: `/pages/process/outside-info/index?id=${item.scrapPaperReceiptId}` }) wx.navigateTo({ url: `/pages/process/outside-info/index?id=${item.scrapPaperReceiptId}` })
return
} else {
wx.navigateTo({ url: `/pages/process/order-info/index?id=${item.id}` })
} }
wx.showLoading({ title: '正在获取', mask: true })
getFactoryOrderInfo(item.id).then(result => {
this.setData({ popup: true, detail: result.data })
wx.hideLoading()
}).catch(err => {
wx.hideLoading()
util.showToast(err)
})
}, },
bindInput: function (e) { bindInput: function (e) {
this.data.params[e.target.id] = e.detail.value this.data.params[e.target.id] = e.detail.value
@ -189,7 +175,6 @@ Scene({
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
this.data.requesting = false this.data.requesting = false
console.log(err)
if(err.indexOf('用户未实名') >= 0){ if(err.indexOf('用户未实名') >= 0){
Dialog.confirm({ title: '温馨提示', message: '您还没有实名认证,无法使用千鸟代付,现在去实名认证?' }).then(() => { Dialog.confirm({ title: '温馨提示', message: '您还没有实名认证,无法使用千鸟代付,现在去实名认证?' }).then(() => {
wx.navigateTo({ url: '/pages/setting/authory/index' }) wx.navigateTo({ url: '/pages/setting/authory/index' })
@ -224,9 +209,6 @@ Scene({
}).catch(err => { }).catch(err => {
}) })
}, },
onPopupClose: function(){
this.setData({ popup: false, show: false})
},
viewImage: function (e) { viewImage: function (e) {
var imgList = [] var imgList = []
if(e.currentTarget.dataset.type == 0){ if(e.currentTarget.dataset.type == 0){

1
pages/process/payment/index.json

@ -6,7 +6,6 @@
"van-radio": "/components/radio/index", "van-radio": "/components/radio/index",
"van-radio-group": "/components/radio-group/index", "van-radio-group": "/components/radio-group/index",
"van-image": "/components/image/index", "van-image": "/components/image/index",
"van-popup": "/components/popup/index",
"van-dialog": "/components/dialog/index", "van-dialog": "/components/dialog/index",
"submit-layout": "/components/submit-layout/index", "submit-layout": "/components/submit-layout/index",
"notification": "/pages/message/notification/index" "notification": "/pages/message/notification/index"

125
pages/process/payment/index.wxml

@ -76,131 +76,6 @@
</van-button> </van-button>
</submit-layout> </submit-layout>
<van-popup show="{{ popup }}" closeable position="bottom" z-index="66" custom-style="height: {{height * 0.85}}rpx" bind:close="onPopupClose">
<view class="text-sg text-bold" style="padding:30rpx;border-bottom: 2rpx solid #f3f3f3;height:100rpx">
<text>订单详情</text>
<text>({{detail.id}})</text>
</view>
<scroll-view scroll-y style="height: {{height * 0.85 - 100}}rpx;" wx:if="{{detail}}">
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">客户姓名</view>
<view class="text-gray">{{detail.factoryCustomerName}}</view>
</view>
</van-cell>
<van-cell wx:if="{{detail.plateNumber}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">车牌号码</view>
<view class="text-gray">{{detail.plateNumber || '- -'}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">废纸品类</view>
<view class="text-gray">{{detail.productName}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">毛重(公斤)</view>
<view class="text-gray">{{detail.totalWeight}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">皮重(公斤)</view>
<view class="text-gray">{{detail.emptyWeight || '- -'}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">净重(公斤)</view>
<view class="text-gray">{{detail.netWeight || '- -'}}</view>
</view>
</van-cell>
<van-cell wx:if="{{detail.deductWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">扣重(公斤)</view>
<view class="text-gray">-{{detail.deductWeight}}</view>
</view>
</van-cell>
<van-cell wx:if="{{detail.deductPercent}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">扣点(%)</view>
<view class="text-gray">{{detail.deductPercent}}</view>
</view>
</van-cell>
<van-cell wx:if="{{detail.inspectorName}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">定价员</view>
<view class="text-gray">{{detail.inspectorName || '- -'}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">定价时间</view>
<view class="text-gray">{{detail.inspectionTime || ''}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="text-black">
<view>过毛重照片</view>
<view class="flex" style="margin-top:18rpx">
<van-image wx:for="{{detail.totalWeighingPicture}}" wx:key="index" use-loading-slot width="330rpx" height="240rpx"
custom-class="page-icon" data-url="{{item.url}}" fit="cover" data-type="0" src="{{item.url}}" bind:click="viewImage">
<view class="image-load" slot="loading">
<van-loading type="spinner" size="32" />
</view>
</van-image>
</view>
</view>
</van-cell>
<van-cell wx:if="{{detail.emptyWeighingPicture && detail.emptyWeighingPicture.length}}">
<view slot="title" class="text-black">
<view>过皮重照片</view>
<view class="flex" style="margin-top:18rpx">
<van-image wx:for="{{detail.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="330rpx" height="240rpx"
custom-class="page-icon" data-url="{{item.url}}" fit="cover" data-type="1" src="{{item.url}}" bind:click="viewImage">
<view class="image-load" slot="loading">
<van-loading type="spinner" size="32" />
</view>
</van-image>
</view>
</view>
</van-cell>
<van-cell wx:if="{{detail.inspectionRemark}}">
<view slot="title" class="text-black">
<view>备注</view>
<view class="flex" style="margin-top:18rpx;border: 2rpx solid #f3f3f3;padding: 18rpx;">{{detail.inspectionRemark}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">单价(元/公斤)</view>
<view class="text-gray">{{formate.formateAmount(detail.settleUnitPrice)}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">结算金额(元)</view>
<view class="text-gray">{{formate.formateAmount(detail.settlePrice) || '- -'}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">下单时间</view>
<view class="text-gray">{{detail.createTime || ''}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">订单编号</view>
<view class="text-gray">{{detail.id}}</view>
</view>
</van-cell>
</scroll-view>
</van-popup>
<!-- <van-popup show="{{ show }}" z-index="66" custom-class="van-dialog" bind:close="onPopupClose"> <!-- <van-popup show="{{ show }}" z-index="66" custom-class="van-dialog" bind:close="onPopupClose">
<view class="van-dialog__message" style="padding: 24px 0px 0px 0px"> <view class="van-dialog__message" style="padding: 24px 0px 0px 0px">

Loading…
Cancel
Save