whx 2 meses atrás
pai
commit
af00b5dae5
24 arquivos alterados com 148 adições e 42 exclusões
  1. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/index.html
  2. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/css/app.538b7ffd.css
  3. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/css/app.61388afc.css
  4. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1411.e21e9bb3.js
  5. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1654.5b7e64e9.js
  6. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1736.ec096a94.js
  7. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/2156.b12cecd1.js
  8. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/2288.b62b9e88.js
  9. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/2912.c6cbf799.js
  10. 1 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/1660.669df7cb.js
  11. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/4028.17cd36ec.js
  12. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/518.04db3141.js
  13. 0 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/6103.464ade7f.js
  14. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/7444.14414622.js
  15. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8484.2e1413d8.js
  16. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/8484.8d6a5d8a.js
  17. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/9279.329280fa.js
  18. 1 0
      virgo.wzfrontend/src/main/resources/static/workark/static/js/app.75c7b362.js
  19. 0 1
      virgo.wzfrontend/src/main/resources/static/workark/static/js/app.baaf8455.js
  20. 6 0
      virgo.wzfrontend/workark/src/assets/css/common.scss
  21. 34 3
      virgo.wzfrontend/workark/src/components/work/finace/invoice/apply/detail.vue
  22. 66 0
      virgo.wzfrontend/workark/src/components/work/finace/invoice/openInvoice.vue
  23. 24 23
      virgo.wzfrontend/workark/src/views/work/finance/invoice.vue
  24. 8 7
      virgo.wzfrontend/workark/src/views/work/serve/list.vue

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/index.html


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/css/app.538b7ffd.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/css/app.61388afc.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/1411.e21e9bb3.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/1654.5b7e64e9.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/1736.193d8eb1.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/1736.ec096a94.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/2156.b12cecd1.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/2288.fae3db32.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/2288.b62b9e88.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/2912.c6cbf799.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/1660.669df7cb.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/4028.17cd36ec.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/518.04db3141.js


virgo.wzfrontend/src/main/resources/static/workark/static/js/6103.153f9d57.js → virgo.wzfrontend/src/main/resources/static/workark/static/js/6103.464ade7f.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/7444.14414622.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/8484.2e1413d8.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/8484.8d6a5d8a.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/9279.329280fa.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/app.75c7b362.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/app.baaf8455.js


+ 6 - 0
virgo.wzfrontend/workark/src/assets/css/common.scss

@@ -290,6 +290,12 @@
 	color: $--color-danger;
 }
 
