shish 6 жил өмнө
parent
commit
d013651860

+ 79 - 0
shop/src/views/member/coupon.vue

@@ -0,0 +1,79 @@
+<template>
+	<div class="app-content setting-coupon-wrap">
+		<el-form :model="form" :rules="rules" ref="form" label-width="140px" class="demo-form">
+			<el-form-item label="开启状态" prop="name">
+				<el-switch v-model="form.switch" active-value="1" inactive-value="0"></el-switch>
+			</el-form-item>
+			<el-form-item label="新人注册会员送" prop="name">
+				<div class="flex-center flex-wrap">
+					<el-input v-model="form.amount" style="width:60px"></el-input>
+					<div class="prompt-text">元优惠券,满</div>
+					<el-input v-model="form.miniCost" style="width:60px"></el-input>
+					<div class="prompt-text">元可用,领取后</div>
+					<el-input v-model="form.duration" style="width:60px"></el-input>
+					<div class="prompt-text">天内有效。</div>
+				</div>
+			</el-form-item>
+			<el-form-item>
+				<!-- <el-button @click="resetForm('form')">重置</el-button> -->
+				<el-button type="primary" @click="submitForm('form')">保存</el-button>
+			</el-form-item>
+		</el-form>
+	</div>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			form: {
+				switch: 1,
+				amount: 0,
+				miniCost: 0,
+				duration: 0
+			},
+			rules: {}
+		};
+	},
+	mounted() {
+		this.init();
+	},
+	methods: {
+		init() {
+			this.$service.coupon.assetDet().then(res => {
+				if (this.$util.isEmpty(res)) return;
+				Object.keys(this.form).forEach((i, index) => {
+					this.form[i] = res[i];
+				});
+			});
+		},
+		_updateFn() {
+			this.$service.coupon.assetUpdate(this.form).then(res => {
+				this.$store.dispatch('shopInfo');
+				this.$message.success('更新成功!');
+			});
+		},
+		submitForm(formName) {
+			this.$refs[formName].validate(valid => {
+				if (valid) {
+					this._updateFn();
+				} else {
+					console.log('error submit!!');
+					return false;
+				}
+			});
+		},
+		resetForm(formName) {
+			this.$refs[formName].resetFields();
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.setting-coupon-wrap {
+	.prompt-text {
+		margin: 0 10px;
+	}
+}
+</style>

+ 265 - 226
store/src/admin/home/order.vue

@@ -1,245 +1,284 @@
 <template>
-	<div class="app-main app-content">
-		<app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" :height="100" @change="change" itemWidth="20%" />
-		<div class="list-wrap">
-			<block v-if="!$util.isEmpty(list.data)">
-				<div class="list" v-for="(item, index) in list.data" :key="index" @click="pageTo({
+  <div class="app-main app-content">
+    <app-tabs
+      :tabs="tabs"
+      :isFixed="true"
+      :currentTab="tabIndex"
+      :height="100"
+      @change="change"
+      itemWidth="20%"
+    />
+    <div class="list-wrap">
+      <block v-if="!$util.isEmpty(list.data)">
+        <div
+          class="list"
+          v-for="(item, index) in list.data"
+          :key="index"
+          @click="pageTo({
 					url: '/admin/order/detail',
 					query: {
 						id: item.id
 					}
-				})">
-					<div class="list-top flex-center-between">
-						<div class="app-color-3">编号:{{ item.sendNum }}</div>
-						<div class="app-price">{{ item.status | constantfilter('ORDER_STATUS') }}</div>
-					</div>
-					<div class="list-blo">
-						<block v-if="!$util.isEmpty(item.goodsInfoList)">
-							<list-module v-for="(items, subIndex) in item.goodsInfoList" :key="subIndex" :info="items" />
-						</block>
-					</div>
-					<div class="list-bottom">
-						<div>
-							<span class="freight-text">运费:¥{{ item.sendCost }}</span>
-							<span>应付金额:</span>
-							<span class="app-size-30 app-bold">¥{{ item.actPrice }}</span>
-						</div>
+				})"
+        >
+          <div class="list-top flex-center-between">
+            <div class="app-color-3">编号:{{ item.sendNum }}</div>
+            <div :class="['app-price',{'app-green':item.status==5}]" >{{ item.status | constantfilter('ORDER_STATUS') }}</div>
+          </div>
+          <div class="list-blo">
+            <block v-if="!$util.isEmpty(item.goodsInfoList)">
+              <list-module
+                v-for="(items, subIndex) in item.goodsInfoList"
+                :key="subIndex"
+                :info="items"
+              />
+            </block>
+          </div>
+          <div class="list-bottom">
+            <div>
+              <span class="freight-text">运费:¥{{ item.sendCost }}</span>
+              <span>应付金额:</span>
+              <span class="app-size-30 app-bold">¥{{ item.actPrice }}</span>
+            </div>
 
