数据表单JavaScript代码
//新增或者修改数据的时候给输入控件绑定下拉值。
function load_suoshugaoxiao() { common_post.postPortal({ "ac": "get_data_by_sql_back_data_table_from_portal_with_table_id", "sql": "select mingchen from table_id where gongjiandanweileixing='高校' ", "table_id": "f1e14f985e5949fba1aa5d54dbec1663" }).then(function (data) { var tmp = "<option value=''>请选择</option>"; for (var i = 0; i < data.arr.length; i++) { tmp += "<option value='" + data.arr[i].mingchen + "' >" + data.arr[i].mingchen + "</option>"; } $("#suoshugaoxiao").html(tmp); }); } load_suoshugaoxiao();
function load_bank_data() { common_post.postPortal({ "ac": "get_data_by_sql_back_data_table_from_portal_with_table_id", "sql": "select * from table_id", "table_id": "bce6cf90409f43f3876028479ad72edf" }).then(function (data) { var tmp = "<option value='' mykey='bank_code' mycalc='equals'>请选择</option>"; for (var i = 0; i < data.arr.length; i++) { tmp += "<option value='" + data.arr[i].yinhangbianma + "' mykey='bank_code' mycalc='equals' >" + data.arr[i].yinhangbianma + "->" + data.arr[i].yinhangmingchen + "</option>"; } $("#sl_bank").html(tmp); }); } function submit_or_reject_for_review(val) { var cdt = get_portal_search_conditions(); var ps = { "ac": "modify_data_through_sql_and_conditions", "sql": "update table_id set status=" + val + ",check_user=@current_user_name,check_time=now()", "table_id": tableid, "cdt": JSON.stringify(cdt) } if (val == 2) { if (confirm("Are you sure the review has passed.确定审核通过吗?") == false) return; } if (val == 0) { if (confirm("Are you sure you want to reject it.确定驳回吗?") == false) return; ps = { "ac": "modify_data_through_sql_and_conditions", "sql": "update table_id set status=" + val + ",check_user='',check_time=null", "table_id": tableid, "cdt": JSON.stringify(cdt) } } common_post.postPortal(ps).then(function (data) { if (data.errorcode !== 0) { msg_error(data.msg); return false; } msg_success(data.msg); }); }
//订单中心xls $(function () { $(".am-btn-primary").hide(); $("input[name='file']").hide(); $("img[alt='add new data']").hide(); $(".fsbpm_user_other_title_or_desc_info_style").append('<a style="font-size: 11px;">订单管理的数据来自于采购方发起的订单流程,此处不支持新增的操作。</a>'); });