|
@@ -61,7 +61,58 @@
|
|
|
</radio-group>
|
|
</radio-group>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <!-- 花材批发和零售 -->
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 批发花材 -->
|
|
|
|
|
+ <view class="action-btn" style="border-top:2upx solid #2bb931;margin-top:20upx;">
|
|
|
|
|
+ <text style="font-size: 30upx;font-weight: bold;">【批发-花材】跑腿费计算方式</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view style="display: flex; align-items: center; margin-left:30upx;">
|
|
|
|
|
+ <input class="input-field" type="number" v-model="pfHcFreeKm" placeholder="0" style="width:100upx;" @focus="pfHcFreeKm = ''" />
|
|
|
|
|
+ <text style="margin-left: 20upx;font-size:30upx;">公里内免费配送</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="action-btn">
|
|
|
|
|
+ <button class="btn-add" style="background-color: #3385FF;" @click="addPfFlowerMaterial">添加</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="material-list">
|
|
|
|
|
+ <view v-for="(item, index) in pfFlowerMaterials" :key="index" class="material-item">
|
|
|
|
|
+ <view class="material-info">
|
|
|
|
|
+ <view class="info-row">
|
|
|
|
|
+ <text>满</text>
|
|
|
|
|
+ <input class="input-field" v-model="item.num" type="number" placeholder="0" @focus="clearItemField(item, 'num')" />
|
|
|
|
|
+ <text>扎,</text>
|
|
|
|
|
+ <input class="input-field" v-model="item.price" type="digit" placeholder="0" @focus="clearItemField(item, 'price')" />
|
|
|
|
|
+ <text>元,</text>
|
|
|
|
|
+ <input class="input-field" v-model="item.distance" type="digit" placeholder="0" @focus="clearItemField(item, 'distance')" />
|
|
|
|
|
+ <text>公里内免费配送</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <button class="btn-delete" style="background-color: #3385FF;" @click="deletePfFlowerMaterial(index)">删除</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="warning-text">如不符合以上情况的,按实际跑腿费计算</view>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 批发花束 -->
|
|
|
|
|
+ <view class="section-title" style="border-top:2upx solid #2bb931;">【批发-花束】跑腿费计算方式</view>
|
|
|
|
|
+
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">包运费的</view>
|
|
|
|
|
+ <input class="input-field" v-model="pfHsFreeKm" type="number" placeholder="0" @focus="pfHsFreeKm = ''" />
|
|
|
|
|
+ <view>公里内免费配送</view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">{{pfHsFreeKm}}公里以上</view>
|
|
|
|
|
+ <view class="input-row">
|
|
|
|
|
+ <text>每公里加收</text>
|
|
|
|
|
+ <input class="input-field" v-model="pfHsAddFee" type="digit" placeholder="0" @focus="pfHsAddFee = ''" />
|
|
|
|
|
+ <text>元</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="warning-text">没有包运费的花束,按实际跑腿费计算</view>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 零售花材 -->
|
|
|
<view class="action-btn" style="border-top:2upx solid #2bb931;margin-top:20upx;">
|
|
<view class="action-btn" style="border-top:2upx solid #2bb931;margin-top:20upx;">
|
|
|
<text style="font-size: 30upx;font-weight: bold;">【零售-花材】跑腿费计算方式</text>
|
|
<text style="font-size: 30upx;font-weight: bold;">【零售-花材】跑腿费计算方式</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -91,7 +142,7 @@
|
|
|
|
|
|
|
|
<view class="warning-text">如不符合以上情况的,按实际跑腿费计算</view>
|
|
<view class="warning-text">如不符合以上情况的,按实际跑腿费计算</view>
|
|
|
|
|
|
|
|
- <!-- 花束 -->
|
|
|
|
|
|
|
+ <!-- 花材花束 -->
|
|
|
<view class="section-title" style="border-top:2upx solid #2bb931;">【零售-绿植花束】跑腿费计算方式</view>
|
|
<view class="section-title" style="border-top:2upx solid #2bb931;">【零售-绿植花束】跑腿费计算方式</view>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
@@ -110,7 +161,6 @@
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<view class="warning-text">没有包运费的花束,按实际跑腿费计算</view>
|
|
<view class="warning-text">没有包运费的花束,按实际跑腿费计算</view>
|
|
|
-
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="confirm-btn">
|
|
<view class="confirm-btn">
|
|
@@ -142,12 +192,18 @@ export default {
|
|
|
zjGatheringItem:0,
|
|
zjGatheringItem:0,
|
|
|
zjGatheringItemName:'',
|
|
zjGatheringItemName:'',
|
|
|
selectItemOk:0,
|
|
selectItemOk:0,
|
|
|
- // 花材批发和零售配置
|
|
|
|
|
|
|
+ // 零售花材配置
|
|
|
flowerMaterials: [{num:0,price:0,distance:0}],
|
|
flowerMaterials: [{num:0,price:0,distance:0}],
|
|
|
- // 花束配置
|
|
|
|
|
|
|
+ // 零售花束配置
|
|
|
hsFreeKm: 0,
|
|
hsFreeKm: 0,
|
|
|
hsAddFee: 0,
|
|
hsAddFee: 0,
|
|
|
- hcFreeKm:0
|
|
|
|
|
|
|
+ hcFreeKm:0,
|
|
|
|
|
+ // 批发花材配置
|
|
|
|
|
+ pfFlowerMaterials: [{num:0,price:0,distance:0}],
|
|
|
|
|
+ pfHcFreeKm:0,
|
|
|
|
|
+ // 批发花束配置
|
|
|
|
|
+ pfHsFreeKm:0,
|
|
|
|
|
+ pfHsAddFee:0,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -186,7 +242,11 @@ export default {
|
|
|
this.changeExt()
|
|
this.changeExt()
|
|
|
},
|
|
},
|
|
|
changeExt(){
|
|
changeExt(){
|
|
|
- modifyExt({orderFlow:this.orderFlow,thirdSend:this.thirdSend,thirdSendFee:this.thirdSendFee}).then(res=>{
|
|
|
|
|
|
|
+ modifyExt({
|
|
|
|
|
+ orderFlow:this.orderFlow,
|
|
|
|
|
+ thirdSend:this.thirdSend,
|
|
|
|
|
+ thirdSendFee:this.thirdSendFee
|
|
|
|
|
+ }).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
this.$msg(res.msg)
|
|
this.$msg(res.msg)
|
|
|
}
|
|
}
|
|
@@ -207,10 +267,18 @@ export default {
|
|
|
commitSave(){
|
|
commitSave(){
|
|
|
let that = this
|
|
let that = this
|
|
|
modifyExt({
|
|
modifyExt({
|
|
|
|
|
+ // 零售-花材
|
|
|
|
|
+ hcFreeKm: this.hcFreeKm,
|
|
|
hcMap: JSON.stringify(this.flowerMaterials),
|
|
hcMap: JSON.stringify(this.flowerMaterials),
|
|
|
|
|
+ // 零售-花束
|
|
|
hsFreeKm: this.hsFreeKm,
|
|
hsFreeKm: this.hsFreeKm,
|
|
|
hsAddFee: this.hsAddFee,
|
|
hsAddFee: this.hsAddFee,
|
|
|
- hcFreeKm: this.hcFreeKm
|
|
|
|
|
|
|
+ // 批发-花材
|
|
|
|
|
+ pfHcFreeKm: this.pfHcFreeKm,
|
|
|
|
|
+ pfHcMap: JSON.stringify(this.pfFlowerMaterials),
|
|
|
|
|
+ // 批发-花束
|
|
|
|
|
+ pfHsFreeKm: this.pfHsFreeKm,
|
|
|
|
|
+ pfHsAddFee: this.pfHsAddFee,
|
|
|
}).then(res=>{
|
|
}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
this.$msg(res.msg)
|
|
this.$msg(res.msg)
|
|
@@ -241,11 +309,17 @@ export default {
|
|
|
this.orderFlow = res.data.orderFlow
|
|
this.orderFlow = res.data.orderFlow
|
|
|
this.thirdSend = res.data.thirdSend
|
|
this.thirdSend = res.data.thirdSend
|
|
|
this.thirdSendFee = res.data.thirdSendFee
|
|
this.thirdSendFee = res.data.thirdSendFee
|
|
|
- // 加载花材批发和零售配置
|
|
|
|
|
|
|
+ // 加载零售配置
|
|
|
this.flowerMaterials = res.data.hcMap ? JSON.parse(res.data.hcMap) : [{num:0,price:0,distance:0}]
|
|
this.flowerMaterials = res.data.hcMap ? JSON.parse(res.data.hcMap) : [{num:0,price:0,distance:0}]
|
|
|
this.hcFreeKm = res.data.hcFreeKm ? res.data.hcFreeKm : 0
|
|
this.hcFreeKm = res.data.hcFreeKm ? res.data.hcFreeKm : 0
|
|
|
this.hsFreeKm = res.data.hsFreeKm ? res.data.hsFreeKm : 0
|
|
this.hsFreeKm = res.data.hsFreeKm ? res.data.hsFreeKm : 0
|
|
|
this.hsAddFee = res.data.hsAddFee ? res.data.hsAddFee : 0
|
|
this.hsAddFee = res.data.hsAddFee ? res.data.hsAddFee : 0
|
|
|
|
|
+
|
|
|
|
|
+ // 加载批发配置
|
|
|
|
|
+ this.pfFlowerMaterials = res.data.pfHcMap ? JSON.parse(res.data.pfHcMap) : [{num:0,price:0,distance:0}]
|
|
|
|
|
+ this.pfHcFreeKm = res.data.pfHcFreeKm ? res.data.pfHcFreeKm : 0
|
|
|
|
|
+ this.pfHsFreeKm = res.data.pfHsFreeKm ? res.data.pfHsFreeKm : 0
|
|
|
|
|
+ this.pfHsAddFee = res.data.pfHsAddFee ? res.data.pfHsAddFee : 0
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -304,6 +378,42 @@ export default {
|
|
|
// 清空循环中的item字段
|
|
// 清空循环中的item字段
|
|
|
clearItemField(item, fieldName) {
|
|
clearItemField(item, fieldName) {
|
|
|
this.$set(item, fieldName, '')
|
|
this.$set(item, fieldName, '')
|
|
|
|
|
+ },
|
|
|
|
|
+ // 批发花材 - 添加
|
|
|
|
|
+ addPfFlowerMaterial() {
|
|
|
|
|
+ this.pfFlowerMaterials.push({
|
|
|
|
|
+ num: '',
|
|
|
|
|
+ price: '',
|
|
|
|
|
+ distance: ''
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 批发花材 - 删除
|
|
|
|
|
+ deletePfFlowerMaterial(index) {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '确认删除',
|
|
|
|
|
+ content: '确认删除该配置吗?',
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ this.pfFlowerMaterials.splice(index, 1)
|
|
|
|
|
+ this.savePfFlowerMaterials()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 保存批发花材配置
|
|
|
|
|
+ savePfFlowerMaterials() {
|
|
|
|
|
+ if (this.pfFlowerMaterials.length === 0) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ modifyExt({
|
|
|
|
|
+ pfHcMap: JSON.stringify(this.pfFlowerMaterials)
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.code === 1) {
|
|
|
|
|
+ this.$msg('批发花材配置保存成功')
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$msg(res.msg || '保存失败')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
@@ -368,7 +478,7 @@ export default {
|
|
|
.action-btn {
|
|
.action-btn {
|
|
|
padding: 20upx 30upx;
|
|
padding: 20upx 30upx;
|
|
|
.btn-add {
|
|
.btn-add {
|
|
|
- background-color: #3385FF;
|
|
|
|
|
|
|
+ background-color: #09C567;//#3385FF;
|
|
|
color: white;
|
|
color: white;
|
|
|
padding: 10upx 20upx;
|
|
padding: 10upx 20upx;
|
|
|
border-radius: 4upx;
|
|
border-radius: 4upx;
|
|
@@ -410,7 +520,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.btn-delete {
|
|
.btn-delete {
|
|
|
- background-color: #3385FF;
|
|
|
|
|
|
|
+ background-color: #09C567;
|
|
|
color: white;
|
|
color: white;
|
|
|
padding: 8upx 16upx;
|
|
padding: 8upx 16upx;
|
|
|
border-radius: 4upx;
|
|
border-radius: 4upx;
|