接口
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
</view>
|
||||
<view class="zd-col-24">
|
||||
<search-box
|
||||
v-model="code"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -35,7 +36,7 @@
|
||||
<span class="filter_label filter_input_disabled">物料编号</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -43,7 +44,7 @@
|
||||
<span class="filter_label filter_input_disabled">物料批次</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.pcsn" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -51,7 +52,7 @@
|
||||
<span class="filter_label filter_input_disabled">物料数量</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.qty" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -59,15 +60,15 @@
|
||||
<span class="filter_label filter_input_disabled">出库数量</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
|
||||
<input type="text" class="filter_input filter_input_disabled" :class="{'hightlight': isDiff === false}" v-model="currentData.frozen_qty" disabled>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !code}" :disabled="disabled" @tap="_ioStorageOut">强制确认</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !code}" :disabled="disabled" @tap="_ioStorageOut">出库确认</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !code}" :disabled="disabled" @tap="_confirm('2')">强制确认</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !code}" :disabled="disabled" @tap="_confirm('1')">出库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -75,7 +76,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {ioStorageOut} from '@/utils/getData2.js'
|
||||
import {iosOutgetVehicleMaterial, confirm} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -83,9 +84,10 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
code: '',
|
||||
val1: '',
|
||||
currentData: {},
|
||||
disabled: false
|
||||
disabled: false,
|
||||
isDiff: false,
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
@@ -98,14 +100,31 @@
|
||||
this.code = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _ioStorageOut () {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._iosOutgetVehicleMaterial(e)
|
||||
}
|
||||
},
|
||||
async _iosOutgetVehicleMaterial (e) {
|
||||
try {
|
||||
let res = await iosOutgetVehicleMaterial(e)
|
||||
if (res) {
|
||||
this.currentData = res
|
||||
} else {
|
||||
this.currentData = {}
|
||||
}
|
||||
} catch (e) {
|
||||
this.currentData = {}
|
||||
}
|
||||
},
|
||||
async _confirm (type) {
|
||||
this.disabled = true
|
||||
if (!this.code) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await ioStorageOut(this.code)
|
||||
let res = await confirm(this.currentData.group_id, this.val1, type)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
@@ -128,5 +147,6 @@
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
.hightlight
|
||||
color #f00
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user