Browse Source

css

feature/v2.1
xpz2018 4 years ago
parent
commit
60c459cd4c
9 changed files with 61 additions and 55 deletions
  1. 28
      pages/process/check-list/index.wxml
  2. 4
      pages/process/order-check/index.js
  3. 30
      pages/process/order-list/index.wxml
  4. 4
      pages/process/order-price/index.js
  5. 4
      pages/process/outside-check-item/index.js
  6. 13
      pages/process/outside-check/index.js
  7. 9
      pages/process/outside-check/index.wxml
  8. 4
      pages/process/outside-item/index.js
  9. 20
      pages/process/outside-list/index.wxml

28
pages/process/check-list/index.wxml

@ -26,7 +26,7 @@
<text wx:if="{{item.status != 1 && item.factoryCustomerMobile}}">-{{item.factoryCustomerMobile}}</text>
</view>
</view>
<view class="text-df" wx:if="{{item.status == 1}}">定价</view>
<view class="text-df" wx:if="{{item.status == 1}}">定价</view>
<view class="text-df" wx:elif="{{item.status == 2}}">待过皮重</view>
<view class="text-df" style="color:#FF5368" wx:elif="{{item.status == 3}}">待审核</view>
<view class="text-df" style="color:#FA541C" wx:elif="{{item.status == 4}}">待付款</view>
@ -36,24 +36,24 @@
<view class="text-df text-gray" wx:elif="{{item.status == 6}}">已关闭</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.productName}}">
<view class="text-sm text-black">品类:</view>
<view class="text-sm text-black" style="margin-left:80rpx">品类:</view>
<view class="text-sm text-black">{{item.productName}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.totalWeight}}">
<view class="text-sm text-black">毛重(公斤):</view>
<view class="text-sm text-black">{{item.totalWeight}}</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">毛重(公斤):</view>
<view class="text-sm text-black">{{item.totalWeight || '- -'}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.settleWeight}}">
<view class="text-sm text-black">结算重量(公斤):</view>
<view class="text-sm text-black">{{item.settleWeight}}</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">结算重量(公斤):</view>
<view class="text-sm text-black">{{item.settleWeight || '- -'}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.unitPrice}}">
<view class="text-sm text-black">单价(元/公斤):</view>
<view class="text-sm text-black">{{item.unitPrice}}</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">单价(元/公斤):</view>
<view class="text-sm text-black">{{item.unitPrice || '- -'}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.settlePrice}}">
<view class="text-sm text-black">结算金额(元):</view>
<view class="text-sm text-black">{{item.settlePrice}}</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">结算金额(元):</view>
<view class="text-sm text-black">{{item.settlePrice || '- -'}}</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}}"

4
pages/process/order-check/index.js

