@ditari/bsui 1.1.41 → 1.1.43

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.
@@ -0,0 +1,44 @@
1
+ <script setup lang="ts">
2
+ import { ref } from "vue";
3
+ const formState = ref({
4
+ code: ""
5
+ });
6
+ const rules = {
7
+ code: [
8
+ {
9
+ required: true
10
+ }
11
+ ]
12
+ };
13
+ const formRef = ref();
14
+ const validate = () => {
15
+ return new Promise<void>((resolve, reject) => {
16
+ formRef.value?.validate().then(() => {
17
+ resolve();
18
+ });
19
+ });
20
+ };
21
+
22
+ const onSearch = () => {};
23
+
24
+ defineExpose({
25
+ validate
26
+ });
27
+ </script>
28
+
29
+ <template>
30
+ <div>
31
+ <a-form ref="formRef" :model="formState" :rules="rules">
32
+ 32432
33
+ <a-form-item label="商品编码" name="code">
34
+ <a-input v-model:value="formState.code" allow-clear>
35
+ <template #suffix>
36
+ <search-outlined type="user" @click="onSearch" />
37
+ </template>
38
+ </a-input>
39
+ </a-form-item>
40
+ </a-form>
41
+ </div>
42
+ </template>
43
+
44
+ <style scoped></style>
@@ -58,241 +58,46 @@ export const useTable = () => {
58
58
  function _useColumns() {
59
59
  const columns = [
60
60
  {
61
- title: "运输方式",
62
- dataIndex: "plateNo",
63
- width: 150,
64
- tooltip: "true",
65
- tooltipTheme: "light",
66
- render: (h, params) => {
67
- // const name = matchNameById('bsw_trafMode', params.row.trafMode).name
68
- // return h('span', name)
61
+ title: "dd",
62
+ customRender: (text, record, index) => {
63
+ return "dd";
64
+ },
65
+ customCell: (_, index) => {
66
+ if (index === 2) {
67
+ return { rowSpan: 2 };
68
+ }
69
+ // These two are merged into above cell
70
+ if (index === 3) {
71
+ return { rowSpan: 0 };
72
+ }
73
+ if (index === 4) {
74
+ return { colSpan: 0 };
75
+ }
69
76
  }
70
77
  },
71
78
  {
72
- title: "车牌号",
73
- dataIndex: "plateNo",
74
- width: 150,
75
- align: "center"
76
- },
77
- {
78
- title: "进出口标识",
79
- dataIndex: "iEFlag",
80
-
81
- width: 120,
82
- render: (h: any, params: any) => {
83
- //
84
- // const rs = matchNameById("bsw_ie_flag", params.row.iEFlag);
85
- // return h('span', rs.name)
86
- }
87
- },
88
- {
89
- title: "预录入编号",
90
- dataIndex: "seqNo",
91
-
92
- width: 220,
93
- tooltip: "true",
94
- tooltipTheme: "light"
95
- },
96
- {
97
- title: "预申报单号",
98
- dataIndex: "preDecNo",
99
-
100
- width: 220,
101
- tooltip: "true",
102
- tooltipTheme: "light"
103
- },
104
- {
105
- title: "申报单编号",
106
- dataIndex: "declareId",
107
-
108
- width: 220,
109
- tooltip: "true",
110
- tooltipTheme: "light"
111
- },
112
- {
113
- title: "关区名称",
114
- dataIndex: "lshg",
115
-
116
- width: 100,
117
- render: (h: any, params: any) => {
118
- // const rs = matchNameById('ddl_cod_cus_customs', params.row.lshg)
119
- // return h('span', rs.name)
120
- }
121
- },
122
- {
123
- title: "场所名称",
124
- dataIndex: "frontiertrader",
125
- width: 120,
126
-
127
- tooltip: "true",
128
- tooltipTheme: "light",
129
- render: (h: any, params: any) => {
130
- // const rs = matchNameById('ddl_cod_biz_areas', params.row.frontiertrader)
131
- // return h('span', rs.name)
132
- }
133
- },
134
-
135
- {
136
- title: "商铺名称",
137
- dataIndex: "storeName",
138
- width: 150,
139
-
140
- tooltip: true,
141
- tooltipTheme: "light"
142
- },
143
-
144
- {
145
- title: "申报人类别",
146
- dataIndex: "declareType",
147
-
148
- width: 120,
149
- render: (h: any, params: any) => {
150
- //
151
- // const rs = matchNameById("bsw_dec_man_type", params.row.declareType);
152
- // return h('span', rs.name)
153
- }
154
- },
155
- {
156
- title: "合作社/互助组名称",
157
- dataIndex: "orgName",
158
- width: 160,
159
-
160
- tooltip: true,
161
- tooltipTheme: "light"
162
- },
163
- {
164
- title: "申报人姓名",
165
- dataIndex: "declareName",
166
-
167
- width: 200
168
- },
169
- {
170
- title: "申报人身份证",
171
- dataIndex: "ciphertextIdno",
172
-
173
- width: 200,
174
- render: (h: any, params: any) => {
175
- // return h('span', tmCardCord(params.row.ciphertextIdno))
176
- }
177
- },
178
- {
179
- title: "业务模式",
180
- dataIndex: "btrnbBizModecd",
181
-
182
- width: 120,
183
- render: (h: any, params: any) => {
184
- // const rs = matchNameById('bsw_btrnbBizModecd', params.row.btrnbBizModecd)
185
- // return h('span', rs.name)
186
- }
187
- },
188
- {
189
- title: "是否拼车",
190
- dataIndex: "carPool",
191
-
192
- width: 120,
193
- render: (h: any, params: any) => {
194
- // const rs = matchNameById('bsw_yes_no', params.row.carPool)
195
- // return h('span', rs.name)
196
- }
197
- },
198
-
199
- {
200
- title: "商品名称",
201
- dataIndex: "gNames",
202
-
203
- width: 200,
204
- tooltip: "true",
205
- tooltipTheme: "light"
206
- },
207
- {
208
- title: "货物总金额",
209
- dataIndex: "sumAmt",
210
-
211
- tooltip: "true",
212
- tooltipTheme: "light",
213
- width: 130
214
- },
215
- {
216
- title: "货物总毛重",
217
- dataIndex: "sumGrossWt",
218
-
219
- tooltip: "true",
220
- tooltipTheme: "light",
221
- width: 130
222
- },
223
- {
224
- title: "货物总净重",
225
- dataIndex: "sumNetWt",
226
-
227
- tooltip: "true",
228
- tooltipTheme: "light",
229
- width: 130
230
- },
231
- {
232
- title: "申报时间",
233
- dataIndex: "dclTime",
234
-
235
- width: 200
236
- },
237
- {
238
- title: "申报单类型",
239
- dataIndex: "dclType",
240
-
241
- width: 130,
242
-
243
- render: (h: any, params: any) => {
244
- // const rs = matchNameById("ddl_dcl_type", params.row.dclType);
245
- // return h("span", rs.name);
246
- }
247
- },
248
- {
249
- title: "单证ID",
250
79
  dataIndex: "id",
251
-
252
- tooltip: "true",
253
- tooltipTheme: "light",
254
- width: 100
255
- },
256
- {
257
- title: "申报失败描述",
258
- dataIndex: "dclFailDesc",
259
-
260
- width: 200,
261
- tooltip: "true",
262
- tooltipTheme: "light",
263
- fixed: "right"
80
+ title: "job",
81
+ customCell: (_, index) => {
82
+ if (index === 2) {
83
+ return { rowSpan: 2 };
84
+ }
85
+ // These two are merged into above cell
86
+ if (index === 3) {
87
+ return { rowSpan: 0 };
88
+ }
89
+ if (index === 4) {
90
+ return { colSpan: 0 };
91
+ }
92
+ }
264
93
  },
265
94
  {
266
- title: "申报状态",
267
- dataIndex: "recordStatus",
268
-
269
- width: 120,
270
- fixed: "right",
271
- render: (h: any, params: any) => {
272
- // const rs = matchNameById("ddl_record_status", params.row.recordStatus);
273
- // const color = matchColor(params.row.recordStatus);
274
- // return h("div", [
275
- // h("span", { class: ["ivu-badge-status-dot", color.dotColor] }),
276
- // h("span", { class: [color.txtColor] }, rs.name)
277
- // ]);
278
- }
95
+ dataIndex: "name",
96
+ title: "name"
279
97
  },
280
-
281
98
  {
282
- title: "状态",
283
- dataIndex: "status",
284
- width: 160,
285
- tooltip: "true",
286
- tooltipTheme: "light",
287
- fixed: "right",
288
- render: (h: any, params: any) => {
289
- // const rs = matchNameById("bsw_status_0103", params.row.status);
290
- // const color = matchColor(params.row.status);
291
- // return h("div", [
292
- // h("span", { class: ["ivu-badge-status-dot", color.dotColor] }),
293
- // h("span", { class: [color.txtColor] }, rs.name)
294
- // ]);
295
- }
99
+ dataIndex: "job",
100
+ title: "job"
296
101
  }
297
102
  ];
298
103
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditari/bsui",
3
- "version": "1.1.41",
3
+ "version": "1.1.43",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -47,7 +47,7 @@ function useReload() {
47
47
  stopHandleWatch = useWatch();
48
48
  // 卸载未缓存的组件
49
49
  onUnmounted(() => {
50
- stopHandleWatch();
50
+ stopHandleWatch && stopHandleWatch();
51
51
  });
52
52
  } else {
53
53
  // 激活缓存页面
@@ -60,7 +60,7 @@ function useReload() {
60
60
  });
61
61
  // 离开缓存页面
62
62
  onDeactivated(() => {
63
- stopHandleWatch();
63
+ stopHandleWatch && stopHandleWatch();
64
64
  });
65
65
  }
66
66
  }
@@ -16,10 +16,13 @@ const props = withDefaults(
16
16
  close?: boolean;
17
17
  // 请求数据的时候开启加载效果
18
18
  loading?: boolean;
19
+ // 是否显示返回按钮
20
+ showBack?: boolean;
19
21
  }>(),
20
22
  {
21
23
  close: false,
22
- loading: false
24
+ loading: false,
25
+ showBak: true
23
26
  }
24
27
  );
