2024-04-17 16:17:07 +08:00
|
|
|
<!--
|
|
|
|
* @Author: zhp
|
2024-04-28 11:04:33 +08:00
|
|
|
* @Date: 2024-04-17 16:31:51
|
|
|
|
* @LastEditTime: 2024-04-17 17:01:14
|
2024-04-17 16:17:07 +08:00
|
|
|
* @LastEditors: zhp
|
|
|
|
* @Description:
|
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<el-drawer class="drawer" :visible.sync="visible" size="50%">
|
|
|
|
<small-title slot="title" :no-padding="true">
|
2024-04-28 11:04:33 +08:00
|
|
|
{{ '新增' }}
|
2024-04-17 16:17:07 +08:00
|
|
|
</small-title>
|
|
|
|
<div class="detailBox">
|
2024-04-28 11:04:33 +08:00
|
|
|
<el-form ref="form" :model="dataForm" label-width="80px" label-position="top">
|
|
|
|
<el-row :gutter="24" style="padding: 0 32px;">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="工厂名称" prop="factoryId">
|
|
|
|
<el-select v-model="dataForm.factoryId" placeholder="请选择工厂名称" multiple="true" clearable>
|
|
|
|
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="工厂名称" prop="factoryId">
|
|
|
|
<el-select v-model="dataForm.factoryId" placeholder="请选择工厂名称" multiple="true" clearable>
|
|
|
|
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="工厂名称" prop="factoryId">
|
|
|
|
<el-select v-model="dataForm.factoryId" placeholder="请选择工厂名称" multiple="true" clearable>
|
|
|
|
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-divider></el-divider>
|
|
|
|
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
|
|
|
|
{{ '芯片' }}
|
|
|
|
</small-title>
|
|
|
|
<el-row :gutter="24" style="padding: 0 32px;">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="芯片产量" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入芯片产量"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="芯片良率" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入芯片良率"></el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="芯片BOM" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入芯片BOM"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="芯片总功率" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入芯片总功率"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row :gutter="24" style="padding: 0 32px;">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="FTO投入量" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入FTO投入量"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="CSS稼动率" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入CSS稼动率"></el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="芯片段OEE" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入芯片段OEE"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="芯片平均功率" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入芯片平均功率"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row :gutter="24" style="padding: 0 32px;">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="芯片人均产量" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入芯片人均产量"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="芯片人均产量" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入芯片人均产量"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-divider></el-divider>
|
|
|
|
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
|
|
|
|
{{ '标准组件' }}
|
|
|
|
</small-title>
|
|
|
|
<el-row :gutter="24" style="padding: 0 32px;">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="封装BOM" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入封装BOM"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="封装线OEE" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入封装线OEE"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="标准组件良率" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入标准组件良率"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="标准组件良率" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入标准组件良率"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row :gutter="24" style="padding: 0 32px;">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="标准组件总功率" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入标准组件总功率"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="标准组件总功率" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入标准组件总功率"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="标准组件人均产量" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入标准组件人均产量"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="标准组件平均功率" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入标准组件平均功率"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-divider></el-divider>
|
|
|
|
|
|
|
|
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
|
|
|
|
{{ 'BIPV产品' }}
|
|
|
|
</small-title>
|
|
|
|
<el-row :gutter="24" style="padding: 0 32px;">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="产品产量" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入产品产量"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="人均产量" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入人均产量"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="芯片使用量" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入芯片使用量"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="芯片利用率" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入芯片利用率"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row :gutter="24" style="padding: 0 32px;">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="内部材料成本" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入内部材料成本"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="OEM及委外材料成本" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入OEM及委外材料成本"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="综合材料成本" prop="factoryId">
|
|
|
|
<el-input v-model="dataForm.factoryId" placeholder="请输入综合材料成本"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
<div class="footer">
|
|
|
|
<el-button @click="cancelForm">取 消</el-button>
|
|
|
|
<el-button type="primary" @click="handleClose()">确 定</el-button>
|
2024-04-17 16:17:07 +08:00
|
|
|
</div>
|
|
|
|
</el-drawer>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
// import basicAdd from './basic-add';
|
|
|
|
// import {
|
|
|
|
// createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList,
|
|
|
|
// getTeamList, getDetList, getLineList
|
|
|
|
// } from "@/api/base/qualityScrapLog";
|
|
|
|
// import { getList, } from "@/api/base/qualityScrapType";
|
|
|
|
import SmallTitle from './SmallTitle';
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
SmallTitle,
|
|
|
|
},
|
|
|
|
// mixins: [basicAdd],
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
urlOptions: {
|
|
|
|
isGetCode: false,
|
|
|
|
// codeURL: getCode,
|
|
|
|
// createURL: createQualityScrapLog,
|
|
|
|
// updateURL: updateQualityScrapLog,
|
|
|
|
// infoURL: getQualityScrapLog,
|
|
|
|
},
|
|
|
|
lineList: [],
|
|
|
|
typeList: [],
|
|
|
|
workOrderList: [],
|
|
|
|
detList: [],
|
|
|
|
teamList: [],
|
|
|
|
sourceList: [
|
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
name: '手动',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 2,
|
|
|
|
name: '自动',
|
|
|
|
}
|
|
|
|
],
|
2024-04-28 11:04:33 +08:00
|
|
|
factoryList:[],
|
2024-04-17 16:17:07 +08:00
|
|
|
sectionList: [],
|
|
|
|
visible: false,
|
|
|
|
dataForm: {
|
|
|
|
id: undefined,
|
|
|
|
logTime: undefined,
|
|
|
|
source: 1,
|
|
|
|
detId: undefined,
|
|
|
|
workOrderId: null,
|
|
|
|
teamId: undefined,
|
|
|
|
num: undefined,
|
|
|
|
lineId: undefined,
|
|
|
|
description: undefined,
|
|
|
|
// description: undefined,
|
|
|
|
remark: undefined,
|
|
|
|
},
|
|
|
|
// materialList: [],
|
|
|
|
dataRule: {
|
|
|
|
// materialId: [{ required: true, message: "", trigger: "blur" }],
|
|
|
|
workOrderId: [{ required: true, message: "工单号不能为空", trigger: "change" }],
|
|
|
|
num: [{ required: true, message: "数量不能为空", trigger: "blur" }],
|
|
|
|
detId: [{ required: true, message: "报废原因不能为空", trigger: "change" }],
|
|
|
|
|
|
|
|
logTime: [{ required: true, message: "报废时间不能为空", trigger: "change" }],
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.getDict()
|
|
|
|
console.log('我看看', this.dataForm)
|
|
|
|
// this.getCurrentTime()
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
init() {
|
|
|
|
this.visible = true
|
|
|
|
},
|
|
|
|
// getCurrentTime() {
|
|
|
|
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
|
|
|
|
// this.dataForm.logTime = new Date()
|
|
|
|
// // this.dataForm.logTime = year + "-" + month + "-" + day;
|
|
|
|
// console.log(this.dataForm.logTime);
|
|
|
|
// },
|
|
|
|
async getDict() {
|
|
|
|
// // 物料列表
|
|
|
|
// const res = await getList()
|
|
|
|
// this.typeList = res.data
|
|
|
|
// getWorkOrderList().then((res) => {
|
|
|
|
// console.log(res);
|
|
|
|
// // console.log(response);
|
|
|
|
// this.workOrderList = res.data.map((item) => {
|
|
|
|
// return {
|
|
|
|
// name: item.name,
|
|
|
|
// id: item.id
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// // console.log(this.formConfig[0].selectOptions);
|
|
|
|
// // this.listQuery.total = response.data.total;
|
|
|
|
// })
|
|
|
|
// getLineList().then((res) => {
|
|
|
|
// console.log(res);
|
|
|
|
// // console.log(response);
|
|
|
|
// this.lineList = res.data.map((item) => {
|
|
|
|
// return {
|
|
|
|
// name: item.name,
|
|
|
|
// id: item.id
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// // console.log(this.formConfig[0].selectOptions);
|
|
|
|
// // this.listQuery.total = response.data.total;
|
|
|
|
// })
|
|
|
|
// getDetList().then((res) => {
|
|
|
|
// console.log(res);
|
|
|
|
// // console.log(response);
|
|
|
|
// this.detList = res.data.map((item) => {
|
|
|
|
// return {
|
|
|
|
// name: item.content,
|
|
|
|
// id: item.id
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// // console.log(this.formConfig[0].selectOptions);
|
|
|
|
// // this.listQuery.total = response.data.total;
|
|
|
|
// })
|
|
|
|
// getTeamList().then((res) => {
|
|
|
|
// console.log(res);
|
|
|
|
// // console.log(response);
|
|
|
|
// this.teamList = res.data.map((item) => {
|
|
|
|
// return {
|
|
|
|
// name: item.name,
|
|
|
|
// id: item.id
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// // console.log(this.formConfig[0].selectOptions);
|
|
|
|
// // this.listQuery.total = response.data.total;
|
|
|
|
// })
|
|
|
|
// },
|
|
|
|
// async getWorksectionById(lineId) {
|
|
|
|
// if (lineId) {
|
|
|
|
// const { code, data } = await this.$axios({
|
|
|
|
// url: '/base/core-workshop-section/listByParentId',
|
|
|
|
// method: 'get',
|
|
|
|
// params: {
|
|
|
|
// id: lineId,
|
|
|
|
// },
|
|
|
|
// });
|
|
|
|
// if (code == 0) {
|
|
|
|
// console.log(data)
|
|
|
|
// this.sectionList = data.map((item) => {
|
|
|
|
// return {
|
|
|
|
// name: item.name,
|
|
|
|
// id: item.id,
|
|
|
|
// };
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
// this.$axios({
|
|
|
|
// url: '/base/core-workshop-section/listAll',
|
|
|
|
// method: 'get',
|
|
|
|
// // params: {
|
|
|
|
// // id: lineId,
|
|
|
|
// // },
|
|
|
|
// }).then((res) => {
|
|
|
|
// // console.log(data)
|
|
|
|
// this.sectionList = res.data.map((item) => {
|
|
|
|
// return {
|
|
|
|
// name: item.name,
|
|
|
|
// id: item.id,
|
|
|
|
// };
|
|
|
|
// });
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style scoped>
|
2024-04-28 11:04:33 +08:00
|
|
|
.footer {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 1%;
|
|
|
|
right: 2%;
|
|
|
|
}
|
|
|
|
.drawer-footer {
|
|
|
|
width: 100%;
|
|
|
|
margin-top: 50px;
|
|
|
|
border-top: 1px solid #e8e8e8;
|
|
|
|
padding: 10px 50px;
|
|
|
|
text-align: left;
|
|
|
|
background: #fff;
|
|
|
|
}
|
|
|
|
.el-divider--horizontal{
|
|
|
|
margin: 0;
|
|
|
|
}
|
2024-04-17 16:17:07 +08:00
|
|
|
.drawer >>> .el-drawer {
|
|
|
|
border-radius: 8px 0 0 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer >>> .el-form-item__label {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer >>> .el-drawer__header {
|
|
|
|
margin: 0;
|
|
|
|
padding: 32px 32px 24px;
|
|
|
|
border-bottom: 1px solid #dcdfe6;
|
|
|
|
margin-bottom: 30px;
|
|
|
|
}
|
|
|
|
.detailBox p {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0 32px;
|
|
|
|
}
|
|
|
|
.detailBox .title {
|
|
|
|
/* width: 56px; */
|
|
|
|
/* height: 14px; */
|
|
|
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 14px;
|
|
|
|
color: rgba(0, 0, 0, 0.85);
|
|
|
|
line-height: 16px;
|
|
|
|
text-align: left;
|
|
|
|
font-style: normal;
|
|
|
|
text-transform: none;
|
|
|
|
}
|
|
|
|
.detailBox .text {
|
|
|
|
font-size: 14px;
|
|
|
|
font-weight: 400;
|
|
|
|
color: rgba(102,102,102,0.75);
|
|
|
|
padding-bottom: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|