@ -75,14 +75,14 @@ Scene({
bindInput: function (e) {
this.data.form[e.target.id] = e.detail
if(e.target.id == 'deductPercent'){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
if(util.isEmpty(e.detail)){
this.data.form.deductWeight = null
this.data.form.deductPercent = null
} else {
this.data.form.deductWeight = math.divide(math.times(this.data.form.netWeight, Number(e.detail)), 100).toFixed(2)
}
} else if(e.target.id == 'deductWeight'){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
if(util.isEmpty(e.detail)){
this.data.form.deductWeight = null
this.data.form.deductPercent = null
} else {

30
pages/process/order-list/index.wxml

@ -30,7 +30,7 @@
<text wx:if="{{item.status != 1 && item.factoryCustomerMobile}}">-{{item.factoryCustomerMobile}}</text>
</view>
</view>
<view class="text-df" wx:if="{{item.status == 1}}">定价</view>
<view class="text-df" wx:if="{{item.status == 1}}">定价</view>
<view class="text-df" wx:elif="{{item.status == 2}}">待过皮重</view>
<view class="text-df" style="color:#FF5368" wx:elif="{{item.status == 3}}">待审核</view>
<view class="text-df" style="color:#FA541C" wx:elif="{{item.status == 4}}">待付款</view>
@ -41,27 +41,27 @@
</view>
<view style="position:relative">
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.productName}}">
<view class="text-sm text-black">品类:</view>
<view class="text-sm text-black" style="margin-left:80rpx">品类:</view>
<view class="text-sm text-black">{{item.productName}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.totalWeight}}">
<view class="text-sm text-black">毛重(公斤):</view>
<view class="text-sm text-black">{{item.totalWeight}}</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">毛重(公斤):</view>
<view class="text-sm text-black">{{item.totalWeight || '- -'}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.settleWeight}}">
<view class="text-sm text-black">结算重量(公斤):</view>
<view class="text-sm text-black">{{item.settleWeight}}</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">结算重量(公斤):</view>
<view class="text-sm text-black">{{item.settleWeight || '- -'}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.unitPrice}}">
<view class="text-sm text-black">单价(元/公斤):</view>
<view class="text-sm text-black">{{item.unitPrice}}</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">单价(元/公斤):</view>
<view class="text-sm text-black">{{item.unitPrice || '- -'}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.settlePrice}}">
<view class="text-sm text-black">结算金额(元):</view>
<view class="text-sm text-black">{{item.settlePrice}}</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">结算金额(元):</view>
<view class="text-sm text-black">{{item.settlePrice || '- -'}}</view>
</view>
<image class="item-icon" src="/assets/image/icon-finish.png" wx:if="{{item.status == 5}}"></image>
<!-- <image class="item-icon" src="/assets/image/icon-delete.png" wx:if="{{item.status == 6}}"></image> -->
<image class="item-icon" src="/assets/image/icon-delete.png" wx:if="{{item.status == 6}}"></image>
</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}}"

4
pages/process/order-price/index.js

