Commit 916c5f93 by 夏超

[fix] 修改问题

parent 5adf5f62
...@@ -191,8 +191,9 @@ ...@@ -191,8 +191,9 @@
:min="0" :precision="2"></el-input-number> :min="0" :precision="2"></el-input-number>
</div> </div>
<!-- 搜索按钮 --> <!-- 搜索按钮 -->
<!-- :disabled="!startedFlag"-->
<el-button type="primary" @click="searchFilter" class="searchBtn" <el-button type="primary" @click="searchFilter" class="searchBtn"
:disabled="!startedFlag">搜索 >搜索
</el-button> </el-button>
</el-collapse-item> </el-collapse-item>
...@@ -1383,7 +1384,7 @@ ...@@ -1383,7 +1384,7 @@
}, },
//自定义筛选下拉加载 //自定义筛选下拉加载
zdy_loadMore(val, item) { zdy_loadMore(val, item) {
// console.log(val,item); console.log(val,item);
item.chanpinpageNum += 1; item.chanpinpageNum += 1;
if (item.zdy_datations !== '到底啦') { if (item.zdy_datations !== '到底啦') {
this.zdy_filter(item.chanpinpageNum, item) this.zdy_filter(item.chanpinpageNum, item)
...@@ -2989,12 +2990,12 @@ sta = { ...@@ -2989,12 +2990,12 @@ sta = {
}); });
}, },
zdy_filter(num, val) { zdy_filter(num, val) {
// console.log(num,val); console.log(num,val);
//滚动加载 //滚动加载
let that = this; let that = this;
if (!that.checkFlag) { if (!that.checkFlag) {
that.record_filter_data.map((item, index) => { // that.record_filter_data.map((item, index) => {
if (item.ttype === 'many2one' || item.ttype === 'many2many' || item.ttype === 'one2many') { // if (item.ttype === 'many2one' || item.ttype === 'many2many' || item.ttype === 'one2many') {
// console.log(item); // console.log(item);
axios.request({ axios.request({
url: "/roke/get_general_base_data", url: "/roke/get_general_base_data",
...@@ -3003,19 +3004,22 @@ sta = { ...@@ -3003,19 +3004,22 @@ sta = {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: { data: {
"ttype": item.ttype, "ttype": val.ttype,
"page_no": num, "page_no": num,
"page_size": 20, "page_size": 20,
"model_index": item.relation, "model_index": val.relation,
"domain_data": '', "domain_data": '',
"selection_mode": '' "selection_mode": ''
} }
}).then((res) => { }).then((res) => {
// console.log(res);
if (res.data.result.state === 'success') { if (res.data.result.state === 'success') {
if (item.record_list && res.data.result.record_list != []) { // if (item.record_list && res.data.result.record_list != []) {
item.record_list = [...item.record_list, ...res.data.result.record_list]; // item.record_list = [...item.record_list, ...res.data.result.record_list];
// }
if (val.select_vals && res.data.result.record_list != []) {
val.select_vals = [...val.select_vals, ...res.data.result.record_list];
} }
// console.log(item); // console.log(item);
if (num === res.data.result.total_page) { if (num === res.data.result.total_page) {
val.zdy_datations = '到底啦'; val.zdy_datations = '到底啦';
...@@ -3032,8 +3036,8 @@ sta = { ...@@ -3032,8 +3036,8 @@ sta = {
}); });
} }
}); });
} // }
}); // });
} else { } else {
that.jl_record_filter_data.map((item, index) => { that.jl_record_filter_data.map((item, index) => {
if (item.ttype === 'many2one' || item.ttype === 'many2many' || item.ttype === 'one2many') { if (item.ttype === 'many2one' || item.ttype === 'many2many' || item.ttype === 'one2many') {
...@@ -3058,6 +3062,9 @@ sta = { ...@@ -3058,6 +3062,9 @@ sta = {
if (item.record_list && res.data.result.record_list != []) { if (item.record_list && res.data.result.record_list != []) {
item.record_list = [...item.record_list, ...res.data.result.record_list]; item.record_list = [...item.record_list, ...res.data.result.record_list];
} }
if (val.select_vals && res.data.result.record_list != []) {
val.select_vals = [...val.select_vals, ...res.data.result.record_list];
}
// console.log(item); // console.log(item);
if (num === res.data.result.total_page) { if (num === res.data.result.total_page) {
val.zdy_datations = '到底啦'; val.zdy_datations = '到底啦';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment