|
|
@@ -1,23 +1,75 @@
|
|
|
<template>
|
|
|
- <div class="app-content">
|
|
|
- <div>
|
|
|
- <form @submit="formSubmit">
|
|
|
- <div class="module-com input-line-wrap">
|
|
|
+ <view class="app-content">
|
|
|
+ <view>
|
|
|
+ <view class="module-com input-line-wrap">
|
|
|
<tui-list-cell class="line-cell" :arrow="true" @click="selectCustom">
|
|
|
- <div class="tui-title">请选择:</div>
|
|
|
+ <view class="tui-title">快捷客户:</view>
|
|
|
<view>{{form.customName}}</view>
|
|
|
</tui-list-cell>
|
|
|
- </div>
|
|
|
- <div class="confirm-btn">
|
|
|
- <button class="admin-button-com big blue" formType="submit">提交</button>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :arrow="true" @click="selectMyItem(0)">
|
|
|
+ <div class="tui-title">处理花材:</div>
|
|
|
+ <view>{{losingItemName}}</view>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :arrow="true" @click="selectMyItem(1)">
|
|
|
+ <div class="tui-title">直接收款:</div>
|
|
|
+ <view>{{zjGatheringItemName}}</view>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title">下单后</view>
|
|
|
+ <radio-group class="tui-input" @change="orderFlowChange">
|
|
|
+ <label class="list" for="orderFlowZj">
|
|
|
+ <radio id="orderFlowZj" value="0" :checked="orderFlow == 0" style="transform:scale(0.7,0.7)" />
|
|
|
+ <span class="checkbox-text">直接完成</span>
|
|
|
+ </label>
|
|
|
+ <label class="list" for="orderFlowFh">
|
|
|
+ <radio id="orderFlowFh" value="1" :checked="orderFlow == 1" style="transform:scale(0.7,0.7)" />
|
|
|
+ <span class="checkbox-text">变待发货</span>
|
|
|
+ </label>
|
|
|
+ </radio-group>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title">商城端跑腿</view>
|
|
|
+ <radio-group class="tui-input" @change="thirdSendChange">
|
|
|
+ <label class="list" for="thirdSendOk">
|
|
|
+ <radio id="thirdSendOk" value="0" :checked="thirdSend == 0" style="transform:scale(0.7,0.7)" />
|
|
|
+ <span class="checkbox-text">支持</span>
|
|
|
+ </label>
|
|
|
+ <label class="list" for="thirdSendNo">
|
|
|
+ <radio id="thirdSendNo" value="1" :checked="thirdSend == 1" style="transform:scale(0.7,0.7)" />
|
|
|
+ <span class="checkbox-text">不支持</span>
|
|
|
+ </label>
|
|
|
+ </radio-group>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title">跑腿费用</view>
|
|
|
+ <radio-group class="tui-input" @change="thirdSendFeeChange">
|
|
|
+ <label class="list" for="thirdSendFeeDf">
|
|
|
+ <radio id="thirdSendFeeDf" value="0" :checked="thirdSendFee == 0" style="transform:scale(0.7,0.7)" />
|
|
|
+ <span class="checkbox-text">到付</span>
|
|
|
+ </label>
|
|
|
+ <label class="list" for="thirdSendFeeZd">
|
|
|
+ <radio id="thirdSendFeeZd" value="1" :checked="thirdSendFee == 1" style="transform:scale(0.7,0.7)" />
|
|
|
+ <span class="checkbox-text">自动计算</span>
|
|
|
+ </label>
|
|
|
+ </radio-group>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="confirm-btn">
|
|
|
+ <button class="admin-button-com big blue" @click="goBack">返回</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
-import { skCustom,skCustomSet } from "@/api/shop";
|
|
|
+import { skCustom,skCustomSet,getShopExtInfo,setExtItem,modifyExt } from "@/api/shop";
|
|
|
export default {
|
|
|
name: "sk",
|
|
|
components: {TuiListCell},
|
|
|
@@ -25,12 +77,71 @@ export default {
|
|
|
return {
|
|
|
form:{
|
|
|
customName:'',
|
|
|
- customId:0
|
|
|
+ customId:0,
|
|
|
+ selectCustomOk:0
|
|
|
},
|
|
|
- hasLoad:false
|
|
|
+ hasLoad:false,
|
|
|
+ orderFlow:0,
|
|
|
+ thirdSend:0,
|
|
|
+ thirdSendFee:0,
|
|
|
+ losingItem:0,
|
|
|
+ losingItemName:'',
|
|
|
+ zjGatheringItem:0,
|
|
|
+ zjGatheringItemName:'',
|
|
|
+ selectItemOk:0
|
|
|
};
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ let that = this
|
|
|
+ if(that.form.customId != 0 && !this.$util.isEmpty(that.form.customId) && that.form.selectCustomOk == 1){
|
|
|
+ that.form.selectCustomOk = 0
|
|
|
+ skCustomSet({id:that.form.customId}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(this.selectItemOk == 1){
|
|
|
+ this.selectItemOk = 0
|
|
|
+ setExtItem({losingItem:this.losingItem,zjGatheringItem:this.zjGatheringItem}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ orderFlowChange(e){
|
|
|
+ this.orderFlow = e.detail.value
|
|
|
+ this.changeExt()
|
|
|
+ },
|
|
|
+ thirdSendChange(e){
|
|
|
+ this.thirdSend = e.detail.value
|
|
|
+ this.changeExt()
|
|
|
+ },
|
|
|
+ thirdSendFeeChange(e){
|
|
|
+ this.thirdSendFee = e.detail.value
|
|
|
+ this.changeExt()
|
|
|
+ },
|
|
|
+ changeExt(){
|
|
|
+ modifyExt({orderFlow:this.orderFlow,thirdSend:this.thirdSend,thirdSendFee:this.thirdSendFee}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectMyItem(no){
|
|
|
+ if(no ==0){
|
|
|
+ this.$util.pageTo({ url: '/admin/item/selectItem?style=2&losingItem='+this.losingItem})
|
|
|
+ }else if(no == 1){
|
|
|
+ this.$util.pageTo({ url: '/admin/item/selectItem?style=2&zjGatheringItem='+this.zjGatheringItem})
|
|
|
+ }else{
|
|
|
+ //先操作
|
|
|
+ }
|
|
|
+ },
|
|
|
+ goBack(){
|
|
|
+ uni.navigateBack()
|
|
|
+ },
|
|
|
init(){
|
|
|
if(this.hasLoad){
|
|
|
return false
|
|
|
@@ -43,27 +154,20 @@ export default {
|
|
|
this.$forceUpdate()
|
|
|
}
|
|
|
})
|
|
|
+ getShopExtInfo().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.losingItem = res.data.losingItem?res.data.losingItem:0
|
|
|
+ this.losingItemName = res.data.losingItemName?res.data.losingItemName:''
|
|
|
+ this.zjGatheringItem = res.data.zjGatheringItem?res.data.zjGatheringItem:0
|
|
|
+ this.zjGatheringItemName = res.data.zjGatheringItemName?res.data.zjGatheringItemName:''
|
|
|
+ this.orderFlow = res.data.orderFlow
|
|
|
+ this.thirdSend = res.data.thirdSend
|
|
|
+ this.thirdSendFee = res.data.thirdSendFee
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
selectCustom(){
|
|
|
this.$util.pageTo({ url: '/admin/custom/selectCustom',query: {style:2}})
|
|
|
- },
|
|
|
- formSubmit() {
|
|
|
- let that = this
|
|
|
- if(that.form.customId == 0 || that.$util.isEmpty(that.form.customId)){
|
|
|
- that.$msg('请选择门店')
|
|
|
- return false
|
|
|
- }
|
|
|
- skCustomSet({id:that.form.customId}).then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- that.$msg(res.msg)
|
|
|
- setTimeout(function(){
|
|
|
-
|
|
|
- that.$store.commit("setLoginInfo", {})
|
|
|
- that.$util.pageTo({url: "/admin/home/workbench",type: 3})
|
|
|
-
|
|
|
- },1000)
|
|
|
- }
|
|
|
- })
|
|
|
}
|
|
|
},
|
|
|
};
|