whx há 1 mês atrás
pai
commit
a2c662e1f7
34 ficheiros alterados com 579 adições e 491 exclusões
  1. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/index.html
  2. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/1302.7d7393ee.css
  3. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/4979.ec3bd3b4.css
  4. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/9334.0ec15984.css
  5. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1096.0ce094d6.js
  6. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1096.cbd131ac.js
  7. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/2298.d949690f.js
  8. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1682.7b294bf5.js
  9. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1682.7cf27820.js
  10. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3457.d523e6d7.js
  11. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/4028.ca3ee289.js
  12. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/4334.7af93645.js
  13. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5321.20984331.js
  14. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5321.83b3ead2.js
  15. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6554.afd51eb4.js
  16. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6802.59e702e2.js
  17. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6802.ed9d76ab.js
  18. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1953.c0727407.js
  19. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7883.830e66f7.js
  20. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8083.d0b2b40a.js
  21. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/838.a938308a.js
  22. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/892.b23da4f3.js
  23. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9073.7193eb2d.js
  24. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9124.2d34f791.js
  25. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9301.febb5307.js
  26. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9334.49da5d80.js
  27. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9341.e2636018.js
  28. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/app.30a6a9e5.js
  29. 15 4
      virgo.wzfrontend/workark/src/api/serve.js
  30. 445 445
      virgo.wzfrontend/workark/src/components/website/createOrder.vue
  31. 2 2
      virgo.wzfrontend/workark/src/components/website/payOrder.vue
  32. 11 11
      virgo.wzfrontend/workark/src/components/work/serve/list/detail.vue
  33. 5 6
      virgo.wzfrontend/workark/src/components/work/system/serveSet/processForm.vue
  34. 85 7
      virgo.wzfrontend/workark/src/components/work/system/serveSet/processSetItem.vue

Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/index.html


virgo.wzfrontend/src/main/resources/static/workark/static/css/2298.7d7393ee.css → virgo.wzfrontend/src/main/resources/static/workark/static/css/1302.7d7393ee.css


virgo.wzfrontend/src/main/resources/static/workark/static/css/1187.ec3bd3b4.css → virgo.wzfrontend/src/main/resources/static/workark/static/css/4979.ec3bd3b4.css


virgo.wzfrontend/src/main/resources/static/workark/static/css/9073.0ec15984.css → virgo.wzfrontend/src/main/resources/static/workark/static/css/9334.0ec15984.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/1096.0ce094d6.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/1096.cbd131ac.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/2298.d949690f.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/1682.7b294bf5.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/1682.7cf27820.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/3457.d523e6d7.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/4028.ca3ee289.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/4334.7af93645.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/5321.20984331.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/5321.83b3ead2.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/6554.afd51eb4.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/6802.59e702e2.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/6802.ed9d76ab.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/1953.c0727407.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/7883.2adac37e.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/7883.830e66f7.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/8083.d0b2b40a.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/838.a938308a.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/892.694f7502.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/892.b23da4f3.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/9073.7193eb2d.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/9124.2d34f791.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/9301.febb5307.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/9334.49da5d80.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/9341.e2636018.js


Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/app.30a6a9e5.js


+ 15 - 4
virgo.wzfrontend/workark/src/api/serve.js

