From 5a254a7606489147ccf6eda046e725019e676b4e Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期四, 21 十一月 2024 15:01:32 +0800
Subject: [PATCH] 1.生产订单 新增导出子件和明细 功能
---
src/views/workOrder/produceOrderList.vue | 231 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 227 insertions(+), 4 deletions(-)
diff --git a/src/views/workOrder/produceOrderList.vue b/src/views/workOrder/produceOrderList.vue
index f9c7b6c..935c3fa 100644
--- a/src/views/workOrder/produceOrderList.vue
+++ b/src/views/workOrder/produceOrderList.vue
@@ -12,6 +12,14 @@
<div style="display: flex">
<el-button
v-waves
+ type="success"
+ icon="el-icon-download"
+ @click="download"
+ >瀵煎嚭瀛愪欢
+ </el-button>
+
+ <el-button
+ v-waves
type="primary"
icon="el-icon-bottom"
@click="batchHandle"
@@ -375,7 +383,7 @@
<el-table-column
label="鎿嶄綔"
fixed="right"
- width="120"
+ width="150"
>
<template slot-scope="{row}">
<div class="operationClass">
@@ -405,6 +413,16 @@
@click="orderDel(row.id)"
/>
</el-tooltip>
+
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="鏄庣粏" placement="top">
+ <i
+ class="el-icon-tickets"
+ :style="{color:$store.state.settings.theme}"
+ style="cursor: pointer;margin-left: 15px"
+ @click="orderDetail(row.sbid)"
+ />
+ </el-tooltip>
+
</div>
</template>
</el-table-column>
@@ -533,6 +551,157 @@
</div>
</span>
</el-dialog>
+
+ <!-- 鏄庣粏-->
+ <el-dialog
+ v-el-drag-dialog
+ title="鏄庣粏"
+ :visible.sync="dialogDetailVisible"
+ width="1500px"
+ :close-on-click-modal="false"
+ top="15vh"
+ @closed="handleDetailClose"
+ @close="handleDetailClose"
+ >
+
+ <div>
+
+ <el-table
+ ref="tableDataRef"
+ class="tableFixed"
+ :data="tableDataDetail"
+ height="500px"
+ border
+ row-class-name="custom-row"
+ :style="{width: 100+'%',height:'500px'}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="sortChange2"
+ >
+ <el-table-column
+ prop="rowNum"
+ width="50"
+ fixed
+ label="搴忓彿"
+ />
+ <el-table-column
+ prop="SortSeq"
+ label="瀛愪欢琛屽彿"
+ show-overflow-tooltip
+ min-width="105"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partcode"
+ label="瀛愪欢缂栫爜"
+ show-overflow-tooltip
+ min-width="105"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partname"
+ label="瀛愪欢鍚嶇О"
+ sortable="custom"
+ show-overflow-tooltip
+ min-width="105"
+ />
+ <el-table-column
+ prop="partspec"
+ label="瀛愪欢瑙勬牸"
+ show-overflow-tooltip
+ min-width="105"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ {{ row.partspec?row.partspec:'/' }}
+ </template>
+ </el-table-column>
+ <!-- <el-table-column-->
+ <!-- prop="stockcode"-->
+ <!-- label="浠撳簱缂栫爜"-->
+ <!-- show-overflow-tooltip-->
+ <!-- width="105"-->
+ <!-- sortable="custom"-->
+ <!-- />-->
+ <el-table-column
+ prop="stockname"
+ label="浠撳簱鍚嶇О"
+ show-overflow-tooltip
+ min-width="105"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="unitname"
+ label="璁¢噺鍗曚綅"
+ show-overflow-tooltip
+ min-width="105"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="BaseQtyN"
+ label="鍩烘湰鐢ㄩ噺"
+ show-overflow-tooltip
+ min-width="105"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="BaseQtyD"
+ label="鍩虹鏁伴噺"
+ show-overflow-tooltip
+ min-width="105"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="CompScrap"
+ label="瀛愪欢鎹熻�楃巼(%)"
+ show-overflow-tooltip
+ min-width="140"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="exqty"
+ label="浣跨敤鏁伴噺"
+ show-overflow-tooltip
+ min-width="105"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="Qty"
+ min-width="105"
+ label="搴旈鏁伴噺"
+ show-overflow-tooltip
+ sortable="custom"
+ />
+ </el-table>
+
+ <!--鍒嗛〉-->
+ <pagination
+ style="margin-top: 10px;"
+ :total="tableDataDetailTotal"
+ :page.sync="formDetail.page"
+ :limit.sync="formDetail.rows"
+ align="right"
+ layout="total,prev, pager, next,sizes,jumper"
+ popper-class="select_bottom"
+ @pagination="getErpOrderSubItemSearch"
+ />
+ </div>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button v-waves @click="dialogVisibleDetailCancel">杩� 鍥�</el-button>
+ <!-- <el-button-->
+ <!-- v-waves-->
+ <!-- type="primary"-->
+ <!-- :loading="$store.state.app.buttonIsDisabled"-->
+ <!-- :disabled="$store.state.app.buttonIsDisabled"-->
+ <!-- @click="dialogVisibleDeatilConfirm"-->
+ <!-- >纭� 瀹�</el-button>-->
+ </div>
+ </span>
+ </el-dialog>
+
</div>
</template>
@@ -543,8 +712,8 @@
import waves from '@/directive/waves'
import {
ClosedErpOrder,
- DeleteErpOrder,
- ErpOrderSearch,
+ DeleteErpOrder, ErpOrderExcelSearch,
+ ErpOrderSearch, ErpOrderSubItemSearch,
MarkBatchSaveErpOrder,
MarkSaveErpOrder
} from '@/api/WorkOrder'
@@ -659,7 +828,18 @@
return time.getTime() < Date.now() - 8.64e7
}
},
- multipleSelection: []
+ multipleSelection: [],
+
+ dialogDetailVisible: false,
+ tableDataDetail: [],
+ tableDataDetailTotal: 10,
+ formDetail: {
+ MoDID: '', // 鐢熶骇璁㈠崟鏄庣粏ID
+ prop: 'SortSeq', // 鎺掑簭瀛楁
+ order: 'asc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ }
// expireTimeOption: {
// disabledDate(time) {
@@ -680,6 +860,49 @@
this.getHeight()
},
methods: {
+ // 璁㈠崟瀵煎嚭
+ async download() {
+ const res = await ErpOrderExcelSearch(this.form)
+ window.location.href = res.data
+ },
+ // 鏄庣粏
+ orderDetail(val) {
+ this.formDetail.MoDID = val
+ this.getErpOrderSubItemSearch()
+ this.dialogDetailVisible = true
+ },
+ // 鑾峰彇鏄庣粏鎺ュ彛
+ async getErpOrderSubItemSearch() {
+ const res = await ErpOrderSubItemSearch(this.formDetail)
+ this.tableDataDetail = res.data
+ this.tableDataDetailTotal = res.count
+ },
+ handleDetailClose() {
+ this.tableDataDetail = []
+ this.formDetail = {
+ MoDID: '', // 鐢熶骇璁㈠崟鏄庣粏ID
+ prop: 'SortSeq', // 鎺掑簭瀛楁
+ order: 'asc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ }
+ },
+ dialogVisibleDetailCancel() {
+ this.dialogDetailVisible = false
+ },
+ // 鎺掑簭鏀瑰彉鏃�
+ sortChange2({ column, prop, order }) {
+ if (order === 'descending') {
+ order = 'desc'
+ } else if (order === 'ascending') {
+ order = 'asc'
+ } else {
+ order = 'desc'
+ }
+ this.form.order = order
+ this.form.prop = prop
+ this.getErpOrderSearch()
+ },
async getPrentOrganizationNoCompany() {
const { data: res } = await PrentOrganizationNoCompany()
this.wkshopcodeArr = res
--
Gitblit v1.9.3