Merge pull request '修复bug' (#5) from zjl into master
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #5
This commit is contained in:
commit
d775dc7371
@ -190,6 +190,7 @@ import {
|
|||||||
} from '@/api/basicConfig'
|
} from '@/api/basicConfig'
|
||||||
import { commonUploadPath } from '@/api/app'
|
import { commonUploadPath } from '@/api/app'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
|
import moment from 'moment'
|
||||||
export default {
|
export default {
|
||||||
name: 'ConsumablesAdd',
|
name: 'ConsumablesAdd',
|
||||||
data() {
|
data() {
|
||||||
@ -205,8 +206,8 @@ export default {
|
|||||||
price: '',
|
price: '',
|
||||||
imgId: '',
|
imgId: '',
|
||||||
supplier: '',
|
supplier: '',
|
||||||
purchaseDate: '',
|
purchaseDate: moment().format('YYYY-MM-DD'),
|
||||||
productDate: '',
|
productDate: moment().format('YYYY-MM-DD'),
|
||||||
remark: '',
|
remark: '',
|
||||||
enabled: 1
|
enabled: 1
|
||||||
},
|
},
|
||||||
@ -255,7 +256,11 @@ export default {
|
|||||||
}
|
}
|
||||||
this.form.supplier = res.data.supplier
|
this.form.supplier = res.data.supplier
|
||||||
this.form.purchaseDate = res.data.purchaseDate
|
this.form.purchaseDate = res.data.purchaseDate
|
||||||
|
? res.data.purchaseDate
|
||||||
|
: ''
|
||||||
this.form.productDate = res.data.productDate
|
this.form.productDate = res.data.productDate
|
||||||
|
? res.data.productDate
|
||||||
|
: ''
|
||||||
this.form.remark = res.data.remark
|
this.form.remark = res.data.remark
|
||||||
this.form.enabled = res.data.enabled
|
this.form.enabled = res.data.enabled
|
||||||
}
|
}
|
||||||
|
@ -246,6 +246,9 @@ export default {
|
|||||||
this.form.minNum = res.data.minNum ? res.data.minNum : 0
|
this.form.minNum = res.data.minNum ? res.data.minNum : 0
|
||||||
this.form.maxNum = res.data.maxNum ? res.data.maxNum : 0
|
this.form.maxNum = res.data.maxNum ? res.data.maxNum : 0
|
||||||
this.form.remark = res.data.remark
|
this.form.remark = res.data.remark
|
||||||
|
this.form.recipient = this.$store.getters.username
|
||||||
|
? this.$store.getters.username
|
||||||
|
: ''
|
||||||
})
|
})
|
||||||
if (param.type === 'edit') {
|
if (param.type === 'edit') {
|
||||||
this.showEdit = true
|
this.showEdit = true
|
||||||
|
@ -197,7 +197,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
getOutInRecordRecord({ ...this.listQuery }).then((res) => {
|
getOutInRecordRecord({ ...this.listQuery }).then((res) => {
|
||||||
console.log(res)
|
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.total = res.data.total
|
this.total = res.data.total
|
||||||
this.tableData = res.data.records
|
this.tableData = res.data.records
|
||||||
@ -205,7 +204,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
selectChanged(val) {
|
selectChanged(val) {
|
||||||
console.log(val)
|
|
||||||
if (val.value) {
|
if (val.value) {
|
||||||
let id = null
|
let id = null
|
||||||
let line = JSON.parse(localStorage.getItem('publicList')).proLineVoList
|
let line = JSON.parse(localStorage.getItem('publicList')).proLineVoList
|
||||||
@ -217,6 +215,8 @@ export default {
|
|||||||
})
|
})
|
||||||
sideLibraryList({ id }).then((res) => {
|
sideLibraryList({ id }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
this.formConfig[0].defaultSelect =
|
||||||
|
this.$refs.searchBarForm.formInline.timeVal
|
||||||
this.formConfig[3].selectOptions = res.data
|
this.formConfig[3].selectOptions = res.data
|
||||||
this.formConfig[3].defaultSelect = null
|
this.formConfig[3].defaultSelect = null
|
||||||
}
|
}
|
||||||
@ -225,14 +225,12 @@ export default {
|
|||||||
},
|
},
|
||||||
getMaterialList() {
|
getMaterialList() {
|
||||||
materialList().then((res) => {
|
materialList().then((res) => {
|
||||||
console.log(res)
|
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.formConfig[4].selectOptions = res.data
|
this.formConfig[4].selectOptions = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
console.log(val)
|
|
||||||
if (val.btnName === 'search') {
|
if (val.btnName === 'search') {
|
||||||
this.listQuery.startTime = val.timeVal ? val.timeVal[0] : ''
|
this.listQuery.startTime = val.timeVal ? val.timeVal[0] : ''
|
||||||
this.listQuery.endTime = val.timeVal ? val.timeVal[1] : ''
|
this.listQuery.endTime = val.timeVal ? val.timeVal[1] : ''
|
||||||
|
@ -13,6 +13,12 @@
|
|||||||
:max-height="tableH"
|
:max-height="tableH"
|
||||||
:row-class-name="tableRowClassName"
|
:row-class-name="tableRowClassName"
|
||||||
/>
|
/>
|
||||||
|
<pagination
|
||||||
|
:page.sync="listQuery.current"
|
||||||
|
:limit.sync="listQuery.size"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
<!-- 设置预警值 -->
|
<!-- 设置预警值 -->
|
||||||
<base-dialog
|
<base-dialog
|
||||||
dialogTitle="设置预警值"
|
dialogTitle="设置预警值"
|
||||||
@ -108,11 +114,11 @@ export default {
|
|||||||
],
|
],
|
||||||
tableProps,
|
tableProps,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableH: tableHeight(230),
|
tableH: tableHeight(270),
|
||||||
total: 0,
|
total: 0,
|
||||||
listQuery: {
|
listQuery: {
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 1000,
|
size: 20,
|
||||||
proLineId: '',
|
proLineId: '',
|
||||||
stockId: ''
|
stockId: ''
|
||||||
},
|
},
|
||||||
@ -121,7 +127,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.tableH = tableHeight(230)
|
this.tableH = tableHeight(270)
|
||||||
})
|
})
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
@ -129,7 +135,8 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
onlineMaterialTrackSelect({ ...this.listQuery }).then((res) => {
|
onlineMaterialTrackSelect({ ...this.listQuery }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.tableData = res.data
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total ? res.data.total : 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user