Browse Source

no message

feature/v1.6
xpz2018 4 years ago
parent
commit
305f6f593d
20 changed files with 279 additions and 236 deletions
  1. 5
      components/field/index.js
  2. 2
      pages/agent/appointment/index.js
  3. 23
      pages/agent/appointment/index.wxml
  4. 3
      pages/agent/appointment/index.wxss
  5. 68
      pages/index/config.js
  6. 84
      pages/index/index.js
  7. 4
      pages/index/index.wxml
  8. 97
      pages/login/index.js
  9. 5
      pages/process/index/index.js
  10. 14
      pages/process/outside-add/index.js
  11. 84
      pages/process/outside-add/index.wxml
  12. 10
      pages/process/outside-item/index.js
  13. 1
      pages/process/outside-item/index.json
  14. 52
      pages/process/outside-item/index.wxml
  15. 2
      pages/process/outside-price/index.js
  16. 33
      pages/process/outside-price/index.wxml
  17. 2
      pages/process/payment/index.js
  18. 22
      pages/process/payment/index.wxml
  19. 2
      pages/process/payment/index.wxss
  20. 2
      pages/storage/index/index.js

5
components/field/index.js

@ -33,7 +33,7 @@ VantComponent({
this.emitChange() this.emitChange()
}, },
onFocus(event) { onFocus(event) {
this.focused = true
this.data.focused = true
this.setShowClear() this.setShowClear()
this.$emit('focus', event.detail) this.$emit('focus', event.detail)
}, },
@ -82,7 +82,8 @@ VantComponent({
}) })
}, },
setShowClear() { setShowClear() {
const { clearable, readonly, focused, value } = this.data
const { clearable, readonly, focused } = this.data;
const { value } = this;
this.setData({ showClear: clearable && focused && !!value && !readonly }) this.setData({ showClear: clearable && focused && !!value && !readonly })
}, },
noop() { } noop() { }

2
pages/agent/appointment/index.js