@ -94,13 +94,13 @@ Scene({
bindInput: function (e) {
this.data.form[e.target.id] = e.detail
if(e.target.id == 'deductPercent'){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
if(util.isEmpty(e.detail)){
this.setData({ ['form.deductWeight']: null, ['form.deductPercent']: null })
} else {
this.setData({ ['form.deductWeight']: math.divide(math.times(this.data.form.totalWeight, Number(e.detail)), 100).toFixed(3) })
}
} else if(e.target.id == 'deductWeight'){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
if(util.isEmpty(e.detail)){
this.setData({ ['form.deductWeight']: null, ['form.deductPercent']: null })
} else {
this.setData({ ['form.deductPercent']: math.times(math.divide(Number(e.detail), this.data.form.totalWeight), 100).toFixed(2) })

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

@ -48,7 +48,7 @@ Component({
bindInput: function (e) {
this.data.item[e.currentTarget.id] = e.detail
if(e.currentTarget.id == 'deductPercent'){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
if(util.isEmpty(e.detail)){
this.data.item.deductWeight = null
this.data.item.deductPercent = null
} else {
@ -56,7 +56,7 @@ Component({
}
this.statAmount()
} else if(e.currentTarget.id == 'deductWeight'){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
if(util.isEmpty(e.detail)){
this.data.item.deductWeight = null
this.data.item.deductPercent = null
} else {

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

@ -12,20 +12,23 @@ Scene({
* 页面的初始数据
*/
data: {
height: app.globalData.fragmentHeight,
safeBottom: app.globalData.safeBottom,
paperList: [],
form: null
form: null,
intoview: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if(options.id){
var height = app.globalData.fragmentHeight - app.globalData.safeBottom - 120
wx.showLoading({ title: '正在获取', mask: true })
getPaperList({pageNum: 1, pageSize: 100}).then(result => {
this.setData({ safeBottom: app.globalData.safeBottom, paperList: result.data.records })
this.setData({ safeBottom: app.globalData.safeBottom, paperList: result.data.records, height })
}).catch(err => {
this.setData({ safeBottom: app.globalData.safeBottom })
this.setData({ safeBottom: app.globalData.safeBottom, height })
util.showToast(err)
})
getSideOrderInfo({ id: options.id }).then(result => {
@ -79,11 +82,11 @@ Scene({
const element = this.data.form.productCategoryInfos[index]
if(util.isEmpty(element.settleUnitPrice) || Number(element.settleUnitPrice) <= 0){
util.showToast('请输入第' + (index + 1) + '项废纸品类结算单价')
this.setData({ intoview: 'item' + index })
return
}
if(!util.isEmpty(this.data.form.scrapPaperReceiptId)){
var cate = this.findCateById(element.productId)
console.log(cate)
if(cate){
element.highestUnitPrice = cate.highestUnitPrice
element.lowestUnitPrice = cate.lowestUnitPrice
@ -91,10 +94,12 @@ Scene({
}
if(element.highestUnitPrice && Number(element.settleUnitPrice) > Number(element.highestUnitPrice)){
util.showToast('第' + (index + 1) + '项废纸品类单价不得高于:' + element.highestUnitPrice + '元/公斤')
this.setData({ intoview: 'item' + index })
return
}
if(element.lowestUnitPrice && Number(element.settleUnitPrice) < Number(element.lowestUnitPrice)){
util.showToast('第' + (index + 1) + '项废纸品类单价不得低于:' + element.lowestUnitPrice + '元/公斤')
this.setData({ intoview: 'item' + index })
return
}
var item = { productId: element.productId, scrapPaperPurchaseOrderId: element.scrapPaperPurchaseOrderId }

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

@ -3,7 +3,7 @@
<view slot="content">重新定价</view>
</cu-custom>
<view wx:if="{{form}}">
<scroll-view scroll-y="true" style="height:{{height}}rpx" wx:if="{{form}}" scroll-into-view="{{intoview}}">
<view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:30rpx;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>
@ -31,11 +31,12 @@
<view style="height:30rpx;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" id="item{{index}}">
<outside-check-item form="{{form}}" item="{{item}}" index="{{index}}" list="{{paperList}}" bind:change="onProductChange"/>
</view>
</view>
<view style="height:16rpx"></view>
<view style="height:16rpx"></view>
</scroll-view>
<submit-layout wx:if="{{form}}">
<view class="flex flex-center" style="flex:1;justify-content: flex-start">
<text class="text-lg" wx:if="{{form.settleTotalAmount}}">金额:</text>

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

@ -59,7 +59,7 @@ Component({
this.setData({['item.netWeight']: null, ['item.estimatedAmount']: null})
}
} else if(e.currentTarget.id == 'deductPercent'){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
if(util.isEmpty(e.detail)){
this.data.item.deductWeight = null
this.data.item.deductPercent = null
} else {
@ -67,7 +67,7 @@ Component({
}
this.statAmount()
} else if(e.currentTarget.id == 'deductWeight'){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
if(util.isEmpty(e.detail)){
this.data.item.deductWeight = null
this.data.item.deductPercent = null
} else {

20
pages/process/outside-list/index.wxml

@ -41,20 +41,20 @@
</view>
<view style="position:relative">
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.productCategoryName}}">
<view class="text-sm text-black">品类:</view>
<view class="text-sm text-black" style="margin-left:80rpx">品类:</view>
<view class="text-sm text-black">{{item.productCategoryName}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.plateNumber}}">
<view class="text-sm text-black">车牌号码:</view>
<view class="text-sm text-black">{{item.plateNumber || ''}}</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">车牌号码:</view>
<view class="text-sm text-black">{{item.plateNumber || '- -'}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.settleWeight}}">
<view class="text-sm text-black">结算重量(公斤):</view>
<view class="text-sm text-black">{{item.settleWeight}}</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">结算重量(公斤):</view>
<view class="text-sm text-black">{{item.settleWeight || '- -'}}</view>
</view>
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.settlePrice}}">
<view class="text-sm text-black">结算金额(元):</view>
<view class="text-sm text-black">{{item.settlePrice}}</view>
<view class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-black" style="margin-left:80rpx">结算金额(元):</view>
<view class="text-sm text-black">{{item.settlePrice || '- -'}}</view>
</view>
<image class="item-icon" src="/assets/image/icon-finish.png" wx:if="{{item.orderStatus == 5}}"></image>
<image class="item-icon" src="/assets/image/icon-delete.png" wx:if="{{item.orderStatus == 6}}"></image>

Loading…
Cancel
Save