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