修改
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
}
|
||||
try {
|
||||
let res = await transferConfirm(this.val1, this.val2)
|
||||
if (res.code === '200') {
|
||||
if (res.status === '200') {
|
||||
this.clearUp()
|
||||
}
|
||||
this.disabled = false
|
||||
|
||||
@@ -6,12 +6,21 @@
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">起点区域</span>
|
||||
<span class="filter_label">出库库区</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料查询</span>
|
||||
</view>
|
||||
<view class="zd-col-12">
|
||||
<input type="text" class="filter_input" v-model="val2">
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" size="mini" style="margin-right: 0" @tap="_linegetMaterialDtl">查询</button>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">终点站点</span>
|
||||
@@ -20,14 +29,6 @@
|
||||
<search-box v-model="val1"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">库存查询</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input" v-model="val2" @blur="handleChange">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
@@ -57,11 +58,10 @@
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-primary" @tap="seachList">查询</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !dataList.length}" @tap="_callMaterialConfirm">确认</button>
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId || !val1}" @tap="_callMaterialConfirm">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -69,7 +69,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getRegion, linegetMaterialDtl, callMaterialConfirm} from '@/utils/getData.js'
|
||||
import {getSect, linegetMaterialDtl, callMaterialConfirm} from '@/utils/getData.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -80,43 +80,26 @@
|
||||
title: '',
|
||||
options: [],
|
||||
index: '',
|
||||
id: '',
|
||||
code: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled: false,
|
||||
reload: false,
|
||||
status: 'more',
|
||||
contentText: {
|
||||
contentdown: '查看更多',
|
||||
contentrefresh: '加载中',
|
||||
contentnomore: '没有更多'
|
||||
},
|
||||
totalCount: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 100
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this.id = options.id
|
||||
},
|
||||
created () {
|
||||
this._getRegion()
|
||||
setTimeout(() => {
|
||||
this.seachList()
|
||||
},2000)
|
||||
this._getSect()
|
||||
},
|
||||
methods: {
|
||||
async _getRegion () {
|
||||
async _getSect () {
|
||||
try {
|
||||
let res = await getRegion('YZHJ')
|
||||
let res = await getSect()
|
||||
if (res) {
|
||||
this.options = res
|
||||
this.index = res[0].value
|
||||
this.options = [...res]
|
||||
} else {
|
||||
this.options =[]
|
||||
}
|
||||
@@ -124,86 +107,47 @@
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this._linegetMaterialDtl()
|
||||
}
|
||||
},
|
||||
seachList () {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this._linegetMaterialDtl()
|
||||
},
|
||||
async _linegetMaterialDtl () {
|
||||
let res = await linegetMaterialDtl(this.index, this.val2)
|
||||
if (res.code === '200') {
|
||||
this.dataList = res.data
|
||||
// this.totalCount = res.totalElements
|
||||
// if (res.totalElements > 0) {
|
||||
// const dataMap = res.content
|
||||
// this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
||||
// this.reload = false
|
||||
// } else {
|
||||
// this.dataList = []
|
||||
// }
|
||||
// if (this.totalCount == this.dataList.length) {
|
||||
// this.reload = false
|
||||
// this.status = 'noMore'
|
||||
// }
|
||||
}
|
||||
},
|
||||
onReachBottom () {
|
||||
if (this.totalCount > this.dataList.length) {
|
||||
this.status = 'loading'
|
||||
setTimeout(() => {
|
||||
this.pageNum++
|
||||
this._linegetMaterialDtl()
|
||||
}, 1000)
|
||||
} else { //停止加载
|
||||
this.status = 'noMore'
|
||||
this.pkId = ''
|
||||
try {
|
||||
let res = await linegetMaterialDtl(this.index, this.val2)
|
||||
if (res.status === '200') {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
toChek (e) {
|
||||
if (e.material_code === 'KH001') {
|
||||
return
|
||||
}
|
||||
this.pkId = this.pkId === e.group_id ? '' : e.group_id
|
||||
this.pkObj = this.pkId === e.group_id ? e : {}
|
||||
},
|
||||
async _callMaterialConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.dataList.length) {
|
||||
if (!this.pkId || !this.val1) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await callMaterialConfirm(this.index, this.val1, this.pkObj)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
let res = await callMaterialConfirm(this.val1, this.pkObj)
|
||||
if (res.status === '200') {
|
||||
this.clearUp()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
}
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index = ''
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.dataList = []
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
// options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
|
||||
options: [],
|
||||
index: '',
|
||||
disabled: false,
|
||||
@@ -151,19 +150,14 @@
|
||||
}
|
||||
try {
|
||||
let res = await confirmIn(this.val1, this.val2, this.index)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
if (res.status === '200') {
|
||||
this.clearUp()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
}
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
|
||||
@@ -61,13 +61,13 @@ export const confirmIn = (vcode, sitecode, sid) => request({
|
||||
})
|
||||
|
||||
// 人工叫料
|
||||
export const linegetMaterialDtl = (rcode, search) => request({
|
||||
export const linegetMaterialDtl = (sid, search) => request({
|
||||
url:'api/pda/iosOut/getMaterialDtl',
|
||||
data: {region_code: rcode, search: search}
|
||||
data: {sect_id: sid, search: search}
|
||||
})
|
||||
export const callMaterialConfirm = (rcode, siteCode, obj) => request({
|
||||
export const callMaterialConfirm = (siteCode, obj) => request({
|
||||
url:'api/pda/iosOut/callMaterialConfirm',
|
||||
data: {region_code: rcode, siteCode: siteCode, obj: obj}
|
||||
data: {siteCode: siteCode, obj: obj}
|
||||
})
|
||||
|
||||
// 手工移库
|
||||
|
||||
Reference in New Issue
Block a user