Commit 8109be76 authored by Zheng Shang Jun's avatar Zheng Shang Jun
parents 1110c710 a529c6e2
...@@ -57,15 +57,15 @@ ...@@ -57,15 +57,15 @@
</view> </view>
<!-- list --> <!-- list -->
<view class="u-p-t-20 u-p-l-30 u-p-r-30 u-p-b-20"> <view class="u-p-t-20 u-p-l-30 u-p-r-30 u-p-b-20">
<view v-if="!isEmpty" class="u-m-b-20 bd_rad1 u-p-30" @click="dateilEnt(item,'item')" v-for="item in entrustmentList" :key="item.id" style="background: #fff;"> <view class="u-m-b-20 bd_rad1 u-p-30" @click="dateilEnt(item,'item')" v-for="item in entrustmentList" :key="item.id" style="background: #fff;">
<view class="u-m-b-30 u-flex justify-between"> <view class="u-m-b-30 u-flex justify-between">
<view class="entrus_list_title u-font-32">{{ item.materialName }}</view> <view class="entrus_list_title u-font-32 ov_hid">{{ item.materialName }}</view>
<view class="u-font-28">{{ item.status | filterStatus }}</view> <view class="u-font-28">{{ item.status | filterStatus }}</view>
</view> </view>
<view class="dis_flex"> <view class="dis_flex">
<image class="hs-img-160" :src="`${$IMG_URL}${item.pictureCode}`" mode="cover"></image> <image class="hs-img-160" :src="`${$IMG_URL}${item.pictureCode}`" mode="cover"></image>
<view class="u-m-l-20"> <view class="u-m-l-20 u-flex-1">
<view class="u-m-b-10"> <view class="u-m-b-10" v-if="item.status >= 4">
<span class="color_00004">建模服务商</span> <span class="color_00004">建模服务商</span>
<span class="u-m-l-20">{{ item.enterpriseName }}</span> <span class="u-m-l-20">{{ item.enterpriseName }}</span>
</view> </view>
...@@ -185,10 +185,10 @@ export default { ...@@ -185,10 +185,10 @@ export default {
}; };
}, },
onShow() { onShow() {
// 获取查询条件
this.entrustmentFun();
this.value = uni.getStorageSync('styleSearch') || ''; this.value = uni.getStorageSync('styleSearch') || '';
uni.removeStorageSync('styleSearch'); uni.removeStorageSync('styleSearch');
// 获取查询条件
this.entrustmentFun();
this.enable = true; this.enable = true;
// #ifdef APP-PLUS // #ifdef APP-PLUS
this.setOffestTop(); this.setOffestTop();
...@@ -218,7 +218,6 @@ export default { ...@@ -218,7 +218,6 @@ export default {
this.statusBtn = true; this.statusBtn = true;
}, 1000); }, 1000);
let a = JSON.stringify(object); let a = JSON.stringify(object);
console.log(a,object.scrollTop,this.headerHeight)
if (object.scrollTop >= this.headerHeight - 90) { if (object.scrollTop >= this.headerHeight - 90) {
this.background.backgroundColor = 'rgba(245,245,245,1)'; this.background.backgroundColor = 'rgba(245,245,245,1)';
} else { } else {
...@@ -263,7 +262,6 @@ export default { ...@@ -263,7 +262,6 @@ export default {
setOffestTop() { setOffestTop() {
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
let topPx = systemInfo.statusBarHeight + 44; // 顶部状态栏+沉浸式自定义顶部导航 let topPx = systemInfo.statusBarHeight + 44; // 顶部状态栏+沉浸式自定义顶部导航
console.log(systemInfo, topPx);
this.offsetTop = topPx / (uni.upx2px(topPx) / topPx); // px转rpx this.offsetTop = topPx / (uni.upx2px(topPx) / topPx); // px转rpx
}, },
DateYMD() { DateYMD() {
...@@ -275,11 +273,11 @@ export default { ...@@ -275,11 +273,11 @@ export default {
entrustmentPage() { entrustmentPage() {
this.dateTime = this.DateYMD(); this.dateTime = this.DateYMD();
this.loadStatus = 'loading'; this.loadStatus = 'loading';
let { materialName, current, size } = this.pages; let { current, size } = this.pages;
this.$http( this.$http(
'modelingtask.selectModelingTaskPage', 'modelingtask.selectModelingTaskPage',
{ {
materialName: materialName ? materialName : null, materialName: this.value ? this.value : null,
status: this.status, status: this.status,
current: current, current: current,
size: size size: size
...@@ -296,16 +294,10 @@ export default { ...@@ -296,16 +294,10 @@ export default {
this.overtimeOrderNum = data.overtimeOrderNum; // 超时订单 this.overtimeOrderNum = data.overtimeOrderNum; // 超时订单
this.quantityNum = data.quantityToBeConfirmed; // 待确认数量 this.quantityNum = data.quantityToBeConfirmed; // 待确认数量
this.loadStatus = this.entrustmentList.length < this.total ? 'loadmore' : 'nomore'; this.loadStatus = this.entrustmentList.length < this.total ? 'loadmore' : 'nomore';
// this.$refs.uToast.show({
// title: '操作成功'
// });
} }
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}) })
.catch(err => { .catch(err => {
// this.$refs.uToast.show({
// title: '操作失败'
// });
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}); });
}, },
...@@ -327,7 +319,6 @@ export default { ...@@ -327,7 +319,6 @@ export default {
confirm() { confirm() {
// this.delEntrustment(); // this.delEntrustment();
this.$http('modeling.reminders', { id: this.id }).then(res => { this.$http('modeling.reminders', { id: this.id }).then(res => {
console.log(res);
let { code, data } = res; let { code, data } = res;
if (code === 200) { if (code === 200) {
this.$refs.uToast.show({ this.$refs.uToast.show({
...@@ -479,7 +470,13 @@ export default { ...@@ -479,7 +470,13 @@ export default {
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
} }
.ov_hid{
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.entrus_list_title { .entrus_list_title {
flex: 1;
&::before { &::before {
content: ''; content: '';
display: inline-block; display: inline-block;
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<view class="slot-wrap"> <view class="slot-wrap">
<view class="search-wrap"> <view class="search-wrap">
<u-search <u-search
@change="changeCli"
@search="searchEng" @search="searchEng"
bg-color="#fff" bg-color="#fff"
border-color="#d5aa7a" border-color="#d5aa7a"
...@@ -16,13 +15,6 @@ ...@@ -16,13 +15,6 @@
</view> </view>
</view> </view>
</u-navbar> </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" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
...@@ -37,41 +29,12 @@ export default { ...@@ -37,41 +29,12 @@ export default {
size: 10, size: 10,
total: 0, total: 0,
state: 1, state: 1,
fiabricList: []
}; };
}, },
onLoad(option) { onLoad(option) {
this.state = option.state; this.state = option.state;
}, },
methods: { 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) { searchEng(item) {
let data = item || this.value; let data = item || this.value;
try { try {
...@@ -83,34 +46,6 @@ export default { ...@@ -83,34 +46,6 @@ export default {
// error // 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> </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