清空物料信息

This commit is contained in:
2023-12-12 15:42:18 +08:00
parent 393dc7ed7a
commit c8fdd3362f
2 changed files with 87 additions and 5 deletions

View File

@@ -1,19 +1,75 @@
<template>
<view>
<view class="zd_container">
<nav-bar title="涂板线下料"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="filter_item">
<view class="filter_label">载具编码</view>
<view class="filter_input_wraper">
<search-box v-model="val1" @handleChange="handleChange1"/>
</view>
</view>
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled1" @tap="toSure">确认</button>
<button class="submit-button" @tap="toCancle">取消</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {cleanVehicle} from '@/utils/getData1.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
val1: '',
disabled1: false
};
},
created () {
},
methods: {
/** 选择器1 */
inputChange1 (e) {
// console.log('inputChange1:' + e)
},
/** 确定 */
async toSure () {
this.disabled1 = true
if (!this.val1) {
uni.showToast({
title: '载具编码不能为空',
icon: 'none'
})
this.disabled1 = false
return
}
try {
let res = await cleanVehicle(this.val1)
this.disabled1 = false
this.toCancle()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled1 = false
}
},
toCancle () {
this.disabled1 = false
this.val1 = ''
}
}
}
</script>
<style lang="stylus">
<style lang="stylus" scoped>
</style>

26
utils/getData1.js Normal file
View File

@@ -0,0 +1,26 @@
import request from './request.js'
// 菜单
export const authority = () => {
let res = {
sonTree: [
{menu_id: '1', imgsrc: 'RF01', name: '涂板线下料', path: '/pages/modules/unloading-mater'},
{menu_id: '2', imgsrc: 'RF02', name: '清空物料信息', path: '/pages/modules/clean-matter-info'},
{menu_id: '3', imgsrc: 'RF03', name: '包片机叫料', path: '/pages/modules/call-mater'}
]
}
return res
}
/**
* 包片机上料
*/
// 1.1出库确认
export const cleanVehicle = (code) => request({
url:'api/pda/cleanVehicle',
data: {
vehicle_code: code
}
})