2025-09-02 11:10:13 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="zd_container">
|
2025-09-02 17:24:46 +08:00
|
|
|
<!-- 大料箱 - 退库确认 -->
|
2025-09-02 11:10:13 +08:00
|
|
|
<nav-bar :title="title"></nav-bar>
|
|
|
|
|
<view class="zd_content">
|
|
|
|
|
<view class="zd_wrapper">
|
|
|
|
|
<view class="zd-row border-bottom">
|
|
|
|
|
<view class="zd-col-7">
|
2025-09-02 17:24:46 +08:00
|
|
|
<span class="filter_label">载具</span>
|
2025-09-02 11:10:13 +08:00
|
|
|
</view>
|
|
|
|
|
<view class="zd-col-24 filter_select">
|
2025-09-02 17:24:46 +08:00
|
|
|
<search-box
|
|
|
|
|
v-model="val1"
|
2025-09-18 14:13:59 +08:00
|
|
|
@handleChange="handleChange"
|
2025-09-02 17:24:46 +08:00
|
|
|
/>
|
2025-09-02 11:10:13 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="zd-row border-bottom">
|
2025-09-10 10:38:03 +08:00
|
|
|
<view class="zd-col-6">
|
2025-09-02 17:24:46 +08:00
|
|
|
<span class="filter_label filter_input_disabled">所属机台</span>
|
2025-09-02 11:10:13 +08:00
|
|
|
</view>
|
2025-09-10 10:38:03 +08:00
|
|
|
<view class="zd-col-18">
|
|
|
|
|
<input type="text" class="filter_input filter_input_disabled" v-model="val2" disabled>
|
2025-09-02 17:24:46 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="zd-row border-bottom">
|
2025-09-10 10:38:03 +08:00
|
|
|
<view class="zd-col-6">
|
2025-09-02 17:24:46 +08:00
|
|
|
<span class="filter_label filter_input_disabled">工单</span>
|
|
|
|
|
</view>
|
2025-09-10 10:38:03 +08:00
|
|
|
<view class="zd-col-18">
|
|
|
|
|
<input type="text" class="filter_input filter_input_disabled" v-model="val3" disabled>
|
2025-09-02 17:24:46 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="zd-row border-bottom">
|
2025-09-10 10:38:03 +08:00
|
|
|
<view class="zd-col-6">
|
|
|
|
|
<span class="filter_label">剩余物料</span>
|
2025-09-02 17:24:46 +08:00
|
|
|
</view>
|
|
|
|
|
<view class="zd-col-16">
|
2025-09-10 10:38:03 +08:00
|
|
|
<input type="number" v-model="val4" class="filter_input">
|
2025-09-02 11:10:13 +08:00
|
|
|
</view>
|
2025-09-10 10:38:03 +08:00
|
|
|
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
2025-09-02 11:10:13 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="zd_wrapper grid-wraper">
|
|
|
|
|
<view class="slide_new">
|
|
|
|
|
<table>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2025-09-02 17:24:46 +08:00
|
|
|
<th>序号</th>
|
|
|
|
|
<th>物料编码</th>
|
|
|
|
|
<th>物料名称</th>
|
2025-09-10 10:38:03 +08:00
|
|
|
<th>批次</th>
|
2025-09-02 17:24:46 +08:00
|
|
|
<th>重量(kg)</th>
|
|
|
|
|
<th>生产日期</th>
|
|
|
|
|
<th>供应商编码</th>
|
|
|
|
|
<th>供应商名称</th>
|
|
|
|
|
<th>规格</th>
|
|
|
|
|
<th>型号</th>
|
|
|
|
|
<th>有效期(天)</th>
|
|
|
|
|
<th>执行标准</th>
|
|
|
|
|
<th>品质类型</th>
|
|
|
|
|
<th>烘干次数</th>
|
2025-09-02 11:10:13 +08:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2025-09-10 10:38:03 +08:00
|
|
|
<tr v-for="(e, i) in dataList" :key="i">
|
2025-09-02 17:24:46 +08:00
|
|
|
<td>{{i+1}}</td>
|
2025-09-10 10:38:03 +08:00
|
|
|
<td>{{e.material_code}}</td>
|
|
|
|
|
<td>{{e.material_name}}</td>
|
|
|
|
|
<td>{{e.pcsn}}</td>
|
|
|
|
|
<td>{{e.qty}}</td>
|
|
|
|
|
<td>{{e.produce_time}}</td>
|
|
|
|
|
<td>{{e.supp_code}}</td>
|
|
|
|
|
<td>{{e.supp_name}}</td>
|
|
|
|
|
<td>{{e.material_spec}}</td>
|
|
|
|
|
<td>{{e.material_model}}</td>
|
|
|
|
|
<td>{{e.quality_time_day}}</td>
|
|
|
|
|
<td>{{['', '待检', '合格', '不合格'][Number(e.quality_type)]}}</td>
|
|
|
|
|
<td>{{e.bake_num}}</td>
|
2025-09-02 11:10:13 +08:00
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="zd-row submit-bar">
|
2025-09-10 10:38:03 +08:00
|
|
|
<button class="zd-col-5 button-primary" @tap="searchList">查询</button>
|
|
|
|
|
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !val3 || !val4}" :disabled="disabled" @tap="_returnConfirm">确认退回</button>
|
2025-09-02 11:10:13 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import NavBar from '@/components/NavBar.vue'
|
|
|
|
|
import SearchBox from '@/components/SearchBox.vue'
|
2025-09-10 10:38:03 +08:00
|
|
|
import {getOutGroupInfo, returnConfirm} from '@/utils/getData1.js'
|
2025-09-02 11:10:13 +08:00
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
NavBar,
|
|
|
|
|
SearchBox
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
title: '',
|
2025-09-10 10:38:03 +08:00
|
|
|
materialData: {},
|
2025-09-02 11:10:13 +08:00
|
|
|
val1: '',
|
2025-09-10 10:38:03 +08:00
|
|
|
val2: '',
|
|
|
|
|
val3: '',
|
|
|
|
|
val4: '',
|
2025-09-02 11:10:13 +08:00
|
|
|
dataList: [],
|
|
|
|
|
disabled: false
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onLoad (options) {
|
|
|
|
|
this.title = options.title
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2025-09-18 14:13:59 +08:00
|
|
|
handleChange (e) {
|
|
|
|
|
if (e) {
|
|
|
|
|
this.searchList()
|
|
|
|
|
}
|
|
|
|
|
},
|
2025-09-02 11:10:13 +08:00
|
|
|
searchList () {
|
|
|
|
|
this.dataList = []
|
2025-09-10 10:38:03 +08:00
|
|
|
this._getOutGroupInfo()
|
2025-09-02 11:10:13 +08:00
|
|
|
},
|
2025-09-10 10:38:03 +08:00
|
|
|
async _getOutGroupInfo () {
|
|
|
|
|
try {
|
|
|
|
|
let res = await getOutGroupInfo(this.val1)
|
2025-09-18 16:49:05 +08:00
|
|
|
if (res && res.data.data.length > 0) {
|
2025-09-10 10:38:03 +08:00
|
|
|
this.val2 = res.data.bom_code
|
|
|
|
|
this.val3 = res.data.device_code
|
2025-09-18 16:49:05 +08:00
|
|
|
this.dataList = res.data.data
|
|
|
|
|
console.log(this.dataList, 666)
|
2025-09-02 11:10:13 +08:00
|
|
|
} else {
|
|
|
|
|
this.dataList = []
|
|
|
|
|
}
|
2025-09-10 10:38:03 +08:00
|
|
|
} catch (e) {
|
|
|
|
|
this.dataList = []
|
2025-09-02 11:10:13 +08:00
|
|
|
}
|
|
|
|
|
},
|
2025-09-10 10:38:03 +08:00
|
|
|
clearUp () {
|
|
|
|
|
this.val1 = ''
|
|
|
|
|
this.val2 = ''
|
|
|
|
|
this.index = ''
|
|
|
|
|
this.dataList = []
|
|
|
|
|
this.disabled = false
|
2025-09-02 11:10:13 +08:00
|
|
|
},
|
2025-09-10 10:38:03 +08:00
|
|
|
async _returnConfirm () {
|
2025-09-02 11:10:13 +08:00
|
|
|
this.disabled = true
|
2025-09-10 10:38:03 +08:00
|
|
|
if (!this.val1 || !this.val3 || !this.val4) {
|
2025-09-02 11:10:13 +08:00
|
|
|
this.disabled = false
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
try {
|
2025-09-10 10:38:03 +08:00
|
|
|
let res = await returnConfirm(this.val1, this.val3, this.val4)
|
|
|
|
|
if (res) {
|
2025-09-02 11:10:13 +08:00
|
|
|
uni.showToast({
|
2025-09-10 10:38:03 +08:00
|
|
|
title: res.message,
|
2025-09-02 11:10:13 +08:00
|
|
|
icon: 'none'
|
|
|
|
|
})
|
2025-09-10 10:38:03 +08:00
|
|
|
this.clearUp()
|
2025-09-02 11:10:13 +08:00
|
|
|
}
|
|
|
|
|
this.disabled = false
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.disabled = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|