This commit is contained in:
2023-09-12 11:07:57 +08:00
parent 486453888b
commit 5611f3b103
3 changed files with 67 additions and 15 deletions

View File

@@ -14,6 +14,12 @@
/>
</view>
</view>
<view class="filter_item">
<view class="filter_label">点位</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
@@ -39,7 +45,7 @@
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled" @tap="toSure">出库确认</button>
<button class="submit-button" :class="{'btn-disabled': !index && !checkArr.length}" :disabled="disabled" @tap="toSure">出库确认</button>
<button class="submit-button" @tap="_empOutgetIvt(val1)">查询</button>
</view>
</view>
@@ -48,7 +54,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {empOutgetIvt, empOutconfirm} from '@/utils/getData1.js'
import {empOutgetIvt, empOutgetPoint, empOutconfirm} from '@/utils/getData1.js'
export default {
components: {
NavBar,
@@ -56,16 +62,34 @@
},
data() {
return {
options: [],
index: '',
val1: '',
dataList: [],
checkArr: [],
disabled: false
};
},
created () {
this._empOutgetIvt()
},
methods: {
handleChange (e) {
this._empOutgetIvt(e)
},
/** 选择器 */
selectChange(e) {
this.index = e
},
/** 点位下拉框查询 */
async _empOutgetPoint () {
let res = await empOutgetPoint()
res.data.map(el => {
this.$set(el, 'value', el.point_code)
this.$set(el, 'text', el.point_name)
})
this.options = [...res.data]
},
/** grid查询 */
async _empOutgetIvt (e) {
let res = await empOutgetIvt(e)
@@ -81,14 +105,15 @@
/** 确认 */
async toSure () {
this.disabled = true
if (!this.val1) {
if (!this.index || !this.checkArr.length) {
this.disabled = false
return
}
try {
let res = await empOutconfirm(this.checkArr)
let res = await empOutconfirm(this.checkArr, this.index)
this.disabled = false
this.val1 = ''
this.dataList = []
this._empOutgetIvt()
uni.showToast({
title: res.message,
icon: 'none'

View File

@@ -14,6 +14,12 @@
/>
</view>
</view>
<view class="filter_item">
<view class="filter_label">点位</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
@@ -49,7 +55,7 @@
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled" @tap="toSure">出库确认</button>
<button class="submit-button" :class="{'btn-disabled': !index && !checkArr.length}" :disabled="disabled" @tap="toSure">出库确认</button>
<button class="submit-button" @tap="_iosOutgetIvt(val1)">查询</button>
</view>
</view>
@@ -58,7 +64,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {iosOutgetIvt, iosOutconfirm} from '@/utils/getData1.js'
import {iosOutgetIvt, iosOutgetPoint, iosOutconfirm} from '@/utils/getData1.js'
export default {
components: {
NavBar,
@@ -66,19 +72,37 @@
},
data() {
return {
options: [],
index: '',
val1: '',
dataList: [],
checkArr: [],
disabled: false
};
},
created () {
this._iosOutgetPoint()
},
methods: {
handleChange (e) {
this._iosOutgetIvt(e)
},
/** 选择器 */
selectChange(e) {
this.index = e
},
/** 点位下拉框查询 */
async _iosOutgetPoint () {
let res = await iosOutgetPoint()
res.data.map(el => {
this.$set(el, 'value', el.point_code)
this.$set(el, 'text', el.point_name)
})
this.options = [...res.data]
},
/** grid查询 */
async _iosOutgetIvt (e) {
let res = await iosOutgetIvt(e)
let res = await iosOutgetIvt(e, this.index)
res.data.map(el => {
this.$set(el, 'checked', false)
})
@@ -91,14 +115,15 @@
/** 确认 */
async toSure () {
this.disabled = true
if (!this.val1) {
if (!this.index || !this.checkArr.length) {
this.disabled = false
return
}
try {
let res = await iosOutconfirm(this.checkArr)
let res = await iosOutconfirm(this.checkArr, this.index)
this.disabled = false
this.val1 = ''
this.dataList = []
this._iosOutgetPoint()
uni.showToast({
title: res.message,
icon: 'none'

View File

@@ -4,10 +4,11 @@ import request from './request.js'
* 半成品出库
*/
// 1.1半成品出库页面
export const iosOutgetIvt = (mspec) => request({
export const iosOutgetIvt = (mspec, pcode) => request({
url:'api/pda/hrBcp/iosOut/getIvt',
data: {
material_spec: mspec
material_spec: mspec,
point_code: pcode
}
})
// 1.2点位下拉框
@@ -28,10 +29,11 @@ export const iosOutconfirm = (rows, pcode) => request({
* 空箱出库
*/
// 1.1空箱出库页面
export const empOutgetIvt = (scode) => request({
export const empOutgetIvt = (scode, pcode) => request({
url:'api/pda/hrBcp/empOut/getIvt',
data: {
storagevehicle_code: scode
storagevehicle_code: scode,
point_code: pcode
}
})
// 1.2出库确认(按钮) -- 多选