-<div class="list-button">
+            <div class="list-button">
+              <template v-if="item.status == 0">
+                <div class="admin-button-com default" @click.stop>自取</div>
+                <div class="admin-button-com default" @click.stop>发货</div>
+              </template>
+              <template v-else-if="item.status == 4"></template>
+			  <template v-else-if="item.status == 6">
+                <div
+                  v-if="item.sendType == 3"
+                  class="admin-button-com default"
+                  style="color: #dddddd;border-color:#dddddd;"
+                >已退款</div>
+			  </template>
+              <template v-else-if="item.status == 5">
 
-				<template v-if="item.status == 0">
-					<div class="admin-button-com default" @click.stop="">自取</div>
-					<div class="admin-button-com default" @click.stop="">发货</div>
-				</template>
-                <template v-else-if="item.status == 4">
+                <div
+                  v-if="item.sendType != 1"
+                  class="admin-button-com default"
+                  @click.stop="seeSendFn(item)"
+                  
+                >配送详情</div>
+              </template>
+              <template v-else>
+                <template v-if="item.currentFlow == 1">
+                  <div class="admin-button-com" @click.stop="freeShippingFn(item, index)">自取</div>
+                  <div
+                    class="admin-button-com"
+                    @click.stop="pageTo({url: '/admin/order/ship',query: {id: item.id,pageStatus: 0}})"
+                  >发货</div>
                 </template>
-				<template v-else-if="['5','6'].indexOf(item.status) != -1">
-				    <div v-if="item.sendType == 3" class="admin-button-com default" style="color: #dddddd;border-color:#dddddd;">已自取</div>
-				    <div v-else class="admin-button-com default" @click.stop="seeSendFn(item)" style="color: #dddddd;border-color:#dddddd;">已送达</div>
-				</template>
-				<template v-else>
-                    <template v-if="item.currentFlow == 1">
-							<div class="admin-button-com" @click.stop="freeShippingFn(item, index)">自取</div>
-							<div class="admin-button-com" @click.stop="pageTo({url: '/admin/order/ship',query: {id: item.id,pageStatus: 0}})">发货</div>
-					</template>
-                    <template v-else>
-                        <div class="admin-button-com" @click.stop="pageTo({url: '/admin/order/ship',query: {id: item.id,pageStatus: 0}})">发货</div>
-                    </template>
-				</template>
-
-</div>
-
-
-
-					</div>
-				</div>
-			</block>
-			<block v-else>
-				<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
-			</block>
-		</div>
-		<!-- 免发货弹窗 -->
-		<modal-module :show="freeShipModal" @cancel="modalCancel" @click="freeShipModalClick" content="确认已自取?" color="#333" :size="32" padding="30rpx 30rpx"></modal-module>
-	</div>
+                <template v-else>
+                  <div
+                    class="admin-button-com"
+                    @click.stop="pageTo({url: '/admin/order/ship',query: {id: item.id,pageStatus: 0}})"
+                  >发货</div>
+                </template>
+              </template>
+            </div>
+          </div>
+        </div>
+      </block>
+      <block v-else>
+        <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+      </block>
+    </div>
+    <!-- 免发货弹窗 -->
+    <modal-module
+      :show="freeShipModal"
+      @cancel="modalCancel"
+      @click="freeShipModalClick"
+      content="确认已自取?"
+      color="#333"
+      :size="32"
+      padding="30rpx 30rpx"
+    ></modal-module>
+  </div>
 </template>
 
 <script>
