修改产品管理 产品模块 样板管理部分问题

zhc4dev
赵玉瑞 2 years ago
parent 2fe1d09cfa
commit 357bfb4043
  1. 38
      ant-design-vue-jeecg/src/views/product/productModule/ProductModuleList.vue
  2. 305
      ant-design-vue-jeecg/src/views/product/productSample/ProductSampleList.vue
  3. 125
      ant-design-vue-jeecg/src/views/product/productSample/modules/ZyClothSampleDetail.vue
  4. 229
      ant-design-vue-jeecg/src/views/product/productSample/modules/ZyClothSampleForm.vue
  5. 60
      ant-design-vue-jeecg/src/views/product/productSample/modules/ZyClothSampleModal.vue
  6. 84
      ant-design-vue-jeecg/src/views/product/productSample/modules/ZyClothSampleModal__Style#Drawer.vue
  7. 25
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue

@ -17,13 +17,13 @@
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<!-- </a-dropdown>-->
</div>
<!-- table区域-begin -->
@ -69,21 +69,12 @@
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
@ -141,6 +132,11 @@
align:"center",
dataIndex: 'place'
},
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',

@ -0,0 +1,305 @@
<template>
<!--成衣样板管理页面 这是成衣样板的主表单 即在侧边点击成衣样板所显示的表单-->
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="编号">
<a-input placeholder="请输入编号" v-model="queryParam.nums"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装款式">
<j-dict-select-tag v-model="queryParam.styleId"
placeholder="请选择服装款式"
dict-code="zy_cloths_style,style_names,nums">
</j-dict-select-tag>
<!-- <a-form-item label="款式">-->
<!-- <a-input placeholder="请输入款式" v-model="queryParam.styleId"></a-input>-->
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>-->
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('成衣样板')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal"-->
<!-- @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel">-->
<!-- <a-icon type="delete"/>-->
<!-- 删除-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> 批量操作-->
<!-- <a-icon type="down"/>-->
<!-- </a-button>-->
<!-- </a-dropdown>-->
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<span v-else style="font-size: 12px;font-style: italic;">
<img :src="getImgView(text)" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/>
<a-divider type="vertical"/>
<a-button
:ghost="true"
type="primary"
size="small"
@click="lookFile(text)">
在线查看
</a-button>
</span>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<!--跳转到模块样板-->
<!-- <span slot="action1" slot-scope="text, record">-->
<!-- <a @click="jumpPage(record)">模块样板</a>-->
<!-- </span>-->
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a @click="fuzhi(record)">复制</a>-->
<!-- <a-divider type="vertical" />-->
<!-- <a @click="handleDetail(record.id)">详情</a>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<a-divider type="vertical"/>
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
</span>
</a-table>
</div>
<ZyClothSampleDetail ref="ZyClothSampleDetail"></ZyClothSampleDetail>
<zy-cloth-sample-modal ref="modalForm" @ok="modalFormOk" v-bind="superFieldList"></zy-cloth-sample-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyClothSampleModal from './modules/ZyClothSampleModal'
import ZyClothSampleDetail from '@views/product/productSample/modules/ZyClothSampleDetail'
export default {
name: "ProductSampleList", //
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyClothSampleModal,
ZyClothSampleDetail
},
data() {
return {
description: '成衣样板管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '编号',
align: "center",
dataIndex: 'nums'
},
{
title: '服装款式',
align: "center",
dataIndex: 'styleId_dictText',
},
{
title: '款式型号',
align: "center",
dataIndex: 'stylemodelId_dictText',
//dictCode: 'modenumber',
},
// {
// title: '',
// align: "center",
// dataIndex: 'modelSample_dictText'
// },
// {
// title: '',
// dataIndex: 'action1',
// align: "center",
// fixed: "right",
// width: 110,
// scopedSlots: {customRender: 'action1'}
// },
{
title: '企业',
align: "center",
dataIndex: 'userId_dictText'
},
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
/*{
title: '图片',
align: "center",
dataIndex: 'url',
scopedSlots: {customRender: 'imgSlot'}
},*/
// {
// title: '',
// dataIndex: 'action1',
// align: "center",
// fixed: "right",
// width: 110,
// scopedSlots: {customRender: 'action1'}
// },
// {
// title: '',
// dataIndex: 'action',
// align: "center",
// fixed: "right",
// width: 147,
// scopedSlots: {customRender: 'action'}
// }
],
url: {
list: "/zyclothsample/zyClothSample/list",
edit: "/zyclothsample/zyClothSample/edit",
delete: "/zyclothsample/zyClothSample/delete",
deleteBatch: "/zyclothsample/zyClothSample/deleteBatch",
exportXlsUrl: "/zyclothsample/zyClothSample/exportXls",
importExcelUrl: "zyclothsample/zyClothSample/importExcel",
},
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
}
,
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig() {
},
jumpPage(record) {
this.$router.push({
path: '/src/views/sample/ZyModuleSampleList',
query: { //
'id': record.id,
}
});
},
lookFile(fileUrl) {
let file = window._CONFIG['domianURL'] + "/sys/common/static/" + fileUrl
let Base64 = require('js-base64').Base64;
let url = window._CONFIG['onlinePreviewDomainURL'] + '/onlinePreview?url=' + encodeURIComponent(Base64.encode(file))
window.open(url);
}
,
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'nums', text: '编号', dictCode:''})
fieldList.push({type: 'string', value: 'styleId', text: '款式', dictCode:''})
fieldList.push({type: 'string', value: 'stylemodelId', text: '型号', dictCode: 'modenumber'})
fieldList.push({type: 'string', value: 'modelSample', text: '模块样板', dictCode: ''})
fieldList.push({type: 'string', value: 'userId', text: '用户名', dictCode: ''})
fieldList.push({type: 'string', value: 'createTime', text: '创建时间', dictCode: ''})
this.superFieldList = fieldList
}
,
openDetail(id) {
this.$refs.ZyClothSampleDetail.showModal(id)
// this.$children[0].showModal(id)
}
,
// handleDetail(id){
// this.$refs.ZyClothSampleDetail.showModal(id)
// }
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,125 @@
<template>
<div>
<a-modal
title="成衣样板-详情"
:visible="visible"
:confirm-loading="confirmLoading"
:width='1000'
@ok="handleOk"
@cancel="handleCancel"
style="display:flex;"
>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url">-->
<!-- <j-image-upload isMultiple v-model="model.url" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-descriptions bordered size="small" class="coin">
<a-descriptions-item label="编号" :span="2">
{{model.nums}}
</a-descriptions-item>
<a-descriptions-item label="客户" >
{{model.userId}}
</a-descriptions-item>
<a-descriptions-item label="成衣名称">
{{model.clothName}}
</a-descriptions-item>
<a-descriptions-item label="描述" >
{{model.descr}}
</a-descriptions-item>
<a-descriptions-item label="客户类型">
{{model.type}}
</a-descriptions-item>
<a-descriptions-item label="图片">
<j-image-upload isMultiple v-model="model.url" ></j-image-upload>
</a-descriptions-item>
</a-descriptions>
</a-form-model>
</j-form-container>
</a-spin>
</a-modal>
</div>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'ZyClothSampleDetail',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
visible: false,
url: {
add: "/zyclothsample/zyClothSample/add",
edit: "/zyclothsample/zyClothSample/edit",
queryById: "/zyclothsample/zyClothSample/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
showModal(id) {
// console.log(this.selectId)
this.visible = true;
this.$http.get('/zyclothsample/zyClothSample/queryById?id='+id).then(
res=>{
this.model = res.result
console.log(this.data)
}
)
},
handleOk(e) {
this.ModalText = 'The modal will be closed after two seconds';
this.confirmLoading = true;
console.log(this.data)
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 1);
},
handleCancel(e) {
console.log('Clicked cancel button');
this.visible = false;
},
}
}
</script>

