feat:禅道258
This commit is contained in:
parent
b63013d9a7
commit
60ca063efe
|
|
@ -7,7 +7,7 @@
|
|||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-main style="padding: 0">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
|
|
@ -593,7 +593,139 @@
|
|||
</el-col>
|
||||
</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-form-item label="产品名称:">
|
||||
{{ objitem.material_name }}
|
||||
|
|
@ -605,16 +737,6 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<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-input-number
|
||||
v-model="form.count_bag"
|
||||
|
|
@ -626,26 +748,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="不合格数量" v-if="project_code === 'gx'&&type == 'pur_in'">
|
||||
<el-form-item label="抽样数量">
|
||||
<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
|
||||
v-model="form.count_sampling"
|
||||
placeholder="抽样数量"
|
||||
|
|
@ -681,17 +785,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="崩边" v-if="project_code === 'gx'&&type == 'pur_in'">
|
||||
<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-form-item label="检验合格" prop="is_testok">
|
||||
<el-select
|
||||
v-model="form.is_testok"
|
||||
placeholder="检验合格"
|
||||
|
|
@ -995,8 +1089,11 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let date = new Date();
|
||||
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;
|
||||
console.log("that.form.test_date", that.form.test_date);
|
||||
setTimeout(() => {
|
||||
this.tableHeight = document.getElementById('mioitemwMain').clientHeight-20;
|
||||
},500)
|
||||
|
|
@ -1011,7 +1108,14 @@ export default {
|
|||
that.form.material_name = that.objitem.material_name;
|
||||
that.form.batch = that.objitem.batch;
|
||||
that.form.count = that.objitem.count;
|
||||
that.form.count_ok = that.objitem.count;
|
||||
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 (
|
||||
(that.type == "do_in" && that.cate == "halfgood") ||
|
||||
|
|
@ -1096,8 +1200,12 @@ export default {
|
|||
}
|
||||
return this;
|
||||
},
|
||||
gxPurInCountChange(){
|
||||
this.form.count_ok = this.form.count - this.form.count_notok;
|
||||
},
|
||||
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(){
|
||||
let that = this;
|
||||
|
|
@ -1373,14 +1481,12 @@ export default {
|
|||
that.$message.success("操作成功");
|
||||
});
|
||||
} else {
|
||||
that.$API.inm.mioitem.test
|
||||
.req(that.mioitemId, that.form)
|
||||
.then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.$emit("success");
|
||||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
});
|
||||
that.$API.inm.mioitem.test.req(that.mioitemId, that.form).then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.$emit("success");
|
||||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
|
|
|
|||
Loading…
Reference in New Issue