修bug
This commit is contained in:
@@ -114,7 +114,15 @@ export function consumableUpdate(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取耗材名称列表
|
||||
export function getMaterialArr(data) {
|
||||
return request({
|
||||
url: '/basic/consumableConfiguration/getMaterialList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取耗材名称ID规格和单位
|
||||
export function materialList(data) {
|
||||
return request({
|
||||
url: '/basic/consumableConfiguration/materialAndUnit',
|
||||
|
||||
@@ -196,3 +196,20 @@ export function claGlassData(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 产品追溯-获取分页产品追溯
|
||||
export function productTrace(data) {
|
||||
return request({
|
||||
url: '/quality/productTrace/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 产品追溯-获取分页工艺流程(只用传玻璃ID)
|
||||
export function pageProcess(data) {
|
||||
return request({
|
||||
url: '/quality/productTrace/pageProcess',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -329,6 +329,7 @@ export default {
|
||||
this.$refs.form.resetFields()
|
||||
this.deviceImg = ''
|
||||
this.srcList = []
|
||||
this.unitModuleList = []
|
||||
},
|
||||
handleAvatarSuccess(res) {
|
||||
this.form.imgId = res.data[0].id
|
||||
|
||||
@@ -178,7 +178,7 @@ import {
|
||||
materialManageInsert,
|
||||
materialManageDelete
|
||||
} from '@/api/consumablesManagement'
|
||||
import { sideLibraryList, materialList, getSpecList } from '@/api/basicConfig'
|
||||
import { sideLibraryList, getMaterialArr, getSpecList } from '@/api/basicConfig'
|
||||
export default {
|
||||
name: 'inAndOutManagementAdd',
|
||||
data() {
|
||||
@@ -273,7 +273,7 @@ export default {
|
||||
})
|
||||
},
|
||||
getMaterialList() {
|
||||
materialList().then((res) => {
|
||||
getMaterialArr().then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.consumablesNameList = res.data
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ export default {
|
||||
this.tagType = 'info'
|
||||
} else if (this.injectData.status === '未完成') {
|
||||
this.tagType = 'warning'
|
||||
} else if (this.injectData.status === '已超时') {
|
||||
this.tagType = 'danger'
|
||||
} else {
|
||||
this.tagType = 'success'
|
||||
}
|
||||
|
||||
@@ -198,6 +198,9 @@ export default {
|
||||
this.form.remark = res.data.remark
|
||||
})
|
||||
}
|
||||
this.form.recipient = this.$store.getters.username
|
||||
? this.$store.getters.username
|
||||
: ''
|
||||
},
|
||||
getBatchList(id) {
|
||||
getBatchList({ id }).then((res) => {
|
||||
|
||||
@@ -238,9 +238,9 @@ const tableBtn = [
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'less',
|
||||
type: 'equal',
|
||||
name: 'status',
|
||||
value: 1
|
||||
value: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -52,14 +52,16 @@
|
||||
</template>
|
||||
<script>
|
||||
import { tableHeight } from '@/utils/index'
|
||||
import { pageProcess } from '@/api/qualityManagement'
|
||||
import { timeFormatter } from '@/utils'
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'processName',
|
||||
prop: 'unitName',
|
||||
label: '工序名称',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
prop: 'deviceName',
|
||||
prop: 'eqName',
|
||||
label: '设备名称',
|
||||
minWidth: 120
|
||||
},
|
||||
@@ -69,17 +71,19 @@ const tableProps = [
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
prop: 'deviceLaunchTime',
|
||||
prop: 'inEquipmentTime',
|
||||
label: '设备上片时间',
|
||||
filter: timeFormatter,
|
||||
minWidth: 160
|
||||
},
|
||||
{
|
||||
prop: 'deviceUnloadingTime',
|
||||
prop: 'outEquipmentTime',
|
||||
label: '设备下片时间',
|
||||
filter: timeFormatter,
|
||||
minWidth: 160
|
||||
},
|
||||
{
|
||||
prop: 'grindingTrayId',
|
||||
prop: 'palletId',
|
||||
label: '面磨托盘ID',
|
||||
minWidth: 150
|
||||
}
|
||||
@@ -160,21 +164,22 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
init(id) {
|
||||
this.visible = true
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = tableHeight(115)
|
||||
})
|
||||
for (let i = 0; i < 30; i++) {
|
||||
let obj = {}
|
||||
obj.processName = '1'
|
||||
obj.deviceName = '设备名称' + i
|
||||
obj.glassId = '玻璃ID' + i
|
||||
obj.deviceLaunchTime = '2022-08-22 08:12:15'
|
||||
obj.deviceUnloadingTime = '2022-08-22 08:12:15'
|
||||
obj.grindingTrayId = '面磨托盘ID' + i
|
||||
this.tableData.push(obj)
|
||||
}
|
||||
pageProcess({
|
||||
current: 1,
|
||||
glassId: id,
|
||||
size: 500
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.records
|
||||
} else {
|
||||
this.tableData = []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val)
|
||||
|
||||
@@ -168,7 +168,8 @@ export default {
|
||||
this.tableH = tableHeight(250)
|
||||
})
|
||||
this.form.model = 'G8.5'
|
||||
this.form.detectTime = moment().format('yyyy-MM-DDTHH:mm:ss')
|
||||
// this.form.detectTime = moment().format('yyyy-MM-DD HH:mm:ss')
|
||||
this.form.detectTime = moment().format('yyyy-MM-DD HH:mm:ss')
|
||||
},
|
||||
selectItem() {
|
||||
this.getStandard()
|
||||
@@ -216,7 +217,9 @@ export default {
|
||||
for (let i of this.tableData) {
|
||||
let obj = {}
|
||||
obj.detectStandardId = i.id
|
||||
obj.detectTime = this.form.detectTime
|
||||
obj.detectTime = moment(this.form.detectTime).format(
|
||||
'yyyy-MM-DDTHH:mm:ss'
|
||||
)
|
||||
obj.detector = this.form.detector
|
||||
obj.glassId = this.form.glassId
|
||||
obj.remark = i.remark ? i.remark : ''
|
||||
|
||||
@@ -143,8 +143,8 @@ export default {
|
||||
tableHL: tableHeight(300),
|
||||
reportTitle: '',
|
||||
listQuery: {
|
||||
startTime: '2020-07-06T16:59:23',
|
||||
endTime: '2023-07-06T16:59:23',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
glassFrame: '',
|
||||
current: 1,
|
||||
size: 500
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
import { tableHeight, timeFormatter } from '@/utils/index'
|
||||
import SamplingAdd from './components/samplingAdd'
|
||||
import StandarSetting from './components/standardSetting'
|
||||
import moment from 'moment'
|
||||
import {
|
||||
getProcessDetectPage,
|
||||
processDetectExport
|
||||
@@ -137,6 +138,7 @@ export default {
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeVal',
|
||||
defaultSelect: [],
|
||||
width: 350
|
||||
},
|
||||
{
|
||||
@@ -145,11 +147,6 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '重置',
|
||||
name: 'reset'
|
||||
},
|
||||
{
|
||||
type: 'separate'
|
||||
},
|
||||
@@ -198,6 +195,12 @@ export default {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = tableHeight(270)
|
||||
})
|
||||
this.formConfig[4].defaultSelect = [
|
||||
moment().format('yyyy-MM-DD') + 'T00:00:00',
|
||||
moment().format('yyyy-MM-DD') + 'T23:59:59'
|
||||
]
|
||||
this.listQuery.startTime = moment().format('yyyy-MM-DD') + 'T00:00:00'
|
||||
this.listQuery.endTime = moment().format('yyyy-MM-DD') + 'T23:59:59'
|
||||
this.formConfig[0].defaultSelect = 1
|
||||
this.formConfig[1].type = 'input'
|
||||
this.formConfig[1].label = '玻璃ID'
|
||||
@@ -223,17 +226,6 @@ export default {
|
||||
this.listQuery.endTime = val.timeVal ? val.timeVal[1] : ''
|
||||
this.getList()
|
||||
break
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm()
|
||||
this.listQuery.glassId = ''
|
||||
this.listQuery.detector = ''
|
||||
this.listQuery.detectItem = ''
|
||||
this.listQuery.startTime = ''
|
||||
this.listQuery.endTime = ''
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
break
|
||||
case 'add':
|
||||
this.addOrEditTitle = '抽检录入'
|
||||
this.centervisible = true
|
||||
@@ -299,6 +291,8 @@ export default {
|
||||
this.formConfig[3].type = 'select'
|
||||
this.formConfig[3].label = '检验项目'
|
||||
}
|
||||
this.formConfig[4].defaultSelect =
|
||||
this.$refs.searchBarForm.formInline.timeVal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,12 @@
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination :limit="listQuery.size" :total="total" />
|
||||
<pagination
|
||||
:page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size"
|
||||
:total="total"
|
||||
@pagination="getList()"
|
||||
/>
|
||||
<!-- 抽屉 -->
|
||||
<process-flow-detail v-if="processFlowVisible" ref="processFlowDetail" />
|
||||
</div>
|
||||
@@ -30,15 +35,17 @@
|
||||
<script>
|
||||
import ProcessFlowDetail from './components/processFlowDetail'
|
||||
import { tableHeight } from '@/utils/index'
|
||||
import defaultSettings from '@/settings'
|
||||
import moment from 'moment'
|
||||
import { productTrace } from '@/api/qualityManagement'
|
||||
import { timeFormatter } from '@/utils'
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'productionLine',
|
||||
prop: 'proLineName',
|
||||
label: '产线',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
prop: 'orderCode',
|
||||
prop: 'workOrderNo',
|
||||
label: '工单编号',
|
||||
minWidth: 120
|
||||
},
|
||||
@@ -48,32 +55,34 @@ const tableProps = [
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
prop: 'finishedRackId',
|
||||
prop: 'rackId',
|
||||
label: '成品架ID',
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
prop: 'productLaunchTime',
|
||||
prop: 'loadTime',
|
||||
label: '产品上片时间',
|
||||
filter: timeFormatter,
|
||||
minWidth: 160
|
||||
},
|
||||
{
|
||||
prop: 'productUnloadingTime',
|
||||
prop: 'unloadTime',
|
||||
label: '产品下片时间',
|
||||
filter: timeFormatter,
|
||||
minWidth: 160
|
||||
},
|
||||
{
|
||||
prop: 'glassGrade',
|
||||
prop: 'grade',
|
||||
label: '玻璃等级',
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
prop: 'grindingTrayId',
|
||||
prop: 'palletId',
|
||||
label: '面磨托盘ID',
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
prop: 'supplier',
|
||||
prop: 'glassLength',
|
||||
label: '玻璃长度',
|
||||
minWidth: 100
|
||||
},
|
||||
@@ -83,14 +92,14 @@ const tableProps = [
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
prop: 'glassThickness',
|
||||
prop: 'glassHeight',
|
||||
label: '玻璃厚度',
|
||||
minWidth: 100
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
type: 'view',
|
||||
btnName: '点击查看'
|
||||
}
|
||||
]
|
||||
@@ -103,30 +112,35 @@ export default {
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '产品上片时间',
|
||||
dateType: 'datetime',
|
||||
dateType: 'datetimerange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
placeholder: '产品上片时间',
|
||||
param: 'testTime',
|
||||
defaultSelect: '2022-08-17 08:20:10',
|
||||
width: 200
|
||||
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeVal',
|
||||
defaultSelect: [],
|
||||
width: 350
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '产线',
|
||||
selectOptions: defaultSettings.productionLineList,
|
||||
param: 'productionLine',
|
||||
selectOptions: JSON.parse(localStorage.getItem('publicList'))
|
||||
.proLineVoList,
|
||||
param: 'lineName',
|
||||
labelField: 'dataName',
|
||||
valueField: 'dataName',
|
||||
defaultSelect: '',
|
||||
width: 100
|
||||
onchange: true,
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '查询方式',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '成品架ID' },
|
||||
{ id: 2, name: '时间查询' },
|
||||
{ id: 3, name: '玻璃ID' },
|
||||
{ id: 4, name: '托盘ID' }
|
||||
{ id: 'rackId', name: '成品架ID' },
|
||||
{ id: 'glassId', name: '玻璃ID' },
|
||||
{ id: 'palletId', name: '托盘ID' }
|
||||
],
|
||||
param: 'inquiryMode',
|
||||
defaultSelect: '',
|
||||
@@ -156,6 +170,8 @@ export default {
|
||||
tableH: tableHeight(270),
|
||||
total: 0,
|
||||
listQuery: {
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
current: 1,
|
||||
size: 20
|
||||
},
|
||||
@@ -166,45 +182,50 @@ export default {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = tableHeight(270)
|
||||
})
|
||||
for (let i = 0; i < 30; i++) {
|
||||
let obj = {}
|
||||
obj.productionLine = '产线1'
|
||||
obj.orderCode = '工单编号' + i
|
||||
obj.glassId = '玻璃ID' + i
|
||||
obj.finishedRackId = '成品架ID' + i
|
||||
obj.productLaunchTime = '2022-08-22 08:12:15'
|
||||
obj.productUnloadingTime = '2022-08-22 08:12:15'
|
||||
obj.glassGrade = i
|
||||
obj.grindingTrayId = '面磨托盘ID' + i
|
||||
obj.supplier = 2600
|
||||
obj.glassWidth = 2250
|
||||
obj.glassThickness = 5
|
||||
obj.remark = '备注' + i
|
||||
this.tableData.push(obj)
|
||||
}
|
||||
this.formConfig[0].defaultSelect = [
|
||||
moment().format('yyyy-MM-DD') + 'T00:00:00',
|
||||
moment().format('yyyy-MM-DD') + 'T23:59:59'
|
||||
]
|
||||
this.listQuery.startTime = moment().format('yyyy-MM-DD') + 'T00:00:00'
|
||||
this.listQuery.endTime = moment().format('yyyy-MM-DD') + 'T23:59:59'
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {},
|
||||
getList() {
|
||||
productTrace({ ...this.listQuery }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
if (val.btnName === 'search') {
|
||||
this.listQuery.startTime = val.timeVal ? val.timeVal[0] : ''
|
||||
this.listQuery.endTime = val.timeVal ? val.timeVal[1] : ''
|
||||
this.listQuery.proLineName = val.lineName
|
||||
this.listQuery.rackId =
|
||||
val.inquiryMode === 'rackId' ? val.queryContent : ''
|
||||
this.listQuery.glassId =
|
||||
val.inquiryMode === 'glassId' ? val.queryContent : ''
|
||||
this.listQuery.palletId =
|
||||
val.inquiryMode === 'palletId' ? val.queryContent : ''
|
||||
this.getList()
|
||||
} else if (val.btnName === 'reset') {
|
||||
this.$refs.searchBarForm.resetForm()
|
||||
this.listQuery.startTime = moment().format('yyyy-MM-DD') + 'T00:00:00'
|
||||
this.listQuery.endTime = moment().format('yyyy-MM-DD') + 'T23:59:59'
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
},
|
||||
handleClick() {
|
||||
handleClick(val) {
|
||||
this.processFlowVisible = true
|
||||
let id = 1
|
||||
let id = val.data.glassId
|
||||
this.$nextTick(() => {
|
||||
this.$refs.processFlowDetail.init(id)
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
console.log('========')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user