25
28
 
@@ -99,6 +102,7 @@ defineExpose({
99
102
  size="large"
100
103
  >
101
104
  <a-page-header
105
+ v-if="showBack"
102
106
  class="ditari-page-header"
103
107
  :class="{ active: y > 0 }"
104
108
  :ghost="false"
@@ -4,4 +4,32 @@
4
4
  @import "./main";
5
5
  @import "./navtab";
6
6
  @import "./show";
7
- @import "./fuckmain";
7
+ @import "./fuckmain";
8
+
9
+ .fade-enter-active,
10
+ .fade-leave-active {
11
+ transition: opacity 0.1s ease;
12
+ }
13
+
14
+ .fade-enter-from,
15
+ .fade-leave-to {
16
+ opacity: 0;
17
+ }
18
+
19
+ .main-enter-active {
20
+ transition: 0.2s;
21
+ }
22
+
23
+ .main-leave-active {
24
+ transition: 0.15s;
25
+ }
26
+
27
+ .main-enter-from {
28
+ opacity: 0;
29
+ margin-left: -20px;
30
+ }
31
+
32
+ .main-leave-to {
33
+ opacity: 0;
34
+ margin-left: 20px;
35
+ }
@@ -23,33 +23,7 @@
23
23
  margin-top: 84px;
24
24
  }
25
25
  }
