|
|
@@ -34,11 +34,6 @@
|
|
|
<input v-model="form.ratio" placeholder-class="phcolor" class="tui-input" name="ratio" placeholder="如:1扎=20支,请填写20" maxlength="50" type="number" />
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title">单支售价涨幅</view>
|
|
|
- <input v-model="form.smallRatio" placeholder-class="phcolor" class="tui-input" name="smallRatio" placeholder="请填写,最小填1" style="width:230upx;" @focus="form.smallRatio=''"
|
|
|
- maxlength="50" type="number" /><text style="color:#333333;">单支售价 ¥<text>{{smallPrice}}</text></text>
|
|
|
- </tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">库存</div>
|
|
|
@@ -116,7 +111,7 @@
|
|
|
<div class="module-com input-line-wrap goods-wrap">
|
|
|
<div class="module-tit">
|
|
|
<span>花材图片</span>
|
|
|
- <span class="app-color-3">(建议比例 1:1)</span>
|
|
|
+ <span class="app-color-3"></span>
|
|
|
</div>
|
|
|
<view class="module-det">
|
|
|
<htz-image-upload :max="1" :compress="true" v-model="currentImgData" :headers="headers"
|
|
|
@@ -165,13 +160,12 @@ export default {
|
|
|
smallUnitId:2,
|
|
|
classId:'',
|
|
|
price:'',
|
|
|
- skMore:'',
|
|
|
- addPrice:'',
|
|
|
- discountPrice:'',
|
|
|
- smallRatio:'',
|
|
|
- weight:'',
|
|
|
+ skMore:3,
|
|
|
+ addPrice:3,
|
|
|
+ discountPrice:0,
|
|
|
+ weight:1,
|
|
|
cover:[],
|
|
|
- stockWarning:'',
|
|
|
+ stockWarning:5,
|
|
|
status:2,
|
|
|
delStatus:0,
|
|
|
itemId:0,
|
|
|
@@ -187,16 +181,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed:{
|
|
|
- ...mapGetters(["getLoginInfo","getDictionariesInfo"]),
|
|
|
- smallPrice(){
|
|
|
- let price = 0
|
|
|
- if(Number(this.form.price) > 0 && Number(this.form.ratio)>0){
|
|
|
- let div = Number(this.form.price)/Number(this.form.ratio)
|
|
|
- price = div*Number(this.form.smallRatio)
|
|
|
- price = parseFloat(price.toFixed(2))
|
|
|
- }
|
|
|
- return price
|
|
|
- }
|
|
|
+ ...mapGetters(["getLoginInfo","getDictionariesInfo"])
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
if(option.id){
|
|
|
@@ -278,8 +263,8 @@ export default {
|
|
|
this.form.delStatus = 0
|
|
|
this.form.id = 0
|
|
|
this.form.price = ''
|
|
|
- this.form.skMore =''
|
|
|
- this.form.addPrice =''
|
|
|
+ this.form.skMore =3
|
|
|
+ this.form.addPrice =3
|
|
|
this.form.discountPrice = ''
|
|
|
})
|
|
|
},
|
|
|
@@ -379,10 +364,6 @@ export default {
|
|
|
uni.showToast({title:"请填写特价,没有特价请填0",icon:"none"})
|
|
|
return;
|
|
|
}
|
|
|
- if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.smallRatio) == false){
|
|
|
- uni.showToast({title:"请填写涨幅,最小请填1",icon:"none"})
|
|
|
- return;
|
|
|
- }
|
|
|
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"})
|
|
|
return;
|
|
|
@@ -469,11 +450,6 @@ export default {
|
|
|
rule: ["required"],
|
|
|
msg: ["不做特价请填0"]
|
|
|
},
|
|
|
- {
|
|
|
- name: "smallRatio",
|
|
|
- rule: ["required"],
|
|
|
- msg: ["请填单支售价涨幅"]
|
|
|
- },
|
|
|
{
|
|
|
name: "weight",
|
|
|
rule: ["required"],
|