人工叫料修改

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"> <view class="zd-col-7">
<span class="filter_label">机台</span> <span class="filter_label">机台</span>
</view> </view>
<view class="zd-col-17"> <view class="zd-col-24 filter_select">
<search-box v-model="val1"/> <uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
@@ -99,7 +99,7 @@
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button> <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>
</view> </view>
</template> </template>
@@ -107,7 +107,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 {getPdaCallMaterialSect, checkoutbillcallMaterial} from '@/utils/getData4.js' import {getPdaCallEquipment, getPdaCallMaterialSect, checkoutbillcallMaterial} from '@/utils/getData4.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -115,10 +115,11 @@
}, },
data() { data() {
return { return {
val1: '',
title: '', title: '',
options: [], options: [],
index: '', index: '',
options2: [],
index2: '',
options4: [{text:'单独上料', value:'1'}, {text:'下空桶上满料', value: '2'}], options4: [{text:'单独上料', value:'1'}, {text:'下空桶上满料', value: '2'}],
index4: '', index4: '',
currentData: {}, currentData: {},
@@ -136,6 +137,7 @@
}, },
created () { created () {
this._getPdaCallMaterialSect() this._getPdaCallMaterialSect()
this._getPdaCallEquipment()
}, },
methods: { methods: {
toJump () { toJump () {
@@ -145,7 +147,7 @@
}, },
async _getPdaCallMaterialSect () { async _getPdaCallMaterialSect () {
try { try {
let res = await getPdaCallMaterialSect(this.val1) let res = await getPdaCallMaterialSect(this.index2)
if (res) { if (res) {
this.options = res.data this.options = res.data
} else { } else {
@@ -160,23 +162,40 @@
this.index = e 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) { selectChange4 (e) {
this.index4 = e this.index4 = e
}, },
clearUp () { clearUp () {
this.index = '' this.index = ''
this.val1 = '' this.index2 = ''
this.currentData = {} this.currentData = {}
this.disabled = false this.disabled = false
}, },
async _checkoutbillcallMaterial () { async _checkoutbillcallMaterial () {
this.disabled = true 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 this.disabled = false
return return
} }
try { 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') { if (res.code === '200') {
uni.showToast({ uni.showToast({
title: res.message, 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>
<th>料桶号</th> <th>料桶号</th>
<th>数量</th> <th>数量</th>
<th>供应商编码</th> <th>供应商编码</th>
@@ -32,6 +34,8 @@
<td>{{e.material_code}}</td> <td>{{e.material_code}}</td>
<td>{{e.material_name}}</td> <td>{{e.material_name}}</td>
<td>{{e.struct_code}}</td> <td>{{e.struct_code}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.material_model}}</td>
<td>{{e.storagevehicle_code}}</td> <td>{{e.storagevehicle_code}}</td>
<td>{{e.qty}}</td> <td>{{e.qty}}</td>
<td>{{e.supp_code}}</td> <td>{{e.supp_code}}</td>

View File

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