YYC
2023-10-19 6bd36a38fc587ba39bd50e26257ed6ece71363e7
igds-web/src/main/resources/static/admin/inout/in-ship-register.js
@@ -16,12 +16,12 @@
        });
        //监听品种
        layui.form.on('select(select_foodVariety)',function (data) {
        layui.form.on('select(select_foodVariety)', function (data) {
            updateFoodVariety(data.value);
        });
        //监听化验结果单填写数据,并给出提示结果
        table.on('edit(tableCheckItem)',function (obj) {
        table.on('edit(tableCheckItem)', function (obj) {
            getResult(obj);
        });
    });
@@ -147,7 +147,7 @@
/**
 * 弹出化验单信息
 */
function showCheckDetail(){
function showCheckDetail() {
    // 赋值
    var data = form.val("form-data");
    data.checkUser = checkUser;
@@ -165,7 +165,7 @@
        yes: function () {
            curCheckData = form.val("form-detail");
            if(null == curCheckData.foodVariety){
            if (null == curCheckData.foodVariety) {
                notify("请填写粮食品种!");
                return;
            }
@@ -210,12 +210,12 @@
    var index = layer.load();
    $.ajax({
        type : "POST",
        url : "../../basic/inout/get-check-item",
        dataType : "json",
        contentType : "application/json;charset=UTF-8",
        data : JSON.stringify(data),
        success : function(result) {
        type: "POST",
        url: "../../basic/inout/get-check-item",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(data),
        success: function (result) {
            if (result.code != "0000") {
                layer.msg(result.msg);
            } else {
@@ -225,7 +225,7 @@
                layer.close(index);
            }
        },
        error : function() {
        error: function () {
            layer.close(index);
            layer.msg("后台异常,请重试或者联系管理员!!");
        }
@@ -239,11 +239,11 @@
    // 清空数据
    $("#tableCheckItem").empty();
    table.render({
        elem : '#tableCheckItem',
        data : curCheckItems,
        page : false,
        elem: '#tableCheckItem',
        data: curCheckItems,
        page: false,
        // skin: 'line',
        even : true,
        even: true,
        cols: [[{
            field: 'standardName',
            title: '化验项目',
@@ -274,8 +274,8 @@
    });
    $("thead tr").css({
        "border-bottom" : "2px solid #53adce",
        "background" : "#eff4f6"
        "border-bottom": "2px solid #53adce",
        "background": "#eff4f6"
    });
}
@@ -387,7 +387,7 @@
    // 渲染往来单位列表
    table.render({
        elem: '#tableNotice',
        url: '../../basic/inout/list-notice—in',
        url: '../../basic/inout/list-notice-in',
        page: false,
        even: true,
        method: 'POST',
@@ -461,54 +461,54 @@
    var index = layer.load();
    // 渲染往来单位列表
    table.render({
        elem : '#tableFoodLoaction',
        url : '../../basic/common/page-food-location',
        page : false,
        toolbar : '#toolbarFoodLocaton',
        even : true,
        method : 'POST',
        contentType : "application/json;charset=UTF-8",
        cols : [ [ {
            field : 'code',
            title : '编码'
        elem: '#tableFoodLoaction',
        url: '../../basic/common/page-dicArea',
        page: false,
        toolbar: '#toolbarFoodLocaton',
        even: true,
        method: 'POST',
        contentType: "application/json;charset=UTF-8",
        cols: [[{
            field: 'code',
            title: '编码'
        }, {
            field : 'simple',
            title : '简拼'
            field: 'simple',
            title: '简拼'
        }, {
            field : 'name',
            title : '名称',
            width : '60%'
        } ] ],
        where : {
            "page" : 1,
            "limit" : 100
            field: 'name',
            title: '名称',
            width: '60%'
        }]],
        where: {
            "page": 1,
            "limit": 100
        },
        parseData : function(res) {
        parseData: function (res) {
            if ("0000" == res.code) {
                return {
                    "code" : "0",
                    "msg" : res.msg,
                    "count" : res.data.total,
                    "data" : res.data.records
                    "code": "0",
                    "msg": res.msg,
                    "count": res.data.total,
                    "data": res.data.records
                }
            } else {
                return {
                    "code" : "1",
                    "msg" : res.msg
                    "code": "1",
                    "msg": res.msg
                }
            }
        },
        done : function(res) {
        done: function (res) {
            layer.close(index);
        }
    });
    //双击显示选中数据
    table.on('rowDouble(tableFoodLoaction)', function(obj){
    table.on('rowDouble(tableFoodLoaction)', function (obj) {
        var data = obj.data;
        // 赋值
        form.val("form-data", {
            foodLocation : data.name
            foodLocation: data.name
        });
        // 关闭
        layer.close(index2);
@@ -516,18 +516,18 @@
    // 弹出对话框
    var index2 = layer.open({
        type : 1,
        title : "选择粮产地",
        area : [ '600px', '600px' ],
        shade : 0,
        content : $('#listFoodLocation'),
        btn : 0,
        btn : [ '取消' ],
        yes : function() {
        type: 1,
        title: "选择粮产地",
        area: ['600px', '600px'],
        shade: 0,
        content: $('#listFoodLocation'),
        btn: 0,
        btn: ['取消'],
        yes: function () {
            // 关闭
            layer.close(index2);
        },
        closeBtn : 0
        closeBtn: 0
    });
}
@@ -536,11 +536,11 @@
function flushFoodLocation() {
    var key = $("#key2").val();
    table.reload('tableFoodLoaction', {
        url : "../../basic/common/page-food-location",
        where : {
            key : key
        url: "../../basic/common/page-dicArea",
        where: {
            key: key
        },
        done : function(res) {
        done: function (res) {
            if (key) {
                $("#key2").val(key);
            }