@agile-team/wl-skills-kit 2.11.1 → 2.11.3
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/CHANGELOG.md +25 -0
- package/README.md +38 -21
- package/bin/wl-skills.js +27 -3
- package/files/.wl-skills/docs/jh-pagination.md +505 -505
- package/files/.wl-skills/docs/request.md +940 -940
- package/files/.wl-skills/docs/validate-exempt.md +113 -0
- package/files/.wl-skills/guides/architecture.md +1 -1
- package/files/.wl-skills/skills/_compat/headers/cursor-mdc.txt +1 -1
- package/files/.wl-skills/skills/_compat/headers/kiro.txt +1 -1
- package/files/.wl-skills/skills/_compat/headers/trae.txt +1 -1
- package/files/.wl-skills/skills/core/convention-audit/SKILL.md +3 -3
- package/files/.wl-skills/skills/core/spec-doc-parse/SKILL.md +332 -332
- package/files/.wl-skills/skills/core/spec-doc-parse/USAGE.md +97 -97
- package/files/.wl-skills/skills/sync/permission-sync/USAGE.md +107 -107
- package/files/.wl-skills/src/components/global/C_ParentView/index.vue +3 -3
- package/files/.wl-skills/src/components/global/C_RightToolbar/index.vue +157 -157
- package/files/.wl-skills/src/components/global/C_SvgIcon/index.vue +31 -31
- package/files/.wl-skills/src/components/global/C_SvgIcon/svgicon.js +10 -10
- package/files/.wl-skills/src/components/global/C_TagStatus/README.md +264 -264
- package/files/.wl-skills/src/components/global/C_TagStatus/config.ts +192 -192
- package/files/.wl-skills/src/components/global/C_TagStatus/index.vue +106 -106
- package/files/.wl-skills/src/components/global/C_TagStatus/types.ts +64 -64
- package/files/.wl-skills/src/components/global/C_Tree/README.md +153 -153
- package/files/.wl-skills/src/components/global/C_Tree/index.scss +42 -42
- package/files/.wl-skills/src/components/global/C_Tree/index.vue +78 -78
- package/files/.wl-skills/src/components/global/C_Tree/types.ts +59 -59
- package/files/.wl-skills/src/components/local/c_formModal/README.md +235 -235
- package/files/.wl-skills/src/components/local/c_formModal/data.ts +95 -95
- package/files/.wl-skills/src/components/local/c_formModal/index.scss +8 -8
- package/files/.wl-skills/src/components/local/c_formModal/index.vue +107 -107
- package/files/.wl-skills/src/components/local/c_formSections/data.ts +175 -175
- package/files/.wl-skills/src/components/local/c_formSections/index.scss +280 -280
- package/files/.wl-skills/src/components/local/c_formSections/index.vue +429 -429
- package/files/.wl-skills/src/components/local/c_listModal/data.ts +41 -41
- package/files/.wl-skills/src/components/local/c_listModal/index.vue +136 -136
- package/files/.wl-skills/src/components/local/c_spliterTitle/index.scss +25 -25
- package/files/.wl-skills/src/components/local/c_spliterTitle/index.vue +21 -21
- package/files/.wl-skills/src/components/remote/AGGrid/README.md +530 -530
- package/files/.wl-skills/src/components/remote/BaseForm/README.md +508 -508
- package/files/.wl-skills/src/components/remote/BaseQuery/README.md +865 -865
- package/files/.wl-skills/src/components/remote/BaseTable/README.md +941 -941
- package/files/.wl-skills/src/components/remote/BaseToolbar/README.md +496 -496
- package/files/.wl-skills/src/types/page.ts +24 -24
- package/files/.wl-skills/standards/04-coding-basics.md +39 -1
- package/files/.wl-skills/standards/09-typescript.md +26 -3
- package/files/.wl-skills/standards/12-base-table.md +56 -4
- package/files/.wl-skills/standards/13-platform-components.md +1 -0
- package/files/.wl-skills/standards/index.md +2 -2
- package/files/.wl-skills/templates/README.md +44 -44
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/api.md +54 -54
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/data.ts +346 -346
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.vue +28 -28
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/data.ts +115 -115
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.scss +44 -44
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.vue +43 -43
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/data.ts +338 -338
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.vue +28 -28
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/data.ts +115 -115
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.scss +44 -44
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.vue +43 -43
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/api.md +88 -88
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/data.ts +601 -601
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.vue +64 -64
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/api.md +67 -67
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/data.ts +286 -286
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.scss +139 -139
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.vue +318 -318
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/api.md +98 -98
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/data.ts +543 -543
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.vue +52 -52
- package/files/.wl-skills/templates/sale/demo/add-demo/data.ts +518 -518
- package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/data.ts +524 -524
- package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.scss +154 -154
- package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.vue +117 -117
- package/files/.wl-skills/templates/sale/demo/domestic-trade-order/data.ts +308 -308
- package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.scss +99 -99
- package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.vue +77 -77
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/data.ts +367 -367
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.scss +100 -100
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.vue +170 -170
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/meltDialog.vue +320 -320
- package/files/.wl-skills/templates/sale/demo/metallurgical-spec/data.ts +824 -824
- package/lib/ast-rules.js +395 -12
- package/mcp/config.js +46 -46
- package/mcp/registry.js +6 -1
- package/mcp/tools/projectTools.js +9 -1
- package/package.json +2 -2
|
@@ -1,308 +1,308 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: ChenYu ycyplus@gmail.com
|
|
3
|
-
* @Date: 2025-06-13 18:38:58
|
|
4
|
-
* @LastEditors: ChenYu ycyplus@gmail.com
|
|
5
|
-
* @LastEditTime: 2026-01-04 09:20:35
|
|
6
|
-
* @FilePath: \cx-ui-sale\src\views\sale\demo\domestic-trade-order\data.ts
|
|
7
|
-
* @Description: 内贸订单 - 数据逻辑层(配置和业务逻辑)
|
|
8
|
-
* Copyright (c) 2025 by CHENY, All Rights Reserved 😎.
|
|
9
|
-
*/
|
|
10
|
-
import type { Ref } from "vue";
|
|
11
|
-
import {
|
|
12
|
-
AbstractPageQueryHook,
|
|
13
|
-
BaseQueryItemDesc,
|
|
14
|
-
ActionButtonDesc,
|
|
15
|
-
TableColumnDesc,
|
|
16
|
-
BusLogicDataType
|
|
17
|
-
} from "@/types/page";
|
|
18
|
-
|
|
19
|
-
import type { BaseFormItemDesc } from "@jhlc/common-core/src/components/form/common/type";
|
|
20
|
-
import { useTableDelete } from "@/composables/useTableDelete";
|
|
21
|
-
|
|
22
|
-
// 表格渲染类型
|
|
23
|
-
export const renderType = ref<"dataTable" | "agGrid">("dataTable");
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* API 配置 - 统一管理所有接口地址
|
|
27
|
-
*/
|
|
28
|
-
export const API_CONFIG = {
|
|
29
|
-
list: "/api/domestic-trade-order/list",
|
|
30
|
-
remove: "/api/domestic-trade-order/remove",
|
|
31
|
-
getById: "/api/domestic-trade-order/getOneById",
|
|
32
|
-
save: "/api/domestic-trade-order/save",
|
|
33
|
-
update: "/api/domestic-trade-order/update"
|
|
34
|
-
} as const;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* 查询项配置
|
|
38
|
-
*/
|
|
39
|
-
export const queryItemsConfig: BaseQueryItemDesc<any>[] = [
|
|
40
|
-
{
|
|
41
|
-
name: "companyName",
|
|
42
|
-
label: "公司名称",
|
|
43
|
-
placeholder: "请选择"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "groupOrderNo",
|
|
47
|
-
label: "集团订单号",
|
|
48
|
-
placeholder: "请输入"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: "productionOrderNo",
|
|
52
|
-
label: "产销订单号",
|
|
53
|
-
placeholder: "请输入"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: "orderStatus",
|
|
57
|
-
label: "订单状态",
|
|
58
|
-
placeholder: "请选择",
|
|
59
|
-
logicType: BusLogicDataType.dict,
|
|
60
|
-
logicValue: "ORDER_STATUS"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
name: "dateRange",
|
|
64
|
-
type: "range",
|
|
65
|
-
startName: "startDate",
|
|
66
|
-
endName: "endDate",
|
|
67
|
-
label: "日期录入",
|
|
68
|
-
logicType: BusLogicDataType.date,
|
|
69
|
-
rangeSeparator: "至",
|
|
70
|
-
placeholder: "开始"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: "salesCompany",
|
|
74
|
-
label: "销售公司",
|
|
75
|
-
placeholder: "请选择",
|
|
76
|
-
logicType: BusLogicDataType.dict,
|
|
77
|
-
logicValue: "SALES_COMPANY"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "salesOrg",
|
|
81
|
-
label: "销售机构",
|
|
82
|
-
placeholder: "请选择",
|
|
83
|
-
logicType: BusLogicDataType.dict,
|
|
84
|
-
logicValue: "SALES_ORG"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name: "salesEmployeeId",
|
|
88
|
-
label: "销售员工号",
|
|
89
|
-
placeholder: "请选择",
|
|
90
|
-
logicType: BusLogicDataType.dict,
|
|
91
|
-
logicValue: "SALES_EMPLOYEE"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
name: "productSegment",
|
|
95
|
-
label: "产品板块",
|
|
96
|
-
placeholder: "请选择",
|
|
97
|
-
logicType: BusLogicDataType.dict,
|
|
98
|
-
logicValue: "PRODUCT_SEGMENT"
|
|
99
|
-
}
|
|
100
|
-
];
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Modal 弹窗配置
|
|
104
|
-
*/
|
|
105
|
-
export const modalConfig = {
|
|
106
|
-
titlePrefix: "内贸订单",
|
|
107
|
-
width: "850px",
|
|
108
|
-
columns: 2,
|
|
109
|
-
labelWidth: "110px",
|
|
110
|
-
formItems: [
|
|
111
|
-
{
|
|
112
|
-
name: "foreignTradeOrderNo",
|
|
113
|
-
label: "外贸订单号",
|
|
114
|
-
required: true,
|
|
115
|
-
placeholder: "请输入外贸订单号"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: "period",
|
|
119
|
-
label: "周期",
|
|
120
|
-
required: true,
|
|
121
|
-
placeholder: "请选择"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
name: "salesOrg",
|
|
125
|
-
label: "销售机构",
|
|
126
|
-
required: true,
|
|
127
|
-
placeholder: "请选择"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
name: "manufacturingBase",
|
|
131
|
-
label: "制造基地",
|
|
132
|
-
required: true,
|
|
133
|
-
placeholder: "请选择"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
name: "orderWeight",
|
|
137
|
-
label: "订单重量",
|
|
138
|
-
required: true,
|
|
139
|
-
placeholder: "请输入订单重量"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
name: "weightedAverage",
|
|
143
|
-
label: "加权平均",
|
|
144
|
-
placeholder: "请输入加权平均"
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
name: "settlementUser",
|
|
148
|
-
label: "结算用户",
|
|
149
|
-
required: true,
|
|
150
|
-
placeholder: "请输入结算用户"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
name: "finalUser",
|
|
154
|
-
label: "最终用户",
|
|
155
|
-
placeholder: "请输入最终用户"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
name: "orderStatus",
|
|
159
|
-
label: "订单状态",
|
|
160
|
-
required: true,
|
|
161
|
-
placeholder: "请选择"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
name: "merchandiser",
|
|
165
|
-
label: "跟单员",
|
|
166
|
-
placeholder: "请输入跟单员"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
name: "salesperson",
|
|
170
|
-
label: "销售员",
|
|
171
|
-
placeholder: "请输入销售员"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
name: "productionOrder",
|
|
175
|
-
label: "产销订单",
|
|
176
|
-
placeholder: "请输入产销订单"
|
|
177
|
-
}
|
|
178
|
-
] as BaseFormItemDesc<any>[],
|
|
179
|
-
api: {
|
|
180
|
-
getById: API_CONFIG.getById,
|
|
181
|
-
save: API_CONFIG.save,
|
|
182
|
-
update: API_CONFIG.update
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* 创建页面Hook实例
|
|
188
|
-
* @param modalRef 弹窗引用
|
|
189
|
-
*/
|
|
190
|
-
export function createPage(modalRef: Ref<any>) {
|
|
191
|
-
let Page = new (class extends AbstractPageQueryHook {
|
|
192
|
-
constructor() {
|
|
193
|
-
super({
|
|
194
|
-
url: {
|
|
195
|
-
list: API_CONFIG.list,
|
|
196
|
-
remove: API_CONFIG.remove
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// 查询项配置
|
|
202
|
-
queryDef(): BaseQueryItemDesc<any>[] {
|
|
203
|
-
return queryItemsConfig;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// 工具栏配置
|
|
207
|
-
toolbarDef(): ActionButtonDesc[] {
|
|
208
|
-
return [
|
|
209
|
-
{
|
|
210
|
-
name: "add",
|
|
211
|
-
label: "新增",
|
|
212
|
-
type: "primary",
|
|
213
|
-
onClick: () => modalRef.value?.open()
|
|
214
|
-
},
|
|
215
|
-
{ label: "整单复制", plain: true, onClick: () => {} },
|
|
216
|
-
{ label: "审核", type: "success", onClick: () => {} },
|
|
217
|
-
{ label: "价格审核", type: "success", onClick: () => {} },
|
|
218
|
-
{ label: "生效", type: "success", onClick: () => {} },
|
|
219
|
-
{ label: "绿通放行", type: "success", onClick: () => {} },
|
|
220
|
-
{ label: "生成采购计划", plain: true, onClick: () => {} },
|
|
221
|
-
{ label: "一键生成采购合同", plain: true, onClick: () => {} },
|
|
222
|
-
{ label: "天管订货产品确认函", plain: true, onClick: () => {} },
|
|
223
|
-
{ label: "同步产销订单", plain: true, onClick: () => {} },
|
|
224
|
-
{ label: "下发预处理", plain: true, onClick: () => {} },
|
|
225
|
-
{ label: "下发校验", plain: true, onClick: () => {} },
|
|
226
|
-
{ label: "技术、交期评审", plain: true, onClick: () => {} },
|
|
227
|
-
{ label: "合同分款", plain: true, onClick: () => {} },
|
|
228
|
-
{ label: "查看合同", plain: true, onClick: () => {} },
|
|
229
|
-
{ label: "退回", type: "danger", onClick: () => {} }
|
|
230
|
-
];
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// 表格列配置
|
|
234
|
-
columnsDef(): TableColumnDesc<any>[] {
|
|
235
|
-
const self = this;
|
|
236
|
-
const handleDelete = useTableDelete(API_CONFIG.remove, () =>
|
|
237
|
-
self.select()
|
|
238
|
-
);
|
|
239
|
-
|
|
240
|
-
return [
|
|
241
|
-
{ type: "selection", width: 55 },
|
|
242
|
-
{ label: "外贸订单号", name: "foreignTradeOrderNo", minWidth: 150 },
|
|
243
|
-
{
|
|
244
|
-
label: "周期",
|
|
245
|
-
name: "period",
|
|
246
|
-
minWidth: 80,
|
|
247
|
-
align: "center",
|
|
248
|
-
defaultSlot: ({ row }: any) => {
|
|
249
|
-
return h(
|
|
250
|
-
resolveComponent("ElTag") as any,
|
|
251
|
-
{ type: "danger", effect: "light", size: "small" },
|
|
252
|
-
() => row.period
|
|
253
|
-
);
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
{ label: "销售机构", name: "salesOrg", minWidth: 120 },
|
|
257
|
-
{ label: "制造基地", name: "manufacturingBase", minWidth: 120 },
|
|
258
|
-
{
|
|
259
|
-
label: "订单重量",
|
|
260
|
-
name: "orderWeight",
|
|
261
|
-
minWidth: 100,
|
|
262
|
-
align: "right"
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
label: "加权平均",
|
|
266
|
-
name: "weightedAverage",
|
|
267
|
-
minWidth: 100,
|
|
268
|
-
align: "right"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
label: "结算用户",
|
|
272
|
-
name: "settlementUser",
|
|
273
|
-
minWidth: 200,
|
|
274
|
-
showOverflowTooltip: true
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
label: "最终目的地",
|
|
278
|
-
name: "finalUser",
|
|
279
|
-
minWidth: 120,
|
|
280
|
-
showOverflowTooltip: true
|
|
281
|
-
},
|
|
282
|
-
{ label: "订单状态", name: "orderStatus", minWidth: 120 },
|
|
283
|
-
{ label: "跟单员", name: "merchandiser", minWidth: 90 },
|
|
284
|
-
{ label: "销售员", name: "salesperson", minWidth: 90 },
|
|
285
|
-
{ label: "产销订单", name: "productionOrder", minWidth: 120 },
|
|
286
|
-
{
|
|
287
|
-
label: "操作",
|
|
288
|
-
width: 150,
|
|
289
|
-
fixed: "right",
|
|
290
|
-
operations: [
|
|
291
|
-
{
|
|
292
|
-
name: "edit",
|
|
293
|
-
label: "编辑",
|
|
294
|
-
onClick: (row: any) => modalRef.value?.edit(row.id)
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
name: "remove",
|
|
298
|
-
label: "删除",
|
|
299
|
-
onClick: (row: any) => handleDelete({ id: row.id })
|
|
300
|
-
}
|
|
301
|
-
]
|
|
302
|
-
}
|
|
303
|
-
];
|
|
304
|
-
}
|
|
305
|
-
})();
|
|
306
|
-
|
|
307
|
-
return Page.create() as any;
|
|
308
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* @Author: ChenYu ycyplus@gmail.com
|
|
3
|
+
* @Date: 2025-06-13 18:38:58
|
|
4
|
+
* @LastEditors: ChenYu ycyplus@gmail.com
|
|
5
|
+
* @LastEditTime: 2026-01-04 09:20:35
|
|
6
|
+
* @FilePath: \cx-ui-sale\src\views\sale\demo\domestic-trade-order\data.ts
|
|
7
|
+
* @Description: 内贸订单 - 数据逻辑层(配置和业务逻辑)
|
|
8
|
+
* Copyright (c) 2025 by CHENY, All Rights Reserved 😎.
|
|
9
|
+
*/
|
|
10
|
+
import type { Ref } from "vue";
|
|
11
|
+
import {
|
|
12
|
+
AbstractPageQueryHook,
|
|
13
|
+
BaseQueryItemDesc,
|
|
14
|
+
ActionButtonDesc,
|
|
15
|
+
TableColumnDesc,
|
|
16
|
+
BusLogicDataType
|
|
17
|
+
} from "@/types/page";
|
|
18
|
+
|
|
19
|
+
import type { BaseFormItemDesc } from "@jhlc/common-core/src/components/form/common/type";
|
|
20
|
+
import { useTableDelete } from "@/composables/useTableDelete";
|
|
21
|
+
|
|
22
|
+
// 表格渲染类型
|
|
23
|
+
export const renderType = ref<"dataTable" | "agGrid">("dataTable");
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* API 配置 - 统一管理所有接口地址
|
|
27
|
+
*/
|
|
28
|
+
export const API_CONFIG = {
|
|
29
|
+
list: "/api/domestic-trade-order/list",
|
|
30
|
+
remove: "/api/domestic-trade-order/remove",
|
|
31
|
+
getById: "/api/domestic-trade-order/getOneById",
|
|
32
|
+
save: "/api/domestic-trade-order/save",
|
|
33
|
+
update: "/api/domestic-trade-order/update"
|
|
34
|
+
} as const;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 查询项配置
|
|
38
|
+
*/
|
|
39
|
+
export const queryItemsConfig: BaseQueryItemDesc<any>[] = [
|
|
40
|
+
{
|
|
41
|
+
name: "companyName",
|
|
42
|
+
label: "公司名称",
|
|
43
|
+
placeholder: "请选择"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "groupOrderNo",
|
|
47
|
+
label: "集团订单号",
|
|
48
|
+
placeholder: "请输入"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "productionOrderNo",
|
|
52
|
+
label: "产销订单号",
|
|
53
|
+
placeholder: "请输入"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "orderStatus",
|
|
57
|
+
label: "订单状态",
|
|
58
|
+
placeholder: "请选择",
|
|
59
|
+
logicType: BusLogicDataType.dict,
|
|
60
|
+
logicValue: "ORDER_STATUS"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "dateRange",
|
|
64
|
+
type: "range",
|
|
65
|
+
startName: "startDate",
|
|
66
|
+
endName: "endDate",
|
|
67
|
+
label: "日期录入",
|
|
68
|
+
logicType: BusLogicDataType.date,
|
|
69
|
+
rangeSeparator: "至",
|
|
70
|
+
placeholder: "开始"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "salesCompany",
|
|
74
|
+
label: "销售公司",
|
|
75
|
+
placeholder: "请选择",
|
|
76
|
+
logicType: BusLogicDataType.dict,
|
|
77
|
+
logicValue: "SALES_COMPANY"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "salesOrg",
|
|
81
|
+
label: "销售机构",
|
|
82
|
+
placeholder: "请选择",
|
|
83
|
+
logicType: BusLogicDataType.dict,
|
|
84
|
+
logicValue: "SALES_ORG"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "salesEmployeeId",
|
|
88
|
+
label: "销售员工号",
|
|
89
|
+
placeholder: "请选择",
|
|
90
|
+
logicType: BusLogicDataType.dict,
|
|
91
|
+
logicValue: "SALES_EMPLOYEE"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "productSegment",
|
|
95
|
+
label: "产品板块",
|
|
96
|
+
placeholder: "请选择",
|
|
97
|
+
logicType: BusLogicDataType.dict,
|
|
98
|
+
logicValue: "PRODUCT_SEGMENT"
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Modal 弹窗配置
|
|
104
|
+
*/
|
|
105
|
+
export const modalConfig = {
|
|
106
|
+
titlePrefix: "内贸订单",
|
|
107
|
+
width: "850px",
|
|
108
|
+
columns: 2,
|
|
109
|
+
labelWidth: "110px",
|
|
110
|
+
formItems: [
|
|
111
|
+
{
|
|
112
|
+
name: "foreignTradeOrderNo",
|
|
113
|
+
label: "外贸订单号",
|
|
114
|
+
required: true,
|
|
115
|
+
placeholder: "请输入外贸订单号"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "period",
|
|
119
|
+
label: "周期",
|
|
120
|
+
required: true,
|
|
121
|
+
placeholder: "请选择"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "salesOrg",
|
|
125
|
+
label: "销售机构",
|
|
126
|
+
required: true,
|
|
127
|
+
placeholder: "请选择"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "manufacturingBase",
|
|
131
|
+
label: "制造基地",
|
|
132
|
+
required: true,
|
|
133
|
+
placeholder: "请选择"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "orderWeight",
|
|
137
|
+
label: "订单重量",
|
|
138
|
+
required: true,
|
|
139
|
+
placeholder: "请输入订单重量"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "weightedAverage",
|
|
143
|
+
label: "加权平均",
|
|
144
|
+
placeholder: "请输入加权平均"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "settlementUser",
|
|
148
|
+
label: "结算用户",
|
|
149
|
+
required: true,
|
|
150
|
+
placeholder: "请输入结算用户"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "finalUser",
|
|
154
|
+
label: "最终用户",
|
|
155
|
+
placeholder: "请输入最终用户"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "orderStatus",
|
|
159
|
+
label: "订单状态",
|
|
160
|
+
required: true,
|
|
161
|
+
placeholder: "请选择"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "merchandiser",
|
|
165
|
+
label: "跟单员",
|
|
166
|
+
placeholder: "请输入跟单员"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: "salesperson",
|
|
170
|
+
label: "销售员",
|
|
171
|
+
placeholder: "请输入销售员"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: "productionOrder",
|
|
175
|
+
label: "产销订单",
|
|
176
|
+
placeholder: "请输入产销订单"
|
|
177
|
+
}
|
|
178
|
+
] as BaseFormItemDesc<any>[],
|
|
179
|
+
api: {
|
|
180
|
+
getById: API_CONFIG.getById,
|
|
181
|
+
save: API_CONFIG.save,
|
|
182
|
+
update: API_CONFIG.update
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* 创建页面Hook实例
|
|
188
|
+
* @param modalRef 弹窗引用
|
|
189
|
+
*/
|
|
190
|
+
export function createPage(modalRef: Ref<any>) {
|
|
191
|
+
let Page = new (class extends AbstractPageQueryHook {
|
|
192
|
+
constructor() {
|
|
193
|
+
super({
|
|
194
|
+
url: {
|
|
195
|
+
list: API_CONFIG.list,
|
|
196
|
+
remove: API_CONFIG.remove
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// 查询项配置
|
|
202
|
+
queryDef(): BaseQueryItemDesc<any>[] {
|
|
203
|
+
return queryItemsConfig;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// 工具栏配置
|
|
207
|
+
toolbarDef(): ActionButtonDesc[] {
|
|
208
|
+
return [
|
|
209
|
+
{
|
|
210
|
+
name: "add",
|
|
211
|
+
label: "新增",
|
|
212
|
+
type: "primary",
|
|
213
|
+
onClick: () => modalRef.value?.open()
|
|
214
|
+
},
|
|
215
|
+
{ label: "整单复制", plain: true, onClick: () => {} },
|
|
216
|
+
{ label: "审核", type: "success", onClick: () => {} },
|
|
217
|
+
{ label: "价格审核", type: "success", onClick: () => {} },
|
|
218
|
+
{ label: "生效", type: "success", onClick: () => {} },
|
|
219
|
+
{ label: "绿通放行", type: "success", onClick: () => {} },
|
|
220
|
+
{ label: "生成采购计划", plain: true, onClick: () => {} },
|
|
221
|
+
{ label: "一键生成采购合同", plain: true, onClick: () => {} },
|
|
222
|
+
{ label: "天管订货产品确认函", plain: true, onClick: () => {} },
|
|
223
|
+
{ label: "同步产销订单", plain: true, onClick: () => {} },
|
|
224
|
+
{ label: "下发预处理", plain: true, onClick: () => {} },
|
|
225
|
+
{ label: "下发校验", plain: true, onClick: () => {} },
|
|
226
|
+
{ label: "技术、交期评审", plain: true, onClick: () => {} },
|
|
227
|
+
{ label: "合同分款", plain: true, onClick: () => {} },
|
|
228
|
+
{ label: "查看合同", plain: true, onClick: () => {} },
|
|
229
|
+
{ label: "退回", type: "danger", onClick: () => {} }
|
|
230
|
+
];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// 表格列配置
|
|
234
|
+
columnsDef(): TableColumnDesc<any>[] {
|
|
235
|
+
const self = this;
|
|
236
|
+
const handleDelete = useTableDelete(API_CONFIG.remove, () =>
|
|
237
|
+
self.select()
|
|
238
|
+
);
|
|
239
|
+
|
|
240
|
+
return [
|
|
241
|
+
{ type: "selection", width: 55 },
|
|
242
|
+
{ label: "外贸订单号", name: "foreignTradeOrderNo", minWidth: 150 },
|
|
243
|
+
{
|
|
244
|
+
label: "周期",
|
|
245
|
+
name: "period",
|
|
246
|
+
minWidth: 80,
|
|
247
|
+
align: "center",
|
|
248
|
+
defaultSlot: ({ row }: any) => {
|
|
249
|
+
return h(
|
|
250
|
+
resolveComponent("ElTag") as any,
|
|
251
|
+
{ type: "danger", effect: "light", size: "small" },
|
|
252
|
+
() => row.period
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
{ label: "销售机构", name: "salesOrg", minWidth: 120 },
|
|
257
|
+
{ label: "制造基地", name: "manufacturingBase", minWidth: 120 },
|
|
258
|
+
{
|
|
259
|
+
label: "订单重量",
|
|
260
|
+
name: "orderWeight",
|
|
261
|
+
minWidth: 100,
|
|
262
|
+
align: "right"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
label: "加权平均",
|
|
266
|
+
name: "weightedAverage",
|
|
267
|
+
minWidth: 100,
|
|
268
|
+
align: "right"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
label: "结算用户",
|
|
272
|
+
name: "settlementUser",
|
|
273
|
+
minWidth: 200,
|
|
274
|
+
showOverflowTooltip: true
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
label: "最终目的地",
|
|
278
|
+
name: "finalUser",
|
|
279
|
+
minWidth: 120,
|
|
280
|
+
showOverflowTooltip: true
|
|
281
|
+
},
|
|
282
|
+
{ label: "订单状态", name: "orderStatus", minWidth: 120 },
|
|
283
|
+
{ label: "跟单员", name: "merchandiser", minWidth: 90 },
|
|
284
|
+
{ label: "销售员", name: "salesperson", minWidth: 90 },
|
|
285
|
+
{ label: "产销订单", name: "productionOrder", minWidth: 120 },
|
|
286
|
+
{
|
|
287
|
+
label: "操作",
|
|
288
|
+
width: 150,
|
|
289
|
+
fixed: "right",
|
|
290
|
+
operations: [
|
|
291
|
+
{
|
|
292
|
+
name: "edit",
|
|
293
|
+
label: "编辑",
|
|
294
|
+
onClick: (row: any) => modalRef.value?.edit(row.id)
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
name: "remove",
|
|
298
|
+
label: "删除",
|
|
299
|
+
onClick: (row: any) => handleDelete({ id: row.id })
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
];
|
|
304
|
+
}
|
|
305
|
+
})();
|
|
306
|
+
|
|
307
|
+
return Page.create() as any;
|
|
308
|
+
}
|