whx 1 mese fa
parent
commit
be5930f25f
44 ha cambiato i file con 531 aggiunte e 87 eliminazioni
  1. BIN
      virgo.wzfrontend/src/main/resources/static/workark/assets/ma.png
  2. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/index.html
  3. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/2184.00bd9c5b.css
  4. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/css/1302.7d7393ee.css
  5. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/5383.0ec15984.css
  6. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/7857.ec3bd3b4.css
  7. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/css/8178.2b4bf449.css
  8. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/9855.7fa2519b.css
  9. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1096.cbd131ac.js
  10. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1302.3057b676.js
  11. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1682.7b294bf5.js
  12. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/2184.d36bab9b.js
  13. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3633.cbcc1c63.js
  14. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/4028.ff233166.js
  15. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/4719.211b3de8.js
  16. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5095.5989ae49.js
  17. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/3457.d523e6d7.js
  18. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5321.20984331.js
  19. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/5383.87cc4d8e.js
  20. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6554.26f1a6ac.js
  21. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6653.21a0892f.js
  22. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6802.ed9d76ab.js
  23. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7100.9a67c188.js
  24. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7259.23e4fe4b.js
  25. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7883.a8426b02.js
  26. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8083.8f882f1b.js
  27. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8135.740af320.js
  28. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8178.4c56e1f4.js
  29. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/892.76638aa1.js
  30. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9124.2d34f791.js
  31. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9301.95d16451.js
  32. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9334.49da5d80.js
  33. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9640.e04ea215.js
  34. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9709.862dd20a.js
  35. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9855.865b421c.js
  36. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/app.cbb81bba.js
  37. 13 2
      virgo.wzfrontend/workark/src/api/serve.js
  38. 12 1
      virgo.wzfrontend/workark/src/components/website/payOrder.vue
  39. 1 1
      virgo.wzfrontend/workark/src/components/work/finace/invoice/apply/edit.vue
  40. 5 9
      virgo.wzfrontend/workark/src/components/work/serve/list/detail.vue
  41. 419 0
      virgo.wzfrontend/workark/src/components/work/system/serveSet/createOrder.vue
  42. 5 5
      virgo.wzfrontend/workark/src/components/work/system/serveSet/processForm.vue
  43. 49 46
      virgo.wzfrontend/workark/src/components/work/system/serveSet/processSetItem.vue
  44. 3 3
      virgo.wzfrontend/workark/src/views/work/serve/list.vue

BIN
virgo.wzfrontend/src/main/resources/static/workark/assets/ma.png


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/index.html


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/css/2184.00bd9c5b.css


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/css/1302.7d7393ee.css


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/css/5383.0ec15984.css


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


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/css/8178.2b4bf449.css


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/css/9855.7fa2519b.css


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/1096.cbd131ac.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/1302.3057b676.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/1682.7b294bf5.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/2184.d36bab9b.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/3633.cbcc1c63.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/4028.ff233166.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/4719.211b3de8.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/5095.5989ae49.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/3457.d523e6d7.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/5321.20984331.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/5383.87cc4d8e.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/6554.26f1a6ac.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/6653.21a0892f.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/6802.ed9d76ab.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/7100.9a67c188.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/7259.23e4fe4b.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/7883.830e66f7.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/7883.a8426b02.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/8083.8f882f1b.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/8135.740af320.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/8178.4c56e1f4.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/892.b23da4f3.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/892.76638aa1.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/9124.2d34f791.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/9301.95d16451.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/9334.49da5d80.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/9640.e04ea215.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/9709.862dd20a.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/9855.865b421c.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/app.cbb81bba.js


+ 13 - 2
virgo.wzfrontend/workark/src/api/serve.js

@@ -81,6 +81,17 @@ export function countPriceAPI(productId, productCouponIds) {
 		method: 'get'
 	})
 }
