commit
16d752c3a6
18 changed files with 1260 additions and 1156 deletions
@ -1,460 +1,469 @@ |
|||||||
<template> |
<template> |
||||||
<a-card :bordered="false"> |
<a-card :bordered="false"> |
||||||
<!-- 查询区域 --> |
<!-- 查询区域 --> |
||||||
<div class="table-page-search-wrapper"> |
<div class="table-page-search-wrapper"> |
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||||
<a-row :gutter="24"> |
<a-row :gutter="24"> |
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||||
<a-form-item label="服装类型"> |
<a-form-item label="服装类型"> |
||||||
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_type,type_name,nums" |
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_type,type_name,nums" |
||||||
v-model="styleId"></j-dict-select-tag> |
v-model="styleId"></j-dict-select-tag> |
||||||
</a-form-item> |
</a-form-item> |
||||||
</a-col> |
</a-col> |
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||||
<a-form-item label="工序代码"> |
<a-form-item label="工序代码"> |
||||||
<a-input placeholder="工序代码" v-model="processCode"></a-input> |
<a-input placeholder="工序代码" v-model="processCode"></a-input> |
||||||
</a-form-item> |
</a-form-item> |
||||||
</a-col> |
</a-col> |
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||||
<a-form-item label="工序名称"> |
<a-form-item label="工序名称"> |
||||||
<a-input placeholder="工序名称" v-model="processName"></a-input> |
<a-input placeholder="工序名称" v-model="processName"></a-input> |
||||||
</a-form-item> |
</a-form-item> |
||||||
</a-col> |
</a-col> |
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||||
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId"> |
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId"> |
||||||
<j-select-depart v-model="enterpriseId" placeholder="请输入企业名称" /> |
<j-select-depart v-model="enterpriseId" placeholder="请输入企业名称" /> |
||||||
</a-form-model-item> |
</a-form-model-item> |
||||||
</a-col> |
</a-col> |
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
<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="searchQuery" icon="search">查询</a-button> |
||||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
||||||
</span> |
</span> |
||||||
</a-col> |
</a-col> |
||||||
</a-row> |
</a-row> |
||||||
</a-form> |
</a-form> |
||||||
</div> |
</div> |
||||||
<!-- 查询区域-END --> |
<!-- 查询区域-END --> |
||||||
|
|
||||||
<!-- 操作按钮区域 --> |
<!-- 操作按钮区域 --> |
||||||
<div class="table-operator"> |
<div class="table-operator"> |
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
||||||
<a-button type="primary" icon="download" @click="handleExportXls('zy_process')">导出</a-button> |
<a-button type="primary" icon="download" @click="handleExportXls('zy_process')">导出</a-button> |
||||||
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> |
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> |
||||||
<!-- <a-button type="primary" icon="import">导入</a-button>--> |
<!-- <a-button type="primary" icon="import">导入</a-button>--> |
||||||
<!-- </a-upload>--> |
<!-- </a-upload>--> |
||||||
<!-- 高级查询区域 --> |
<!-- 高级查询区域 --> |
||||||
<j-super-query :fieldList="superFieldList" ref="superQueryModal" |
<j-super-query :fieldList="superFieldList" ref="superQueryModal" |
||||||
@handleSuperQuery="handleSuperQuery"></j-super-query> |
@handleSuperQuery="handleSuperQuery"></j-super-query> |
||||||
<a-dropdown v-if="selectedRowKeys.length > 0"> |
<a-dropdown v-if="selectedRowKeys.length > 0"> |
||||||
<a-menu slot="overlay"> |
<a-menu slot="overlay"> |
||||||
<a-menu-item key="1" @click="batchDel"> |
<a-menu-item key="1" @click="batchDel"> |
||||||
<a-icon type="delete"/> |
<a-icon type="delete"/> |
||||||
删除 |
删除 |
||||||
</a-menu-item> |
</a-menu-item> |
||||||
</a-menu> |
</a-menu> |
||||||
<a-button style="margin-left: 8px"> 批量操作 |
<a-button style="margin-left: 8px"> 批量操作 |
||||||
<a-icon type="down"/> |
<a-icon type="down"/> |
||||||
</a-button> |
</a-button> |
||||||
</a-dropdown> |
</a-dropdown> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<!-- table区域-begin --> |
<!-- table区域-begin --> |
||||||
<div> |
<div> |
||||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
||||||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
||||||
style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
||||||
<a style="margin-left: 24px" @click="onClearSelected">清空</a> |
<a style="margin-left: 24px" @click="onClearSelected">清空</a> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<a-table |
<a-table |
||||||
ref="table" |
ref="table" |
||||||
size="middle" |
size="middle" |
||||||
:scroll="{x:true}" |
:scroll="{x:true}" |
||||||
bordered |
bordered |
||||||
rowKey="id" |
rowKey="id" |
||||||
:columns="columns" |
:columns="columns" |
||||||
:dataSource="dataSource" |
:dataSource="dataSource" |
||||||
:pagination="ipagination" |
:pagination="ipagination" |
||||||
:loading="loading" |
:loading="loading" |
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
||||||
class="j-table-force-nowrap" |
class="j-table-force-nowrap" |
||||||
@change="handleTableChange"> |
@change="handleTableChange"> |
||||||
|
|
||||||
<template slot="htmlSlot" slot-scope="text"> |
<template slot="htmlSlot" slot-scope="text"> |
||||||
<div v-html="text"></div> |
<div v-html="text"></div> |
||||||
</template> |
</template> |
||||||
<template slot="imgSlot" slot-scope="text"> |
<template slot="imgSlot" slot-scope="text"> |
||||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
||||||
<img v-else :src="getImgView(text)" height="25px" alt="" |
<img v-else :src="getImgView(text)" height="25px" alt="" |
||||||
style="max-width:80px;font-size: 12px;font-style: italic;"/> |
style="max-width:80px;font-size: 12px;font-style: italic;"/> |
||||||
</template> |
</template> |
||||||
<template slot="fileSlot" slot-scope="text"> |
<template slot="fileSlot" slot-scope="text"> |
||||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
||||||
<a-button |
<a-button |
||||||
v-else |
v-else |
||||||
:ghost="true" |
:ghost="true" |
||||||
type="primary" |
type="primary" |
||||||
icon="download" |
icon="download" |
||||||
size="small" |
size="small" |
||||||
@click="downloadFile(text)"> |
@click="downloadFile(text)"> |
||||||
下载 |
下载 |
||||||
</a-button> |
</a-button> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<span slot="action" slot-scope="text, record"> |
<span slot="action" slot-scope="text, record"> |
||||||
<a @click="handleEdit(record)">编辑</a> |
<a @click="handleEdit(record)">编辑</a> |
||||||
|
|
||||||
<a-divider type="vertical"/> |
<a-divider type="vertical"/> |
||||||
<a @click="fuzhi(record)">复制</a> |
<a @click="fuzhi(record)">复制</a> |
||||||
|
|
||||||
<a-divider type="vertical"/> |
<a-divider type="vertical"/> |
||||||
<a @click="dongzuo(record.id,record.processName)">动作</a> |
<a @click="dongzuo(record.id,record.processName)">动作</a> |
||||||
<a-divider type="vertical"/> |
<a-divider type="vertical"/> |
||||||
<a @click="fuliao(record.id,record.processName)">面料</a> |
<a @click="fuliao(record.id,record.processName)">面料</a> |
||||||
|
|
||||||
<a-divider type="vertical"/> |
<a-divider type="vertical"/> |
||||||
<a @click="mianliao(record.id,record.processName)">辅料</a> |
<a @click="mianliao(record.id,record.processName)">辅料</a> |
||||||
<a-divider type="vertical"/> |
<a-divider type="vertical"/> |
||||||
<a @click="shebei(record.id,record.processName)">设备</a> |
<a @click="shebei(record.id,record.processName)">设备</a> |
||||||
|
|
||||||
<a-divider type="vertical"/> |
<a-divider type="vertical"/> |
||||||
<a @click="gongju(record.id,record.processName)">工具</a> |
<a @click="gongju(record.id,record.processName)">工具</a> |
||||||
|
|
||||||
<a-divider type="vertical"/> |
<a-divider type="vertical"/> |
||||||
<a-dropdown> |
<a-dropdown> |
||||||
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
||||||
<a-menu slot="overlay"> |
<a-menu slot="overlay"> |
||||||
<a-menu-item> |
<a-menu-item> |
||||||
<a @click="openDetail(record.id)">详情</a> |
<a @click="openDetail(record.id)">详情</a> |
||||||
</a-menu-item> |
</a-menu-item> |
||||||
<a-menu-item> |
<a-menu-item> |
||||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||||
<a>删除</a> |
<a>删除</a> |
||||||
</a-popconfirm> |
</a-popconfirm> |
||||||
</a-menu-item> |
</a-menu-item> |
||||||
</a-menu> |
</a-menu> |
||||||
</a-dropdown> |
</a-dropdown> |
||||||
</span> |
</span> |
||||||
<!-- 新建一个管理列--> |
<!-- 新建一个管理列--> |
||||||
<!-- <span slot="action1" slot-scope="text, record">--> |
<!-- <span slot="action1" slot-scope="text, record">--> |
||||||
<!-- --> |
<!-- --> |
||||||
<!-- </span>--> |
<!-- </span>--> |
||||||
</a-table> |
</a-table> |
||||||
</div> |
</div> |
||||||
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail> |
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail> |
||||||
<zy-process-modal ref="modalForm" @ok="modalFormOk"></zy-process-modal> |
<zy-process-modal ref="modalForm" @ok="modalFormOk"></zy-process-modal> |
||||||
<zy-process-modal1 ref="modalForm1" @ok="modalFormOk"></zy-process-modal1> |
<zy-process-modal1 ref="modalForm1" @ok="modalFormOk"></zy-process-modal1> |
||||||
<zy-process-modal2 ref="modalForm2" @ok="modalFormOk"></zy-process-modal2> |
<zy-process-modal2 ref="modalForm2" @ok="modalFormOk"></zy-process-modal2> |
||||||
<zy-process-modal3 ref="modalForm3" @ok="modalFormOk"></zy-process-modal3> |
<zy-process-modal3 ref="modalForm3" @ok="modalFormOk"></zy-process-modal3> |
||||||
<zy-process-modal4 ref="modalForm4" @ok="modalFormOk"></zy-process-modal4> |
<zy-process-modal4 ref="modalForm4" @ok="modalFormOk"></zy-process-modal4> |
||||||
<zy-process-modal5 ref="modalForm5" @ok="modalFormOk"></zy-process-modal5> |
<zy-process-modal5 ref="modalForm5" @ok="modalFormOk"></zy-process-modal5> |
||||||
</a-card> |
</a-card> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
|
|
||||||
import '@/assets/less/TableExpand.less' |
import '@/assets/less/TableExpand.less' |
||||||
import {mixinDevice} from '@/utils/mixin' |
import {mixinDevice} from '@/utils/mixin' |
||||||
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
||||||
import ZyProcessModal from './modules/ZyProcessModal' |
import ZyProcessModal from './modules/ZyProcessModal' |
||||||
import ZyProcessModal1 from './modules/ZyProcessModal1' |
import ZyProcessModal1 from './modules/ZyProcessModal1' |
||||||
import ZyProcessModal2 from './modules/ZyProcessModal2' |
import ZyProcessModal2 from './modules/ZyProcessModal2' |
||||||
import ZyProcessModal3 from './modules/ZyProcessModal3' |
import ZyProcessModal3 from './modules/ZyProcessModal3' |
||||||
import ZyProcessModal4 from './modules/ZyProcessModal4' |
import ZyProcessModal4 from './modules/ZyProcessModal4' |
||||||
import ZyProcessModal5 from './modules/ZyProcessModal5' |
import ZyProcessModal5 from './modules/ZyProcessModal5' |
||||||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
||||||
import ZyProcessDetail from './modules/ZyProcessDetail' |
import ZyProcessDetail from './modules/ZyProcessDetail' |
||||||
import {getAction} from "@api/manage"; |
import {getAction} from "@api/manage"; |
||||||
import {filterObj} from "@/utils/util"; |
import {filterObj} from "@/utils/util"; |
||||||
|
|
||||||
export default { |
export default { |
||||||
name: 'ZyProcessList', |
name: 'ZyProcessList', |
||||||
mixins: [JeecgListMixin, mixinDevice], |
mixins: [JeecgListMixin, mixinDevice], |
||||||
components: { |
components: { |
||||||
ZyProcessModal, |
ZyProcessModal, |
||||||
ZyProcessDetail, |
ZyProcessDetail, |
||||||
ZyProcessModal1, |
ZyProcessModal1, |
||||||
ZyProcessModal2, |
ZyProcessModal2, |
||||||
ZyProcessModal3, |
ZyProcessModal3, |
||||||
ZyProcessModal4, |
ZyProcessModal4, |
||||||
ZyProcessModal5 |
ZyProcessModal5 |
||||||
}, |
}, |
||||||
data() { |
data() { |
||||||
return { |
return { |
||||||
description: 'zy_process管理页面', |
description: 'zy_process管理页面', |
||||||
// 表头 |
// 表头 |
||||||
columns: [ |
columns: [ |
||||||
{ |
{ |
||||||
title: '#', |
title: '#', |
||||||
dataIndex: '', |
dataIndex: '', |
||||||
key: 'rowIndex', |
key: 'rowIndex', |
||||||
width: 60, |
width: 60, |
||||||
align: "center", |
align: "center", |
||||||
customRender: function (t, r, index) { |
customRender: function (t, r, index) { |
||||||
return parseInt(index) + 1; |
return parseInt(index) + 1; |
||||||
} |
} |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '工序代码', |
title: '工序代码', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'processCode' |
dataIndex: 'processCode' |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '工序名称', |
title: '工序名称', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'processName' |
dataIndex: 'processName' |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '企业', |
title: '企业', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'enterpriseId_dictText' |
dataIndex: 'enterpriseId_dictText' |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '服装类型', |
title: '服装类型', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'styleId_dictText' |
dataIndex: 'styleId_dictText' |
||||||
}, |
}, |
||||||
// { |
// { |
||||||
// title:'工艺描述', |
// title:'工艺描述', |
||||||
// align:"center", |
// align:"center", |
||||||
// dataIndex: 'processDescribe' |
// dataIndex: 'processDescribe' |
||||||
// }, |
// }, |
||||||
// { |
// { |
||||||
// title: '品质要求', |
// title: '品质要求', |
||||||
// align: "center", |
// align: "center", |
||||||
// dataIndex: 'qualityRequire' |
// dataIndex: 'qualityRequire' |
||||||
// }, |
// }, |
||||||
{ |
{ |
||||||
title: '工序时间', |
title: '工序时间', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'processTime' |
dataIndex: 'processTime' |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '工序单价', |
title: '工序单价', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'price' |
dataIndex: 'price' |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '工序等级', |
title: '工序等级', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'grade_dictText' |
dataIndex: 'grade_dictText' |
||||||
}, |
}, |
||||||
// { |
// { |
||||||
// title:'面料代码', |
// title:'面料代码', |
||||||
// align:"center", |
// align:"center", |
||||||
// dataIndex: 'fabricNum' |
// dataIndex: 'fabricNum' |
||||||
// }, |
// }, |
||||||
// { |
// { |
||||||
// title:'设备名', |
// title:'设备名', |
||||||
// align:"center", |
// align:"center", |
||||||
// dataIndex: 'machineId_dictText' |
// dataIndex: 'machineId_dictText' |
||||||
// }, |
// }, |
||||||
// { |
// { |
||||||
// title:'部件', |
// title:'部件', |
||||||
// align:"center", |
// align:"center", |
||||||
// dataIndex: 'componentId_dictText' |
// dataIndex: 'componentId_dictText' |
||||||
// }, |
// }, |
||||||
// { |
// { |
||||||
// title:'工具名称', |
// title:'工具名称', |
||||||
// align:"center", |
// align:"center", |
||||||
// dataIndex: 'toolId_dictText' |
// dataIndex: 'toolId_dictText' |
||||||
// }, |
// }, |
||||||
// { |
// { |
||||||
// title: '款式名称', |
// title: '款式名称', |
||||||
// align: "center", |
// align: "center", |
||||||
// dataIndex: 'styleId_dictText' |
// dataIndex: 'styleId_dictText' |
||||||
// }, |
// }, |
||||||
{ |
{ |
||||||
title: '工段代码', |
title: '工段代码', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'worksectionCode' |
dataIndex: 'worksectionCode' |
||||||
}, |
}, |
||||||
// { |
// { |
||||||
// title:'合同号', |
// title:'合同号', |
||||||
// align:"center", |
// align:"center", |
||||||
// dataIndex: 'contractNum' |
// dataIndex: 'contractNum' |
||||||
// }, |
// }, |
||||||
{ |
{ |
||||||
title: '合计(手工TMU)', |
title: '合计(手工TMU)', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'totalManualTmu' |
dataIndex: 'totalManualTmu' |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '合计(机器TMU)', |
title: '合计(机器TMU)', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'totalMachineTmu' |
dataIndex: 'totalMachineTmu' |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '合计(手工秒)', |
title: '合计(手工秒)', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'totalMaunal' |
dataIndex: 'totalMaunal' |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
title: '合计(设备秒)', |
title: '合计(设备秒)', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'totalMachine' |
dataIndex: 'totalMachine' |
||||||
}, |
}, |
||||||
|
|
||||||
|
|
||||||
{ |
{ |
||||||
title: '创建时间', |
title: '创建时间', |
||||||
align: "center", |
align: "center", |
||||||
dataIndex: 'createTime' |
dataIndex: 'createTime' |
||||||
}, |
}, |
||||||
// { |
// { |
||||||
// title: '管理', |
// title: '管理', |
||||||
// dataIndex: 'action1', |
// dataIndex: 'action1', |
||||||
// align:"center", |
// align:"center", |
||||||
// fixed:"right", |
// fixed:"right", |
||||||
// width:147, |
// width:147, |
||||||
// scopedSlots: { customRender: 'action1' } |
// scopedSlots: { customRender: 'action1' } |
||||||
// }, |
// }, |
||||||
{ |
{ |
||||||
title: '操作', |
title: '操作', |
||||||
dataIndex: 'action', |
dataIndex: 'action', |
||||||
align: "center", |
align: "center", |
||||||
fixed: "right", |
fixed: "right", |
||||||
width: 147, |
width: 147, |
||||||
scopedSlots: {customRender: 'action'} |
scopedSlots: {customRender: 'action'} |
||||||
} |
} |
||||||
], |
], |
||||||
url: { |
url: { |
||||||
list: "/base/zyProcess/list", |
list: "/base/zyProcess/list", |
||||||
delete: "/base/zyProcess/delete", |
delete: "/base/zyProcess/delete", |
||||||
deleteBatch: "/base/zyProcess/deleteBatch", |
deleteBatch: "/base/zyProcess/deleteBatch", |
||||||
exportXlsUrl: "/base/zyProcess/exportXls", |
exportXlsUrl: "/base/zyProcess/exportXls", |
||||||
importExcelUrl: "base/zyProcess/importExcel", |
importExcelUrl: "base/zyProcess/importExcel", |
||||||
|
|
||||||
}, |
}, |
||||||
//参数 |
//参数 |
||||||
loadRouteType: false, |
loadRouteType: false, |
||||||
styleId: "", |
styleId: "", |
||||||
processCode:'', |
processCode:'', |
||||||
processName:'', |
processName:'', |
||||||
enterpriseId:'', |
enterpriseId:'', |
||||||
dictOptions: {}, |
dictOptions: {}, |
||||||
superFieldList: [], |
superFieldList: [], |
||||||
} |
labelCol: { |
||||||
}, |
xs: { span: 24 }, |
||||||
created() { |
sm: { span: 5 }, |
||||||
// queryParam.styleId=this.styleId |
}, |
||||||
// this.getSuperFieldList(); |
wrapperCol: { |
||||||
this.loadParameter(); |
xs: { span: 24 }, |
||||||
}, |
sm: { span: 16 }, |
||||||
computed: { |
}, |
||||||
importExcelUrl: function () { |
|
||||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
} |
||||||
}, |
}, |
||||||
}, |
created() { |
||||||
methods: { |
// queryParam.styleId=this.styleId |
||||||
initDictConfig() { |
// this.getSuperFieldList(); |
||||||
}, |
this.loadParameter(); |
||||||
//加载传递参数 |
}, |
||||||
loadParameter() { |
computed: { |
||||||
if (this.loadRouteType == false) { |
importExcelUrl: function () { |
||||||
this.styleId = this.$route.query.styleId; |
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||||
console.log(this.styleId) |
}, |
||||||
this.loadRouteType = true; |
}, |
||||||
} |
methods: { |
||||||
}, |
initDictConfig() { |
||||||
loadData(arg) { |
}, |
||||||
if (!this.url.list) { |
//加载传递参数 |
||||||
this.$message.error("请设置url.list属性!") |
loadParameter() { |
||||||
return |
if (this.loadRouteType == false) { |
||||||
} |
this.styleId = this.$route.query.styleId; |
||||||
//加载数据 若传入参数1则加载第一页的内容 |
console.log(this.styleId) |
||||||
if (arg === 1) { |
this.loadRouteType = true; |
||||||
this.ipagination.current = 1; |
} |
||||||
} |
}, |
||||||
this.loadParameter(); |
loadData(arg) { |
||||||
var params = this.getQueryParams();//查询条件 |
if (!this.url.list) { |
||||||
this.loading = true; |
this.$message.error("请设置url.list属性!") |
||||||
getAction(this.url.list, params).then((res) => { |
return |
||||||
if (res.success) { |
} |
||||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
//加载数据 若传入参数1则加载第一页的内容 |
||||||
this.dataSource = res.result.records || res.result; |
if (arg === 1) { |
||||||
if (res.result.total) { |
this.ipagination.current = 1; |
||||||
this.ipagination.total = res.result.total; |
} |
||||||
} else { |
this.loadParameter(); |
||||||
this.ipagination.total = 0; |
var params = this.getQueryParams();//查询条件 |
||||||
} |
this.loading = true; |
||||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
getAction(this.url.list, params).then((res) => { |
||||||
} else { |
if (res.success) { |
||||||
this.$message.warning(res.message) |
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
||||||
} |
this.dataSource = res.result.records || res.result; |
||||||
}).finally(() => { |
if (res.result.total) { |
||||||
this.loading = false |
this.ipagination.total = res.result.total; |
||||||
}) |
} else { |
||||||
}, |
this.ipagination.total = 0; |
||||||
getQueryParams() { |
} |
||||||
//获取查询条件 |
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
||||||
let sqp = {} |
} else { |
||||||
if (this.superQueryParams) { |
this.$message.warning(res.message) |
||||||
sqp['superQueryParams'] = encodeURI(this.superQueryParams) |
} |
||||||
sqp['superQueryMatchType'] = this.superQueryMatchType |
}).finally(() => { |
||||||
} |
this.loading = false |
||||||
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); |
}) |
||||||
param.field = this.getQueryField(); |
}, |
||||||
param.pageNo = this.ipagination.current; |
getQueryParams() { |
||||||
param.pageSize = this.ipagination.pageSize; |
//获取查询条件 |
||||||
param.styleId = this.styleId; |
let sqp = {} |
||||||
param.enterpriseId=this.enterpriseId; |
if (this.superQueryParams) { |
||||||
param.processCode=this.processCode; |
sqp['superQueryParams'] = encodeURI(this.superQueryParams) |
||||||
param.processName=this.processName; |
sqp['superQueryMatchType'] = this.superQueryMatchType |
||||||
return filterObj(param); |
} |
||||||
}, |
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); |
||||||
searchReset() { |
param.field = this.getQueryField(); |
||||||
this.styleId = '' |
param.pageNo = this.ipagination.current; |
||||||
this.processCode = '' |
param.pageSize = this.ipagination.pageSize; |
||||||
this.processName = '' |
param.styleId = this.styleId; |
||||||
this.enterpriseId = '' |
param.enterpriseId=this.enterpriseId; |
||||||
this.loadData(1); |
param.processCode=this.processCode; |
||||||
}, |
param.processName=this.processName; |
||||||
getSuperFieldList() { |
return filterObj(param); |
||||||
let fieldList = []; |
}, |
||||||
fieldList.push({type: 'string', value: 'processCode', text: '工序代码', dictCode: ''}) |
searchReset() { |
||||||
fieldList.push({type: 'string', value: 'processName', text: '工序名称', dictCode: ''}) |
this.styleId = '' |
||||||
fieldList.push({type: 'string', value: 'processDescribe', text: '工艺描述', dictCode: ''}) |
this.processCode = '' |
||||||
fieldList.push({type: 'string', value: 'mkExplain', text: '做工说明', dictCode: ''}) |
this.processName = '' |
||||||
fieldList.push({type: 'string', value: 'qualityRequire', text: '品质要求', dictCode: ''}) |
this.enterpriseId = '' |
||||||
fieldList.push({type: 'string', value: 'processTime', text: '工序时间', dictCode: ''}) |
this.loadData(1); |
||||||
fieldList.push({type: 'double', value: 'price', text: '工序单价', dictCode: ''}) |
}, |
||||||
fieldList.push({type: 'string', value: 'grade', text: '工序等级', dictCode: ''}) |
getSuperFieldList() { |
||||||
fieldList.push({type: 'string', value: 'fabricNum', text: '面料代码', dictCode: ''}) |
let fieldList = []; |
||||||
fieldList.push({type: 'string', value: 'fabricGrade', text: '面料等级', dictCode: ''}) |
fieldList.push({type: 'string', value: 'processCode', text: '工序代码', dictCode: ''}) |
||||||
fieldList.push({type: 'int', value: 'needlePitch', text: '针距(针/厘米)', dictCode: ''}) |
fieldList.push({type: 'string', value: 'processName', text: '工序名称', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'machineId', text: '机器名', dictCode: 'zy_machine,name,id'}) |
fieldList.push({type: 'string', value: 'processDescribe', text: '工艺描述', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'manualWide', text: '手工宽放', dictCode: ''}) |
fieldList.push({type: 'string', value: 'mkExplain', text: '做工说明', dictCode: ''}) |
||||||
fieldList.push({type: 'double', value: 'manualTime', text: '手工时间', dictCode: ''}) |
fieldList.push({type: 'string', value: 'qualityRequire', text: '品质要求', dictCode: ''}) |
||||||
fieldList.push({type: 'int', value: 'machineSpeed', text: '机器转速', dictCode: ''}) |
fieldList.push({type: 'string', value: 'processTime', text: '工序时间', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'machineWide', text: '机器宽放', dictCode: ''}) |
fieldList.push({type: 'double', value: 'price', text: '工序单价', dictCode: ''}) |
||||||
fieldList.push({type: 'double', value: 'machineTime', text: '机器时间', dictCode: ''}) |
fieldList.push({type: 'string', value: 'grade', text: '工序等级', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'machineFloat', text: '机器浮于', dictCode: ''}) |
fieldList.push({type: 'string', value: 'fabricNum', text: '面料代码', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'bundleWide', text: '绑包宽放', dictCode: ''}) |
fieldList.push({type: 'string', value: 'fabricGrade', text: '面料等级', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'bundleTime', text: '绑包时间', dictCode: ''}) |
fieldList.push({type: 'int', value: 'needlePitch', text: '针距(针/厘米)', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'componentId', text: '部件表', dictCode: 'zy_cloths_component,parts_name,id'}) |
fieldList.push({type: 'string', value: 'machineId', text: '机器名', dictCode: 'zy_machine,name,id'}) |
||||||
fieldList.push({type: 'int', value: 'isBottleneck', text: '是否为瓶颈工序', dictCode: ''}) |
fieldList.push({type: 'string', value: 'manualWide', text: '手工宽放', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业名称', dictCode: ''}) |
fieldList.push({type: 'double', value: 'manualTime', text: '手工时间', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'toolId', text: '工具名称', dictCode: 'zy_tool,name,id'}) |
fieldList.push({type: 'int', value: 'machineSpeed', text: '机器转速', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'styleId', text: '款式名称', dictCode: ''}) |
fieldList.push({type: 'string', value: 'machineWide', text: '机器宽放', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'worksectionCode', text: '工段代码', dictCode: ''}) |
fieldList.push({type: 'double', value: 'machineTime', text: '机器时间', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'contractNum', text: '合同号', dictCode: ''}) |
fieldList.push({type: 'string', value: 'machineFloat', text: '机器浮于', dictCode: ''}) |
||||||
fieldList.push({type: 'int', value: 'totalManualTmu', text: '合计(手工TMU)', dictCode: ''}) |
fieldList.push({type: 'string', value: 'bundleWide', text: '绑包宽放', dictCode: ''}) |
||||||
fieldList.push({type: 'int', value: 'totalMachineTmu', text: '合计(机器TMU)', dictCode: ''}) |
fieldList.push({type: 'string', value: 'bundleTime', text: '绑包时间', dictCode: ''}) |
||||||
fieldList.push({type: 'int', value: 'totalMaunal', text: '合计(手工秒)', dictCode: ''}) |
fieldList.push({type: 'string', value: 'componentId', text: '部件表', dictCode: 'zy_cloths_component,parts_name,id'}) |
||||||
fieldList.push({type: 'int', value: 'totalMachine', text: '合计(机器秒)', dictCode: ''}) |
fieldList.push({type: 'int', value: 'isBottleneck', text: '是否为瓶颈工序', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'image', text: '图片', dictCode: ''}) |
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业名称', dictCode: ''}) |
||||||
fieldList.push({type: 'string', value: 'vedio', text: '视频', dictCode: ''}) |
fieldList.push({type: 'string', value: 'toolId', text: '工具名称', dictCode: 'zy_tool,name,id'}) |
||||||
this.superFieldList = fieldList |
fieldList.push({type: 'string', value: 'styleId', text: '款式名称', dictCode: ''}) |
||||||
}, |
fieldList.push({type: 'string', value: 'worksectionCode', text: '工段代码', dictCode: ''}) |
||||||
openDetail(id) { |
fieldList.push({type: 'string', value: 'contractNum', text: '合同号', dictCode: ''}) |
||||||
this.$refs.zyProcessDetail.showModal(id) |
fieldList.push({type: 'int', value: 'totalManualTmu', text: '合计(手工TMU)', dictCode: ''}) |
||||||
// this.$children[0].showModal(id) |
fieldList.push({type: 'int', value: 'totalMachineTmu', text: '合计(机器TMU)', dictCode: ''}) |
||||||
} |
fieldList.push({type: 'int', value: 'totalMaunal', text: '合计(手工秒)', dictCode: ''}) |
||||||
} |
fieldList.push({type: 'int', value: 'totalMachine', text: '合计(机器秒)', dictCode: ''}) |
||||||
} |
fieldList.push({type: 'string', value: 'image', text: '图片', dictCode: ''}) |
||||||
</script> |
fieldList.push({type: 'string', value: 'vedio', text: '视频', dictCode: ''}) |
||||||
<style scoped> |
this.superFieldList = fieldList |
||||||
@import '~@assets/less/common.less'; |
}, |
||||||
|
openDetail(id) { |
||||||
|
this.$refs.zyProcessDetail.showModal(id) |
||||||
|
// this.$children[0].showModal(id) |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
|
<style scoped> |
||||||
|
@import '~@assets/less/common.less'; |
||||||
</style> |
</style> |
@ -0,0 +1,86 @@ |
|||||||
|
package org.jeecg.common.util; |
||||||
|
|
||||||
|
import org.springframework.util.StringUtils; |
||||||
|
|
||||||
|
import java.beans.PropertyEditorSupport; |
||||||
|
import java.sql.Timestamp; |
||||||
|
import java.text.DateFormat; |
||||||
|
import java.text.ParseException; |
||||||
|
import java.text.SimpleDateFormat; |
||||||
|
import java.util.Calendar; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.GregorianCalendar; |
||||||
|
import java.util.Random; |
||||||
|
|
||||||
|
/** |
||||||
|
* 定时类使用的方法 |
||||||
|
*/ |
||||||
|
public class XJobUtils{ |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取间隔时间 |
||||||
|
* @param start_Date |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static Date randomIntervaltime(Date start_Date,int s,int e) |
||||||
|
{ |
||||||
|
//将时间转为long类型
|
||||||
|
long start=start_Date.getTime(); |
||||||
|
//获取30-180秒对应毫秒
|
||||||
|
long intervalTime=randInt(s*60,s*60)*1000; |
||||||
|
//总共花费时长
|
||||||
|
long timeMillis =start+intervalTime; |
||||||
|
|
||||||
|
return longToDate(timeMillis); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 其实这是基于一个公式 如果要取一个范围在[min,max]之间的随机整数那么公式如下 |
||||||
|
* @param min |
||||||
|
* @param max |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public static int randInt(int min,int max) |
||||||
|
{ |
||||||
|
Random rand = new Random(); |
||||||
|
// nextInt通常不包含顶部值,因此加上1使其包含
|
||||||
|
int randomNum = rand.nextInt((max - min) + 1) + min; |
||||||
|
return randomNum; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//将long转为日期
|
||||||
|
public static Date longToDate(long lo) |
||||||
|
{ |
||||||
|
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
||||||
|
//long转Date
|
||||||
|
Date date = null; |
||||||
|
try { |
||||||
|
date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(sd.format(new Date(lo))); |
||||||
|
} catch (ParseException e) { |
||||||
|
e.printStackTrace(); |
||||||
|
} |
||||||
|
return date; |
||||||
|
} |
||||||
|
|
||||||
|
//间隔时间(秒)
|
||||||
|
public static long dateToLong(Date s,Date e) |
||||||
|
{ |
||||||
|
|
||||||
|
long sl=s.getTime(); |
||||||
|
long el=e.getTime(); |
||||||
|
long r=el-sl; |
||||||
|
return (el-sl)/1000; |
||||||
|
} |
||||||
|
|
||||||
|
//随机暂停s-e分钟()
|
||||||
|
public static void sleepTime(int s ,int e) throws InterruptedException { |
||||||
|
|
||||||
|
Thread.sleep(randInt(60*1000*s,60*1000*e)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue