Merge pull request 'projects/mesxc-zhp' (#215) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #215
This commit is contained in:
commit
2fe3aebe89
@ -1,72 +1,79 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-10-17 16:50:19
|
||||
* @LastEditTime: 2023-12-01 16:48:53
|
||||
* @LastEditTime: 2024-02-28 10:07:29
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%" show-close="true">
|
||||
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%"
|
||||
show-close="true">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
<!--
|
||||
<!--
|
||||
<div class="content">
|
||||
<div class="visual-part"> -->
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
|
||||
@keyup.enter.native="dataFormSubmit">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="包装流水号" prop="packagingCode">
|
||||
<el-input v-model="dataForm.packagingCode" clearable placeholder="请输入包装流水号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="内容" prop="content">
|
||||
<el-input v-model="dataForm.content" clearable placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属工单" prop="workOrderId">
|
||||
<el-select v-model="dataForm.workOrderId" style="width: 100%;" placeholder="请选择所属工单" clearable>
|
||||
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户" prop="customerId">
|
||||
<el-select v-model="dataForm.customerId" style="width: 100%;" placeholder="请选择客户" clearable>
|
||||
<el-option v-for="dict in customerList" :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="12">
|
||||
<el-form-item label="标签模板" prop="modelId">
|
||||
<el-select v-model="dataForm.modelId" style="width: 100%;" placeholder="请选择标签模板" clearable>
|
||||
<el-option v-for="dict in modelList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="100px"
|
||||
@keyup.enter.native="dataFormSubmit">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="包装流水号" prop="packagingCode">
|
||||
<el-input v-model="dataForm.packagingCode" clearable placeholder="请输入包装流水号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="内容" prop="content">
|
||||
<el-input v-model="dataForm.content" clearable placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属工单" prop="workOrderId">
|
||||
<el-select v-model="dataForm.workOrderId" style="width: 100%;" placeholder="请选择所属工单" clearable>
|
||||
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户" prop="customerId">
|
||||
<el-select v-model="dataForm.customerId" style="width: 100%;" placeholder="请选择客户" clearable>
|
||||
<el-option v-for="dict in customerList" :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="12">
|
||||
<el-form-item label="包装条码" prop="packagingBarCode">
|
||||
<el-input v-model="dataForm.packagingBarCode" clearable placeholder="请输入包装条码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="标签模板" prop="modelId">
|
||||
<el-select v-model="dataForm.modelId" style="width: 100%;" placeholder="请选择标签模板" clearable>
|
||||
<el-option v-for="dict in modelList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="单位平方数" prop="area">
|
||||
<el-input v-model="dataForm.area" placeholder="请输入单位平方数" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="20">
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="完成单位产品用时" prop="processTime">
|
||||
<el-input v-model="dataForm.processTime" placeholder="请输入完成单位产品用时" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</el-form>
|
||||
</el-form>
|
||||
|
||||
<!-- <small-title
|
||||
<!-- <small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
产品属性列表
|
||||
@ -96,7 +103,7 @@
|
||||
:page-sizes="[5, 10, 15]"
|
||||
@pagination="getList" />
|
||||
</div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- <div style="position: absolute; bottom: 24px; right: 24px">
|
||||
@ -186,6 +193,7 @@ export default {
|
||||
workOrderId: null, // 单位产品用时 (s)
|
||||
customerId: '', // 规格
|
||||
content: '', // 单位id
|
||||
packagingBarCode: null
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 14:55:51
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-24 09:13:50
|
||||
* @LastEditTime: 2024-02-28 10:38:34
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -55,7 +55,11 @@ const tableProps = [
|
||||
{
|
||||
prop: 'packagingCode',
|
||||
label: '包装流水号'
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: 'packagingBarCode',
|
||||
label: '包装条码'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderName',
|
||||
label: '所属工单'
|
||||
|
@ -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
|
||||
|
106
src/views/quality/base/qualityScrapLog/basic-add.js
Normal file
106
src/views/quality/base/qualityScrapLog/basic-add.js
Normal file
@ -0,0 +1,106 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2024-02-28 09:51:25
|
||||
* @LastEditTime: 2024-02-28 10:05:00
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
data() {
|
||||
/* eslint-disable */
|
||||
return {
|
||||
urlOptions: {
|
||||
createURL: '',
|
||||
updateURL: '',
|
||||
infoURL: '',
|
||||
codeURL: '',
|
||||
getOption: false,
|
||||
isGetCode: false,
|
||||
optionArrUrl: [],
|
||||
optionArr: {}
|
||||
},
|
||||
visible: false,
|
||||
setData: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
activated() {
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || "";
|
||||
this.visible = true;
|
||||
if (this.urlOptions.getOption) {
|
||||
this.getArr()
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
console.log(response)
|
||||
this.dataForm = response.data
|
||||
this.dataForm.detId = response.data.detIdList
|
||||
this.dataForm.logTime = new Date(response.data.createTime)
|
||||
|
||||
// if (this.setData) {
|
||||
// this.setDataForm()
|
||||
// }
|
||||
});
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
this.getCode()
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getCode() {
|
||||
this.urlOptions.codeURL()
|
||||
.then(({ data: res }) => {
|
||||
this.dataForm.code = res;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
getArr() {
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
}
|
||||
this.urlOptions.optionArrUrl.forEach((item, index) => {
|
||||
item(params).then(({ data: res }) => {
|
||||
this.$set(this.urlOptions.optionArr, `arr${index}`, res.list)
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
// 修改的提交
|
||||
let str = this.dataForm.detId.join(',')
|
||||
this.dataForm.detId = str
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
});
|
||||
},
|
||||
formClear() {
|
||||
this.$refs.dataForm.resetFields()
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-06 15:15:30
|
||||
* @LastEditTime: 2023-12-01 10:58:25
|
||||
* @LastEditTime: 2024-02-28 10:13:10
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -15,43 +15,19 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工单号" prop="workOrderId">
|
||||
<el-select v-model="dataForm.workOrderId" placeholder="请选择工单号" disabled>
|
||||
<el-select disabled v-model="dataForm.workOrderId" placeholder="请选择工单号">
|
||||
<el-option v-for="dict in workOrderList" :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="teamId">
|
||||
<el-select v-model="dataForm.teamId" placeholder="请选择班组" disabled>
|
||||
<el-option v-for="dict in teamList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
<el-form-item label="数量" prop="num">
|
||||
<el-input disabled v-model="dataForm.num" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="数量" prop="sum">
|
||||
<el-input v-model="dataForm.sum" placeholder="请输入数量" disabled />
|
||||
</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="请选择产线" disabled>
|
||||
<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="请选择报废原因" disabled>
|
||||
<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" disabled
|
||||
<el-date-picker disabled v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@ -59,12 +35,28 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="来源" prop="source">
|
||||
<el-select v-model="dataForm.source" placeholder="请选择来源" disabled>
|
||||
<el-option v-for="dict in sourceList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
<el-form-item label="产线" prop="lineId">
|
||||
<el-select disabled 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="请选择工段" disabled>
|
||||
<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 disabled>
|
||||
<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="请输入描述" disabled />
|
||||
@ -147,6 +139,7 @@ export default {
|
||||
this.getDict()
|
||||
console.log('我看看', this.dataForm)
|
||||
this.getCurrentTime()
|
||||
// this.getWorksectionById()
|
||||
},
|
||||
methods: {
|
||||
// init() {
|
||||
@ -198,6 +191,7 @@ export default {
|
||||
// console.log(this.formConfig[0].selectOptions);
|
||||
// this.listQuery.total = response.data.total;
|
||||
})
|
||||
|
||||
getTeamList().then((res) => {
|
||||
console.log(res);
|
||||
// console.log(response);
|
||||
@ -207,16 +201,46 @@ export default {
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
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,
|
||||
};
|
||||
});
|
||||
})
|
||||
// if (code == 0) {
|
||||
|
||||
// }
|
||||
// console.log(this.formConfig[0].selectOptions);
|
||||
// this.listQuery.total = response.data.total;
|
||||
})
|
||||
},
|
||||
setMaterialCode() {
|
||||
const chooseM = this.materialList.filter(item => {
|
||||
return item.id === this.dataForm.materialId
|
||||
})
|
||||
this.dataForm.materialCode = chooseM[0].code
|
||||
}
|
||||
},
|
||||
async getWorksectionById(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,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -30,32 +30,41 @@ import {
|
||||
} from '@/api/base/qualityScrapLog';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '添加时间',
|
||||
filter: parseTime
|
||||
// {
|
||||
// prop: 'createTime',
|
||||
// label: '添加时间',
|
||||
// filter: parseTime
|
||||
// },
|
||||
{
|
||||
prop: 'logTime',
|
||||
label: '报废时间',
|
||||
filter: parseTime
|
||||
},
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '产线名称'
|
||||
},
|
||||
{
|
||||
prop: 'sectionName',
|
||||
label: '工段'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderName',
|
||||
label: '工单'
|
||||
label: '工单名称'
|
||||
},
|
||||
{
|
||||
prop: 'teamName',
|
||||
label: '班组'
|
||||
prop: 'num',
|
||||
label: '数量'
|
||||
},
|
||||
{
|
||||
prop: 'detContent',
|
||||
label: '报废原因'
|
||||
},
|
||||
{
|
||||
prop: 'logTime',
|
||||
label: '报废时间',
|
||||
filter: parseTime
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
label: '数量'
|
||||
},
|
||||
{
|
||||
prop: 'source',
|
||||
label: '来源',
|
||||
filter: (val) => val == 1 ? '平板端' : '网页端'
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
|
@ -286,6 +286,7 @@ export default {
|
||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
||||
// }
|
||||
this.getList()
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
/** 获取搜索栏的产线列表 */
|
||||
@ -320,7 +321,7 @@ export default {
|
||||
// },
|
||||
getList() {
|
||||
this.getDataList()
|
||||
this.getDict()
|
||||
// this.getDict()
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getDataList() {
|
||||
@ -330,7 +331,7 @@ export default {
|
||||
const {
|
||||
data: { data, otherList, otherMap, nameData },
|
||||
} = await getStatisticalDataPage(this.queryParams)
|
||||
console.log(this.queryParams);
|
||||
// console.log(this.queryParams);
|
||||
this.dynamicProps = this.filterNameData(nameData)
|
||||
this.list = this.filterData(data);
|
||||
},
|
||||
@ -373,7 +374,7 @@ export default {
|
||||
|
||||
this.getList()
|
||||
}
|
||||
console.log(val);
|
||||
// console.log(val);
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
// handleQuery() {
|
||||
|
Loading…
Reference in New Issue
Block a user