purchaseToWaybill.js 2.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

// 以下两个参数开启团队权限时有值
var objectId = '', objectKey = '';
// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断
var serviceClassName;

layui.config({
    base: basePath,
    version: skyeyeVersion
}).extend({
    window: 'js/winui.window'
}).define(['window', 'table', 'jquery'], function (exports) {
    winui.renderColor();
    var index = parent.layer.getFrameIndex(window.name);
    var $ = layui.$;
    var id = GetUrlParam("id");

18 19
    // 采购订购单转到货单
    AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryPurchaseOrderTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
20 21
            let data = json.bean;
            console.log(data)
22 23
            // 采购到货的【编辑布局】
            dsFormUtil.initEditPageForStatic('content', 'FP2024061100002', data, {
24 25 26 27
                savePreParams: function (params) {
                },
                saveData: function (params) {
                    // 保存数据
28
                    AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertPurchaseOrderToTurnDelivery", params: params, type: 'json', method: "POST", callback: function(json) {
29 30 31 32 33 34 35
                            parent.layer.close(index);
                            parent.refreshCode = '0';
                        }});

                },
                loadComponentCallback: function () {
                    $("div[controlType='supplier']").remove();
36
                    $("div[controlType='purchaseDeliveryFromType']").remove();
37 38 39 40 41 42 43 44 45 46 47
                },
                tableAddRowCallback: function (tableId) {
                    $("#addRow" + tableId).remove();
                    $("div[controlType='simpleTable']").find(".unitPrice").prop('disabled', true);
                    $("div[controlType='simpleTable']").find(".amountOfMoney").prop('disabled', true);
                    $("div[controlType='simpleTable']").find(".taxRate").prop('disabled', true);
                    $("div[controlType='simpleTable']").find(".taxMoney").prop('disabled', true);
                    $("div[controlType='simpleTable']").find(".taxUnitPrice").prop('disabled', true);
                    $("div[controlType='simpleTable']").find(".taxLastMoney").prop('disabled', true);
                    $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true);
                    $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
48 49
                    $("div[controlType='simpleTable']").find(".qualityInspection").prop('disabled', true);
                    $("div[controlType='simpleTable']").find(".taxLastinspectionRatio").prop('disabled', true);
50 51 52 53 54 55 56 57



                }
            });
        }});

});