yindie-erp-mcp 2.0.3 → 2.0.5
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/dist/client.js +42 -0
- package/dist/craft/guide.js +54 -21
- package/dist/craft/template.js +68 -47
- package/dist/tool-meta.js +222 -106
- package/dist/tools-merged.js +30 -6
- package/dist/tools-write.js +1 -0
- package/dist/tools.js +147 -5
- package/package.json +3 -1
package/dist/client.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { mkdir, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { tmpdir } from 'node:os';
|
|
3
|
+
import { basename, join } from 'node:path';
|
|
1
4
|
/** ERP API 客户端 */
|
|
2
5
|
export class YindieClient {
|
|
3
6
|
/** 后端根地址 */
|
|
@@ -63,6 +66,45 @@ export class YindieClient {
|
|
|
63
66
|
async postForm(path, formFactory) {
|
|
64
67
|
return this.requestForm(path, formFactory);
|
|
65
68
|
}
|
|
69
|
+
/** 下载文件到临时目录,返回落盘路径 */
|
|
70
|
+
async download(method, path, fileName, options = {}, retried = false) {
|
|
71
|
+
const url = new URL(path, this.baseUrl);
|
|
72
|
+
for (const [key, value] of Object.entries(options.params ?? {})) {
|
|
73
|
+
if (value !== undefined && value !== '') {
|
|
74
|
+
url.searchParams.set(key, value);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const headers = {
|
|
78
|
+
Authorization: `Bearer ${this.token}`,
|
|
79
|
+
clientid: this.clientId
|
|
80
|
+
};
|
|
81
|
+
const init = { method, headers };
|
|
82
|
+
if (options.body !== undefined) {
|
|
83
|
+
headers['Content-Type'] = 'application/json';
|
|
84
|
+
init.body = JSON.stringify(options.body);
|
|
85
|
+
}
|
|
86
|
+
const response = await fetch(url, init);
|
|
87
|
+
const contentType = response.headers.get('content-type') ?? '';
|
|
88
|
+
if (contentType.includes('application/json')) {
|
|
89
|
+
const result = (await response.json());
|
|
90
|
+
if (result.code === 401 && !retried) {
|
|
91
|
+
this.token = await this.relogin();
|
|
92
|
+
return this.download(method, path, fileName, options, true);
|
|
93
|
+
}
|
|
94
|
+
throw new Error(result.msg || `下载失败: ${path}`);
|
|
95
|
+
}
|
|
96
|
+
if (!response.ok) {
|
|
97
|
+
throw new Error(`下载失败: ${path}(HTTP ${response.status})`);
|
|
98
|
+
}
|
|
99
|
+
const headerName = response.headers.get('download-filename');
|
|
100
|
+
const name = fileName ?? (headerName ? decodeURIComponent(headerName) : basename(path));
|
|
101
|
+
const bytes = Buffer.from(await response.arrayBuffer());
|
|
102
|
+
const dir = join(tmpdir(), 'yindie-erp-exports');
|
|
103
|
+
await mkdir(dir, { recursive: true });
|
|
104
|
+
const filePath = join(dir, basename(name));
|
|
105
|
+
await writeFile(filePath, bytes);
|
|
106
|
+
return { filePath, size: bytes.length };
|
|
107
|
+
}
|
|
66
108
|
/** 统一 HTTP 请求 */
|
|
67
109
|
async request(method, path, body, params, retried = false) {
|
|
68
110
|
const url = new URL(path, this.baseUrl);
|
package/dist/craft/guide.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { JACKET_STYLE_GROUPS, PANTS_STYLE_GROUPS } from './template.js';
|
|
2
2
|
/** 拼字段示例 */
|
|
3
3
|
function buildExample(item) {
|
|
4
|
-
if (item.control === 'fixed') {
|
|
5
|
-
return JSON.stringify({ input: item.fixedText || '' });
|
|
6
|
-
}
|
|
7
4
|
if (item.control === 'radio') {
|
|
8
5
|
const first = item.options?.[0] || '选项';
|
|
9
6
|
if (item.alwaysInput || item.inputWhen?.includes(first)) {
|
|
@@ -18,6 +15,13 @@ function buildExample(item) {
|
|
|
18
15
|
if (item.control === 'checkbox' && item.perItemSize) {
|
|
19
16
|
const opt = (item.options || []).find((o) => o !== (item.noneLabel || '无')) || item.options?.[0] || '领';
|
|
20
17
|
const size = item.sizeOptions?.[0] || '0.15';
|
|
18
|
+
if (item.gateNone) {
|
|
19
|
+
return JSON.stringify({
|
|
20
|
+
radio: '有',
|
|
21
|
+
checkbox: [opt],
|
|
22
|
+
combineMap: { [opt]: size },
|
|
23
|
+
});
|
|
24
|
+
}
|
|
21
25
|
return JSON.stringify({ checkbox: [opt], combineMap: { [opt]: size } });
|
|
22
26
|
}
|
|
23
27
|
if (item.control === 'checkbox' && item.perItemInput) {
|
|
@@ -28,7 +32,7 @@ function buildExample(item) {
|
|
|
28
32
|
return JSON.stringify({ checkbox: item.options?.slice(0, 2) || [] });
|
|
29
33
|
}
|
|
30
34
|
if (item.control === 'input') {
|
|
31
|
-
return JSON.stringify({ input: '填写内容' });
|
|
35
|
+
return JSON.stringify({ input: item.defaultInput || '填写内容' });
|
|
32
36
|
}
|
|
33
37
|
if (item.control === 'combine' && item.multiFill) {
|
|
34
38
|
const map = {};
|
|
@@ -53,9 +57,6 @@ function buildExample(item) {
|
|
|
53
57
|
}
|
|
54
58
|
/** 拼选择说明 */
|
|
55
59
|
function buildHowTo(item) {
|
|
56
|
-
if (item.control === 'fixed') {
|
|
57
|
-
return `固定文案:${item.fixedText || ''}`;
|
|
58
|
-
}
|
|
59
60
|
if (item.control === 'radio') {
|
|
60
61
|
let text = `单选其一:${(item.options || []).join('/')}`;
|
|
61
62
|
if (item.allowAdd) {
|
|
@@ -70,14 +71,21 @@ function buildHowTo(item) {
|
|
|
70
71
|
return text;
|
|
71
72
|
}
|
|
72
73
|
if (item.control === 'checkbox' && item.perItemSize) {
|
|
73
|
-
let text =
|
|
74
|
+
let text = '';
|
|
75
|
+
if (item.gateNone) {
|
|
76
|
+
text = '先选有/无;选「无」时 fieldValue={"radio":"无","checkbox":["无"]};选「有」后再';
|
|
77
|
+
}
|
|
78
|
+
text += `可多选部位:${(item.options || []).join('/')};勾选后每项再选尺寸 ${(item.sizeOptions || []).join('/')}`;
|
|
74
79
|
if (item.allowCustomSize) {
|
|
75
80
|
text += '或手填';
|
|
76
81
|
}
|
|
77
82
|
if (item.syncSizeOptions?.length) {
|
|
78
83
|
text += `;${item.syncSizeOptions.join('/')} 尺寸联动`;
|
|
79
84
|
}
|
|
80
|
-
if (item.
|
|
85
|
+
if (item.gateNone) {
|
|
86
|
+
text += ';有时 radio 固定为「有」';
|
|
87
|
+
}
|
|
88
|
+
else if (item.mutexNone) {
|
|
81
89
|
text += ';「无」与其它互斥';
|
|
82
90
|
}
|
|
83
91
|
return text;
|
|
@@ -100,9 +108,11 @@ function buildHowTo(item) {
|
|
|
100
108
|
return text;
|
|
101
109
|
}
|
|
102
110
|
if (item.control === 'input') {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
111
|
+
if (item.multiline) {
|
|
112
|
+
return `文本域自由填写${item.inputSuffix ? ',后缀 ' + item.inputSuffix : ''}`;
|
|
113
|
+
}
|
|
114
|
+
const suffix = item.inputSuffix ? `,后缀 ${item.inputSuffix}` : '';
|
|
115
|
+
return `输入框填写${suffix}${item.defaultInput ? `;默认「${item.defaultInput}」` : ''}`;
|
|
106
116
|
}
|
|
107
117
|
if (item.control === 'combine' && item.multiFill) {
|
|
108
118
|
const parts = (item.combineOptions || []).map((o) => `${o.label}${o.needValue ? '(旁填值' + (o.suffix || '') + ')' : ''}`);
|
|
@@ -139,15 +149,12 @@ function flattenGroups(garmentPart, groups) {
|
|
|
139
149
|
allowAdd: item.allowAdd,
|
|
140
150
|
multiFill: item.multiFill,
|
|
141
151
|
perItemSize: item.perItemSize,
|
|
152
|
+
gateNone: item.gateNone,
|
|
142
153
|
sizeOptions: item.sizeOptions,
|
|
143
154
|
syncSizeOptions: item.syncSizeOptions,
|
|
144
155
|
inputSuffix: item.inputSuffix,
|
|
145
156
|
multiline: item.multiline,
|
|
146
|
-
|
|
147
|
-
? 'radio=有 → 填 note'
|
|
148
|
-
: item.key === 'spareButton'
|
|
149
|
-
? 'radio=自己写 → 填 note'
|
|
150
|
-
: undefined,
|
|
157
|
+
defaultInput: item.defaultInput,
|
|
151
158
|
fieldValueExample: buildExample(item),
|
|
152
159
|
howToSelect: buildHowTo(item)
|
|
153
160
|
});
|
|
@@ -155,18 +162,44 @@ function flattenGroups(garmentPart, groups) {
|
|
|
155
162
|
}
|
|
156
163
|
return list;
|
|
157
164
|
}
|
|
165
|
+
/** 色卡白名单字段(与后端 ErpColorCardCatalog 一致) */
|
|
166
|
+
const COLOR_CARD_FIELDS = [
|
|
167
|
+
{ garmentPart: 'jacket', fieldKey: 'lining', titleCn: '里布' },
|
|
168
|
+
{ garmentPart: 'jacket', fieldKey: 'handkerchiefShow', titleCn: '手巾袋露出' },
|
|
169
|
+
{ garmentPart: 'jacket', fieldKey: 'fuse', titleCn: '粘衬' },
|
|
170
|
+
{ garmentPart: 'jacket', fieldKey: 'sleeveButton', titleCn: '袖扣' },
|
|
171
|
+
{ garmentPart: 'jacket', fieldKey: 'buttons', titleCn: '门襟大扣' },
|
|
172
|
+
{ garmentPart: 'jacket', fieldKey: 'sleeveLining', titleCn: '袖里' },
|
|
173
|
+
{ garmentPart: 'jacket', fieldKey: 'collarHang', titleCn: '领吊' },
|
|
174
|
+
{ garmentPart: 'jacket', fieldKey: 'collarBottom', titleCn: '领底' },
|
|
175
|
+
{ garmentPart: 'jacket', fieldKey: 'triangle', titleCn: '三角' },
|
|
176
|
+
{ garmentPart: 'jacket', fieldKey: 'weltClimb', titleCn: '嵌线袋小攀' },
|
|
177
|
+
{ garmentPart: 'jacket', fieldKey: 'innerPatch', titleCn: '里贴袋' },
|
|
178
|
+
{ garmentPart: 'jacket', fieldKey: 'pocketCloth', titleCn: '上衣口袋布' },
|
|
179
|
+
{ garmentPart: 'pants', fieldKey: 'crotchCloth', titleCn: '小裆布' },
|
|
180
|
+
{ garmentPart: 'pants', fieldKey: 'liningHas', titleCn: '脚绸' },
|
|
181
|
+
{ garmentPart: 'pants', fieldKey: 'backPocketStitch', titleCn: '后袋' },
|
|
182
|
+
{ garmentPart: 'pants', fieldKey: 'backSeam', titleCn: '裤后缝' },
|
|
183
|
+
{ garmentPart: 'pants', fieldKey: 'waistInnerStrip', titleCn: '腰里嵌条' },
|
|
184
|
+
{ garmentPart: 'pants', fieldKey: 'waistInnerMaterial', titleCn: '腰里材质' },
|
|
185
|
+
{ garmentPart: 'pants', fieldKey: 'pantsPocketCloth', titleCn: '裤子口袋布' },
|
|
186
|
+
{ garmentPart: 'pants', fieldKey: 'button', titleCn: '裤子纽扣' },
|
|
187
|
+
{ garmentPart: 'pants', fieldKey: 'hemTape', titleCn: '脚口织带' }
|
|
188
|
+
];
|
|
158
189
|
/** 工艺选择总指南 */
|
|
159
190
|
export const CRAFT_SELECTION_GUIDE = {
|
|
160
191
|
summary: '写工艺前先读本指南。fieldKey=指南里的 fieldKey;fieldValue=JSON 字符串,结构见各字段 fieldValueExample;craftModule=模块 key',
|
|
161
192
|
controls: {
|
|
162
|
-
radio: '单选 → {"radio":"选项"}
|
|
193
|
+
radio: '单选 → {"radio":"选项"};howToSelect 提示可填备注时再带 note',
|
|
163
194
|
checkbox: '多选 → {"checkbox":["a","b"]}',
|
|
164
195
|
'checkbox+perItemSize': '多选+尺寸 → {"checkbox":["领"],"combineMap":{"领":"0.15"}}',
|
|
165
|
-
|
|
196
|
+
'checkbox+gateNone': '先有无再多选 → 无:{"radio":"无","checkbox":["无"]};有:{"radio":"有","checkbox":["领"],"combineMap":{"领":"0.15"}}',
|
|
197
|
+
combine: '结合单选 → {"combineKey":"净脚口三折光压线","combineValue":"3"};needValue=false 可不带 combineValue',
|
|
166
198
|
'combine+multiFill': '多填 → {"combineMap":{"28L*":"2","24L*":"1"}}',
|
|
167
|
-
input: '输入 → {"input":"文案"}'
|
|
168
|
-
fixed: '固定文案,一般可不传'
|
|
199
|
+
input: '输入 → {"input":"文案"};各模块末尾 xxNote 备注、人工填写项同此'
|
|
169
200
|
},
|
|
201
|
+
colorCardFields: COLOR_CARD_FIELDS,
|
|
202
|
+
colorCardNote: '色卡选料写在 style_save colors[].colorCardJson(JSON 字符串,键=上面 fieldKey,值={materialCode,materialName,titleCn};pantsPocketCloth 列仅裤子前后袋工艺有值时可填)',
|
|
170
203
|
jacket: flattenGroups('jacket', JACKET_STYLE_GROUPS),
|
|
171
204
|
pants: flattenGroups('pants', PANTS_STYLE_GROUPS)
|
|
172
205
|
};
|
package/dist/craft/template.js
CHANGED
|
@@ -31,6 +31,7 @@ const MARK_ITEMS = [
|
|
|
31
31
|
{ label: '无', needValue: false },
|
|
32
32
|
],
|
|
33
33
|
},
|
|
34
|
+
{ key: 'markNote', label: '备注', control: 'input' },
|
|
34
35
|
];
|
|
35
36
|
/** 印花组字段 */
|
|
36
37
|
const PRINT_ITEMS = [
|
|
@@ -41,9 +42,10 @@ const PRINT_ITEMS = [
|
|
|
41
42
|
options: ['有', '无'],
|
|
42
43
|
},
|
|
43
44
|
{ key: 'printDetail', label: '印花位置及颜色', control: 'input' },
|
|
45
|
+
{ key: 'printNote', label: '备注', control: 'input' },
|
|
44
46
|
];
|
|
45
47
|
/** 制边部位 */
|
|
46
|
-
const EDGE_PARTS = ['领', '驳', '挂面止口', '手巾袋上', '袖口', '下摆', '开叉'];
|
|
48
|
+
const EDGE_PARTS = ['领', '驳', '挂面止口', '手巾袋上', '袋盖', '袖口', '下摆', '开叉'];
|
|
47
49
|
/** 裤子工艺字段 */
|
|
48
50
|
export const PANTS_STYLE_GROUPS = [
|
|
49
51
|
{
|
|
@@ -132,10 +134,14 @@ export const PANTS_STYLE_GROUPS = [
|
|
|
132
134
|
control: 'combine',
|
|
133
135
|
combineOptions: [
|
|
134
136
|
{
|
|
135
|
-
label: '
|
|
137
|
+
label: '净脚口三折光压线',
|
|
138
|
+
needValue: true,
|
|
139
|
+
suffix: 'CM',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
label: '净脚口内折撬边',
|
|
136
143
|
needValue: true,
|
|
137
144
|
suffix: 'CM',
|
|
138
|
-
textPrefix: '脚口',
|
|
139
145
|
},
|
|
140
146
|
{
|
|
141
147
|
label: '内撬',
|
|
@@ -166,6 +172,7 @@ export const PANTS_STYLE_GROUPS = [
|
|
|
166
172
|
alwaysInput: true,
|
|
167
173
|
inputPlaceholder: '特殊要求',
|
|
168
174
|
},
|
|
175
|
+
{ key: 'liningNote', label: '备注', control: 'input' },
|
|
169
176
|
],
|
|
170
177
|
},
|
|
171
178
|
{
|
|
@@ -192,8 +199,8 @@ export const PANTS_STYLE_GROUPS = [
|
|
|
192
199
|
label: '后袋',
|
|
193
200
|
control: 'combine',
|
|
194
201
|
combineOptions: [
|
|
195
|
-
{ label: '拷边', needValue:
|
|
196
|
-
{ label: '折光', needValue:
|
|
202
|
+
{ label: '拷边', needValue: true, suffix: '' },
|
|
203
|
+
{ label: '折光', needValue: true, suffix: '' },
|
|
197
204
|
{ label: '包边', needValue: true, suffix: '' },
|
|
198
205
|
],
|
|
199
206
|
},
|
|
@@ -214,6 +221,7 @@ export const PANTS_STYLE_GROUPS = [
|
|
|
214
221
|
{ label: '宽度', needValue: true, suffix: '' },
|
|
215
222
|
],
|
|
216
223
|
},
|
|
224
|
+
{ key: 'topstitchNote', label: '备注', control: 'input' },
|
|
217
225
|
],
|
|
218
226
|
},
|
|
219
227
|
{
|
|
@@ -237,6 +245,17 @@ export const PANTS_STYLE_GROUPS = [
|
|
|
237
245
|
inputWhen: ['其他'],
|
|
238
246
|
inputPlaceholder: '材质',
|
|
239
247
|
},
|
|
248
|
+
{
|
|
249
|
+
key: 'beadEdge',
|
|
250
|
+
label: '珠边',
|
|
251
|
+
control: 'combine',
|
|
252
|
+
textPrefix: '珠边',
|
|
253
|
+
combineOptions: [
|
|
254
|
+
{ label: '有', needValue: true, suffix: '', hideLabel: true },
|
|
255
|
+
{ label: '无', needValue: false },
|
|
256
|
+
],
|
|
257
|
+
},
|
|
258
|
+
{ key: 'waistInnerNote', label: '备注', control: 'input' },
|
|
240
259
|
],
|
|
241
260
|
},
|
|
242
261
|
{
|
|
@@ -265,26 +284,7 @@ export const PANTS_STYLE_GROUPS = [
|
|
|
265
284
|
control: 'radio',
|
|
266
285
|
options: ['卷边连腰', '卷边不连腰', '拷边'],
|
|
267
286
|
},
|
|
268
|
-
{
|
|
269
|
-
key: 'clothMaterial',
|
|
270
|
-
label: '袋布材质',
|
|
271
|
-
control: 'radio',
|
|
272
|
-
options: ['80棉20涤', '65棉35涤', '100涤', '100棉', '面料', '其他'],
|
|
273
|
-
inputWhen: ['其他'],
|
|
274
|
-
inputPlaceholder: '材质',
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
key: 'clothTexture',
|
|
278
|
-
label: '袋布纹理',
|
|
279
|
-
control: 'radio',
|
|
280
|
-
options: ['斜纹', '平纹', '人字纹', '网眼', '无'],
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
key: 'clothColor',
|
|
284
|
-
label: '袋布颜色',
|
|
285
|
-
control: 'radio',
|
|
286
|
-
options: ['配色', '黑', '藏青', '本白', '漂白'],
|
|
287
|
-
},
|
|
287
|
+
{ key: 'pocketFacingNote', label: '备注', control: 'input' },
|
|
288
288
|
],
|
|
289
289
|
},
|
|
290
290
|
{
|
|
@@ -329,8 +329,11 @@ export const PANTS_STYLE_GROUPS = [
|
|
|
329
329
|
key: 'bartackColor',
|
|
330
330
|
label: '配色',
|
|
331
331
|
control: 'radio',
|
|
332
|
-
options: ['套结配面料色'],
|
|
332
|
+
options: ['套结配面料色', '其他'],
|
|
333
|
+
inputWhen: ['其他'],
|
|
334
|
+
inputPlaceholder: '配色',
|
|
333
335
|
},
|
|
336
|
+
{ key: 'bartackNote', label: '备注', control: 'input' },
|
|
334
337
|
],
|
|
335
338
|
},
|
|
336
339
|
{ key: 'mark', label: '标识', items: MARK_ITEMS },
|
|
@@ -341,7 +344,7 @@ export const PANTS_STYLE_GROUPS = [
|
|
|
341
344
|
items: [
|
|
342
345
|
{
|
|
343
346
|
key: 'button',
|
|
344
|
-
label: '
|
|
347
|
+
label: '裤子纽扣',
|
|
345
348
|
control: 'combine',
|
|
346
349
|
multiFill: true,
|
|
347
350
|
combineOptions: [
|
|
@@ -400,6 +403,7 @@ export const PANTS_STYLE_GROUPS = [
|
|
|
400
403
|
{ label: '无', needValue: false },
|
|
401
404
|
],
|
|
402
405
|
},
|
|
406
|
+
{ key: 'accessoryNote', label: '备注', control: 'input' },
|
|
403
407
|
],
|
|
404
408
|
},
|
|
405
409
|
{
|
|
@@ -413,6 +417,7 @@ export const PANTS_STYLE_GROUPS = [
|
|
|
413
417
|
textPrefix: '挺缝线',
|
|
414
418
|
options: ['有', '无'],
|
|
415
419
|
},
|
|
420
|
+
{ key: 'creaseNote', label: '备注', control: 'input' },
|
|
416
421
|
],
|
|
417
422
|
},
|
|
418
423
|
{
|
|
@@ -466,6 +471,7 @@ export const PANTS_STYLE_GROUPS = [
|
|
|
466
471
|
control: 'radio',
|
|
467
472
|
options: ['挂装', '平箱有裤架', '平箱无裤架'],
|
|
468
473
|
},
|
|
474
|
+
{ key: 'packNote', label: '备注', control: 'input' },
|
|
469
475
|
],
|
|
470
476
|
},
|
|
471
477
|
];
|
|
@@ -526,9 +532,9 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
526
532
|
options: [
|
|
527
533
|
'贴袋',
|
|
528
534
|
'平袋有袋盖',
|
|
529
|
-
'
|
|
535
|
+
'平袋双嵌线袋有袋盖',
|
|
530
536
|
'斜袋有袋盖',
|
|
531
|
-
'
|
|
537
|
+
'斜袋双嵌线袋有袋盖',
|
|
532
538
|
],
|
|
533
539
|
},
|
|
534
540
|
{
|
|
@@ -604,6 +610,7 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
604
610
|
inputWhen: ['备注'],
|
|
605
611
|
inputPlaceholder: '备注',
|
|
606
612
|
},
|
|
613
|
+
{ key: 'fuseNote', label: '备注', control: 'input' },
|
|
607
614
|
],
|
|
608
615
|
},
|
|
609
616
|
{
|
|
@@ -614,6 +621,8 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
614
621
|
key: 'outerNeedle',
|
|
615
622
|
label: '外贡针',
|
|
616
623
|
control: 'checkbox',
|
|
624
|
+
gateNone: true,
|
|
625
|
+
mutexNone: true,
|
|
617
626
|
perItemSize: true,
|
|
618
627
|
allowCustomSize: true,
|
|
619
628
|
sizeOptions: ['0.15', '0.6'],
|
|
@@ -636,12 +645,13 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
636
645
|
key: 'outerPress',
|
|
637
646
|
label: '外压线',
|
|
638
647
|
control: 'checkbox',
|
|
648
|
+
gateNone: true,
|
|
639
649
|
mutexNone: true,
|
|
640
650
|
perItemSize: true,
|
|
641
651
|
allowCustomSize: true,
|
|
642
652
|
sizeOptions: ['0.15', '0.6'],
|
|
643
653
|
sizeTextSuffix: '有外压线',
|
|
644
|
-
options:
|
|
654
|
+
options: EDGE_PARTS,
|
|
645
655
|
allowAdd: true,
|
|
646
656
|
},
|
|
647
657
|
{
|
|
@@ -657,6 +667,7 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
657
667
|
{ label: '无', needValue: false },
|
|
658
668
|
],
|
|
659
669
|
},
|
|
670
|
+
{ key: 'edgeNote', label: '备注', control: 'input' },
|
|
660
671
|
],
|
|
661
672
|
},
|
|
662
673
|
{
|
|
@@ -673,9 +684,9 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
673
684
|
},
|
|
674
685
|
{
|
|
675
686
|
key: 'sleeveButton',
|
|
676
|
-
label: '
|
|
687
|
+
label: '袖扣',
|
|
677
688
|
control: 'combine',
|
|
678
|
-
textPrefix: '
|
|
689
|
+
textPrefix: '袖扣',
|
|
679
690
|
combineOptions: [
|
|
680
691
|
{ label: '叠扣', needValue: true, suffix: '' },
|
|
681
692
|
{ label: '平扣', needValue: true, suffix: '' },
|
|
@@ -683,12 +694,12 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
683
694
|
},
|
|
684
695
|
{
|
|
685
696
|
key: 'sleeveButtonCount',
|
|
686
|
-
label: '
|
|
697
|
+
label: '每个袖口袖扣数',
|
|
687
698
|
control: 'input',
|
|
688
699
|
},
|
|
689
700
|
{
|
|
690
701
|
key: 'buttons',
|
|
691
|
-
label: '
|
|
702
|
+
label: '门襟大扣',
|
|
692
703
|
control: 'combine',
|
|
693
704
|
multiFill: true,
|
|
694
705
|
combineOptions: [
|
|
@@ -707,9 +718,9 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
707
718
|
{
|
|
708
719
|
key: 'spare',
|
|
709
720
|
label: '备扣',
|
|
710
|
-
control: '
|
|
721
|
+
control: 'input',
|
|
711
722
|
textPrefix: '备扣',
|
|
712
|
-
|
|
723
|
+
defaultInput: '一大一小',
|
|
713
724
|
},
|
|
714
725
|
{
|
|
715
726
|
key: 'thread',
|
|
@@ -723,12 +734,14 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
723
734
|
{
|
|
724
735
|
key: 'sleeveLining',
|
|
725
736
|
label: '袖里',
|
|
726
|
-
control: '
|
|
737
|
+
control: 'combine',
|
|
727
738
|
textPrefix: '袖里',
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
739
|
+
combineOptions: [
|
|
740
|
+
{ label: '有', needValue: true, suffix: '', hideLabel: true },
|
|
741
|
+
{ label: '无', needValue: false },
|
|
742
|
+
],
|
|
731
743
|
},
|
|
744
|
+
{ key: 'sleeveNote', label: '备注', control: 'input' },
|
|
732
745
|
],
|
|
733
746
|
},
|
|
734
747
|
{
|
|
@@ -744,6 +757,7 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
744
757
|
{ label: '里布', needValue: true, suffix: '' },
|
|
745
758
|
{ label: '丝带', needValue: true, suffix: '' },
|
|
746
759
|
{ label: '领标', needValue: true, suffix: '' },
|
|
760
|
+
{ label: '其他', needValue: true, suffix: '' },
|
|
747
761
|
],
|
|
748
762
|
},
|
|
749
763
|
{
|
|
@@ -756,6 +770,7 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
756
770
|
{ label: '特殊材料', needValue: true, suffix: '' },
|
|
757
771
|
],
|
|
758
772
|
},
|
|
773
|
+
{ key: 'collarNote', label: '备注', control: 'input' },
|
|
759
774
|
],
|
|
760
775
|
},
|
|
761
776
|
{
|
|
@@ -801,13 +816,14 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
801
816
|
},
|
|
802
817
|
{
|
|
803
818
|
key: 'pocketCloth',
|
|
804
|
-
label: '
|
|
819
|
+
label: '上衣口袋布',
|
|
805
820
|
control: 'combine',
|
|
806
821
|
combineOptions: [
|
|
807
822
|
{ label: '有', needValue: true, suffix: '', hideLabel: true },
|
|
808
823
|
{ label: '无', needValue: false },
|
|
809
824
|
],
|
|
810
825
|
},
|
|
826
|
+
{ key: 'innerNote', label: '备注', control: 'input' },
|
|
811
827
|
],
|
|
812
828
|
},
|
|
813
829
|
{
|
|
@@ -820,9 +836,9 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
820
836
|
control: 'combine',
|
|
821
837
|
textPrefix: '大袋',
|
|
822
838
|
combineOptions: [
|
|
823
|
-
{ label: '直套结', needValue:
|
|
824
|
-
{ label: 'D套结', needValue:
|
|
825
|
-
{ label: '横套结0.6CM', needValue:
|
|
839
|
+
{ label: '直套结', needValue: true, suffix: '' },
|
|
840
|
+
{ label: 'D套结', needValue: true, suffix: '' },
|
|
841
|
+
{ label: '横套结0.6CM', needValue: true, suffix: '' },
|
|
826
842
|
{ label: '无', needValue: false },
|
|
827
843
|
],
|
|
828
844
|
},
|
|
@@ -832,11 +848,12 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
832
848
|
control: 'combine',
|
|
833
849
|
textPrefix: '里袋',
|
|
834
850
|
combineOptions: [
|
|
835
|
-
{ label: '直套结', needValue:
|
|
836
|
-
{ label: 'D套结', needValue:
|
|
851
|
+
{ label: '直套结', needValue: true, suffix: '' },
|
|
852
|
+
{ label: 'D套结', needValue: true, suffix: '' },
|
|
837
853
|
{ label: '无', needValue: false },
|
|
838
854
|
],
|
|
839
855
|
},
|
|
856
|
+
{ key: 'bartackNote', label: '备注', control: 'input' },
|
|
840
857
|
],
|
|
841
858
|
},
|
|
842
859
|
{ key: 'mark', label: '标识', items: MARK_ITEMS },
|
|
@@ -844,7 +861,10 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
844
861
|
{
|
|
845
862
|
key: 'handmade',
|
|
846
863
|
label: '特殊手工',
|
|
847
|
-
items: [
|
|
864
|
+
items: [
|
|
865
|
+
{ key: 'handmade', label: '特殊手工', control: 'input' },
|
|
866
|
+
{ key: 'handmadeNote', label: '备注', control: 'input' },
|
|
867
|
+
],
|
|
848
868
|
},
|
|
849
869
|
{
|
|
850
870
|
key: 'pack',
|
|
@@ -896,6 +916,7 @@ export const JACKET_STYLE_GROUPS = [
|
|
|
896
916
|
control: 'radio',
|
|
897
917
|
options: ['挂装', '平箱有衣架', '平箱无衣架', '立体箱'],
|
|
898
918
|
},
|
|
919
|
+
{ key: 'packNote', label: '备注', control: 'input' },
|
|
899
920
|
],
|
|
900
921
|
},
|
|
901
922
|
];
|