|
|
@@ -51,262 +51,95 @@
|
|
|
</view>
|
|
|
|
|
|
<block v-if="ghsInfoLoaded">
|
|
|
- <view class="module-com input-line-wrap" v-if="isNewShMethod">
|
|
|
- <affirm-sh-method-panel
|
|
|
- v-if="ghsInfo.pfLevel == 0"
|
|
|
- ref="shMethodPanel"
|
|
|
- :ghs-info="ghsInfo"
|
|
|
- :ghs-id="option.id"
|
|
|
- :commodity-price="allPriceFun"
|
|
|
- :commodity-big-count="allCountFun.bigLength"
|
|
|
- :commodity-weight="allCountFun.weight"
|
|
|
- :select-list="selectList"
|
|
|
- @change="onShMethodPanelChange"
|
|
|
- />
|
|
|
- </view>
|
|
|
- <view class="module-com input-line-wrap" v-else>
|
|
|
- <block v-if="ghsInfo.pfLevel && ghsInfo.pfLevel == 1">
|
|
|
-
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="ghsInfo.shopId == 14636">
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(2)">冷链物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(3)">航空物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(0)">德邦物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(1)">顺丰物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(4)">同城配送</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 5 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;font-size:23upx;" @click="changeTransType(5)">到店自取</button>
|
|
|
- </tui-list-cell>
|
|
|
-
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-else-if="ghsInfo.shopId == 3">
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(2)">冷链物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(3)">航空物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(0)">德邦物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(1)">顺丰物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(4)">同城配送</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 5 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;font-size:23upx;" @click="changeTransType(5)">到店自取</button>
|
|
|
- </tui-list-cell>
|
|
|
-
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-else-if="ghsInfo.shopId == 29136">
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(0)">德邦物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(1)">顺丰物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(2)">冷链物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(3)">航空物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(4)">同城配送</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 5 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;font-size:23upx;" @click="changeTransType(5)">到店自取</button>
|
|
|
- </tui-list-cell>
|
|
|
-
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-else-if="ghsInfo.shopId == 86726">
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(4)">同城配送</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 5 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;font-size:23upx;" @click="changeTransType(5)">到店自取</button>
|
|
|
- </tui-list-cell>
|
|
|
-
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-else>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(4)">同城配送</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(0)">德邦物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(1)">顺丰物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(2)">冷链物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(3)">航空物流</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.transType == 5 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;font-size:23upx;" @click="changeTransType(5)">到店自取</button>
|
|
|
+ <view class="module-com input-line-wrap">
|
|
|
+ <!-- 配送方式选择 -->
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
+ <button
|
|
|
+ v-for="(item, index) in visibleMethodList"
|
|
|
+ :key="item.style"
|
|
|
+ class="admin-button-com middle sh-method-btn"
|
|
|
+ :class="[
|
|
|
+ selectedMethodIndex === index ? 'blue' : 'default',
|
|
|
+ item.name && item.name.length <= 2 ? 'sh-method-btn--short' : 'sh-method-btn--long'
|
|
|
+ ]"
|
|
|
+ @click="selectMethodByIndex(index)"
|
|
|
+ >{{ item.name }}</button>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
- <view>
|
|
|
- <block v-if="ghsInfo.shopId == 21319">
|
|
|
- <view>
|
|
|
- <text style="width:100%;font-weight:bold;color:#3385FF;">所有打包费/运费,客服会一一同大家对接收取。客服微信 hzz252252</text>
|
|
|
- </view>
|
|
|
- </block>
|
|
|
- <block v-else>
|
|
|
- <view v-if="form.transType == 0 || form.transType == 1">
|
|
|
- <text style="color:red;width:100%;font-weight:bold;">送货上门</text>
|
|
|
- </view>
|
|
|
- <view v-if="form.transType == 2 || form.transType == 3">
|
|
|
- <text style="color:red;width:100%;font-weight:bold;">提货自理</text>
|
|
|
- </view>
|
|
|
- <view v-if="form.transType != 5">
|
|
|
- <text style="color:#3385FF;width:100%;font-weight:bold;">早班或晚班,指定发物流公司请备注。</text>
|
|
|
- </view>
|
|
|
- <view v-if="form.transType != 5">
|
|
|
- <text v-if="ghsInfo.shopId == 13398" style="color:red;width:100%;font-weight:bold;">本店昆明直发包邮到店,购买数量需要15扎以上,低于15扎请联系当地店长!</text>
|
|
|
- <text v-else-if="ghsInfo.shopId == 29136" style="color:red;width:100%;font-weight:bold;">运费、打包费请联系客服</text>
|
|
|
- <text v-else style="color:#3385FF;width:100%;font-weight:bold;">运费预收,根据实际产生物流费用,多退少补。有退款会原路退回。</text>
|
|
|
+ <!-- 配送方式说明 -->
|
|
|
+ <tui-list-cell
|
|
|
+ v-if="currentMethodExplains.length > 0"
|
|
|
+ class="line-cell"
|
|
|
+ :hover="false"
|
|
|
+ :arrow="false"
|
|
|
+ >
|
|
|
+ <view>
|
|
|
+ <view v-for="(exp, index) in currentMethodExplains" :key="index">
|
|
|
+ <text :style="'width:100%;color:' + (Number(exp.color) === 2 ? 'red' : Number(exp.color) === 3 ? '#3385FF' : '#333333') + ';font-weight:' + (Number(exp.fontWeight) === 2 ? 'bold' : 'normal') + ';'">{{ exp.explain }}</text>
|
|
|
</view>
|
|
|
-
|
|
|
- </block>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- </block>
|
|
|
- <block v-else>
|
|
|
- <block v-if="ghsInfo.shopId == 82200">
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
|
|
|
- </tui-list-cell>
|
|
|
- </block>
|
|
|
- <block v-else-if="ghsInfo.shopId == 87989">
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
|
|
|
- </tui-list-cell>
|
|
|
- </block>
|
|
|
- <block v-else-if="ghsInfo.shopId == 100382">
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
|
|
|
- </tui-list-cell>
|
|
|
- </block>
|
|
|
- <block v-else-if="ghsInfo.shopId == 92086">
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
|
|
|
- </tui-list-cell>
|
|
|
- </block>
|
|
|
- <block v-else-if="ghsInfo.shopId == 91115">
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(2)">跑腿</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(3)">物流</button>
|
|
|
- </tui-list-cell>
|
|
|
- </block>
|
|
|
- <block v-else-if="ghsInfo.shopId == 91053">
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(2)">跑腿</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(3)">物流</button>
|
|
|
- </tui-list-cell>
|
|
|
- </block>
|
|
|
- <block v-else-if="ghsInfo.shopId == 36919">
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(2)">跑腿</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(3)">物流</button>
|
|
|
- </tui-list-cell>
|
|
|
- </block>
|
|
|
- <block v-else-if="ghsInfo.shopId == 90985">
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(2)">跑腿</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(4)">快递</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(3)">物流</button>
|
|
|
- </tui-list-cell>
|
|
|
- </block>
|
|
|
- <block v-else>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)" v-if="ghsInfo.shopId != 4608" >送货上门</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
|
|
|
- <template v-if="ghsInfo.shopId != 14248">
|
|
|
- <view v-if="ghsInfo.openIntraCity==1" style="position:relative;display:inline-block;">
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(2)">跑腿</button>
|
|
|
- </view>
|
|
|
- <button v-else class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(2)">跑腿</button>
|
|
|
- </template>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(4)" v-if="ghsInfo.shopId != 14248">快递</button>
|
|
|
- <button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(3)" v-if="ghsInfo.shopId != 14248">物流</button>
|
|
|
- </tui-list-cell>
|
|
|
- </block>
|
|
|
- <tui-list-cell v-if="form.sendType != 2" class="line-cell" :hover="false" :arrow="false">
|
|
|
-
|
|
|
- <view v-if="form.sendType == 0">
|
|
|
- <block v-if="ghsInfo.shopId == 40312">
|
|
|
- <view style="color:red;width:100%;font-weight:bold;">市区如需配送请拍运费,(左下角运费服务专栏)县城寄货运费可到付</view>
|
|
|
- </block>
|
|
|
- <block v-else-if="ghsInfo.shopId == 4608">
|
|
|
- <view style="color:red;width:100%;font-weight:bold;">满500元,10公里内免费配送</view>
|
|
|
- <view style="color:red;width:100%;font-weight:bold;">满1000元,20公里内免费配送</view>
|
|
|
- <view style="color:#3385FF;width:100%;font-weight:bold;">请自行查询距离是否符合要求,符合要求再下单哦!</view>
|
|
|
- </block>
|
|
|
- <block v-else-if="ghsInfo.shopId == 82200">
|
|
|
- <view><text style="color:#3385FF;">满100元并且满15扎包邮</text></view>
|
|
|
- </block>
|
|
|
- <block v-else>
|
|
|
- <view><text style="color:#3385FF;">首次下单,请联系客服确认您是否在配送范围</text></view>
|
|
|
- <text style="color: #3385FF;width:100%;" v-if="ghsInfo.shopId && (ghsInfo.shopId == 520 || ghsInfo.shopId == 1489)">
|
|
|
- 在本店配送范围的,下单满200元免费送货上门
|
|
|
- </text>
|
|
|
- <text style="color: #3385FF;width:100%;" v-else>在本店配送范围的,免费送货上门</text>
|
|
|
-
|
|
|
- <view><text style="color: #3385FF;width:100%;" v-if="ghsInfo.shopId && ghsInfo.shopId == 14248">每天早上8:00左右(7:30截单)和下午1:00左右发车(12:30截单)截单后订单默认下一趟配送;市区最低满100元起送,远区最低满200元起送(不满默认不送);其他时间不免费配送。配送顺序根据线路安排,不支持催单哦,急单建议叫车配送,车费自行承担。</text></view>
|
|
|
- <view><text style="color: #09733e;width:100%;font-weight:bold;" v-if="ghsInfo.shopId && ghsInfo.shopId == 14248">理赔规则:1.鲜花是鲜活类产品,一旦送出后无质量问题,不接受任何理由的退货换货2.收到货请第一时间检查质量核对数量,有问题及时联系客服处理(12小时内反馈,超出时间不予受理)3所有花材10%为正常损耗不售后(基地玫瑰除外),超出的部分可以售后,轻微不影响使用的小问题也是不售后的4.基地玫瑰20%正常损耗,基地玫瑰会有夹支、畸形花头 断头4支以内 属于正常,如果介意可以提前询问客服</text></view>
|
|
|
-
|
|
|
- <view><text style="color:red;font-weight:bold">免费配送仅送货到楼下,不支持送货上楼</text></view>
|
|
|
- <view v-if="ghsInfo.shopId && (ghsInfo.shopId == 520 || ghsInfo.shopId == 1489)"><text style="color:red;font-weight:bold">免费配送每天23:30发车,其它时间请用跑腿或自取</text></view>
|
|
|
- <view><text style="color:red;font-weight:bold">不在配送范围的,请勿选送货上门,否则运费自理</text></view>
|
|
|
- <view v-if="ghsInfo.shopId && (ghsInfo.shopId == 11094 || ghsInfo.shopId == 11318)"><text style="color:red;font-weight:bold">所有彩玫瑰1扎损耗3支内不售后</text></view>
|
|
|
- <view v-if="ghsInfo.shopId && (ghsInfo.shopId == 21486)"><text style="color:#3385FF;">收到货品后,3个小时之内可以申请售后,要求有图片!鲜花是生鲜产品,3个小时后不提供售后</text></view>
|
|
|
- <view v-if="ghsInfo.shopId && (ghsInfo.shopId == 21486)"><text style="color:black;font-weight:bold;">寻菊花,玫瑰等单品,常年用量大且稳定的客户合作!有意向的联系客服</text></view>
|
|
|
- <view v-if="ghsInfo.shopId && (ghsInfo.shopId == 23281)"><text style="color:#3385FF;font-weight:bold">0:00-7:30下单当日配送,7:30-23:59下单次日配送</text></view>
|
|
|
- </block>
|
|
|
-
|
|
|
- </view>
|
|
|
- <view v-if="form.sendType == 1">
|
|
|
- <text style="color: #3385FF;width:100%;">到店自取、自己叫跑腿到店取货,选自取。</text>
|
|
|
- </view>
|
|
|
- <view v-if="form.sendType == 3">
|
|
|
- <text style="color: #3385FF;width:100%;">运费到付</text>
|
|
|
- </view>
|
|
|
- <view v-if="form.sendType == 4">
|
|
|
- <text style="color: #3385FF;width:100%;">运费到付</text>
|
|
|
+ <!-- 物流填写/选择 -->
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
|
|
|
+ <view class="tui-title">配送物流</view>
|
|
|
+ <view class="wl-field-row">
|
|
|
+ <input
|
|
|
+ type="text"
|
|
|
+ placeholder="请填写物流"
|
|
|
+ v-model="form.wlName"
|
|
|
+ @focus="onWlNameFocus"
|
|
|
+ @input="onWlNameInput"
|
|
|
+ placeholder-class="tui-placeholder"
|
|
|
+ class="wl-name-input"
|
|
|
+ />
|
|
|
+ <button
|
|
|
+ v-if="wlList.length > 0"
|
|
|
+ class="admin-button-com middle wl-select-btn"
|
|
|
+ @click="openWlSelect"
|
|
|
+ >选择物流</button>
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="needAddPackCost == true">
|
|
|
+ <!-- 未达标提示 -->
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="showShMethodExtraFee">
|
|
|
<view>
|
|
|
- <text style="color: red;width:100%;">
|
|
|
- 当天订单不满{{lackExpend}}元,加纸箱包装费{{ form.packCost }}元
|
|
|
- </text>
|
|
|
+ <text style="color: red;width:100%;">{{ shMethodUnMeetWarningText }}</text>
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- <block v-if="$util.isEmpty(wlList)">
|
|
|
- <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
|
|
|
- <view class="tui-title">配送物流</view>
|
|
|
- <input type="text" placeholder="请填选物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
|
|
|
- </tui-list-cell>
|
|
|
- </block>
|
|
|
- <block v-else>
|
|
|
- <tui-list-cell class="line-cell" :arrow="true" v-if="form.sendType == 3">
|
|
|
- <div class="tui-title">配送物流</div>
|
|
|
- <picker mode="selector" :value="form.wlId" :range="wlList" range-key="name" @change="changeWlFn" class="tui-input" >
|
|
|
- <div v-if="form.wlId">{{ wlSelData.name }}</div>
|
|
|
- <div class="tui-placeholder" v-else>请选择</div>
|
|
|
- </picker>
|
|
|
- </tui-list-cell>
|
|
|
- </block>
|
|
|
- </block>
|
|
|
+ <!-- 配送地址状态提示 -->
|
|
|
+ <tui-list-cell v-if="form.sendType == 2 && ghsInfo.openIntraCity != 1" class="line-cell" :hover="false" :arrow="false">
|
|
|
+ <view>
|
|
|
+ <text v-if="ghsInfo.openIntraCity == 0" style="color: #3385FF;width:100%;font-size:30upx;font-weight:bold;">运费自理或到付(请联系客服)</text>
|
|
|
+ <text v-if="ghsInfo.openIntraCity == 2" style="color: red;width:100%;font-size:30upx;font-weight:bold;">跑腿配送暂不可用,请选其它方式</text>
|
|
|
+ </view>
|
|
|
+ </tui-list-cell>
|
|
|
|
|
|
- <tui-list-cell v-if="form.sendType == 2 && ghsInfo.openIntraCity != 1" class="line-cell" :hover="false" :arrow="false">
|
|
|
- <view>
|
|
|
- <text v-if="ghsInfo.openIntraCity == 0" style="color: #3385FF;width:100%;font-size:30upx;font-weight:bold;">运费自理或到付(请联系客服)</text>
|
|
|
- <text v-if="ghsInfo.openIntraCity == 2" style="color: red;width:100%;font-size:30upx;font-weight:bold;">跑腿配送暂不可用,请选其它方式</text>
|
|
|
- </view>
|
|
|
- </tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="displayAddress == true" @click="modifyAddress">
|
|
|
- <view class="tui-title">收花地址</view>
|
|
|
- <!-- 源花汇和镜中的客户,不要求客户地址完整 -->
|
|
|
- <view v-if="validAddress || ghsInfo.shopId==10649 || ghsInfo.shopId ==33668">
|
|
|
- <view style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:420upx;"><text>{{shopInfo.address}}</text></view>
|
|
|
- <view v-if="shopInfo.showAddress!=shopInfo.fullAddress" style="color:#848181;"><text>{{shopInfo.showAddress}}</text></view>
|
|
|
- </view>
|
|
|
- <view v-else>
|
|
|
- <view><text style="color:red;font-weight:bold;font-size:30upx;">请填写您的地址</text></view>
|
|
|
- </view>
|
|
|
- </tui-list-cell>
|
|
|
+ <!-- 收货地址 -->
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="displayAddress" @click="modifyAddress">
|
|
|
+ <view class="tui-title">收花地址</view>
|
|
|
+ <view v-if="validAddress || ghsInfo.shopId==10649 || ghsInfo.shopId ==33668">
|
|
|
+ <view style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:420upx;"><text>{{ shopInfo.address }}</text></view>
|
|
|
+ <view v-if="shopInfo.showAddress!=shopInfo.fullAddress" style="color:#848181;"><text>{{ shopInfo.showAddress }}</text></view>
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <view><text style="color:red;font-weight:bold;font-size:30upx;">请填写您的地址</text></view>
|
|
|
+ </view>
|
|
|
+ </tui-list-cell>
|
|
|
|
|
|
- <tui-list-cell v-if="form.sendType == 2 && ghsInfo.openIntraCity == 1" class="line-cell" :hover="false">
|
|
|
<!-- 跑腿平台报价列表 -->
|
|
|
- <view v-if="ghsInfo.openIntraCity == 1 && deliveryQuotes.length > 0" class="delivery-quotes-container">
|
|
|
- <view class="delivery-quotes-grid">
|
|
|
- <view
|
|
|
- v-for="(item, index) in deliveryQuotes"
|
|
|
+ <tui-list-cell v-if="form.sendType == 2 && ghsInfo.openIntraCity == 1" class="line-cell" :hover="false">
|
|
|
+ <view v-if="ghsInfo.openIntraCity == 1 && deliveryQuotes.length > 0" class="delivery-quotes-container">
|
|
|
+ <view class="delivery-quotes-grid">
|
|
|
+ <view
|
|
|
+ v-for="(item, index) in deliveryQuotes"
|
|
|
:key="index"
|
|
|
class="delivery-quote-item"
|
|
|
- :class="{
|
|
|
- 'active': selectedDeliveryIndex === index,
|
|
|
- 'disabled': !item.isAble,
|
|
|
- 'fixed-width': deliveryQuotes.length <= 2
|
|
|
+ :class="{
|
|
|
+ 'active': selectedDeliveryIndex === index,
|
|
|
+ 'disabled': !item.isAble,
|
|
|
+ 'fixed-width': deliveryQuotes.length <= 2
|
|
|
}"
|
|
|
@click="selectDelivery(item, index)"
|
|
|
>
|
|
|
@@ -314,53 +147,58 @@
|
|
|
<view class="platform-price">{{ item.priceText }}元</view>
|
|
|
<view v-if="item.type" class="platform-type">{{ item.type }}</view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view v-else style="text-align: center; padding: 20upx 0;">
|
|
|
- <text v-if="validAddress">正在获取运费...</text><text v-else style="color:red;font-weight:bold;font-size:32upx;" @click="modifyAddress">收货地址缺失,请填写</text>
|
|
|
- </view>
|
|
|
- </tui-list-cell>
|
|
|
-
|
|
|
- <tui-list-cell class="line-cell" :hover="false" v-if="displaySendCost == true && Number(showDistance)>0">
|
|
|
- <view class="tui-title">距离</view>
|
|
|
- <text v-if="showDistance > 100" style="color: #3385FF">{{ (showDistance/1000).toFixed(1) }}公里</text>
|
|
|
- <text v-else style="color: #3385FF">{{ showDistance }} 米</text>
|
|
|
- <text v-if="showDeliveryPolicy" class="delivery-policy-link" @click="showDeliveryPolicyModal">
|
|
|
- 免跑腿费条件
|
|
|
- </text>
|
|
|
- </tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" v-if="displaySendCost == true">
|
|
|
- <view class="tui-title">跑腿费</view>
|
|
|
- <view>
|
|
|
- <text :class="isFreeDelivery ? 'delivery-price-free' : 'delivery-price-normal'">¥{{ form.sendCost }}</text>
|
|
|
- <text v-if="isFreeDelivery" class="free-delivery-tag">¥0【免跑腿费】</text>
|
|
|
- </view>
|
|
|
- </tui-list-cell>
|
|
|
-
|
|
|
- <tui-list-cell class="line-cell" :hover="false" v-if="needAddPackCost == true">
|
|
|
- <view class="tui-title">包装费</view>
|
|
|
- <text style="color: #3385FF">¥{{ form.packCost }}</text>
|
|
|
- </tui-list-cell>
|
|
|
-
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <view class="tui-title">总金额</view>
|
|
|
- <text style="color: #3385FF">¥ {{ modifyPrice }}</text>
|
|
|
- </tui-list-cell>
|
|
|
-
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
- <view class="tui-title">配送日期</view>
|
|
|
- <picker mode="date" :value="sendTimeWant" @change="bindDateChange" style="width:400upx;">
|
|
|
- <view class="uni-input" v-if="sendTimeWant==''" style="color:#CCCCCC;">请选日期,默认当天</view>
|
|
|
- <view class="uni-input">{{sendTimeWant}}</view>
|
|
|
- </picker>
|
|
|
- </tui-list-cell>
|
|
|
-
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
- <textarea style="height: 100upx" v-model="remark" placeholder="这里写备注"/>
|
|
|
- </tui-list-cell>
|
|
|
+ <view v-else style="text-align: center; padding: 20upx 0;">
|
|
|
+ <text v-if="validAddress">正在获取运费...</text>
|
|
|
+ <text v-else style="color:red;font-weight:bold;font-size:32upx;" @click="modifyAddress">收货地址缺失,请填写</text>
|
|
|
+ </view>
|
|
|
+ </tui-list-cell>
|
|
|
|
|
|
- </view>
|
|
|
- </block>
|
|
|
+ <!-- 距离展示 -->
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="displaySendCost && Number(showDistance)>0">
|
|
|
+ <view class="tui-title">距离</view>
|
|
|
+ <text v-if="showDistance > 100" style="color: #3385FF">{{ (showDistance/1000).toFixed(1) }}公里</text>
|
|
|
+ <text v-else style="color: #3385FF">{{ showDistance }} 米</text>
|
|
|
+ <text v-if="showDeliveryPolicy" class="delivery-policy-link" @click="showDeliveryPolicyModal">免跑腿费条件</text>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <!-- 跑腿费 -->
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="displaySendCost">
|
|
|
+ <view class="tui-title">跑腿费</view>
|
|
|
+ <view>
|
|
|
+ <text :class="isFreeDelivery ? 'delivery-price-free' : 'delivery-price-normal'">¥{{ form.sendCost }}</text>
|
|
|
+ <text v-if="isFreeDelivery" class="free-delivery-tag">¥0【免跑腿费】</text>
|
|
|
+ </view>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <!-- 额外费用(包装费/运费) -->
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="showShMethodExtraFee">
|
|
|
+ <view class="tui-title">{{ shMethodExtraFeeLabel }}</view>
|
|
|
+ <text style="color: #3385FF">¥{{ shMethodExtraFeeAmount }}</text>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <!-- 总金额 -->
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
+ <view class="tui-title">总金额</view>
|
|
|
+ <text style="color: #3385FF">¥ {{ panelTotalPrice }}</text>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <!-- 配送日期 -->
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
+ <view class="tui-title">配送日期</view>
|
|
|
+ <picker mode="date" :value="sendTimeWant" @change="bindDateChange" style="width:400upx;">
|
|
|
+ <view class="uni-input" v-if="sendTimeWant==''" style="color:#CCCCCC;">请选日期,默认当天</view>
|
|
|
+ <view class="uni-input">{{ sendTimeWant }}</view>
|
|
|
+ </picker>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <!-- 备注 -->
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
+ <textarea style="height: 100upx" v-model="remark" placeholder="这里写备注"/>
|
|
|
+ </tui-list-cell>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
|
|
|
</form>
|
|
|
</view>
|
|
|
@@ -399,6 +237,27 @@
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
|
|
|
+ <!-- 物流选择弹框:展示供货商配置的物流列表,选中后回填输入框 -->
|
|
|
+ <uni-popup ref="wlPopupRef" background-color="#fff" type="center" :animation="false" class="wl-popup-wrap">
|
|
|
+ <view class="wl-popup-content">
|
|
|
+ <view class="wl-popup-title">请选择物流</view>
|
|
|
+ <scroll-view scroll-y="true" class="wl-popup-scroll">
|
|
|
+ <view class="wl-popup-list">
|
|
|
+ <view v-for="(item, index) in wlList" :key="index" class="wl-popup-item">
|
|
|
+ <button
|
|
|
+ class="admin-button-com wl-option-btn"
|
|
|
+ @click.stop="selectWl(item)"
|
|
|
+ :class="{ selected: form.wlName === item.name }"
|
|
|
+ >{{ item.name }}</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+ <view class="wl-popup-footer">
|
|
|
+ <button class="admin-button-com big blue wl-popup-cancel-btn" @click="cancelWlSelect">取消</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -416,16 +275,12 @@ import appSendTime from "@/components/app-send-time";
|
|
|
const formUtil = require("@/utils/formValidation.js");
|
|
|
import AppDatePicker from "@/components/app-date-picker";
|
|
|
import { getGhsDataApi,getWlList } from "@/api/ghs";
|
|
|
-import { freight,createOrder } from "@/api/purchase";
|
|
|
+import { createOrder,getShMethod } from "@/api/purchase";
|
|
|
import { mapActions, mapGetters } from "vuex";
|
|
|
import { shopHouponHas } from '@/api/coupon'
|
|
|
import {currentShop} from "@/api/shop"
|
|
|
import { allDeliveryQuotes } from "@/api/express/delivery";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
-import AffirmShMethodPanel from "@/admin/billing/components/affirm-sh-method-panel";
|
|
|
-
|
|
|
-/** 使用 getShMethod 配送业务面板的门店 shopId,后续可追加,关键词sh_method_area */
|
|
|
-const SH_METHOD_PANEL_SHOP_IDS = [36523];
|
|
|
|
|
|
export default {
|
|
|
name: "affirmGhs",
|
|
|
@@ -440,16 +295,13 @@ export default {
|
|
|
appAddressGroup,
|
|
|
appFormSend,
|
|
|
AppDatePicker,
|
|
|
- ModalModule,
|
|
|
- AffirmShMethodPanel
|
|
|
+ ModalModule
|
|
|
},
|
|
|
mixins: [productMins],
|
|
|
data() {
|
|
|
return {
|
|
|
isModel: false,
|
|
|
pageType: "cg",
|
|
|
- list:[],
|
|
|
- autoLoad: false,
|
|
|
ghsInfo:'',
|
|
|
sendTimeWant:'',
|
|
|
remark:'',
|
|
|
@@ -467,7 +319,6 @@ export default {
|
|
|
transType:4,
|
|
|
sendSide: "2",
|
|
|
sendDate: "",
|
|
|
- sendTimeWant: "",
|
|
|
sendCost: 0,
|
|
|
customId: "",
|
|
|
product: "",
|
|
|
@@ -477,16 +328,12 @@ export default {
|
|
|
wlId:0
|
|
|
},
|
|
|
lackExpend:0,
|
|
|
- showCustomer: false,
|
|
|
- today:'',
|
|
|
- monthLater:'',
|
|
|
hasHb:0,
|
|
|
selectedHb:{couponAmount:0,hbId:0,couponSelInx:0},
|
|
|
customData: {
|
|
|
bigCount: 0,
|
|
|
smallCount: 0
|
|
|
},
|
|
|
- sendData:{},
|
|
|
shopInfo:{
|
|
|
lat:'',
|
|
|
long:'',
|
|
|
@@ -508,8 +355,10 @@ export default {
|
|
|
selectedDeliveryData: null, // 选中的报价数据
|
|
|
deliveryPolicyList: [], // 包配送政策列表
|
|
|
validAddress:false,
|
|
|
- shMethodPanelState: null,
|
|
|
- ghsInfoLoaded: false
|
|
|
+ ghsInfoLoaded: false,
|
|
|
+ methodList: [],
|
|
|
+ /** 当前选中的配送方式下标,默认加载后选中第一项 */
|
|
|
+ selectedMethodIndex: -1
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
@@ -522,8 +371,12 @@ export default {
|
|
|
this.form.hbId = 0
|
|
|
this.hasCoupon()
|
|
|
}
|
|
|
- if(this.isNewShMethod && this.$refs.shMethodPanel){
|
|
|
- this.$refs.shMethodPanel.onPageShow()
|
|
|
+ if(this.isNewShMethod){
|
|
|
+ this.getCurrentShop(() => {
|
|
|
+ if (Number(this.form.sendType) === 2 && this.displaySendCost && this.validAddress) {
|
|
|
+ this.getDeliveryQuotes()
|
|
|
+ }
|
|
|
+ })
|
|
|
}else{
|
|
|
if(this.form.sendType == 2){
|
|
|
//计算运费
|
|
|
@@ -544,6 +397,79 @@ export default {
|
|
|
isNewShMethod() {
|
|
|
return this.ghsInfo && this.ghsInfo.useNewShMethod == 1
|
|
|
},
|
|
|
+ visibleMethodList() {
|
|
|
+ return (this.methodList || [])
|
|
|
+ .filter(item => Number(item.status) === 1)
|
|
|
+ .sort((a, b) => Number(a.sort) - Number(b.sort))
|
|
|
+ },
|
|
|
+ currentShMethod() {
|
|
|
+ const list = this.visibleMethodList
|
|
|
+ if (this.selectedMethodIndex >= 0 && this.selectedMethodIndex < list.length) {
|
|
|
+ return list[this.selectedMethodIndex]
|
|
|
+ }
|
|
|
+ return null
|
|
|
+ },
|
|
|
+ showShMethodExtraFee() {
|
|
|
+ const method = this.currentShMethod
|
|
|
+ if (!method || !this.checkShMethodBelowMinimum(method)) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ const unMeet = Number(method.unMeet) || 0
|
|
|
+ const fee = Number(method.unMeetFee) || 0
|
|
|
+ return (unMeet === 0 || unMeet === 2) && fee > 0
|
|
|
+ },
|
|
|
+ shMethodExtraFeeLabel() {
|
|
|
+ const method = this.currentShMethod
|
|
|
+ if (!method) {
|
|
|
+ return "包装费"
|
|
|
+ }
|
|
|
+ return Number(method.unMeet) === 2 ? "包装费" : "运费"
|
|
|
+ },
|
|
|
+ shMethodExtraFeeAmount() {
|
|
|
+ if (!this.showShMethodExtraFee) {
|
|
|
+ return 0
|
|
|
+ }
|
|
|
+ const method = this.currentShMethod
|
|
|
+ return parseFloat(Number(method && method.unMeetFee) || 0)
|
|
|
+ },
|
|
|
+ shMethodUnMeetWarningText() {
|
|
|
+ const method = this.currentShMethod
|
|
|
+ if (!method) {
|
|
|
+ return ""
|
|
|
+ }
|
|
|
+ const tips = []
|
|
|
+ const minAmount = Number(method.minAmount) || 0
|
|
|
+ const minNum = Number(method.minNum) || 0
|
|
|
+ if (minAmount > 0) {
|
|
|
+ tips.push("不满" + minAmount + "元")
|
|
|
+ }
|
|
|
+ if (minNum > 0) {
|
|
|
+ tips.push("不满" + minNum + "扎")
|
|
|
+ }
|
|
|
+ const conditionText = tips.length > 0 ? tips.join("或") : "未达最低消费"
|
|
|
+ return "当天订单" + conditionText + ",加" + this.shMethodExtraFeeLabel + this.shMethodExtraFeeAmount + "元"
|
|
|
+ },
|
|
|
+ currentMethodExplains() {
|
|
|
+ const method = this.currentShMethod
|
|
|
+ if (!method || !Array.isArray(method.explains)) {
|
|
|
+ return []
|
|
|
+ }
|
|
|
+ return method.explains
|
|
|
+ .filter(exp => exp && exp.explain)
|
|
|
+ .sort((a, b) => Number(a.sort) - Number(b.sort))
|
|
|
+ },
|
|
|
+ runnerFeeAmount() {
|
|
|
+ if (!this.displaySendCost || this.isFreeDelivery) {
|
|
|
+ return 0
|
|
|
+ }
|
|
|
+ return Number(this.form.sendCost) || 0
|
|
|
+ },
|
|
|
+ panelTotalPrice() {
|
|
|
+ let price = Number(this.allPriceFun) || 0
|
|
|
+ price += this.runnerFeeAmount
|
|
|
+ price += this.shMethodExtraFeeAmount
|
|
|
+ return parseFloat(price.toFixed(2))
|
|
|
+ },
|
|
|
/** 确认页列表每行价格展示(与 selectList 顺序一致) */
|
|
|
affirmCommodityPriceParts() {
|
|
|
const list = this.selectList || [];
|
|
|
@@ -670,12 +596,7 @@ export default {
|
|
|
*/
|
|
|
modifyPrice(){
|
|
|
if (this.isNewShMethod) {
|
|
|
- if (this.shMethodPanelState) {
|
|
|
- return this.shMethodPanelState.totalPrice
|
|
|
- }
|
|
|
- if (this.$refs.shMethodPanel) {
|
|
|
- return this.$refs.shMethodPanel.panelTotalPrice
|
|
|
- }
|
|
|
+ return this.panelTotalPrice
|
|
|
}
|
|
|
let allPrice = this.allPriceFun.toFixed(2)
|
|
|
allPrice = Number(allPrice)
|
|
|
@@ -697,16 +618,12 @@ export default {
|
|
|
price = price + this.form.packCost
|
|
|
}
|
|
|
}else{
|
|
|
- if(this.isNewShMethod){
|
|
|
- // 配送业务面板门店费用由子组件计算
|
|
|
- }else{
|
|
|
- //同城配送
|
|
|
- if(this.form.sendType == 4){
|
|
|
- //设置了订单金额低200需要付包装费,当前只付一次
|
|
|
- if(Number(this.lackExpend) > 0 && allPrice < Number(this.lackExpend)){
|
|
|
- price = price + this.form.packCost
|
|
|
- this.needAddPackCost = true
|
|
|
- }
|
|
|
+ //同城配送
|
|
|
+ if(this.form.sendType == 4){
|
|
|
+ //设置了订单金额低200需要付包装费,当前只付一次
|
|
|
+ if(Number(this.lackExpend) > 0 && allPrice < Number(this.lackExpend)){
|
|
|
+ price = price + this.form.packCost
|
|
|
+ this.needAddPackCost = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -717,25 +634,97 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapActions(["initMerchantInfo"]),
|
|
|
- /** 同步配送业务面板状态到父页面表单 */
|
|
|
- onShMethodPanelChange(state) {
|
|
|
- this.shMethodPanelState = state
|
|
|
- this.form.sendType = state.sendType
|
|
|
- this.form.wlName = state.wlName
|
|
|
- this.form.wlId = state.wlId
|
|
|
- this.form.sendCost = state.sendCost
|
|
|
- this.form.packCost = state.packCost
|
|
|
- this.sendTimeWant = state.sendTimeWant
|
|
|
- this.remark = state.remark
|
|
|
- this.selectedDeliveryData = state.selectedDeliveryData
|
|
|
- this.showDistance = state.showDistance
|
|
|
+ /** 初始化配送业务面板:拉取配送配置 */
|
|
|
+ loadShMethods(ghsId) {
|
|
|
+ getShMethod({ ghsId: ghsId }).then(res => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.methodList = res.data && res.data.method ? res.data.method : []
|
|
|
+ if (this.visibleMethodList.length > 0) {
|
|
|
+ this.selectMethodByIndex(0)
|
|
|
+ } else {
|
|
|
+ this.selectedMethodIndex = -1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ checkShMethodBelowMinimum(method) {
|
|
|
+ if (!method) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ const minAmount = Number(method.minAmount) || 0
|
|
|
+ const minNum = Number(method.minNum) || 0
|
|
|
+ if (minAmount <= 0 && minNum <= 0) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ const allPrice = Number(this.allPriceFun) || 0
|
|
|
+ const bigLength = Number(this.allCountFun.bigLength) || 0
|
|
|
+ return (minAmount > 0 && allPrice < minAmount) || (minNum > 0 && bigLength < minNum)
|
|
|
},
|
|
|
- changeWlFn(e) {
|
|
|
- this.wlSelData = this.wlList[e.detail.value];
|
|
|
+ /** 按列表下标切换配送方式,并同步 sendType 供下单与条件展示 */
|
|
|
+ selectMethodByIndex(index) {
|
|
|
+ const list = this.visibleMethodList
|
|
|
+ if (!list[index]) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.selectedMethodIndex = index
|
|
|
+ const sendType = Number(list[index].style)
|
|
|
+ this.form.sendType = sendType
|
|
|
+ if (sendType === 2) {
|
|
|
+ if (this.displaySendCost && Number(this.ghsInfo.openIntraCity) === 1 && this.validAddress) {
|
|
|
+ this.getDeliveryQuotes()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.deliveryQuotes = []
|
|
|
+ this.selectedDeliveryIndex = -1
|
|
|
+ this.selectedDeliveryData = null
|
|
|
+ this.form.sendCost = 0
|
|
|
+ this.showDistance = 0
|
|
|
+ }
|
|
|
+ this.syncPackCostByMethod()
|
|
|
+ },
|
|
|
+ syncPackCostByMethod() {
|
|
|
+ const method = this.currentShMethod
|
|
|
+ if (method && this.checkShMethodBelowMinimum(method)) {
|
|
|
+ const unMeet = Number(method.unMeet) || 0
|
|
|
+ const fee = parseFloat(Number(method.unMeetFee) || 0)
|
|
|
+ if ((unMeet === 0 || unMeet === 2) && fee > 0) {
|
|
|
+ this.form.packCost = fee
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.form.packCost = 0
|
|
|
+ },
|
|
|
+ /** 聚焦物流输入框时清空,便于重新填写 */
|
|
|
+ onWlNameFocus() {
|
|
|
+ this.form.wlName = ""
|
|
|
+ this.form.wlId = 0
|
|
|
+ this.wlSelData = { id: 0, name: "" }
|
|
|
+ },
|
|
|
+ /** 手动输入物流名称时清除已选物流 id,避免与列表选项不一致 */
|
|
|
+ onWlNameInput() {
|
|
|
+ this.form.wlId = 0
|
|
|
+ this.wlSelData = { id: 0, name: "" }
|
|
|
+ },
|
|
|
+ /** 打开物流选择弹框 */
|
|
|
+ openWlSelect() {
|
|
|
+ if (!this.wlList.length) {
|
|
|
+ uni.showToast({ title: "暂无物流可选", icon: "none" })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$refs.wlPopupRef.open("center")
|
|
|
+ },
|
|
|
+ /** 弹框内选中物流后回填到输入框 */
|
|
|
+ selectWl(item) {
|
|
|
+ this.wlSelData = item || { id: 0, name: "" }
|
|
|
this.form.wlId = this.wlSelData.id
|
|
|
this.form.wlName = this.wlSelData.name
|
|
|
+ this.$refs.wlPopupRef.close()
|
|
|
},
|
|
|
+ /** 关闭物流选择弹框 */
|
|
|
+ cancelWlSelect() {
|
|
|
+ this.$refs.wlPopupRef.close()
|
|
|
+ },
|
|
|
+ ...mapActions(["initMerchantInfo"]),
|
|
|
// 展示包配送政策弹窗
|
|
|
showDeliveryPolicyModal() {
|
|
|
this.deliveryPolicyList = []
|
|
|
@@ -1011,7 +1000,7 @@ export default {
|
|
|
})
|
|
|
|
|
|
},
|
|
|
- getCurrentShop(){
|
|
|
+ getCurrentShop(callback){
|
|
|
currentShop().then(res=>{
|
|
|
if(res.code == 1){
|
|
|
this.shopInfo = res.data
|
|
|
@@ -1019,34 +1008,10 @@ export default {
|
|
|
this.validAddress = true
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- calcFreight() {
|
|
|
- let weight = 0
|
|
|
- if(!this.$util.isEmpty(this.selectList)){
|
|
|
- this.selectList.forEach((item,idx,arr) => {
|
|
|
- if(Number(item.bigCount)>0){
|
|
|
- let add = Number(item.weight)*Number(item.bigCount)
|
|
|
- weight = Number(weight) + Number(add)
|
|
|
- }else{
|
|
|
- let unitWeight = item.weight/item.ratio
|
|
|
- let add = Number(unitWeight)*Number(item.smallCount)
|
|
|
- weight = Number(weight) + Number(add)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- weight = Number(weight).toFixed(2)
|
|
|
-
|
|
|
- let params = {
|
|
|
- ghsId: this.options.id,
|
|
|
- weight:weight
|
|
|
- };
|
|
|
- freight(params).then(res => {
|
|
|
- if(res.code == 1){
|
|
|
- this.form.sendCost = res.data.fee?parseFloat(res.data.fee):0
|
|
|
- this.showDistance = res.data.showDistance?parseFloat(res.data.showDistance):0
|
|
|
+ if (typeof callback === "function") {
|
|
|
+ callback()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
addEvents(item) {
|
|
|
if(item.variety == 0){
|
|
|
@@ -1113,6 +1078,8 @@ export default {
|
|
|
that.lackExpend = res.data.lackExpend?parseFloat(res.data.lackExpend):0
|
|
|
that.form.wlName = res.data.customWlName ? res.data.customWlName : ''
|
|
|
|
|
|
+ this.loadShMethods(id)
|
|
|
+
|
|
|
if(!that.isNewShMethod){
|
|
|
//杭州斗南鲜花批发部不需要显示免费配送
|
|
|
if(that.ghsInfo.shopId && Number(that.ghsInfo.shopId) == 4608){
|
|
|
@@ -1174,7 +1141,14 @@ export default {
|
|
|
|
|
|
if(this.ghsInfo.pfLevel == 0){
|
|
|
if (this.isNewShMethod) {
|
|
|
- if (!this.$refs.shMethodPanel || !this.$refs.shMethodPanel.validateBeforeSubmit()) {
|
|
|
+ /** 提交前校验,失败时提示并返回 false */
|
|
|
+ if (Number(this.form.sendType) === 3 && this.$util.isEmpty(this.form.wlName)) {
|
|
|
+ this.$msg("请填选物流")
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ const method = this.currentShMethod
|
|
|
+ if (method && Number(method.unMeet) === 1 && this.checkShMethodBelowMinimum(method)) {
|
|
|
+ this.$msg("未达到最低消费,不能下单")
|
|
|
return false
|
|
|
}
|
|
|
} else if(this.form.sendType == 3){
|
|
|
@@ -1807,4 +1781,105 @@ export default {
|
|
|
font-size: 32upx;
|
|
|
border-radius: 40upx;
|
|
|
}
|
|
|
+
|
|
|
+/* 配送业务面板样式 */
|
|
|
+.wl-field-row {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ flex: 1;
|
|
|
+ justify-content: flex-end;
|
|
|
+ min-width: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.wl-name-input {
|
|
|
+ flex: 1;
|
|
|
+ min-width: 0;
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+
|
|
|
+.wl-select-btn {
|
|
|
+ margin-left: 16upx;
|
|
|
+ flex-shrink: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.wl-popup-content {
|
|
|
+ width: 680upx;
|
|
|
+ max-width: 90vw;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 20upx;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.wl-popup-title {
|
|
|
+ padding: 30upx 30upx 10upx;
|
|
|
+ font-size: 30upx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+
|
|
|
+.wl-popup-scroll {
|
|
|
+ max-height: 60vh;
|
|
|
+}
|
|
|
+
|
|
|
+.wl-popup-list {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ padding: 20upx 20upx 10upx;
|
|
|
+}
|
|
|
+
|
|
|
+.wl-popup-item {
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ margin-right: 12upx;
|
|
|
+}
|
|
|
+
|
|
|
+.wl-option-btn {
|
|
|
+ min-width: 160upx;
|
|
|
+ padding: 0 27upx;
|
|
|
+ height: 80upx;
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight: bold;
|
|
|
+ border-radius: 16upx;
|
|
|
+ background: #f0f2f6;
|
|
|
+ color: #333;
|
|
|
+ border: 2upx solid #e0e0e0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+
|
|
|
+.wl-option-btn.selected,
|
|
|
+.wl-option-btn:active {
|
|
|
+ background: #3385ff;
|
|
|
+ color: #fff;
|
|
|
+ border-color: #3385ff;
|
|
|
+}
|
|
|
+
|
|
|
+.wl-popup-footer {
|
|
|
+ padding: 10upx 0 30upx;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+
|
|
|
+.wl-popup-cancel-btn {
|
|
|
+ width: 210upx;
|
|
|
+}
|
|
|
+
|
|
|
+.sh-method-btn {
|
|
|
+ width: 115upx;
|
|
|
+ height: 100upx;
|
|
|
+ margin-right: 15upx;
|
|
|
+}
|
|
|
+.sh-method-btn:last-child {
|
|
|
+ margin-right: 0;
|
|
|
+}
|
|
|
+.sh-method-btn--short {
|
|
|
+ line-height: 60upx;
|
|
|
+}
|
|
|
+.sh-method-btn--long {
|
|
|
+ line-height: 32upx;
|
|
|
+}
|
|
|
+.wl-popup-wrap {
|
|
|
+ z-index: 99999;
|
|
|
+}
|
|
|
</style>
|