Commit 5feaf225 authored by 阮藤's avatar 阮藤

问题解决

parent e6ca653e
......@@ -185,10 +185,10 @@ export default {
};
},
onShow() {
// 获取查询条件
this.entrustmentFun();
this.value = uni.getStorageSync('styleSearch') || '';
uni.removeStorageSync('styleSearch');
// 获取查询条件
this.entrustmentFun();
this.enable = true;
// #ifdef APP-PLUS
this.setOffestTop();
......@@ -273,11 +273,11 @@ export default {
entrustmentPage() {
this.dateTime = this.DateYMD();
this.loadStatus = 'loading';
let { materialName, current, size } = this.pages;
let { current, size } = this.pages;
this.$http(
'modelingtask.selectModelingTaskPage',
{
materialName: materialName ? materialName : null,
materialName: this.value ? this.value : null,
status: this.status,
current: current,
size: size
......@@ -294,16 +294,10 @@ export default {
this.overtimeOrderNum = data.overtimeOrderNum; // 超时订单
this.quantityNum = data.quantityToBeConfirmed; // 待确认数量
this.loadStatus = this.entrustmentList.length < this.total ? 'loadmore' : 'nomore';
// this.$refs.uToast.show({
// title: '操作成功'
// });
}
uni.stopPullDownRefresh();
})
.catch(err => {
// this.$refs.uToast.show({
// title: '操作失败'
// });
uni.stopPullDownRefresh();
});
},
......
......@@ -5,7 +5,6 @@
<view class="slot-wrap">
<view class="search-wrap">
<u-search
@change="changeCli"
@search="searchEng"
bg-color="#fff"
border-color="#d5aa7a"
......@@ -16,13 +15,6 @@
</view>
</view>
</u-navbar>
<!-- 列表 -->
<view class="home_con_order u-p-l-30 u-p-r-30">
<view class="u-flex u-m-t-30 hs-height-120 u-border-bottom" @click="searchEng(item.materialName)" v-for="item in fiabricList">
<image class="hs-img-48 u-m-r-20" src="@/static/images/home/search@2x.png" mode=""></image>
<text class="u-font-28 u-flex-1 text-cut" v-html="brightenKeyword(item.materialName,value)"></text>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
......@@ -37,41 +29,12 @@ export default {
size: 10,
total: 0,
state: 1,
fiabricList: []
};
},
onLoad(option) {
this.state = option.state;
},
methods: {
brightenKeyword(val, keyword) {
val = val + '';
if (val.indexOf(keyword) !== -1 && keyword !== '') {
return val.replace(keyword, '<font color="#AF8D66">' + keyword + '</font>');
} else {
return val;
}
},
filterSwitch() {
const val = this.state;
switch (val) {
case 1:
// 款式
this.entrustmentPage();
return;
case 2:
// 建模
return;
default:
// 款式
this.entrustmentPage();
return;
}
},
changeCli() {
this.size = 10;
this.filterSwitch();
},
searchEng(item) {
let data = item || this.value;
try {
......@@ -83,34 +46,6 @@ export default {
// error
}
},
// 款式委托
entrustmentPage() {
this.$http(
'orderTicket.entrustmentPage',
{
size: this.size,
materialCode: '',
status: 0,
materialName: this.value
},
'加载中...'
)
.then(res => {
let { code, data } = res;
if (code == 200) {
this.fiabricList = data.data;
this.total = data.total;
this.$refs.uToast.show({
title: '操作成功'
});
}
})
.catch(err => {
this.$refs.uToast.show({
title: '操作失败'
});
});
}
}
};
</script>
......
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