Просмотр исходного кода

订单-自取、花材管理修改请求接口

jiangfeng 5 лет назад
Родитель
Сommit
d4285dac10
2 измененных файлов с 21 добавлено и 11 удалено
  1. 19 10
      ghsApp/src/pagesOrder/detail.vue
  2. 2 1
      ghsApp/src/pagesStorehouse/flower/category.vue

+ 19 - 10
ghsApp/src/pagesOrder/detail.vue

@@ -205,16 +205,17 @@ export default {
 		this.init();
 	},
 	methods: {
-		freeShipModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel();
-			} else {
-				freeShipping({ id: this.detailInfo.id }).then(res => {
-					this.init();
-					this.$msg("操作成功!");
-					this.modalCancel();
-				});
-			}
+		freeShipModalClick() {
+			freeShipping({ id: this.detailInfo.id }).then(res => {
+				this.init();
+				this.$msg("操作成功!");
+				// this.modalCancel();
+			});
+			// if (e.index === 0) {
+			// 	this.modalCancel();
+			// } else {
+			//
+			// }
 		},
 		modalCancel() {
 			this.freeShipModal = false;
@@ -225,6 +226,14 @@ export default {
 				this.gotoSelect();
 				// 自取
 			} else if (s.type === "selfGet") {
+				let self = this;
+				uni.showModal({title: "提示",content: "确认客户已自取",confirmText: "确认",
+					success: function (res) {
+						if (res.confirm) {
+							self.freeShipModalClick();
+						}
+					},
+				});
 				this.freeShipModal = true;
 				// this.operateData = item;
 				//打印

+ 2 - 1
ghsApp/src/pagesStorehouse/flower/category.vue

@@ -58,6 +58,7 @@ import {
 	addFlowerApi,
 	deleteFlowerApi
 } from "@/api/storehouse/flower";
+import { getAllProductDataApi } from "@/api/product/index";
 import lodash from "lodash";
 
 import AppFlowerSel from "@/components/app-flower-sel";
@@ -124,7 +125,7 @@ export default {
 				page: this.list.page,
 				pageSize: this.list.pageSize
 			};
-			return getFlowerListApi(params)
+			return getAllProductDataApi(params)
 				.then(res => {
 					this.completes(res);
 				})