试验管理
This commit is contained in:
parent
80c4e804aa
commit
dc1d7e10c2
|
|
@ -332,7 +332,7 @@ function saveData2() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveData(data) {
|
function saveData(data) {
|
||||||
console.log(data)
|
console.log("试验",data)
|
||||||
//获取试验设备列表
|
//获取试验设备列表
|
||||||
// var devList = convertToDevList(data.field);
|
// var devList = convertToDevList(data.field);
|
||||||
|
|
||||||
|
|
@ -464,6 +464,7 @@ function convertToExperDevList(originalData){
|
||||||
// 根据设备ID构建设备信息
|
// 根据设备ID构建设备信息
|
||||||
deviceIds.forEach(deviceId => {
|
deviceIds.forEach(deviceId => {
|
||||||
// 使用deviceId来构建键名
|
// 使用deviceId来构建键名
|
||||||
|
const devIdKey = `devId-${deviceId}`;
|
||||||
const devCodeKey = `devCode-${deviceId}`;
|
const devCodeKey = `devCode-${deviceId}`;
|
||||||
const manufacturerKey = `manufacturer-${deviceId}`;
|
const manufacturerKey = `manufacturer-${deviceId}`;
|
||||||
const manufactureDateKey = `manufactureDate-${deviceId}`;
|
const manufactureDateKey = `manufactureDate-${deviceId}`;
|
||||||
|
|
@ -478,7 +479,7 @@ function convertToExperDevList(originalData){
|
||||||
|
|
||||||
// 创建设备信息对象
|
// 创建设备信息对象
|
||||||
const deviceItem = {
|
const deviceItem = {
|
||||||
devId: deviceId,
|
devId: originalData[devIdKey],
|
||||||
devCode: originalData[devCodeKey],
|
devCode: originalData[devCodeKey],
|
||||||
manufacturer: originalData[manufacturerKey],
|
manufacturer: originalData[manufacturerKey],
|
||||||
manufactureDate: originalData[manufactureDateKey],
|
manufactureDate: originalData[manufactureDateKey],
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,8 @@ function initTable(dataList, limit, page) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "devTypeName", title: "样品类型", unresize: true, align: "center"},
|
{field: "devTypeName", title: "样品类型", unresize: true, align: "center"},
|
||||||
{field: "devModule", title: "规格型号", unresize: true, align: "center"},
|
// {field: "devModule", title: "规格型号", unresize: true, align: "center"},
|
||||||
|
{field: "sampleNum", title: "送样数量", unresize: true, align: "center"},
|
||||||
{field: "", title: "样品数量", unresize: true, align: "center",
|
{field: "", title: "样品数量", unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
var testResult="";
|
var testResult="";
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ function initTable(dataList, limit, page) {
|
||||||
//表头
|
//表头
|
||||||
{title: "序号", width: 80, unresize: true, align: "center",
|
{title: "序号", width: 80, unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
return (page - 1) * limit + d.LAY_INDEX;
|
return (page - 1) * limit + d.LAY_NUM;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "customName", title: "送样单位", unresize: true, align: "center"},
|
{field: "customName", title: "送样单位", unresize: true, align: "center"},
|
||||||
|
|
@ -222,7 +222,7 @@ function getReqParams(page, limit, type) {
|
||||||
} else {
|
} else {
|
||||||
obj = {
|
obj = {
|
||||||
page: '1',
|
page: '1',
|
||||||
limit: '2',
|
limit: '10',
|
||||||
devTypeCode: '',
|
devTypeCode: '',
|
||||||
keyWord: '',
|
keyWord: '',
|
||||||
sampleUserName: '',
|
sampleUserName: '',
|
||||||
|
|
@ -310,8 +310,8 @@ function commitCheckTestData(){
|
||||||
ajaxRequest(url, "POST", params, true, function () {
|
ajaxRequest(url, "POST", params, true, function () {
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
if (result.code === 200) {
|
if (result.code === 200) {
|
||||||
console.log("数据",result.data)
|
parent.layer.msg(result.msg, {icon: 1})
|
||||||
// return result.data
|
query()
|
||||||
} else {
|
} else {
|
||||||
layer.alert(result.msg, {icon: 2})
|
layer.alert(result.msg, {icon: 2})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input type="text" class="layui-input" id="sampleDate" placeholder="请选择日期">
|
<input type="text" class="layui-input" readonly id="sampleDate" placeholder="请选择日期">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue