|
@@ -0,0 +1,101 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="page-container column-container">
|
|
|
|
+ <!-- 搜索区 -->
|
|
|
|
+ <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
|
|
|
|
+ <el-form-item class="section-title" label="生产计划" />
|
|
|
|
+ <el-form-item label="产品描述:">
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入产品描述"
|
|
|
|
+ v-model.trim="queryParams.keywords"
|
|
|
|
+ @keyup.enter="handleQuery"
|
|
|
|
+ @keydown.enter.prevent
|
|
|
|
+ clearable
|
|
|
|
+ style="width: 200px"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="info" icon="Search" @click="handleQuery"> <i class="el-icon-thumb" aria-hidden="true" />搜索 </el-button>
|
|
|
|
+ <el-button type="success" icon="Refresh" @click="handleQuery">刷新</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div class="el-table-container">
|
|
|
|
+ <div class="el-table-inner-container">
|
|
|
|
+ <el-table
|
|
|
|
+ ref="dayworkTable"
|
|
|
|
+ :data="dayworkList"
|
|
|
|
+ v-loading="dayworkLoading"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ height="100%"
|
|
|
|
+ @current-change="handleDayworkCurrentChange"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column label="客户简称" prop="companyAlias" width="150" align="center" />
|
|
|
|
+ <el-table-column label="生产计划单号" prop="productionPlanNo" width="110" align="center" />
|
|
|
|
+ <el-table-column label="批次号" prop="lotCode" width="110" align="center" />
|
|
|
|
+ <el-table-column label="产品描述" prop="productDescription" align="center" />
|
|
|
|
+ <el-table-column label="图纸版本" prop="technologyVersion" width="70" align="center" />
|
|
|
|
+ <el-table-column label="投产量" prop="productionQuantity" width="80" align="center" />
|
|
|
|
+ <el-table-column label="下达日期" prop="issueDate" width="120" align="center" />
|
|
|
|
+ <el-table-column label="当前工序" width="70" align="center" />
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 分页 -->
|
|
|
|
+ <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getDayworks" />
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script setup>
|
|
|
|
+import { listDaywork } from '@/api/business/daywork.js'
|
|
|
|
+const { proxy } = getCurrentInstance()
|
|
|
|
+
|
|
|
|
+/** daywork 列表 */
|
|
|
|
+const dayworkList = ref([])
|
|
|
|
+const dayworkTable = ref(null)
|
|
|
|
+
|
|
|
|
+/** daywork 批次 */
|
|
|
|
+const currentDaywork = ref({})
|
|
|
|
+const dayworkLoading = ref(true)
|
|
|
|
+
|
|
|
|
+const total = ref(0)
|
|
|
|
+
|
|
|
|
+/** 查询对象 */
|
|
|
|
+const queryParams = ref({
|
|
|
|
+ keywords: '',
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+/*********************** 方法区 ****************************/
|
|
|
|
+
|
|
|
|
+/**查询计划明细 */
|
|
|
|
+function getDayworks() {
|
|
|
|
+ dayworkLoading.value = true
|
|
|
|
+ listDaywork(queryParams.value).then((res) => {
|
|
|
|
+ dayworkList.value = res.rows
|
|
|
|
+ total.value = res.total
|
|
|
|
+ dayworkLoading.value = false
|
|
|
|
+ // 批次
|
|
|
|
+ if (dayworkList.value.length > 0) {
|
|
|
|
+ proxy.$refs.dayworkTable.setCurrentRow(dayworkList.value[0])
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+/** 搜索按钮操作 */
|
|
|
|
+function handleQuery() {
|
|
|
|
+ queryParams.value.pageNum = 1
|
|
|
|
+ getDayworks()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/** 生产计划明细 current-change 事件 */
|
|
|
|
+function handleDayworkCurrentChange(row) {
|
|
|
|
+ if (row) {
|
|
|
|
+ currentDaywork.value = row
|
|
|
|
+ } else {
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+onMounted(() => {
|
|
|
|
+ getDayworks()
|
|
|
|
+})
|
|
|
|
+</script>
|
|
|
|
+<style scoped></style>
|