|
@@ -6,11 +6,11 @@
|
|
|
<view style="width: 90%;margin:0 auto;">
|
|
|
<tm-tabs align="left" class="qiehuan1" v-model="activeIndex" :list="list" range-key="title"></tm-tabs>
|
|
|
</view>
|
|
|
- <image v-if="activeIndex==0" class="touxiang" src="/static/img/63.png" mode="widthFix"></image>
|
|
|
+ <image v-if="activeIndex==0 && alldata !=0" class="touxiang" :src="alldata.detail.image" mode="widthFix"></image>
|
|
|
</view>
|
|
|
<div class="zhuti" style="padding-bottom:60px !important;" v-if="activeIndex==0">
|
|
|
- <view class="text-align-center text-size-lg">新款冬季羽绒服</view>
|
|
|
- <view class="text-align-center text-size-s mt-10 text-gray">蓬松、轻盈、温暖</view>
|
|
|
+ <view class="text-align-center text-size-lg" v-if="alldata !=0">{{alldata.detail.brand}}{{alldata.detail.color}}{{alldata.detail.goods_name}}</view>
|
|
|
+ <view class="text-align-center text-size-s mt-10 text-gray" v-if="alldata !=0">{{alldata.detail.description}}</view>
|
|
|
<tm-sheet class="kuang" style="padding-bottom: 30px !important;">
|
|
|
<view style="width: 98%;margin:0 auto;margin-top:20px !important;position: relative;">
|
|
|
<view class="text-white text-align-center pt-20">衣物参数</view>
|
|
@@ -18,24 +18,32 @@
|
|
|
<image src="/static/img/64.png" mode="widthFix"></image>
|
|
|
<text>{{xianshi?'修改':'保存'}}</text>
|
|
|
</view>
|
|
|
- <view class="you black mt-30">
|
|
|
- <tm-input :disabled="xianshi" title="衣长" v-model="reqData.username" align="right"></tm-input>
|
|
|
- <tm-input :disabled="xianshi" title="上市年份" v-model="reqData.height" align="right"></tm-input>
|
|
|
- <tm-input :disabled="xianshi" title="颜色" v-model="reqData.weight" align="right"></tm-input>
|
|
|
- <tm-input :disabled="xianshi" title="尺码" v-model="reqData.username" align="right"></tm-input>
|
|
|
- <tm-input :disabled="xianshi" title="品牌" v-model="reqData.height" align="right"></tm-input>
|
|
|
- <tm-input :disabled="xianshi" title="主材含量" v-model="reqData.weight" align="right"></tm-input>
|
|
|
- <tm-input :disabled="xianshi" title="适用对象" v-model="reqData.weight" align="right"></tm-input>
|
|
|
+ <view class="you black mt-30" v-if="alldata !=0">
|
|
|
+ <tm-input :disabled="xianshi" :required="true" title="商品名称" v-model="alldata.detail.goods_name" align="right"></tm-input>
|
|
|
+ <tm-pickers :disabled="xianshi" class="tan" :default-value.sync="category_danarr" rang-key="category_name" :list="category_arr">
|
|
|
+ <tm-input :required="true" title="分类" placeholder="请选择分类" disabled :value="obTstr1(category_danarr,'category_name')" right-icon="icon-angle-right"></tm-input>
|
|
|
+ </tm-pickers>
|
|
|
+ <tm-pickers :disabled="xianshi" class="tan" :default-value.sync="role_danarr" rang-key="username" :list="role_arr">
|
|
|
+ <tm-input title="所属成员" :required="true" placeholder="请选择所属成员" disabled :value="obTstr3(role_danarr)" right-icon="icon-angle-right"></tm-input>
|
|
|
+ </tm-pickers>
|
|
|
+ <tm-input :disabled="xianshi" title="年份" v-model="alldata.detail.year" align="right"></tm-input>
|
|
|
+ <tm-input :disabled="xianshi" title="颜色" v-model="alldata.detail.color" align="right"></tm-input>
|
|
|
+ <tm-pickers :disabled="xianshi" class="tan" :default-value.sync="size_danarr" rang-key="title" :list="size_arr">
|
|
|
+ <tm-input title="尺码" placeholder="请选择尺码" disabled :value="obTstr2(size_danarr)" right-icon="icon-angle-right"></tm-input>
|
|
|
+ </tm-pickers>
|
|
|
+ <tm-input :disabled="xianshi" title="适用人群" v-model="alldata.detail.type" align="right"></tm-input>
|
|
|
+ <tm-input :disabled="xianshi" title="品牌" v-model="alldata.detail.brand" align="right"></tm-input>
|
|
|
+ <tm-input :disabled="xianshi" title="材料" v-model="alldata.detail.science" align="right"></tm-input>
|
|
|
</view>
|
|
|
</view>
|
|
|
</tm-sheet>
|
|
|
- <tm-sheet class="kuang">
|
|
|
+ <tm-sheet class="kuang" v-if="alldata !=0 && alldata.data.length !=0">
|
|
|
<view style="width: 98%;margin:0 auto;margin-top:20px !important;">
|
|
|
<view class="text-white text-align-center pt-20">类似衣物</view>
|
|
|
- <view class="yiguicla black pa-6 ma-4 fl mb-20" v-for="item in quanbuList" @click="yifu()">
|
|
|
- <image :src="item.src" mode="widthFix"></image>
|
|
|
- <view class="text-align-center text-size-m mt-8">{{item.text}}</view>
|
|
|
- <view class="text-align-center text-size-m mt-6 mb-6">{{item.type}}</view>
|
|
|
+ <view class="yiguicla black pa-6 ma-4 fl mb-20" v-for="item in alldata.data" @click="yifu()">
|
|
|
+ <image :src="item.image" mode="widthFix"></image>
|
|
|
+ <view class="text-align-center text-size-m mt-8">{{item.brand}}{{item.color}}</view>
|
|
|
+ <view class="text-align-center text-size-m mt-6 mb-6">{{item.goods_name}}</view>
|
|
|
</view>
|
|
|
<view style="clear: both;"></view>
|
|
|
</view>
|
|
@@ -54,7 +62,7 @@
|
|
|
></tm-listitem>
|
|
|
</view>
|
|
|
</tm-sheet> -->
|
|
|
- <tm-button :round="24" class="sao mb-40" block @click="show_1=true">出库</tm-button>
|
|
|
+ <tm-button v-if="alldata!=0 && alldata.detail.is_have !=0" :round="24" class="sao mb-40" block @click="chuku()">出库</tm-button>
|
|
|
</div>
|
|
|
<!-- 搭配 -->
|
|
|
<tm-sheet v-if="activeIndex==1" class="yichu" style="margin-bottom: 40px !important;">
|
|
@@ -75,20 +83,20 @@
|
|
|
|
|
|
|
|
|
<tm-poup v-model="show_1" :position="pos" class="tcc">
|
|
|
- <view style="position: relative !important;">
|
|
|
+ <view style="position: relative !important;" v-if="chukudata.length !=0">
|
|
|
<view style="height: 10px;"></view>
|
|
|
<tm-swiper :current="0" :indicator-dots="false" :round="6" :ani3d="190" :autoplay="false" :list="list1"></tm-swiper>
|
|
|
- <view class="text-white text-align-center mt-15">丝缎质感纹理风衣</view>
|
|
|
- <view class="text-white text-align-center mt-10 text-size-s">黑色 - 6518/320</view>
|
|
|
- <image class="guayi" src="/static/img/102.png" mode="widthFix"></image>
|
|
|
- <view class="text-white text-align-center mt-15">衣物位于 挂衣区 5号衣柜</view>
|
|
|
+ <view class="text-white text-align-center mt-15">{{chukudata[0].brand}}{{chukudata[0].color}}{{chukudata[0].goods_name}}</view>
|
|
|
+ <view class="text-white text-align-center mt-10 text-size-s">{{chukudata[0].description}}</view>
|
|
|
+ <image class="guayi" :src="chukudata[0].ygimage" mode="widthFix"></image>
|
|
|
+ <view class="text-white text-align-center mt-15">衣物位于 {{chukudata[0].ygposition}} {{chukudata[0].is_have}}号衣柜</view>
|
|
|
<view class="text-white text-align-center mt-15">
|
|
|
<image class="aniOn deng" src="/static/img/101.png" mode="widthFix"></image>
|
|
|
<text style="vertical-align: middle;">指示灯已亮,请取出衣柜</text>
|
|
|
</view>
|
|
|
<view class="anniu">
|
|
|
- <tm-button @click="quxiao()" theme="gray" size="n">取消</tm-button>
|
|
|
- <tm-button @click="chuFun()" class="fr" theme="primary" size="n">确认</tm-button>
|
|
|
+ <tm-button @click="quxiao()" theme="gray" size="n">关闭弹框</tm-button>
|
|
|
+ <tm-button @click="chuFun()" class="fr" theme="primary" size="n">取消出库</tm-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</tm-poup>
|
|
@@ -101,70 +109,40 @@ import{myRequest} from '@/api/request.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ category_arr:[],
|
|
|
+ category_danarr:[],
|
|
|
+ role_arr:[],
|
|
|
+ role_danarr:[],
|
|
|
+ size_arr:[
|
|
|
+ {title:"S",id:1},
|
|
|
+ {title:"M",id:2},
|
|
|
+ {title:"L",id:3},
|
|
|
+ {title:"XL",id:4},
|
|
|
+ {title:"XXL",id:5},
|
|
|
+ {title:"其他",id:6},
|
|
|
+ ],
|
|
|
+ size_danarr:[],
|
|
|
show_1:false,
|
|
|
- show_2:false,
|
|
|
pos:'center',
|
|
|
xianshi:true,
|
|
|
- list1:[
|
|
|
- '../../static/img/100.png'
|
|
|
- ],
|
|
|
+ list1:[],
|
|
|
list:[ '商品介绍','搭配方案'],
|
|
|
activeIndex:0,
|
|
|
activeIndex5:0,
|
|
|
reqData:{
|
|
|
- username:'1',
|
|
|
- height:'1',
|
|
|
- weight:'1',
|
|
|
+ goods_name:'',
|
|
|
+ category_id:'',
|
|
|
+ year:'',
|
|
|
+ color:'',
|
|
|
+ type:'',
|
|
|
+ size:'',
|
|
|
+ brand:'',
|
|
|
+ science:'',
|
|
|
+ role_id:''
|
|
|
},
|
|
|
- quanbuList:[{
|
|
|
- src:'/static/img/45.png',
|
|
|
- text:'NEO CITY 涂鸦',
|
|
|
- type:'手提包'
|
|
|
- },{
|
|
|
- src:'/static/img/46.png',
|
|
|
- text:'满印迷你标识',
|
|
|
- type:'围巾'
|
|
|
- },{
|
|
|
- src:'/static/img/47.png',
|
|
|
- text:'大号版型夹克',
|
|
|
- type:'新品'
|
|
|
- }],
|
|
|
- test1: [{
|
|
|
- img: '../../static/img/83.png',
|
|
|
- title: '丝缎质感纹理风衣',
|
|
|
- label: '黑色 - 6518/320',
|
|
|
- id: 3,
|
|
|
- buy: 0,
|
|
|
- itemId: 0
|
|
|
- }],
|
|
|
typeclick1:3,//1加入购物车,2购物车,3前往购买,4,5
|
|
|
typeclick:6,//1加入购物车,2购物车,3前往购买,4,5
|
|
|
list5:[ '搭配内的购物清单'],
|
|
|
- test: [{
|
|
|
- img: '../../static/img/83.png',
|
|
|
- title: '丝缎质感纹理风衣',
|
|
|
- label: '黑色 - 6518/320',
|
|
|
- price: '1299',
|
|
|
- id: 3,
|
|
|
- buy: 0,
|
|
|
- itemId: 0
|
|
|
- },{
|
|
|
- img: '../../static/img/84.png',
|
|
|
- title: '产品3(任选)',
|
|
|
- label: '这个产品是只有几个融会',
|
|
|
- price: 36.2,
|
|
|
- id: 3,
|
|
|
- buy: 0,
|
|
|
- itemId: 0
|
|
|
- },{
|
|
|
- img: '../../static/img/83.png',
|
|
|
- title: '产品3(任选)',
|
|
|
- label: '这个产品是只有几个融会',
|
|
|
- price: 36.2,
|
|
|
- id: 3,
|
|
|
- buy: 0,
|
|
|
- itemId: 0
|
|
|
- }],
|
|
|
quanbuList1:[{
|
|
|
src:'/static/img/44.png',
|
|
|
text:'日常穿搭'
|
|
@@ -185,35 +163,177 @@ export default {
|
|
|
text:'日常穿搭',
|
|
|
off:false
|
|
|
}],
|
|
|
+ alldata:0,
|
|
|
+ chukudata:[]
|
|
|
};
|
|
|
},
|
|
|
- onLoad() {
|
|
|
-
|
|
|
+ onLoad(e) {
|
|
|
+ this.id=e.id?e.id:'4';
|
|
|
+ this.getXiangq()
|
|
|
},
|
|
|
created() {
|
|
|
this.sys = uni.getSystemInfoSync();
|
|
|
},
|
|
|
methods: {
|
|
|
+ obTstr2(o){
|
|
|
+ if(Array.isArray(o)){
|
|
|
+ if(o.length.length===0) return "";
|
|
|
+ return o[0]?.title??""
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ },
|
|
|
+ getCY(){
|
|
|
+ var that=this;
|
|
|
+ myRequest({
|
|
|
+ url: "/api/MemberInfo/getFamilyMember",
|
|
|
+ method:'post',
|
|
|
+ data:{family_id:uni.getStorageSync("family_id")}
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.role_arr=res.data.data;
|
|
|
+ var id=that.alldata.detail.role_id;
|
|
|
+ for(let i=0;i<res.data.data.length;i++){
|
|
|
+ if(id==res.data.data[i].id){
|
|
|
+ this.role_danarr=[{
|
|
|
+ username:res.data.data[i].username,
|
|
|
+ id:res.data.data[i].id
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var sid=that.alldata.detail.size;
|
|
|
+ for(let i=0;i<that.size_arr.length;i++){
|
|
|
+ if(sid==that.size_arr[i].id){
|
|
|
+ this.size_danarr.push(that.size_arr[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ that.role_arr=[];
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ obTstr3(o){
|
|
|
+ if(Array.isArray(o)){
|
|
|
+ if(o.length.length===0) return "";
|
|
|
+ return o[0]?.username??""
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ },
|
|
|
+ getFl(){
|
|
|
+ var that=this;
|
|
|
+ myRequest({
|
|
|
+ url: "/api/Category/list",
|
|
|
+ method:'post',
|
|
|
+ data:{}
|
|
|
+ }).then(res => {
|
|
|
+
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.category_arr=res.data.data;
|
|
|
+ var id=that.alldata.detail.category_id;
|
|
|
+ for(let i=0;i<res.data.data.length;i++){
|
|
|
+ if(id==res.data.data[i].id){
|
|
|
+ this.category_danarr=[{
|
|
|
+ category_name:res.data.data[i].category_name,
|
|
|
+ id:res.data.data[i].id
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ that.category_arr=[];
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ obTstr1(o){
|
|
|
+ if(Array.isArray(o)){
|
|
|
+ if(o.length.length===0) return "";
|
|
|
+ return o[0]?.category_name??""
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ },
|
|
|
+ getXiangq(){
|
|
|
+ var that=this;
|
|
|
+ myRequest({
|
|
|
+ url: "/api/Goods/getDetail",
|
|
|
+ method:'post',
|
|
|
+ data:{id:that.id}
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.alldata=res.data.data;
|
|
|
+ that.getFl();
|
|
|
+ that.getCY();
|
|
|
+ }else{
|
|
|
+ that.alldata=[];
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
gengmore(){
|
|
|
|
|
|
},
|
|
|
- yuyue(){
|
|
|
- this.$refs.toast.show({model:'success',label:'预约成功'})
|
|
|
- },
|
|
|
- mingri(){
|
|
|
- this.show_2=true
|
|
|
+ chuku(){
|
|
|
+ var that=this;
|
|
|
+ that.list1=[];
|
|
|
+ myRequest({
|
|
|
+ url: "/api/Goods/takeClothes",
|
|
|
+ method:'post',
|
|
|
+ data:{id:[that.id]}
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.show_1=true;
|
|
|
+ that.chukudata=res.data.data;
|
|
|
+ that.list1.push(res.data.data[0].image)
|
|
|
+ that.$refs.toast.show({model:'success',label:'出库成功'})
|
|
|
+ }else{
|
|
|
+ that.$refs.toast.show({model:'error',label:res.data.msg})
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
xiugaiFun(){
|
|
|
+ var that=this;
|
|
|
+ if(! this.xianshi){
|
|
|
+ if(that.category_danarr.length==0){
|
|
|
+ that.$refs.toast.show({model:'warn',label:'请选择分类'})
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ that.reqData.category_id=that.category_danarr[0].id
|
|
|
+ }
|
|
|
+ if(that.role_danarr.length==0){
|
|
|
+ that.$refs.toast.show({model:'warn',label:'请选择成员'})
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ that.reqData.role_id=that.role_danarr[0].id
|
|
|
+ }
|
|
|
+ if(that.size_danarr.length!=0){
|
|
|
+ that.reqData.size=that.size_danarr[0].id
|
|
|
+ }
|
|
|
+ that.reqData.goods_name=that.alldata.detail.goods_name;
|
|
|
+ if(that.reqData.goods_name==""){
|
|
|
+ that.$refs.toast.show({model:'warn',label:'请输入商品名称'})
|
|
|
+ return
|
|
|
+ }
|
|
|
+ that.reqData.year=that.alldata.detail.year;
|
|
|
+ that.reqData.color=that.alldata.detail.color;
|
|
|
+ that.reqData.type=that.alldata.detail.type;
|
|
|
+ that.reqData.brand=that.alldata.detail.brand;
|
|
|
+ that.reqData.science=that.alldata.detail.science;
|
|
|
+ that.reqData.id=that.alldata.detail.id;
|
|
|
+ myRequest({
|
|
|
+ url: "/api/Goods/updateGoods",
|
|
|
+ method:'post',
|
|
|
+ data:that.reqData
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$refs.toast.show({model:'success',label:res.data.msg})
|
|
|
+ }else{
|
|
|
+ that.$refs.toast.show({model:'error',label:res.data.msg})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(this.reqData)
|
|
|
+ }
|
|
|
this.xianshi=!this.xianshi;
|
|
|
},
|
|
|
quxiao(){
|
|
|
this.show_1=false;
|
|
|
},
|
|
|
- chuFun(){
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages/index/index?index=1",
|
|
|
- })
|
|
|
- }
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -250,7 +370,7 @@ export default {
|
|
|
/deep/ .tcc uni-swiper{width: 100% !important;}
|
|
|
/deep/ .uni-swiper-slides{width: 160px !important;}
|
|
|
/deep/ .tcc uni-image{width: 160px !important;}
|
|
|
- .tcc .guayi{width: 90% !important;display: block;margin:0 auto;margin-top:15px !important;}
|
|
|
+ .tcc .guayi{width: 60% !important;display: block;margin:0 auto;margin-top:15px !important;}
|
|
|
.tcc .deng{width:25px !important;height:25px !important;vertical-align: middle;margin-right:8px;}
|
|
|
.aniOn{
|
|
|
animation:doudong 0.5s linear infinite;
|