projects/mesxc-zhp #370
@ -1,20 +1,61 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 14:55:51
|
* @Date: 2023-08-01 14:55:51
|
||||||
* @LastEditors: zhp
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-04-07 16:25:19
|
* @LastEditTime: 2024-04-25 14:42:53
|
||||||
* @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" /> -->
|
||||||
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
:model="listQuery"
|
||||||
|
class="blueTip">
|
||||||
|
<el-form-item label="合格证号" prop="certificateNumber">
|
||||||
|
<el-input size="small" v-model="listQuery.certificateNumber" clearable placeholder="合格证号" @blur="countTimes(1)" @clear="countArray[0] = false"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="成品周转编号" prop="packagingCode">
|
||||||
|
<el-input size="small" v-model="listQuery.packagingCode" clearable placeholder="成品周转编号" @blur="countTimes(2)" @clear="countArray[1] = false"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="原片周转编号" prop="glassCode">
|
||||||
|
<el-input size="small" v-model="listQuery.glassCode" clearable placeholder="原片周转编号" @blur="countTimes(3)" @clear="countArray[2] = false"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="包装全检时间及产线" prop="val">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="listQuery.timeVal"
|
||||||
|
value-format="timestamp"
|
||||||
|
type="datetimerange"
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
start-placeholder="包装全检开始时间"
|
||||||
|
end-placeholder="包装全检结束时间"
|
||||||
|
range-separator="-"
|
||||||
|
@change="countTimes('timestamp3')"
|
||||||
|
/>
|
||||||
|
<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-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
v-if="this.$auth.hasPermi('monitoring:rawMaterial-traceability:query')"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="getList">
|
||||||
|
查询
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- <base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
|
||||||
|
:table-data="list"> -->
|
||||||
|
<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="120" 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" /> -->
|
||||||
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" /> -->
|
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" /> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -34,35 +75,17 @@ import {
|
|||||||
} from '@/api/quality/rawMaterialTraceability';
|
} from '@/api/quality/rawMaterialTraceability';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: 'orderName',
|
prop: 'certificateNumber',
|
||||||
label: '订单名称',
|
label: '合格证号',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderName',
|
prop: 'boxNumber',
|
||||||
label: '工单名称',
|
label: '箱号',
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'palletNumber',
|
|
||||||
label: '托号',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'transportQuantity',
|
|
||||||
label: '该托片数',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'packagingCode',
|
prop: 'packagingCode',
|
||||||
label: '包装条码',
|
label: '成品周转编号',
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'originalGlassLineName',
|
|
||||||
label: '原片产线',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'originalGlassOutputTime',
|
|
||||||
label: '原片下片时间',
|
|
||||||
filter: parseTime
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'deepProcessingLineName',
|
prop: 'deepProcessingLineName',
|
||||||
@ -74,10 +97,23 @@ const tableProps = [
|
|||||||
filter: parseTime
|
filter: parseTime
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'productionOutputTime',
|
prop: 'deepProcessingOutputTime',
|
||||||
label: '深加工下片时间',
|
label: '深加工下片时间',
|
||||||
filter: parseTime
|
filter: parseTime
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'glassCode',
|
||||||
|
label: '原片周转编码',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalGlassLineName',
|
||||||
|
label: '原片产线',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalGlassOutputTime',
|
||||||
|
label: '原片下片时间',
|
||||||
|
filter: parseTime
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// prop: 'scrapDetail',
|
// prop: 'scrapDetail',
|
||||||
// label: '详情',
|
// label: '详情',
|
||||||
@ -115,37 +151,70 @@ export default {
|
|||||||
// ].filter((v) => v),
|
// ].filter((v) => v),
|
||||||
list: [],
|
list: [],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
pageSize: 10,
|
// pageSize: 10,
|
||||||
pageNo: 1,
|
// pageNo: 1,
|
||||||
total: 0,
|
// total: 0,
|
||||||
workOrderId: undefined,
|
certificateNumber: undefined,
|
||||||
startTime: undefined,
|
packagingCode: undefined,
|
||||||
endTime:undefined,
|
timeVal:undefined,
|
||||||
|
lineName: undefined,
|
||||||
|
glassCode: undefined
|
||||||
},
|
},
|
||||||
|
count: 0,
|
||||||
|
useTime: false,
|
||||||
|
countArray: [],
|
||||||
// tableH: this.tableHeight(260),
|
// tableH: this.tableHeight(260),
|
||||||
formConfig: [
|
formConfig: [
|
||||||
|
// {
|
||||||
|
// type: 'select',
|
||||||
|
// label: '工单',
|
||||||
|
// selectOptions: [],
|
||||||
|
// labelField: 'name',
|
||||||
|
// valueField: 'name',
|
||||||
|
// param: 'workOrderName',
|
||||||
|
// filterable: true
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '合格证号',
|
||||||
|
placeholder: '合格证号',
|
||||||
|
param: 'certificateNumber',
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '成品周转编号',
|
||||||
|
placeholder: '成品周转编号',
|
||||||
|
param: 'packagingCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '包装全检时间及产线',
|
||||||
|
dateType: 'datetimerange',
|
||||||
|
format: 'timestamp',
|
||||||
|
valueFormat: "timestamp",
|
||||||
|
rangeSeparator: '-',
|
||||||
|
startPlaceholder: '开始时间',
|
||||||
|
endPlaceholder: '结束时间',
|
||||||
|
param: 'timeVal',
|
||||||
|
defaultSelect: [],
|
||||||
|
width: 250
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '工单',
|
label: '',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'name',
|
valueField: 'name',
|
||||||
param: 'workOrderName',
|
param: 'lineName',
|
||||||
filterable: true
|
filterable: true
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// type: 'datePicker',
|
type: 'input',
|
||||||
// label: '时间段',
|
label: '原片周转编号',
|
||||||
// dateType: 'daterange',
|
placeholder: '原片周转编号',
|
||||||
// format: 'yyyy-MM-dd',
|
param: 'glassCode'
|
||||||
// valueFormat: "yyyy-MM-dd",
|
},
|
||||||
// rangeSeparator: '-',
|
|
||||||
// startPlaceholder: '开始时间',
|
|
||||||
// endPlaceholder: '结束时间',
|
|
||||||
// param: 'timeVal',
|
|
||||||
// defaultSelect: [],
|
|
||||||
// width: 250
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
|
|
||||||
type: this.$auth.hasPermi('monitoring:rawMaterial-traceability:query') ? 'button' : '',
|
type: this.$auth.hasPermi('monitoring:rawMaterial-traceability:query') ? 'button' : '',
|
||||||
@ -191,17 +260,58 @@ export default {
|
|||||||
// window.addEventListener('resize', () => {
|
// window.addEventListener('resize', () => {
|
||||||
// this.tableH = this.tableHeight(260)
|
// this.tableH = this.tableHeight(260)
|
||||||
// })
|
// })
|
||||||
this.getList()
|
this.count = 0
|
||||||
|
this.useTime = false
|
||||||
|
// this.getList()
|
||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
countTimes(val) {
|
||||||
|
if (val === 1) {
|
||||||
|
let temp = this.listQuery?.certificateNumber !== ''
|
||||||
|
this.countArray[0] = temp
|
||||||
|
console.log('你好', this.countArray)
|
||||||
|
}
|
||||||
|
if (val && val !== '') {
|
||||||
|
if (val === 'timestamp3') {
|
||||||
|
if (this.listQuery.timeVal.length > 0 || this.listQuery?.lineName !== '') {
|
||||||
|
this.useTime = true
|
||||||
|
} else {
|
||||||
|
this.useTime = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.count ++
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.count --
|
||||||
|
}
|
||||||
|
},
|
||||||
getList() {
|
getList() {
|
||||||
|
// console.log('nihc ', this.count, this.listQuery)
|
||||||
|
// if (this.count > 1) {
|
||||||
|
// this.$message.error('请选择一个条件进行查询!')
|
||||||
|
// } else {
|
||||||
|
// if (this.useTime === true) {
|
||||||
|
// if (this.listQuery.timeVal.length > 0 && this.listQuery?.lineName !== '') {
|
||||||
|
// getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
// this.list = res.data || []
|
||||||
|
// console.log(this.list);
|
||||||
|
// // this.listQuery.total = res.data.total || 0
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// this.$message.error('选择包装全检时,时间和产线必填!')
|
||||||
|
// }
|
||||||
|
// } 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
|
// this.listQuery.total = res.data.total || 0
|
||||||
})
|
})
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
getDict() {
|
getDict() {
|
||||||
// 获取产品的属性列表
|
// 获取产品的属性列表
|
||||||
@ -243,7 +353,7 @@ export default {
|
|||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
console.log(val)
|
console.log(val)
|
||||||
if (val.btnName === 'search') {
|
if (val.btnName === 'search') {
|
||||||
this.listQuery.workOrderName = val.workOrderName ? val.workOrderName :undefined
|
this.listQuery.certificateNumber = val.certificateNumber ? val.certificateNumber :undefined
|
||||||
// this.queryParams.status = val.status
|
// this.queryParams.status = val.status
|
||||||
// if (val.timeVal && val.timeVal.length != 0 ) {
|
// if (val.timeVal && val.timeVal.length != 0 ) {
|
||||||
// this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
|
// this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
|
||||||
@ -272,3 +382,17 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.blueTip::before {
|
||||||
|
display: inline-block;
|
||||||
|
content: '';
|
||||||
|
width: 4px;
|
||||||
|
height: 18px;
|
||||||
|
background: #0b58ff;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -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 09:53:41
|
* @LastEditTime: 2024-04-25 14:30:44
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -12,11 +12,11 @@
|
|||||||
:model="listQuery"
|
:model="listQuery"
|
||||||
class="blueTip">
|
class="blueTip">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="月"
|
label="月份"
|
||||||
prop="reportTime">
|
prop="reportTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="listQuery.time"
|
v-model="listQuery.time"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="timestamp"
|
||||||
type="month"
|
type="month"
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="选择月"></el-date-picker>
|
placeholder="选择月"></el-date-picker>
|
||||||
@ -94,8 +94,8 @@ 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)
|
// let firstDayOfMonth = new Date(startOfMonth)
|
||||||
this.listQuery.time = parseTime(firstDayOfMonth)
|
this.listQuery.time = startOfMonth
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<!--
|
<!--
|
||||||
* @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-24 15:28:44
|
* @LastEditTime: 2024-04-25 14:31:53
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="weekly">
|
<div class="weekly">
|
||||||
<el-form :inline="true" :model="listQuery" class="blueTip">
|
<el-form :inline="true" :model="listQuery" class="blueTip">
|
||||||
<el-form-item>
|
<el-form-item label="周" prop="reportTime">
|
||||||
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
|
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
|
||||||
:picker-options="{firstDayOfWeek: 4}" :format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
:picker-options="{firstDayOfWeek: 4}" :format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
||||||
style="width: 350px" placeholder="选择周">
|
style="width: 350px" placeholder="选择周">
|
||||||
|
@ -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 09:54:39
|
* @LastEditTime: 2024-04-25 11:14:34
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -12,11 +12,11 @@
|
|||||||
:model="listQuery"
|
:model="listQuery"
|
||||||
class="blueTip">
|
class="blueTip">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="月"
|
label="年份"
|
||||||
prop="reportTime">
|
prop="reportTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="listQuery.time"
|
v-model="listQuery.time"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="timestamp"
|
||||||
type="year"
|
type="year"
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="选择年"></el-date-picker>
|
placeholder="选择年"></el-date-picker>
|
||||||
@ -93,9 +93,11 @@ export default {
|
|||||||
let now = new Date()
|
let now = new Date()
|
||||||
now.setHours(0, 0, 0, 0)
|
now.setHours(0, 0, 0, 0)
|
||||||
now.setDate(1)
|
now.setDate(1)
|
||||||
|
now.setMonth(0)
|
||||||
let startOfMonth = now.getTime()
|
let startOfMonth = now.getTime()
|
||||||
let firstDayOfMonth = new Date(startOfMonth)
|
// let firstDayOfMonth = new Date(startOfMonth)
|
||||||
this.listQuery.time = parseTime(firstDayOfMonth)
|
// console.log('看看', parseTime(firstDayOfMonth))
|
||||||
|
this.listQuery.time = startOfMonth
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -108,8 +108,9 @@ export default {
|
|||||||
let start = moment().format('yyyy-MM-DD');
|
let start = moment().format('yyyy-MM-DD');
|
||||||
let end = moment().format('yyyy-MM-DD');
|
let end = moment().format('yyyy-MM-DD');
|
||||||
this.formConfig[0].defaultSelect = [start, end];
|
this.formConfig[0].defaultSelect = [start, end];
|
||||||
this.queryParams.startTime = moment(start + ' 00:00:00').valueOf();
|
this.queryParams.startTime =
|
||||||
this.queryParams.endTime = moment(end + ' 23:59:59').valueOf();
|
moment(start + ' 00:00:00').valueOf() + 25200000;
|
||||||
|
this.queryParams.endTime = moment(end + ' 23:59:59').valueOf() + 25200000;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -238,12 +239,10 @@ export default {
|
|||||||
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 = moment(
|
this.queryParams.startTime =
|
||||||
val.timeVal[0] + ' 00:00:00'
|
moment(val.timeVal[0] + ' 00:00:00').valueOf() + 25200000;
|
||||||
).valueOf();
|
this.queryParams.endTime =
|
||||||
this.queryParams.endTime = moment(
|
moment(val.timeVal[1] + ' 23:59:59').valueOf() + 25200000;
|
||||||
val.timeVal[1] + ' 23:59:59'
|
|
||||||
).valueOf();
|
|
||||||
}
|
}
|
||||||
this.queryParams.lineId = val.lineId;
|
this.queryParams.lineId = val.lineId;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
Loading…
Reference in New Issue
Block a user