|
|
@@ -9,41 +9,26 @@
|
|
|
<el-container>
|
|
|
<!-- 按钮部分 -->
|
|
|
<el-header>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="large"
|
|
|
- @click="handleExcel"
|
|
|
- >导出到Excel
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="large"
|
|
|
- @click="() => emits('update:modelValue', false )"
|
|
|
- >退出
|
|
|
+ <el-button type="primary" size="large" @click="handleExcel" >导出到Excel</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="() => emits('update:modelValue', false )" >退出
|
|
|
</el-button>
|
|
|
</el-header>
|
|
|
|
|
|
<el-main>
|
|
|
|
|
|
- <el-input
|
|
|
- v-model="input"
|
|
|
- placeholder="输入工单编号"
|
|
|
- style="width: 200px;margin-bottom: 10px"
|
|
|
-
|
|
|
- />
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- :loading="isLoading"
|
|
|
- style="margin-bottom: 10px; margin-left: 5px;"
|
|
|
- @click="handleSearch"
|
|
|
- >刷新
|
|
|
- </el-button>
|
|
|
- <el-input
|
|
|
- v-model="inputCpmc"
|
|
|
- readonly
|
|
|
- style="width: 50vw;margin-bottom: 10px;margin-left: 5px"
|
|
|
- />
|
|
|
- <el-table id="tab"
|
|
|
+ <div style="display: flex; align-items: center;">
|
|
|
+ <el-input v-model="input" placeholder="输入工单编号" style="width: 180px; margin-right: 10px;" />
|
|
|
+ 印件选择:
|
|
|
+ <el-select v-model="gdwhformData.yjno" placeholder="请选择" allow-create filterable style="width: 100px; margin-right: 10px;">
|
|
|
+ <el-option v-for="option in gdwhformData.yinjian" @click="ongdwhfanclick" :key="option" :label="option" :value="option" />
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ <el-button type="primary" :loading="isLoading" style="margin-right: 10px;" @click="handleSearch">刷新</el-button>
|
|
|
+
|
|
|
+ <el-input v-model="inputCpmc" readonly style="width: 50vw; margin-right: 10px;" />
|
|
|
+ </div>
|
|
|
+ <br>
|
|
|
+ <el-table id="tab"
|
|
|
ref="multipleTable"
|
|
|
height="70vh"
|
|
|
:data="tableData"
|
|
|
@@ -92,7 +77,7 @@ export const getOrderWasteTotal = (params) => {
|
|
|
import * as XLSX from 'xlsx'
|
|
|
import FileSaver from 'file-saver'
|
|
|
import { watch, ref, reactive, defineProps, defineEmits, nextTick } from 'vue'
|
|
|
-
|
|
|
+import {PrintDetailList} from "@/api/yunyin/yunying";
|
|
|
const props = defineProps(['modelValue', 'val'])
|
|
|
const emits = defineEmits(['update:modelValue'])
|
|
|
|
|
|
@@ -104,14 +89,14 @@ const tableColumns = reactive([
|
|
|
{ label: '实际投料', prop: 'aaa', width: '150' },
|
|
|
{ label: '计量单位', prop: '计量单位', width: '150' },
|
|
|
{ label: '交货日期', prop: '交货日期', width: '150' },
|
|
|
- { label: '入仓数量', prop: 'aaa', width: '150' },
|
|
|
- { label: '入仓日期', prop: 'aaa', width: '150' },
|
|
|
+ { label: '入仓数量', prop: 'jjcp_sl', width: '150' },
|
|
|
+ { label: '入仓日期', prop: 'jjcp_sj', width: '150' },
|
|
|
{ label: '印件号', prop: 'qczl_yjno', width: '150' },
|
|
|
{ label: '联数', prop: 'yj_ls', width: '150' },
|
|
|
{ label: '工序号', prop: 'fp_gxh', width: '150' },
|
|
|
{ label: '流程单号', prop: 'qczl_num', width: '150' },
|
|
|
{ label: '员工编号', prop: 'fp_bh', width: '150' },
|
|
|
- { label: '员工姓名', prop: 'aaa', width: '150' },
|
|
|
+ { label: '员工姓名', prop: 'fp_name', width: '150' },
|
|
|
{ label: '废品类别', prop: 'fp_lb', width: '150' },
|
|
|
{ label: '数量', prop: 'fp_sl', width: '150' },
|
|
|
])
|
|
|
@@ -119,6 +104,21 @@ const tableData = ref([])
|
|
|
const input = ref(props.val)
|
|
|
const inputCpmc = ref('')
|
|
|
const isLoading = ref(false)
|
|
|
+// console.log(input.value)
|
|
|
+
|
|
|
+
|
|
|
+// const ongdwhfanclick = () => {
|
|
|
+// const workOrder = gdwhformData.cpgyfan;
|
|
|
+// handleSearch();
|
|
|
+// }
|
|
|
+
|
|
|
+// PrintDetailList_list()
|
|
|
+
|
|
|
+// const PrintDetailList_list = async() => {
|
|
|
+ // 获取印件数据
|
|
|
+
|
|
|
+// }
|
|
|
+
|
|
|
|
|
|
const handleExcel = () => {
|
|
|
const el = document.getElementById('tab');
|
|
|
@@ -137,12 +137,33 @@ nextTick(() => {
|
|
|
handleSearch()
|
|
|
})
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+const gdwhformData = reactive({
|
|
|
+ // 下拉框选项数据
|
|
|
+ yinjian: [],
|
|
|
+ // 设置默认值
|
|
|
+ yjno: '',
|
|
|
+});
|
|
|
+
|
|
|
+
|
|
|
const handleSearch = async() => {
|
|
|
+ const response = await PrintDetailList({ workOrder:input.value});
|
|
|
+ // console.log(response)
|
|
|
+ if (response.code === 0) {
|
|
|
+ const noFields = response.data.map(item => item.no);
|
|
|
+ // console.log(noFields)
|
|
|
+ gdwhformData.yinjian = noFields
|
|
|
+ // 你可以在这里进一步处理 noFields,例如展示在页面上
|
|
|
+ } else {
|
|
|
+ console.error('查询失败:', response.msg);
|
|
|
+ }
|
|
|
if (!input.value) { return }
|
|
|
- const params = { order: input.value }
|
|
|
-
|
|
|
+ const params = { order: input.value,yjno:gdwhformData.yjno }
|
|
|
+ // console.log(params)
|
|
|
isLoading.value = true
|
|
|
const res = await getOrderWasteTotal(params)
|
|
|
+ // console.log(res)
|
|
|
isLoading.value = false
|
|
|
if (res.code === 0) {
|
|
|
inputCpmc.value = res.data?.[0]?.['product_name']
|