Commit e1b9231b authored by Zheng Shang Jun's avatar Zheng Shang Jun

最新冲突解决

parents 8ffbf5b1 f70f1c6e
import config from "../config/index";
let className = 'colour';
let baseUrl = `${config.baseUrl}/${className}`
export default {
[className]:{
'selectColour':{
url: `${baseUrl}/selectColour`,
method: 'get'
}
}
}
import materialinfo from './materialinfo/index' import materialinfo from './materialinfo/index'
import colour from './colour/index'
export default { export default {
...materialinfo, ...materialinfo,
...colour,
} }
/*
* @Author: your name
* @Date: 2022-01-14 11:42:25
* @LastEditTime: 2022-01-14 13:56:35
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /hs-app-project/src/config/request/apiList/plm/index.js
*/
import stylelibraryorder from './stylelibraryorder/index' import stylelibraryorder from './stylelibraryorder/index'
import modelingtask from './modelingtask' import modelingtask from './modelingtask'
import mobileBrand from './mobileBrand'
export default { export default {
...stylelibraryorder, ...stylelibraryorder,
...modelingtask ...modelingtask,
...mobileBrand
} }
/*
* @Author: your name
* @Date: 2022-01-14 13:55:11
* @LastEditTime: 2022-01-14 16:50:17
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /hs-app-project/src/config/request/apiList/plm/mobileBrand/index.js
*/
import config from "../config/index";
let className = 'mobileBrand'
let baseUrl = `${config.baseUrl}/${className}`
export default {
[className]:{
'dailyNewStylePage': {
url: `${baseUrl}/dailyNewStylePage`,
method: "post",
},
'stylePage': {
url: `${baseUrl}/stylePage`,
method: "post",
},
'styleDetail': {
url: `${baseUrl}/styleDetail`,
method: "get",
},
}
}
\ No newline at end of file
...@@ -10,6 +10,50 @@ export default { ...@@ -10,6 +10,50 @@ export default {
'details':{ 'details':{
url: `${baseUrl}/details`, url: `${baseUrl}/details`,
method: 'get' method: 'get'
},
// 潜在客户列表
'potentialCustomersPage':{
url: `${baseUrl}/potentialCustomersPage`,
method: 'post'
},
// 潜在客户详情 enterpriseId
'potentialCustomersDetails':{
url: `${baseUrl}/potentialCustomersDetails`,
method: 'get'
},
// 上架单列表
'listingList':{
url: `${baseUrl}/listingList`,
method: 'post'
},
// 上架单详情
'listingDetails':{
url: `${baseUrl}/listingList`,
method: 'get'
},
// 上架管理列表
'getToShelvesManagerList':{
url: `${baseUrl}/getToShelvesManagerList`,
method: 'get'
},
// 上架管理详情
'getStyleDetails':{
url: `${baseUrl}/getStyleDetails`,
method: 'get'
},
// 加入待上架
'addToShelves':{
url: `${baseUrl}/addToShelves`,
method: 'post'
},
// 一键上架
'oneClickListing':{
url: `${baseUrl}/oneClickListing`,
method: 'post'
},
'unlisted':{
url: `${baseUrl}/unlisted`,
method: 'post'
} }
} }
} }
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
//品牌商首页 //品牌商首页
{ {
"path": "pages/brands/brands", "path": "pages/home/tenantSelection",
"style": { "style": {
"navigationBarTitleText": "品牌商首页", "navigationBarTitleText": "租户选择",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom", "navigationStyle": "custom",
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
} }
}, },
{ {
"path": "pages/home/tenantSelection", "path": "pages/brands/brands",
"style": { "style": {
"navigationBarTitleText": "租户选择", "navigationBarTitleText": "品牌商首页",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom", "navigationStyle": "custom",
...@@ -43,6 +43,15 @@ ...@@ -43,6 +43,15 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/order/item",
"style": {
"navigationBarTitleText": "模拟登录",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{ {
"path": "pages/user/center/index", "path": "pages/user/center/index",
"style": { "style": {
...@@ -115,7 +124,6 @@ ...@@ -115,7 +124,6 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/user/register/stepSelectType", "path": "pages/user/register/stepSelectType",
"style": { "style": {
...@@ -162,7 +170,6 @@ ...@@ -162,7 +170,6 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/designCommissioned/listSelectToAdd", "path": "pages/designCommissioned/listSelectToAdd",
"style": { "style": {
...@@ -199,7 +206,6 @@ ...@@ -199,7 +206,6 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/user/register/stepSelectType", "path": "pages/user/register/stepSelectType",
"style": { "style": {
...@@ -246,7 +252,6 @@ ...@@ -246,7 +252,6 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/designCommissioned/listSelectToAdd", "path": "pages/designCommissioned/listSelectToAdd",
"style": { "style": {
...@@ -283,7 +288,6 @@ ...@@ -283,7 +288,6 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/designCommissioned/splitItem", "path": "pages/designCommissioned/splitItem",
"style": { "style": {
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
<u-navbar title="" :border-bottom="false" :background="background"> <u-navbar title="" :border-bottom="false" :background="background">
<template slot="right"> <template slot="right">
<!-- 插槽搜索按钮 --> <!-- 插槽搜索按钮 -->
<view @click="searchCli" class="u-m-r-24 search" <view @click="searchCli" class="u-m-r-24 search">
><image <image
class="hs-img" class="hs-img"
src="../../static/images/home/search@2x.png" src="../../static/images/home/search@2x.png"
mode="" mode=""
></image ></image>
></view> </view>
</template> </template>
</u-navbar> </u-navbar>
</view> </view>
...@@ -24,13 +24,20 @@ ...@@ -24,13 +24,20 @@
</view> </view>
<view slot="body"> <view slot="body">
<view class="imgList"> <view class="imgList">
<image
v-for="(item, index) in dailyNewStyleList"
:key="index"
:src="`${imgUrl}${item.originalImageCode}`"
mode=""
></image>
<!--
<image src="../../static/images/brank/mei1.jpg" mode=""></image> <image src="../../static/images/brank/mei1.jpg" mode=""></image>
<image src="../../static/images/brank/mei1.jpg" mode=""></image> <image src="../../static/images/brank/mei1.jpg" mode=""></image>
<image src="../../static/images/brank/mei1.jpg" mode=""></image> <image src="../../static/images/brank/mei1.jpg" mode=""></image>
<image src="../../static/images/brank/mei1.jpg" mode=""></image> <image src="../../static/images/brank/mei1.jpg" mode=""></image>
<image src="../../static/images/brank/mei1.jpg" mode=""></image> <image src="../../static/images/brank/mei1.jpg" mode=""></image>
<image src="../../static/images/brank/mei1.jpg" mode=""></image> <image src="../../static/images/brank/mei1.jpg" mode=""></image>
<image src="../../static/images/brank/mei1.jpg" mode=""></image> <image src="../../static/images/brank/mei1.jpg" mode=""></image> -->
</view> </view>
</view> </view>
</u-card> </u-card>
...@@ -43,10 +50,13 @@ ...@@ -43,10 +50,13 @@
</view> </view>
<view slot="body"> <view slot="body">
<view class="hotFlex"> <view class="hotFlex">
<hot-style
v-if="hotStylePage.records.length > 0"
:recordsList="hotStylePage.records"
></hot-style>
<!-- <hot-style></hot-style>
<hot-style></hot-style> <hot-style></hot-style>
<hot-style></hot-style> <hot-style></hot-style> -->
<hot-style></hot-style>
<hot-style></hot-style>
</view> </view>
</view> </view>
</u-card> </u-card>
...@@ -60,12 +70,25 @@ ...@@ -60,12 +70,25 @@
import headTitle from "./components/header"; //每日更新头部的东西 import headTitle from "./components/header"; //每日更新头部的东西
import hotStyle from "./components/hotStyle"; //热门款式 import hotStyle from "./components/hotStyle"; //热门款式
export default { export default {
components: { headTitle, hotStyle }, components: {
headTitle,
hotStyle,
},
data() { data() {
return { return {
background: { backgroundColor: "rgba(245,245,245,0)" }, fabricObj: "",
dailyNewStyleList: [],
hotStylePage: [],
imgUrl: this.$IMG_URL, // 上传地址
background: {
backgroundColor: "rgba(245,245,245,0)",
},
}; };
}, },
created() {
console.log("ces");
this.getList();
},
methods: { methods: {
// 搜索按钮 // 搜索按钮
searchCli() { searchCli() {
...@@ -73,6 +96,21 @@ export default { ...@@ -73,6 +96,21 @@ export default {
}, },
headTab() { headTab() {
this.$router.push("pages/brands/everyDay"); this.$router.push("pages/brands/everyDay");
// this.$router.push("pages/brands/detail");
},
getList() {
let param = {
current: 1,
size: 10,
styleTag: "",
};
this.$http("mobileBrand.stylePage", param).then((res) => {
let { code, data } = res;
if (code === 200) {
this.dailyNewStyleList = data.dailyNewStyleList;
this.hotStylePage = data.hotStylePage;
}
});
}, },
}, },
}; };
...@@ -95,12 +133,15 @@ export default { ...@@ -95,12 +133,15 @@ export default {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
} }
//每日更新 //每日更新
.everyUpdate { .everyUpdate {
width: 100%; width: 100%;
::v-deep .u-card__body { ::v-deep .u-card__body {
padding: 0rpx 0rpx 40rpx 36rpx !important; padding: 0rpx 0rpx 40rpx 36rpx !important;
} }
::v-deep .u-card__head { ::v-deep .u-card__head {
padding-bottom: 34rpx !important; padding-bottom: 34rpx !important;
} }
...@@ -108,6 +149,8 @@ export default { ...@@ -108,6 +149,8 @@ export default {
.imgList { .imgList {
overflow-x: auto; overflow-x: auto;
white-space: nowrap; white-space: nowrap;
display: flex;
image { image {
width: 240rpx; width: 240rpx;
height: 160rpx; height: 160rpx;
...@@ -116,15 +159,19 @@ export default { ...@@ -116,15 +159,19 @@ export default {
} }
} }
} }
//热门款式 //热门款式
.hotstyle { .hotstyle {
::v-deep .u-card__body { ::v-deep .u-card__body {
padding-top: 24rpx !important; padding-top: 24rpx !important;
} }
::v-deep .u-card__head { ::v-deep .u-card__head {
padding-bottom: 0rpx !important; padding-bottom: 0rpx !important;
} }
width: 100%; width: 100%;
.hotFlex { .hotFlex {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
src="@/static/images/brank/mei1.jpg" src="@/static/images/brank/mei1.jpg"
></image> ></image>
<view class="hotborder"> <view class="hotborder">
<view class="hotText1">男装-上装-青年-时尚休闲</view> <view class="hotText1">{{ item.styleTag }}</view>
<view class="hotText2"> <view class="hotText2">
<image class="iconhot" src="@/static/images/brank/mei1.jpg"></image> <image class="iconhot" src="@/static/images/brank/mei1.jpg"></image>
<text class="wen">我的文字是dsadasdasddsads</text> <text class="wen">我的文字是dsadasdasddsads</text>
...@@ -45,31 +45,48 @@ export default { ...@@ -45,31 +45,48 @@ export default {
this.$u.toast(`已取消收藏`); this.$u.toast(`已取消收藏`);
} }
}, },
// 跳转到详情 methods: {
tabdetail() { // 点击切换心心选项
this.$router.push("pages/brands/detail?id=2"); tabImage() {
this.ImageBool = !this.ImageBool;
},
// 跳转到详情
tabdetail(item) {
// console.log("KKK");
this.$router.push("/pages/brands/detail?id=" + item.id);
// this.$router.push("pages/brands/everyDay");
},
}, },
}, }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.whole {
display: flex;
flex-wrap: wrap;
}
.hots { .hots {
height: 578rpx; height: 578rpx;
width: 330rpx; width: 330rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
margin-right: 16rpx;
// flex: 1;
.indexhot { .indexhot {
display: block; display: block;
height: 434rpx; height: 434rpx;
width: 330rpx; width: 330rpx;
border-radius: 10rpx 10rpx 0 0; border-radius: 10rpx 10rpx 0 0;
} }
.hotborder { .hotborder {
height: 144rpx; height: 144rpx;
// width: 193rpx;
border: 2rpx solid #e3e1e0; border: 2rpx solid #e3e1e0;
// border-top: 0rpx !important; // border-top: 0rpx !important;
border-radius: 0 0 10rpx 10rpx; border-radius: 0 0 10rpx 10rpx;
} }
.hotText1 { .hotText1 {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFangSC, PingFangSC-Regular; font-family: PingFangSC, PingFangSC-Regular;
...@@ -77,27 +94,33 @@ export default { ...@@ -77,27 +94,33 @@ export default {
color: rgba(0, 0, 0, 0.8); color: rgba(0, 0, 0, 0.8);
margin: 24rpx 28rpx 0 20rpx; margin: 24rpx 28rpx 0 20rpx;
} }
.hotText2 { .hotText2 {
width: 100%; width: 100%;
// background-color: red; // background-color: red;
margin-top: 16rpx; margin-top: 16rpx;
display: flex; display: flex;
align-items: center; align-items: center;
// margin: 24rpx 0rpx 0 20rpx; // margin: 24rpx 0rpx 0 20rpx;
.iconhot { .iconhot {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
.wen { .wen {
width: 192rpx; width: 192rpx;
font-size: 24rpx; font-size: 24rpx;
margin-left: 10rpx; margin-left: 10rpx;
overflow: hidden; /*超出部分隐藏*/ overflow: hidden;
white-space: nowrap; /*禁止换行*/ /*超出部分隐藏*/
white-space: nowrap;
/*禁止换行*/
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.iconLove { .iconLove {
width: 36rpx; width: 36rpx;
height: 32rpx; height: 32rpx;
......
<template> <template>
<view class="home_con_content_order" @click="click"> <view class="home_con_content_order" @click="click">
<image <!-- <image
class="width_100 hs-height-160" class="width_100 hs-height-160"
src="@/static/images/home/1@2x.png" src="@/static/images/home/1@2x.png"
mode="" mode=""
></image> ></image> -->
<!-- <image class="width_100 hs-height-160" :src="`${imgUrl}${fileCode}`"> -->
<template v-for="item,index in colourApiList">
<image :key="index" v-if="item.isMain" class="width_100 hs-height-160" :src="`${imgUrl}${item.fileCode}`" />
</template>
<view class="order_tit"> <view class="order_tit">
<view class="u-flex justify-between u-font-32"> <view class="u-flex justify-between u-font-32">
<span class="color_DDA973 u-line-1" <span class="color_DDA973 u-line-1">{{ item.materialName }}
>{{ item.materialName }}加厚荷兰绒绒布布料</span <!-- 加厚荷兰绒绒布布料 -->
> </span>
</view> </view>
<view class="u-font-24 u-m-t-20 color_6F6F72"> <view class="u-font-24 u-m-t-20 color_6F6F72">
<span class="u-m-r-10">{{ item.materialCategory }}</span> <span class="u-m-r-10">{{ item.category }}</span>
| |
<span class="u-m-l-10 u-m-r-10">{{ item.materialDoorWidth }} cm</span> <span class="u-m-l-10 u-m-r-10">{{ item.clothWidth }} cm</span>
| |
<span class="u-m-l-10">{{ item.materialElement }}</span> <span class="u-m-l-10">{{ item.component }}</span>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
name: "hs-material-thumbnail", name: "hs-material-thumbnail",
props: { props: {
item: { item: {
type: Object, type: Object,
default: () => {}, default: () => {},
},
colourApiList: {
type: Array,
default: []
}
},
data() {
return {};
}, },
}, methods: {
data() { click() {
return {}; this.$emit("click");
}, },
methods: {
click() {
this.$emit("click");
}, },
}, };
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.home_con_content_order { .home_con_content_order {
position: relative; position: relative;
display: flex;
align-items: center;
justify-content: space-between;
height: 160rpx;
border-radius: 8rpx;
overflow: hidden;
width: 100%;
.order_tit {
position: absolute;
width: 75%;
right: 0;
flex-direction: column;
display: flex; display: flex;
justify-content: center; align-items: center;
padding: 20rpx; justify-content: space-between;
flex: 1; height: 160rpx;
height: 100%; border-radius: 8rpx;
background: rgba(17, 21, 30, 0.5); overflow: hidden;
width: 100%;
.order_tit {
position: absolute;
width: 75%;
right: 0;
flex-direction: column;
display: flex;
justify-content: center;
padding: 20rpx;
flex: 1;
height: 100%;
// background: rgba(17, 21, 30, 0.5);
}
} }
}
.width_30 {
width: 30%;
}
.color_DDA973 { .width_30 {
color: #dda973; width: 30%;
} }
.color_6F6F72 { .color_DDA973 {
color: #6f6f72; color: #dda973;
} }
.bd_dashed { .color_6F6F72 {
position: relative; color: #6f6f72;
} }
.bd_dashed:after { .bd_dashed {
border-width: 1px; position: relative;
} }
.bd_dashed:after {
border-width: 1px;
}
.bd_dashed-bottom:after, .bd_dashed-bottom:after,
.bd_dashed-left:after, .bd_dashed-left:after,
.bd_dashed-right:after, .bd_dashed-right:after,
.bd_dashed-top-bottom:after, .bd_dashed-top-bottom:after,
.bd_dashed-top:after, .bd_dashed-top:after,
.bd_dashed:after { .bd_dashed:after {
content: " "; content: " ";
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
pointer-events: none; pointer-events: none;
box-sizing: border-box; box-sizing: border-box;
transform-origin: 0 0; transform-origin: 0 0;
width: 199.8%; width: 199.8%;
height: 199.7%; height: 199.7%;
transform: scale(0.5, 0.5); transform: scale(0.5, 0.5);
border: 1px dashed #e4e7ed; border: 1px dashed #e4e7ed;
z-index: 2; z-index: 2;
} }
.ov_hiden { .ov_hiden {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
</style> </style>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
> >
</u-navbar> </u-navbar>
<view> <view>
<u-image height="750rpx" src="@/static/images/brank/deImg.png"></u-image> <u-image height="750rpx" :src="`${imgUrl}${tabledata.originalImageCode}`"></u-image>
</view> </view>
<view class="u-p-r-30 u-p-l-30"> <view class="u-p-r-30 u-p-l-30">
<!--款式信息 --> <!--款式信息 -->
...@@ -16,26 +16,26 @@ ...@@ -16,26 +16,26 @@
<view class="u-border-bottom u-line-88">款式信息</view> <view class="u-border-bottom u-line-88">款式信息</view>
<view class="fabric u-m-t-24"> <view class="fabric u-m-t-24">
<text class="textStyle1">产品款号</text> <text class="textStyle1">产品款号</text>
<text class="textStyle2">AS23124</text> <text class="textStyle2">{{tabledata.styleCode}}</text>
</view> </view>
<view class="fabric u-m-t-8"> <view class="fabric u-m-t-8">
<text class="textStyle1">面料供应商</text> <text class="textStyle1">面料供应商</text>
<text class="textStyle2">AS23124</text> <text class="textStyle2">{{tabledata.supplierName}}</text>
</view> </view>
</view> </view>
<!-- 面料信息 --> <!-- 面料信息 -->
<view class="bg-fff u-p-r-30 u-p-b-30 u-p-l-30 item"> <view class="bg-fff u-p-r-30 u-p-b-30 u-p-l-30 item">
<view class="u-border-bottom u-line-88">面料信息</view> <view class="u-border-bottom u-line-88">面料信息</view>
<view class="u-m-t-30 u-m-b-56"> <view class="u-m-t-30 u-m-b-56">
<material :item="item"></material> <material :item="item" :colourApiList="tabledata.colourApiList"></material>
</view> </view>
<!-- 其他颜色 --> <!-- 其他颜色 -->
<view class="u-flex"> <view class="u-flex">
<view class="overflow u-flex-1"> <view class="overflow u-flex-1">
<view>其他颜色</view> <view>其他颜色</view>
<view> <view>
<view class="image u-m-r-10"> <view class="image u-m-r-10" v-for="item,index in tabledata.colourApiList" :key="index">
<image src="" style="width: 100%; height: 100%"></image> <image v-if="item.isMain" :src="`${imgUrl}${item.fileCode}`" style="width: 100%; height: 100%"></image>
<view class="image-tip u-line-1">颜色</view> <view class="image-tip u-line-1">颜色</view>
</view> </view>
<view class="image u-m-r-10"> <view class="image u-m-r-10">
...@@ -43,12 +43,14 @@ ...@@ -43,12 +43,14 @@
src="@/static/images/brank/mei1.jpg" src="@/static/images/brank/mei1.jpg"
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
></image> ></image>
<!-- <view class="image u-m-r-10">
<image src="" style="width: 100%; height: 100%"></image>
<view class="image-tip u-line-1">颜色</view> <view class="image-tip u-line-1">颜色</view>
</view> </view>
<view class="image u-m-r-10"> <view class="image u-m-r-10">
<image src="" style="width: 100%; height: 100%"></image> <image src="" style="width: 100%; height: 100%"></image>
<view class="image-tip u-line-1">颜色</view> <view class="image-tip u-line-1">颜色</view>
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -63,15 +65,53 @@ ...@@ -63,15 +65,53 @@
</template> </template>
<script> <script>
import material from "./components/hs-material-thumbnail.vue"; import material from "./components/hs-material-thumbnail.vue";
export default { export default {
components: { material }, components: {
data() { material
return { },
item: {}, data() {
}; return {
}, tabledata:{},
}; item: {},
id: "",
imgUrl: this.$IMG_URL, // 上传地址
};
},
watch: {
id: {
handler() {
console.log("oid");
this.detail()
}
}
},
created() {
this.detail()
},
onLoad(options) {
this.id = options.id;
},
methods: {
detail() {
let param = {
id: this.id
}
this.$http('mobileBrand.styleDetail', param).then(res => {
let {
code,
data
} = res;
if (code === 200) {
this.tabledata=data
this.item=data.materialInfo
}
});
}
},
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
...@@ -113,53 +153,83 @@ $main-color: #fff; ...@@ -113,53 +153,83 @@ $main-color: #fff;
border-radius: 44rpx; border-radius: 44rpx;
color: white; color: white;
} }
}
.u-line-88 { .textStyle2 {
line-height: 88rpx; margin-left: 40rpx;
} font-size: 14px;
.bg-fff { font-family: PingFangSC, PingFangSC-Regular;
position: relative; font-weight: 500;
top: -10rpx; color: #333333;
background: #fff; }
}
.item { // 我要采购布样
width: 100%; .sampling {
margin-bottom: 28rpx; position: fixed;
bottom: 0;
width: 750rpx;
height: 100rpx;
background: #ffffff;
box-shadow: 0px -2px 3px 0px rgba(178, 182, 214, 0.1);
&--round { .u-btn {
border-radius: 16rpx; width: 630rpx;
border: 1px solid rgba(0, 0, 0, 0.1); height: 88rpx;
background: rgba(0, 0, 0, 0.8);
border-radius: 44rpx;
color: white;
}
} }
&-tag {
padding: 6rpx 2px; .u-line-88 {
background: $color; line-height: 88rpx;
text-align: center;
color: $h-color;
display: inline-block;
margin-right: 10rpx;
} }
}
.image { .bg-fff {
position: relative; position: relative;
width: 160rpx; top: -10rpx;
height: 160rpx; background: #fff;
display: inline-block; }
&-tip {
text-align: center; .item {
width: 100%; width: 100%;
height: 40rpx; margin-bottom: 28rpx;
line-height: 40rpx;
background: rgba(255, 255, 255, 0.8); &--round {
font-size: 24rpx; border-radius: 16rpx;
position: absolute; border: 1px solid rgba(0, 0, 0, 0.1);
bottom: 0; }
left: 0;
&-tag {
padding: 6rpx 2px;
background: $color;
text-align: center;
color: $h-color;
display: inline-block;
margin-right: 10rpx;
}
} }
}
.overflow { .image {
overflow-x: auto; position: relative;
white-space: nowrap; width: 160rpx;
} height: 160rpx;
</style> display: inline-block;
&-tip {
text-align: center;
width: 100%;
height: 40rpx;
line-height: 40rpx;
background: rgba(255, 255, 255, 0.8);
font-size: 24rpx;
position: absolute;
bottom: 0;
left: 0;
}
}
.overflow {
overflow-x: auto;
white-space: nowrap;
}
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2022-01-14 11:42:25
* @LastEditTime: 2022-01-14 15:24:14
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /hs-app-project/src/pages/brands/everyDay.vue
-->
<template> <template>
<!-- 每日上新 --> <!-- 每日上新 -->
<u-card full :head-border-bottom="false"> <u-card full :head-border-bottom="false">
<view slot="body"> <view slot="body">
<view class="hotFlex"> <view class="hotFlex">
<hot-style></hot-style> <hot-style v-if="recordsList.length>0" :recordsList="recordsList"></hot-style>
<hot-style></hot-style>
<hot-style></hot-style>
<hot-style></hot-style>
</view> </view>
</view> </view>
</u-card> </u-card>
...@@ -19,9 +24,33 @@ export default { ...@@ -19,9 +24,33 @@ export default {
hotStyle, hotStyle,
}, },
data() { data() {
return {}; return {
recordsList:[]
};
},
created(){
console.log("ces");
this.materialDetail()
},
methods: {
materialDetail() {
let param = {
"current": 1,
"size": 10,
"styleTag": ""
}
this.$http('mobileBrand.dailyNewStylePage', param).then(res => {
let {
code,
data
} = res;
if (code === 200) {
this.recordsList = data.records;
console.log(this.recordsList,"this.recordsList");
}
});
}
}, },
methods: {},
}; };
</script> </script>
......
...@@ -4,13 +4,7 @@ ...@@ -4,13 +4,7 @@
<view id="header" class="back_img"> <view id="header" class="back_img">
<u-navbar title="" :border-bottom="false" :background="background"> <u-navbar title="" :border-bottom="false" :background="background">
<template slot="right"> <template slot="right">
<view @click="searchCli" class="u-m-r-24 search" <view @click="searchCli" class="u-m-r-24 search"><image class="hs-img" src="../../static/images/home/search@2x.png" mode=""></image></view>
><image
class="hs-img"
src="../../static/images/home/search@2x.png"
mode=""
></image
></view>
</template> </template>
</u-navbar> </u-navbar>
</view> </view>
...@@ -22,43 +16,26 @@ ...@@ -22,43 +16,26 @@
</view> </view>
</view> </view>
<!-- 提示信息 --> <!-- 提示信息 -->
<view <view v-if="abolishIds.length > 0" class="u-m-t-20 tips background_d5aa7a u-font-28">
v-if="abolishIds.length > 0"
class="u-m-t-20 tips background_d5aa7a u-font-28"
>
<view> <view>
{{ abolishIds.length }}个委托单 {{ abolishIds.length }}个委托单
<span class="color_fff">等待确认寄样,请尽快确认!</span> <span class="color_fff">等待确认寄样,请尽快确认!</span>
</view> </view>
<view class="color_fff btn u-p-l-10 u-p-r-10" @click="sampleConfirm" <view class="color_fff btn u-p-l-10 u-p-r-10" @click="sampleConfirm">寄样确认</view>
>寄样确认</view
>
</view> </view>
<!-- 具体内容 我的面料 --> <!-- 具体内容 我的面料 -->
<view class="home_con u-m-t-20"> <view class="home_con u-m-t-20">
<view class="home_con_tit"> <view class="home_con_tit">
<view> <view>
<span class="u-font-32">我的面料</span> <span class="u-font-32">我的面料</span>
<span style="line-height: 0" class="u-m-l-10 color_000 u-font-24" <span style="line-height: 0;" class="u-m-l-10 color_000 u-font-24">MY FABRIC</span>
>MY FABRIC</span
>
</view> </view>
<view class="u-font-24 color_d5aa7a" @click="seeFabric">查看更多</view> <view class="u-font-24 color_d5aa7a" @click="seeFabric">查看更多</view>
</view> </view>
<view class="home_con_fabric"> <view class="home_con_fabric">
<view <view class="home_con_content u-m-t-24" @click="detailFabric(item)" v-for="item in fiabricList">
class="home_con_content u-m-t-24" <image class="hs-img" src="../../static/images/home/1@2x.png" mode=""></image>
@click="detailFabric(item)" <view class="home_con_content_font ov_hiden">{{ item.materialName }}</view>
v-for="item in fiabricList"
>
<image
class="hs-img"
src="../../static/images/home/1@2x.png"
mode=""
></image>
<view class="home_con_content_font ov_hiden">{{
item.materialName
}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -66,29 +43,34 @@ ...@@ -66,29 +43,34 @@
<view class="home_con u-m-t-20"> <view class="home_con u-m-t-20">
<view class="home_con_tit"> <view class="home_con_tit">
<view> <view>
<span class="u-font-32">我的订单</span> <span class="u-font-32">潜在客户</span>
<span class="u-m-l-10 color_000 u-font-24">MY FABRIC</span> <span class="u-m-l-10 color_000 u-font-24">MY ORDER</span>
</view> </view>
<view class="u-font-24 color_d5aa7a">查看更多</view> <!-- <view class="u-font-24 color_d5aa7a">查看更多</view>-->
</view> </view>
<view class="home_con_order"> <view class="home_con_order">
<view class="home_con_content_order u-m-t-24" v-for="item in 4"> <view class="u-p-t-20 u-p-b-20 ">
<image <u-search placeholder="请输入客户名称" v-model="keyWord"
style="width: 160rpx; height: 160rpx" border-color="#e1e1e1" height="76" @search="searchPotentialCustomers"
src="../../static/images/home/2.png" bg-color="#fff" :show-action="false"></u-search>
mode="" </view>
></image> <view class="item item--round" v-for="(item) in list"
<view class="order_tit"> @click="$Router.push({
<view class="u-font-32">加厚荷兰绒绒布布料备份</view> path: '/pages/order/item',
<view class="u-font-24 u-m-t-20"> query:{
<span>针织</span> id: item.enterpriseId
}
<span>180cm</span> })"
>
<span>100%面备份</span> <view class="u-font-32 u-m-b-8 u-line-1">{{ item.fullName }}</view>
</view> <view class="u-font-24">更新时间:{{ item.createTime }}</view>
</view>
</view> </view>
<!-- 加载更多 -->
<u-loadmore v-if="!isEmpty" height="80rpx" :status="loadStatus" icon-type="flower" color="#ccc" />
<!-- 缺省页 -->
<hs-empty v-if="isEmpty" tipText="没有数据"
marginTop="100rpx"
:image="emptyImage"></hs-empty>
</view> </view>
</view> </view>
...@@ -98,10 +80,11 @@ ...@@ -98,10 +80,11 @@
<script> <script>
import HsTabBar from "../../components/hs-tab-bar/hs-tab-bar"; import HsTabBar from "../../components/hs-tab-bar/hs-tab-bar";
export default { export default {
components: { HsTabBar }, components: {HsTabBar},
data() { data() {
return { return {
background: { backgroundColor: "rgba(245,245,245,0)" }, emptyImage :require("@/static/images/components/empty/empty.png"),
background: { backgroundColor: 'rgba(245,245,245,0)' },
quantityNum: 0, quantityNum: 0,
exceptionNum: 0, exceptionNum: 0,
abolishIds: [], abolishIds: [],
...@@ -109,20 +92,20 @@ export default { ...@@ -109,20 +92,20 @@ export default {
fiabricList: [], fiabricList: [],
buts: [ buts: [
{ {
name: "面料建模", name: '面料建模',
img: "../../static/images/home/fabricModeling@2x.png", img: '../../static/images/home/fabricModeling@2x.png',
url: "/pages/fabricModeling/modelingOrder", url: '/pages/fabricModeling/modelingOrder'
}, },
{ {
name: "搜款", name: '搜款',
img: "../../static/images/home/styleEntrustment@2x.png", img: '../../static/images/home/styleEntrustment@2x.png',
url: "/pages/material/list", url: '/pages/material/list'
}, },
{ {
name: "上架管理", name: '上架管理',
img: "../../static/images/home/styleManageme@2x.png", img: '../../static/images/home/styleManageme@2x.png',
url: "/pages/material/entrustManagement", url: '/pages/material/entrustManagement'
}, }
// TODO 旧版本 可能以后会用到 // TODO 旧版本 可能以后会用到
// { // {
// name: '面料建模', // name: '面料建模',
...@@ -145,26 +128,77 @@ export default { ...@@ -145,26 +128,77 @@ export default {
// url: '' // url: ''
// } // }
], ],
keyWord: '',
loadStatus: 'loadmore',
pageOptions:{
current: 1,
size: 10,
},
list: []
}; };
}, },
computed:{
isEmpty(){
return this.list.length === 0
}
},
onLoad() { onLoad() {
// this.toBeSelectedQuantity(); // this.toBeSelectedQuantity();
// this.orderTicketExceptionNum(); // this.orderTicketExceptionNum();
// this.noSampleOrder(); // this.noSampleOrder();
// this.materialList(); // this.materialList();
// 潜在客户
this.potentialCustomersPage();
}, },
onPageScroll(object) { onPageScroll(object) {
let height = 486 / 2; let height = 486 / 2;
if (object.scrollTop >= height) { if (object.scrollTop >= height) {
this.background.backgroundColor = "rgba(245,245,245,1)"; this.background.backgroundColor = 'rgba(245,245,245,1)';
} else { } else {
this.background.backgroundColor = "rgba(245,245,245,0)"; this.background.backgroundColor = 'rgba(245,245,245,0)';
} }
}, },
methods: { methods: {
searchPotentialCustomers(){
this.pageOptions = {
current: 1,
size: 10,
};
this.potentialCustomersPage();
},
// 潜在客户
potentialCustomersPage(){
this.loadStatus = 'loading';
this.$http("stylelibraryorder.potentialCustomersPage",{
...this.pageOptions,
customerName: this.keyWord,
status: 0
})
.then(res => {
let { code, data } = res;
if (code === 200) {
if(Object.keys(data).length > 0){
this.list = data.records;
this.pageOptions.pages = data.total;
this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore';
}else{
this.list = []
this.loadStatus = 'nomore';
}
}
})
},
// 触底加载更多
onReachBottom() {
if (this.pageOptions.current < this.pageOptions.pages) {
this.pageOptions.current += 1;
this.potentialCustomersPage();
}
},
// 选款总数 // 选款总数
toBeSelectedQuantity() { toBeSelectedQuantity() {
this.$http("orderTicket.toBeSelectedQuantity", {}).then((res) => { this.$http('orderTicket.toBeSelectedQuantity', {}).then(res => {
let { code, data } = res; let { code, data } = res;
if (code == 200) { if (code == 200) {
this.quantityNum = data; this.quantityNum = data;
...@@ -173,7 +207,7 @@ export default { ...@@ -173,7 +207,7 @@ export default {
}, },
// 异常总数 // 异常总数
orderTicketExceptionNum() { orderTicketExceptionNum() {
this.$http("orderTicket.orderTicketExceptionNum", {}).then((res) => { this.$http('orderTicket.orderTicketExceptionNum', {}).then(res => {
let { code, data } = res; let { code, data } = res;
if (code == 200) { if (code == 200) {
this.exceptionNum = data; this.exceptionNum = data;
...@@ -182,7 +216,7 @@ export default { ...@@ -182,7 +216,7 @@ export default {
}, },
// 寄样单总数 // 寄样单总数
noSampleOrder() { noSampleOrder() {
this.$http("orderTicket.noSampleOrder", {}).then((res) => { this.$http('orderTicket.noSampleOrder', {}).then(res => {
let { code, data } = res; let { code, data } = res;
if (code == 200) { if (code == 200) {
this.abolishIds = data; this.abolishIds = data;
...@@ -191,11 +225,11 @@ export default { ...@@ -191,11 +225,11 @@ export default {
}, },
// 我的面料 // 我的面料
materialList() { materialList() {
this.$http("orderTicket.materialList", { this.$http('orderTicket.materialList', {
size: 4, size: 4,
materialCode: "", materialCode: '',
materialName: "", materialName: ''
}).then((res) => { }).then(res => {
let { code, data } = res; let { code, data } = res;
if (code == 200) { if (code == 200) {
this.fiabricList = data.data; this.fiabricList = data.data;
...@@ -204,33 +238,41 @@ export default { ...@@ -204,33 +238,41 @@ export default {
}, },
searchCli() { searchCli() {
// 搜索面料===1 搜索建模===2 // 搜索面料===1 搜索建模===2
this.$Router.push("/pages/home/search"); this.$Router.push('/pages/home/search');
}, },
seeFabric() { seeFabric() {
this.$Router.push("/pages/home/fabricList"); this.$Router.push('/pages/home/fabricList');
}, },
detailFabric(data) { detailFabric(data) {
this.$Router.push("/pages/home/fabricDetails?id=" + data.id); this.$Router.push('/pages/home/fabricDetails?id=' + data.id);
}, },
sampleConfirm() { sampleConfirm() {
this.$Router.push( this.$Router.push('/pages/home/sampleConfirmation?abolishIds=' + this.abolishIds);
"/pages/home/sampleConfirmation?abolishIds=" + this.abolishIds
);
}, },
goCli(url) { goCli(url) {
if (url) { if (url) {
this.$Router.push(url); this.$Router.push(url);
} else { }else{
uni.showToast({ uni.showToast({
title: "该功能正在开发中...", title:'该功能正在开发中...',
icon: "none", icon: 'none'
}); })
} }
}, }
}, }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.item--round{ border-radius: 8rpx;}
.item{
padding: 36rpx 30px;
height: 160rpx;
background: url(../../static/images/home/exhibition.png) no-repeat;
background-size: 100% 100%;
margin-bottom: 20rpx;
color: #fff;
}
.back_img { .back_img {
height: 486rpx; height: 486rpx;
width: 100%; width: 100%;
......
...@@ -10,13 +10,25 @@ ...@@ -10,13 +10,25 @@
</view> </view>
<view class="body " :style="{ bottom: footerHeight + 'px', top: headerHeight+ 'px'}"> <view class="body " :style="{ bottom: footerHeight + 'px', top: headerHeight+ 'px'}">
<view class="u-relative"> <view class="u-relative">
<u-image height="750rpx"></u-image> <!-- <u-image height="750rpx" :src="`${$IMG_URL}${detail.originalImageCode}`"></u-image>-->
<view >
<!-- <image :src="`${$IMG_URL}${detail.originalImageCode}`" mode="heightFix" class="height-750rpx"></image>-->
<image :style="{
'--src': `url(${$IMG_URL}${detail.originalImageCode})`,
'--transform': `rotate(${angle}deg)`
}"
src="./img.png" mode="heightFix" class="height-750rpx view"></image>
</view>
<view v-if="!isEdit"> <view v-if="!isEdit">
<view class="u-absolute prev">上一款</view> <view class="u-absolute prev"
<view class="u-absolute next">下一款</view> @click="routerPush(true)"
v-if="!isFirst">上一款</view>
<view class="u-absolute next"
@click="routerPush(false)"
v-if="!isLast">下一款</view>
</view> </view>
<view v-if="isEdit" <view :class="[ !isEdit ? 'hide':'active']"
class="u-absolute step u-p-r-30 u-p-l-30"> class="u-absolute step u-p-r-30 u-p-l-30">
<view class="step-main u-p-r-20 u-p-l-20 u-flex"> <view class="step-main u-p-r-20 u-p-l-20 u-flex">
<text class="width_100">{{angle}}°</text> <text class="width_100">{{angle}}°</text>
<view class="u-relative u-flex-1"> <view class="u-relative u-flex-1">
...@@ -31,47 +43,71 @@ ...@@ -31,47 +43,71 @@
@touchmove="touchMove" @touchmove="touchMove"
@touchend="touchEnd" @touchend="touchEnd"
@touchstart="touchStart" @touchstart="touchStart"
/> />
</view> </view>
</view> </view>
<text class="u-m-l-24">重置</text> <text class="u-m-l-24" @click="resetStep">重置</text>
</view> </view>
</view> </view>
</view> </view>
<view class=""> <view class="">
<!--可调整部位-->
<view class="u-m-b-20 bg-fff u-p-r-30 u-p-l-30"> <view class="u-m-b-20 bg-fff u-p-r-30 u-p-l-30">
<view class="title u-flex u-p-t-26 u-p-b-18"> <view class="title u-flex u-p-t-26 u-p-b-18">
<view class="title-tip u-m-r-10"></view> <view class="title-tip u-m-r-10"></view>
可调整部位 可调整部位
</view> </view>
<view class="overflow u-m-b-24"> <view class="overflow u-p-b-24">
<view class="button inline-block active">主身</view> <view class="button inline-block"
<view class="button inline-block">主身</view> :class="[
</view> activePartIndex === index ? 'active':'',
<view class="u-p-b-20"> filterPartActive(part) ? 'changed' : '',
<u-search placeholder="请输入面料名称" v-model="keyword" ]"
border-color="#e1e1e1" height="76" @click="partClick(index)"
bg-color="#fff" :show-action="false"></u-search> v-for="(part,index) in parts">
{{
part.isMainBodyPart === 1 ? '主身' : `部位${index}`
}}
</view>
</view> </view>
<view class="overflow u-p-b-30 u-border-bottom"> <view v-if="isEdit">
<view class="image u-m-r-10 active"> <view class="u-p-b-20" >
<image src="" style="width: 100%;height: 100%"></image> <u-search placeholder="请输入面料名称" v-model="keyword"
<view class="image-tip u-line-1">颜色</view> border-color="#e1e1e1" height="76"
bg-color="#fff" :show-action="false"></u-search>
</view>
<view class="overflow u-p-b-30 u-border-bottom">
<view class="image u-m-r-10 "
@click="triggerSelectedMaterial(color)"
:class="[selectedMaterial.id === color.id ? 'active':'']"
v-for="color in MaterialList">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">{{ color.materialName }}</view>
</view>
</view> </view>
<view class="image u-m-r-10"> <view class="overflow"
<image src="" style="width: 100%;height: 100%"></image> v-if="selectedMaterialItemColors.length > 0">
<view class="image-tip u-line-1">颜色</view> <u-image :src="`${$IMG_URL}${item.color}`"
width="80rpx" height="80rpx"
:class="[activeColor.id === item.id ? 'active':'']"
shape="circle"
@click="setActiveColor(item)"
:key="item.id"
v-for="(item) in selectedMaterialItemColors"
class="u-m-r-20 inline-block color-item"
></u-image>
</view> </view>
<view class="image u-m-r-10"> <view class="u-p-t-30 u-p-b-20 text-right">
<image src="" style="width: 100%;height: 100%"></image> <view class="button inline-block button-plain button-plain-default"
<view class="image-tip u-line-1">颜色</view> @click="cancelMaterialItem"
>取消</view>
<view
@click="setMaterialItem"
class="button inline-block button-default">确定</view>
</view> </view>
</view> </view>
<view class="u-p-t-30 u-p-b-20 text-right">
<view class="button inline-block button-plain button-plain-default">取消</view>
<view class="button inline-block button-default">确定</view>
</view>
</view> </view>
<!--颜色选择-->
<view class="bg-fff u-p-r-30 u-p-l-30"> <view class="bg-fff u-p-r-30 u-p-l-30">
<view class="title u-flex u-p-t-26 u-p-b-18"> <view class="title u-flex u-p-t-26 u-p-b-18">
<view class="title-tip u-m-r-10"></view> <view class="title-tip u-m-r-10"></view>
...@@ -80,29 +116,23 @@ ...@@ -80,29 +116,23 @@
<view class="u-border-bottom u-p-b-32"> <view class="u-border-bottom u-p-b-32">
<view class="">主图颜色</view> <view class="">主图颜色</view>
<view> <view>
<view class="image u-m-r-10"> <view v-if="isEditMode">
<image src="" style="width: 100%;height: 100%"></image> <view class="image u-m-r-10"
<view class="image-tip u-line-1">颜色</view> :class="[
activeMainPartBodyColorId === color.mdmMaterialColourId ? 'active' : ''
]"
@click="colorSelect(color,selectColorList)"
v-for="color in selectColorList">
<image :src="`${$IMG_URL}${color.fileCode}`" style="width: 100%;height: 100%" mode="aspectFit"></image>
<view class="image-tip u-line-1">{{ color.colour }}</view>
</view>
</view> </view>
<view class="image u-m-r-10"> <view v-if="!isEditMode">
<image src="" style="width: 100%;height: 100%"></image> <view class="image u-m-r-10"
<view class="image-tip u-line-1">颜色</view> v-for="color in mainPartBodyColor">
</view> <image :src="`${$IMG_URL}${color.fileCode}`" style="width: 100%;height: 100%" mode="aspectFit"></image>
<view class="image u-m-r-10"> <view class="image-tip u-line-1">{{ color.colourApi.describes}}</view>
<image src="" style="width: 100%;height: 100%"></image> </view>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -112,114 +142,516 @@ ...@@ -112,114 +142,516 @@
<text>(可多选)</text> <text>(可多选)</text>
</view> </view>
<view> <view>
<view class="image u-m-r-10"> <view v-if="isEditMode">
<image src="" style="width: 100%;height: 100%"></image> <view class="image u-m-r-10"
<view class="image-tip u-line-1">颜色</view> :class="[
mainPartOtherColor.map((item) => item.mdmMaterialColourId).indexOf(color.mdmMaterialColourId) > -1 ? 'active' : ''
]"
@click="colorSelects(color,selectColorList)"
v-for="color in selectColorList">
<image :src="`${$IMG_URL}${color.fileCode}`" style="width: 100%;height: 100%" mode="aspectFit"></image>
<view class="image-tip u-line-1">{{ color.colour}}</view>
</view>
</view>
<view v-if="!isEditMode">
<view class="image u-m-r-10"
v-for="color in mainPartOtherColor">
<image :src="`${$IMG_URL}${color.fileCode}`" style="width: 100%;height: 100%" mode="aspectFit"></image>
<view class="image-tip u-line-1">{{ color.colourApi.describes}}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view id="footer" class="footer"> <view id="footer" class="footer">
<view class="footer-btn"> <view class="footer-btn">
<view class="button button-default button-plain button-plain--default"> <view class="button button-default button-plain button-plain--default"
@click="submit"
v-if="isEditMode">
加入待上架 加入待上架
</view> </view>
<view class="button button-plain button-plain--default"
v-if="!isEditMode" @click="cancel">
取消上架
</view>
</view> </view>
</view> </view>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
// 点击部位获取对应内容
// 选择颜色 设置选中主色
//
import dom from "@/mixins/dom"; import dom from "@/mixins/dom";
import step from "./mixins/step";
import material from "./mixins/material";
export default { export default {
name: "createMaterial", name: "createMaterial",
mixins:[dom], mixins:[dom,step,material],
data(){ data(){
return { return {
title: '111',
keyword: '', keyword: '',
offset :{
x: 0
},
startTime: 0,
lineStepWidth: 0,
lineWidth: 0,
lineOffset: 0,
isEdit: false, isEdit: false,
detail: {},
colors: [],
list: [],
// 选中物料
selectedMaterial: {},
// 选中主色
mainColor: {},
// 选中其他颜色
subColor: [],
selectedMaterialItem: [],
selectedMaterialItemColor: {},
activeColor: {},
styleLibraryMaterialDTOList: [],
// 过滤数据
filteredMaterialColorList: [],
// activePart: {},
materialId: '',
activePartIndex: -1,
submitData: []
} }
}, },
computed:{ computed:{
angle(){
let { lineOffset,offset,lineWidth} = this; // 部位
let left = (offset.x - lineOffset.left) / lineWidth * 100; parts(){
return Math.ceil((left-50) / 50 * 180); return (this.detail.styleLibraryPictureVOList || []).sort((a,b) =>{
return a.isMainBodyPart - b.isMainBodyPart < -1
})
},
selectedMaterialItemColors(){
let key = (this.selectedMaterialItem.materialColourVOList || []).map((item) => item.colourId);
return this.colors.filter((item) => key.indexOf(item.id) > -1)
.map(item => {
return {
...item,
mdmMaterialColourId: item.id,
materialId: this.selectedMaterialItem.id
}
})
},
index(){
return this.list.findIndex(item => item.id === this.detail.id);
},
isLast(){
return this.index === this.list.length - 1
},
isFirst(){
return this.index === 0
},
isEditMode(){
return this.detail.putawayStatus === 1
},
// 默认的物料颜色可选
defaultColorList(){
let key = (this.materialDetail.materialColourVOList || []).map((item) => item.colourId);
return this.colors.filter((item) => key.indexOf(item.id) > -1)
.map((item) =>{
return {
...item,
materialId: this.materialId
}
})
},
// 可选颜色过滤
selectColorList(){
// 如果部位是主体 且 存在信息则回填老的数据
if(this.mainPart.length !== 0){
return this.mainPart[0].materialColoursList.map((item) => {
return {
...item,
colour: item.colourName || item.colour,
mdmMaterialColourId: item.colourId || item.mdmMaterialColourId
}
})
}else{
return this.defaultColorList.map((item) => {
return {
...item,
mdmMaterialColourId: item.id
}
})
}
},
//
mainPart(){
return this.submitData.filter((item) => item.isMainBodyPart === 1 && !item.isDeleted)
},
// 主图颜色 选中的颜色
mainPartBodyColor(){
return this.mainPart.filter((item) => item.type === 1);
},
// 主图颜色 其他选中的颜色
mainPartOtherColor(){
return this.mainPart.filter((item) => item.type !== 1);
},
// 主图颜色 其他选中的颜色
activeMainPartBodyColorId(){
return this.mainPartBodyColor[0]?.mdmMaterialColourId
} }
}, },
mounted() {
this.uGetRect("#line").then(res => {
this.lineWidth = res.width;
this.lineOffset = {
left: res.left,
right: res.right,
};
this.offset.x = res.width /2 + res.left
})
this.uGetRect("#line-step").then(res => {
this.lineStepWidth = res.width;
})
},
created() { created() {
let {id,materialId} = this.$Route.query; let {id,materialId} = this.$Route.query;
this.materialId = materialId;
this.getItem(id); this.getItem(id);
this.getList();
this.getColors();
this.getMaterialItem(materialId); this.getMaterialItem(materialId);
this.getMaterialList();
}, },
methods:{ methods:{
getItem(id){ filterPartActive(part){
this.$http("stylelibraryorder.details", id) let data = this.submitData.filter((item) =>
.then(res =>{ !item.isDeleted &&
part.id === item.styleLibraryPictureId
);
return data.length > 0;
},
ontherPartTrigger(color,colors){
let $data = this.submitData;
let activePart = this.parts[this.activePartIndex];
let index = $data.findIndex((item) =>
item.styleLibraryPictureId === activePart.id
);
if(index > -1){
let item = $data[index];
if(item.id){
this.$set($data,index,{
...item,
isDeleted: !$data[index]['isDeleted']
})
}else{
$data.splice(index,1);
}
}
$data.push({
materialColoursList: colors,
isMainBodyPart: 0,type: 0, isDeleted: false,
mdmMaterialId: color.materialId,
mdmMaterialColourId: color.mdmMaterialColourId,
styleLibraryPictureId: activePart.id,
styleLibrayId: activePart.styleLibrayId,
})
// if()
// $data.push({
// materialColoursList: colors,
// isMainBodyPart: 0,type: 2, isDeleted: false,
// mdmMaterialId: color.materialId,
// mdmMaterialColourId: color.mdmMaterialColourId,
// styleLibraryPictureId: activePart.id,
// styleLibrayId: activePart.styleLibrayId,
// })
},
//
setMaterialItem(){
if(this.activePartIndex === 0){
this.materialDetail = this.selectedMaterialItem;
this.colorSelect(this.activeColor,this.selectedMaterialItemColors);
}else{
this.ontherPartTrigger(this.activeColor,this.selectedMaterialItemColors);
}
this.activeColor = {}
this.isEdit = false;
},
cancelMaterialItem(){
this.isEdit = false;
},
setActiveColor(color){
this.activeColor = {
...color,
materialId: this.selectedMaterialItem.id,
mdmMaterialColourId: color.id
};
},
pageReload(){
this.$Router.replace({
path: 'pages/material/createMaterial',
query: this.$Route.query
})
},
// 加入待上架
submit(){
let data = {
styleLibraryMaterialDTOList: this.submitData,
styleOrderId: this.detail.styleOrderId,
styleLibraryId: this.detail.id,
}
this.$http("stylelibraryorder.addToShelves",data)
.then(res =>{
let {
code, msg
} = res;
if(code === 200){
this.pageReload();
}else{
this.$refs.uToast.show({
title: msg
})
}
})
},
// 取消上架
cancel(){
this.$http("stylelibraryorder.unlisted", { id: this.detail.styleOrderId})
.then(res => {
let {
code,msg
} = res;
if(code === 200){
this.pageReload();
}else{
this.$refs.uToast.show({
title: msg
})
}
})
},
// 主体颜色选择
// 判断是否已有主体选择
// 清除其他可选
colorSelect(color,colors){
let $data = this.submitData;
let index = $data.findIndex((item) =>
item.mdmMaterialColourId === color.mdmMaterialColourId &&
item.type === 1 &&
item.isMainBodyPart === 1
);
if(this.activeMainPartBodyColorId){
let index = $data.findIndex((item) =>
item.mdmMaterialColourId === this.activeMainPartBodyColorId &&
item.type === 1 &&
item.isMainBodyPart === 1
);
let item = $data[index];
if(item.id){
this.$set($data,index,{
...$data[index],
isDeleted: !$data[index]['isDeleted']
})
}else{
$data.splice(index,1)
}
}
// 清除数据
if(index > -1){
let item = $data[index];
if(item.id){
this.$set($data,index,{
...$data[index],
isDeleted: !$data[index]['isDeleted']
})
}else{
$data.splice(index,1)
}
}else{
$data.push({
materialColoursList: colors,
isMainBodyPart: 1,type: 1, isDeleted: false,
mdmMaterialId: color.materialId,
mdmMaterialColourId: color.mdmMaterialColourId,
styleLibraryPictureId: this.parts[0].id,
styleLibrayId: this.parts[0].styleLibrayId,
})
}
this.clearColor(color)
},
clearColor(color){
let $data = this.submitData;
let index = $data.findIndex((item) =>
item.mdmMaterialColourId === color.mdmMaterialColourId &&
item.type === 2 &&
item.isMainBodyPart === 1
);
if(index > -1){
let item = $data[index];
if(item.id){
this.$set($data,index,{
...item,
isDeleted: !$data[index]['isDeleted']
})
}else{
$data.splice(index,1);
}
}
},
colorSelects(color,colors){
if(color.mdmMaterialColourId === this.activeMainPartBodyColorId) return;
let $data = this.submitData;
let index = $data.findIndex((item) =>
item.mdmMaterialColourId === color.mdmMaterialColourId &&
item.type === 0
);
// 清除数据
if(index > -1){
let item = $data[index];
if(item.id){
this.$set($data,index,{
...$data[index],
isDeleted: true
})
}else{
$data.splice(index,1)
}
}else{
$data.push({
materialColoursList: colors,
isMainBodyPart: 1,type: 0, isDeleted: false,
mdmMaterialId: color.materialId,
mdmMaterialColourId: color.mdmMaterialColourId,
styleLibraryPictureId: this.parts[0].id,
styleLibrayId: this.parts[0].styleLibrayId
}) })
}
},
triggerSelectedMaterial(item){
this.selectedMaterial = item;
this.getMaterialItem(item.id,(data) =>{
this.selectedMaterialItem = data;
})
},
// 上一款 下一款
routerPush(isNext){
this.$Router.push({
path: '/pages/material/createMaterial',
query:{
materialId: this.materialId,
id: this.list[isNext ? this.index + 1 : this.index -1].id
}
})
}, },
getMaterialItem(id){ // 款式列表
this.$http("materialinfo.getMaterialById", id) getList(materialTagIdList = []){
this.loadStatus = 'loading';
this.$http('stylelibraryorder.page', {
styleTag: this.keyword,
status: 0,
materialTagIdList,
size: 999,
current: 1,
}).then(res => {
let { code, data } = res;
if (code === 200) {
if(Object.keys(data).length > 0){
this.list = data.records;
}else{
this.list = []
}
}
});
},
getItem(id){
this.$http("stylelibraryorder.details", id)
.then(res =>{ .then(res =>{
let {
code, data
} = res;
if(code === 200){
// 过滤出数据
this.detail = data;
let parts = (data.styleLibraryPictureVOList || [])
.sort((a,b) =>{
return a.isMainBodyPart - b.isMainBodyPart < -1
});
let selectedList = parts.reduce((res,item) =>{
let selectItem = item['styleLibraryMaterialVOList'].map(($i) => {
return {
...$i,
isMainBodyPart: item.isMainBodyPart,
materialColoursList: item.materialInfo.materialColoursList
}
});
return res.concat(selectItem)
},[])
this.submitData = selectedList;
// console.log(selectedList)
}
}) })
}, },
touchMove(e){ // 获取颜色
let left = e.changedTouches[0].pageX; getColors(){
if( this.$http("colour.selectColour", {color: ''})
left >= this.lineOffset.left && .then(res =>{
left <= this.lineOffset.right let {
){ code, data
this.offset.x = left } = res;
} if(code === 200){
this.colors = data;
}
})
}, },
touchEnd(e){ // 可调整部位点击时间
let left = e.changedTouches[0].pageX; partClick(index){
// console.log(left) if(!this.isEditMode) return;
// console.log(this.lineOffset.right) if(this.activePartIndex !== index){
if( this.activeColor = {};
left >= this.lineOffset.left && this.selectedMaterial = {}
left <= this.lineOffset.right
){
this.offset.x = left
} }
this.activePartIndex = index;
this.isEdit = true;
}, },
touchStart(e){
this.offset.x = e.changedTouches[0].pageX;
}
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.color-item{
&.active{
border:1px solid #DDA973;
}
}
.height-750rpx{
height: 750rpx;
}
.view{
position: relative;
&:after{
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: var(--src);
transform: var(--transform);
background-repeat: no-repeat;
background-position: center;
background-size: contain;
top: 0;
left: 0;
z-index: -1;
}
}
.bg-fff{ background: #fff} .bg-fff{ background: #fff}
.width_100{ width: 100rpx} .width_100{ width: 100rpx}
.inline-block{ .inline-block{
...@@ -231,6 +663,12 @@ export default { ...@@ -231,6 +663,12 @@ export default {
bottom: 16rpx; bottom: 16rpx;
left: 0; left: 0;
color: #fff; color: #fff;
&.active{
opacity: 100%;
}
&.hide{
opacity: 0%;
}
&-main{ &-main{
background: rgba(0,0,0,0.20); background: rgba(0,0,0,0.20);
} }
...@@ -256,7 +694,7 @@ export default { ...@@ -256,7 +694,7 @@ export default {
top: 50%; top: 50%;
margin-top: -20rpx; margin-top: -20rpx;
background: #fff; background: #fff;
margin-left: -20rpx; //margin-left: -20rpx;
} }
} }
...@@ -327,6 +765,9 @@ export default { ...@@ -327,6 +765,9 @@ export default {
color: #AF8D66; color: #AF8D66;
border: 1px solid #DDA973; border: 1px solid #DDA973;
} }
&.changed{
color: #AF8D66;
}
} }
.body{ .body{
position: absolute; position: absolute;
......
...@@ -8,47 +8,50 @@ ...@@ -8,47 +8,50 @@
</u-navbar> </u-navbar>
<view class="body" :style="{ bottom: footerHeight + 'px', top: headerHeight+ 'px'}"> <view class="body" :style="{ bottom: footerHeight + 'px', top: headerHeight+ 'px'}">
<view class="tip u-m-b-20">剩余59分1秒自动取消上架单</view> <view class="tip u-m-b-20" v-if="detail.status === 1">剩余59分1秒自动取消上架单</view>
<view class="u-p-r-30 u-p-l-30"> <view class="u-p-r-30 u-p-l-30">
<view class="bg-fff u-p-r-30 u-p-b-30 u-p-l-30 u-m-b-20"> <view class="bg-fff u-p-r-30 u-p-b-30 u-p-l-30 u-m-b-20">
<view class="u-border-bottom u-l-height-44 u-flex"> <view class="u-border-bottom u-l-height-44 u-flex">
<text class="u-flex-1">款式明细</text> <text class="u-flex-1">款式明细</text>
<text>总共50</text> <text>总共{{detail.quantity}}</text>
</view> </view>
<view class="u-p-t-20 u-p-b-20"> <!-- <view class="u-p-t-20 u-p-b-20">-->
加厚荷兰绒绒布布料(3) <!-- {{ detail.styleOrderCode }}-->
</view> <!-- </view>-->
<view class="item u-flex"> <view class="item u-flex" v-for="(item) in list" :key="item.id">
<view class="item-img"></view> <view class="item-img">
<image :src="`${$IMG_URL}${item.originalImageCode}`" mode="widthFix"></image>
</view>
<view class="u-flex-1 u-p-l-20"> <view class="u-flex-1 u-p-l-20">
<view class="item-title u-line-1 u-font-28">男装-上装-青年-时尚休闲</view> <view class="item-title u-line-1 u-font-28">{{item.styleTag}}</view>
<view class="u-flex u-m-t-6 u-m-b-6"> <view class="u-flex u-m-t-6 u-m-b-6">
<view class="u-m-r-40 label u-font-24">款号</view> <view class="u-m-r-40 label u-font-24">款号</view>
<view class="u-line-1 u-flex-1 content u-font-24"> <view class="u-line-1 u-flex-1 content u-font-24">
11 {{ item.styleCode }}
</view> </view>
</view> </view>
<view class="u-flex u-m-t-6 u-m-b-6"> <view class="u-flex u-m-t-6 u-m-b-6">
<view class="u-m-r-40 label u-font-24">所选面料</view> <view class="u-m-r-40 label u-font-24">所选面料</view>
<view class="u-line-1 u-flex-1 content u-font-24"> <view class="u-line-1 u-flex-1 content u-font-24">
11 {{ item.materialName }}
</view> </view>
</view> </view>
<view class="item-tags"> <view class="item-tags">
<view class="item-tag u-font-20"> <view class="item-tag u-font-20"
标签 :key="tag.id"
</view> v-for="tag in item.styleLibraryTagVOList">
<view class="item-tag u-font-20"> {{tag.materialTagName}}
标签
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="u-p-b-20 u-border-bottom text-center" @click="toggle"> <view class="u-p-b-20 u-border-bottom text-center"
<text>展开<u-icon name="arrow-down" size="22" color="#000"></u-icon></text> v-if="detail.styleLibraryTaskItemVOList.length > 3"
@click="toggle">
<text>{{end? '展开': '收起'}}<u-icon :name="end ? 'arrow-down': 'arrow-up'" size="22" color="#000"></u-icon></text>
</view> </view>
<view class="price text-right u-m-t-30 u-p-r-30"> <view class="price text-right u-m-t-30 u-p-r-30">
总金额 <text class="price-num u-m-l-40">2000</text> 总金额 <text class="price-num u-m-l-40">{{ detail.price }}</text>
</view> </view>
</view> </view>
<!--订单信息--> <!--订单信息-->
...@@ -57,26 +60,26 @@ ...@@ -57,26 +60,26 @@
<view class="u-flex u-m-t-18 u-m-b-8"> <view class="u-flex u-m-t-18 u-m-b-8">
<view class="u-m-r-40 label">订单编号</view> <view class="u-m-r-40 label">订单编号</view>
<view class="u-line-1 u-flex-1 content"> <view class="u-line-1 u-flex-1 content">
11 <!-- {{ item.createTime}}-->
</view> </view>
</view> </view>
<view class="u-flex u-m-t-18 u-m-b-8"> <view class="u-flex u-m-t-18 u-m-b-8">
<view class="u-m-r-40 label">创建时间</view> <view class="u-m-r-40 label">创建时间</view>
<view class="u-line-1 u-flex-1 content" > <view class="u-line-1 u-flex-1 content" >
111 {{ detail.createTime}}
</view>付款时间 </view>
</view> </view>
<view class="u-flex u-m-t-18 u-m-b-8"> <view class="u-flex u-m-t-18 u-m-b-8">
<view class="u-m-r-40 label">付款时间</view> <view class="u-m-r-40 label">付款时间</view>
<view class="u-line-1 u-flex-1 content"> <view class="u-line-1 u-flex-1 content">
11 {{ detail.createTime}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="footer" id="footer"> <view class="footer" id="footer" v-if="detail.status === 1">
<view class="footer-btn"> <view class="footer-btn">
<view class="button button-default"> <view class="button button-default">
立刻付款 立刻付款
...@@ -95,12 +98,38 @@ export default { ...@@ -95,12 +98,38 @@ export default {
return { return {
title: '待付款', title: '待付款',
detail:{ detail:{
styleLibraryTaskItemVOList:[]
} },
end: true
}
},
computed:{
list(){
let data = this.detail.styleLibraryTaskItemVOList || [];
return this.end === true && data.length > 3
? data.slice(0,3) : data;
} }
}, },
created() {
let { id} = this.$Route.query;
this.getItem(id)
},
methods:{ methods:{
toggle(){} toggle(){
this.end = !this.end;
},
getItem(id){
this.$http("stylelibraryorder.listingDetails",id).then(res =>{
let {
code, data
} = res;
if(code === 200){
if(Object.keys(data).length > 0){
this.detail = data;
}
}
})
},
} }
} }
</script> </script>
......
...@@ -29,38 +29,43 @@ ...@@ -29,38 +29,43 @@
<view class="item-header u-flex"> <view class="item-header u-flex">
<view class="u-flex-1 u-line-1 u-font-32 u-flex"> <view class="u-flex-1 u-line-1 u-font-32 u-flex">
<view class="item-header-tip u-m-r-10"></view> <view class="item-header-tip u-m-r-10"></view>
AS2312424234 {{item.styleOrderCode}}
</view> </view>
<view class="item-header-status u-flex-1 u-line-1 u-font-28"> <view class="item-header-status u-flex-1 u-line-1 u-font-28 text-right">
待付款倒计时:59分21秒 <!-- 待付款倒计时:59分21秒-->
<!-- 1-待付款、2-已付款、3-已取消-->
{{
item.status === 1 ? '待付款' :
item.status === 2 ? '已付款' : '已取消'
}}
</view> </view>
</view> </view>
<view class="item-body "> <view class="item-body ">
<view class="item-desc u-m-t-28 u-m-b-22"> <view class="item-desc u-m-t-28 u-m-b-22">
<text class="u-m-r-20 item-desc-label">上架款数</text> <text class="u-m-r-20 item-desc-label">上架款数</text>
<text class="item-desc-value">50款</text> <text class="item-desc-value">{{item.quantity}}款</text>
</view>
<view class="item-images">
<image src="" fit="fit" class="item-image"></image>
<image src="" fit="fit" class="item-image"></image>
<image src="" fit="fit" class="item-image"></image>
<image src="" fit="fit" class="item-image"></image>
<image src="" fit="fit" class="item-image"></image>
<image src="" fit="fit" class="item-image"></image>
</view> </view>
</view> </view>
<view class="item-hr"></view> <view class="item-hr"></view>
<view class="item-footer u-flex"> <view class="item-footer u-flex">
<view class="item-desc u-flex-1 u-line-1"> <view class="item-desc u-flex-1 u-line-1" v-if="item.status === 1">
<text class="u-m-r-20 item-desc-label">待支付:</text> <text class="u-m-r-20 item-desc-label">待支付:</text>
<text class="item-desc-value item--status">23211</text> <text class="item-desc-value item--status">{{ item.price }}</text>
</view> </view>
<view class="item-buttons u-flex-1 u-flex"> <view class="item-buttons u-flex-1 u-flex" >
<view class="button button-plain button-plain--default u-m-r-20">取消上架</view> <!-- v-if="item.putawayStatus === 3"-->
<view class="button button-default">付款</view> <view class="button button-plain button-plain--default u-m-r-20" @click.stop.self="cancel(item)" >取消上架</view>
<view class="button button-default" v-if="item.status === 1">付款</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 加载更多 -->
<u-loadmore v-if="!isEmpty" height="80rpx" :status="loadStatus" icon-type="flower" color="#ccc" />
<!-- 缺省页 -->
<hs-empty v-if="isEmpty" tipText="没有数据"
marginTop="100rpx"
:image="emptyImage"></hs-empty>
<u-toast ref="uToast" />
</view> </view>
</view> </view>
</template> </template>
...@@ -73,25 +78,72 @@ export default { ...@@ -73,25 +78,72 @@ export default {
mixins:[dom], mixins:[dom],
data(){ data(){
return{ return{
emptyImage :require("@/static/images/components/empty/empty.png"),
activeStatus: 0, activeStatus: 0,
statusList: [ statusList: [
{label: '全部',value: '1'}, {label: '全部',value: 0},
{label: '待付款',value: '2'}, {label: '待付款',value: 1},
{label: '已付款',value: '3'}, {label: '已付款',value: 2},
{label: '已取消',value: '4'}, {label: '已取消',value: 3},
], ],
list: [ loadStatus: 'loadmore',
{} pageOptions: {
] current: 1,
size: 10,
pages: 10,
},
list: []
}
},
created() {
this.getList()
},
computed:{
isEmpty(){
return this.list.length === 0
} }
}, },
methods:{ methods:{
setStatus(index){ setStatus(index){
this.activeStatus = index; this.activeStatus = index;
this.getList(); this.getList(true);
},
getList(isReload){
this.loadStatus = 'loading';
this.$http("stylelibraryorder.listingList",{
...this.pageOptions,
"status": this.statusList[this.activeStatus].value,
}).then(res =>{
let {
code, data
} = res;
if(code === 200){
if(Object.keys(data).length > 0){
this.list = isReload ? data.records : this.list.concat(data.records);
this.pageOptions.pages = data.total;
this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore';
}else{
this.list = []
this.loadStatus = 'nomore';
}
}
})
}, },
getList(){ cancel(item){
// this.
this.$http("stylelibraryorder.unlisted", { id: item.id})
.then(res => {
let {
code,msg
} = res;
if(code === 200){
this.getList(true);
}else{
this.$refs.uToast.show({
title: msg
})
}
})
}, },
goEntrustItemPage({id}){ goEntrustItemPage({id}){
this.$Router.push({ this.$Router.push({
...@@ -109,7 +161,9 @@ export default { ...@@ -109,7 +161,9 @@ export default {
$activeColor: #DDA973; $activeColor: #DDA973;
$mainColor: #000; $mainColor: #000;
$subColor: rgba(0,0,0,0.40); $subColor: rgba(0,0,0,0.40);
.flex-row-reverse{
flex-direction: row-reverse;
}
.bg-fff{ .bg-fff{
background: #fff; background: #fff;
} }
......
...@@ -24,92 +24,91 @@ ...@@ -24,92 +24,91 @@
</view> </view>
<view id="body" class="body u-p-r-30 u-p-l-30" :style="{ bottom: footerHeight + 'px', top: headerHeight+ 'px'}"> <view id="body" class="body u-p-r-30 u-p-l-30" :style="{ bottom: footerHeight + 'px', top: headerHeight+ 'px'}">
<view v-if="activeStatus === 0"> <view v-if="activeStatus === 0">
<view class="u-p-t-24 u-p-b-24">待上架:300款</view> <view class="u-p-t-24 u-p-b-24">待上架:{{ pageOptions.pages }}</view>
<view class="entrust bg-fff u-p-30"> <view class="entrust bg-fff u-p-30"
v-for="(item,index) in computedList">
<view class="entrust-title u-flex"> <view class="entrust-title u-flex">
<!-- :name="index === selectedIndex ? 'checkmark-circle-fill': 'checkmark-circle'"--> <u-icon :name="checkSelect(item) ? 'checkmark-circle-fill': 'checkmark-circle'"
<u-icon name="checkmark-circle"
color="#000" size="40" color="#000" size="40"
@click="triggerSelectItem()" @click="triggerSelectList(item)"
/> />
<text class="u-flex-1 u-p-l-30"> <text class="u-flex-1 u-p-l-30" @click="triggerToggle(index)">
加厚荷兰绒绒布布料(<text class="active-color">1</text>/3) {{item.label}} (<text class="active-color">{{checkSelectedLength(item)}}</text>/{{item.children.length}})
</text> </text>
<u-icon name="arrow-down" <u-icon
color="#000" size="40" :name="checkToggle(index) ? 'arrow-up': 'arrow-down'"
@click="triggerToggle()" color="#000" size="40"
@click="triggerToggle(index)"
/> />
</view> </view>
<view class="u-flex u-p-t-30"> <view v-if="checkToggle(index)">
<u-icon name="checkmark-circle" <view class="u-flex u-p-t-30" v-for="(item) in item.children">
color="#000" size="40" <u-icon name="checkmark-circle"
@click="triggerSelectItem()" color="#000" size="40"
/> :name="selectedIds.indexOf(item.id) > -1 ? 'checkmark-circle-fill': 'checkmark-circle'"
<view class="item u-flex-1 u-flex u-p-l-30"> @click="() => { triggerSelectItem(item)}"
<view class="item-img"></view> />
<view class="u-flex-1 u-p-l-20"> <view class="item u-flex-1 u-flex u-p-l-30" @click="goItem(item)">
<view class="item-title u-line-1 u-font-28">男装-上装-青年-时尚休闲</view> <view class="item-img"></view>
<view class="u-flex u-m-t-6 u-m-b-6"> <view class="u-flex-1 u-p-l-20">
<view class="u-m-r-40 label u-font-24">款号</view> <view class="item-title u-line-1 u-font-28">{{ item.materialName}}</view>
<view class="u-line-1 u-flex-1 content u-font-24"> <view class="u-flex u-m-t-6 u-m-b-6">
11 <view class="u-m-r-40 label u-font-24">款号</view>
<view class="u-line-1 u-flex-1 content u-font-24">
{{ item.styleCode }}
</view>
</view> </view>
</view> <view class="u-flex u-m-t-6 u-m-b-6">
<view class="u-flex u-m-t-6 u-m-b-6"> <view class="u-m-r-40 label u-font-24">所选面料</view>
<view class="u-m-r-40 label u-font-24">所选面料</view> <view class="u-line-1 u-flex-1 content u-font-24">
<view class="u-line-1 u-flex-1 content u-font-24"> {{ item.materialName }}
11 </view>
</view> </view>
</view> <view class="item-tags">
<view class="item-tags"> <view class="item-tag u-font-20" :key="tag.id"
<view class="item-tag u-font-20"> v-for="(tag) in item.styleLibraryTagVOList">
标签 {{ tag.materialTagName }}
</view> </view>
<view class="item-tag u-font-20">
标签
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view v-if="activeStatus === 1"> <view v-if="activeStatus === 1">
<view class="u-p-t-24 u-p-b-24">已上架:300</view> <view class="u-p-t-24 u-p-b-24">已上架:{{ pageOptions.pages }}</view>
<view class="entrust bg-fff u-p-30"> <view class="entrust bg-fff u-p-30" v-for="(item,index) in computedList" >
<view class="entrust-title u-flex"> <view class="entrust-title u-flex">
<text class="u-flex-1 u-p-l-30"> <text class="u-flex-1 u-p-l-30">
加厚荷兰绒绒布布料(3) {{ item.label}}
</text> </text>
<u-icon name="arrow-down" <u-icon name="arrow-down"
color="#000" size="40" color="#000" size="40"
@click="triggerToggle()" @click="triggerToggle(index)"
/> />
</view> </view>
<view class="u-flex u-p-t-30"> <view class="u-flex u-p-t-30" v-for="item in item.children">
<view class="item u-flex-1 u-flex u-p-l-30"> <view class="item u-flex-1 u-flex u-p-l-30" @click="goItem(item)">
<view class="item-img"></view> <view class="item-img"></view>
<view class="u-flex-1 u-p-l-20"> <view class="u-flex-1 u-p-l-20">
<view class="item-title u-line-1 u-font-28">男装-上装-青年-时尚休闲</view> <view class="item-title u-line-1 u-font-28">{{ item.materialName }}</view>
<view class="u-flex u-m-t-6 u-m-b-6"> <view class="u-flex u-m-t-6 u-m-b-6">
<view class="u-m-r-40 label u-font-24">款号</view> <view class="u-m-r-40 label u-font-24">款号</view>
<view class="u-line-1 u-flex-1 content u-font-24"> <view class="u-line-1 u-flex-1 content u-font-24">
11 {{ item.styleCode }}
</view> </view>
</view> </view>
<view class="u-flex u-m-t-6 u-m-b-6"> <view class="u-flex u-m-t-6 u-m-b-6">
<view class="u-m-r-40 label u-font-24">所选面料</view> <view class="u-m-r-40 label u-font-24">所选面料</view>
<view class="u-line-1 u-flex-1 content u-font-24"> <view class="u-line-1 u-flex-1 content u-font-24">
11 {{ item.materialName }}
</view> </view>
</view> </view>
<view class="item-tags"> <view class="item-tags">
<view class="item-tag u-font-20"> <view class="item-tag u-font-20" :key="tag.id"
标签 v-for="(tag) in item.styleLibraryTagVOList">
</view> {{ tag.materialTagName }}
<view class="item-tag u-font-20">
标签
</view> </view>
</view> </view>
</view> </view>
...@@ -119,43 +118,48 @@ ...@@ -119,43 +118,48 @@
</view> </view>
</view> </view>
<view v-if="activeStatus === 2"> <view v-if="activeStatus === 2">
<view class="u-p-t-24 u-p-b-24">全部:300款</view> <view class="u-p-t-24 u-p-b-24">全部:{{ pageOptions.pages }}</view>
<view class="entrust bg-fff u-p-30">
<view class="entrust-title u-flex"> <view v-for="item in list" @click="goItem(item)" :key="item.id">
<view class="entrust-tip"></view> <view class="entrust bg-fff u-p-30">
<text class=" u-flex-1 u-p-l-30"> <view class="entrust-title u-flex">
加厚荷兰绒绒布布料(3) <view class="entrust-tip"></view>
</text> <text class=" u-flex-1 u-p-l-30">
<text>已上架</text> {{
</view> item.styleTag
<view class="u-flex u-p-t-30"> }}
<view class="item u-flex-1 u-flex u-p-l-30"> </text>
<view class="item-img"></view> <text>{{item.putawayStatus | putawayStatusFilter}}</text>
<view class="u-flex-1 u-p-l-20"> </view>
<view class="u-flex u-m-t-6 u-m-b-6"> <view class="u-flex u-p-t-30">
<view class="u-m-r-40 label ">款号</view> <view class="item u-flex-1 u-flex u-p-l-30">
<view class="u-line-1 u-flex-1 content"> <view class="item-img">
11 <!-- <image :src="`${$IMG_URL}${item.pci}`"></image>-->
</view>
</view> </view>
<view class="u-flex u-m-t-6 u-m-b-6"> <view class="u-flex-1 u-p-l-20">
<view class="u-m-r-40 label">所选面料</view> <view class="u-flex u-m-t-6 u-m-b-6">
<view class="u-line-1 u-flex-1 content"> <view class="u-m-r-40 label ">款号</view>
11 <view class="u-line-1 u-flex-1 content">
{{ item.styleCode }}
</view>
</view> </view>
</view> <view class="u-flex u-m-t-6 u-m-b-6">
<view class="item-tags"> <view class="u-m-r-40 label">所选面料</view>
<view class="item-tag u-font-20"> <view class="u-line-1 u-flex-1 content">
标签 {{ item.materialName }}
</view>
</view> </view>
<view class="item-tag u-font-20"> <view class="item-tags">
标签 <view class="item-tag u-font-20" :key="tag.id"
v-for="(tag) in item.styleLibraryTagVOList">
{{ tag.materialTagName }}
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -164,12 +168,15 @@ ...@@ -164,12 +168,15 @@
<view class="custom-style-round-circle custom-style-btn custom-style" <view class="custom-style-round-circle custom-style-btn custom-style"
> >
<view class="custom-style-left save">删除</view> <view class="custom-style-left save">删除</view>
<view class="custom-style-right submit"> <view class="custom-style-right submit" @click="submit">
一键上架(3) 一键上架({{selected.length}})
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!--提示-->
<u-toast ref="uToast" />
</view> </view>
</template> </template>
...@@ -185,13 +192,103 @@ export default { ...@@ -185,13 +192,103 @@ export default {
activeStatus: 0, activeStatus: 0,
statusList: [ statusList: [
{label: '待上架', value: '1'}, {label: '待上架', value: '2'},
{label: '已上架', value: '2'}, {label: '已上架', value: '3'},
{label: '全部', value: '3'}, {label: '全部', value: '1'},
] ],
selected: [],
hideList: [],
list:[],
pageOptions: {
current: 1,
size: 10,
pages: 0,
},
}
},
computed:{
computedList(){
function arr2Tree(data,id = 'materialName'){
const newList = [], map = Array.from(
new Set(
data.map(item =>{
return item[id]
})
)
) ;
for (let i = 0; i < data.length; i++) {
let item = data[i],
name = item[id],
index = map.indexOf(name);
if(newList[index]){
newList[index]['children'].push(item)
}else{
newList.push({
label: name,
children: [item]
})
}
}
return newList;
}
return arr2Tree(this.list).map((item) => {
return {
...item,
show: true
}
})
},
selectedIds(){
return this.selected.map((item) => item.id);
} }
}, },
filters:{
putawayStatusFilter(v){
switch (v) {
case 1:
return '未上架'
case 2:
return '待上架'
case 3:
return '待上架'
default:
return ''
}
}
},
created() {
this.getList();
},
methods:{ methods:{
goItem({id}){
this.$Router.push({
path: '/pages/material/entrustManagementItem',
query:{
id
}
})
},
submit(){
this.$http("stylelibraryorder.oneClickListing", this.selectedIds)
.then(res => {
let {
code, msg
} = res;
if(code === 200){
this.$refs['uToast'].show({
title: msg
})
this.selected = [];
this.hideList = [];
this.getList();
}else{
this.$refs['uToast'].show({
title: msg
})
}
})
},
resetPage(){ resetPage(){
this.getHeaderHeight(); this.getHeaderHeight();
this.getFooterHeight(); this.getFooterHeight();
...@@ -199,13 +296,77 @@ export default { ...@@ -199,13 +296,77 @@ export default {
setActiveStatus(index){ setActiveStatus(index){
this.activeStatus = index; this.activeStatus = index;
this.resetPage(); this.resetPage();
this.getList(true);
}, },
checkSelectedLength({children}){
triggerSelectItem(){ // 获取所有id
let childrenIds = children.map(item => item.id);
// 核对是否存在
return this.selectedIds.filter(id => childrenIds.indexOf(id)).length
}, },
triggerToggle(){ checkToggle(index){
return this.hideList.indexOf(index) > -1
},
checkSelect({children}){
let childrenIds = children.map(item => item.id);
return new Set(this.selectedIds.concat(childrenIds)).size === this.selected.length
},
// 多选 确定/取消
triggerSelectList(item){
// console.log(children)
if(!this.checkSelect(item)){
this.selected = this.selected.concat(
item.children.filter(($item) => this.selectedIds.indexOf($item.id) === -1)
);
}else{
// this.selected = this.selected.concat(
// item.children.filter(($item) => this.selectedIds.indexOf($item.id) === -1)
// );
}
},
// 单选 确定/取消
triggerSelectItem(item){
let index = this.selectedIds.indexOf(item.id);
if(index > -1){
this.selected.splice(index,1)
}else {
this.selected.push(item)
}
},
triggerToggle(index){
let $index = this.hideList.findIndex($I => $I === index);
if($index > -1){
this.hideList.splice($index,1)
}else{
this.hideList.push(index)
}
},
// 触底加载更多
onReachBottom() {
if (this.pageOptions.current < this.pageOptions.pages) {
this.pageOptions.current += 1;
this.getList();
}
},
getList(isReload = false){
this.$http("stylelibraryorder.getToShelvesManagerList",{
status: this.statusList[this.activeStatus].value,
...this.pageOptions
})
.then(res => {
let { code, data } = res;
if (code === 200) {
if(Object.keys(data).length > 0){
this.list = isReload ? data.records: this.list.concat(data.records);
this.pageOptions.pages = data.total;
this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore';
}else{
this.list = [];
this.pageOptions.pages = 0;
this.loadStatus = 'nomore';
}
}
})
}, },
goEntrustList(){ goEntrustList(){
this.$Router.push({ this.$Router.push({
...@@ -227,7 +388,7 @@ $main-color: #fff; ...@@ -227,7 +388,7 @@ $main-color: #fff;
flex-direction: $direction; flex-direction: $direction;
/* #endif */ /* #endif */
} }
.active-color{ color: $color} .active-color{ color: $activeColor}
.bg-fff{ background: #fff;} .bg-fff{ background: #fff;}
.item{ .item{
width: 100%; width: 100%;
......
<template> <template>
<view> <view>
<view> <view>
<u-image height="750rpx"></u-image> <u-image height="750rpx" :src="`${$IMG_URL}${item.originalImageCode}`"></u-image>
</view> </view>
<view class="u-p-t-20 u-p-r-30 u-p-l-30 "> <view class="u-p-t-20 u-p-r-30 u-p-l-30 ">
<view class="bg-fff u-p-t-20 u-p-r-30 u-p-b-30 u-p-l-30 item"> <view class="bg-fff u-p-t-20 u-p-r-30 u-p-b-30 u-p-l-30 item">
<view class="u-flex"> <view class="u-flex">
<text class="u-flex-1">男装-上装-青年-时尚</text> <text class="u-flex-1">{{ item.styleTag}}</text>
<text class="active">待上架</text> <text class="active">{{item.status | filterStatus}}</text>
</view> </view>
<view class="u-flex"> <view class="u-flex">
<text class="u-flex-1 u-font-28">AS23124</text> <text class="u-flex-1 u-font-28">{{ item.styleCode}}</text>
<text class="u-font-24"> <text class="u-font-24">
加入日期:2021-12-11 加入日期:{{ item.createTime.split(' ')[0]}}
</text> </text>
</view> </view>
<view class="item-tags"> <view class="item-tags">
<view class="item-tag u-font-20"> <view class="item-tag u-font-20"
标签 :key="tag.id"
</view> v-for="tag in item.styleLibraryTagVOList">
<view class="item-tag u-font-20"> {{ tag.materialTagName }}
标签
</view> </view>
</view> </view>
</view> </view>
<view class="bg-fff u-p-r-30 u-p-b-30 u-p-l-30 item"> <view class="bg-fff u-p-r-30 u-p-b-30 u-p-l-30 item ">
<view class="u-border-bottom u-line-88">所选面料</view> <view class="u-border-bottom u-line-88">所选面料</view>
<view class="u-m-t-30 u-m-b-56"> <view class="u-m-t-30 u-m-b-56">
<hs-material-thumbnail :item="item"></hs-material-thumbnail> <hs-material-thumbnail :item="materialInfo"></hs-material-thumbnail>
</view> </view>
<view class="u-flex"> <view class="u-flex base-line ">
<view class=""> <view class="">
<view>主图颜色</view> <view>主图颜色</view>
<view class="image"> <view class="image">
<image src="" style="width: 100%;height: 100%"></image> <image :src="`${$IMG_URL}${mainPic.fileCode}`" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view> <view class="image-tip u-line-1">{{mainPic.describes}}</view>
</view> </view>
</view> </view>
<view class="overflow u-flex-1"> <view class="overflow u-flex-1">
<view>其他颜色</view> <view>其他颜色</view>
<view> <view>
<view class="image u-m-r-10"> <view class="image u-m-r-10" v-for="pic in subPic" :key="pic.id">
<image src="" style="width: 100%;height: 100%"></image> <image :src="`${$IMG_URL}${item.fileCode}`" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view> <view class="image-tip u-line-1">{{pic.describes}}</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -67,7 +58,60 @@ export default { ...@@ -67,7 +58,60 @@ export default {
components: {HsMaterialThumbnail}, components: {HsMaterialThumbnail},
data(){ data(){
return{ return{
item:{} item:{
createTime: '',
colourApiList: []
}
}
},
computed:{
mainPic(){
return this.item.colourApiList.filter((item) => item.isMain)[0]
},
subPic(){
return this.item.colourApiList.filter((item) => !item.isMain)
},
materialInfo(){
let item = this.item.materialInfo || {};
return Object.assign({}, item,{
materialCategory: item.category,
materialDoorWidth: item.fabricWidth,
materialElement: item.saoriStandard,
})
}
},
filters:{
filterStatus(v){
// 1-待领取、2-待处理、3-待审核、4-已启动、5-已停用
switch (v) {
case 1:
return '待领取'
case 2:
return '待处理'
case 3:
return '待审核'
case 4:
return '已启动'
case 5:
return '已停用'
}
}
},
created() {
let { id} =this.$Route.query;
this.getItem(id);
},
methods:{
getItem(id){
this.$http("stylelibraryorder.getStyleDetails",id)
.then(res =>{
let{
code, data
} = res;
if(code === 200){
this.item = data;
}
})
} }
} }
} }
...@@ -78,7 +122,7 @@ $h-color: #AF8D66; ...@@ -78,7 +122,7 @@ $h-color: #AF8D66;
$activeColor: #DDA973; $activeColor: #DDA973;
$color: rgba(175,141,102,0.10); $color: rgba(175,141,102,0.10);
$main-color: #fff; $main-color: #fff;
.base-line{ align-items: baseline;}
.u-line-88{ .u-line-88{
line-height: 88rpx; line-height: 88rpx;
} }
......
export default {
data(){
return {
MaterialList: [],
materialDetail: {}
}
},
computed:{
title(){
return this.materialDetail.materialName;
},
},
methods:{
getMaterialList(){
this.$http("materialinfo.getMaterialList",{
isDisabled: false,
materialType: "面料",
current: 1,
size: 10,
}).then(res =>{
let {
code, data
} = res;
if(code === 200){
this.MaterialList = data.page.records;
}
})
},
// 获取面料详情
getMaterialItem(id,callback){
this.$http("materialinfo.getMaterialById", id)
.then(res =>{
let {
code, data
} = res;
if(code === 200){
if(callback){
callback(data)
}else{
this.materialDetail = data;
}
}
})
},
}
}
export default {
data(){
return{
offset :{
x: 0
},
startTime: 0,
lineStepWidth: 0,
lineWidth: 0,
lineOffset: 0,
}
},
computed:{
// 角度
angle(){
let { lineOffset,offset,lineWidth} = this;
let left = (offset.x - lineOffset.left) / lineWidth * 100;
return Math.ceil((left-50) / 50 * 180);
},
},
methods:{
// 重置调整的进度条
initStep(){
this.uGetRect("#line").then(res => {
this.lineWidth = res.width;
this.lineOffset = {
left: res.left,
right: res.right,
};
this.offset.x = res.width / 2 + res.left;
})
this.uGetRect("#line-step").then(res => {
this.lineStepWidth = res.width;
})
},
resetStep(){
this.offset.x = this.lineWidth / 2 + this.lineOffset.left;
},
touchMove(e){
let left = e.changedTouches[0].pageX;
this.offset.x = this.filterStartEnd(left)
},
touchEnd(e){
let left = e.changedTouches[0].pageX;
this.offset.x = this.filterStartEnd(left)
},
touchStart(e){
this.offset.x = e.changedTouches[0].pageX;
},
filterStartEnd(num){
let { left,right } = this.lineOffset;
if(num < left){
return left
}else if(num > right){
return right
}else{
return num
}
}
},
mounted() {
this.initStep()
},
}
...@@ -174,6 +174,7 @@ export default { ...@@ -174,6 +174,7 @@ export default {
this.loadStatus = 'loading'; this.loadStatus = 'loading';
this.$http('stylelibraryorder.page', { this.$http('stylelibraryorder.page', {
styleTag: this.keyword, styleTag: this.keyword,
status: 0,
materialTagIdList, materialTagIdList,
...this.pageOptions ...this.pageOptions
}).then(res => { }).then(res => {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</view> </view>
</view> </view>
<u-form-item label="面料门幅" prop="clothWidth"> <u-form-item label="面料门幅" prop="clothWidth">
<u-number-box v-model="detail.clothWidth" :step="0.1"></u-number-box>cm <u-number-box v-model="detail.clothWidth" :step="0.1" :positive-integer="false"></u-number-box>cm
</u-form-item> </u-form-item>
<u-form-item label="面料成分" prop="component" required> <u-form-item label="面料成分" prop="component" required>
<u-input v-model="detail.component" placeholder="请输入面料成分" /> <u-input v-model="detail.component" placeholder="请输入面料成分" />
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
<view class="footer"> <view class="footer">
<view class="u-p-t-18 u-p-r-30 u-p-b-18 u-p-l-30"> <view class="u-p-t-18 u-p-r-30 u-p-b-18 u-p-l-30">
<view class="u-flex"> <view class="u-flex">
<view class="u-flex-1">共填写{{detail.clothRowColourQuantity}}种颜色名称,请不要重名</view> <view class="u-flex-1">请选择{{designAgencyColourQuantity}}种颜色名称</view>
<view class="custom-style-round-circle custom-style-btn custom-style dialog-btn"> <view class="custom-style-round-circle custom-style-btn custom-style dialog-btn">
<view class="custom-style-right" @click="submitColor">确定</view> <view class="custom-style-right" @click="submitColor">确定</view>
</view> </view>
...@@ -300,7 +300,18 @@ export default { ...@@ -300,7 +300,18 @@ export default {
expirationDate:{ expirationDate:{
required: true, required: true,
message: '请选择完成期限', message: '请选择完成期限',
} },
clothWidth:{
max: 20,
validate(rule, value, callback) {
let reg = new RegExp(/^(\\d+)(.\\d{0,2})?$/);
return reg.test(value);
},
message: '门幅应保留小数点后两位',
// 可以单个或者同时写两个触发验证方式
trigger: ['change','blur'],
},
}, },
// 暂存用的颜色组 // 暂存用的颜色组
modelingTaskColourDTOList: [], modelingTaskColourDTOList: [],
...@@ -405,11 +416,13 @@ export default { ...@@ -405,11 +416,13 @@ export default {
removeColor(){ removeColor(){
let list = this.detail.modelingTaskMaterialColourList; let list = this.detail.modelingTaskMaterialColourList;
let checked = this.checkedList; let checked = this.checkedList;
for (let i = 0; i < list.length; i++) {
if(checked.indexOf(list[i].id) > -1){ for (const item of list) {
this.$set(list[i],'isDeleted',true) let index = checked.indexOf(item.id);
if(index > -1){
this.$set(item,'isDeleted',true)
}else{ }else{
list.splice(i,1) list.splice(index,1)
} }
} }
}, },
...@@ -514,6 +527,7 @@ export default { ...@@ -514,6 +527,7 @@ export default {
validate(callback){ validate(callback){
this.$refs['uForm'].validate((res) =>{ this.$refs['uForm'].validate((res) =>{
if (res) { if (res) {
return;
this.validateList(callback) this.validateList(callback)
} }
}) })
......
<template>
<view class="body">
<!--选款-->
<u-navbar title="客户详情"
:border-bottom="false"
:background="{backgroundColor: 'transparent'}">
</u-navbar>
<view class="u-p-30">
<view class="border-radius-8 bg-fff u-p-r-30 u-p-l-30 u-m-b-20">
<view class="u-p-t-24 u-p-b-24 u-border-bottom">客户信息</view>
<view class="u-p-t-24 u-p-b-24 u-flex">
<view class="label">客户名称</view>
<view class="context">{{detail.fullName}}</view>
</view>
<view>
<view class=" u-p-b-24 u-flex">
<view class="label">联系人</view>
<view class="context">{{detail.contacts[0].name}}</view>
</view>
<view class=" u-p-b-24 u-flex">
<view class="label">联系方式</view>
<view class="context"
@click="uni.makePhoneCall(detail.contacts[0].phone)">
{{detail.contacts[0].phone}}
</view>
</view>
</view>
</view>
<view class="border-radius-8 bg-fff u-p-r-30 u-p-l-30 u-m-b-20">
<view class="tabBar u-flex u-border-bottom">
<view class="tabBar-item u-flex"
v-for="(item,index) in tarBars" @click="activeIndex = index"
:class="[activeIndex === index ? 'active': '']"
>
<text>{{ item.label }}</text>
<text class="tabBar-split u-m-r-30 u-m-l-30" v-if="index < tarBars.length -1"></text>
</view>
</view>
<view class="u-p-b-28">
<view class="item " v-for="group in groupByTime">
<view class="item-title u-m-t-28 u-m-b-28">{{group.label}}</view>
<view>
<view v-for="(item) in group.children" class="u-flex">
<view class="item-img u-relative">
<image :src="`${$IMG_URL}${item.styleLibraryTaskItemVO.originalImageCode}`" mode="fit" style="width:100%; height: 100%"></image>
</view>
<view class="u-flex-1 u-p-l-20 u-p-r-30 u-border-left">
<view class="item-title u-flex ">
<view class="u-flex-1 u-line-1 u-font-32 u-p-t-20 u-p-b-8">{{item.styleLibraryTaskItemVO.styleTag}}</view>
</view>
<view class="item-desc u-font-24">{{ item.styleLibraryTaskItemVO.materialName }}</view>
<view class="item-desc u-font-24">{{ item.styleLibraryTaskItemVO.styleCode }}</view>
<view class="item-tags u-p-b-24">
<view class="item-tag u-font-20"
:key="tag.id"
v-for="tag in item.styleLibraryTaskItemVO.styleLibraryTagVOList">
{{ tag.materialTagName }}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "item",
data(){
return {
activeIndex: 0,
tarBars: [
{ label: '采购意向记录'},
{ label: '浏览款式记录'},
],
item: {
styleLibraryMaterialProspectiveCustomerVOList: []
}
}
},
computed:{
detail(){
return this.item.basics || {contacts: [{name: '',phone: ''}]}
},
groupByTime(){
let map = Array.from(new Set(this.tarBarContent.map((item) => item.createTime))),
newList = [];
for (const item of this.tarBarContent) {
let name = item['createTime'],
index = map.indexOf(name);
if(newList[index]){
newList[index]['children'].push(item)
}else{
newList.push({
label: name,
children: [item]
})
}
}
console.log(newList)
return newList
},
tarBarContent(){
return (this.item.styleLibraryMaterialProspectiveCustomerVOList || [] )
// 1-采购意向记录、2-浏览款式记录
.filter((item) => item.type === this.activeIndex+1)
}
},
created() {
let {id} = this.$Route.query;
this.getItem(id)
},
methods:{
getItem(id){
this.$http("stylelibraryorder.potentialCustomersDetails",id)
.then(res => {
let { code, data } = res;
if(code === 200){
this.item = data;
}
})
}
}
}
</script>
<style scoped lang="scss">
$h-color: #AF8D66;
$color: rgba(175,141,102,0.10);
$main-color: #fff;
.item{
width: 100%;
margin-bottom: 40rpx;
&--round{
border-radius: 16rpx;
border: 1px solid rgba(0,0,0,0.10);
}
&--status{
left: 0;
top: 0;
position: absolute;
}
&-img{
width: 160rpx;
height: 160rpx;
//height: 100%
}
&-title{}
&-desc{}
&-tags{
}
&-tag{
padding: 6rpx 2px;
background: $color;
text-align: center;
color: $h-color;
display: inline-block;
margin-right: 10rpx;
}
}
.tabBar{
height: 88rpx;
&-item{
font-size: 24rpx;
&.active{
font-size: 28rpx;
}
}
&-split{
height: 28rpx;
width: 2rpx;
background: rgba(0,0,0,0.20);
display: inline-block;
}
}
.border-radius-8{
border-radius: 8rpx;
}
.bg-fff{
background: #fff;
}
.label{
color: rgba(0,0,0,0.40);
font-size: 28rpx;
min-width: 140rpx;
}
.context{
color: #000;
font-size: 28rpx;
}
</style>
...@@ -19,7 +19,10 @@ export default { ...@@ -19,7 +19,10 @@ export default {
account: '18297959298', account: '18297959298',
password: 'e10adc3949ba59abbe56e057f20f883e' password: 'e10adc3949ba59abbe56e057f20f883e'
}); });
// await this.$store.dispatch('login', {
// account: '13588828505',
// password: '10470c3b4b1fed12c3baac014be15fac67c6e815',
// });
// await this.$store.dispatch("getDictionary") // await this.$store.dispatch("getDictionary")
// await this.$store.dispatch("getSizeList") // await this.$store.dispatch("getSizeList")
// await this.$store.dispatch("getCategoryList") // await this.$store.dispatch("getCategoryList")
......
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