|
|
@@ -1,24 +1,43 @@
|
|
|
<template>
|
|
|
- <el-form :inline="true">
|
|
|
+ <el-form :model="{ categoryMsg, ...workReport }" ref="formRef">
|
|
|
<div class="message-box">
|
|
|
<ul>
|
|
|
- <li> <span class="label">报工次数</span>{{ countMsg.reportNum }}</li>
|
|
|
+ <li> <span class="label">报工次数</span> {{ countMsg.reportNum }}</li>
|
|
|
<li>
|
|
|
- <span class="label">累计合格品数量</span
|
|
|
- >{{ countMsg.standardTotalNum }}</li
|
|
|
+ <span class="label">累计合格品数量</span>
|
|
|
+ {{ countMsg.standardTotalNum }}</li
|
|
|
>
|
|
|
<li>
|
|
|
- <span class="label">累计合格品重量</span
|
|
|
- >{{ countMsg.standardTotalWeight }}</li
|
|
|
+ <span class="label">累计合格品重量</span>
|
|
|
+ {{ countMsg.standardTotalWeight }}</li
|
|
|
>
|
|
|
<li>
|
|
|
- <span class="label">累计投料重量</span
|
|
|
- >{{ countMsg.feedProductWeight }}</li
|
|
|
+ <span class="label">累计投料重量</span>
|
|
|
+ {{ countMsg.feedMaterielWeight }}</li
|
|
|
>
|
|
|
</ul>
|
|
|
<div class="right">
|
|
|
- <el-form-item label="执行人工号"><el-input></el-input></el-form-item>
|
|
|
- <el-form-item label="执行日期"><el-input></el-input></el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="执行人工号"
|
|
|
+ prop="executorJobNum"
|
|
|
+ required
|
|
|
+ label-width="100px"
|
|
|
+ ><personSelectRemote
|
|
|
+ v-model="workReport.executorId"
|
|
|
+ placeholder="请输入"
|
|
|
+ @selfChange="
|
|
|
+ (val, item) => (workReport.executorJobNum = item.jobNumber)
|
|
|
+ "
|
|
|
+ /></el-form-item>
|
|
|
+ <el-form-item label="执行日期" prop="executorTime" label-width="100px"
|
|
|
+ ><el-date-picker
|
|
|
+ v-model="workReport.executorTime"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ type="datetime"
|
|
|
+ format="yyyy-MM-dd HH:mm"
|
|
|
+ placeholder="请选择"
|
|
|
+ ></el-date-picker
|
|
|
+ ></el-form-item>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-card>
|
|
|
@@ -29,93 +48,208 @@
|
|
|
label=""
|
|
|
label-width="0"
|
|
|
class="w100"
|
|
|
- prop="packInfo.packNum"
|
|
|
+ prop="categoryMsg.packNum"
|
|
|
>
|
|
|
- <el-input v-model="workReport.packInfo.packNum"></el-input>
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入"
|
|
|
+ :value="`${categoryMsg.code}/${categoryMsg.name}`"
|
|
|
+ @click.native="getMaterial"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="原料牌号"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
- <el-descriptions-item label="批次号">kooriookami</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="原料牌号">{{
|
|
|
+ categoryMsg.brandNum
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="批次号">
|
|
|
+ <el-select v-model="categoryMsg.batchNo" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in batchList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.batchNum"
|
|
|
+ :value="item.batchNum"
|
|
|
+ @click.native="categoryMsg.totalWeight = item.storageNum"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-descriptions-item>
|
|
|
<el-descriptions-item label="原料重量(KG)"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
- <el-descriptions-item label="质检项">kooriookami</el-descriptions-item>
|
|
|
- <el-descriptions-item label="质检标准"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
- <el-descriptions-item label="合格品数量(PCS)"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
- <el-descriptions-item label="合格品重量(KG)"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
+ ><el-input
|
|
|
+ v-model="categoryMsg.totalWeight"
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-input
|
|
|
+ ></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="质检项" :span="2">{{
|
|
|
+ infoData.qualityItem
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="质检标准" :span="3">{{
|
|
|
+ infoData.qualityStandard
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="">
|
|
|
+ <span class="label-required after" slot="label">合格品数量(PCS)</span>
|
|
|
+ <el-form-item
|
|
|
+ label=""
|
|
|
+ label-width="0"
|
|
|
+ class="w100"
|
|
|
+ prop="productInfo.standardNum"
|
|
|
+ ><el-input-number
|
|
|
+ class="w100"
|
|
|
+ :controls="false"
|
|
|
+ v-model="workReport.productInfo.standardNum"
|
|
|
+ :min="0"
|
|
|
+ clearable
|
|
|
+ ></el-input-number> </el-form-item
|
|
|
+ ></el-descriptions-item>
|
|
|
+ <el-descriptions-item label=""
|
|
|
+ ><span class="label-required after" slot="label">合格品重量(KG)</span>
|
|
|
+ <el-form-item
|
|
|
+ label=""
|
|
|
+ label-width="0"
|
|
|
+ class="w100"
|
|
|
+ prop="productInfo.standardWeight"
|
|
|
+ ><el-input-number
|
|
|
+ readonly
|
|
|
+ class="w100"
|
|
|
+ :controls="false"
|
|
|
+ :value="
|
|
|
+ (workReport.productInfo.standardWeight =
|
|
|
+ workReport.productInfo.standardNum *
|
|
|
+ (infoData.productUnitWeight || 1))
|
|
|
+ "
|
|
|
+ :min="0"
|
|
|
+ clearable
|
|
|
+ ></el-input-number> </el-form-item
|
|
|
+ ></el-descriptions-item>
|
|
|
<el-descriptions-item label="不合格品数量(PCS)">
|
|
|
- <el-input>
|
|
|
- <template slot="append">
|
|
|
- <el-button type="primary">处置</el-button>
|
|
|
- </template>
|
|
|
- </el-input></el-descriptions-item
|
|
|
- >
|
|
|
+ <el-input-number
|
|
|
+ class="w100"
|
|
|
+ :controls="false"
|
|
|
+ v-model="workReport.productInfo.noStandardNum"
|
|
|
+ :min="0"
|
|
|
+ clearable
|
|
|
+ ></el-input-number>
|
|
|
+ </el-descriptions-item>
|
|
|
<el-descriptions-item label="不合格品重量(KG)"
|
|
|
- ><el-input>
|
|
|
- <template slot="append">
|
|
|
- <el-button type="primary">处置</el-button>
|
|
|
- </template>
|
|
|
- </el-input></el-descriptions-item
|
|
|
- >
|
|
|
+ ><el-input-number
|
|
|
+ class="w100"
|
|
|
+ readonly
|
|
|
+ :controls="false"
|
|
|
+ :value="
|
|
|
+ (workReport.productInfo.noStandardWeight =
|
|
|
+ workReport.noStandardNum * (infoData.productUnitWeight || 1))
|
|
|
+ "
|
|
|
+ :min="0"
|
|
|
+ clearable
|
|
|
+ ></el-input-number
|
|
|
+ ></el-descriptions-item>
|
|
|
<el-descriptions-item label="副产品重量(KG)"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
- <el-descriptions-item label="备注" :span="2"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
+ ><el-input-number
|
|
|
+ class="w100"
|
|
|
+ :controls="false"
|
|
|
+ v-model="workReport.productInfo.netWeight"
|
|
|
+ :min="0"
|
|
|
+ clearable
|
|
|
+ ></el-input-number
|
|
|
+ ></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="备注">
|
|
|
+ <el-input v-model="workReport.remark"></el-input
|
|
|
+ ></el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
+
|
|
|
<el-descriptions
|
|
|
title="设备信息"
|
|
|
+ class="mt-16"
|
|
|
direction="vertical"
|
|
|
:column="7"
|
|
|
border
|
|
|
- class="mt-16"
|
|
|
>
|
|
|
- <el-descriptions-item label="设备编码"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
- <el-descriptions-item label="设备名称"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
- <el-descriptions-item label="规格">kooriookami</el-descriptions-item>
|
|
|
- <el-descriptions-item label="型号">kooriookami</el-descriptions-item>
|
|
|
- <el-descriptions-item label="设备位置" :span="3"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
+ <el-descriptions-item label="设备编码">{{
|
|
|
+ workReportDeviceList.code
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="设备名称">{{
|
|
|
+ workReportDeviceList.name
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="规格">{{
|
|
|
+ workReportDeviceList.specification
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="型号">{{
|
|
|
+ workReportDeviceList.model
|
|
|
+ }}</el-descriptions-item>
|
|
|
|
|
|
- <el-descriptions-item label="模具编码/名称" :span="2"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
+ <el-descriptions-item label="设备位置">{{
|
|
|
+ workReportDeviceList.path
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="操作" :span="2"
|
|
|
+ ><el-link @click="getEquip" type="primary"
|
|
|
+ >更改设备</el-link
|
|
|
+ ></el-descriptions-item
|
|
|
>
|
|
|
- <el-descriptions-item label="规格">kooriookami</el-descriptions-item>
|
|
|
- <el-descriptions-item label="型号">kooriookami</el-descriptions-item>
|
|
|
- <el-descriptions-item label="冲压次数" :span="3"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
- <el-descriptions-item label="舟皿编码/名称" :span="2"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
- <el-descriptions-item label="规格">kooriookami</el-descriptions-item>
|
|
|
- <el-descriptions-item label="槽数">kooriookami</el-descriptions-item>
|
|
|
- <el-descriptions-item label="数量">kooriookami</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="模具编码/名称"
|
|
|
+ ><el-input
|
|
|
+ class="w100"
|
|
|
+ :value="`${moduleMsg.code}/${moduleMsg.name}`"
|
|
|
+ @click.native="getCategory('5', 'moduleMsg')"
|
|
|
+ ></el-input
|
|
|
+ ></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="规格">{{
|
|
|
+ moduleMsg.specification
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="型号">{{
|
|
|
+ moduleMsg.model
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="冲压次数" :span="4"
|
|
|
+ ><el-input
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="moduleMsg.extraField.stampingTimes"
|
|
|
+ ></el-input
|
|
|
+ ></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="舟皿编码/名称"
|
|
|
+ ><el-input
|
|
|
+ :value="`${boatMsg.code}/${boatMsg.name}`"
|
|
|
+ @click.native="getCategory('8', 'boatMsg')"
|
|
|
+ ></el-input
|
|
|
+ ></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="规格">{{
|
|
|
+ boatMsg.specification
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="槽数"></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="数量"
|
|
|
+ ><el-input
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="boatMsg.extraField.num"
|
|
|
+ ></el-input
|
|
|
+ ></el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
+ <equipmentDailog
|
|
|
+ ref="equipmentRef"
|
|
|
+ :isPlan="true"
|
|
|
+ :produceVersionId="infoData.produceVersionId"
|
|
|
+ />
|
|
|
+ <materialDialog
|
|
|
+ ref="materialRef"
|
|
|
+ :params="{
|
|
|
+ taskInstanceId: taskInfo.id,
|
|
|
+ versionId: infoData.produceVersionId
|
|
|
+ }"
|
|
|
+ />
|
|
|
+
|
|
|
+ <catogaryDialog ref="catogaryDialogRef" />
|
|
|
</el-form>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { realTimeStorage } from '@/api/mainData';
|
|
|
import personSelectRemote from '@/components/CommomSelect/person-select-remote';
|
|
|
import equipmentDailog from '@/components/EquipmentDailog/equipment-dailog';
|
|
|
+ import materialDialog from '../materialDialog.vue';
|
|
|
+ import catogaryDialog from '../catogaryDialog.vue';
|
|
|
import { reportCount } from '@/api/produceOrder';
|
|
|
export default {
|
|
|
- components: { personSelectRemote, equipmentDailog },
|
|
|
+ components: {
|
|
|
+ personSelectRemote,
|
|
|
+ equipmentDailog,
|
|
|
+ materialDialog,
|
|
|
+ catogaryDialog
|
|
|
+ },
|
|
|
props: {
|
|
|
infoData: {
|
|
|
type: Object,
|
|
|
@@ -128,14 +262,20 @@
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ categoryMsg: {
|
|
|
+ batchNo: '',
|
|
|
+ totalWeight: '',
|
|
|
+ brandNum: '',
|
|
|
+ sourceCategoryId: '',
|
|
|
+ rootCategoryLevelId: '1',
|
|
|
+ name: '',
|
|
|
+ code: ''
|
|
|
+ },
|
|
|
workReport: {
|
|
|
executorId: '',
|
|
|
executorJobNum: '',
|
|
|
executorTime: '',
|
|
|
- packInfo: {
|
|
|
- packNum: '',
|
|
|
- netWeight: ''
|
|
|
- },
|
|
|
+ remark: '',
|
|
|
productInfo: {
|
|
|
standardNum: '',
|
|
|
standardWeight: '',
|
|
|
@@ -143,13 +283,41 @@
|
|
|
noStandardWeight: ''
|
|
|
}
|
|
|
},
|
|
|
+ // 设备
|
|
|
workReportDeviceList: {
|
|
|
code: '',
|
|
|
name: '',
|
|
|
path: '',
|
|
|
+ model: '',
|
|
|
+ rootCategoryLevelId: '',
|
|
|
specification: ''
|
|
|
},
|
|
|
- countMsg: {}
|
|
|
+ countMsg: {},
|
|
|
+ // 模具信息
|
|
|
+ moduleMsg: {
|
|
|
+ code: '',
|
|
|
+ name: '',
|
|
|
+ path: '',
|
|
|
+ model: '',
|
|
|
+ rootCategoryLevelId: '',
|
|
|
+ specification: '',
|
|
|
+ extraField: {
|
|
|
+ stampingTimes: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 舟皿信息
|
|
|
+ boatMsg: {
|
|
|
+ code: '',
|
|
|
+ name: '',
|
|
|
+ path: '',
|
|
|
+ model: '',
|
|
|
+ rootCategoryLevelId: '',
|
|
|
+ specification: '',
|
|
|
+ extraField: {
|
|
|
+ num: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ batchList: []
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -163,13 +331,35 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- async getReportCount () {
|
|
|
- const res = await reportCount({
|
|
|
- taskCode: this.taskInfo.code,
|
|
|
- workOrderId: this.infoData.id
|
|
|
+ getCategory (id, memo) {
|
|
|
+ this.$refs.catogaryDialogRef.open(id, this[memo], (res) => {
|
|
|
+ this[memo].rootCategoryLevelId = res.categoryLevelId;
|
|
|
+ this[memo].code = res.code;
|
|
|
+ this[memo].name = res.name;
|
|
|
+ this[memo].specification = res.specification;
|
|
|
+ this[memo].sourceInstanceId = res.id;
|
|
|
+ if (memo === 'moduleMsg') {
|
|
|
+ this[memo].model = res.modelType;
|
|
|
+ this[memo].extraField.stampingTimes = '';
|
|
|
+ } else {
|
|
|
+ this[memo].extraField.num = '';
|
|
|
+ }
|
|
|
});
|
|
|
+ },
|
|
|
+ getMaterial () {
|
|
|
+ this.$refs.materialRef.open(this.categoryMsg, (res) => {
|
|
|
+ this.categoryMsg.name = res.categoryName;
|
|
|
+ this.categoryMsg.code = res.categoryCode;
|
|
|
+ this.categoryMsg.sourceCategoryId = res.id;
|
|
|
+ this.categoryMsg.brandNum = res.brandNum;
|
|
|
|
|
|
- this.countMsg = res;
|
|
|
+ realTimeStorage({
|
|
|
+ categoryCode: res.categoryCode,
|
|
|
+ factoryCode: this.infoData.werks || '14T1'
|
|
|
+ }).then((res) => {
|
|
|
+ this.batchList = res;
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
getEquip () {
|
|
|
this.$refs.equipmentRef.openSingle(
|
|
|
@@ -177,21 +367,43 @@
|
|
|
(res) => {
|
|
|
this.workReportDeviceList.code = res.code;
|
|
|
this.workReportDeviceList.name = res.name;
|
|
|
- this.workReportDeviceList.path = res.id;
|
|
|
+ this.workReportDeviceList.model = res.modelType;
|
|
|
+ this.workReportDeviceList.specification = res.specification;
|
|
|
+ this.workReportDeviceList.sourceInstanceId = res.id;
|
|
|
+ this.workReportDeviceList.rootCategoryLevelId =
|
|
|
+ res.rootCategoryLevelId;
|
|
|
+ this.workReportDeviceList.path = res.positionList[0]?.pathName;
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
- getMsg () {},
|
|
|
+ async getReportCount () {
|
|
|
+ const res = await reportCount({
|
|
|
+ taskCode: this.taskInfo.code,
|
|
|
+ workOrderId: this.infoData.id
|
|
|
+ });
|
|
|
+
|
|
|
+ this.countMsg = res;
|
|
|
+ },
|
|
|
report (fun) {
|
|
|
this.$refs.formRef.validate((value) => {
|
|
|
if (value) {
|
|
|
+ const workReportDeviceList = [];
|
|
|
+ if (this.workReportDeviceList.code) {
|
|
|
+ workReportDeviceList.push(this.workReportDeviceList);
|
|
|
+ }
|
|
|
+ if (this.moduleMsg.code) {
|
|
|
+ workReportDeviceList.push(this.moduleMsg);
|
|
|
+ }
|
|
|
+ if (this.boatMsg.code) {
|
|
|
+ workReportDeviceList.push(this.boatMsg);
|
|
|
+ }
|
|
|
fun({
|
|
|
checkState: 1,
|
|
|
workReport: this.workReport,
|
|
|
- workReportDeviceList: [this.workReportDeviceList]
|
|
|
- }).then((res) => {
|
|
|
- console.log(res);
|
|
|
- this.getMsg();
|
|
|
+ workReportCategoryList: [this.categoryMsg],
|
|
|
+ workReportDeviceList
|
|
|
+ }).then(() => {
|
|
|
+ this.getReportCount();
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -205,6 +417,9 @@
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
+ .label {
|
|
|
+ margin-right: 5px;
|
|
|
+ }
|
|
|
ul {
|
|
|
list-style: none;
|
|
|
display: flex;
|