|
@@ -103,6 +103,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="btn-margin" v-if="!isDetails && item.currentTaskDiagram.isFirstTask==1 && item.semiProductList.length==0 && clientEnvironmentId== 3">
|
|
|
|
|
+ <div class="lable lable100 rx-cc"></div>
|
|
|
|
|
+ <el-button class="" @click="singleQuery" type="primary">
|
|
|
|
|
+ 创建在制品
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -129,7 +136,9 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
-
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ createInProductBatchTG,
|
|
|
|
|
+} from '@/api/produce/workOrder';
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -204,7 +213,6 @@ export default {
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// if(item.semiProductList){
|
|
// if(item.semiProductList){
|
|
|
// let allReportWeight=0
|
|
// let allReportWeight=0
|
|
|
// item.semiProductList.map(sitem=>{
|
|
// item.semiProductList.map(sitem=>{
|
|
@@ -293,7 +301,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
notForme() {
|
|
notForme() {
|
|
|
-
|
|
|
|
|
let weight = Number(this.notFormedList[0].notFormedNum) * Number(this.item.singleWeight) * Number(this
|
|
let weight = Number(this.notFormedList[0].notFormedNum) * Number(this.item.singleWeight) * Number(this
|
|
|
.item.weightMultiple)
|
|
.item.weightMultiple)
|
|
|
if (this.item.singleWeightUnit == 'G' || this.item.singleWeightUnit == 'g' || this.item.singleWeightUnit ==
|
|
if (this.item.singleWeightUnit == 'G' || this.item.singleWeightUnit == 'g' || this.item.singleWeightUnit ==
|
|
@@ -339,7 +346,56 @@ export default {
|
|
|
}
|
|
}
|
|
|
// this.notForme();
|
|
// this.notForme();
|
|
|
// this.blurNum()
|
|
// this.blurNum()
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ singleQuery() {
|
|
|
|
|
+ console.log(this.item.workReportInfo);
|
|
|
|
|
+ if (!this.item.workReportInfo.formedNum) return this.$message.info("请输入合格品数")
|
|
|
|
|
+
|
|
|
|
|
+ if (this.item.workReportInfo.notFormedNum === '' || this.item.workReportInfo.notFormedNum == null) return this.$message.info(
|
|
|
|
|
+ "请输入不合格品数"
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ const req = {
|
|
|
|
|
+ "formedNum": this.item.workReportInfo.formedNum,
|
|
|
|
|
+ "notFormedNum": this.item.workReportInfo.notFormedNum||0,
|
|
|
|
|
+ "taskId": this.item.currentTaskDiagram.taskId,
|
|
|
|
|
+ "workOrderId": this.item.workReportInfo.workOrderId,
|
|
|
|
|
+ "formedWeight": this.item.workReportInfo.formedWeight,
|
|
|
|
|
+ "notFormedWeight": this.item.workReportInfo.notFormedWeight
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ createInProductBatchTG(req).then(res => {
|
|
|
|
|
+ if (res && res.length) {
|
|
|
|
|
+ this.forValue = res[0];
|
|
|
|
|
+
|
|
|
|
|
+ res.map(v => {
|
|
|
|
|
+ v.selected = true;
|
|
|
|
|
+ v.extInfo.batchReportInfo = [
|
|
|
|
|
+ {
|
|
|
|
|
+ allFeedQuantity: '',
|
|
|
|
|
+ allReportWeight: '',
|
|
|
|
|
+ taskId: '',
|
|
|
|
|
+ taskName: ''
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ v.extInfo.notBatchReportInfo = [
|
|
|
|
|
+ {
|
|
|
|
|
+ allFeedQuantity: '',
|
|
|
|
|
+ notType: '',
|
|
|
|
|
+ taskId: '',
|
|
|
|
|
+ taskName: '',
|
|
|
|
|
+ notReason: ''
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
|
|
+ })
|
|
|
|
|
+ this.list = res;
|
|
|
|
|
+ this.item.semiProductList = res;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
@@ -479,4 +535,7 @@ export default {
|
|
|
background: rgb(21, 122, 44);
|
|
background: rgb(21, 122, 44);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.btn-margin{
|
|
|
|
|
+ margin: 10px 0 10px 100px;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|