框架
This commit is contained in:
195
pages/WarehouseManage/ReturngoodsInStore.vue
Normal file
195
pages/WarehouseManage/ReturngoodsInStore.vue
Normal file
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar title="退货入库"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">木箱</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box-mx :focused="focused" @inputDel="inputDel" @inputScan="inputScan" @toPhone="toPhone">
|
||||
<input type="text" class="filter_input search_input" v-model="val1" :focus="focused" @input="onKeyInput" @focus="onFocus" @blur="onBlur">
|
||||
</search-box-mx>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">点位</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label filter_label_1"></span>
|
||||
</view>
|
||||
<view class="filter_input_wraper filter_input_wraper_1">
|
||||
<view class="iconfont icon_unchecked" :class="{'icon_checked': isV === '1'}" @tap="isVirtual"></view>
|
||||
<view class="filter_input_wraper_inn_text">虚拟库</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="filter_item">
|
||||
<view class="filter_label">木箱料号</view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="filter_input" v-model="val3">
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-show="isV === '1'" class="filter_item">
|
||||
<view class="filter_label">库区</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>木箱码</th>
|
||||
<th>子卷号</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>重量KG</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.package_box_sn}}</td>
|
||||
<td>{{e.container_name}}</td>
|
||||
<td>{{e.product_name}}</td>
|
||||
<td>{{e.product_description}}</td>
|
||||
<td>{{e.net_weight}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submitbar">
|
||||
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !val1 || dataList.length === 0 || (isV === '1' && index1 === '')}" :disabled="disabled" @tap="_stConfirm">入库确认</button>
|
||||
<button class="zd-col-6 btn-submit btn-success letter-30" @tap="_boxQuery(val1)">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import SearchBoxMx from '@/components/SearchBoxMx.vue'
|
||||
import {boxQuery, stConfirm, getStorSect} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
SearchBoxMx
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
isV: '0',
|
||||
options1: [],
|
||||
index1: '',
|
||||
dataList: [],
|
||||
disabled: false,
|
||||
focused: true
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._getStorSect()
|
||||
},
|
||||
mounted () {
|
||||
setTimeout(() => {
|
||||
uni.hideKeyboard()
|
||||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
/** 虚拟库 */
|
||||
isVirtual () {
|
||||
this.isV = this.isV === '0' ? '1' : '0'
|
||||
},
|
||||
/** 选择器1 */
|
||||
selectChange1(e) {
|
||||
this.index1 = e
|
||||
},
|
||||
/** 库区下拉框查询 */
|
||||
async _getStorSect () {
|
||||
let res = await getStorSect()
|
||||
this.options1 = [...res.data]
|
||||
},
|
||||
/** 初始化查询 */
|
||||
async _boxQuery (e) {
|
||||
console.log(11)
|
||||
let res = await boxQuery(e, '3')
|
||||
this.dataList = [...res.data]
|
||||
},
|
||||
/** 确认 */
|
||||
async _stConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || this.dataList.length === 0 || (this.isV === '1' && this.index1 === '')) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await stConfirm(this.dataList, this.val2, '3', this.isV, this.val3, this.val1, this.index1)
|
||||
this.disabled = false
|
||||
// this._boxQuery(this.val1)
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.isV = '0'
|
||||
this.dataList = []
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
onKeyInput (event) {
|
||||
var value = event.detail.value
|
||||
value=value.replace(/[^\w\.\/]/ig,'')
|
||||
if (value.length !== 14) {
|
||||
this.$nextTick(() => {
|
||||
this.val1 = ''
|
||||
})
|
||||
uni.hideKeyboard()
|
||||
return
|
||||
}
|
||||
uni.hideKeyboard()
|
||||
this._boxQuery(this.val1)
|
||||
},
|
||||
onFocus () {
|
||||
this.focused = true
|
||||
setTimeout(() => {
|
||||
uni.hideKeyboard()
|
||||
}, 300)
|
||||
},
|
||||
onBlur () {
|
||||
this.focused = false
|
||||
},
|
||||
inputDel () {
|
||||
this.val1 = ''
|
||||
},
|
||||
inputScan () {
|
||||
this.focused = true
|
||||
setTimeout(() => {
|
||||
uni.hideKeyboard()
|
||||
}, 300)
|
||||
},
|
||||
toPhone (e) {
|
||||
this.val1 = e
|
||||
this._boxQuery(this.val1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
Reference in New Issue
Block a user