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.
228 lines
7.6 KiB
228 lines
7.6 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>*@
|
|
<br />
|
|
<br />
|
|
<el-row :gutter="24">
|
|
<el-col :span="24">
|
|
<el-form-item label="判定结果" prop="FinalResult">
|
|
<el-radio-group v-model="form.FinalResult" v-on:change="change4FinalResult">
|
|
<el-radio-button label="合格"></el-radio-button>
|
|
<el-radio-button label="NG"></el-radio-button>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="24">
|
|
<el-col :span="16">
|
|
<el-form-item label="备注" prop="Remark">
|
|
<el-input v-model="form.Remark" size="mini" ></el-input>
|
|
</el-form-item>
|
|
</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: {},
|
|
|
|
dataSource4Test: [],
|
|
currentRow4Test:null,
|
|
rules: {
|
|
|
|
},
|
|
disabled4RulesCode: false,
|
|
disabled4SpecialNo:false,
|
|
disabled4GoodQty:false,
|
|
disabled4NgQty: false,
|
|
fileName:'',
|
|
},
|
|
//挂在DOM 触发
|
|
mounted() {
|
|
//let reactiveObject = {
|
|
|
|
//};
|
|
//this.form = reactiveObject;
|
|
|
|
// this.loadGrid();
|
|
// this.show();
|
|
this.id = '@ViewData["ids"]';
|
|
this.judgeRole='@ViewData["judgeRole"]';
|
|
this.initControl();
|
|
this.loadEvent();
|
|
// console.log(this.id);
|
|
},
|
|
beforeDestroy() {
|
|
// this.autoScrol1(true);
|
|
|
|
},
|
|
methods: {
|
|
|
|
loadEvent() {
|
|
let that = this;
|
|
debugger;
|
|
|
|
},
|
|
|
|
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.getData();
|
|
|
|
},
|
|
change4FinalResult(val) {
|
|
if (!val) {
|
|
return;
|
|
}
|
|
|
|
},
|
|
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.FinalResult = '合格';
|
|
//_this.form.JudgeRole = _this.judgeRole;
|
|
//if (!_this.form.FinalResult) {
|
|
// _this.form.FinalResult = 'NG';
|
|
// _this.change4FinalResult(_this.form.FinalResult);
|
|
//}
|
|
|
|
}
|
|
})
|
|
.then(function () {
|
|
axios
|
|
.get("/BBWMS/IQCQuality/GetMaterialInStorageCheckDetailList2?code=" + _this.form.AsnCode + "&lotno=" + _this.form.InvBatcgNo + "&invCode=" + _this.form.InvCode)
|
|
.then(function (res) {
|
|
debugger;
|
|
if (res.data) {
|
|
res.data.forEach(function (el, i) {
|
|
Vue.set(vm.dataSource4Test, i, el)
|
|
});
|
|
|
|
}
|
|
})
|
|
})
|
|
.catch(function (error) { // 请求失败处理
|
|
alert(error);
|
|
});
|
|
},
|
|
|
|
submitCheck() {
|
|
debugger;
|
|
if (!this.form.Result) {
|
|
$.modalMsg("必须存在检验结果", "warning");
|
|
return false;
|
|
}
|
|
if (!this.form.FinalResult) {
|
|
$.modalMsg("必须存在终判结果", "warning");
|
|
return false;
|
|
}
|
|
|
|
if (this.form.FinalResult == "NG") {
|
|
for (var i = 0; i < this.dataSource4Test.length; i++) {
|
|
let item = this.dataSource4Test[i];
|
|
item.NgQty = item.Quantity;
|
|
item.GoodQty = 0;
|
|
item.InQty = 0;
|
|
//if (!item.GoodQty && !item.NgQty) {
|
|
// $.modalMsg("必须填写合格不合格数量", "warning");
|
|
// return false;
|
|
//}
|
|
}
|
|
}
|
|
else if (this.form.FinalResult == "合格") {
|
|
|
|
for (var i = 0; i < this.dataSource4Test.length; i++) {
|
|
let item = this.dataSource4Test[i];
|
|
item.NgQty =0;
|
|
item.GoodQty = item.Quantity;
|
|
item.InQty = 0;
|
|
}
|
|
}
|
|
else {
|
|
|
|
}
|
|
|
|
|
|
//this.form.CCList = this.dataSource4CC;
|
|
//this.form.WGList = this.dataSource4WG;
|
|
this.form.FinalItemLotList = this.dataSource4Test;
|
|
this.$refs['form'].validate((valid) => {
|
|
if (valid) {
|
|
//alert('submit!');
|
|
|
|
$.submitForm({
|
|
url: "/BBWMS/IQCQuality/SaveMaterialCheckFinalJudgeResult",
|
|
param: { keyValue: JSON.stringify(this.form) },
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
|
|
} else {
|
|
console.log('error submit!!');
|
|
return false;
|
|
}
|
|
});
|
|
// console.log(result);
|
|
},
|
|
},
|
|
});
|
|
function submitForm() {
|
|
//debugger;
|
|
vm.submitCheck();
|
|
|
|
}
|
|
function UpLoadClick() {
|
|
|
|
//var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
|
|
//if (ids.length != 1) {
|
|
// $.modalAlertNew("WMS00050");
|
|
// return;
|
|
//}
|
|
$("#FileUp2").click();
|
|
}
|
|
</script>
|