|
|
@@ -16,43 +16,19 @@
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">拼音缩写</div>
|
|
|
- <input
|
|
|
- v-model="form.py"
|
|
|
- placeholder-class="phcolor"
|
|
|
- class="tui-input"
|
|
|
- name="py"
|
|
|
- placeholder="请填写拼音首字母缩写"
|
|
|
- maxlength="50"
|
|
|
- type="text"
|
|
|
- />
|
|
|
+ <input v-model="form.py" placeholder-class="phcolor" class="tui-input" name="py" placeholder="请填写拼音首字母缩写" maxlength="50" type="text" />
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">花店价</div>
|
|
|
- <input
|
|
|
- v-model="form.price"
|
|
|
- placeholder-class="phcolor"
|
|
|
- class="tui-input"
|
|
|
- name="price"
|
|
|
- @focus="form.price=''"
|
|
|
- placeholder="请填写"
|
|
|
- maxlength="50"
|
|
|
- type="digit"
|
|
|
- />
|
|
|
+ <input v-model="form.price" style="width:140upx;" placeholder-class="phcolor" class="tui-input" name="price" @focus="form.price=''" placeholder="请填写" maxlength="50" type="digit" />
|
|
|
+ <text style="color:#666666;margin-right:20upx;">散客比花店贵:</text>
|
|
|
+ <input v-model="form.skMore" style="width:110upx;" placeholder-class="phcolor" class="tui-input" name="skMore" @focus="form.skMore=''" placeholder="请填写" type="digit" />
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">今日特价</div>
|
|
|
- <input
|
|
|
- v-model="form.discountPrice"
|
|
|
- placeholder-class="phcolor"
|
|
|
- class="tui-input"
|
|
|
- name="discountPrice"
|
|
|
- @focus="form.discountPrice=''"
|
|
|
- placeholder="不做特价填0"
|
|
|
- maxlength="50"
|
|
|
- type="digit"
|
|
|
- />
|
|
|
+ <div class="tui-title">花店今日特价</div>
|
|
|
+ <input v-model="form.discountPrice" placeholder-class="phcolor" class="tui-input" name="discountPrice" @focus="form.discountPrice=''" placeholder="不做特价填0" maxlength="50" type="digit" />
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
@@ -63,14 +39,7 @@
|
|
|
|
|
|
<tui-list-cell class="line-cell" :arrow="true">
|
|
|
<div class="tui-title">分类</div>
|
|
|
- <picker
|
|
|
- mode="selector"
|
|
|
- :value="form.classId"
|
|
|
- :range="itemClassData"
|
|
|
- range-key="name"
|
|
|
- @change="changeItemClassFn"
|
|
|
- class="tui-input"
|
|
|
- >
|
|
|
+ <picker mode="selector" :value="form.classId" :range="itemClassData" range-key="name" @change="changeItemClassFn" class="tui-input" >
|
|
|
<input v-model="form.classId" name="classId" type="text" hidden />
|
|
|
<div v-if="form.classId" style="height:45upx;" >{{ itemClassSelectedData.name }}</div>
|
|
|
<div class="tui-placeholder" style="height:45upx;" v-else>请选择</div>
|
|
|
@@ -79,14 +48,7 @@
|
|
|
|
|
|
<tui-list-cell class="line-cell" :arrow="true">
|
|
|
<div class="tui-title">大单位</div>
|
|
|
- <picker
|
|
|
- mode="selector"
|
|
|
- :value="form.bigUnitId"
|
|
|
- :range="unitData"
|
|
|
- range-key="name"
|
|
|
- @change="changeBigUnitFn"
|
|
|
- class="tui-input"
|
|
|
- >
|
|
|
+ <picker mode="selector" :value="form.bigUnitId" :range="unitData" range-key="name" @change="changeBigUnitFn" class="tui-input" >
|
|
|
<input v-model="form.bigUnitId" name="bigUnitId" type="text" hidden />
|
|
|
<div v-if="form.bigUnitId">{{ bigUnitSelectedData.name }}</div>
|
|
|
<div class="tui-placeholder" style="height:45upx;" v-else>请选择</div>
|
|
|
@@ -95,14 +57,7 @@
|
|
|
|
|
|
<tui-list-cell class="line-cell" :arrow="true">
|
|
|
<div class="tui-title">小单位</div>
|
|
|
- <picker
|
|
|
- mode="selector"
|
|
|
- :value="form.smallUnitId"
|
|
|
- :range="unitData"
|
|
|
- range-key="name"
|
|
|
- @change="changeSmallUnitFn"
|
|
|
- class="tui-input"
|
|
|
- >
|
|
|
+ <picker mode="selector" :value="form.smallUnitId" :range="unitData" range-key="name" @change="changeSmallUnitFn" class="tui-input" >
|
|
|
<input v-model="form.smallUnitId" name="smallUnitId" type="text" hidden />
|
|
|
<div v-if="form.smallUnitId">{{ smallUnitSelectedData.name }}</div>
|
|
|
<div class="tui-placeholder" v-else>请选择</div>
|
|
|
@@ -247,6 +202,7 @@ export default {
|
|
|
smallUnitId:2,
|
|
|
classId:'',
|
|
|
price:'',
|
|
|
+ skMore:'',
|
|
|
skAddPrice:'',
|
|
|
addPrice:'',
|
|
|
discountPrice:'',
|
|
|
@@ -351,6 +307,7 @@ export default {
|
|
|
this.form.id = 0
|
|
|
this.form.price = ''
|
|
|
this.form.skAddPrice =''
|
|
|
+ this.form.skMore =''
|
|
|
this.form.addPrice =''
|
|
|
this.form.discountPrice = ''
|
|
|
})
|
|
|
@@ -463,6 +420,10 @@ export default {
|
|
|
uni.showToast({title:"请填写花店加价",icon:"none"})
|
|
|
return;
|
|
|
}
|
|
|
+ if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.skMore) == false){
|
|
|
+ uni.showToast({title:"请填写散客比花店贵多少",icon:"none"})
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
let form = JSON.parse(JSON.stringify(this.form))
|
|
|
uni.showLoading({mask:true})
|
|
|
@@ -527,6 +488,11 @@ export default {
|
|
|
rule: ["required"],
|
|
|
msg: ["请填写散客加价"]
|
|
|
},
|
|
|
+ {
|
|
|
+ name: "skMore",
|
|
|
+ rule: ["required"],
|
|
|
+ msg: ["请填写散客比花店贵多少"]
|
|
|
+ },
|
|
|
{
|
|
|
name: "addPrice",
|
|
|
rule: ["required"],
|