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.
237 lines
7.9 KiB
237 lines
7.9 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>
|
|
.redClass {
|
|
color: red;
|
|
}
|
|
</style>
|
|
<form id="form1">
|
|
<div id="app">
|
|
<template>
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
@*<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.Result" v-on:change="change4Result">
|
|
<el-radio-button label="OK"></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");
|
|
function UpLoadClick() {
|
|
|
|
//var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
|
|
//if (ids.length != 1) {
|
|
// $.modalAlertNew("WMS00050");
|
|
// return;
|
|
//}
|
|
$("#FileUp2").click();
|
|
}
|
|
|
|
|
|
|
|
var vm = new Vue({
|
|
el: '#app',
|
|
data: {
|
|
id:'',
|
|
userCode: "",
|
|
ssList: [],
|
|
form: {},
|
|
dataSource4CC: [],
|
|
dataSource4WG: [],
|
|
dataSource4XN: [],
|
|
WHCodeList:[],
|
|
currentRow4CC: null,
|
|
currentRow4WG: null,
|
|
currentRow4XN: null,
|
|
rules: {
|
|
|
|
},
|
|
disabled4RulesCode: false,
|
|
destroyExprementDataSource: [],
|
|
qty: 0,
|
|
docType:''
|
|
},
|
|
//挂在DOM 触发
|
|
mounted() {
|
|
//let reactiveObject = {
|
|
|
|
//};
|
|
//this.form = reactiveObject;
|
|
|
|
// this.loadGrid();
|
|
// this.show();
|
|
this.id = '@ViewData["ids"]';
|
|
this.qty = @ViewData["qty"];
|
|
this.docType = @ViewData["docType"];
|
|
this.initControl();
|
|
|
|
// console.log(this.id);
|
|
},
|
|
beforeDestroy() {
|
|
// this.autoScrol1(true);
|
|
|
|
},
|
|
methods: {
|
|
change4FileUp2(e) {
|
|
debugger;
|
|
var files = e.target.files;
|
|
var fileName = files[0].name;
|
|
// vm.setExFileName(fileName);
|
|
this.form.WgNgFile = fileName;
|
|
|
|
if (fileName != null && fileName != "") {
|
|
var data = new FormData();
|
|
jQuery.each(jQuery('#FileUp2')[0].files, function (i, file) {
|
|
data.append('file-' + i, file);
|
|
});
|
|
data.append("ID", '001');
|
|
// data.append("LableName", LableName);
|
|
$.modalConfirm("确定上传文件吗?", function (r) {
|
|
if (r) {
|
|
$.ajax({
|
|
url: "/BBWMS/IQCQuality/UpLoadMaterialCheckExFile" + "?" + Math.random(),
|
|
type: "post",
|
|
data: data,
|
|
contentType: false,
|
|
processData: false,
|
|
dataType: "json",
|
|
success: function (data) {
|
|
// console.log(data);
|
|
if (data.message == "上传成功!") {
|
|
$.modalMsg("操作成功", "success");
|
|
// $.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
|
|
}
|
|
else {
|
|
$.modalMsg(data.message, "warning");
|
|
}
|
|
},
|
|
error: function (aa) {
|
|
$.modalAlertNew("WMS00016", aa);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
},
|
|
setExFileName(val) {
|
|
this.form.WgNgFile = val;
|
|
},
|
|
|
|
|
|
|
|
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.getAllWHCodeList();
|
|
this.getData();
|
|
|
|
|
|
},
|
|
|
|
getData() {
|
|
if (!this.id) return;
|
|
|
|
let _this = this;
|
|
|
|
axios
|
|
.get('/BBWMS/IQCQuality/GetMaterialCheckMain2?keyValue=' + _this.id + '&qty=' + _this.qty )
|
|
.then(function (res) {
|
|
|
|
// debugger;
|
|
if (res.data) {
|
|
if (res.data[0]) {
|
|
for (var i in res.data[0]) {
|
|
Vue.set(vm.form, i, res.data[0][i]);
|
|
}
|
|
|
|
_this.form.Result = 'OK';
|
|
}
|
|
}
|
|
})
|
|
|
|
.catch(function (error) { // 请求失败处理
|
|
alert(error);
|
|
});
|
|
},
|
|
|
|
submitCheck() {
|
|
debugger;
|
|
if (!this.form.Result) {
|
|
$.modalMsg("必须存在最终检验结果", "warning");
|
|
return false;
|
|
}
|
|
|
|
|
|
//if (this.dataSource4CC.length == 0 || this.dataSource4WG.length == 0 || this.dataSource4XN.length == 0) {
|
|
// $.modalMsg("必须存在检验项目", "warning");
|
|
// return false;
|
|
//}
|
|
|
|
this.form.InvBatcgQty = this.qty;
|
|
this.form.EATTRIBUTE2 = this.docType;
|
|
this.form.FinalItemLotList = this.destroyExprementDataSource;
|
|
this.form.CCList = this.dataSource4CC;
|
|
this.form.WGList = this.dataSource4WG;
|
|
this.form.XNList = this.dataSource4XN;
|
|
this.$refs['form'].validate((valid) => {
|
|
if (valid) {
|
|
//alert('submit!');
|
|
|
|
$.submitForm({
|
|
url: "/BBWMS/IQCQuality/SaveMaterialCheckResult",
|
|
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();
|
|
|
|
}
|
|
|
|
|
|
</script>
|