You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
564 lines
22 KiB
564 lines
22 KiB
|
|
@{
|
|
ViewBag.Title = "";
|
|
Layout = "~/Views/Shared/_Form.cshtml";
|
|
}
|
|
<script src="~/Content/js/datepicker/WdatePicker.js"></script>
|
|
<!--引入 element-ui 的样式,-->
|
|
<link rel="stylesheet" href="~/Content/element-ui/lib/theme-chalk/index.css">
|
|
<script src="~/Content/vue/dist/vue.js"></script>
|
|
<script src="~/Content/element-ui/lib/index.js"></script>
|
|
|
|
<script src="~/Content/axios.min.js"></script>
|
|
<style>
|
|
</style>
|
|
<form id="form1">
|
|
<div id="app">
|
|
<template>
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
|
@*<el-divider>主表信息</el-divider>*@
|
|
<el-row :gutter="24">
|
|
<el-col :span="4">
|
|
<el-form-item label="物料编码" prop="InvCode">
|
|
<el-input v-model="form.InvCode" placeholder="请输入内容" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="物料名称" prop="InvName">
|
|
<el-input v-model="form.InvName" placeholder="请输入内容" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="批次" prop="InvBatcgNo">
|
|
<el-input v-model="form.InvBatcgNo" placeholder="请输入内容" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="24">
|
|
<el-col :span="4">
|
|
<el-form-item label="批次数量" prop="InvBatcgQty">
|
|
<el-input v-model="form.InvBatcgQty" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="单位" prop="InvUnit">
|
|
<el-input v-model="form.InvUnit" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="抽检数量" prop="AqlCheckQty">
|
|
<el-input v-model="form.AqlCheckQty" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="检验结果" prop="Result">
|
|
<el-input v-model="form.Result" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
<el-row :gutter="24">
|
|
<el-col :span="6">
|
|
<el-form-item label="IQC组长判定结果" prop="IQCGroupHeaderResult">
|
|
<el-input v-model="form.IQCGroupHeaderResult" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="IQC组长判定结论" prop="IQCGroupHeaderRemark">
|
|
<el-input v-model="form.IQCGroupHeaderRemark" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="24">
|
|
<el-col :span="6">
|
|
<el-form-item label="IQC主管判定结果" prop="IQCHeaderResult">
|
|
<el-input v-model="form.IQCHeaderResult" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="IQC主管判定结论" prop="IQCHeaderRemark">
|
|
<el-input v-model="form.IQCHeaderRemark" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="24">
|
|
<el-col :span="6">
|
|
<el-form-item label="SQE工程师判定" prop="SQEEngineerResult">
|
|
<el-input v-model="form.SQEEngineerResult" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="SQE工程师结论" prop="SQEEngineerRemark">
|
|
<el-input v-model="form.SQEEngineerRemark" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
</el-row>
|
|
<el-row :gutter="24">
|
|
<el-col :span="6">
|
|
<el-form-item label="最终判定结果" prop="FinalResult">
|
|
<el-input v-model="form.FinalResult" size="mini" :disabled="true"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
</el-row>
|
|
<el-divider>尺寸检验</el-divider>
|
|
<el-row :gutter="24">
|
|
|
|
<el-col :span="24">
|
|
<el-table ref="singleTable" highlight-current-row
|
|
:data="dataSource4CC"
|
|
style="width: 100%"
|
|
stripe border
|
|
size="mini"
|
|
height="300"
|
|
v-on:current-change="handleCurrentChange4CC">
|
|
<el-table-column type="index" width="50"></el-table-column>
|
|
<el-table-column prop="CheckAttrText" label="分类" width="60">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="CheckItemName" label="检验描述" width="300">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="CheckWay" label="检验方法" width="140">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="CheckAqlName" label="抽样标准" width="150">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="SetValueMax" label="上限值" width="60">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="SetValueMin" label="下限值" width="60">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="Unit" label="单位" width="60">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="S1" label="S1" width="80">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="S2" label="S2" width="80">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="S3" label="S3" width="80">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="S4" label="S4" width="80">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="S5" label="S5" width="80">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="S6" label="S6" width="80">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="S7" label="S7" width="80">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="S8" label="S8" width="80">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="S9" label="S9" width="80">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="S10" label="S10" width="80">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="Result" label="判定结果" width="80">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="Remark" label="备注" width="150">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row :gutter="24">
|
|
<el-col :span="15">
|
|
<el-divider>抽样检验</el-divider>
|
|
<el-table ref="singleTable2" highlight-current-row
|
|
:data="dataSource4WG"
|
|
style="width: 100%"
|
|
stripe border
|
|
size="mini"
|
|
height="200"
|
|
v-on:current-change="handleCurrentChange4WG">
|
|
<el-table-column type="index" width="50"></el-table-column>
|
|
<el-table-column prop="CheckAttrText" label="分类" width="60">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="CheckItemName" label="检验描述" width="300">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="CheckWay" label="检验方法" width="140">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="CheckAqlName" label="抽样标准" width="150">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="AqlQty" label="抽检数量" width="150">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="GoodQty" label="合格数量" width="100">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="NgQty" label="不合格数量" width="100">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="Result" label="判定结果" width="150">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="Remark" label="备注" width="150">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
</el-col>
|
|
<el-col :span="9">
|
|
<el-divider>性能检验</el-divider>
|
|
<el-table ref="singleTable3" highlight-current-row
|
|
:data="dataSource4XN"
|
|
style="width: 100%"
|
|
stripe border
|
|
size="mini"
|
|
height="200"
|
|
v-on:current-change="handleCurrentChange4XN">
|
|
<el-table-column type="index" width="50"></el-table-column>
|
|
<el-table-column prop="CheckAttrText" label="分类" width="60">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="CheckItemName" label="检验描述" width="300">
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="Result" label="检验结果" width="100">
|
|
|
|
</el-table-column>
|
|
<el-table-column prop="Remark" label="备注" width="100">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
</template>
|
|
</div>
|
|
</form>
|
|
|
|
<script type="text/javascript">
|
|
//const { Console } = require("node:console");
|
|
var vm = new Vue({
|
|
el: '#app',
|
|
data: {
|
|
id:'',
|
|
userCode: "",
|
|
ssList: [],
|
|
form: {},
|
|
dataSource4CC: [],
|
|
dataSource4WG: [],
|
|
dataSource4XN: [],
|
|
currentRow4CC: null,
|
|
currentRow4WG: null,
|
|
currentRow4XN: null,
|
|
rules: {
|
|
|
|
},
|
|
disabled4RulesCode: false,
|
|
dataSource4BRGCode: [],//
|
|
dataSource4BCGCode: [],//
|
|
dataSource4BadReasonCode: [],//
|
|
dataSource4HandleWay:[],
|
|
judgeRole: '',
|
|
showIQCGroupHeader: false,
|
|
showIQCHeader: false,
|
|
showSQEEngineer: false,
|
|
|
|
},
|
|
//挂在DOM 触发
|
|
mounted() {
|
|
//let reactiveObject = {
|
|
|
|
//};
|
|
//this.form = reactiveObject;
|
|
|
|
// this.loadGrid();
|
|
// this.show();
|
|
this.id = '@ViewData["ids"]';
|
|
this.judgeRole = '@ViewData["judgeRole"]';
|
|
console.log(this.id);
|
|
console.log(this.judgeRole);
|
|
this.initControl();
|
|
// console.log(this.id);
|
|
},
|
|
beforeDestroy() {
|
|
// this.autoScrol1(true);
|
|
|
|
},
|
|
methods: {
|
|
getAllHandleWay() {
|
|
axios
|
|
.get('/BBWMS/IQCQuality/GetSelectItemList?keyValue=Decision')
|
|
.then(function (res) {
|
|
//debugger;
|
|
if (res.data) {
|
|
res.data.forEach(function (el, i) {
|
|
Vue.set(vm.dataSource4HandleWay, i, el)
|
|
});
|
|
}
|
|
})
|
|
.catch(function (error) { // 请求失败处理
|
|
alert(error);
|
|
});
|
|
},
|
|
getAllBRGCode() {
|
|
axios
|
|
.get('/BBWMS/IQCQuality/GetSelectBadCodeGroupList')
|
|
.then(function (res) {
|
|
//debugger;
|
|
if (res.data) {
|
|
res.data.forEach(function (el, i) {
|
|
Vue.set(vm.dataSource4BRGCode, i, el)
|
|
});
|
|
}
|
|
})
|
|
.catch(function (error) { // 请求失败处理
|
|
alert(error);
|
|
});
|
|
},
|
|
getAllBCGCode() {
|
|
axios
|
|
.get('/BBWMS/IQCQuality/GetSelectBadReasonGroupList')
|
|
.then(function (res) {
|
|
//debugger;
|
|
if (res.data) {
|
|
res.data.forEach(function (el, i) {
|
|
Vue.set(vm.dataSource4BCGCode, i, el)
|
|
});
|
|
}
|
|
})
|
|
.catch(function (error) { // 请求失败处理
|
|
alert(error);
|
|
});
|
|
},
|
|
getAllBCGCodeDetail(code) {
|
|
axios
|
|
.get('/BBWMS/IQCQuality/GetSelectBadReasonList?keyValue=' + code+'')
|
|
.then(function (res) {
|
|
//debugger;
|
|
if (res.data) {
|
|
res.data.forEach(function (el, i) {
|
|
Vue.set(vm.dataSource4BadReasonCode, i, el)
|
|
});
|
|
}
|
|
})
|
|
.catch(function (error) { // 请求失败处理
|
|
alert(error);
|
|
});
|
|
},
|
|
change4BCGCode(val) {
|
|
if (!val) {
|
|
return;
|
|
}
|
|
this.getAllBCGCodeDetail(val);
|
|
},
|
|
change4S1(currentValue, oldValue) {
|
|
console.log('S1数改变');
|
|
//debugger;
|
|
let currentRow = this.dataSource4CC.filter((x) => x.ID == this.currentRow4CC.ID)[0];
|
|
if (!currentRow) {
|
|
return;
|
|
}
|
|
if (currentValue >= currentRow.SetValueMin && currentValue <= currentRow.SetValueMax) {
|
|
currentRow.Result = "OK";
|
|
}
|
|
else {
|
|
currentRow.Result = "NG";
|
|
}
|
|
|
|
},
|
|
change4GoodQty(currentValue, oldValue) {
|
|
console.log('OK数改变');
|
|
//debugger;
|
|
let currentRow = this.dataSource4WG.filter((x) => x.ID == this.currentRow4WG.ID)[0];
|
|
if (currentRow) {
|
|
currentRow.NgQty = currentRow.AqlQty - currentValue;
|
|
if (currentRow.NgQty < 0) {
|
|
currentRow.GoodQty = 0;
|
|
currentRow.NgQty = 0;
|
|
}
|
|
else {
|
|
this.judgeWGRowResult(currentRow);
|
|
}
|
|
}
|
|
},
|
|
change4NgQty(currentValue, oldValue) {
|
|
console.log('NG数改变');
|
|
let currentRow = this.dataSource4WG.filter((x) => x.ID == this.currentRow4WG.ID)[0];
|
|
if (currentRow) {
|
|
currentRow.GoodQty = currentRow.AqlQty - currentValue;
|
|
if (currentRow.GoodQty < 0) {
|
|
currentRow.GoodQty = 0;
|
|
currentRow.NgQty = 0;
|
|
}
|
|
else {
|
|
this.judgeWGRowResult(currentRow);
|
|
}
|
|
}
|
|
},
|
|
judgeCCRowResult() {
|
|
|
|
},
|
|
judgeWGRowResult(currentRow) {
|
|
if (!currentRow) {
|
|
return;
|
|
}
|
|
|
|
if (currentRow.NgQty <= this.form.AllowNgQty) {
|
|
currentRow.Result = "OK";
|
|
}
|
|
else {
|
|
currentRow.Result = "NG";
|
|
}
|
|
},
|
|
initControl: function () {
|
|
let that = this;
|
|
let orgName = '';
|
|
this.disabled4RulesCode = this.id ? true : false;
|
|
let userName = '@NFine.Code.OperatorProvider.Provider.GetCurrent().UserName';
|
|
// console.log(userName);
|
|
this.getAllBRGCode();
|
|
this.getAllBCGCode();
|
|
this.getAllHandleWay();
|
|
this.getData();
|
|
|
|
},
|
|
finalJudge() {
|
|
if (this.dataSource4CC.length == 0 || this.dataSource4WG.length == 0) {
|
|
$.modalMsg("必须存在检验项目", "warning");
|
|
return false;
|
|
}
|
|
|
|
this.dataSource4CC.forEach((item) => {
|
|
if (item.Result == 'NG') {
|
|
this.form.Result = "NG";
|
|
}
|
|
})
|
|
|
|
this.dataSource4WG.forEach((item) => {
|
|
if (item.Result == 'NG') {
|
|
this.form.Result = "NG";
|
|
}
|
|
})
|
|
|
|
if (!this.form.Result) {
|
|
this.form.Result = "OK";
|
|
}
|
|
},
|
|
queryCheckRecord() {
|
|
|
|
},
|
|
|
|
|
|
getData() {
|
|
if (!this.id) return;
|
|
|
|
let _this = this;
|
|
|
|
axios
|
|
.get('/BBWMS/IQCQuality/GetMaterialReJudgeMain?keyValue=' + _this.id)
|
|
.then(function (res) {
|
|
|
|
// debugger;
|
|
if (res.data) {
|
|
|
|
for (var i in res.data) {
|
|
Vue.set(vm.form, i, res.data[i]);
|
|
}
|
|
|
|
_this.form.JudgeRole = _this.judgeRole;
|
|
|
|
res.data.CCList.forEach(function (el, i) {
|
|
Vue.set(vm.dataSource4CC, i, el)
|
|
});
|
|
res.data.WGList.forEach(function (el, i) {
|
|
Vue.set(vm.dataSource4WG, i, el)
|
|
});
|
|
res.data.XNList.forEach(function (el, i) {
|
|
Vue.set(vm.dataSource4XN, i, el)
|
|
});
|
|
if (_this.judgeRole == 'IQCGroupHeader') {
|
|
_this.showIQCGroupHeader = true;
|
|
_this.showIQCHeader = false;
|
|
_this.showSQEEngineer = false;
|
|
if (!_this.form.IQCGroupHeaderResult) {
|
|
_this.form.IQCGroupHeaderResult = 'OK';
|
|
}
|
|
|
|
}
|
|
else if (_this.judgeRole == 'IQCHeader') {
|
|
_this.showIQCGroupHeader = false;
|
|
_this.showIQCHeader = true;
|
|
_this.showSQEEngineer = false;
|
|
if (!_this.form.IQCHeaderResult) {
|
|
_this.form.IQCHeaderResult = 'OK';
|
|
}
|
|
}
|
|
else if (_this.judgeRole == 'SQEEngineer') {
|
|
_this.showIQCGroupHeader = false;
|
|
_this.showIQCHeader = false;
|
|
_this.showSQEEngineer = true;
|
|
if (!_this.form.SQEEngineerResult) {
|
|
_this.form.SQEEngineerResult = 'OK';
|
|
}
|
|
}
|
|
else if (_this.judgeRole == '') {
|
|
|
|
}
|
|
else {
|
|
|
|
}
|
|
}
|
|
})
|
|
.catch(function (error) { // 请求失败处理
|
|
alert(error);
|
|
});
|
|
},
|
|
//选中行变化
|
|
handleCurrentChange4CC(val) {
|
|
this.currentRow4CC = val;
|
|
console.log('尺寸行变化');
|
|
},
|
|
handleCurrentChange4WG(val) {
|
|
this.currentRow4WG = val;
|
|
console.log('外观行变化');
|
|
},
|
|
handleCurrentChange4XN(val) {
|
|
this.currentRow4XN = val;
|
|
//console.log('外观行变化');
|
|
},
|
|
submitCheck() {
|
|
|
|
|
|
|
|
|
|
//this.form.CCList = this.dataSource4CC;
|
|
//this.form.WGList = this.dataSource4WG;
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
// console.log(result);
|
|
},
|
|
},
|
|
});
|
|
function submitForm() {
|
|
//debugger;
|
|
vm.submitCheck();
|
|
|
|
}
|
|
</script>
|