feat:禅道258
This commit is contained in:
parent
b63013d9a7
commit
60ca063efe
|
|
@ -7,7 +7,7 @@
|
||||||
@closed="$emit('closed')"
|
@closed="$emit('closed')"
|
||||||
>
|
>
|
||||||
<el-container v-loading="loading">
|
<el-container v-loading="loading">
|
||||||
<el-main style="padding: 0 20px 20px 20px">
|
<el-main style="padding: 0">
|
||||||
<el-form
|
<el-form
|
||||||
ref="dialogForm"
|
ref="dialogForm"
|
||||||
:model="form"
|
:model="form"
|
||||||
|
|
@ -593,7 +593,139 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 入厂检验 -->
|
<!-- 入厂检验 -->
|
||||||
<el-row v-if="type == 'pur_in'">
|
<el-row v-if="type == 'pur_in'&&project_code=='gx'">
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="产品名称:" label-width="100">
|
||||||
|
{{ objitem.material_name }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="入厂批次号:" label-width="100">
|
||||||
|
{{ objitem.batch }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="批次号" required label-width="100">
|
||||||
|
<el-input v-model="form.batch"> </el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="接收总数" required label-width="100">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
@change="gxPurInCountChange"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="合格数" label-width="100">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_ok"
|
||||||
|
disabled
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="不合格数量" label-width="100">
|
||||||
|
<el-input
|
||||||
|
v-model="form.count_notok"
|
||||||
|
disabled
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="不合格数量"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>异常项:</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="直径" label-width="100">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_zw"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
@change="nqtChange"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="长度" label-width="100">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_dl"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
@change="nqtChange"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="崩面" label-width="100">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_b"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
@change="nqtChange"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="亮面" label-width="100">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_zz"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
@change="nqtChange"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="检验日期" prop="test_date" label-width="100">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.test_date"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="检验员" prop="test_user" label-width="100">
|
||||||
|
<el-select
|
||||||
|
v-model="form.test_user"
|
||||||
|
placeholder="检验员"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in userList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="备注" label-width="100">
|
||||||
|
<el-input v-model="form.test_note"> </el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="type == 'pur_in'&&project_code!='gx'">
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="产品名称:">
|
<el-form-item label="产品名称:">
|
||||||
{{ objitem.material_name }}
|
{{ objitem.material_name }}
|
||||||
|
|
@ -605,16 +737,6 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item v-if="project_code === 'gx'" label="总数">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count"
|
|
||||||
:min="0"
|
|
||||||
disabled="true"
|
|
||||||
style="width: 100%"
|
|
||||||
controls-position="right"
|
|
||||||
>
|
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="project_code === 'gz'" label="总袋(桶)数">
|
<el-form-item v-if="project_code === 'gz'" label="总袋(桶)数">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.count_bag"
|
v-model="form.count_bag"
|
||||||
|
|
@ -626,26 +748,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="不合格数量" v-if="project_code === 'gx'&&type == 'pur_in'">
|
<el-form-item label="抽样数量">
|
||||||
<el-input
|
<el-input
|
||||||
disabled
|
|
||||||
v-model="form.count_notok"
|
|
||||||
placeholder="不合格数量"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="抽样数量" v-else>
|
|
||||||
<!-- 光芯 -->
|
|
||||||
<el-input-number
|
|
||||||
v-if="project_code === 'gx'"
|
|
||||||
v-model="form.count_sampling"
|
|
||||||
:min="0"
|
|
||||||
style="width: 100%"
|
|
||||||
controls-position="right"
|
|
||||||
>
|
|
||||||
</el-input-number>
|
|
||||||
<!-- 光子 -->
|
|
||||||
<el-input
|
|
||||||
v-else
|
|
||||||
disabled
|
disabled
|
||||||
v-model="form.count_sampling"
|
v-model="form.count_sampling"
|
||||||
placeholder="抽样数量"
|
placeholder="抽样数量"
|
||||||
|
|
@ -681,17 +785,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="崩边" v-if="project_code === 'gx'&&type == 'pur_in'">
|
<el-form-item label="检验合格" prop="is_testok">
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_qt"
|
|
||||||
:min="0"
|
|
||||||
style="width: 100%"
|
|
||||||
controls-position="right"
|
|
||||||
@change="nqtChange"
|
|
||||||
>
|
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="检验合格" prop="is_testok" v-else>
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.is_testok"
|
v-model="form.is_testok"
|
||||||
placeholder="检验合格"
|
placeholder="检验合格"
|
||||||
|
|
@ -995,8 +1089,11 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
let date = new Date();
|
||||||
let config_base = that.$TOOL.data.get("BASE_INFO").base;
|
let config_base = that.$TOOL.data.get("BASE_INFO").base;
|
||||||
|
that.form.test_date = that.$TOOL.dateFormat2(date, "yyyy-MM-dd");
|
||||||
that.project_code = config_base.base_code;
|
that.project_code = config_base.base_code;
|
||||||
|
console.log("that.form.test_date", that.form.test_date);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.tableHeight = document.getElementById('mioitemwMain').clientHeight-20;
|
this.tableHeight = document.getElementById('mioitemwMain').clientHeight-20;
|
||||||
},500)
|
},500)
|
||||||
|
|
@ -1011,7 +1108,14 @@ export default {
|
||||||
that.form.material_name = that.objitem.material_name;
|
that.form.material_name = that.objitem.material_name;
|
||||||
that.form.batch = that.objitem.batch;
|
that.form.batch = that.objitem.batch;
|
||||||
that.form.count = that.objitem.count;
|
that.form.count = that.objitem.count;
|
||||||
|
that.form.count_ok = that.objitem.count;
|
||||||
that.form.count_bag = that.objitem.count_bag;
|
that.form.count_bag = that.objitem.count_bag;
|
||||||
|
if(that.project_code=='gx'){
|
||||||
|
that.form.count_n_zw = 0;//直径
|
||||||
|
that.form.count_n_zz = 0;//亮面
|
||||||
|
that.form.count_n_b = 0;//崩面
|
||||||
|
that.form.count_n_dl = 0;//长度
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
(that.type == "do_in" && that.cate == "halfgood") ||
|
(that.type == "do_in" && that.cate == "halfgood") ||
|
||||||
|
|
@ -1096,8 +1200,12 @@ export default {
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
gxPurInCountChange(){
|
||||||
|
this.form.count_ok = this.form.count - this.form.count_notok;
|
||||||
|
},
|
||||||
nqtChange(){
|
nqtChange(){
|
||||||
this.form.count_notok = this.form.count_n_qt;
|
this.form.count_notok = this.form.count_n_zw+this.form.count_n_zz+this.form.count_n_b+this.form.count_n_dl;
|
||||||
|
this.form.count_ok = this.form.count - this.form.count_notok;
|
||||||
},
|
},
|
||||||
getMaterialItem(){
|
getMaterialItem(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -1373,14 +1481,12 @@ export default {
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
that.$API.inm.mioitem.test
|
that.$API.inm.mioitem.test.req(that.mioitemId, that.form).then((res) => {
|
||||||
.req(that.mioitemId, that.form)
|
that.isSaveing = false;
|
||||||
.then((res) => {
|
that.$emit("success");
|
||||||
that.isSaveing = false;
|
that.visible = false;
|
||||||
that.$emit("success");
|
that.$message.success("操作成功");
|
||||||
that.visible = false;
|
});
|
||||||
that.$message.success("操作成功");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
//可以处理校验错误
|
//可以处理校验错误
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue