add重量维护
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th_2">母卷号</th>
|
||||
<th>母卷号</th>
|
||||
<th>子卷号</th>
|
||||
<th>机台编号</th>
|
||||
<th>分切组</th>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">当前点位</span>
|
||||
<span class="filter_label">子卷号</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
@@ -13,22 +13,27 @@
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">管芯重量</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input v-model="val2" type="number" class="filter_input">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">载具类型</span>
|
||||
<span class="filter_label">子卷重量</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_picker">
|
||||
<picker @change="pickerChange" :value="index1" :range="options1" range-key="text">
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
<view class="zd-col-19">
|
||||
<input v-model="val3" type="number" class="filter_input">
|
||||
</view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || index1 === ''}" :disabled="disabled" @tap="_handheldStorehouse">确认</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || !val2 || !val3}" :disabled="disabled" @tap="_doSubVolumeBindingWeight">绑定重量</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -36,7 +41,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {vehicleType, handheldStorehouse} from '@/utils/getData2.js'
|
||||
import {doSubVolumeBindingWeight} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -46,8 +51,8 @@
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
@@ -56,25 +61,14 @@
|
||||
this._vehicleType()
|
||||
},
|
||||
methods: {
|
||||
/** 载具类型下拉框 */
|
||||
async _vehicleType () {
|
||||
let res = await vehicleType()
|
||||
this.options1 = [...res.content]
|
||||
this.options1.map(el => {
|
||||
this.$set(el, 'text', el.label)
|
||||
})
|
||||
},
|
||||
pickerChange (e) {
|
||||
this.index1 = e.detail.value
|
||||
},
|
||||
async _handheldStorehouse () {
|
||||
async _doSubVolumeBindingWeight () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || this.index1 === '') {
|
||||
this.disabled1 = false
|
||||
if (!this.val1 || !this.val2 || !this.val3) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await handheldStorehouse(this.val1, this.options1[this.index1].value)
|
||||
let res = await doSubVolumeBindingWeight(this.val1, this.val2, this.val3)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
@@ -85,8 +79,9 @@
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user