|
|
@@ -127,16 +127,6 @@
|
|
|
:label-style="labelStyle"
|
|
|
class="descriptions"
|
|
|
>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label"> 权属人 </template>
|
|
|
- <el-form-item label-width="0">
|
|
|
- <el-input
|
|
|
- v-model="zcInfo.workstation.leaderName"
|
|
|
- disabled
|
|
|
- placeholder="请输入内容"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
<template slot="label"> 权属部门 </template>
|
|
|
<el-form-item label-width="0">
|
|
|
@@ -146,12 +136,95 @@
|
|
|
disabled
|
|
|
placeholder="请输入内容"
|
|
|
></el-input>
|
|
|
+ <!-- <DeptSelect
|
|
|
+ v-model="zcInfo.ownershipGroupId"
|
|
|
+ @input="getqsbm"
|
|
|
+ /> -->
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 权属人 </template>
|
|
|
+ <el-form-item label-width="0">
|
|
|
+ <el-input
|
|
|
+ v-model="zcInfo.workstation.leaderName"
|
|
|
+ disabled
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></el-input>
|
|
|
+ <!-- <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="zcInfo.ownershipUserId"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options.ownershipUserId"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select> -->
|
|
|
+ </el-form-item>
|
|
|
+ </el-descriptions-item>
|
|
|
<el-descriptions-item :span="3">
|
|
|
<template slot="label"> 所属厂房 </template>
|
|
|
<el-form-item label-width="0">
|
|
|
+ <!-- <el-select
|
|
|
+ v-model="zcInfo.factoryRoomId"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="change_factoryId"
|
|
|
+ style="width: 24%; margin-right: 1%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in factoryOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.pathName"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ v-model="zcInfo.workshopId"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 24%; margin-right: 1%"
|
|
|
+ @change="change_workshop"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in workshopOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ v-model="zcInfo.productionLineId"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 24%; margin-right: 1%"
|
|
|
+ @change="change_productionLineId"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in productionLineOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ v-model="zcInfo.stationId"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 24%; margin-right: 1%"
|
|
|
+ @change="change_stationId"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in stationOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select> -->
|
|
|
<el-input
|
|
|
style="margin-right: 10px; width: 20%"
|
|
|
v-model="zcInfo.workstation.workshopPlanName"
|
|
|
@@ -386,6 +459,13 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ listWorkshopByParentId,
|
|
|
+ listFactoryLine,
|
|
|
+ getFactoryarea,
|
|
|
+ listByProductionLineId,
|
|
|
+ getByDeviceId
|
|
|
+ } from '@/api/factoryModel';
|
|
|
import DeptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
import WorkshopSelect from '@/components/CommomSelect/workshop-select.vue';
|
|
|
import FactoryAreaSelect from '@/components/CommomSelect/factory-area-select.vue';
|
|
|
@@ -400,6 +480,7 @@
|
|
|
import { getUserPage } from '@/api/system/organization';
|
|
|
import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
|
|
|
import { getByCode } from '@/api/system/dictionary-data';
|
|
|
+ import { data } from 'ele-admin/lib/ele-pro-table';
|
|
|
export default {
|
|
|
components: {
|
|
|
WithView,
|
|
|
@@ -420,6 +501,10 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ factoryOptions: [],
|
|
|
+ workshopOptions: [],
|
|
|
+ productionLineOptions: [],
|
|
|
+ stationOptions: [],
|
|
|
userList: [], // 人员列表
|
|
|
labelStyle: {
|
|
|
'min-width': '100px'
|
|
|
@@ -485,6 +570,7 @@
|
|
|
// postId: ''
|
|
|
// },
|
|
|
options: {
|
|
|
+ ownershipUserId: [], // 权属人
|
|
|
repairUserId: [], // 维护人
|
|
|
supplierId: [], // 供应商
|
|
|
cityDataLabel, // 设备位置
|
|
|
@@ -525,12 +611,79 @@
|
|
|
await this.getDeliveryCycleOptions();
|
|
|
// 获取供应商下拉列表
|
|
|
await this.getSuppliersList();
|
|
|
+ // 获取厂房数据
|
|
|
+ this.getFactoryareaList();
|
|
|
// 初始化数据
|
|
|
setTimeout(() => {
|
|
|
this.initData();
|
|
|
}, 500);
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取工厂数据
|
|
|
+ getFactoryareaList() {
|
|
|
+ getFactoryarea({
|
|
|
+ type: 1,
|
|
|
+ size: 9999,
|
|
|
+ type: 2
|
|
|
+ }).then((res) => {
|
|
|
+ this.factoryOptions = res.list;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ change_factoryId(id) {
|
|
|
+ this.zcInfo.workshopId = '';
|
|
|
+ this.zcInfo.productionLineId = '';
|
|
|
+ this.zcInfo.stationId = '';
|
|
|
+ this.workshopOptions = [];
|
|
|
+ this.productionLineOptions = [];
|
|
|
+ this.stationOptions = [];
|
|
|
+ this.zcInfo.factoryRoomId = id;
|
|
|
+ this.zcInfo.factoryRoomName = this.factoryOptions.filter(
|
|
|
+ (item) => item.id === id
|
|
|
+ )[0].pathName;
|
|
|
+ this.getListWorkshopByParentId(id);
|
|
|
+ },
|
|
|
+ // 获取车间
|
|
|
+ getListWorkshopByParentId(id) {
|
|
|
+ listWorkshopByParentId(id).then((res) => {
|
|
|
+ this.workshopOptions = res;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ change_workshop(id) {
|
|
|
+ this.zcInfo.productionLineId = '';
|
|
|
+ this.zcInfo.stationId = '';
|
|
|
+ this.productionLineOptions = [];
|
|
|
+ this.stationOptions = [];
|
|
|
+ this.zcInfo.workshopName = this.workshopOptions.filter(
|
|
|
+ (item) => item.id === id
|
|
|
+ )[0].name;
|
|
|
+ this.getlistFactoryLineByParentId(id);
|
|
|
+ },
|
|
|
+ // 获取产线
|
|
|
+ getlistFactoryLineByParentId(id) {
|
|
|
+ listFactoryLine([id]).then((res) => {
|
|
|
+ this.productionLineOptions = res;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ change_productionLineId(id) {
|
|
|
+ this.zcInfo.stationId = '';
|
|
|
+ this.stationOptions = [];
|
|
|
+ this.zcInfo.productionLineName = this.productionLineOptions.filter(
|
|
|
+ (item) => item.id === id
|
|
|
+ )[0].name;
|
|
|
+ this.getlistByProductionLineId(id);
|
|
|
+ },
|
|
|
+ // 获取工位
|
|
|
+ getlistByProductionLineId(id) {
|
|
|
+ listByProductionLineId(id).then((res) => {
|
|
|
+ this.stationOptions = res;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ change_stationId(id) {
|
|
|
+ this.$forceUpdate();
|
|
|
+ this.zcInfo.stationName = this.stationOptions.filter(
|
|
|
+ (item) => item.id === id
|
|
|
+ )[0].name;
|
|
|
+ },
|
|
|
usePersonIdChange(val) {
|
|
|
if (this.zcInfo.isPublic > 0 && this.isLock) {
|
|
|
this.zcInfo.chargePersonId = val;
|
|
|
@@ -618,6 +771,20 @@
|
|
|
});
|
|
|
this.userList = res.list;
|
|
|
},
|
|
|
+ // 权属部门
|
|
|
+ async getqsbm() {
|
|
|
+ if (!this.zcInfo.ownershipGroupId) {
|
|
|
+ this.options.ownershipUserId = [];
|
|
|
+ this.zcInfo.ownershipUserId = '';
|
|
|
+ } else {
|
|
|
+ let data = await getUserPage({
|
|
|
+ pageNum: 1,
|
|
|
+ size: 9999,
|
|
|
+ groupId: this.zcInfo.ownershipGroupId
|
|
|
+ });
|
|
|
+ this.options.ownershipUserId = data.list;
|
|
|
+ }
|
|
|
+ },
|
|
|
// 维护部门
|
|
|
async getwhbm() {
|
|
|
if (!this.zcInfo.repairGroupId) return;
|
|
|
@@ -633,6 +800,7 @@
|
|
|
console.log('this.zcInfo---------------------', this.zcInfo);
|
|
|
// 填充使用岗位
|
|
|
this.zcInfo.postId && this.getStaffList(this.zcInfo.postId);
|
|
|
+ // 获取设备绑定信息
|
|
|
this.geMaintainersList();
|
|
|
}
|
|
|
}
|