|
|
@@ -345,6 +345,7 @@
|
|
|
:singleReportInspection="singleReportInspection"
|
|
|
style="background: rgba(223, 250, 222, 0.6); padding: 10px"
|
|
|
:isPreProductionResult="isPreProductionResult"
|
|
|
+ :activeName="activeName"
|
|
|
></footBtn>
|
|
|
|
|
|
<!-- <div class="box"> -->
|
|
|
@@ -1669,7 +1670,7 @@
|
|
|
async handleJob() {
|
|
|
const resultValue = await this.getFirstArticleConfig();
|
|
|
|
|
|
- if (this.activeName === '1') {
|
|
|
+ if (this.activeName == '1') {
|
|
|
return this.handleTaskJob(resultValue);
|
|
|
}
|
|
|
|
|
|
@@ -1770,7 +1771,7 @@
|
|
|
|
|
|
/* ================== pick ================== */
|
|
|
handlePick() {
|
|
|
- if (this.activeName !== '0') return;
|
|
|
+ if (this.activeName != '0') return;
|
|
|
if (!this.checkWorkOrder({ min: 1 })) return;
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
@@ -1780,7 +1781,7 @@
|
|
|
|
|
|
/* ================== workStep ================== */
|
|
|
handleWorkStep() {
|
|
|
- if (this.activeName !== '0') return;
|
|
|
+ if (this.activeName != '0') return;
|
|
|
if (
|
|
|
!this.checkWorkOrder({
|
|
|
min: 1,
|
|
|
@@ -1795,7 +1796,7 @@
|
|
|
|
|
|
/* ================== task ================== */
|
|
|
handleTask() {
|
|
|
- if (this.activeName !== '0') return;
|
|
|
+ if (this.activeName != '0') return;
|
|
|
if (
|
|
|
!this.checkWorkOrder({
|
|
|
min: 1,
|
|
|
@@ -1813,7 +1814,7 @@
|
|
|
|
|
|
/* ================== work ================== */
|
|
|
async handleWork() {
|
|
|
- if (this.activeName !== '0') return;
|
|
|
+ if (this.activeName != '0') return;
|
|
|
if (
|
|
|
!this.checkWorkOrder({
|
|
|
min: 1,
|
|
|
@@ -1840,7 +1841,7 @@
|
|
|
|
|
|
/* ================== device ================== */
|
|
|
handleDevice() {
|
|
|
- if (this.activeName !== '0') return;
|
|
|
+ if (this.activeName != '0') return;
|
|
|
if (!this.taskObj.id) {
|
|
|
return this.$message.warning('请选择工序');
|
|
|
}
|
|
|
@@ -1849,32 +1850,49 @@
|
|
|
|
|
|
/* ================== bom ================== */
|
|
|
handleBom() {
|
|
|
- if (this.activeName !== '0') return;
|
|
|
- if (
|
|
|
- !this.checkWorkOrder({
|
|
|
- min: 1,
|
|
|
- max: 1,
|
|
|
- msg: { max: '查看BOM详情只能选择一个工单!' }
|
|
|
- })
|
|
|
- )
|
|
|
- return;
|
|
|
+ if (this.activeName == '0') {
|
|
|
+ if (
|
|
|
+ !this.checkWorkOrder({
|
|
|
+ min: 1,
|
|
|
+ max: 1,
|
|
|
+ msg: { max: '查看BOM详情只能选择一个工单!' }
|
|
|
+ })
|
|
|
+ )
|
|
|
+ return;
|
|
|
|
|
|
- const row = this.workData.list[0];
|
|
|
- this.$refs.bomDrawer.open({
|
|
|
- categoryId: row.categoryId,
|
|
|
- categoryName: row.bomCategoryName,
|
|
|
- code: row.code,
|
|
|
- versions: row.bomCategoryVersions,
|
|
|
- rootPathIdParent: row.categoryLevelPathIdParent || '',
|
|
|
- isProduct: true,
|
|
|
- bomType: Number(row.bomType),
|
|
|
- isTemp: 0
|
|
|
- });
|
|
|
+ const row = this.workData.list[0];
|
|
|
+ this.$refs.bomDrawer.open({
|
|
|
+ categoryId: row.categoryId,
|
|
|
+ categoryName: row.bomCategoryName,
|
|
|
+ code: row.code,
|
|
|
+ versions: row.bomCategoryVersions,
|
|
|
+ rootPathIdParent: row.categoryLevelPathIdParent || '',
|
|
|
+ isProduct: true,
|
|
|
+ bomType: Number(row.bomType),
|
|
|
+ isTemp: 0
|
|
|
+ });
|
|
|
+ } else if (this.activeName == '1') {
|
|
|
+ if (!this.taskData) {
|
|
|
+ return this.$message.warning('请选择一条任务单');
|
|
|
+ }
|
|
|
+
|
|
|
+ const row = this.taskData;
|
|
|
+ this.$refs.bomDrawer.open({
|
|
|
+ categoryId: row.categoryId,
|
|
|
+ categoryName: row.bomCategoryName,
|
|
|
+ code: row.code,
|
|
|
+ versions: row.bomCategoryVersions,
|
|
|
+ rootPathIdParent: row.categoryLevelPathIdParent || '',
|
|
|
+ isProduct: true,
|
|
|
+ bomType: Number(row.bomType),
|
|
|
+ isTemp: 0
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
/* ================== Outsourcing ================== */
|
|
|
handleOutsourcing() {
|
|
|
- if (this.activeName !== '0') return;
|
|
|
+ if (this.activeName != '0') return;
|
|
|
if (
|
|
|
!this.checkWorkOrder({
|
|
|
min: 1,
|
|
|
@@ -1889,7 +1907,7 @@
|
|
|
|
|
|
/* ================== 产前 / 过程 / 产后 ================== */
|
|
|
handleInspection(type) {
|
|
|
- if (this.activeName !== '0') return;
|
|
|
+ if (this.activeName != '0') return;
|
|
|
if (
|
|
|
!this.checkWorkOrder({
|
|
|
min: 1,
|
|
|
@@ -1907,7 +1925,7 @@
|
|
|
|
|
|
/* ================== error ================== */
|
|
|
handleError() {
|
|
|
- if (this.activeName === '0') {
|
|
|
+ if (this.activeName == '0') {
|
|
|
if (this.workListIds.length !== 1) {
|
|
|
return this.$message.warning('异常只能选择一个工单!');
|
|
|
}
|
|
|
@@ -1917,7 +1935,7 @@
|
|
|
|
|
|
/* ================== 首件两检 ================== */
|
|
|
handleQualityInspection() {
|
|
|
- if (this.activeName === '0') {
|
|
|
+ if (this.activeName == '0') {
|
|
|
if (
|
|
|
!this.checkWorkOrder({
|
|
|
min: 1,
|