Commit 504a5596 authored by 李星剑's avatar 李星剑

提交

parent 6c6c64be
<template>
<view class="shopro-tabbar-wrap" v-if="tabbarList && tabbarList.length && showTabbar">
<view class="navbar" :style="{ background: tabbarData.bgcolor || '#fff' }">
<view class="navbar-item" v-for="(tab, index) in tabbarList"
:key="tab.name" @tap="switchTabbar(tab, index)"
:class="[tab.path === currentPath ? 'active':'']">
<div class="image">
<img :src="tab.path === currentPath ? tab.activeImage : tab.image" style="height: 100%;width: 100%;"/>
<div class="num" v-if="tab.message && cartNum">
{{cartNum}}
</div>
</div>
<div class="text">{{tab.name}}</div>
</view>
</view>
</view>
</template>
<script>
/**
* 自定义底部导航
* @property {Array} tabbarList - vuex初始化的底部导航数据
* @property {String} currentPath -computed解析当前页面路径。
*/
import { mapMutations, mapActions, mapState, mapGetters } from 'vuex';
import { router } from '@/config/router';
export default {
name: 'hsTabBar',
components: {},
data() {
return {
currentPath: '', //当前页面路径
cartNum: '100',
tabbarData: {
style: 1,
list: [
{ name: '首页', path: '/pages/home/index',activeImage: '',image:'' },
{ name: '消息', path: '',activeImage: '',image:'', message: 1 },
{ name: '我的', path: '/pages/user/center/index',activeImage: '',image:'' },
]
}
};
},
mounted() {
this.currentPath = this.$Route.path === '/pages/home/index' ? this.$Route.path : this.$Route.fullPath;
},
computed: {
// ...mapGetters(['cartNum', 'tabbarData']),
// 底部导航栏列表
tabbarList() {
if (this.tabbarData) {
return this.tabbarData.list;
}
},
// 后台tabbarList数据中必需含有'/pages/index/index',不然逻辑混乱
showTabbar() {
if (this.tabbarData && this.tabbarData.list) {
let arr = ['/pages/home/index'];
let path = '';
for (let item of this.tabbarData.list) {
arr.push(item.path);
}
return arr.includes(this.currentPath);
}
}
},
methods: {
// 切换tabbar
switchTabbar(tab, index) {
this.$tools.routerTo(tab.path, true);
}
}
};
</script>
<style lang="scss">
.shopro-tabbar-wrap {
height: calc(142rpx + env(safe-area-inset-bottom) / 2);
padding-bottom: calc(env(safe-area-inset-bottom) / 2);
position: relative;
width: 100%;
z-index: 70;
.tabbar-box {
position: fixed;
display: flex;
align-items: center;
width: 100%;
height: calc(100rpx + env(safe-area-inset-bottom) / 2);
border-top: 1rpx solid #eeeeee;
background-color: #fff;
z-index: 998;
bottom: 0;
padding-bottom: calc(env(safe-area-inset-bottom) / 2);
.tabbar-item {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1;
.img-box {
position: relative;
.badge {
position: absolute;
/* #ifndef APP-NVUE */
display: inline-flex;
/* #endif */
justify-content: center;
align-items: center;
line-height: 24rpx;
padding: 4rpx 10rpx;
border-radius: 100rpx;
color: #fff;
font-size: 24rpx;
z-index: 9;
background-color: $u-type-error;
transform: scale(0.8);
transform-origin: center center;
top: 0;
left: 46rpx;
white-space: nowrap;
}
}
.tabbar-icon {
width: 50rpx;
height: 50rpx;
display: block;
}
.tabbar-text {
font-size: 20rpx;
margin-top: 4rpx;
}
}
}
}
.navbar{
//position: absolute;
//left: 0;
//bottom: 0;
//background: #fff;
width: 100%;display: flex; flex: 1;
position: fixed;
display: flex;
align-items: center;
//width: 100%;
height: calc(120rpx + env(safe-area-inset-bottom) / 2);
border-top: 1rpx solid #eeeeee;
background-color: #fff;
z-index: 998;
bottom: 0;
padding-bottom: calc(env(safe-area-inset-bottom) / 2);
}
.navbar-item{
background: #fff;
text-align: center;
height: 60px;
position: relative;
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.navbar-item .text{
font-size: 12px;
position: relative; z-index: 2;
}
.navbar-item .image{
height: 25px;
width: 25px; margin: 0 auto;
position: relative; z-index: 2;
}
.navbar-item.active::after{
position: absolute; content: "";
height: 71px;
width: 71px;
background: #fff; border-radius: 50%;
z-index: 1;
left: 0;
right: 0;
top: -11px;
margin: 0 auto;
bottom: 0;
}
.num{
position: absolute;
background: #af8d66;
right: -12px;
top: -6px;
width: 23px;
height: 16px; line-height: 16px;
color: #fff;border-radius: 9px;
}
</style>
let base = "/gdep-plm/materiallabel"
export default {
materialLabel:{
list:{
url: `${base}/labelListToApp`,
method: 'get'
},
save:{
url: `${base}/save`,
method: 'post'
},
}
}
......@@ -30,6 +30,15 @@ export default {
confirm:{
url: `${base}/confirm`,
method: "post",
}
},
// 保存修改 标签
saveOrUpdateLabel:{
url: `${base}/saveOrUpdateLabel`,
method: "post",
},
withdraw:{
url: `${base}/withdraw`,
method: "post",
},
}
}
let base = '/gdep-plm/modelingtaskcolorlibrary'
export default {
modelingTaskColorLibrary:{
list: {
url: `${base}/getAllList`,
method: 'get'
}
}
}
......@@ -9,6 +9,10 @@ import color from './apiList/colors.js'
import modeling from './apiList/modeling.js'
// 建模品类表接口
import modelingTaskCategory from './apiList/modelingTaskCategory.js'
// 标签接口
import materialLabel from './apiList/materialLabel.js'
// 颜色库接口
import modelingTaskColorLibrary from './apiList/modelingTaskColorLibrary'
import plm from './apiList/plm.js'
export default {
......@@ -18,5 +22,7 @@ export default {
// ...orderTicket,
...modeling,
...plm,
...modelingTaskCategory
...modelingTaskCategory,
...materialLabel,
...modelingTaskColorLibrary
};
......@@ -5,18 +5,19 @@ const state = {
token: uni.getStorageSync("token") || "",
isLogin: uni.getStorageSync("isLogin") || false, // 是否登陆
userInfo: uni.getStorageSync("userInfo") || {}, // 用户信息
tenanList: [
// {
// globalId: "1375592964957573120", tenantId: "1442659610786926593", subId: "1442659610786926600"
// }
] // 租户列表
Tabs: [
{
activeImage: '',
image: '',
}
]
}
const getters = {
token: state => state.token,
isLogin: state => state.isLogin,
userInfo: state => state.userInfo,
tenanList: state => state.tenanList,
Tabs: state => state.Tabs
}
const actions = {
......@@ -57,10 +58,7 @@ const mutations = {
userInfo(state, data) {
state.userInfo = data;
uni.setStorageSync("userInfo", data);
},
tenanList(state, payload) {
state.tenanList = payload
},
}
}
export default {
state,
......
......@@ -6,10 +6,10 @@
"versionCode" : "110",
"transformPx" : false,
"app-plus" : {
"compatible": {
"ignoreVersion": true
// true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
"compatible" : {
"ignoreVersion" : true
},
// true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
/* 5+App特有相关 */
"usingComponents" : true,
"splashscreen" : {
......@@ -41,27 +41,27 @@
"android" : {
/* android打包配置 */
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
......@@ -85,7 +85,8 @@
},
/* ios打包配置 */
"sdkConfigs" : {
"geolocation" : {}
"geolocation" : {},
"ad" : {}
}
},
"nvueLaunchMode" : ""
......@@ -131,7 +132,11 @@
"proxy" : {
"/dev" : {
// "target" : "http://47.96.138.212:8321",
"target" : "http://10.10.10.31/",
// "target" : "http://10.10.10.242/",
// "target" : "http://10.10.10.31/",
// "target" : "http://10.10.10.218/",
// "target" : "http://10.10.10.132/",
"target" : "http://octopus-dev.textile-saas.huansi.net/dev-api/",
"changeOrigin" : true,
"pathRewrite" : {
"^/dev" : ""
......@@ -141,3 +146,4 @@
}
}
}
export default {
methods:{
initEvent() {
// #ifdef APP-PLUS
uni.onNativeEventReceive((event, data)=>{
if(event === 'getTenantList'){
this.$store.commit("tenanList",JSON.parse(data))
// this.$store.tenanList = JSON.parse(data);
}else if(event === 'encryptToken'){
// this.token = data;
uni.setStorageSync('encryptToken', data);
this.login()
}
})
// #endif
},
getTenanList(){
// 向宿主App发送事件
uni.sendNativeEvent('getTenantList', {}, ret => {})
},
encryptToken(){
const active = this.list[this.selectedIndex];
uni.sendNativeEvent('encryptToken',JSON.stringify(
{
globalId: active.globalUserId,
tenantId: active.tenantId,
subId: active.id,
}
), ret => {})
},
triggerSelectItem(item){
this.selectedIndex = item;
},
login(){
// 核对
this.$http(
"auth.checkSecretKey",
uni.getStorageSync('encryptToken')
).then(res =>{
let {
code, data
} = res;
if(code === 200){
let {
userId, // 用户id
enterpriseId // 企业id
} = data;
this.userData = data;
uni.setStorageSync('tenantId', data.tenantId);
if(userId && enterpriseId){
this.createToken(data);
}else{
this.toRegister();
}
}
})
},
// 跳转到注册
toRegister(){
let {userId,enterpriseId,subId,tenantId} = this.userData;
this.$Router.push({
path: "/pages/user/register/stepSelectType",
query:{
pcUserId: userId || "",
pcBasicsId: enterpriseId || "",
tenantUserId:subId,
tenantId,
}
})
},
// 跳转到首页
toIndexPage(){
this.$Router.push({
path: "/pages/home/index"
})
},
checkStatus(data){
this.$http(
"user.checkMagStatus",{
pcUserId: data.userId,
pcBasicsId: data.enterpriseId,
}).then(res =>{
let { code ,data} = res;
if(code === 200){
// 1-面料供应商, 2-品牌商, 3-设计机构, 4-检测机构
let { identityType} = data.userLastIdentity;
if(identityType){
this.assignType = identityType;
this.filterStatus(data)
}
}
})
},
filterStatus(data){
// 0-未完善 1-已完善
let{
isBrandOwner, // 我要选款
isDesignAgency, // 完善设计机构信息
isFabricSupplier, //完善面料供应商信息
isTestingFacility, // 完善检测机构信息
} = data;
let { assignType} = this;
switch (assignType){
case "1":
isFabricSupplier ? this.toIndexPage() : this.toRegister();
return ;
case "2":
isBrandOwner ? this.toIndexPage() : this.toRegister();
return ;
case "3":
isDesignAgency ? this.toIndexPage() : this.toRegister();
return ;
case "4":
isTestingFacility ? this.toIndexPage() : this.toRegister();
return ;
default:
this.toRegister();
return;
}
},
createToken(data){
this.$http("auth.createTokenByApp" ,{
...{
identityType: uni.getStorageSync("identityType")
},
...data,
}).then(res =>{
let {
code, data
} = res;
if(code === 200){
uni.setStorageSync('token', data.accessToken);
uni.setStorageSync('pcUserId', data.userId);
uni.setStorageSync('pcBasicsId', data.enterpriseId);
// uni.setStorageSync('tenantId', this.userData.tenantId);
this.checkStatus(data);
}
})
},
next(){
this.encryptToken();
}
}
}
......@@ -4,6 +4,7 @@
"^hs-(.*)": "@/components/hs-$1/hs-$1.vue"
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/home/tenantSelection",
"style": {
......@@ -18,6 +19,90 @@
}
}
},
{
"path": "pages/user/login/login",
"style": {
"navigationBarTitleText": "模拟登录",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/user/center/index",
"style": {
"navigationBarTitleText": "用户中心",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/material/list",
"style": {
"navigationBarTitleText": "选择面料",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/material/selectType",
"style": {
"navigationBarTitleText": "选款",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/material/entrustList",
"style": {
"navigationBarTitleText": "款式委托上架单",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/material/entrustItem",
"style": {
"navigationBarTitleText": "款式委托上架单详情",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/material/entrustManagement",
"style": {
"navigationBarTitleText": "款式委托上架管理",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/material/entrustManagementItem",
"style": {
"navigationBarTitleText": "款式委托上架管理详情",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/material/createMaterial",
"style": {
"navigationBarTitleText": "搜款选择面料选款",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/user/register/stepSelectType",
"style": {
......@@ -106,16 +191,7 @@
}
},
{
"path": "pages/user/login/login",
"style": {
"navigationBarTitleText": "模拟登录",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/designCommissioned/splitItem",
"style": {
......@@ -208,7 +284,7 @@
}
}
},
{
{
"path": "pages/home/styleEntrustment",
"style": {
"navigationBarTitleText": "款式委托",
......@@ -277,6 +353,62 @@
"allowsBounceVertical": "NO"
}
}
},
{
"path": "pages/fabricModeling/item",
"style": {
"navigationBarTitleText": "建模详情",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"allowsBounceVertical": "NO"
}
}
},
{
"path": "pages/modeling/reviewHistory",
"style": {
"navigationBarTitleText": "评审历史",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"allowsBounceVertical": "NO"
}
}
},
{
"path": "pages/modeling/imgList",
"style": {
"navigationBarTitleText": "指定面料颜色模型",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"allowsBounceVertical": "NO"
}
}
},
{
"path": "pages/modeling/tags",
"style": {
"navigationBarTitleText": "编辑标签",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES",
"allowsBounceVertical": "NO"
}
}
}
],
"globalStyle": {
......
......@@ -57,13 +57,13 @@
</view>
<!-- list -->
<view class="u-p-t-20 u-p-l-30 u-p-r-30 u-p-b-20">
<view v-if="!isEmpty" class="u-m-b-20 bd_rad1 u-p-30" @click="detaileCli(item)" v-for="item in entrustmentList" :key="item.id" style="background: #fff;">
<view v-if="!isEmpty" class="u-m-b-20 bd_rad1 u-p-30" @click="dateilEnt(item,'item')" v-for="item in entrustmentList" :key="item.id" style="background: #fff;">
<view class="u-m-b-30 u-flex justify-between">
<view class="entrus_list_title u-font-32">{{ item.materialName }}</view>
<view class="u-font-28">{{ item.status | filterStatus }}</view>
</view>
<view class="dis_flex">
<image class="hs-img-160" :src="`${$IMG_URL}${item.pictureCode}`" mode=""></image>
<image class="hs-img-160" :src="`${$IMG_URL}${item.pictureCode}`" mode="cover"></image>
<view class="u-m-l-20">
<view class="u-m-b-10">
<span class="color_00004">建模服务商</span>
......@@ -83,11 +83,11 @@
<view class="justify-between u-m-t-30 u-flex u-flex-nowrap">
<view class="color_FA5353">{{ item.oddStatus == 1 ? '两天无人接单' : '' }} {{ item.oddStatus == 2 ? '未及时完成' : '' }}</view>
<view>
<view v-if="item.status == 1 || item.status == 2" @click="dateilEnt(item, '即刻发布')" class="u-m-l-10 btn">即刻发布</view>
<view v-if="item.status == 3" class="u-m-l-10 btn">撤回</view>
<view v-if="item.status == 4" @click="dateilEnt(item, '马上寄送')" class="u-m-l-10 btn">马上寄送</view>
<view v-if="item.status == 1" @click="dateilEnt(item, 'edit')" class="u-m-l-10 btn">即刻发布</view>
<view v-if="item.status == 3" class="u-m-l-10 btn" @click="dateilEnt(item, 'item')">撤回</view>
<view v-if="item.status == 4" @click="dateilEnt(item, 'item')" class="u-m-l-10 btn">马上寄送</view>
<view v-if="item.oddStatus == 2 && item.status == 5" @click.stop="reminder(item.id)" class="u-m-l-10 btn">催单</view>
<view v-if="item.status == 7" class="u-m-l-10 btn">前往审核</view>
<view v-if="item.status == 7" @click="dateilEnt(item,'item' )" class="u-m-l-10 btn">前往审核</view>
</view>
</view>
</view>
......@@ -355,13 +355,11 @@ export default {
},
// 编辑 拆单
dateilEnt(item, val) {
if (val == '即刻发布') {
if (val === 'edit') {
this.$Router.push(`/pages/modeling/addItem?id=${item.id}`);
} else if (val == '选款') {
} else if (val === 'item') {
this.$Router.push(`/pages/modeling/item?id=${item.id}`);
} else if (val == '马上寄送') {
this.$Router.push(`/pages/modeling/item?id=${item.id}`);
} else {
} else {
this.$Router.push('/pages/modeling/addItem');
}
}
......
......@@ -64,11 +64,15 @@
</view>
</view>
</view>
<hs-tab-bar></hs-tab-bar>
</view>
</template>
<script>
import HsTabBar from "../../components/hs-tab-bar/hs-tab-bar";
export default {
data() {
components: {HsTabBar},
data() {
return {
background: { backgroundColor: 'rgba(245,245,245,0)' },
quantityNum: 0,
......@@ -85,12 +89,12 @@ export default {
{
name: '搜款',
img: '../../static/images/home/styleEntrustment@2x.png',
url: ''
url: '/pages/material/list'
},
{
name: '上架管理',
img: '../../static/images/home/styleManageme@2x.png',
url: ''
url: '/pages/material/entrustManagement'
}
// TODO 旧版本 可能以后会用到
// {
......@@ -117,10 +121,10 @@ export default {
};
},
onLoad() {
this.toBeSelectedQuantity();
this.orderTicketExceptionNum();
this.noSampleOrder();
this.materialList();
// this.toBeSelectedQuantity();
// this.orderTicketExceptionNum();
// this.noSampleOrder();
// this.materialList();
},
onPageScroll(object) {
let height = 486 / 2;
......
......@@ -50,6 +50,10 @@ export default {
this.list = JSON.parse(ret).filter((item) =>{
return item.tenantPlat === 'saas'
});
if(this.list.length === 1){
this.selectedIndex = 0;
this.encryptToken();
}
})
// #endif
},
......
<template>
<view>
<!--导航栏 navbar-->
<view id="header">
<u-navbar :title="title"
:border-bottom="false"
:background="{backgroundColor: 'whitesmoke'}">
</u-navbar>
</view>
<view class="body " :style="{ bottom: footerHeight + 'px', top: headerHeight+ 'px'}">
<view class="u-relative">
<u-image height="750rpx"></u-image>
<view class="u-absolute prev">上一款</view>
<view class="u-absolute next">下一款</view>
<view class="u-absolute step u-p-r-30 u-p-l-30">
<view class="step-main u-p-r-20 u-p-l-20 u-flex">
<text class="width_100">{{angle}}°</text>
<view class="u-relative u-flex-1">
<view class="line" id="line">
<view class="line-center"></view>
<view class="line-step" id="line-step"
:style="{
left:
(offset.x - lineOffset.left) / lineWidth * 100
+ '%'
}"
@touchmove="touchMove"
@touchend="touchEnd"
@touchstart="touchStart"
/>
</view>
</view>
<text class="u-m-l-24">重置</text>
</view>
</view>
</view>
<view class="">
<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-tip u-m-r-10"></view>
可调整部位
</view>
<view class="overflow u-m-b-24">
<view class="button inline-block active">主身</view>
<view class="button inline-block">主身</view>
</view>
<view class="u-p-b-20">
<u-search placeholder="请输入面料名称" v-model="keyword"
border-color="#e1e1e1" height="76"
bg-color="#fff" :show-action="false"></u-search>
</view>
<view class="overflow u-p-b-30 u-border-bottom">
<view class="image u-m-r-10 active">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
</view>
<view class="u-p-t-30 u-p-b-20 text-right">
<view class="button inline-block button-plain button-plain-default">取消</view>
<view class="button inline-block button-default">主身</view>
</view>
</view>
<view class="bg-fff u-p-r-30 u-p-l-30">
<view class="title u-flex u-p-t-26 u-p-b-18">
<view class="title-tip u-m-r-10"></view>
颜色选择
</view>
<view class="u-border-bottom u-p-b-32">
<view class="">主图颜色</view>
<view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
</view>
</view>
<view>
<view class="u-p-t-32">
其他可选颜色
<text>(可多选)</text>
</view>
<view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view id="footer" class="footer">
<view class="footer-btn">
<view class="button button-default button-plain button-plain--default">
加入待上架
</view>
</view>
</view>
</view>
</template>
<script>
import dom from "@/mixins/dom";
export default {
name: "createMaterial",
mixins:[dom],
data(){
return {
title: '111',
keyword: '',
offset :{
x: 0
},
startTime: 0,
lineStepWidth: 0,
lineWidth: 0,
lineOffset: 0,
}
},
computed:{
angle(){
let { lineOffset,offset,lineWidth} = this;
let left = (offset.x - lineOffset.left) / lineWidth * 100;
return Math.ceil((left-50) / 50 * 180);
}
},
mounted() {
this.uGetRect("#line").then(res => {
this.lineWidth = res.width;
this.lineOffset = {
left: res.left,
right: res.right,
};
this.offset.x = res.width /2 + res.left
})
this.uGetRect("#line-step").then(res => {
this.lineStepWidth = res.width;
})
},
methods:{
touchMove(e){
let left = e.changedTouches[0].pageX;
if(
left >= this.lineOffset.left &&
left <= this.lineOffset.right
){
this.offset.x = left
}
},
touchEnd(e){
let left = e.changedTouches[0].pageX;
// console.log(left)
// console.log(this.lineOffset.right)
if(
left >= this.lineOffset.left &&
left <= this.lineOffset.right
){
this.offset.x = left
}
},
touchStart(e){
this.offset.x = e.changedTouches[0].pageX;
}
}
}
</script>
<style scoped lang="scss">
.bg-fff{ background: #fff}
.width_100{ width: 100rpx}
.inline-block{
display: inline-block;
margin-right: 10rpx;
}
.step{
width: 100%; height: 60rpx;
bottom: 16rpx;
left: 0;
color: #fff;
&-main{
background: rgba(0,0,0,0.20);
}
}
.line{
height: 6rpx;
width: 100%;
background: #fff;
position: relative;
&-center{
border-radius: 50%;
height: 16rpx; width: 16rpx;
position: absolute;
left: 50%; top: 50%;
margin-right: -8rpx;
margin-top: -8rpx;
background: #fff;
}
&-step{
border-radius: 50%;
height: 40rpx; width: 40rpx;
position: absolute;
top: 50%;
margin-top: -20rpx;
background: #fff;
}
}
.prev,.next{
width: 144rpx; height: 88rpx; line-height: 88rpx;
color: #D5AA7A; text-align: center;
font-size: 28rpx;
box-shadow: 0px 2rpx 8rpx 0px rgba(0,0,0,0.10);
bottom: 60rpx;
}
.prev{
border-top-right-radius: 100rpx;
border-bottom-right-radius: 100rpx;
left: 0;
}
.next{
border-top-left-radius: 100rpx;
border-bottom-left-radius: 100rpx;
right: 0;
}
.title{
&-tip{
width: 8rpx;
height: 32rpx;
background: #af8d66;
border-radius: 6rpx;
}
}
.image{
position: relative;
width: 160rpx;
height: 160rpx;
display: inline-block;
border-radius: 8rpx;
&-tip{
text-align: center;
width: 100%;
height: 40rpx;line-height: 40rpx;
background: rgba(255,255,255,0.80);
font-size: 24rpx;
position: absolute;
bottom: 0;
left: 0;
}
&.active{
border: 1px solid #DDA973;
}
}
.button{
border: 1px solid #333;
border-radius: 44rpx;
width: 160rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
&-plain{
&--default{
color: #333;
}
}
&-default{
background: #333;
color: #fff;
}
&.active{
color: #AF8D66;
border: 1px solid #DDA973;
}
}
.body{
position: absolute;
background: rgba(239,239,239,0.61);
width: 100%;
height: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
overflow-y: auto;
}
.overflow{
overflow-x: auto;
white-space: nowrap;
}
.footer {
position: fixed;
width: 100%;
bottom: 0;
z-index: 998;
background: #fff;
box-shadow: 0px -4rpx 6rpx 0px rgba(178,182,214,0.10);
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.footer-btn{
padding: 20rpx 60rpx;
.button{
border: 1px solid #333;
border-radius: 44rpx;
width: 100%;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 34rpx;
&-default{
background: #333;
color: #fff;
}
}
}
}
</style>
<!--委托详情-->
<template>
<view>
<!--导航栏 navbar-->
<u-navbar :title="title" id="header"
:border-bottom="false"
:background="{backgroundColor: 'whitesmoke'}">
</u-navbar>
<view class="body" :style="{ bottom: footerHeight + 'px', top: headerHeight+ 'px'}">
<view class="tip u-m-b-20">剩余59分1秒自动取消上架单</view>
<view class="u-p-r-30 u-p-l-30">
<view class="bg-fff u-p-r-30 u-p-b-30 u-p-l-30 u-m-b-20">
<view class="u-border-bottom u-l-height-44 u-flex">
<text class="u-flex-1">款式明细</text>
<text>总共50款</text>
</view>
<view class="u-p-t-20 u-p-b-20">
加厚荷兰绒绒布布料(3)
</view>
<view class="item u-flex">
<view class="item-img"></view>
<view class="u-flex-1 u-p-l-20">
<view class="item-title u-line-1 u-font-28">男装-上装-青年-时尚休闲</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">
11
</view>
</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">
11
</view>
</view>
<view class="item-tags">
<view class="item-tag u-font-20">
标签
</view>
<view class="item-tag u-font-20">
标签
</view>
</view>
</view>
</view>
<view class="u-p-b-20 u-border-bottom text-center" @click="toggle">
<text>展开<u-icon name="arrow-down" size="22" color="#000"></u-icon></text>
</view>
<view class="price text-right u-m-t-30 u-p-r-30">
总金额 <text class="price-num u-m-l-40">2000</text>
</view>
</view>
<!--订单信息-->
<view class="bg-fff u-p-r-30 u-p-b-30 u-p-l-30 u-m-b-20">
<view class="u-border-bottom u-l-height-44">订单信息</view>
<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">
11
</view>
</view>
<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" >
111
</view>付款时间
</view>
<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">
11
</view>
</view>
</view>
</view>
</view>
<view class="footer" id="footer">
<view class="footer-btn">
<view class="button button-default">
立刻付款
</view>
</view>
</view>
</view>
</template>
<script>
import dom from "@/mixins/dom";
export default {
name: "entrustItem",
mixins:[dom],
data(){
return {
title: '待付款',
detail:{
}
}
},
methods:{
toggle(){}
}
}
</script>
<style scoped lang="scss">
$h-color: #AF8D66;
$color: rgba(175,141,102,0.10);
$main-color: #fff;
.bg-fff{ background: #fff;}
.u-l-height-44{ line-height: 88rpx}
.tip{
background: #DDA973;
color: #000;
font-size: 32rpx; line-height: 80rpx;
text-align: center;
}
.price{
background: #fcfaf7;
line-height: 80rpx;
border: 1px solid rgba(68,53,37,0.10);
border-radius: 8rpx;
&-num{
color: $h-color;
}
}
.item{
width: 100%;
margin-bottom: 40rpx;
&--round{
border-radius: 16rpx;
border: 1px solid rgba(0,0,0,0.10);
}
&--status{
left: 0;
top: 0;
position: absolute;
}
&-img{
width: 160rpx;
height: 160rpx;
//height: 100%
}
&-title{}
&-desc{}
&-tags{
}
&-tag{
padding: 6rpx 2px;
background: $color;
text-align: center;
color: $h-color;
display: inline-block;
margin-right: 10rpx;
}
}
.label{
color: rgba(0,0,0,0.40);
font-size: 28rpx;
min-width: 140rpx;
}
.context{
color: #000;
font-size: 28rpx;
}
.body{
position: absolute;
background: rgba(239,239,239,0.61);
width: 100%;
height: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
overflow-y: auto;
}
.footer {
position: fixed;
width: 100%;
bottom: 0;
z-index: 998;
background: #fff;
box-shadow: 0px -4rpx 6rpx 0px rgba(178,182,214,0.10);
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.footer-btn{
padding: 20rpx 60rpx;
.button{
border: 1px solid #333;
border-radius: 44rpx;
width: 100%;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 34rpx;
&-default{
background: #333;
color: #fff;
}
}
}
}
</style>
<template>
<view>
<view id="header">
<!--新增委托navbar-->
<u-navbar title="上架单"
:border-bottom="false"
:background="{backgroundColor: 'whitesmoke'}">
<template v-slot:right>
</template>
</u-navbar>
<view class="status-list bg-fff u-flex">
<text v-for="(status,index) in statusList"
@click="setStatus(index)"
class="status-item u-m-r-20 u-m-l-16"
:class="[index === activeStatus ? 'active':'']"
:key="status.value">
{{status.label}}
</text>
</view>
</view>
<!-- 列表 确定-->
<view class="body u-p-r-30 u-p-l-30" :style="{ bottom: footerHeight+ 'px', top: headerHeight + 'px' }">
<view class="u-p-t-24 u-p-b-24">
{{statusList[activeStatus].label }}上架单:{{list.length}}单
</view>
<view v-for="(item) in list" :key="item.id"
@click="goEntrustItemPage(item)"
class="item u-m-b-20 bg-fff u-p-30">
<view class="item-header u-flex">
<view class="u-flex-1 u-line-1 u-font-32 u-flex">
<view class="item-header-tip u-m-r-10"></view>
AS2312424234
</view>
<view class="item-header-status u-flex-1 u-line-1 u-font-28">
待付款倒计时:59分21秒
</view>
</view>
<view class="item-body ">
<view class="item-desc u-m-t-28 u-m-b-22">
<text class="u-m-r-20 item-desc-label">上架款数</text>
<text class="item-desc-value">50款</text>
</view>
<view class="item-images">
<image src="" fit="fit" class="item-image"></image>
<image src="" fit="fit" class="item-image"></image>
<image src="" fit="fit" class="item-image"></image>
<image src="" fit="fit" class="item-image"></image>
<image src="" fit="fit" class="item-image"></image>
<image src="" fit="fit" class="item-image"></image>
</view>
</view>
<view class="item-hr"></view>
<view class="item-footer u-flex">
<view class="item-desc u-flex-1 u-line-1">
<text class="u-m-r-20 item-desc-label">待支付:</text>
<text class="item-desc-value item--status">23211元</text>
</view>
<view class="item-buttons u-flex-1 u-flex">
<view class="button button-plain button-plain--default u-m-r-20">取消上架</view>
<view class="button button-default">付款</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import dom from "@/mixins/dom";
export default {
name: "entrustList",
mixins:[dom],
data(){
return{
activeStatus: 0,
statusList: [
{label: '全部',value: '1'},
{label: '待付款',value: '2'},
{label: '已付款',value: '3'},
{label: '已取消',value: '4'},
],
list: [
{}
]
}
},
methods:{
setStatus(index){
this.activeStatus = index;
this.getList();
},
getList(){
// this.
},
goEntrustItemPage({id}){
this.$Router.push({
path: '/pages/material/entrustItem',
query:{
id: id
}
})
}
}
}
</script>
<style scoped lang="scss">
$activeColor: #DDA973;
$mainColor: #000;
$subColor: rgba(0,0,0,0.40);
.bg-fff{
background: #fff;
}
.body{
position: absolute;
background: rgba(239,239,239,0.61);
width: 100%;
height: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
overflow-y: auto;
}
.status-list{
height: 80rpx;
.status-item{
color: #666;
font-size: 28rpx;
&.active{
font-size: 32rpx;
color:$activeColor;
}
}
}
.item{
border-radius: 16rpx;
&--status{
color: $activeColor;
}
&-header{
&-tip{
width: 8rpx;
height: 32rpx;
background: #af8d66;
border-radius: 6rpx;
}
}
&-body{
}
&-desc{
&-label{
color: $subColor;
}
}
&-images{
overflow-x: auto;
white-space: nowrap;
.item-image{
width: 160rpx;
height: 160rpx;
border-radius: 8rpx;
margin-right: 20rpx;
}
}
&-hr{
width: 100%;
border-top: 1px solid #f6f6f6;
padding: 20rpx;
position: relative;
&:before{
content: " ";
position: absolute;
left: -22px;
top: -7px;
display: block;
width: 15px;
height: 15px;
background: #f6f6f6;
border-radius: 50px;
}
&:after{
content: " ";
position: absolute;
right: -22px;
top: -7px;
display: block;
width: 15px;
height: 15px;
background: #f6f6f6;
border-radius: 50px;
}
}
&-footer{}
&-buttons{
.button{
border: 1px solid #333;
border-radius: 44rpx;
width: 160rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
&-plain{
&--default{
color: #333;
}
}
&-default{
background: #333;
color: #fff;
}
}
}
}
</style>
This diff is collapsed.
<template>
<view>
<view>
<u-image height="750rpx"></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">男装-上装-青年-时尚</text>
<text class="active">待上架</text>
</view>
<view class="u-flex">
<text class="u-flex-1 u-font-28">AS23124</text>
<text class="u-font-24">
加入日期:2021-12-11
</text>
</view>
<view class="item-tags">
<view class="item-tag u-font-20">
标签
</view>
<view class="item-tag u-font-20">
标签
</view>
</view>
</view>
<view class="bg-fff u-p-r-30 u-p-b-30 u-p-l-30 item">
<view class="u-border-bottom u-line-88">所选面料</view>
<view class="u-m-t-30 u-m-b-56">
<hs-material-thumbnail :item="item"></hs-material-thumbnail>
</view>
<view class="u-flex">
<view class="">
<view>主图颜色</view>
<view class="image">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
</view>
<view class="overflow u-flex-1">
<view>其他颜色</view>
<view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
<view class="image u-m-r-10">
<image src="" style="width: 100%;height: 100%"></image>
<view class="image-tip u-line-1">颜色</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import HsMaterialThumbnail from "@/components/hs-material-thumbnail/hs-material-thumbnail";
export default {
name: "entrustManagementItem",
components: {HsMaterialThumbnail},
data(){
return{
item:{}
}
}
}
</script>
<style scoped lang="scss">
$h-color: #AF8D66;
$activeColor: #DDA973;
$color: rgba(175,141,102,0.10);
$main-color: #fff;
.u-line-88{
line-height: 88rpx;
}
.bg-fff{
background: #fff;
}
.item{
width: 100%;
margin-bottom: 28rpx;
&--round{
border-radius: 16rpx;
border: 1px solid rgba(0,0,0,0.10);
}
&-tag{
padding: 6rpx 2px;
background: $color;
text-align: center;
color: $h-color;
display: inline-block;
margin-right: 10rpx;
}
}
.image{
position: relative;
width: 160rpx;
height: 160rpx;
display: inline-block;
&-tip{
text-align: center;
width: 100%;
height: 40rpx;line-height: 40rpx;
background: rgba(255,255,255,0.80);
font-size: 24rpx;
position: absolute;
bottom: 0;
left: 0;
}
}
.overflow{
overflow-x: auto;
white-space: nowrap;
}
</style>
<template>
<view>
<view id="header">
<!--新增委托navbar-->
<u-navbar title="选择面料"
:border-bottom="false"
:background="{backgroundColor: 'whitesmoke'}">
<template v-slot:right>
<view class="u-p-r-30 u-font-27"
@click="addMaterialModeling">新增面料</view>
</template>
</u-navbar>
<view class="title u-p-30">选择面料</view>
<view class="u-p-30 bg-fff">
<!--新增委托navbar-->
<u-search placeholder="请输入面料名称" v-model="keyword"
border-color="#e1e1e1" height="76"
bg-color="#fff" :show-action="false"></u-search>
</view>
</view>
<!-- 列表 确定-->
<view class="u-p-30 body" :style="{ bottom: footerHeight+ 'px', top: headerHeight + 'px' }">
<view v-for="(item, index) in list" :key="item.id" class="u-flex u-m-b-20">
<view class="u-m-r-30">
<u-icon :name="index === selectedIndex ? 'checkmark-circle-fill': 'checkmark-circle'"
color="#000" size="40"
@click="triggerSelectItem(index)"
/>
</view>
<hs-material-thumbnail :item="item"></hs-material-thumbnail>
</view>
</view>
<!-- 底部按钮 确定-->
<view class="footer" id="footer">
<view class="footer-btn">
<!-- /* 以下形式在微信小程序会无效,APP和H5有效 */-->
<u-button :disabled="selectedIndex === -1"
@click="selectType"
class="custom-style" shape="circle"
>
确定
</u-button>
</view>
</view>
</view>
</template>
<script>
import dom from "../designCommissioned/mixins/dom";
export default {
name: "list",
mixins:[dom],
data(){
return {
keyword: '',
selectedIndex: -1,
list: [
{
materialName: '加厚荷兰绒绒布布料',
id: 2
},
{
materialName: '加厚荷兰绒绒布布料加厚荷兰绒绒布布料',
id: 12
},
{
materialName: '加厚荷兰绒绒布布料',
id: 221
},
{
materialName: '加厚荷兰绒绒布布料',
id: 22
},
{
materialName: '加厚荷兰绒绒布布料',
id: 224
},
{
materialName: '加厚荷兰绒绒布布料',
id: 222
}
]
}
},
onLoad(){
},
methods:{
getList(){
this.$http('orderTicket.materialList', {
size: 4,
materialCode: '',
materialName: ''
}).then(res => {
let { code, data } = res;
if (code == 200) {
this.list = data.data;
}
});
},
triggerSelectItem(index){
this.selectedIndex = index === this.selectedIndex ? -1 : index;
},
// 跳转到面料详情
toMaterialDetail({id}){
this.$Router.push({
path:"/pages/home/fabricDetails",
query:{
id
}
})
},
// 新增面料建模
addMaterialModeling(){
this.$Router.push({
path:"/pages/modeling/addItem"
})
},
// 跳转到选款
selectType(){
let selectItem = this.list[this.selectedIndex];
this.$Router.push({
path:"/pages/material/selectType",
query:{
materialId: selectItem.id
}
})
}
}
}
</script>
<style scoped lang="scss">
$h-color: #AF8D66;
$main-color: #fff;
.body{
position: absolute;
width: 100%;
height: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
overflow-y: auto;
}
.title{
color: $h-color;
background-color: whitesmoke;
}
.bg-fff{
background: $main-color;
}
.item{
border-radius: 8rpx;
border: 1px solid #bd4848;
height: 160rpx; width: 100%;
overflow: hidden;
background-size: contain;
.active{
border: 1px solid #000;
}
}
.custom-style{
color: #fff;
background: #000;
}
.footer {
position: fixed;
width: 100%;
bottom: 0;
z-index: 998;
background: #fff;
box-shadow: 0px -4rpx 6rpx 0px rgba(178,182,214,0.10);
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.footer-btn{
padding: 20rpx 30rpx;
}
}
</style>
<template>
<view>
<view id="header">
<!--选款-->
<u-navbar title="选款"
:border-bottom="false"
:background="{backgroundColor: 'whitesmoke'}">
</u-navbar>
<view class="u-p-30 u-font-32 u-flex">
<text class="title">选择面料</text>
<u-icon size="24" color="#000" name="arrow-right" class="u-m-r-10 u-m-l-10"></u-icon>
<text>选择款式</text>
</view>
<view class="u-p-30 bg-fff">
<!--新增委托navbar-->
<u-search placeholder="请输入面料名称" v-model="keyword"
border-color="#e1e1e1" height="76"
bg-color="#fff" :show-action="false"></u-search>
</view>
</view>
<!-- 列表 确定-->
<view class="body bg-fff u-p-r-30 u-p-b-30 u-p-l-30" :style="{ bottom: footerHeight+ 'px', top: headerHeight + 'px' }">
<view v-for="(item, index) in list" :key="item.id"
@click=""
class="u-flex u-m-b-20">
<view class="item item--round u-flex ">
<view class="item-img u-relative">
<image src="" mode="fit" style="width:100%; height: 100%"></image>
<u-image width="100rpx" height="100rpx"
class="item--status"
mode="widthFix"
src="@/static/images/material/status.png">
</u-image>
</view>
<view class="u-flex-1 u-p-l-20 u-p-r-30 u-border-left">
<view class="item-title u-flex ">
<view class="u-flex-1 u-line-1 u-font-32 u-p-t-20 u-p-b-8">男装</view>
<u-icon size="24" color="#000" name="arrow-right"></u-icon>
</view>
<view class="item-desc u-font-24">ASD</view>
<view class="item-tags u-p-b-24">
<view class="item-tag u-font-20">
标签
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import dom from "../designCommissioned/mixins/dom";
export default {
name: "selectType",
mixins:[dom],
data(){
return {
keyword: '',
selectedIndex: -1,
list: [
{
materialName: '加厚荷兰绒绒布布料',
id: 2
},
{
materialName: '加厚荷兰绒绒布布料加厚荷兰绒绒布布料',
id: 12
},
{
materialName: '加厚荷兰绒绒布布料',
id: 221
},
{
materialName: '加厚荷兰绒绒布布料',
id: 22
},
{
materialName: '加厚荷兰绒绒布布料',
id: 224
},
{
materialName: '加厚荷兰绒绒布布料',
id: 222
}
]
}
},
onLoad(){
},
methods:{
}
}
</script>
<style scoped lang="scss">
$h-color: #AF8D66;
$color: rgba(175,141,102,0.10);
$main-color: #fff;
.body{
position: absolute;
width: 100%;
height: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
overflow-y: auto;
}
.title{
color: $h-color;
background-color: whitesmoke;
}
.bg-fff{
background: $main-color;
}
.custom-style{
color: #fff;
background: #000;
}
.footer {
position: fixed;
width: 100%;
bottom: 0;
z-index: 998;
background: #fff;
box-shadow: 0px -4rpx 6rpx 0px rgba(178,182,214,0.10);
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.footer-btn{
padding: 20rpx 30rpx;
}
}
.item{
width: 100%;
&--round{
border-radius: 16rpx;
border: 1px solid rgba(0,0,0,0.10);
}
&--status{
left: 0;
top: 0;
position: absolute;
}
&-img{
width: 160rpx;
height: 150rpx;
//height: 100%
}
&-title{}
&-desc{}
&-tags{
}
&-tag{
padding: 6rpx 2px;
background: $color;
text-align: center;
color: $h-color;
display: inline-block;
margin-right: 10rpx;
}
}
</style>
This diff is collapsed.
This diff is collapsed.
......@@ -10,3 +10,5 @@
撤回 3
催单
面料 布行
<template>
<view>
<!--导航栏 navbar-->
<u-navbar title="评审历史" id="header"
:border-bottom="false"
:background="{backgroundColor: 'whitesmoke'}">
</u-navbar>
<view class="body u-p-30" :style="{ bottom: footerHeight + 'px', top: headerHeight+ 'px'}">
<view class="bg-fff u-p-r-30 u-p-b-30 u-p-l-30 u-m-b-20" >
<view v-for="(item,index) in detail.modelingTaskReviewerList">
<view class="u-border-bottom u-p-t-14 u-p-b-14">
{{detail.modelingTaskReviewerList.length - index}}次评审
</view>
<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">
{{ detail.enterpriseName }}
</view>
</view>
<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">
{{ detail.createTime }}
</view>
</view>
<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">
{{ detail.reviewerComment }}
</view>
</view>
</view>
</view>
</view>
<view class="footer" id="footer" ></view>
</view>
</template>
<script>
import dom from "../../mixins/dom"
import utils from "../../mixins/utils";
export default {
name: "reviewHistory",
mixins:[dom,utils],
data(){
return {
detail:{
clothRowColourQuantity: 0, // 布行指定面料颜色数量
clothWidth: 0, // 门幅
clothWidthUnit: 'cm', // 门幅单位
component: '', // 成分
// designAgencyColourQuantity: '', // 设计机构提供的颜色数量
expirationDate: '', // 截止日期
materialName: '', // 面料名称
modelingCategoryId: '', // 建模品类id
modelingCategoryText: '', // 建模品类文本
modelingTaskColourDTOList: [], // 布行指定面料颜色名称集合
modelingTaskPictureDTOList: [
{pictureType: 1},
{pictureType: 2},
], // 建模单 图片信息
price: 0,
modelingTaskSampleInformation: {},
modelingTaskMaterialColourList: [],
modelingTaskLabelList: [] , // 建模任务的标签
modelingTaskReviewerList: [] , // 历史评论
},
}
},
onLoad({id}){
if(id){
this.getDetail(id)
}
},
methods:{
getDetail(id){
this.$http("modeling.detail",{ modelingTaskId:id })
.then(res => {
let {
code, data
} = res;
if(code === 200){
this.detail = Object.assign({},data,{
modelingCategoryText: data['modelingCategory']['name'],
modelingTaskColourDTOList: data['modelingTaskColourList'],
modelingTaskPictureDTOList: data['modelingTaskPictureList']
});
}
})
},
}
}
</script>
<style scoped lang="scss">
.bg-fff{
background: #fff;
}
.body{
background: #fafafa;
position: absolute;
width: 100%;
height: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
overflow-y: auto;
}
.label{
color: rgba(0,0,0,0.40);
font-size: 28rpx;
min-width: 140rpx;
}
</style>
<template>
<view>
<u-navbar title="添加标签" id="header"
:border-bottom="false"
:background="{backgroundColor: 'whitesmoke'}">
</u-navbar>
<view class="body" :style="{ bottom: footerHeight + 'px', top: headerHeight+ 'px'}">
<view class="bg-fff u-p-30" >
<view class="u-m-b-16">已有标签</view>
<view class="u-flex ">
<view class="tags overflow">
<view v-for="item in computedModelingTaskLabelList" class="tag active">
{{item.labelName}}
</view>
</view>
<view class="u-p-l-20">
<u-input v-model="key" @confirm="enter" placeholder="选择或输入标签"></u-input>
</view>
</view>
</view>
<view class="u-p-30">
<view class="u-m-b-20">可选标签</view>
<view class="">
<view class="tag u-p-l-42 u-p-r-42" v-for="item in materialLabelList"
:class="[computedModelingTaskLabelIds.indexOf(item.materialLabelId) > -1 ? 'active':'']"
@click="triggerClick(item)">
{{item.labelName}}
</view>
</view>
</view>
</view>
<view class="footer" id="footer">
<!-- <view class="u-flex">-->
<!-- <view class="u-flex-1"></view>-->
<!-- <view class="custom-style-round-circle custom-style-btn custom-style dialog-btn">-->
<!-- <view class="custom-style-right" @click="submitLabel">确定</view>-->
<!-- </view>-->
<!-- </view>-->
<view class="u-p-t-18 u-p-r-30 u-p-b-18 u-p-l-30">
<view class="u-flex">
<view class="u-flex-1"></view>
<view class="custom-style-round-circle custom-style-btn custom-style dialog-btn u-m-r-20 ">
<view class="custom-style-right cancel" @click="$Router.back()">取消</view>
</view>
<view class="custom-style-round-circle custom-style-btn custom-style dialog-btn">
<view class="custom-style-right" @click="submitLabel">确定</view>
</view>
</view>
</view>
</view>
<!--提示-->
<u-toast ref="uToast" />
</view>
</template>
<script>
import dom from "../../mixins/dom";
export default {
name: "tags",
mixins: [dom],
data(){
return {
key: '',
id: '',
detail:{
clothRowColourQuantity: 0, // 布行指定面料颜色数量
clothWidth: 0, // 门幅
clothWidthUnit: 'cm', // 门幅单位
component: '', // 成分
// designAgencyColourQuantity: '', // 设计机构提供的颜色数量
expirationDate: '', // 截止日期
materialName: '', // 面料名称
modelingCategoryId: '', // 建模品类id
modelingCategoryText: '', // 建模品类文本
modelingTaskColourDTOList: [], // 布行指定面料颜色名称集合
modelingTaskPictureDTOList: [
{pictureType: 1},
{pictureType: 2},
], // 建模单 图片信息
price: 0,
modelingTaskSampleInformation: {},
modelingTaskMaterialColourList: [],
modelingTaskLabelList: [] , // 建模任务的标签
modelingTaskReviewerList: [] , // 历史评论
},
materialLabelList: [],
}
},
computed:{
// selectedTagIdList(){
// return this.detail.modelingTaskLabelList.map((item) => item.id);
// },
// computedMaterialLabelList(){
// return this.materialLabelList.filter((item) => !item.isDeleted && this.selectedTagIdList.indexOf(item.id) === -1)
// },
computedModelingTaskLabelList(){
return this.detail.modelingTaskLabelList.filter((item) => !item.isDeleted)
},
computedModelingTaskLabelIds(){
return this.computedModelingTaskLabelList.map((item) => item.materialLabelId);
}
},
onLoad({id}){
this.labelListTo();
if(id){
this.id = id;
this.getDetail(id)
}
},
methods:{
enter(value){
// let data = {
// createTime: "2021-12-31 16:45:43",
// createUser: "钱星",
// enterpriseId: 26,
// id: 4,
// isDeleted: false,
// labelName: "11",
// labelType: 0,
// updateTime: "",
// updateUser: "",
// }
// this.materialLabelList.push(data);
// let { id ,...other} = data;
// this.detail.modelingTaskLabelList.push({
// ...other,
// materialLabelId: data.id,
// modelingTaskId: this.detail.id
// })
this.$http("materialLabel.save",{
"labelName": value,
"labelType": 0
}).then(res =>{
let {
code, data,msg
} = res;
if(code === 200){
this.materialLabelList.push(data);
let { id ,...other} = data;
this.this.detail.modelingTaskLabelList.push({
...other,
materialLabelId: data.id,
modelingTaskId: this.id
})
}else{
this.$refs.uToast.show({
title: msg
})
this.labelListTo();
}
})
},
triggerClick(item){
let list = this.detail.modelingTaskLabelList;
let $Item = list.find(($i) => $i.materialLabelId === item.materialLabelId);
// debugger
if($Item){
if($Item.id){
this.$set($Item,'isDeleted',true)
}else{
let index = this.detail.modelingTaskLabelList.findIndex(($v) => $v === $Item)
if(index > -1){
this.detail.modelingTaskLabelList.splice(index,1)
}
}
}else{
this.detail.modelingTaskLabelList.push(item)
}
},
submitLabel(){
// console.log(this.detail.modelingTaskLabelList)
this.$http("modeling.saveOrUpdateLabel", this.detail.modelingTaskLabelList)
.then(res =>{
let {
code, data,msg
} = res;
if(code === 200){
}
})
},
labelListTo(){
this.$http("materialLabel.list",{
isDeleted: 0
}).then(res =>{
let {
code, data
} = res;
if(
code === 200
){
this.materialLabelList = data.platformLabel.map(($item) => {
let { id, ...item} = $item;
return {
...item,
materialLabelId: id,
modelingTaskId: this.id
}
});
// console.log(this.materialLabelList)
}
})
},
getDetail(id){
this.$http("modeling.detail",{ modelingTaskId:id })
.then(res => {
let {
code, data
} = res;
if(code === 200){
this.detail = Object.assign({},data,{
modelingCategoryText: data['modelingCategory']['name'],
modelingTaskColourDTOList: data['modelingTaskColourList'],
modelingTaskPictureDTOList: data['modelingTaskPictureList']
});
}
})
},
}
}
</script>
<style scoped lang="scss">
.bg-fff{
background: #fff;
}
.dialog-btn{
width: 160rpx;
height: 64rpx;
}
.overflow{
white-space: nowrap;
overflow-x: auto;
overflow-y: scroll;
}
.tags{
max-width: 80%;
}
.tag{
border-radius: 32rpx;
color: #818181;
background: #e4e4e4;
display: inline-block;
min-width: 100rpx;
text-align: center;
line-height: 64rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
&.active{
color: #b89874;
background: #efe8e0;
}
}
.body{
background: #f4f4f4;
position: absolute;
width: 100%;
height: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
overflow-y: auto;
}
.footer {
position: fixed;
width: 100%;
bottom: 0;
z-index: 998;
background: #fff;
box-shadow: 0px -4rpx 6rpx 0px rgba(178,182,214,0.10);
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.footer-btn{
padding: 20rpx 60rpx;
}
}
@mixin vue-flex($direction: row) {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: $direction;
/* #endif */
}
.custom-style{
color: #fff; height: 88rpx; line-height: 88rpx;
@include vue-flex;
&-btn{
overflow: hidden;
border: 1px solid rgba(0,0,0,0.80);
}
&-round-circle{
border-radius: 100rpx;
}
/*background: #000;*/
.custom-style-left{ width: 240rpx; background: #d6d6d6; text-align: center }
.custom-style-right{ flex: 1; background: rgba(0,0,0,0.80);text-align: center}
.save{
font-size: 34rpx;
color: #000000;
}
.cancel{
font-size: 34rpx;
color: rgba(0,0,0,0.80);
background: #fff;
}
.submit{
font-weight: 500;
font-size: 34rpx;
.desc{
font-size: 20rpx;
.color{
color: #DDA973;
}
}
}
}
</style>
获取token => userId && enterpriseId =>
=>
<!--我的-->
<template>
<view>
<view class="">
<text class="u-font-40">我的</text>
<text class="">my</text>
</view>
<view>
<view class=""></view>
</view>
<hs-tab-bar></hs-tab-bar>
</view>
</template>
<script>
import HsTabBar from "../../../components/hs-tab-bar/hs-tab-bar";
export default {
name: "index",
components: {HsTabBar},
data(){
return{
}
}
}
</script>
<style scoped>
</style>
This diff is collapsed.
<template>
<view>
<view v-for="item in mockData" @click="click(item)"
class="item"
:class="[item === active? 'u-border active' :'']">
用户名:{{item.userName}}
</view>
<!-- <button @click="getTenanList">getTenanList</button>-->
<button @click="next" :disabled="active === -1">下一步</button>
<button @click="login">下一步</button>
<!-- <view>encryptToken结果:{{token}}</view>-->
</view>
</template>
<script>
export default {
name: "index",
data(){
return {
back: '',
mockData: [
// {
// "id": 0,
// "userNo": "string",
// "userName": "string",
// "phone": "string",
// "tenantId": "string",
// "tenantCode": "string",
// "tenantName": "string",
// "tenantPlat": "string",
// "globalUserId": "string"
// }
// {globalId: "1375592964957573120", tenantId: "1442659610786926593", subId: "1442659610786926600"}
],
active: -1,
token: "",
userData: {}
}
},
onLoad(){
// #ifdef APP-PLUS
uni.onNativeEventReceive((event,data)=>{
if(event === 'getTenantList'){
this.mockData = JSON.parse(data);
}else if(event === 'encryptToken'){
this.token = data;
uni.setStorageSync('encryptToken', data);
this.login()
}
})
this.getTenanList();
// #endif
},
methods:{
click(item){
this.active = item;
},
getTenanList(){
// 向宿主App发送事件
uni.sendNativeEvent('getTenantList', {
}, ret => {
// 返回的是 String 还是 JsonObject
// this.back = ret;
// this.mockData = JSON.parse(ret);
})
},
encryptToken(){
uni.sendNativeEvent('encryptToken',JSON.stringify(
{
globalId: this.active.globalUserId,
tenantId: this.active.tenantId,
subId: this.active.id,
}
), ret => {
// 返回的是 String 还是 JsonObject
// this.token = ret;
})
},
getToken(){
uni.setStorageSync('encryptToken',"")
},
login(){
// uni.setStorageSync('encryptToken',"MBN9Om00MUE9CEcnizCOwinwRe5NJNdZb4JyDT3/ze+vyyv5QNXVoo0Sb65Gptgdy9BZZFX36tEge08iDEzLHIYsLS95bnrcwUOh1tp9pMiJ0XYNBFnFcHFXP9AgeAmYe9EXW+akUkx4Zr7PGiG7eqhuabLlPisHhoQOBfFFTwQ=")
// 核对
this.$http(
"auth.checkSecretKey",
uni.getStorageSync('encryptToken')
).then(res =>{
let {
code, data
} = res;
if(code === 200){
let {
userId, // 用户id
enterpriseId // 企业id
} = data;
this.userData = data;
uni.setStorageSync('tenantId', data.tenantId);
if(userId && enterpriseId){
this.createToken(data);
}else{
this.toRegister();
}
}
})
},
// 跳转到注册
toRegister(){
let {userId,enterpriseId,subId,tenantId} = this.userData;
this.$Router.push({
path: "/pages/user/register",
query:{
pcUserId: userId || "",
pcBasicsId: enterpriseId || "",
tenantUserId:subId,
tenantId,
}
})
},
// 跳转到首页
toIndexPage(){
this.$Router.push({
path: "/pages/home/index"
})
},
checkStatus(data){
this.$http(
"user.checkMagStatus",{
pcUserId: data.userId,
pcBasicsId: data.enterpriseId,
}).then(res =>{
let { code ,data} = res;
if(code === 200){
// 1-面料供应商, 2-品牌商, 3-设计机构, 4-检测机构
let { identityType} = data.userLastIdentity;
if(identityType){
this.assignType = identityType;
this.filterStatus(data)
}
}
})
},
filterStatus(data){
// 0-未完善 1-已完善
let{
isBrandOwner, // 我要选款
isDesignAgency, // 完善设计机构信息
isFabricSupplier, //完善面料供应商信息
isTestingFacility, // 完善检测机构信息
} = data;
let { assignType} = this;
switch (assignType){
case "1":
isFabricSupplier ? this.toIndexPage() : this.toRegister();
return ;
case "2":
isBrandOwner ? this.toIndexPage() : this.toRegister();
return ;
case "3":
isDesignAgency ? this.toIndexPage() : this.toRegister();
return ;
case "4":
isTestingFacility ? this.toIndexPage() : this.toRegister();
return ;
default:
this.toRegister();
return;
}
},
createToken(data){
this.$http("auth.createTokenByApp" ,{
...data,
...{
identityType: uni.getStorageSync("identityType")
}
}).then(res =>{
let {
code, data
} = res;
if(code === 200){
uni.setStorageSync('token', data.accessToken);
uni.setStorageSync('pcUserId', data.userId);
uni.setStorageSync('pcBasicsId', data.enterpriseId);
// uni.setStorageSync('tenantId', this.userData.tenantId);
this.checkStatus(data);
}
})
},
next(){
this.encryptToken();
// this.encryptToken();
// uni.setStorageSync('encryptToken',"MBN9Om00MUE9CEcnizCOwinwRe5NJNdZb4JyDT3/ze+vyyv5QNXVoo0Sb65Gptgdy9BZZFX36tEge08iDEzLHIYsLS95bnrcwUOh1tp9pMiJ0XYNBFnFcHFXP9AgeAmYe9EXW+akUkx4Zr7PGiG7eqhuabLlPisHhoQOBfFFTwQ=")
// this.$Router.push({
// path: "/pages/user/register"
// })
}
}
}
</script>
<style scoped>
.item{
padding: 30rpx;
}
.active{
color: #1E90FF;
}
</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