|
|
@@ -14,7 +14,7 @@
|
|
|
ref="formRef"
|
|
|
:model="addForm"
|
|
|
:rules="rules"
|
|
|
- label-width="120px"
|
|
|
+ label-width="150px"
|
|
|
v-loading="loading"
|
|
|
:disabled="type == 'detail'"
|
|
|
>
|
|
|
@@ -175,6 +175,39 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="8" v-if="pageName == 'QualityInspection'||pageName == 'productionRecords'">
|
|
|
+ <el-form-item label="供应商" required prop="supplierName">
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="addForm.supplierName"
|
|
|
+ @click.native="handParent"
|
|
|
+ placeholder="请选择"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8" v-if="pageName == 'QualityInspection'">
|
|
|
+ <el-form-item
|
|
|
+ label="检查卸车是否到位"
|
|
|
+ required
|
|
|
+ prop="unloadCheckStatus"
|
|
|
+ >
|
|
|
+ <el-radio-group v-model="addForm.unloadCheckStatus">
|
|
|
+ <el-radio :label="1">已到位</el-radio>
|
|
|
+ <el-radio :label="2">未到位</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="9" v-if="pageName == 'QualityInspection'">
|
|
|
+ <el-form-item label="车辆照片" prop="vehiclePhotoUrl">
|
|
|
+ <WithView
|
|
|
+ :assetName="''"
|
|
|
+ v-model="addForm.vehiclePhotoUrl"
|
|
|
+ style="max-height: 370px"
|
|
|
+ v-if="type != 'detail'"
|
|
|
+ ></WithView>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="8" v-if="pageName == 'qualityTestRecords'">
|
|
|
<el-form-item label="联合站检查人" required prop="contactName">
|
|
|
<el-input
|
|
|
@@ -271,7 +304,12 @@
|
|
|
> -->
|
|
|
<template v-slot:num="{ row }">
|
|
|
<div>
|
|
|
- <el-input type="text" placeholder="请输入" v-model="row.num">
|
|
|
+ <el-input
|
|
|
+ type="text"
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="row.num"
|
|
|
+ @input="setValue"
|
|
|
+ >
|
|
|
<template v-if="row.unitName" slot="append">
|
|
|
<div>{{ row.unitName }}</div>
|
|
|
</template>
|
|
|
@@ -319,12 +357,14 @@
|
|
|
import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
import { getUserPage } from '@/api/system/organization';
|
|
|
import { getteampage, getTeam } from '@/api/main/index.js';
|
|
|
+ import WithView from '@/components/upload/WithViewNew.vue';
|
|
|
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
components: {
|
|
|
deptSelect,
|
|
|
- parentList
|
|
|
+ parentList,
|
|
|
+ WithView
|
|
|
},
|
|
|
props: {
|
|
|
pageName: {
|
|
|
@@ -359,6 +399,8 @@
|
|
|
checkValidityUnit: '',
|
|
|
conclusion: null,
|
|
|
isTempRecord: this.isTempRecord,
|
|
|
+ unloadCheckStatus: '',
|
|
|
+ vehiclePhotoUrl: '',
|
|
|
detailList: [],
|
|
|
deviceId: 0,
|
|
|
deviceName: '',
|
|
|
@@ -561,14 +603,18 @@
|
|
|
prop: 'checkStatus',
|
|
|
minWidth: 120,
|
|
|
slot: 'checkStatus',
|
|
|
- isNone: this.pageName == 'productionRecords'
|
|
|
+ isNone:
|
|
|
+ this.pageName == 'productionRecords' ||
|
|
|
+ this.pageName == 'QualityInspection'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
label: '检查结果',
|
|
|
prop: 'checkResult',
|
|
|
minWidth: 120,
|
|
|
- isNone: this.pageName == 'productionRecords',
|
|
|
+ isNone:
|
|
|
+ this.pageName == 'productionRecords' ||
|
|
|
+ this.pageName == 'QualityInspection',
|
|
|
slot: 'checkResult'
|
|
|
}
|
|
|
];
|
|
|
@@ -695,6 +741,7 @@
|
|
|
console.log('this.teamUserList', this.teamUserList);
|
|
|
}
|
|
|
|
|
|
+ this.setValue();
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.formRef.clearValidate();
|
|
|
|
|
|
@@ -705,6 +752,24 @@
|
|
|
this.loading = false;
|
|
|
}
|
|
|
},
|
|
|
+ setValue() {
|
|
|
+ if (this.pageName == 'productionRecords' && this.title == '报工') {
|
|
|
+ this.addForm.detailList.forEach((item, index) => {
|
|
|
+ if (item.paramValue == '用煤量') {
|
|
|
+ let num1 = this.addForm.detailList.find(
|
|
|
+ (item1) => item1.paramValue == '用水量'
|
|
|
+ )?.num;
|
|
|
+ console.log(num1, 'num1');
|
|
|
+ let num = 0;
|
|
|
+ if (num1) {
|
|
|
+ num = (62 / 600) * num1;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$set(this.addForm.detailList[index], 'num', parseFloat(num.toFixed(5)));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
// 关闭时清理表单
|
|
|
handleClose() {
|
|
|
this.addForm = JSON.parse(JSON.stringify(this.formBaseData));
|
|
|
@@ -725,7 +790,10 @@
|
|
|
}
|
|
|
|
|
|
// 报工需要验证 缓存不验证 排除 recordTemplateStyle ==3 物料添加 == 4生产统计 模板
|
|
|
- if (this.pageName != 'productionRecords') {
|
|
|
+ if (
|
|
|
+ this.pageName != 'productionRecords' &&
|
|
|
+ this.pageName != 'QualityInspection'
|
|
|
+ ) {
|
|
|
// 验证检查项目
|
|
|
const detailRequired = this.addForm.detailList.some((i) => {
|
|
|
return i.checkResult == null || i.checkStatus == null;
|