|
|
|
@ -1,20 +1,20 @@ |
|
|
|
|
<template> |
|
|
|
|
|
|
|
|
|
<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> |
|
|
|
|
<!-- <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>--> |
|
|
|
|
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p> |
|
|
|
|
|
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
</a-form> |
|
|
|
|
</div> |
|
|
|
|
<!-- </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 > |
|
|
|
|
<j-vxe-table |
|
|
|
@ -32,12 +32,22 @@ |
|
|
|
|
:pagination="pagination" |
|
|
|
|
style="margin-top: 8px;" |
|
|
|
|
@pageChange="handlePageChange" |
|
|
|
|
|
|
|
|
|
@valueChange="handleValueChange" |
|
|
|
|
@added="added" |
|
|
|
|
> |
|
|
|
|
<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>--> |
|
|
|
|
</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-popconfirm title="确定删除吗?" @confirm="handleDelete(props.rowId)"> |
|
|
|
@ -82,9 +92,9 @@ export default { |
|
|
|
|
btn: ['add'], |
|
|
|
|
}, |
|
|
|
|
validatorRules: { |
|
|
|
|
styleId: [ |
|
|
|
|
{required: true, message: '请选择服装类型!'}, |
|
|
|
|
], |
|
|
|
|
// styleId: [ |
|
|
|
|
// {required: true, message: '请选择服装类型!'}, |
|
|
|
|
// ], |
|
|
|
|
}, |
|
|
|
|
// 是否正在加载 |
|
|
|
|
loading: false, |
|
|
|
@ -113,22 +123,25 @@ export default { |
|
|
|
|
key: 'styleId', |
|
|
|
|
type: JVXETypes.select, |
|
|
|
|
placeholder: '请输入${title}', |
|
|
|
|
dictCode: 'zy_cloths_style,style_names,id', |
|
|
|
|
validateRules: [{required: true, message: '${title}不能为空'}] |
|
|
|
|
//dictCode: 'zy_cloths_style,style_names,id', |
|
|
|
|
validateRules: [ |
|
|
|
|
{required: true, message: '${title}不能为空'}, |
|
|
|
|
], |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '是否默认尺码', |
|
|
|
|
align: "center", |
|
|
|
|
width: '150px', |
|
|
|
|
width: '50px', |
|
|
|
|
key: 'isdefault', |
|
|
|
|
type: JVXETypes.select, |
|
|
|
|
dictCode: 'isdefault', |
|
|
|
|
defaultValue: 0, |
|
|
|
|
}, |
|
|
|
|
{key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '120px', type: JVXETypes.select}, |
|
|
|
|
{key: 'size', title: '码数', width: '100px', dictCode: 'size', type: JVXETypes.select}, |
|
|
|
|
{key: 'anumbers', title: '型', width: '100px', dictCode: 'hsize', type: JVXETypes.select}, |
|
|
|
|
{key: 'bnumbers', title: '号', width: '100px', dictCode: 'xsize', type: JVXETypes.select}, |
|
|
|
|
{key: 'size', title: '码数', width: '90px', dictCode: 'size', type: JVXETypes.select}, |
|
|
|
|
{key: 'anumbers', title: '型', width: '80px', dictCode: 'hsize', type: JVXETypes.select}, |
|
|
|
|
{key: 'bnumbers', title: '号', width: '80px', dictCode: 'xsize', type: JVXETypes.select}, |
|
|
|
|
{key: 'collarLarge', title: '领大', width: '80px', type: JVXETypes.input}, |
|
|
|
|
{key: 'bust', title: '胸围', width: '80px', type: JVXETypes.input}, |
|
|
|
|
{key: 'sleeveLength', title: '袖长', width: '80px', type: JVXETypes.input}, |
|
|
|
@ -138,13 +151,14 @@ export default { |
|
|
|
|
{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: 'createTime', title: '创建时间', width: '100px', type: JVXETypes.datetime}, |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
title: '操作', |
|
|
|
|
key: 'action', |
|
|
|
|
type: JVXETypes.slot, |
|
|
|
|
fixed: 'right', |
|
|
|
|
minWidth: '100px', |
|
|
|
|
minWidth: '80px', |
|
|
|
|
align: 'center', |
|
|
|
|
slotName: 'action', |
|
|
|
|
} |
|
|
|
@ -159,6 +173,7 @@ export default { |
|
|
|
|
importExcelUrl: "zystylemodel/zyStyleModel/importExcel", |
|
|
|
|
}, |
|
|
|
|
//参数 |
|
|
|
|
styleId: '', |
|
|
|
|
loadRouteType: false, |
|
|
|
|
id: null, |
|
|
|
|
rowId: '', |
|
|
|
@ -178,6 +193,46 @@ export default { |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
//新增触发事件 |
|
|
|
|
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'; |
|
|
|
|
httpAction(httpUrl, event.row, method).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
this.$message.success(res.message); |
|
|
|
|
this.$emit('ok'); |
|
|
|
|
} else { |
|
|
|
|
this.$message.warning(res.message); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//数据发生变化时事件 |
|
|
|
|
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) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
this.$message.success(res.message); |
|
|
|
|
this.$emit('ok'); |
|
|
|
|
} else { |
|
|
|
|
this.$message.warning(res.message); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 详情 |
|
|
|
|
viewDetail(id) { |
|
|
|
|
this.$refs.ZyStyleModelListDetails.showModal(id) |
|
|
|
@ -234,8 +289,9 @@ export default { |
|
|
|
|
loadParameter() { |
|
|
|
|
if (this.loadRouteType === false) { |
|
|
|
|
this.id = this.$route.query.id; |
|
|
|
|
//this.styleId = this.id; |
|
|
|
|
this.biaoTi = this.$route.query.styleNames + "款式型号管理"; |
|
|
|
|
console.log("**********传递到此层的id:" + this.id); |
|
|
|
|
//console.log("**********传递到此层的id:" + this.id); |
|
|
|
|
this.loadRouteType = true; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -271,6 +327,7 @@ export default { |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 当分页参数变化时触发的事件 |
|
|
|
|
handlePageChange(event) { |
|
|
|
|
// 重新赋值 |
|
|
|
|