26
- .fade-enter-active,
27
- .fade-leave-active {
28
- transition: opacity 0.1s ease;
29
- }
30
-
31
- .fade-enter-from,
32
- .fade-leave-to {
33
- opacity: 0;
34
- }
35
-
36
- .main-enter-active {
37
- transition: 0.2s;
38
- }
39
26
 
40
- .main-leave-active {
41
- transition: 0.15s;
42
- }
43
-
44
- .main-enter-from {
45
- opacity: 0;
46
- margin-left: -20px;
47
- }
48
-
49
- .main-leave-to {
50
- opacity: 0;
51
- margin-left: 20px;
52
- }
53
27
 
54
28
  .ditari-layout-header {
55
29
  display: flex;
@@ -204,6 +204,9 @@ const DXTable = defineComponent({
204
204
  }
205
205
  });
206
206
  }
207
+ },
208
+ {
209
+ immediate: true
207
210
  }
208
211
  );
209
212
 
@@ -289,23 +292,6 @@ const DXTable = defineComponent({
289
292
 
290
293
  const rowSelection = ref<any>(undefined);
291
294
 
292
- // watchEffect(() => {
293
- // const { selection } = props.config;
294
- // localSelection = selection as any;
295
- // if (localSelection !== "N") {
296
- // rowSelection.value = {
297
- // selectedRowKeys,
298
- // onSelect,
299
- // onSelectAll,
300
- // fixed: true,
301
- // columnTitle: localSelection === "S" ? "选择" : null,
302
- // columnWidth: localSelection === "S" ? 60 : 40,
303
- // getCheckboxProps: getCheckboxProps
304
- // };
305
- // } else {
306
- // rowSelection.value = undefined;
307
- // }
308
- // });
309
295
  watch(
310
296
  () => props.config.selection,
311
297
  (val) => {