+/* 
+ * 过程计算价格
+ * 
+ * 
+ */
+export function countProcessPriceAPI(proceId, productCouponIds) {
+	return request({
+		url: `/api/workarkOrderInfo/calculateProcePrice/${proceId}/${productCouponIds}`,
+		method: 'get'
+	})
+}
 /* 
  * 创建订单
  * 
@@ -97,9 +108,9 @@ export function createOrder(productId, organizationId, productCouponIds) {
  * 
  * 
  */
-export function createProcessOrder(proceId, organizationId) {
+export function createProcessOrder(proceId, organizationId, productCouponIds) {
 	return request({
-		url: `/api/workarkOrderInfo/create/proce/${proceId}/${organizationId}`,
+		url: `/api/workarkOrderInfo/create/proce/${proceId}/${organizationId}/${productCouponIds}`,
 		method: 'get'
 	})
 }

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

@@ -6,6 +6,9 @@
 			<el-statistic v-if="codeUrlFailureTime && !orderClose" :value="codeUrlFailureTime" format="HH:mm:ss"
 				time-indices title="订单即将过期" @finish="finish">
 			</el-statistic>
+			<div class="pay-order-price color-danger" v-if="price">
+				<span class="label">金额:</span><span>¥</span><span>{{price}}</span>
+			</div>
 			<el-skeleton :loading="loading" animated>
 				<template slot="template">
 					<div class="pay-img">
@@ -46,7 +49,8 @@
 				state: 'NOTPAY',
 				loading: false,
 				codeUrlFailureTime: '',
-				orderClose: false
+				orderClose: false,
+				price: ''
 			}
 		},
 		mounted() {
@@ -61,6 +65,7 @@
 				createPayQR(this.orderNo).then(res => {
 					if (res.state) {
 						this.payUrl = res.data.base64;
+						this.price = res.data.totalFee;
 						this.codeUrlFailureTime = new Date(res.data.codeUrlFailureTime).getTime();
 						this.findState();
 					}
@@ -110,6 +115,12 @@
 			}
 		}
 
+		.pay-order-price {
+			text-align: center;
+			margin-top: 25px;
+			font-size: 20px;
+		}
+
 		.pay-img {
 			display: flex;
 			justify-content: center;

+ 1 - 1
virgo.wzfrontend/workark/src/components/work/finace/invoice/apply/edit.vue

@@ -37,7 +37,7 @@
 			</el-form>
 		</div>
 		<div class="hui-dialog-submit">
-			<el-button size="small" @click="$emit('callback')">取 消</el-button>
+			<el-button size="small" @click="$emit('callback','cancel')">取 消</el-button>
 			<el-button size="small" type="primary" @click="submit" :loading="loading">保 存</el-button>
 		</div>
 		<el-dialog :close-on-click-modal="false" title="选择发票抬头" :visible.sync="visible" width="1100px"

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

@@ -33,7 +33,7 @@
 								</span>
 							</div>
 						</div>
-						<div class="hui-detail-item">
+						<div class="hui-detail-item" v-if="!part.proceId">
 							<div class="hui-detail-label">订单状态</div>
 							<div class="hui-detail-value">
 								<div class="hui-state" v-if="!part.status">
@@ -52,7 +52,7 @@
 						</div>
 					</div>
 				</div>
-				<div class="hui-detail-box">
+				<div class="hui-detail-box" v-if="!part.proceId">
 					<div class="hui-detail-title">订单合同</div>
 					<div class="hui-detail-content">
 						<div class="hui-detail-item" v-if="part.contractId">
@@ -109,7 +109,7 @@
 						</div>
 					</div>
 				</div>
-				<div class="hui-detail-box">
+				<div class="hui-detail-box" v-if="!part.proceId">
 					<div class="hui-detail-title">订单过程</div>
 					<div class="hui-detail-content" style="padding:0;">
 						<process-set ref="processSet" @callback="callback" v-if="part.id" :part="part" type="product"
@@ -407,12 +407,8 @@
 				if (type === 'init') this.init();
 				if (type === 'payState') {
 					this.activeList = [];
-					this.timeOut = setTimeout(() => {
-						this.$emit('callback', 'init');
-						this.init();
-						clearTimeout(this.timeOut);
-						this.timeOut = null;
-					}, 5000)
+					this.$emit('callback', 'init');
+					this.init();
 				}
 				if (type === 'processSuccess') {
 					changeOrderStatus({

+ 419 - 0
virgo.wzfrontend/workark/src/components/work/system/serveSet/createOrder.vue

@@ -0,0 +1,419 @@
+<template>
+	<div class="create-order">
+		<div class="hui-flex">
+			<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.totalFee}}</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 || isCreate" @click="submit"
+					:loading="loading">
+					立即支付
+				</el-button>
+			</div>
+		</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>
+	import {
+		countProcessPriceAPI,
+		createProcessOrder
+	} from '@/api/serve'
+	import {
+		getCouponListByQuery
+	} from '@/api/discount'
+	import {
+		getProcessDataById
+	} from '@/api/system'
+	const payOrder = () => import('@/components/website/payOrder');
+	export default {
+		props: ['serveId'],
+		data() {
+			return {
+				tableData: [],
+				coupon: [],
+				couponChecked: [],
+				isCount: false,
+				countPriceData: {
+					productCoupon: [],
+					totalFee: 0
+				},
+				processData: {},
+				loading: false,
+				isStacking: false,
+				order: {},
+				dialogVisible: false,
+				isCreate: 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() {
+				getProcessDataById(this.serveId).then(res => {
+					if (res.state) {
+						let data = res.data;
+						this.processData = 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.processData.totalFee) 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;
+				countProcessPriceAPI(this.processData.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;
+				createProcessOrder(this.processData.id, this.$store.getters.organization.id, couponIds).then(res => {
+					this.loading = false;
+					if (res.state) {
+						this.order = res.data;
+						this.isCreate = true;
+						this.dialogVisible = true;
+						this.$emit('callback', 'reload');
+					}
+				})
+			},
+			callback(type, operationType) {
+				this.$emit('callback', type, operationType);
+			}
+		},
+	}
+</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>

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

@@ -2,12 +2,12 @@
 	<div class="hui-flex hui-dialog">
 		<div class="hui-flex-box hui-dialog-content">
 			<el-form :model="departmentForm" label-position="top">
-				<el-form-item label="过程名称">
-					<el-input type="text" v-model="departmentForm.name" placeholder="请输入过程名称"></el-input>
-				</el-form-item>
 				<el-form-item label="过程排序(数字由小到大排序)">
 					<el-input type="text" v-model="departmentForm.sequence" placeholder="请输入过程排序"></el-input>
 				</el-form-item>
+				<el-form-item label="过程名称">
+					<el-input type="text" v-model="departmentForm.name" placeholder="请输入过程名称"></el-input>
+				</el-form-item>
 				<el-form-item label="是否可添加附件">
 					<el-radio-group v-model="departmentForm.type">
 						<el-radio :label="0">无操作</el-radio>
@@ -47,8 +47,8 @@
 		getProcessDataById,
 		updateProcessSetData,
 		updateProcessData
-	} from '@/api/system'
-	
+	} from '@/api/system'
+
 	export default {
 		props: ['isUpdate', 'itemId', 'partId', 'type'],
 		data() {

+ 49 - 46
virgo.wzfrontend/workark/src/components/work/system/serveSet/processSetItem.vue

@@ -62,6 +62,15 @@
 							<span class="color-success">{{item.totalFee}}</span>
 						</div>
 					</div>
+					<div v-if="roleType === 1 && item.payStatus === '支付成功'">
+						<span class="color-primary" v-if="!item.invoice" @click="applyInvoice(item)">
+							开具发票
+						</span>
+						<span class="color-warning" v-else-if="!item.invoice.state">发票开具中</span>
+						<span class="color-success" style="cursor: pointer;" v-else @click="lookOrder(item)">
+							查看发票
+						</span>
+					</div>
 				</div>
 			</div>
 			<!-- 不可添加附件 -->
@@ -79,66 +88,59 @@
 		<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>
+			<pay-order v-if="dialogVisible" :orderNo="nowItem.proceOrderNo" @callback="callback"></pay-order>
+		</el-dialog>
+		<el-dialog :close-on-click-modal="false" :title="type === 1?'开具发票':'过程支付'" :visible.sync="visible" width="900px"
+			:append-to-body="true">
+			<edit v-if="visible && dialogType === 1" @callback="callback" :orderNo="nowItem.proceOrderNo"></edit>
+			<create-order v-if="visible && dialogType === 2" :serveId="nowItem.id" @callback="callback">
+			</create-order>
 		</el-dialog>
+		<el-drawer title="发票详情" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<invoice-detail v-if="drawer" :detailId="nowItem.invoice.id"></invoice-detail>
+		</el-drawer>
 	</div>
 </template>
 
 <script>
 	const processSetItem = () => import('./processSetItem.vue');
 	const upload = () => import('@/components/common/upload');
+	const createOrder = () => import('./createOrder.vue');
+	const edit = () => import('@/components/work/finace/invoice/apply/edit');
+	const invoiceDetail = () => import('@/components/work/finace/invoice/apply/detail');
 	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 {
-				dialogVisible: false,
-				order: {},
-				timeOut: null,
-				nowItem: {}
+				nowItem: {},
+				visible: false,
+				drawer: false,
+				detailId: '',
+				dialogType: 1,
+				dialogVisible: false
 			}
 		},
-		beforeDestroy() {
-			if (!this.timeOut) return;
-			clearTimeout(this.timeOut);
-			this.timeOut = null
-		},
 		mounted() {},
 		methods: {
-			payment(item) {
+			applyInvoice(item, type) {
+				this.dialogType = type || 1;
 				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();
-					}
-				})
+				this.visible = true;
+			},
+			lookOrder(item) {
+				this.nowItem = item;
+				this.drawer = true;
+			},
+			payment(item) {
+				console.log(item);
+				this.nowItem = item;
+				if (!item.proceOrderNo || item.payStatus === '超时已关闭') return this.applyInvoice(item, 2);
+				this.dialogVisible = true;
 			},
 			returnItemClass(item) {
 				let str = '';
@@ -191,20 +193,21 @@
 					}
 				})
 			},
-			callback(type,operationType) {
-				this.visible = false;
+			callback(type, operationType) {
+				if (type === 'init' || type === 'cancel') 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)
+					if (operationType === 'success') this.updateStatus(this.nowItem, 3);
 				}
+				if (type === 'init') this.edit('reload');
+				if (type === 'reload') this.edit('reload');
 			}
 		},
 		components: {
 			processSetItem,
 			upload,
+			createOrder,
+			edit,
+			invoiceDetail,
 			payOrder
 		}
 	}

