Commit ff5dedcb authored by DongRuifen's avatar DongRuifen

我的面料完善

parent 5f571ba7
......@@ -11,8 +11,9 @@
</span>
</view>
<view class="u-font-24 u-m-t-20 color_6F6F72">
<span v-for="itemMater in dataList" :key="indexMater"> <span class="u-m-r-10"
v-if="itemMater.id==item.category"> {{itemMater.name}}</span></span>
<span v-if="dataList.length>0">
<span v-for="(itemMater,indexMater) in dataList" :key="indexMater"> <span class="u-m-r-10"
v-if="itemMater.id==item.category"> {{itemMater.name}}</span></span></span>
|
<span class="u-m-l-10 u-m-r-10">{{item.clothWidth}}cm</span>
|
......
<template>
<view class="whole">
<view class="back">
<view class="back" :style="topHeight==0?'':{'padding-top':resultpx}">
<!-- <view class="back"> -->
<view class="u-flex">
<u-navbar :is-back="true" :background="{ backgroundColor: '#F5F5F5' }" title="面料详情">
<template v-slot:right>
......@@ -10,7 +11,8 @@
</u-navbar>
</view>
<view :class="fabricObj.materialPictureVOList.length>4?'back-two':'back-back'">
<view
:class="fabricObj.materialPictureVOList!=undefined&&fabricObj.materialPictureVOList.length>4?'back-two':'back-back'">
<view class="row" style="color:#F5B674"> {{fabricObj.materialName}}
</view>
<view class="row" style="color:#fff">
......@@ -30,8 +32,9 @@
</view>
</view>
</view>
<view class="whole-bottom">
<view :class="fabricObj.materialPictureVOList.length>4?'body-two':'body'">
<view class="whole-whole">
<view
:class="fabricObj.materialPictureVOList!=undefined&&fabricObj.materialPictureVOList.length>4?'body-two':'body'">
<view class="font"><strong>已上架款式</strong></view>
<view class="item" v-for="itemTab,indexTab in tableList" :key="indexTab">
<view class="item-left">
......@@ -77,6 +80,9 @@
return {
imgUrl: this.$IMG_URL,
id: "",
topHeight: null,
heightpx: null,
resultpx:"",
fabricObj: {},
tableList: [],
dataList: [],
......@@ -90,6 +96,21 @@
}
}
},
computed: {
// heightpx() {
// return uni.upx2px(100) + 'px'
// },
// topHeight() {
// uni.getSystemInfo({
// success: (result) => {
// // this.topHeight = result.safeArea.top
// console.log(result.safeArea.top, "result.safeArea.top")
// return result.safeArea.top + 'px'
// }
// })
// }
},
onLoad(option) {
this.id = option.id
this.materialDetail()
......@@ -104,6 +125,17 @@
}
})
console.log(uni.upx2px(100), )
uni.getSystemInfo({
success: (result) => {
this.topHeight = result.safeArea.top
console.log(result.safeArea.top, "result.safeArea.top")
}
})
this.heightpx = uni.upx2px(100)
this.resultpx=(this.heightpx-this.topHeight)+'px'
console.log(this.resultpx,"this.resultpx")
},
onShow() {
this.id = this.$route.query.id
......@@ -198,7 +230,7 @@
}
}
.whole-bottom {
.whole-whole {
padding: 0 30rpx;
......@@ -208,49 +240,51 @@
padding: 30rpx;
margin-top: -60rpx;
}
.body-two{
.body-two {
background: #ffffff;
border-radius: 4px;
padding: 30rpx;
// margin-top: -60rpx;
// margin-top: -20rpx;
}
.font {
padding-bottom: 30rpx;
}
.item {
padding-bottom: 30rpx;
display: flex;
.font {
padding-bottom: 30rpx;
}
.item-left {
margin-right: 20rpx;
.item {
padding-bottom: 30rpx;
display: flex;
.item-left {
margin-right: 20rpx;
.item-img {
width: 80px;
height: 80px;
}
.item-img {
width: 80px;
height: 80px;
}
}
}
.item:last-child {
padding-bottom: 0px;
}
.item:last-child {
padding-bottom: 0px;
}
.item-right {
.right-one {
font-weight: bold;
}
.item-right {
.right-one {
font-weight: bold;
}
.right-two {
display: flex;
color: rgba(0, 0, 0, 0.40);
.right-two {
display: flex;
color: rgba(0, 0, 0, 0.40);
.two-left {
margin-right: 40rpx;
}
.two-left {
margin-right: 40rpx;
}
}
}
}
}
</style>
</style>
\ No newline at end of file
......@@ -7,14 +7,14 @@
<view>
<u-input v-model="detail.referToBrand"></u-input>
</view> -->
<u-form :model="detailInfo" label-position="top" ref="uForm">
<u-form :model="detailInfo" label-position="top" ref="ruForm">
<hs-tip-title title="面料基本信息"></hs-tip-title>
<u-form-item label="面料名称" prop="materialName" required>
<u-input v-model="detailInfo.materialName" placeholder="请输入面料名称" />
</u-form-item>
<view class="title">面料门幅</view>
<u-number-box v-model="detailInfo.clothWidth" :step="1" :input-width="160" :input-height="60"
@change="valChange" style="margin-right:30rpx">
<u-number-box v-model="detailInfo.clothWidth" :step="0.1" :positive-integer="false" :input-width="160"
:input-height="60" @change="valChange" style="margin-right:30rpx">
</u-number-box>cm
<u-form-item label="面料成分" prop="component" required>
<u-input v-model="detailInfo.component" placeholder="请输入面料成分" />
......@@ -34,6 +34,7 @@
data() {
return {
id: "",
step: 0.1,
detailInfo: {},
value: 2.2,
tableList: []
......
......@@ -25,7 +25,7 @@ export default {
components:{fabricTitle},
data() {
return {
size: 5,
size: 10,
search: '',
fiabricList: [],
// dataList:[],
......@@ -54,7 +54,7 @@ export default {
},
methods: {
searchCli() {
this.size = 5;
// this.size = 5;
this.materialList();
},
// 我的面料
......
......@@ -35,8 +35,11 @@
<view class="u-font-24 color_d5aa7a" @click="seeFabric">查看更多</view>
</view>
<view class="home_con_fabric">
<view class="home_con_content u-m-t-24" @click="detailFabric(item)" v-for="item in fiabricList">
<image class="hs-img" src="../../static/images/home/1@2x.png" mode=""></image>
<view class="home_con_content u-m-t-24" @click="detailFabric(item)" v-for="(item,index) in fiabricList" :key="index">
<image v-if="index==0" class="hs-img" src="../../static/images/home/1@2x.png" mode="aspectFill"></image>
<image v-if="index==1" class="hs-img" src="../../static/images/home/2@2x.png" mode="aspectFill"></image>
<image v-if="index==2" class="hs-img" src="../../static/images/home/3@2x.png" mode="aspectFill"></image>
<image v-if="index==3" class="hs-img" src="../../static/images/home/4@2x.png" mode="aspectFill"></image>
<view class="home_con_content_font ov_hiden">{{ item.materialName }}</view>
</view>
</view>
......@@ -147,7 +150,7 @@
// this.toBeSelectedQuantity();
// this.orderTicketExceptionNum();
// this.noSampleOrder();
// this.materialList();
this.materialList();
// 潜在客户
this.potentialCustomersPage();
},
......@@ -242,8 +245,10 @@
},
// 我的面料
materialList() {
this.$http('orderTicket.materialList', {
this.$http('materialinfo.getMaterialList', {
size: 4,
"current": 1,
"materialType": "面料",
materialCode: '',
materialName: ''
}).then(res => {
......@@ -252,7 +257,7 @@
data
} = res;
if (code == 200) {
this.fiabricList = data.data;
this.fiabricList = data.page.records;
}
});
},
......@@ -264,7 +269,7 @@
this.$Router.push('/pages/home/fabricList');
},
detailFabric(data) {
this.$Router.push('/pages/home/fabricDetails?id=' + data.id);
// this.$Router.push('/pages/home/fabricDetails?id=' + data.id);
},
sampleConfirm() {
this.$Router.push('/pages/home/sampleConfirmation?abolishIds=' + this.abolishIds);
......
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