|
@@ -126,6 +126,7 @@ const billsGuidance = (function () {
|
|
|
const ration = {
|
|
|
dom: $('#rationSpread'),
|
|
|
workBook: null,
|
|
|
+ datas: [],
|
|
|
cache: [],
|
|
|
headers: [
|
|
|
{name: '选择', dataCode: 'select', width: 50, vAlign: 'center', hAlign: 'center'},
|
|
@@ -401,6 +402,7 @@ const billsGuidance = (function () {
|
|
|
}
|
|
|
return rst;
|
|
|
});
|
|
|
+ ration.datas = rstData;
|
|
|
ration.cache = rstData;
|
|
|
showData(ration.workBook.getActiveSheet(), ration.headers, rstData);
|
|
|
$.bootstrapLoading.end();
|
|
@@ -754,6 +756,22 @@ const billsGuidance = (function () {
|
|
|
clearCheckedRation(checkedRows);
|
|
|
}
|
|
|
});
|
|
|
+ //搜索定额
|
|
|
+ $('#searchBtn').click(function () {
|
|
|
+ let searchStr = $('#searchText').val();
|
|
|
+ if(!searchStr || searchStr === ''){
|
|
|
+ ration.cache = ration.datas;
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ ration.cache = _.filter(ration.datas, function (data) {
|
|
|
+ return data.code.includes(searchStr);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ let rationSheet = ration.workBook.getActiveSheet();
|
|
|
+ renderSheetFunc(rationSheet, function () {
|
|
|
+ showData(rationSheet, ration.headers, ration.cache);
|
|
|
+ })
|
|
|
+ });
|
|
|
}
|
|
|
//初始化视图
|
|
|
//@param {void} @return {void}
|