9 changed files with 2237 additions and 2 deletions
-
3src/api/fanucGroup/fanuc.js
-
7src/api/part/partCostInformation.js
-
10src/api/part/partProductGroupStdProcess.js
-
26src/api/part/standardRoutingOperation.js
-
1src/views/modules/common/Chooselist_eam.vue
-
147src/views/modules/fanuc/fanuc.vue
-
715src/views/modules/part/partCostInformation.vue
-
437src/views/modules/part/partProductGroupInformation.vue
-
893src/views/modules/part/standardRoutingOperation.vue
@ -0,0 +1,7 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
// partCostInformationSearch 物料成本信息列表查询
|
||||
|
export const partCostInformationSearch = data => createAPI(`/part/partCostInformation/partCostInformationSearch`,'post',data) |
||||
|
|
||||
|
// partCostInformationEdit 物料成本信息编辑
|
||||
|
export const partCostInformationEdit = data => createAPI(`/part/partCostInformation/partCostInformationEdit`,'post',data) |
||||
@ -0,0 +1,10 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
//查询
|
||||
|
export const searchProductGroupStdProcess= data => createAPI(`/plm/partProductGroupInformation/searchProductGroupStdProcess`,'post',data) |
||||
|
|
||||
|
//新增
|
||||
|
export const saveStdProcessData= data => createAPI(`/plm/partProductGroupInformation/saveStdProcessData`,'post',data) |
||||
|
|
||||
|
// 删除
|
||||
|
export const delProductGroupStdProcess= data => createAPI(`/plm/partProductGroupInformation/delProductGroupStdProcess`,'post',data) |
||||
@ -0,0 +1,26 @@ |
|||||
|
import { createAPI } from "@/utils/httpRequest.js"; |
||||
|
|
||||
|
/** |
||||
|
* 分类信息列表查询 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const searchStandardRoutingOperationList = data => createAPI(`/part/standardRoutingOperation/searchStandardRoutingOperationList`,'post',data) |
||||
|
/** |
||||
|
* 分类信息新增 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const saveStandardRoutingOperation = data => createAPI(`/part/standardRoutingOperation/saveStandardRoutingOperation`,'post',data) |
||||
|
/** |
||||
|
* 分类信息编辑 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const updateStandardRoutingOperation = data => createAPI(`/part/standardRoutingOperation/updateStandardRoutingOperation`,'post',data) |
||||
|
/** |
||||
|
* 分类信息删除 |
||||
|
* @param data |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export const deleteStandardRoutingOperation = data => createAPI(`/part/standardRoutingOperation/deleteStandardRoutingOperation`,'post',data) |
||||
@ -0,0 +1,715 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList"> |
||||
|
<el-form-item :label="'物料编码'"> |
||||
|
<el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'物料名称'"> |
||||
|
<el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="' '"> |
||||
|
<el-button type="primary" @click="getDataList">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-table |
||||
|
:height="height" |
||||
|
:data="dataList" |
||||
|
ref="mainTable" |
||||
|
border |
||||
|
style="width: 100%;"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
fixed="right" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="60" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-link v-if="!authUpdate" style="cursor: pointer" @click="updateModal(scope.row)">修改</el-link> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<!-- 分页栏 --> |
||||
|
<el-pagination |
||||
|
@size-change="sizeChangeHandle" |
||||
|
@current-change="currentChangeHandle" |
||||
|
:current-page="pageIndex" |
||||
|
:page-sizes="[20, 50, 100, 200, 500]" |
||||
|
:page-size="pageSize" |
||||
|
:total="totalPage" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
|
||||
|
<!-- 编辑模态框 --> |
||||
|
<el-dialog title="物料成本信息 - 修改" @close="closeDialog" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="566px"> |
||||
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;"> |
||||
|
<el-form :inline="true" label-position="top" :model="modalData"> |
||||
|
<el-form-item label="物料编码" prop="partNo"> |
||||
|
<el-input v-model="modalData.partNo" disabled style="width: 128px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="物料描述" prop="partDesc"> |
||||
|
<el-input v-model="modalData.partDesc" disabled style="width: 330px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="计量单位"> |
||||
|
<el-input v-model="modalData.umId" disabled style="width: 50px"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;"> |
||||
|
<el-form-item label="物料分类编码" prop="familyID"> |
||||
|
<el-input v-model="modalData.familyID" disabled style="width: 128px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="物料分类描述" prop="familyName"> |
||||
|
<el-input v-model="modalData.familyName" disabled style="width: 330px"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;"> |
||||
|
<el-form-item label="产品组编码" prop="otherGroup1"> |
||||
|
<el-input v-model="modalData.otherGroup1" disabled style="width: 128px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产品组描述" prop="otherGroupName1"> |
||||
|
<el-input v-model="modalData.otherGroupName1" disabled style="width: 330px"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;"> |
||||
|
<el-form-item label="单位标准成本" prop="standardCost"> |
||||
|
<el-input v-model="modalData.standardCost" class="inlineNumber numInput" style="width: 107px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="标准成本币种" prop="standardCostCurrency" :show-message="false"> |
||||
|
<span slot="label"> |
||||
|
<a @click="getBaseList(512)">实际成本币种</a> |
||||
|
</span> |
||||
|
<el-input v-model="modalData.standardCostCurrency" disabled style="width: 108px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单位实际成本" prop="actualCost"> |
||||
|
<el-input v-model="modalData.actualCost" class="inlineNumber numInput" style="width: 107px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="实际成本币种" prop="actualCostCurrency" :show-message="false"> |
||||
|
<span slot="label"> |
||||
|
<a @click="getBaseList(513)">实际成本币种</a> |
||||
|
</span> |
||||
|
<el-input v-model="modalData.actualCostCurrency" disabled style="width: 108px"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: 0px;"> |
||||
|
<el-form-item label="备注" style="height: 80px"> |
||||
|
<el-input v-model="modalData.remark" style="width: 535px"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-form> |
||||
|
<el-footer style="height:35px;margin-top: -25px;text-align:center"> |
||||
|
<el-button type="primary" @click="saveData">保存</el-button> |
||||
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
||||
|
</el-footer> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<choose-list-eam ref="baseList" @getBaseData="getBaseData"></choose-list-eam> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import {partCostInformationSearch,partCostInformationEdit} from "@/api/part/partCostInformation"; |
||||
|
import Chooselist from "../common/Chooselist.vue"; |
||||
|
import {getSiteAndBuByUserName} from "../../../api/qc/qc"; |
||||
|
import ChooseListEam from "../common/Chooselist_eam.vue"; |
||||
|
|
||||
|
export default { |
||||
|
components: { |
||||
|
ChooseListEam, |
||||
|
Chooselist |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
// ======== 行高 ======== |
||||
|
height: 200, |
||||
|
// ======== 分页 ======== |
||||
|
pageIndex: 1, |
||||
|
pageSize: 50, |
||||
|
totalPage: 0, |
||||
|
// 条件查询 |
||||
|
searchData: { |
||||
|
site: '', |
||||
|
userName: this.$store.state.user.name, |
||||
|
partNo: '', |
||||
|
partDesc: '', |
||||
|
page: 1, |
||||
|
limit: 10 |
||||
|
}, |
||||
|
modalData: { |
||||
|
id: null, |
||||
|
partId: null, |
||||
|
bu: '', |
||||
|
site: this.$store.state.user.site, |
||||
|
buNo: '', |
||||
|
partNo: '', |
||||
|
partDesc: '', |
||||
|
umId: '', |
||||
|
umName: '', |
||||
|
familyId: '', |
||||
|
familyName: '', |
||||
|
otherGroup1: '', |
||||
|
otherGroupName1: '', |
||||
|
standardCost: '', |
||||
|
standardCostCurrency: '', |
||||
|
actualCost: '', |
||||
|
actualCostCurrency: '', |
||||
|
remark: '', |
||||
|
createBy: '', |
||||
|
createDate: '', |
||||
|
updateBy: '', |
||||
|
updateDate: '' |
||||
|
}, |
||||
|
originalData: {}, |
||||
|
// ======== 数据列表 ======== |
||||
|
dataList: [], |
||||
|
// 展示列集 |
||||
|
columnList: [ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1PartNo', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'partNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '物料编码', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1PartDesc', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'partDesc', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '物料描述', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 300 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1UmId', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'umId', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '计量单位', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1PartType', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'partType', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '零件类型', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 150 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1FamilyId', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'familyId', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '物料分类编码', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1FamilyName', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'familyName', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '物料分类描述', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1OtherGroup1', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'otherGroup1', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '产品组编码', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1OtherGroupName1', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'otherGroupName1', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '产品组描述', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1StandardCost', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'standardCost', |
||||
|
headerAlign: 'center', |
||||
|
align: 'right', |
||||
|
columnLabel: '单位标准成本', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1StandardCostCurrency', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'standardCostCurrency', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '标准成本币种', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1ActualCost', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'actualCost', |
||||
|
headerAlign: 'center', |
||||
|
align: 'right', |
||||
|
columnLabel: '单位实际成本', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1ActualCostCurrency', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'actualCostCurrency', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '实际成本币种', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1Remark', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'remark', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '备注', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 200 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1CreateDate', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'createDate', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '创建时间', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 160 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1CreateBy', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'createBy', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '创建人', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1UpdateDate', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'updateDate', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '更新时间', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 160 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010011, |
||||
|
serialNumber: '6010011Table1UpdateBy', |
||||
|
tableId: '6010011Table1', |
||||
|
tableName: '物料成本表', |
||||
|
columnProp: 'updateBy', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '更新人', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
} |
||||
|
], |
||||
|
// ======== 模态框开关控制 ======== |
||||
|
authSearch: false, |
||||
|
authSave: false, |
||||
|
authUpdate: false, |
||||
|
authDelete: false, |
||||
|
modalFlag: false, |
||||
|
modalDisableFlag: false, |
||||
|
menuId: this.$route.meta.menuId, |
||||
|
tagNo:undefined, |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
mounted () { |
||||
|
this.$nextTick(() => { |
||||
|
this.height = window.innerHeight - 180 |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
created () { |
||||
|
// 按钮控制 |
||||
|
this.getButtonAuthData() |
||||
|
// 获取用户的 site 和 bu |
||||
|
this.getSiteAndBuByUserName() |
||||
|
// 动态列 |
||||
|
// this.getTableUserColumn(this.$route.meta.menuId+'table1',1) |
||||
|
if (!this.authSearch) { |
||||
|
// 获取数据列表 |
||||
|
this.getDataList() |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
getBaseList(val){ |
||||
|
this.tagNo = val |
||||
|
this.$nextTick(()=>{ |
||||
|
let strVal = '' |
||||
|
if (val === 512) { |
||||
|
strVal = this.modalData.standardCostCurrency ? this.modalData.standardCostCurrency : '' |
||||
|
this.$refs.baseList.init(val, strVal) |
||||
|
} |
||||
|
if (val === 513) { |
||||
|
strVal = this.modalData.actualCostCurrency ? this.modalData.actualCostCurrency : '' |
||||
|
this.$refs.baseList.init(val, strVal) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getBaseData(val){ |
||||
|
if (this.tagNo === 512){ |
||||
|
this.modalData.standardCostCurrency = val.Currency |
||||
|
} |
||||
|
if (this.tagNo === 513){ |
||||
|
this.modalData.actualCostCurrency = val.Currency |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
// 获取用户的bu |
||||
|
getSiteAndBuByUserName () { |
||||
|
let tempData = { |
||||
|
username: this.$store.state.user.name, |
||||
|
} |
||||
|
getSiteAndBuByUserName(tempData).then(({data}) => { |
||||
|
if (data.code === 0) { |
||||
|
this.userBuList = data.rows |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 每页数 |
||||
|
sizeChangeHandle (val) { |
||||
|
this.pageSize = val |
||||
|
this.pageIndex = 1 |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
|
||||
|
// 当前页 |
||||
|
currentChangeHandle (val) { |
||||
|
this.pageIndex = val |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
|
||||
|
//获取按钮的权限数据 |
||||
|
getButtonAuthData () { |
||||
|
let searchFlag = this.isAuth(this.menuId+":search") |
||||
|
let saveFlag = this.isAuth(this.menuId+":save") |
||||
|
let updateFlag = this.isAuth(this.menuId+":update") |
||||
|
let deleteFlag = this.isAuth(this.menuId+":delete") |
||||
|
//处理页面的权限数据 |
||||
|
this.authSearch = !searchFlag |
||||
|
this.authSave = !saveFlag |
||||
|
this.authUpdate = !updateFlag |
||||
|
this.authDelete = !deleteFlag |
||||
|
}, |
||||
|
|
||||
|
// ======== 列表数据刷新方法 ======== |
||||
|
/** |
||||
|
* 获取数据列表 |
||||
|
*/ |
||||
|
getDataList () { |
||||
|
this.searchData.limit = this.pageSize |
||||
|
this.searchData.page = this.pageIndex |
||||
|
partCostInformationSearch(this.searchData).then(({data}) => { |
||||
|
if (data.code === 0) { |
||||
|
this.dataList = data.page.list |
||||
|
this.pageIndex = data.page.currPage |
||||
|
this.pageSize = data.page.pageSize |
||||
|
this.totalPage = data.page.totalCount |
||||
|
// 判断是否全部存在数据 |
||||
|
if (this.totalPage > 0) { |
||||
|
// 设置选中行 |
||||
|
this.$refs.mainTable.setCurrentRow(this.dataList[0]) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
updateModal (row) { |
||||
|
this.modalData = { |
||||
|
id: row.id, |
||||
|
partId: row.partId, |
||||
|
bu: row.bu, |
||||
|
site: row.site, |
||||
|
buNo: row.buNo, |
||||
|
partNo: row.partNo, |
||||
|
partDesc: row.partDesc, |
||||
|
umId: row.umId, |
||||
|
umName: row.umName, |
||||
|
familyId: row.familyId, |
||||
|
familyName: row.familyName, |
||||
|
otherGroup1: row.otherGroup1, |
||||
|
otherGroupName1: row.otherGroupName1, |
||||
|
standardCost: row.standardCost, |
||||
|
standardCostCurrency: row.standardCostCurrency, |
||||
|
actualCost: row.actualCost, |
||||
|
actualCostCurrency: row.actualCostCurrency, |
||||
|
remark: row.remark, |
||||
|
createBy: row.createBy, |
||||
|
createDate: row.createDate, |
||||
|
} |
||||
|
this.originalData = JSON.parse(JSON.stringify(this.modalData)) |
||||
|
this.modalFlag = true |
||||
|
}, |
||||
|
|
||||
|
saveData () { |
||||
|
if (JSON.stringify(this.modalData) === JSON.stringify(this.originalData)) { |
||||
|
this.closeDialog() |
||||
|
return |
||||
|
} |
||||
|
let inData = { |
||||
|
id: this.modalData.id, |
||||
|
partId: this.modalData.partId, |
||||
|
bu: this.modalData.bu, |
||||
|
site: this.modalData.site, |
||||
|
buNo: this.modalData.buNo, |
||||
|
standardCost: this.modalData.standardCost, |
||||
|
standardCostCurrency: this.modalData.standardCostCurrency, |
||||
|
actualCost: this.modalData.actualCost, |
||||
|
actualCostCurrency: this.modalData.actualCostCurrency, |
||||
|
remark: this.modalData.remark, |
||||
|
updateBy: this.$store.state.user.name, |
||||
|
updateDate:'' |
||||
|
} |
||||
|
this.$confirm('确定保存吗?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
partCostInformationEdit(inData).then(({data}) => { |
||||
|
if (data.code === 0) { |
||||
|
this.$message({ |
||||
|
message: '保存成功', |
||||
|
type: 'success' |
||||
|
}) |
||||
|
this.getDataList() |
||||
|
this.closeDialog() |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
this.$message({ |
||||
|
type: 'info', |
||||
|
message: '已取消保存' |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
closeDialog () { |
||||
|
this.modalData = { |
||||
|
flag: '', |
||||
|
title: '', |
||||
|
bu: '', |
||||
|
site: this.$store.state.user.site, |
||||
|
buNo: '', |
||||
|
partNo: '', |
||||
|
partDesc: '', |
||||
|
umId: '', |
||||
|
umName: '', |
||||
|
familyId: '', |
||||
|
familyName: '', |
||||
|
otherGroup1: '', |
||||
|
otherGroupName1: '', |
||||
|
standardCost: '', |
||||
|
standardCostCurrency: '', |
||||
|
actualCost: '', |
||||
|
actualCostCurrency: '', |
||||
|
remark: '', |
||||
|
} |
||||
|
this.modalFlag = false |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.numInput /deep/ .el-input__inner{ |
||||
|
text-align: right; |
||||
|
} |
||||
|
/deep/ .inlineNumber input::-webkit-outer-spin-button, |
||||
|
/deep/ .inlineNumber input::-webkit-inner-spin-button { |
||||
|
-webkit-appearance: none; |
||||
|
|
||||
|
} |
||||
|
/deep/ .inlineNumber input[type="number"]{ |
||||
|
-moz-appearance: textfield; |
||||
|
padding-right: 5px !important; |
||||
|
} |
||||
|
</style> |
||||
|
``` |
||||
@ -0,0 +1,893 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList"> |
||||
|
<el-form-item :label="'BU'"> |
||||
|
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px"> |
||||
|
<el-option |
||||
|
v-for = "i in userBuList" |
||||
|
:key = "i.buNo" |
||||
|
:label = "i.buDesc" |
||||
|
:value = "i.buNo"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'工序号'"> |
||||
|
<el-input v-model="searchData.operationNo" clearable style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'工序名称'"> |
||||
|
<el-input v-model="searchData.operationName" clearable style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="' '"> |
||||
|
<el-button v-if="!authSearch" @click="getDataList">查询</el-button> |
||||
|
<el-button v-if="!authSave" type="primary" @click="addModal">新增</el-button> |
||||
|
<download-excel |
||||
|
:fields="fields()" |
||||
|
:data="exportData" |
||||
|
type="xls" |
||||
|
:name="exportName" |
||||
|
:header="exportHeader" |
||||
|
:footer="exportFooter" |
||||
|
:fetch="createExportData" |
||||
|
:before-generate="startDownload" |
||||
|
:before-finish="finishDownload" |
||||
|
worksheet="导出信息" |
||||
|
class="el-button el-button--primary el-button--medium"> |
||||
|
{{ "导出" }} |
||||
|
</download-excel> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-table |
||||
|
:height="height" |
||||
|
:data="dataList" |
||||
|
border |
||||
|
style="width: 100%;"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="item.headerAlign" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:min-width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
fixed="right" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="160" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-link v-if="!authUpdate" style="cursor: pointer" @click="updateModal(scope.row)">修改</el-link> |
||||
|
<el-link v-if="!authDelete" style="cursor: pointer" @click="delModal(scope.row)">删除</el-link> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<!-- 分页栏 --> |
||||
|
<el-pagination |
||||
|
@size-change="sizeChangeHandle" |
||||
|
@current-change="currentChangeHandle" |
||||
|
:current-page="pageIndex" |
||||
|
:page-sizes="[20, 50, 100, 200, 500]" |
||||
|
:page-size="pageSize" |
||||
|
:total="totalPage" |
||||
|
layout="total, sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
|
||||
|
<el-dialog :title="modalData.title" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="577px"> |
||||
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
||||
|
<el-form-item label="工序号" prop="operationNo" :rules="rules.operationNo"> |
||||
|
<el-input v-model="modalData.operationNo" :disabled="modalDisableFlag" style="width: 140px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="工序名称" prop="operationName" :rules="rules.operationName"> |
||||
|
<el-input v-model="modalData.operationName" style="width: 302px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="BU" prop="bu" :rules="rules.bu"> |
||||
|
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 70px"> |
||||
|
<el-option |
||||
|
v-for = "i in userBuList" |
||||
|
:key = "i.buNo" |
||||
|
:label = "i.buDesc" |
||||
|
:value = "i.buNo"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
||||
|
<el-form-item prop="workCenterNo"> |
||||
|
<span style="cursor: pointer" slot="label" @click="getBaseList(216)"><a herf="#">加工中心编码</a></span> |
||||
|
<el-input v-model="modalData.workCenterNo" @blur="workCenterBlur(216)" style="width: 140px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'加工中心名称'" prop="workCenterDesc" :rules="rules.workCenterDesc"> |
||||
|
<el-input v-model="modalData.workCenterDesc" disabled style="width: 302px"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
||||
|
<el-form-item prop="laborClassNo" :rules="rules.laborClassNo"> |
||||
|
<span style="cursor: pointer" slot="label" @click="getBaseList(217, 1)"><a herf="#">人员等级编码</a></span> |
||||
|
<el-input v-model="modalData.laborClassNo" @blur="laborClassBlur(217)" style="width: 140px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'人员等级'" prop="laborClassDesc" :rules="rules.laborClassDesc"> |
||||
|
<el-input v-model="modalData.laborClassDesc" disabled style="width: 302px"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
||||
|
<el-form-item prop="setupLaborClassNo" :rules="rules.setupLaborClassNo"> |
||||
|
<span style="cursor: pointer" slot="label" @click="getBaseList(217, 2)"><a herf="#">调机时人员等级编码</a></span> |
||||
|
<el-input v-model="modalData.setupLaborClassNo" @blur="setupLaborClassBlur(217)" style="width: 140px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'调机时人员等级'" prop="setupLaborClassDesc" :rules="rules.setupLaborClassDesc"> |
||||
|
<el-input v-model="modalData.setupLaborClassDesc" disabled style="width: 302px"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-footer style="height:30px;margin-top: 20px;text-align:center"> |
||||
|
<el-button type="primary" @click="saveData">保存</el-button> |
||||
|
<el-button type="primary" @click="modalFlag = false">关闭</el-button> |
||||
|
</el-footer> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<!-- chooseList模态框 --> |
||||
|
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
searchStandardRoutingOperationList, // 分类信息列表查询 |
||||
|
saveStandardRoutingOperation, // 分类信息新增 |
||||
|
updateStandardRoutingOperation, // 分类信息编辑 |
||||
|
deleteStandardRoutingOperation // 分类信息删除 |
||||
|
} from '@/api/part/standardRoutingOperation.js' |
||||
|
import {getSiteAndBuByUserName} from "@/api/eam/eam.js" |
||||
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
||||
|
import {verifyData} from "../../../api/part/partInformation"; |
||||
|
|
||||
|
import ChooseList from '@/views/modules/common/Chooselist_eam' |
||||
|
|
||||
|
export default { |
||||
|
// 组件 |
||||
|
components: { |
||||
|
ChooseList |
||||
|
}, |
||||
|
data () { |
||||
|
return { |
||||
|
// 导出 |
||||
|
exportData: [], |
||||
|
exportName: '物料分类' + this.dayjs().format('YYYYMMDDHHmmss'), |
||||
|
exportHeader: ['物料分类'], |
||||
|
exportFooter: [], |
||||
|
resultList: [], |
||||
|
userBuList: [], |
||||
|
// ======== 行高 ======== |
||||
|
height: 200, |
||||
|
// ======== 分页 ======== |
||||
|
pageIndex: 1, |
||||
|
pageSize: 50, |
||||
|
totalPage: 0, |
||||
|
// 条件查询 |
||||
|
searchData: { |
||||
|
site: '', |
||||
|
userName: this.$store.state.user.name, |
||||
|
buNo: '', |
||||
|
operationNo: '', |
||||
|
operationName: '', |
||||
|
page: 1, |
||||
|
limit: 10 |
||||
|
}, |
||||
|
modalData: { |
||||
|
flag: '', |
||||
|
title: '', |
||||
|
bu: '', |
||||
|
site: this.$store.state.user.site, |
||||
|
buNo: '', |
||||
|
operationNo: '', |
||||
|
operationName: '', |
||||
|
workCenterNo: '', |
||||
|
workCenterDesc: '', |
||||
|
laborClassNo: '', |
||||
|
laborClassDesc: '', |
||||
|
setupLaborClassNo: '', |
||||
|
setupLaborClassDesc: '', |
||||
|
}, |
||||
|
// ======== 数据列表 ======== |
||||
|
dataList: [], |
||||
|
// 展示列集 |
||||
|
columnList: [ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010012, |
||||
|
serialNumber: '6010012Table1BuDesc', |
||||
|
tableId: "6010012Table1", |
||||
|
tableName: "标准工序表", |
||||
|
columnProp: 'buDesc', |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: 'BU', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010012, |
||||
|
serialNumber: '6010012Table1OperationNo', |
||||
|
tableId: "6010012Table1", |
||||
|
tableName: "标准工序表", |
||||
|
columnProp: 'operationNo', |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: '工序号', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010012, |
||||
|
serialNumber: '6010012Table1OperationName', |
||||
|
tableId: "6010012Table1", |
||||
|
tableName: "标准工序表", |
||||
|
columnProp: 'operationName', |
||||
|
headerAlign: "center", |
||||
|
align: "left", |
||||
|
columnLabel: '工序名称', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 300 |
||||
|
}, |
||||
|
{ |
||||
|
functionId: 6010012, |
||||
|
serialNumber: '6010012Table1WorkCenterNo', |
||||
|
tableId: '6010012Table1', |
||||
|
tableName: '标准工序表', |
||||
|
columnProp: 'workCenterNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '加工中心编码', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
functionId: 6010012, |
||||
|
serialNumber: '6010012Table1WorkCenterDesc', |
||||
|
tableId: '6010012Table1', |
||||
|
tableName: '标准工序表', |
||||
|
columnProp: 'workCenterDesc', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '加工中心名称', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 200 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010012, |
||||
|
serialNumber: '6010012Table1LaborClassDesc', |
||||
|
tableId: "6010012Table1", |
||||
|
tableName: "标准工序表", |
||||
|
columnProp: 'laborClassDesc', |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: '人员等级', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010012, |
||||
|
serialNumber: '6010012Table1SetupLaborClassDesc', |
||||
|
tableId: "6010012Table1", |
||||
|
tableName: "标准工序表", |
||||
|
columnProp: 'setupLaborClassDesc', |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: '调机时人员等级', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010012, |
||||
|
serialNumber: '6010012Table1CreateDate', |
||||
|
tableId: '6010012Table1', |
||||
|
tableName: '标准工序表', |
||||
|
columnProp: 'createDate', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: '创建时间', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 170 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010012, |
||||
|
serialNumber: '6010012Table1CreateBy', |
||||
|
tableId: "6010012Table1", |
||||
|
tableName: "标准工序表", |
||||
|
columnProp: 'createBy', |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: '创建人', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010012, |
||||
|
serialNumber: '6010012Table1UpdateDate', |
||||
|
tableId: "6010012Table1", |
||||
|
tableName: "标准工序表", |
||||
|
columnProp: 'updateDate', |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: '更新时间', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 170 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 6010012, |
||||
|
serialNumber: '6010012Table1UpdateBy', |
||||
|
tableId: "6010012Table1", |
||||
|
tableName: "标准工序表", |
||||
|
columnProp: 'updateBy', |
||||
|
headerAlign: "center", |
||||
|
align: "center", |
||||
|
columnLabel: '更新人', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
], |
||||
|
rules: { |
||||
|
bu: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: ['blur','change'] |
||||
|
} |
||||
|
], |
||||
|
operationNo: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: ['blur','change'] |
||||
|
} |
||||
|
], |
||||
|
operationName: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: ['blur','change'] |
||||
|
} |
||||
|
], |
||||
|
workCenterNo: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: ['blur','change'] |
||||
|
} |
||||
|
], |
||||
|
workCenterDesc: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: ['blur','change'] |
||||
|
} |
||||
|
], |
||||
|
laborClassNo: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: ['blur','change'] |
||||
|
} |
||||
|
], |
||||
|
laborClassDesc: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: ['blur','change'] |
||||
|
} |
||||
|
], |
||||
|
setupLaborClassNo: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: ['blur','change'] |
||||
|
} |
||||
|
], |
||||
|
setupLaborClassDesc: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: ' ', |
||||
|
trigger: ['blur','change'] |
||||
|
} |
||||
|
], |
||||
|
}, |
||||
|
// ======== 模态框开关控制 ======== |
||||
|
authSearch: false, |
||||
|
authSave: false, |
||||
|
authUpdate: false, |
||||
|
authDelete: false, |
||||
|
modalFlag: false, |
||||
|
modalDisableFlag: false, |
||||
|
menuId: this.$route.meta.menuId, |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
mounted () { |
||||
|
this.$nextTick(() => { |
||||
|
this.height = window.innerHeight - 180 |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
created () { |
||||
|
// 按钮控制 |
||||
|
this.getButtonAuthData() |
||||
|
// 获取用户的 site 和 bu |
||||
|
this.getSiteAndBuByUserName() |
||||
|
// 动态列 |
||||
|
this.getTableUserColumn(this.$route.meta.menuId+'table1',1) |
||||
|
if (!this.authSearch) { |
||||
|
// 获取数据列表 |
||||
|
this.getDataList() |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
// 获取用户的bu |
||||
|
getSiteAndBuByUserName () { |
||||
|
let tempData = { |
||||
|
username: this.$store.state.user.name, |
||||
|
} |
||||
|
getSiteAndBuByUserName(tempData).then(({data}) => { |
||||
|
if (data.code === 0) { |
||||
|
this.userBuList = data.rows |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 每页数 |
||||
|
sizeChangeHandle (val) { |
||||
|
this.pageSize = val |
||||
|
this.pageIndex = 1 |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
|
||||
|
// 当前页 |
||||
|
currentChangeHandle (val) { |
||||
|
this.pageIndex = val |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
|
||||
|
//导出excel |
||||
|
async createExportData() { |
||||
|
this.searchData.limit = -1 |
||||
|
this.searchData.page = 1 |
||||
|
await searchStandardRoutingOperationList(this.searchData).then(({data}) => { |
||||
|
this.exportList= data.page.list |
||||
|
}) |
||||
|
return this.exportList |
||||
|
}, |
||||
|
|
||||
|
startDownload() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
finishDownload() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
fields () { |
||||
|
let json = "{" |
||||
|
this.columnList.forEach((item, index) => { |
||||
|
if (index == this.columnList.length - 1) { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" |
||||
|
} else { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," |
||||
|
} |
||||
|
}) |
||||
|
json += "}" |
||||
|
let s = eval("(" + json + ")") |
||||
|
return s |
||||
|
}, |
||||
|
|
||||
|
// ======== chooseList相关方法 ======== |
||||
|
/** |
||||
|
* 获取基础数据列表S |
||||
|
* @param val |
||||
|
* @param type |
||||
|
*/ |
||||
|
getBaseList (val, type) { |
||||
|
this.tagNo = val |
||||
|
this.tagNo1 = type |
||||
|
this.$nextTick(() => { |
||||
|
let strVal = '' |
||||
|
if (val === 217) { |
||||
|
if(type === 1) { |
||||
|
strVal = this.modalData.laborClassNo |
||||
|
} else if (type === 2) { |
||||
|
strVal = this.modalData.setupLaborClassNo |
||||
|
} |
||||
|
} |
||||
|
if (val === 216) { |
||||
|
strVal = this.modalData.workCenterNo |
||||
|
} |
||||
|
this.$refs.baseList.init(val, strVal) |
||||
|
}) |
||||
|
}, |
||||
|
/** |
||||
|
* 列表方法的回调 |
||||
|
* @param val |
||||
|
*/ |
||||
|
getBaseData (val) { |
||||
|
if (this.tagNo === 217) { |
||||
|
if (this.tagNo1 === 1) { |
||||
|
this.modalData.laborClassNo = val.class_no |
||||
|
this.modalData.laborClassDesc = val.class_desc |
||||
|
} else if (this.tagNo1 === 2) { |
||||
|
this.modalData.setupLaborClassNo = val.class_no |
||||
|
this.modalData.setupLaborClassDesc = val.class_desc |
||||
|
} |
||||
|
} |
||||
|
if (this.tagNo === 216) { |
||||
|
this.modalData.workCenterNo = val.work_center_no |
||||
|
this.modalData.workCenterDesc = val.work_center_desc |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
// 获取数据列表 |
||||
|
getDataList () { |
||||
|
this.searchData.limit = this.pageSize |
||||
|
this.searchData.page = this.pageIndex |
||||
|
searchStandardRoutingOperationList(this.searchData).then(({data}) => { |
||||
|
if (data.code === 0) { |
||||
|
this.dataList = data.page.list |
||||
|
this.pageIndex = data.page.currPage |
||||
|
this.pageSize = data.page.pageSize |
||||
|
this.totalPage = data.page.totalCount |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
addModal () { |
||||
|
this.modalData = { |
||||
|
flag: '1', |
||||
|
title: '标准工序新增', |
||||
|
bu: this.userBuList[0].buNo, |
||||
|
buNo: '', |
||||
|
site: '', |
||||
|
operationNo: '', |
||||
|
operationName: '', |
||||
|
workCenterNo: '', |
||||
|
workCenterDesc: '', |
||||
|
laborClassNo: '', |
||||
|
laborClassDesc: '', |
||||
|
setupLaborClassNo: '', |
||||
|
setupLaborClassDesc: '', |
||||
|
createBy: this.$store.state.user.name, |
||||
|
} |
||||
|
this.modalDisableFlag = false |
||||
|
this.modalFlag = true |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 分类信息编辑模态框 |
||||
|
* @param row |
||||
|
*/ |
||||
|
updateModal (row) { |
||||
|
this.modalData = { |
||||
|
flag: '2', |
||||
|
title: '标准工序编辑', |
||||
|
site: row.site, |
||||
|
bu: row.site + '_' + row.buNo, |
||||
|
buNo: row.buNo, |
||||
|
operationNo: row.operationNo, |
||||
|
operationName: row.operationName, |
||||
|
workCenterNo: row.workCenterNo, |
||||
|
updateBy: this.$store.state.user.name, |
||||
|
} |
||||
|
this.modalDisableFlag = true |
||||
|
this.modalFlag = true |
||||
|
}, |
||||
|
|
||||
|
// ======== 新增/编辑/删除方法 ======== |
||||
|
/** |
||||
|
* 分类信息新增/编辑 |
||||
|
*/ |
||||
|
saveData () { |
||||
|
if (this.modalData.bu === '' || this.modalData.bu == null) { |
||||
|
this.$message.warning('请选择BU!') |
||||
|
return |
||||
|
} |
||||
|
if (this.modalData.operationNo === '' || this.modalData.operationNo == null) { |
||||
|
this.$message.warning('请填写工序号!') |
||||
|
return |
||||
|
} |
||||
|
if (this.modalData.operationName === '' || this.modalData.operationName == null) { |
||||
|
this.$message.warning('请填写工序名称!') |
||||
|
return |
||||
|
} |
||||
|
if (this.modalData.workCenterNo === '' || this.modalData.workCenterNo == null) { |
||||
|
this.$message.warning('请填写加工中心编码!') |
||||
|
return |
||||
|
} |
||||
|
if (this.modalData.workCenterDesc === '' || this.modalData.workCenterDesc == null) { |
||||
|
this.$message.warning('请填写加工中心名称!') |
||||
|
return |
||||
|
} |
||||
|
if (this.modalData.laborClassNo === '' || this.modalData.laborClassNo == null) { |
||||
|
this.$message.warning('请填写人员等级编码!') |
||||
|
return |
||||
|
} |
||||
|
if (this.modalData.laborClassDesc === '' || this.modalData.laborClassDesc == null) { |
||||
|
this.$message.warning('请填写人员等级!') |
||||
|
return |
||||
|
} |
||||
|
if (this.modalData.setupLaborClassNo === '' || this.modalData.setupLaborClassNo == null) { |
||||
|
this.$message.warning('请填写调机时人员等级编码!') |
||||
|
return |
||||
|
} |
||||
|
if (this.modalData.setupLaborClassDesc === '' || this.modalData.setupLaborClassDesc == null) { |
||||
|
this.$message.warning('请填写调机时人员等级!') |
||||
|
return |
||||
|
} |
||||
|
if (this.modalData.flag === '1') { |
||||
|
saveStandardRoutingOperation(this.modalData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.getDataList() |
||||
|
this.modalFlag = false |
||||
|
this.$message({ |
||||
|
message: '操作成功', |
||||
|
type: 'success', |
||||
|
duration: 1500, |
||||
|
onClose: () => {} |
||||
|
}) |
||||
|
} else { |
||||
|
this.$alert(data.msg, '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
} else { |
||||
|
updateStandardRoutingOperation(this.modalData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.getDataList() |
||||
|
this.modalFlag = false |
||||
|
this.$message({ |
||||
|
message: '操作成功', |
||||
|
type: 'success', |
||||
|
duration: 1500, |
||||
|
onClose: () => {} |
||||
|
}) |
||||
|
} else { |
||||
|
this.$alert(data.msg, '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 分类信息删除 |
||||
|
*/ |
||||
|
delModal (row) { |
||||
|
this.$confirm(`是否删除这条分类信息?`, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
deleteStandardRoutingOperation(row).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.getDataList() |
||||
|
this.partSelections = [] |
||||
|
this.$message({ |
||||
|
message: '操作成功', |
||||
|
type: 'success', |
||||
|
duration: 1500, |
||||
|
onClose: () => {} |
||||
|
}) |
||||
|
} else { |
||||
|
this.$alert(data.msg, '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 加工中心输入校验 |
||||
|
workCenterBlur (tagNo) { |
||||
|
if (this.modalData.workCenterNo != null && this.modalData.workCenterNo !== '') { |
||||
|
let tempData = { |
||||
|
tagno: tagNo, |
||||
|
conditionSql: " and work_center_no = '" + this.modalData.workCenterNo + "'" + " and site = '" + this.modalData.site + "'" + " and bu_no = '" + this.modalData.buNo + "'" |
||||
|
} |
||||
|
verifyData(tempData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
if (data.baseListData.length > 0) { |
||||
|
this.modalData.workCenterNo = data.baseListData[0].work_center_no |
||||
|
this.modalData.workCenterDesc = data.baseListData[0].work_center_desc |
||||
|
} else { |
||||
|
this.$message.warning('该加工中心不存在!') |
||||
|
this.modalData.workCenterDesc = '' |
||||
|
} |
||||
|
} else { |
||||
|
this.$message.warning(data.msg) |
||||
|
this.modalData.workCenterDesc = '' |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
// 人员等级 |
||||
|
setupLaborClassBlur (tagNo) { |
||||
|
if (this.modalData.setupLaborClassNo != null && this.modalData.setupLaborClassNo !== '') { |
||||
|
let tempData = { |
||||
|
tagno: tagNo, |
||||
|
conditionSql: " and class_no = '" + this.modalData.setupLaborClassNo + "'" + " and site = '" + this.modalData.site + "'" + " and bu_no = '" + this.modalData.buNo + "'" |
||||
|
} |
||||
|
verifyData(tempData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
if (data.baseListData.length > 0) { |
||||
|
this.modalData.setupLaborClassNo = data.baseListData[0].class_no |
||||
|
this.modalData.setupLaborClassDesc = data.baseListData[0].class_desc |
||||
|
} else { |
||||
|
this.$message.warning('该人员等级不存在!') |
||||
|
this.modalData.setupLaborClassDesc = '' |
||||
|
} |
||||
|
} else { |
||||
|
this.$message.warning(data.msg) |
||||
|
this.modalData.setupLaborClassDesc = '' |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
// 人员等级 |
||||
|
laborClassBlur (tagNo) { |
||||
|
if (this.modalData.laborClassNo != null && this.modalData.laborClassNo !== '') { |
||||
|
let tempData = { |
||||
|
tagno: tagNo, |
||||
|
conditionSql: " and class_no = '" + this.modalData.laborClassNo + "'" + " and site = '" + this.modalData.site + "'" + " and bu_no = '" + this.modalData.buNo + "'" |
||||
|
} |
||||
|
verifyData(tempData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
if (data.baseListData.length > 0) { |
||||
|
this.modalData.laborClassNo = data.baseListData[0].class_no |
||||
|
this.modalData.laborClassDesc = data.baseListData[0].class_desc |
||||
|
} else { |
||||
|
this.$message.warning('该人员等级不存在!') |
||||
|
this.modalData.laborClassDesc = '' |
||||
|
} |
||||
|
} else { |
||||
|
this.$message.warning(data.msg) |
||||
|
this.modalData.laborClassDesc = '' |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
// 动态列开始 获取 用户保存的 格式列 |
||||
|
async getTableUserColumn(tableId, columnId) { |
||||
|
let queryTableUser = { |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
tableId: tableId, |
||||
|
status: true, |
||||
|
languageCode: this.$i18n.locale |
||||
|
} |
||||
|
await getTableUserListLanguage(queryTableUser).then(({data}) => { |
||||
|
if (data.rows.length > 0) { |
||||
|
switch (columnId) { |
||||
|
case 1: |
||||
|
this.columnList = data.rows |
||||
|
break; |
||||
|
} |
||||
|
} else { |
||||
|
this.getColumnList(tableId, columnId) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 获取 tableDefault 列 |
||||
|
async getColumnList (tableId, columnId) { |
||||
|
let queryTable= { |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
tableId: tableId, |
||||
|
languageCode: this.$i18n.locale |
||||
|
} |
||||
|
await getTableDefaultListLanguage(queryTable).then(({data}) => { |
||||
|
if (!data.rows.length === 0) { |
||||
|
switch (columnId) { |
||||
|
case 1: |
||||
|
this.columnList = data.rows |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
//获取按钮的权限数据 |
||||
|
getButtonAuthData () { |
||||
|
let searchFlag = this.isAuth(this.menuId+":search") |
||||
|
let saveFlag = this.isAuth(this.menuId+":save") |
||||
|
let updateFlag = this.isAuth(this.menuId+":update") |
||||
|
let deleteFlag = this.isAuth(this.menuId+":delete") |
||||
|
//处理页面的权限数据 |
||||
|
this.authSearch = !searchFlag |
||||
|
this.authSave = !saveFlag |
||||
|
this.authUpdate = !updateFlag |
||||
|
this.authDelete = !deleteFlag |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="scss"> |
||||
|
/deep/ .customer-tab .el-tabs__content { |
||||
|
padding: 0px !important; |
||||
|
height: 459px; |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue