YYC
2023-06-16 ceb82b46aff1f20e5670a199aa2e0eef87ccd5a8
igds-web/src/main/resources/static/admin/inout/in-sample.js
@@ -1,5 +1,6 @@
//当前节点 入库质检
var layer;
var laydate;
var form;
var table;
var page = 1;
@@ -12,7 +13,7 @@
        layer = layui.layer;
        form = layui.form;
        table = layui.table;
        var laydate = layui.laydate;
        laydate = layui.laydate;
        laydate.render({
            elem: '#start',
@@ -27,9 +28,10 @@
        });
        laydate.render({
            elem: '#foodYear',
            elem: '#sampleTime',
            theme: '#7b8e9f',
            type: 'year',
            format: 'yyyy-MM-dd HH:mm:ss',
            type: 'datetime'
        });
        // 初始化表单数据
@@ -342,38 +344,45 @@
    });
}
//隐藏信息--替换为*
function replaceStr(str) {
    if (!str) {
        return "";
    }
    var split = str.split("");
/**
 * 时间等
 */
function getTime() {
    if (split.length == 1) {
        return "*";
    }
    if (split.length == 2 || split.length == 3) {
        return str.slice(0, 1) + "**"
    }
    return str.slice(0, 1) + "***" + str.slice(split.length - 1);
        var now = new Date();
        var time = now.toLocaleString('chinese', {
            hour12: false
        });
        return time;
}
function showDetail(obj) {
    curSampleData = obj.data;
    curSampleData = null;
    var nowTime = dateFtt("yyyy-MM-dd hh:mm:ss", new Date());
    $("#printTime").html(nowTime);
    curSampleData = obj.data;
    if(!curSampleData.sampleTime){
        curSampleData.sampleTime = nowTime;
    }
    if(!curSampleData.sampleUser){
        curSampleData.sampleUser = sampleUser;
    }
    // 赋值
    form.val("form-detail", curSampleData);
    form.render();
    layer.open({
        type: 1,
        title: "扦样信息",
        area: ['900px', '400px'],
        title: "扦样管理信息",
        area: ['900px', '520px'],
        shade: 0,
        content: $('#checkDetail'),
        btnAlign: 'c',
        btn: ['保存提交', '关闭取消'],
        btn: ['保存并打印', '保存提交','关闭取消'],
        yes: function () {
            layer.alert("条形码待确定!");
        }, btn2: function () {
            // 更新到页面
            var data = form.val("form-detail");
            obj.update(data);
@@ -381,7 +390,8 @@
            Object.assign(curSampleData, data);
            submit();
        }, btn2: function () {
        }, btn3: function () {
            layer.closeAll();
        },
        closeBtn: 0