xiug
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-9">
|
||||
<span class="filter_label">入库单类型</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">单据编码</span>
|
||||
@@ -74,7 +82,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val1 || !index}" :disabled="disabled" @tap="_inStorageConfirm">组盘确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val1 || !index || !index1}" :disabled="disabled" @tap="_inStorageConfirm">组盘确认</button>
|
||||
</view>
|
||||
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
|
||||
<view class="pop-line"></view>
|
||||
@@ -120,7 +128,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getBillNoInfo, storList, inStorageConfirm} from '@/utils/getData2.js'
|
||||
import {outStorageOrder, getBillNoInfo, storList, inStorageConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -133,19 +141,31 @@
|
||||
show: false,
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
currentData: {},
|
||||
val1: null,
|
||||
val2: null,
|
||||
options: [],
|
||||
index: '',
|
||||
disabled: false
|
||||
disabled: false,
|
||||
options1: [],
|
||||
index1: ''
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._outStorageOrder()
|
||||
this._storList()
|
||||
},
|
||||
methods: {
|
||||
/** 下拉框*/
|
||||
async _outStorageOrder () {
|
||||
let res = await outStorageOrder()
|
||||
this.options1 = [...res]
|
||||
},
|
||||
selectChange1 (e) {
|
||||
this.index1 = e
|
||||
},
|
||||
handleChange1 (e) {
|
||||
if (e) {
|
||||
this._getBillNoInfo(e)
|
||||
@@ -157,8 +177,8 @@
|
||||
this.index = ''
|
||||
},
|
||||
toSearch () {
|
||||
if (this.code && this.currentData) {
|
||||
this.show = true
|
||||
if (this.code) {
|
||||
this._getBillNoInfo(this.code)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请扫码',
|
||||
@@ -173,16 +193,28 @@
|
||||
this.dataList = [...res]
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.currentData = {}
|
||||
this.index = ''
|
||||
this.val1 = null
|
||||
this.val2 = null
|
||||
this.show = true
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.material_code ? '' : e.material_code
|
||||
this.currentData = this.pkId === e.material_code ? e : {}
|
||||
this.pkObj = this.pkId === e.material_code ? e : {}
|
||||
},
|
||||
confirmModal () {
|
||||
if (!this.pkId) {
|
||||
uni.showToast({
|
||||
title: '请选择一行',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.show = false
|
||||
this.currentData = this.pkObj
|
||||
this.code = this.currentData.code
|
||||
this.val1 = this.currentData.qty
|
||||
this.val2 = this.currentData.vehicle_code
|
||||
@@ -231,16 +263,17 @@
|
||||
this.index = ''
|
||||
this.val1 = null
|
||||
this.val2 = null
|
||||
this.index1 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _inStorageConfirm () {
|
||||
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 obj = Object.assign(this.currentData, {qty: this.val1, vehicle_code: this.val2, stor_code: this.index})
|
||||
let obj = Object.assign(this.currentData, {qty: this.val1, vehicle_code: this.val2, stor_code: this.index, form_type: this.index1})
|
||||
let res = await inStorageConfirm(obj)
|
||||
if (res.code === '200') {
|
||||
this.toEmpty()
|
||||
|
||||
Reference in New Issue
Block a user