生产入库
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
</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" inputmode="node">
|
||||
<input type="text" class="filter_input search_input" v-model="val1" :focus="focused" @input="onKeyInput" @focus="onFocus" @blur="onBlur">
|
||||
</search-box-mx>
|
||||
</view>
|
||||
</view>
|
||||
@@ -32,6 +32,12 @@
|
||||
<view class="filter_input_wraper_inn_text">虚拟库</view>
|
||||
</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">
|
||||
@@ -59,7 +65,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !val1 || dataList.length === 0}" :disabled="disabled" @tap="_stConfirm">入库确认</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !val1 || dataList.length === 0 || (isV === '1' && index1 === '')}" :disabled="disabled" @tap="_stConfirm">入库确认</button>
|
||||
<!-- <button class="submit-button" :class="{'btn-disabled': dataList.length === 0}" :disabled="disabled1" @tap="_stPrint">补码</button> -->
|
||||
<button class="submit-button" @tap="_boxQuery(val1)">查询</button>
|
||||
</view>
|
||||
@@ -71,7 +77,7 @@
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import SearchBoxMx from '@/components/SearchBoxMx.vue'
|
||||
import permision from "@/utils/permission.js"
|
||||
import {boxQuery, stConfirm, stPrint} from '@/utils/getData2.js'
|
||||
import {boxQuery, stConfirm, stPrint, getStorSect} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -83,12 +89,17 @@
|
||||
val1: '',
|
||||
val2: '',
|
||||
isV: '0',
|
||||
options1: [],
|
||||
index1: '',
|
||||
dataList: [],
|
||||
disabled: false,
|
||||
disabled1: false,
|
||||
focused: true
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._getStorSect()
|
||||
},
|
||||
mounted () {
|
||||
setTimeout(() => {
|
||||
uni.hideKeyboard()
|
||||
@@ -99,6 +110,15 @@
|
||||
isVirtual () {
|
||||
this.isV = this.isV === '0' ? '1' : '0'
|
||||
},
|
||||
/** 选择器2 */
|
||||
selectChange1(e) {
|
||||
this.index1 = e
|
||||
},
|
||||
/** 库区下拉框查询 */
|
||||
async _getStorSect () {
|
||||
let res = await getStorSect()
|
||||
this.options1 = [...res.data]
|
||||
},
|
||||
/** 初始化查询 */
|
||||
async _boxQuery (e) {
|
||||
let res = await boxQuery(e, '2')
|
||||
@@ -107,17 +127,18 @@
|
||||
/** 确认 */
|
||||
async _stConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || this.dataList.length === 0) {
|
||||
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, '2', this.isV, '', this.val1)
|
||||
let res = await stConfirm(this.dataList, this.val2, '2', this.isV, '', this.val1, this.index1)
|
||||
this.disabled = false
|
||||
// this._boxQuery(this.val1)
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.isV = '0'
|
||||
this.index1 = ''
|
||||
this.dataList = []
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
@@ -363,7 +363,7 @@ export const boxQuery = (no, option, code) => request({
|
||||
}
|
||||
})
|
||||
// 1.2确认入库
|
||||
export const stConfirm = (box_jo, code, option, is, mcode, no) => request({
|
||||
export const stConfirm = (box_jo, code, option, is, mcode, no, sid) => request({
|
||||
url:'api/pda/st/confirm',
|
||||
data: {
|
||||
box_jo: box_jo,
|
||||
@@ -371,7 +371,8 @@ export const stConfirm = (box_jo, code, option, is, mcode, no) => request({
|
||||
option: option,
|
||||
is_virtual: is,
|
||||
material_code: mcode,
|
||||
box_no: no
|
||||
box_no: no,
|
||||
sect_id: sid
|
||||
}
|
||||
})
|
||||
|
||||
@@ -385,6 +386,11 @@ export const stPrint = (box_jo) => request({
|
||||
box_jo: box_jo
|
||||
}
|
||||
})
|
||||
// 库区
|
||||
export const getStorSect = () => request({
|
||||
url:'api/sectattr/getStorSect',
|
||||
data: {}
|
||||
})
|
||||
|
||||
/**
|
||||
* 客户标签打印
|
||||
|
||||
Reference in New Issue
Block a user