Commit a32215d7 authored by 李星剑's avatar 李星剑

fix: 布行家内容

parent b1627a3e
let className = '/gdep-auth'
export default {
auth:{
selectEnterpriseInfoByPhone:{
url: `${className}/selectEnterpriseInfoByPhone`,
method: 'get'
}
}
}
...@@ -7,6 +7,10 @@ export default { ...@@ -7,6 +7,10 @@ export default {
'selectColour':{ 'selectColour':{
url: `${baseUrl}/selectColour`, url: `${baseUrl}/selectColour`,
method: 'get' method: 'get'
},
'selectColourByPlatform':{
url: `${baseUrl}/selectColourByPlatform`,
method: 'get'
} }
} }
} }
...@@ -51,6 +51,10 @@ export default { ...@@ -51,6 +51,10 @@ export default {
url: `${baseUrl}/oneClickListing`, url: `${baseUrl}/oneClickListing`,
method: 'post' method: 'post'
}, },
'batchDel':{
url: `${baseUrl}/batchDel`,
method: 'post'
},
'unlisted':{ 'unlisted':{
url: `${baseUrl}/unlisted`, url: `${baseUrl}/unlisted`,
method: 'post' method: 'post'
......
...@@ -17,6 +17,7 @@ import modelingTaskColorLibrary from './apiList/modelingTaskColorLibrary' ...@@ -17,6 +17,7 @@ import modelingTaskColorLibrary from './apiList/modelingTaskColorLibrary'
import plm from './apiList/plm' import plm from './apiList/plm'
import mdm from './apiList/mdm' import mdm from './apiList/mdm'
// import auth from './apiList/auth'
export default { export default {
...base, ...base,
......
...@@ -125,17 +125,14 @@ ...@@ -125,17 +125,14 @@
} }
}) })
console.log(uni.upx2px(100), )
uni.getSystemInfo({ uni.getSystemInfo({
success: (result) => { success: (result) => {
this.topHeight = result.safeArea.top this.topHeight = result.safeArea.top
console.log(result.safeArea.top, "result.safeArea.top")
} }
}) })
this.heightpx = uni.upx2px(100) this.heightpx = uni.upx2px(100)
this.resultpx=(this.heightpx-this.topHeight)+'px' this.resultpx=(this.heightpx-this.topHeight)+'px'
console.log(this.resultpx,"this.resultpx") // console.log(this.resultpx,"this.resultpx")
}, },
onShow() { onShow() {
this.id = this.$Route.query.id this.id = this.$Route.query.id
...@@ -179,12 +176,7 @@ ...@@ -179,12 +176,7 @@
}) })
}, },
backPush(){ backPush(){
this.$Router.push({ this.$Router.back()
path: "/pages/home/fabricList",
// query: {
// id: this.id
// }
})
} }
} }
} }
...@@ -295,4 +287,4 @@ ...@@ -295,4 +287,4 @@
} }
} }
</style> </style>
\ No newline at end of file
...@@ -82,12 +82,7 @@ ...@@ -82,12 +82,7 @@
// duration: 2000 // duration: 2000
}); });
setTimeout(() => { setTimeout(() => {
this.$Router.push({ this.$Router.back();
path: "/pages/home/detail",
query: {
id: this.id
}
})
}, 1000) }, 1000)
} else { } else {
uni.showToast({ uni.showToast({
...@@ -136,4 +131,4 @@ ...@@ -136,4 +131,4 @@
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -103,20 +103,19 @@ ...@@ -103,20 +103,19 @@
:show-action="false" :show-action="false"
></u-search> ></u-search>
</view> </view>
<view <view class="item item--round"
class="item item--round" :class="[`item-bg${index}`]"
v-for="item in list" :key="item.id"
@click=" v-for="(item,index) in list"
$Router.push({ @click="$Router.push({
path: '/pages/order/item', path: '/pages/order/item',
query: { query:{
id: item.enterpriseId, id: item.enterpriseId
}, }
}) })"
"
> >
<view class="u-font-32 u-m-b-8 u-line-1">{{ item.fullName }}</view> <view class="u-font-32 u-m-b-8 u-line-1">{{ item.fullName }}</view>
<view class="u-font-24">更新时间:{{ item.createTime }}</view> <view class="u-font-24">访问时间:{{ item.createTime }}</view>
</view> </view>
<!-- 加载更多 --> <!-- 加载更多 -->
<u-loadmore <u-loadmore
...@@ -351,7 +350,18 @@ export default { ...@@ -351,7 +350,18 @@ export default {
margin-bottom: 20rpx; margin-bottom: 20rpx;
color: #fff; color: #fff;
} }
.item-bg0{
background-image: url(~@/static/images/home/myOrder/bg0.png);
}
.item-bg1{
background-image: url(~@/static/images/home/myOrder/bg1.png);
}
.item-bg2{
background-image: url(~@/static/images/home/myOrder/bg2.png);
}
.item-bg3{
background-image: url(~@/static/images/home/myOrder/bg3.png);
}
.back_img { .back_img {
height: 486rpx; height: 486rpx;
width: 100%; width: 100%;
......
...@@ -118,6 +118,7 @@ export default { ...@@ -118,6 +118,7 @@ export default {
} = data; } = data;
this.userData = data; this.userData = data;
uni.setStorageSync('tenantId', data.tenantId); uni.setStorageSync('tenantId', data.tenantId);
uni.setStorageSync('identityType', data.identityType);
uni.setStorageSync('assignType', data.identityType); uni.setStorageSync('assignType', data.identityType);
if(userId && enterpriseId){ if(userId && enterpriseId){
this.createToken(data); this.createToken(data);
......
This diff is collapsed.
...@@ -22,16 +22,12 @@ ...@@ -22,16 +22,12 @@
<!--<e-canvas ref="eCanvasHelp" ></e-canvas>--> <!--<e-canvas ref="eCanvasHelp" ></e-canvas>-->
<e-canvas ref="eCanvasHelp" style="position: fixed;top: -100000px;"></e-canvas> <e-canvas ref="eCanvasHelp" style="position: fixed;top: -100000px;"></e-canvas>
<!--部位编辑的时候显示 --> <!--部位编辑的时候显示 -->
<!-- <image--> <image
<!-- v-show="isPartEdit || !isEditMode"--> v-show="!isEditMode"
<!-- :style="{--> :src="`${activePartPicCode}`"
<!-- '&#45;&#45;src': `url(${activeBgPic})`,--> mode="heightFix"
<!-- '&#45;&#45;transform': `rotate(${angle}deg)`,--> class="height-750rpx view"
<!-- }"--> ></image>
<!-- :src="`${activePartPicCode}`"-->
<!-- mode="heightFix"-->
<!-- class="height-750rpx view"-->
<!-- ></image>-->
</view> </view>
<view v-if="!isEdit"> <view v-if="!isEdit">
<view <view
...@@ -76,6 +72,7 @@ ...@@ -76,6 +72,7 @@
<!--角度调整--> <!--角度调整-->
</view> </view>
<view class=""> <view class="">
<!-- <button @click="debuggerBug">调整link</button>-->
<!--可调整部位--> <!--可调整部位-->
<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">
...@@ -100,7 +97,7 @@ ...@@ -100,7 +97,7 @@
<u-search <u-search
placeholder="请输入面料名称" placeholder="请输入面料名称"
v-model="keyword" v-model="keyword"
border-color="#e1e1e1" border-color="#e1e1e1" @search="search"
height="76" height="76"
bg-color="#fff" bg-color="#fff"
:show-action="false" :show-action="false"
...@@ -157,7 +154,7 @@ ...@@ -157,7 +154,7 @@
<view <view
class="image u-m-r-10" class="image u-m-r-10"
:class="[ :class="[
activeMainPartBodyColorId === color.id activeMainPartBodyColorId === color.mdmMaterialColourId
? 'active' ? 'active'
: '', : '',
]" ]"
...@@ -198,7 +195,7 @@ ...@@ -198,7 +195,7 @@
:class="[ :class="[
mainPartOtherColor mainPartOtherColor
.map((item) => item.mdmMaterialColourId) .map((item) => item.mdmMaterialColourId)
.indexOf(color.id) > -1 .indexOf(color.mdmMaterialColourId) > -1
? 'active' ? 'active'
: '', : '',
]" ]"
...@@ -333,9 +330,11 @@ export default { ...@@ -333,9 +330,11 @@ export default {
}, },
// 部位 // 部位
parts() { parts() {
return (this.detail.styleLibraryPictureVOList || []).sort((a, b) => { let $data = this.detail.styleLibraryPictureVOList || [];
return a.isMainBodyPart - b.isMainBodyPart < -1; $data.sort((a, b) => {
return b.isMainBodyPart - a.isMainBodyPart;
}); });
return $data;
}, },
selectedMaterialItemColors() { selectedMaterialItemColors() {
return (this.selectedMaterialItem.materialColourVOList || []) return (this.selectedMaterialItem.materialColourVOList || [])
...@@ -385,7 +384,7 @@ export default { ...@@ -385,7 +384,7 @@ export default {
return this.defaultColorList.map((item) => { return this.defaultColorList.map((item) => {
return { return {
...item, ...item,
mdmMaterialColourId: item.id, mdmMaterialColourId: item.colourId,
}; };
}); });
} }
...@@ -421,33 +420,68 @@ export default { ...@@ -421,33 +420,68 @@ export default {
this.getMaterialList(); this.getMaterialList();
}, },
onReady() { onShow() {
this.$nextTick(async ()=>{ this.$nextTick(async ()=>{
await this.getItem(this.id); await this.getItem(this.id);
let canvas = this.$refs.eCanvas;
let BASE_URL = this.getBaseUrl();
await canvas.init({
canvas_id: "eCanvas",
canvas_width: 375,
canvas_height: 375,
path: `${BASE_URL}${this.detail.originalImageCode}`
})
await this.$refs['eCanvasHelp'].init({
canvas_id: "eCanvasHelp",
canvas_width: 375,
canvas_height: 375,
path: `${BASE_URL}${this.detail.originalImageCode}`
})
let sources = [`${BASE_URL}${this.detail.originalImageCode}`].concat( if(this.imgMergeTasks.length === 0){
this.parts.map((item) => `${BASE_URL}${item.pictureCode}`) let canvas = this.$refs.eCanvas;
); let BASE_URL = this.getBaseUrl();
await canvas.mergeImages(sources); await canvas.init({
this.isPartEdit = false; canvas_id: "eCanvas",
this.initImageTasks(this.parts) canvas_width: 375,
}) canvas_height: 375,
path: `${BASE_URL}${this.detail.originalImageCode}`
})
await this.$refs['eCanvasHelp'].init({
canvas_id: "eCanvasHelp",
canvas_width: 375,
canvas_height: 375,
path: `${BASE_URL}${this.detail.originalImageCode}`
})
let sources = [`${BASE_URL}${this.detail.originalImageCode}`].concat(
this.parts.map((item) => `${BASE_URL}${item.pictureCode}`)
);
// await canvas.clearCanvas()
await canvas.mergeImages(sources);
this.isPartEdit = false;
this.initImageTasks(this.parts)
}
});
}, },
methods: { methods: {
debuggerBug(){
this.$nextTick(async ()=>{
let canvas = this.$refs.eCanvas;
let BASE_URL = this.getBaseUrl();
await canvas.init({
canvas_id: "eCanvas",
canvas_width: 375,
canvas_height: 375,
path: `${BASE_URL}${this.detail.originalImageCode}`
})
await this.$refs['eCanvasHelp'].init({
canvas_id: "eCanvasHelp",
canvas_width: 375,
canvas_height: 375,
path: `${BASE_URL}${this.detail.originalImageCode}`
})
let sources = [`${BASE_URL}${this.detail.originalImageCode}`].concat(
this.parts.map((item) => `${BASE_URL}${item.pictureCode}`)
);
// await canvas.clearCanvas()
await canvas.mergeImages(sources);
this.isPartEdit = false;
this.initImageTasks(this.parts)
});
},
search(){
this.getMaterialList({
codeAndName: this.keyword
})
},
getBaseUrl(){ getBaseUrl(){
// #ifdef H5 // #ifdef H5
return process.env.NODE_ENV === 'development' ? '/images/': '' return process.env.NODE_ENV === 'development' ? '/images/': ''
...@@ -456,7 +490,6 @@ export default { ...@@ -456,7 +490,6 @@ export default {
return this.$IMG_URL; return this.$IMG_URL;
// #endif // #endif
}, },
// todo
uploadImg(base64) { uploadImg(base64) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.request({ uni.request({
...@@ -520,17 +553,28 @@ export default { ...@@ -520,17 +553,28 @@ export default {
}, },
// 保存临时的图片用来预览 // 保存临时的图片用来预览
async createImgMergeTask(part,color,callback){ async createImgMergeTask(part,color,callback){
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
let index = this.imgMergeTasks.findIndex((item) => part.id === item.part.id); let index = this.imgMergeTasks.findIndex((item) => part.id === item.part.id);
let BASE_URL = this.getBaseUrl(); let BASE_URL = this.getBaseUrl();
let canvas = this.$refs['eCanvasHelp']; let canvas = this.$refs['eCanvasHelp'];
await canvas.clearCanvas(); await canvas.clearCanvas();
await canvas.mergeImageByImg(`${BASE_URL}${part.pictureCode}`,`${BASE_URL}${color.fileCode}`); // // 第一版
// await canvas.mergeImageByImgPattern(`${BASE_URL}${part.pictureCode}`,`${BASE_URL}${color.fileCode}`);
// // 第二版
await canvas.mergeImageByImgPattern(`${BASE_URL}${part.pictureCode}`,`${BASE_URL}${color.fileCode}`);
let step01 = await canvas.exportImg();
await canvas.drawImageInApp(step01,`${BASE_URL}${part.pictureCode}`);
// 第三版
// await canvas.mergeImageByImgPatternInApp(`${BASE_URL}${part.pictureCode}`,`${BASE_URL}${color.fileCode}`);
let base64 = await canvas.exportImg(); let base64 = await canvas.exportImg();
let item = { let item = {
part, part,
color, color,
...@@ -540,8 +584,9 @@ export default { ...@@ -540,8 +584,9 @@ export default {
if(index === -1){ if(index === -1){
this.imgMergeTasks.push(item) this.imgMergeTasks.push(item)
}else{ }else{
this.imgMergeTasks.splice(index,1,item) this.imgMergeTasks.splice(index,1,item);
} }
if(callback){ if(callback){
callback(); callback();
} }
...@@ -602,6 +647,7 @@ export default { ...@@ -602,6 +647,7 @@ export default {
this.imgMergeTasks.map((item) => item.base64Code) this.imgMergeTasks.map((item) => item.base64Code)
); );
await canvas.mergeImages(sources); await canvas.mergeImages(sources);
// console.log(canvas)
}, },
// //
setMaterialItem() { setMaterialItem() {
...@@ -621,7 +667,6 @@ export default { ...@@ -621,7 +667,6 @@ export default {
this.activeColor, this.activeColor,
this.selectedMaterialItemColors this.selectedMaterialItemColors
); );
this.isEdit = false;
}else{ }else{
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请选择一个颜色' title: '请选择一个颜色'
...@@ -638,7 +683,7 @@ export default { ...@@ -638,7 +683,7 @@ export default {
this.activeColor = { this.activeColor = {
...color, ...color,
materialId: this.selectedMaterialItem.id, materialId: this.selectedMaterialItem.id,
mdmMaterialColourId: color.id, mdmMaterialColourId: color.colourId,
}; };
this.setMaterialItem() this.setMaterialItem()
}, },
...@@ -661,26 +706,40 @@ export default { ...@@ -661,26 +706,40 @@ export default {
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
// #ifdef APP-PLUS
let url = await this.$refs['eCanvas'].exportImg();
const base64 = await this.$refs['eCanvas'].readFile(url);
// #endif
// #ifdef H5
let base64 = await this.$refs['eCanvas'].exportImg(); let base64 = await this.$refs['eCanvas'].exportImg();
// #endif
let res = await this.uploadImg(base64); let res = await this.uploadImg(base64);
// return;
this.$http("stylelibraryorder.addToShelves", Object.assign({},data,{fileCode: res.fileCode})).then((res) => { if(res.fileCode){
let { code, msg } = res; let submitData = Object.assign({},data,{fileCode: res.fileCode});
if (code === 200) { this.$http("stylelibraryorder.addToShelves", submitData).then((res) => {
this.pageReload(); let { code, msg } = res;
} else { if (code === 200) {
this.$refs.uToast.show({ this.pageReload();
title: msg, } else {
}); this.$refs.uToast.show({
} title: msg,
}).then(() =>{ });
}
}).then(() =>{
uni.hideLoading()
})
}else{
uni.hideLoading() uni.hideLoading()
}) }
}, },
// 取消上架 // 取消上架
cancel() { cancel() {
this.$http("stylelibraryorder.unlisted", { this.$http("stylelibraryorder.unlisted", {
id: this.detail.styleOrderId, id: this.detail.styleOrderId,
isStyle: 1
}).then((res) => { }).then((res) => {
let { code, msg } = res; let { code, msg } = res;
if (code === 200) { if (code === 200) {
...@@ -981,6 +1040,7 @@ export default { ...@@ -981,6 +1040,7 @@ export default {
color: #d5aa7a; color: #d5aa7a;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
background: #fff;
box-shadow: 0px 2rpx 8rpx 0px rgba(0, 0, 0, 0.1); box-shadow: 0px 2rpx 8rpx 0px rgba(0, 0, 0, 0.1);
bottom: 60rpx; bottom: 60rpx;
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<view class="item-img"> <view class="item-img">
<image :src="`${$IMG_URL}${item.originalImageCode}`" mode="widthFix"></image> <image :src="`${$IMG_URL}${item.originalImageCode}`" mode="widthFix"></image>
</view> </view>
<view class="u-flex-1 u-p-l-20"> <view class="item-content u-flex-1 u-p-l-20">
<view class="item-title u-line-1 u-font-28">{{item.styleTag}}</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>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<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">
<!-- {{ item.createTime}}--> {{ detail.styleOrderCode}}
</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">
...@@ -236,6 +236,9 @@ $main-color: #fff; ...@@ -236,6 +236,9 @@ $main-color: #fff;
height: 160rpx; height: 160rpx;
//height: 100% //height: 100%
} }
&-content{
width: calc(100% - 160rpx)
}
&-title{} &-title{}
&-desc{} &-desc{}
&-tags{ &-tags{
......
...@@ -19,9 +19,12 @@ ...@@ -19,9 +19,12 @@
</view> </view>
</view> </view>
<!-- 列表 确定--> <!-- 列表 确定-->
<view class="body u-p-r-30 u-p-l-30" :style="{ bottom: footerHeight+ 'px', top: headerHeight + 'px' }"> <scroll-view class="body u-p-r-30 u-p-l-30"
:scroll-y="true"
@scrolltolower="loadMore"
:style="{ bottom: footerHeight+ 'px', top: headerHeight + 'px' }">
<view class="u-p-t-24 u-p-b-24"> <view class="u-p-t-24 u-p-b-24">
{{statusList[activeStatus].label }}上架单:{{list.length}}单 {{statusList[activeStatus].label }}上架单:{{pageOptions.pages}}单
</view> </view>
<view v-for="(item) in list" :key="item.id" <view v-for="(item) in list" :key="item.id"
@click="goEntrustItemPage(item)" @click="goEntrustItemPage(item)"
...@@ -45,6 +48,13 @@ ...@@ -45,6 +48,13 @@
<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.quantity}}款</text> <text class="item-desc-value">{{item.quantity}}款</text>
</view> </view>
<view class="item-images">
<view class="item-image" v-for="img in item.effectPictureCodeList">
<image
:src="`${$IMG_URL}${img}`" style="width: 100%;height: 100%"></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">
...@@ -54,7 +64,9 @@ ...@@ -54,7 +64,9 @@
</view> </view>
<view class="item-buttons u-flex-1 u-flex" > <view class="item-buttons u-flex-1 u-flex" >
<!-- v-if="item.putawayStatus === 3"--> <!-- v-if="item.putawayStatus === 3"-->
<view class="button button-plain button-plain--default u-m-r-20" @click.stop="cancel(item)" >取消上架</view> <view class="button button-plain button-plain--default u-m-r-20"
v-if="item.status !== 3"
@click.stop="cancel(item)" >取消上架</view>
<view class="button button-default" v-if="item.status === 1" @click.stop="toPay(item)">付款</view> <view class="button button-default" v-if="item.status === 1" @click.stop="toPay(item)">付款</view>
</view> </view>
</view> </view>
...@@ -66,7 +78,7 @@ ...@@ -66,7 +78,7 @@
marginTop="100rpx" marginTop="100rpx"
:image="emptyImage"></hs-empty> :image="emptyImage"></hs-empty>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </scroll-view>
</view> </view>
</template> </template>
...@@ -95,7 +107,12 @@ export default { ...@@ -95,7 +107,12 @@ export default {
list: [] list: []
} }
}, },
created() { onShow() {
this.pageOptions = {
current: 1,
size: 10,
pages: 10,
}
this.getList() this.getList()
}, },
computed:{ computed:{
...@@ -116,6 +133,12 @@ export default { ...@@ -116,6 +133,12 @@ export default {
this.activeStatus = index; this.activeStatus = index;
this.getList(true); this.getList(true);
}, },
loadMore(){
if (this.pageOptions.current < this.pageOptions.pages) {
this.pageOptions.current += 1;
this.getList(false);
}
},
getList(isReload){ getList(isReload){
this.loadStatus = 'loading'; this.loadStatus = 'loading';
this.$http("stylelibraryorder.listingList",{ this.$http("stylelibraryorder.listingList",{
...@@ -131,14 +154,15 @@ export default { ...@@ -131,14 +154,15 @@ export default {
this.pageOptions.pages = data.total; this.pageOptions.pages = data.total;
this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore'; this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore';
}else{ }else{
this.list = [] this.list = isReload ? [] : this.list;
this.pageOptions.pages = isReload ? 0 : this.pageOptions.pages;
this.loadStatus = 'nomore'; this.loadStatus = 'nomore';
} }
} }
}) })
}, },
cancel(item){ cancel(item){
this.$http("stylelibraryorder.unlisted", { id: item.id}) this.$http("stylelibraryorder.unlisted", { id: item.id, isStyle:2})
.then(res => { .then(res => {
let { let {
code,msg code,msg
...@@ -214,6 +238,7 @@ $subColor: rgba(0,0,0,0.40); ...@@ -214,6 +238,7 @@ $subColor: rgba(0,0,0,0.40);
&-body{ &-body{
} }
&-desc{ &-desc{
&-label{ &-label{
color: $subColor; color: $subColor;
...@@ -227,6 +252,7 @@ $subColor: rgba(0,0,0,0.40); ...@@ -227,6 +252,7 @@ $subColor: rgba(0,0,0,0.40);
height: 160rpx; height: 160rpx;
border-radius: 8rpx; border-radius: 8rpx;
margin-right: 20rpx; margin-right: 20rpx;
display: inline-block;
} }
} }
&-hr{ &-hr{
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</view> </view>
<view class="u-p-30"> <view class="u-p-30">
<u-search placeholder="请输入款式名称或面料名称" v-model="keyword" <u-search placeholder="请输入款式名称或面料名称" v-model="keyword"
border-color="#e1e1e1" height="76" border-color="#e1e1e1" height="76" @search="search"
bg-color="#fff" :show-action="false"></u-search> bg-color="#fff" :show-action="false"></u-search>
</view> </view>
<view class="status-list u-flex bg-fff"> <view class="status-list u-flex bg-fff">
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
width="100%" height="100%" width="100%" height="100%"
:src="`${$IMG_URL}${item.originalImageCode}`"></u-image> :src="`${$IMG_URL}${item.originalImageCode}`"></u-image>
</view> </view>
<view class="u-flex-1 u-p-l-20"> <view class="u-flex-1 u-p-l-20 item-content">
<view class="item-title u-line-1 u-font-28">{{ item.materialName}}</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">
...@@ -112,8 +112,8 @@ ...@@ -112,8 +112,8 @@
width="100%" height="100%" width="100%" height="100%"
:src="`${$IMG_URL}${item.originalImageCode}`"></u-image> :src="`${$IMG_URL}${item.originalImageCode}`"></u-image>
</view> </view>
<view class="u-flex-1 u-p-l-20"> <view class="u-flex-1 u-p-l-20 item-content">
<view class="item-title u-line-1 u-font-28">{{ item.materialName }}</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">
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
<view class="footer-btn"> <view class="footer-btn">
<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" @click="delItem">删除</view>
<view class="custom-style-right submit" @click="submit"> <view class="custom-style-right submit" @click="submit">
一键上架({{selected.length}}) 一键上架({{selected.length}})
</view> </view>
...@@ -287,9 +287,22 @@ export default { ...@@ -287,9 +287,22 @@ export default {
// this.getList(); // this.getList();
// }, // },
onShow(){ onShow(){
this.getList(); this.pageOptions = {
current: 1,
size: 10,
pages: 0
};
this.getList(true);
}, },
methods:{ methods:{
search(){
this.pageOptions = {
current: 1,
size: 10,
pages: 0,
};
this.getList(true)
},
goItem({id}){ goItem({id}){
this.$Router.push({ this.$Router.push({
path: '/pages/material/entrustManagementItem', path: '/pages/material/entrustManagementItem',
...@@ -298,6 +311,32 @@ export default { ...@@ -298,6 +311,32 @@ export default {
} }
}) })
}, },
delItem(){
if(this.selectedIds.length === 0){
this.$refs.uToast.show({
title: '请选择一个款式'
})
return;
}
this.$http("stylelibraryorder.batchDel", this.selectedIds)
.then(res => {
let {
code,msg
} = res;
if(code === 200){
this.pageOptions = {
current: 1,
size: 10,
pages: 0,
};
this.getList(true);
}else{
this.$refs.uToast.show({
title: msg
})
}
})
},
submit(){ submit(){
if(this.selectedIds.length === 0){ if(this.selectedIds.length === 0){
this.$refs.uToast.show({ this.$refs.uToast.show({
...@@ -337,6 +376,11 @@ export default { ...@@ -337,6 +376,11 @@ export default {
setActiveStatus(index){ setActiveStatus(index){
this.activeStatus = index; this.activeStatus = index;
this.resetPage(); this.resetPage();
this.pageOptions = {
current: 1,
size: 10,
pages: 0,
};
this.getList(true); this.getList(true);
}, },
checkSelectedLength({children}){ checkSelectedLength({children}){
...@@ -394,6 +438,7 @@ export default { ...@@ -394,6 +438,7 @@ export default {
}) })
this.$http("stylelibraryorder.getToShelvesManagerList",{ this.$http("stylelibraryorder.getToShelvesManagerList",{
status: this.statusList[this.activeStatus].value, status: this.statusList[this.activeStatus].value,
name: this.keyword,
...this.pageOptions ...this.pageOptions
}) })
.then(res => { .then(res => {
...@@ -404,8 +449,8 @@ export default { ...@@ -404,8 +449,8 @@ export default {
this.pageOptions.pages = data.total; this.pageOptions.pages = data.total;
this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore'; this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore';
}else{ }else{
this.list = this.list.concat([]); this.list = isReload ? [] : this.list.concat([]);
this.pageOptions.pages = 0; this.pageOptions.pages = isReload ? 0 : this.pageOptions.pages;
this.loadStatus = 'nomore'; this.loadStatus = 'nomore';
} }
} }
...@@ -454,6 +499,9 @@ $main-color: #fff; ...@@ -454,6 +499,9 @@ $main-color: #fff;
height: 160rpx; height: 160rpx;
//height: 100% //height: 100%
} }
&-content{
width: calc(100% - 160rpx)
}
&-title{} &-title{}
&-desc{} &-desc{}
&-tags{ &-tags{
......
<template> <template>
<view> <view>
<view> <view :style="{'margin-top': top +'px'}">
<u-image height="750rpx" :src="`${$IMG_URL}${item.originalImageCode}`"></u-image> <u-image height="750rpx" :src="`${$IMG_URL}${item.effectPictureCode}`"></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">{{ item.styleTag}}</text> <text class="u-flex-1">{{ item.styleTag}}</text>
<text class="active">{{item.status | filterStatus}}</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">{{ item.styleCode}}</text> <text class="u-flex-1 u-font-28">{{ item.styleCode}}</text>
...@@ -36,11 +36,11 @@ ...@@ -36,11 +36,11 @@
<view class="image-tip u-line-1">{{mainPic.describes}}</view> <view class="image-tip u-line-1">{{mainPic.describes}}</view>
</view> </view>
</view> </view>
<view class="overflow u-flex-1"> <view class="u-m-l-10 overflow u-flex-1">
<view>其他颜色</view> <view>其他颜色</view>
<view> <view>
<view class="image u-m-r-10" v-for="pic in subPic" :key="pic.id"> <view class="image u-m-r-10" v-for="pic in subPic" :key="pic.id">
<image :src="`${$IMG_URL}${item.fileCode}`" style="width: 100%;height: 100%"></image> <image :src="`${$IMG_URL}${pic.fileCode}`" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">{{pic.describes}}</view> <view class="image-tip u-line-1">{{pic.describes}}</view>
</view> </view>
</view> </view>
...@@ -53,11 +53,13 @@ ...@@ -53,11 +53,13 @@
<script> <script>
import HsMaterialThumbnail from "@/components/hs-material-thumbnail/hs-material-thumbnail"; import HsMaterialThumbnail from "@/components/hs-material-thumbnail/hs-material-thumbnail";
import { mapGetters} from 'vuex'
export default { export default {
name: "entrustManagementItem", name: "entrustManagementItem",
components: {HsMaterialThumbnail}, components: {HsMaterialThumbnail},
data(){ data(){
return{ return{
top: 0,
item:{ item:{
createTime: '', createTime: '',
colourApiList: [] colourApiList: []
...@@ -65,6 +67,7 @@ export default { ...@@ -65,6 +67,7 @@ export default {
} }
}, },
computed:{ computed:{
...mapGetters(['categoryDictionary']),
mainPic(){ mainPic(){
// return this.item.colourApiList.filter((item) => item.isMain)[0]; // return this.item.colourApiList.filter((item) => item.isMain)[0];
return this.item.colourApiList.length > 0 ? return this.item.colourApiList.length > 0 ?
...@@ -83,9 +86,9 @@ export default { ...@@ -83,9 +86,9 @@ export default {
materialInfo(){ materialInfo(){
let item = this.item.materialInfo || {}; let item = this.item.materialInfo || {};
return Object.assign({}, item,{ return Object.assign({}, item,{
materialCategory: item.category, materialCategory: (this.categoryDictionary || []).find(i => i.value == item.category)?.label,
materialDoorWidth: item.fabricWidth, materialDoorWidth: item.clothWidth,
materialElement: item.saoriStandard, materialElement: item.component,
}) })
} }
}, },
...@@ -109,6 +112,11 @@ export default { ...@@ -109,6 +112,11 @@ export default {
created() { created() {
let { id} =this.$Route.query; let { id} =this.$Route.query;
this.getItem(id); this.getItem(id);
uni.getSystemInfo({
success:(result) =>{
this.top = result.safeArea.top
}
})
}, },
methods:{ methods:{
getItem(id){ getItem(id){
......
...@@ -11,13 +11,14 @@ export default { ...@@ -11,13 +11,14 @@ export default {
}, },
}, },
methods:{ methods:{
getMaterialList(){ getMaterialList(query){
this.$http("materialinfo.getMaterialList",{ this.$http("materialinfo.getMaterialList",{
isDisabled: false, isDisabled: false,
isFilter: true, isFilter: true,
materialType: "面料", materialType: "面料",
current: 1, current: 1,
size: 10, size: 10,
...query
}).then(res =>{ }).then(res =>{
let { let {
code, data code, data
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<!--新增委托navbar--> <!--新增委托navbar-->
<view class="u-flex-1"> <view class="u-flex-1">
<u-search placeholder="请输入面料名称" v-model="keyword" <u-search placeholder="请输入面料名称" v-model="keyword"
border-color="#e1e1e1" height="76" border-color="#e1e1e1" height="76" @search="search"
bg-color="#fff" :show-action="false"></u-search> bg-color="#fff" :show-action="false"></u-search>
</view> </view>
<image src="@/static/images/search/filter.png" class="filter" <image src="@/static/images/search/filter.png" class="filter"
...@@ -135,8 +135,13 @@ export default { ...@@ -135,8 +135,13 @@ export default {
}, },
onLoad(){ onLoad(){
this.labelListTo(); this.labelListTo();
},
onShow(){
this.pageOptions = {
current: 1,
size: 10,
};
this.getList(); this.getList();
}, },
computed:{ computed:{
isEmpty(){ isEmpty(){
...@@ -174,7 +179,7 @@ export default { ...@@ -174,7 +179,7 @@ export default {
current: 1, current: 1,
size: 10, size: 10,
} }
this.getList(); this.getList([],true);
}, },
getList(materialTagIdList = [],isReload = false){ getList(materialTagIdList = [],isReload = false){
this.loadStatus = 'loading'; this.loadStatus = 'loading';
...@@ -192,7 +197,7 @@ export default { ...@@ -192,7 +197,7 @@ export default {
this.pageOptions.pages = data.total; this.pageOptions.pages = data.total;
this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore'; this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore';
}else{ }else{
// this.list = [] this.list = isReload ? [] : this.list;
this.loadStatus = 'nomore'; this.loadStatus = 'nomore';
} }
} }
......
...@@ -169,18 +169,9 @@ ...@@ -169,18 +169,9 @@
</template> </template>
</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="u-p-t-20 u-p-r-30 u-p-b-20 u-p-l-30" :style="{--> <view class="u-height-100 color--tree">
<!-- background:'whitesmoke'-->
<!-- } ">-->
<!-- <u-search-->
<!-- :show-action="false"-->
<!-- bg-color="#fff"-->
<!-- placeholder="请输入颜色名称"-->
<!-- ></u-search>-->
<!-- </view>-->
<scroll-view scroll-y="true" class="u-height-100 color--tree">
<view class="u-flex u-col-top u-height-100"> <view class="u-flex u-col-top u-height-100">
<view class="left u-border-right u-height-100"> <scroll-view class="left u-border-right u-height-100 u-width-100" :scroll-y="true">
<view class="color--tree-label u-line-1" <view class="color--tree-label u-line-1"
@click="activeColorsTab = index" @click="activeColorsTab = index"
:class="[ activeColorsTab === index ? 'active': '']" :class="[ activeColorsTab === index ? 'active': '']"
...@@ -190,8 +181,8 @@ ...@@ -190,8 +181,8 @@
({{color.children.filter((item) => {return checkedList.indexOf(item.id) > -1}).length }}) ({{color.children.filter((item) => {return checkedList.indexOf(item.id) > -1}).length }})
</text> </text>
</view> </view>
</view> </scroll-view>
<view class="right u-flex-1 color--tree-children"> <scroll-view class="right u-flex-1 color--tree-children" :scroll-y="true">
<view class="tree-item grid-content" <view class="tree-item grid-content"
@click="selectColor(item)" @click="selectColor(item)"
v-for="(item) in activeColorTree"> v-for="(item) in activeColorTree">
...@@ -209,17 +200,9 @@ ...@@ -209,17 +200,9 @@
<view class="u-line-1 float-left">{{ item.pantoneEncode}}</view> <view class="u-line-1 float-left">{{ item.pantoneEncode}}</view>
</view> </view>
</view> </view>
</view> </scroll-view>
</view> </view>
</view>
<!-- <view class="pre-item pre-item&#45;&#45;80 u-relative"-->
<!-- :class="[color.checked ? 'active': '']"-->
<!-- @click="selectColor(color)"-->
<!-- v-for="(color,index) in computedModelingTaskColorLibraryList" :key="index">-->
<!-- <image class="pre-item-image" :src="`${imgUrl}${color.pictureCode}`" mode="aspectFill"></image>-->
<!-- <text class="u-absolute pre-item-text text-center">{{ color.colorName }}</text>-->
<!-- </view>-->
</scroll-view>
</view> </view>
<!--底部按钮--> <!--底部按钮-->
<view class="footer"> <view class="footer">
...@@ -296,19 +279,19 @@ export default { ...@@ -296,19 +279,19 @@ export default {
// 可以单个或者同时写两个触发验证方式 // 可以单个或者同时写两个触发验证方式
trigger: ['change','blur'], trigger: ['change','blur'],
}, },
{ // {
// reg '^[a-zA-Z\u4e00-\u9fa5][a-zA-Z0-9\u4e00-\u9fa5]*$', // // reg '^[a-zA-Z\u4e00-\u9fa5][a-zA-Z0-9\u4e00-\u9fa5]*$',
// 自定义验证函数,见上说明 // // 自定义验证函数,见上说明
validator: (rule, value, callback) => { // validator: (rule, value, callback) => {
// 返回true表示校验通过,返回false表示不通过 // // 返回true表示校验通过,返回false表示不通过
// fix 2022-02-07 放开特殊符号英文限制 需求 卓总 // // fix 2022-02-07 放开特殊符号英文限制 需求 卓总
// let reg = new RegExp('^[\u4e00-\u9fa5][a-zA-Z0-9\u4e00-\u9fa5]*$') // // let reg = new RegExp('^[\u4e00-\u9fa5][a-zA-Z0-9\u4e00-\u9fa5]*$')
let reg = new RegExp('^[-()%a-zA-Z\u4e00-\u9fa5][-()%a-zA-Z0-9\u4e00-\u9fa5]*$') // let reg = new RegExp('^[-()%a-zA-Z\u4e00-\u9fa5][-()%a-zA-Z0-9\u4e00-\u9fa5]*$')
return reg.test(value); // return reg.test(value);
}, // },
message: '请不要输入特殊符号', // message: '请不要输入特殊符号',
trigger: ['change','blur'], // trigger: ['change','blur'],
} // }
], ],
modelingCategoryText: [ modelingCategoryText: [
{ {
...@@ -561,7 +544,7 @@ export default { ...@@ -561,7 +544,7 @@ export default {
} }
return newList; return newList;
} }
this.$http("colour.selectColour", { color: "" }).then((res) => { this.$http("colour.selectColourByPlatform", { color: "" }).then((res) => {
let { code, data } = res; let { code, data } = res;
if (code === 200) { if (code === 200) {
this.colorsSource = data; this.colorsSource = data;
...@@ -633,9 +616,12 @@ export default { ...@@ -633,9 +616,12 @@ export default {
}) })
}, },
submit(type){ submit(type){
let {modelingTaskPictureDTOList, ...onther} = this.detail; let {modelingTaskPictureDTOList, ...other} = this.detail;
uni.showLoading({
mask: true
})
this.$http("modeling.submit",Object.assign({}, this.$http("modeling.submit",Object.assign({},
onther, other,
{ {
designAgencyColourQuantity: this.designAgencyColourQuantity, designAgencyColourQuantity: this.designAgencyColourQuantity,
operationType:type, operationType:type,
...@@ -647,6 +633,7 @@ export default { ...@@ -647,6 +633,7 @@ export default {
if(code === 200){ if(code === 200){
this.$refs.uToast.show({ this.$refs.uToast.show({
title: msg, title: msg,
duration: 100,
back: true back: true
}); });
}else{ }else{
...@@ -654,13 +641,40 @@ export default { ...@@ -654,13 +641,40 @@ export default {
title: msg title: msg
}); });
} }
}).then(res =>{
uni.hideLoading()
}) })
}, },
getDefaultColor(){ getDefaultColor(){
return { colourName: '',isDeleted: false} return { colourName: '',isDeleted: false}
}, },
createColor(value){
let res = []
for (let i = 0; i < value; i++) {
res.push(this.getDefaultColor())
}
return res;
},
addModelingTaskColourDTOList(item){ addModelingTaskColourDTOList(item){
// let $target = this.detail.modelingTaskColourDTOList,
// length = $target.length;
// // 比较前后 数据差
// if(item.value > length){
// // 新增了指定颜色
// let num = item.value - length;
// let removeTasks = this.detail.modelingTaskMaterialColourList,
// addTasks = this.createColor(num)
//
// for (let i = removeTasks.length - num; i < removeTasks; i++) {
// if(removeTasks[i].id){
// this.$set(removeTasks[i], 'isDeleted',true)
// }
// }
// this.detail.modelingTaskColourDTOList = $target.filter((item) => item.id).concat(addTasks)
// }else if(item.value < length){
// let num = length - item.value;
// }
let res = [],target = this.detail.modelingTaskColourDTOList; let res = [],target = this.detail.modelingTaskColourDTOList;
// 如果存在历史数据 // 如果存在历史数据
for (let i = 0; i < target.length; i++) { for (let i = 0; i < target.length; i++) {
......
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
<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">
<u-input v-model="formData.trackingNumber" placeholder="请选择快递" /> <u-input v-model="formData.trackingNumber" placeholder="请输入快递单号" />
</view> </view>
</view> </view>
</template> </template>
...@@ -658,31 +658,45 @@ export default { ...@@ -658,31 +658,45 @@ export default {
}, },
// 寄样 // 寄样
sendSamples(){ sendSamples(){
this.$http("modeling.sendSamples",{ // if(){
...this.formData, //
modelingTaskId: this.detail.id // }
},"请求中").then(res =>{ if(this.formData.trackingNumber && this.formData.courier){
let { this.$http("modeling.sendSamples",{
code ,msg ...this.formData,
} = res; modelingTaskId: this.detail.id
if(code === 200){ },"请求中")
this.$refs.uToast.show({ .then(res =>{
title: msg, let {
back: true code ,msg
}); } = res;
}else{ if(code === 200){
this.$refs.uToast.show({ this.$refs.uToast.show({
title: msg title: msg,
}); back: true
} });
}) }else{
this.$refs.uToast.show({
title: msg
});
}
})
}else{
this.$refs.uToast.show({
title: '快递服务商,快递单号不能为空'
})
}
}, },
confirmHttp(data){ confirmHttp(data){
this.$http("modeling.confirm",{ let $Data = {
...this.detail, ...this.detail,
...data, ...data,
modelingTaskReviewer:this.modelingTaskReviewer modelingTaskReviewer: {
},"请求中").then(res =>{ ...this.modelingTaskReviewer,
modelingTaskId: this.detail.id
}
};
this.$http("modeling.confirm",$Data,"请求中").then(res =>{
let { let {
msg,code msg,code
} = res; } = res;
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<view class="item-img u-relative"> <view class="item-img u-relative">
<image :src="`${$IMG_URL}${item.styleLibraryTaskItemVO.originalImageCode}`" mode="fit" style="width:100%; height: 100%"></image> <image :src="`${$IMG_URL}${item.styleLibraryTaskItemVO.originalImageCode}`" mode="fit" style="width:100%; height: 100%"></image>
</view> </view>
<view class="u-flex-1 u-p-l-20 u-p-r-30 u-border-left"> <view class="item-content u-p-l-20 u-p-r-30 u-border-left">
<view class="item-title u-flex "> <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 class="u-flex-1 u-line-1 u-font-32 u-p-t-20 u-p-b-8">{{item.styleLibraryTaskItemVO.styleTag}}</view>
</view> </view>
...@@ -150,6 +150,9 @@ $main-color: #fff; ...@@ -150,6 +150,9 @@ $main-color: #fff;
height: 160rpx; height: 160rpx;
//height: 100% //height: 100%
} }
&-content{
width: calc(100% - 160rpx);
}
&-title{} &-title{}
&-desc{} &-desc{}
&-tags{ &-tags{
......
...@@ -37,15 +37,45 @@ export default { ...@@ -37,15 +37,45 @@ export default {
components: { HsTabBar }, components: { HsTabBar },
data() { data() {
return { return {
msg: uni.getStorageSync("userInfo"), msg: {
type: uni.getStorageSync("assignType"), fullName: '',
userName: ''
},
type: '',
}; };
}, },
created() { onShow() {
// let msg = uni.getStorageSync("userInfo") this.type = uni.getStorageSync("assignType") || 1;
// console.log(msg) this.getUserInfo();
}, },
methods: { methods: {
getUserInfo(){
let data = {
pcUserId: uni.getStorageSync("pcUserId"),
pcBasicsId: uni.getStorageSync("pcBasicsId"),
tenantId: uni.getStorageSync("tenantId")
};
if(data.pcBasicsId && data.pcUserId){
this.$http(
"user.getItemMsg",
{
...data,
assignType: this.type
}
).then(res =>{
let { code ,data} = res;
if(code === 200){
let {
basics,
contact
} = data;
this.msg.userName = contact[contact.length - 1]?.name || '';
this.msg.fullName = basics.fullName;
}
})
}
},
edit() { edit() {
this.$Router.push({ this.$Router.push({
path: "/pages/user/register/completeInformation", path: "/pages/user/register/completeInformation",
...@@ -61,9 +91,9 @@ export default { ...@@ -61,9 +91,9 @@ export default {
}, },
toRegister() { toRegister() {
this.$Router.push({ this.$Router.push({
path: "/pages/user/register/stepSelectType", path: "/pages/user/register/stepSelectTypeEdit",
query: { query: {
type: this.type, type: this.type
}, },
}); });
}, },
......
...@@ -5,11 +5,11 @@ export default { ...@@ -5,11 +5,11 @@ export default {
uni.setStorageSync('assignType', this.assignType) uni.setStorageSync('assignType', this.assignType)
await this.$store.dispatch("getCategoryList") await this.$store.dispatch("getCategoryList")
if(this.assignType !== 2){ if(this.assignType !== 2){
this.$Router.replace({ this.$Router.replaceAll({
path: '/pages/home/index' path: '/pages/home/index'
}) })
}else{ }else{
this.$Router.replace({ this.$Router.replaceAll({
path: '/pages/brands/brands' path: '/pages/brands/brands'
}) })
} }
......
<!--todo 页面逻辑重新过滤-->
<!-- 完善信息 -->
<template>
<view>
<view class="body" :style="{ bottom: footerHeight + 'px'}">
<!-- 操作step -->
<!-- <view class="u-p-30">-->
<!-- <steps :list="steps" :current="current"></steps>-->
<!-- </view>-->
<!-- 身份选择 -->
<view v-if="current === 0">
<view class="u-p-30">
<user-select :list="userSelect" @change="userSelectCallback"></user-select>
</view>
</view>
</view>
<!-- 底部按钮 -->
<view class="footer" id="footer">
<view class="footer-btn u-p-t-12 u-p-r-60 u-p-b-12 u-p-l-60">
<!-- :class="[assignType === -1 ? 'button&#45;&#45;submit&#45;&#45;disabled' : '' ]"-->
<u-button type="primary" @click="next" shape="circle"
class="button--submit"
:custom-style=" assignType === -1 ? {background: '#b5b5b5 !important'} : {background: '#333 !important'}"
:disabled="assignType === -1"
v-if="current === 0">下一步
</u-button>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import dom from "@/mixins/dom";
import goIndex from "./mixins/goIndex";
import UserSelect from "./components/UserSelect";
import Steps from "./components/Steps";
export default {
name: "register",
components: {Steps, UserSelect},
mixins: [dom,goIndex],
data(){
return{
current: 0,
userSelect: [
{
title: "我是面料供应商",
desc: "Fabric supplier",
imgSrc: "/static/images/index/userSelect/type_1.png",
activeImgSrc: "/static/images/index/userSelect/type_1_active.png",
},
{
title: "我要选款",
desc: "I want to choose",
imgSrc: "/static/images/index/userSelect/type_2.png",
activeImgSrc: "/static/images/index/userSelect/type_2_active.png",
},
{
title: "我是设计机构",
desc: "Design agency",
imgSrc: "/static/images/index/userSelect/type_3.png",
activeImgSrc: "/static/images/index/userSelect/type_3_active.png",
},
{
title: "我是检测机构",
desc: "Testing institutions",
imgSrc: "/static/images/index/userSelect/type_4.png",
activeImgSrc: "/static/images/index/userSelect/type_4_active.png",
}
],
assignType: -1, //身份类型: 1-我是面料供应商 2-我要选款 3-我是设计机构 4-我是检测机构
steps: [
{
title: '第一步',
desc: '选择身份'
},
{
title: '第二步',
desc: '完善信息'
},
{
title: '第三步',
desc: '完成'
}
],
status:{
isBrandOwner: 0, // 我要选款
isDesignAgency: 0, // 完善设计机构信息
isFabricSupplier: 0, //完善面料供应商信息
isTestingFacility: 0, // 完善检测机构信息
},
comData:{
pcBasicsId: '', //PC端注册的企业id
pcUserId: '', //PC端注册的企业id
corporateContactId: '', //企业联系人id
institutionAddressId: '',//企业/机构地址id
},
}
},
onLoad(options) {
this.comData = {
...options,
...{
pcUserId: uni.getStorageSync("pcUserId") || options.pcUserId,
pcBasicsId: uni.getStorageSync("pcBasicsId") || options.pcBasicsId,
tenantId: uni.getStorageSync("tenantId") || options.tenantId,
}
};
uni.setStorageSync("pcUserId", this.comData.pcUserId)
uni.setStorageSync("pcBasicsId",this.comData.pcBasicsId)
uni.setStorageSync("tenantId",this.comData.tenantId)
let {
pcBasicsId,pcUserId
} = this.comData;
if(pcBasicsId && pcUserId){
this.checkStatus();
}
},
mounted() {
this.uGetRect("#footer").then(res =>{
this.footerHeight = res.height;
})
},
methods:{
uGetRect(selector, all) {
return new Promise((resolve) => {
uni.createSelectorQuery()
.in(this)[all ? 'selectAll' : 'select'](selector)
.boundingClientRect((rect) => {
if (all && Array.isArray(rect) && rect.length) {
resolve(rect)
}
if (!all && rect) {
resolve(rect)
}
})
.exec()
})
},
userSelectCallback(type){
this.assignType = type;
},
// 重新选择时 核对当前选中状态
checkStatusByType(assignType){
let{
isBrandOwner, // 我要选款
isDesignAgency, // 完善设计机构信息
isFabricSupplier, //完善面料供应商信息
isTestingFacility, // 完善检测机构信息
} = this.status;
switch (assignType){
case 1:
if(isFabricSupplier){
this.goIndex();
return false;
}else{
return true
}
case 2:
if(isBrandOwner){
this.goIndex();
return false;
}else{
return true
}
case 3:
if(isDesignAgency){
this.goIndex();
return false;
}else{
return true
}
case 4:
if(isTestingFacility){
this.goIndex();
return false;
}else{
return true
}
}
},
next(){
if(this.checkStatusByType(this.assignType)){
this.$Router.push({
path: '/pages/user/register/perfectInformation',
query:{
...this.comData,
type: this.assignType
}
})
}
},
checkStatus(){
this.$http(
"user.checkMagStatus",
this.comData
).then(res =>{
let { code ,data} = res;
if(code === 200){
// 1-面料供应商, 2-品牌商, 3-设计机构, 4-检测机构
let { identityType} = data.userLastIdentity;
if(identityType){
this.assignType = identityType;
this.status = data;
}
}
})
}
}
}
</script>
<style scoped lang="scss">
@import './css/index';
</style>
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