人工叫料修改

This commit is contained in:
2025-10-21 17:20:53 +08:00
parent d739200a9f
commit a53db288f8
3 changed files with 38 additions and 9 deletions

View File

@@ -8,8 +8,8 @@
<view class="zd-col-7">
<span class="filter_label">机台</span>
</view>
<view class="zd-col-17">
<search-box v-model="val1"/>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
@@ -99,7 +99,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !this.index || !this.val1 || !this.currentData.material_code || !this.index4}" :disabled="disabled" @tap="_checkoutbillcallMaterial">确认</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !this.index || !this.index2 || !this.currentData.material_code || !this.index4}" :disabled="disabled" @tap="_checkoutbillcallMaterial">确认</button>
</view>
</view>
</template>
@@ -107,7 +107,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getPdaCallMaterialSect, checkoutbillcallMaterial} from '@/utils/getData4.js'
import {getPdaCallEquipment, getPdaCallMaterialSect, checkoutbillcallMaterial} from '@/utils/getData4.js'
export default {
components: {
NavBar,
@@ -115,10 +115,11 @@
},
data() {
return {
val1: '',
title: '',
options: [],
index: '',
options2: [],
index2: '',
options4: [{text:'单独上料', value:'1'}, {text:'下空桶上满料', value: '2'}],
index4: '',
currentData: {},
@@ -136,6 +137,7 @@
},
created () {
this._getPdaCallMaterialSect()
this._getPdaCallEquipment()
},
methods: {
toJump () {
@@ -145,7 +147,7 @@
},
async _getPdaCallMaterialSect () {
try {
let res = await getPdaCallMaterialSect(this.val1)
let res = await getPdaCallMaterialSect(this.index2)
if (res) {
this.options = res.data
} else {
@@ -160,23 +162,40 @@
this.index = e
}
},
async _getPdaCallEquipment () {
try {
let res = await getPdaCallEquipment()
if (res) {
this.options2 = res.data
} else {
this.options2 = []
}
} catch (e) {
this.options2 = []
}
},
selectChange2 (e) {
if (e) {
this.index2 = e
}
},
selectChange4 (e) {
this.index4 = e
},
clearUp () {
this.index = ''
this.val1 = ''
this.index2 = ''
this.currentData = {}
this.disabled = false
},
async _checkoutbillcallMaterial () {
this.disabled = true
if (!this.index || !this.val1 || !this.currentData.material_code || !this.index4) {
if (!this.index || !this.index2 || !this.currentData.material_code || !this.index4) {
this.disabled = false
return
}
try {
let res = await checkoutbillcallMaterial(this.val1, this.index, this.currentData.material_code, this.index4, this.currentData.supp_code, this.currentData.supp_name)
let res = await checkoutbillcallMaterial(this.index2, this.index, this.currentData.material_code, this.index4, this.currentData.supp_code, this.currentData.supp_name)
if (res.code === '200') {
uni.showToast({
title: res.message,

View File

@@ -21,6 +21,8 @@
<th>物料编码</th>
<th>物料名称</th>
<th>库位</th>
<th>批次</th>
<th>物料型号</th>
<th>料桶号</th>
<th>数量</th>
<th>供应商编码</th>
@@ -32,6 +34,8 @@
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.struct_code}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.material_model}}</td>
<td>{{e.storagevehicle_code}}</td>
<td>{{e.qty}}</td>
<td>{{e.supp_code}}</td>

View File

@@ -291,6 +291,12 @@ export const getStructivtByMaterialAndSectCode = (scode, mcode) => request({
url:'api/pda/iosOut/getStructivtByMaterialAndSectCode',
data: {sect_code: scode, material_code: mcode}
})
// 获取机台下拉
export const getPdaCallEquipment = () => request({
url:'api/pda/iosOut/getPdaCallEquipment',
data: {}
})
// 点位属性设置