Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
3d4706483f
3 changed files with 9 additions and 12 deletions
  1. 11
      pages/agent/edit/index.js
  2. 9
      pages/agent/edit/index.wxml
  3. 1
      pages/agent/edit/index.wxss

11
pages/agent/edit/index.js

@ -1,4 +1,3 @@
// pages/order/create/index.js
import { getVehicleList, getFactoryPriceDetail, getRelation, postRelation, getProxyOrderInfo, createProxyOrder } from "../../../api/ztb"
const util = require('../../../utils/util')
const math = require('../../../utils/math')
@ -15,7 +14,7 @@ Page({
form: {
paperCategoryId: '',
unitPrice: '',
totalEstimatedWeight:'30'
totalEstimatedWeight: '30'
},
timeList: [],
cateName: '',
@ -288,6 +287,14 @@ Page({
this.setData({ vehicleList: this.data.vehicleList })
},
submitForm: function (e) {
if (util.isEmpty(this.data.form.paperCategoryId)) {
util.showToast('请选择一个品类')
return
}
if (util.isEmpty(this.data.form.unitPrice) || Number(this.data.form.unitPrice) <= 0) {
util.showToast('请选择一个品类')
return
}
if (util.isEmpty(this.data.form.totalEstimatedWeight)) {
util.showToast('请输入预估重量')
return

9
pages/agent/edit/index.wxml

@ -1,4 +1,3 @@
<!--pages/agent/edit/index.wxml-->
<wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content" class="text-cut" style="color:black;font-size:36rpx">{{factoryDetail.name || '纸厂卖货'}}</view>
@ -18,11 +17,6 @@
<view class="text-sg text-gray">纸品信息</view>
</view>
<view class="cu-list menu no-card sm-border">
<!-- <view class="cu-item text-sg" style="text-align: right">
<view class="title">客户名称:</view>
<input id="customerName" placeholder-style="color:#aaa" placeholder="请输入客户名称" value="{{form.customerName}}"
bindinput="bindInput" style="flex: 1"></input>
</view> -->
<view id="cateName" class="cu-item" style="border-top: 2rpx solid #f3f3f3" bindtap="showPicker">
<view class="flex flex-justify content cu-item arrow">
<view class="text-sg" style="min-width:170rpx">纸品品类:</view>
@ -80,8 +74,6 @@
<text class="text-black text-sg">货车车牌{{index + 1}}:</text>
<view class="text-sg flex flex-center {{item.plateNumber?'text-black':'input-grey'}}" style="flex: 1;height:64rpx;justify-content: flex-start"
data-index="{{index}}" bindtap="showKeyboard">{{item.plateNumber||'点击输入车牌号码'}}</view>
<!-- <input id="plateNumber" data-index="{{index}}" maxlength="8" placeholder-style="color:#aaa;" disabled="{{true}}"
value="{{item.plateNumber||''}}" placeholder="点击输入车牌号码" bindinput="bindList" style="margin-right:16rpx;flex:1" /> -->
<text class="cuIcon-close text-gray" style="font-size:44rpx;" data-index="{{index}}" wx:if="{{vehicleList.length > 1}}" bindtap="deleteCate"></text>
</view>
<view class="flex flex-center" style="height:90rpx;line-height:90rpx" bindtap="addCate">
@ -100,7 +92,6 @@
show-confirm-bar="{{false}}" bindinput="bindInput" placeholder-style="color:#aaa" placeholder="点击输入备注,最多100字"></textarea>
</view>
<view style="height:{{136 + safeBottom}}rpx;"></view>
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding: 32rpx 32rpx {{safeBottom + 32}}rpx 32rpx;">
<view style="width:100%">

1
pages/agent/edit/index.wxss

@ -1,4 +1,3 @@
/* pages/agent/edit/index.wxss */
.margin-top {
margin-top: 18rpx;
}

Loading…
Cancel
Save