|
|
@@ -1,22 +1,25 @@
|
|
|
<template>
|
|
|
<view class="finish-area">
|
|
|
<view class="cell-item">
|
|
|
+
|
|
|
+ <view class="flower-num-list">
|
|
|
+ <view v-for="info in flowerNumList" :class="[form.flowerNum===info.num?'selected':'']" @click="setNum(info)" :key="info.num">{{info.name}}</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="item">
|
|
|
<text class="left">品类</text>
|
|
|
<view class="class-item-list">
|
|
|
<view v-for="info in kindList" :class="[form.kindId===info.id?'selected':'']" @click="setKind(info)" :key="info.id">{{info.name}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="item">
|
|
|
- <text class="left">支数</text>
|
|
|
- <view class="flower-num-list">
|
|
|
- <view v-for="info in flowerNumList" :class="[form.flowerNum===info.num?'selected':'']" @click="setNum(info)" :key="info.num">{{info.name}}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
<view class="item">
|
|
|
<text class="left">数量</text>
|
|
|
<input v-model="form.num" style="height:40upx;border:1upx solid #CCCCCC;font-size:28upx;margin:8upx 0 8upx 0;width:40vw;text-align:center;" type="number" @focus="form.num=''" placeholder="请填写数量" placeholder-class="gray" />
|
|
|
</view>
|
|
|
+ <view class="item">
|
|
|
+ <text class="left" style="margin-bottom:50upx;">支数</text>
|
|
|
+ <input v-model="form.flowerNum" style="height:40upx;border:1upx solid #CCCCCC;font-size:28upx;margin:8upx 0 8upx 0;width:40vw;text-align:center;margin-bottom:50upx;" type="number" @focus="form.flowerNum=''" placeholder="请填写支数" placeholder-class="gray" />
|
|
|
+ </view>
|
|
|
<view class="item">
|
|
|
<text class="left">打标签</text>
|
|
|
<view style="margin:10upx 0 10upx 0;">
|
|
|
@@ -24,6 +27,14 @@
|
|
|
<switch :checked="form.print == 1 ? true : false" @change="printChange" style="transform: scale(1,1)" />
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <view class="item">
|
|
|
+ <text class="left">制作人</text>
|
|
|
+ <view class="staff-list">
|
|
|
+ <view v-for="staff in staffList" :class="[form.staffId===staff.id?'selected':'']" @click="setStaff(staff)" :key="staff.id">{{staff.name}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
<view class="footer">
|
|
|
<button @click="cancelCreate()">取消</button>
|
|
|
@@ -50,20 +61,23 @@ export default {
|
|
|
mixins: [productMins],
|
|
|
data(){
|
|
|
return {
|
|
|
- flowerNumList:[{num:6,name:6},{num:9,name:9},{num:11,name:11},{num:19,name:19},{num:33,name:33},{num:52,name:52},{num:66,name:66},{num:99,name:99},{num:999,name:999}],
|
|
|
+ flowerNumList:[{num:9,name:9},{num:11,name:11},{num:16,name:16},{num:33,name:33},{num:52,name:52},{num:66,name:66},{num:99,name:99}],
|
|
|
kindList:[],
|
|
|
form:{
|
|
|
kindId:0,
|
|
|
kindName:'',
|
|
|
num:1,
|
|
|
- flowerNum:0,
|
|
|
- print:1
|
|
|
+ flowerNum:'',
|
|
|
+ print:1,
|
|
|
+ staffId:0,
|
|
|
+ staffName:''
|
|
|
},
|
|
|
headers:{token:''},
|
|
|
currentImgData:[],
|
|
|
currentJobType:'make',
|
|
|
currentJobId:0,
|
|
|
- hasConnect:true
|
|
|
+ hasConnect:true,
|
|
|
+ staffList:[{id:1,name:'石头'},{id:2,name:'小林'}]
|
|
|
}
|
|
|
},
|
|
|
computed:{
|
|
|
@@ -86,6 +100,10 @@ export default {
|
|
|
printChange(e){
|
|
|
this.form.print = e.detail.value ? 1 : 0;
|
|
|
},
|
|
|
+ setStaff(item){
|
|
|
+ this.form.staffId = item.id
|
|
|
+ this.form.staffName = item.name
|
|
|
+ },
|
|
|
setNum(info){
|
|
|
this.form.flowerNum = info.num
|
|
|
},
|
|
|
@@ -97,11 +115,15 @@ export default {
|
|
|
this.$emit('cancelCreate')
|
|
|
},
|
|
|
beginConfirm(){
|
|
|
+ this.$util.hitVoice()
|
|
|
if(Number(this.form.flowerNum)<=0){
|
|
|
this.$msg('请选择支数')
|
|
|
return false
|
|
|
}
|
|
|
- this.$util.hitVoice()
|
|
|
+ if(Number(this.form.staffId)<=0){
|
|
|
+ this.$msg('请选择制作人')
|
|
|
+ return false
|
|
|
+ }
|
|
|
this.$refs.confirmCreateRef.open('center')
|
|
|
},
|
|
|
confirmSubmit(){
|
|
|
@@ -121,7 +143,7 @@ export default {
|
|
|
|
|
|
that.currentImgData = []
|
|
|
that.form.kindId = that.kindList[0].id
|
|
|
- that.form.flowerNum = 0
|
|
|
+ that.form.flowerNum = ''
|
|
|
|
|
|
}
|
|
|
})
|
|
|
@@ -183,6 +205,33 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.flower-num-list{
|
|
|
+ position:absolute;
|
|
|
+ top:187upx;
|
|
|
+ left:90upx;
|
|
|
+ width:40vw;
|
|
|
+ height:auto;
|
|
|
+ flex-wrap:wrap;
|
|
|
+ display:flex;
|
|
|
+ justify-content:space-between;
|
|
|
+ margin:5upx 0 5upx 0;
|
|
|
+ view{
|
|
|
+ width:40upx;
|
|
|
+ height:40upx;
|
|
|
+ font-size:10upx;
|
|
|
+ margin-left:3upx;
|
|
|
+ border:1upx solid #DDDDDD;
|
|
|
+ border-radius:10upx;
|
|
|
+ display: flex;
|
|
|
+ justify-content:center;
|
|
|
+ align-items:center;
|
|
|
+ }
|
|
|
+ .selected{
|
|
|
+ background-color:#3385ff;
|
|
|
+ color:white;
|
|
|
+ border:1upx solid #3385ff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .staff-list{
|
|
|
width:40vw;
|
|
|
height:auto;
|
|
|
flex-wrap:wrap;
|
|
|
@@ -209,7 +258,7 @@ export default {
|
|
|
}
|
|
|
.footer{
|
|
|
display: flex;
|
|
|
- margin-top:50upx;
|
|
|
+ margin-top:20upx;
|
|
|
justify-content:center;
|
|
|
button{
|
|
|
width:80upx;
|