167 lines
6.4 KiB
Vue
167 lines
6.4 KiB
Vue
<template>
|
|
<view class="zd_container">
|
|
<!-- 合格证入库 -->
|
|
<nav-bar :title="title"></nav-bar>
|
|
<view class="zd_content">
|
|
<view class="zd_wrapper">
|
|
<view class="zd-row border-bottom">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'">
|
|
<span class="filter_label">{{$t('filter.hgzbm')}}</span>
|
|
</view>
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-16'">
|
|
<search-box
|
|
v-model="val1"
|
|
@handleChange="handleChange1"
|
|
/>
|
|
</view>
|
|
</view>
|
|
<view class="zd-row">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'">
|
|
<span class="filter_label">{{$t('filter.zjbm')}}</span>
|
|
</view>
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-16'">
|
|
<search-box
|
|
v-model="val2"
|
|
/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="zd_wrapper">
|
|
<view class="zd-row border-bottom filter_input_disabled">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'"><span class="filter_label">{{$t('filter.ddh')}}</span></view>
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-16'"><span class="filter_input">{{currentData.moNumber}}</span></view>
|
|
</view>
|
|
<view class="zd-row border-bottom filter_input_disabled">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'"><span class="filter_label">{{$t('filter.ydxx')}}</span></view>
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-16'"><span class="filter_input">{{currentData.srcBillNo}}</span></view>
|
|
</view>
|
|
<view class="zd-row border-bottom filter_input_disabled">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'"><span class="filter_label">{{$t('filter.wlbm')}}</span></view>
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-16'"><span class="filter_input">{{currentData.material_code}}</span></view>
|
|
</view>
|
|
<view class="zd-row border-bottom filter_input_disabled">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'"><span class="filter_label">{{$t('filter.wlmc')}}</span></view>
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-16'"><span class="filter_input">{{currentData.material_name}}</span></view>
|
|
</view>
|
|
<view class="zd-row border-bottom filter_input_disabled">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'"><span class="filter_label">{{$t('filter.wlgg')}}</span></view>
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-16'"><span class="filter_input">{{currentData.material_spec}}</span></view>
|
|
</view>
|
|
<view class="zd-row border-bottom filter_input_disabled">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'"><span class="filter_label">{{$t('filter.unit')}}</span></view>
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-16'"><span class="filter_input">{{currentData.unit_name}}</span></view>
|
|
</view>
|
|
<view class="zd-row border-bottom">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'"><span class="filter_label">{{$t('filter.wldz')}}</span></view>
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-16'">
|
|
<input type="number" class="filter_input" v-model="currentData.single_weight">
|
|
</view>
|
|
</view>
|
|
<view class="zd-row border-bottom">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'"><span class="filter_label">{{$t('filter.wlpc')}}</span></view>
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-16'">
|
|
<input type="text" class="filter_input" v-model="currentData.pcsn">
|
|
</view>
|
|
</view>
|
|
<view class="zd-row border-bottom">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'"><span class="filter_label">{{$t('filter.wlsl')}}</span></view>
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-16'">
|
|
<input type="number" class="filter_input" v-model="val3">
|
|
</view>
|
|
</view>
|
|
<view class="zd-row">
|
|
<view :class="$i18n.locale !== 'zh-Hans' ? 'zd-col-12' : 'zd-col-8'"><span class="filter_label">{{$t('filter.ckbm')}}</span></view>
|
|
<view class="zd-col-16 filter_select">
|
|
<uni-data-select v-model="index" :placeholder="$t('uni.dataSelect.placeholder')" :emptyTips="$t('uni.dataSelect.emptyTips')" :localdata="options"></uni-data-select>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="zd-row submit-bar">
|
|
<button class="zd-col-6 button-default" @tap="toEmpty">{{$t('btn.cancle')}}</button>
|
|
<button class="zd-col-16 button-primary" :class="{'button-info': !val2 || !val3 || !index}" :disabled="disabled" @tap="_inStorageConfirm">{{$t('btn.zpqr')}}</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import NavBar from '@/components/NavBar.vue'
|
|
import SearchBox from '@/components/SearchBox.vue'
|
|
import {storList, getCertificateInfo, inStorageConfirm} from '@/utils/getData2.js'
|
|
export default {
|
|
components: {
|
|
NavBar,
|
|
SearchBox
|
|
},
|
|
data() {
|
|
return {
|
|
title: '',
|
|
val1: '',
|
|
val2: '',
|
|
val3: '',
|
|
currentData: {},
|
|
options: [],
|
|
index: '',
|
|
disabled: false
|
|
};
|
|
},
|
|
onLoad (options) {
|
|
this.title = options.title
|
|
this._storList()
|
|
},
|
|
methods: {
|
|
async _storList () {
|
|
let res = await storList()
|
|
if (res.code === '200') {
|
|
this.options = [...res.content]
|
|
this.options.map(el => {
|
|
this.$set(el, 'text', el.label)
|
|
})
|
|
}
|
|
},
|
|
handleChange1 (e) {
|
|
this._getCertificateInfo(e)
|
|
},
|
|
async _getCertificateInfo (e) {
|
|
let res = await getCertificateInfo(e)
|
|
this.currentData = res
|
|
if (JSON.stringify(this.currentData) !== '{}') {
|
|
this.val3 = this.currentData.qty
|
|
}
|
|
},
|
|
toEmpty () {
|
|
this.val1 = ''
|
|
this.val2 = ''
|
|
this.val3 = ''
|
|
this.currentData = {}
|
|
this.index = ''
|
|
this.disabled = false
|
|
},
|
|
async _inStorageConfirm () {
|
|
this.disabled = true
|
|
if (!this.val2 || !this.val3 || !this.index) {
|
|
this.disabled = false
|
|
return
|
|
}
|
|
try {
|
|
let obj = Object.assign(this.currentData, {vehicle_code: this.val2, stor_code: this.index, qty: this.val3, bar_code: this.val1})
|
|
let res = await inStorageConfirm(obj)
|
|
if (res.code === '200') {
|
|
this.val3 = ''
|
|
}
|
|
this.disabled = false
|
|
uni.showToast({
|
|
title: res.msg,
|
|
icon: 'none'
|
|
})
|
|
} catch (e) {
|
|
this.disabled = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="stylus">
|
|
</style>
|