@ -88,7 +88,7 @@ Scene({
}) })
getRelation().then(result => { getRelation().then(result => {
if(util.isEmpty(result.data) || util.isEmpty(result.data.bizUserId)){ if(util.isEmpty(result.data) || util.isEmpty(result.data.bizUserId)){
this.setData({ show: true })
// this.setData({ show: true })
} }
wx.hideLoading() wx.hideLoading()
}).catch(err => { }).catch(err => {

23
pages/agent/appointment/index.wxml

@ -14,8 +14,9 @@
<view class="text-df flex flex-center" style="flex:1">余额提现</view> <view class="text-df flex flex-center" style="flex:1">余额提现</view>
</view> </view>
<view class="margin-top bg-white" style="padding: 24rpx 30rpx;">
<view class="text-sg text-gray">纸品信息</view>
<view class="flex flex-center bg-white margin-top" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">纸品信息</view>
</view> </view>
<view class="cu-list menu no-card sm-border"> <view class="cu-list menu no-card sm-border">
<view class="cu-item text-sg" style="text-align: right;border-top: 2rpx solid #f3f3f3"> <view class="cu-item text-sg" style="text-align: right;border-top: 2rpx solid #f3f3f3">
@ -57,8 +58,9 @@
</view> </view>
</view> </view>
<view class="margin-top bg-white" style="margin-top: 16rpx;padding: 24rpx 30rpx;border-bottom: 2rpx solid #f3f3f3">
<view class="text-sg text-gray">车辆信息</view>
<view class="flex flex-center bg-white" style="margin-top: 16rpx;justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">车辆信息</view>
</view> </view>
<view class="bg-white cu-list grid col-4 no-border" style="padding: 16rpx 24rpx 0rpx 24rpx" wx:if="{{vateList.length}}"> <view class="bg-white cu-list grid col-4 no-border" style="padding: 16rpx 24rpx 0rpx 24rpx" wx:if="{{vateList.length}}">
<view class="cu-item" wx:for="{{vateList}}" wx:key="index" style="padding: 0rpx 8rpx 8rpx 8rpx"> <view class="cu-item" wx:for="{{vateList}}" wx:key="index" style="padding: 0rpx 8rpx 8rpx 8rpx">
@ -81,15 +83,18 @@
</view> </view>
</view> </view>
<view class="margin-top bg-white" style="margin-top: 16rpx;padding: 24rpx 30rpx;border-bottom: 2rpx solid #f3f3f3">
<view class="text-sg text-gray">备注信息</view>
<view class="flex flex-center bg-white" style="margin-top: 16rpx;justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">其他信息</view>
</view> </view>
<view class="bg-white" style="padding-top:24rpx">
<view class="textarea {{form.remark?'text-black':'text-gray'}}" wx:if="{{picking}}">{{form.remark?form.remark:'点击输入备注,最多100字'}}</view>
<textarea wx:else id="remark" maxlength="100" value="{{form.remark}}" class="textarea" cursor-spacing="60" style="padding-top:4rpx"
<view class="bg-white" style="padding:24rpx 30rpx">
<view class="textarea {{ form.remark ? 'text-black' : 'text-gray' }}" style="padding:24rpx" wx:if="{{picking}}">{{form.remark ? form.remark : '点击输入备注,最多100字' }}</view>
<textarea wx:else id="remark" maxlength="100" value="{{form.remark}}" class="textarea" cursor-spacing="60"
show-confirm-bar="{{false}}" bindinput="bindInput" placeholder-style="color:#aaa" placeholder="点击输入备注,最多100字"></textarea> show-confirm-bar="{{false}}" bindinput="bindInput" placeholder-style="color:#aaa" placeholder="点击输入备注,最多100字"></textarea>
</view> </view>
<view style="height:16rpx"></view>
<submit-layout> <submit-layout>
<van-button type="info" loading="{{requesting}}" custom-style="height:88rpx;width:688rpx" bind:click="submitForm">提交订单</van-button> <van-button type="info" loading="{{requesting}}" custom-style="height:88rpx;width:688rpx" bind:click="submitForm">提交订单</van-button>
</submit-layout> </submit-layout>

3
pages/agent/appointment/index.wxss

@ -27,8 +27,9 @@
.textarea{ .textarea{
width:100%; width:100%;
height:80px; height:80px;
padding:0px 30rpx;
padding:12rpx;
font-size: 14px; font-size: 14px;
border: 1rpx solid #f3f3f3;
} }
.bg-blue{ .bg-blue{

68
pages/index/config.js

@ -1,68 +0,0 @@
export default {
pro1Name: '巫医和尚唐有限公司',
pro1: [
{
text: '济州岛打包站',
id: 11,
},
{
text: '福州道打包站',
id: 12,
},
{
text: '钟落潭打包站',
id: 13,
disabled: true,
},
{
text: '义乌',
id: 14,
},{
text: '杭州',
id: 1,
},
{
text: '温州',
id: 2,
},
{
text: '宁波',
id: 3,
disabled: true,
},
{
text: '义乌',
id: 4,
},
],
pro2Name: '江苏',
pro2: [
{
text: '南京',
id: 5,
},
{
text: '无锡',
id: 6,
},
{
text: '徐州',
id: 7,
},
{
text: '苏州',
id: 8,
},
],
pro3Name: '福建',
pro3: [
{
text: '泉州',
id: 9,
},
{
text: '厦门',
id: 10,
},
],
};

84
pages/index/index.js

@ -3,24 +3,8 @@ import Scene from './scene'
import { getMessageList } from "../../api/saas" import { getMessageList } from "../../api/saas"
import { headerFactoryId } from "../../api/user" import { headerFactoryId } from "../../api/user"
const event = require('../../utils/event') const event = require('../../utils/event')
const storage = require('../../utils/storage')
const app = getApp() const app = getApp()
import config from './config';
const items = [
{
text: config.pro1Name,
children: config.pro1,
},
{
text: config.pro2Name,
children: config.pro2,
},
{
text: config.pro3Name,
disabled: true,
children: config.pro3,
},
];
Scene({ Scene({
/** /**
@ -39,21 +23,10 @@ Scene({
tabIndex: 0, tabIndex: 0,
zIndex: 9, zIndex: 9,
setInter: null, setInter: null,
factoryId: '12313K78978KK',
factoryName: '', factoryName: '',
factoryList: [
{id: '12313000KK12K', name: '济州岛打包站'},
{id: '12313K78978KK', name: '福州道打包站'},
{id: '1231345500KKK', name: '钟落潭打包站'},
{id: '12345678978KK', name: '鹤山常服打包站'},
{id: '123sdfsdf00KKK', name: '合剂打包站'},
{id: '1231332K78978K', name: '永宁街打包站'},
{id: '123242K78978KK', name: '河西路打包站'},
{id: '12313378978KK5', name: '成林道打包站'}
],
items,
mainActiveIndex: 0,
activeId: 0,
items: [],
mActiveIndex: 0,
factoryId: '',
visible: false visible: false
}, },
/************************************** 初始化流程 ********************************************/ /************************************** 初始化流程 ********************************************/
@ -64,8 +37,33 @@ Scene({
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate() updateManager.applyUpdate()
}) })
this.data.items = []
for (let mIndex = 0; m < app.userInfo.enterpriseInfos.length; mIndex++) {
const element = app.userInfo.enterpriseInfos[mIndex]
var enterprise = { text: element.enterpriseName }
var children = []
for (let nIndex = 0; n < element.factoryInfos.length; nIndex++) {
const item = element.factoryInfos[nIndex]
if(item.factoryId == app.userInfo.factoryId){
this.data.mActiveIndex = mIndex
}
var factory = { id: item.factoryId }
if(item.applicationStatus == 0 && !element.isAdmin){
factory.text = item.factoryName + '(申请中)'
factory.disabled = true
} else {
factory.text = item.factoryName
}
children.push(factory)
}
enterprise.children = children
this.data.items.push(enterprise)
}
this.setData({ this.setData({
userInfo: app.userInfo, userInfo: app.userInfo,
items: this.data.items,
mActiveIndex: this.data.mActiveIndex,
factoryId: app.userInfo.factoryId,
factoryName: app.userInfo.factoryName, factoryName: app.userInfo.factoryName,
customBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60), customBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60),
fragment: (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight), fragment: (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight),
@ -115,25 +113,23 @@ Scene({
pageView.onClose() pageView.onClose()
} }
}, },
changeFactory: function(e){
var item = this.data.factoryList[e.currentTarget.dataset.index]
onHide: function(){
this.setData({ visible: false })
},
onClickNav({ detail }) {
this.setData({ mActiveIndex: detail.index || 0 });
},
changeFactory({ detail }) {
wx.showLoading({ title: '正在切换', mask: true }) wx.showLoading({ title: '正在切换', mask: true })
headerFactoryId(item.id)
app.userInfo.factoryId = detail.id
storage.put('X-FACTORY-ID' + app.userInfo.userId, detail.id)
headerFactoryId(detail.id)
var pageView = this.selectComponent('#' + this.data.tabList[this.data.tabIndex].value) var pageView = this.selectComponent('#' + this.data.tabList[this.data.tabIndex].value)
if (pageView && this.data.tabIndex != 3) { if (pageView && this.data.tabIndex != 3) {
pageView.fetchStatisticsInfo(true) pageView.fetchStatisticsInfo(true)
} }
event.emit('EventMessage', { what: 999, desc: 'changeFactory' }) event.emit('EventMessage', { what: 999, desc: 'changeFactory' })
this.setData({ visible: false, factoryId: item.id, factoryName: item.name })
},
onHide: function(){
this.setData({ visible: false })
},
onClickNav({ detail }) {
this.setData({ mainActiveIndex: detail.index || 0 });
},
onClickItem({ detail }) {
this.setData({ activeId: detail.id });
this.setData({ visible: false, factoryId: detail.id, factoryName: detail.text })
}, },
onUnload: function(){ onUnload: function(){
event.remove('EventMessage', this) event.remove('EventMessage', this)

4
pages/index/index.wxml

@ -39,8 +39,8 @@
<van-icon slot="right-icon" name="success" size="1.3em" color="#008AFF" wx:if="{{item.id == factoryId}}" /> <van-icon slot="right-icon" name="success" size="1.3em" color="#008AFF" wx:if="{{item.id == factoryId}}" />
</van-cell> </van-cell>
</scroll-view> --> </scroll-view> -->
<van-tree-select items="{{items}}" height="440rpx" flex="{{1.5}}" main-active-index="{{mainActiveIndex}}" active-id="{{activeId}}"
bind:click-item="onClickItem" bind:click-nav="onClickNav"></van-tree-select>
<van-tree-select items="{{items}}" height="440rpx" flex="{{1.5}}" main-active-index="{{mActiveIndex}}" active-id="{{factoryId}}"
bind:click-item="changeFactory" bind:click-nav="onClickNav"></van-tree-select>
</view> </view>
</van-popup> </van-popup>

97
pages/login/index.js

@ -93,6 +93,25 @@ Page({
return false return false
}, },
/************************************** 获取用户信息,进行登录 ********************************************/ /************************************** 获取用户信息,进行登录 ********************************************/
toIndex: function(){
var factoryId = storage.get('X-FACTORY-ID' + app.userInfo.userId)
if(factoryId){
app.userInfo.factoryId = factoryId
} else {
const enterpriseInfo = app.userInfo.enterpriseInfos[app.userInfo.enterpriseInfos.length - 1]
if(enterpriseInfo.factoryInfos && enterpriseInfo.factoryInfos.length){
factoryId = enterpriseInfo.factoryInfos[enterpriseInfo.factoryInfos.length - 1].factoryId
}
}
if(factoryId){
headerFactoryId(app.userInfo.factoryId)
wx.redirectTo({ url: '/pages/index/index' })
} else {
this.setData({ loging: false})
Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站信息,请联系相关客服人员' }).then(() => {
})
}
},
fetchUserInfo: function(authorization){ fetchUserInfo: function(authorization){
config.header = { 'Authorization': 'QNT ' + authorization } config.header = { 'Authorization': 'QNT ' + authorization }
// token 切换流程 // token 切换流程
@ -105,12 +124,7 @@ Page({
app.userInfo = result.data app.userInfo = result.data
app.globalData.token = authorization app.globalData.token = authorization
storage.put('Authorization', app.globalData.token) storage.put('Authorization', app.globalData.token)
if(app.userInfo.factoryId && this.data.metaData){
Dialog.alert({ title: '温馨提示', message: '您已经绑定过工厂了,现在就进入?' }).then(() => {
headerFactoryId(app.userInfo.factoryId)
wx.redirectTo({ url: '/pages/index/index' })
})
} else if(this.data.metaData){
if(this.data.metaData){
// 这里要进行账号的绑定,对工厂进行绑定;或者进行申请操作; // 这里要进行账号的绑定,对工厂进行绑定;或者进行申请操作;
if(this.data.metaData.qrPage == '/page/index/register'){ if(this.data.metaData.qrPage == '/page/index/register'){
this.data.metaData.userName = this.data.metaData.factoryCustomerName || '默认姓名' this.data.metaData.userName = this.data.metaData.factoryCustomerName || '默认姓名'
@ -120,22 +134,77 @@ Page({
} else { } else {
this.setData({ loging: false, metaData: this.data.metaData }) this.setData({ loging: false, metaData: this.data.metaData })
} }
} else if(app.userInfo.factoryId){
this.setData({ loging: false})
if(!result.data.isSaasPerssion){
Dialog.alert({ title: '温馨提示', message: '您的打包站还在授权中,请耐心等待,或者联系相关客服人员' }).then(() => {
} else if(app.userInfo.enterpriseInfos && app.userInfo.enterpriseInfos.length){
var isEnterpriseAdmin = false
for (let index = 0; index < app.userInfo.enterpriseInfos.length; index++) {
if(app.userInfo.enterpriseInfos[index].isEnterpriseAdmin){
isEnterpriseAdmin = true
break
}
}
if(isEnterpriseAdmin){
this.toIndex()
return
}
var applicationStatus = -1
for (let m = 0; m < app.userInfo.enterpriseInfos.length; m++) {
const element = app.userInfo.enterpriseInfos[m]
for (let n = 0; n < element.factoryInfos.length; n++) {
const item = element.factoryInfos[n]
if(applicationStatus == -1){
applicationStatus = item.applicationStatus
}
}
}
if(applicationStatus == -1){
this.setData({ loging: false})
Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站信息,请联系相关客服人员' }).then(() => {
})
return
}
if(applicationStatus == 0){
this.setData({ loging: false})
Dialog.alert({ title: '温馨提示', message: '您的申请还在审核中,如有疑问请联系管理员。' }).then(() => {
}) })
return return
} }
headerFactoryId(app.userInfo.factoryId)
wx.redirectTo({ url: '/pages/index/index' })
this.toIndex()
} else { } else {
this.setData({ loging: false}) this.setData({ loging: false})
Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站,请耐心等待,或者联系相关客服人员,如果有时间也可以进去逛逛?' }).then(() => {
wx.redirectTo({ url: '/pages/index/index' })
Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站信息,请联系相关客服人员' }).then(() => {
}) })
} }
// if(app.userInfo.factoryId && this.data.metaData){
// Dialog.alert({ title: '温馨提示', message: '您已经绑定过工厂了,现在就进入?' }).then(() => {
// headerFactoryId(app.userInfo.factoryId)
// wx.redirectTo({ url: '/pages/index/index' })
// })
// } else if(this.data.metaData){
// // 这里要进行账号的绑定,对工厂进行绑定;或者进行申请操作;
// if(this.data.metaData.qrPage == '/page/index/register'){
// this.data.metaData.userName = this.data.metaData.factoryCustomerName || '默认姓名'
// }
// if(!util.isEmpty(this.data.metaData.factoryCustomerMobile)){
// this.setData({ loging: false, metaData: this.data.metaData, ['form.account']: this.data.metaData.factoryCustomerMobile })
// } else {
// this.setData({ loging: false, metaData: this.data.metaData })
// }
// } else if(app.userInfo.factoryId){
// this.setData({ loging: false})
// if(!result.data.isSaasPerssion){
// Dialog.alert({ title: '温馨提示', message: '您的打包站还在授权中,请耐心等待,或者联系相关客服人员' }).then(() => {
// })
// return
// }
// headerFactoryId(app.userInfo.factoryId)
// wx.redirectTo({ url: '/pages/index/index' })
// } else {
// this.setData({ loging: false})
// Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站信息,请耐心等待,或者联系相关客服人员' }).then(() => {
// })
// }
}).catch(err => { }).catch(err => {
console.log(err)
if(err.code == 400){ if(err.code == 400){
util.showToast('获取用户信息失败,请注册登录') util.showToast('获取用户信息失败,请注册登录')
this.setData({ loging: false, regist: true}) this.setData({ loging: false, regist: true})

5
pages/process/index/index.js

@ -95,11 +95,6 @@ Component({
wx.navigateTo({ url: '/pages/process/agent-list/index' }) wx.navigateTo({ url: '/pages/process/agent-list/index' })
}, },
checkList: function (e) { checkList: function (e) {
if(app.userInfo.applicationStatus == 0){
Dialog.alert({ title: '温馨提示', message: '您的申请还在审核中,如有疑问请联系管理员。' }).then(() => {
})
return
}
if(e.currentTarget.dataset.status == 3){ if(e.currentTarget.dataset.status == 3){
wx.navigateTo({ url: '/pages/process/payment-list/index?status=' + e.currentTarget.dataset.status }) wx.navigateTo({ url: '/pages/process/payment-list/index?status=' + e.currentTarget.dataset.status })
} else if(e.currentTarget.dataset.status == 4){ } else if(e.currentTarget.dataset.status == 4){

14
pages/process/outside-add/index.js

@ -106,11 +106,9 @@ Scene({
}, },
showCategory: function(e){ showCategory: function(e){
if(e.currentTarget.dataset.index >= 0){ if(e.currentTarget.dataset.index >= 0){
this.data.cateIndex = e.currentTarget.dataset.index
this.setData({ visible: true, columns: this.data.column1 })
this.setData({ visible: true, columns: this.data.column1, cateIndex: e.currentTarget.dataset.index })
} else { } else {
this.data.cateIndex = -1
this.setData({ visible: true, columns: this.data.column4 })
this.setData({ visible: true, columns: this.data.column4, cateIndex: -1 })
} }
}, },
onConfirm: function({detail}){ onConfirm: function({detail}){
@ -135,7 +133,7 @@ Scene({
this.setData({ visible: false }) this.setData({ visible: false })
}, },
bindInput: function (e) { bindInput: function (e) {
this.data.form.productCategoryInfos[e.currentTarget.dataset.index].unitPrice = e.detail.value
this.data.form.productCategoryInfos[e.currentTarget.dataset.index].unitPrice = e.detail
}, },
onChange: function({detail}) { onChange: function({detail}) {
this.data.form.equipmentRemark = detail this.data.form.equipmentRemark = detail
@ -186,7 +184,7 @@ Scene({
for (let index = 0; index < this.data.form.productCategoryInfos.length; index++) { for (let index = 0; index < this.data.form.productCategoryInfos.length; index++) {
const element = this.data.form.productCategoryInfos[index] const element = this.data.form.productCategoryInfos[index]
if(util.isEmpty(element.productId)){ if(util.isEmpty(element.productId)){
util.showToast('请选择第' + (index + 1) + '项废纸品类')
util.showToast('请选择第' + (index + 1) + '项品类')
return return
} }
if(!util.isEmpty(this.data.form.scrapPaperReceiptId)){ if(!util.isEmpty(this.data.form.scrapPaperReceiptId)){
@ -197,11 +195,11 @@ Scene({
} }
} }
if(element.highestUnitPrice && Number(element.unitPrice) > Number(element.highestUnitPrice)){ if(element.highestUnitPrice && Number(element.unitPrice) > Number(element.highestUnitPrice)){
util.showToast('第' + (index + 1) + '项废纸品类单价不得高于:' + element.highestUnitPrice + '元/公斤')
util.showToast('第' + (index + 1) + '项品类单价不得高于:' + element.highestUnitPrice + '元/公斤')
return return
} }
if(element.lowestUnitPrice && Number(element.unitPrice) < Number(element.lowestUnitPrice)){ if(element.lowestUnitPrice && Number(element.unitPrice) < Number(element.lowestUnitPrice)){
util.showToast('第' + (index + 1) + '项废纸品类单价不得低于:' + element.lowestUnitPrice + '元/公斤')
util.showToast('第' + (index + 1) + '项品类单价不得低于:' + element.lowestUnitPrice + '元/公斤')
return return
} }
} }

84
pages/process/outside-add/index.wxml

@ -3,7 +3,10 @@
<view slot="content">{{form.scrapPaperReceiptId ? '修改订单' : '新增厂外收货'}}</view> <view slot="content">{{form.scrapPaperReceiptId ? '修改订单' : '新增厂外收货'}}</view>
</cu-custom> </cu-custom>
<van-index-anchor index="订单信息" />
<view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">订单信息</view>
</view>
<van-cell clickable center is-link bind:click="chooseCustomer"> <van-cell clickable center is-link bind:click="chooseCustomer">
<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">
@ -13,7 +16,7 @@
<view class="{{form.factoryCustomerName ? 'text-black' : 'text-gray'}}">{{form.factoryCustomerName || '请选择客户'}}</view> <view class="{{form.factoryCustomerName ? 'text-black' : 'text-gray'}}">{{form.factoryCustomerName || '请选择客户'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell clickable center is-link bind:click="showPlate">
<van-cell clickable center is-link bind:click="showPlate" arrow-direction="down">
<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>
@ -31,58 +34,55 @@
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view> <view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-index-anchor index="纸品信息" />
<scroll-view class="bg-white" scroll-y>
<view wx:for="{{form.productCategoryInfos}}" wx:key="index" class="cate-list">
<view class="flex flex-justify cate-header">
<view class="flex flex-center">
<text class="text-black text-lg">品类</text>
<text class="cate-index text-black">{{index + 1}}</text>
</view>
<van-icon name="close" size="44rpx" wx:if="{{form.productCategoryInfos.length>1}}" data-index="{{index}}" bind:click="deleteCate"/>
</view>
<van-cell clickable center is-link data-index="{{index}}" bind:click="showCategory">
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
<text>废纸品类</text>
</view>
<view class="{{item.productCategoryName ? 'text-black' : 'text-gray'}}">{{item.productCategoryName || '请选择废纸品类'}}</view>
</view>
</van-cell>
<van-cell border="{{false}}">
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
<text>单价(元/公斤)</text>
</view>
<input data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入单价" value="{{item.unitPrice || ''}}" bindinput="bindInput" />
</view>
</van-cell>
</view>
<view class="flex flex-center" style="height:70rpx;margin-bottom:15rpx;margin-top:-12rpx;" bindtap="addCate">
<!-- <text class="cuIcon-add text-blue text-bold" style="font-size:42rpx"></text> -->
<van-icon name="plus" color="#008AFF"/>
<text class="text-blue text-sg">添加品类</text>
</view>
</scroll-view>
<van-index-anchor index="其他信息" />
<van-cell id="operatorName" clickable center is-link bind:click="chooseEmploy"> <van-cell id="operatorName" clickable center is-link bind:click="chooseEmploy">
<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="{{form.operatorName ? 'text-black' : 'text-gray'}}">{{form.operatorName || '请选择操作员'}}</view> <view class="{{form.operatorName ? 'text-black' : 'text-gray'}}">{{form.operatorName || '请选择操作员'}}</view>
</view> </view>
</van-cell> </van-cell>
<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="text-black">预计到厂时间</view> <view class="text-black">预计到厂时间</view>
<view class="{{form.predictDeliveryToFactoryTime ? 'text-black' : 'text-gray'}}">{{form.predictDeliveryToFactoryTime || '请选择预计到厂时间'}}</view> <view class="{{form.predictDeliveryToFactoryTime ? 'text-black' : 'text-gray'}}">{{form.predictDeliveryToFactoryTime || '请选择预计到厂时间'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-field label="辅助设备" type="textarea" value="{{ form.equipmentRemark }}" input-align="right" bind:change="onChange" placeholder="请输入辅助设备" autosize border="{{ false }}" />
<van-field label="辅助设备" value="{{ form.equipmentRemark }}" input-align="right" clearable bind:change="onChange" placeholder="请输入辅助设备" border="{{ false }}" />
<view style="height:16rpx"></view>
<!-- <van-index-anchor index="纸品信息" /> -->
<view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">纸品信息</view>
</view>
<scroll-view scroll-y>
<view wx:for="{{form.productCategoryInfos}}" wx:key="index">
<view style="height:16rpx" wx:if="{{index > 0}}"></view>
<van-cell clickable center is-link data-index="{{index}}" arrow-direction="down" bind:click="showCategory">
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
<text style="margin-right: 12rpx;">品类{{index + 1}}</text>
<view class="flex flex-center" data-index="{{index}}" catchtap="deleteCate" wx:if="{{form.productCategoryInfos.length>1}}">
<van-icon name="close" size="36rpx" color="#999999"/>
</view>
</view>
<view class="{{item.productCategoryName ? 'text-black' : 'text-gray'}}">{{item.productCategoryName || '请选择品类'}}</view>
</view>
</van-cell>
<van-field data-index="{{index}}" value="{{ item.unitPrice || '' }}" type="digit" placeholder="请输入单价" clearable border="{{ false }}" input-align="right" 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>
<text>单价(元/公斤)</text>
</view>
</van-field>
</view>
<view class="flex flex-center bg-white" style="height:90rpx;margin-top:16rpx;" bindtap="addCate">
<!-- <text class="cuIcon-add text-blue text-bold" style="font-size:42rpx"></text> -->
<van-icon name="add-o" color="#008AFF" size="36rpx"/>
<text class="text-blue text-sg" style="margin-left:8rpx">添加品类</text>
</view>
</scroll-view>
<view style="height:16rpx"></view>
<submit-layout wx:if="{{form.scrapPaperReceiptId}}"> <submit-layout wx:if="{{form.scrapPaperReceiptId}}">
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="cancelOrder">取消订单</van-button> <van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="cancelOrder">取消订单</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm">提交订单</van-button> <van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm">提交订单</van-button>

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

@ -41,7 +41,7 @@ Component({
} }
}, },
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 == 'grossWeight' || e.currentTarget.id == 'tareWeight'){ if(e.currentTarget.id == 'grossWeight' || e.currentTarget.id == 'tareWeight'){
if(Number(this.data.item.grossWeight) > 0){ if(Number(this.data.item.grossWeight) > 0){
if(Number(this.data.item.tareWeight) > 0){ if(Number(this.data.item.tareWeight) > 0){
@ -59,19 +59,19 @@ Component({
this.setData({['item.netWeight']: null, ['item.estimatedAmount']: null}) this.setData({['item.netWeight']: null, ['item.estimatedAmount']: null})
} }
} else if(e.currentTarget.id == 'deductPercent'){ } else 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-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-uploader": "/components/uploader/index" "van-uploader": "/components/uploader/index"
} }

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

@ -12,7 +12,7 @@
<view class="{{item.unitPrice ? 'text-black' : 'text-gray'}}">{{item.unitPrice || '请输入单价'}}</view> <view class="{{item.unitPrice ? 'text-black' : 'text-gray'}}">{{item.unitPrice || '请输入单价'}}</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" wx:if="{{status == 0}}">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 8px" wx:if="{{status == 0}}">*</view>
@ -21,8 +21,14 @@
<input id="grossWeight" type="digit" placeholder-style="color:#aaa" style="text-align: right" <input id="grossWeight" type="digit" placeholder-style="color:#aaa" style="text-align: right"
maxlength="8" placeholder="请输入毛重" disabled="{{status != 0}}" value="{{item.grossWeight || ''}}" bindinput="bindInput" /> maxlength="8" placeholder="请输入毛重" disabled="{{status != 0}}" value="{{item.grossWeight || ''}}" bindinput="bindInput" />
</view> </view>
</van-cell>
<van-cell>
</van-cell> -->
<van-field id="grossWeight" value="{{ item.grossWeight || '' }}" type="digit" placeholder="请输入毛重" clearable disabled="{{status != 0}}" input-align="right" 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" wx:if="{{status == 0}}">*</view>
<text>毛重(公斤)</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"> <view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px" wx:if="{{status == 0}}">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 8px" wx:if="{{status == 0}}">*</view>
@ -31,7 +37,13 @@
<input id="tareWeight" type="digit" placeholder-style="color:#aaa" style="text-align: right" <input id="tareWeight" type="digit" placeholder-style="color:#aaa" style="text-align: right"
maxlength="8" placeholder="请输入皮重" disabled="{{status != 0}}" value="{{item.tareWeight || ''}}" bindinput="bindInput" /> maxlength="8" placeholder="请输入皮重" disabled="{{status != 0}}" value="{{item.tareWeight || ''}}" bindinput="bindInput" />
</view> </view>
</van-cell>
</van-cell> -->
<van-field id="tareWeight" value="{{ item.tareWeight || '' }}" type="digit" placeholder="请输入皮重" clearable disabled="{{status != 0}}" input-align="right" 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" wx:if="{{status == 0}}">*</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>
@ -55,17 +67,23 @@
<van-uploader file-list="{{ fileList }}" multiple max-count="6" deletable="{{status == 0}}" show-upload="{{status == 0}}" <van-uploader file-list="{{ fileList }}" multiple max-count="6" deletable="{{status == 0}}" show-upload="{{status == 0}}"
max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" /> max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" />
</view> </view>
<van-cell wx:if="{{status == 1}}">
<!-- <van-cell wx:if="{{status == 1}}">
<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>
<text>结算单价(元/公斤)</text> <text>结算单价(元/公斤)</text>
</view> </view>
<input id="settleUnitPrice" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right"
<input id="settleUnitPrice" 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 wx:if="{{status == 1}}">
</van-cell> -->
<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 class="text-red text-xl" style="line-height: 10px; padding-top: 12px">*</view>
<text>结算单价(元/公斤)</text>
</view>
</van-field>
<!-- <van-cell wx:if="{{status == 1}}">
<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>
@ -75,8 +93,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 wx:if="{{status == 1}}">
</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" wx:if="{{status == 1}}">
<view slot="label" class="flex flex-center text-black" 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 wx:if="{{status == 1}}">
<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>
@ -86,7 +110,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" 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 wx:if="{{status == 1}}"> <van-cell wx:if="{{status == 1}}">
<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-price/index.js

@ -70,7 +70,7 @@ Scene({
} }
}, },
bindInput: function (e) { bindInput: function (e) {
this.data.param[e.currentTarget.id] = e.detail.value
this.data.param[e.currentTarget.id] = e.detail
}, },
cancelForm: function(e){ cancelForm: function(e){
Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => { Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => {

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

@ -22,7 +22,10 @@
</view> </view>
<view class="text-white" style="padding: 12rpx 0rpx 12rpx 12rpx" bindtap="repeatForm">重新定价</view> <view class="text-white" style="padding: 12rpx 0rpx 12rpx 12rpx" bindtap="repeatForm">重新定价</view>
</view> </view>
<!-- <van-index-anchor index="订单信息" /> -->
<view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">订单信息</view>
</view>
<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>
@ -56,8 +59,11 @@
</van-cell> </van-cell>
<van-field label="辅助设备" type="textarea" value="{{ form.equipmentRemark }}" disabled input-align="right" placeholder="暂无" autosize <van-field label="辅助设备" type="textarea" value="{{ form.equipmentRemark }}" disabled input-align="right" placeholder="暂无" autosize
border="{{ false }}" /> border="{{ false }}" />
<van-index-anchor index="纸品信息" />
<view style="height:16rpx"></view>
<view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">纸品信息</view>
</view>
<view wx:for="{{form.productCategoryInfos}}" wx:key="index"> <view wx:for="{{form.productCategoryInfos}}" wx:key="index">
<outside-item item="{{item}}" index="{{index}}" status="{{form.orderStatus}}" bind:change="onProductChange"></outside-item> <outside-item item="{{item}}" index="{{index}}" status="{{form.orderStatus}}" bind:change="onProductChange"></outside-item>
</view> </view>
@ -86,7 +92,7 @@
<view class="{{form.estimatedAmount ? 'text-black' : 'text-gray'}}">{{form.estimatedAmount || '- -'}}</view> <view class="{{form.estimatedAmount ? 'text-black' : 'text-gray'}}">{{form.estimatedAmount || '- -'}}</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" wx:if="{{ form.orderStatus == 0}}">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 8px" wx:if="{{ form.orderStatus == 0}}">*</view>
@ -96,8 +102,14 @@
style="text-align: right" maxlength="8" placeholder="请输入厂外皮重" value="{{form.offsiteTareWeight || ''}}" style="text-align: right" maxlength="8" placeholder="请输入厂外皮重" value="{{form.offsiteTareWeight || ''}}"
bindinput="bindInput" disabled="{{ form.orderStatus != 0}}" /> bindinput="bindInput" disabled="{{ form.orderStatus != 0}}" />
</view> </view>
</van-cell>
<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">
<view slot="label" class="flex text-black" style="width:200rpx">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 12px">*</view>
<text>厂外皮重(公斤)</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"> <view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px" wx:if="{{ form.orderStatus == 0}}">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 8px" wx:if="{{ form.orderStatus == 0}}">*</view>
@ -107,8 +119,15 @@
style="text-align: right" maxlength="8" placeholder="请输入厂外毛重" value="{{form.offsiteGrossWeight || ''}}" style="text-align: right" maxlength="8" placeholder="请输入厂外毛重" value="{{form.offsiteGrossWeight || ''}}"
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">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 12px" wx:if="{{ form.orderStatus == 0}}">*</view>
<text>厂外毛重(公斤)</text>
</view>
</van-field>
</view> </view>
<submit-layout wx:if="{{admin && form && form.orderStatus == 0}}"> <submit-layout wx:if="{{admin && form && form.orderStatus == 0}}">
<van-button plain type="default" custom-style="height:88rpx;width:186rpx" bind:click="cancelForm">取消订单</van-button> <van-button plain type="default" custom-style="height:88rpx;width:186rpx" bind:click="cancelForm">取消订单</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:218rpx" bind:click="saveForm">保存订单</van-button> <van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:218rpx" bind:click="saveForm">保存订单</van-button>

2
pages/process/payment/index.js

@ -161,7 +161,7 @@ Scene({
} }
wx.showLoading({ title: '正在处理', mask: true }) wx.showLoading({ title: '正在处理', mask: true })
this.data.requesting = true this.data.requesting = true
this.data.params.settleType = settleType
this.data.params.settleType = Number(settleType)
paymentOrder(this.data.params).then(result => { paymentOrder(this.data.params).then(result => {
wx.hideLoading() wx.hideLoading()
if(!util.isEmpty(result.message)){ if(!util.isEmpty(result.message)){

22
pages/process/payment/index.wxml

@ -11,7 +11,7 @@
<view class="bg-white" style="border-radius: 20rpx 20rpx 0rpx 0rpx;padding: 32rpx 0rpx;margin-top:-90rpx" wx:if="{{orderList}}"> <view class="bg-white" style="border-radius: 20rpx 20rpx 0rpx 0rpx;padding: 32rpx 0rpx;margin-top:-90rpx" wx:if="{{orderList}}">
<view class="flex flex-center" style="justify-content: flex-start;padding: 0rpx 32rpx"> <view class="flex flex-center" style="justify-content: flex-start;padding: 0rpx 32rpx">
<view style="height:24rpx;width:6rpx;background:#007AFF"></view>
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">付款方式</view> <view class="text-black text-sg text-bold" style="margin-left: 12rpx">付款方式</view>
</view> </view>
<view style="min-height:90rpx;padding-right:32rpx"> <view style="min-height:90rpx;padding-right:32rpx">
@ -27,26 +27,24 @@
</text> </text>
<van-radio slot="right-icon" name="2" disabled="{{!params.bankCardNo}}" /> <van-radio slot="right-icon" name="2" disabled="{{!params.bankCardNo}}" />
</van-cell> </van-cell>
<!-- <van-cell title="使用千鸟代付" clickable data-name="3" bind:click="onTypeClick" wx:if="{{orderStatus == 4}}">
<van-cell title="使用千鸟代付" clickable data-name="3" bind:click="onTypeClick" wx:if="{{orderStatus == 4}}">
<van-radio slot="right-icon" name="3" /> <van-radio slot="right-icon" name="3" />
</van-cell> -->
</van-cell>
</van-cell-group> </van-cell-group>
</van-radio-group> </van-radio-group>
</view> </view>
<view class="flex flex-center" style="justify-content: flex-start;margin-top:16rpx;padding: 0rpx 32rpx">
<view style="height:24rpx;width:6rpx;background:#007AFF"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">付款备注</view>
<view class="flex flex-center" style="justify-content: flex-start;padding: 24rpx 32rpx">
<view class="text-black text-sg">付款备注</view>
</view> </view>
<view style="min-height:90rpx;padding: 0rpx 32rpx"> <view style="min-height:90rpx;padding: 0rpx 32rpx">
<input id="payRemark" placeholder-style="color:#aaa" style="width:100%;height:90rpx" placeholder="请输入付款备注" bindinput="bindInput" />
<view style="height:1rpx;background:#eee"></view>
<textarea id="payRemark" placeholder-style="color:#aaa" style="width:100%;height:180rpx;padding:12rpx;border:1rpx solid #f3f3f3" placeholder="请输入付款备注" bindinput="bindInput" />
</view> </view>
</view> </view>
<view class="flex flex-justify bg-white lable" wx:if="{{orderList}}"> <view class="flex flex-justify bg-white lable" wx:if="{{orderList}}">
<view class="flex flex-center"> <view class="flex flex-center">
<text style="height:24rpx;width:6rpx;background:#007AFF"></text>
<text class="text-black text-sg text-bold" style="margin-left: 12rpx">订单列表</text>
<text style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></text>
<text class="text-black text-sg text-bold" style="margin-left: 12rpx">订单信息</text>
<text class="text-gray text-sm" style="margin-left:12rpx">(共{{orderList.length}}笔订单)</text> <text class="text-gray text-sm" style="margin-left:12rpx">(共{{orderList.length}}笔订单)</text>
</view> </view>
<text class="text-gray text-sm">点击订单项可以查看详情</text> <text class="text-gray text-sm">点击订单项可以查看详情</text>
@ -70,9 +68,7 @@
</van-cell> </van-cell>
<submit-layout wx:if="{{orderList}}"> <submit-layout wx:if="{{orderList}}">
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" disabled="{{amount==0}}" bind:click="agentPayment" wx:if="{{orderStatus == 4}}">使用千鸟代付</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" disabled="{{amount==0}}" bind:click="paymentOrder" wx:if="{{orderStatus == 4}}">直接付款</van-button>
<van-button type="info" custom-style="height:88rpx;width:686rpx" disabled="{{amount==0}}" bind:click="paymentOrder" wx:if="{{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>

2
pages/process/payment/index.wxss

@ -12,7 +12,7 @@
.lable { .lable {
padding: 32rpx 32rpx 24rpx 32rpx; padding: 32rpx 32rpx 24rpx 32rpx;
margin-top: 18rpx; margin-top: 18rpx;
border-bottom: 1rpx solid #eee
border-bottom: 1rpx solid #f3f3f3
} }
.van-dialog { .van-dialog {

2
pages/storage/index/index.js

@ -67,7 +67,7 @@ Component({
this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, tabList2 }) this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, tabList2 })
} }
} }
this.fetchStatisticsInfo(this.data.vdate)
this.fetchStatisticsInfo()
this.data.firstShow = true this.data.firstShow = true
}, },
onEvent: function (message) { onEvent: function (message) {

Loading…
Cancel
Save