|
|
|
@ -91,11 +91,11 @@ export default { |
|
|
|
|
// add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮 |
|
|
|
|
btn: ['add'], |
|
|
|
|
}, |
|
|
|
|
validatorRules: { |
|
|
|
|
// validatorRules: { |
|
|
|
|
// styleId: [ |
|
|
|
|
// {required: true, message: '请选择服装类型!'}, |
|
|
|
|
// ], |
|
|
|
|
}, |
|
|
|
|
// }, |
|
|
|
|
// 是否正在加载 |
|
|
|
|
loading: false, |
|
|
|
|
// 分页器参数 |
|
|
|
@ -117,40 +117,140 @@ export default { |
|
|
|
|
|
|
|
|
|
columns: [ |
|
|
|
|
{ |
|
|
|
|
title: '服装款式', |
|
|
|
|
width: '110px', |
|
|
|
|
fixed: 'left', |
|
|
|
|
key: 'styleId', |
|
|
|
|
type: JVXETypes.select, |
|
|
|
|
title: '服装款式', width: '100px', fixed: 'left', key: 'styleId', |
|
|
|
|
type: JVXETypes.normal, |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
|
//dictCode: 'zy_cloths_style,style_names,id', |
|
|
|
|
validateRules: [ |
|
|
|
|
{required: true, message: '${title}不能为空'}, |
|
|
|
|
], |
|
|
|
|
// validateRules: [ |
|
|
|
|
// {required: true, message: '${title}不能为空'}, |
|
|
|
|
// ], |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '是否默认尺码', |
|
|
|
|
align: "center", |
|
|
|
|
width: '130px', |
|
|
|
|
key: 'isdefault', |
|
|
|
|
title: '是否默认尺码', align: "center", width: '130px', key: 'isdefault', |
|
|
|
|
type: JVXETypes.select, |
|
|
|
|
dictCode: 'isdefault', |
|
|
|
|
defaultValue: 0, |
|
|
|
|
}, |
|
|
|
|
{key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '100px', type: JVXETypes.select}, |
|
|
|
|
{key: 'size', title: '码数', width: '85px', dictCode: 'size', type: JVXETypes.select}, |
|
|
|
|
{key: 'anumbers', title: '型', width: '85px', dictCode: 'hsize', type: JVXETypes.select}, |
|
|
|
|
{key: 'bnumbers', title: '号', width: '85px', dictCode: 'xsize', type: JVXETypes.select}, |
|
|
|
|
{key: 'collarLarge', title: '领大', width: '70px', type: JVXETypes.input}, |
|
|
|
|
{key: 'bust', title: '胸围', width: '80px', type: JVXETypes.input}, |
|
|
|
|
{key: 'sleeveLength', title: '袖长', width: '80px', type: JVXETypes.input}, |
|
|
|
|
{key: 'shslLength', title: '连肩袖长', width: '100px', type: JVXETypes.input}, |
|
|
|
|
{ |
|
|
|
|
key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '100px', |
|
|
|
|
type: JVXETypes.select |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: 'size', title: '码数', width: '85px', dictCode: 'size', |
|
|
|
|
type: JVXETypes.select |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: 'anumbers', title: '型', width: '85px', dictCode: 'hsize', |
|
|
|
|
type: JVXETypes.select |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: 'bnumbers', title: '号', width: '85px', dictCode: 'xsize', |
|
|
|
|
type: JVXETypes.select |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: 'collarLarge', |
|
|
|
|
title: '领大', width: '70px', |
|
|
|
|
type: JVXETypes.inputNumber, |
|
|
|
|
validateRules: [ |
|
|
|
|
{ |
|
|
|
|
required: false, // 选填 |
|
|
|
|
message: '${title}只能输入数字类型' // 提示的文本 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
pattern: /[^\d]/g, message: '${title}只能输入数字类型', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: 'bust', title: '胸围', width: '80px', |
|
|
|
|
type: JVXETypes.inputNumber, |
|
|
|
|
validateRules: [ |
|
|
|
|
{ |
|
|
|
|
required: false, // 选填 |
|
|
|
|
message: '${title}只能输入数字类型' // 提示的文本 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
pattern: /\D/g, message: '${title}只能输入数字类型', |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: 'sleeveLength', title: '袖长', width: '80px', |
|
|
|
|
type: JVXETypes.inputNumber, |
|
|
|
|
validateRules: [ |
|
|
|
|
{ |
|
|
|
|
required: false, // 选填 |
|
|
|
|
message: '${title}只能输入数字类型' // 提示的文本 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
pattern: /[^\d]/g, message: '${title}只能输入数字类型', |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: 'shslLength', title: '连肩袖长', width: '100px', |
|
|
|
|
type: JVXETypes.inputNumber, |
|
|
|
|
validateRules: [ |
|
|
|
|
{ |
|
|
|
|
required: false, // 选填 |
|
|
|
|
message: '${title}只能输入数字类型' // 提示的文本 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
pattern: /[^\d]/g, message: '${title}只能输入数字类型', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
{key: 'tsWidth', title: '总肩宽', width: '80px', type: JVXETypes.input}, |
|
|
|
|
{key: 'cuff', title: '袖口', width: '80px', type: JVXETypes.input}, |
|
|
|
|
{key: 'waistline', title: '腰围', width: '80px', type: JVXETypes.input}, |
|
|
|
|
{key: 'hem', title: '下摆', width: '80px', type: JVXETypes.input}, |
|
|
|
|
{ |
|
|
|
|
key: 'tsWidth', title: '总肩宽', width: '80px', |
|
|
|
|
type: JVXETypes.inputNumber, |
|
|
|
|
validateRules: [ |
|
|
|
|
{ |
|
|
|
|
required: false, // 选填 |
|
|
|
|
message: '${title}只能输入数字类型' // 提示的文本 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
pattern: /[^\d]/g, message: '${title}只能输入数字类型', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: 'cuff', title: '袖口', width: '80px', |
|
|
|
|
type: JVXETypes.inputNumber, |
|
|
|
|
validateRules: [ |
|
|
|
|
{ |
|
|
|
|
required: false, // 选填 |
|
|
|
|
message: '${title}只能输入数字类型' // 提示的文本 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
pattern: /[^\d]/g, message: '${title}只能输入数字类型', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: 'waistline', title: '腰围', width: '80px', |
|
|
|
|
type: JVXETypes.inputNumber, |
|
|
|
|
validateRules: [ |
|
|
|
|
{ |
|
|
|
|
required: false, // 选填 |
|
|
|
|
message: '${title}只能输入数字类型' // 提示的文本 |
|
|
|
|
}, |
|
|
|
|
{pattern: /[^\d]/g, message: '${title}只能输入数字类型'}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: 'hem', title: '下摆', width: '80px', |
|
|
|
|
type: JVXETypes.inputNumber, |
|
|
|
|
validateRules: [ |
|
|
|
|
{ required: false, // 选填 |
|
|
|
|
message: '${title}只能输入数字类型' // 提示的文本 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
pattern: /[^\d]/g, message: '${title}只能输入数字类型', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
{key: 'createTime', title: '创建时间', width: '60px', type: JVXETypes.datetime}, |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
@ -201,8 +301,6 @@ export default { |
|
|
|
|
console.log("新增触发事件", event) |
|
|
|
|
let httpUrl = this.url.add; |
|
|
|
|
let method = 'post'; |
|
|
|
|
//httpUrl += this.url.add; |
|
|
|
|
//method = 'post'; |
|
|
|
|
let that = this; |
|
|
|
|
httpAction(httpUrl, event.row, method).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
@ -216,18 +314,13 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//数据发生变化时事件 即 编辑 |
|
|
|
|
handleValueChange(event) { |
|
|
|
|
|
|
|
|
|
async handleValueChange(event) { |
|
|
|
|
//this.submitForm(event) |
|
|
|
|
console.log("//数据发生变化时事件", event); |
|
|
|
|
//const str = event.row.id; |
|
|
|
|
let httpUrl = ''; |
|
|
|
|
let method = ''; |
|
|
|
|
|
|
|
|
|
httpUrl += this.url.edit; |
|
|
|
|
method = 'put'; |
|
|
|
|
|
|
|
|
|
httpAction(httpUrl, event.row, method).then((res) => { |
|
|
|
|
let httpUrl = this.url.edit; |
|
|
|
|
let method = 'put'; |
|
|
|
|
await httpAction(httpUrl, event.row, method).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
this.$message.success(res.message); |
|
|
|
|
this.$emit('ok'); |
|
|
|
|