修改
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 料桶组盘 -->
|
||||
<!-- 物料入库 -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
@@ -30,7 +30,7 @@
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料单重</span>
|
||||
<span class="filter_label">物料单重(kg)</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<NumberInput v-model="currentData.single_weight" />
|
||||
@@ -54,7 +54,7 @@
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">载具编码</span>
|
||||
<span class="filter_label">料桶编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box v-model="currentData.vehicle_code" @handleChange="handleChange" @handleDel="handleDel" />
|
||||
@@ -64,7 +64,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_combination">组盘确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="toSure">组盘确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -138,12 +138,28 @@
|
||||
this.index = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _combination () {
|
||||
toSure () {
|
||||
this.disabled = true
|
||||
if (JSON.stringify(this.currentData) === '{}') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (Number(this.currentData.single_weight) > 2000) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '输入的重量'+ Number(this.currentData.single_weight) +'过大,是否继续?',
|
||||
confirmColor: '#ff6a00',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this._combination()
|
||||
} else if (res.cancel) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async _combination () {
|
||||
try {
|
||||
let selobj = this.options.find(item => item.value === this.index)
|
||||
let res = await combination(this.currentData.vehicle_code, this.currentData.pcsn, this.currentData.material_id, selobj.value, selobj.text, this.currentData.single_weight)
|
||||
|
||||
Reference in New Issue
Block a user