数据列表管理-顶部查询条件的自定义代码参考-Query Condition

银行:<select id="sl_bank" class="fsbpmserachcontrol search_select" myts="sl"></select>

 

状态:<select id="sl_status_filter" class="fsbpmserachcontrol search_select" myts="sl">
<option mykey="status" mycalc="equals" value="1" selected="selected">待审核</option>
<option mykey="status" mycalc="equals" value="2">已审核</option>
<option mykey="status" mycalc="equals" value="3">已生成</option>
<option mykey="status" mycalc="equals_not" value="-1">全部</option></select>

 

交易金额:<input type="text" class="fsbpmserachcontrol search_txt" myts="txt" mykey="trans_amonut" mycalc="equals"/>

 

业务类型:<input id="txt_bis_type" type="text" class="fsbpmserachcontrol search_txt" myts="txt" mykey="bis_type" mycalc="equals"/>

 

交易类型:<select class="fsbpmserachcontrol search_select" myts="sl">
<option value="" mykey="trans_type" mycalc="equals" selected="selected">请选择</option>
<option value="来账" mykey="trans_type" mycalc="equals">来账</option>
<option value="往账" mykey="trans_type" mycalc="equals">往账</option>
  </select>

 

销账金额:<input type="text" class="fsbpmserachcontrol search_txt" myts="txt" mykey="write_off_amount" mycalc="equals"/>

 

交易日期:<input type="text" class="fsbpmserachcontrol search_txt" myts="txt" mykey="trans_date" mycalc="big_than" onClick="WdatePicker()"/>
     ~<input type="text" class="fsbpmserachcontrol search_txt" myts="txt" mykey="trans_date" mycalc="less_than" onClick="WdatePicker()"/>

 

交易抬头:<input type="text" class="fsbpmserachcontrol search_txt" myts="txt" mykey="trans_title" mycalc="like"/>


-- 原理 --
-- 数据查询过滤的class样式的必须为:fsbpmserachcontrol输入控件的UI样式为:search_txt或者search_select --
-- myts代表输入input输入对象的控件类型,一般为 txt 或者 sl --
-- mykey代表数据库模型的项目值,比如:trans_date,trans_type,etc --
-- mycalc为匹配方式 --
完全相等:equals
完全不等:equals_not
大于:big_than
小于:less_than
包含:like

运算逻辑: mykey mycalc inputValue

 

//下拉银行控件从其他表格中取值作为过滤条件使用eg
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);
	});
}

  

 

done

 

posted @ 2023-05-20 15:45  liskov_design  阅读(54)  评论(0编辑  收藏  举报