|
|
@@ -41,85 +41,45 @@
|
|
|
</el-row>
|
|
|
|
|
|
<!-- 订单信息显示区域 -->
|
|
|
- <div v-if="orderInfoList.length > 0" style="margin-top: 20px; margin-bottom: 20px;">
|
|
|
- <h3 style="font-size: 20px; margin-bottom: 15px;">订单信息</h3>
|
|
|
- <el-table :data="orderInfoList" style="width: 100%">
|
|
|
- <el-table-column prop="订单编号" label="订单编号" width="180" />
|
|
|
- <el-table-column prop="生产款号" label="生产款号" width="250" />
|
|
|
- <el-table-column prop="款式" label="款式" width="150" />
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 员工选择区域 -->
|
|
|
- <div style="margin-top: 20px; margin-bottom: 20px;">
|
|
|
- <h3 style="font-size: 20px; margin-bottom: 15px;">选择操作上报人员</h3>
|
|
|
- <div class="employee-grid" style="display: inline-grid; vertical-align: top;">
|
|
|
- <div
|
|
|
- v-for="employee in employees"
|
|
|
- :key="employee['员工编号']"
|
|
|
- class="employee-card"
|
|
|
- :class="{ selected: selectedEmployee === employee['员工编号'] }"
|
|
|
- @click="selectEmployee(employee)"
|
|
|
- >
|
|
|
- <div class="employee-avatar" :style="{ backgroundColor: getAvatarColor(employee['员工编号']) }">
|
|
|
- {{ employee['员工姓名'].charAt(0) }}
|
|
|
- </div>
|
|
|
- <div class="employee-name">{{ employee['员工姓名'] }}</div>
|
|
|
- <div class="employee-id">{{ employee['员工编号'] }}</div>
|
|
|
- </div>
|
|
|
- <!-- 工分报工按钮 -->
|
|
|
- <div style="display: flex; align-items: center; justify-content: center; padding: 15px;">
|
|
|
- <el-button type="success" icon="document" @click="openWorkScoreDialog" style="height: 80px; width: 120px; font-size: 18px;">工分报工</el-button>
|
|
|
- </div>
|
|
|
+ <div style="margin-top: 20px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-start;">
|
|
|
+ <div style="flex: 1;">
|
|
|
+ <h3 style="font-size: 20px; margin-bottom: 15px;">订单信息</h3>
|
|
|
+ <el-table :data="orderInfoList" style="width: 100%">
|
|
|
+ <el-table-column prop="订单编号" label="订单编号" width="180" />
|
|
|
+ <el-table-column prop="生产款号" label="生产款号" width="250" />
|
|
|
+ <el-table-column prop="款式" label="款式" width="150" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div style="margin-left: 20px;">
|
|
|
+ <el-button type="success" icon="document" @click="openWorkScoreDialog" style="height: 80px; width: 120px; font-size: 18px;">工分报工</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<el-main>
|
|
|
<!-- 表格数据 -->
|
|
|
<el-tabs v-model="activeName">
|
|
|
- <el-tab-pane label="报工历史记录" @click="showTable('报工历史记录')" name="first">
|
|
|
+ <el-tab-pane label="工分报工历史记录" name="first">
|
|
|
<el-table ref="multipleTable" style="width: 100%;height: 52vh" tooltip-effect="dark"
|
|
|
:row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
|
|
|
:cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
|
|
|
- :data="bgjdhz_tableData" border row-key="ID"
|
|
|
- size="small"
|
|
|
- highlight-current-row="true" @row-dblclick="updateCompanyFunc"
|
|
|
+ :data="gongfenHistoryData" border row-key="ID"
|
|
|
+ size="small"
|
|
|
+ highlight-current-row="true"
|
|
|
@row-click="tableRowClick" :show-overflow-tooltip="true">
|
|
|
- <el-table-column align="left" label="报工时间" prop="sys_rq" width="150"/>
|
|
|
- <el-table-column align="left" label="子订单编号" prop="子订单编号" width="130"/>
|
|
|
- <el-table-column align="left" label="生产款号" prop="款号" width="120"/>
|
|
|
- <el-table-column align="left" label="款式" prop="款式" width="100"/>
|
|
|
- <el-table-column align="left" label="组别" prop="sczl_jtbh" width="80"/>
|
|
|
- <el-table-column align="left" label="尺码" prop="尺码" width="70"/>
|
|
|
- <el-table-column align="left" label="实裁数量" prop="数量" width="100"/>
|
|
|
+ <el-table-column align="left" label="报工时间" prop="sys_rq" width="160"/>
|
|
|
+ <el-table-column align="left" label="订单编号" prop="work_order" width="130"/>
|
|
|
+ <el-table-column align="left" label="工序" prop="majorprocess" width="80"/>
|
|
|
+ <el-table-column align="left" label="部件编号" prop="part_code" width="85"/>
|
|
|
+ <el-table-column align="left" label="工艺编号" prop="process_code" width="85"/>
|
|
|
+ <el-table-column align="left" label="工艺名称" prop="process_name" width="200"/>
|
|
|
+ <el-table-column align="left" label="员工编号" prop="staff_no" width="100"/>
|
|
|
+ <el-table-column align="left" label="员工姓名" prop="staff_name" width="100"/>
|
|
|
+ <el-table-column align="left" label="报工数量" prop="number" width="85"/>
|
|
|
+ <el-table-column align="left" label="机台号" prop="machine" width="80"/>
|
|
|
+ <el-table-column align="left" label="组别" prop="sys_id" width="100"/>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
-
|
|
|
-
|
|
|
- <el-tab-pane label="产量进度汇总记录" @click="showTable('产量进度汇总记录')" name="two">
|
|
|
- <el-table ref="multipleTable" style="width: 100%;height: 52vh" tooltip-effect="dark"
|
|
|
- :row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
|
|
|
- :cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
|
|
|
- :data="jdhz_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">
|
|
|
- <el-table-column align="left" label="订单子编号" prop="子订单编号" width="130"/>
|
|
|
- <el-table-column align="left" label="款号" prop="款号" width="140" />
|
|
|
- <el-table-column align="left" label="色系名称" prop="颜色" width="100" />
|
|
|
- <el-table-column v-for="item in sizeDatas" :key="item" align="left" :label="item" :prop="item" width="60" :cell-style="cellStyle">
|
|
|
- <template v-slot="scope">
|
|
|
- <div style="width: 80px;" @click="handleSizeClick(scope.$index, item, scope.row)">
|
|
|
- {{ scope.row[item] }}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="left" label="实裁总数" prop="裁剪数" width="90" />
|
|
|
- <!-- <el-table-column align="left" label="上报时间" prop="上报时间" width="160" /> -->
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
-
|
|
|
+
|
|
|
<el-tab-pane label="订单资料附件" name="third">
|
|
|
<el-table ref="multipleTable"
|
|
|
:row-style="{ height: '30px' }"
|
|
|
@@ -129,7 +89,8 @@
|
|
|
:cell-class-name="planUsageCellClass"
|
|
|
highlight-current-row="true"
|
|
|
@row-dblclick="gdbomupdateCompanyFunc"
|
|
|
- style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID">
|
|
|
+ style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="ddtableData" row-key="ID"
|
|
|
+ @selection-change="fjSelectionChange">
|
|
|
<el-table-column align="left" label="关联编号" prop="关联编号" width="115"/>
|
|
|
<el-table-column align="left" label="备注" prop="附件备注" width="110"/>
|
|
|
<el-table-column align="left" label="文件类型" prop="附件类型" width="100"/>
|
|
|
@@ -137,14 +98,14 @@
|
|
|
<el-table-column align="left" label="建档用户" prop="sys_id" width="200"/>
|
|
|
<el-table-column align="left" label="操作"width="100"fixed="right">
|
|
|
<template #default="scope">
|
|
|
- <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button>
|
|
|
+ <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- </el-tab-pane>
|
|
|
-
|
|
|
-
|
|
|
- <el-tab-pane label="技术附件" @click="showTable('技术附件')" name="fourth">
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
+
|
|
|
+ <el-tab-pane label="技术附件" name="fourth">
|
|
|
<el-table ref="multipleTable"
|
|
|
:row-style="{ height: '30px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '30px' }"
|
|
|
@@ -153,7 +114,8 @@
|
|
|
:cell-class-name="planUsageCellClass"
|
|
|
highlight-current-row="true"
|
|
|
@row-dblclick="ExcelShow"
|
|
|
- style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID">
|
|
|
+ style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jstableData" row-key="ID"
|
|
|
+ @selection-change="fjSelectionChange">
|
|
|
<el-table-column align="left" label="关联编号" prop="关联编号" width="115"/>
|
|
|
<el-table-column align="left" label="备注" prop="附件备注" width="110"/>
|
|
|
<el-table-column align="left" label="文件类型" prop="附件类型" width="100"/>
|
|
|
@@ -161,13 +123,13 @@
|
|
|
<el-table-column align="left" label="建档用户" prop="sys_id" width="200"/>
|
|
|
<el-table-column align="left" label="操作"width="100"fixed="right">
|
|
|
<template #default="scope">
|
|
|
- <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button>
|
|
|
+ <el-button type="success" size="small" :data="ddtableData" @click="showPdf(scope.row)" >PDF预览</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
-
|
|
|
+
|
|
|
</el-main>
|
|
|
</div>
|
|
|
|
|
|
@@ -188,98 +150,220 @@
|
|
|
height="100%"
|
|
|
fullscreen
|
|
|
>
|
|
|
- <div style="padding: 20px; display: flex; height: 85vh;">
|
|
|
- <!-- 左侧人员和订单信息 -->
|
|
|
- <div style="width: 30%; padding-right: 20px; border-right: 1px solid #e0e0e0;">
|
|
|
- <!-- 订单信息卡片 -->
|
|
|
- <div style="background-color: #333; color: white; padding: 20px; border-radius: 8px; margin-bottom: 20px;">
|
|
|
- <h3 style="margin-top: 0; font-size: 24px;">{{ add_searchInfo }}</h3>
|
|
|
- <p style="margin: 10px 0;">{{ orderInfoList.length > 0 ? orderInfoList[0]['生产款号'] : '' }}</p>
|
|
|
+ <div style="height: 84vh; display: flex; flex-direction: column;">
|
|
|
+ <div style="width: 100%;">
|
|
|
+ <div style="background-color: #333; color: white; padding: 20px; border-radius: 8px;">
|
|
|
+ <div v-if="orderInfoList.length > 0" style="display: flex; flex-wrap: wrap; gap: 20px; font-size: 16px; font-weight: bold;">
|
|
|
+ <p style="margin: 5px 0;"><strong>订单编号:</strong> {{ orderInfoList[0]['订单编号'] }}</p>
|
|
|
+ <p style="margin: 5px 0;"><strong>生产款号:</strong> {{ orderInfoList[0]['生产款号'] }}</p>
|
|
|
+ <p style="margin: 5px 0;"><strong>款式:</strong> {{ orderInfoList[0]['款式'] }}</p>
|
|
|
+ <p style="margin: 5px 0;"><strong>机台号:</strong> {{ add_formData['机台号'] }}</p>
|
|
|
+ <p style="margin: 5px 0;"><strong>工序:</strong> {{ add_formData['工序'] }}</p>
|
|
|
+ <p style="margin: 5px 0;"><strong>组别:</strong> {{ add_formData['组别'] }}</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<!-- 选择操作上报人员 -->
|
|
|
- <h3 style="font-size: 18px; margin-bottom: 15px;">选择操作上报人员</h3>
|
|
|
- <div class="employee-grid" style="grid-template-columns: repeat(4, 1fr);">
|
|
|
- <div
|
|
|
- v-for="employee in employees"
|
|
|
- :key="employee['员工编号']"
|
|
|
- class="employee-card"
|
|
|
- :class="{ selected: selectedEmployee === employee['员工编号'] }"
|
|
|
- @click="selectEmployee(employee)"
|
|
|
- >
|
|
|
- <div class="employee-avatar" :style="{ backgroundColor: getAvatarColor(employee['员工编号']) }">
|
|
|
- {{ employee['员工姓名'].charAt(0) }}
|
|
|
+ <div style="margin-bottom: 20px;">
|
|
|
+ <h3 style="font-size: 18px; margin-bottom: 15px;">选择操作上报人员</h3>
|
|
|
+ <div class="employee-grid" style="grid-template-columns: repeat(8, 1fr); gap: 10px;">
|
|
|
+ <div
|
|
|
+ v-for="employee in employees"
|
|
|
+ :key="employee['员工编号']"
|
|
|
+ class="employee-card"
|
|
|
+ :class="{ selected: selectedEmployee === employee['员工编号'] }"
|
|
|
+ @click="selectEmployee(employee)"
|
|
|
+ draggable="true"
|
|
|
+ @dragstart="onDragStart($event, employee)"
|
|
|
+ >
|
|
|
+ <div class="employee-avatar" :style="{ backgroundColor: getAvatarColor(employee['员工编号']) }">
|
|
|
+ {{ employee['员工姓名'].charAt(0) }}
|
|
|
+ </div>
|
|
|
+ <div class="employee-name" style="font-size: 18px;">{{ employee['员工姓名'] }}</div>
|
|
|
+ <div class="employee-id" style="font-size: 14px;">{{ employee['员工编号'] }}</div>
|
|
|
</div>
|
|
|
- <div class="employee-name">{{ employee['员工姓名'] }}</div>
|
|
|
- <div class="employee-id">{{ employee['员工编号'] }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 订单信息 -->
|
|
|
- <div style="margin-top: 30px;">
|
|
|
- <h3 style="font-size: 18px; margin-bottom: 15px;">订单信息</h3>
|
|
|
- <div v-if="orderInfoList.length > 0">
|
|
|
- <p><strong>订单编号:</strong> {{ orderInfoList[0]['订单编号'] }}</p>
|
|
|
- <p><strong>生产款号:</strong> {{ orderInfoList[0]['生产款号'] }}</p>
|
|
|
- <p><strong>款式:</strong> {{ orderInfoList[0]['款式'] }}</p>
|
|
|
</div>
|
|
|
- <p><strong>机台号:</strong> {{ add_formData['机台号'] }}</p>
|
|
|
- <p><strong>工序:</strong> {{ add_formData['工序'] }}</p>
|
|
|
- <p><strong>组别:</strong> {{ add_formData['组别'] }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 右侧工艺部件信息 -->
|
|
|
- <div style="flex: 1; padding-left: 30px;">
|
|
|
- <h3 style="font-size: 20px; margin-bottom: 20px;">{{ add_formData['工序'] }}工艺</h3>
|
|
|
-
|
|
|
- <!-- 车缝工序:显示部件列表 -->
|
|
|
- <div v-if="add_formData['工序'] === '车缝' && processParts.length > 0">
|
|
|
- <div v-for="(part, index) in processParts" :key="part['部件编号']" style="margin-bottom: 20px;">
|
|
|
- <div style="display: flex; align-items: center; margin-bottom: 10px;">
|
|
|
- <h4 style="margin: 0; font-size: 16px;">部件: {{ part['部件名称'] }}</h4>
|
|
|
- <el-input v-model="partQuantities[index]" placeholder="填写上报数量" style="margin-left: auto; width: 150px;"></el-input>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 工艺列表 -->
|
|
|
- <div v-if="partProcesses[index] && partProcesses[index].length > 0">
|
|
|
- <div v-for="process in partProcesses[index]" :key="process['工艺编号']" style="margin-left: 20px; margin-bottom: 10px;">
|
|
|
- <el-input :value="process['工艺编号'] + ' ' + process['工艺名称']" readonly style="width: 400px;"></el-input>
|
|
|
+ <!-- 下方:工艺部件信息 -->
|
|
|
+ <div style="flex: 1; display: flex; flex-wrap: wrap; gap: 10px;">
|
|
|
+ <div v-if="add_formData['工序'] === '车缝' && processParts.length > 0" style="flex: 0 0 30%; width: 180px; border-right: 1px solid #e0e0e0;">
|
|
|
+ <h3 style="font-size: 20px;">部件顺序</h3>
|
|
|
+ <div class="part-list">
|
|
|
+ <div
|
|
|
+ v-for="(part, index) in processParts"
|
|
|
+ :key="part['部件编号']"
|
|
|
+ class="part-item"
|
|
|
+ :class="{ selected: selectedPartIndex === index }"
|
|
|
+ @click="selectPart(index)"
|
|
|
+ >
|
|
|
+ <div class="part-info">
|
|
|
+ <div class="part-number"></div>
|
|
|
+ <div class="part-name">{{ part['部件编号'] }}-{{ part['部件名称'] }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 非车缝工序:直接显示工艺列表 -->
|
|
|
- <div v-else-if="add_formData['工序'] !== '车缝' && partProcesses.length > 0 && partProcesses[0].length > 0">
|
|
|
- <div style="margin-bottom: 20px;">
|
|
|
- <div style="display: flex; align-items: center; margin-bottom: 10px;">
|
|
|
- <h4 style="margin: 0; font-size: 16px;">工艺列表</h4>
|
|
|
- <el-input v-model="partQuantities[0]" placeholder="填写上报数量" style="margin-left: auto; width: 150px;"></el-input>
|
|
|
+ <!-- 右侧:工艺列表 -->
|
|
|
+ <div style="flex: 1; min-width: 400px; padding-left: 20px;">
|
|
|
+ <div v-if="add_formData['工序'] === '车缝' && selectedPartIndex !== -1 && partProcesses[selectedPartIndex] && partProcesses[selectedPartIndex].length > 0">
|
|
|
+ <div style="display: flex; align-items: center; margin-bottom: 20px;">
|
|
|
+ <h4 style="margin: 0; font-size: 16px;">部件: {{ processParts[selectedPartIndex]['部件编号'] }} - {{ processParts[selectedPartIndex]['部件名称'] }} </h4>
|
|
|
+ <el-input
|
|
|
+ v-model="partQuantities[selectedPartIndex]"
|
|
|
+ placeholder="填写上报数量"
|
|
|
+ style="margin-left: auto; width: 150px;"
|
|
|
+ @input="updateProcessQuantities(selectedPartIndex)"
|
|
|
+ ></el-input>
|
|
|
</div>
|
|
|
|
|
|
<!-- 工艺列表 -->
|
|
|
- <div>
|
|
|
- <div v-for="process in partProcesses[0]" :key="process['工艺编号']" style="margin-left: 20px; margin-bottom: 10px;">
|
|
|
- <el-input :value="process['工艺编号'] + ' ' + process['工艺名称']" readonly style="width: 400px;"></el-input>
|
|
|
- </div>
|
|
|
+ <el-table :data="partProcesses[selectedPartIndex]" style="width: 100%;">
|
|
|
+ <el-table-column prop="工艺编号" label="序号" width="70" />
|
|
|
+ <el-table-column prop="工艺名称" label="工艺名称" />
|
|
|
+ <el-table-column label="报工人员" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-if="getReportingData(selectedPartIndex, scope.$index).staffList">
|
|
|
+ <div v-for="(staff, staffIndex) in getReportingData(selectedPartIndex, scope.$index).staffList" :key="staffIndex" style="margin-bottom: 5px;">
|
|
|
+ <el-input
|
|
|
+ v-model="staff.staff_name"
|
|
|
+ style="width: 100%;"
|
|
|
+ :disabled="!!partQuantities[selectedPartIndex]"
|
|
|
+ @input="clearPartQuantity(selectedPartIndex)"
|
|
|
+ @drop="onDrop($event, selectedPartIndex, scope.$index, staffIndex)"
|
|
|
+ @dragover="onDragOver($event)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ v-model="getReportingData(selectedPartIndex, scope.$index).staff_name"
|
|
|
+ style="width: 100%;"
|
|
|
+ :disabled="!!partQuantities[selectedPartIndex]"
|
|
|
+ @input="clearPartQuantity(selectedPartIndex)"
|
|
|
+ @drop="onDrop($event, selectedPartIndex, scope.$index)"
|
|
|
+ @dragover="onDragOver($event)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="报工数量" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-if="getReportingData(selectedPartIndex, scope.$index).staffList">
|
|
|
+ <div v-for="(staff, staffIndex) in getReportingData(selectedPartIndex, scope.$index).staffList" :key="staffIndex" style="margin-bottom: 5px;">
|
|
|
+ <el-input
|
|
|
+ v-model.number="staff.number"
|
|
|
+ type="number"
|
|
|
+ style="width: 100%;"
|
|
|
+ :disabled="!!partQuantities[selectedPartIndex]"
|
|
|
+ @input="clearPartQuantity(selectedPartIndex)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ v-model.number="getReportingData(selectedPartIndex, scope.$index).number"
|
|
|
+ type="number"
|
|
|
+ style="width: 100%;"
|
|
|
+ :disabled="!!partQuantities[selectedPartIndex]"
|
|
|
+ @input="clearPartQuantity(selectedPartIndex)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button size="small" @click="addPerson(selectedPartIndex, scope.$index)">添加人员</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 非车缝工序:直接显示工艺列表 -->
|
|
|
+ <div v-else-if="add_formData['工序'] !== '车缝' && partProcesses.length > 0 && partProcesses[0].length > 0">
|
|
|
+ <div style="display: flex; align-items: center; margin-bottom: 20px;">
|
|
|
+ <h4 style="margin: 0; font-size: 16px;">工艺列表</h4>
|
|
|
+ <el-input
|
|
|
+ v-model="partQuantities[0]"
|
|
|
+ placeholder="填写上报数量"
|
|
|
+ style="margin-left: auto; width: 150px;"
|
|
|
+ @input="updateProcessQuantities(0)"
|
|
|
+ ></el-input>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 工艺列表 -->
|
|
|
+ <el-table :data="partProcesses[0]" style="width: 100%;">
|
|
|
+ <el-table-column prop="工艺编号" label="工艺编号" width="100" />
|
|
|
+ <el-table-column prop="工艺名称" label="工艺名称" />
|
|
|
+ <el-table-column label="报工人员" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-if="getReportingData(0, scope.$index).staffList">
|
|
|
+ <div v-for="(staff, staffIndex) in getReportingData(0, scope.$index).staffList" :key="staffIndex" style="margin-bottom: 5px;">
|
|
|
+ <el-input
|
|
|
+ v-model="staff.staff_name"
|
|
|
+ style="width: 100%;"
|
|
|
+ :disabled="!!partQuantities[0]"
|
|
|
+ @input="clearPartQuantity(0)"
|
|
|
+ @drop="onDrop($event, 0, scope.$index, staffIndex)"
|
|
|
+ @dragover="onDragOver($event)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ v-model="getReportingData(0, scope.$index).staff_name"
|
|
|
+ style="width: 100%;"
|
|
|
+ :disabled="!!partQuantities[0]"
|
|
|
+ @input="clearPartQuantity(0)"
|
|
|
+ @drop="onDrop($event, 0, scope.$index)"
|
|
|
+ @dragover="onDragOver($event)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="报工数量" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-if="getReportingData(0, scope.$index).staffList">
|
|
|
+ <div v-for="(staff, staffIndex) in getReportingData(0, scope.$index).staffList" :key="staffIndex" style="margin-bottom: 5px;">
|
|
|
+ <el-input
|
|
|
+ v-model.number="staff.number"
|
|
|
+ type="number"
|
|
|
+ style="width: 100%;"
|
|
|
+ :disabled="!!partQuantities[0]"
|
|
|
+ @input="clearPartQuantity(0)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ v-model.number="getReportingData(0, scope.$index).number"
|
|
|
+ type="number"
|
|
|
+ style="width: 100%;"
|
|
|
+ :disabled="!!partQuantities[0]"
|
|
|
+ @input="clearPartQuantity(0)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button size="small" @click="addPerson(0, scope.$index)">添加人员</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-else-if="loadingProcess" style="text-align: center; padding: 50px;">
|
|
|
+ <p style="margin-top: 10px;">加载中...</p>
|
|
|
+ </div>
|
|
|
+ <div v-else style="text-align: center; padding: 50px; color: #999;">
|
|
|
+ 暂无工艺信息
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div v-else-if="loadingProcess" style="text-align: center; padding: 50px;">
|
|
|
- <el-loading-spinner></el-loading-spinner>
|
|
|
- <p style="margin-top: 10px;">加载中...</p>
|
|
|
- </div>
|
|
|
- <div v-else style="text-align: center; padding: 50px; color: #999;">
|
|
|
- 暂无工艺信息
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer" style="text-align: right;">
|
|
|
- <el-button @click="workScoreDialogVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="submitWorkScore">提交</el-button>
|
|
|
+ <el-button @click="workScoreDialogVisible = false" style="width: 80px;height: 50px;">取消</el-button>
|
|
|
+ <el-button type="primary" @click="submitWorkScore" style="width: 80px;height: 50px;">提交</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
@@ -350,8 +434,8 @@ import $ from 'jquery';
|
|
|
import LuckyExcel from 'luckyexcel';
|
|
|
import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
|
import {ref, reactive} from 'vue';
|
|
|
-import {getSpotList,getInfo,OrderAttachments,Apiorder} from '@/api/mes/job';
|
|
|
-import {getMac,getMajorprocessAndPerson,GetOrderProcess,GetCarProcess,ReportingWork} from '@/api/jixiaoguanli/baogong'
|
|
|
+import {getSpotList,getInfo,OrderAttachments,Apiorder,} from '@/api/mes/job';
|
|
|
+import {getMac,getMajorprocessAndPerson,GetOrderProcess,GetCarProcess,ReportingWork,GetReportingWorkRecord} from '@/api/jixiaoguanli/baogong'
|
|
|
import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
|
|
|
import {ElMessage,ElMessageBox} from "element-plus";
|
|
|
// import luckyexcelPage from '../yunyin/shengchanguanli/components/luckyexcel.vue';
|
|
|
@@ -380,9 +464,10 @@ const seconds = String(today.getSeconds()).padStart(2, '0');
|
|
|
const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
const currentDates = `${year}-${month}-${day}`;
|
|
|
const add_searchInfo = ref('')
|
|
|
+const gongfenHistoryData = ref([])
|
|
|
|
|
|
//全局获取code,接口接收code
|
|
|
-const _code = '裁剪'
|
|
|
+const _code = ref('裁剪')
|
|
|
//全局接口接受的物理地址
|
|
|
const Machine = ref('')
|
|
|
//全局获取UniqId
|
|
|
@@ -411,6 +496,7 @@ const getMachineMacdata = async () => {
|
|
|
add_formData['工序'] = data.data['生产工序']
|
|
|
add_formData['组别'] = data.data['组别']
|
|
|
add_formData['人员'] = data.data['组长']
|
|
|
+ _code.value = data.data['生产工序']
|
|
|
// 获取员工数据
|
|
|
getEmployeeData(data.data['机台号'])
|
|
|
setTimeout(() => {
|
|
|
@@ -445,6 +531,14 @@ const getEmployeeData = async (machineId) => {
|
|
|
const selectEmployee = (employee) => {
|
|
|
selectedEmployee.value = employee.员工编号
|
|
|
add_formData['人员'] = employee.员工姓名
|
|
|
+ // 将选中的员工姓名填入所有报工人员列
|
|
|
+ for (let i = 0; i < reportingData.value.length; i++) {
|
|
|
+ if (reportingData.value[i]) {
|
|
|
+ for (let j = 0; j < reportingData.value[i].length; j++) {
|
|
|
+ reportingData.value[i][j].staff_name = employee.员工姓名;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//工分报工对话框
|
|
|
@@ -459,6 +553,12 @@ const partProcesses = ref([]);
|
|
|
//部件数量
|
|
|
const partQuantities = ref([]);
|
|
|
|
|
|
+//选中的部件索引
|
|
|
+const selectedPartIndex = ref(-1);
|
|
|
+
|
|
|
+//报工数据
|
|
|
+const reportingData = ref([]);
|
|
|
+
|
|
|
//加载状态
|
|
|
const loadingProcess = ref(false);
|
|
|
|
|
|
@@ -474,10 +574,10 @@ const openWorkScoreDialog = async () => {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (!selectedEmployee.value) {
|
|
|
- warningres('请选择操作上报人员');
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if (!selectedEmployee.value) {
|
|
|
+ // warningres('请选择操作上报人员');
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
|
|
|
// 加载工艺部件数据
|
|
|
await loadProcessParts();
|
|
|
@@ -502,6 +602,14 @@ const loadProcessParts = async () => {
|
|
|
processParts.value = response.data;
|
|
|
partQuantities.value = new Array(response.data.length).fill('');
|
|
|
partProcesses.value = new Array(response.data.length).fill([]);
|
|
|
+ reportingData.value = new Array(response.data.length).fill([]);
|
|
|
+
|
|
|
+ // 设置初始选中第一个部件
|
|
|
+ if (response.data.length > 0) {
|
|
|
+ selectedPartIndex.value = 0;
|
|
|
+ } else {
|
|
|
+ selectedPartIndex.value = -1;
|
|
|
+ }
|
|
|
|
|
|
// 获取每个部件的工艺
|
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
|
@@ -512,11 +620,22 @@ const loadProcessParts = async () => {
|
|
|
processParts.value = []; // 非车缝没有部件
|
|
|
partQuantities.value = [""]; // 只有一个工艺列表
|
|
|
partProcesses.value = [response.data]; // 直接将工艺数据作为第一个元素
|
|
|
+ reportingData.value = [new Array(response.data.length).fill({})];
|
|
|
+ // 初始化报工数据
|
|
|
+ for (let i = 0; i < response.data.length; i++) {
|
|
|
+ reportingData.value[0][i] = {
|
|
|
+ staff_name: employees.value.find(emp => emp['员工编号'] === selectedEmployee.value)?.['员工姓名'] || '',
|
|
|
+ number: ''
|
|
|
+ };
|
|
|
+ }
|
|
|
+ selectedPartIndex.value = -1;
|
|
|
}
|
|
|
} else {
|
|
|
processParts.value = [];
|
|
|
partQuantities.value = [];
|
|
|
partProcesses.value = [];
|
|
|
+ reportingData.value = [];
|
|
|
+ selectedPartIndex.value = -1;
|
|
|
warningres('获取工艺部件失败');
|
|
|
}
|
|
|
} catch (error) {
|
|
|
@@ -525,6 +644,8 @@ const loadProcessParts = async () => {
|
|
|
processParts.value = [];
|
|
|
partQuantities.value = [];
|
|
|
partProcesses.value = [];
|
|
|
+ reportingData.value = [];
|
|
|
+ selectedPartIndex.value = -1;
|
|
|
} finally {
|
|
|
loadingProcess.value = false;
|
|
|
}
|
|
|
@@ -541,15 +662,117 @@ const loadPartProcesses = async (index, partCode) => {
|
|
|
|
|
|
if (response.code === 0 && response.data) {
|
|
|
partProcesses.value[index] = response.data;
|
|
|
+ // 初始化报工数据
|
|
|
+ reportingData.value[index] = new Array(response.data.length).fill({});
|
|
|
+ for (let i = 0; i < response.data.length; i++) {
|
|
|
+ reportingData.value[index][i] = {
|
|
|
+ staff_name: employees.value.find(emp => emp['员工编号'] === selectedEmployee.value)?.['员工姓名'] || '',
|
|
|
+ number: ''
|
|
|
+ };
|
|
|
+ }
|
|
|
} else {
|
|
|
partProcesses.value[index] = [];
|
|
|
+ reportingData.value[index] = [];
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error('获取部件工艺失败:', error);
|
|
|
partProcesses.value[index] = [];
|
|
|
+ reportingData.value[index] = [];
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+//获取报工数据
|
|
|
+const getReportingData = (partIndex, processIndex) => {
|
|
|
+ if (!reportingData.value[partIndex]) {
|
|
|
+ reportingData.value[partIndex] = [];
|
|
|
+ }
|
|
|
+ if (!reportingData.value[partIndex][processIndex]) {
|
|
|
+ reportingData.value[partIndex][processIndex] = {
|
|
|
+ staff_name: employees.value.find(emp => emp['员工编号'] === selectedEmployee.value)?.['员工姓名'] || '',
|
|
|
+ number: ''
|
|
|
+ };
|
|
|
+ }
|
|
|
+ return reportingData.value[partIndex][processIndex];
|
|
|
+};
|
|
|
+
|
|
|
+//选择部件
|
|
|
+const selectPart = (index) => {
|
|
|
+ selectedPartIndex.value = index;
|
|
|
+};
|
|
|
+
|
|
|
+//更新工艺报工数量
|
|
|
+const updateProcessQuantities = (partIndex) => {
|
|
|
+ const quantity = partQuantities.value[partIndex];
|
|
|
+ if (quantity && reportingData.value[partIndex]) {
|
|
|
+ for (let i = 0; i < reportingData.value[partIndex].length; i++) {
|
|
|
+ reportingData.value[partIndex][i].number = quantity;
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+//清除部件上报数量
|
|
|
+const clearPartQuantity = (partIndex) => {
|
|
|
+ partQuantities.value[partIndex] = '';
|
|
|
+};
|
|
|
+
|
|
|
+// 拖拽相关函数
|
|
|
+let draggedEmployee = null;
|
|
|
+
|
|
|
+// 开始拖拽
|
|
|
+const onDragStart = (event, employee) => {
|
|
|
+ draggedEmployee = employee;
|
|
|
+ event.dataTransfer.effectAllowed = 'copy';
|
|
|
+};
|
|
|
+
|
|
|
+// 拖拽经过
|
|
|
+const onDragOver = (event) => {
|
|
|
+ event.preventDefault();
|
|
|
+ event.dataTransfer.dropEffect = 'copy';
|
|
|
+};
|
|
|
+
|
|
|
+// 放置
|
|
|
+const onDrop = (event, partIndex, processIndex, staffIndex = null) => {
|
|
|
+ event.preventDefault();
|
|
|
+ if (draggedEmployee) {
|
|
|
+ const reportingDataItem = getReportingData(partIndex, processIndex);
|
|
|
+ if (staffIndex !== null && reportingDataItem.staffList) {
|
|
|
+ // 拖拽到已有人员列表中的某个位置
|
|
|
+ reportingDataItem.staffList[staffIndex].staff_name = draggedEmployee.员工姓名;
|
|
|
+ } else if (reportingDataItem.staffList) {
|
|
|
+ // 拖拽到人员列表区域,添加新人员
|
|
|
+ reportingDataItem.staffList.push({
|
|
|
+ staff_name: draggedEmployee.员工姓名,
|
|
|
+ number: ''
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // 拖拽到单个人员输入框
|
|
|
+ reportingDataItem.staff_name = draggedEmployee.员工姓名;
|
|
|
+ }
|
|
|
+ draggedEmployee = null;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+// 添加人员
|
|
|
+const addPerson = (partIndex, processIndex) => {
|
|
|
+ const reportingDataItem = getReportingData(partIndex, processIndex);
|
|
|
+ if (!reportingDataItem.staffList) {
|
|
|
+ // 如果还没有人员列表,创建一个
|
|
|
+ reportingDataItem.staffList = [];
|
|
|
+ // 将现有的人员信息添加到列表中
|
|
|
+ if (reportingDataItem.staff_name) {
|
|
|
+ reportingDataItem.staffList.push({
|
|
|
+ staff_name: reportingDataItem.staff_name,
|
|
|
+ number: reportingDataItem.number || ''
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 添加新的人员输入框
|
|
|
+ reportingDataItem.staffList.push({
|
|
|
+ staff_name: '',
|
|
|
+ number: ''
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
//提交工分报工
|
|
|
const submitWorkScore = async () => {
|
|
|
try {
|
|
|
@@ -571,43 +794,92 @@ const submitWorkScore = async () => {
|
|
|
|
|
|
// 检查是否是车缝工序
|
|
|
if (add_formData['工序'] === '车缝') {
|
|
|
- // 车缝工序:按有上报数量的部件中的工艺上报
|
|
|
+ // 车缝工序:按部件和工艺上报
|
|
|
for (let i = 0; i < processParts.value.length; i++) {
|
|
|
- const quantity = partQuantities.value[i];
|
|
|
- if (quantity && quantity.trim() !== '') {
|
|
|
- // 有上报数量,上报该部件的所有工艺
|
|
|
+ if (reportingData.value[i] && reportingData.value[i].length > 0) {
|
|
|
const part = processParts.value[i];
|
|
|
- const processes = partProcesses.value[i];
|
|
|
-
|
|
|
- for (const process of processes) {
|
|
|
- reportData.push({
|
|
|
- staff_no: selectedEmp['员工编号'],
|
|
|
- staff_name: selectedEmp['员工姓名'],
|
|
|
- work_order: add_searchInfo.value,
|
|
|
- majorprocess: add_formData['工序'],
|
|
|
- part_code: part['部件编号'],
|
|
|
- process_code: process['工艺编号'],
|
|
|
- process_name: process['工艺名称'],
|
|
|
- standard_hour: process['标准工时'] || '',
|
|
|
- standard_score: process['标准工分'] || '',
|
|
|
- coefficient: process['系数'] || '1',
|
|
|
- number: quantity,
|
|
|
- machine: add_formData['机台号'],
|
|
|
- sys_id: add_formData['组别'],
|
|
|
- date: currentDates
|
|
|
- });
|
|
|
+ for (let j = 0; j < reportingData.value[i].length; j++) {
|
|
|
+ const reportItem = reportingData.value[i][j];
|
|
|
+ const process = partProcesses.value[i][j];
|
|
|
+
|
|
|
+ if (reportItem.staffList) {
|
|
|
+ // 多个人员的情况
|
|
|
+ for (const staff of reportItem.staffList) {
|
|
|
+ if (staff.number) {
|
|
|
+ reportData.push({
|
|
|
+ staff_no: employees.value.find(emp => emp['员工姓名'] === staff.staff_name)?.['员工编号'] || selectedEmp['员工编号'],
|
|
|
+ staff_name: staff.staff_name || selectedEmp['员工姓名'],
|
|
|
+ work_order: add_searchInfo.value,
|
|
|
+ majorprocess: add_formData['工序'],
|
|
|
+ part_code: part['部件编号'],
|
|
|
+ process_code: process['工艺编号'],
|
|
|
+ process_name: process['工艺名称'],
|
|
|
+ standard_hour: process['标准工时'] || '',
|
|
|
+ standard_score: process['标准工分'] || '',
|
|
|
+ coefficient: process['系数'] || '1',
|
|
|
+ number: staff.number,
|
|
|
+ machine: add_formData['机台号'],
|
|
|
+ sys_id: add_formData['组别'],
|
|
|
+ date: currentDates
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (reportItem.number) {
|
|
|
+ // 单个人员的情况
|
|
|
+ reportData.push({
|
|
|
+ staff_no: selectedEmp['员工编号'],
|
|
|
+ staff_name: reportItem.staff_name || selectedEmp['员工姓名'],
|
|
|
+ work_order: add_searchInfo.value,
|
|
|
+ majorprocess: add_formData['工序'],
|
|
|
+ part_code: part['部件编号'],
|
|
|
+ process_code: process['工艺编号'],
|
|
|
+ process_name: process['工艺名称'],
|
|
|
+ standard_hour: process['标准工时'] || '',
|
|
|
+ standard_score: process['标准工分'] || '',
|
|
|
+ coefficient: process['系数'] || '1',
|
|
|
+ number: reportItem.number,
|
|
|
+ machine: add_formData['机台号'],
|
|
|
+ sys_id: add_formData['组别'],
|
|
|
+ date: currentDates
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- } else {
|
|
|
- // 非车缝工序:按所有工艺上报
|
|
|
- if (partProcesses.value[0] && partProcesses.value[0].length > 0) {
|
|
|
- const quantity = partQuantities.value[0];
|
|
|
- if (quantity && quantity.trim() !== '') {
|
|
|
- for (const process of partProcesses.value[0]) {
|
|
|
+ } else {
|
|
|
+ // 非车缝工序:按工艺上报
|
|
|
+ if (reportingData.value[0] && reportingData.value[0].length > 0) {
|
|
|
+ for (let i = 0; i < reportingData.value[0].length; i++) {
|
|
|
+ const reportItem = reportingData.value[0][i];
|
|
|
+ const process = partProcesses.value[0][i];
|
|
|
+
|
|
|
+ if (reportItem.staffList) {
|
|
|
+ // 多个人员的情况
|
|
|
+ for (const staff of reportItem.staffList) {
|
|
|
+ if (staff.number) {
|
|
|
+ reportData.push({
|
|
|
+ staff_no: employees.value.find(emp => emp['员工姓名'] === staff.staff_name)?.['员工编号'] || selectedEmp['员工编号'],
|
|
|
+ staff_name: staff.staff_name || selectedEmp['员工姓名'],
|
|
|
+ work_order: add_searchInfo.value,
|
|
|
+ majorprocess: add_formData['工序'],
|
|
|
+ part_code: '',
|
|
|
+ process_code: process['工艺编号'],
|
|
|
+ process_name: process['工艺名称'],
|
|
|
+ standard_hour: process['标准工时'] || '',
|
|
|
+ standard_score: process['标准工分'] || '',
|
|
|
+ coefficient: process['系数'] || '1',
|
|
|
+ number: staff.number,
|
|
|
+ machine: add_formData['机台号'],
|
|
|
+ sys_id: userStore.userInfo.nickName,
|
|
|
+ date: currentDates
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (reportItem.number) {
|
|
|
+ // 单个人员的情况
|
|
|
reportData.push({
|
|
|
staff_no: selectedEmp['员工编号'],
|
|
|
- staff_name: selectedEmp['员工姓名'],
|
|
|
+ staff_name: reportItem.staff_name || selectedEmp['员工姓名'],
|
|
|
work_order: add_searchInfo.value,
|
|
|
majorprocess: add_formData['工序'],
|
|
|
part_code: '',
|
|
|
@@ -616,7 +888,7 @@ const submitWorkScore = async () => {
|
|
|
standard_hour: process['标准工时'] || '',
|
|
|
standard_score: process['标准工分'] || '',
|
|
|
coefficient: process['系数'] || '1',
|
|
|
- number: quantity,
|
|
|
+ number: reportItem.number,
|
|
|
machine: add_formData['机台号'],
|
|
|
sys_id: userStore.userInfo.nickName,
|
|
|
date: currentDates
|
|
|
@@ -631,13 +903,16 @@ const submitWorkScore = async () => {
|
|
|
warningres('请填写上报数量');
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+ console.log(reportData)
|
|
|
+ // return;
|
|
|
// 调用ReportingWork接口
|
|
|
const response = await ReportingWork(reportData);
|
|
|
|
|
|
if (response.code === 0) {
|
|
|
ElMessage.success('工分报工提交成功');
|
|
|
workScoreDialogVisible.value = false;
|
|
|
+ // 刷新工分报工历史记录
|
|
|
+ await getGongfenHistory();
|
|
|
} else {
|
|
|
warningres(response.msg || '提交失败');
|
|
|
}
|
|
|
@@ -729,7 +1004,7 @@ const add_onSubmit = async ()=>{
|
|
|
warningres('搜索内容不能为空')
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
try {
|
|
|
// 调用Apiorder接口
|
|
|
const response = await Apiorder({ search: add_searchInfo.value });
|
|
|
@@ -742,6 +1017,16 @@ const add_onSubmit = async ()=>{
|
|
|
orderInfoList.length = 0;
|
|
|
orderInfoList.splice(0, response.data.list.length, ...response.data.list);
|
|
|
successres('查询成功');
|
|
|
+
|
|
|
+ // 获取工分报工历史记录
|
|
|
+ await getGongfenHistory();
|
|
|
+
|
|
|
+ // 获取附件数据
|
|
|
+ const searchValue = add_searchInfo.value.split('-')[0];
|
|
|
+ const jsOrderAttachments = await OrderAttachments({order:searchValue,desc:'技术附件'})
|
|
|
+ const ddOrderAttachments = await OrderAttachments({order:searchValue,desc:'订单资料附件'})
|
|
|
+ jstableData.splice(0,jsOrderAttachments.data.list.length,...jsOrderAttachments.data.list);
|
|
|
+ ddtableData.splice(0,ddOrderAttachments.data.list.length,...ddOrderAttachments.data.list);
|
|
|
} else {
|
|
|
warningres(response.msg || '查询失败');
|
|
|
orderInfoList.length = 0;
|
|
|
@@ -756,6 +1041,29 @@ const add_onSubmit = async ()=>{
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+// 获取工分报工历史记录
|
|
|
+const getGongfenHistory = async () => {
|
|
|
+ try {
|
|
|
+ const response = await GetReportingWorkRecord({
|
|
|
+ date: currentDates,
|
|
|
+ machine: add_formData['机台号']
|
|
|
+ });
|
|
|
+ if (response.code === 0 && response.data) {
|
|
|
+ gongfenHistoryData.value = response.data || [];
|
|
|
+ } else {
|
|
|
+ gongfenHistoryData.value = [];
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取工分报工历史记录失败:', error);
|
|
|
+ gongfenHistoryData.value = [];
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+// 复选框选择
|
|
|
+const fjSelectionChange = (selection) => {
|
|
|
+ console.log('选中的附件:', selection);
|
|
|
+};
|
|
|
+
|
|
|
//总数量合计
|
|
|
const getSummaries = (param) => {
|
|
|
const { columns, data } = param;
|
|
|
@@ -997,27 +1305,28 @@ const warningres = (arr) => {
|
|
|
}
|
|
|
|
|
|
.employee-avatar {
|
|
|
- width: 50px;
|
|
|
- height: 50px;
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
border-radius: 50%;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
color: white;
|
|
|
- font-size: 20px;
|
|
|
+ font-size: 24px;
|
|
|
font-weight: bold;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
|
|
|
.employee-name {
|
|
|
- font-size: 14px;
|
|
|
+ font-size: 16px;
|
|
|
font-weight: bold;
|
|
|
margin-bottom: 5px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
|
|
|
.employee-id {
|
|
|
- font-size: 12px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
color: #666;
|
|
|
text-align: center;
|
|
|
}
|
|
|
@@ -1248,4 +1557,97 @@ const warningres = (arr) => {
|
|
|
/* 调整对勾高度 */
|
|
|
}
|
|
|
|
|
|
+/* 部件列表样式 */
|
|
|
+.part-list {
|
|
|
+ border: 1px solid #e0e0e0;
|
|
|
+ border-radius: 4px;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.part-item {
|
|
|
+ padding: 15px;
|
|
|
+ border-bottom: 1px solid #f0f0f0;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+}
|
|
|
+
|
|
|
+.part-item:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+}
|
|
|
+
|
|
|
+.part-item:hover {
|
|
|
+ background-color: #f5f7fa;
|
|
|
+}
|
|
|
+
|
|
|
+.part-item.selected {
|
|
|
+ background-color: #ecf5ff;
|
|
|
+ border-left: 4px solid #409EFF;
|
|
|
+}
|
|
|
+
|
|
|
+.part-info {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+
|
|
|
+.part-number {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #999;
|
|
|
+ margin-bottom: 5px;
|
|
|
+}
|
|
|
+
|
|
|
+.part-name {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+
|
|
|
+/* 员工网格样式 */
|
|
|
+.employee-grid {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(8, 1fr);
|
|
|
+ gap: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.employee-card {
|
|
|
+ border: 1px solid #e0e0e0;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 10px;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+}
|
|
|
+
|
|
|
+.employee-card:hover {
|
|
|
+ border-color: #409EFF;
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
|
+}
|
|
|
+
|
|
|
+.employee-card.selected {
|
|
|
+ border-color: #67C23A;
|
|
|
+ background-color: #F0F9EB;
|
|
|
+}
|
|
|
+
|
|
|
+.employee-avatar {
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ border-radius: 50%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin: 0 auto 8px;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: white;
|
|
|
+}
|
|
|
+
|
|
|
+.employee-name {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 500;
|
|
|
+ margin-bottom: 3px;
|
|
|
+}
|
|
|
+
|
|
|
+.employee-id {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #999;
|
|
|
+}
|
|
|
+
|
|
|
</style>
|