-	import AppTabs from '@/components/plugin/tabs'
-	import ListModule from '@/components/module/app-order-list'
-	import AppWrapperEmpty from '@/components/app-wrapper-empty'
-	import ModalModule from '@/components/plugin/modal'
-	import { list } from '@/mixins'
-	// api
-	import { getListB, freeShipping } from '@/api/order'
-	export default {
-		name: 'order-list',
-		components: {
-			ListModule,
-			AppTabs,
-			AppWrapperEmpty,
-			ModalModule
-		},
-		mixins: [list],
-		data() {
-			return {
-				tabIndex: 0,
-				tabs: [
-					{
-						name: '全部',
-						value: 0
-					},
-					{
-						name: '待付款',
-						value: 0
-					},
-					{
-						name: '待配送',
-						value: 0
-					},
-					{
-						name: '配送中',
-						value: 0
-					},
-					{
-						name: '已完结',
-						value: 0
-					}
-				],
-				// operate
-				operateIndex: null,
-				operateData: {},
-				// 免发货
-				freeShipModal: false
-			}
-		},
-		onPullDownRefresh() {
-			this.resetList()
-			this._list().then(res => {
-				uni.stopPullDownRefresh()
-			})
-		},
-		onReachBottom() {
-			if (!this.list.finished) {
-				this._list().then(res => {
-					uni.stopPullDownRefresh()
-				})
-			} else {
-				uni.stopPullDownRefresh()
-			}
-		},
-		onLoad: function() {
-			// this.init()
-		},
-		onShow() {
-			let tabIndex = uni.getStorageSync('switchTabQuery') || null
-			console.log('tabIndex', tabIndex)
-			if (tabIndex) {
-				uni.removeStorageSync('switchTabQuery')
-				this.tabIndex = parseInt(tabIndex.tabIndex)
-			}
-			this._list()
-		},
-		methods: {
-			// async init() {},
-			_list() {
-				let status = JSON.parse(JSON.stringify(this.tabIndex))
-				status = status == 4 ? 5 : status - 1
-				return getListB({
-					status: status,
-					search: '',
-					page: this.list.page
-				}).then(res => {
-					this.completes(res)
-					if (this.$util.isEmpty(res.data)) return false
-					this.tabs[0].value = res.data.asset.totalOrder
-					this.tabs[1].value = res.data.asset.unPayOrder
-					this.tabs[2].value = res.data.asset.unSendOrder
-					this.tabs[3].value = res.data.asset.sendingOrder
-					this.tabs[4].value = res.data.asset.finishOrder
-				})
-			},
-			change(e) {
-				if (this.tabIndex == e.index) {
-					return false
-				} else {
-					this.tabIndex = e.index
-					this.resetList()
-					this._list()
-				}
-			},
-			// 免发货
-			freeShippingFn(item, index) {
-				this.operateIndex = index
-				this.operateData = item
-				this.freeShipModal = true
-			},
-			// 免发货
-			freeShipModalClick(e) {
-				if (e.index === 0) {
-					this.modalCancel()
-				} else {
-					// this.list.data[this.operateIndex].status = 2
-					this.$set(this.list.data[this.operateIndex], 'status', 2)
-					freeShipping({ id: this.list.data[this.operateIndex].id }).then(res => {
-						this.$msg('操作成功!')
-						this.modalCancel()
-					})
-				}
-			},
-			// 查看配送
-			seeSendFn(item) {
-				this.$util.pageTo({
-					url: '/admin/order/ship',
-					query: {
-						id: item.id,
-						pageStatus: 5
-					}
-				})
-			},
-			// 关闭弹窗
-			modalCancel() {
-				this.freeShipModal = false
-			}
-		}
-	}
+import AppTabs from "@/components/plugin/tabs";
+import ListModule from "@/components/module/app-order-list";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import ModalModule from "@/components/plugin/modal";
+import { list } from "@/mixins";
+// api
+import { getListB, freeShipping } from "@/api/order";
+export default {
+  name: "order-list",
+  components: {
+    ListModule,
+    AppTabs,
+    AppWrapperEmpty,
+    ModalModule
+  },
+  mixins: [list],
+  data() {
+    return {
+      tabIndex: 0,
+      tabs: [
+        {
+          name: "全部",
+          value: 0
+        },
+        {
+          name: "待付款",
+          value: 0
+        },
+        {
+          name: "待配送",
+          value: 0
+        },
+        {
+          name: "配送中",
+          value: 0
+        },
+        {
+          name: "已完结",
+          value: 0
+        }
+      ],
+      // operate
+      operateIndex: null,
+      operateData: {},
+      // 免发货
+      freeShipModal: false
+    };
+  },
+  onPullDownRefresh() {
+    this.resetList();
+    this._list().then(res => {
+      uni.stopPullDownRefresh();
+    });
+  },
+  onReachBottom() {
+    if (!this.list.finished) {
+      this._list().then(res => {
+        uni.stopPullDownRefresh();
+      });
+    } else {
+      uni.stopPullDownRefresh();
+    }
+  },
+  onLoad: function() {
+    // this.init()
+  },
+  onShow() {
+    let tabIndex = uni.getStorageSync("switchTabQuery") || null;
+    console.log("tabIndex", tabIndex);
+    if (tabIndex) {
+      uni.removeStorageSync("switchTabQuery");
+      this.tabIndex = parseInt(tabIndex.tabIndex);
+    }
+    this._list();
+  },
+  methods: {
+    // async init() {},
+    _list() {
+      let status = JSON.parse(JSON.stringify(this.tabIndex));
+      status = status == 4 ? 5 : status - 1;
+      return getListB({
+        status: status,
+        search: "",
+        page: this.list.page
+      }).then(res => {
+        this.completes(res);
+        if (this.$util.isEmpty(res.data)) return false;
+        this.tabs[0].value = res.data.asset.totalOrder;
+        this.tabs[1].value = res.data.asset.unPayOrder;
+        this.tabs[2].value = res.data.asset.unSendOrder;
+        this.tabs[3].value = res.data.asset.sendingOrder;
+        this.tabs[4].value = res.data.asset.finishOrder;
+      });
+    },
+    change(e) {
+      if (this.tabIndex == e.index) {
+        return false;
+      } else {
+        this.tabIndex = e.index;
+        this.resetList();
+        this._list();
+      }
+    },
+    // 免发货
+    freeShippingFn(item, index) {
+      this.operateIndex = index;
+      this.operateData = item;
+      this.freeShipModal = true;
+    },
+    // 免发货
+    freeShipModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+		this.$set(this.list.data[this.operateIndex], "status", 5);
+		this.$set(this.list.data[this.operateIndex], "sendType", 1);
+        freeShipping({ id: this.list.data[this.operateIndex].id }).then(res => {
+          this.$msg("操作成功!");
+          this.modalCancel();
+        });
+      }
+    },
+    // 查看配送
+    seeSendFn(item) {
+      this.$util.pageTo({
+        url: "/admin/order/ship",
+        query: {
+          id: item.id,
+          pageStatus: 5
+        }
+      });
+    },
+    // 关闭弹窗
+    modalCancel() {
+      this.freeShipModal = false;
+    }
+  }
+};
 </script>
 
 <style lang="scss" scoped>
 </style>
 
 <style lang="scss" scoped>
