|
|
@@ -1,20 +1,20 @@
|
|
|
<template>
|
|
|
<view class="finish-area">
|
|
|
<view class="cell-item">
|
|
|
- <view class="item"><text class="left">名称</text> <input v-model="form.name" placeholder="请填写名称,留空默认花束" placeholder-class="gray" /></view>
|
|
|
- <view class="item"><text class="left">数量</text> <input v-model="form.num" type="number" @focus="form.num=''" placeholder="请填写数量" placeholder-class="gray" /></view>
|
|
|
- <view class="item">
|
|
|
- <text class="left">分类</text>
|
|
|
- <view class="class-item-list">
|
|
|
- <view v-for="info in catList" :class="[form.catId===info.id?'selected':'']" @click="setCat(info)" :key="info.id">{{info.categoryName}}</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>
|
|
|
+ <view class="class-item-list">
|
|
|
+ <view v-for="info in catList" :class="[form.catId===info.id?'selected':'']" @click="setCat(info)" :key="info.id">{{info.categoryName}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="item"><text class="left">名称</text> <input v-model="form.name" style="height:50upx;" placeholder="请填写名称" @focus="form.name=''" placeholder-class="gray" /></view>
|
|
|
+ <view class="item"><text class="left">数量</text> <input v-model="form.num" style="height:50upx;" type="number" @focus="form.num=''" placeholder="请填写数量" placeholder-class="gray" /></view>
|
|
|
<view class="item">
|
|
|
<text class="left">图片</text>
|
|
|
<view>
|
|
|
@@ -23,17 +23,6 @@
|
|
|
</htz-image-upload>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="item">
|
|
|
- <text class="left">直接完成</text>
|
|
|
- <switch :checked="form.complete == 1 ? true : false" @change="changeComplete" style="transform: scale(0.9,0.8)" />
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="item" v-if="form.complete == 1">
|
|
|
- <text class="left">打印</text>
|
|
|
- <switch :checked="form.needPrint == 1 ? true : false" @change="changePrint" style="transform: scale(0.9,0.8)" />
|
|
|
- </view>
|
|
|
-
|
|
|
</view>
|
|
|
<view class="footer">
|
|
|
<button @click="cancelCreate()">取消</button>
|
|
|
@@ -53,9 +42,6 @@ import { mapGetters } from "vuex"
|
|
|
import {getClass} from '@/api/category'
|
|
|
import productMins from "@/mixins/product"
|
|
|
import { createWorkFn } from '@/api/work'
|
|
|
-// #ifdef APP-PLUS
|
|
|
-const plug = uni.requireNativePlugin('Html5app-Gprinter')
|
|
|
-// #endif
|
|
|
export default {
|
|
|
name:'finishWork',
|
|
|
components:{
|
|
|
@@ -67,13 +53,11 @@ export default {
|
|
|
flowerNumList:[{num:0,name:'无'},{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}],
|
|
|
catList:[],
|
|
|
form:{
|
|
|
- name:'',
|
|
|
+ name:'花束',
|
|
|
catId:0,
|
|
|
num:1,
|
|
|
flowerNum:0,
|
|
|
- cover:'',
|
|
|
- needPrint:1,
|
|
|
- complete:1
|
|
|
+ cover:''
|
|
|
},
|
|
|
headers:{token:''},
|
|
|
currentImgData:[],
|
|
|
@@ -114,20 +98,6 @@ export default {
|
|
|
setCat(info){
|
|
|
this.form.catId = info.id
|
|
|
},
|
|
|
- changePrint(e){
|
|
|
- if(e.detail.value == true){
|
|
|
- this.form.needPrint = 1
|
|
|
- }else{
|
|
|
- this.form.needPrint = 2
|
|
|
- }
|
|
|
- },
|
|
|
- changeComplete(e){
|
|
|
- if(e.detail.value == true){
|
|
|
- this.form.complete = 1
|
|
|
- }else{
|
|
|
- this.form.complete = 0
|
|
|
- }
|
|
|
- },
|
|
|
cancelCreate(){
|
|
|
this.$emit('cancelCreate')
|
|
|
},
|
|
|
@@ -145,9 +115,6 @@ export default {
|
|
|
this.$msg('请选择花材')
|
|
|
return false
|
|
|
}
|
|
|
- if(this.form.complete == 0){
|
|
|
- this.form.needPrint = 2
|
|
|
- }
|
|
|
this.commitCreate()
|
|
|
},
|
|
|
commitCreate(){
|
|
|
@@ -166,8 +133,6 @@ export default {
|
|
|
that.form.name=''
|
|
|
that.form.catId = that.catList[0].id
|
|
|
that.form.flowerNum = 0
|
|
|
- that.form.needPrint = 1
|
|
|
- that.form.complete = 1
|
|
|
|
|
|
}
|
|
|
})
|
|
|
@@ -179,6 +144,7 @@ export default {
|
|
|
.finish-area {
|
|
|
background-color: #ffffff;
|
|
|
width:40vw;
|
|
|
+ height:90vh;
|
|
|
.cell-item{
|
|
|
display:flex;
|
|
|
font-size:11upx;
|
|
|
@@ -207,17 +173,17 @@ export default {
|
|
|
flex-wrap:wrap;
|
|
|
display:flex;
|
|
|
justify-content:center;
|
|
|
- margin:5upx 0 5upx 0;
|
|
|
+ margin:8upx 0 8upx 0;
|
|
|
view{
|
|
|
width:30upx;
|
|
|
- height:20upx;
|
|
|
+ height:23upx;
|
|
|
font-size:8upx;
|
|
|
border:1upx solid #DDDDDD;
|
|
|
border-radius:10upx;
|
|
|
display: flex;
|
|
|
justify-content:center;
|
|
|
align-items:center;
|
|
|
- margin-left:3upx;
|
|
|
+ margin-left:6upx;
|
|
|
}
|
|
|
.selected{
|
|
|
background-color:#3385ff;
|
|
|
@@ -233,8 +199,8 @@ export default {
|
|
|
justify-content:space-between;
|
|
|
margin:5upx 0 5upx 0;
|
|
|
view{
|
|
|
- width:25upx;
|
|
|
- height:25upx;
|
|
|
+ width:26upx;
|
|
|
+ height:26upx;
|
|
|
font-size:8upx;
|
|
|
margin-left:3upx;
|
|
|
border:1upx solid #DDDDDD;
|