|
|
@@ -132,7 +132,7 @@
|
|
|
:selection.sync="selection"
|
|
|
>
|
|
|
<template v-slot:toolbar>
|
|
|
- 累计取样数量:{{ workSampleQuantity
|
|
|
+ 累计请样数量:{{ workSampleQuantity
|
|
|
}}{{
|
|
|
form.conditionType == '1' ? tableList[0]?.measureUnit : form.unit
|
|
|
}}
|
|
|
@@ -148,31 +148,6 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="请样数量:" prop="pleaseQuantity">
|
|
|
- <el-input v-model="form.pleaseQuantity" placeholder="请输入">
|
|
|
- <template slot="append">
|
|
|
- {{ tableList[0]?.measureUnit }}
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <!-- <el-col :span="4">
|
|
|
- <el-form-item label="单位:" prop="pleaseUnit">
|
|
|
- <DictSelection
|
|
|
- dictName="计量单位"
|
|
|
- clearable
|
|
|
- v-model="form.pleaseUnit"
|
|
|
- filter-placeholder="请输入计量单位搜索"
|
|
|
- @change="changeSamUnit"
|
|
|
- ></DictSelection>
|
|
|
- </el-form-item>
|
|
|
- </el-col> -->
|
|
|
- </el-row>
|
|
|
- <header-title title="取样信息"> </header-title>
|
|
|
- <el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="质检方式:" prop="qualityMode">
|
|
|
<DictSelection
|
|
|
@@ -192,7 +167,7 @@
|
|
|
:disabled="form.isFirstSampling != '1'"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in sampleQuantityList"
|
|
|
+ v-for="item in recordingMethodList"
|
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
|
:key="item.value"
|
|
|
@@ -201,9 +176,10 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+
|
|
|
<el-row v-if="form.qualityMode == '2'">
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="取样:" prop="conditionType">
|
|
|
+ <el-form-item label="请样类型:" prop="conditionType">
|
|
|
<el-select
|
|
|
style="width: 100%"
|
|
|
v-model="form.conditionType"
|
|
|
@@ -350,6 +326,8 @@
|
|
|
|
|
|
<script>
|
|
|
import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
|
|
|
+ import { recordingMethodList } from '@/utils/util.js';
|
|
|
+
|
|
|
const defForm = {
|
|
|
code: '', //编码
|
|
|
name: '', //名称
|
|
|
@@ -390,11 +368,12 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ recordingMethodList,
|
|
|
processSubmitDialogFlag: false,
|
|
|
form: { ...defForm },
|
|
|
activeComp: 'main',
|
|
|
tabOptions: [
|
|
|
- { key: 'main', name: '取样详情' },
|
|
|
+ { key: 'main', name: '请样详情' },
|
|
|
{ key: 'bpm', name: '流程详情' }
|
|
|
],
|
|
|
workSampleQuantity: 0,
|
|
|
@@ -411,7 +390,7 @@
|
|
|
{ required: true, message: '请选择记录方法', trigger: 'change' }
|
|
|
],
|
|
|
conditionType: [
|
|
|
- { required: true, message: '请选择取样类型', trigger: 'change' }
|
|
|
+ { required: true, message: '请选择请样类型', trigger: 'change' }
|
|
|
],
|
|
|
quantity: [{ required: true, message: '请输入', trigger: 'change' }],
|
|
|
portion: [{ required: true, message: '请输入', trigger: 'change' }],
|
|
|
@@ -420,13 +399,10 @@
|
|
|
{ required: true, message: '请选择', trigger: 'change' }
|
|
|
]
|
|
|
},
|
|
|
- sampleQuantityList: [
|
|
|
- { label: '批样', value: 1 },
|
|
|
- { label: '单样全部', value: 2 }
|
|
|
- ],
|
|
|
+
|
|
|
sampleNumberList: [
|
|
|
- { label: '取整样', value: 1 },
|
|
|
- { label: '取小样', value: 2 }
|
|
|
+ { label: '请整样', value: 1 },
|
|
|
+ { label: '请小样', value: 2 }
|
|
|
],
|
|
|
selection: [],
|
|
|
tableColumns1: [
|
|
|
@@ -651,7 +627,7 @@
|
|
|
this.visible = true;
|
|
|
this.type = type;
|
|
|
this.title =
|
|
|
- type == 'add' ? '取样' : type == 'edit' ? '修改取样' : '详情';
|
|
|
+ type == 'add' ? '请样' : type == 'edit' ? '修改请样' : '详情';
|
|
|
if (type == 'add') {
|
|
|
if (row) {
|
|
|
this.init(row);
|
|
|
@@ -671,7 +647,7 @@
|
|
|
if (list?.length) {
|
|
|
this.getById(list[0].id);
|
|
|
this.type = 'edit';
|
|
|
- this.title = '修改取样';
|
|
|
+ this.title = '修改请样';
|
|
|
} else {
|
|
|
row.sourceCode = row.qualityPlanCode || row.workOrderCode;
|
|
|
this.form = JSON.parse(JSON.stringify(row));
|
|
|
@@ -856,8 +832,8 @@
|
|
|
}
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.error('取样处理失败:', error);
|
|
|
- this.$message.error('取样处理失败');
|
|
|
+ console.error('请样处理失败:', error);
|
|
|
+ this.$message.error('请样处理失败');
|
|
|
}
|
|
|
},
|
|
|
validateWeight(quantity, sampleCount) {
|
|
|
@@ -867,7 +843,7 @@
|
|
|
});
|
|
|
|
|
|
if (totalMaxPossible < sampleCount) {
|
|
|
- this.$message.info(`最大取样条数为${totalMaxPossible}`);
|
|
|
+ this.$message.info(`最大请样条数为${totalMaxPossible}`);
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -879,7 +855,7 @@
|
|
|
if (weightUnit === 'G') totalWeight /= 1000;
|
|
|
|
|
|
if (quantity * sampleCount > totalWeight) {
|
|
|
- this.$message.info('取样计量重量不能大于总计量重量');
|
|
|
+ this.$message.info('请样计量重量不能大于总计量重量');
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -890,7 +866,7 @@
|
|
|
});
|
|
|
|
|
|
if (invalidItem) {
|
|
|
- this.$message.info('勾选条目重量小于取样重量');
|
|
|
+ this.$message.info('勾选条目重量小于请样重量');
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -899,7 +875,7 @@
|
|
|
|
|
|
validateMeasureQuantity(quantity, unit, sampleCount) {
|
|
|
if (quantity <= 0) {
|
|
|
- this.$message.info('取样计量数量必须大于0');
|
|
|
+ this.$message.info('请样计量数量必须大于0');
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -911,7 +887,7 @@
|
|
|
this.selection[0].measureUnit === unit &&
|
|
|
quantity * sampleCount > totalQuantity
|
|
|
) {
|
|
|
- this.$message.info('取样计量数量不能大于总计量数量');
|
|
|
+ this.$message.info('请样计量数量不能大于总计量数量');
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -919,7 +895,7 @@
|
|
|
(item) => item.measureQuantity < quantity
|
|
|
);
|
|
|
if (invalidItem) {
|
|
|
- this.$message.info('条目计量数量小于取样计量数量');
|
|
|
+ this.$message.info('条目计量数量小于请样计量数量');
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
@@ -1153,7 +1129,7 @@
|
|
|
}
|
|
|
if (measureQuantityCount > formTotalS - this.workSampleQuantity) {
|
|
|
this.$message.info(
|
|
|
- `取样数量不能大于${formTotalS - this.workSampleQuantity} ${
|
|
|
+ `请样数量不能大于${formTotalS - this.workSampleQuantity} ${
|
|
|
this.selection[0].measureUnit
|
|
|
}`
|
|
|
);
|
|
|
@@ -1291,7 +1267,7 @@
|
|
|
formCreateUserId: res.createUserId,
|
|
|
variables: {
|
|
|
businessCode: res.code,
|
|
|
- businessName: '取样',
|
|
|
+ businessName: '请样',
|
|
|
businessType: res.conditionType == 1 ? '整样' : '小样'
|
|
|
}
|
|
|
};
|