|
@@ -1,12 +1,6 @@
|
|
|
<template>
|
|
|
<div v-if="!loading" class="page-container column-container">
|
|
|
- <el-form
|
|
|
- class="list-search"
|
|
|
- style=""
|
|
|
- :model="lot"
|
|
|
- ref="queryRef"
|
|
|
- :inline="true"
|
|
|
- >
|
|
|
+ <el-form class="list-search" style="" :model="lot" ref="queryRef" :inline="true">
|
|
|
<el-row style="margin-top: 10px">
|
|
|
<el-form-item class="bold-large">
|
|
|
<span>{{ "批次号:" }}</span>
|
|
@@ -22,12 +16,7 @@
|
|
|
<el-tag v-if="lot.isAmend == 1" class="spacing" type="danger">{{
|
|
|
"工艺修改"
|
|
|
}}</el-tag>
|
|
|
- <el-tag
|
|
|
- v-if="lot.isWasteRecycling == 1"
|
|
|
- class="spacing"
|
|
|
- type="primary"
|
|
|
- >{{ "废品回用" }}</el-tag
|
|
|
- >
|
|
|
+ <el-tag v-if="lot.isWasteRecycling == 1" class="spacing" type="primary">{{ "废品回用" }}</el-tag>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
|
|
@@ -197,124 +186,50 @@
|
|
|
</el-form>
|
|
|
<div style="padding: 16px">
|
|
|
<span style="font-weight: bold; font-size: 18px">工艺路线</span>
|
|
|
- <el-button
|
|
|
- v-if="showVerify(true, 'business:lot:onceSingleChange')"
|
|
|
- type="primary"
|
|
|
- style="float: right; margin-left: 10px"
|
|
|
- @click="handleOnceSingleChange"
|
|
|
- >
|
|
|
+ <el-button v-if="showVerify(true, 'business:lot:onceSingleChange')" type="primary"
|
|
|
+ style="float: right; margin-left: 10px" @click="handleOnceSingleChange">
|
|
|
单批单改
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- v-if="showVerify(true, 'business:lot:inBatch')"
|
|
|
- type="primary"
|
|
|
- style="float: right; margin-left: 10px"
|
|
|
- @click="handleSplit()"
|
|
|
- >
|
|
|
+ <el-button v-if="showVerify(true, 'business:lot:inBatch')" type="primary" style="float: right; margin-left: 10px"
|
|
|
+ @click="handleSplit()">
|
|
|
分批
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- v-if="showVerify(true, 'business:lot:waste')"
|
|
|
- :disabled="lot.isWaste == 1"
|
|
|
- type="danger"
|
|
|
- style="float: right; margin-left: 10px"
|
|
|
- @click="handlelotWaste(route.params.lotCode)"
|
|
|
- >
|
|
|
+ <el-button v-if="showVerify(true, 'business:lot:waste')" :disabled="lot.isWaste == 1" type="danger"
|
|
|
+ style="float: right; margin-left: 10px" @click="handlelotWaste(route.params.lotCode)">
|
|
|
批废
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- v-if="showVerify(lot.isAmend == 1, 'business:lot:standard')"
|
|
|
- type="primary"
|
|
|
- style="float: right; margin-left: 10px"
|
|
|
- @click="handleStandardProcess(lot.technologicalProcessId)"
|
|
|
- >
|
|
|
+ <el-button v-if="showVerify(lot.isAmend == 1, 'business:lot:standard')" type="primary"
|
|
|
+ style="float: right; margin-left: 10px" @click="handleStandardProcess(lot.technologicalProcessId)">
|
|
|
查看标准工艺
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="el-table-container">
|
|
|
<div class="el-table-inner-container">
|
|
|
- <el-table
|
|
|
- height="95%"
|
|
|
- :data="processDetails"
|
|
|
- @row-click="handleRowClick"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- type="index"
|
|
|
- label="行号"
|
|
|
- align="center"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="工序名称"
|
|
|
- prop="processAlias"
|
|
|
- align="center"
|
|
|
- ></el-table-column>
|
|
|
+ <el-table height="95%" :data="processDetails" @row-click="handleRowClick">
|
|
|
+ <el-table-column type="index" label="行号" align="center"></el-table-column>
|
|
|
+ <el-table-column label="工序名称" prop="processAlias" align="center"></el-table-column>
|
|
|
<el-table-column label="状态" prop="status" align="center">
|
|
|
<template #default="scope">
|
|
|
<span>{{ getStatusText(scope.row.status) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="投产量"
|
|
|
- prop="investNum"
|
|
|
- align="center"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="合格量"
|
|
|
- prop="qualifiedNum"
|
|
|
- align="center"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="废品量"
|
|
|
- prop="abandonNum"
|
|
|
- align="center"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="结束日期"
|
|
|
- prop="endTime"
|
|
|
- align="center"
|
|
|
- ></el-table-column>
|
|
|
+ <el-table-column label="投产量" prop="investNum" align="center"></el-table-column>
|
|
|
+ <el-table-column label="合格量" prop="qualifiedNum" align="center"></el-table-column>
|
|
|
+ <el-table-column label="废品量" prop="abandonNum" align="center"></el-table-column>
|
|
|
+ <el-table-column label="结束日期" prop="endTime" align="center"></el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<once-change ref="onceChangeRef" @handleSaveSuccess="init" />
|
|
|
<lot-waste-dialog ref="lotWasteDialogRef" @handleSaveSuccess="init" />
|
|
|
- <el-dialog
|
|
|
- title="标准工序"
|
|
|
- v-model="visible"
|
|
|
- width="680px"
|
|
|
- append-to-body
|
|
|
- draggable
|
|
|
- >
|
|
|
+ <el-dialog title="标准工序" v-model="visible" width="680px" append-to-body draggable>
|
|
|
<div class="el-table-inner-container">
|
|
|
- <el-table
|
|
|
- style="height: 600px"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- :data="processList"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- type="selection"
|
|
|
- :selectable="checkSelectable"
|
|
|
- width="50"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- type="index"
|
|
|
- label="序号"
|
|
|
- width="50"
|
|
|
- align="center"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="工序名称"
|
|
|
- prop="processAlias"
|
|
|
- align="center"
|
|
|
- />
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- label="工序编号"
|
|
|
- prop="processStepNumber"
|
|
|
- width="200"
|
|
|
- align="center"
|
|
|
- />
|
|
|
+ <el-table style="height: 600px" @selection-change="handleSelectionChange" :data="processList">
|
|
|
+ <el-table-column type="selection" :selectable="checkSelectable" width="50" align="center" />
|
|
|
+ <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
|
|
|
+ <el-table-column label="工序名称" prop="processAlias" align="center" />
|
|
|
+
|
|
|
+ <el-table-column label="工序编号" prop="processStepNumber" width="200" align="center" />
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -334,8 +249,12 @@ import {
|
|
|
lotParticulars,
|
|
|
selectStandardProcess,
|
|
|
} from "@/api/business/technologicalAmend.js";
|
|
|
+import {
|
|
|
+ checkLotCarrierCategory
|
|
|
+} from '@/api/business/lot.js'
|
|
|
import lotWasteDialog from "./dayworkWasteDialog.vue";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
+import auth from '@/plugins/auth'
|
|
|
|
|
|
/** 查询 对象 */
|
|
|
const processDetails = ref([]);
|
|
@@ -368,7 +287,23 @@ function handleOnceSingleChange() {
|
|
|
proxy.$message.error("批废不能再进行操作");
|
|
|
return;
|
|
|
}
|
|
|
- proxy.$refs.onceChangeRef.open(lot.value.lotCode);
|
|
|
+ // 判断是否有全工段单批单改权限
|
|
|
+ // 没有该权限则判断当前是否在当前工段
|
|
|
+ // 不在当前工段返回错误
|
|
|
+ // 在当前工段向下进行。
|
|
|
+ if (!auth.hasPermi('business:lot:singleChangeForAll')) {
|
|
|
+ if (useUserStore().depts.findIndex(t => t.deptId == lot.value.daywork.deptId) < 0) {
|
|
|
+ proxy.$message.error("您不在当前工段,无法进行单批单改操作");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ checkLotCarrierCategory([lot.value]).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ proxy.$refs.onceChangeRef.open(lot.value.lotCode);
|
|
|
+ } else {
|
|
|
+ proxy.$message.error("修改批次有绑定一箱多批的载具,请更换普通载具进行修改");
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/** 按钮是否显示 */
|