|
|
@@ -1,99 +1,283 @@
|
|
|
<template>
|
|
|
- <el-form :inline="true">
|
|
|
+ <el-form
|
|
|
+ class="form-no-message"
|
|
|
+ ref="formRef"
|
|
|
+ :show-message="false"
|
|
|
+ label-position="left"
|
|
|
+ :model="{
|
|
|
+ ...workReport
|
|
|
+ }"
|
|
|
+ >
|
|
|
<div class="message-box">
|
|
|
<ul>
|
|
|
- <li> <span class="label">报工次数</span>2 </li>
|
|
|
- <li> <span class="label">累计合格品数量</span>2 </li>
|
|
|
- <li> <span class="label">累计合格品重量</span>2 </li>
|
|
|
- <li> <span class="label">累计投料产品数量</span>2 </li>
|
|
|
+ <li> <span class="label">报工次数</span>{{ countMsg.reportNum }}</li>
|
|
|
+ <li>
|
|
|
+ <span class="label">累计合格品数量</span
|
|
|
+ >{{ countMsg.standardTotalNum }}</li
|
|
|
+ >
|
|
|
+ <li>
|
|
|
+ <span class="label">累计合格品重量</span
|
|
|
+ >{{ countMsg.standardTotalWeight }}</li
|
|
|
+ >
|
|
|
+ <li>
|
|
|
+ <span class="label">累计投料产品数量</span
|
|
|
+ >{{ countMsg.feedProductWeight }}</li
|
|
|
+ >
|
|
|
</ul>
|
|
|
<div class="right">
|
|
|
- <el-form-item label="执行人工号"
|
|
|
+ <el-form-item
|
|
|
+ label="执行人工号"
|
|
|
+ prop="executorJobNum"
|
|
|
+ required
|
|
|
+ label-width="100px"
|
|
|
><personSelectRemote
|
|
|
- v-model="formData.executorJobNum"
|
|
|
+ v-model="workReport.executorId"
|
|
|
placeholder="请输入"
|
|
|
@selfChange="
|
|
|
- (val, item) => (formData.executorJobNum = item.jobNumber)
|
|
|
+ (val, item) => (workReport.executorJobNum = item.jobNumber)
|
|
|
"
|
|
|
/></el-form-item>
|
|
|
- <el-form-item label="执行日期"><el-input></el-input></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>
|
|
|
<el-descriptions title="报工信息" direction="vertical" :column="7" border>
|
|
|
- <el-descriptions-item label="投料数量(PCS)" :span="2"
|
|
|
- >kooriookami</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-descriptions-item label="">
|
|
|
+ <span class="label-required after" slot="label">投料数量(PCS)</span>
|
|
|
+ <el-form-item
|
|
|
+ label=""
|
|
|
+ label-width="0"
|
|
|
+ class="w100"
|
|
|
+ prop="packInfo.packNum"
|
|
|
+ >
|
|
|
+ <el-input-number
|
|
|
+ class="w100"
|
|
|
+ :controls="false"
|
|
|
+ v-model="workReport.packInfo.packNum"
|
|
|
+ :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="packInfo.netWeight"
|
|
|
+ ><el-input
|
|
|
+ readonly
|
|
|
+ class="w100"
|
|
|
+ :value="
|
|
|
+ (workReport.packInfo.netWeight =
|
|
|
+ workReport.packInfo.packNum *
|
|
|
+ (infoData.productUnitWeight || 1))
|
|
|
+ "
|
|
|
+ :min="0"
|
|
|
+ clearable
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </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></el-input
|
|
|
+ ></el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
- <el-descriptions title="设备信息" direction="vertical" :column="7" border>
|
|
|
- <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
|
|
|
+ title="设备信息"
|
|
|
+ class="mt-16"
|
|
|
+ direction="vertical"
|
|
|
+ :column="7"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <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="设备位置"
|
|
|
- >kooriookami</el-descriptions-item
|
|
|
- >
|
|
|
+ <el-descriptions-item label="设备位置">{{
|
|
|
+ workReportDeviceList.path
|
|
|
+ }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="操作"
|
|
|
- ><el-link>更改设备</el-link></el-descriptions-item
|
|
|
+ ><el-link @click="getEquip">更改设备</el-link></el-descriptions-item
|
|
|
>
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
+ <equipmentDailog
|
|
|
+ ref="equipmentRef"
|
|
|
+ :produceVersionId="infoData.produceVersionId"
|
|
|
+ />
|
|
|
</el-form>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import personSelectRemote from '@/components/CommomSelect/person-select-remote';
|
|
|
+ import equipmentDailog from '@/components/EquipmentDailog/equipment-dailog';
|
|
|
+ import { reportCount } from '@/api/produceOrder';
|
|
|
export default {
|
|
|
- components: { personSelectRemote },
|
|
|
+ components: { personSelectRemote, equipmentDailog },
|
|
|
+ props: {
|
|
|
+ infoData: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({})
|
|
|
+ },
|
|
|
+ taskInfo: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({})
|
|
|
+ }
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
- formData: {}
|
|
|
+ workReport: {
|
|
|
+ executorId: '',
|
|
|
+ executorJobNum: '',
|
|
|
+ executorTime: '',
|
|
|
+ packInfo: {
|
|
|
+ packNum: '',
|
|
|
+ netWeight: ''
|
|
|
+ },
|
|
|
+ productInfo: {
|
|
|
+ standardNum: '',
|
|
|
+ standardWeight: '',
|
|
|
+ noStandardNum: '',
|
|
|
+ noStandardWeight: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ workReportDeviceList: {
|
|
|
+ code: '',
|
|
|
+ name: '',
|
|
|
+ path: '',
|
|
|
+ specification: ''
|
|
|
+ },
|
|
|
+ countMsg: {}
|
|
|
};
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ taskInfo: {
|
|
|
+ immediate: true,
|
|
|
+ handler () {
|
|
|
+ if (this.taskInfo.code) {
|
|
|
+ this.getReportCount();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ async getReportCount () {
|
|
|
+ const res = await reportCount({
|
|
|
+ taskCode: this.taskInfo.code,
|
|
|
+ workOrderId: this.infoData.id
|
|
|
+ });
|
|
|
+
|
|
|
+ this.countMsg = res;
|
|
|
+ },
|
|
|
+ getEquip () {
|
|
|
+ this.$refs.equipmentRef.openSingle(
|
|
|
+ [this.workReportDeviceList],
|
|
|
+ (res) => {
|
|
|
+ this.workReportDeviceList.code = res.code;
|
|
|
+ this.workReportDeviceList.name = res.name;
|
|
|
+ this.workReportDeviceList.path = res.id;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
getMsg () {},
|
|
|
report (fun) {
|
|
|
this.$refs.formRef.validate((value) => {
|
|
|
if (value) {
|
|
|
- fun(this.formData).then((res) => {
|
|
|
+ fun({
|
|
|
+ checkState: 1,
|
|
|
+ workReport: this.workReport,
|
|
|
+ workReportDeviceList: [this.workReportDeviceList]
|
|
|
+ }).then((res) => {
|
|
|
console.log(res);
|
|
|
this.getMsg();
|
|
|
});
|
|
|
@@ -105,10 +289,18 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ .form-no-message {
|
|
|
+ :deep(.el-input-number) {
|
|
|
+ .el-input__inner {
|
|
|
+ text-align: left !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.message-box {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
+ margin-bottom: 16px;
|
|
|
ul {
|
|
|
list-style: none;
|
|
|
display: flex;
|
|
|
@@ -124,6 +316,10 @@
|
|
|
padding-top: 22px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
+
|
|
|
+ .el-form-item {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|