Commit 3c5161bc authored by DongRuifen's avatar DongRuifen

我的面料

parent 3be9fdea
...@@ -10,10 +10,12 @@ ...@@ -10,10 +10,12 @@
import stylelibraryorder from './stylelibraryorder/index' import stylelibraryorder from './stylelibraryorder/index'
import modelingtask from './modelingtask' import modelingtask from './modelingtask'
import mobileBrand from './mobileBrand' import mobileBrand from './mobileBrand'
import branddevelop from "./branddevelop"; import materialinfo from './materialinfo'
// import branddevelop from "./branddevelop";
export default { export default {
...stylelibraryorder, ...stylelibraryorder,
...modelingtask, ...modelingtask,
...mobileBrand, ...mobileBrand,
...branddevelop ...materialinfo,
// ...branddevelop
} }
import config from "../config/index";
let className = 'materialinfo'
let baseUrl = `${config.baseUrl}/${className}`
export default {
[className]: {
'getMaterialList': {
url: `${baseUrl}/getMaterialList`,
method: "post",
},
'getMaterialById': {
url: `${baseUrl}/getMaterialById`,
method: "get",
},
// 'updateMaterial': {
// url: `${baseUrl}/updateMaterial`,
// method: "post",
// },
},
// 品类接口
category: {
query: {
url: "/gdep-mdm/category/query",
method: "post"
}
},
// 数据字典
dict: {
dictionaryList: {
url: "/gdep-system/dict/dictionaryList",
method: "post"
}
},
modelingtask: {
materialDetail: {
url: "/gdep-plm/modelingtask/materialDetail",
method: "get"
}
},
info: {
updateMaterial: {
url: "/gdep-mdm/materialinfo/updateMaterial",
method: "post"
}
},
}
\ No newline at end of file
...@@ -296,6 +296,34 @@ ...@@ -296,6 +296,34 @@
} }
} }
}, },
{
"path": "pages/home/detail",
"style": {
"navigationBarTitleText": "面料详情",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"allowsBounceVertical": "NO"
}
}
},
{
"path": "pages/home/editFabric",
"style": {
"navigationBarTitleText": "编辑面料信息",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"allowsBounceVertical": "NO"
}
}
},
{ {
"path": "pages/home/fabricDetails", "path": "pages/home/fabricDetails",
"style": { "style": {
......
<template> <template>
<view> <view>
<view class="home_con_content_order u-m-t-30" v-for="item in tableData"> <view class="home_con_content_order u-m-t-30" v-for="item,index in tableData" @click="goDetail(item)"
:key="index">
<image style="width: 100%;height: 160rpx;" src="../../../static/images/home/1@2x.png" mode=""></image> <image style="width: 100%;height: 160rpx;" src="../../../static/images/home/1@2x.png" mode=""></image>
<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 ov_hiden">加厚荷兰绒绒布布料备份加厚荷兰绒绒布布料备份</span> <span class="color_DDA973 ov_hiden">{{item.materialName}}</span>
<span><u-icon size="24" color="#fff" name="arrow-right"></u-icon></span> <span>
<u-icon size="24" color="#fff" name="arrow-right"></u-icon>
</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">针织</span> <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 class="u-m-l-10 u-m-r-10">180cm</span> <span class="u-m-l-10 u-m-r-10">{{item.clothWidth}}cm</span>
| |
<span class="u-m-l-10">100%面备份面备份面备份面备份面备份面备份面备份面备份</span> <span class="u-m-l-10">{{item.component}}</span>
</view> </view>
</view> </view>
</view> </view>
...@@ -20,50 +24,80 @@ ...@@ -20,50 +24,80 @@
</template> </template>
<script> <script>
export default { export default {
props: { props: {
tableData: { tableData: {
type: Array, type: Array,
default: [] default: [],
} }
}, },
data() { data() {
return {}; return {
} imgUrl: this.$IMG_URL,
}; dataList: []
};
},
created() {
this.$http("category.query", {}).then(res => {
let {
code,
data
} = res;
if (code === 200) {
this.dataList = data;
}
})
},
methods: {
goDetail(item) {
console.log(333)
this.$router.push({
path: "/pages/home/detail",
query: {
id: item.id
}
})
},
},
};
</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;
.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;
.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);
}
}
.ov_hiden {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.color_DDA973 {
color: #dda973;
}
.color_6F6F72 {
color: #6f6f72;
} }
} </style>
.ov_hiden { \ No newline at end of file
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.color_DDA973 {
color: #dda973;
}
.color_6F6F72 {
color: #6f6f72;
}
</style>
<template>
<view class="whole">
<view class="back">
<view style="display:flex">
<u-navbar :is-back="true" :background="{ backgroundColor: '#F5F5F5' }" title="面料详情">
<view class="nav-nav" @click="edit()">编辑</view>
</u-navbar>
</view>
<view :class="fabricObj.materialPictureVOList.length>4?'back-two':'back-back'">
<view class="row" style="color:#F5B674"> {{fabricObj.materialName}}
</view>
<view class="row" style="color:#fff">
<view v-for="item,index in dataList" :key="index">
<view v-if="item.id==fabricObj.category">{{item.name}}</view>
</view>{{fabricObj.clothWidth}}cm|{{fabricObj.component}}
</view>
<view style="display:flex;flex-wrap: wrap;">
<view class="row" v-for="item,index in fabricObj.materialPictureVOList" :key="index"
style="margin-right:30rpx">
<view @click="previewImage(`${imgUrl}${item.fileCode}`)">
<image :src="`${imgUrl}${item.fileCode}`" mode="aspectFill"
style="width:120rpx;height:120rpx;display:flex">
</image>
</view>
</view>
</view>
</view>
</view>
<view class="whole-bottom">
<view :class="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">
<view @click="previewImage(`${imgUrl}${itemTab.originalImageCode}`)">
<image class="item-img" :src="`${imgUrl}${itemTab.originalImageCode}`" mode="aspectFill">
</image>
</view>
<!-- <image class="item-img" src="../../static/images/home/1@2x.png" mode=""></image> -->
</view>
<view class="item-right">
<view class="right-one">{{itemTab.styleTag}}</view>
<view class="right-two">
<view class="two-left">款号</view>
<view class="two-right">{{itemTab.styleCode}}</view>
</view>
<view class="right-two">
<view class="two-left">品类</view>
<view class="two-right" v-for="itemId,indexId in dataList" :key="indexId">
<view v-if="itemId.id==itemTab.categoryId">{{itemId.name}}</view>
</view>
</view>
<!-- <view>
<u-tag :text="itemTab.styleTag" bg-color="#f6f3ef" border-color="#f6f3ef" size="mini" color="#AF8D66"
type="success" />
</view> -->
<view v-for="itemTagVo,indexTagVo in itemTab.styleLibraryTagVOList" :key="indexTagVo">
<u-tag v-if="!itemTagVo.isDeleted" :text="itemTagVo.materialTagName" bg-color="#f6f3ef"
border-color="#f6f3ef" size="mini" color="#AF8D66" type="success" />
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import utils from "../../mixins/utils"
export default {
mixins: [utils],
data() {
return {
imgUrl: this.$IMG_URL,
id: "",
fabricObj: {},
tableList: [],
dataList: [],
};
},
watch: {
id: {
handler() {
this.materialDetail()
this.detail()
}
}
},
onLoad(option) {
this.id = option.id
this.materialDetail()
this.detail()
this.$http("category.query", {}).then(res => {
let {
code,
data
} = res;
if (code === 200) {
this.dataList = data;
}
})
},
onShow() {
this.id = this.$route.query.id
this.materialDetail()
this.detail()
},
created() {
this.materialDetail()
this.detail()
this.id = this.$route.query.id
},
methods: {
materialDetail() {
this.$http('materialinfo.getMaterialById', this.id).then(res => {
let {
code,
data
} = res;
if (code === 200) {
this.fabricObj = data;
}
});
},
detail() {
this.$http('modelingtask.materialDetail', this.id).then(res => {
let {
code,
data
} = res;
if (code === 200) {
this.tableList = data.styleLibraryTaskItemVOList;
}
});
},
edit() {
this.$router.push({
path: "/pages/home/editFabric",
query: {
id: this.id
}
})
}
}
}
</script>
<style lang="scss" scoped>
.whole {
// padding: 0 30rpx;
background: #f5f5f5;
.back {
background: url(../../static/images/home/backimg.png) no-repeat;
background-size: 100% 100%;
height: 580rpx;
padding: 0 30rpx;
padding-top: 100rpx;
.nav-nav {
display: flex;
justify-content: end;
margin-right: 40rpx;
width: 100%;
}
.back-two {
background: #3b342f;
height: 410rpx;
padding: 30rpx 30rpx;
opacity: 0.8;
}
.back-back {
background: #3b342f;
height: 340rpx;
padding: 30rpx 30rpx;
opacity: 0.8;
// margin-top: 80rpx;
}
}
.row {
display: flex;
margin-bottom: 18rpx;
.img {
width: 60px;
height: 60px;
margin-right: 30rpx;
}
}
.whole-bottom {
padding: 0 30rpx;
.body {
background: #ffffff;
border-radius: 4px;
padding: 30rpx;
margin-top: -60rpx;
}
.body-two{
background: #ffffff;
border-radius: 4px;
padding: 30rpx;
// margin-top: -60rpx;
}
.font {
padding-bottom: 30rpx;
}
.item {
padding-bottom: 30rpx;
display: flex;
.item-left {
margin-right: 20rpx;
.item-img {
width: 80px;
height: 80px;
}
}
}
.item:last-child {
padding-bottom: 0px;
}
.item-right {
.right-one {
font-weight: bold;
}
.right-two {
display: flex;
color: rgba(0, 0, 0, 0.40);
.two-left {
margin-right: 40rpx;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="whole">
<u-navbar :is-back="true" :background="{ backgroundColor: '#F5F5F5' }" title="编辑面料信息"></u-navbar>
<view class="body">
<!-- <view class="title">面料基本信息</view>
<view></view>
<view>
<u-input v-model="detail.referToBrand"></u-input>
</view> -->
<u-form :model="detailInfo" label-position="top" ref="uForm">
<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>cm
<u-form-item label="面料成分" prop="component" required>
<u-input v-model="detailInfo.component" placeholder="请输入面料成分" />
</u-form-item>
</u-form>
</view>
<view class="footer">
<view class="footer-btn">
<u-button @click="submitBtn" class="custom-style" shape="circle">提交</u-button>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
id: "",
detailInfo: {},
value: 2.2,
tableList: []
}
},
onLoad(option) {
this.id = option.id
this.detail()
},
methods: {
valChange() {},
// 详情
detail() {
this.$http('modelingtask.materialDetail', this.id).then(res => {
let {
code,
data
} = res;
if (code === 200) {
this.detailInfo = data;
this.detailInfo.clothWidth = parseFloat(data.clothWidth)
}
});
},
// 提交
submitBtn() {
console.log("submit")
let param = {
id: this.id,
materialType: "面料",
materialName: this.detailInfo.materialName,
clothWidth: this.detailInfo.clothWidth,
component: this.detailInfo.component,
}
this.$http('info.updateMaterial', param).then(res => {
let {
code,
data
} = res;
if (code === 200) {
this.$router.push({
path: "/pages/home/detail",
query: {
id: this.id
}
})
} else {
}
});
}
}
}
</script>
<style lang="scss" scoped>
.whole {
background: #F5F5F5;
.body {
background: #fff;
padding: 30rpx 30rpx;
.title {
margin: 30rpx 0;
}
}
.footer {
position: fixed;
width: 100%;
bottom: 0;
z-index: 998;
background: #fff;
box-shadow: 0px -4rpx 6rpx 0px rgba(178, 182, 214, 0.1);
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.footer-btn {
padding: 20rpx 60rpx;
}
.custom-style {
color: #fff;
background: #000;
}
}
}
</style>
\ No newline at end of file
...@@ -7,9 +7,10 @@ ...@@ -7,9 +7,10 @@
<u-search @search="searchCli" class="" bg-color="#fff" border-color="#ececec" placeholder="请输入面料名称" :show-action="false" v-model="search"></u-search> <u-search @search="searchCli" class="" bg-color="#fff" border-color="#ececec" placeholder="请输入面料名称" :show-action="false" v-model="search"></u-search>
</u-sticky> </u-sticky>
<view> <view>
<view class="u-m-t-30" v-for="item in fiabricList"> <view class="u-m-t-30">
<!-- 后期用公共组件 fabricTitle --> <!-- 后期用公共组件 fabricTitle -->
<hs-material-thumbnail @click="detailFabric(item)" :item="filterFiabric(item)"></hs-material-thumbnail> <!-- <hs-material-thumbnail @click="detailFabric(item)" :item="filterFiabric(item)"></hs-material-thumbnail> -->
<fabricTitle :tableData="fiabricList"></fabricTitle>
</view> </view>
</view> </view>
</view> </view>
...@@ -18,18 +19,31 @@ ...@@ -18,18 +19,31 @@
<script> <script>
import home from './mixin/index.js' import home from './mixin/index.js'
import fabricTitle from "./components/fabricTitle.vue"
export default { export default {
mixins:[home], mixins:[home],
components:{fabricTitle},
data() { data() {
return { return {
size: 5, size: 5,
search: '', search: '',
fiabricList: [], fiabricList: [],
// dataList:[],
total: 0 total: 0
}; };
}, },
onLoad() { onLoad() {
this.materialList(); this.materialList();
// this.$http("category.query", {}).then(res => {
// let {
// code,
// data
// } = res;
// if (code === 200) {
// this.dataList = data;
// }
// })
}, },
// 上拉加载更多 // 上拉加载更多
onReachBottom() { onReachBottom() {
...@@ -45,15 +59,28 @@ export default { ...@@ -45,15 +59,28 @@ export default {
}, },
// 我的面料 // 我的面料
materialList() { materialList() {
this.$http('orderTicket.materialList', { // this.$http('orderTicket.materialList', {
// size: this.size,
// materialCode: '',
// materialName: this.search
// }).then(res => {
// let { code, data } = res;
// if (code == 200) {
// this.fiabricList = data.data;
// this.total = data.total;
// }
// });
this.$http('materialinfo.getMaterialList', {
size: this.size, size: this.size,
materialCode: '', materialCode: '',
materialName: this.search "current": 1,
"materialType": "面料",
codeAndName: this.search
}).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.page.records;
this.total = data.total; this.total = data.page.total;
} }
}); });
} }
......
This diff is collapsed.
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
methods: { methods: {
async login() { async login() {
await this.$store.dispatch('login', { await this.$store.dispatch('login', {
account: '18297959298', account: '18332345678',
password: 'e10adc3949ba59abbe56e057f20f883e' password: 'e10adc3949ba59abbe56e057f20f883e'
}); });
// await this.$store.dispatch('login', { // await this.$store.dispatch('login', {
......
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