组盘入库添加功能
This commit is contained in:
@@ -29,6 +29,18 @@
|
||||
<uni-data-select :placeholder="$t('utils.selectPlaceholder')" :emptyTips="$t('utils.selectEmptyTips')" v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="is-required">
|
||||
<view class="filter_label">{{$t('label.WarehousingType')}}</view>
|
||||
<view class="filter_select">
|
||||
<uni-data-select :placeholder="$t('utils.selectPlaceholder')" :emptyTips="$t('utils.selectEmptyTips')" v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="filter_label">{{$t('label.MaterialQRCode')}}</view>
|
||||
<search-box
|
||||
v-model="qrcode"
|
||||
/>
|
||||
</view>
|
||||
<view>
|
||||
<view class="filter_label">{{$t('label.MaterialName')}}</view>
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_name" disabled>
|
||||
@@ -70,7 +82,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_confirmIn">{{$t('button.confirm')}}</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2 || !index || !index1}" :disabled="disabled" @tap="_confirmIn">{{$t('button.confirm')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -78,7 +90,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getSect, getVehicleMaterial, confirmIn} from '@/utils/getData.js'
|
||||
import {getSect, getVehicleMaterial, confirmIn, dictDetail} from '@/utils/getData.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -91,6 +103,9 @@
|
||||
val2: '',
|
||||
options: [],
|
||||
index: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
qrcode: '',
|
||||
disabled: false,
|
||||
currentData: {},
|
||||
dataList: []
|
||||
@@ -98,16 +113,15 @@
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getSect()
|
||||
this._dictDetail()
|
||||
},
|
||||
methods: {
|
||||
async _getSect () {
|
||||
try {
|
||||
let res = await getSect()
|
||||
if (res) {
|
||||
this.options = res
|
||||
this.options = [...res]
|
||||
} else {
|
||||
this.options =[]
|
||||
}
|
||||
@@ -115,9 +129,24 @@
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
async _dictDetail () {
|
||||
try {
|
||||
let res = await dictDetail('ST_INV_IN_TYPE')
|
||||
if (res && res.code === '200') {
|
||||
this.options1 = [...res.content]
|
||||
} else {
|
||||
this.options1 =[]
|
||||
}
|
||||
} catch (e) {
|
||||
this.options1 = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
selectChange1 (e) {
|
||||
this.index1 = e
|
||||
},
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getVehicleMaterial(e)
|
||||
@@ -142,18 +171,20 @@
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index = ''
|
||||
this.index1 = ''
|
||||
this.qrcode = ''
|
||||
this.disabled = false
|
||||
this.currentData = {}
|
||||
this.dataList = []
|
||||
},
|
||||
async _confirmIn () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.index) {
|
||||
if (!this.val1 || !this.val2 || !this.index || !this.index1) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await confirmIn(this.val1, this.val2, this.index)
|
||||
let res = await confirmIn(this.val1, this.val2, this.index, this.index1, this.qrcode)
|
||||
if (res.status === '200') {
|
||||
this.clearUp()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user