init
This commit is contained in:
151
pages/Material/hw-check.vue
Normal file
151
pages/Material/hw-check.vue
Normal file
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 大料箱盘库 - 货位盘点 -->
|
||||
<nav-bar :title="title" :inner="true"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">单据号</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.check_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">点位/载具</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">点位</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.struct_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">物料编码</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.material_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">物料名称</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.material_name" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">库存数量</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<input type="number" v-model="kcqty" class="filter_input" disabled>
|
||||
</view>
|
||||
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">盘点数量</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<input type="number" v-model="materialData.fac_qty" class="filter_input">
|
||||
</view>
|
||||
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-24 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_materialBoxInventoryConfirm">确认盘点</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getInvInfoQty, materialBoxInventoryConfirm} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
kcqty: '',
|
||||
materialData: {},
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.materialData = this.$store.getters.publicObj
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getInvInfoQty()
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _getInvInfoQty () {
|
||||
let res = await getInvInfoQty(this.val1)
|
||||
this.kcqty = res.data.ivt_qty
|
||||
this.materialData.qty1 = res.data.ivt_qty
|
||||
this.materialData.fac_qty = this.kcqty
|
||||
},
|
||||
async _materialBoxInventoryConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
this.materialData.base_qty = this.kcqty
|
||||
this.materialData.storagevehicle_code = this.val1
|
||||
let res = await materialBoxInventoryConfirm(this.materialData)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
uni.navigateTo({
|
||||
url: '/pages/Material/dlx-pan-store?title=大料箱盘库'
|
||||
})
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user