@@ -86,12 +86,23 @@ export function countPriceAPI(productId, productCouponIds) {
  * 
  * 
  */
-export function createOreder(productId, organizationId, productCouponIds) {
+export function createOrder(productId, organizationId, productCouponIds) {
 	return request({
 		url: `/api/workarkOrderInfo/create/${productId}/${organizationId}/${productCouponIds}`,
 		method: 'get'
 	})
 }
+/* 
+ * 创建过程订单
+ * 
+ * 
+ */
+export function createProcessOrder(proceId, organizationId) {
+	return request({
+		url: `/api/workarkOrderInfo/create/proce/${proceId}/${organizationId}`,
+		method: 'get'
+	})
+}
 /* 
  * 查看订单
  * 
@@ -121,7 +132,7 @@ export function getOrderListByQueryAndSize(currPage, pageSize, data) {
  * 
  * 
  */
-export function getOrederDetail(id) {
+export function getOrderDetail(id) {
 	return request({
 		url: `/api/workarkOrderInfo/${id}`,
 		method: 'get'
@@ -132,7 +143,7 @@ export function getOrederDetail(id) {
  * 
  * 
  */
-export function getOrederDetailByOrderNo(orderNo) {
+export function getOrderDetailByOrderNo(orderNo) {
 	return request({
 		url: `/api/workarkOrderInfo/orderNo/${orderNo}`,
 		method: 'get'
@@ -183,7 +194,7 @@ export function getOrdeCountByDate(organizationId, startTime, endTime) {
 		url: `/api/workarkOrderInfo/count/${organizationId}/${startTime}/${endTime}`,
 		method: 'get'
 	})
-}
+}
 /* 
  * 购买排行
  * 

+ 445 - 445
virgo.wzfrontend/workark/src/components/website/createOrder.vue

@@ -1,446 +1,446 @@
-<template>
-	<div class="create-order">
-		<div class="hui-flex" v-if="!isCreate">
-			<div class="hui-flex-box">
-				<div class="order-box">
-					<div class="title">订单详情</div>
-					<div class="content">
-						<el-table :data="tableData">
-							<el-table-column label="商品名称" prop="name"></el-table-column>
-							<el-table-column label="数量" width="100">
-								<template>x1</template>
-							</el-table-column>
-							<el-table-column label="价格" prop="price" width="100">
-								<template slot-scope="scope">
-									<span class="color-danger">{{scope.row.price}}</span>
-								</template>
-							</el-table-column>
-						</el-table>
-					</div>
-				</div>
-				<div class="order-box">
-					<div class="title" style="border: none;">优惠券</div>
-					<div class="content contents" v-if="coupon.length>0">
-						<div :class="returnCouponClass(item) ?'coupon-card' :'coupon-card disabled'"
-							v-for="(item,index) in coupon" :key="index" @click="checkCoupon(item)">
-							<div
-								:class="couponChecked.findIndex(node=>node.id === item.id) > -1 ? 'coupon-card-box active' :'coupon-card-box'">
-								<div class="price">
-									<div v-if="item.type === 1">
-										<span class="symbol">¥</span>
-										<span>{{item.couponAmount}}</span>
-									</div>
-									<div v-else>
-										<span>{{item.discount*100}}</span>
-										<span class="symbol">折</span>
-									</div>
-								</div>
-								<div class="center-describe">
-									<div class="product">{{item.title}}</div>
-									<div class="sub-title">
-										<span>{{item.type === 1?`满${item.threshold}减${item.couponAmount}`:`满${item.threshold}可用,最高抵扣${item.mostConstraint}`}}</span>
-									</div>
-								</div>
-								<div class="icon-check">
-									<i class="el-icon-check"></i>
-								</div>
-							</div>
-						</div>
-					</div>
-					<div class="content contents" v-else>
-						<div style="text-align: center;width: 100%; margin-top: 15px; color: #6d6d6d;">暂无优惠券</div>
-					</div>
-				</div>
-			</div>
-			<div class="create-order-submit">
-				<div class="create-order-price">
-					<div v-if="isCount" class="color-danger">
-						正在计算...
-					</div>
-					<div v-else>
-						<div>
-							<span>应付费用:</span>
-							<span class="color-danger">¥</span>
-							<span class="color-danger">{{countPriceData.totalFee}}</span>
-						</div>
-						<div class="discount-num">
-							<span class="color-danger">减 ¥ <span>{{minus}}</span></span>
-						</div>
-					</div>
-				</div>
-				<el-button type="primary" size="medium" :disabled="isCount" @click="submit" :loading="loading">
-					创建订单
-				</el-button>
-			</div>
-		</div>
-		<div class="hui-flex" v-else>
-			<el-result icon="success" title="订单创建成功,请支付" :subTitle="`订单编号:${order.orderNo}`">
-				<template slot="extra">
-					<div class="extra-box">
-						<div class="pay-list">
-							<div class="pay-item active">
-								<i class="iconfont huifont-weixinzhifu"></i>
-								<span class="label">微信支付</span>
-								<div class="icon-check">
-									<i class="el-icon-check"></i>
-								</div>
-							</div>
-						</div>
-						<div class="pay-button">
-							<el-button size="small" @click="lookOrder">查看订单</el-button>
-							<el-button type="primary" size="small" @click="dialogVisible = true">立即支付</el-button>
-						</div>
-					</div>
-				</template>
-			</el-result>
-		</div>
-		<el-dialog :close-on-click-modal="false" title="支付订单" :visible.sync="dialogVisible" width="600px"
-			:append-to-body="true">
-			<pay-order v-if="dialogVisible" :orderNo="order.orderNo">
-				<el-button size="small" @click="lookOrder">查看订单</el-button>
-			</pay-order>
-		</el-dialog>
-	</div>
-</template>
-
-<script>
-	import {
-		getServeById,
-		countPriceAPI,
-		createOreder
-	} from '@/api/serve'
-	import {
-		getCouponListByQuery
-	} from '@/api/discount'
-	import {
-		getServeDepartmentById
-	} from '@/api/system'
-	const payOrder = () => import('@/components/website/payOrder');
-	export default {
-		props: ['serveId'],
-		data() {
-			return {
-				tableData: [],
-				coupon: [],
-				couponChecked: [],
-				isCount: false,
-				countPriceData: {
-					productCoupon: [],
-					totalFee: 0
-				},
-				productData: {},
-				loading: false,
-				isCreate: false,
-				isStacking: false,
-				order: {},
-				dialogVisible: false
-			}
-		},
-		mounted() {
-			this.init();
-		},
-		computed: {
-			minus() {
-				let data = this.countPriceData.productCoupon || [];
-				let num = 0;
-				for (var i = 0; i < data.length; i++) {
-					num += data[i].minus
-				}
-				return num;
-			}
-		},
-		components: {
-			payOrder
-		},
-		methods: {
-			init() {
-				getServeById(this.serveId).then(res => {
-					if (res.state) {
-						let data = res.data;
-						this.productData = data;
-						this.tableData = [data];
-						this.countPrice();
-						getCouponListByQuery({
-							userId: this.$store.getters.user.userId,
-							productLevelId: data.productLevelId,
-							state: 1
-						}).then(node => {
-							if (node.state) {
-								this.coupon = node.data;
-							}
-						})
-					}
-				})
-			},
-			returnCouponClass(item) {
-				if (item.threshold > this.productData.price) return false; //大于满减。
-				if (this.couponChecked.findIndex(node => node.id === item.id) > -1) return true; //已选择的返回true
-				if (this.couponChecked.length === 0) return true; //未选择优惠券时都能选择。
-				if (this.isStacking && item.overlayUse === 0) return false; //叠加时不能选择不能叠加优惠券。
-				if (this.isStacking && item.overlayUse === 1) return true; //叠加时能选择叠加优惠券。
-			},
-			checkCoupon(item) {
-				if (!this.returnCouponClass(item)) return;
-				let index = this.couponChecked.findIndex(node => node.id === item.id);
-				if (index === -1) {
-					this.couponChecked.push(item);
-				} else {
-					this.couponChecked.splice(index, 1);
-				}
-				this.isStacking = this.couponChecked.length > 0 ? this.couponChecked[0].overlayUse === 1 : false; //是否可叠加
-				this.countPrice();
-			},
-			countPrice() {
-				this.isCount = true;
-				let couponIds = this.couponChecked.map(node => node.id).join(',') || -1;
-				countPriceAPI(this.productData.id, couponIds).then(res => {
-					if (res.state) {
-						this.countPriceData = res.data;
-					}
-					this.isCount = false;
-				})
-			},
-			submit() {
-				this.loading = true;
-				let couponIds = this.couponChecked.map(node => node.id).join(',') || -1;
-				createOreder(this.productData.id, this.$store.getters.organization.id, couponIds).then(res => {
-					this.loading = false;
-					if (res.state) {
-						this.order = res.data;
-						this.isCreate = true;
-						this.$message.success('操作成功');
-					}
-				})
-			},
-			lookOrder() {
-				getServeDepartmentById(this.productData.productLevelId).then(res => {
-					if (res.state) {
-						let orderPath = '/work/serve/list/' + res.data.sign;
-						this.$router.push(orderPath);
-					}
-				})
-			}
-		},
-	}
-</script>
-
-<style lang="scss">
-	.create-order {
-		width: 100%;
-		height: 100%;
-		background: $--background-color-base;
-		padding: 15px;
-
-		.pay-list {
-			display: flex;
-			margin-bottom: 20px;
-
-			.pay-item {
-				display: flex;
-				align-items: center;
-				border: 1px solid $--border-color-light;
-				padding: 5px 20px 5px 10px;
-				background: $--color-white;
-				position: relative;
-				overflow: hidden;
-
-				.el-icon-check {
-					font-size: 12px;
-				}
-
-				.icon-check {
-					color: #fff;
-					white-space: nowrap;
-					transform: rotate(45deg);
-					position: absolute;
-					top: -6px;
-					right: -15px;
-					background: #165dff;
-					width: 40px;
-					text-align: center;
-					height: 20px;
-					display: flex;
-					align-items: flex-end;
-					justify-content: center;
-
-				}
-
-				&.active {
-					border-color: $--color-primary;
-				}
-
-				.huifont-weixinzhifu {
-					color: #57b050;
-					font-size: 30px;
-					margin-right: 10px;
-				}
-
-				.label {
-					font-weight: bold;
-					cursor: pointer;
-				}
-			}
-
-			.pay-button {
-				.el-button:first-child {
-					margin-right: 20px;
-				}
-			}
-		}
-
-		.extra-box {
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-		}
-
-		.create-order-submit {
-			background: #fff;
-			display: flex;
-			align-items: center;
-			justify-content: end;
-			padding: 15px;
-
-			.create-order-price {
-				margin-right: 20px;
-			}
-
-			.discount-num {
-				font-size: 12px;
-			}
-		}
-
-		.coupon-card {
-			width: 50%;
-			margin-top: 10px;
-
-			&:nth-child(2n) {
-				padding-left: 5px;
-			}
-
-			&:nth-child(2n-1) {
-				padding-right: 5px;
-			}
-
-			&.disabled {
-				.coupon-card-box {
-					opacity: 0.6;
-					cursor: unset;
-
-					&:hover,
-					&.active {
-						border-color: $--border-color-lighter;
-
-						.icon-check {
-							display: none;
-						}
-					}
-				}
-			}
-
-			.coupon-card-box {
-				background: #fff;
-				padding: 15px;
-				align-items: center;
-				display: flex;
-				position: relative;
-				cursor: pointer;
-				border: 1px solid $--border-color-lighter;
-				overflow: hidden;
-
-				&:hover {
-					border-color: $--color-primary;
-				}
-
-				&.active {
-					border-color: $--color-primary;
-
-					.icon-check {
-						display: flex;
-					}
-				}
-			}
-
-			.price {
-				color: $--color-danger;
-				font-size: 24px;
-				font-weight: 500;
-				line-height: 24px;
-				text-align: center;
-				width: 100px;
-
-				.symbol {
-					margin: 0 3px;
-					font-size: $--font-size-base;
-				}
-			}
-
-			.center-describe {
-				display: inline-block;
-				margin-right: auto;
-				padding-left: 20px;
-				text-align: left;
-
-				.product {
-					color: $--color-text-primary;
-					font-size: $--font-size-large;
-					font-weight: 550;
-					line-height: 14px;
-					padding-bottom: 12px;
-				}
-			}
-
-			.icon-check {
-				color: #fff;
-				white-space: nowrap;
-				transform: rotate(45deg);
-				position: absolute;
-				top: -8px;
-				right: -15px;
-				background: #165dff;
-				width: 40px;
-				text-align: center;
-				height: 26px;
-				display: none;
-				align-items: flex-end;
-				justify-content: center;
-			}
-		}
-
-		.el-table__header {
-
-			th {
-				color: #606266;
-				background: #f4f4f5;
-			}
-
-			.cell {
-				font-weight: 700;
-			}
-		}
-
-		.order-box {
-			background: #fff;
-			margin-bottom: 15px;
-
-			.title {
-				font-weight: 600;
-				line-height: 22px;
-				padding: 12px 24px;
-				border-bottom: 1px solid $--border-color-light;
-			}
-
-			.content {
-				padding: 15px;
-			}
-
-			.contents {
-				background: $--background-color-base;
-				padding: 0;
-				display: flex;
-				flex-wrap: wrap;
-			}
-
-		}
-	}
+<template>
+	<div class="create-order">
+		<div class="hui-flex" v-if="!isCreate">
+			<div class="hui-flex-box">
+				<div class="order-box">
+					<div class="title">订单详情</div>
+					<div class="content">
+						<el-table :data="tableData">
+							<el-table-column label="商品名称" prop="name"></el-table-column>
+							<el-table-column label="数量" width="100">
+								<template>x1</template>
+							</el-table-column>
+							<el-table-column label="价格" prop="price" width="100">
+								<template slot-scope="scope">
+									<span class="color-danger">{{scope.row.price}}</span>
+								</template>
+							</el-table-column>
+						</el-table>
+					</div>
+				</div>
+				<div class="order-box">
+					<div class="title" style="border: none;">优惠券</div>
+					<div class="content contents" v-if="coupon.length>0">
+						<div :class="returnCouponClass(item) ?'coupon-card' :'coupon-card disabled'"
+							v-for="(item,index) in coupon" :key="index" @click="checkCoupon(item)">
+							<div
+								:class="couponChecked.findIndex(node=>node.id === item.id) > -1 ? 'coupon-card-box active' :'coupon-card-box'">
+								<div class="price">
+									<div v-if="item.type === 1">
+										<span class="symbol">¥</span>
+										<span>{{item.couponAmount}}</span>
+									</div>
+									<div v-else>
+										<span>{{item.discount*100}}</span>
+										<span class="symbol">折</span>
+									</div>
+								</div>
+								<div class="center-describe">
+									<div class="product">{{item.title}}</div>
+									<div class="sub-title">
+										<span>{{item.type === 1?`满${item.threshold}减${item.couponAmount}`:`满${item.threshold}可用,最高抵扣${item.mostConstraint}`}}</span>
+									</div>
+								</div>
+								<div class="icon-check">
+									<i class="el-icon-check"></i>
+								</div>
+							</div>
+						</div>
+					</div>
+					<div class="content contents" v-else>
+						<div style="text-align: center;width: 100%; margin-top: 15px; color: #6d6d6d;">暂无优惠券</div>
+					</div>
+				</div>
+			</div>
+			<div class="create-order-submit">
+				<div class="create-order-price">
+					<div v-if="isCount" class="color-danger">
+						正在计算...
+					</div>
+					<div v-else>
+						<div>
+							<span>应付费用:</span>
+							<span class="color-danger">¥</span>
+							<span class="color-danger">{{countPriceData.totalFee}}</span>
+						</div>
+						<div class="discount-num">
+							<span class="color-danger">减 ¥ <span>{{minus}}</span></span>
+						</div>
+					</div>
+				</div>
+				<el-button type="primary" size="medium" :disabled="isCount" @click="submit" :loading="loading">
+					创建订单
+				</el-button>
+			</div>
+		</div>
+		<div class="hui-flex" v-else>
+			<el-result icon="success" title="订单创建成功,请支付" :subTitle="`订单编号:${order.orderNo}`">
+				<template slot="extra">
+					<div class="extra-box">
+						<div class="pay-list">
+							<div class="pay-item active">
+								<i class="iconfont huifont-weixinzhifu"></i>
+								<span class="label">微信支付</span>
+								<div class="icon-check">
+									<i class="el-icon-check"></i>
+								</div>
+							</div>
+						</div>
+						<div class="pay-button">
+							<el-button size="small" @click="lookOrder">查看订单</el-button>
+							<el-button type="primary" size="small" @click="dialogVisible = true">立即支付</el-button>
+						</div>
+					</div>
+				</template>
+			</el-result>
+		</div>
+		<el-dialog :close-on-click-modal="false" title="支付订单" :visible.sync="dialogVisible" width="600px"
+			:append-to-body="true">
+			<pay-order v-if="dialogVisible" :orderNo="order.orderNo">
+				<el-button size="small" @click="lookOrder">查看订单</el-button>
+			</pay-order>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import {
+		getServeById,
+		countPriceAPI,
+		createOrder
+	} from '@/api/serve'
+	import {
+		getCouponListByQuery
+	} from '@/api/discount'
+	import {
+		getServeDepartmentById
+	} from '@/api/system'
+	const payOrder = () => import('@/components/website/payOrder');
+	export default {
+		props: ['serveId'],
+		data() {
+			return {
+				tableData: [],
+				coupon: [],
+				couponChecked: [],
+				isCount: false,
+				countPriceData: {
+					productCoupon: [],
+					totalFee: 0
+				},
+				productData: {},
+				loading: false,
+				isCreate: false,
+				isStacking: false,
+				order: {},
+				dialogVisible: false
+			}
+		},
+		mounted() {
+			this.init();
+		},
+		computed: {
+			minus() {
+				let data = this.countPriceData.productCoupon || [];
+				let num = 0;
+				for (var i = 0; i < data.length; i++) {
+					num += data[i].minus
+				}
+				return num;
+			}
+		},
+		components: {
+			payOrder
+		},
+		methods: {
+			init() {
+				getServeById(this.serveId).then(res => {
+					if (res.state) {
+						let data = res.data;
+						this.productData = data;
+						this.tableData = [data];
+						this.countPrice();
+						getCouponListByQuery({
+							userId: this.$store.getters.user.userId,
+							productLevelId: data.productLevelId,
+							state: 1
+						}).then(node => {
+							if (node.state) {
+								this.coupon = node.data;
+							}
+						})
+					}
+				})
+			},
+			returnCouponClass(item) {
+				if (item.threshold > this.productData.price) return false; //大于满减。
+				if (this.couponChecked.findIndex(node => node.id === item.id) > -1) return true; //已选择的返回true
+				if (this.couponChecked.length === 0) return true; //未选择优惠券时都能选择。
+				if (this.isStacking && item.overlayUse === 0) return false; //叠加时不能选择不能叠加优惠券。
+				if (this.isStacking && item.overlayUse === 1) return true; //叠加时能选择叠加优惠券。
+			},
+			checkCoupon(item) {
+				if (!this.returnCouponClass(item)) return;
+				let index = this.couponChecked.findIndex(node => node.id === item.id);
+				if (index === -1) {
+					this.couponChecked.push(item);
+				} else {
+					this.couponChecked.splice(index, 1);
+				}
+				this.isStacking = this.couponChecked.length > 0 ? this.couponChecked[0].overlayUse === 1 : false; //是否可叠加
+				this.countPrice();
+			},
+			countPrice() {
+				this.isCount = true;
+				let couponIds = this.couponChecked.map(node => node.id).join(',') || -1;
+				countPriceAPI(this.productData.id, couponIds).then(res => {
+					if (res.state) {
+						this.countPriceData = res.data;
+					}
+					this.isCount = false;
+				})
+			},
+			submit() {
+				this.loading = true;
+				let couponIds = this.couponChecked.map(node => node.id).join(',') || -1;
+				createOrder(this.productData.id, this.$store.getters.organization.id, couponIds).then(res => {
+					this.loading = false;
+					if (res.state) {
+						this.order = res.data;
+						this.isCreate = true;
+						this.$message.success('操作成功');
+					}
+				})
+			},
+			lookOrder() {
+				getServeDepartmentById(this.productData.productLevelId).then(res => {
+					if (res.state) {
+						let orderPath = '/work/serve/list/' + res.data.sign;
+						this.$router.push(orderPath);
+					}
+				})
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	.create-order {
+		width: 100%;
+		height: 100%;
+		background: $--background-color-base;
+		padding: 15px;
+
+		.pay-list {
+			display: flex;
+			margin-bottom: 20px;
+
+			.pay-item {
+				display: flex;
+				align-items: center;
+				border: 1px solid $--border-color-light;
+				padding: 5px 20px 5px 10px;
+				background: $--color-white;
+				position: relative;
+				overflow: hidden;
+
+				.el-icon-check {
+					font-size: 12px;
+				}
+
+				.icon-check {
+					color: #fff;
+					white-space: nowrap;
+					transform: rotate(45deg);
+					position: absolute;
+					top: -6px;
+					right: -15px;
+					background: #165dff;
+					width: 40px;
+					text-align: center;
+					height: 20px;
+					display: flex;
+					align-items: flex-end;
+					justify-content: center;
+
+				}
+
+				&.active {
+					border-color: $--color-primary;
+				}
+
+				.huifont-weixinzhifu {
+					color: #57b050;
+					font-size: 30px;
+					margin-right: 10px;
+				}
+
+				.label {
+					font-weight: bold;
+					cursor: pointer;
+				}
+			}
+
+			.pay-button {
+				.el-button:first-child {
+					margin-right: 20px;
+				}
+			}
+		}
+
+		.extra-box {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+		}
+
+		.create-order-submit {
+			background: #fff;
+			display: flex;
+			align-items: center;
+			justify-content: end;
+			padding: 15px;
+
+			.create-order-price {
+				margin-right: 20px;
+			}
+
+			.discount-num {
+				font-size: 12px;
+			}
+		}
+
+		.coupon-card {
+			width: 50%;
+			margin-top: 10px;
+
+			&:nth-child(2n) {
+				padding-left: 5px;
+			}
+
+			&:nth-child(2n-1) {
+				padding-right: 5px;
+			}
+
+			&.disabled {
+				.coupon-card-box {
+					opacity: 0.6;
+					cursor: unset;
+
+					&:hover,
+					&.active {
+						border-color: $--border-color-lighter;
+
+						.icon-check {
+							display: none;
+						}
+					}
+				}
+			}
+
+			.coupon-card-box {
+				background: #fff;
+				padding: 15px;
+				align-items: center;
+				display: flex;
+				position: relative;
+				cursor: pointer;
+				border: 1px solid $--border-color-lighter;
+				overflow: hidden;
+
+				&:hover {
+					border-color: $--color-primary;
+				}
+
+				&.active {
+					border-color: $--color-primary;
+
+					.icon-check {
+						display: flex;
+					}
+				}
+			}
+
+			.price {
+				color: $--color-danger;
+				font-size: 24px;
+				font-weight: 500;
+				line-height: 24px;
+				text-align: center;
+				width: 100px;
+
+				.symbol {
+					margin: 0 3px;
+					font-size: $--font-size-base;
+				}
+			}
+
+			.center-describe {
+				display: inline-block;
+				margin-right: auto;
+				padding-left: 20px;
+				text-align: left;
+
+				.product {
+					color: $--color-text-primary;
+					font-size: $--font-size-large;
+					font-weight: 550;
+					line-height: 14px;
+					padding-bottom: 12px;
+				}
+			}
+
+			.icon-check {
+				color: #fff;
+				white-space: nowrap;
+				transform: rotate(45deg);
+				position: absolute;
+				top: -8px;
+				right: -15px;
+				background: #165dff;
+				width: 40px;
+				text-align: center;
+				height: 26px;
+				display: none;
+				align-items: flex-end;
+				justify-content: center;
+			}
+		}
+
+		.el-table__header {
+
+			th {
+				color: #606266;
+				background: #f4f4f5;
+			}
+
+			.cell {
+				font-weight: 700;
+			}
+		}
+
+		.order-box {
+			background: #fff;
+			margin-bottom: 15px;
+
+			.title {
+				font-weight: 600;
+				line-height: 22px;
+				padding: 12px 24px;
+				border-bottom: 1px solid $--border-color-light;
+			}
+
+			.content {
+				padding: 15px;
+			}
+
+			.contents {
+				background: $--background-color-base;
+				padding: 0;
+				display: flex;
+				flex-wrap: wrap;
+			}
+
+		}
+	}
 </style>

+ 2 - 2
virgo.wzfrontend/workark/src/components/website/payOrder.vue

@@ -73,7 +73,7 @@
 						if (res.state) {
 							this.state = res.data;
 							if (this.state !== 'NOTPAY') this.stopTimer();
-							if (this.state === 'SUCCESS') this.$emit('callback', 'payState');
+							if (this.state === 'SUCCESS') this.$emit('callback', 'payState', 'success');
 						}
 					})
 				}, 3000)
@@ -86,7 +86,7 @@
 			finish() {
 				this.stopTimer();
 				this.orderClose = true;
-				this.$emit('callback', 'payState');
+				this.$emit('callback', 'payState', 'error');
 			}
 		},
 	}

+ 11 - 11
virgo.wzfrontend/workark/src/components/work/serve/list/detail.vue

@@ -24,12 +24,12 @@
 						<div class="hui-detail-item">
 							<div class="hui-detail-label">支付状态</div>
 							<div class="hui-detail-value">
-								<span :class="{
-									'color-warning':part.orderStatus === '未支付',
-									'color-success':part.orderStatus === '支付成功',
-									'color-danger':part.orderStatus === '超时已关闭'
-								}">
-									{{part.orderStatus}}
+								<span :class="{
+									'color-warning':part.orderStatus === '未支付',
+									'color-success':part.orderStatus === '支付成功',
+									'color-danger':part.orderStatus === '超时已关闭'
+								}">
+									{{part.orderStatus}}
 								</span>
 							</div>
 						</div>
@@ -150,10 +150,10 @@
 
 <script>
 	import {
-		getOrederDetail,
+		getOrderDetail,
 		changeOrderPrice,
 		changeOrderStatus,
-		getOrederDetailByOrderNo
+		getOrderDetailByOrderNo
 	} from '@/api/serve'
 	import {
 		bindContract,
@@ -196,9 +196,9 @@
 			init() {
 				this.activeList = [];
 				if (this.detailType === 'orderNo') {
-					getOrederDetailByOrderNo(this.detailId).then(this.initSuccessFunc)
+					getOrderDetailByOrderNo(this.detailId).then(this.initSuccessFunc)
 				} else {
-					getOrederDetail(this.detailId).then(this.initSuccessFunc)
+					getOrderDetail(this.detailId).then(this.initSuccessFunc)
 				}
 			},
 			initSuccessFunc(res) {
@@ -247,7 +247,7 @@
 					type: 'primary',
 					name: '立即支付'
 				})
-				if (this.part.contractId && this.part.contractStatus === 0 && this.part.status === 1) {
+				if (this.part.contractId && this.part.contractStatus === 0) {
 					this.activeList.push({
 						id: 8,
 						type: 'primary',

+ 5 - 6
virgo.wzfrontend/workark/src/components/work/system/serveSet/processForm.vue

@@ -47,7 +47,8 @@
 		getProcessDataById,
 		updateProcessSetData,
 		updateProcessData
-	} from '@/api/system'
+	} from '@/api/system'
+	
 	export default {
 		props: ['isUpdate', 'itemId', 'partId', 'type'],
 		data() {
@@ -59,7 +60,7 @@
 					parentId: -1,
 					roleId: 1,
 					type: 0,
-					totalFee: ''
+					totalFee: 0
 				},
 				departmentRuler: {},
 				loading: false,
@@ -99,10 +100,8 @@
 			submit() {
 				this.loading = true;
 				let postData = JSON.parse(JSON.stringify(this.departmentForm));
-				if (postData.attachment === 0) {
-					delete postData.attachmentNumber;
-					postData.roleId = 1;
-				}
+				if (postData.type === 0) postData.roleId = 1;
+				if (postData.type === 0 || postData.type === 1) postData.totalFee = 0;
 				if (postData.sequence === 0) delete postData.sequence;
 				if (this.type === 'model') {
 					if (this.isUpdate) {

+ 85 - 7
virgo.wzfrontend/workark/src/components/work/system/serveSet/processSetItem.vue

@@ -15,7 +15,7 @@
 					@click="edit('update', item.id)"></i>
 				<i class="el-icon-delete color-danger" v-if="type === 'edit'" @click="edit('delete', item.id)"></i>
 			</div>
-			<!-- 可添加附件 -->
+			<!-- 可附件 -->
 			<div v-if="item.type === 1">
 				<div v-if="(item.status === 1 || item.status === 4) && item.roleId === roleType">
 					<upload ref="upload" :list="!item.attachmentContent?[]:JSON.parse(item.attachmentContent)"
@@ -35,14 +35,34 @@
 					</div>
 				</div>
 				<!-- 展示 -->
-				<div v-else-if="item.type === 1 && item.attachmentContent">
+				<div v-else-if="item.status !== 1 && item.attachmentContent">
 					<upload :list="!item.attachmentContent ? [] : JSON.parse(item.attachmentContent)">
 					</upload>
 				</div>
 			</div>
 			<!-- 可付款 -->
-			<div v-if="item.type === 2">
-
+			<div v-else-if="item.type === 2">
+				<div v-if="(item.status === 1 || item.status === 4) && item.roleId === roleType">
+					<div>
+						<span>待付款</span>
+						<span class="color-danger">¥</span>
+						<span class="color-danger">{{item.totalFee}}</span>
+					</div>
+					<div class="operation-button">
+						<el-button size="mini" type="primary" @click="payment(item)">确认付款</el-button>
+					</div>
+				</div>
+				<!-- 展示 -->
+				<div v-else-if="item.type === 2 && item.status === 3">
+					<div class="hui-state">
+						<div class="hui-state-bage hui-state-success"></div>
+						<div class="hui-state-label">
+							<span>已支付</span>
+							<span class="color-success">¥</span>
+							<span class="color-success">{{item.totalFee}}</span>
+						</div>
+					</div>
+				</div>
 			</div>
 			<!-- 不可添加附件 -->
 			<div v-else-if="item.children.length === 0">
@@ -57,23 +77,69 @@
 			</div>
 		</div>
 		<div class="process-set-insert" @click="edit('insert', parentId || -1)" v-if="type === 'edit'">新增</div>
+		<el-dialog :close-on-click-modal="false" title="支付订单" :visible.sync="dialogVisible" width="600px"
+			:append-to-body="true">
+			<pay-order v-if="dialogVisible" :orderNo="order.orderNo" @callback="callback"></pay-order>
+		</el-dialog>
 	</div>
 </template>
 
 <script>
 	const processSetItem = () => import('./processSetItem.vue');
 	const upload = () => import('@/components/common/upload');
+	const payOrder = () => import('@/components/website/payOrder');
 	import {
 		updateProcessData,
 		updateProcessStatus
 	} from '@/api/system'
+	import {
+		createProcessOrder,
+		getOrderListByQuery
+	} from '@/api/serve'
 	export default {
 		props: ['list', 'type', 'parentId', 'roleType'],
 		data() {
-			return {}
+			return {
+				dialogVisible: false,
+				order: {},
+				timeOut: null,
+				nowItem: {}
+			}
+		},
+		beforeDestroy() {
+			if (!this.timeOut) return;
+			clearTimeout(this.timeOut);
+			this.timeOut = null
 		},
 		mounted() {},
 		methods: {
+			payment(item) {
+				this.nowItem = item;
+				this.$loading();
+				getOrderListByQuery({
+					proceId: item.id
+				}).then(res => {
+					if (res.state) {
+						if (res.data.length === 0) {
+							createProcessOrder(item.id, this.$store.getters.organization.id).then(res => {
+								if (res.state) {
+									this.order = res.data;
+									this.$loading.close();
+									this.dialogVisible = true;
+								} else {
+									this.$loading.close();
+								}
+							})
+						} else {
+							this.order = res.data[0];
+							this.$loading.close();
+							this.dialogVisible = true;
+						}
+					} else {
+						this.$loading.close();
+					}
+				})
+			},
 			returnItemClass(item) {
 				let str = '';
 				switch (item.status) {
@@ -103,7 +169,8 @@
 				if (!this.$refs.upload) return;
 				if (this.$refs.upload[0].fileList.length === 0) return this.$message.warning('至少上传一个文件');
 				let data = {
-					id: item.id
+					id: item.id,
+					sequence: item.sequence
 				};
 				data['attachmentContent'] = JSON.stringify(this.$refs.upload[0].fileList);
 				updateProcessData(data).then(res => {
@@ -123,11 +190,22 @@
 						this.edit('reload', status === 3 ? item.id : 0);
 					}
 				})
+			},
+			callback(type,operationType) {
+				this.visible = false;
+				if (type === 'payState') {
+					this.timeOut = setTimeout(() => {
+						if(this.operationType === 'success') this.updateStatus(this.nowItem, 3);
+						clearTimeout(this.timeOut);
+						this.timeOut = null;
+					}, 1000)
+				}
 			}
 		},
 		components: {
 			processSetItem,
-			upload
+			upload,
+			payOrder
 		}
 	}
 </script>