-	.app-content {
-		padding-top: 120px;
-		padding-bottom: 1px;
-		.list-wrap {
-			.list {
-				padding: 0 30px;
-				background-color: #fff;
-				margin-bottom: 20px;
-				.list-top,
-				.list-bottom {
-					padding: 26px 0;
-					border-bottom: 1px solid $borderColor;
-					color: $fontColor3;
-					.app-bold {
-						color: #333;
-					}
-					.freight-text {
-						margin-right: 60px;
-					}
-				}
-				.list-bottom {
-					& > div {
-						@include disFlex(center, flex-end);
-					}
-					.list-button {
-						margin-top: 26px;
-						.admin-button-com {
-							margin-left: 20px;
-						}
-					}
-				}
-			}
+.app-content {
+  padding-top: 120px;
+  padding-bottom: 1px;
+  .list-wrap {
+    .list {
+      padding: 0 30px;
+      background-color: #fff;
+      margin-bottom: 20px;
+      .list-top,
+      .list-bottom {
+        padding: 26px 0;
+        border-bottom: 1px solid $borderColor;
+        color: $fontColor3;
+        .app-bold {
+          color: #333;
+        }
+        .freight-text {
+          margin-right: 60px;
+        }
+		.app-green{
+			color:green;
 		}
-	}
+      }
+      .list-bottom {
+        & > div {
+          @include disFlex(center, flex-end);
+        }
+        .list-button {
+          margin-top: 26px;
+          .admin-button-com {
+            margin-left: 20px;
+          }
+        }
+      }
+    }
+  }
+}
 </style>

+ 372 - 341
store/src/admin/order/detail.vue

@@ -1,66 +1,70 @@
 <template>
-	<div class="app-content">
-		<div class="page-top">
-			<div class="page-top-img">
-				<img :src="`${constant.imgUrl}/retail/order/bg.png`" alt />
-			</div>
-			<div class="page-top-det">
-				<div>
-					<div class="page-status">{{ data.status | constantfilter('ORDER_STATUS') }}</div>
-					<!-- <div class="page-prompt">请尽快支付哟~</div> -->
-				</div>
-				<div class="page-status-img">
-					<img :src="data.status == 0 ? waitPayImg : waitDeliveryImg" alt />
-				</div>
-			</div>
-		</div>
-		<!-- 订单详情 -->
-		<div class="page-det">
-			<!-- 商品信息 -->
-			<div class="module-com">
-				<div class="module-tit">商品信息</div>
-				<div class="module-det">
-					<block v-if="!$util.isEmpty(data.goodsInfoList)">
-						<list-module v-for="(items, subIndex) in data.goodsInfoList" :key="subIndex" :info="items" />
-					</block>
-				</div>
-			</div>
-			<!-- 订单信息 -->
-			<div class="module-com order-msg">
-				<div class="module-tit">订单信息</div>
-				<div class="module-det">
-					<!--  -->
-					<div class="order-msg-blo">
-						<div class="msg-list">
-							<div class="label">收花人</div>
-							<div class="value">{{ data.receiveUserName }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">电话</div>
-							<div class="value">{{ data.receiveMobile }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">地址</div>
-							<div class="value">{{ data.receiveFullAddress }}</div>
-						</div>
-					</div>
-					<!--  -->
-					<div class="order-msg-blo">
-						<div class="msg-list">
-							<div class="label">送达时间</div>
-							<div class="value">{{ data.reachDate || '暂无' }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">贺卡</div>
-							<div class="value">{{ data.needCard == 1 ? "需要" : '不需要' }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">祝福语</div>
-							<div class="value">{{ data.cardInfo || '暂无' }}</div>
-						</div>
-					</div>
-					<!--  -->
-					<!-- <div class="order-msg-blo">
+  <div class="app-content">
+    <div class="page-top">
+      <div class="page-top-img">
+        <img :src="`${constant.imgUrl}/retail/order/bg.png`" alt />
+      </div>
+      <div class="page-top-det">
+        <div>
+          <div class="page-status">{{ data.status | constantfilter('ORDER_STATUS') }}</div>
+          <!-- <div class="page-prompt">请尽快支付哟~</div> -->
+        </div>
+        <div class="page-status-img">
+          <img :src="data.status == 0 ? waitPayImg : waitDeliveryImg" alt />
+        </div>
+      </div>
+    </div>
+    <!-- 订单详情 -->
+    <div class="page-det">
+      <!-- 商品信息 -->
+      <div class="module-com">
+        <div class="module-tit">商品信息</div>
+        <div class="module-det">
+          <block v-if="!$util.isEmpty(data.goodsInfoList)">
+            <list-module
+              v-for="(items, subIndex) in data.goodsInfoList"
+              :key="subIndex"
+              :info="items"
+            />
+          </block>
+        </div>
+      </div>
+      <!-- 订单信息 -->
+      <div class="module-com order-msg">
+        <div class="module-tit">订单信息</div>
+        <div class="module-det">
+          <!--  -->
+          <div class="order-msg-blo">
+            <div class="msg-list">
+              <div class="label">收花人</div>
+              <div class="value">{{ data.receiveUserName }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">电话</div>
+              <div class="value">{{ data.receiveMobile }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">地址</div>
+              <div class="value">{{ data.receiveFullAddress }}</div>
+            </div>
+          </div>
+          <!--  -->
+          <div class="order-msg-blo">
+            <div class="msg-list">
+              <div class="label">送达时间</div>
+              <div class="value">{{ data.reachDate || '暂无' }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">贺卡</div>
+              <div class="value">{{ data.needCard == 1 ? "需要" : '不需要' }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">祝福语</div>
+              <div class="value">{{ data.cardInfo || '暂无' }}</div>
+            </div>
+          </div>
+          <!--  -->
+          <!-- <div class="order-msg-blo">
 						<div class="msg-list">
 							<div class="label">订花人</div>
 							<div class="value">{{ data.bookName }}</div>
@@ -73,298 +77,325 @@
 							<div class="label">手机</div>
 							<div class="value">{{ data.bookMobile }}</div>
 						</div>
-					</div>-->
-					<!--  -->
-					<div class="order-msg-blo">
-						<div class="msg-list">
-							<div class="label">客户评分</div>
-							<div class="value">
-								<!-- <span>{{ data.totalFlow }}</span> -->
-								<rate-module :current="Number(data.totalFlow) || 0" :disabled="true"></rate-module>
-							</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">客户留言</div>
-							<div class="value">{{ data.evaluate || '暂无' }}</div>
-						</div>
-					</div>
-					<!--  -->
-					<div class="order-msg-blo">
-						<div class="msg-list">
-							<div class="label">订单号</div>
-							<div class="value">{{ data.orderSn }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">时间</div>
-							<div class="value">{{ data.addTime | formatTime }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">总价</div>
-							<div class="value">¥{{ data.prePrice }}</div>
-						</div>
-						<div class="msg-list">
-							<div class="label">运费</div>
-							<div class="value">¥{{ data.sendCost }}</div>
-						</div>
-					</div>
-				</div>
-			</div>
-			<!-- 优惠信息 -->
-			<div class="module-com coupon-wrap" v-if="data.discountAmount && data.discountAmount != '0.00'">
-				<div class="module-det flex-center-between">
-					<div class="app-color-3">{{ data.discountType == 0 ? '使用优惠券' : data.discountType == 1 ? '会员打折' : '付款随机优惠' }}</div>
-					<div class="app-price">-¥{{ data.discountAmount }}</div>
-				</div>
-			</div>
-		</div>
-		<!-- 按钮 -->
-		<div class="page-btn app-footer">
-			<div class="flex-center">
-				<span>应付款</span>
-				<span class="app-price">
-					<span>¥</span>
-					<span class="app-size-40">{{ data.prePrice }}</span>
-				</span>
-			</div>
-			<template>
-			    <!--
+          </div>-->
+          <!--  -->
+          <div class="order-msg-blo">
+            <div class="msg-list">
+              <div class="label">客户评分</div>
+              <div class="value">
+                <!-- <span>{{ data.totalFlow }}</span> -->
+                <rate-module :current="Number(data.totalFlow) || 0" :disabled="true"></rate-module>
+              </div>
+            </div>
+            <div class="msg-list">
+              <div class="label">客户留言</div>
+              <div class="value">{{ data.evaluate || '暂无' }}</div>
+            </div>
+          </div>
+          <!--  -->
+          <div class="order-msg-blo">
+            <div class="msg-list">
+              <div class="label">订单号</div>
+              <div class="value">{{ data.orderSn }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">时间</div>
+              <div class="value">{{ data.addTime | formatTime }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">总价</div>
+              <div class="value">¥{{ data.prePrice }}</div>
+            </div>
+            <div class="msg-list">
+              <div class="label">运费</div>
+              <div class="value">¥{{ data.sendCost }}</div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <!-- 优惠信息 -->
+      <div
+        class="module-com coupon-wrap"
+        v-if="data.discountAmount && data.discountAmount != '0.00'"
+      >
+        <div class="module-det flex-center-between">
+          <div
+            class="app-color-3"
+          >{{ data.discountType == 0 ? '使用优惠券' : data.discountType == 1 ? '会员打折' : '付款随机优惠' }}</div>
+          <div class="app-price">-¥{{ data.discountAmount }}</div>
+        </div>
+      </div>
+    </div>
+    <!-- 按钮 -->
+    <div class="page-btn app-footer">
+      <div class="flex-center">
+        <span>应付款</span>
+        <span class="app-price">
+          <span>¥</span>
+          <span class="app-size-40">{{ data.prePrice }}</span>
+        </span>
+      </div>
+      <template>
+        <!--
 				<button class="admin-button-com middle" @click="updatePriceFn">修改价格</button>
-				-->
-			</template>
-			<template>
-				<div class="operate-btn-wrap">
-				    <block v-if="data.status == 0">
-				        <button class="admin-button-com middle" style="color: #666666;border-color: #dddddd;">自取</button>
-                        <button class="admin-button-com middle" style="color: #666666;border-color: #dddddd;">发货</button>
-				    </block>
-				    <block v-else-if="data.status == 4">
-				    </block>
-					<block v-else-if="['5','6'].indexOf(data.status) != -1">
-
-					    <button v-if="data.sendType == 3" class="admin-button-com middle" style="color: #dddddd;border-color:#dddddd;">已自取</button>
-						<button v-else class="admin-button-com middle" @click="seeSendFn">已送达</button>
-
-					</block>
-					<block v-else>
-						<button class="admin-button-com middle" @click.stop="freeShippingFn">自取</button>
-						<button class="admin-button-com middle" @click.stop="pageTo({
+        -->
+      </template>
+      <template>
+        <div class="operate-btn-wrap">
+          <block v-if="data.status == 0">
+            <button class="admin-button-com middle" style="color: #666666;border-color: #dddddd;">自取</button>
+            <button class="admin-button-com middle" style="color: #666666;border-color: #dddddd;">发货</button>
+          </block>
+          <block v-else-if="data.status == 4"></block>
+          <block v-else-if="data.status == 6"></block>
+          <block v-else-if="data.status == 5">
+            <button v-if="data.sendType != 1" class="admin-button-com default" @click="seeSendFn">配送详情</button>
+          </block>
+          <block v-else>
+            <button class="admin-button-com middle" @click.stop="freeShippingFn">自取</button>
+            <button
+              class="admin-button-com middle"
+              @click.stop="pageTo({
 						url: '/admin/order/ship',
 						query: {
 							id: data.id,
 							pageStatus: 0
 						}
-					})">发货</button>
-					</block>
-				</div>
-			</template>
-			<!-- <template v-if="data.status == 5">
+					})"
+            >发货</button>
+          </block>
+        </div>
+      </template>
+      <!-- <template v-if="data.status == 5">
 				<button class="admin-button-com middle">退款</button>
-			</template>-->
-		</div>
-		<!-- 修改价格 -->
-		<modal-module :show="updatePriceModal" @cancel="modalCancel" @click="updateModalClick" title="修改价格" padding="30rpx 30rpx">
-			<template v-slot:content>
-				<div class="app-modal-input-wrap">
-					<div class="inp-list-line required">
-						<!-- <div class="line-label">角色名称</div> -->
-						<div class="line-input">
-							<input v-model="form.price" type="text" :adjust-position="false" class="inp-input" placeholder="请输入价格" />
-						</div>
-					</div>
-				</div>
-			</template>
-		</modal-module>
-		<!-- 免发货弹窗 -->
-		<modal-module :show="freeShipModal" @cancel="modalCancel" @click="freeShipModalClick" content="确认客户已自取?" color="#333" :size="32" padding="30rpx 30rpx"></modal-module>
-	</div>
+      </template>-->
+    </div>
+    <!-- 修改价格 -->
+    <modal-module
+      :show="updatePriceModal"
+      @cancel="modalCancel"
+      @click="updateModalClick"
+      title="修改价格"
+      padding="30rpx 30rpx"
+    >
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+          <div class="inp-list-line required">
+            <!-- <div class="line-label">角色名称</div> -->
+            <div class="line-input">
+              <input
+                v-model="form.price"
+                type="text"
+                :adjust-position="false"
+                class="inp-input"
+                placeholder="请输入价格"
+              />
+            </div>
+          </div>
+        </div>
+      </template>
+    </modal-module>
+    <!-- 免发货弹窗 -->
+    <modal-module
+      :show="freeShipModal"
+      @cancel="modalCancel"
+      @click="freeShipModalClick"
+      content="确认客户已自取?"
+      color="#333"
+      :size="32"
+      padding="30rpx 30rpx"
+    ></modal-module>
+  </div>
 </template>
 
 <script>
-import ListModule from '@/components/module/app-order-list'
-import AppCoupon from '@/components/app-coupon-sel'
-import ModalModule from '@/components/plugin/modal'
-import RateModule from '@/components/plugin/rate'
+import ListModule from "@/components/module/app-order-list";
+import AppCoupon from "@/components/app-coupon-sel";
+import ModalModule from "@/components/plugin/modal";
+import RateModule from "@/components/plugin/rate";
 // api
-import { getDetB, freeShipping, orderUpdatePrice } from '@/api/order'
+import { getDetB, freeShipping, orderUpdatePrice } from "@/api/order";
 export default {
-	name: 'order-detail',
-	components: {
-		ListModule,
-		AppCoupon,
-		ModalModule,
-		RateModule
-	},
-	data() {
-		return {
-			constant: this.$constant,
-			// img
-			waitPayImg: `${this.$constant.imgUrl}/retail/order/wait-pay.png`,
-			waitDeliveryImg: `${this.$constant.imgUrl}/retail/order/wait-delivery.png`,
-			data: {},
-			// 修改价格
-			updatePriceModal: false,
-			form: {
-				price: ''
-			},
-			// 免发货
-			freeShipModal: false
-		}
-	},
-	onLoad() {
-		// this.init()
-	},
-	methods: {
-		init() {
-			this._getDet()
-		},
-		_getDet() {
-			return getDetB({ id: this.option.id }).then(res => {
-				this.data = res.data
-			})
-		},
-		// 免发货
-		freeShippingFn() {
-			this.freeShipModal = true
-		},
-		// 免发货
-		freeShipModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				this.data.status = 2
-				freeShipping({ id: this.data.id }).then(res => {
-					this.$msg('操作成功!')
-					this.modalCancel()
-				})
-			}
-		},
-		// 查看配送
-		seeSendFn() {
-			this.$util.pageTo({
-				url: '/admin/order/ship',
-				query: {
-					id: this.data.id,
-					pageStatus: 5
-				}
-			})
-		},
-		// 修改价格
-		updatePriceFn() {
-			this.form.price = this.data.prePrice
-			this.updatePriceModal = true
-		},
-		updateModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				orderUpdatePrice({ id: this.data.id, price: this.form.price }).then(res => {
-					this.modalCancel()
-					this.$msg('修改成功!')
-					setTimeout(() => {
-						this._getDet()
-					}, 1000)
-				})
-			}
-		},
-		// 关闭弹窗
-		modalCancel() {
-			this.form.price = ''
-			this.freeShipModal = false
-			this.updatePriceModal = false
-		}
-	}
-}
+  name: "order-detail",
+  components: {
+    ListModule,
+    AppCoupon,
+    ModalModule,
+    RateModule
+  },
+  data() {
+    return {
+      constant: this.$constant,
+      // img
+      waitPayImg: `${this.$constant.imgUrl}/retail/order/wait-pay.png`,
+      waitDeliveryImg: `${this.$constant.imgUrl}/retail/order/wait-delivery.png`,
+      data: {},
+      // 修改价格
+      updatePriceModal: false,
+      form: {
+        price: ""
+      },
+      // 免发货
+      freeShipModal: false
+    };
+  },
+  onLoad() {
+    // this.init()
+  },
+  methods: {
+    init() {
+      this._getDet();
+    },
+    _getDet() {
+      return getDetB({ id: this.option.id }).then(res => {
+        this.data = res.data;
+      });
+    },
+    // 免发货
+    freeShippingFn() {
+      this.freeShipModal = true;
+    },
+    // 免发货
+    freeShipModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        this.data.status = 2;
+        freeShipping({ id: this.data.id }).then(res => {
+          this.$msg("操作成功!");
+          this.modalCancel();
+        });
+      }
+    },
+    // 查看配送
+    seeSendFn() {
+      this.$util.pageTo({
+        url: "/admin/order/ship",
+        query: {
+          id: this.data.id,
+          pageStatus: 5
+        }
+      });
+    },
+    // 修改价格
+    updatePriceFn() {
+      this.form.price = this.data.prePrice;
+      this.updatePriceModal = true;
+    },
+    updateModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        orderUpdatePrice({ id: this.data.id, price: this.form.price }).then(
+          res => {
+            this.modalCancel();
+            this.$msg("修改成功!");
+            setTimeout(() => {
+              this._getDet();
+            }, 1000);
+          }
+        );
+      }
+    },
+    // 关闭弹窗
+    modalCancel() {
+      this.form.price = "";
+      this.freeShipModal = false;
+      this.updatePriceModal = false;
+    }
+  }
+};
 </script>
 
 <style lang="scss" scoped>
