|
@@ -21,13 +21,14 @@
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">花店价</view>
|
|
<view class="tui-title">花店价</view>
|
|
|
- <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="请填写" type="digit" />
|
|
|
|
|
+ <text style="color:#666666;margin-right:20upx;">散客比花店贵:</text>
|
|
|
|
|
+ <input v-model="form.price" style="width:110upx;" placeholder-class="phcolor" class="tui-input" name="skMore" @focus="form.skMore=''" placeholder="请填写" type="digit" />
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title">今日特价</view>
|
|
|
|
|
- <input v-model="form.discountPrice" style="width:300upx;" placeholder-class="phcolor" class="tui-input" name="discountPrice" @focus="form.discountPrice=''" placeholder="不做特价填0" maxlength="50" type="digit" />
|
|
|
|
|
- <button v-if="productData.id > 0" class="admin-button-com blue middle" @click="printLabel(productData)">打标签</button>
|
|
|
|
|
|
|
+ <view class="tui-title">花店今日特价</view>
|
|
|
|
|
+ <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>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
@@ -50,23 +51,6 @@
|
|
|
<view class="tui-placeholder" style="height:45upx;" v-else>请选择</view>
|
|
<view class="tui-placeholder" style="height:45upx;" v-else>请选择</view>
|
|
|
</picker>
|
|
</picker>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
-
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
- <view class="tui-title">散客加价</view>
|
|
|
|
|
- <input v-model="form.skAddPrice" placeholder-class="phcolor" class="tui-input" style="width:130upx;" name="skAddPrice" @focus="form.skAddPrice=''" placeholder="请填写" maxlength="50" type="digit" />
|
|
|
|
|
- <text style="color:#CCCCCC;">
|
|
|
|
|
- <text style="width:170upx;display:inline-block;">成本 ¥{{parseFloat(cost)}}</text>
|
|
|
|
|
- <text style="width:170upx;display:inline-block;">售价 ¥{{skSellPrice}}</text>
|
|
|
|
|
- </text>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
- <view class="tui-title">花店加价</view>
|
|
|
|
|
- <input v-model="form.addPrice" placeholder-class="phcolor" class="tui-input" style="width:130upx;" name="addPrice" @focus="form.addPrice=''" placeholder="请填写" maxlength="50" type="digit" />
|
|
|
|
|
- <text style="color:#CCCCCC;">
|
|
|
|
|
- <text style="width:170upx;display:inline-block;">成本 ¥{{parseFloat(cost)}}</text>
|
|
|
|
|
- <text style="width:170upx;display:inline-block;">售价 ¥{{sellPrice}}</text>
|
|
|
|
|
- </text>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
<tui-list-cell class="line-cell" :arrow="false">
|
|
<tui-list-cell class="line-cell" :arrow="false">
|
|
|
<view class="tui-title">大单位</view>
|
|
<view class="tui-title">大单位</view>
|
|
|
<input v-model="form.bigUnitId" name="bigUnitId" type="text" hidden />
|
|
<input v-model="form.bigUnitId" name="bigUnitId" type="text" hidden />
|
|
@@ -93,7 +77,17 @@
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">库存预警值</view>
|
|
<view class="tui-title">库存预警值</view>
|
|
|
- <input v-model="form.stockWarning" @focus="form.stockWarning=''" placeholder-class="phcolor" class="tui-input" name="stockWarning" placeholder="请填写" maxlength="50" type="number" />
|
|
|
|
|
|
|
+ <input v-model="form.stockWarning" style="width:300upx;" @focus="form.stockWarning=''" placeholder-class="phcolor" class="tui-input" name="stockWarning" placeholder="请填写" maxlength="50" type="number" />
|
|
|
|
|
+ <button v-if="productData.id > 0" class="admin-button-com blue middle" @click="printLabel(productData)">打标签</button>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">花店加价</view>
|
|
|
|
|
+ <input v-model="form.addPrice" placeholder-class="phcolor" class="tui-input" style="width:130upx;" name="addPrice" @focus="form.addPrice=''" placeholder="请填写" maxlength="50" type="digit" />
|
|
|
|
|
+ <text style="color:#CCCCCC;">
|
|
|
|
|
+ <text style="width:170upx;display:inline-block;">成本 ¥{{parseFloat(cost)}}</text>
|
|
|
|
|
+ <text style="width:170upx;display:inline-block;">售价 ¥{{sellPrice}}</text>
|
|
|
|
|
+ </text>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
@@ -169,9 +163,9 @@ export default {
|
|
|
smallUnitId:2,
|
|
smallUnitId:2,
|
|
|
classId:'',
|
|
classId:'',
|
|
|
price:'',
|
|
price:'',
|
|
|
- skAddPrice:'',
|
|
|
|
|
addPrice:'',
|
|
addPrice:'',
|
|
|
discountPrice:'',
|
|
discountPrice:'',
|
|
|
|
|
+ skMore:'',
|
|
|
weight:'',
|
|
weight:'',
|
|
|
cover:[],
|
|
cover:[],
|
|
|
stockWarning:'',
|
|
stockWarning:'',
|
|
@@ -205,11 +199,6 @@ export default {
|
|
|
let price = Number(this.cost) + Number(this.form.addPrice)
|
|
let price = Number(this.cost) + Number(this.form.addPrice)
|
|
|
price = parseFloat(price.toFixed(2))
|
|
price = parseFloat(price.toFixed(2))
|
|
|
return price
|
|
return price
|
|
|
- },
|
|
|
|
|
- skSellPrice(){
|
|
|
|
|
- let price = Number(this.cost) + Number(this.form.skAddPrice)
|
|
|
|
|
- price = parseFloat(price.toFixed(2))
|
|
|
|
|
- return price
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
@@ -307,10 +296,9 @@ export default {
|
|
|
this.form.delStatus = 0
|
|
this.form.delStatus = 0
|
|
|
this.form.id = 0
|
|
this.form.id = 0
|
|
|
this.form.price = ''
|
|
this.form.price = ''
|
|
|
- this.form.skAddPrice =''
|
|
|
|
|
this.form.addPrice =''
|
|
this.form.addPrice =''
|
|
|
this.form.discountPrice = ''
|
|
this.form.discountPrice = ''
|
|
|
-
|
|
|
|
|
|
|
+ this.form.skMore = ''
|
|
|
this.cost = res.data.cost || 0
|
|
this.cost = res.data.cost || 0
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -414,15 +402,15 @@ export default {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.price) == false){
|
|
if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.price) == false){
|
|
|
- uni.showToast({title:"请填写售价",icon:"none"})
|
|
|
|
|
|
|
+ uni.showToast({title:"请填写花店价",icon:"none"})
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.skAddPrice) == false){
|
|
|
|
|
- uni.showToast({title:"请填写散客加价",icon:"none"})
|
|
|
|
|
|
|
+ if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.addPrice) == false){
|
|
|
|
|
+ uni.showToast({title:"请填写花店加价",icon:"none"})
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.addPrice) == false){
|
|
|
|
|
- uni.showToast({title:"请填写普店加价",icon:"none"})
|
|
|
|
|
|
|
+ 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;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -489,11 +477,6 @@ export default {
|
|
|
rule: ["required"],
|
|
rule: ["required"],
|
|
|
msg: ["请填写售价"]
|
|
msg: ["请填写售价"]
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- name: "skAddPrice",
|
|
|
|
|
- rule: ["required"],
|
|
|
|
|
- msg: ["请填写散客加价"]
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
name: "addPrice",
|
|
name: "addPrice",
|
|
|
rule: ["required"],
|
|
rule: ["required"],
|
|
@@ -504,6 +487,11 @@ export default {
|
|
|
rule: ["required"],
|
|
rule: ["required"],
|
|
|
msg: ["不做特价请填0"]
|
|
msg: ["不做特价请填0"]
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "skMore",
|
|
|
|
|
+ rule: ["required"],
|
|
|
|
|
+ msg: ["请填写散客比花店贵多少"]
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
name: "weight",
|
|
name: "weight",
|
|
|
rule: ["required"],
|
|
rule: ["required"],
|