$(document).ready(function () {
    bindQueryEvent();
});

//绑定selectC
function bindQueryEvent() {
    $('#productCode').searchbox({
        type: "product", name: "productDetail",
        onChange: function (value, data) {
            $('#submitForm').formSet(data);
        }
    });
}


function saveForm(){
    debugger
    var _self=this;
    $('#submitForm').ajaxSubmit({
        url : web_app.name + '/workInstruction/saveWorkInstruction.ajax',
        param:{},
        success : function(data) {
            if (data == "1"){
                Public.successTip("保存成功！");
            }
            _self.close();
        }
    });
}


function resetForm(obj) {
    $(obj).formClean();
}