+.is-center{
+	.hui-state{
+		justify-content: center;
+	}
+}
+
 .hui-state {
 	display: flex;
 	align-items: center;

+ 34 - 3
virgo.wzfrontend/workark/src/components/work/finace/invoice/apply/detail.vue

@@ -54,6 +54,17 @@
 								</span>
 							</div>
 						</div>
+						<div class="hui-detail-item" v-if="detail.state === 1">
+							<div class="hui-detail-label">发票内容</div>
+							<div class="hui-detail-value">{{detail.content}}</div>
+						</div>
+						<div class="hui-detail-item" v-if="detail.state === 1">
+							<div class="hui-detail-label">发票文件</div>
+							<div class="hui-detail-value">
+								<upload :list="detail.file ? JSON.parse(detail.file) : []" type="preview">
+								</upload>
+							</div>
+						</div>
 					</div>
 				</div>
 			</div>
@@ -63,6 +74,11 @@
 				{{item.name}}
 			</el-button>
 		</div>
+		<el-dialog :close-on-click-modal="false" title="开具发票" :visible.sync="dialogVisible" width="900px"
+			:append-to-body="true">
+			<open-invoice v-if="dialogVisible" :detailId="detailId" @callback="callback">
+			</open-invoice>
+		</el-dialog>
 	</div>
 </template>
 
@@ -70,12 +86,15 @@
 	import {
 		getInvoiceDetailById
 	} from '@/api/finace'
+	const openInvoice = () => import('@/components/work/finace/invoice/openInvoice');
+	const upload = () => import('@/components/common/upload');
 	export default {
 		props: ['detailId', 'type'],
 		data() {
 			return {
 				detail: {},
-				activeList: []
+				activeList: [],
+				dialogVisible: false
 			}
 		},
 		mounted() {
@@ -83,6 +102,7 @@
 		},
 		methods: {
 			init() {
+				this.activeList = [];
 				getInvoiceDetailById(this.detailId).then(res => {
 					if (res.state) {
 						this.detail = res.data;
@@ -95,14 +115,25 @@
 				})
 			},
 			action(item) {
-				switch (item.state) {
+				switch (item.id) {
 					case 1:
-						this.$message.warning('功能开发中');
+						this.dialogVisible = true;
 						break;
 					default:
 						break;
 				}
+			},
+			callback(type) {
+				this.dialogVisible = false;
+				if (type === 'init') {
+					this.init();
+					this.$emit('callback', 'init')
+				}
 			}
+		},
+		components: {
+			openInvoice,
+			upload
 		}
 	}
 </script>

+ 66 - 0
virgo.wzfrontend/workark/src/components/work/finace/invoice/openInvoice.vue

@@ -0,0 +1,66 @@
+<template>
+	<div class="hui-flex hui-dialog">
+		<div class="hui-flex-box hui-dialog-content">
+			<el-form ref="form" :model="form" label-position="top">
+				<el-form-item label="发票内容" prop="content" :rules="[{required: true, message: '请输入发票内容'}]">
+					<el-input type="text" v-model="form.content" placeholder="请输入发票内容"></el-input>
+				</el-form-item>
+				<el-form-item label="发票文件" class="hui-textarea">
+					<upload ref="upload" type="insert" accept="*"></upload>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="hui-dialog-submit">
+			<el-button size="small" @click="$emit('callback')">取 消</el-button>
+			<el-button size="small" type="primary" @click="submit" :loading="loading">保 存</el-button>
+		</div>
+	</div>
+</template>
+
+<script>
+	import {
+		updateInvoice
+	} from '@/api/finace'
+	const upload = () => import('@/components/common/upload');
+	export default {
+		props: ['detailId'],
+		data() {
+			return {
+				form: {
+					content: '',
+					state: 1
+				},
+				visible: false,
+				loading: false,
+			}
+		},
+		mounted() {
+			this.form['id'] = this.detailId;
+		},
+		methods: {
+			submit() {
+				this.$refs.form.validate(valid => {
+					if (valid) {
+						if (!this.$refs.upload.fileList) return this.$message.warning('至少上传1个文件');
+						this.loading = true;
+						let postData = JSON.parse(JSON.stringify(this.form));
+						postData['file'] = JSON.stringify(this.$refs.upload.fileList);
+						updateInvoice(postData).then(this.successFunc)
+					}
+				});
+			},
+			successFunc(res) {
+				this.loading = false;
+				if (res.state) {
+					this.$message.success('操作成功');
+					this.$emit('callback', 'init');
+				}
+			}
+		},
+		components: {
+			upload
+		}
+	}
+</script>
+
+<style lang="scss"></style>

+ 24 - 23
virgo.wzfrontend/workark/src/views/work/finance/invoice.vue

@@ -53,7 +53,8 @@
 		</div>
 		<el-drawer :title=" type === 1?'订单详情':'发票详情'" :visible.sync="drawer" :size="400" :append-to-body="true">
 			<detail v-if="drawer && type === 1" :detailId="detailId" detailType="orderNo"></detail>
-			<invoice-detail v-if="drawer && type === 2" :detailId="detailId" :type="nowTitle.id"></invoice-detail>
+			<invoice-detail v-if="drawer && type === 2" :detailId="detailId" :type="nowTitle.id" @callback="callback">
+			</invoice-detail>
 		</el-drawer>
 	</div>
 </template>
@@ -67,8 +68,8 @@
 	const invoiceDetail = () => import('@/components/work/finace/invoice/apply/detail');
 	export default {
 		data() {
-			return {
-				titleData: [],
+			return {
+				titleData: [],
 				nowTitle: {},
 				tableData: [],
 				currPage: 1,
@@ -80,25 +81,25 @@
 				type: 1
 			}
 		},
-		mounted() {
-			this.titleData = [{
-				id: 1,
-				name: '我的发票'
-			}]
-			if (this.$store.getters.organization.facilitator === 1) {
-				this.titleData.push({
-					id: 2,
-					name: '待我开具'
-				})
-			}
+		mounted() {
+			this.titleData = [{
+				id: 1,
+				name: '我的发票'
+			}]
+			if (this.$store.getters.organization.facilitator === 1) {
+				this.titleData.push({
+					id: 2,
+					name: '待我开具'
+				})
+			}
 			this.nowTitle = this.titleData[0];
 			this.init();
 		},
 		methods: {
 			init() {
 				this.loading = true;
-				let filterOption = {};
-				if (this.nowTitle.id === 1) filterOption['organizationId'] = this.$store.getters.organization.id;
+				let filterOption = {};
+				if (this.nowTitle.id === 1) filterOption['organizationId'] = this.$store.getters.organization.id;
 				if (this.nowTitle.id === 2) filterOption['providerId'] = this.$store.getters.organization.id;
 				filterOption = Object.assign(filterOption, this.filterOption);
 				getInvoiceListByQueryAndPage(this.currPage, this.pageSize, filterOption).then(res => {
@@ -108,13 +109,13 @@
 					}
 					this.loading = false;
 				})
-			},
-			changeTitle(item) {
-				if (this.nowTitle.id === item.id) return;
-				this.nowTitle = item;
-				this.pageSize = 10;
-				this.currPage = 1;
-				this.init();
+			},
+			changeTitle(item) {
+				if (this.nowTitle.id === item.id) return;
+				this.nowTitle = item;
+				this.pageSize = 10;
+				this.currPage = 1;
+				this.init();
 			},
 			currentChange(currPage) {
 				this.currPage = currPage;

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

@@ -18,14 +18,14 @@
 					<el-table-column label="商品名称" prop="title"></el-table-column>
 					<el-table-column label="价格" prop="totalFee"></el-table-column>
 					<el-table-column label="创建时间" prop="createTime"></el-table-column>
-					<el-table-column label="支付状态" align="center">
+					<el-table-column label="支付状态" align="center" width="150">
 						<template slot-scope="scope">
 							<span :class="scope.row.orderStatus === '未支付'?'color-warning':'color-success'">
 								{{scope.row.orderStatus}}
 							</span>
 						</template>
 					</el-table-column>
-					<el-table-column label="订单状态">
+					<el-table-column label="订单状态" align="center" width="100">
 						<template slot-scope="scope">
 							<div class="hui-state" v-if="!scope.row.status">
 								<div class="hui-state-bage hui-state-info"></div>
@@ -33,7 +33,7 @@
 							</div>
 							<div class="hui-state" v-else-if="scope.row.status === 1">
 								<div class="hui-state-bage hui-state-waiting"></div>
-								<div class="hui-state-label">过程进行中</div>
+								<div class="hui-state-label">进行中</div>
 							</div>
 							<div class="hui-state" v-else-if="scope.row.status === 2">
 								<div class="hui-state-bage hui-state-success"></div>
@@ -41,7 +41,7 @@
 							</div>
 						</template>
 					</el-table-column>
-					<el-table-column label="订单发票" align="center" v-if="nowTitle.id === 1">
+					<el-table-column label="订单发票" align="center" v-if="nowTitle.id === 1" width="100">
 						<template slot-scope="scope">
 							<div class="hui-table-operation">
 								<span v-if="nowTitle.id === 1 && scope.row.orderStatus === '支付成功'">
@@ -50,14 +50,15 @@
 										开具发票
 									</span>
 									<span class="color-warning" v-else-if="!scope.row.invoice.state">开具中</span>
-									<span class="color-success" v-else @click="lookOrder(scope.row,2)">
+									<span class="color-success" style="cursor: pointer;" v-else
+										@click="lookOrder(scope.row,2)">
 										查看发票
 									</span>
 								</span>
 							</div>
 						</template>
 					</el-table-column>
-					<el-table-column label="操作" width="150">
+					<el-table-column label="操作" align="center" width="100">
 						<template slot-scope="scope">
 							<div class="hui-table-operation">
 								<span class="table-operation" v-permission="'/work/property/change/detail'"
@@ -184,7 +185,7 @@
 			},
 			lookOrder(data, type) {
 				this.type = type;
-				this.detailId = data.orderNo;
+				this.detailId = data.invoice.id;
 				this.drawer = true;
 			},
 			applyInvoice(data) {