|
|
@@ -1,27 +1,68 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<layout>
|
|
|
- <!-- <layout-header>
|
|
|
+ <layout-header>
|
|
|
<div class="">
|
|
|
- <el-form ref="elSearchFormRef" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
|
|
|
+ <el-form ref="elSearchFormRef" class="demo-form-inline" :rules="searchRule">
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="searchInfo" placeholder="搜索" clearable style="width: 180px;"></el-input>
|
|
|
- <el-button type="primary" icon="search" @click="onSubmit"
|
|
|
- style="margin: 0px 5px 0px 0px;width: 80px;height:40px;border-radius: 5%;">查询</el-button>
|
|
|
+ <el-input v-model="searchInfo" placeholder="搜索订单编号" style="width: 180px;" @keyup.enter="onSubmit()"></el-input>
|
|
|
+ <el-button type="primary" icon="search" @click="onSubmit" title="搜索">查询</el-button>
|
|
|
+ <el-button type="primary" icon="document" @click="statusExcel" title="查看当前月产量汇总">产量进度表汇总</el-button>
|
|
|
+ <el-button type="danger" icon="delete" title="请选择要删除的数据" @click="del_delclick" v-if="delall === true"
|
|
|
+ :disabled="Selection === ''" class="bt"
|
|
|
+ :style="{
|
|
|
+ backgroundColor: Selection === '' ? '' : 'red',
|
|
|
+ borderColor: Selection === '' ? '' : 'red',
|
|
|
+ color: Selection === '' ? '' : '#fff'
|
|
|
+ }">删除报工
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <!-- 查询产量进度表弹窗 -->
|
|
|
+ <el-dialog v-model="statusExceldialog" :before-close="luckyexcelCloseDialog" style='height: 100%;margin: 0px;' width="100%" >
|
|
|
+ <div class="block">
|
|
|
+ <span class="demonstration">月份选择:</span>
|
|
|
+ <el-date-picker v-model="ExcelformData['rq']" type="month" placeholder="选择月份"style='width: 10%;'></el-date-picker>
|
|
|
+ <el-button type="primary" @click="ExcelonSubmit" style='margin-left: 10px;'>查询</el-button>
|
|
|
+ <el-button type="primary" class="bt" icon="download" @click="exportToExcel2" >导出Excel</el-button>
|
|
|
+ </div>
|
|
|
+ <br>
|
|
|
+ <el-table ref="multipleTable" style="width: 100%;height: 80vh" tooltip-effect="dark"
|
|
|
+ :row-style="{ height: '30px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
+ :data="ExceltableData" border row-key="ID" id="Excel_table"
|
|
|
+ size="small" highlight-current-row="true" :show-overflow-tooltip="true"
|
|
|
+ @row-click="add_tableRowClick" @row-dblclick="add_updateCompanyFunc"
|
|
|
+ @selection-change="Excel_Selection">
|
|
|
+ <el-table-column align="left" label="订单编号" prop="订单编号" width="105"/>
|
|
|
+ <el-table-column align="left" label="客户" prop="客户编号" width="70"/>
|
|
|
+ <el-table-column align="left" label="组别" prop="组别" width="80"/>
|
|
|
+ <el-table-column align="left" label="款式" prop="款式" width="110"/>
|
|
|
+ <el-table-column align="left" label="生产款号" prop="款号" width="110"/>
|
|
|
+ <el-table-column align="left" label="制单数" prop="制单数" width="75"/>
|
|
|
+ <el-table-column align="left" label="裁剪数" prop="裁剪数" width="75"/>
|
|
|
+ <el-table-column align="left" label="上月累计" prop="上月累计" width="75"/>
|
|
|
+ <el-table-column align="left" label="本月累计" prop="本月累计" width="75"/>
|
|
|
+
|
|
|
+ <!-- 动态生成从 1 号到 31 号的列 -->
|
|
|
+ <el-table-column v-for="day in 31" :key="day" :label="day" :prop="day" width="45" align="left"/>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- </layout-header> -->
|
|
|
+ </layout-header>
|
|
|
|
|
|
<layout>
|
|
|
<!--左侧树侧形结构-->
|
|
|
<layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
|
|
|
- <div class="JKWTree-tree" style="height: 200px">
|
|
|
+ <div class="JKWTree-tree" style="height: 200px">
|
|
|
<h3>报工数据</h3>
|
|
|
<el-tree :data="treeData" class="treecolor" @node-click="handleNodeClick"></el-tree>
|
|
|
</div>
|
|
|
+
|
|
|
</layout-sider>
|
|
|
-
|
|
|
+
|
|
|
<!-- 右侧区域 -->
|
|
|
<layout-content >
|
|
|
<el-main>
|
|
|
@@ -30,133 +71,31 @@
|
|
|
<el-table ref="multipleTable" style="width: 100%;height: 65vh" tooltip-effect="dark"
|
|
|
:row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
- :data="tableData" border row-key="ID"
|
|
|
- size="small"
|
|
|
+ :data="tableData" border row-key="ID"
|
|
|
+ size="small" show-summary :summary-method="getSummaries"
|
|
|
highlight-current-row="true" @row-dblclick="updateCompanyFunc"
|
|
|
@row-click="tableRowClick" :show-overflow-tooltip="true"
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
- <!-- <el-table-column type="selection" width="55" /> -->
|
|
|
- <el-table-column sortable align="left" label="订单编号" prop="订单编号" width="120"/>
|
|
|
- <el-table-column sortable align="left" label="子订单编号" prop="子订单编号" width="140"/>
|
|
|
- <el-table-column sortable align="left" label="款号" prop="款号" width="125"/>
|
|
|
- <el-table-column sortable align="left" label="色系名称" prop="颜色" width="127"/>
|
|
|
- <el-table-column sortable align="left" label="船样" prop="船样" width="80"/>
|
|
|
- <el-table-column sortable align="left" label="尺码" prop="尺码" width="80"/>
|
|
|
- <el-table-column sortable align="left" label="上报数量" prop="已完成" width="105"/>
|
|
|
- <el-table-column sortable align="left" label="制单总数" prop="制单数" width="105"/>
|
|
|
- <el-table-column sortable align="left" label="上报时间" prop="上报时间" width="160"/>
|
|
|
+ @selection-change="selectionChange">
|
|
|
+ <el-table-column align="center" type="selection" width="30"/>
|
|
|
+ <el-table-column align="left" label="订单编号" prop="订单编号" width="98"/>
|
|
|
+ <el-table-column align="left" label="客户编号" prop="客户编号" width="80"/>
|
|
|
+ <el-table-column align="left" label="款式" prop="款式" width="100"/>
|
|
|
+ <el-table-column align="left" label="生产款号" prop="生产款号" width="110"/>
|
|
|
+ <!-- 尺码列表 -->
|
|
|
+ <template v-for="item in sizeDatas">
|
|
|
+ <el-table-column align="left" :label=item :prop=item width="80"/>
|
|
|
+ </template>
|
|
|
+ <el-table-column align="left" label="制单数" prop="制单数" width="80"/>
|
|
|
+ <el-table-column align="left" label="上报时间" prop="上报时间" width="150"/>
|
|
|
+ <el-table-column align="left" label="船样" prop="船样" width="70"/>
|
|
|
+
|
|
|
</el-table>
|
|
|
- <!-- 分页 -->
|
|
|
<div class="gva-pagination">
|
|
|
<el-pagination layout="total" :current-page="page" :page-size="pageSize"
|
|
|
:total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
|
|
|
- <!-- <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page" :page-size="pageSize" :page-sizes="[10, 30, 50, 100]"-->
|
|
|
- <!-- :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />-->
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 修改弹窗 -->
|
|
|
- <el-dialog v-model="dialogFormVisible" :before-close="edit_closeDialog" destroy-on-close style="width: 60%; height: 70%;">
|
|
|
- <h1 style="margin: 0%;margin-bottom: 10px;">出库报工修改</h1>
|
|
|
- <el-row :gutter="24" style="margin-bottom: 20px;">
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="订单号:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
|
|
|
- <el-input v-model="edit_formData['订单号']" style="width: 70%; height: 40px;" id="订单号:" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="生产款号:" prop="deliveryDate" class="mab" label-width="120px" style="font-size: 20px; margin: 10px;">
|
|
|
- <el-input v-model="edit_formData['生产款号']" style="width: 70%; height: 40px;" id="生产款号" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <el-row :gutter="24" style="margin-bottom: 20px;">
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="款式:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
|
|
|
- <el-input v-model="edit_formData['款式']" style="width: 70%; height: 40px;" id="款式" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="颜色:" prop="deliveryDate" class="mab" label-width="120px" style="font-size: 20px; margin: 10px;">
|
|
|
- <el-input v-model="edit_formData['颜色']" style="width: 70%; height: 40px;" id="颜色" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <el-row :gutter="24" style="margin-bottom: 20px;">
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="工序:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
|
|
|
- <el-input v-model="edit_formData['工序']" style="width: 70%; height: 40px;" id="工序" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="面料出库人:" prop="deliveryDate" class="mab" label-width="120px" style="font-size: 20px; margin: 10px;">
|
|
|
- <el-input v-model="edit_formData['面料出库人']" style="width: 70%; height: 40px;" id="面料出库人" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <el-row :gutter="24" style="margin-bottom: 20px;">
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="日期:" prop="deliveryDate" class="mab" label-width="80px" style="font-size: 20px; margin: 10px;">
|
|
|
- <el-input v-model="edit_formData['日期']" style="width: 70%; height: 40px;" id="日期" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <template #footer>
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button @click="edit_closeDialog" style="width: 110px;height: 60px;font-size: 20px;">取消</el-button>
|
|
|
- <el-button type="primary" @click="edit_Dialog" style="width: 110px;height: 60px;font-size: 20px;">确认</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
-
|
|
|
- <!-- 新增弹窗 -->
|
|
|
- <el-dialog v-model="AttendanceVisible" destroy-on-close style="width: 100%;height: 100%;margin: 0px;">
|
|
|
- <h1 style="margin: 0%;margin-bottom: 10px;">新增</h1>
|
|
|
- <el-row :gutter="24" style="margin-bottom: 20px;">
|
|
|
- <el-input v-model="add_searchInfo" placeholder="扫描订单二维码获取订单信息"
|
|
|
- @keyup.enter="add_onSubmit"
|
|
|
- id="searchInput"
|
|
|
- style="width: 270px;margin: 5px;height: 50px;">
|
|
|
- </el-input>
|
|
|
- <el-button type="primary" icon="search" @click="add_onSubmit" style="margin: 5px;height: 50px;">查询</el-button>
|
|
|
-
|
|
|
- <el-form-item label="日期:" prop="deliveryDate" class="mab" label-width="100" style="font-size: 30px;margin: 10px;">
|
|
|
- <el-date-picker v-model="add_riqiformData['日期']" type="date" style="width: 150px;height: 40px;"/>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <el-row :gutter="24" style="margin-bottom: 50px;">
|
|
|
- <el-table ref="multipleTable" style="width: 100%;height: 54vh" tooltip-effect="dark"
|
|
|
- :row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px' }"
|
|
|
- :cell-style="{ padding: '10px' }" :header-row-style="{ height: '20px' }"
|
|
|
- :data="add_tableData" border row-key="ID"
|
|
|
- size="small" highlight-current-row="true" @row-dblclick="add_updateCompanyFunc"
|
|
|
- @row-click="add_tableRowClick" :show-overflow-tooltip="true"
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
- <el-table-column sortable align="left" label="订单编号" prop="订单编号" width="105"/>
|
|
|
- <el-table-column sortable align="left" label="子订单编号" prop="子订单编号" width="110"/>
|
|
|
- <el-table-column sortable align="left" label="款号" prop="款号" width="110"/>
|
|
|
- <el-table-column sortable align="left" label="颜色" prop="颜色" width="110"/>
|
|
|
- <el-table-column sortable align="left" label="船样" prop="船样" width="110"/>
|
|
|
- <el-table-column sortable align="left" label="制单数" prop="制单数" width="110"/>
|
|
|
- <el-table-column sortable align="left" label="已完成" prop="已完成" width="110"/>
|
|
|
- </el-table>
|
|
|
- </el-row>
|
|
|
- <template #footer>
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button @click="add_closeDialog" style="width: 110px;height: 60px;font-size: 20px;">取消</el-button>
|
|
|
- <el-button type="primary" @click="add_Dialog" style="width: 110px;height: 60px;font-size: 20px;">确认出库</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
-
|
|
|
</el-main>
|
|
|
</layout-content>
|
|
|
</layout>
|
|
|
@@ -231,379 +170,531 @@
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
- </script>
|
|
|
- <script setup>
|
|
|
- // 全量引入格式化工具 请按需保留
|
|
|
- import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
|
-
|
|
|
- import {ref, reactive} from 'vue'
|
|
|
- import {MachineList,MachineDetail} from '@/api/mes/job'
|
|
|
- import {ElMessage} from "element-plus";
|
|
|
- defineOptions({name: 'Company'})
|
|
|
-
|
|
|
- // =========== 获取左侧树侧形结构 ===========
|
|
|
- const treeData = ref({})
|
|
|
- const DataListdata = async () => {
|
|
|
- try {
|
|
|
- const response = await MachineList();
|
|
|
- const data = response.data;
|
|
|
- treeData.value = formatTreeData(data);
|
|
|
- } catch (error) {
|
|
|
- console.error(error);
|
|
|
- }
|
|
|
- };
|
|
|
- DataListdata();
|
|
|
-
|
|
|
-// 格式化数据为 el-tree 组件要求的格式,同时在日期节点中保存父节点信息
|
|
|
-const formatTreeData = (data) => {
|
|
|
- return Object.keys(data).map(category => ({
|
|
|
- label: category,
|
|
|
- children: Object.keys(data[category]).map(group => ({
|
|
|
- label: group,
|
|
|
- // 在日期节点中存储其父组名(简写)
|
|
|
- children: data[category][group].map(item => ({
|
|
|
- label: item.split(' ')[0], // 保留日期部分
|
|
|
- parentGroup: group.split('--')[0] // 保留组名的简写部分
|
|
|
- }))
|
|
|
- }))
|
|
|
- }));
|
|
|
-};
|
|
|
-
|
|
|
- //点击左侧树形 获取右侧table列表
|
|
|
- const tableData = reactive([]);
|
|
|
- const _Machine = ref('');
|
|
|
- const _Machine_riqi = ref('');
|
|
|
- let parentGroup = '';
|
|
|
- //左侧
|
|
|
- const handleNodeClick = async (node) => {
|
|
|
- // 取消所有节点的颜色
|
|
|
- const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
|
|
|
- allNodes.forEach(node => {
|
|
|
- node.querySelector('.el-tree-node__label').style.color = '';
|
|
|
- });
|
|
|
- // 获取点击的节点
|
|
|
- const clickedNodeId = node['$treeNodeId'];
|
|
|
- const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${clickedNodeId}"]`);
|
|
|
- if (clickedNode) {
|
|
|
- // 给当前点击的节点改变颜色
|
|
|
- clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
|
|
|
- }
|
|
|
- tableData.splice(0,tableData.length,...[]);//表格数据
|
|
|
- if (node.children) {
|
|
|
- // 如果是组节点,获取组名的简写
|
|
|
- _Machine.value = node.label.split('--')[0];
|
|
|
- _Machine_riqi.value = ''; // 清空日期
|
|
|
- } else {
|
|
|
- // 如果是日期节点,直接从节点中获取父组名和日期
|
|
|
- _Machine.value = node.parentGroup;
|
|
|
- _Machine_riqi.value = node.label;
|
|
|
- }
|
|
|
- console.log(_Machine.value);
|
|
|
- console.log( _Machine_riqi.value);
|
|
|
-
|
|
|
- _getStaffList();
|
|
|
- };
|
|
|
-
|
|
|
+</script>
|
|
|
+<script setup>
|
|
|
+// 全量引入格式化工具 请按需保留
|
|
|
+import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
|
+import * as XLSX from 'xlsx'
|
|
|
+import FileSaver from 'file-saver'
|
|
|
+import {ref, reactive,onMounted } from 'vue'
|
|
|
+import {MachineList,MachineDetail,getOneWorkOrder,spotcheckdel} from '@/api/mes/job'
|
|
|
+import {ElMessage} from "element-plus";
|
|
|
+import { useUserStore } from '@/pinia/modules/user';
|
|
|
+defineOptions({name: 'Company'})
|
|
|
+//获取登录用户信息
|
|
|
+const userStore = useUserStore()
|
|
|
+const _username = ref('')
|
|
|
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
|
|
|
+console.log('获取用户名称',_username.value)
|
|
|
+//全局获取当前日期
|
|
|
+const today = new Date();
|
|
|
+const year = today.getFullYear();
|
|
|
+const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
|
|
|
+const day = String(today.getDate()).padStart(2, '0');
|
|
|
+const hours = String(today.getHours()).padStart(2, '0');
|
|
|
+const minutes = String(today.getMinutes()).padStart(2, '0');
|
|
|
+const seconds = String(today.getSeconds()).padStart(2, '0');
|
|
|
+const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
+const currentDates = `${year}-${month}-${day}`;
|
|
|
+const treeData = ref([]);
|
|
|
+
|
|
|
|
|
|
- // const handleNodeExpand = async (node) => {
|
|
|
- // // _department_code.value = node['编号'];
|
|
|
- // searchInfo.value = '';
|
|
|
- // _getStaffList();
|
|
|
- // }
|
|
|
-
|
|
|
- // =========== 搜索 ===========
|
|
|
- const searchInfo = ref('')
|
|
|
- const _department_code = ref(null)
|
|
|
- //查询
|
|
|
- const onSubmit = () => {
|
|
|
- _department_code.value = '';
|
|
|
- if(searchInfo.value === ''){
|
|
|
- tableData.length = 0;
|
|
|
- }else{
|
|
|
- _getStaffList();
|
|
|
- }
|
|
|
- };
|
|
|
- //调用报工数据接口
|
|
|
- const _getStaffList = async ()=>{
|
|
|
- try {
|
|
|
- if(_Machine_riqi.value === ''){
|
|
|
- const WorkListdata = await MachineDetail({ machine: _Machine.value });
|
|
|
- console.log(WorkListdata);
|
|
|
- // 遍历数据,将 "船样" 由 0/1 转换为 "否"/"是"
|
|
|
- WorkListdata.data.forEach(item => {
|
|
|
- item.船样 = item.船样 === 1 ? '是' : '否'; // 将 1 转换为 "是",0 转换为 "否"
|
|
|
- });
|
|
|
- // 更新表格数据
|
|
|
- tableData.splice(0, tableData.length, ...WorkListdata.data);
|
|
|
- }else{
|
|
|
- const WorkListdata = await MachineDetail({machine:_Machine.value,date:_Machine_riqi.value});
|
|
|
- console.log(WorkListdata)
|
|
|
- // 遍历数据,将 "船样" 由 0/1 转换为 "否"/"是"
|
|
|
- WorkListdata.data.forEach(item => {
|
|
|
- item.船样 = item.船样 === 1 ? '是' : '否'; // 将 1 转换为 "是",0 转换为 "否"
|
|
|
- });
|
|
|
- tableData.splice(0,tableData.length,...WorkListdata.data);//表格数据
|
|
|
- }
|
|
|
- // total.value =WorkListdata.data.total;//共多少条
|
|
|
- } catch (error) {
|
|
|
- console.error(error);
|
|
|
+const DataListdata = async () => {
|
|
|
+ try {
|
|
|
+ const response = await MachineList(); // 假设 MachineList 是一个已定义的 API 请求函数
|
|
|
+ const data = response.data;
|
|
|
+
|
|
|
+ // 初始化树形结构数据
|
|
|
+ treeData.value = [];
|
|
|
+
|
|
|
+ // 遍历 data 对象
|
|
|
+ for (const [yearMonth, machineList] of Object.entries(data)) {
|
|
|
+ // 创建一个新的一级节点(年月)
|
|
|
+ const yearMonthNode = {
|
|
|
+ label: yearMonth, // 年月作为一级节点
|
|
|
+ children: [] // 二级节点的容器
|
|
|
+ };
|
|
|
+
|
|
|
+ // 遍历每个生产工序
|
|
|
+ for (const [process, machines] of Object.entries(machineList)) {
|
|
|
+ // 创建一个新的二级节点(生产工序)
|
|
|
+ const processNode = {
|
|
|
+ label: process, // 生产工序作为二级节点
|
|
|
+ children: [] // 机器信息的容器
|
|
|
+ };
|
|
|
+
|
|
|
+ // 遍历每个机器编号及其日期
|
|
|
+ for (const [machine, dates] of Object.entries(machines)) {
|
|
|
+ // 创建一个三级节点(机器编号)
|
|
|
+ const machineNode = {
|
|
|
+ label: machine, // 机器编号作为三级节点
|
|
|
+ children: dates.map(date => ({ label: date, parent: null })) // 日期作为四级节点
|
|
|
+ };
|
|
|
+
|
|
|
+ // 为每个日期节点添加 `parent` 属性指向机器节点
|
|
|
+ machineNode.children.forEach(dateNode => {
|
|
|
+ dateNode.parent = machineNode;
|
|
|
+ });
|
|
|
+
|
|
|
+ // 将机器节点的 `parent` 指向生产工序节点
|
|
|
+ machineNode.parent = processNode;
|
|
|
+
|
|
|
+ // 将该机器节点添加到对应的生产工序下
|
|
|
+ processNode.children.push(machineNode);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 将生产工序节点的 `parent` 指向年月节点
|
|
|
+ processNode.parent = yearMonthNode;
|
|
|
+
|
|
|
+ // 将生产工序节点添加到对应的年月节点下
|
|
|
+ yearMonthNode.children.push(processNode);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 将年月节点添加到树形结构的根节点
|
|
|
+ treeData.value.push(yearMonthNode);
|
|
|
}
|
|
|
+ } catch (error) {
|
|
|
+ console.error(error);
|
|
|
}
|
|
|
+};
|
|
|
+DataListdata();
|
|
|
|
|
|
- // =========== 新增按钮 ===========
|
|
|
- const AttendanceVisible=ref(false)
|
|
|
- const add_tableData = reactive([]);
|
|
|
- // 获取当前日期
|
|
|
- const today = new Date();
|
|
|
- const year = today.getFullYear();
|
|
|
- const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
|
|
|
- const day = String(today.getDate()).padStart(2, '0');
|
|
|
- const hours = String(today.getHours()).padStart(2, '0');
|
|
|
- const minutes = String(today.getMinutes()).padStart(2, '0');
|
|
|
- const seconds = String(today.getSeconds()).padStart(2, '0');
|
|
|
- const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
-
|
|
|
- //新增按钮
|
|
|
- const onAttendance = () => {
|
|
|
- AttendanceVisible.value=true
|
|
|
- setTimeout(() => {
|
|
|
- const inputElement = document.querySelector('#searchInput');
|
|
|
- if (inputElement) {
|
|
|
- inputElement.focus();
|
|
|
- }
|
|
|
- }, 100); // 延迟100毫秒
|
|
|
- add_riqiformData['日期'] = currentDate
|
|
|
- };
|
|
|
- const add_riqiformData = reactive({
|
|
|
- 日期: '',
|
|
|
+// 点击左侧树形 获取右侧 table 列表
|
|
|
+const tableData = reactive([]);
|
|
|
+const _Machine = ref('');
|
|
|
+const _Machine_riqi = ref('');
|
|
|
+let parentGroup = '';
|
|
|
+
|
|
|
+// 左侧树形节点点击事件
|
|
|
+const handleNodeClick = async (node) => {
|
|
|
+ // 重置所有节点颜色
|
|
|
+ document.querySelectorAll('.treecolor .el-tree-node').forEach(node => {
|
|
|
+ node.querySelector('.el-tree-node__label').style.color = '';
|
|
|
});
|
|
|
- // 新增确定
|
|
|
- const add_Dialog = () => {
|
|
|
- AttendanceVisible.value = false
|
|
|
- };
|
|
|
- // 新增取消
|
|
|
- const add_closeDialog = () => {
|
|
|
- AttendanceVisible.value = false
|
|
|
- };
|
|
|
-
|
|
|
- // =========== 新增搜索 ===========
|
|
|
- const add_searchInfo = ref('')
|
|
|
- //点击【查询】按钮
|
|
|
- const add_onSubmit = async ()=>{
|
|
|
-
|
|
|
- if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
|
|
|
- const WorkListdata = [];
|
|
|
- add_tableData.splice(0,add_tableData.length,...WorkListdata);
|
|
|
- ElMessage({type: 'warning',message: '搜索内容不能为空' })
|
|
|
- }else{
|
|
|
- console.log(add_searchInfo.value)
|
|
|
- if(add_searchInfo.value === '2408001'){
|
|
|
- const WorkListdata = [
|
|
|
- {
|
|
|
- '订单子编号':'2408001-1',
|
|
|
- '订单号':'2408001',
|
|
|
- '生产款号':'2401-1622款',
|
|
|
- '款式':'连衣裙',
|
|
|
- '颜色':'红色'
|
|
|
- },
|
|
|
- {
|
|
|
- '订单子编号':'2408001-2',
|
|
|
- '订单号':'2408001',
|
|
|
- '生产款号':'2401-1623款',
|
|
|
- '款式':'长袖',
|
|
|
- '颜色':'蓝色'
|
|
|
- },
|
|
|
- ];
|
|
|
- add_tableData.splice(0,add_tableData.length,...WorkListdata);//表格数据
|
|
|
- }else if(add_searchInfo.value === '2408002'){
|
|
|
- const WorkListdata = [
|
|
|
- {
|
|
|
- '订单子编号':'2408002-2',
|
|
|
- '订单号':'2408002',
|
|
|
- '生产款号':'2402-1624款',
|
|
|
- '款式':'西服',
|
|
|
- '颜色':'白色'
|
|
|
- },
|
|
|
- ];
|
|
|
- add_tableData.splice(0,add_tableData.length,...WorkListdata);//表格数据
|
|
|
- }else if(add_searchInfo.value === '2408003'){
|
|
|
- const WorkListdata = [
|
|
|
- {
|
|
|
- '订单子编号':'2408003-3',
|
|
|
- '订单号':'2408003',
|
|
|
- '生产款号':'2403-1625款',
|
|
|
- '款式':'西服',
|
|
|
- '颜色':'白色'
|
|
|
- },
|
|
|
- ];
|
|
|
- add_tableData.splice(0,add_tableData.length,...WorkListdata);//表格数据
|
|
|
- }
|
|
|
- add_searchInfo.value = '';
|
|
|
- setTimeout(() => {
|
|
|
- const inputElement = document.querySelector('#searchInput');
|
|
|
- if (inputElement) {
|
|
|
- inputElement.focus();
|
|
|
- }
|
|
|
- }, 100); // 延迟100毫秒
|
|
|
- }
|
|
|
- };
|
|
|
- // =========== 删除按钮 ===========
|
|
|
- const bgSelection = ref(null)
|
|
|
- const baogong_del = () => {
|
|
|
- if(bgSelection.value === null || bgSelection.value === ''){
|
|
|
- ElMessage({type: 'warning',message: '请选择删除的数据' })
|
|
|
- }else{
|
|
|
- console.log(bgSelection.value)
|
|
|
- }
|
|
|
- }
|
|
|
- // 复选框
|
|
|
- const handleSelectionChange = (selection, type) => {
|
|
|
- const ids = selection.map(item => {
|
|
|
- return item.订单子编号
|
|
|
- })
|
|
|
- bgSelection.value = ids.join(',')
|
|
|
+
|
|
|
+ // 获取当前点击的节点并设置颜色
|
|
|
+ const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${node['$treeNodeId']}"]`);
|
|
|
+ if (clickedNode) {
|
|
|
+ clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
|
|
|
}
|
|
|
-
|
|
|
- // =========== 修改 ===========
|
|
|
- const dialogFormVisible = ref(false)
|
|
|
- const edit_formData = ref({})
|
|
|
- // 双击修改
|
|
|
- const updateCompanyFunc = async (row) => {
|
|
|
- console.log(row)
|
|
|
- dialogFormVisible.value = true;
|
|
|
- Object.assign(edit_formData.value,row);
|
|
|
- };
|
|
|
- // 修改确认
|
|
|
- const edit_Dialog = async (row) => {
|
|
|
- dialogFormVisible.value = false;
|
|
|
- };
|
|
|
- // 修改取消
|
|
|
- const edit_closeDialog = async (row) => {
|
|
|
- dialogFormVisible.value = false;
|
|
|
- };
|
|
|
- // =========== 分页 ===========
|
|
|
- // 分页相关的响应式变量
|
|
|
- const page = ref(1)
|
|
|
- const total = ref(0)
|
|
|
- const pageSize = ref(10)
|
|
|
- // 分页
|
|
|
- const handleCurrentChange = (val) => {
|
|
|
- page.value = val;
|
|
|
- _getStaffList();
|
|
|
- };
|
|
|
-
|
|
|
- // 修改页面容量 点击多少条/页
|
|
|
- const handleSizeChange = (val) => {
|
|
|
- page.value = 10;//默认显示
|
|
|
- pageSize.value = val;
|
|
|
- _getStaffList();
|
|
|
- };
|
|
|
|
|
|
+ // 清空表格数据
|
|
|
+ tableData.splice(0, tableData.length);
|
|
|
|
|
|
-
|
|
|
+ // 判断点击节点的层级并设置相应值
|
|
|
+ if (!node.children || node.children.length === 0) { // 底层日期节点
|
|
|
+ _Machine_riqi.value = node.label; // 设置日期
|
|
|
+ const parentNode = node.parent;
|
|
|
|
|
|
-
|
|
|
- </script>
|
|
|
-
|
|
|
- <style scoped>
|
|
|
- .form-container {
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
+ // 获取机台名称
|
|
|
+ if (parentNode && parentNode.label.includes('--')) {
|
|
|
+ _Machine.value = parentNode.label.split('--')[0]; // 获取机台名
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 非日期节点时清空 _Machine 和 _Machine_riqi
|
|
|
+ _Machine.value = '';
|
|
|
+ _Machine_riqi.value = '';
|
|
|
}
|
|
|
+
|
|
|
+ // 调用获取员工列表的函数
|
|
|
+ _getStaffList();
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// =========== 搜索 ===========
|
|
|
+const searchInfo = ref('')
|
|
|
+const _department_code = ref('')
|
|
|
+//查询
|
|
|
+const onSubmit = () => {
|
|
|
+ _department_code.value = '';
|
|
|
+ if(searchInfo.value === ''){
|
|
|
+ tableData.length = 0;
|
|
|
+ }else{
|
|
|
+ _getStaffList();
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+//尺寸列表
|
|
|
+const sizeDatas = reactive([])
|
|
|
+//调用报工数据接口
|
|
|
+const _getStaffList = async ()=>{
|
|
|
+ console.log(_Machine.value)
|
|
|
+ console.log("日期",_Machine_riqi.value)
|
|
|
+ try {
|
|
|
+ const WorkListdata = await MachineDetail({machine:_Machine.value,date:_Machine_riqi.value,order:searchInfo.value});
|
|
|
+ console.log(WorkListdata)
|
|
|
+ //将 1 转换为 "是",0 转换为 "否"
|
|
|
+ WorkListdata.data.table.forEach(item => {
|
|
|
+ item.船样 = item.船样 === 1 ? '是' : '否';
|
|
|
+ });
|
|
|
+ sizeDatas.splice(0,WorkListdata.data.headers.length,...WorkListdata.data.headers);
|
|
|
+ tableData.splice(0,tableData.length,...WorkListdata.data.table);
|
|
|
+ total.value = WorkListdata.data.length
|
|
|
+ // searchInfo.value = ''
|
|
|
+} catch (error) {
|
|
|
+ console.error(error);
|
|
|
+}
|
|
|
+}
|
|
|
+
|
|
|
+ //合计
|
|
|
+ const getSummaries = (param) => {
|
|
|
+ const { columns, data } = param;
|
|
|
+ const sums = {};
|
|
|
+ //选择你希望合计的列
|
|
|
+ const summableLabels = [...sizeDatas,];
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (index === 1) {
|
|
|
+ sums[index] = '总数量合计';
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- .form-column {
|
|
|
- /*flex: 1;*/
|
|
|
- margin-right: 15px; /* 调整列之间的间距 */
|
|
|
- }
|
|
|
+ if (summableLabels.includes(column.label)) {
|
|
|
+ const values = data.map(item => Number(item[column.property]));
|
|
|
|
|
|
- /* 左侧输入框宽度调整 */
|
|
|
- .form-column .el-form-item .el-input {
|
|
|
- width: 150px; /* 调整左侧输入框的宽度 */
|
|
|
- }
|
|
|
+ // 检查数组中是否所有值都是 NaN
|
|
|
+ if (!values.every(value => isNaN(value))) {
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + value;
|
|
|
+ }
|
|
|
+ return prev;
|
|
|
+ }, 0);
|
|
|
+ // 如果需要,可以在这里添加单位
|
|
|
+ // sums[index] += ' 件';
|
|
|
+ } else {
|
|
|
+ sums[index] = '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- /* 媒体查询,根据需要调整断点 */
|
|
|
- @media screen and (max-width: 768px) {
|
|
|
- .form-column {
|
|
|
- flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
|
|
|
- margin-right: 0;
|
|
|
+ return sums;
|
|
|
+};
|
|
|
+//=========查询产量进度表============
|
|
|
+const statusExceldialog = ref(false)
|
|
|
+const ExcelformData = ref({})
|
|
|
+const ExceltableData = reactive([]);
|
|
|
+const statusExcel = () => {
|
|
|
+ statusExceldialog.value = true
|
|
|
+ const today = new Date();
|
|
|
+ ExcelformData.value.rq = today;
|
|
|
+ ExcelonSubmit();
|
|
|
+}
|
|
|
+// 选中的日期
|
|
|
+const selectedDate = ref(null);
|
|
|
+// 查询按钮的点击事件
|
|
|
+const ExcelonSubmit = async ()=>{
|
|
|
+ // 日期转换
|
|
|
+ let lhrq_formattedDeliveryDate = ''
|
|
|
+ // 检查是否有选中的日期
|
|
|
+ if (ExcelformData.value.rq) {
|
|
|
+ // 将日期转换为JavaScript的Date对象
|
|
|
+ const date = new Date(ExcelformData.value.rq)
|
|
|
+ // 格式化日期为YYYY-MM-DD
|
|
|
+ lhrq_formattedDeliveryDate = `${date.getFullYear()}-${('0' + (date.getMonth() + 1)).slice(-2)}-${('0' + date.getDate()).slice(-2)}`
|
|
|
+ }
|
|
|
+ const getOneWorkOrderdata = await getOneWorkOrder({riqi:lhrq_formattedDeliveryDate});
|
|
|
+ console.log(getOneWorkOrderdata)
|
|
|
+ ExceltableData.splice(0,ExceltableData.length,...getOneWorkOrderdata.data);
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+//报工删除
|
|
|
+const delall = ref(true)
|
|
|
+const Selection = ref('')
|
|
|
+const selectionChange = (selection, type) => {
|
|
|
+ console.log(selection)
|
|
|
+ const ids = selection.map(item => {
|
|
|
+ return item.UniqId
|
|
|
+ })
|
|
|
+ Selection.value = ids.join(',')
|
|
|
+}
|
|
|
+const del_delclick = async () => {
|
|
|
+ console.log(Selection.value)
|
|
|
+ console.log(_username.value)
|
|
|
+ const res1 = await spotcheckdel({UniqId:Selection.value,sys_id:_username.value})
|
|
|
+ res1.code === 0 && ElMessage.success('删除成功')
|
|
|
+ _getStaffList()
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+//导出Ex
|
|
|
+const exportToExcel2 = () => {
|
|
|
+ const data = ExceltableData;
|
|
|
+ const fixedProcessList = ['裁剪', '车缝', '手工', '大烫', '总检', '包装'];
|
|
|
+
|
|
|
+ // 按工序对数据进行分组
|
|
|
+ const groupedData = data.reduce((acc, item) => {
|
|
|
+ const { 工序 } = item;
|
|
|
+ if (!acc[工序]) {
|
|
|
+ acc[工序] = [];
|
|
|
}
|
|
|
+ acc[工序].push(item);
|
|
|
+ return acc;
|
|
|
+ }, {});
|
|
|
+
|
|
|
+ // 设置每一列的宽度,您可以在这里调整各列宽度
|
|
|
+ const columns = [
|
|
|
+ // { label: '订单编号', prop: '订单编号', width: 10 },
|
|
|
+ { label: '组别', prop: '组别', width: 9 },
|
|
|
+ { label: '款号', prop: '款号', width: 9 },
|
|
|
+ { label: '款式', prop: '款式', width: 12 },
|
|
|
+ { label: '工序', prop: '工序', width: 4 },
|
|
|
+ { label: '制单数', prop: '制单数', width: 6 },
|
|
|
+ { label: '裁剪数', prop: '裁剪数', width: 6 },
|
|
|
+ { label: '上月累计', prop: '上月累计', width: 8 },
|
|
|
+ { label: '本月累计', prop: '本月累计', width: 8 },
|
|
|
+ ...Array.from({ length: 31 }, (_, i) => ({
|
|
|
+ label: `${i + 1}`,
|
|
|
+ prop: `${i + 1}`,
|
|
|
+ width: 4 // 每天的列宽为5
|
|
|
+ }))
|
|
|
+ ];
|
|
|
+
|
|
|
+ const wb = XLSX.utils.book_new();
|
|
|
+
|
|
|
+ // 为每个工序创建工作表
|
|
|
+ fixedProcessList.forEach((工序) => {
|
|
|
+ const sheetData = groupedData[工序] || [];
|
|
|
+ const sheetHeader = [columns.map(col => col.label)];
|
|
|
+ const sheetBody = sheetData.map(item => columns.map(col => item[col.prop] ?? ''));
|
|
|
+
|
|
|
+ // 计算每一列的合计值
|
|
|
+ const totals = columns.map((col) => {
|
|
|
+ if (['制单数', '裁剪数', '上个月累计', '本月累计', ...Array.from({ length: 31 }, (_, i) => `${i + 1}`)].includes(col.prop)) {
|
|
|
+ return sheetData.reduce((sum, item) => sum + (parseFloat(item[col.prop]) || 0), 0);
|
|
|
+ }
|
|
|
+ return ''; // 非数字列不计算
|
|
|
+ });
|
|
|
+
|
|
|
+ // 在 "款式" 列中写入 "汇总合计"
|
|
|
+ totals[columns.findIndex(col => col.prop === '款式')] = '汇总合计';
|
|
|
+
|
|
|
+ // 将合计行加入到表格数据中
|
|
|
+ sheetBody.push(totals);
|
|
|
+
|
|
|
+ // 合并表头和数据
|
|
|
+ const wsData = [...sheetHeader, ...sheetBody];
|
|
|
+ const ws = XLSX.utils.aoa_to_sheet(wsData);
|
|
|
+
|
|
|
+ // 设置列宽
|
|
|
+ ws['!cols'] = columns.map(col => ({ wch: col.width }));
|
|
|
+
|
|
|
+ // 添加边框样式
|
|
|
+ const borderStyle = {
|
|
|
+ top: { style: 'thin' },
|
|
|
+ bottom: { style: 'thin' },
|
|
|
+ left: { style: 'thin' },
|
|
|
+ right: { style: 'thin' }
|
|
|
+ };
|
|
|
+ Object.keys(ws).forEach(cell => {
|
|
|
+ if (cell[0] !== '!') {
|
|
|
+ ws[cell].s = { border: borderStyle };
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 将工作表添加到工作簿
|
|
|
+ XLSX.utils.book_append_sheet(wb, ws, 工序);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 生成文件名
|
|
|
+ const year = new Date(ExcelformData.value.rq).getFullYear();
|
|
|
+ const month = (new Date(ExcelformData.value.rq).getMonth() + 1).toString().padStart(2, '0');
|
|
|
+ const filename = `服装生产部${year}年${month}月份日产量进度表.xlsx`;
|
|
|
+
|
|
|
+ // 导出 Excel 文件
|
|
|
+ const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
|
|
+ try {
|
|
|
+ FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename);
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
}
|
|
|
- /*:deep(.el-table td .cell) {*/
|
|
|
- /* line-height: 30px !important;*/
|
|
|
- /*}*/
|
|
|
- .JKWTree-container {
|
|
|
- display: flex;
|
|
|
- }
|
|
|
- .JKWTree-tree {
|
|
|
- /*width: 300px;*/
|
|
|
- background-color: #fff;
|
|
|
- padding: 10px;
|
|
|
- margin-right: 20px;
|
|
|
- }
|
|
|
- .JKWTree-tree h3 {
|
|
|
- font-size: 15px;
|
|
|
- font-weight: 700;
|
|
|
- margin: 10px 0;
|
|
|
- }
|
|
|
- .JKWTree-content {
|
|
|
- flex: 1;
|
|
|
- }
|
|
|
- /* 图片上传 */
|
|
|
- .upload-box {
|
|
|
- width: 200px;
|
|
|
- height: 200px;
|
|
|
- border: 2px dashed #e2e2e2;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- position: relative;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- .uploaded-image {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- object-fit: cover;
|
|
|
- }
|
|
|
- .upload-icon {
|
|
|
- font-size: 40px;
|
|
|
- color: #c0c4cc;
|
|
|
- }
|
|
|
- .file-input {
|
|
|
- display: none;
|
|
|
- }
|
|
|
- .el-table .warning-row {
|
|
|
- background: oldlace;
|
|
|
- }
|
|
|
+};
|
|
|
+
|
|
|
+// =========== 新增按钮 ===========
|
|
|
+const AttendanceVisible=ref(false)
|
|
|
+const add_tableData = reactive([]);
|
|
|
+
|
|
|
+
|
|
|
+//新增按钮
|
|
|
+const onAttendance = () => {
|
|
|
+ AttendanceVisible.value=true
|
|
|
+ setTimeout(() => {
|
|
|
+ const inputElement = document.querySelector('#searchInput');
|
|
|
+ if (inputElement) {
|
|
|
+ inputElement.focus();
|
|
|
+ }
|
|
|
+ }, 100); // 延迟100毫秒
|
|
|
+ add_riqiformData['日期'] = currentDate
|
|
|
+};
|
|
|
+const add_riqiformData = reactive({
|
|
|
+日期: '',
|
|
|
+});
|
|
|
+// 新增确定
|
|
|
+const add_Dialog = () => {
|
|
|
+ AttendanceVisible.value = false
|
|
|
+};
|
|
|
+// 新增取消
|
|
|
+const add_closeDialog = () => {
|
|
|
+ AttendanceVisible.value = false
|
|
|
+};
|
|
|
+
|
|
|
+// =========== 新增搜索 ===========
|
|
|
+const add_searchInfo = ref('')
|
|
|
+//点击【查询】按钮
|
|
|
+const add_onSubmit = async ()=>{
|
|
|
|
|
|
- /* 选中某行时的背景色 */
|
|
|
- :deep(.el-table__body tr.current-row) > td {
|
|
|
- background: #ff80ff !important;
|
|
|
- }
|
|
|
- </style>
|
|
|
- <style scoped>
|
|
|
- :deep(.el-table td .cell) {
|
|
|
- line-height: 20px !important;
|
|
|
- }
|
|
|
- :deep(.el-tabs__header){
|
|
|
- margin-bottom: 0;
|
|
|
- }
|
|
|
- .search{
|
|
|
- margin-left: 0px !important;
|
|
|
- margin-right: 10px !important;
|
|
|
- }
|
|
|
- .bt{
|
|
|
- margin-left: 2px !important;
|
|
|
- padding: 3px !important;
|
|
|
- font-size: 12px;
|
|
|
- }
|
|
|
- .el-tabs__header{
|
|
|
- margin: 0px !important;
|
|
|
- }
|
|
|
- .gva-table-box{
|
|
|
- padding: 0px !important;
|
|
|
- }
|
|
|
- .mab{
|
|
|
- margin-bottom: 5px;
|
|
|
+
|
|
|
+};
|
|
|
+// =========== 删除按钮 ===========
|
|
|
+const bgSelection = ref(null)
|
|
|
+const baogong_del = () => {
|
|
|
+ if(bgSelection.value === null || bgSelection.value === ''){
|
|
|
+ ElMessage({type: 'warning',message: '请选择删除的数据' })
|
|
|
+ }else{
|
|
|
+ console.log(bgSelection.value)
|
|
|
}
|
|
|
- </style>
|
|
|
-
|
|
|
+}
|
|
|
+// 复选框
|
|
|
+const handleSelectionChange = (selection, type) => {
|
|
|
+const ids = selection.map(item => {
|
|
|
+ return item.订单子编号
|
|
|
+})
|
|
|
+bgSelection.value = ids.join(',')
|
|
|
+}
|
|
|
+
|
|
|
+// =========== 修改 ===========
|
|
|
+const dialogFormVisible = ref(false)
|
|
|
+const edit_formData = ref({})
|
|
|
+// 双击修改
|
|
|
+const updateCompanyFunc = async (row) => {
|
|
|
+};
|
|
|
+// 修改确认
|
|
|
+const edit_Dialog = async (row) => {
|
|
|
+ dialogFormVisible.value = false;
|
|
|
+};
|
|
|
+// 修改取消
|
|
|
+const edit_closeDialog = async (row) => {
|
|
|
+ dialogFormVisible.value = false;
|
|
|
+};
|
|
|
+// =========== 分页 ===========
|
|
|
+// 分页相关的响应式变量
|
|
|
+const page = ref(1)
|
|
|
+const total = ref(0)
|
|
|
+const pageSize = ref(10)
|
|
|
+// 分页
|
|
|
+const handleCurrentChange = (val) => {
|
|
|
+page.value = val;
|
|
|
+_getStaffList();
|
|
|
+};
|
|
|
+
|
|
|
+// 修改页面容量 点击多少条/页
|
|
|
+const handleSizeChange = (val) => {
|
|
|
+page.value = 10;//默认显示
|
|
|
+pageSize.value = val;
|
|
|
+_getStaffList();
|
|
|
+};
|
|
|
+
|
|
|
+</script>
|
|
|
+<style scoped>
|
|
|
+.form-container {
|
|
|
+display: flex;
|
|
|
+flex-wrap: wrap;
|
|
|
+}
|
|
|
+
|
|
|
+.form-column {
|
|
|
+/*flex: 1;*/
|
|
|
+margin-right: 15px; /* 调整列之间的间距 */
|
|
|
+}
|
|
|
+
|
|
|
+/* 左侧输入框宽度调整 */
|
|
|
+.form-column .el-form-item .el-input {
|
|
|
+width: 150px; /* 调整左侧输入框的宽度 */
|
|
|
+}
|
|
|
+
|
|
|
+/* 媒体查询,根据需要调整断点 */
|
|
|
+@media screen and (max-width: 768px) {
|
|
|
+.form-column {
|
|
|
+ flex: 1 0 100%; /* 在小屏幕下变成单列布局 */
|
|
|
+ margin-right: 0;
|
|
|
+}
|
|
|
+}
|
|
|
+/*:deep(.el-table td .cell) {*/
|
|
|
+/* line-height: 30px !important;*/
|
|
|
+/*}*/
|
|
|
+.JKWTree-container {
|
|
|
+display: flex;
|
|
|
+}
|
|
|
+.JKWTree-tree {
|
|
|
+/*width: 300px;*/
|
|
|
+background-color: #fff;
|
|
|
+padding: 10px;
|
|
|
+margin-right: 20px;
|
|
|
+}
|
|
|
+.JKWTree-tree h3 {
|
|
|
+font-size: 15px;
|
|
|
+font-weight: 700;
|
|
|
+margin: 10px 0;
|
|
|
+}
|
|
|
+.JKWTree-content {
|
|
|
+flex: 1;
|
|
|
+}
|
|
|
+/* 图片上传 */
|
|
|
+.upload-box {
|
|
|
+ width: 200px;
|
|
|
+ height: 200px;
|
|
|
+ border: 2px dashed #e2e2e2;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.uploaded-image {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: cover;
|
|
|
+}
|
|
|
+.upload-icon {
|
|
|
+ font-size: 40px;
|
|
|
+ color: #c0c4cc;
|
|
|
+}
|
|
|
+.file-input {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+.el-table .warning-row {
|
|
|
+ background: oldlace;
|
|
|
+}
|
|
|
+
|
|
|
+/* 选中某行时的背景色 */
|
|
|
+:deep(.el-table__body tr.current-row) > td {
|
|
|
+ background: #ff80ff !important;
|
|
|
+}
|
|
|
+</style>
|
|
|
+<style scoped>
|
|
|
+:deep(.el-table td .cell) {
|
|
|
+ line-height: 20px !important;
|
|
|
+}
|
|
|
+:deep(.el-tabs__header){
|
|
|
+ margin-bottom: 0;
|
|
|
+}
|
|
|
+.search{
|
|
|
+ margin-left: 0px !important;
|
|
|
+ margin-right: 10px !important;
|
|
|
+}
|
|
|
+.bt{
|
|
|
+ margin-left: 2px !important;
|
|
|
+ padding: 3px !important;
|
|
|
+ font-size: 12px;
|
|
|
+}
|
|
|
+.el-tabs__header{
|
|
|
+ margin: 0px !important;
|
|
|
+}
|
|
|
+.gva-table-box{
|
|
|
+ padding: 0px !important;
|
|
|
+}
|
|
|
+.mab{
|
|
|
+ margin-bottom: 5px;
|
|
|
+}
|
|
|
+</style>
|