|
|
|
@ -3,20 +3,20 @@ |
|
|
|
|
<a-card :bordered="false"> |
|
|
|
|
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p> |
|
|
|
|
<!-- 查询区域 --> |
|
|
|
|
<!-- <div class="table-page-search-wrapper">--> |
|
|
|
|
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">--> |
|
|
|
|
<!-- <a-row :gutter="24">--> |
|
|
|
|
<!-- <a-col>--> |
|
|
|
|
<!-- <a-button type="primary">{{biaoTi}}</a-button>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- </a-row>--> |
|
|
|
|
<!-- </a-form>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- <div class="table-page-search-wrapper">--> |
|
|
|
|
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">--> |
|
|
|
|
<!-- <a-row :gutter="24">--> |
|
|
|
|
<!-- <a-col>--> |
|
|
|
|
<!-- <a-button type="primary">{{biaoTi}}</a-button>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- </a-row>--> |
|
|
|
|
<!-- </a-form>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- 查询区域-END --> |
|
|
|
|
|
|
|
|
|
<!-- <a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>--> |
|
|
|
|
<!-- <a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>--> |
|
|
|
|
<!-- table区域-begin --> |
|
|
|
|
<div > |
|
|
|
|
<div> |
|
|
|
|
<j-vxe-table |
|
|
|
|
toolbar |
|
|
|
|
:toolbarConfig="toolbarConfig" |
|
|
|
@ -37,19 +37,19 @@ |
|
|
|
|
> |
|
|
|
|
<template v-slot:toolbarSuffix> |
|
|
|
|
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button> |
|
|
|
|
<!-- <a-tooltip placement="top" title="获取值,忽略表单验证" :autoAdjustOverflow="true">--> |
|
|
|
|
<!-- <a-button @click="handleTableGet">获取值</a-button>--> |
|
|
|
|
<!-- </a-tooltip>--> |
|
|
|
|
<!-- <a-tooltip placement="top" title="模拟加载1000条数据" :autoAdjustOverflow="true">--> |
|
|
|
|
<!-- <a-button @click="handleTableSet">设置值</a-button>--> |
|
|
|
|
<!-- </a-tooltip>--> |
|
|
|
|
<!-- <a-tooltip placement="top" title="获取值,忽略表单验证" :autoAdjustOverflow="true">--> |
|
|
|
|
<!-- <a-button @click="handleTableGet">获取值</a-button>--> |
|
|
|
|
<!-- </a-tooltip>--> |
|
|
|
|
<!-- <a-tooltip placement="top" title="模拟加载1000条数据" :autoAdjustOverflow="true">--> |
|
|
|
|
<!-- <a-button @click="handleTableSet">设置值</a-button>--> |
|
|
|
|
<!-- </a-tooltip>--> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template v-slot:action="props"> |
|
|
|
|
<!-- <a @click="submitForm(props)">保存</a>--> |
|
|
|
|
<!-- <a-divider type="vertical"/>--> |
|
|
|
|
<!-- <a @click="submitForm(props)">保存</a>--> |
|
|
|
|
<!-- <a-divider type="vertical"/>--> |
|
|
|
|
<a @click="viewDetail(props.rowId)">详情</a> |
|
|
|
|
<a-divider type="vertical" /> |
|
|
|
|
<a-divider type="vertical"/> |
|
|
|
|
<a-popconfirm title="确定删除吗?" @confirm="handleDelete(props.rowId)"> |
|
|
|
|
<a>删除</a> |
|
|
|
|
</a-popconfirm> |
|
|
|
@ -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}, |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
@ -195,14 +295,12 @@ export default { |
|
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
//新增触发事件 |
|
|
|
|
added(event){ |
|
|
|
|
added(event) { |
|
|
|
|
//this.styleId = this.$route.query.id; |
|
|
|
|
event.row.styleId = this.$route.query.id; |
|
|
|
|
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'); |
|
|
|
|