vue2-client 1.14.4 → 1.14.6

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,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.14.4",
3
+ "version": "1.14.6",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -0,0 +1,81 @@
1
+ <template>
2
+ <a-form :model="invoiceData" ref="invoiceForm" label-col="{ span: 4 }" wrapper-col="{ span: 14 }">
3
+ <!-- 卖方信息 -->
4
+ <a-form-item label="卖方信息">
5
+ <a-input v-model="invoiceData.seller" placeholder="请输入卖方信息"></a-input>
6
+ </a-form-item>
7
+
8
+ <!-- 买方信息 -->
9
+ <a-form-item label="买方信息">
10
+ <a-input v-model="invoiceData.buyer" placeholder="请输入买方信息"></a-input>
11
+ </a-form-item>
12
+
13
+ <!-- 项目明细 -->
14
+ <a-form-item label="项目明细">
15
+ <div v-for="(item, index) in invoiceData.items" :key="index" class="item-row">
16
+ <a-input v-model="item.name" placeholder="项目名称" style="width: 20%; margin-right: 10px;"></a-input>
17
+ <a-input v-model="item.quantity" placeholder="数量" style="width: 15%; margin-right: 10px;"></a-input>
18
+ <a-input v-model="item.price" placeholder="单价" style="width: 20%; margin-right: 10px;"></a-input>
19
+ <a-input v-model="item.tax" placeholder="税额" style="width: 20%;"></a-input>
20
+ </div>
21
+ <a-button type="dashed" @click="addItem" style="margin-top: 10px;">添加项目</a-button>
22
+ </a-form-item>
23
+
24
+ <!-- 合计金额 -->
25
+ <a-form-item label="合计金额">
26
+ <a-input v-model="invoiceData.total" placeholder="合计金额"></a-input>
27
+ </a-form-item>
28
+
29
+ <!-- 备注 -->
30
+ <a-form-item label="备注">
31
+ <a-input v-model="invoiceData.remarks" placeholder="请输入备注"></a-input>
32
+ </a-form-item>
33
+ <!-- 操作按钮 -->
34
+ <a-form-item wrapper-col="{ span: 14, offset: 4 }">
35
+ <a-button type="primary" @click="submitInvoice">开票</a-button>
36
+ <a-button style="margin-left: 8px;" @click="saveDraft">保存草稿</a-button>
37
+ </a-form-item>
38
+ </a-form>
39
+ </template>
40
+
41
+ <script>
42
+ export default {
43
+ name: 'InvoiceComponent',
44
+ data () {
45
+ return {
46
+ // 发票数据模型
47
+ invoiceData: {
48
+ seller: '', // 卖方信息
49
+ buyer: '', // 买方信息
50
+ items: [ // 项目明细
51
+ { name: '', quantity: '', price: '', tax: '' }
52
+ ],
53
+ total: '', // 合计金额
54
+ remarks: '' // 备注
55
+ }
56
+ }
57
+ },
58
+ methods: {
59
+ // 添加项目明细
60
+ addItem () {
61
+ this.invoiceData.items.push({ name: '', quantity: '', price: '', tax: '' })
62
+ },
63
+ // 提交发票
64
+ submitInvoice () {
65
+ console.log('开票数据: ', this.invoiceData)
66
+ // 在此处执行发票提交的逻辑
67
+ },
68
+ // 保存草稿
69
+ saveDraft () {
70
+ console.log('保存草稿: ', this.invoiceData)
71
+ // 在此处执行保存草稿的逻辑
72
+ }
73
+ }
74
+ }
75
+ </script>
76
+
77
+ <style scoped>
78
+ .item-row {
79
+ margin-bottom: 10px;
80
+ }
81
+ </style>
@@ -200,8 +200,7 @@ export default {
200
200
  const values = []
201
201
  if (extra.allCheckedNodes) {
202
202
  for (const item of extra.allCheckedNodes) {
203
- if (item.node.key) {
204
- // if (item.node.key && item.node?.data?.props?.label !== item.node?.data?.props?.value) {
203
+ if (item.node.key && (item.node?.data?.props?.label !== item.node?.data?.props?.value && item.children && item.children.length)) {
205
204
  values.push(`${item.node.key}`)
206
205
  }
207
206
  if (item.children && item.children.length) {
@@ -30,7 +30,7 @@
30
30
 
31
31
  <script>
32
32
 
33
- import { runLogic } from '@vue2-client/services/api/common'
33
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
34
34
 
35
35
  export default {
36
36
  name: 'XList',
@@ -55,13 +55,16 @@ export default {
55
55
  },
56
56
  methods: {
57
57
  async getData (config) {
58
- runLogic(config, {}, 'af-his').then(res => {
59
- this.button = res.button
60
- this.icon = res.icon
61
- this.buttonNames = res.buttonNames || []
62
- this.buttonMode = res.buttonMode || false
63
- this.data = res.data
58
+ const that = this
59
+ getConfigByName(config, 'af-his', res => {
60
+ that.button = res.button
61
+ that.icon = res.icon
62
+ that.buttonNames = res.buttonNames || []
63
+ that.buttonMode = res.buttonMode || false
64
+ runLogic(res.data, {}, 'af-his').then(ress => {
65
+ that.data = ress
64
66
  })
67
+ })
65
68
  },
66
69
  handleClick (index) {
67
70
  this.$emit('listClick', this.data[index])
@@ -132,14 +132,14 @@ export default {
132
132
  currentCol = currentCol.parentNode
133
133
  }
134
134
  if (currentCol) {
135
- // 更新当前列的宽度
135
+ // 更新当前列的宽度
136
136
  const drawerWidth = isOpen ? 33.3 : 2
137
137
  // 强制更新样式
138
138
  currentCol.style.cssText = `
139
139
  flex: 0 0 ${drawerWidth}% !important;
140
140
  max-width: ${drawerWidth}% !important;
141
141
  transition: all 0.3s;`
142
- // 触发XTab组件重新计算宽度
142
+ // 触发XTab组件重新计算宽度
143
143
  this.$nextTick(() => {
144
144
  const tabComponent = this.$el.querySelector('.ant-tabs')
145
145
  if (tabComponent) {
@@ -147,7 +147,7 @@ export default {
147
147
  window.dispatchEvent(new Event('resize'))
148
148
  }
149
149
  })
150
- // 更新其他列宽度
150
+ // 更新其他列宽度
151
151
  otherCols.forEach((col, index) => {
152
152
  if (index < this.mainWithData.length) {
153
153
  const widthValue = isOpen ? this.mainWithData[index].min : this.mainWithData[index].max
@@ -59,7 +59,7 @@ routerResource.example = {
59
59
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
60
60
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
61
61
  // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
62
- // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
62
+ component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
63
63
  // component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
64
64
  // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
65
65
  // component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
@@ -74,7 +74,7 @@ routerResource.example = {
74
74
  // component: () => import('@vue2-client/components/g2Charts/demo.vue'),
75
75
  // component: () => import('@vue2-client/pages/LogicCallExample/index.vue'),
76
76
  // component: () => import('@vue2-client/components/FilePreview/FilePreviewDemo.vue'),
77
- component: () => import('@vue2-client/pages/ReportGrid/index.vue'),
77
+ // component: () => import('@vue2-client/pages/ReportGrid/index.vue'),
78
78
  }
79
79
  // routerResource.example = () =>
80
80
  // import('@vue2-client/pages/Example')