commit
1c63b5aa4d
36 changed files with 2758 additions and 453 deletions
@ -0,0 +1,246 @@ |
|||||||
|
<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.hangerCode"></a-input> |
||||||
|
</a-form-item> |
||||||
|
</a-col> |
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||||
|
<a-form-item label="工单编号"> |
||||||
|
<a-input placeholder="请输入工单编号" v-model="queryParam.orderCode"></a-input> |
||||||
|
</a-form-item> |
||||||
|
</a-col> |
||||||
|
<template v-if="toggleSearchStatus"> |
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||||
|
<a-form-item label="制单编号"> |
||||||
|
<a-input placeholder="请输入制单编号" v-model="queryParam.makerCode"></a-input> |
||||||
|
</a-form-item> |
||||||
|
</a-col> |
||||||
|
</template> |
||||||
|
<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> |
||||||
|
</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>--> |
||||||
|
<!-- <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>--> |
||||||
|
<!-- </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="action" slot-scope="text, record"> |
||||||
|
<a @click="handleEdit(record)">编辑</a> |
||||||
|
<a-divider type="vertical"/> |
||||||
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||||
|
<a>删除</a> |
||||||
|
</a-popconfirm> |
||||||
|
</span> |
||||||
|
|
||||||
|
</a-table> |
||||||
|
</div> |
||||||
|
|
||||||
|
<hanger-maker-modal ref="modalForm" @ok="modalFormOk"></hanger-maker-modal> |
||||||
|
</a-card> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
|
||||||
|
import '@/assets/less/TableExpand.less' |
||||||
|
import {mixinDevice} from '@/utils/mixin' |
||||||
|
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
||||||
|
import HangerMakerModal from './modules/HangerMakerModal' |
||||||
|
import {getAction} from "@api/manage"; |
||||||
|
import {filterObj} from "@/utils/util"; |
||||||
|
|
||||||
|
export default { |
||||||
|
name: 'HangerMakerList', |
||||||
|
mixins: [JeecgListMixin, mixinDevice], |
||||||
|
components: { |
||||||
|
HangerMakerModal |
||||||
|
}, |
||||||
|
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: 'ismaker_dictText' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '衣架编号', |
||||||
|
align: "center", |
||||||
|
dataIndex: 'hangerCode' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '工单编号', |
||||||
|
align: "center", |
||||||
|
dataIndex: 'orderCode' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '制单编号', |
||||||
|
align: "center", |
||||||
|
dataIndex: 'makerCode' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '操作', |
||||||
|
dataIndex: 'action', |
||||||
|
align: "center", |
||||||
|
fixed: "right", |
||||||
|
width: 147, |
||||||
|
scopedSlots: {customRender: 'action'} |
||||||
|
} |
||||||
|
], |
||||||
|
url: { |
||||||
|
list: "/hangermaker/hangerMaker/list", |
||||||
|
delete: "/hangermaker/hangerMaker/delete", |
||||||
|
deleteBatch: "/hangermaker/hangerMaker/deleteBatch", |
||||||
|
exportXlsUrl: "/hangermaker/hangerMaker/exportXls", |
||||||
|
importExcelUrl: "hangermaker/hangerMaker/importExcel", |
||||||
|
|
||||||
|
}, |
||||||
|
dictOptions: {}, |
||||||
|
superFieldList: [], |
||||||
|
} |
||||||
|
}, |
||||||
|
created() { |
||||||
|
// this.getSuperFieldList(); |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
importExcelUrl: function () { |
||||||
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||||
|
}, |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
loadData(arg) { |
||||||
|
if (!this.url.list) { |
||||||
|
this.$message.error("请设置url.list属性!") |
||||||
|
return |
||||||
|
} |
||||||
|
//加载数据 若传入参数1则加载第一页的内容 |
||||||
|
if (arg === 1) { |
||||||
|
this.ipagination.current = 1; |
||||||
|
} |
||||||
|
this.loading = true; |
||||||
|
var params = this.getQueryParams();//查询条件 |
||||||
|
// console.log("----------------the params:", params); |
||||||
|
getAction(this.url.list, params).then((res) => { |
||||||
|
if (res.success) { |
||||||
|
this.dataSource = res.result.records || res.result; |
||||||
|
if (res.result.total) { |
||||||
|
this.ipagination.total = res.result.total; |
||||||
|
} else { |
||||||
|
this.ipagination.total = 0; |
||||||
|
} |
||||||
|
} else { |
||||||
|
this.$message.warning(res.message) |
||||||
|
} |
||||||
|
}).finally(() => { |
||||||
|
// this.dataSource.forEach(item => { |
||||||
|
// if (item['ismaker'] === 0) { |
||||||
|
// item['ismaker'] = "绑定工单"; |
||||||
|
// } |
||||||
|
// if (item['ismaker'] === 1) { |
||||||
|
// item['ismaker'] = "绑定制单"; |
||||||
|
// } |
||||||
|
// }) |
||||||
|
this.loading = false |
||||||
|
}) |
||||||
|
}, |
||||||
|
getQueryParams() { |
||||||
|
//获取查询条件 |
||||||
|
let sqp = {} |
||||||
|
if (this.superQueryParams) { |
||||||
|
sqp['superQueryParams'] = encodeURI(this.superQueryParams) |
||||||
|
sqp['superQueryMatchType'] = this.superQueryMatchType |
||||||
|
} |
||||||
|
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); |
||||||
|
param.field = this.getQueryField(); |
||||||
|
param.pageNo = this.ipagination.current; |
||||||
|
param.pageSize = this.ipagination.pageSize; |
||||||
|
// param.planProcessId = this.planProcessId; |
||||||
|
return filterObj(param); |
||||||
|
}, |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
@ -0,0 +1,170 @@ |
|||||||
|
<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="ismaker"> |
||||||
|
<!-- <a-input v-model="model.ismaker" placeholder="请选择绑定方式"></a-input>--> |
||||||
|
<j-dict-select-tag type="list" v-model="model.ismaker" dictCode="ismaker" placeholder="请选择绑定方式"/> |
||||||
|
</a-form-model-item> |
||||||
|
</a-col> |
||||||
|
<a-col :span="24" v-show="false"> |
||||||
|
<a-form-model-item label="衣架ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hangerId"> |
||||||
|
<a-input v-model="model.hangerId" placeholder="请输入衣架ID"></a-input> |
||||||
|
</a-form-model-item> |
||||||
|
</a-col> |
||||||
|
<a-col :span="24"> |
||||||
|
<a-form-model-item label="衣架编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hangerCode"> |
||||||
|
<j-popup |
||||||
|
v-model="model.hangerCode" |
||||||
|
field="hangerCode" |
||||||
|
org-fields="id,hanger_code" |
||||||
|
dest-fields="hangerId,hangerCode" |
||||||
|
code="hanger" |
||||||
|
:multi="false" |
||||||
|
@input="popupCallback" |
||||||
|
/> |
||||||
|
</a-form-model-item> |
||||||
|
</a-col> |
||||||
|
<a-col :span="24" v-show="false"> |
||||||
|
<a-form-model-item label="工单ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId"> |
||||||
|
<a-input v-model="model.orderId" placeholder="请输入工单ID"></a-input> |
||||||
|
</a-form-model-item> |
||||||
|
</a-col> |
||||||
|
<a-col :span="24"> |
||||||
|
<a-form-model-item label="工单编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCode"> |
||||||
|
<j-popup |
||||||
|
v-model="model.orderCode" |
||||||
|
field="orderCode" |
||||||
|
org-fields="id,code" |
||||||
|
dest-fields="orderId,orderCode" |
||||||
|
code="zy_work_order" |
||||||
|
:multi="false" |
||||||
|
@input="popupCallback" |
||||||
|
/> |
||||||
|
</a-form-model-item> |
||||||
|
</a-col> |
||||||
|
<a-col :span="24" v-show="false"> |
||||||
|
<a-form-model-item label="制单ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="makerId"> |
||||||
|
<a-input v-model="model.makerId" placeholder="请输入制单ID"></a-input> |
||||||
|
</a-form-model-item> |
||||||
|
</a-col> |
||||||
|
<a-col :span="24"> |
||||||
|
<a-form-model-item label="制单编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="makerCode"> |
||||||
|
<j-popup |
||||||
|
v-model="model.makerCode" |
||||||
|
field="makerCode" |
||||||
|
org-fields="id,code" |
||||||
|
dest-fields="makerId,makerCode" |
||||||
|
code="zy_maker" |
||||||
|
:multi="false" |
||||||
|
@input="popupCallback" |
||||||
|
/> |
||||||
|
</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: 'HangerMakerForm', |
||||||
|
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: { |
||||||
|
ismaker: [ |
||||||
|
{required: true, message: '绑定方式不能为空!'}, |
||||||
|
], |
||||||
|
hangerCode: [ |
||||||
|
{required: true, message: '衣架编号不能为空!'}, |
||||||
|
], |
||||||
|
orderCode: [ |
||||||
|
{required: true, message: '工单编号不能为空!'}, |
||||||
|
], |
||||||
|
}, |
||||||
|
url: { |
||||||
|
add: "/hangermaker/hangerMaker/add", |
||||||
|
edit: "/hangermaker/hangerMaker/edit", |
||||||
|
queryById: "/hangermaker/hangerMaker/queryById" |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
formDisabled() { |
||||||
|
return this.disabled |
||||||
|
}, |
||||||
|
}, |
||||||
|
created() { |
||||||
|
//备份model原始值 |
||||||
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
add() { |
||||||
|
this.edit(this.modelDefault); |
||||||
|
}, |
||||||
|
edit(record) { |
||||||
|
this.model = Object.assign({}, record); |
||||||
|
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; |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
}) |
||||||
|
}, |
||||||
|
popupCallback(value, row) { |
||||||
|
this.model = Object.assign(this.model, row); |
||||||
|
}, |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
@ -1,213 +0,0 @@ |
|||||||
<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.hangerCode"></a-input> |
|
||||||
</a-form-item> |
|
||||||
</a-col> |
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
||||||
<a-form-item label="工单编号"> |
|
||||||
<a-input placeholder="请输入工单编号" v-model="queryParam.orderCode"></a-input> |
|
||||||
</a-form-item> |
|
||||||
</a-col> |
|
||||||
<template v-if="toggleSearchStatus"> |
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
||||||
<a-form-item label="制单编号"> |
|
||||||
<a-input placeholder="请输入制单编号" v-model="queryParam.makerCode"></a-input> |
|
||||||
</a-form-item> |
|
||||||
</a-col> |
|
||||||
</template> |
|
||||||
<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> |
|
||||||
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
|
||||||
</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="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> |
|
||||||
</span> |
|
||||||
|
|
||||||
</a-table> |
|
||||||
</div> |
|
||||||
|
|
||||||
<hanger-maker-modal ref="modalForm" @ok="modalFormOk"></hanger-maker-modal> |
|
||||||
</a-card> |
|
||||||
</template> |
|
||||||
|
|
||||||
<script> |
|
||||||
|
|
||||||
import '@/assets/less/TableExpand.less' |
|
||||||
import { mixinDevice } from '@/utils/mixin' |
|
||||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
|
||||||
import HangerMakerModal from './modules/HangerMakerModal' |
|
||||||
|
|
||||||
export default { |
|
||||||
name: 'HangerMakerList', |
|
||||||
mixins:[JeecgListMixin, mixinDevice], |
|
||||||
components: { |
|
||||||
HangerMakerModal |
|
||||||
}, |
|
||||||
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: 'hangerCode' |
|
||||||
}, |
|
||||||
{ |
|
||||||
title:'工单编号', |
|
||||||
align:"center", |
|
||||||
dataIndex: 'orderCode' |
|
||||||
}, |
|
||||||
{ |
|
||||||
title:'制单编号', |
|
||||||
align:"center", |
|
||||||
dataIndex: 'makerCode' |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '操作', |
|
||||||
dataIndex: 'action', |
|
||||||
align:"center", |
|
||||||
fixed:"right", |
|
||||||
width:147, |
|
||||||
scopedSlots: { customRender: 'action' } |
|
||||||
} |
|
||||||
], |
|
||||||
url: { |
|
||||||
list: "/hangermaker/hangerMaker/list", |
|
||||||
delete: "/hangermaker/hangerMaker/delete", |
|
||||||
deleteBatch: "/hangermaker/hangerMaker/deleteBatch", |
|
||||||
exportXlsUrl: "/hangermaker/hangerMaker/exportXls", |
|
||||||
importExcelUrl: "hangermaker/hangerMaker/importExcel", |
|
||||||
|
|
||||||
}, |
|
||||||
dictOptions:{}, |
|
||||||
superFieldList:[], |
|
||||||
} |
|
||||||
}, |
|
||||||
created() { |
|
||||||
this.getSuperFieldList(); |
|
||||||
}, |
|
||||||
computed: { |
|
||||||
importExcelUrl: function(){ |
|
||||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
|
||||||
}, |
|
||||||
}, |
|
||||||
methods: { |
|
||||||
initDictConfig(){ |
|
||||||
}, |
|
||||||
getSuperFieldList(){ |
|
||||||
let fieldList=[]; |
|
||||||
fieldList.push({type:'string',value:'hangerId',text:'衣架ID',dictCode:''}) |
|
||||||
fieldList.push({type:'popup',value:'hangerCode',text:'衣架编号', popup:{code:'hanger',field:'id',orgFields:'id',destFields:'hanger_id'}}) |
|
||||||
fieldList.push({type:'string',value:'orderId',text:'工单ID',dictCode:''}) |
|
||||||
fieldList.push({type:'popup',value:'orderCode',text:'工单编号', popup:{code:'zy_work_order',field:'id',orgFields:'id',destFields:'order_id'}}) |
|
||||||
fieldList.push({type:'string',value:'makerId',text:'制单ID',dictCode:''}) |
|
||||||
fieldList.push({type:'popup',value:'makerCode',text:'制单编号', popup:{code:'zy_document_order',field:'id',orgFields:'id',destFields:'maker_id'}}) |
|
||||||
this.superFieldList = fieldList |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
@import '~@assets/less/common.less'; |
|
||||||
</style> |
|
@ -1,156 +0,0 @@ |
|||||||
<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" v-show="false"> |
|
||||||
<a-form-model-item label="衣架ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hangerId"> |
|
||||||
<a-input v-model="model.hangerId" placeholder="请输入衣架ID" ></a-input> |
|
||||||
</a-form-model-item> |
|
||||||
</a-col> |
|
||||||
<a-col :span="24"> |
|
||||||
<a-form-model-item label="衣架编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hangerCode"> |
|
||||||
<j-popup |
|
||||||
v-model="model.hangerCode" |
|
||||||
field="hangerCode" |
|
||||||
org-fields="id,hanger_code" |
|
||||||
dest-fields="hangerId,hangerCode" |
|
||||||
code="hanger" |
|
||||||
:multi="false" |
|
||||||
@input="popupCallback" |
|
||||||
/> |
|
||||||
</a-form-model-item> |
|
||||||
</a-col> |
|
||||||
<a-col :span="24" v-show="false"> |
|
||||||
<a-form-model-item label="工单ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId"> |
|
||||||
<a-input v-model="model.orderId" placeholder="请输入工单ID" ></a-input> |
|
||||||
</a-form-model-item> |
|
||||||
</a-col> |
|
||||||
<a-col :span="24"> |
|
||||||
<a-form-model-item label="工单编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCode"> |
|
||||||
<j-popup |
|
||||||
v-model="model.orderCode" |
|
||||||
field="orderCode" |
|
||||||
org-fields="id,code" |
|
||||||
dest-fields="orderId,orderCode" |
|
||||||
code="zy_work_order" |
|
||||||
:multi="false" |
|
||||||
@input="popupCallback" |
|
||||||
/> |
|
||||||
</a-form-model-item> |
|
||||||
</a-col> |
|
||||||
<a-col :span="24" v-show="false"> |
|
||||||
<a-form-model-item label="制单ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="makerId"> |
|
||||||
<a-input v-model="model.makerId" placeholder="请输入制单ID" ></a-input> |
|
||||||
</a-form-model-item> |
|
||||||
</a-col> |
|
||||||
<a-col :span="24"> |
|
||||||
<a-form-model-item label="制单编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="makerCode"> |
|
||||||
<j-popup |
|
||||||
v-model="model.makerCode" |
|
||||||
field="makerCode" |
|
||||||
org-fields="id,code" |
|
||||||
dest-fields="makerId,makerCode" |
|
||||||
code="zy_document_order" |
|
||||||
:multi="false" |
|
||||||
@input="popupCallback" |
|
||||||
/> |
|
||||||
</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: 'HangerMakerForm', |
|
||||||
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: { |
|
||||||
}, |
|
||||||
url: { |
|
||||||
add: "/hangermaker/hangerMaker/add", |
|
||||||
edit: "/hangermaker/hangerMaker/edit", |
|
||||||
queryById: "/hangermaker/hangerMaker/queryById" |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
computed: { |
|
||||||
formDisabled(){ |
|
||||||
return this.disabled |
|
||||||
}, |
|
||||||
}, |
|
||||||
created () { |
|
||||||
//备份model原始值 |
|
||||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
|
||||||
}, |
|
||||||
methods: { |
|
||||||
add () { |
|
||||||
this.edit(this.modelDefault); |
|
||||||
}, |
|
||||||
edit (record) { |
|
||||||
this.model = Object.assign({}, record); |
|
||||||
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; |
|
||||||
}) |
|
||||||
} |
|
||||||
|
|
||||||
}) |
|
||||||
}, |
|
||||||
popupCallback(value,row){ |
|
||||||
this.model = Object.assign(this.model, row); |
|
||||||
}, |
|
||||||
} |
|
||||||
} |
|
||||||
</script> |
|
@ -0,0 +1,193 @@ |
|||||||
|
<template> |
||||||
|
<a-card :bordered="false"> |
||||||
|
<!-- 查询区域 --> |
||||||
|
<div class="table-page-search-wrapper"> |
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||||
|
<a-row :gutter="24"> |
||||||
|
</a-row> |
||||||
|
</a-form> |
||||||
|
</div> |
||||||
|
<!-- 查询区域-END --> |
||||||
|
<div class="table-operator"> |
||||||
|
<a-button @click="zyStyleFabricHandleAdd(planProcessId)" type="primary" icon="plus">新增</a-button> |
||||||
|
<a-button type="primary" icon="download" @click="handleExportXls('计划面料')">导出</a-button> |
||||||
|
<a-button type="primary" @click="fanHui()">返回</a-button> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!-- table区域-begin --> |
||||||
|
<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"> |
||||||
|
<span slot="action" slot-scope="text, record"> |
||||||
|
<a @click="handleEdit(record)">编辑</a> |
||||||
|
<!-- <a-divider type="vertical"/>--> |
||||||
|
<!-- <a @click="handleDetail(record)">详情</a>--> |
||||||
|
<a-divider type="vertical"/> |
||||||
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||||
|
<a>删除</a> |
||||||
|
</a-popconfirm> |
||||||
|
</span> |
||||||
|
</a-table> |
||||||
|
</div> |
||||||
|
|
||||||
|
<zy-plan-process-accessories-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-accessories-modal> |
||||||
|
</a-card> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
|
||||||
|
import '@/assets/less/TableExpand.less' |
||||||
|
import { mixinDevice } from '@/utils/mixin' |
||||||
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||||
|
import ZyPlanProcessAccessoriesModal from './modules/ZyPlanProcessAccessoriesModal' |
||||||
|
import {getAction} from "@api/manage"; |
||||||
|
import {filterObj} from "@/utils/util"; |
||||||
|
|
||||||
|
export default { |
||||||
|
name: 'ZyPlanProcessAccessoriesList', |
||||||
|
mixins:[JeecgListMixin, mixinDevice], |
||||||
|
components: { |
||||||
|
ZyPlanProcessAccessoriesModal |
||||||
|
}, |
||||||
|
data () { |
||||||
|
return { |
||||||
|
description: '计划工序辅料管理管理页面', |
||||||
|
// 表头 |
||||||
|
columns: [ |
||||||
|
{ |
||||||
|
title: '#', |
||||||
|
dataIndex: '', |
||||||
|
key:'rowIndex', |
||||||
|
width:60, |
||||||
|
align:"center", |
||||||
|
customRender:function (t,r,index) { |
||||||
|
return parseInt(index)+1; |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '计划工序ID', |
||||||
|
align: "center", |
||||||
|
dataIndex: 'planProcessId', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'辅料', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'accessoriesId_dictText' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'用量', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'amount' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '操作', |
||||||
|
dataIndex: 'action', |
||||||
|
align:"center", |
||||||
|
fixed:"right", |
||||||
|
width:147, |
||||||
|
scopedSlots: { customRender: 'action' } |
||||||
|
} |
||||||
|
], |
||||||
|
url: { |
||||||
|
list: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/list", |
||||||
|
delete: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/delete", |
||||||
|
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/deleteBatch", |
||||||
|
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/exportXls", |
||||||
|
importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcessAccessories/importExcel", |
||||||
|
|
||||||
|
}, |
||||||
|
dictOptions:{}, |
||||||
|
superFieldList:[], |
||||||
|
loadRouteType: false, |
||||||
|
planProcessId: '', |
||||||
|
} |
||||||
|
}, |
||||||
|
created() { |
||||||
|
// this.getSuperFieldList(); |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
importExcelUrl: function(){ |
||||||
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||||
|
}, |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
fanHui(record) { |
||||||
|
this.$router.push({ |
||||||
|
path: '/productplan/ZyPlanProcessAccessoriesList', |
||||||
|
}); |
||||||
|
}, |
||||||
|
valueChange(value) { |
||||||
|
if (value) this.loadData() |
||||||
|
}, |
||||||
|
//加载传递参数 |
||||||
|
loadParameter() { |
||||||
|
if (this.loadRouteType === false) { |
||||||
|
this.planProcessId = this.$route.query.planProcessId; |
||||||
|
// this.biaoTi = this.$route.query.styleNames+"款式面料管理"; |
||||||
|
console.log("*******传递的planProcessId:" + this.planProcessId) |
||||||
|
this.loadRouteType = true; |
||||||
|
} |
||||||
|
}, |
||||||
|
loadData(arg) { |
||||||
|
if (!this.url.list) { |
||||||
|
this.$message.error("请设置url.list属性!") |
||||||
|
return |
||||||
|
} |
||||||
|
//加载数据 若传入参数1则加载第一页的内容 |
||||||
|
if (arg === 1) { |
||||||
|
this.ipagination.current = 1; |
||||||
|
} |
||||||
|
this.loadParameter(); |
||||||
|
var params = this.getQueryParams();//查询条件 |
||||||
|
this.loading = true; |
||||||
|
console.log("----------------the params:", params); |
||||||
|
getAction(this.url.list, params).then((res) => { |
||||||
|
if (res.success) { |
||||||
|
this.dataSource = res.result.records || res.result; |
||||||
|
if (res.result.total) { |
||||||
|
this.ipagination.total = res.result.total; |
||||||
|
} else { |
||||||
|
this.ipagination.total = 0; |
||||||
|
} |
||||||
|
} else { |
||||||
|
this.$message.warning(res.message) |
||||||
|
} |
||||||
|
}).finally(() => { |
||||||
|
// this.dataSource.forEach(item => { |
||||||
|
// item['stationName'] = this.stationName; |
||||||
|
// item['stationNum'] = this.stationNum; |
||||||
|
// }) |
||||||
|
this.loading = false |
||||||
|
}) |
||||||
|
}, |
||||||
|
getQueryParams() { |
||||||
|
//获取查询条件 |
||||||
|
let sqp = {} |
||||||
|
if (this.superQueryParams) { |
||||||
|
sqp['superQueryParams'] = encodeURI(this.superQueryParams) |
||||||
|
sqp['superQueryMatchType'] = this.superQueryMatchType |
||||||
|
} |
||||||
|
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); |
||||||
|
param.field = this.getQueryField(); |
||||||
|
param.pageNo = this.ipagination.current; |
||||||
|
param.pageSize = this.ipagination.pageSize; |
||||||
|
param.planProcessId = this.planProcessId; |
||||||
|
return filterObj(param); |
||||||
|
}, |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
|
<style scoped> |
||||||
|
@import '~@assets/less/common.less'; |
||||||
|
</style> |
@ -0,0 +1,145 @@ |
|||||||
|
<template> |
||||||
|
<a-card :bordered="false"> |
||||||
|
<!-- 查询区域 --> |
||||||
|
<div class="table-page-search-wrapper"> |
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||||
|
<a-row :gutter="24"> |
||||||
|
</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> |
||||||
|
<!-- 高级查询区域 --> |
||||||
|
<j-super-query :fieldList="superFieldList" ref="superQueryModal" |
||||||
|
@handleSuperQuery="handleSuperQuery"></j-super-query> |
||||||
|
</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"> |
||||||
|
|
||||||
|
<span slot="action" slot-scope="text, record"> |
||||||
|
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">--> |
||||||
|
<!-- <a>删除</a>--> |
||||||
|
<!-- </a-popconfirm>--> |
||||||
|
<!-- <a-divider type="vertical"/>--> |
||||||
|
<a @click="jumpPage1(record)">制定计划面料</a> |
||||||
|
</span> |
||||||
|
</a-table> |
||||||
|
</div> |
||||||
|
|
||||||
|
<zy-plan-process-accessories-modal2 ref="modalForm" @ok="modalFormOk"></zy-plan-process-accessories-modal2> |
||||||
|
</a-card> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
|
||||||
|
import '@/assets/less/TableExpand.less' |
||||||
|
import {mixinDevice} from '@/utils/mixin' |
||||||
|
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
||||||
|
import ZyPlanProcessAccessoriesModal2 from './modules/ZyPlanProcessAccessoriesModal2' |
||||||
|
|
||||||
|
export default { |
||||||
|
name: 'ZyPlanProcessAccessoriesList2', |
||||||
|
mixins: [JeecgListMixin, mixinDevice], |
||||||
|
components: { |
||||||
|
ZyPlanProcessAccessoriesModal2 |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
description: '计划工序辅料管理管理页面', |
||||||
|
// 表头 |
||||||
|
columns: [ |
||||||
|
{ |
||||||
|
title: '#', |
||||||
|
dataIndex: '', |
||||||
|
key: 'rowIndex', |
||||||
|
width: 60, |
||||||
|
align: "center", |
||||||
|
customRender: function (t, r, index) { |
||||||
|
return parseInt(index) + 1; |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '计划ID', |
||||||
|
align: "center", |
||||||
|
dataIndex: 'planId' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '计划工序ID', |
||||||
|
align: "center", |
||||||
|
dataIndex: 'planProcessId' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '辅料', |
||||||
|
align: "center", |
||||||
|
dataIndex: 'accessoriesId_dictText' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '用量', |
||||||
|
align: "center", |
||||||
|
dataIndex: 'amount' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '操作', |
||||||
|
dataIndex: 'action', |
||||||
|
align: "center", |
||||||
|
fixed: "right", |
||||||
|
width: 147, |
||||||
|
scopedSlots: {customRender: 'action'} |
||||||
|
} |
||||||
|
], |
||||||
|
url: { |
||||||
|
list: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/list", |
||||||
|
delete: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/delete", |
||||||
|
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/deleteBatch", |
||||||
|
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/exportXls", |
||||||
|
importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcessAccessories/importExcel", |
||||||
|
|
||||||
|
}, |
||||||
|
dictOptions: {}, |
||||||
|
superFieldList: [], |
||||||
|
} |
||||||
|
}, |
||||||
|
created() { |
||||||
|
// this.getSuperFieldList(); |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
importExcelUrl: function () { |
||||||
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||||
|
}, |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
jumpPage1(record) { |
||||||
|
this.$router.push({ |
||||||
|
path: '/productplan/ZyPlanProcessAccessoriesDataList', |
||||||
|
query: { // 路由携带参数 |
||||||
|
'planProcessId': record.planProcessId, |
||||||
|
}, |
||||||
|
}); |
||||||
|
}, |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
@ -0,0 +1,196 @@ |
|||||||
|
<template> |
||||||
|
<a-card :bordered="false"> |
||||||
|
<!-- 查询区域 --> |
||||||
|
<div class="table-page-search-wrapper"> |
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||||
|
<a-row :gutter="24"> |
||||||
|
</a-row> |
||||||
|
</a-form> |
||||||
|
</div> |
||||||
|
<!-- 查询区域-END --> |
||||||
|
<div class="table-operator"> |
||||||
|
<a-button @click="zyStyleFabricHandleAdd(planProcessId)" type="primary" icon="plus">新增</a-button> |
||||||
|
<a-button type="primary" icon="download" @click="handleExportXls('计划面料')">导出</a-button> |
||||||
|
<a-button type="primary" @click="fanHui()">返回</a-button> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!-- table区域-begin --> |
||||||
|
<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"> |
||||||
|
<span slot="action" slot-scope="text, record"> |
||||||
|
<a @click="handleEdit(record)">编辑</a> |
||||||
|
<!-- <a-divider type="vertical"/>--> |
||||||
|
<!-- <a @click="handleDetail(record)">详情</a>--> |
||||||
|
<a-divider type="vertical"/> |
||||||
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||||
|
<a>删除</a> |
||||||
|
</a-popconfirm> |
||||||
|
</span> |
||||||
|
</a-table> |
||||||
|
</div> |
||||||
|
|
||||||
|
<zy-plan-process-fabric-modal @valueChange="valueChange" ref="modalForm" |
||||||
|
@ok="modalFormOk"></zy-plan-process-fabric-modal> |
||||||
|
</a-card> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
|
||||||
|
import '@/assets/less/TableExpand.less' |
||||||
|
import {mixinDevice} from '@/utils/mixin' |
||||||
|
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
||||||
|
import ZyPlanProcessFabricModal from './modules/ZyPlanProcessFabricModal' |
||||||
|
import {getAction} from "@api/manage"; |
||||||
|
import {filterObj} from "@/utils/util"; |
||||||
|
|
||||||
|
export default { |
||||||
|
name: 'ZyPlanProcessFabricList', |
||||||
|
mixins: [JeecgListMixin, mixinDevice], |
||||||
|
components: { |
||||||
|
ZyPlanProcessFabricModal |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
description: '计划工序面料管理管理页面', |
||||||
|
// 表头 |
||||||
|
columns: [ |
||||||
|
{ |
||||||
|
title: '#', |
||||||
|
dataIndex: '', |
||||||
|
key: 'rowIndex', |
||||||
|
width: 60, |
||||||
|
align: "center", |
||||||
|
customRender: function (t, r, index) { |
||||||
|
return parseInt(index) + 1; |
||||||
|
} |
||||||
|
}, |
||||||
|
// { |
||||||
|
// title:'计划ID', |
||||||
|
// align:"center", |
||||||
|
// dataIndex: 'planId' |
||||||
|
// }, |
||||||
|
{ |
||||||
|
title: '计划工序ID', |
||||||
|
align: "center", |
||||||
|
dataIndex: 'planProcessId', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '面料', |
||||||
|
align: "center", |
||||||
|
dataIndex: 'fabricId_dictText' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '用量', |
||||||
|
align: "center", |
||||||
|
dataIndex: 'amount' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '操作', |
||||||
|
dataIndex: 'action', |
||||||
|
align: "center", |
||||||
|
fixed: "right", |
||||||
|
width: 147, |
||||||
|
scopedSlots: {customRender: 'action'} |
||||||
|
} |
||||||
|
], |
||||||
|
url: { |
||||||
|
list: "/org.jeecg.modules.productplan/zyPlanProcessFabric/list", |
||||||
|
delete: "/org.jeecg.modules.productplan/zyPlanProcessFabric/delete", |
||||||
|
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcessFabric/deleteBatch", |
||||||
|
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcessFabric/exportXls", |
||||||
|
importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcessFabric/importExcel", |
||||||
|
|
||||||
|
}, |
||||||
|
dictOptions: {}, |
||||||
|
superFieldList: [], |
||||||
|
loadRouteType: false, |
||||||
|
planProcessId: '', |
||||||
|
} |
||||||
|
}, |
||||||
|
created() { |
||||||
|
// this.getSuperFieldList(); |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
importExcelUrl: function () { |
||||||
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||||
|
}, |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
fanHui(record) { |
||||||
|
this.$router.push({ |
||||||
|
path: '/productplan/ZyPlanProcessFabricList', |
||||||
|
}); |
||||||
|
}, |
||||||
|
valueChange(value) { |
||||||
|
if (value) this.loadData() |
||||||
|
}, |
||||||
|
//加载传递参数 |
||||||
|
loadParameter() { |
||||||
|
if (this.loadRouteType === false) { |
||||||
|
this.planProcessId = this.$route.query.planProcessId; |
||||||
|
// this.biaoTi = this.$route.query.styleNames+"款式面料管理"; |
||||||
|
console.log("*******传递的planProcessId:" + this.planProcessId) |
||||||
|
this.loadRouteType = true; |
||||||
|
} |
||||||
|
}, |
||||||
|
loadData(arg) { |
||||||
|
if (!this.url.list) { |
||||||
|
this.$message.error("请设置url.list属性!") |
||||||
|
return |
||||||
|
} |
||||||
|
//加载数据 若传入参数1则加载第一页的内容 |
||||||
|
if (arg === 1) { |
||||||
|
this.ipagination.current = 1; |
||||||
|
} |
||||||
|
this.loadParameter(); |
||||||
|
var params = this.getQueryParams();//查询条件 |
||||||
|
this.loading = true; |
||||||
|
console.log("----------------the params:", params); |
||||||
|
getAction(this.url.list, params).then((res) => { |
||||||
|
if (res.success) { |
||||||
|
this.dataSource = res.result.records || res.result; |
||||||
|
if (res.result.total) { |
||||||
|
this.ipagination.total = res.result.total; |
||||||
|
} else { |
||||||
|
this.ipagination.total = 0; |
||||||
|
} |
||||||
|
} else { |
||||||
|
this.$message.warning(res.message) |
||||||
|
} |
||||||
|
}).finally(() => { |
||||||
|
// this.dataSource.forEach(item => { |
||||||
|
// item['stationName'] = this.stationName; |
||||||
|
// item['stationNum'] = this.stationNum; |
||||||
|
// }) |
||||||
|
this.loading = false |
||||||
|
}) |
||||||
|
}, |
||||||
|
getQueryParams() { |
||||||
|
//获取查询条件 |
||||||
|
let sqp = {} |
||||||
|
if (this.superQueryParams) { |
||||||
|
sqp['superQueryParams'] = encodeURI(this.superQueryParams) |
||||||
|
sqp['superQueryMatchType'] = this.superQueryMatchType |
||||||
|
} |
||||||
|
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); |
||||||
|
param.field = this.getQueryField(); |
||||||
|
param.pageNo = this.ipagination.current; |
||||||
|
param.pageSize = this.ipagination.pageSize; |
||||||
|
param.planProcessId = this.planProcessId; |
||||||
|
return filterObj(param); |
||||||
|
}, |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
@ -0,0 +1,152 @@ |
|||||||
|
<template> |
||||||
|
<a-card :bordered="false"> |
||||||
|
<!-- 查询区域 --> |
||||||
|
<div class="table-page-search-wrapper"> |
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||||
|
<a-row :gutter="24"> |
||||||
|
</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"> |
||||||
|
|
||||||
|
<span slot="action" slot-scope="text, record"> |
||||||
|
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">--> |
||||||
|
<!-- <a>删除</a>--> |
||||||
|
<!-- </a-popconfirm>--> |
||||||
|
<!-- <a-divider type="vertical"/>--> |
||||||
|
<a @click="jumpPage1(record)">制定计划面料</a> |
||||||
|
</span> |
||||||
|
</a-table> |
||||||
|
</div> |
||||||
|
|
||||||
|
<zy-plan-process-fabric-modal2 ref="modalForm" @ok="modalFormOk"></zy-plan-process-fabric-modal2> |
||||||
|
</a-card> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
|
||||||
|
import '@/assets/less/TableExpand.less' |
||||||
|
import { mixinDevice } from '@/utils/mixin' |
||||||
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||||
|
import ZyPlanProcessFabricModal2 from './modules/ZyPlanProcessFabricModal2' |
||||||
|
|
||||||
|
export default { |
||||||
|
name: 'ZyPlanProcessFabricList', |
||||||
|
mixins:[JeecgListMixin, mixinDevice], |
||||||
|
components: { |
||||||
|
ZyPlanProcessFabricModal2 |
||||||
|
}, |
||||||
|
data () { |
||||||
|
return { |
||||||
|
description: '计划工序面料管理管理页面', |
||||||
|
// 表头 |
||||||
|
columns: [ |
||||||
|
{ |
||||||
|
title: '#', |
||||||
|
dataIndex: '', |
||||||
|
key:'rowIndex', |
||||||
|
width:60, |
||||||
|
align:"center", |
||||||
|
customRender:function (t,r,index) { |
||||||
|
return parseInt(index)+1; |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'计划ID', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'planId' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'计划工序ID', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'planProcessId' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'面料', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'fabricId_dictText' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'用量', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'amount' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '操作', |
||||||
|
dataIndex: 'action', |
||||||
|
align:"center", |
||||||
|
fixed:"right", |
||||||
|
width:147, |
||||||
|
scopedSlots: { customRender: 'action' } |
||||||
|
} |
||||||
|
], |
||||||
|
url: { |
||||||
|
list: "/org.jeecg.modules.productplan/zyPlanProcessFabric/list", |
||||||
|
delete: "/org.jeecg.modules.productplan/zyPlanProcessFabric/delete", |
||||||
|
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcessFabric/deleteBatch", |
||||||
|
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcessFabric/exportXls", |
||||||
|
importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcessFabric/importExcel", |
||||||
|
|
||||||
|
}, |
||||||
|
dictOptions:{}, |
||||||
|
superFieldList:[], |
||||||
|
} |
||||||
|
}, |
||||||
|
created() { |
||||||
|
// this.getSuperFieldList(); |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
importExcelUrl: function(){ |
||||||
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||||
|
}, |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
jumpPage1(record) { |
||||||
|
this.$router.push({ |
||||||
|
path: '/productplan/ZyPlanProcessFabricDataList', |
||||||
|
query: { // 路由携带参数 |
||||||
|
'planProcessId': record.planProcessId, |
||||||
|
}, |
||||||
|
}); |
||||||
|
}, |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
@ -0,0 +1,120 @@ |
|||||||
|
<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="辅料id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accessoriesId"> |
||||||
|
<j-dict-select-tag type="list" v-model="model.accessoriesId" dictCode="zy_accessories,contents,id" |
||||||
|
placeholder="请选择辅料"/> |
||||||
|
</a-form-model-item> |
||||||
|
</a-col> |
||||||
|
<a-col :span="24"> |
||||||
|
<a-form-model-item label="用量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount"> |
||||||
|
<a-input-number v-model="model.amount" placeholder="请输入用量" style="width: 100%" /> |
||||||
|
</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: 'ZyPlanProcessAccessoriesForm', |
||||||
|
components: { |
||||||
|
}, |
||||||
|
props: { |
||||||
|
//表单禁用 |
||||||
|
disabled: { |
||||||
|
type: Boolean, |
||||||
|
default: false, |
||||||
|
required: false |
||||||
|
} |
||||||
|
}, |
||||||
|
data () { |
||||||
|
return { |
||||||
|
model: { |
||||||
|
planProcessId: '', |
||||||
|
}, |
||||||
|
labelCol: { |
||||||
|
xs: { span: 24 }, |
||||||
|
sm: { span: 5 }, |
||||||
|
}, |
||||||
|
wrapperCol: { |
||||||
|
xs: { span: 24 }, |
||||||
|
sm: { span: 16 }, |
||||||
|
}, |
||||||
|
confirmLoading: false, |
||||||
|
validatorRules: { |
||||||
|
accessoriesId: [ |
||||||
|
{required: true, message: "辅料不能为空"}, |
||||||
|
], |
||||||
|
amount: [ |
||||||
|
{required: true, message: "用量不能不空"}, |
||||||
|
{pattern: /^[0-9]{0,1000}$/, message: '用量不能为空且长度为正整数'} |
||||||
|
], |
||||||
|
}, |
||||||
|
url: { |
||||||
|
add: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/add", |
||||||
|
edit: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/edit", |
||||||
|
queryById: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/queryById" |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
formDisabled(){ |
||||||
|
return this.disabled |
||||||
|
}, |
||||||
|
}, |
||||||
|
created () { |
||||||
|
//备份model原始值 |
||||||
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
add(planProcessId) { |
||||||
|
this.model.planProcessId = planProcessId; |
||||||
|
console.log("Modal层接收到上级参数-planProcessId:" + this.model.planProcessId); |
||||||
|
this.edit(this.model); |
||||||
|
}, |
||||||
|
edit (record) { |
||||||
|
this.model = Object.assign({}, record); |
||||||
|
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,111 @@ |
|||||||
|
<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="planId"> |
||||||
|
<!-- <a-input v-model="model.planId" placeholder="请选择生产计划"></a-input>--> |
||||||
|
<j-dict-select-tag type="list" v-model="model.planId" dictCode="zy_product_plan,id,id" |
||||||
|
placeholder="请选择生产计划"/> |
||||||
|
</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: 'ZyPlanProcessAccessoriesForm2', |
||||||
|
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: { |
||||||
|
amount: [ |
||||||
|
{ required: false}, |
||||||
|
{ pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'}, |
||||||
|
], |
||||||
|
}, |
||||||
|
url: { |
||||||
|
add: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/add", |
||||||
|
saveBatch: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/saveBatch", |
||||||
|
edit: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/edit", |
||||||
|
queryById: "/org.jeecg.modules.productplan/zyPlanProcessAccessories/queryById" |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
formDisabled(){ |
||||||
|
return this.disabled |
||||||
|
}, |
||||||
|
}, |
||||||
|
created () { |
||||||
|
//备份model原始值 |
||||||
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
add () { |
||||||
|
this.edit(this.modelDefault); |
||||||
|
}, |
||||||
|
edit (record) { |
||||||
|
this.model = Object.assign({}, record); |
||||||
|
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.saveBatch; |
||||||
|
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,64 @@ |
|||||||
|
<template> |
||||||
|
<j-modal |
||||||
|
:title="title" |
||||||
|
:width="width" |
||||||
|
:visible="visible" |
||||||
|
switchFullscreen |
||||||
|
@ok="handleOk" |
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||||
|
@cancel="handleCancel" |
||||||
|
cancelText="关闭"> |
||||||
|
<zy-plan-process-accessories-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-plan-process-accessories-form> |
||||||
|
</j-modal> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
|
||||||
|
import ZyPlanProcessAccessoriesForm from './ZyPlanProcessAccessoriesForm' |
||||||
|
export default { |
||||||
|
name: 'ZyPlanProcessAccessoriesModal', |
||||||
|
components: { |
||||||
|
ZyPlanProcessAccessoriesForm |
||||||
|
}, |
||||||
|
data () { |
||||||
|
return { |
||||||
|
model:{ |
||||||
|
planProcessId:'', |
||||||
|
}, |
||||||
|
title:'', |
||||||
|
width:800, |
||||||
|
visible: false, |
||||||
|
disableSubmit: false |
||||||
|
} |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
add (id) { |
||||||
|
this.model.planProcessId=id |
||||||
|
this.visible=true |
||||||
|
this.$nextTick(()=>{ |
||||||
|
this.$refs.realForm.add(id); |
||||||
|
}) |
||||||
|
}, |
||||||
|
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,60 @@ |
|||||||
|
<template> |
||||||
|
<j-modal |
||||||
|
:title="title" |
||||||
|
:width="width" |
||||||
|
:visible="visible" |
||||||
|
switchFullscreen |
||||||
|
@ok="handleOk" |
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||||
|
@cancel="handleCancel" |
||||||
|
cancelText="关闭"> |
||||||
|
<zy-plan-process-accessories-form2 ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-plan-process-accessories-form2> |
||||||
|
</j-modal> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
|
||||||
|
import ZyPlanProcessAccessoriesForm2 from './ZyPlanProcessAccessoriesForm2' |
||||||
|
export default { |
||||||
|
name: 'ZyPlanProcessAccessoriesModal2', |
||||||
|
components: { |
||||||
|
ZyPlanProcessAccessoriesForm2 |
||||||
|
}, |
||||||
|
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-plan-process-accessories-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></zy-plan-process-accessories-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 ZyPlanProcessAccessoriesForm from './ZyPlanProcessAccessoriesForm' |
||||||
|
|
||||||
|
export default { |
||||||
|
name: 'ZyPlanProcessAccessoriesModal', |
||||||
|
components: { |
||||||
|
ZyPlanProcessAccessoriesForm |
||||||
|
}, |
||||||
|
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> |
@ -0,0 +1,120 @@ |
|||||||
|
<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="面料id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricId"> |
||||||
|
<!-- <j-multi-select-tag type="list_multi" v-model="model.fabricId" dictCode="zy_fabric,name,id"--> |
||||||
|
<!-- placeholder="请选择面料"/>--> |
||||||
|
<j-dict-select-tag type="list" v-model="model.fabricId" dictCode="zy_fabric,name,id" placeholder="请选择面料"/> |
||||||
|
</a-form-model-item> |
||||||
|
</a-col> |
||||||
|
<a-col :span="24"> |
||||||
|
<a-form-model-item label="用量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount"> |
||||||
|
<a-input-number v-model="model.amount" placeholder="请输入用量" style="width: 100%"/> |
||||||
|
</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: 'ZyPlanProcessFabricForm', |
||||||
|
components: {}, |
||||||
|
props: { |
||||||
|
//表单禁用 |
||||||
|
disabled: { |
||||||
|
type: Boolean, |
||||||
|
default: false, |
||||||
|
required: false |
||||||
|
} |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
model: { |
||||||
|
planProcessId: '', |
||||||
|
}, |
||||||
|
labelCol: { |
||||||
|
xs: {span: 24}, |
||||||
|
sm: {span: 5}, |
||||||
|
}, |
||||||
|
wrapperCol: { |
||||||
|
xs: {span: 24}, |
||||||
|
sm: {span: 16}, |
||||||
|
}, |
||||||
|
confirmLoading: false, |
||||||
|
validatorRules: { |
||||||
|
fabricId: [ |
||||||
|
{required: true, message: "面料不能为空"}, |
||||||
|
], |
||||||
|
amount: [ |
||||||
|
{required: true, message: "用量不能不空"}, |
||||||
|
{pattern: /^[0-9]{0,1000}$/, message: '用量不能为空且长度为正整数'} |
||||||
|
], |
||||||
|
}, |
||||||
|
url: { |
||||||
|
add: "/org.jeecg.modules.productplan/zyPlanProcessFabric/add", |
||||||
|
edit: "/org.jeecg.modules.productplan/zyPlanProcessFabric/edit", |
||||||
|
queryById: "/org.jeecg.modules.productplan/zyPlanProcessFabric/queryById" |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
formDisabled() { |
||||||
|
return this.disabled |
||||||
|
}, |
||||||
|
}, |
||||||
|
created() { |
||||||
|
//备份model原始值 |
||||||
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
add(planProcessId) { |
||||||
|
this.model.planProcessId = planProcessId; |
||||||
|
console.log("Modal层接收到上级参数-planProcessId:" + this.model.planProcessId); |
||||||
|
this.edit(this.model); |
||||||
|
}, |
||||||
|
edit(record) { |
||||||
|
this.model = Object.assign({}, record); |
||||||
|
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,109 @@ |
|||||||
|
<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="planId"> |
||||||
|
<!-- <a-input v-model="model.planId" placeholder="请选择生产计划"></a-input>--> |
||||||
|
<j-dict-select-tag type="list" v-model="model.planId" dictCode="zy_product_plan,id,id" |
||||||
|
placeholder="请选择生产计划"/> |
||||||
|
</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: 'ZyPlanProcessFabricForm2', |
||||||
|
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: { |
||||||
|
amount: [ |
||||||
|
{required: false}, |
||||||
|
{pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'}, |
||||||
|
], |
||||||
|
}, |
||||||
|
url: { |
||||||
|
add: "/org.jeecg.modules.productplan/zyPlanProcessFabric/add", |
||||||
|
saveBatch: "/org.jeecg.modules.productplan/zyPlanProcessFabric/saveBatch", |
||||||
|
edit: "/org.jeecg.modules.productplan/zyPlanProcessFabric/edit", |
||||||
|
queryById: "/org.jeecg.modules.productplan/zyPlanProcessFabric/queryById" |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
formDisabled() { |
||||||
|
return this.disabled |
||||||
|
}, |
||||||
|
}, |
||||||
|
created() { |
||||||
|
//备份model原始值 |
||||||
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
add() { |
||||||
|
this.edit(this.modelDefault); |
||||||
|
}, |
||||||
|
edit(record) { |
||||||
|
this.model = Object.assign({}, record); |
||||||
|
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.saveBatch; |
||||||
|
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,72 @@ |
|||||||
|
<template> |
||||||
|
<j-modal |
||||||
|
:title="title" |
||||||
|
:width="width" |
||||||
|
:visible="visible" |
||||||
|
switchFullscreen |
||||||
|
@ok="handleOk" |
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||||
|
@cancel="handleCancel" |
||||||
|
cancelText="关闭"> |
||||||
|
<zy-plan-process-fabric-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-plan-process-fabric-form> |
||||||
|
</j-modal> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
|
||||||
|
import ZyPlanProcessFabricForm from './ZyPlanProcessFabricForm' |
||||||
|
export default { |
||||||
|
name: 'ZyPlanProcessFabricModal', |
||||||
|
components: { |
||||||
|
ZyPlanProcessFabricForm |
||||||
|
}, |
||||||
|
data () { |
||||||
|
return { |
||||||
|
model:{ |
||||||
|
planProcessId:'', |
||||||
|
}, |
||||||
|
title:'', |
||||||
|
width:800, |
||||||
|
visible: false, |
||||||
|
disableSubmit: false |
||||||
|
} |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
|
||||||
|
add (id) { |
||||||
|
this.model.planProcessId=id |
||||||
|
this.visible=true |
||||||
|
this.$nextTick(()=>{ |
||||||
|
this.$refs.realForm.add(id); |
||||||
|
}) |
||||||
|
}, |
||||||
|
|
||||||
|
// 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,60 @@ |
|||||||
|
<template> |
||||||
|
<j-modal |
||||||
|
:title="title" |
||||||
|
:width="width" |
||||||
|
:visible="visible" |
||||||
|
switchFullscreen |
||||||
|
@ok="handleOk" |
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||||
|
@cancel="handleCancel" |
||||||
|
cancelText="关闭"> |
||||||
|
<zy-plan-process-fabric-form2 ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-plan-process-fabric-form2> |
||||||
|
</j-modal> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
|
||||||
|
import ZyPlanProcessFabricForm2 from './ZyPlanProcessFabricForm2' |
||||||
|
export default { |
||||||
|
name: 'ZyPlanProcessFabricModal2', |
||||||
|
components: { |
||||||
|
ZyPlanProcessFabricForm2 |
||||||
|
}, |
||||||
|
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-plan-process-fabric-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></zy-plan-process-fabric-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 ZyPlanProcessFabricForm from './ZyPlanProcessFabricForm' |
||||||
|
|
||||||
|
export default { |
||||||
|
name: 'ZyPlanProcessFabricModal', |
||||||
|
components: { |
||||||
|
ZyPlanProcessFabricForm |
||||||
|
}, |
||||||
|
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> |
@ -0,0 +1,200 @@ |
|||||||
|
package org.jeecg.modules.productplan.controller; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.jeecg.common.api.vo.Result; |
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog; |
||||||
|
import org.jeecg.common.exception.JeecgBootException; |
||||||
|
import org.jeecg.common.system.base.controller.JeecgController; |
||||||
|
import org.jeecg.common.system.query.QueryGenerator; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanProcess; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanProcessAccessories; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyProductPlan; |
||||||
|
import org.jeecg.modules.productplan.service.IZyPlanProcessAccessoriesService; |
||||||
|
import org.jeecg.modules.productplan.service.IZyPlanProcessService; |
||||||
|
import org.jeecg.modules.productplan.service.IZyProductPlanService; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.util.ObjectUtils; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
import org.springframework.web.servlet.ModelAndView; |
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest; |
||||||
|
import javax.servlet.http.HttpServletResponse; |
||||||
|
import java.util.Arrays; |
||||||
|
import java.util.LinkedList; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Description: 计划工序辅料管理 |
||||||
|
* @Author: jeecg-boot |
||||||
|
* @Date: 2023-01-10 |
||||||
|
* @Version: V1.0 |
||||||
|
*/ |
||||||
|
@Api(tags = "计划工序辅料管理") |
||||||
|
@RestController |
||||||
|
@RequestMapping("/org.jeecg.modules.productplan/zyPlanProcessAccessories") |
||||||
|
@Slf4j |
||||||
|
public class ZyPlanProcessAccessoriesController extends JeecgController<ZyPlanProcessAccessories, IZyPlanProcessAccessoriesService> { |
||||||
|
@Autowired |
||||||
|
private IZyPlanProcessAccessoriesService zyPlanProcessAccessoriesService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private IZyPlanProcessService iZyPlanProcessService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private IZyProductPlanService iZyProductPlanService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页列表查询 |
||||||
|
* |
||||||
|
* @param zyPlanProcessAccessories |
||||||
|
* @param pageNo |
||||||
|
* @param pageSize |
||||||
|
* @param req |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@AutoLog(value = "计划工序辅料管理-分页列表查询") |
||||||
|
@ApiOperation(value = "计划工序辅料管理-分页列表查询", notes = "计划工序辅料管理-分页列表查询") |
||||||
|
@GetMapping(value = "/list") |
||||||
|
public Result<?> queryPageList(ZyPlanProcessAccessories zyPlanProcessAccessories, |
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||||
|
HttpServletRequest req) { |
||||||
|
QueryWrapper<ZyPlanProcessAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcessAccessories, req.getParameterMap()); |
||||||
|
Page<ZyPlanProcessAccessories> page = new Page<ZyPlanProcessAccessories>(pageNo, pageSize); |
||||||
|
IPage<ZyPlanProcessAccessories> pageList = zyPlanProcessAccessoriesService.page(page, queryWrapper); |
||||||
|
List<ZyPlanProcessAccessories> records = pageList.getRecords(); |
||||||
|
if (!ObjectUtils.isEmpty(records)) { |
||||||
|
records.forEach(e -> { |
||||||
|
ZyPlanProcess zyPlanProcess = iZyPlanProcessService.getById(e.getPlanProcessId()); |
||||||
|
if (!ObjectUtils.isEmpty(zyPlanProcess)) { |
||||||
|
e.setPlanId(zyPlanProcess.getPlanId()); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
return Result.OK(pageList); |
||||||
|
} |
||||||
|
|
||||||
|
@ApiOperation(value = "计划工序辅料管理-添加", notes = "计划工序辅料管理-添加") |
||||||
|
@PostMapping(value = "/saveBatch") |
||||||
|
public Result<?> saveBatch(@RequestBody ZyPlanProcessAccessories zyPlanProcessAccessories) { |
||||||
|
ZyProductPlan zyProductPlan = iZyProductPlanService.getById(zyPlanProcessAccessories.getPlanId()); |
||||||
|
if (ObjectUtils.isEmpty(zyProductPlan)) |
||||||
|
throw new JeecgBootException(zyPlanProcessAccessories.getPlanId() + "-生产计划不存在"); |
||||||
|
|
||||||
|
List<ZyPlanProcessAccessories> addList = new LinkedList<>(); |
||||||
|
List<ZyPlanProcess> processList = iZyPlanProcessService.list(new LambdaQueryWrapper<ZyPlanProcess>().eq(ZyPlanProcess::getPlanId, zyPlanProcessAccessories.getPlanId())); |
||||||
|
if (!ObjectUtils.isEmpty(processList)) { |
||||||
|
processList.forEach(e -> { |
||||||
|
ZyPlanProcessAccessories en = new ZyPlanProcessAccessories(); |
||||||
|
en.setPlanProcessId(e.getId()); |
||||||
|
addList.add(en); |
||||||
|
}); |
||||||
|
} |
||||||
|
zyPlanProcessAccessoriesService.saveBatch(addList); |
||||||
|
return Result.OK("添加成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 添加 |
||||||
|
* |
||||||
|
* @param zyPlanProcessAccessories |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@AutoLog(value = "计划工序辅料管理-添加") |
||||||
|
@ApiOperation(value = "计划工序辅料管理-添加", notes = "计划工序辅料管理-添加") |
||||||
|
@PostMapping(value = "/add") |
||||||
|
public Result<?> add(@RequestBody ZyPlanProcessAccessories zyPlanProcessAccessories) { |
||||||
|
zyPlanProcessAccessoriesService.save(zyPlanProcessAccessories); |
||||||
|
return Result.OK("添加成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 编辑 |
||||||
|
* |
||||||
|
* @param zyPlanProcessAccessories |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@AutoLog(value = "计划工序辅料管理-编辑") |
||||||
|
@ApiOperation(value = "计划工序辅料管理-编辑", notes = "计划工序辅料管理-编辑") |
||||||
|
@PutMapping(value = "/edit") |
||||||
|
public Result<?> edit(@RequestBody ZyPlanProcessAccessories zyPlanProcessAccessories) { |
||||||
|
zyPlanProcessAccessoriesService.updateById(zyPlanProcessAccessories); |
||||||
|
return Result.OK("编辑成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 通过id删除 |
||||||
|
* |
||||||
|
* @param id |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@AutoLog(value = "计划工序辅料管理-通过id删除") |
||||||
|
@ApiOperation(value = "计划工序辅料管理-通过id删除", notes = "计划工序辅料管理-通过id删除") |
||||||
|
@DeleteMapping(value = "/delete") |
||||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
||||||
|
zyPlanProcessAccessoriesService.removeById(id); |
||||||
|
return Result.OK("删除成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 批量删除 |
||||||
|
* |
||||||
|
* @param ids |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@AutoLog(value = "计划工序辅料管理-批量删除") |
||||||
|
@ApiOperation(value = "计划工序辅料管理-批量删除", notes = "计划工序辅料管理-批量删除") |
||||||
|
@DeleteMapping(value = "/deleteBatch") |
||||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||||
|
this.zyPlanProcessAccessoriesService.removeByIds(Arrays.asList(ids.split(","))); |
||||||
|
return Result.OK("批量删除成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 通过id查询 |
||||||
|
* |
||||||
|
* @param id |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@AutoLog(value = "计划工序辅料管理-通过id查询") |
||||||
|
@ApiOperation(value = "计划工序辅料管理-通过id查询", notes = "计划工序辅料管理-通过id查询") |
||||||
|
@GetMapping(value = "/queryById") |
||||||
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { |
||||||
|
ZyPlanProcessAccessories zyPlanProcessAccessories = zyPlanProcessAccessoriesService.getById(id); |
||||||
|
if (zyPlanProcessAccessories == null) { |
||||||
|
return Result.error("未找到对应数据"); |
||||||
|
} |
||||||
|
return Result.OK(zyPlanProcessAccessories); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 导出excel |
||||||
|
* |
||||||
|
* @param request |
||||||
|
* @param zyPlanProcessAccessories |
||||||
|
*/ |
||||||
|
@RequestMapping(value = "/exportXls") |
||||||
|
public ModelAndView exportXls(HttpServletRequest request, ZyPlanProcessAccessories zyPlanProcessAccessories) { |
||||||
|
return super.exportXls(request, zyPlanProcessAccessories, ZyPlanProcessAccessories.class, "计划工序辅料管理"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 通过excel导入数据 |
||||||
|
* |
||||||
|
* @param request |
||||||
|
* @param response |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||||
|
return super.importExcel(request, response, ZyPlanProcessAccessories.class); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,202 @@ |
|||||||
|
package org.jeecg.modules.productplan.controller; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.jeecg.common.api.vo.Result; |
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog; |
||||||
|
import org.jeecg.common.exception.JeecgBootException; |
||||||
|
import org.jeecg.common.system.base.controller.JeecgController; |
||||||
|
import org.jeecg.common.system.query.QueryGenerator; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanProcess; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanProcessFabric; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyProductPlan; |
||||||
|
import org.jeecg.modules.productplan.service.IZyPlanProcessFabricService; |
||||||
|
import org.jeecg.modules.productplan.service.IZyPlanProcessService; |
||||||
|
import org.jeecg.modules.productplan.service.IZyProductPlanService; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.util.ObjectUtils; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
import org.springframework.web.servlet.ModelAndView; |
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest; |
||||||
|
import javax.servlet.http.HttpServletResponse; |
||||||
|
import java.util.Arrays; |
||||||
|
import java.util.LinkedList; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Description: 计划工序面料管理 |
||||||
|
* @Author: jeecg-boot |
||||||
|
* @Date: 2023-01-09 |
||||||
|
* @Version: V1.0 |
||||||
|
*/ |
||||||
|
@Api(tags = "计划工序面料管理") |
||||||
|
@RestController |
||||||
|
@RequestMapping("/org.jeecg.modules.productplan/zyPlanProcessFabric") |
||||||
|
@Slf4j |
||||||
|
public class ZyPlanProcessFabricController extends JeecgController<ZyPlanProcessFabric, IZyPlanProcessFabricService> { |
||||||
|
@Autowired |
||||||
|
private IZyPlanProcessFabricService zyPlanProcessFabricService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private IZyPlanProcessService iZyPlanProcessService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private IZyProductPlanService iZyProductPlanService; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 分页列表查询 |
||||||
|
* |
||||||
|
* @param zyPlanProcessFabric |
||||||
|
* @param pageNo |
||||||
|
* @param pageSize |
||||||
|
* @param req |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@AutoLog(value = "计划工序面料管理-分页列表查询") |
||||||
|
@ApiOperation(value = "计划工序面料管理-分页列表查询", notes = "计划工序面料管理-分页列表查询") |
||||||
|
@GetMapping(value = "/list") |
||||||
|
public Result<?> queryPageList(ZyPlanProcessFabric zyPlanProcessFabric, |
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||||
|
HttpServletRequest req) { |
||||||
|
|
||||||
|
QueryWrapper<ZyPlanProcessFabric> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcessFabric, req.getParameterMap()); |
||||||
|
Page<ZyPlanProcessFabric> page = new Page<ZyPlanProcessFabric>(pageNo, pageSize); |
||||||
|
IPage<ZyPlanProcessFabric> pageList = zyPlanProcessFabricService.page(page, queryWrapper); |
||||||
|
List<ZyPlanProcessFabric> records = pageList.getRecords(); |
||||||
|
if (!ObjectUtils.isEmpty(records)) { |
||||||
|
records.forEach(e -> { |
||||||
|
ZyPlanProcess zyPlanProcess = iZyPlanProcessService.getById(e.getPlanProcessId()); |
||||||
|
if (!ObjectUtils.isEmpty(zyPlanProcess)) { |
||||||
|
e.setPlanId(zyPlanProcess.getPlanId()); |
||||||
|
} |
||||||
|
}); |
||||||
|
//按planid排序
|
||||||
|
// Collections.sort(records, Comparator.comparing(ZyPlanProcessFabric::getPlanId));
|
||||||
|
} |
||||||
|
return Result.OK(pageList); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 添加 |
||||||
|
* |
||||||
|
* @param zyPlanProcessFabric |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@ApiOperation(value = "计划工序面料管理-添加", notes = "计划工序面料管理-添加") |
||||||
|
@PostMapping(value = "/saveBatch") |
||||||
|
public Result<?> saveBatch(@RequestBody ZyPlanProcessFabric zyPlanProcessFabric) { |
||||||
|
ZyProductPlan zyProductPlan = iZyProductPlanService.getById(zyPlanProcessFabric.getPlanId()); |
||||||
|
if (ObjectUtils.isEmpty(zyProductPlan)) |
||||||
|
throw new JeecgBootException(zyPlanProcessFabric.getPlanId() + "-生产计划不存在"); |
||||||
|
|
||||||
|
List<ZyPlanProcessFabric> addList = new LinkedList<>(); |
||||||
|
List<ZyPlanProcess> processList = iZyPlanProcessService.list(new LambdaQueryWrapper<ZyPlanProcess>().eq(ZyPlanProcess::getPlanId, zyPlanProcessFabric.getPlanId())); |
||||||
|
if (!ObjectUtils.isEmpty(processList)) { |
||||||
|
processList.forEach(e -> { |
||||||
|
ZyPlanProcessFabric en = new ZyPlanProcessFabric(); |
||||||
|
en.setPlanProcessId(e.getId()); |
||||||
|
addList.add(en); |
||||||
|
}); |
||||||
|
} |
||||||
|
zyPlanProcessFabricService.saveBatch(addList); |
||||||
|
return Result.OK("添加成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
@ApiOperation(value = "计划工序面料管理-添加", notes = "计划工序面料管理-添加") |
||||||
|
@PostMapping(value = "/add") |
||||||
|
public Result<?> add(@RequestBody ZyPlanProcessFabric zyPlanProcessFabric) { |
||||||
|
zyPlanProcessFabricService.save(zyPlanProcessFabric); |
||||||
|
return Result.OK("添加成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 编辑 |
||||||
|
* |
||||||
|
* @param zyPlanProcessFabric |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@AutoLog(value = "计划工序面料管理-编辑") |
||||||
|
@ApiOperation(value = "计划工序面料管理-编辑", notes = "计划工序面料管理-编辑") |
||||||
|
@PutMapping(value = "/edit") |
||||||
|
public Result<?> edit(@RequestBody ZyPlanProcessFabric zyPlanProcessFabric) { |
||||||
|
zyPlanProcessFabricService.updateById(zyPlanProcessFabric); |
||||||
|
return Result.OK("编辑成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 通过id删除 |
||||||
|
* |
||||||
|
* @param id |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@AutoLog(value = "计划工序面料管理-通过id删除") |
||||||
|
@ApiOperation(value = "计划工序面料管理-通过id删除", notes = "计划工序面料管理-通过id删除") |
||||||
|
@DeleteMapping(value = "/delete") |
||||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
||||||
|
zyPlanProcessFabricService.removeById(id); |
||||||
|
return Result.OK("删除成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 批量删除 |
||||||
|
* |
||||||
|
* @param ids |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@AutoLog(value = "计划工序面料管理-批量删除") |
||||||
|
@ApiOperation(value = "计划工序面料管理-批量删除", notes = "计划工序面料管理-批量删除") |
||||||
|
@DeleteMapping(value = "/deleteBatch") |
||||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||||
|
this.zyPlanProcessFabricService.removeByIds(Arrays.asList(ids.split(","))); |
||||||
|
return Result.OK("批量删除成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 通过id查询 |
||||||
|
* |
||||||
|
* @param id |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@AutoLog(value = "计划工序面料管理-通过id查询") |
||||||
|
@ApiOperation(value = "计划工序面料管理-通过id查询", notes = "计划工序面料管理-通过id查询") |
||||||
|
@GetMapping(value = "/queryById") |
||||||
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { |
||||||
|
ZyPlanProcessFabric zyPlanProcessFabric = zyPlanProcessFabricService.getById(id); |
||||||
|
if (zyPlanProcessFabric == null) { |
||||||
|
return Result.error("未找到对应数据"); |
||||||
|
} |
||||||
|
return Result.OK(zyPlanProcessFabric); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 导出excel |
||||||
|
* |
||||||
|
* @param request |
||||||
|
* @param zyPlanProcessFabric |
||||||
|
*/ |
||||||
|
@RequestMapping(value = "/exportXls") |
||||||
|
public ModelAndView exportXls(HttpServletRequest request, ZyPlanProcessFabric zyPlanProcessFabric) { |
||||||
|
return super.exportXls(request, zyPlanProcessFabric, ZyPlanProcessFabric.class, "计划工序面料管理"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 通过excel导入数据 |
||||||
|
* |
||||||
|
* @param request |
||||||
|
* @param response |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||||
|
return super.importExcel(request, response, ZyPlanProcessFabric.class); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,88 @@ |
|||||||
|
package org.jeecg.modules.productplan.entity; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
import org.jeecg.common.aspect.annotation.Dict; |
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Description: 计划工序辅料管理 |
||||||
|
* @Author: jeecg-boot |
||||||
|
* @Date: 2023-01-10 |
||||||
|
* @Version: V1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("zy_plan_process_accessories") |
||||||
|
@Accessors(chain = true) |
||||||
|
@EqualsAndHashCode(callSuper = false) |
||||||
|
@ApiModel(value = "zy_plan_process_accessories对象", description = "计划工序辅料管理") |
||||||
|
public class ZyPlanProcessAccessories implements Serializable { |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 主键 |
||||||
|
*/ |
||||||
|
@TableId(type = IdType.ASSIGN_ID) |
||||||
|
@ApiModelProperty(value = "主键") |
||||||
|
private String id; |
||||||
|
/** |
||||||
|
* 创建人 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "创建人") |
||||||
|
private String createBy; |
||||||
|
/** |
||||||
|
* 创建日期 |
||||||
|
*/ |
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
@ApiModelProperty(value = "创建日期") |
||||||
|
private Date createTime; |
||||||
|
/** |
||||||
|
* 更新人 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "更新人") |
||||||
|
private String updateBy; |
||||||
|
/** |
||||||
|
* 更新日期 |
||||||
|
*/ |
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
@ApiModelProperty(value = "更新日期") |
||||||
|
private Date updateTime; |
||||||
|
/** |
||||||
|
* 计划工序id |
||||||
|
*/ |
||||||
|
@Excel(name = "计划工序id", width = 15) |
||||||
|
@ApiModelProperty(value = "计划工序id") |
||||||
|
private String planProcessId; |
||||||
|
/** |
||||||
|
* 辅料id |
||||||
|
*/ |
||||||
|
@Excel(name = "辅料id", width = 15) |
||||||
|
@ApiModelProperty(value = "辅料id") |
||||||
|
@Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id") |
||||||
|
private String accessoriesId; |
||||||
|
/** |
||||||
|
* 用量 |
||||||
|
*/ |
||||||
|
@Excel(name = "用量", width = 15) |
||||||
|
@ApiModelProperty(value = "用量") |
||||||
|
private BigDecimal amount; |
||||||
|
|
||||||
|
@TableField(exist = false) |
||||||
|
private String planId; |
||||||
|
} |
@ -0,0 +1,89 @@ |
|||||||
|
package org.jeecg.modules.productplan.entity; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
import org.jeecg.common.aspect.annotation.Dict; |
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Description: 计划工序面料管理 |
||||||
|
* @Author: jeecg-boot |
||||||
|
* @Date: 2023-01-09 |
||||||
|
* @Version: V1.0 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("zy_plan_process_fabric") |
||||||
|
@Accessors(chain = true) |
||||||
|
@EqualsAndHashCode(callSuper = false) |
||||||
|
@ApiModel(value = "zy_plan_process_fabric对象", description = "计划工序面料管理") |
||||||
|
public class ZyPlanProcessFabric implements Serializable { |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 主键 |
||||||
|
*/ |
||||||
|
@TableId(type = IdType.ASSIGN_ID) |
||||||
|
@ApiModelProperty(value = "主键") |
||||||
|
private String id; |
||||||
|
/** |
||||||
|
* 创建人 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "创建人") |
||||||
|
private String createBy; |
||||||
|
/** |
||||||
|
* 创建日期 |
||||||
|
*/ |
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
@ApiModelProperty(value = "创建日期") |
||||||
|
private Date createTime; |
||||||
|
/** |
||||||
|
* 更新人 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "更新人") |
||||||
|
private String updateBy; |
||||||
|
/** |
||||||
|
* 更新日期 |
||||||
|
*/ |
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
@ApiModelProperty(value = "更新日期") |
||||||
|
private Date updateTime; |
||||||
|
/** |
||||||
|
* 计划工序id |
||||||
|
*/ |
||||||
|
@Excel(name = "计划工序id", width = 15) |
||||||
|
@ApiModelProperty(value = "计划工序id") |
||||||
|
private String planProcessId; |
||||||
|
/** |
||||||
|
* 面料id |
||||||
|
*/ |
||||||
|
@Excel(name = "面料id", width = 15) |
||||||
|
@ApiModelProperty(value = "面料id") |
||||||
|
@Dict(dictTable = "zy_fabric", dicText = "name", dicCode = "id") |
||||||
|
private String fabricId; |
||||||
|
/** |
||||||
|
* 用量 |
||||||
|
*/ |
||||||
|
@Excel(name = "用量", width = 15) |
||||||
|
@ApiModelProperty(value = "用量") |
||||||
|
private BigDecimal amount; |
||||||
|
|
||||||
|
@TableField(exist = false) |
||||||
|
private String planId; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
package org.jeecg.modules.productplan.mapper; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanProcessAccessories; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Description: 计划工序辅料管理 |
||||||
|
* @Author: jeecg-boot |
||||||
|
* @Date: 2023-01-10 |
||||||
|
* @Version: V1.0 |
||||||
|
*/ |
||||||
|
public interface ZyPlanProcessAccessoriesMapper extends BaseMapper<ZyPlanProcessAccessories> { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
package org.jeecg.modules.productplan.mapper; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanProcessFabric; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Description: 计划工序面料管理 |
||||||
|
* @Author: jeecg-boot |
||||||
|
* @Date: 2023-01-09 |
||||||
|
* @Version: V1.0 |
||||||
|
*/ |
||||||
|
public interface ZyPlanProcessFabricMapper extends BaseMapper<ZyPlanProcessFabric> { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
package org.jeecg.modules.productplan.service; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanProcessAccessories; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Description: 计划工序辅料管理 |
||||||
|
* @Author: jeecg-boot |
||||||
|
* @Date: 2023-01-10 |
||||||
|
* @Version: V1.0 |
||||||
|
*/ |
||||||
|
public interface IZyPlanProcessAccessoriesService extends IService<ZyPlanProcessAccessories> { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
package org.jeecg.modules.productplan.service; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanProcessFabric; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Description: 计划工序面料管理 |
||||||
|
* @Author: jeecg-boot |
||||||
|
* @Date: 2023-01-09 |
||||||
|
* @Version: V1.0 |
||||||
|
*/ |
||||||
|
public interface IZyPlanProcessFabricService extends IService<ZyPlanProcessFabric> { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
package org.jeecg.modules.productplan.service.impl; |
||||||
|
|
||||||
|
|
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanProcessAccessories; |
||||||
|
import org.jeecg.modules.productplan.mapper.ZyPlanProcessAccessoriesMapper; |
||||||
|
import org.jeecg.modules.productplan.service.IZyPlanProcessAccessoriesService; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Description: 计划工序辅料管理 |
||||||
|
* @Author: jeecg-boot |
||||||
|
* @Date: 2023-01-10 |
||||||
|
* @Version: V1.0 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class ZyPlanProcessAccessoriesServiceImpl extends ServiceImpl<ZyPlanProcessAccessoriesMapper, ZyPlanProcessAccessories> implements IZyPlanProcessAccessoriesService { |
||||||
|
|
||||||
|
} |
@ -0,0 +1,19 @@ |
|||||||
|
package org.jeecg.modules.productplan.service.impl; |
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
|
import org.jeecg.modules.productplan.entity.ZyPlanProcessFabric; |
||||||
|
import org.jeecg.modules.productplan.mapper.ZyPlanProcessFabricMapper; |
||||||
|
import org.jeecg.modules.productplan.service.IZyPlanProcessFabricService; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Description: 计划工序面料管理 |
||||||
|
* @Author: jeecg-boot |
||||||
|
* @Date: 2023-01-09 |
||||||
|
* @Version: V1.0 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class ZyPlanProcessFabricServiceImpl extends ServiceImpl<ZyPlanProcessFabricMapper, ZyPlanProcessFabric> implements IZyPlanProcessFabricService { |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue