|
|
@@ -17,7 +17,8 @@
|
|
|
<el-button type="primary" icon="Sort" class="bt" :disabled="!_Gd_gdbh" @click="openSortDialog">部件与工艺排序</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="BOMclick" class="bt" title="BOM面料">批量修改新增BOM资料</el-button>
|
|
|
<el-button type="danger" icon="edit" @click="del_ddzlClick" v-if="table_del=== true" :disabled="table_Selection === ''" class="bt" title="选中复选框进行删除订单数据">删除订单资料</el-button>
|
|
|
- <el-button type="danger" icon="edit" @click="delgd_delclick" v-if="delall=== true" :disabled="ysSelection === '' && gySelection === ''" class="bt" title="选中复选框进行删除颜色数据">删除颜色资料</el-button>
|
|
|
+ <el-button type="danger" icon="edit" @click="delgd_delclick" v-if="delall=== true" :disabled="ysSelection === ''" class="bt" title="选中复选框进行删除颜色数据">删除颜色资料</el-button>
|
|
|
+ <el-button type="danger" icon="edit" @click="delgy_delclick" v-if="delall=== true" :disabled="gySelection === ''" class="bt" title="选中复选框进行删除工艺数据">删除工艺资料</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="copyProductData" :disabled="!_Gd_gdbh" class="bt" title="复制产品资料">复制产品资料</el-button>
|
|
|
<el-button type="primary" icon="upload" @click="openImportProcessDialog" :disabled="!_Gd_gdbh" class="bt" title="导入工艺资料">导入工艺资料</el-button>
|
|
|
|
|
|
@@ -88,6 +89,7 @@
|
|
|
<el-table-column align="left" label="单位" prop="单位" width="60" />
|
|
|
<el-table-column align="left" label="面料" prop="面料" width="180" />
|
|
|
<el-table-column align="left" label="备注" prop="要求" width="180" />
|
|
|
+ <el-table-column align="left" label="计划制造工分" prop="计划制造工分" width="180" />
|
|
|
<el-table-column align="left" label="粘衬" prop="粘衬" width="180" />
|
|
|
<el-table-column align="left" label="箱唛要求" prop="箱唛要求" width="180" />
|
|
|
<el-table-column align="left" label="制单人" prop="Sys_id" width="160" />
|
|
|
@@ -176,15 +178,17 @@
|
|
|
@row-click="clickybupdate2"
|
|
|
:row-class-name="rowClassStyle2"
|
|
|
@selection-change="selectionChange($event, '工艺资料')"
|
|
|
- style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="gytableData" row-key="id">
|
|
|
+ style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="gytableData" row-key="id"
|
|
|
+ :summary-method="gySummaries"
|
|
|
+ show-summary>
|
|
|
<el-table-column type="selection" width="30" />
|
|
|
<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="80"/>
|
|
|
<el-table-column align="left" label="工艺名称" prop="工艺名称" width="200"/>
|
|
|
- <el-table-column align="left" label="大工艺" prop="大工艺" width="80"/>
|
|
|
- <el-table-column align="left" label="标准工时" prop="标准工时" width="80"/>
|
|
|
- <el-table-column align="left" label="标准公分" prop="标准公分" width="80"/>
|
|
|
+ <el-table-column align="left" label="生产工序" prop="大工艺" width="80"/>
|
|
|
+ <el-table-column align="left" label="工时" prop="标准工时" width="80"/>
|
|
|
+ <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="60"/>
|
|
|
<el-table-column align="left" label="系统人" prop="系统人" width="100"/>
|
|
|
@@ -366,144 +370,148 @@
|
|
|
<div style="padding: 20px; height: calc(100vh - 80px); overflow: hidden; box-sizing: border-box;">
|
|
|
<!-- 上方信息 -->
|
|
|
<div style="margin-bottom: 15px; overflow-x: auto;">
|
|
|
- <el-row :gutter="15" style="width: max-content; display: flex; align-items: flex-start;">
|
|
|
- <!-- 第一列 -->
|
|
|
- <div style="display: flex; flex-direction: column; gap: 10px;">
|
|
|
- <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
- <span style="width: 90px; text-align: right; margin-right: 10px;">订单编号:</span>
|
|
|
- <el-input v-model="gyDetailFormData.订单编号" disabled style="width: 200px;" />
|
|
|
- </div>
|
|
|
- <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
- <span style="width: 90px; text-align: right; margin-right: 10px;">接单日期:</span>
|
|
|
- <el-input v-model="gyDetailFormData.接单日期" disabled style="width: 180px;" />
|
|
|
- </div>
|
|
|
+ <el-row :gutter="20" style="width: max-content; display: flex; align-items: center;">
|
|
|
+ <!-- 第一组 -->
|
|
|
+ <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
+ <span style="width: 80px; text-align: right; margin-right: 8px;">订单编号:</span>
|
|
|
+ <el-input v-model="gyDetailFormData.订单编号" disabled style="width: 100px;" />
|
|
|
</div>
|
|
|
- <!-- 第二列 -->
|
|
|
- <div style="display: flex; flex-direction: column; gap: 10px;">
|
|
|
- <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
- <span style="width: 90px; text-align: right; margin-right: 10px;">客户编号:</span>
|
|
|
- <el-input v-model="gyDetailFormData.客户编号" disabled style="width: 150px;" />
|
|
|
- </div>
|
|
|
- <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
- <span style="width: 90px; text-align: right; margin-right: 10px;">审核:</span>
|
|
|
- <el-input v-model="gyDetailFormData.审核" disabled style="width: 120px;" />
|
|
|
- </div>
|
|
|
+ <!-- 第二组 -->
|
|
|
+ <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
+ <span style="width: 80px; text-align: right; margin-right: 8px;">客户编号:</span>
|
|
|
+ <el-input v-model="gyDetailFormData.客户编号" disabled style="width: 70px;" />
|
|
|
</div>
|
|
|
- <!-- 第三列 -->
|
|
|
- <div style="display: flex; flex-direction: column; gap: 10px;">
|
|
|
- <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
- <span style="width: 90px; text-align: right; margin-right: 10px;">生产款号:</span>
|
|
|
- <el-input v-model="gyDetailFormData.生产款号" disabled style="width: 180px;" />
|
|
|
- </div>
|
|
|
- <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
- <span style="width: 90px; text-align: right; margin-right: 10px;">订单数量:</span>
|
|
|
- <el-input v-model="gyDetailFormData.订单数量" disabled style="width: 120px;" />
|
|
|
- </div>
|
|
|
+ <!-- 第三组 -->
|
|
|
+ <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
+ <span style="width: 80px; text-align: right; margin-right: 8px;">生产款号:</span>
|
|
|
+ <el-input v-model="gyDetailFormData.生产款号" disabled style="width: 280px;" />
|
|
|
</div>
|
|
|
- <!-- 第四列 -->
|
|
|
- <div style="display: flex; flex-direction: column; gap: 10px;">
|
|
|
- <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
- <span style="width: 90px; text-align: right; margin-right: 10px;">款式:</span>
|
|
|
- <el-input v-model="gyDetailFormData.款式" disabled style="width: 250px;" />
|
|
|
- </div>
|
|
|
- <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
- <span style="width: 90px; text-align: right; margin-right: 10px;">计划制造工分:</span>
|
|
|
- <el-input v-model="gyDetailFormData.计划制造工分" disabled style="width: 150px;" />
|
|
|
- </div>
|
|
|
+ <!-- 第四组 -->
|
|
|
+ <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
+ <span style="width: 60px; text-align: right; margin-right: 8px;">款式:</span>
|
|
|
+ <el-input v-model="gyDetailFormData.款式" disabled style="width: 200px;" />
|
|
|
</div>
|
|
|
- <!-- 第五列 -->
|
|
|
- <div style="display: flex; flex-direction: column; gap: 10px;">
|
|
|
- <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
- <span style="width: 90px; text-align: right; margin-right: 10px;">落货日期:</span>
|
|
|
- <el-input v-model="gyDetailFormData.落货日期" disabled style="width: 180px;" />
|
|
|
- </div>
|
|
|
+ <!-- 第五组 -->
|
|
|
+ <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
+ <span style="width: 60px; text-align: right; margin-right: 8px;">接单日期:</span>
|
|
|
+ <el-input v-model="gyDetailFormData.接单日期" disabled style="width: 160px;" />
|
|
|
</div>
|
|
|
- <!-- 第六列 -->
|
|
|
- <div style="display: flex; flex-direction: column; gap: 10px;">
|
|
|
- <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
- <span style="width: 90px; text-align: right; margin-right: 10px;">审核日期:</span>
|
|
|
- <el-input v-model="gyDetailFormData.审核日期" disabled style="width: 180px;" />
|
|
|
- </div>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="width: max-content; display: flex; align-items: center; margin-top: 10px;">
|
|
|
+ <!-- 第六组 -->
|
|
|
+ <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
+ <span style="width: 80px; text-align: right; margin-right: 8px;">落货日期:</span>
|
|
|
+ <el-input v-model="gyDetailFormData.落货日期" disabled style="width: 160px;" />
|
|
|
+ </div>
|
|
|
+ <!-- 第七组 -->
|
|
|
+ <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
+ <span style="width: 80px; text-align: right; margin-right: 8px;">审核日期:</span>
|
|
|
+ <el-input v-model="gyDetailFormData.审核日期" disabled style="width: 160px;" />
|
|
|
+ </div>
|
|
|
+ <!-- 第八组 -->
|
|
|
+ <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
+ <span style="width: 60px; text-align: right; margin-right: 8px;">审核:</span>
|
|
|
+ <el-input v-model="gyDetailFormData.审核" disabled style="width: 100px;" />
|
|
|
+ </div>
|
|
|
+ <!-- 第九组 -->
|
|
|
+ <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
+ <span style="width: 80px; text-align: right; margin-right: 8px;">订单数量:</span>
|
|
|
+ <el-input v-model="gyDetailFormData.订单数量" disabled style="width: 100px;" />
|
|
|
+ </div>
|
|
|
+ <!-- 第十组 - 计划制造工分 + 修改按钮 -->
|
|
|
+ <div style="display: flex; align-items: center; white-space: nowrap;">
|
|
|
+ <span style="width: 100px; text-align: right; margin-right: 8px;">计划制造工分:</span>
|
|
|
+ <el-input v-model="gyDetailFormData.计划制造工分" style="width: 120px;" />
|
|
|
+ <el-button type="primary" style="margin-left: 10px;" @click="handleUpdatePlanManufacture">修改制造工分</el-button>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
|
|
|
<!-- 工艺列表表格 -->
|
|
|
- <div style="height: calc(100vh - 200px); overflow: auto; border: 1px solid #EBEEF5; border-radius: 4px;">
|
|
|
+ <div style="height: calc(100vh - 230px); overflow: auto; border: 1px solid #EBEEF5; border-radius: 4px;">
|
|
|
<el-table
|
|
|
:data="gyDetailFormData.工艺列表"
|
|
|
border
|
|
|
size="small"
|
|
|
- style="width: 100%;"
|
|
|
- :show-overflow-tooltip="true">
|
|
|
- <el-table-column align="left" label="部件编号" width="100">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row.部件编号" size="small" style="width: 90px;" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="left" label="部件名称" width="150">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row.部件名称" size="small" style="width: 140px;" />
|
|
|
+ style="width: 100%; min-width: 1200px;"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ max-height="calc(100vh - 250px)"
|
|
|
+ :summary-method="gyDetailSummaries"
|
|
|
+ show-summary>
|
|
|
+ <!-- <el-table-column type="index" width="50" fixed="left" /> -->
|
|
|
+ <el-table-column align="left" label="部件编号" prop="部件编号" width="100" />
|
|
|
+ <el-table-column align="left" label="部件名称" prop="部件名称" width="150" />
|
|
|
+ <el-table-column align="left" label="工艺编号" prop="工序编号" width="100" />
|
|
|
+ <el-table-column align="left" label="工艺名称" prop="工序名称" width="250">
|
|
|
+ <template #default="scope">
|
|
|
+ <template v-if="userStore.userInfo.nickName === '邢科芳'">
|
|
|
+ {{ scope.row.工序名称 }}
|
|
|
+ </template>
|
|
|
+ <el-input v-else v-model="scope.row.工序名称" size="small" style="width: 240px;" @blur="handleUpdateProcess(scope.row)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="left" label="工序编号" width="100">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row.工序编号" size="small" style="width: 90px;" />
|
|
|
+ <el-table-column align="left" label="大工序" prop="大工序" width="100" :filters="dagongxuFilters" :filter-method="filterDaGongXu">
|
|
|
+ <template #default="scope">
|
|
|
+ <template v-if="userStore.userInfo.nickName === '邢科芳'">
|
|
|
+ {{ scope.row.大工序 }}
|
|
|
+ </template>
|
|
|
+ <el-input v-else v-model="scope.row.大工序" size="small" style="width: 60px;" @blur="handleUpdateProcess(scope.row)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="left" label="工序名称" width="250">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row.工序名称" size="small" style="width: 240px;" />
|
|
|
+ <el-table-column align="left" label="秒" prop="秒" width="60">
|
|
|
+ <template #default="scope">
|
|
|
+ <template v-if="userStore.userInfo.nickName === '邢科芳'">
|
|
|
+ {{ scope.row.秒 }}
|
|
|
+ </template>
|
|
|
+ <el-input v-else v-model="scope.row.秒" size="small" style="width: 50px;" @blur="handleUpdateProcess(scope.row)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="left" label="大工序" width="100">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row.大工序" size="small" style="width: 90px;" />
|
|
|
+ <el-table-column align="left" label="分" prop="分" width="60">
|
|
|
+ <template #default="scope">
|
|
|
+ <template v-if="userStore.userInfo.nickName === '邢科芳'">
|
|
|
+ {{ scope.row.分 }}
|
|
|
+ </template>
|
|
|
+ <el-input v-else v-model="scope.row.分" size="small" style="width: 50px;" @blur="handleUpdateProcess(scope.row)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="left" label="秒" width="80">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model.number="row.秒" size="small" style="width: 70px;" />
|
|
|
+ <el-table-column align="left" label="工分" prop="定额分" width="70">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input v-model="scope.row.定额分" size="small" style="width: 60px;" @blur="handleUpdateProcess(scope.row)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="left" label="分" width="80">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row.分" size="small" style="width: 70px;" />
|
|
|
+ <el-table-column align="left" label="金额" prop="金额" width="80">
|
|
|
+ <template #default="scope">
|
|
|
+ <template v-if="userStore.userInfo.nickName === '邢科芳'">
|
|
|
+ {{ scope.row.金额 }}
|
|
|
+ </template>
|
|
|
+ <el-input v-else v-model="scope.row.金额" size="small" style="width: 70px;" @blur="handleUpdateProcess(scope.row)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="left" label="定额分" width="100">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row.定额分" size="small" style="width: 90px;" />
|
|
|
+ <el-table-column align="left" label="难度系数" prop="难度系数" width="80">
|
|
|
+ <template #default="scope">
|
|
|
+ <template v-if="userStore.userInfo.nickName === '邢科芳'">
|
|
|
+ {{ scope.row.难度系数 }}
|
|
|
+ </template>
|
|
|
+ <el-input v-else v-model="scope.row.难度系数" size="small" style="width: 60px;" @blur="handleUpdateProcess(scope.row)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="left" label="金额" width="100">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row.金额" size="small" style="width: 90px;" />
|
|
|
+ <el-table-column align="left" label="备注" prop="备注" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <template v-if="userStore.userInfo.nickName === '邢科芳'">
|
|
|
+ {{ scope.row.备注 }}
|
|
|
+ </template>
|
|
|
+ <el-input v-else v-model="scope.row.备注" size="small" style="width: 100px;" @blur="handleUpdateProcess(scope.row)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="left" label="难度系数" width="100">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row.难度系数" size="small" style="width: 90px;" />
|
|
|
+ <el-table-column align="left" label="状态" prop="状态" width="60">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.状态 === 0 ? '正常' : '拆分' }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="left" label="备注" width="150">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-input v-model="row.备注" size="small" style="width: 140px;" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="left" label="状态" width="100">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-select v-model="row.状态" size="small" style="width: 90px;">
|
|
|
- <el-option :value="0" label="正常" />
|
|
|
- <el-option :value="1" label="拆分" />
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="left" label="操作" width="200">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-button size="small" type="primary" plain>修改</el-button>
|
|
|
- <el-button size="small" type="success" plain>拆分</el-button>
|
|
|
- <el-button size="small" type="danger" plain>删除</el-button>
|
|
|
+ <el-table-column align="left" label="操作" width="150" fixed="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button size="small" type="success" style="margin-right: 5px;" @click="handleSplitProcess(scope.row)">拆分</el-button>
|
|
|
+ <el-button size="small" type="danger" @click="handleDeleteProcess(scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -511,6 +519,30 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!-- 拆分弹窗 -->
|
|
|
+ <el-dialog v-model="splitDialogVisible" title="拆分工序" width="450px" style="top: 30%;" @close="splitDialogVisible = false">
|
|
|
+ <div style="padding: 20px;">
|
|
|
+ <div v-if="hasReportData" style="color: #f56c6c; margin-bottom: 15px; font-weight: bold; text-align: center;">
|
|
|
+ ⚠️ 该工序已存在报工数据
|
|
|
+ </div>
|
|
|
+ <div style="margin-bottom: 15px; text-align: center;">
|
|
|
+ <span>将复制 {{ currentSplitRow?.工序编号 || '' }}-{{ currentSplitRow?.工序名称 || '' }},拆分数量为:</span>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; justify-content: center;">
|
|
|
+ <el-input
|
|
|
+ v-model="splitQuantity"
|
|
|
+ type="number"
|
|
|
+ placeholder="请输入拆分数量"
|
|
|
+ style="width: 200px;"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="splitDialogVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="confirmSplitProcess">确定</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<!-- 修改颜色资料弹窗 -->
|
|
|
<el-dialog v-model="dialogFormVisible" :before-close="edit_closeDialog"
|
|
|
style="width: 80%; max-height: 80%; overflow-y: auto; margin-top: 4%;"
|
|
|
@@ -2243,7 +2275,7 @@
|
|
|
destroy-on-close
|
|
|
>
|
|
|
<el-form :model="importProcessForm" label-width="100px">
|
|
|
- <el-form-item label="工单编号">
|
|
|
+ <el-form-item label="订单编号">
|
|
|
<el-input v-model="importProcessForm.workorderNo" disabled />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="款号">
|
|
|
@@ -2304,13 +2336,15 @@
|
|
|
import axios from 'axios';
|
|
|
import * as XLSX from 'xlsx';
|
|
|
import jsPDF from 'jspdf';
|
|
|
+ import 'vxe-table/lib/style.css';
|
|
|
+ import { VxeTable, VxeColumn } from 'vxe-table';
|
|
|
import Sortable from '@/utils/vendor/sortable.esm.js'
|
|
|
import {Datalist,WorkOrderList,WorkOrderAdd,PrintListData,
|
|
|
printDetailAdd,PrintDetailDel,orderDataDel,getWorkOrder,
|
|
|
getSuborder,PrintDataEdit,WorkOrderEdit,gdAnnexAdd,upload,OrderAttachments,
|
|
|
getPonumber,FabricEdit,orderBomList,FabricDetail,fabricList,Bomdel,delfujian,Read_File,Read_Add,PartList,GetProcessList,
|
|
|
AddPart,UpdatePartInfo,DeletePart,AddProcess,UpdateProcess,DeleteProcess,getproducttype,workorderprocessCopy,sortProcess,getProductStyleList,
|
|
|
- importProcess,getWorkOrderInfo,getWorkOrderProcess,updateWorkOrderPlanManufacture} from '@/api/mes/job'
|
|
|
+ importProcess,getWorkOrderProcess,updateWorkOrderPlanManufacture,checkProcessReport,confirmProcessSplit} from '@/api/mes/job'
|
|
|
import {ParList,ProcessList} from '@/api/yunyin/product'
|
|
|
import PrintPage from './components/print.vue'
|
|
|
import luckyexcelPage from './components/luckyexcel.vue'
|
|
|
@@ -4790,6 +4824,16 @@ const sortTableData = ref([])
|
|
|
工艺列表: []
|
|
|
})
|
|
|
|
|
|
+ // 大工序筛选器
|
|
|
+ const dagongxuFilters = computed(() => {
|
|
|
+ const processes = new Set(gyDetailFormData.工艺列表.map(item => item.大工序).filter(Boolean))
|
|
|
+ return Array.from(processes).map(process => ({ text: process, value: process }))
|
|
|
+ })
|
|
|
+
|
|
|
+ const filterDaGongXu = (value, row) => {
|
|
|
+ return row.大工序 === value
|
|
|
+ }
|
|
|
+
|
|
|
const gdgyupdateCompanyFunc = async (row) => {
|
|
|
const workorder = _Gd_gdbh.value || row['订单编号'] || ''
|
|
|
if (!workorder) {
|
|
|
@@ -4799,9 +4843,9 @@ const sortTableData = ref([])
|
|
|
|
|
|
try {
|
|
|
// 获取订单信息
|
|
|
- const orderInfoRes = await getWorkOrderInfo({ workorder })
|
|
|
- if (orderInfoRes.code === 0 && orderInfoRes.data) {
|
|
|
- const data = orderInfoRes.data
|
|
|
+ const orderInfoRes = await WorkOrderList({ search: workorder, page: 1, limit: 1 })
|
|
|
+ if (orderInfoRes.code === 0 && orderInfoRes.data && orderInfoRes.data.data && orderInfoRes.data.data.length > 0) {
|
|
|
+ const data = orderInfoRes.data.data[0]
|
|
|
gyDetailFormData.订单编号 = data['订单编号'] || ''
|
|
|
gyDetailFormData.客户编号 = data['客户编号'] || ''
|
|
|
gyDetailFormData.生产款号 = data['生产款号'] || ''
|
|
|
@@ -4812,6 +4856,7 @@ const sortTableData = ref([])
|
|
|
gyDetailFormData.审核 = data['审核'] || ''
|
|
|
gyDetailFormData.订单数量 = data['订单数量'] || ''
|
|
|
gyDetailFormData.计划制造工分 = data['计划制造工分'] || ''
|
|
|
+ gyDetailFormData.Uniqid = data['Uniqid'] || ''
|
|
|
}
|
|
|
|
|
|
// 获取工艺列表
|
|
|
@@ -4833,6 +4878,127 @@ const sortTableData = ref([])
|
|
|
gyDetailDialogVisible.value = false
|
|
|
}
|
|
|
|
|
|
+ // 修改计划制造工分
|
|
|
+ const handleUpdatePlanManufacture = async () => {
|
|
|
+ try {
|
|
|
+ const result = await updateWorkOrderPlanManufacture({
|
|
|
+ id: gyDetailFormData.Uniqid,
|
|
|
+ number: gyDetailFormData.计划制造工分,
|
|
|
+ sys_id: userStore.userInfo.nickName
|
|
|
+ })
|
|
|
+ if (result.code === 0) {
|
|
|
+ ElMessage.success('修改成功')
|
|
|
+ } else {
|
|
|
+ // ElMessage.error(result.msg || '修改失败')
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ ElMessage.error('修改失败')
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 拆分弹窗相关
|
|
|
+ const splitDialogVisible = ref(false)
|
|
|
+ const splitQuantity = ref('')
|
|
|
+ const currentSplitRow = ref(null)
|
|
|
+ const hasReportData = ref(false)
|
|
|
+
|
|
|
+ // 处理拆分工艺
|
|
|
+ const handleSplitProcess = async (row) => {
|
|
|
+ currentSplitRow.value = row
|
|
|
+ splitQuantity.value = ''
|
|
|
+
|
|
|
+ try {
|
|
|
+ const result = await checkProcessReport({
|
|
|
+ workorder: gyDetailFormData.订单编号,
|
|
|
+ process_code: row.工序编号
|
|
|
+ })
|
|
|
+
|
|
|
+ if (result.code === 0) {
|
|
|
+ hasReportData.value = false
|
|
|
+ } else if (result.code === 1) {
|
|
|
+ hasReportData.value = true
|
|
|
+ }
|
|
|
+
|
|
|
+ splitDialogVisible.value = true
|
|
|
+ } catch (error) {
|
|
|
+ ElMessage.error('检查工序报工状态失败')
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 确认拆分
|
|
|
+ const confirmSplitProcess = async () => {
|
|
|
+ if (!splitQuantity.value || isNaN(splitQuantity.value) || parseInt(splitQuantity.value) <= 0) {
|
|
|
+ ElMessage.error('请输入有效的拆分数量')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ const result = await confirmProcessSplit({
|
|
|
+ id: currentSplitRow.value.id,
|
|
|
+ number: parseInt(splitQuantity.value),
|
|
|
+ sys_id: userStore.userInfo.nickName
|
|
|
+ })
|
|
|
+
|
|
|
+ if (result.code === 0) {
|
|
|
+ ElMessage.success('拆分成功')
|
|
|
+ splitDialogVisible.value = false
|
|
|
+ // 刷新表格数据
|
|
|
+ await gdgyupdateCompanyFunc()
|
|
|
+ } else {
|
|
|
+ // ElMessage.error(result.msg || '拆分失败')
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ ElMessage.error('拆分失败')
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 删除工艺
|
|
|
+ const handleDeleteProcess = async (row) => {
|
|
|
+ try {
|
|
|
+ const result = await DeleteProcess({ id: row.id })
|
|
|
+ if (result.code === 0) {
|
|
|
+ ElMessage.success('删除成功')
|
|
|
+ // 从列表中移除该行
|
|
|
+ const index = gyDetailFormData.工艺列表.findIndex(item => item.id === row.id)
|
|
|
+ if (index > -1) {
|
|
|
+ gyDetailFormData.工艺列表.splice(index, 1)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // ElMessage.error(result.msg || '删除失败')
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ ElMessage.error('删除失败')
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 修改工艺
|
|
|
+ const handleUpdateProcess = async (row) => {
|
|
|
+ try {
|
|
|
+ const result = await UpdateProcess({
|
|
|
+ id: row.id,
|
|
|
+ process_name: row.工序名称 || '',
|
|
|
+ big_process: row.大工序 || '',
|
|
|
+ standard_hour: row.秒 || '',
|
|
|
+ standard_minutes: row.分 || '',
|
|
|
+ standard_score: row.定额分 || '',
|
|
|
+ money: row.金额 || '',
|
|
|
+ coefficient: row.难度系数 || '',
|
|
|
+ remark: row.备注 || '',
|
|
|
+ mod_id: userStore.userInfo.nickName,
|
|
|
+ part_code: row.部件编号 || '',
|
|
|
+ part_name: row.部件名称 || '',
|
|
|
+ process_code: row.工序编号 || ''
|
|
|
+ })
|
|
|
+ if (result.code === 0) {
|
|
|
+ ElMessage.success('修改成功')
|
|
|
+ } else {
|
|
|
+ // ElMessage.error(result.msg || '修改失败')
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ // 忽略错误,不提示
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// =========== 订单打印 ===========
|
|
|
//弹窗
|
|
|
const order_viewVisible = ref(false)
|
|
|
@@ -5374,10 +5540,11 @@ const sortTableData = ref([])
|
|
|
if(jsOrderAttachments.code === 0 && ddOrderAttachments.code === 0){
|
|
|
jstableData.splice(0,jsOrderAttachments.data.list.length,...jsOrderAttachments.data.list);
|
|
|
ddtableData.splice(0,ddOrderAttachments.data.list.length,...ddOrderAttachments.data.list);
|
|
|
- if(_username.value === fhdOrderAttachments.data.list[0]['sys_id'] || _username.value === 'admin/超级管理员'){
|
|
|
- fhdtableData.splice(0,fhdOrderAttachments.data.list.length,...fhdOrderAttachments.data.list);
|
|
|
+ if(fhdOrderAttachments.data && fhdOrderAttachments.data.list && fhdOrderAttachments.data.list.length > 0){
|
|
|
+ if(_username.value === fhdOrderAttachments.data.list[0]['sys_id'] || _username.value === 'admin/超级管理员'){
|
|
|
+ fhdtableData.splice(0,fhdOrderAttachments.data.list.length,...fhdOrderAttachments.data.list);
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -5511,12 +5678,14 @@ const sortTableData = ref([])
|
|
|
const gySelection = ref('')
|
|
|
// 颜色资料多选、工艺资料多选
|
|
|
const selectionChange = (selection, type) => {
|
|
|
- const ids = selection.map(item => item.Uniqid ?? item.UniqID ?? item.UniqId)
|
|
|
if (type === '颜色资料') {
|
|
|
+ const ids = selection.map(item => item.Uniqid ?? item.UniqID ?? item.UniqId)
|
|
|
console.log('[颜色资料] 勾选 Uniqid:', ids)
|
|
|
ysSelection.value = ids.filter((v) => v != null && v !== '').join(',')
|
|
|
}
|
|
|
if (type === '工艺资料') {
|
|
|
+ const ids = selection.map(item => item.id)
|
|
|
+ console.log('[工艺资料] 勾选 id:', ids)
|
|
|
gySelection.value = ids.filter((v) => v != null && v !== '').join(',')
|
|
|
}
|
|
|
}
|
|
|
@@ -5552,6 +5721,27 @@ const sortTableData = ref([])
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ // 删除工艺资料
|
|
|
+ const delgy_delclick = async () => {
|
|
|
+ try {
|
|
|
+ if (gySelection.value !== '') {
|
|
|
+ const res = await DeleteProcess({ id: gySelection.value });
|
|
|
+ if (res.code === 0) {
|
|
|
+ ElMessage.success('工艺资料删除成功');
|
|
|
+ // 刷新工艺资料表格
|
|
|
+ const processListData = await GetProcessList({ workorder: _Gd_gdbh.value });
|
|
|
+ if (processListData?.code === 0 && Array.isArray(processListData.data)) {
|
|
|
+ gytableData.splice(0, gytableData.length, ...processListData.data);
|
|
|
+ } else {
|
|
|
+ gytableData.splice(0, gytableData.length);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ ElMessage.error(err);
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
const fj_Selection = ref('')//存储选中Uniqid
|
|
|
const fjSelection = ref('')
|
|
|
const fjdelall = ref(true)
|
|
|
@@ -5624,10 +5814,10 @@ const sortTableData = ref([])
|
|
|
sums[index] = '总数量合计';
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (summableLabels.includes(column.label)) {
|
|
|
const values = data.map(item => Number(item[column.property]));
|
|
|
-
|
|
|
+
|
|
|
// 检查数组中是否所有值都是 NaN
|
|
|
if (!values.every(value => isNaN(value))) {
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
@@ -5644,9 +5834,69 @@ const sortTableData = ref([])
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
+ return sums;
|
|
|
+ };
|
|
|
+
|
|
|
+ //工艺资料合计
|
|
|
+ const gySummaries = ({ columns, data }) => {
|
|
|
+ const sums = [];
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (index === 6) {
|
|
|
+ sums[index] = '合计';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (column.label === '工分') {
|
|
|
+ const values = data.map(item => Number(item[column.property]));
|
|
|
+
|
|
|
+ if (!values.every(value => isNaN(value))) {
|
|
|
+ const total = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + value;
|
|
|
+ }
|
|
|
+ return prev;
|
|
|
+ }, 0);
|
|
|
+ sums[index] = total.toFixed(2);
|
|
|
+ } else {
|
|
|
+ sums[index] = 'N/A';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
return sums;
|
|
|
};
|
|
|
+
|
|
|
+ //工艺详情弹窗合计
|
|
|
+ const gyDetailSummaries = (param) => {
|
|
|
+ const { columns, data } = param;
|
|
|
+ const sums = [];
|
|
|
+ let total = 0;
|
|
|
+ let count = 0;
|
|
|
+
|
|
|
+ data.forEach(item => {
|
|
|
+ if (item && item['定额分'] !== undefined) {
|
|
|
+ const val = Number(item['定额分']);
|
|
|
+ if (!isNaN(val)) {
|
|
|
+ total += val;
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (column.prop === '工序名称') {
|
|
|
+ sums[index] = '合计';
|
|
|
+ } else if (column.label === '工分') {
|
|
|
+ sums[index] = count > 0 ? total.toFixed(2) : '0.00';
|
|
|
+ } else {
|
|
|
+ sums[index] = '';
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ return sums;
|
|
|
+ };
|
|
|
|
|
|
// 面料合计
|
|
|
// const mlgetSummaries = (param) => {
|
|
|
@@ -5882,6 +6132,13 @@ const sortTableData = ref([])
|
|
|
if (response.data.code === 0) {
|
|
|
ElMessage.success('导入成功')
|
|
|
closeImportProcessDialog()
|
|
|
+ // 刷新工艺资料表格数据
|
|
|
+ const processListData = await GetProcessList({ workorder: _Gd_gdbh.value });
|
|
|
+ if (processListData?.code === 0 && Array.isArray(processListData.data)) {
|
|
|
+ gytableData.splice(0, gytableData.length, ...processListData.data);
|
|
|
+ } else {
|
|
|
+ gytableData.splice(0, gytableData.length);
|
|
|
+ }
|
|
|
} else {
|
|
|
ElMessage.error(response.data.msg || '导入失败')
|
|
|
}
|
|
|
@@ -6410,5 +6667,9 @@ const sortTableData = ref([])
|
|
|
.sort-gy-num-input {
|
|
|
width: 100%;
|
|
|
}
|
|
|
+ .gy-detail-dialog .el-table__fixed,
|
|
|
+ .gy-detail-dialog .el-table__fixed-right {
|
|
|
+ bottom: 17px !important;
|
|
|
+ }
|
|
|
</style>
|
|
|
|