@nstc-business/tbm 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,81 +1,80 @@
1
- {
2
- "name": "@nstc-business/tbm",
3
- "version": "1.0.8",
4
- "private": false,
5
- "main": "src/index.js",
6
- "scripts": {
7
- "serve": "vue-cli-service serve",
8
- "test": "vue-cli-service serve --test",
9
- "deadcode": "vue-cli-service serve --seecode",
10
- "analy": "vue-cli-service build --analy",
11
- "getI18n": "node ./node_modules/nstc-get-i18n",
12
- "format": "prettier --write \"./**/*.{html,vue,ts,js,json,md}\"",
13
- "build": "vue-cli-service build"
14
- },
15
- "publishConfig": {
16
- "access": "public"
17
- },
18
- "dependencies": {
19
- "axios": "^0.21.4",
20
- "core-js": "^3.6.5",
21
- "dayjs": "^1.10.7",
22
- "el-table-draggable": "^1.4.4",
23
- "element-ui": "^2.15.6",
24
- "numerify": "*",
25
- "n20-common-lib": "2.7.57",
26
- "vxe-table": "^3.6.17",
27
- "qrcode": "^1.5.0",
28
- "resize-detector": "^0.3.0",
29
- "vue": "^2.6.11",
30
- "vue-router": "^3.5.2",
31
- "vuedraggable": "^2.24.3",
32
- "vuex": "^3.6.2"
33
- },
34
- "files": [
35
- "src/components",
36
- "src/index.js"
37
- ],
38
- "devDependencies": {
39
- "@babel/plugin-proposal-optional-chaining": "^7.14.5",
40
- "@babel/plugin-transform-flow-comments": "^7.14.5",
41
- "@vue/cli-plugin-babel": "~4.5.0",
42
- "@vue/cli-plugin-eslint": "~4.5.0",
43
- "@vue/cli-service": "~4.5.0",
44
- "@vue/compiler-sfc": "^3.0.0-rc.6",
45
- "babel-eslint": "^10.1.0",
46
- "babel-plugin-component": "^1.1.1",
47
- "compression-webpack-plugin": "^3.1.0",
48
- "copy-webpack-plugin": "^6.4.1",
49
- "eslint": "^6.7.2",
50
- "prettier": "^3.0.3",
51
- "husky": "^8.0.0",
52
- "eslint-plugin-vue": "^6.2.2",
53
- "less": "^3.12.2",
54
- "nstc-gitinfo": "^0.0.9",
55
- "nstc-get-i18n": "^0.0.3",
56
- "less-loader": "^7.0.0",
57
- "vue-template-compiler": "^2.6.11",
58
- "webpack": "^4.46.0",
59
- "webpack-bundle-analyzer": "^3.9.0",
60
- "webpack-deadcode-plugin": "^0.1.15"
61
- },
62
- "eslintConfig": {
63
- "root": true,
64
- "env": {
65
- "node": true
66
- },
67
- "extends": [
68
- "plugin:vue/essential",
69
- "eslint:recommended"
70
- ],
71
- "parserOptions": {
72
- "parser": "babel-eslint"
73
- },
74
- "rules": {}
75
- },
76
- "browserslist": [
77
- "> 1%",
78
- "last 2 versions",
79
- "not dead"
80
- ]
81
- }
1
+ {
2
+ "name": "@nstc-business/tbm",
3
+ "version": "1.0.9",
4
+ "private": false,
5
+ "main": "src/index.js",
6
+ "scripts": {
7
+ "serve": "vue-cli-service serve",
8
+ "test": "vue-cli-service serve --test",
9
+ "deadcode": "vue-cli-service serve --seecode",
10
+ "analy": "vue-cli-service build --analy",
11
+ "getI18n": "node ./node_modules/nstc-get-i18n",
12
+ "format": "prettier --write \"./**/*.{html,vue,ts,js,json,md}\"",
13
+ "build": "vue-cli-service build"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "dependencies": {
19
+ "core-js": "^3.6.5",
20
+ "dayjs": "^1.10.7",
21
+ "el-table-draggable": "^1.4.4",
22
+ "qrcode": "^1.5.0",
23
+ "resize-detector": "^0.3.0",
24
+ "vue": "^2.6.11",
25
+ "vue-router": "^3.5.2",
26
+ "vuedraggable": "^2.24.3",
27
+ "vuex": "^3.6.2"
28
+ },
29
+ "files": [
30
+ "src/components",
31
+ "src/index.js"
32
+ ],
33
+ "devDependencies": {
34
+ "axios": "^0.21.4",
35
+ "element-ui": "^2.15.6",
36
+ "vxe-table": "^3.6.17",
37
+ "n20-common-lib": "2.7.57",
38
+ "@babel/plugin-proposal-optional-chaining": "^7.14.5",
39
+ "@babel/plugin-transform-flow-comments": "^7.14.5",
40
+ "@vue/cli-plugin-babel": "~4.5.0",
41
+ "@vue/cli-plugin-eslint": "~4.5.0",
42
+ "@vue/cli-service": "~4.5.0",
43
+ "@vue/compiler-sfc": "^3.0.0-rc.6",
44
+ "babel-eslint": "^10.1.0",
45
+ "babel-plugin-component": "^1.1.1",
46
+ "compression-webpack-plugin": "^3.1.0",
47
+ "copy-webpack-plugin": "^6.4.1",
48
+ "eslint": "^6.7.2",
49
+ "prettier": "^3.0.3",
50
+ "husky": "^8.0.0",
51
+ "eslint-plugin-vue": "^6.2.2",
52
+ "less": "^3.12.2",
53
+ "nstc-gitinfo": "^0.0.9",
54
+ "nstc-get-i18n": "^0.0.3",
55
+ "less-loader": "^7.0.0",
56
+ "vue-template-compiler": "^2.6.11",
57
+ "webpack": "^4.46.0",
58
+ "webpack-bundle-analyzer": "^3.9.0",
59
+ "webpack-deadcode-plugin": "^0.1.15"
60
+ },
61
+ "eslintConfig": {
62
+ "root": true,
63
+ "env": {
64
+ "node": true
65
+ },
66
+ "extends": [
67
+ "plugin:vue/essential",
68
+ "eslint:recommended"
69
+ ],
70
+ "parserOptions": {
71
+ "parser": "babel-eslint"
72
+ },
73
+ "rules": {}
74
+ },
75
+ "browserslist": [
76
+ "> 1%",
77
+ "last 2 versions",
78
+ "not dead"
79
+ ]
80
+ }
@@ -1,153 +1,208 @@
1
- <template>
2
- <N20-dialog v-drag width="80%" :destroy-on-close="true" max-dialog :visible.sync="invoiceVisible" title="发票详情">
3
- <N20-page>
4
- <template slot="header">
5
- <N20-tertiary-tab class="m-b-s m-t-s" :init.sync="name" :data="tabList" @click="clickTab" />
6
- </template>
7
- <div class="wrapperCss">
8
- <template v-if="name === '发票信息'">
9
- <div class="flex-box">
10
- <div class="wrapperLeft">
11
- <invoiceTemplateDetail v-model="formData"></invoiceTemplateDetail>
12
- </div>
13
-
14
- <div class="wrapperRight">
15
- <iframe class="invoiceImg" :src="'/api/onlinePreview?beid=' + beid" frameborder="0" v-if="beid"></iframe>
16
- <N20-empty :type="`empty`" content="暂无图片" :width="400" v-else></N20-empty>
17
- </div>
18
- </div>
19
- </template>
20
-
21
- <template v-if="name === '额度占用信息'">
22
- <quotaInfor :type="'invoice'" :tradeId="query.invoiceId"></quotaInfor>
23
- </template>
24
-
25
- <div class="tableHeight">
26
- <occupationLog :invoiceId="query.invoiceId" v-if="name === '关联记录'"></occupationLog>
27
- <invoiceLog :sourceId="query.invoiceId" v-if="name === '发票操作记录'"></invoiceLog>
28
- </div>
29
- </div>
30
- </N20-page>
31
- </N20-dialog>
32
- </template>
33
-
34
- <script>
35
- import invoiceTemplateDetail from './invoiceTemplateDetail.vue'
36
- import quotaInfor from './quotaInfor.vue'
37
- import invoiceLog from './invoiceLog.vue'
38
- import occupationLog from './occupationLog.vue'
39
- export default {
40
- name: 'InvoiceDetail',
41
- props: {
42
- value: {
43
- require: true
44
- }
45
- },
46
- components: {
47
- quotaInfor,
48
- invoiceLog,
49
- invoiceTemplateDetail,
50
- occupationLog
51
- },
52
- data() {
53
- return {
54
- invoiceVisible: false,
55
- name: '发票信息',
56
- tabList: [{ name: '发票信息' }, { name: '额度占用信息' }, { name: '关联记录' }, { name: '发票操作记录' }],
57
- formData: {}, // 发票信息变量
58
- beid: '', // 发票附件fileId
59
- query: {}
60
- }
61
- },
62
- watch: {},
63
- created() {},
64
- methods: {
65
- async clickTab(item) {
66
- this.name = item.name
67
- },
68
-
69
- /**
70
- * @param data 调用示例setInfo({invoiceId:invoiceId}) invoiceId发票ID
71
- * @returns {Promise<void>} 获取发票信息并弹出发票详情窗口
72
- */
73
- setInfo(data) {
74
- this.name = '发票信息'
75
- this.formData = {}
76
- this.query = data
77
- this.setInvoice()
78
- this.invoiceVisible = true
79
- },
80
- /** 获取发票信息 */
81
- async setInvoice() {
82
- const { code, data } = await this.$axios.get(`/tbm/invoice-info/${this.query.invoiceId}`, {
83
- loading: false
84
- })
85
- if (code === 200) {
86
- this.formData = data
87
- this.beid = data?.fileId
88
- }
89
- }
90
- }
91
- }
92
- </script>
93
- <style lang="less" scoped>
94
- .wrapperCss {
95
- height: 100%;
96
- .wrapperLeft {
97
- height: 100%;
98
- width: 500px;
99
- overflow-y: scroll;
100
- }
101
- .tableHeight {
102
- height: 450px;
103
- }
104
- .n20-empty {
105
- height: 98%;
106
- padding-bottom: 0;
107
- overflow: hidden;
108
- }
109
- .wrapperRight {
110
- height: 65vh;
111
- flex: 1;
112
- .agnc {
113
- text-align: center;
114
- }
115
- .upload-wrap,
116
- .invoiceImg {
117
- position: relative;
118
- flex: 1;
119
- height: 100%;
120
- border: 1px solid #ebeef5;
121
- width: 100%;
122
- border-radius: 5px;
123
- margin-left: 20px;
124
- overflow: auto;
125
- }
126
- .rotateCss {
127
- position: absolute;
128
- bottom: 88px;
129
- right: 40px;
130
- }
131
- .upload-wrap {
132
- position: relative;
133
- & > div {
134
- position: absolute;
135
- top: 50%;
136
- left: 50%;
137
- transform: translate(-50%, -50%);
138
- width: 450px;
139
- margin: 0 auto;
140
- & > p {
141
- font-size: 12px;
142
- color: #999;
143
- }
144
- }
145
- .upload-icon {
146
- cursor: pointer;
147
- color: #008df0;
148
- font-size: 50px;
149
- }
150
- }
151
- }
152
- }
153
- </style>
1
+ <template>
2
+ <Dialog v-drag width="80%" :destroy-on-close="true" max-dialog :visible.sync="invoiceVisible" title="发票详情">
3
+ <Page>
4
+ <template slot="header">
5
+ <tertiary-tab class="m-b-s m-t-s" :init.sync="name" :data="tabList" @click="clickTab"/>
6
+ </template>
7
+ <div class="wrapperCss">
8
+ <template v-if="name === '发票信息'">
9
+ <div class="flex-box">
10
+ <div class="wrapperLeft">
11
+ <invoiceTemplateDetail v-model="formData">
12
+ <template slot="endDate">
13
+ <el-descriptions-item label="查验结果">
14
+ <span
15
+ v-title="formData.inspectionMsg"
16
+ :class="
17
+ formData?.inspectionResult && formData?.inspectionResult?.code === '0000'
18
+ ? 'color-danger'
19
+ : formData?.inspectionResult && formData?.inspectionResult?.code === '0001'
20
+ ? 'color-success'
21
+ : ''
22
+ "
23
+ >
24
+ {{ (formData?.inspectionResult && formData?.inspectionResult?.name) || '--' }}
25
+ </span>
26
+ </el-descriptions-item>
27
+ <el-descriptions-item label="查验次数">
28
+ <el-link
29
+ v-if="formData.checkCount"
30
+ :underline="false"
31
+ type="primary"
32
+ class="text-ellipsis"
33
+ style="display: block"
34
+ @click="showInspection()"
35
+ >
36
+ {{ formData.checkCount }}
37
+ </el-link>
38
+ <span v-else>&#45;&#45;</span>
39
+ </el-descriptions-item>
40
+ </template>
41
+ </invoiceTemplateDetail>
42
+ </div>
43
+
44
+ <div class="wrapperRight">
45
+ <iframe class="invoiceImg" :src="'/api/onlinePreview?beid=' + beid" frameborder="0" v-if="beid"></iframe>
46
+ <empty :type="`empty`" content="暂无图片" :width="400" v-else></empty>
47
+ </div>
48
+ </div>
49
+ </template>
50
+
51
+ <template v-if="name === '额度占用信息'">
52
+ <quotaInfor :type="'invoice'" :tradeId="query.invoiceId"></quotaInfor>
53
+ </template>
54
+
55
+ <div class="tableHeight">
56
+ <occupationLog :invoiceId="query.invoiceId" v-if="name === '关联记录'"></occupationLog>
57
+ <invoiceLog :sourceId="query.invoiceId" v-if="name === '发票操作记录'"></invoiceLog>
58
+ </div>
59
+ </div>
60
+ </Page>
61
+ <!-- 查验次数 -->
62
+ <inspectionDialog ref="inspectionDialog"></inspectionDialog>
63
+ </Dialog>
64
+ </template>
65
+
66
+ <script>
67
+ import {Page, Dialog, TertiaryTab, Empty} from 'n20-common-lib'
68
+ import invoiceTemplateDetail from './invoiceTemplateDetail.vue'
69
+ import quotaInfor from './quotaInfor.vue'
70
+ import invoiceLog from './invoiceLog.vue'
71
+ import occupationLog from './occupationLog.vue'
72
+ import inspectionDialog from './subComponents/inspectionDialog.vue'
73
+
74
+ export default {
75
+ name: 'InvoiceDetail',
76
+ props: {
77
+ value: {
78
+ require: true
79
+ }
80
+ },
81
+ components: {
82
+ Page,
83
+ Dialog,
84
+ TertiaryTab,
85
+ Empty,
86
+ quotaInfor,
87
+ invoiceLog,
88
+ invoiceTemplateDetail,
89
+ occupationLog,
90
+ inspectionDialog
91
+ },
92
+ data() {
93
+ return {
94
+ invoiceVisible: false,
95
+ name: '发票信息',
96
+ tabList: [{name: '发票信息'}, {name: '额度占用信息'}, {name: '关联记录'}, {name: '发票操作记录'}],
97
+ formData: {}, // 发票信息变量
98
+ beid: '', // 发票附件fileId
99
+ query: {}
100
+ }
101
+ },
102
+ watch: {},
103
+ created() {
104
+ },
105
+ methods: {
106
+ async clickTab(item) {
107
+ this.name = item.name
108
+ },
109
+
110
+ /**
111
+ * @param data 调用示例setInfo({invoiceId:invoiceId}) invoiceId发票ID
112
+ * @returns {Promise<void>} 获取发票信息并弹出发票详情窗口
113
+ */
114
+ setInfo(data) {
115
+ this.name = '发票信息'
116
+ this.formData = {}
117
+ this.query = data
118
+ this.setInvoice()
119
+ this.invoiceVisible = true
120
+ },
121
+ /** 获取发票信息 */
122
+ async setInvoice() {
123
+ const {code, data} = await this.$axios.get(`/tbm/invoice-info/${this.query.invoiceId}`, {
124
+ loading: false
125
+ })
126
+ if (code === 200) {
127
+ this.formData = data
128
+ this.beid = data?.fileId
129
+ }
130
+ },
131
+ showInspection() {
132
+ this.$refs['inspectionDialog'].setView(this.formData)
133
+ }
134
+ }
135
+ }
136
+ </script>
137
+ <style lang="less" scoped>
138
+ .wrapperCss {
139
+ height: 100%;
140
+
141
+ .wrapperLeft {
142
+ height: 100%;
143
+ width: 500px;
144
+ overflow-y: scroll;
145
+ }
146
+
147
+ .tableHeight {
148
+ height: 450px;
149
+ }
150
+
151
+ .n20-empty {
152
+ height: 98%;
153
+ padding-bottom: 0;
154
+ overflow: hidden;
155
+ }
156
+
157
+ .wrapperRight {
158
+ height: 65vh;
159
+ flex: 1;
160
+
161
+ .agnc {
162
+ text-align: center;
163
+ }
164
+
165
+ .upload-wrap,
166
+ .invoiceImg {
167
+ position: relative;
168
+ flex: 1;
169
+ height: 100%;
170
+ border: 1px solid #ebeef5;
171
+ width: 100%;
172
+ border-radius: 5px;
173
+ margin-left: 20px;
174
+ overflow: auto;
175
+ }
176
+
177
+ .rotateCss {
178
+ position: absolute;
179
+ bottom: 88px;
180
+ right: 40px;
181
+ }
182
+
183
+ .upload-wrap {
184
+ position: relative;
185
+
186
+ & > div {
187
+ position: absolute;
188
+ top: 50%;
189
+ left: 50%;
190
+ transform: translate(-50%, -50%);
191
+ width: 450px;
192
+ margin: 0 auto;
193
+
194
+ & > p {
195
+ font-size: 12px;
196
+ color: #999;
197
+ }
198
+ }
199
+
200
+ .upload-icon {
201
+ cursor: pointer;
202
+ color: #008df0;
203
+ font-size: 50px;
204
+ }
205
+ }
206
+ }
207
+ }
208
+ </style>