Compare commits
14 Commits
41ceefc20e
...
23afb0db0d
Author | SHA1 | Date | |
---|---|---|---|
23afb0db0d | |||
14b2a49053 | |||
|
6adac714f0 | ||
|
0349f3cde0 | ||
|
4cafa78908 | ||
61ef172534 | |||
|
19d913a49e | ||
|
70c3fd44d6 | ||
78d6f0bb23 | |||
|
cf51eff0b7 | ||
|
539dddf217 | ||
|
317d01934b | ||
|
cdfe5c9c1b | ||
c1ea5157a5 |
1
.env.dev
1
.env.dev
@ -14,6 +14,7 @@ VUE_APP_TITLE = MES系统
|
|||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
|
||||||
|
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
|
||||||
# 积木报表指向地址
|
# 积木报表指向地址
|
||||||
VUE_APP_JIMU_API = 'http://192.168.1.101:48082'
|
VUE_APP_JIMU_API = 'http://192.168.1.101:48082'
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
"benz-amr-recorder": "^1.1.5",
|
"benz-amr-recorder": "^1.1.5",
|
||||||
"bpmn-js-token-simulation": "0.10.0",
|
"bpmn-js-token-simulation": "0.10.0",
|
||||||
"clipboard": "2.0.8",
|
"clipboard": "2.0.8",
|
||||||
"code-brick-zj": "^1.0.5",
|
"code-brick-zj": "^1.1.0",
|
||||||
"core-js": "^3.26.0",
|
"core-js": "^3.26.0",
|
||||||
"crypto-js": "^4.0.0",
|
"crypto-js": "^4.0.0",
|
||||||
"diagram-js": "^12.3.0",
|
"diagram-js": "^12.3.0",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-10-31 10:55:20
|
* @Date: 2023-10-31 10:55:20
|
||||||
* @LastEditTime: 2023-12-06 14:09:14
|
* @LastEditTime: 2024-04-25 15:28:44
|
||||||
* @LastEditors: zhp
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
@ -34,11 +34,11 @@ export function exportEnergyPlcExcel(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getOriginalGlassRetrace(query) {
|
export function getOriginalGlassRetrace(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/original-glass-statistics/originalGlassRetrace',
|
url: '/base/original-glass-statistics/originalGlassRetrace',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: query,
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-07-19 15:18:30
|
* @Date: 2021-07-19 15:18:30
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-04-26 08:32:02
|
* @LastEditTime: 2024-04-26 09:57:41
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -42,20 +42,21 @@
|
|||||||
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
|
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
|
||||||
<!-- <el-col :span="12"> -->
|
<!-- <el-col :span="12"> -->
|
||||||
<!-- <div style="height: 34px;"> -->
|
<!-- <div style="height: 34px;"> -->
|
||||||
<span style="display: inline-block;width: 400px;height: 10px;">
|
<span style="display: inline-block;width: 400px">
|
||||||
<span class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</span>
|
<span v-if="op.name" class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name
|
||||||
<el-divider class="split" v-if="op.name" direction="vertical"></el-divider>
|
}}</span>
|
||||||
|
<el-divider v-if="op.specifications" class="split" direction="vertical"></el-divider>
|
||||||
<!-- <span v-if="op.size" class="split"></span> -->
|
<!-- <span v-if="op.size" class="split"></span> -->
|
||||||
<span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{
|
<span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{
|
||||||
op.specifications }}</span>
|
op.specifications }}</span>
|
||||||
<el-divider class="split" v-if="op.specifications" direction="vertical"></el-divider>
|
<el-divider class="split" v-if="op.planQuantity" direction="vertical"></el-divider>
|
||||||
<span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
|
<span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
|
||||||
op.planQuantity }}</span>
|
op.planQuantity }}</span>
|
||||||
<span v-if="op.planQuantity" class="orderFinishTwo"
|
<span v-if="op.planQuantity" class="orderFinishTwo"
|
||||||
style="font-size: 14px;opacity: calc(.6);">片</span>
|
style="font-size: 14px;opacity: calc(.6);">片</span>
|
||||||
</span>
|
</span>
|
||||||
<!-- <span style="overflow: hidden;"> -->
|
<!-- <span style="overflow: hidden;"> -->
|
||||||
<span v-if="op.actualQuantity" class="orderFinish" style="font-size: 14px;margin-left: 40px;">{{
|
<span class="orderFinish" style="font-size: 14px;margin-left: 40px;">{{
|
||||||
op.actualQuantity
|
op.actualQuantity
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-if="op.actualQuantity" class="orderFinishTwo" style="font-size: 14px">片</span>
|
<span v-if="op.actualQuantity" class="orderFinishTwo" style="font-size: 14px">片</span>
|
||||||
@ -746,7 +747,7 @@ export default {
|
|||||||
name: this.getStr(String(ele.name), 8),
|
name: this.getStr(String(ele.name), 8),
|
||||||
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
||||||
specifications: ele.specifications ? '规格' + ele.specifications : '',
|
specifications: ele.specifications ? '规格' + ele.specifications : '',
|
||||||
planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan),6) : '',
|
planQuantity: ele.planQuantity ? '计划' + this.getStr(String(ele.planQuantity),6) : '',
|
||||||
actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity), 6) : '',
|
actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity), 6) : '',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -756,11 +757,11 @@ export default {
|
|||||||
let eqArr = this.SJGWsData.detData.map((item, index) => [
|
let eqArr = this.SJGWsData.detData.map((item, index) => [
|
||||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
</span>`,
|
</span>`,
|
||||||
|
`<span style="color:rgba(255,255,255,0.5)">${item.lineName || ''
|
||||||
|
}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
`<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||||
</span>`,
|
</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)">${
|
|
||||||
item.lineName || ''
|
|
||||||
}</span>`,
|
|
||||||
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`,
|
||||||
// `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error == true ?'是' :'否' || ''}</span>`,
|
// `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error == true ?'是' :'否' || ''}</span>`,
|
||||||
]);
|
]);
|
||||||
|
@ -86,16 +86,19 @@ import moment from 'moment';
|
|||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||||
|
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||||
|
import { parseTime } from '@/utils/ruoyi';
|
||||||
|
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
export default {
|
export default {
|
||||||
name: 'statisticalData',
|
name: 'QualityIsra',
|
||||||
// components: {
|
// components: {
|
||||||
// DialogForm,
|
// DialogForm,
|
||||||
// },
|
// },
|
||||||
mixins: [tableHeightMixin],
|
mixins: [tableHeightMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isFold: false,
|
||||||
list: [],
|
list: [],
|
||||||
dynamicProps: [],
|
dynamicProps: [],
|
||||||
activeName: 'day',
|
activeName: 'day',
|
||||||
@ -106,6 +109,16 @@ export default {
|
|||||||
weekListUrl: '/base/quality-isra-statistics/weekList',
|
weekListUrl: '/base/quality-isra-statistics/weekList',
|
||||||
monthListUrl: '/base/quality-isra-statistics/monthList',
|
monthListUrl: '/base/quality-isra-statistics/monthList',
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '是否报废',
|
||||||
|
placeholder: '请选择是否报废',
|
||||||
|
param: 'checkDiscard',
|
||||||
|
selectOptions: [
|
||||||
|
{ name: '否', id: 0 },
|
||||||
|
{ name: '是', id: 1 }
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '缺陷类型',
|
label: '缺陷类型',
|
||||||
@ -114,6 +127,17 @@ export default {
|
|||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'name',
|
valueField: 'name',
|
||||||
|
defaultSelect: [],
|
||||||
|
filterable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '产线',
|
||||||
|
selectOptions: [],
|
||||||
|
labelField: 'name',
|
||||||
|
valueField: 'name',
|
||||||
|
param: 'lineName',
|
||||||
|
filterable: true,
|
||||||
defaultSelect: []
|
defaultSelect: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -139,8 +163,9 @@ export default {
|
|||||||
],
|
],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
checkDiscard: undefined,
|
||||||
checkType:undefined,
|
checkType:undefined,
|
||||||
// productionId: undefined,
|
lineName: undefined,
|
||||||
startTime: undefined,
|
startTime: undefined,
|
||||||
endTime: undefined,
|
endTime: undefined,
|
||||||
// productionLineId: null,
|
// productionLineId: null,
|
||||||
@ -149,6 +174,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.getProductLineList();
|
// this.getProductLineList();
|
||||||
|
// this.isFold = this.searchBarWidth('QualityIsraBox', 1198);
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
tableProps() {
|
tableProps() {
|
||||||
@ -168,29 +194,20 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// if (this.$route.query.woIdString) {
|
if (this.$route.query.lineName) {
|
||||||
// console.log(this.$route.query.woIdString)
|
// console.log('打印看看产线', this.$route.query.lineName)
|
||||||
// this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',')
|
this.queryParams.lineName = this.$route.query.lineName
|
||||||
// // this.queryParams.workOrderIdList = [this.$route.query.woIdString]
|
this.searchBarFormConfig[2].defaultSelect = this.$route.query.lineName
|
||||||
// // let arr =[]
|
}
|
||||||
// this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',')
|
if (this.$route.query.originalGlassOutputTime) {
|
||||||
// console.log(this.searchBarFormConfig[0].defaultSelect);
|
console.log('你好', this.$route.query.originalGlassOutputTime)
|
||||||
// }
|
this.queryParams.startTime = parseTime(new Date(Number(this.$route.query.originalGlassOutputTime)))
|
||||||
// if (this.$route.params.startTime && this.$route.params.endTime) {
|
this.queryParams.endTime = parseTime(new Date(Number(this.$route.query.originalGlassOutputTime)))
|
||||||
// this.searchBarFormConfig[0].defaultSelect = [
|
this.searchBarFormConfig[3].defaultSelect = [
|
||||||
// this.$route.params.startTime,
|
this.queryParams.startTime,
|
||||||
// this.$route.params.endTime,
|
this.queryParams.endTime,
|
||||||
// ];
|
];
|
||||||
// this.queryParams.param = {};
|
}
|
||||||
// this.$set(
|
|
||||||
// this.queryParams.param,
|
|
||||||
// 'startTime',
|
|
||||||
// this.$route.params.startTime
|
|
||||||
// );
|
|
||||||
// this.$set(this.queryParams.param, 'endTime', this.$route.params.endTime);
|
|
||||||
// } else {
|
|
||||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
|
||||||
// }
|
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getData()
|
this.getData()
|
||||||
this.getDict()
|
this.getDict()
|
||||||
@ -393,8 +410,12 @@ export default {
|
|||||||
pageNo:1
|
pageNo:1
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
this.searchBarFormConfig[0].selectOptions = res.data.list
|
this.searchBarFormConfig[1].selectOptions = res.data.list
|
||||||
|
await getCorePLList().then((res) => {
|
||||||
|
// console.log(res);
|
||||||
|
this.searchBarFormConfig[2].selectOptions = res.data;
|
||||||
|
})
|
||||||
// this.searchBarFormConfig[1].selectOptions = res.data.map((item) => {
|
// this.searchBarFormConfig[1].selectOptions = res.data.map((item) => {
|
||||||
// return {
|
// return {
|
||||||
// name: item.name,
|
// name: item.name,
|
||||||
@ -425,7 +446,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
console.log(this.queryParams);
|
console.log('查询条件', this.queryParams);
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
// 执行查询
|
// 执行查询
|
||||||
const {
|
const {
|
||||||
@ -467,7 +488,10 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
handleSearchBarBtnClick(val) {
|
handleSearchBarBtnClick(val) {
|
||||||
|
console.log('11111', val)
|
||||||
if (val.btnName === 'search') {
|
if (val.btnName === 'search') {
|
||||||
|
this.queryParams.checkDiscard = (val?.checkDiscard === 0 || val?.checkDiscard === 1) ? val?.checkDiscard : undefined
|
||||||
|
this.queryParams.lineName = val.lineName ? val.lineName : undefined
|
||||||
this.queryParams.checkType = val.checkType ? val.checkType : undefined
|
this.queryParams.checkType = val.checkType ? val.checkType : undefined
|
||||||
// this.queryParams.productionId = val.productionId ? val.productionId : undefined
|
// this.queryParams.productionId = val.productionId ? val.productionId : undefined
|
||||||
this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined
|
this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined
|
||||||
|
@ -6,79 +6,144 @@
|
|||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
|
<el-form
|
||||||
<el-row :gutter="20">
|
:model="dataForm"
|
||||||
<el-col :span="8">
|
:rules="dataRule"
|
||||||
<el-form-item label="工单号" prop="workOrderId">
|
ref="dataForm"
|
||||||
<el-select filterable v-model="dataForm.workOrderId" placeholder="请选择工单号">
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
label-width="auto">
|
||||||
</el-select>
|
<el-row :gutter="20">
|
||||||
</el-form-item>
|
<el-col :span="12">
|
||||||
</el-col>
|
<el-form-item
|
||||||
<el-col :span="8">
|
label="工单号"
|
||||||
<el-form-item label="数量" prop="num">
|
prop="workOrderId">
|
||||||
<el-input v-model="dataForm.num" placeholder="请输入数量" />
|
<el-select
|
||||||
</el-form-item>
|
filterable
|
||||||
</el-col>
|
v-model="dataForm.workOrderId"
|
||||||
<el-col :span="8">
|
placeholder="请选择工单号"
|
||||||
<el-form-item label="报废时间" prop="logTime">
|
style="width: 100%">
|
||||||
<el-date-picker style="width: 100%;" v-model="dataForm.logTime" type="datetime" value-format="timestamp"
|
<el-option
|
||||||
placeholder="选择日期">
|
v-for="dict in workOrderList"
|
||||||
</el-date-picker>
|
:key="dict.id"
|
||||||
</el-form-item>
|
:label="dict.name"
|
||||||
</el-col>
|
:value="dict.id" />
|
||||||
</el-row>
|
</el-select>
|
||||||
<el-row :gutter="20">
|
</el-form-item>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<el-form-item label="产线" prop="lineId">
|
<el-col :span="12">
|
||||||
<el-select v-model="dataForm.lineId" placeholder="请选择产线" @change="getWorksectionById">
|
<el-form-item
|
||||||
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
label="数量"
|
||||||
</el-select>
|
prop="num"
|
||||||
</el-form-item>
|
style="width: 100%">
|
||||||
</el-col>
|
<el-input
|
||||||
<el-col :span="8">
|
v-model="dataForm.num"
|
||||||
<el-form-item label="工段" prop="sectionId">
|
placeholder="请输入数量" />
|
||||||
<el-select v-model="dataForm.sectionId" placeholder="请选择工段">
|
</el-form-item>
|
||||||
<el-option v-for="dict in sectionList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
</el-col>
|
||||||
</el-select>
|
</el-row>
|
||||||
</el-form-item>
|
<el-row :gutter="20">
|
||||||
</el-col>
|
<el-col :span="12">
|
||||||
<el-col :span="8">
|
<el-form-item
|
||||||
<el-form-item label="报废原因" prop="detId">
|
label="产线"
|
||||||
<el-select v-model="dataForm.detId" placeholder="请选择报废原因" multiple>
|
prop="lineId">
|
||||||
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-select
|
||||||
</el-select>
|
v-model="dataForm.lineId"
|
||||||
</el-form-item>
|
placeholder="请选择产线"
|
||||||
</el-col>
|
@change="getWorksectionById"
|
||||||
</el-row>
|
style="width: 100%">
|
||||||
<el-row :gutter="20">
|
<el-option
|
||||||
<el-col :span="24">
|
v-for="dict in lineList"
|
||||||
<el-form-item label="描述" prop="description">
|
:key="dict.id"
|
||||||
<el-input v-model="dataForm.description" type="textarea" :rows="4" placeholder="请输入描述" />
|
:label="dict.name"
|
||||||
</el-form-item>
|
:value="dict.id" />
|
||||||
</el-col>
|
</el-select>
|
||||||
</el-row>
|
</el-form-item>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<el-form-item label="来源" prop="source">
|
<el-col :span="12">
|
||||||
<el-select v-model="dataForm.source" placeholder="请选择来源" multiple>
|
<el-form-item
|
||||||
<el-option v-for="dict in sourceList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
label="工段"
|
||||||
</el-select>
|
prop="sectionId">
|
||||||
</el-form-item>
|
<el-select
|
||||||
</el-col>
|
v-model="dataForm.sectionId"
|
||||||
<el-col :span="8">
|
placeholder="请选择工段"
|
||||||
<el-form-item label="备注" prop="remark">
|
style="width: 100%">
|
||||||
<el-input v-model="dataForm.remark" placeholder="备注" />
|
<el-option
|
||||||
</el-form-item>
|
v-for="dict in sectionList"
|
||||||
</el-col>
|
:key="dict.id"
|
||||||
</el-form>
|
:label="dict.name"
|
||||||
|
:value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="报废时间"
|
||||||
|
prop="logTime">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.logTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="timestamp"
|
||||||
|
placeholder="选择日期"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="报废原因"
|
||||||
|
prop="detId">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.detId"
|
||||||
|
placeholder="请选择报废原因"
|
||||||
|
multiple
|
||||||
|
style="width: 100%">
|
||||||
|
<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="24">
|
||||||
|
<el-form-item
|
||||||
|
label="描述"
|
||||||
|
prop="description">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.description"
|
||||||
|
type="textarea"
|
||||||
|
:rows="4"
|
||||||
|
placeholder="请输入描述"
|
||||||
|
style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item
|
||||||
|
label="备注"
|
||||||
|
prop="remark">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.remark"
|
||||||
|
placeholder="备注"
|
||||||
|
style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from './basic-add';
|
import basicAdd from './basic-add';
|
||||||
import {
|
import {
|
||||||
createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList,
|
createQualityScrapLog,
|
||||||
getTeamList, getDetList,getLineList } from "@/api/base/qualityScrapLog";
|
updateQualityScrapLog,
|
||||||
import { getList,} from "@/api/base/qualityScrapType";
|
getQualityScrapLog,
|
||||||
|
getWorkOrderList,
|
||||||
|
getTeamList,
|
||||||
|
getDetList,
|
||||||
|
getLineList,
|
||||||
|
} from '@/api/base/qualityScrapLog';
|
||||||
|
import { getList } from '@/api/base/qualityScrapType';
|
||||||
// import { getMaterialList } from "@/api/base/material";
|
// import { getMaterialList } from "@/api/base/material";
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
export default {
|
export default {
|
||||||
@ -86,154 +151,149 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
isGetCode: false,
|
isGetCode: false,
|
||||||
// codeURL: getCode,
|
// codeURL: getCode,
|
||||||
createURL: createQualityScrapLog,
|
createURL: createQualityScrapLog,
|
||||||
updateURL: updateQualityScrapLog,
|
updateURL: updateQualityScrapLog,
|
||||||
infoURL: getQualityScrapLog,
|
infoURL: getQualityScrapLog,
|
||||||
},
|
},
|
||||||
lineList:[],
|
lineList: [],
|
||||||
typeList: [],
|
typeList: [],
|
||||||
workOrderList: [],
|
workOrderList: [],
|
||||||
detList:[],
|
detList: [],
|
||||||
teamList: [],
|
teamList: [],
|
||||||
sectionList:[],
|
sectionList: [],
|
||||||
sourceList: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
name: '平板端',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: '网页端',
|
|
||||||
}
|
|
||||||
],
|
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
logTime: undefined,
|
logTime: undefined,
|
||||||
source:1,
|
detId: undefined,
|
||||||
detId: undefined,
|
workOrderId: null,
|
||||||
workOrderId: null,
|
teamId: undefined,
|
||||||
teamId: undefined,
|
num: undefined,
|
||||||
num: undefined,
|
sectionId: undefined,
|
||||||
sectionId:undefined,
|
lineId: undefined,
|
||||||
lineId:undefined,
|
description: undefined,
|
||||||
description:undefined,
|
// description: undefined,
|
||||||
// description: undefined,
|
remark: undefined,
|
||||||
remark: undefined,
|
|
||||||
},
|
},
|
||||||
// materialList: [],
|
// materialList: [],
|
||||||
dataRule: {
|
dataRule: {
|
||||||
// materialId: [{ required: true, message: "", trigger: "blur" }],
|
// materialId: [{ required: true, message: "", trigger: "blur" }],
|
||||||
workOrderId: [{ required: true, message: "工单号不能为空", trigger: "change" }],
|
workOrderId: [
|
||||||
num: [{ required: true, message: "数量不能为空", trigger: "blur" }],
|
{ required: true, message: '工单号不能为空', trigger: 'change' },
|
||||||
detId: [{ required: true, message: "报废原因不能为空", trigger: "change" }],
|
],
|
||||||
|
num: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
|
||||||
|
detId: [
|
||||||
|
{ required: true, message: '报废原因不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
|
||||||
logTime: [{ required: true, message: "报废时间不能为空", trigger: "change" }],
|
logTime: [
|
||||||
}
|
{ required: true, message: '报废时间不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDict()
|
this.getDict();
|
||||||
console.log('我看看', this.dataForm)
|
console.log('我看看', this.dataForm);
|
||||||
// this.getCurrentTime()
|
// this.getCurrentTime()
|
||||||
// this.dataForm.logTime = new Date()
|
// this.dataForm.logTime = new Date()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// getCurrentTime() {
|
// getCurrentTime() {
|
||||||
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
|
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
|
||||||
// // this.dataForm.logTime = year + "-" + month + "-" + day;
|
// // this.dataForm.logTime = year + "-" + month + "-" + day;
|
||||||
// // console.log(this.dataForm.logTime);
|
// // console.log(this.dataForm.logTime);
|
||||||
// },
|
// },
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 物料列表
|
// 物料列表
|
||||||
const res = await getList()
|
const res = await getList();
|
||||||
this.typeList = res.data
|
this.typeList = res.data;
|
||||||
getWorkOrderList().then((res) => {
|
getWorkOrderList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
this.workOrderList = res.data.map((item) => {
|
this.workOrderList = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id
|
id: item.id,
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
});
|
||||||
getLineList().then((res) => {
|
getLineList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
this.lineList = res.data.map((item) => {
|
this.lineList = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id
|
id: item.id,
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
});
|
||||||
getDetList().then((res) => {
|
getDetList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
this.detList = res.data.map((item) => {
|
this.detList = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.content,
|
name: item.content,
|
||||||
id: item.id
|
id: item.id,
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
});
|
||||||
getTeamList().then((res) => {
|
getTeamList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
this.teamList = res.data.map((item) => {
|
this.teamList = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id
|
id: item.id,
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
async getWorksectionById(lineId) {
|
async getWorksectionById(lineId) {
|
||||||
if (lineId) {
|
if (lineId) {
|
||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/base/core-workshop-section/listByParentId',
|
url: '/base/core-workshop-section/listByParentId',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
id: lineId,
|
id: lineId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
console.log(data)
|
console.log(data);
|
||||||
this.sectionList = data.map((item) => {
|
this.sectionList = data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$axios({
|
this.$axios({
|
||||||
url: '/base/core-workshop-section/listAll',
|
url: '/base/core-workshop-section/listAll',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
// params: {
|
// params: {
|
||||||
// id: lineId,
|
// id: lineId,
|
||||||
// },
|
// },
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
this.sectionList = res.data.map((item) => {
|
this.sectionList = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// setMaterialCode() {
|
// setMaterialCode() {
|
||||||
// const chooseM = this.materialList.filter(item => {
|
// const chooseM = this.materialList.filter(item => {
|
||||||
// return item.id === this.dataForm.materialId
|
// return item.id === this.dataForm.materialId
|
||||||
|
@ -58,10 +58,6 @@ export default {
|
|||||||
this.dataForm.detId = response.data.detIdList
|
this.dataForm.detId = response.data.detIdList
|
||||||
this.getWorksectionById(this.dataForm.lineId)
|
this.getWorksectionById(this.dataForm.lineId)
|
||||||
this.dataForm.logTime = new Date(response.data.logTime)
|
this.dataForm.logTime = new Date(response.data.logTime)
|
||||||
|
|
||||||
// if (this.setData) {
|
|
||||||
// this.setDataForm()
|
|
||||||
// }
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (this.urlOptions.isGetCode) {
|
if (this.urlOptions.isGetCode) {
|
||||||
|
@ -24,7 +24,7 @@ export default {
|
|||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
total: 1,
|
total: 1,
|
||||||
},
|
},
|
||||||
|
@ -6,239 +6,322 @@
|
|||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="visible" width="50%">
|
<el-dialog
|
||||||
<small-title slot="title" :no-padding="true">
|
:visible.sync="visible"
|
||||||
{{ '详情' }}
|
width="50%">
|
||||||
</small-title>
|
<small-title
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
slot="title"
|
||||||
label-width="auto">
|
:no-padding="true">
|
||||||
<el-row :gutter="24">
|
{{ '详情' }}
|
||||||
<el-col :span="8">
|
</small-title>
|
||||||
<el-form-item label="工单号" prop="workOrderId">
|
<el-form
|
||||||
<el-select disabled v-model="dataForm.workOrderId" placeholder="请选择工单号">
|
:model="dataForm"
|
||||||
<el-option v-for="dict in workOrderList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
:rules="dataRule"
|
||||||
</el-select>
|
ref="dataForm"
|
||||||
</el-form-item>
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
</el-col>
|
label-width="auto">
|
||||||
<el-col :span="8">
|
<el-row :gutter="24">
|
||||||
<el-form-item label="数量" prop="num">
|
<el-col :span="8">
|
||||||
<el-input disabled v-model="dataForm.num" placeholder="请输入数量" />
|
<el-form-item
|
||||||
</el-form-item>
|
label="工单号"
|
||||||
</el-col>
|
prop="workOrderId">
|
||||||
<el-col :span="8">
|
<el-select
|
||||||
<el-form-item label="报废时间" prop="logTime">
|
disabled
|
||||||
<el-date-picker disabled v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
v-model="dataForm.workOrderId"
|
||||||
placeholder="选择日期">
|
placeholder="请选择工单号"
|
||||||
</el-date-picker>
|
style="width: 100%">
|
||||||
</el-form-item>
|
<el-option
|
||||||
</el-col>
|
v-for="dict in workOrderList"
|
||||||
</el-row>
|
:key="dict.id"
|
||||||
<el-row :gutter="20">
|
:label="dict.name"
|
||||||
<el-col :span="8">
|
:value="dict.id" />
|
||||||
<el-form-item label="产线" prop="lineId">
|
</el-select>
|
||||||
<el-select disabled v-model="dataForm.lineId" placeholder="请选择产线" @change="getWorksectionById">
|
</el-form-item>
|
||||||
<el-option v-for="dict in lineList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
</el-col>
|
||||||
</el-select>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item
|
||||||
</el-col>
|
label="数量"
|
||||||
<el-col :span="8">
|
prop="num">
|
||||||
<el-form-item label="工段" prop="sectionId">
|
<el-input
|
||||||
<el-select v-model="dataForm.sectionId" placeholder="请选择工段" disabled>
|
disabled
|
||||||
<el-option v-for="dict in sectionList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
v-model="dataForm.num"
|
||||||
</el-select>
|
placeholder="请输入数量"
|
||||||
</el-form-item>
|
style="width: 100%" />
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<el-form-item label="报废原因" prop="detId">
|
<el-col :span="8">
|
||||||
<el-select v-model="dataForm.detId" placeholder="请选择报废原因" multiple disabled>
|
<el-form-item
|
||||||
<el-option v-for="dict in detList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
label="报废时间"
|
||||||
</el-select>
|
prop="logTime"
|
||||||
</el-form-item>
|
style="width: 100%">
|
||||||
</el-col>
|
<el-date-picker
|
||||||
</el-row>
|
disabled
|
||||||
<el-row :gutter="20">
|
v-model="dataForm.logTime"
|
||||||
<el-col :span="24">
|
type="datetime"
|
||||||
<el-form-item label="描述" prop="description">
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
<el-input v-model="dataForm.description" type="textarea" :rows="4" placeholder="请输入描述" />
|
placeholder="选择日期"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-col :span="8">
|
<el-row :gutter="20">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-col :span="8">
|
||||||
<el-input v-model="dataForm.remark" placeholder="备注" />
|
<el-form-item
|
||||||
</el-form-item>
|
label="产线"
|
||||||
</el-col>
|
prop="lineId">
|
||||||
</el-form>
|
<el-select
|
||||||
</el-dialog>
|
disabled
|
||||||
|
v-model="dataForm.lineId"
|
||||||
|
placeholder="请选择产线"
|
||||||
|
@change="getWorksectionById"
|
||||||
|
style="width: 100%">
|
||||||
|
<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
|
||||||
|
style="width: 100%">
|
||||||
|
<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
|
||||||
|
style="width: 100%">
|
||||||
|
<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="24">
|
||||||
|
<el-form-item
|
||||||
|
label="描述"
|
||||||
|
prop="description">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.description"
|
||||||
|
type="textarea"
|
||||||
|
:rows="4"
|
||||||
|
placeholder="请输入描述" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item
|
||||||
|
label="备注"
|
||||||
|
prop="remark">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.remark"
|
||||||
|
placeholder="备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from './basic-add';
|
import basicAdd from './basic-add';
|
||||||
import {
|
import {
|
||||||
createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList,
|
createQualityScrapLog,
|
||||||
getTeamList, getDetList,getLineList } from "@/api/base/qualityScrapLog";
|
updateQualityScrapLog,
|
||||||
import { getList,} from "@/api/base/qualityScrapType";
|
getQualityScrapLog,
|
||||||
|
getWorkOrderList,
|
||||||
|
getTeamList,
|
||||||
|
getDetList,
|
||||||
|
getLineList,
|
||||||
|
} from '@/api/base/qualityScrapLog';
|
||||||
|
import { getList } from '@/api/base/qualityScrapType';
|
||||||
import SmallTitle from './SmallTitle';
|
import SmallTitle from './SmallTitle';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
SmallTitle,
|
SmallTitle,
|
||||||
},
|
},
|
||||||
mixins: [basicAdd],
|
mixins: [basicAdd],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
isGetCode: false,
|
isGetCode: false,
|
||||||
// codeURL: getCode,
|
// codeURL: getCode,
|
||||||
createURL: createQualityScrapLog,
|
createURL: createQualityScrapLog,
|
||||||
updateURL: updateQualityScrapLog,
|
updateURL: updateQualityScrapLog,
|
||||||
infoURL: getQualityScrapLog,
|
infoURL: getQualityScrapLog,
|
||||||
},
|
},
|
||||||
lineList:[],
|
lineList: [],
|
||||||
typeList: [],
|
typeList: [],
|
||||||
workOrderList: [],
|
workOrderList: [],
|
||||||
detList:[],
|
detList: [],
|
||||||
teamList: [],
|
teamList: [],
|
||||||
sourceList: [
|
sourceList: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '手动',
|
name: '手动',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: '自动',
|
name: '自动',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
sectionList:[],
|
sectionList: [],
|
||||||
visible:false,
|
visible: false,
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
logTime: undefined,
|
logTime: undefined,
|
||||||
source:1,
|
source: 1,
|
||||||
detId: undefined,
|
detId: undefined,
|
||||||
workOrderId: null,
|
workOrderId: null,
|
||||||
teamId: undefined,
|
teamId: undefined,
|
||||||
num: undefined,
|
num: undefined,
|
||||||
lineId:undefined,
|
lineId: undefined,
|
||||||
description:undefined,
|
description: undefined,
|
||||||
// description: undefined,
|
// description: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
},
|
},
|
||||||
// materialList: [],
|
// materialList: [],
|
||||||
dataRule: {
|
dataRule: {
|
||||||
// materialId: [{ required: true, message: "", trigger: "blur" }],
|
// materialId: [{ required: true, message: "", trigger: "blur" }],
|
||||||
workOrderId: [{ required: true, message: "工单号不能为空", trigger: "change" }],
|
workOrderId: [
|
||||||
num: [{ required: true, message: "数量不能为空", trigger: "blur" }],
|
{ required: true, message: '工单号不能为空', trigger: 'change' },
|
||||||
detId: [{ required: true, message: "报废原因不能为空", trigger: "change" }],
|
],
|
||||||
|
num: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
|
||||||
|
detId: [
|
||||||
|
{ required: true, message: '报废原因不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
|
||||||
logTime: [{ required: true, message: "报废时间不能为空", trigger: "change" }],
|
logTime: [
|
||||||
}
|
{ required: true, message: '报废时间不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDict()
|
this.getDict();
|
||||||
console.log('我看看', this.dataForm)
|
console.log('我看看', this.dataForm);
|
||||||
// this.getCurrentTime()
|
// this.getCurrentTime()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// init() {
|
// init() {
|
||||||
// this.dialogVisible = true
|
// this.dialogVisible = true
|
||||||
// },
|
// },
|
||||||
// getCurrentTime() {
|
// getCurrentTime() {
|
||||||
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
|
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
|
||||||
// this.dataForm.logTime = new Date()
|
// this.dataForm.logTime = new Date()
|
||||||
// // this.dataForm.logTime = year + "-" + month + "-" + day;
|
// // this.dataForm.logTime = year + "-" + month + "-" + day;
|
||||||
// console.log(this.dataForm.logTime);
|
// console.log(this.dataForm.logTime);
|
||||||
// },
|
// },
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 物料列表
|
// 物料列表
|
||||||
const res = await getList()
|
const res = await getList();
|
||||||
this.typeList = res.data
|
this.typeList = res.data;
|
||||||
getWorkOrderList().then((res) => {
|
getWorkOrderList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
this.workOrderList = res.data.map((item) => {
|
this.workOrderList = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id
|
id: item.id,
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
});
|
||||||
getLineList().then((res) => {
|
getLineList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
this.lineList = res.data.map((item) => {
|
this.lineList = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id
|
id: item.id,
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
});
|
||||||
getDetList().then((res) => {
|
getDetList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
this.detList = res.data.map((item) => {
|
this.detList = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.content,
|
name: item.content,
|
||||||
id: item.id
|
id: item.id,
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
});
|
||||||
getTeamList().then((res) => {
|
getTeamList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
this.teamList = res.data.map((item) => {
|
this.teamList = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id
|
id: item.id,
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
async getWorksectionById(lineId) {
|
async getWorksectionById(lineId) {
|
||||||
if (lineId) {
|
if (lineId) {
|
||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/base/core-workshop-section/listByParentId',
|
url: '/base/core-workshop-section/listByParentId',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
id: lineId,
|
id: lineId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
console.log(data)
|
console.log(data);
|
||||||
this.sectionList = data.map((item) => {
|
this.sectionList = data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$axios({
|
this.$axios({
|
||||||
url: '/base/core-workshop-section/listAll',
|
url: '/base/core-workshop-section/listAll',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
// params: {
|
// params: {
|
||||||
// id: lineId,
|
// id: lineId,
|
||||||
// },
|
// },
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
this.sectionList = res.data.map((item) => {
|
this.sectionList = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,19 +1,45 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<search-bar
|
||||||
<base-table :max-height="tableH" v-loading="dataListLoading" :table-props="tableProps" :page="listQuery.pageNo"
|
:formConfigs="formConfig"
|
||||||
:limit="listQuery.pageSize" :table-data="tableData">
|
ref="searchBarForm"
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
@headBtnClick="buttonClick" />
|
||||||
@clickBtn="handleClick" />
|
<base-table
|
||||||
</base-table>
|
:max-height="tableH"
|
||||||
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
v-loading="dataListLoading"
|
||||||
@pagination="getDataList" />
|
:table-props="tableProps"
|
||||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
:page="listQuery.pageNo"
|
||||||
@confirm="handleConfirm" :before-close="handleCancel" width="50%">
|
:limit="listQuery.pageSize"
|
||||||
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
|
:table-data="tableData">
|
||||||
</base-dialog>
|
<method-btn
|
||||||
<detail-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" @refreshDataList="successSubmit" />
|
v-if="tableBtn.length"
|
||||||
</div>
|
slot="handleBtn"
|
||||||
|
:width="120"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick" />
|
||||||
|
</base-table>
|
||||||
|
<pagination
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:total="listQuery.total"
|
||||||
|
@pagination="getDataList" />
|
||||||
|
<base-dialog
|
||||||
|
:dialogTitle="addOrEditTitle"
|
||||||
|
:dialogVisible="addOrUpdateVisible"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
:before-close="handleCancel"
|
||||||
|
width="50%">
|
||||||
|
<add-or-update
|
||||||
|
ref="addOrUpdate"
|
||||||
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
</base-dialog>
|
||||||
|
<detail-or-update
|
||||||
|
v-if="detailOrUpdateVisible"
|
||||||
|
ref="detailOrUpdate"
|
||||||
|
@refreshDataList="successSubmit" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -23,201 +49,211 @@ import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
|||||||
import basicPage from './basic-page';
|
import basicPage from './basic-page';
|
||||||
import { parseTime } from '../../../core/mixins/code-filter';
|
import { parseTime } from '../../../core/mixins/code-filter';
|
||||||
import {
|
import {
|
||||||
getQualityScrapLogPage,
|
getQualityScrapLogPage,
|
||||||
deleteQualityScrapLog,
|
deleteQualityScrapLog,
|
||||||
getWorkOrderList,
|
getWorkOrderList,
|
||||||
// getTeamList
|
// getTeamList
|
||||||
} from '@/api/base/qualityScrapLog';
|
} from '@/api/base/qualityScrapLog';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
// {
|
|
||||||
// prop: 'createTime',
|
|
||||||
// label: '添加时间',
|
|
||||||
// filter: parseTime
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '报废时间',
|
|
||||||
filter: parseTime
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'lineName',
|
|
||||||
label: '产线名称'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'sectionName',
|
|
||||||
label: '工段'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'workOrderName',
|
|
||||||
label: '工单名称'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'num',
|
|
||||||
label: '数量'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: 'detContent',
|
prop: 'createTime',
|
||||||
label: '报废原因'
|
label: '报废时间',
|
||||||
},
|
filter: parseTime,
|
||||||
{
|
width: 160,
|
||||||
prop: 'source',
|
},
|
||||||
label: '来源',
|
{
|
||||||
filter: (val) => val == 1 ? '平板端' : '网页端'
|
prop: 'lineName',
|
||||||
},
|
label: '产线名称',
|
||||||
|
width: 90,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'sectionName',
|
||||||
|
label: '工段',
|
||||||
|
minWidth: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'workOrderName',
|
||||||
|
label: '工单名称',
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'num',
|
||||||
|
label: '数量',
|
||||||
|
width: 90,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'detContent',
|
||||||
|
label: '报废原因',
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'source',
|
||||||
|
label: '来源',
|
||||||
|
filter: (val) => (val == 1 ? '平板端' : '网页端'),
|
||||||
|
width: 90,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [basicPage, tableHeightMixin],
|
mixins: [basicPage, tableHeightMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
getDataListURL: getQualityScrapLogPage,
|
getDataListURL: getQualityScrapLogPage,
|
||||||
deleteURL: deleteQualityScrapLog,
|
deleteURL: deleteQualityScrapLog,
|
||||||
// exportURL: exportFactoryExcel,
|
// exportURL: exportFactoryExcel,
|
||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi(`base:quality-scrap-log:update`)
|
this.$auth.hasPermi(`base:quality-scrap-log:update`)
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi(`base:quality-scrap-log:detail`)
|
this.$auth.hasPermi(`base:quality-scrap-log:detail`)
|
||||||
? {
|
? {
|
||||||
type: 'detail',
|
type: 'detail',
|
||||||
btnName: '详情',
|
btnName: '详情',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi(`base:quality-scrap-log:delete`)
|
this.$auth.hasPermi(`base:quality-scrap-log:delete`)
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
btnName: '删除',
|
btnName: '删除',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
].filter((v)=>v),
|
].filter((v) => v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
detailOrUpdateVisible:false,
|
detailOrUpdateVisible: false,
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '工单',
|
|
||||||
selectOptions: [],
|
|
||||||
labelField: 'name',
|
|
||||||
valueField: 'id',
|
|
||||||
param: 'workOrderId',
|
|
||||||
filterable: true
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// type: 'select',
|
|
||||||
// label: '班组',
|
|
||||||
// selectOptions: [],
|
|
||||||
// labelField: 'name',
|
|
||||||
// valueField: 'id',
|
|
||||||
// param: 'teamId',
|
|
||||||
// filterable: true
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:quality-scrap-det:query') ? 'button' : '',
|
type: 'select',
|
||||||
|
label: '工单',
|
||||||
|
selectOptions: [],
|
||||||
|
labelField: 'name',
|
||||||
|
valueField: 'id',
|
||||||
|
param: 'workOrderId',
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: 'select',
|
||||||
|
// label: '班组',
|
||||||
|
// selectOptions: [],
|
||||||
|
// labelField: 'name',
|
||||||
|
// valueField: 'id',
|
||||||
|
// param: 'teamId',
|
||||||
|
// filterable: true
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi('base:quality-scrap-det:query')
|
||||||
|
? 'button'
|
||||||
|
: '',
|
||||||
btnName: '查询',
|
btnName: '查询',
|
||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:quality-scrap-det:create') ? 'separate' : '',
|
type: this.$auth.hasPermi('base:quality-scrap-det:create')
|
||||||
|
? 'separate'
|
||||||
|
: '',
|
||||||
// type: 'separate',
|
// type: 'separate',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:quality-scrap-det:create') ? 'button' : '',
|
type: this.$auth.hasPermi('base:quality-scrap-det:create')
|
||||||
|
? 'button'
|
||||||
|
: '',
|
||||||
btnName: '新增',
|
btnName: '新增',
|
||||||
name: 'add',
|
name: 'add',
|
||||||
color: 'success',
|
color: 'success',
|
||||||
plain: true
|
plain: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
DetailOrUpdate
|
DetailOrUpdate,
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDict()
|
this.getDict();
|
||||||
this.getDataList()
|
this.getDataList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
otherMethods(val) {
|
otherMethods(val) {
|
||||||
if (val.type === 'detail') {
|
if (val.type === 'detail') {
|
||||||
this.detailOrUpdateVisible = true;
|
this.detailOrUpdateVisible = true;
|
||||||
// this.addOrEditTitle = "详情";
|
// this.addOrEditTitle = "详情";
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.detailOrUpdate.init(val.data.id, true);
|
this.$refs.detailOrUpdate.init(val.data.id, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleteHandle(id, name, index, data) {
|
deleteHandle(id, name, index, data) {
|
||||||
this.$confirm(`确认要删除序号为${index}的数据项?`, "提示", {
|
this.$confirm(`确认要删除序号为${index}的数据项?`, '提示', {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: '取消',
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.urlOptions.deleteURL(id).then(({ data }) => {
|
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "操作成功",
|
message: '操作成功',
|
||||||
type: "success",
|
type: 'success',
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
getDict() {
|
getDict() {
|
||||||
getWorkOrderList().then((res) => {
|
getWorkOrderList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
this.formConfig[0].selectOptions = res.data.map((item) => {
|
this.formConfig[0].selectOptions = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id
|
id: item.id,
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
// console.log(this.formConfig[0].selectOptions);
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
});
|
||||||
// getTeamList().then((res) => {
|
// getTeamList().then((res) => {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
// // console.log(response);
|
// // console.log(response);
|
||||||
// this.formConfig[1].selectOptions = res.data.map((item) => {
|
// this.formConfig[1].selectOptions = res.data.map((item) => {
|
||||||
// return {
|
// return {
|
||||||
// name: item.name,
|
// name: item.name,
|
||||||
// id: item.id
|
// id: item.id
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// // console.log(this.formConfig[0].selectOptions);
|
// // console.log(this.formConfig[0].selectOptions);
|
||||||
// // this.listQuery.total = response.data.total;
|
// // this.listQuery.total = response.data.total;
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
getDataList() {
|
getDataList() {
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.listQuery.total = response.data.total;
|
this.listQuery.total = response.data.total;
|
||||||
this.dataListLoading = false;
|
this.dataListLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 20;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.workOrderId = val.workOrderId ? val.workOrderId : undefined;
|
this.listQuery.workOrderId = val.workOrderId
|
||||||
// this.listQuery.teamId = val.teamId ? val.teamId : undefined;
|
? val.workOrderId
|
||||||
|
: undefined;
|
||||||
|
// this.listQuery.teamId = val.teamId ? val.teamId : undefined;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'reset':
|
case 'reset':
|
||||||
@ -227,7 +263,7 @@ export default {
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
total: 1,
|
total: 1,
|
||||||
};
|
};
|
||||||
this.getDataList()
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'add':
|
case 'add':
|
||||||
this.addOrEditTitle = '新增';
|
this.addOrEditTitle = '新增';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 14:55:51
|
* @Date: 2023-08-01 14:55:51
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-04-25 14:42:53
|
* @LastEditTime: 2024-04-26 09:58:51
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -23,18 +23,16 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="包装全检时间及产线" prop="val">
|
<el-form-item label="包装全检时间及产线" prop="val">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="listQuery.timeVal"
|
v-model="listQuery.packTime"
|
||||||
value-format="timestamp"
|
value-format="timestamp"
|
||||||
type="datetimerange"
|
type="datetime"
|
||||||
size="small"
|
size="small"
|
||||||
clearable
|
clearable
|
||||||
start-placeholder="包装全检开始时间"
|
placeholder="包装全检时间"
|
||||||
end-placeholder="包装全检结束时间"
|
|
||||||
range-separator="-"
|
|
||||||
@change="countTimes('timestamp3')"
|
@change="countTimes('timestamp3')"
|
||||||
/>
|
/>
|
||||||
<el-select v-model="listQuery.lineName" size="small" clearable filterable placeholder="产线" @change="countTimes('timestamp3')" style="margin-left: 5px">
|
<el-select v-model="listQuery.lineName" size="small" clearable filterable placeholder="产线" @change="countTimes('timestamp3')" style="margin-left: 5px">
|
||||||
<el-option label="区域一" value="shanghai"></el-option>
|
<el-option v-for="(item, index) in lineOptions" :key="index" :label="item.name" :value="item.name"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -51,8 +49,8 @@
|
|||||||
:table-data="list"> -->
|
:table-data="list"> -->
|
||||||
<base-table :max-height="tableH" :table-props="tableProps"
|
<base-table :max-height="tableH" :table-props="tableProps"
|
||||||
:table-data="list">
|
:table-data="list">
|
||||||
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="220" label="缺陷操作" :method-list="tableBtn"
|
||||||
@clickBtn="handleClick" /> -->
|
@clickBtn="handleClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
||||||
@pagination="getList" /> -->
|
@pagination="getList" /> -->
|
||||||
@ -64,56 +62,76 @@
|
|||||||
// import AddOrUpdate from './add-or-updata';
|
// import AddOrUpdate from './add-or-updata';
|
||||||
// import unitDict from './unitDict';
|
// import unitDict from './unitDict';
|
||||||
// import basicPage from '../mixins/basic-page';
|
// import basicPage from '../mixins/basic-page';
|
||||||
import { publicFormatter } from '@/utils/dict';
|
// import { publicFormatter } from '@/utils/dict';
|
||||||
import { parseTime } from '../mixins/code-filter';
|
import { parseTime } from '../mixins/code-filter';
|
||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||||
|
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||||
|
|
||||||
import {
|
import { getOriginalGlassRetrace } from '@/api/quality/rawMaterialTraceability';
|
||||||
getOriginalGlassRetrace,
|
|
||||||
getWorkOrderList,
|
|
||||||
// exportEnergyPlcExcel
|
|
||||||
} from '@/api/quality/rawMaterialTraceability';
|
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'certificateNumber',
|
prop: 'certificateNumber',
|
||||||
label: '合格证号',
|
label: '合格证号',
|
||||||
|
minWidth: 120,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
filter: (val) => val ? val : '--'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'boxNumber',
|
prop: 'boxNumber',
|
||||||
label: '箱号',
|
label: '箱号',
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
filter: (val) => val ? val : '--'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'packagingCode',
|
prop: 'packagingCode',
|
||||||
label: '成品周转编号',
|
label: '成品周转编号',
|
||||||
|
minWidth: 180,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
filter: (val) => val ? val : '--'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'deepProcessingLineName',
|
prop: 'deepProcessingLineName',
|
||||||
label: '深加工产线',
|
label: '深加工产线',
|
||||||
|
minWidth: 120,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
filter: (val) => val ? val : '--'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'deepProcessingInputTime',
|
prop: 'deepProcessingInputTime',
|
||||||
label: '深加工上片时间',
|
label: '深加工上片时间',
|
||||||
filter: parseTime
|
// filter: (val) => parseTime(val) ? parseTime(val) : '--',
|
||||||
|
filter: parseTime,
|
||||||
|
minWidth: 180,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'deepProcessingOutputTime',
|
prop: 'deepProcessingOutputTime',
|
||||||
label: '深加工下片时间',
|
label: '深加工下片时间',
|
||||||
filter: parseTime
|
filter: parseTime,
|
||||||
|
minWidth: 180,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'glassCode',
|
prop: 'glassCode',
|
||||||
label: '原片周转编码',
|
label: '原片周转编码',
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'originalGlassLineName',
|
prop: 'originalGlassLineName',
|
||||||
label: '原片产线',
|
label: '原片产线',
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'originalGlassOutputTime',
|
prop: 'originalGlassOutputTime',
|
||||||
label: '原片下片时间',
|
label: '原片下片时间',
|
||||||
filter: parseTime
|
filter: parseTime,
|
||||||
},
|
minWidth: 180,
|
||||||
|
showOverflowtooltip: true
|
||||||
|
}
|
||||||
// {
|
// {
|
||||||
// prop: 'scrapDetail',
|
// prop: 'scrapDetail',
|
||||||
// label: '详情',
|
// label: '详情',
|
||||||
@ -126,29 +144,25 @@ export default {
|
|||||||
mixins: [tableHeightMixin],
|
mixins: [tableHeightMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// urlOptions: {
|
lineOptions: [],
|
||||||
// getDataListURL: getMaterialUseLogPage,
|
|
||||||
// // deleteURL: deletePackingType,
|
|
||||||
// // exportURL: exportPackingExcel,
|
|
||||||
// },
|
|
||||||
tableProps,
|
tableProps,
|
||||||
// tableBtn: [
|
tableBtn: [
|
||||||
// // this.$auth.hasPermi(`base:packaging-print-log:update`)
|
// this.$auth.hasPermi(`base:packaging-print-log:update`)
|
||||||
// // ?
|
// ?
|
||||||
// {
|
{
|
||||||
// type: 'edit',
|
type: 'detail0',
|
||||||
// btnName: '编辑',
|
btnName: '成品缺陷详情',
|
||||||
// },
|
},
|
||||||
// // : undefined,
|
// : undefined,
|
||||||
// // this.$auth.hasPermi(`base:packaging-print-log:delete`)
|
// this.$auth.hasPermi(`base:packaging-print-log:delete`)
|
||||||
// // ?
|
// ?
|
||||||
// {
|
{
|
||||||
// type: 'delete',
|
type: 'detail1',
|
||||||
// btnName: '删除',
|
btnName: '原片缺陷详情',
|
||||||
// }
|
}
|
||||||
// // : undefined,
|
// : undefined,
|
||||||
|
|
||||||
// ].filter((v) => v),
|
].filter((v) => v),
|
||||||
list: [],
|
list: [],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
// pageSize: 10,
|
// pageSize: 10,
|
||||||
@ -156,13 +170,12 @@ export default {
|
|||||||
// total: 0,
|
// total: 0,
|
||||||
certificateNumber: undefined,
|
certificateNumber: undefined,
|
||||||
packagingCode: undefined,
|
packagingCode: undefined,
|
||||||
timeVal:undefined,
|
packTime: null,
|
||||||
lineName: undefined,
|
lineName: null,
|
||||||
glassCode: undefined
|
glassCode: undefined
|
||||||
},
|
},
|
||||||
count: 0,
|
|
||||||
useTime: false,
|
useTime: false,
|
||||||
countArray: [],
|
countArray: [false, false, false, false],
|
||||||
// tableH: this.tableHeight(260),
|
// tableH: this.tableHeight(260),
|
||||||
formConfig: [
|
formConfig: [
|
||||||
// {
|
// {
|
||||||
@ -260,82 +273,86 @@ export default {
|
|||||||
// window.addEventListener('resize', () => {
|
// window.addEventListener('resize', () => {
|
||||||
// this.tableH = this.tableHeight(260)
|
// this.tableH = this.tableHeight(260)
|
||||||
// })
|
// })
|
||||||
this.count = 0
|
countArray: [false, false, false, false],
|
||||||
this.useTime = false
|
this.useTime = false
|
||||||
// this.getList()
|
// this.getList()
|
||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClick(raw) {
|
||||||
|
if (raw.type === 'detail1') {
|
||||||
|
// 原片缺陷
|
||||||
|
this.$router.push({
|
||||||
|
path: '/quality/base/quality-isra',
|
||||||
|
query: {
|
||||||
|
// deepProcessingLineId: raw.data.deepProcessingLineId,
|
||||||
|
lineName: raw.data.deepProcessingLineName,
|
||||||
|
originalGlassOutputTime: raw.data.originalGlassOutputTime
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 成品缺陷
|
||||||
|
this.$router.push({
|
||||||
|
path: '/quality/base/quality-inspection-data/detection-information/statistical-data',
|
||||||
|
query: {
|
||||||
|
startTime: raw.data.deepProcessingInputTime,
|
||||||
|
endTime: raw.data.deepProcessingOutputTime
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
countTimes(val) {
|
countTimes(val) {
|
||||||
if (val === 1) {
|
if (val === 1) {
|
||||||
let temp = this.listQuery?.certificateNumber !== ''
|
this.countArray[0] = this.listQuery.certificateNumber !== '' && this.listQuery.certificateNumber !== undefined
|
||||||
this.countArray[0] = temp
|
|
||||||
console.log('你好', this.countArray)
|
|
||||||
}
|
}
|
||||||
if (val && val !== '') {
|
if (val === 2) {
|
||||||
if (val === 'timestamp3') {
|
this.countArray[1] = this.listQuery?.packagingCode !== '' && this.listQuery?.packagingCode !== undefined
|
||||||
if (this.listQuery.timeVal.length > 0 || this.listQuery?.lineName !== '') {
|
}
|
||||||
this.useTime = true
|
if (val === 3) {
|
||||||
} else {
|
this.countArray[2] = this.listQuery?.glassCode !== '' && this.listQuery?.glassCode !== undefined
|
||||||
this.useTime = false
|
}
|
||||||
}
|
if (val === 'timestamp3') {
|
||||||
|
if ((this.listQuery.packTime !== '' && this.listQuery.packTime !== null) || (this.listQuery?.lineName !== '' && this.listQuery.lineName !== null)) {
|
||||||
|
this.useTime = true
|
||||||
|
this.countArray[3] = true
|
||||||
} else {
|
} else {
|
||||||
this.count ++
|
this.useTime = false
|
||||||
|
this.countArray[3] = true
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
this.count --
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
// console.log('nihc ', this.count, this.listQuery)
|
let trueArray = this.countArray.filter(val => val === true)
|
||||||
// if (this.count > 1) {
|
if (trueArray.length !== 1) {
|
||||||
// this.$message.error('请选择一个条件进行查询!')
|
this.$message.error('请选择一个条件进行查询!')
|
||||||
// } else {
|
} else {
|
||||||
// if (this.useTime === true) {
|
if (this.useTime === true) {
|
||||||
// if (this.listQuery.timeVal.length > 0 && this.listQuery?.lineName !== '') {
|
if (this.listQuery.packTime !== null && this.listQuery.packTime !== '' && this.listQuery.lineName !== null && this.listQuery.lineName !== '') {
|
||||||
// getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
|
getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
|
||||||
// console.log(res);
|
console.log(res);
|
||||||
// this.list = res.data || []
|
this.list = res.data || []
|
||||||
// console.log(this.list);
|
console.log(this.list);
|
||||||
// // this.listQuery.total = res.data.total || 0
|
// this.listQuery.total = res.data.total || 0
|
||||||
// })
|
})
|
||||||
// } else {
|
} else {
|
||||||
// this.$message.error('选择包装全检时,时间和产线必填!')
|
this.$message.error('选择包装全检时,时间和产线均为必填!')
|
||||||
// }
|
}
|
||||||
// } else {
|
} else {
|
||||||
getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
|
getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.list = res.data || []
|
this.list = res.data || []
|
||||||
console.log(this.list);
|
console.log(this.list);
|
||||||
// this.listQuery.total = res.data.total || 0
|
})
|
||||||
})
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
},
|
},
|
||||||
getDict() {
|
getDict() {
|
||||||
// 获取产品的属性列表
|
// 获取产线
|
||||||
// getCustomerList().then((response) => {
|
getCorePLList().then((res) => {
|
||||||
// console.log(response);
|
console.log(res);
|
||||||
// this.customerList = response.data
|
this.lineOptions = res.data;
|
||||||
// // this.listQuery.total = response.data.total;
|
})
|
||||||
// })
|
|
||||||
// getModelList().then((response) => {
|
|
||||||
// console.log(response);
|
|
||||||
// this.modelList = response.data
|
|
||||||
// // this.listQuery.total = response.data.total;
|
|
||||||
// })
|
|
||||||
getWorkOrderList().then((response) => {
|
|
||||||
// console.log(response);
|
|
||||||
this.formConfig[0].selectOptions = response.data.map((item) => {
|
|
||||||
return {
|
|
||||||
name: item.name,
|
|
||||||
id: item.id
|
|
||||||
}
|
|
||||||
})
|
|
||||||
console.log(this.formConfig[0].selectOptions);
|
|
||||||
// this.listQuery.total = response.data.total;
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// handleExport() {
|
// handleExport() {
|
||||||
// // 处理查询参数
|
// // 处理查询参数
|
||||||
|
@ -1,26 +1,52 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<SearchBar :isFold="true" :formConfigs="searchBarFormConfig" ref="search-bar"
|
<SearchBar
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
:isFold="true"
|
||||||
|
:formConfigs="searchBarFormConfig"
|
||||||
|
ref="search-bar"
|
||||||
|
@headBtnClick="handleSearchBarBtnClick" />
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list"
|
<base-table
|
||||||
@emitFun="handleEmitFun">
|
:table-props="tableProps"
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right" :method-list="tableBtn"
|
:page="queryParams.pageNo"
|
||||||
@clickBtn="handleTableBtnClick" />
|
:limit="queryParams.pageSize"
|
||||||
</base-table>
|
:table-data="list"
|
||||||
|
@emitFun="handleEmitFun"
|
||||||
|
:max-height="tableH">
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
label="操作"
|
||||||
|
:width="90"
|
||||||
|
fixed="right"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleTableBtnClick" />
|
||||||
|
</base-table>
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
<pagination
|
||||||
@pagination="getList" />
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList" />
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
<!-- 对话框(添加 / 修改) -->
|
||||||
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%" @close="cancel" @cancel="cancel"
|
<base-dialog
|
||||||
@confirm="submitForm">
|
:dialogTitle="title"
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" />
|
:dialogVisible="open"
|
||||||
</base-dialog>
|
width="50%"
|
||||||
</div>
|
@close="cancel"
|
||||||
|
@cancel="cancel"
|
||||||
|
@confirm="submitForm">
|
||||||
|
<DialogForm
|
||||||
|
v-if="open"
|
||||||
|
ref="form"
|
||||||
|
v-model="form" />
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -37,27 +63,34 @@ import moment from 'moment';
|
|||||||
import DialogForm from './dialogForm.vue';
|
import DialogForm from './dialogForm.vue';
|
||||||
|
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
|
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||||
export default {
|
export default {
|
||||||
name: 'QualityInspectionRecord',
|
name: 'QualityInspectionRecord',
|
||||||
components: {
|
components: {
|
||||||
DialogForm,
|
DialogForm,
|
||||||
},
|
},
|
||||||
mixins: [basicPageMixin],
|
mixins: [basicPageMixin, tableHeightMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
rows: [
|
rows: [
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '工单名称',
|
label: '工单名称',
|
||||||
url: 'base/core-work-order/listbyfilter',
|
url: 'base/core-work-order/listbyfilter',
|
||||||
prop: 'workOrderId',
|
prop: 'workOrderId',
|
||||||
rules: [{ required: true, message: '工单名称不能为空', trigger: 'change' }],
|
rules: [
|
||||||
bind: {
|
{
|
||||||
filterable: true,
|
required: true,
|
||||||
},
|
message: '工单名称不能为空',
|
||||||
}
|
trigger: 'change',
|
||||||
],
|
},
|
||||||
|
],
|
||||||
|
bind: {
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
@ -65,7 +98,9 @@ export default {
|
|||||||
url: '/base/quality-inspection-det/listAll',
|
url: '/base/quality-inspection-det/listAll',
|
||||||
prop: 'inspectionDetId',
|
prop: 'inspectionDetId',
|
||||||
labelKey: 'content',
|
labelKey: 'content',
|
||||||
rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
|
rules: [
|
||||||
|
{ required: true, message: '检测内容不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
@ -93,7 +128,9 @@ export default {
|
|||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: '产线不能为空', trigger: 'blur' }],
|
rules: [
|
||||||
|
{ required: true, message: '产线不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
@ -113,7 +150,6 @@ export default {
|
|||||||
label: '检测人员',
|
label: '检测人员',
|
||||||
prop: 'checkPerson',
|
prop: 'checkPerson',
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
[{ textarea: true, label: '描述', prop: 'explainText' }],
|
[{ textarea: true, label: '描述', prop: 'explainText' }],
|
||||||
[{ input: true, label: '备注', prop: 'remark' }],
|
[{ input: true, label: '备注', prop: 'remark' }],
|
||||||
@ -121,32 +157,32 @@ export default {
|
|||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '工单名称',
|
label: '工单名称',
|
||||||
placeholder: '请选择工单名称',
|
placeholder: '请选择工单名称',
|
||||||
param: 'workOrderId',
|
param: 'workOrderId',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
filterable:true
|
filterable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '检测内容',
|
label: '检测内容',
|
||||||
placeholder: '请输入检测内容',
|
placeholder: '请输入检测内容',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'inspectionDetContent',
|
param: 'inspectionDetContent',
|
||||||
filterable: true
|
filterable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '检测人员',
|
label: '检测人员',
|
||||||
placeholder: '请选择检测人员',
|
placeholder: '请选择检测人员',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'checkPerson',
|
param: 'checkPerson',
|
||||||
filterable: true,
|
filterable: true,
|
||||||
multiple:true,
|
multiple: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间段',
|
label: '检测时间',
|
||||||
dateType: 'daterange', // datetimerange
|
dateType: 'daterange', // datetimerange
|
||||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
@ -159,27 +195,21 @@ export default {
|
|||||||
// width: 350,
|
// width: 350,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi(
|
type: this.$auth.hasPermi('base:quality-inspection-record:query')
|
||||||
'base:quality-inspection-record:query'
|
? 'button'
|
||||||
)
|
: '',
|
||||||
? 'button'
|
|
||||||
: '',
|
|
||||||
btnName: '查询',
|
btnName: '查询',
|
||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi(
|
type: this.$auth.hasPermi('base:quality-inspection-record:create')
|
||||||
'base:quality-inspection-record:create'
|
? 'separate'
|
||||||
)
|
: '',
|
||||||
? 'separate'
|
|
||||||
: '',
|
|
||||||
// type: 'separate',
|
// type: 'separate',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi(
|
type: this.$auth.hasPermi('base:quality-inspection-record:create')
|
||||||
'base:quality-inspection-record:create'
|
|
||||||
)
|
|
||||||
? 'button'
|
? 'button'
|
||||||
: '',
|
: '',
|
||||||
btnName: '新增',
|
btnName: '新增',
|
||||||
@ -195,7 +225,7 @@ export default {
|
|||||||
btnName: '修改',
|
btnName: '修改',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('base:quality-inspection-record:delete')
|
this.$auth.hasPermi('base:quality-inspection-record:delete')
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
btnName: '删除',
|
btnName: '删除',
|
||||||
@ -207,64 +237,66 @@ export default {
|
|||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
label: '添加时间',
|
label: '添加时间',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
width: 180,
|
width: 160,
|
||||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// width: 128,
|
prop: 'workOrderName',
|
||||||
prop: 'workOrderName',
|
label: '工单名称',
|
||||||
label: '工单名称',
|
minWidth: 180,
|
||||||
},
|
showOverflowtooltip: true,
|
||||||
{
|
},
|
||||||
// width: 128,
|
|
||||||
prop: 'productionLineName',
|
|
||||||
label: '产线',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// width: 128,
|
|
||||||
prop: 'sectionName',
|
|
||||||
label: '工段',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
// width: 128,
|
|
||||||
prop: 'inspectionDetContent',
|
prop: 'inspectionDetContent',
|
||||||
label: '检测内容',
|
label: '检测内容',
|
||||||
|
minWidth: 180,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'productionLineName',
|
||||||
|
label: '产线',
|
||||||
|
minWidth: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'sectionName',
|
||||||
|
label: '工段',
|
||||||
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// // width: 128,
|
|
||||||
// prop: 'productionLineName',
|
|
||||||
// label: '产线',
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
// width: 128,
|
|
||||||
prop: 'checkPerson',
|
prop: 'checkPerson',
|
||||||
label: '检测人员',
|
label: '检测人员',
|
||||||
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// width: 160,
|
|
||||||
prop: 'checkTime',
|
prop: 'checkTime',
|
||||||
label: '检测时间',
|
label: '检测时间',
|
||||||
|
width: 160,
|
||||||
filter: (val) =>
|
filter: (val) =>
|
||||||
val != null ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '-',
|
val != null ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
width: 90,
|
|
||||||
prop: 'source',
|
prop: 'source',
|
||||||
label: '来源',
|
label: '来源',
|
||||||
filter: (val) => val == 1 ? '平板端' : '网页端',
|
width: 80,
|
||||||
|
filter: (val) => (val == 1 ? '平板端' : '网页端'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// 搜索框需要的 keys, 与上面 queryParams 的除 pageNo, pageSize 之外的 key 一一对应
|
// 搜索框需要的 keys, 与上面 queryParams 的除 pageNo, pageSize 之外的 key 一一对应
|
||||||
searchBarKeys: ['inspectionDetContent', 'checkTime', 'workOrderId','checkPerson'],
|
searchBarKeys: [
|
||||||
|
'inspectionDetContent',
|
||||||
|
'checkTime',
|
||||||
|
'workOrderId',
|
||||||
|
'checkPerson',
|
||||||
|
],
|
||||||
form: {
|
form: {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
// workOrderId:undefined,
|
// workOrderId:undefined,
|
||||||
inspectionDetId: undefined,
|
inspectionDetId: undefined,
|
||||||
inspectionDetContent: undefined,
|
inspectionDetContent: undefined,
|
||||||
productionLineId: undefined,
|
productionLineId: undefined,
|
||||||
sectionId: undefined,
|
sectionId: undefined,
|
||||||
checkPerson: undefined,
|
checkPerson: undefined,
|
||||||
workOrderId:undefined,
|
workOrderId: undefined,
|
||||||
checkTime: undefined,
|
checkTime: undefined,
|
||||||
source: undefined,
|
source: undefined,
|
||||||
explainText: undefined,
|
explainText: undefined,
|
||||||
@ -273,26 +305,26 @@ export default {
|
|||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
workOrderId:null,
|
workOrderId: null,
|
||||||
inspectionDetContent: null,
|
inspectionDetContent: null,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
checkPerson:undefined,
|
checkPerson: undefined,
|
||||||
// productionLineId: null,
|
// productionLineId: null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getProductLineList()
|
this.getProductLineList();
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
form: {
|
form: {
|
||||||
handler: function (val) {
|
handler: function (val) {
|
||||||
console.log('form change:', val);
|
console.log('form change:', val);
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true,
|
||||||
}
|
},
|
||||||
// 注册弹窗里产线改变时的监听事件
|
// 注册弹窗里产线改变时的监听事件
|
||||||
// 'form.productionLineId': {
|
// 'form.productionLineId': {
|
||||||
// handler: function (val) {
|
// handler: function (val) {
|
||||||
@ -318,29 +350,29 @@ export default {
|
|||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 获取搜索栏的产线列表 */
|
/** 获取搜索栏的产线列表 */
|
||||||
deleteHandle(id, name, index, data) {
|
deleteHandle(id, name, index, data) {
|
||||||
this.$confirm(`确认要删除序号为${index}的数据项?`, "提示", {
|
this.$confirm(`确认要删除序号为${index}的数据项?`, '提示', {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: '取消',
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.urlOptions.deleteURL(id).then(({ data }) => {
|
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "操作成功",
|
message: '操作成功',
|
||||||
type: "success",
|
type: 'success',
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
getProductLineList() {
|
getProductLineList() {
|
||||||
this.$axios('/base/core-work-order/listbyfilter').then((response) => {
|
this.$axios('/base/core-work-order/listbyfilter').then((response) => {
|
||||||
this.searchBarFormConfig[0].selectOptions = response.data.map(
|
this.searchBarFormConfig[0].selectOptions = response.data.map(
|
||||||
(item) => {
|
(item) => {
|
||||||
return {
|
return {
|
||||||
@ -349,34 +381,36 @@ export default {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
})
|
});
|
||||||
this.$axios('/base/quality-inspection-det/listAll').then((response) => {
|
this.$axios('/base/quality-inspection-det/listAll').then((response) => {
|
||||||
this.searchBarFormConfig[1].selectOptions = response.data.map(
|
this.searchBarFormConfig[1].selectOptions = response.data.map(
|
||||||
(item) => {
|
(item) => {
|
||||||
return {
|
return {
|
||||||
name: item.content,
|
name: item.content,
|
||||||
id: item.content,
|
id: item.content,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
})
|
});
|
||||||
this.$axios('base/quality-inspection-box-btn-auth/getUserList', {
|
this.$axios('base/quality-inspection-box-btn-auth/getUserList', {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 999
|
pageSize: 999,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
this.searchBarFormConfig[2].selectOptions = res.data.map((item) => ({
|
this.searchBarFormConfig[2].selectOptions = res.data.map((item) => ({
|
||||||
name: item.username,
|
name: item.username,
|
||||||
id: item.username,
|
id: item.username,
|
||||||
}));
|
}));
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
// 执行查询
|
// 执行查询
|
||||||
let str = this.queryParams.checkPerson ? this.queryParams.checkPerson.join() :undefined
|
let str = this.queryParams.checkPerson
|
||||||
this.queryParams.checkPerson = str
|
? this.queryParams.checkPerson.join()
|
||||||
|
: undefined;
|
||||||
|
this.queryParams.checkPerson = str;
|
||||||
getQualityInspectionRecordPage(this.queryParams).then((response) => {
|
getQualityInspectionRecordPage(this.queryParams).then((response) => {
|
||||||
this.list = response.data.list;
|
this.list = response.data.list;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
@ -396,8 +430,8 @@ export default {
|
|||||||
inspectionDetContent: undefined,
|
inspectionDetContent: undefined,
|
||||||
sectionId: undefined,
|
sectionId: undefined,
|
||||||
checkPerson: undefined,
|
checkPerson: undefined,
|
||||||
checkTime: undefined,
|
checkTime: undefined,
|
||||||
workOrderId:undefined,
|
workOrderId: undefined,
|
||||||
source: undefined,
|
source: undefined,
|
||||||
explainText: undefined,
|
explainText: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
@ -426,14 +460,14 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
getQualityInspectionRecord(id).then((response) => {
|
getQualityInspectionRecord(id).then((response) => {
|
||||||
/** 因为后端返回的时间是时间戳格式,需转换 */
|
/** 因为后端返回的时间是时间戳格式,需转换 */
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
const info = {}
|
const info = {};
|
||||||
Object.keys(this.form).forEach(key => {
|
Object.keys(this.form).forEach((key) => {
|
||||||
info[key] = response.data[key]
|
info[key] = response.data[key];
|
||||||
});
|
});
|
||||||
this.form = info;
|
this.form = info;
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '修改质量检查信息记录表';
|
this.title = '修改质量检查信息记录表';
|
||||||
});
|
});
|
||||||
@ -444,9 +478,9 @@ export default {
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
let str = this.form.checkPerson ? this.form.checkPerson.join() : null
|
let str = this.form.checkPerson ? this.form.checkPerson.join() : null;
|
||||||
this.form.checkPerson = str
|
this.form.checkPerson = str;
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateQualityInspectionRecord(this.form).then((response) => {
|
updateQualityInspectionRecord(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess('修改成功');
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
@ -60,26 +60,26 @@ export default {
|
|||||||
list: [],
|
list: [],
|
||||||
dynamicProps:[],
|
dynamicProps:[],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
// {
|
||||||
type: 'select',
|
// type: 'select',
|
||||||
label: '工单名称',
|
// label: '工单名称',
|
||||||
placeholder: '请选择工单名称',
|
// placeholder: '请选择工单名称',
|
||||||
param: 'workOrderIdList',
|
// param: 'workOrderIdList',
|
||||||
selectOptions: [],
|
// selectOptions: [],
|
||||||
multiple: true,
|
// multiple: true,
|
||||||
labelField: 'name',
|
// labelField: 'name',
|
||||||
valueField: 'id',
|
// valueField: 'id',
|
||||||
defaultSelect: [],
|
// defaultSelect: [],
|
||||||
filterable: true
|
// filterable: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
type: 'select',
|
// type: 'select',
|
||||||
label: '产品',
|
// label: '产品',
|
||||||
placeholder: '请选择产品',
|
// placeholder: '请选择产品',
|
||||||
param: 'productionId',
|
// param: 'productionId',
|
||||||
selectOptions: [],
|
// selectOptions: [],
|
||||||
filterable: true
|
// filterable: true
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// type: 'input',
|
// type: 'input',
|
||||||
// label: '检测内容',
|
// label: '检测内容',
|
||||||
@ -193,8 +193,8 @@ export default {
|
|||||||
// },
|
// },
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
workOrderIdList:undefined,
|
// workOrderIdList:undefined,
|
||||||
productionId: undefined,
|
// productionId: undefined,
|
||||||
startTime: undefined,
|
startTime: undefined,
|
||||||
endTime: undefined,
|
endTime: undefined,
|
||||||
// productionLineId: null,
|
// productionLineId: null,
|
||||||
@ -207,16 +207,16 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
tableProps() {
|
tableProps() {
|
||||||
return [
|
return [
|
||||||
{
|
// {
|
||||||
// width: 128,
|
// // width: 128,
|
||||||
prop: 'workOrderName',
|
// prop: 'workOrderName',
|
||||||
label: '工单名称',
|
// label: '工单名称',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
// width: 128,
|
// // width: 128,
|
||||||
prop: 'productionName',
|
// prop: 'productionName',
|
||||||
label: '产品',
|
// label: '产品',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
// width: 160,
|
// width: 160,
|
||||||
prop: 'inspectionContent',
|
prop: 'inspectionContent',
|
||||||
@ -259,17 +259,17 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.$route.query.woIdString) {
|
// if (this.$route.query.woIdString) {
|
||||||
console.log(this.$route.query.woIdString)
|
// console.log(this.$route.query.woIdString)
|
||||||
this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',')
|
// this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',')
|
||||||
// this.queryParams.workOrderIdList = [this.$route.query.woIdString]
|
// // this.queryParams.workOrderIdList = [this.$route.query.woIdString]
|
||||||
// let arr =[]
|
// // let arr =[]
|
||||||
this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',')
|
// this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',')
|
||||||
console.log(this.searchBarFormConfig[0].defaultSelect);
|
// console.log(this.searchBarFormConfig[0].defaultSelect);
|
||||||
}
|
// }
|
||||||
if (this.$route.query.startTime && this.$route.query.endTime) {
|
if (this.$route.query.startTime && this.$route.query.endTime) {
|
||||||
// console.log(this.$route.query.startTime);
|
// console.log(this.$route.query.startTime);
|
||||||
this.searchBarFormConfig[2].defaultSelect = [moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss'), moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss'),]
|
this.searchBarFormConfig[0].defaultSelect = [moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss'), moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss'),]
|
||||||
this.queryParams.startTime = moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss')
|
this.queryParams.startTime = moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss')
|
||||||
this.queryParams.endTime = moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss')
|
this.queryParams.endTime = moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss')
|
||||||
}
|
}
|
||||||
@ -370,8 +370,8 @@ export default {
|
|||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
handleSearchBarBtnClick(val) {
|
handleSearchBarBtnClick(val) {
|
||||||
if (val.btnName === 'search') {
|
if (val.btnName === 'search') {
|
||||||
this.queryParams.workOrderIdList = val.workOrderIdList ? val.workOrderIdList : undefined
|
// this.queryParams.workOrderIdList = val.workOrderIdList ? val.workOrderIdList : undefined
|
||||||
this.queryParams.productionId = val.productionId ? val.productionId : undefined
|
// this.queryParams.productionId = val.productionId ? val.productionId : undefined
|
||||||
this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined
|
this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined
|
||||||
this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined
|
this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined
|
||||||
this.getList()
|
this.getList()
|
||||||
|
@ -68,6 +68,7 @@ export default {
|
|||||||
label: '生产线',
|
label: '生产线',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'lineId',
|
param: 'lineId',
|
||||||
|
multiple: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -104,6 +105,7 @@ export default {
|
|||||||
label: '生产线',
|
label: '生产线',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'lineId',
|
param: 'lineId',
|
||||||
|
multiple: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -137,12 +139,12 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
lineId: '',
|
lineId: [],
|
||||||
},
|
},
|
||||||
queryParams2: {
|
queryParams2: {
|
||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
lineId: '',
|
lineId: [],
|
||||||
},
|
},
|
||||||
tableProp1,
|
tableProp1,
|
||||||
tableProp: [],
|
tableProp: [],
|
||||||
@ -150,11 +152,11 @@ export default {
|
|||||||
tableProp2: [],
|
tableProp2: [],
|
||||||
tableData2: [],
|
tableData2: [],
|
||||||
procedureName: [
|
procedureName: [
|
||||||
{ name: '压延(拉引量t)', ename: 'calenderingCapacity' },
|
// { name: '压延(拉引量t)', ename: 'calenderingCapacity' },
|
||||||
{ name: '优化切割(片)', ename: 'cuttingNum' },
|
{ name: '优化切割(片)', ename: 'cuttingNum' },
|
||||||
{ name: '堆垛(片)', ename: 'unloadPieces' },
|
{ name: '堆垛(片)', ename: 'unloadPieces' },
|
||||||
{ name: '堆垛(托)', ename: 'unloadCount' },
|
{ name: '堆垛(托)', ename: 'unloadCount' },
|
||||||
{ name: '良品率(%)', ename: 'rate' },
|
{ name: '优切良品率(%)', ename: 'rate' },
|
||||||
],
|
],
|
||||||
span: [], //表2第一列合并
|
span: [], //表2第一列合并
|
||||||
};
|
};
|
||||||
@ -311,10 +313,10 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
if (data[i].lineName === data[i - 1].lineName) {
|
if (data[i].lineName === data[i - 1].lineName) {
|
||||||
//相同产线,添加列
|
//相同产线,添加列
|
||||||
let startNum = 5 * (lineNum - 1);
|
let startNum = 4 * (lineNum - 1);
|
||||||
let endNum = 5 * lineNum - 1;
|
let endNum = 4 * lineNum - 1;
|
||||||
for (let k = startNum; k <= endNum; k++) {
|
for (let k = startNum; k <= endNum; k++) {
|
||||||
let str = this.procedureName[k % 5];
|
let str = this.procedureName[k % 4];
|
||||||
tempData[k][data[i].timeStr] = data[i][str.ename];
|
tempData[k][data[i].timeStr] = data[i][str.ename];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -356,9 +358,9 @@ export default {
|
|||||||
// 合并第一列
|
// 合并第一列
|
||||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
if (rowIndex % 5 === 0) {
|
if (rowIndex % 4 === 0) {
|
||||||
return {
|
return {
|
||||||
rowspan: 5,
|
rowspan: 4,
|
||||||
colspan: 1,
|
colspan: 1,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
@ -472,7 +474,7 @@ export default {
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
background-color: #ebeef5;
|
background-color: #ebeef5;
|
||||||
transform: rotate(-70deg);
|
transform: rotate(-63deg);
|
||||||
-webkit-transform-origin: top;
|
-webkit-transform-origin: top;
|
||||||
transform-origin: top;
|
transform-origin: top;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
@ -480,11 +482,11 @@ export default {
|
|||||||
.el-table thead.is-group tr:last-of-type th:nth-child(1):before {
|
.el-table thead.is-group tr:last-of-type th:nth-child(1):before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 67px;
|
height: 93px;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 75px;
|
left: 55px;
|
||||||
background-color: #ebeef5;
|
background-color: #ebeef5;
|
||||||
transform: rotate(-70deg);
|
transform: rotate(-63deg);
|
||||||
-webkit-transform-origin: top;
|
-webkit-transform-origin: top;
|
||||||
transform-origin: top;
|
transform-origin: top;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2024-04-22 15:49:56
|
* @Date: 2024-04-22 15:49:56
|
||||||
* @LastEditTime: 2024-04-25 14:30:44
|
* @LastEditTime: 2024-04-26 10:32:29
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -43,12 +43,16 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
<base-table
|
<base-table
|
||||||
|
ref="productionDataMonthTable11"
|
||||||
|
id="productionDataMonthTable1"
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:table-data="tableData"
|
:table-data="tableData"
|
||||||
:span-method="objectSpanMethod1"
|
:span-method="objectSpanMethod1"
|
||||||
@emitFun="handleEmitFun"
|
@emitFun="handleEmitFun"
|
||||||
:max-height="tableH" />
|
:max-height="tableH" />
|
||||||
<base-table
|
<base-table
|
||||||
|
ref="productionDataMonthTable22"
|
||||||
|
id="productionDataMonthTable2"
|
||||||
:table-props="tableProps1"
|
:table-props="tableProps1"
|
||||||
:table-data="tableData1"
|
:table-data="tableData1"
|
||||||
:span-method="objectSpanMethod1"
|
:span-method="objectSpanMethod1"
|
||||||
@ -94,26 +98,47 @@ export default {
|
|||||||
now.setHours(0, 0, 0, 0)
|
now.setHours(0, 0, 0, 0)
|
||||||
now.setDate(1)
|
now.setDate(1)
|
||||||
let startOfMonth = now.getTime()
|
let startOfMonth = now.getTime()
|
||||||
// let firstDayOfMonth = new Date(startOfMonth)
|
|
||||||
this.listQuery.time = startOfMonth
|
this.listQuery.time = startOfMonth
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getTime1() {
|
||||||
|
const firstDayOfMonth = new Date(this.listQuery.time)
|
||||||
|
const lastDayOfMonth = new Date(firstDayOfMonth.getFullYear(), firstDayOfMonth.getMonth() + 1, 0, 0, 0, 0, 0)
|
||||||
|
// console.log('时间', parseTime(firstDayOfMonth), parseTime(lastDayOfMonth))
|
||||||
|
this.$set(this.tableProps[2], 'label', '许昌安彩月原片生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')')
|
||||||
|
this.$set(this.tableProps1[2], 'label', '许昌安彩月成品生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')')
|
||||||
|
// this.tableProps[2].label = '许昌安彩月原片生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')'
|
||||||
|
// this.tableProps1[2].label = '许昌安彩月成品生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')'
|
||||||
|
console.log(this.tableProps, this.tableProps1)
|
||||||
|
},
|
||||||
async getList() {
|
async getList() {
|
||||||
|
const firstDayOfMonth = new Date(this.listQuery.time)
|
||||||
|
const lastDayOfMonth = new Date(firstDayOfMonth.getFullYear(), firstDayOfMonth.getMonth() + 1, 0, 0, 0, 0, 0)
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.tableProps = [
|
this.tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'lineName',
|
prop: 'lineName',
|
||||||
label: '',
|
label: '',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
|
width: 120,
|
||||||
|
'show-overflow-tooltip': true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'paramsName',
|
prop: 'paramsName',
|
||||||
label: '',
|
label: '',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
|
width: 120,
|
||||||
|
'show-overflow-tooltip': true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'xc',
|
||||||
|
label: '许昌安彩月原片生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')',
|
||||||
|
// align: 'center',
|
||||||
|
children: []
|
||||||
|
}
|
||||||
];
|
];
|
||||||
this.tableData1 = [];
|
this.tableData1 = [];
|
||||||
this.tableProps1 = [
|
this.tableProps1 = [
|
||||||
@ -121,18 +146,28 @@ export default {
|
|||||||
prop: 'lineName',
|
prop: 'lineName',
|
||||||
label: '',
|
label: '',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
|
width: 120,
|
||||||
|
'show-overflow-tooltip': true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'paramsName',
|
prop: 'paramsName',
|
||||||
label: '',
|
label: '',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
|
width: 120,
|
||||||
|
'show-overflow-tooltip': true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'xc1',
|
||||||
|
label: '许昌安彩月成品生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')',
|
||||||
|
// align: 'center',
|
||||||
|
children: []
|
||||||
|
}
|
||||||
];
|
];
|
||||||
await productionMonthY(this.listQuery).then((res) => {
|
await productionMonthY(this.listQuery).then((res) => {
|
||||||
this.resData = res.data;
|
this.resData = res.data;
|
||||||
// 设置表头
|
// 设置表头
|
||||||
Object.keys(this.resData).forEach((item) => {
|
Object.keys(this.resData).forEach((item) => {
|
||||||
this.tableProps.push({
|
this.tableProps[2].children.push({
|
||||||
prop: item,
|
prop: item,
|
||||||
label: item,
|
label: item,
|
||||||
'show-overflow-tooltip': true,
|
'show-overflow-tooltip': true,
|
||||||
@ -144,7 +179,7 @@ export default {
|
|||||||
this.resData1 = res.data;
|
this.resData1 = res.data;
|
||||||
// 设置表头
|
// 设置表头
|
||||||
Object.keys(this.resData1).forEach((item) => {
|
Object.keys(this.resData1).forEach((item) => {
|
||||||
this.tableProps1.push({
|
this.tableProps1[2].children.push({
|
||||||
prop: item,
|
prop: item,
|
||||||
label: item,
|
label: item,
|
||||||
'show-overflow-tooltip': true,
|
'show-overflow-tooltip': true,
|
||||||
@ -152,6 +187,7 @@ export default {
|
|||||||
});
|
});
|
||||||
this.buildTableData1(this.resData1);
|
this.buildTableData1(this.resData1);
|
||||||
});
|
});
|
||||||
|
// this.getTime1()
|
||||||
},
|
},
|
||||||
// 设置表格2数据
|
// 设置表格2数据
|
||||||
buildTableData1(data) {
|
buildTableData1(data) {
|
||||||
@ -187,6 +223,9 @@ export default {
|
|||||||
}
|
}
|
||||||
this.tableData1 = tempData;
|
this.tableData1 = tempData;
|
||||||
this.getSpanArr1(this.tableData1);
|
this.getSpanArr1(this.tableData1);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.reTable1();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 设置表格数据
|
// 设置表格数据
|
||||||
buildTableData(data) {
|
buildTableData(data) {
|
||||||
@ -222,6 +261,15 @@ export default {
|
|||||||
}
|
}
|
||||||
this.tableData = tempData;
|
this.tableData = tempData;
|
||||||
this.getSpanArr(this.tableData);
|
this.getSpanArr(this.tableData);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.reTable();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
reTable() {
|
||||||
|
this.$refs.productionDataMonthTable11.doLayout('productionDataMonthTable1');
|
||||||
|
},
|
||||||
|
reTable1() {
|
||||||
|
this.$refs.productionDataMonthTable22.doLayout('productionDataMonthTable2');
|
||||||
},
|
},
|
||||||
getSpanArr1(data) {
|
getSpanArr1(data) {
|
||||||
this.span2 = [];
|
this.span2 = [];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2024-04-22 15:49:56
|
* @Date: 2024-04-22 15:49:56
|
||||||
* @LastEditTime: 2024-04-25 11:14:34
|
* @LastEditTime: 2024-04-26 10:34:12
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -43,12 +43,16 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
<base-table
|
<base-table
|
||||||
|
ref="productionDataYearTable11"
|
||||||
|
id="productionDataYearTable1"
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:table-data="tableData"
|
:table-data="tableData"
|
||||||
:span-method="objectSpanMethod1"
|
:span-method="objectSpanMethod1"
|
||||||
@emitFun="handleEmitFun"
|
@emitFun="handleEmitFun"
|
||||||
:max-height="tableH" />
|
:max-height="tableH" />
|
||||||
<base-table
|
<base-table
|
||||||
|
ref="productionDataYearTable22"
|
||||||
|
id="productionDataYearTable2"
|
||||||
:table-props="tableProps1"
|
:table-props="tableProps1"
|
||||||
:table-data="tableData1"
|
:table-data="tableData1"
|
||||||
:span-method="objectSpanMethod1"
|
:span-method="objectSpanMethod1"
|
||||||
@ -103,19 +107,39 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getTime() {
|
||||||
|
const firstDayOfYear = new Date(this.listQuery.time)
|
||||||
|
const lastDayOfYear = new Date(firstDayOfYear.getFullYear() + 1, 0, 0, 0, 0, 0, 0)
|
||||||
|
// console.log('时间', parseTime(firstDayOfMonth), parseTime(lastDayOfMonth))
|
||||||
|
this.tableProps[0].label = '许昌安彩年原片生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')'
|
||||||
|
this.tableProps1[0].label = '许昌安彩年成品生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')'
|
||||||
|
},
|
||||||
async getList() {
|
async getList() {
|
||||||
|
// this.getTime()
|
||||||
|
const firstDayOfYear = new Date(this.listQuery.time)
|
||||||
|
const lastDayOfYear = new Date(firstDayOfYear.getFullYear() + 1, 0, 0, 0, 0, 0, 0)
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.tableProps = [
|
this.tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'lineName',
|
prop: 'lineName',
|
||||||
label: '',
|
label: '',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
|
width: 120,
|
||||||
|
'show-overflow-tooltip': true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'paramsName',
|
prop: 'paramsName',
|
||||||
label: '',
|
label: '',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
|
width: 120,
|
||||||
|
'show-overflow-tooltip': true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'xc',
|
||||||
|
label: '许昌安彩年原片生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')',
|
||||||
|
// align: 'center',
|
||||||
|
children: []
|
||||||
|
}
|
||||||
];
|
];
|
||||||
this.tableData1 = [];
|
this.tableData1 = [];
|
||||||
this.tableProps1 = [
|
this.tableProps1 = [
|
||||||
@ -123,18 +147,26 @@ export default {
|
|||||||
prop: 'lineName',
|
prop: 'lineName',
|
||||||
label: '',
|
label: '',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
|
'show-overflow-tooltip': true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'paramsName',
|
prop: 'paramsName',
|
||||||
label: '',
|
label: '',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
|
'show-overflow-tooltip': true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'xc1',
|
||||||
|
label: '许昌安彩年成品生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')',
|
||||||
|
// align: 'center',
|
||||||
|
children: []
|
||||||
|
}
|
||||||
];
|
];
|
||||||
await productionYearY(this.listQuery).then((res) => {
|
await productionYearY(this.listQuery).then((res) => {
|
||||||
this.resData = res.data;
|
this.resData = res.data;
|
||||||
// 设置表头
|
// 设置表头
|
||||||
Object.keys(this.resData).forEach((item) => {
|
Object.keys(this.resData).forEach((item) => {
|
||||||
this.tableProps.push({
|
this.tableProps[2].children.push({
|
||||||
prop: item,
|
prop: item,
|
||||||
label: item,
|
label: item,
|
||||||
'show-overflow-tooltip': true,
|
'show-overflow-tooltip': true,
|
||||||
@ -146,7 +178,7 @@ export default {
|
|||||||
this.resData1 = res.data;
|
this.resData1 = res.data;
|
||||||
// 设置表头
|
// 设置表头
|
||||||
Object.keys(this.resData1).forEach((item) => {
|
Object.keys(this.resData1).forEach((item) => {
|
||||||
this.tableProps1.push({
|
this.tableProps1[2].children.push({
|
||||||
prop: item,
|
prop: item,
|
||||||
label: item,
|
label: item,
|
||||||
'show-overflow-tooltip': true,
|
'show-overflow-tooltip': true,
|
||||||
@ -189,6 +221,9 @@ export default {
|
|||||||
}
|
}
|
||||||
this.tableData1 = tempData;
|
this.tableData1 = tempData;
|
||||||
this.getSpanArr1(this.tableData1);
|
this.getSpanArr1(this.tableData1);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.reTable1();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 设置表格数据
|
// 设置表格数据
|
||||||
buildTableData(data) {
|
buildTableData(data) {
|
||||||
@ -224,6 +259,15 @@ export default {
|
|||||||
}
|
}
|
||||||
this.tableData = tempData;
|
this.tableData = tempData;
|
||||||
this.getSpanArr(this.tableData);
|
this.getSpanArr(this.tableData);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.reTable();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
reTable() {
|
||||||
|
this.$refs.productionDataYearTable11.doLayout('productionDataYearTable1');
|
||||||
|
},
|
||||||
|
reTable1() {
|
||||||
|
this.$refs.productionDataYearTable22.doLayout('productionDataYearTable2');
|
||||||
},
|
},
|
||||||
getSpanArr1(data) {
|
getSpanArr1(data) {
|
||||||
this.span2 = [];
|
this.span2 = [];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-18 14:08:46
|
* @Date: 2024-04-18 14:08:46
|
||||||
* @LastEditTime: 2024-04-25 17:13:28
|
* @LastEditTime: 2024-04-26 09:10:53
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -13,7 +13,7 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产线" prop="productionLineId">
|
<el-form-item label="产线" prop="productionLineId">
|
||||||
<el-select v-model="listQuery.productionLineId" placeholder="请选择">
|
<el-select v-model="listQuery.productionLineId" placeholder="请选择" clearable>
|
||||||
<el-option v-for="item in lineList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option v-for="item in lineList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick"
|
||||||
|
@datepicker-change="datepickerChange" />
|
||||||
<base-table
|
<base-table
|
||||||
class="israLineReportTable1"
|
class="israLineReportTable1"
|
||||||
ref="israLineReportTable11"
|
ref="israLineReportTable11"
|
||||||
@ -57,14 +58,16 @@ export default {
|
|||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间段',
|
label: '时间段',
|
||||||
dateType: 'daterange',
|
dateType: 'daterange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd HH:mm',
|
||||||
valueFormat: 'yyyy-MM-dd',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
param: 'timeVal',
|
param: 'timeVal',
|
||||||
defaultSelect: [],
|
defaultSelect: [],
|
||||||
width: 250,
|
width: 300,
|
||||||
|
onchange: true,
|
||||||
|
clearable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -106,12 +109,14 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.tableProp = this.tableProp1;
|
this.tableProp = this.tableProp1;
|
||||||
let start = moment().format('yyyy-MM-DD');
|
let start = moment(moment().format('yyyy-MM-DD') + ' 07:00:00').format(
|
||||||
let end = moment().format('yyyy-MM-DD');
|
'yyyy-MM-DD HH:mm:ss'
|
||||||
|
);
|
||||||
|
let end =
|
||||||
|
moment(moment().valueOf() + 86400000).format('yyyy-MM-DD') + ' 06:59:59';
|
||||||
this.formConfig[0].defaultSelect = [start, end];
|
this.formConfig[0].defaultSelect = [start, end];
|
||||||
this.queryParams.startTime =
|
this.queryParams.startTime = moment(start).valueOf();
|
||||||
moment(start + ' 00:00:00').valueOf() + 25200000;
|
this.queryParams.endTime = moment(end).valueOf();
|
||||||
this.queryParams.endTime = moment(end + ' 23:59:59').valueOf() + 25200000;
|
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -237,13 +242,22 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 时间选择器change
|
||||||
|
datepickerChange(val) {
|
||||||
|
console.log(val);
|
||||||
|
let start = moment(
|
||||||
|
moment(val.value[0]).format('yyyy-MM-DD') + ' 07:00:00'
|
||||||
|
).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
let end =
|
||||||
|
moment(moment(val.value[1]).valueOf() + 86400000).format('yyyy-MM-DD') +
|
||||||
|
' 06:59:59';
|
||||||
|
this.formConfig[0].defaultSelect = [start, end];
|
||||||
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
if (val.btnName === 'search') {
|
if (val.btnName === 'search') {
|
||||||
if (val.timeVal && val.timeVal.length > 0) {
|
if (val.timeVal && val.timeVal.length > 0) {
|
||||||
this.queryParams.startTime =
|
this.queryParams.startTime = moment(val.timeVal[0]).valueOf();
|
||||||
moment(val.timeVal[0] + ' 00:00:00').valueOf() + 25200000;
|
this.queryParams.endTime = moment(val.timeVal[1]).valueOf();
|
||||||
this.queryParams.endTime =
|
|
||||||
moment(val.timeVal[1] + ' 23:59:59').valueOf() + 25200000;
|
|
||||||
}
|
}
|
||||||
this.queryParams.lineId = val.lineId;
|
this.queryParams.lineId = val.lineId;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-18 10:01:33
|
* @Date: 2024-04-18 10:01:33
|
||||||
* @LastEditTime: 2024-04-25 17:13:43
|
* @LastEditTime: 2024-04-26 09:42:54
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -56,7 +56,7 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'equipmentName',
|
prop: 'equipmentName',
|
||||||
label: '',
|
label: '机械手名称',
|
||||||
width: '200'
|
width: '200'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-18 15:07:53
|
* @Date: 2024-04-18 15:07:53
|
||||||
* @LastEditTime: 2024-04-26 08:42:00
|
* @LastEditTime: 2024-04-26 09:41:54
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||||
<el-table :header-cell-style="{
|
<el-table :max-height="tableH" :header-cell-style="{
|
||||||
background: '#F2F4F9',
|
background: '#F2F4F9',
|
||||||
color: '#606266'
|
color: '#606266'
|
||||||
}" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod">
|
}" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod">
|
||||||
@ -40,6 +40,8 @@ import {
|
|||||||
} from '@/api/report/qcReport';
|
} from '@/api/report/qcReport';
|
||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||||
import FileSaver from 'file-saver'
|
import FileSaver from 'file-saver'
|
||||||
|
// import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||||
|
|
||||||
// import { getList, } from "@/api/base/qualityScrapType";
|
// import { getList, } from "@/api/base/qualityScrapType";
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
// {
|
// {
|
||||||
@ -54,7 +56,7 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'dataType',
|
prop: 'dataType',
|
||||||
label: '',
|
label: '类别',
|
||||||
width: '150',
|
width: '150',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -71,7 +73,12 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'rate',
|
prop: 'rate',
|
||||||
label: '占比%',
|
label: '占比(%)',
|
||||||
|
// filter: (val) => val == false ? '不合格' : '合格',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'rateSum',
|
||||||
|
label: '综合成品率(%)',
|
||||||
// filter: (val) => val == false ? '不合格' : '合格',
|
// filter: (val) => val == false ? '不合格' : '合格',
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@ -286,14 +293,15 @@ export default {
|
|||||||
// })
|
// })
|
||||||
this.tableData = response.data.map((ele) => {
|
this.tableData = response.data.map((ele) => {
|
||||||
return {
|
return {
|
||||||
dataType: ele.dataType == 1 ? '成品' : ele.dataType == 2 ? '取样' : '废版',
|
dataType: ele.dataType == 1 ? '成品' : ele.dataType == 2 ? '取样板' : ele.dataType == 4 ? '合计' : ele.dataType == 3 ? '废版' : '',
|
||||||
code: ele.code,
|
code: ele.code,
|
||||||
putNum: ele.putNum,
|
putNum: ele.putNum,
|
||||||
lineName: ele.lineName,
|
lineName: ele.lineName,
|
||||||
type: ele.type,
|
type: ele.type == '合计' ? '' : ele.type,
|
||||||
pieces: ele.pieces,
|
pieces: ele.pieces,
|
||||||
area: ele.area,
|
area: ele.area,
|
||||||
rate: (ele.rate * 100).toFixed(2)
|
rate: ele.lineName != '总计' && ele.rate ? (ele.rate * 100).toFixed(2) : '',
|
||||||
|
rateSum: ele.lineName === '总计' ? (ele.rate * 100).toFixed(2) : ''
|
||||||
// useNum: ele.useNum,
|
// useNum: ele.useNum,
|
||||||
// num: ele.num,
|
// num: ele.num,
|
||||||
// size: typeof (ele.size)
|
// size: typeof (ele.size)
|
||||||
|
Loading…
Reference in New Issue
Block a user