仓库编码接口
This commit is contained in:
@@ -72,8 +72,9 @@
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">仓库编码</span>
|
||||
</view>
|
||||
<view class="zd-col-24">
|
||||
<search-box v-model="currentData.stor_code"/>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<!-- <search-box v-model="currentData.stor_code"/> -->
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -88,7 +89,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {groupMaterIn} from '@/utils/getData2.js'
|
||||
import {storList, groupMaterIn} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -98,19 +99,41 @@
|
||||
return {
|
||||
title: '',
|
||||
currentData: {},
|
||||
options: [],
|
||||
index: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._storList()
|
||||
},
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.currentData = this.$store.getters.publicObj
|
||||
if(this.currentData.stor_code !== '' && this.currentData.stor_code !== null && this.currentData.stor_code !== undefined) {
|
||||
this.options.map(el => {
|
||||
if (el.value === this.currentData.stor_code) {
|
||||
this.index = el.value
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
async _storList () {
|
||||
let res = await storList()
|
||||
if (res.code === '200') {
|
||||
this.options = [...res.content]
|
||||
this.options.map(el => {
|
||||
this.$set(el, 'text', el.label)
|
||||
})
|
||||
}
|
||||
},
|
||||
toJump () {
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/mater-list?title=查询物料'
|
||||
@@ -118,6 +141,7 @@
|
||||
},
|
||||
toEmpty () {
|
||||
this.currentData = {}
|
||||
this.index = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _groupMaterIn () {
|
||||
@@ -127,7 +151,8 @@
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await groupMaterIn(this.currentData.stor_code, this.currentData)
|
||||
this.currentData.stor_code = this.index
|
||||
let res = await groupMaterIn(this.index, this.currentData)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
|
||||
@@ -24,6 +24,10 @@ export const handLogin = (user, password) => request({
|
||||
/**
|
||||
* 物料组盘入库
|
||||
*/
|
||||
export const storList = () => request({
|
||||
url:'api/pda/common/storList',
|
||||
data: {}
|
||||
})
|
||||
export const groupMaterList = (page, size, search) => request({
|
||||
url:'api/groupMater/maters',
|
||||
data: {page: page, size: size, search: search}
|
||||
|
||||
Reference in New Issue
Block a user