From e0f0987ea6e4edd40cbc5c8c14a2ce904c7bcd7b Mon Sep 17 00:00:00 2001
From: "DESKTOP-GMUNQ1B\\k" <1154079537@qq.com>
Date: Thu, 21 Mar 2024 14:42:09 +0800
Subject: [PATCH] 1
---
api/admin.js | 12 ++-
pages/admin/orderList/index.vue | 106 +++++++++++++++-----
pages/product/shop_type_change/index.vue | 2 +-
pages/product/shop_type_change/list.vue | 47 ++++++---
pages/product/shop_type_change/progress.vue | 47 +++++----
5 files changed, 154 insertions(+), 60 deletions(-)
diff --git a/api/admin.js b/api/admin.js
index 4b39f58..ed0e588 100644
--- a/api/admin.js
+++ b/api/admin.js
@@ -9,6 +9,14 @@
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
+/**
+ * 设置自提人姓名 电话
+ * @returns {*}
+ */
+export function delivery(data) {
+ return request.post(`admin/${data.mer_id}/delivery/${data.delivery_id}`, data);
+}
+
/**
* 统计数据
*/
@@ -377,8 +385,8 @@ export function couponReceive(data) {
*/
export function couponRefuse(data) {
return request.post(`server/${data.mer_id}/subsidyRefuse/${data.id}`, {
- reason: data.reason
- }, {
+ reason: data.reason
+ }, {
login: true
});
}
\ No newline at end of file
diff --git a/pages/admin/orderList/index.vue b/pages/admin/orderList/index.vue
index a018b6e..ccc173d 100644
--- a/pages/admin/orderList/index.vue
+++ b/pages/admin/orderList/index.vue
@@ -214,44 +214,50 @@
-
-
+
送货人姓名
-
+
送货人电话
-
+
备注
-
+
取消
- 确认
+ 确认
-
+
+
+
+
@@ -278,7 +284,8 @@
refundOrderReceive,
setRefundMark,
postconfirm,
- logisticsCode
+ logisticsCode,
+ delivery
} from "@/api/admin";
import Loading from '@/components/Loading/index'
@@ -286,6 +293,9 @@
import {
isMoney
} from '@/utils/validate.js'
+ import {
+ Toast
+ } from "../../../libs/uniApi";
export default {
name: "AdminOrderList",
components: {
@@ -294,6 +304,13 @@
},
data() {
return {
+ // 去发货
+ deliveryForm: {
+ delivery_name: '',
+ delivery_id: '',
+ delivery_type: 2,
+ mer_id: ''
+ },
showBar: false,
current: "",
change: false,
@@ -382,8 +399,6 @@
},
// 获取数据
getIndex() {
-
-
let that = this;
// console.log(that.merId)
if (that.loading || that.loaded) return;
@@ -512,19 +527,54 @@
})
},
- //收件码
- toPostagequ(item) {
- this.popUpShow = true
- logisticsCode(item.order_id).then(res => {
-
- if (res.status == 200) {
- this.payCodeUrl = res.data.qrcode
- }
+ // 保存送货人电话 姓名
+ handleSubmitDelivery(item) {
+ if (!this.deliveryForm.delivery_name) return this.$util.Tips({
+ title: "请输入送货人姓名!"
})
+ if (!uni.$u.test.mobile(this.deliveryForm.delivery_id)) {
+ return uni.showToast({
+ title: "手机号输入有误!",
+ icon: "none"
+ });
+ }
+ let that = this;
+ delivery(this.deliveryForm).then(res => {
+ if (res.status == 200) {
+ this.$util.Tips({
+ title: '设置收货人成功!'
+ })
+ setTimeout(() => {
+ that.popUpShow = false;
+ }, 1000)
+ }
+ }).catch((err) => {
+ that.$util.Tips({
+ title: err
+ })
+ setTimeout(() => {
+ that.popUpShow = false;
+ }, 1500)
+ })
+ },
+ //收件码
+ toPostagequ(item) {
+ this.deliveryForm.mer_id = item.mer_id;
+ this.popUpShow = true;
+ this.deliveryForm.delivery_name = '';
+ this.deliveryForm.delivery_id = '';
+ // this.shipment.delivery_name = this.shipment.to_name
+ // this.shipment.delivery_id = this.shipment.to_phone
+ // logisticsCode(item.order_id).then(res => {
+
+ // if (res.status == 200) {
+ // this.payCodeUrl = res.data.qrcode
+ // }
+ // })
},
toPostage(item) {
@@ -631,7 +681,11 @@