|
@@ -12,55 +12,32 @@
|
|
|
<div class="shop" v-for="(v,i) in shopList" :key="i">
|
|
|
<div class="top">
|
|
|
<div class="name">{{v.shopName}}</div>
|
|
|
- <img @click="editShop(v)" v-if="[1,9].includes(type)&& v.bindStatus === 1" src="../../../static/image/icon-edit.png" alt="">
|
|
|
+ <img @click="editShop(v)" v-if="[1,9].includes(type)&& v.dadaBindType === 1" src="../../../static/image/icon-edit.png" alt="">
|
|
|
</div>
|
|
|
<div class="shop-content">
|
|
|
<div class="info">
|
|
|
- <div class="info-line">门店编号:{{type === 1 ? (v.dadaShopNo || '--') : type ===9 ? (v.dadaYzShopNo || '--') : type === 5 ? v.thirdShopId : '--'}}</div>
|
|
|
+ <div v-if="[1, 2, 5, 9, 13].includes(type)" class="info-line">门店编号:{{type === 1 ? (v.dadaShopNo || '--') : type ===9 ? (v.dadaYzShopNo || '--') : type === 5 ? v.thirdShopId : '--'}}</div>
|
|
|
+ <div v-else class="info-line">商户编号:{{ v.thirdShopId || '--' }}</div>
|
|
|
<div class="balance">账户余额:{{typeof v.balance === 'number' ? '¥ ' + v.balance : '--'}}</div>
|
|
|
- <div class="refuse" v-if="type === 5 && v.bindStatus === 3">审核失败:{{v.msg}}</div>
|
|
|
+ <div class="refuse" v-if="type === 5 && v.bindStatus === 3">审核失败:{{v.authMsg}}</div>
|
|
|
</div>
|
|
|
- <div v-if="type === 5 && [2,3].includes(v.bindStatus)" :class="['status',v.bindStatus === 2 ? '' : 'refuse']">{{v.bindStatus === 2 ? '审核中' : '审核失败'}}</div>
|
|
|
</div>
|
|
|
- <div class="but" @click="bind(v)" v-if="!v.bindStatus || (type === 5 && v.bindStatus === 3)">绑定</div>
|
|
|
- <div class="but unbind" @click="unbind(v)" v-if="v.bindStatus === 1">解绑</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- <div v-if="deliveryList.length" class="take-out-list">
|
|
|
- <div class="item" v-for="(v, index) in deliveryList" :key="index">
|
|
|
- <div class="item-top">
|
|
|
- <div class="top-left">
|
|
|
- <img :src="v.logo" alt="" class="top-left-img" />
|
|
|
- <div class="name">{{ v.name }}</div>
|
|
|
+ <div v-if="type === 5 && [2,3].includes(v.bindStatus)" :class="['status',v.bindStatus === 2 ? '' : 'bt-refuse']">{{v.bindStatus === 2 ? '审核中' : '审核失败'}}</div>
|
|
|
+ <div class="but" v-if="[1,9].includes(type)">
|
|
|
+ <div @click="bind(v)" v-if="!v.dadaBindType" class="but-con">绑定</div>
|
|
|
</div>
|
|
|
- <div v-if="v.bindStatus === 1 && memberType === 2" class="top-right">
|
|
|
- <span>开启后首选该账号平台为配送平台</span>
|
|
|
- <el-switch @change="statusDelivery(v)" v-model="v.preferredDelivery" :active-value="1" :inactive-value="0" active-color="#FC7200" inactive-color="#999" />
|
|
|
+ <div class="but" v-else-if="[5].includes(type)">
|
|
|
+ <div @click="bind(v)" v-if="v.bindStatus === 3 || !v.bindStatus" class="but-con">绑定</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="item-bottom">
|
|
|
- <div class="left">
|
|
|
- <div class="l-l">
|
|
|
- <img :src="v.pcLogo" class="l-l-img" />
|
|
|
- </div>
|
|
|
- <div class="take-out-name">
|
|
|
- <div v-if="v.code">商户编号:{{ v.code }}</div>
|
|
|
- <div v-if="v.balance">账户余额:{{ v.balance }}</div>
|
|
|
- </div>
|
|
|
+ <div class="but" v-else>
|
|
|
+ <div @click="bind(v)" v-if="!v.bindStatus" class="but-con">绑定</div>
|
|
|
</div>
|
|
|
- <div class="right" v-if="memberType === 2">
|
|
|
- <span class="reason">{{
|
|
|
- v.bindStatus === 2 ? "审核中" : v.bindStatus === 3 ? `已拒绝` : ""
|
|
|
- }}</span>
|
|
|
- <el-button v-if="[0, 3].includes(v.bindStatus)" @click="goBind(v)" v-loading.fullscreen.lock="fullscreenLoading" element-loading-text="关闭窗口后再操作!" type="primary" size="small" class="right-btn">去绑定</el-button>
|
|
|
- <el-button v-if="[1].includes(v.bindStatus)" @click="release(v)" size="small">解 绑</el-button>
|
|
|
- <el-button v-if="[1, 4].includes(v.bindStatus) && [1, 9].includes(v.type)" @click="perfectData(v)" type="primary" size="small" class="right-btn">完善资料</el-button>
|
|
|
+ <div class="but" @click="release(v)" v-if="v.bindStatus === 1">
|
|
|
+ <div class="but-con unbind">解绑</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="v.bindStatus === 3" class="respect">{{ v.authMsg }}</div>
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
<!-- 账号绑定 -->
|
|
|
<el-dialog title="账号绑定" :visible.sync="centerDialogVisible3" width="40%" center>
|
|
|
<el-form ref="form" :model="params" label-width="100px">
|
|
@@ -74,7 +51,7 @@
|
|
|
<el-input v-model="params.mobile" placeholder="请输入手机号"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button @click="againBind">重新绑定</el-button>
|
|
|
+ <el-button @click="goBind">重新绑定</el-button>
|
|
|
<el-button type="primary" @click="confirm">确认</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -112,16 +89,18 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-dialog>
|
|
|
- <!-- 完善资料 -->
|
|
|
- <el-dialog title="请输入达达门店编号" :visible.sync="centerDialogVisible2" width="40%" center>
|
|
|
- <div class="tips">请确保门店编号填写正确,否则会影响运力的使用!</div>
|
|
|
- <el-form :model="DDData" ref="DDData" label-width="80px" class="demo-ruleForm">
|
|
|
- <el-form-item label="门店编号" prop="shopNo">
|
|
|
- <el-input v-model="DDData.shopNo" placeholder="请输入门店编号"></el-input>
|
|
|
+ <!-- 顺丰绑定 -->
|
|
|
+ <el-dialog title="顺丰配送" :visible.sync="centerDialogVisible2" width="40%" center>
|
|
|
+ <el-form label-width="80px" class="demo-ruleForm">
|
|
|
+ <el-form-item label="顺丰ID号" prop="shopNo">
|
|
|
+ <el-input v-model="sfId" placeholder="请输入顺丰ID号"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="顺丰ID号" prop="shopNo">
|
|
|
+ <el-input v-model="sfId2" placeholder="请再次输入顺丰ID号"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button size="small" @click="resetForm('DDData')">取 消</el-button>
|
|
|
- <el-button size="small" type="primary" @click="updateShopNo">确 定</el-button>
|
|
|
+ <el-button size="small" @click="centerDialogVisible2 = false">取 消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="confirmSF">确 定</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-dialog>
|
|
@@ -132,15 +111,16 @@
|
|
|
import {
|
|
|
getDeliveryList,
|
|
|
releaseDelivery,
|
|
|
- bindDelivery,
|
|
|
- bindUserApplyDelivery,
|
|
|
- bindUserSubmitDelivery,
|
|
|
+ bindDeliveryNew,
|
|
|
+ bindUserApplyDeliveryNew,
|
|
|
+ bindUserSubmitDeliveryNew,
|
|
|
explainDelivery,
|
|
|
- updateShopNo,
|
|
|
+ updateShopNoNew,
|
|
|
statusDelivery,
|
|
|
- cancelBindDelivery,
|
|
|
- unBindDelivery,
|
|
|
+ cancelBindDeliveryNew,
|
|
|
+ unBindDeliveryNew,
|
|
|
getBindDeliveryShopList,
|
|
|
+ unBindAptNew,
|
|
|
} from "../../api/shop";
|
|
|
export default {
|
|
|
data() {
|
|
@@ -160,10 +140,6 @@ export default {
|
|
|
count: 60,
|
|
|
showCode: false,
|
|
|
timer: null, // 计时器
|
|
|
- DDData: {
|
|
|
- deliveryId: "",
|
|
|
- shopNo: "",
|
|
|
- },
|
|
|
memberType: this.$store.state.userInfo.memberType,
|
|
|
curIndex: 0,
|
|
|
shopList: [],
|
|
@@ -176,6 +152,8 @@ export default {
|
|
|
mobile: "",
|
|
|
},
|
|
|
centerDialogVisible3: false,
|
|
|
+ sfId: "",
|
|
|
+ sfId2: "",
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -200,7 +178,7 @@ export default {
|
|
|
this.jumpUrl = null;
|
|
|
this.fullscreenLoading = false;
|
|
|
window.clearInterval(loop);
|
|
|
- this.getDeliveryList(this.curIdx);
|
|
|
+ this.getDeliveryList();
|
|
|
}
|
|
|
}, 1000);
|
|
|
}
|
|
@@ -208,13 +186,12 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
type() {
|
|
|
- return this.deliveryList[this.curIndex]?.deliveryType;
|
|
|
+ return this.deliveryList[this.curIndex] && this.deliveryList[this.curIndex].deliveryType;
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
if (this.memberType !== 1) {
|
|
|
this.getDeliveryList();
|
|
|
- this.explainDelivery();
|
|
|
}
|
|
|
},
|
|
|
// 1->达达
|
|
@@ -229,28 +206,86 @@ export default {
|
|
|
// 12->货拉拉
|
|
|
// 13-> 美图跑腿
|
|
|
methods: {
|
|
|
+ // 顺丰绑定确定
|
|
|
+ confirmSF() {
|
|
|
+ if (!this.sfId.trim()) {
|
|
|
+ return this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "请输入顺丰ID号",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (this.sfId.trim() !== this.sfId2.trim()) {
|
|
|
+ return this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "请确定输入相同的顺丰ID号",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.goBind();
|
|
|
+ },
|
|
|
+ confirmRelease(v) {
|
|
|
+ unBindDeliveryNew({ id: v.id || v.bindId }).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "已成功解绑!",
|
|
|
+ });
|
|
|
+ this.getDeliveryList();
|
|
|
+ // this.getBindDeliveryShopList();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: res.data,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
editShop(v) {
|
|
|
- this.shopId = v.shopId
|
|
|
- this.params = {
|
|
|
- bindId: v.bindId,
|
|
|
- deliveryId: this.deliveryId,
|
|
|
- shopId: v.shopId,
|
|
|
- shopNo: this.type === 1 ? v.dadaShopNo : this.type === 9 ? v.dadaYzShopNo : v.shopNo,
|
|
|
- merchantNo: v.thirdShopId,
|
|
|
- mobile: v.account
|
|
|
- }
|
|
|
- this.centerDialogVisible3 = true
|
|
|
- },
|
|
|
- confirm() {},
|
|
|
- againBind() {},
|
|
|
+ this.shopId = v.shopId;
|
|
|
+ this.params = {
|
|
|
+ bindId: v.bindId,
|
|
|
+ deliveryId: this.deliveryList[this.curIndex].deliveryId,
|
|
|
+ shopId: v.shopId,
|
|
|
+ shopNo:
|
|
|
+ this.type === 1
|
|
|
+ ? v.dadaShopNo
|
|
|
+ : this.type === 9
|
|
|
+ ? v.dadaYzShopNo
|
|
|
+ : v.shopNo,
|
|
|
+ merchantNo: v.thirdShopId,
|
|
|
+ mobile: v.account,
|
|
|
+ };
|
|
|
+ this.centerDialogVisible3 = true;
|
|
|
+ },
|
|
|
+ // 进行绑定操作
|
|
|
bind(v) {
|
|
|
- console.log('点击绑定!', typeof this.type);
|
|
|
- this.shopId = v.shopId
|
|
|
- if (this.type === 5) {
|
|
|
- this.shunFengShow = true
|
|
|
- return
|
|
|
- }
|
|
|
- this.bindShop()
|
|
|
+ console.log("点击绑定!", typeof this.type);
|
|
|
+ this.shopId = v.shopId;
|
|
|
+ // 绑定顺丰同城
|
|
|
+ if (this.type === 5) {
|
|
|
+ this.sfId = ''
|
|
|
+ this.sfId2 = ''
|
|
|
+ this.centerDialogVisible2 = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // 绑定UU跑腿
|
|
|
+ if (this.type === 7) {
|
|
|
+ this.title = "UU跑腿绑定";
|
|
|
+ this.UUData = {
|
|
|
+ cityName: "",
|
|
|
+ mobile: "",
|
|
|
+ validateCode: "",
|
|
|
+ };
|
|
|
+ this.centerDialogVisible = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm("即将进行绑定操作, 是否继续?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ center: true,
|
|
|
+ }).then(() => {
|
|
|
+ this.goBind();
|
|
|
+ });
|
|
|
},
|
|
|
getBindDeliveryShopList() {
|
|
|
this.loading = true;
|
|
@@ -269,21 +304,29 @@ export default {
|
|
|
},
|
|
|
changeTab(i) {
|
|
|
this.curIndex = i;
|
|
|
+ if ([1, 2, 5, 9, 13].includes(this.type)) {
|
|
|
+ this.getBindDeliveryShopList();
|
|
|
+ } else {
|
|
|
+ let shop = this.deliveryList[i];
|
|
|
+ console.log('shop',shop);
|
|
|
+ this.shopList = [
|
|
|
+ {
|
|
|
+ id: shop.id,
|
|
|
+ shopName: shop.name,
|
|
|
+ thirdShopId: shop.thirdShopId,
|
|
|
+ balance: shop.balance,
|
|
|
+ bindStatus: shop.bindStatus,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ }
|
|
|
},
|
|
|
- explainDelivery() {
|
|
|
- explainDelivery().then((res) => {
|
|
|
- // console.log(res);
|
|
|
- });
|
|
|
- },
|
|
|
+
|
|
|
getDeliveryList() {
|
|
|
this.loading = true;
|
|
|
getDeliveryList().then((res) => {
|
|
|
if (res.code === 200) {
|
|
|
this.deliveryList = res.data;
|
|
|
- let type = this.deliveryList[this.curIndex].deliveryType;
|
|
|
- if ([1, 2, 5, 9, 13].includes(type)) {
|
|
|
- this.getBindDeliveryShopList();
|
|
|
- }
|
|
|
+ this.changeTab(this.curIndex);
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "error",
|
|
@@ -317,7 +360,7 @@ export default {
|
|
|
let params = {
|
|
|
mobile: this.UUData.mobile,
|
|
|
};
|
|
|
- bindUserApplyDelivery(params).then((res) => {
|
|
|
+ bindUserApplyDeliveryNew(params).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.showCode = true;
|
|
|
this.$message({
|
|
@@ -340,84 +383,33 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- goBind(v) {
|
|
|
+ goBind() {
|
|
|
let params = {
|
|
|
- deliveryId: v.deliveryId,
|
|
|
+ deliveryId: this.deliveryList[this.curIndex].deliveryId,
|
|
|
+ sfId: this.sfId,
|
|
|
+ shopId: this.shopId,
|
|
|
};
|
|
|
- // 显示U跑腿绑定弹框
|
|
|
- if (v.type === 7) {
|
|
|
- this.title = "UU跑腿绑定";
|
|
|
- this.UUData = {
|
|
|
- cityName: "",
|
|
|
- mobile: "",
|
|
|
- validateCode: "",
|
|
|
- };
|
|
|
- this.centerDialogVisible = true;
|
|
|
- return;
|
|
|
- }
|
|
|
- // 绑定顺丰同城
|
|
|
- if (v.type === 5) {
|
|
|
- this.$prompt("请输入顺丰同城ID", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- center: true,
|
|
|
- })
|
|
|
- .then(({ value }) => {
|
|
|
- if (!value) {
|
|
|
- return this.$message({
|
|
|
- type: "error",
|
|
|
- message: "请输入正确的顺丰同城ID",
|
|
|
- });
|
|
|
- }
|
|
|
- params.sfId = value;
|
|
|
- bindDelivery(params).then((res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.getDeliveryList();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "error",
|
|
|
- message: res.msg,
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- return;
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$confirm("此操作将绑定当前配送平台, 是否继续?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- center: true,
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- bindDelivery(params).then((res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- if (res.data) {
|
|
|
- this.jumpUrl = res.data;
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "已成功绑定!",
|
|
|
- });
|
|
|
- this.getDeliveryList();
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "error",
|
|
|
- message: res.msg,
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
+ bindDeliveryNew(params).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ if (res.data) {
|
|
|
+ this.jumpUrl = res.data;
|
|
|
+ } else {
|
|
|
this.$message({
|
|
|
- type: "info",
|
|
|
- message: "已取消绑定!",
|
|
|
+ type: "success",
|
|
|
+ message: "已成功绑定!",
|
|
|
});
|
|
|
+ this.getDeliveryList();
|
|
|
+ // this.getBindDeliveryShopList();
|
|
|
+ }
|
|
|
+ this.centerDialogVisible2 = false;
|
|
|
+ this.centerDialogVisible3 = false;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: res.msg,
|
|
|
});
|
|
|
- }
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
bindUU() {
|
|
|
if (!this.UUData.cityName.trim()) {
|
|
@@ -438,7 +430,7 @@ export default {
|
|
|
type: "error",
|
|
|
});
|
|
|
}
|
|
|
- bindUserSubmitDelivery(this.UUData).then((res) => {
|
|
|
+ bindUserSubmitDeliveryNew(this.UUData).then((res) => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message({
|
|
|
message: "绑定成功!",
|
|
@@ -447,7 +439,7 @@ export default {
|
|
|
this.getDeliveryList();
|
|
|
} else {
|
|
|
this.$message({
|
|
|
- message: res.data,
|
|
|
+ message: res.msg,
|
|
|
type: "error",
|
|
|
});
|
|
|
}
|
|
@@ -461,7 +453,7 @@ export default {
|
|
|
type: "error",
|
|
|
});
|
|
|
}
|
|
|
- cancelBindDelivery({ mobile: this.UUData.mobile }).then((res) => {
|
|
|
+ cancelBindDeliveryNew({ mobile: this.UUData.mobile }).then((res) => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
@@ -478,24 +470,24 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
releaseSF(v) {
|
|
|
- this.$prompt("请输入顺丰同城ID", "提示", {
|
|
|
+ this.$prompt("", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
+ inputPlaceholder: '请输入绑定时顺丰同城ID号',
|
|
|
center: true,
|
|
|
}).then(({ value }) => {
|
|
|
if (!value || v.thirdShopId !== value) {
|
|
|
this.$message({
|
|
|
type: "error",
|
|
|
- message: "请输入已绑定的顺丰同城ID",
|
|
|
+ message: "请输入正确的顺丰同城ID号",
|
|
|
});
|
|
|
} else {
|
|
|
- v.sfId = value;
|
|
|
this.confirmRelease(v);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- unBindDelivery(v) {
|
|
|
- unBindDelivery({ id: v.id }).then((res) => {
|
|
|
+ unBindAptNew(v) {
|
|
|
+ unBindAptNew({ bindId: v.id }).then((res) => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
@@ -512,105 +504,50 @@ export default {
|
|
|
},
|
|
|
release(v) {
|
|
|
// UU跑腿解除绑定
|
|
|
- if (v.type === 7) {
|
|
|
+ if (this.type === 7) {
|
|
|
this.title = "UU跑腿解绑";
|
|
|
this.UUData.mobile = "";
|
|
|
this.centerDialogVisible = true;
|
|
|
return;
|
|
|
}
|
|
|
// 顺丰同程解绑
|
|
|
- if (v.type === 5) {
|
|
|
+ if (this.type === 5) {
|
|
|
this.releaseSF(v);
|
|
|
return;
|
|
|
}
|
|
|
- this.$confirm("此操作将解绑当前配送平台, 是否继续?", "提示", {
|
|
|
+ this.$confirm("即将进行解绑操作, 是否继续?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
center: true,
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- // 爱跑腿解除绑定
|
|
|
- if (v.type === 8) {
|
|
|
- this.unBindDelivery(v);
|
|
|
- return;
|
|
|
- }
|
|
|
- this.confirmRelease(v);
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$message({
|
|
|
- type: "info",
|
|
|
- message: "已取消解除绑定!",
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- // 确认解除绑定
|
|
|
- confirmRelease(v) {
|
|
|
- let params = {
|
|
|
- id: v.id,
|
|
|
- sfId: v.sfId,
|
|
|
- };
|
|
|
- releaseDelivery(params).then((res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "已成功解绑!",
|
|
|
- });
|
|
|
- this.getDeliveryList();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "error",
|
|
|
- message: res.data,
|
|
|
- });
|
|
|
+ }).then(() => {
|
|
|
+ // 爱跑腿解除绑定
|
|
|
+ if (this.type === 8) {
|
|
|
+ this.unBindAptNew(v);
|
|
|
+ return;
|
|
|
}
|
|
|
+ this.confirmRelease(v);
|
|
|
});
|
|
|
},
|
|
|
- perfectData(v) {
|
|
|
- this.centerDialogVisible2 = true;
|
|
|
- this.DDData.deliveryId = v.deliveryId;
|
|
|
- this.DDData.shopNo = v.shopNo;
|
|
|
- },
|
|
|
- updateShopNo() {
|
|
|
- updateShopNo(this.DDData).then((res) => {
|
|
|
+ // 编辑确认
|
|
|
+ confirm() {
|
|
|
+ updateShopNoNew(this.params).then((res) => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "成功完善资料!",
|
|
|
});
|
|
|
- this.getDeliveryList();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: "error",
|
|
|
- message: res.msg,
|
|
|
- });
|
|
|
- }
|
|
|
- this.centerDialogVisible2 = false;
|
|
|
- });
|
|
|
- },
|
|
|
- statusDelivery(v) {
|
|
|
- statusDelivery({
|
|
|
- id: v.id,
|
|
|
- preferredDelivery: v.preferredDelivery,
|
|
|
- }).then((res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "成功开启首选配送!",
|
|
|
- });
|
|
|
+ // this.getDeliveryList();
|
|
|
+ this.getBindDeliveryShopList();
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "error",
|
|
|
message: res.msg,
|
|
|
});
|
|
|
}
|
|
|
- this.getDeliveryList();
|
|
|
+ this.centerDialogVisible3 = false;
|
|
|
});
|
|
|
},
|
|
|
- resetForm(formName) {
|
|
|
- this.centerDialogVisible = false;
|
|
|
- this.centerDialogVisible2 = false;
|
|
|
- this.$refs[formName].resetFields();
|
|
|
- },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -668,6 +605,8 @@ export default {
|
|
|
|
|
|
.active {
|
|
|
background: #ffffff;
|
|
|
+ color: #fc7200;
|
|
|
+ font-weight: bold;
|
|
|
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.12);
|
|
|
border-radius: 40px 2px 4px 40px;
|
|
|
}
|
|
@@ -697,15 +636,31 @@ export default {
|
|
|
overflow-y: auto;
|
|
|
.shop {
|
|
|
position: relative;
|
|
|
- width: 365px;
|
|
|
- height: 200px;
|
|
|
+ width: 305px;
|
|
|
+ height: 170px;
|
|
|
background: #ffffff;
|
|
|
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
|
|
|
border-radius: 8px;
|
|
|
margin: 0 20px 20px 0;
|
|
|
overflow: hidden;
|
|
|
+ .status {
|
|
|
+ position: absolute;
|
|
|
+ top: 60px;
|
|
|
+ right: 20px;
|
|
|
+ padding: 0 5px;
|
|
|
+ font-size: 14px;
|
|
|
+ height: 20px;
|
|
|
+ line-height: 20px;
|
|
|
+ color: #007aff;
|
|
|
+ border: 1px solid #007aff;
|
|
|
+ transform: rotate(-20deg);
|
|
|
+ }
|
|
|
+ .bt-refuse {
|
|
|
+ color: #999999;
|
|
|
+ border: 1px solid #999999;
|
|
|
+ }
|
|
|
.top {
|
|
|
- padding: 20px;
|
|
|
+ padding: 10px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
@@ -722,32 +677,26 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.shop-content {
|
|
|
- padding: 20px 0;
|
|
|
- margin: 0 20px;
|
|
|
+ padding: 10px 0;
|
|
|
+ margin: 0 10px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
border-top: 1px solid #ebebeb;
|
|
|
.info {
|
|
|
+ width: 100%;
|
|
|
font-size: 14px;
|
|
|
font-weight: 500;
|
|
|
line-height: 20px;
|
|
|
color: #333333;
|
|
|
.balance {
|
|
|
- margin: 10px 0;
|
|
|
+ margin: 5px 0;
|
|
|
+ }
|
|
|
+ .refuse {
|
|
|
+ width: 100%;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
- }
|
|
|
- .status {
|
|
|
- padding: 0 5px;
|
|
|
- font-size: 14px;
|
|
|
- height: 20px;
|
|
|
- line-height: 20px;
|
|
|
- color: #007aff;
|
|
|
- border: 1px solid #007aff;
|
|
|
- transform: rotate(-20deg);
|
|
|
- }
|
|
|
- .refuse {
|
|
|
- color: #999999;
|
|
|
- border: 1px solid #999999;
|
|
|
}
|
|
|
}
|
|
|
.but {
|
|
@@ -755,15 +704,19 @@ export default {
|
|
|
left: 0;
|
|
|
bottom: 0;
|
|
|
width: 100%;
|
|
|
- height: 30px;
|
|
|
- line-height: 30px;
|
|
|
- text-align: center;
|
|
|
- color: #ffffff;
|
|
|
- background: #fc7200;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- .unbind {
|
|
|
- background: rgba(252, 114, 0, 0.6);
|
|
|
+
|
|
|
+ .but-con {
|
|
|
+ width: 100%;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
+ text-align: center;
|
|
|
+ color: #ffffff;
|
|
|
+ background: #fc7200;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .unbind {
|
|
|
+ background: rgba(252, 114, 0, 0.6);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|