|
|
@@ -153,8 +153,13 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" v-if="pageName == 'steamInjectionInspectionRecord'">
|
|
|
- <el-form-item label="甲方检查人" required prop="contactName">
|
|
|
+ <el-col
|
|
|
+ :span="8"
|
|
|
+ v-if="
|
|
|
+ pageName == 'productionRecords' || pageName == 'qualityTestRecords'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-form-item label="客户" required prop="contactName">
|
|
|
<el-input
|
|
|
clearable
|
|
|
v-model="addForm.contactName"
|
|
|
@@ -164,22 +169,11 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" v-if="pageName == 'solidWasteRecord'">
|
|
|
- <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 == 'productionRecords' || pageName == 'QualityInspection'
|
|
|
+ ['QualityInspection', 'TransportAsh', 'HaulSlag'].includes(pageName)
|
|
|
"
|
|
|
>
|
|
|
<el-form-item label="供应商" required prop="supplierName">
|
|
|
@@ -192,7 +186,12 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" v-if="pageName == 'QualityInspection'">
|
|
|
+ <el-col
|
|
|
+ :span="8"
|
|
|
+ v-if="
|
|
|
+ ['QualityInspection', 'TransportAsh', 'HaulSlag'].includes(pageName)
|
|
|
+ "
|
|
|
+ >
|
|
|
<el-form-item label="采购订单" required prop="purchaseOrderNo">
|
|
|
<el-input
|
|
|
clearable
|
|
|
@@ -224,17 +223,6 @@
|
|
|
></WithView>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" v-if="pageName == 'qualityTestRecords'">
|
|
|
- <el-form-item label="联合站检查人" required prop="contactName">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="addForm.contactName"
|
|
|
- @click.native="handParent"
|
|
|
- placeholder="请选择"
|
|
|
- readonly
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<header-title title="记录数据" :style="`margin-top: 20px`"></header-title>
|
|
|
@@ -250,13 +238,29 @@
|
|
|
>
|
|
|
<template v-slot:toolkit>
|
|
|
<el-button
|
|
|
- v-if="pageName != 'productionRecords'"
|
|
|
+ v-if="
|
|
|
+ ![
|
|
|
+ 'qualityTestRecords',
|
|
|
+ 'productionRecords',
|
|
|
+ 'QualityInspection',
|
|
|
+ 'HaulSlag',
|
|
|
+ 'TransportAsh'
|
|
|
+ ].includes(pageName)
|
|
|
+ "
|
|
|
type="primary"
|
|
|
@click="batchCheck"
|
|
|
>批量检查</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
- v-if="pageName != 'productionRecords'"
|
|
|
+ v-if="
|
|
|
+ ![
|
|
|
+ 'qualityTestRecords',
|
|
|
+ 'productionRecords',
|
|
|
+ 'QualityInspection',
|
|
|
+ 'HaulSlag',
|
|
|
+ 'TransportAsh'
|
|
|
+ ].includes(pageName)
|
|
|
+ "
|
|
|
type="primary"
|
|
|
@click="batchQualified"
|
|
|
>批量合格</el-button
|
|
|
@@ -345,20 +349,16 @@
|
|
|
|
|
|
<parentList
|
|
|
:classType="
|
|
|
- pageName == 'solidWasteRecord' ||
|
|
|
- pageName == 'QualityInspection' ||
|
|
|
- pageName == 'productionRecords'
|
|
|
- ? '2'
|
|
|
- : '1'
|
|
|
+ pageName == 'productionRecords' || pageName == 'qualityTestRecords'
|
|
|
+ ? '1'
|
|
|
+ : '2'
|
|
|
"
|
|
|
:type="
|
|
|
- pageName == 'solidWasteRecord' ||
|
|
|
- pageName == 'QualityInspection' ||
|
|
|
- pageName == 'productionRecords'
|
|
|
- ? '19'
|
|
|
- : '17'
|
|
|
+ pageName == 'productionRecords' || pageName == 'qualityTestRecords'
|
|
|
+ ? '17'
|
|
|
+ : '19'
|
|
|
"
|
|
|
- :code="pageName == 'QualityInspection' ? '06mei' : ''"
|
|
|
+ :code="getCode()"
|
|
|
ref="parentListRef"
|
|
|
@changeParent="changeParent"
|
|
|
>
|
|
|
@@ -565,11 +565,6 @@
|
|
|
{ required: true, message: '请选择', trigger: 'blur' },
|
|
|
{ required: true, message: '请选择', trigger: 'change' }
|
|
|
]
|
|
|
-
|
|
|
- // productLineId: [
|
|
|
- // { required: true, message: '请选择场站', trigger: 'blur' },
|
|
|
- // { required: true, message: '请选择场站', trigger: 'change' }
|
|
|
- // ]
|
|
|
},
|
|
|
loading: false,
|
|
|
butLoading: false,
|
|
|
@@ -584,16 +579,6 @@
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- // title() {
|
|
|
- // if (this.addForm.recordRulesClassify) {
|
|
|
- // const dictValue = this.getDictValue(
|
|
|
- // '记录规则类型',
|
|
|
- // this.addForm.recordRulesClassify
|
|
|
- // );
|
|
|
- // return dictValue + '记录表';
|
|
|
- // }
|
|
|
- // return '记录表';
|
|
|
- // },
|
|
|
activeTeamUserList() {
|
|
|
return this.teamUserList.filter((user) =>
|
|
|
this.addForm.executeUsersIds.includes(user.id)
|
|
|
@@ -638,30 +623,32 @@
|
|
|
slot: 'checkUsersIds',
|
|
|
isNone: this.pageName != 'qualityTestRecords'
|
|
|
},
|
|
|
- // {
|
|
|
- // label: '描述',
|
|
|
- // prop: 'errorMsg',
|
|
|
- // minWidth: 120,
|
|
|
- // slot: 'errorMsg',
|
|
|
- // isNone: this.pageName != 'qualityTestRecords'
|
|
|
- // },
|
|
|
+
|
|
|
{
|
|
|
label: '检查情况',
|
|
|
prop: 'checkStatus',
|
|
|
minWidth: 120,
|
|
|
slot: 'checkStatus',
|
|
|
- isNone:
|
|
|
- this.pageName == 'productionRecords' ||
|
|
|
- this.pageName == 'QualityInspection'
|
|
|
+ isNone: [
|
|
|
+ 'qualityTestRecords',
|
|
|
+ 'productionRecords',
|
|
|
+ 'QualityInspection',
|
|
|
+ 'HaulSlag',
|
|
|
+ 'TransportAsh'
|
|
|
+ ].includes(this.pageName)
|
|
|
},
|
|
|
|
|
|
{
|
|
|
label: '检查结果',
|
|
|
prop: 'checkResult',
|
|
|
minWidth: 120,
|
|
|
- isNone:
|
|
|
- this.pageName == 'productionRecords' ||
|
|
|
- this.pageName == 'QualityInspection',
|
|
|
+ isNone: [
|
|
|
+ 'qualityTestRecords',
|
|
|
+ 'productionRecords',
|
|
|
+ 'QualityInspection',
|
|
|
+ 'HaulSlag',
|
|
|
+ 'TransportAsh'
|
|
|
+ ].includes(this.pageName),
|
|
|
slot: 'checkResult'
|
|
|
}
|
|
|
];
|
|
|
@@ -717,6 +704,19 @@
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ getCode() {
|
|
|
+ if (this.$store.state.user.info.clientEnvironmentId == 10) {
|
|
|
+ return this.pageName == 'QualityInspection'
|
|
|
+ ? '06mei'
|
|
|
+ : this.pageName == 'TransportAsh'
|
|
|
+ ? '07lafei'
|
|
|
+ : this.pageName == 'HaulSlag'
|
|
|
+ ? '08lazha'
|
|
|
+ : '';
|
|
|
+ } else {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取工单详情
|
|
|
async getOrderDetials(id) {
|
|
|
try {
|
|
|
@@ -750,38 +750,7 @@
|
|
|
}
|
|
|
return i;
|
|
|
});
|
|
|
- // <el-col :span="8">
|
|
|
- // <el-form-item label="检查时间" required prop="checkStartTime">
|
|
|
- // <el-date-picker
|
|
|
- // v-model="addForm.checkStartTime"
|
|
|
- // type="datetime"
|
|
|
- // format="yyyy-MM-dd HH:mm:ss"
|
|
|
- // value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- // placeholder="选择日期"
|
|
|
- // style="width: 100%"
|
|
|
- // :picker-options="{
|
|
|
- // disabledDate: (time) => time.getTime() > Date.now()
|
|
|
- // }"
|
|
|
- // >
|
|
|
- // </el-date-picker>
|
|
|
- // </el-form-item>
|
|
|
- // </el-col>
|
|
|
- // <el-col :span="8">
|
|
|
- // <el-form-item label="报工时间" required prop="checkFinishTime">
|
|
|
- // <el-date-picker
|
|
|
- // v-model="addForm.checkFinishTime"
|
|
|
- // type="datetime"
|
|
|
- // format="yyyy-MM-dd HH:mm:ss"
|
|
|
- // value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- // placeholder="选择日期"
|
|
|
- // style="width: 100%"
|
|
|
- // :picker-options="{
|
|
|
- // disabledDate: (time) => time.getTime() > Date.now()
|
|
|
- // }"
|
|
|
- // >
|
|
|
- // </el-date-picker>
|
|
|
- // </el-form-item>
|
|
|
- // </el-col>
|
|
|
+
|
|
|
Object.assign(this.addForm, data);
|
|
|
this.addForm.unloadCheckStatus = this.addForm.unloadCheckStatus || 1;
|
|
|
|
|
|
@@ -844,6 +813,24 @@
|
|
|
console.log('this.teamUserList', this.teamUserList);
|
|
|
}
|
|
|
|
|
|
+ //宇信
|
|
|
+ if (
|
|
|
+ this.$store.state.user.info.clientEnvironmentId == 10 &&
|
|
|
+ ['productionRecords', 'qualityTestRecords'].includes(this.pageName)
|
|
|
+ ) {
|
|
|
+ //客户:5#和6#默认是重油公司7#默认是红山 2008389016775864321==7#
|
|
|
+ if (this.addForm.productLineId == '2008389016775864321') {
|
|
|
+ this.addForm.contactId =
|
|
|
+ this.addForm.contactId || '2008562263580520449';
|
|
|
+ this.addForm.contactName =
|
|
|
+ this.addForm.contactName || '克拉玛依红山油田有限责任公司';
|
|
|
+ } else {
|
|
|
+ this.addForm.contactId =
|
|
|
+ this.addForm.contactId || '2008383566202318850';
|
|
|
+ this.addForm.contactName =
|
|
|
+ this.addForm.contactName || '中国石油新疆油田分公司(重油公司)';
|
|
|
+ }
|
|
|
+ }
|
|
|
this.setValue();
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.formRef.clearValidate();
|
|
|
@@ -860,7 +847,13 @@
|
|
|
this.$message.warning('请先选择供应商!');
|
|
|
return;
|
|
|
}
|
|
|
- this.$refs.orderListDialogRef.open(this.addForm.supplierId);
|
|
|
+ this.$refs.orderListDialogRef.open(
|
|
|
+ this.addForm.supplierId,
|
|
|
+ //渣和灰拿委外订单
|
|
|
+ ['TransportAsh', 'HaulSlag'].includes(this.pageName)
|
|
|
+ ? '3,4,5,6,7'
|
|
|
+ : ''
|
|
|
+ );
|
|
|
},
|
|
|
orderListDialogSuccess(data) {
|
|
|
this.addForm.purchaseOrderId = data.id;
|
|
|
@@ -888,24 +881,47 @@
|
|
|
}
|
|
|
}
|
|
|
if (this.pageName == 'qualityTestRecords') {
|
|
|
- if (item.paramValue == '检测干度值-干度') {
|
|
|
- let num1 = this.addForm.detailList.find(
|
|
|
- (item1) => item1.paramValue == '检测干度值-给水'
|
|
|
- )?.num;
|
|
|
- let num2 = this.addForm.detailList.find(
|
|
|
- (item1) => item1.paramValue == '检测干度值-炉水'
|
|
|
- )?.num;
|
|
|
- let num = 0;
|
|
|
- if (num1 && num2) {
|
|
|
- num = (num2 - num1) / num2;
|
|
|
- }
|
|
|
-
|
|
|
+ let num1 = this.addForm.detailList.find(
|
|
|
+ (item1) => item1.paramValue == '给水量'
|
|
|
+ )?.num;
|
|
|
+ let num2 = this.addForm.detailList.find(
|
|
|
+ (item1) => item1.paramValue == '炉水量'
|
|
|
+ )?.num;
|
|
|
+ let num = 0;
|
|
|
+ if (num1 && num2) {
|
|
|
+ num = (num2 - num1) / num2;
|
|
|
+ }
|
|
|
+ if (item.paramValue == '干度') {
|
|
|
this.$set(
|
|
|
this.addForm.detailList[index],
|
|
|
'num',
|
|
|
parseFloat(num.toFixed(5)) * 100
|
|
|
);
|
|
|
}
|
|
|
+ if (item.paramValue == '是否合格' && num1) {
|
|
|
+ this.$set(
|
|
|
+ this.addForm.detailList[index],
|
|
|
+ 'num',
|
|
|
+ parseFloat(num.toFixed(5)) * 100 >= 90 ? '合格' : '不合格'
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.pageName == 'productionRecords') {
|
|
|
+ let num1 = this.addForm.detailList.find(
|
|
|
+ (item1) => item1.paramValue == '日用水量'
|
|
|
+ )?.num;
|
|
|
+
|
|
|
+ let num = 0;
|
|
|
+ if (num1) {
|
|
|
+ num = num1 * 0.1034;
|
|
|
+ }
|
|
|
+ if (item.paramValue == '日用煤量') {
|
|
|
+ this.$set(
|
|
|
+ this.addForm.detailList[index],
|
|
|
+ 'num',
|
|
|
+ parseFloat(num.toFixed(5))
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -931,8 +947,13 @@
|
|
|
|
|
|
// 报工需要验证 缓存不验证 排除 recordTemplateStyle ==3 物料添加 == 4生产统计 模板
|
|
|
if (
|
|
|
- this.pageName != 'productionRecords' &&
|
|
|
- this.pageName != 'QualityInspection'
|
|
|
+ ![
|
|
|
+ 'qualityTestRecords',
|
|
|
+ 'productionRecords',
|
|
|
+ 'QualityInspection',
|
|
|
+ 'HaulSlag',
|
|
|
+ 'TransportAsh'
|
|
|
+ ].includes(this.pageName)
|
|
|
) {
|
|
|
// 验证检查项目
|
|
|
const detailRequired = this.addForm.detailList.some((i) => {
|