This commit is contained in:
2025-07-14 09:46:42 +08:00
parent 271b4dd42d
commit a2f7cedc05
4 changed files with 14 additions and 14 deletions

View File

@@ -65,7 +65,7 @@
title: '', title: '',
val1: '', val1: '',
val2: '', val2: '',
options: [{text:'托盘', value:'1'},{text:'料箱',value: '2'}], options: [{text:'托盘', value:'1'},{text:'料箱',value: '2'},{text:'货架',value: '3'}],
index: '', index: '',
// options2: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}], // options2: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
options2: [], options2: [],

View File

@@ -57,7 +57,7 @@
</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-primary" @tap="seachList">查询</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId}" @tap="_materialConfirm">确认</button> <button class="zd-col-16 button-primary" :class="{'button-info': !dataList.length}" @tap="_callMaterialConfirm">确认</button>
</view> </view>
</view> </view>
</template> </template>
@@ -65,7 +65,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, materialConfirm} from '@/utils/getData3.js' import {getRegion, linegetMaterialDtl, callMaterialConfirm} from '@/utils/getData3.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -106,7 +106,7 @@
methods: { methods: {
async _getRegion () { async _getRegion () {
try { try {
let res = await getRegion() let res = await getRegion('YZHJ')
if (res) { if (res) {
this.options = res this.options = res
} else { } else {
@@ -166,14 +166,14 @@
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 _materialConfirm () { async _callMaterialConfirm () {
this.disabled = true this.disabled = true
if (!this.val1 || !this.val2 || !this.pkId) { if (!this.val1 || !this.val2 || !this.dataList.length) {
this.disabled = false this.disabled = false
return return
} }
try { try {
let res = await materialConfirm(this.index, this.val1, this.pkObj) let res = await callMaterialConfirm(this.index, this.val1, this.pkObj)
if (res.code === '200') { if (res.code === '200') {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,

View File

@@ -57,7 +57,7 @@
</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-primary" @tap="seachList">查询</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId}" @tap="_materialConfirm">确认</button> <button class="zd-col-16 button-primary" :class="{'button-info': !dataList.length}" @tap="_materialConfirm">确认</button>
</view> </view>
</view> </view>
</template> </template>
@@ -106,7 +106,7 @@
methods: { methods: {
async _getSect () { async _getSect () {
try { try {
let res = await getSect() let res = await getSect('XB')
if (res) { if (res) {
this.options = res this.options = res
} else { } else {
@@ -168,7 +168,7 @@
}, },
async _materialConfirm () { async _materialConfirm () {
this.disabled = true this.disabled = true
if (!this.val1 || !this.val2 || !this.pkId) { if (!this.dataList.length) {
this.disabled = false this.disabled = false
return return
} }

View File

@@ -23,14 +23,14 @@ export const handLogin = (user, password) => request({
// 公共接口 // 公共接口
// 仓库列表/区域列表 // 仓库列表/区域列表
export const getSect = (page, size) => request({ export const getSect = (scode, page, size) => request({
url:'api/pda/iosIn/getSect', url:'api/pda/iosIn/getSect',
data: {page: page, size: size} data: {stor_code: scode, page: page, size: size}
}) })
// 区域列表 // 区域列表
export const getRegion = (page, size) => request({ export const getRegion = (region, page, size) => request({
url:'api/pda/iosIn/getRegion', url:'api/pda/iosIn/getRegion',
data: {page: page, size: size} data: {region: region, page: page, size: size}
}) })
// 获取物料列表 // 获取物料列表
export const getMaterialList = (search, page, size) => request({ export const getMaterialList = (search, page, size) => request({