|
|
|
@ -1,58 +1,47 @@ |
|
|
|
<template> |
|
|
|
<div class="mod-config"> |
|
|
|
|
|
|
|
<!-- <!– 收藏 –>--> |
|
|
|
<!-- <div>--> |
|
|
|
<!-- <span @click="favoriteFunction()">--> |
|
|
|
<!-- <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>--> |
|
|
|
<!-- </span>--> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<!-- 条件查询 --> |
|
|
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()"> |
|
|
|
<el-form-item :label="'工厂编号'"> |
|
|
|
<el-input v-model="searchData.site" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'BU'"> |
|
|
|
<el-input v-model="searchData.buNo" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'加工中心编码'"> |
|
|
|
<el-input v-model="searchData.workCenterNo" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'加工中心名称'"> |
|
|
|
<el-input v-model="searchData.workCenterDesc" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="状态"> |
|
|
|
<el-select v-model="searchData.active" placeholder="请选择"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option label="启用" value="Y"></el-option> |
|
|
|
<el-option label="停用" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button v-if="!authSearch" type="primary" @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> |
|
|
|
<div style="width: 1000px"> |
|
|
|
<el-form label-position="top" :model="searchData" @keyup.enter.native="getDataList()"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="BU"> |
|
|
|
<bu-select v-model="searchData.buId"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
</bu-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="加工中心编码"> |
|
|
|
<el-input v-model="searchData.workCenterNo" clearable></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="加工中心名称"> |
|
|
|
<el-input v-model="searchData.workCenterDesc" clearable></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="状态"> |
|
|
|
<el-select v-model="searchData.active" style="width: 100%;" placeholder="请选择"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option label="启用" value="Y"></el-option> |
|
|
|
<el-option label="停用" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 展示列表 --> |
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
height="35vh" |
|
|
|
:data="dataList" |
|
|
|
@row-click="changeData" |
|
|
|
:row-style="rowStyle" |
|
|
|
@ -66,24 +55,13 @@ |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:width="item.columnWidth" |
|
|
|
: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">--> |
|
|
|
<!-- <a type="text" size="small" @click="updateModal1(scope.row)">修改</a>--> |
|
|
|
<!-- <a type="text" size="small" @click="deleteModal(scope.row)">删除</a>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<el-pagination |
|
|
|
@ -96,61 +74,93 @@ |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
<el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick"> |
|
|
|
<el-tabs style="height: 45vh" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick"> |
|
|
|
<el-tab-pane label="详情" name="detail"> |
|
|
|
<el-form :inline="true" label-position="top" :model="dataList1"> |
|
|
|
<el-row style="margin-top: 15px"> |
|
|
|
<el-form-item :label="'加工中心编码'"> |
|
|
|
<el-input v-model="dataList1.workshopId" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'加工中心名称'"> |
|
|
|
<el-input v-model="dataList1.workCenterDesc" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'BU'"> |
|
|
|
<el-input v-model="dataList1.buNo" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'工厂编码'"> |
|
|
|
<el-input v-model="dataList1.site" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form label-position="top" :model="currentRow"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="工厂编码"> |
|
|
|
<el-input v-model="currentRow.site" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="BU"> |
|
|
|
<el-input v-model="currentRow.buDesc" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row style="margin-top: 15px"> |
|
|
|
<el-form-item :label="'加工中心类型'"> |
|
|
|
<el-input v-model="dataList1.workCenterType" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'加工中心组编码'"> |
|
|
|
<el-input v-model="dataList1.prolineNo" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'平均产能'"> |
|
|
|
<el-input v-model="dataList1.averageCapacity" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'产能类型'"> |
|
|
|
<el-input v-model="dataList1.capacityType" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item :label="'加工中心编码'"> |
|
|
|
<el-input v-model="currentRow.workshopId" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="'加工中心名称'"> |
|
|
|
<el-input v-model="currentRow.workCenterDesc" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row style="margin-top: 15px"> |
|
|
|
<el-form-item :label="'备注'"> |
|
|
|
<el-input v-model="dataList1.remark" readonly style="width: 1235px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item :label="'加工中心类型'"> |
|
|
|
<el-input v-model="currentRow.workCenterType" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="机台数量"> |
|
|
|
<el-input v-model="currentRow.resourceCount" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row style="margin-top: 15px"> |
|
|
|
<el-form-item :label="'录入人'"> |
|
|
|
<el-input v-model="dataList1.createdBy" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'录入时间'"> |
|
|
|
<el-input v-model="dataList1.createdDate" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'最近修改人'"> |
|
|
|
<el-input v-model="dataList1.updateBy" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'最近修改时间'"> |
|
|
|
<el-input v-model="dataList1.updateDate" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item :label="'加工中心组编码'"> |
|
|
|
<el-input v-model="currentRow.prolineNo" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item :label="'平均产能'"> |
|
|
|
<el-input v-model="currentRow.averageCapacity" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item :label="'产能类型'"> |
|
|
|
<el-input v-model="currentRow.capacityType" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item :label="'录入时间'"> |
|
|
|
<el-input v-model="currentRow.createdDate" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item :label="'录入人'"> |
|
|
|
<el-input v-model="currentRow.createdBy" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item :label="'最近修改时间'"> |
|
|
|
<el-input v-model="currentRow.updateDate" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item :label="'最近修改人'"> |
|
|
|
<el-input v-model="currentRow.updateBy" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item :label="'备注'" class="auto"> |
|
|
|
<el-input v-model="currentRow.remark" :rows="3" type="textarea"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
@ -221,50 +231,60 @@ |
|
|
|
|
|
|
|
<!-- 新增和修改 --> |
|
|
|
<el-dialog title="成本" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="500px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData1" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
|
|
<el-form-item label="加工中心编码:" prop="workCenterNo" > |
|
|
|
<el-input v-model="modalData1.workCenterNo" :disabled="!isNew" style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="单位成本:" prop="unitCost" :rules="rules.unitCost" > |
|
|
|
<el-input v-model="modalData1.unitCost" class="inlineNumber numInput" @input="validateInput" style="width: 221px;text-align:end"></el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="单位制造费用成本:" prop="overheadCost" :rules="rules.overheadCost"> |
|
|
|
<el-input v-model="modalData1.overheadCost" class="inlineNumber numInput" @input="validateInput" style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="单位人工成本:" prop="laborCost" :rules="rules.laborCost"> |
|
|
|
<el-input v-model="modalData1.laborCost" class="inlineNumber numInput" @input="validateInput" style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :label="'启用日期:'" :rules="rules.beginDate"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 221px" |
|
|
|
v-model="modalData1.beginDate" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :label="'结束日期:'" > |
|
|
|
<el-date-picker |
|
|
|
style="width: 221px" |
|
|
|
v-model="modalData1.endDate" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="备注:" prop="remake" > |
|
|
|
<el-input v-model="modalData.remake" style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form label-position="top" :model="modalData1" :rules="rules"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="加工中心编码" prop="workCenterNo" > |
|
|
|
<el-input v-model="modalData1.workCenterNo" :disabled="!isNew"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="单位成本" prop="unitCost"> |
|
|
|
<el-input-number v-model="modalData1.unitCost" style="width: 100%" :controls="false" :step="0"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="单位制造费用成本" prop="overheadCost"> |
|
|
|
<el-input-number v-model="modalData1.overheadCost" style="width: 100%" :controls="false" :step="0"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="单位人工成本" prop="laborCost"> |
|
|
|
<el-input-number v-model="modalData1.laborCost" style="width: 100%" :controls="false" :step="0"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item :label="'启用日期'"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 100%" |
|
|
|
v-model="modalData1.beginDate" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item :label="'结束日期'" > |
|
|
|
<el-date-picker |
|
|
|
style="width: 100%" |
|
|
|
v-model="modalData1.endDate" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="备注" class="auto" > |
|
|
|
<el-input v-model="modalData.remark" :rows="3" type="textarea"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-footer style="height:30px;line-height:30px;text-align:center"> |
|
|
|
<el-button type="primary" @click="saveData()">保存</el-button> |
|
|
|
<el-button type="primary" @click="modalFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
@ -315,12 +335,14 @@ import { |
|
|
|
queryResourceInfo,//机台查询 |
|
|
|
} from "@/api/fanucGroup/fanuc.js" |
|
|
|
import {getSiteAndBuByUserName} from "@/api/eam/eam.js" |
|
|
|
import BuSelect from "../../../components/selector/select/BuSelect.vue"; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: {BuSelect}, |
|
|
|
data () { |
|
|
|
return { |
|
|
|
activeName: 'detail', |
|
|
|
currentRow: '', |
|
|
|
currentRow: {}, |
|
|
|
headerData: '', |
|
|
|
currentRow2: '', |
|
|
|
isNew: false, |
|
|
|
@ -337,6 +359,7 @@ export default { |
|
|
|
searchData: { |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
buId: '', |
|
|
|
workshopId: '', |
|
|
|
workCenterNo: '', |
|
|
|
workCenterDesc: '', |
|
|
|
@ -436,11 +459,11 @@ export default { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 501002, |
|
|
|
serialNumber: '501002TableBuNo', |
|
|
|
serialNumber: '501002TableBuDesc', |
|
|
|
tableId: "501002Table", |
|
|
|
tableName: "BU", |
|
|
|
columnWidth: 130, |
|
|
|
columnProp: 'buNo', |
|
|
|
columnProp: 'buDesc', |
|
|
|
headerAlign: 'center', |
|
|
|
align: "left", |
|
|
|
columnLabel: 'Bu', |
|
|
|
@ -1228,13 +1251,13 @@ export default { |
|
|
|
|
|
|
|
changeData (row) { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)); |
|
|
|
this.headerData = row; |
|
|
|
// this.headerData = row; |
|
|
|
|
|
|
|
if (this.activeName == 'detail') { |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
} else if (this.activeName == 'cost') { |
|
|
|
if (this.activeName === 'detail') { |
|
|
|
// this.refreshCurrentTabTable() |
|
|
|
} else if (this.activeName === 'cost') { |
|
|
|
this.refreshCurrentTabTable2() |
|
|
|
} else if (this.activeName == 'resource') { |
|
|
|
} else if (this.activeName === 'resource') { |
|
|
|
this.refreshCurrentTabTable3() |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -1249,9 +1272,8 @@ export default { |
|
|
|
|
|
|
|
findFanuc(this.currentRow).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.dataList1 = data.rows[0] |
|
|
|
console.log("1111111:" + this.dataList1.workshopId) |
|
|
|
} else { |
|
|
|
this.dataList1 = []; |
|
|
|
} |
|
|
|
@ -1629,4 +1651,9 @@ export default { |
|
|
|
-moz-appearance: textfield; |
|
|
|
padding-right: 5px !important; |
|
|
|
} |
|
|
|
|
|
|
|
.auto /deep/ .el-form-item__content{ |
|
|
|
height: auto; |
|
|
|
line-height: 1.5; |
|
|
|
} |
|
|
|
</style> |