-	.app-content {
-		padding-bottom: 80px;
-	}
-	.page-top {
-		position: relative;
-		.page-top-det {
-			position: absolute;
-			top: 22px;
-			@include disFlex(center, space-between);
-			width: 84%;
-			padding: 0 48px;
-			color: #fff;
-			.page-status {
-				font-size: 36px;
-				font-weight: bold;
-				margin-bottom: 16px;
-			}
-			.page-prompt {
-				color: #ffdede;
-			}
-			.page-status-img {
-				width: 180px;
-			}
-		}
-	}
-	.page-det {
-		width: 94%;
-		margin: 0 auto;
-		position: relative;
-		top: -40px;
-		.order-msg {
-			.order-msg-blo {
-				font-size: 28px;
-				padding: 20px 0;
-				border-top: 1px solid $borderColor;
-				.msg-list {
-					@include disFlex(flex-start, space-between);
-					margin: 16px 0;
-					.label {
-						width: 40%;
-						color: $fontColor3;
-					}
-				}
-			}
-			& .order-msg-blo:first-child {
-				border-top: none;
-			}
-		}
-		.coupon-wrap {
-			.module-det {
-				padding: 20px 0;
-			}
-		}
-	}
-	// 底部按钮
-	.page-btn {
-		width: calc(100% - 60px);
-		@include disFlex(center, space-between);
-		padding: 0 30px;
-		.app-price {
-			margin-bottom: 8px;
-			margin-left: 4px;
-		}
-		.red {
-			width: 270px;
-		}
-		.default {
-			width: 260px;
-		}
-		.operate-btn-wrap {
-			.admin-button-com {
-				margin-left: 30px;
-				padding: 20px 30px;
-			}
-		}
-	}
-	// 公共模块
-	.module-com {
-		border-radius: 10px;
-		background-color: #fff;
-		padding: 0 20px;
-		box-shadow: 0px 6px 16px #ddd;
-		margin-bottom: 20px;
-		.module-tit {
-			padding: 20px 0;
-			font-size: 28px;
-			font-weight: 600;
-			border-bottom: 1px solid $borderColor;
-		}
-	}
+.app-content {
+  padding-bottom: 80px;
+}
+.page-top {
+  position: relative;
+  .page-top-det {
+    position: absolute;
+    top: 22px;
+    @include disFlex(center, space-between);
+    width: 84%;
+    padding: 0 48px;
+    color: #fff;
+    .page-status {
+      font-size: 36px;
+      font-weight: bold;
+      margin-bottom: 16px;
+    }
+    .page-prompt {
+      color: #ffdede;
+    }
+    .page-status-img {
+      width: 180px;
+    }
+  }
+}
+.page-det {
+  width: 94%;
+  margin: 0 auto;
+  position: relative;
+  top: -40px;
+  .order-msg {
+    .order-msg-blo {
+      font-size: 28px;
+      padding: 20px 0;
+      border-top: 1px solid $borderColor;
+      .msg-list {
+        @include disFlex(flex-start, space-between);
+        margin: 16px 0;
+        .label {
+          width: 40%;
+          color: $fontColor3;
+        }
+      }
+    }
+    & .order-msg-blo:first-child {
+      border-top: none;
+    }
+  }
+  .coupon-wrap {
+    .module-det {
+      padding: 20px 0;
+    }
+  }
+}
+// 底部按钮
+.page-btn {
+  width: calc(100% - 60px);
+  @include disFlex(center, space-between);
+  padding: 0 30px;
+  .app-price {
+    margin-bottom: 8px;
+    margin-left: 4px;
+  }
+  .red {
+    width: 270px;
+  }
+  .default {
+    width: 260px;
+  }
+  .operate-btn-wrap {
+    .admin-button-com {
+      margin-left: 30px;
+      padding: 20px 30px;
+    }
+  }
+}
+// 公共模块
+.module-com {
+  border-radius: 10px;
+  background-color: #fff;
+  padding: 0 20px;
+  box-shadow: 0px 6px 16px #ddd;
+  margin-bottom: 20px;
+  .module-tit {
+    padding: 20px 0;
+    font-size: 28px;
+    font-weight: 600;
+    border-bottom: 1px solid $borderColor;
+  }
+}
 </style>

+ 1 - 1
store/src/filters/constant.js

@@ -77,7 +77,7 @@ const _CONST_MAP = {
 		},
 		{
 			label: '已完成',
-			value: 4
+			value: 5
 		}
 	],
 	// 配送状态