Browse Source

2026-07-02

检验优化
master
fengyuan_yang 4 weeks ago
parent
commit
1015c99930
  1. 22
      src/views/modules/qc/FQCResultEntry.vue
  2. 22
      src/views/modules/qc/IPQCResultEntry.vue
  3. 22
      src/views/modules/qc/IQCResultEntry.vue
  4. 25
      src/views/modules/qc/OQCResultEntry.vue

22
src/views/modules/qc/FQCResultEntry.vue

@ -140,8 +140,8 @@
<el-date-picker <el-date-picker
v-model="searchData.startDate2" v-model="searchData.startDate2"
type="datetime" type="datetime"
value-format='yyyy-MM-dd HH:mm'
format='yyyy-MM-dd HH:mm'
value-format='yyyy-MM-dd HH:mm:ss'
format='yyyy-MM-dd HH:mm:ss'
placeholder="开始日期" placeholder="开始日期"
style="width: 44%"> style="width: 44%">
</el-date-picker> </el-date-picker>
@ -149,8 +149,8 @@
<el-date-picker <el-date-picker
v-model="searchData.endDate2" v-model="searchData.endDate2"
type="datetime" type="datetime"
value-format='yyyy-MM-dd HH:mm'
format='yyyy-MM-dd HH:mm'
value-format='yyyy-MM-dd HH:mm:ss'
format='yyyy-MM-dd HH:mm:ss'
placeholder="结束日期" placeholder="结束日期"
style="width: 44%"> style="width: 44%">
</el-date-picker> </el-date-picker>
@ -291,7 +291,7 @@
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">{{ formatMainListCellValue(scope.row, item) }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template> </template>
</el-table-column> </el-table-column>
@ -2897,6 +2897,18 @@
}); });
}, },
formatMainListCellValue (row, column) {
if (!row || !column) {
return ''
}
const value = row[column.columnProp]
if ((column.columnProp === 'taskDate' || column.columnProp === 'task_date') && value) {
const formattedValue = this.dayjs(value).format('YYYY-MM-DD HH:mm:ss')
return formattedValue === 'Invalid Date' ? value : formattedValue
}
return value
},
// //
resetSearch() { resetSearch() {
this.searchData = { this.searchData = {

22
src/views/modules/qc/IPQCResultEntry.vue

@ -169,8 +169,8 @@
<el-date-picker <el-date-picker
v-model="searchData.startDate2" v-model="searchData.startDate2"
type="datetime" type="datetime"
value-format='yyyy-MM-dd HH:mm'
format='yyyy-MM-dd HH:mm'
value-format='yyyy-MM-dd HH:mm:ss'
format='yyyy-MM-dd HH:mm:ss'
placeholder="开始日期" placeholder="开始日期"
style="width: 44%"> style="width: 44%">
</el-date-picker> </el-date-picker>
@ -178,8 +178,8 @@
<el-date-picker <el-date-picker
v-model="searchData.endDate2" v-model="searchData.endDate2"
type="datetime" type="datetime"
value-format='yyyy-MM-dd HH:mm'
format='yyyy-MM-dd HH:mm'
value-format='yyyy-MM-dd HH:mm:ss'
format='yyyy-MM-dd HH:mm:ss'
placeholder="结束日期" placeholder="结束日期"
style="width: 44%"> style="width: 44%">
</el-date-picker> </el-date-picker>
@ -320,7 +320,7 @@
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="!item.columnHidden"> {{ formatMainListCellValue(scope.row, item) }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template> </template>
</el-table-column> </el-table-column>
@ -3177,6 +3177,18 @@
}); });
}, },
formatMainListCellValue (row, column) {
if (!row || !column) {
return ''
}
const value = row[column.columnProp]
if ((column.columnProp === 'taskDate' || column.columnProp === 'task_date') && value) {
const formattedValue = this.dayjs(value).format('YYYY-MM-DD HH:mm:ss')
return formattedValue === 'Invalid Date' ? value : formattedValue
}
return value
},
// //
resetSearch() { resetSearch() {
this.searchData = { this.searchData = {

22
src/views/modules/qc/IQCResultEntry.vue

@ -159,8 +159,8 @@
<el-date-picker <el-date-picker
v-model="searchData.startDate2" v-model="searchData.startDate2"
type="datetime" type="datetime"
value-format='yyyy-MM-dd HH:mm'
format='yyyy-MM-dd HH:mm'
value-format='yyyy-MM-dd HH:mm:ss'
format='yyyy-MM-dd HH:mm:ss'
placeholder="开始日期" placeholder="开始日期"
style="width: 44%"> style="width: 44%">
</el-date-picker> </el-date-picker>
@ -168,8 +168,8 @@
<el-date-picker <el-date-picker
v-model="searchData.endDate2" v-model="searchData.endDate2"
type="datetime" type="datetime"
value-format='yyyy-MM-dd HH:mm'
format='yyyy-MM-dd HH:mm'
value-format='yyyy-MM-dd HH:mm:ss'
format='yyyy-MM-dd HH:mm:ss'
placeholder="结束日期" placeholder="结束日期"
style="width: 44%"> style="width: 44%">
</el-date-picker> </el-date-picker>
@ -323,7 +323,7 @@
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="!item.columnHidden">{{ formatMainListCellValue(scope.row, item) }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template> </template>
</el-table-column> </el-table-column>
@ -2437,6 +2437,18 @@
}); });
}, },
formatMainListCellValue (row, column) {
if (!row || !column) {
return ''
}
const value = row[column.columnProp]
if ((column.columnProp === 'taskDate' || column.columnProp === 'task_date') && value) {
const formattedValue = this.dayjs(value).format('YYYY-MM-DD HH:mm:ss')
return formattedValue === 'Invalid Date' ? value : formattedValue
}
return value
},
// //
resetSearch() { resetSearch() {
this.searchData = { this.searchData = {

25
src/views/modules/qc/OQCResultEntry.vue

@ -137,8 +137,8 @@
<el-date-picker <el-date-picker
v-model="searchData.startDate2" v-model="searchData.startDate2"
type="datetime" type="datetime"
value-format='yyyy-MM-dd HH:mm'
format='yyyy-MM-dd HH:mm'
value-format='yyyy-MM-dd HH:mm:ss'
format='yyyy-MM-dd HH:mm:ss'
placeholder="开始日期" placeholder="开始日期"
style="width: 44%"> style="width: 44%">
</el-date-picker> </el-date-picker>
@ -146,8 +146,8 @@
<el-date-picker <el-date-picker
v-model="searchData.endDate2" v-model="searchData.endDate2"
type="datetime" type="datetime"
value-format='yyyy-MM-dd HH:mm'
format='yyyy-MM-dd HH:mm'
value-format='yyyy-MM-dd HH:mm:ss'
format='yyyy-MM-dd HH:mm:ss'
placeholder="结束日期" placeholder="结束日期"
style="width: 44%"> style="width: 44%">
</el-date-picker> </el-date-picker>
@ -278,11 +278,11 @@
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="item.columnProp === 'inspectionResult' && scope.row.inspectionResult === '不合格' && scope.row.disposalMeasures === '拒收退回'"> <div v-if="item.columnProp === 'inspectionResult' && scope.row.inspectionResult === '不合格' && scope.row.disposalMeasures === '拒收退回'">
<span v-if="!item.columnHidden" style="color: red"> {{ scope.row[item.columnProp] }}</span>
<span v-if="!item.columnHidden" style="color: red"> {{ formatMainListCellValue(scope.row, item) }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div> </div>
<div v-else> <div v-else>
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="!item.columnHidden"> {{ formatMainListCellValue(scope.row, item) }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div> </div>
</template> </template>
@ -2151,6 +2151,19 @@
this.height = windowHeight - headerHeight - 65; this.height = windowHeight - headerHeight - 65;
}); });
}, },
formatMainListCellValue (row, column) {
if (!row || !column) {
return ''
}
const value = row[column.columnProp]
if ((column.columnProp === 'taskDate' || column.columnProp === 'task_date') && value) {
const formattedValue = this.dayjs(value).format('YYYY-MM-DD HH:mm:ss')
return formattedValue === 'Invalid Date' ? value : formattedValue
}
return value
},
// //
resetSearch() { resetSearch() {
this.searchData = { this.searchData = {

Loading…
Cancel
Save