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 {
'selectColour':{
url: `${baseUrl}/selectColour`,
method: 'get'
},
'selectColourByPlatform':{
url: `${baseUrl}/selectColourByPlatform`,
method: 'get'
}
}
}
......@@ -51,6 +51,10 @@ export default {
url: `${baseUrl}/oneClickListing`,
method: 'post'
},
'batchDel':{
url: `${baseUrl}/batchDel`,
method: 'post'
},
'unlisted':{
url: `${baseUrl}/unlisted`,
method: 'post'
......
......@@ -17,6 +17,7 @@ import modelingTaskColorLibrary from './apiList/modelingTaskColorLibrary'
import plm from './apiList/plm'
import mdm from './apiList/mdm'
// import auth from './apiList/auth'
export default {
...base,
......
......@@ -125,17 +125,14 @@
}
})
console.log(uni.upx2px(100), )
uni.getSystemInfo({
success: (result) => {
this.topHeight = result.safeArea.top
console.log(result.safeArea.top, "result.safeArea.top")
}
})
this.heightpx = uni.upx2px(100)
this.resultpx=(this.heightpx-this.topHeight)+'px'
console.log(this.resultpx,"this.resultpx")
// console.log(this.resultpx,"this.resultpx")
},
onShow() {
this.id = this.$Route.query.id
......@@ -179,12 +176,7 @@
})
},
backPush(){
this.$Router.push({
path: "/pages/home/fabricList",
// query: {
// id: this.id
// }
})
this.$Router.back()
}
}
}
......@@ -295,4 +287,4 @@
}
}
</style>
\ No newline at end of file
</style>
......@@ -82,12 +82,7 @@
// duration: 2000
});
setTimeout(() => {
this.$Router.push({
path: "/pages/home/detail",
query: {
id: this.id
}
})
this.$Router.back();
}, 1000)
} else {
uni.showToast({
......@@ -136,4 +131,4 @@
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -103,20 +103,19 @@
:show-action="false"
></u-search>
</view>
<view
class="item item--round"
v-for="item in list"
@click="
$Router.push({
path: '/pages/order/item',
query: {
id: item.enterpriseId,
},
})
"
<view class="item item--round"
:class="[`item-bg${index}`]"
:key="item.id"
v-for="(item,index) in list"
@click="$Router.push({
path: '/pages/order/item',
query:{
id: item.enterpriseId
}
})"
>
<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>
<!-- 加载更多 -->
<u-loadmore
......@@ -351,7 +350,18 @@ export default {
margin-bottom: 20rpx;
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 {
height: 486rpx;
width: 100%;
......
......@@ -118,6 +118,7 @@ export default {
} = data;
this.userData = data;
uni.setStorageSync('tenantId', data.tenantId);
uni.setStorageSync('identityType', data.identityType);
uni.setStorageSync('assignType', data.identityType);
if(userId && enterpriseId){
this.createToken(data);
......
This diff is collapsed.
......@@ -22,16 +22,12 @@
<!--<e-canvas ref="eCanvasHelp" ></e-canvas>-->
<e-canvas ref="eCanvasHelp" style="position: fixed;top: -100000px;"></e-canvas>
<!--部位编辑的时候显示 -->
<!-- <image-->
<!-- v-show="isPartEdit || !isEditMode"-->
<!-- :style="{-->
<!-- '&#45;&#45;src': `url(${activeBgPic})`,-->
<!-- '&#45;&#45;transform': `rotate(${angle}deg)`,-->
<!-- }"-->
<!-- :src="`${activePartPicCode}`"-->
<!-- mode="heightFix"-->
<!-- class="height-750rpx view"-->
<!-- ></image>-->
<image
v-show="!isEditMode"
:src="`${activePartPicCode}`"
mode="heightFix"
class="height-750rpx view"
></image>
</view>
<view v-if="!isEdit">
<view
......@@ -76,6 +72,7 @@
<!--角度调整-->
</view>
<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="title u-flex u-p-t-26 u-p-b-18">
......@@ -100,7 +97,7 @@
<u-search
placeholder="请输入面料名称"
v-model="keyword"
border-color="#e1e1e1"
border-color="#e1e1e1" @search="search"
height="76"
bg-color="#fff"
:show-action="false"
......@@ -157,7 +154,7 @@
<view
class="image u-m-r-10"
:class="[
activeMainPartBodyColorId === color.id
activeMainPartBodyColorId === color.mdmMaterialColourId
? 'active'
: '',
]"
......@@ -198,7 +195,7 @@
:class="[
mainPartOtherColor
.map((item) => item.mdmMaterialColourId)
.indexOf(color.id) > -1
.indexOf(color.mdmMaterialColourId) > -1
? 'active'
: '',
]"
......@@ -333,9 +330,11 @@ export default {
},
// 部位
parts() {
return (this.detail.styleLibraryPictureVOList || []).sort((a, b) => {
return a.isMainBodyPart - b.isMainBodyPart < -1;
let $data = this.detail.styleLibraryPictureVOList || [];
$data.sort((a, b) => {
return b.isMainBodyPart - a.isMainBodyPart;
});
return $data;
},
selectedMaterialItemColors() {
return (this.selectedMaterialItem.materialColourVOList || [])
......@@ -385,7 +384,7 @@ export default {
return this.defaultColorList.map((item) => {
return {
...item,
mdmMaterialColourId: item.id,
mdmMaterialColourId: item.colourId,
};
});
}
......@@ -421,33 +420,68 @@ export default {
this.getMaterialList();
},
onReady() {
onShow() {
this.$nextTick(async ()=>{
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(
this.parts.map((item) => `${BASE_URL}${item.pictureCode}`)
);
await canvas.mergeImages(sources);
this.isPartEdit = false;
this.initImageTasks(this.parts)
})
if(this.imgMergeTasks.length === 0){
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)
}
});
},
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(){
// #ifdef H5
return process.env.NODE_ENV === 'development' ? '/images/': ''
......@@ -456,7 +490,6 @@ export default {
return this.$IMG_URL;
// #endif
},
// todo
uploadImg(base64) {
return new Promise((resolve, reject) => {
uni.request({
......@@ -520,17 +553,28 @@ export default {
},
// 保存临时的图片用来预览
async createImgMergeTask(part,color,callback){
uni.showLoading({
mask: true
})
let index = this.imgMergeTasks.findIndex((item) => part.id === item.part.id);
let BASE_URL = this.getBaseUrl();
let canvas = this.$refs['eCanvasHelp'];
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 item = {
part,
color,
......@@ -540,8 +584,9 @@ export default {
if(index === -1){
this.imgMergeTasks.push(item)
}else{
this.imgMergeTasks.splice(index,1,item)
this.imgMergeTasks.splice(index,1,item);
}
if(callback){
callback();
}
......@@ -602,6 +647,7 @@ export default {
this.imgMergeTasks.map((item) => item.base64Code)
);
await canvas.mergeImages(sources);
// console.log(canvas)
},
//
setMaterialItem() {
......@@ -621,7 +667,6 @@ export default {
this.activeColor,
this.selectedMaterialItemColors
);
this.isEdit = false;
}else{
this.$refs.uToast.show({
title: '请选择一个颜色'
......@@ -638,7 +683,7 @@ export default {
this.activeColor = {
...color,
materialId: this.selectedMaterialItem.id,
mdmMaterialColourId: color.id,
mdmMaterialColourId: color.colourId,
};
this.setMaterialItem()
},
......@@ -661,26 +706,40 @@ export default {
uni.showLoading({
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();
// #endif
let res = await this.uploadImg(base64);
// return;
this.$http("stylelibraryorder.addToShelves", Object.assign({},data,{fileCode: res.fileCode})).then((res) => {
let { code, msg } = res;
if (code === 200) {
this.pageReload();
} else {
this.$refs.uToast.show({
title: msg,
});
}
}).then(() =>{
if(res.fileCode){
let submitData = Object.assign({},data,{fileCode: res.fileCode});
this.$http("stylelibraryorder.addToShelves", submitData).then((res) => {
let { code, msg } = res;
if (code === 200) {
this.pageReload();
} else {
this.$refs.uToast.show({
title: msg,
});
}
}).then(() =>{
uni.hideLoading()
})
}else{
uni.hideLoading()
})
}
},
// 取消上架
cancel() {
this.$http("stylelibraryorder.unlisted", {
id: this.detail.styleOrderId,
isStyle: 1
}).then((res) => {
let { code, msg } = res;
if (code === 200) {
......@@ -981,6 +1040,7 @@ export default {
color: #d5aa7a;
text-align: center;
font-size: 28rpx;
background: #fff;
box-shadow: 0px 2rpx 8rpx 0px rgba(0, 0, 0, 0.1);
bottom: 60rpx;
}
......
......@@ -25,7 +25,7 @@
<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="item-content u-flex-1 u-p-l-20">
<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-m-r-40 label u-font-24">款号</view>
......@@ -63,7 +63,7 @@
<view class="u-flex u-m-t-18 u-m-b-8">
<view class="u-m-r-40 label">订单编号</view>
<view class="u-line-1 u-flex-1 content">
<!-- {{ item.createTime}}-->
{{ detail.styleOrderCode}}
</view>
</view>
<view class="u-flex u-m-t-18 u-m-b-8">
......@@ -236,6 +236,9 @@ $main-color: #fff;
height: 160rpx;
//height: 100%
}
&-content{
width: calc(100% - 160rpx)
}
&-title{}
&-desc{}
&-tags{
......
......@@ -19,9 +19,12 @@
</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">
{{statusList[activeStatus].label }}上架单:{{list.length}}单
{{statusList[activeStatus].label }}上架单:{{pageOptions.pages}}单
</view>
<view v-for="(item) in list" :key="item.id"
@click="goEntrustItemPage(item)"
......@@ -45,6 +48,13 @@
<text class="u-m-r-20 item-desc-label">上架款数</text>
<text class="item-desc-value">{{item.quantity}}款</text>
</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 class="item-hr"></view>
<view class="item-footer u-flex">
......@@ -54,7 +64,9 @@
</view>
<view class="item-buttons u-flex-1 u-flex" >
<!-- 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>
</view>
......@@ -66,7 +78,7 @@
marginTop="100rpx"
:image="emptyImage"></hs-empty>
<u-toast ref="uToast" />
</view>
</scroll-view>
</view>
</template>
......@@ -95,7 +107,12 @@ export default {
list: []
}
},
created() {
onShow() {
this.pageOptions = {
current: 1,
size: 10,
pages: 10,
}
this.getList()
},
computed:{
......@@ -116,6 +133,12 @@ export default {
this.activeStatus = index;
this.getList(true);
},
loadMore(){
if (this.pageOptions.current < this.pageOptions.pages) {
this.pageOptions.current += 1;
this.getList(false);
}
},
getList(isReload){
this.loadStatus = 'loading';
this.$http("stylelibraryorder.listingList",{
......@@ -131,14 +154,15 @@ export default {
this.pageOptions.pages = data.total;
this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore';
}else{
this.list = []
this.list = isReload ? [] : this.list;
this.pageOptions.pages = isReload ? 0 : this.pageOptions.pages;
this.loadStatus = 'nomore';
}
}
})
},
cancel(item){
this.$http("stylelibraryorder.unlisted", { id: item.id})
this.$http("stylelibraryorder.unlisted", { id: item.id, isStyle:2})
.then(res => {
let {
code,msg
......@@ -214,6 +238,7 @@ $subColor: rgba(0,0,0,0.40);
&-body{
}
&-desc{
&-label{
color: $subColor;
......@@ -227,6 +252,7 @@ $subColor: rgba(0,0,0,0.40);
height: 160rpx;
border-radius: 8rpx;
margin-right: 20rpx;
display: inline-block;
}
}
&-hr{
......
......@@ -13,7 +13,7 @@
</view>
<view class="u-p-30">
<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>
</view>
<view class="status-list u-flex bg-fff">
......@@ -62,8 +62,8 @@
width="100%" height="100%"
:src="`${$IMG_URL}${item.originalImageCode}`"></u-image>
</view>
<view class="u-flex-1 u-p-l-20">
<view class="item-title u-line-1 u-font-28">{{ item.materialName}}</view>
<view class="u-flex-1 u-p-l-20 item-content">
<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-m-r-40 label u-font-24">款号</view>
<view class="u-line-1 u-flex-1 content u-font-24">
......@@ -112,8 +112,8 @@
width="100%" height="100%"
:src="`${$IMG_URL}${item.originalImageCode}`"></u-image>
</view>
<view class="u-flex-1 u-p-l-20">
<view class="item-title u-line-1 u-font-28">{{ item.materialName }}</view>
<view class="u-flex-1 u-p-l-20 item-content">
<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-m-r-40 label u-font-24">款号</view>
<view class="u-line-1 u-flex-1 content u-font-24">
......@@ -194,7 +194,7 @@
<view class="footer-btn">
<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">
一键上架({{selected.length}})
</view>
......@@ -287,9 +287,22 @@ export default {
// this.getList();
// },
onShow(){
this.getList();
this.pageOptions = {
current: 1,
size: 10,
pages: 0
};
this.getList(true);
},
methods:{
search(){
this.pageOptions = {
current: 1,
size: 10,
pages: 0,
};
this.getList(true)
},
goItem({id}){
this.$Router.push({
path: '/pages/material/entrustManagementItem',
......@@ -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(){
if(this.selectedIds.length === 0){
this.$refs.uToast.show({
......@@ -337,6 +376,11 @@ export default {
setActiveStatus(index){
this.activeStatus = index;
this.resetPage();
this.pageOptions = {
current: 1,
size: 10,
pages: 0,
};
this.getList(true);
},
checkSelectedLength({children}){
......@@ -394,6 +438,7 @@ export default {
})
this.$http("stylelibraryorder.getToShelvesManagerList",{
status: this.statusList[this.activeStatus].value,
name: this.keyword,
...this.pageOptions
})
.then(res => {
......@@ -404,8 +449,8 @@ export default {
this.pageOptions.pages = data.total;
this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore';
}else{
this.list = this.list.concat([]);
this.pageOptions.pages = 0;
this.list = isReload ? [] : this.list.concat([]);
this.pageOptions.pages = isReload ? 0 : this.pageOptions.pages;
this.loadStatus = 'nomore';
}
}
......@@ -454,6 +499,9 @@ $main-color: #fff;
height: 160rpx;
//height: 100%
}
&-content{
width: calc(100% - 160rpx)
}
&-title{}
&-desc{}
&-tags{
......
<template>
<view>
<view>
<u-image height="750rpx" :src="`${$IMG_URL}${item.originalImageCode}`"></u-image>
<view :style="{'margin-top': top +'px'}">
<u-image height="750rpx" :src="`${$IMG_URL}${item.effectPictureCode}`"></u-image>
</view>
<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="u-flex">
<text class="u-flex-1">{{ item.styleTag}}</text>
<text class="active">{{item.status | filterStatus}}</text>
<!-- <text class="active">{{item.status | filterStatus}}</text>-->
</view>
<view class="u-flex">
<text class="u-flex-1 u-font-28">{{ item.styleCode}}</text>
......@@ -36,11 +36,11 @@
<view class="image-tip u-line-1">{{mainPic.describes}}</view>
</view>
</view>
<view class="overflow u-flex-1">
<view class="u-m-l-10 overflow u-flex-1">
<view>其他颜色</view>
<view>
<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>
</view>
......@@ -53,11 +53,13 @@
<script>
import HsMaterialThumbnail from "@/components/hs-material-thumbnail/hs-material-thumbnail";
import { mapGetters} from 'vuex'
export default {
name: "entrustManagementItem",
components: {HsMaterialThumbnail},
data(){
return{
top: 0,
item:{
createTime: '',
colourApiList: []
......@@ -65,6 +67,7 @@ export default {
}
},
computed:{
...mapGetters(['categoryDictionary']),
mainPic(){
// return this.item.colourApiList.filter((item) => item.isMain)[0];
return this.item.colourApiList.length > 0 ?
......@@ -83,9 +86,9 @@ export default {
materialInfo(){
let item = this.item.materialInfo || {};
return Object.assign({}, item,{
materialCategory: item.category,
materialDoorWidth: item.fabricWidth,
materialElement: item.saoriStandard,
materialCategory: (this.categoryDictionary || []).find(i => i.value == item.category)?.label,
materialDoorWidth: item.clothWidth,
materialElement: item.component,
})
}
},
......@@ -109,6 +112,11 @@ export default {
created() {
let { id} =this.$Route.query;
this.getItem(id);
uni.getSystemInfo({
success:(result) =>{
this.top = result.safeArea.top
}
})
},
methods:{
getItem(id){
......
......@@ -11,13 +11,14 @@ export default {
},
},
methods:{
getMaterialList(){
getMaterialList(query){
this.$http("materialinfo.getMaterialList",{
isDisabled: false,
isFilter: true,
materialType: "面料",
current: 1,
size: 10,
...query
}).then(res =>{
let {
code, data
......
......@@ -15,7 +15,7 @@
<!--新增委托navbar-->
<view class="u-flex-1">
<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>
</view>
<image src="@/static/images/search/filter.png" class="filter"
......@@ -135,8 +135,13 @@ export default {
},
onLoad(){
this.labelListTo();
},
onShow(){
this.pageOptions = {
current: 1,
size: 10,
};
this.getList();
},
computed:{
isEmpty(){
......@@ -174,7 +179,7 @@ export default {
current: 1,
size: 10,
}
this.getList();
this.getList([],true);
},
getList(materialTagIdList = [],isReload = false){
this.loadStatus = 'loading';
......@@ -192,7 +197,7 @@ export default {
this.pageOptions.pages = data.total;
this.loadStatus = this.list.length < data.total ? 'loadmore' : 'nomore';
}else{
// this.list = []
this.list = isReload ? [] : this.list;
this.loadStatus = 'nomore';
}
}
......
......@@ -169,18 +169,9 @@
</template>
</u-navbar>
<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="{-->
<!-- 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-height-100 color--tree">
<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"
@click="activeColorsTab = index"
:class="[ activeColorsTab === index ? 'active': '']"
......@@ -190,8 +181,8 @@
({{color.children.filter((item) => {return checkedList.indexOf(item.id) > -1}).length }})
</text>
</view>
</view>
<view class="right u-flex-1 color--tree-children">
</scroll-view>
<scroll-view class="right u-flex-1 color--tree-children" :scroll-y="true">
<view class="tree-item grid-content"
@click="selectColor(item)"
v-for="(item) in activeColorTree">
......@@ -209,17 +200,9 @@
<view class="u-line-1 float-left">{{ item.pantoneEncode}}</view>
</view>
</view>
</view>
</scroll-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">
......@@ -296,19 +279,19 @@ export default {
// 可以单个或者同时写两个触发验证方式
trigger: ['change','blur'],
},
{
// reg '^[a-zA-Z\u4e00-\u9fa5][a-zA-Z0-9\u4e00-\u9fa5]*$',
// 自定义验证函数,见上说明
validator: (rule, value, callback) => {
// 返回true表示校验通过,返回false表示不通过
// fix 2022-02-07 放开特殊符号英文限制 需求 卓总
// 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]*$')
return reg.test(value);
},
message: '请不要输入特殊符号',
trigger: ['change','blur'],
}
// {
// // reg '^[a-zA-Z\u4e00-\u9fa5][a-zA-Z0-9\u4e00-\u9fa5]*$',
// // 自定义验证函数,见上说明
// validator: (rule, value, callback) => {
// // 返回true表示校验通过,返回false表示不通过
// // fix 2022-02-07 放开特殊符号英文限制 需求 卓总
// // 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]*$')
// return reg.test(value);
// },
// message: '请不要输入特殊符号',
// trigger: ['change','blur'],
// }
],
modelingCategoryText: [
{
......@@ -561,7 +544,7 @@ export default {
}
return newList;
}
this.$http("colour.selectColour", { color: "" }).then((res) => {
this.$http("colour.selectColourByPlatform", { color: "" }).then((res) => {
let { code, data } = res;
if (code === 200) {
this.colorsSource = data;
......@@ -633,9 +616,12 @@ export default {
})
},
submit(type){
let {modelingTaskPictureDTOList, ...onther} = this.detail;
let {modelingTaskPictureDTOList, ...other} = this.detail;
uni.showLoading({
mask: true
})
this.$http("modeling.submit",Object.assign({},
onther,
other,
{
designAgencyColourQuantity: this.designAgencyColourQuantity,
operationType:type,
......@@ -647,6 +633,7 @@ export default {
if(code === 200){
this.$refs.uToast.show({
title: msg,
duration: 100,
back: true
});
}else{
......@@ -654,13 +641,40 @@ export default {
title: msg
});
}
}).then(res =>{
uni.hideLoading()
})
},
getDefaultColor(){
return { colourName: '',isDeleted: false}
},
createColor(value){
let res = []
for (let i = 0; i < value; i++) {
res.push(this.getDefaultColor())
}
return res;
},
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;
// 如果存在历史数据
for (let i = 0; i < target.length; i++) {
......
......@@ -164,7 +164,7 @@
<view class="u-flex u-m-t-18 u-m-b-8">
<view class="u-m-r-40 label">快递单号</view>
<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>
</template>
......@@ -658,31 +658,45 @@ export default {
},
// 寄样
sendSamples(){
this.$http("modeling.sendSamples",{
...this.formData,
modelingTaskId: this.detail.id
},"请求中").then(res =>{
let {
code ,msg
} = res;
if(code === 200){
this.$refs.uToast.show({
title: msg,
back: true
});
}else{
this.$refs.uToast.show({
title: msg
});
}
})
// if(){
//
// }
if(this.formData.trackingNumber && this.formData.courier){
this.$http("modeling.sendSamples",{
...this.formData,
modelingTaskId: this.detail.id
},"请求中")
.then(res =>{
let {
code ,msg
} = res;
if(code === 200){
this.$refs.uToast.show({
title: msg,
back: true
});
}else{
this.$refs.uToast.show({
title: msg
});
}
})
}else{
this.$refs.uToast.show({
title: '快递服务商,快递单号不能为空'
})
}
},
confirmHttp(data){
this.$http("modeling.confirm",{
let $Data = {
...this.detail,
...data,
modelingTaskReviewer:this.modelingTaskReviewer
},"请求中").then(res =>{
modelingTaskReviewer: {
...this.modelingTaskReviewer,
modelingTaskId: this.detail.id
}
};
this.$http("modeling.confirm",$Data,"请求中").then(res =>{
let {
msg,code
} = res;
......
......@@ -44,7 +44,7 @@
<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-content 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>
......@@ -150,6 +150,9 @@ $main-color: #fff;
height: 160rpx;
//height: 100%
}
&-content{
width: calc(100% - 160rpx);
}
&-title{}
&-desc{}
&-tags{
......
......@@ -37,15 +37,45 @@ export default {
components: { HsTabBar },
data() {
return {
msg: uni.getStorageSync("userInfo"),
type: uni.getStorageSync("assignType"),
msg: {
fullName: '',
userName: ''
},
type: '',
};
},
created() {
// let msg = uni.getStorageSync("userInfo")
// console.log(msg)
onShow() {
this.type = uni.getStorageSync("assignType") || 1;
this.getUserInfo();
},
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() {
this.$Router.push({
path: "/pages/user/register/completeInformation",
......@@ -61,9 +91,9 @@ export default {
},
toRegister() {
this.$Router.push({
path: "/pages/user/register/stepSelectType",
path: "/pages/user/register/stepSelectTypeEdit",
query: {
type: this.type,
type: this.type
},
});
},
......
......@@ -5,11 +5,11 @@ export default {
uni.setStorageSync('assignType', this.assignType)
await this.$store.dispatch("getCategoryList")
if(this.assignType !== 2){
this.$Router.replace({
this.$Router.replaceAll({
path: '/pages/home/index'
})
}else{
this.$Router.replace({
this.$Router.replaceAll({
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