修改bug
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-06 15:15:30
|
||||
* @LastEditTime: 2024-02-18 14:07:08
|
||||
* @LastEditTime: 2024-02-28 09:58:34
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -15,35 +15,11 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="班组" prop="teamId">
|
||||
<el-select v-model="dataForm.teamId" placeholder="请选择班组">
|
||||
<el-option v-for="dict in teamList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="数量" prop="num">
|
||||
<el-input v-model="dataForm.num" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产线" prop="lineId">
|
||||
<el-select v-model="dataForm.lineId" placeholder="请选择产线">
|
||||
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="报废原因" prop="detId">
|
||||
<el-select v-model="dataForm.detId" placeholder="请选择报废原因">
|
||||
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="报废时间" prop="logTime">
|
||||
<el-date-picker v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@@ -54,12 +30,28 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="来源" prop="source">
|
||||
<el-select v-model="dataForm.source" placeholder="请选择来源">
|
||||
<el-option v-for="dict in sourceList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
<el-form-item label="产线" prop="lineId">
|
||||
<el-select v-model="dataForm.lineId" placeholder="请选择产线" @change="getWorksectionById">
|
||||
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工段" prop="sectionId">
|
||||
<el-select v-model="dataForm.sectionId" placeholder="请选择工段">
|
||||
<el-option v-for="dict in sectionList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="报废原因" prop="detId">
|
||||
<el-select v-model="dataForm.detId" placeholder="请选择报废原因" multiple>
|
||||
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="请输入描述" />
|
||||
@@ -76,7 +68,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../../core/mixins/basic-add';
|
||||
import basicAdd from './basic-add';
|
||||
import {
|
||||
createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList,
|
||||
getTeamList, getDetList,getLineList } from "@/api/base/qualityScrapLog";
|
||||
@@ -99,6 +91,7 @@ export default {
|
||||
workOrderList: [],
|
||||
detList:[],
|
||||
teamList: [],
|
||||
sectionList:[],
|
||||
sourceList: [
|
||||
{
|
||||
id: 1,
|
||||
@@ -117,6 +110,7 @@ export default {
|
||||
workOrderId: null,
|
||||
teamId: undefined,
|
||||
num: undefined,
|
||||
sectionId:undefined,
|
||||
lineId:undefined,
|
||||
description:undefined,
|
||||
// description: undefined,
|
||||
@@ -137,6 +131,7 @@ export default {
|
||||
this.getDict()
|
||||
console.log('我看看', this.dataForm)
|
||||
this.getCurrentTime()
|
||||
this.getWorksectionById()
|
||||
},
|
||||
methods: {
|
||||
getCurrentTime() {
|
||||
@@ -197,7 +192,43 @@ export default {
|
||||
// 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,
|
||||
};
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
// setMaterialCode() {
|
||||
// const chooseM = this.materialList.filter(item => {
|
||||
// return item.id === this.dataForm.materialId
|
||||
|
||||
Reference in New Issue
Block a user