@ -0,0 +1,229 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.userId" @change="kuanshi" />
</a-form-model-item>
</a-col>
<!--关联服装款式表 zy_cloths_style 关联列名称 传值id
根据企业选择款式有的企业有选项有的没有
-->
<a-col :span="24">
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag v-model="model.styleId" placeholder="请输入款式"
:dict-code="dict" @change="xiugai"></j-dict-select-tag>
</a-form-model-item>
<!--编码也是唯一的和id一样 -->
</a-col>
<a-col :span="24">
<a-form-model-item label="款式型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stylemodelId">
<!-- <a-input v-model="model.stylemodelId" placeholder="请输入款式型号" @change="(vaule) => handletypeSelect(value)"></a-input>-->
<!-- <j-dict-select-tag v-model="model.stylemodelId" placeholder="请输入款式型号"-->
<!-- dict-code="zy_style_model,model_number,model_number"></j-dict-select-tag>-->
<j-dict-select-tag v-model="model.stylemodelId" placeholder="请选择款式型号"
dictCode="modenumber" @change="gaibian"></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<!-- <a-input v-model="model.nums || this.nums" placeholder="请输入编号"></a-input>-->
<a-input v-model="model.nums" placeholder="请输入编号" disabled></a-input>
</a-form-model-item>
</a-col>
<!--<j-dict-select-tag v-model="model.modelSample" placeholder="请选择模块样板"-->
<!-- dict-code="zy_module_sample, module_name, id"></j-dict-select-tag>-->
<!-- <j-search-select-tag v-model="model.modelSample" dict="zy_module_sample" dictText="module_name", dictCode="id" />-->
<!-- </a-form-model-item>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="用户名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">-->
<!-- &lt;!&ndash; <a-input v-model="model.userId" placeholder="请输入用户名"></a-input>&ndash;&gt;-->
<!-- <j-dict-select-tag v-model="model.userId" placeholder="请输入用户名"-->
<!-- dict-code="sys_user,username,username"></j-dict-select-tag>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="descr">
<a-textarea v-model="model.descr" placeholder="请输入描述"></a-textarea>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url">
<j-image-upload isMultiple v-model="model.url"></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import {httpAction, getAction} from '@/api/manage'
import {validateDuplicateValue} from '@/utils/util'
export default {
name: 'ZyClothSampleForm',
components: {},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
},
superFieldList: [], // table
},
data() {
return {
nums: '',
selectedKey: '', // id
typeid: '', // ,
serialNumber: '', //
model: {
nums:'',
},
dict:"zy_cloths_style,style_names,nums",
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
confirmLoading: false,
/*效验规则*/
validatorRules: {
// nums: [
// //{pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{4}$/, message: '4wei'},
// { required:true, message: ''},
// { pattern: /^[0-9A-Za-z]{0,20}$/, message: ''},
// //{pattern: /^(?=.*([0-9a-zA-Z]){5}).[A-Za-z0-9]+$/, message: ''},
// ],
styleId: [
{required: true, message: '款式不能为空'},
],
stylemodelId: [
{required: true, message: '款式型号不能为空'},
],
userId: [
{required: true, message: '用户名不能为空'},// required:false
//{ pattern: /^\d{6,16}$/, message: '616!'}
],
descr: [
{pattern: /^[0-9A-Za-z\u4e00-\u9fa5]{0,200}$/, message: '文本长度过长'},
]
},
url: {
add: "/zyclothsample/zyClothSample/add",
edit: "/zyclothsample/zyClothSample/edit",
queryById: "/zyclothsample/zyClothSample/queryById",
sort:"/zyclothsample/zyClothSample/sort"
}
}
},
computed: {
formDisabled() {
return this.disabled;
}
},
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
mounted() {
// -
const str = `${this.selectedKey}${this.typeid}${''}`;
// const str = undefined;
str ? this.nums = str : this.nums = this.nums;
console.log(this.props, 'superFieldList')
},
methods: {
add() {
this.edit(this.modelDefault);
},
//
kuanshi(){
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.userId+"'";
this.model.styleId=null
},
xiugai(){
if(this.model.stylemodelId!=null&&this.model.userId!=null){
this.gaibian()
}
},
gaibian(){
var n=3;
console.log(this.model)
getAction(this.url.sort,this.model).then((res)=>{
console.log(res)
if(this.model.id!=null){
var num=parseInt(res.result,10)
}else{
var num=parseInt(res.result,10)+1
}
num=num.toString()
while(num.length<n){
num="0"+num
}
this.model.nums=this.model.styleId+this.model.stylemodelId+num;
console.log( this.model.nums)
})},
// select
handleSelect(selectedKeys) {
this.selectedKey = selectedKeys;
},
// change
handletypeSelect(selectedKeys) {
this.type = selectedKeys;
},
edit(record) {
this.model = Object.assign({}, record);
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.userId+"'";
this.visible = true;
}
,
submitForm() {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if (!this.model.id) {
httpurl += this.url.add;
method = 'post';
} else {
httpurl += this.url.edit;
method = 'put';
}
httpAction(httpurl, this.model, method).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.$emit('ok');
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
}
,
}
}
</script>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-cloth-sample-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-cloth-sample-form>
</j-modal>
</template>
<script>
import ZyClothSampleForm from './ZyClothSampleForm'
export default {
name: 'ZyClothSampleModal',
components: {
ZyClothSampleForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<zy-cloth-sample-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></zy-cloth-sample-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import ZyClothSampleForm from './ZyClothSampleForm'
export default {
name: 'ZyClothSampleModal',
components: {
ZyClothSampleForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -118,7 +118,7 @@ export default {
columns: [
{
title: '服装款式',
width: '150px',
width: '110px',
fixed: 'left',
key: 'styleId',
type: JVXETypes.select,
@ -132,17 +132,17 @@ export default {
{
title: '是否默认尺码',
align: "center",
width: '50px',
width: '130px',
key: 'isdefault',
type: JVXETypes.select,
dictCode: 'isdefault',
defaultValue: 0,
},
{key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '120px', 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: '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},
@ -151,14 +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},
{key: 'createTime', title: '创建时间', width: '60px', type: JVXETypes.datetime},
{
title: '操作',
key: 'action',
type: JVXETypes.slot,
fixed: 'right',
minWidth: '80px',
minWidth: '100px',
align: 'center',
slotName: 'action',
}
@ -203,16 +203,19 @@ export default {
let method = 'post';
//httpUrl += this.url.add;
//method = 'post';
let that = this;
httpAction(httpUrl, event.row, method).then((res) => {
if (res.success) {
this.$message.success(res.message);
that.reCalculatePage(1);
that.$message.success(res.message);
this.$emit('ok');
that.loadData();
} else {
this.$message.warning(res.message);
}
})
},
//
//
handleValueChange(event) {
//this.submitForm(event)

Loading…
Cancel
Save