+ 3 - 3
virgo.wzfrontend/workark/src/views/work/serve/list.vue

@@ -50,12 +50,12 @@
 							<div class="hui-table-operation">
 								<span v-if="nowTitle.id === 1 && scope.row.orderStatus === '支付成功'">
 									<span class="table-operation" v-if="!scope.row.invoice"
-										@click="applyInvoice(scope.row)" v-permission="'/work/serve/list/hightech/openInvoice'">
+										@click="applyInvoice(scope.row)" v-permission="`/work/serve/list/${$route.params.type}/openInvoice`">
 										开具发票
 									</span>
 									<span class="color-warning" v-else-if="!scope.row.invoice.state">开具中</span>
 									<span class="color-success" style="cursor: pointer;" v-else
-										@click="lookOrder(scope.row,2)" v-permission="'/work/serve/list/hightech/lookInvoice'">
+										@click="lookOrder(scope.row,2)" v-permission="`/work/serve/list/${$route.params.type}/lookInvoice`">
 										查看发票
 									</span>
 								</span>
@@ -65,7 +65,7 @@
 					<el-table-column label="操作" align="center" width="100">
 						<template slot-scope="scope">
 							<div class="hui-table-operation">
-								<span class="table-operation" v-permission="'/work/serve/list/hightech/detail'"
+								<span class="table-operation" v-permission="`/work/serve/list/${$route.params.type}/detail`"
 									@click="lookItem(scope.row,1)">
 									详情
 								</span>