fzq #67

Merged
zwq merged 2 commits from fzq into develop 2022-03-16 16:17:36 +08:00
3 changed files with 51 additions and 39 deletions

View File

@ -4,7 +4,7 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-03-05 17:45:46 * @Date: 2022-03-05 17:45:46
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2022-03-07 09:19:34 * @LastEditTime: 2022-03-16 16:11:55
--> -->
<template> <template>
<!-- <el-dialog <!-- <el-dialog
@ -40,7 +40,7 @@
</template> </template>
<script> <script>
import { updateSubstrate, listSubstrate } from '@/api/report-manage/report' import { updateSubstrate } from '@/api/report-manage/report'
export default { export default {
props: { props: {
@ -55,15 +55,18 @@ export default {
return { return {
visible: false, visible: false,
dataForm: { dataForm: {
id: '', // substrateCode: '',
substrateCode: '', // location: '',
location: '', // storeTime: '',
storeTime: '', // substrateStatus: '',
substrateStatus: '', // code: '',
code: '', // storageBoxId: '',
storageBoxId: '', // storageCode: '',
storageCode: '', // interCode: '',
interCode: '' // id: '',
// current: 1,
// size: 10,
// locationStorageSubID: ''
}, },
list: { list: {
id: '', id: '',
@ -107,22 +110,25 @@ export default {
// }) // })
// }) // })
// }, // },
init(id) { init(data) {
// this.dataForm.id = id || '' // this.dataForm.id = id || ''
this.dataForm.storageBoxId = this.$route.query.id // console.log(this.$route.query)
this.dataForm.storageCode = this.$route.query.code // this.dataForm.id = this.$route.query.id
// this.dataForm.substrateCode = this.$route.query.substrateCode
// this.dataForm.locationStorageSubID = this.$route.query.locationStorageSubID
this.dataForm = data
this.visible = true this.visible = true
// console.log(this.dataForm) // console.log(this.dataForm)
listSubstrate(this.dataForm).then(res => { // listSubstrate(this.dataForm).then(res => {
console.log(res.data[0]) // // console.log(res)
this.dataForm.id = res.data[0].id // this.dataForm.id = res.data[0].id
this.dataForm.location = res.data[0].location // this.dataForm.location = res.data[0].location
this.dataForm.storeTime = res.data[0].storeTime // this.dataForm.storeTime = res.data[0].storeTime
this.dataForm.substrateCode = res.data[0].substrateCode // this.dataForm.substrateCode = res.data[0].substrateCode
this.dataForm.substrateStatus = res.data[0].substrateStatus // this.dataForm.substrateStatus = res.data[0].substrateStatus
this.dataForm.interCode = res.data[0].interCode // this.dataForm.interCode = res.data[0].interCode
// console.log(this.dataForm) // // console.log(this.dataForm)
}) // })
}, },
// //
dataFormSubmit() { dataFormSubmit() {
@ -132,10 +138,10 @@ export default {
'substrateStatus': this.dataForm.substrateStatus, 'substrateStatus': this.dataForm.substrateStatus,
'storeTime': this.dataForm.storeTime, 'storeTime': this.dataForm.storeTime,
'id': this.dataForm.id, 'id': this.dataForm.id,
'substrateCode': this.dataForm.substrateCode, 'code': this.dataForm.substrateCode,
'location': this.dataForm.location, 'location': this.dataForm.location,
'interCode': this.dataForm.interCode, 'interCode': this.dataForm.interCode,
'storageBoxId': this.dataForm.storageBoxId 'storageBoxFid': this.dataForm.storageBoxFid
} }
console.log(data) console.log(data)
updateSubstrate(data).then(res => { updateSubstrate(data).then(res => {

View File

@ -4,7 +4,7 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-03-05 14:35:07 * @Date: 2022-03-05 14:35:07
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2022-03-05 16:44:43 * @LastEditTime: 2022-03-16 16:13:58
--> -->
<template> <template>
<span> <span>
@ -26,7 +26,8 @@ export default {
name: 'viewSubstrate', name: 'viewSubstrate',
query: { query: {
id: this.injectData.id, id: this.injectData.id,
code: this.injectData.code code: this.injectData.code,
locationStorageSubID: this.injectData.locationStorageSubID
} }
}) })
} }

View File

@ -4,7 +4,7 @@
* @Author: fzq * @Author: fzq
* @Date: 2022-03-05 15:55:45 * @Date: 2022-03-05 15:55:45
* @LastEditors: fzq * @LastEditors: fzq
* @LastEditTime: 2022-03-11 11:08:53 * @LastEditTime: 2022-03-16 16:09:15
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
@ -29,7 +29,7 @@
@clickBtn="handleClick" @clickBtn="handleClick"
/> />
</base-table> </base-table>
<edit-substrate v-if="addOrUpdateVisible" :id="listQuery.id" ref="addOrUpdate" @refreshDataList="getList" /> <edit-substrate v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
</div> </div>
</template> </template>
@ -104,7 +104,7 @@ export default {
return { return {
addOrUpdateVisible: false, addOrUpdateVisible: false,
num: '', num: '',
storageCode: this.$t('module.basicData.visual.TipsBefore'), storageCode: this.$t('module.basicData.visual.storageCode'),
tableBtn, tableBtn,
trueWidth: 200, trueWidth: 200,
tableProps, tableProps,
@ -113,14 +113,17 @@ export default {
listQuery: { listQuery: {
current: 1, current: 1,
size: 10, size: 10,
storageBoxCode: '', locationStorageSubID: ''
storageBoxId: '' // storageBoxCode: '',
} // storageBoxId: ''
},
count: 0
} }
}, },
created() { created() {
this.listQuery.storageBoxCode = this.$route.query.code this.listQuery.storageBoxCode = this.$route.query.code
this.listQuery.storageBoxId = this.$route.query.id // this.listQuery.storageBoxId = this.$route.query.id
this.listQuery.locationStorageSubID = this.$route.query.locationStorageSubID
this.getList() this.getList()
}, },
methods: { methods: {
@ -131,7 +134,7 @@ export default {
cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'), cancelButtonText: this.$t('module.basicData.visual.cancelButtonText'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// console.log(raw.data) // console.log(raw.data)
deleSubstrate(raw.data).then(response => { deleSubstrate(raw.data).then(response => {
this.$message({ this.$message({
message: this.$t('module.basicData.visual.success'), message: this.$t('module.basicData.visual.success'),
@ -144,16 +147,18 @@ export default {
}) })
}).catch(() => {}) }).catch(() => {})
} else { } else {
this.addNew(raw.data.id) // this.count = raw.data._pageIndex
// console.log(this.count)
this.addNew(raw.data)
} }
}, },
getList() { getList() {
this.listLoading = true this.listLoading = true
this.num = this.listQuery.storageBoxCode this.num = this.listQuery.storageBoxCode
this.listQuery.code = this.$route.query.code this.listQuery.code = this.$route.query.code
console.log(this.listQuery) // console.log(this.listQuery)
listSubstrate(this.listQuery).then(response => { listSubstrate(this.listQuery).then(response => {
console.log(response) // console.log(response)
if (response.data) { if (response.data) {
this.list = response.data this.list = response.data
console.log(this.list) console.log(this.list)