Commit 34cca976 authored by hubaoshan's avatar hubaoshan

1

parent 545536fc
...@@ -30,16 +30,16 @@ export function getOutcomeWmsApply(businessId) { ...@@ -30,16 +30,16 @@ export function getOutcomeWmsApply(businessId) {
} }
// 3. 新增???? // 3. 新增????
// export function addOutcomeWmsApply(data) {
// data = Qs.stringify(data)
// return request({
// url: '/outcomewmsapply/addList',
// method: 'post',
// data: data
// })
// }
export function addOutcomeWmsApply(data) { export function addOutcomeWmsApply(data) {
data = Qs.stringify(data)
return request({
url: '/outcomewmsapply/add',
method: 'post',
data: data
})
}
export function addOutcomeWmsApplyPtype(data) {
return request({ return request({
url: '/outcomewmsapply/addList', url: '/outcomewmsapply/addList',
method: 'post', method: 'post',
......
...@@ -242,11 +242,7 @@ ...@@ -242,11 +242,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="仓库:" prop="whId"> <el-form-item label="仓库:" prop="whId">
<span v-if="singleDetails.whId === '001'">仓库1</span> <span v-if="singleDetails.whId && getDataDictLabel(singleDetails.whId)">{{ getDataDictLabel(singleDetails.whId) }}</span>
<span v-else-if="singleDetails.whId === '002'">仓库2</span>
<span v-else-if="singleDetails.whId === '002'">仓库3</span>
<span v-else-if="singleDetails.whId === '002'">仓库4</span>
<span v-else-if="singleDetails.whId === '002'">仓库5</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -347,6 +343,7 @@ import { ...@@ -347,6 +343,7 @@ import {
} from '@/api/incomeWmsBox' } from '@/api/incomeWmsBox'
import commonField from '@/utils/commonField' import commonField from '@/utils/commonField'
import manufacturer from '@/data/cjlist' import manufacturer from '@/data/cjlist'
import { getDicts } from '@/api/system/dict/data'
export default { export default {
name: 'IncomeWmsBox', name: 'IncomeWmsBox',
...@@ -479,12 +476,24 @@ export default { ...@@ -479,12 +476,24 @@ export default {
this.queryParams = { ...param } this.queryParams = { ...param }
} }
this.getList() // 列表查询 this.getList() // 列表查询
this.getwareHouse()
}, },
methods: { methods: {
getwareHouse() {
getDicts('WAREHOUSE').then(res => {
this.warehouseList = res.data
const whId = res.data[0].dictValue
this.form.whId = whId
})
},
getManufacturerLabel(cj) { getManufacturerLabel(cj) {
const manufacturer = this.manufacturer.find(item => item.value === cj) const manufacturer = this.manufacturer.find(item => item.value === cj)
return manufacturer ? manufacturer.label : null return manufacturer ? manufacturer.label : null
}, },
getDataDictLabel(whId) {
const dictItem = this.warehouseList.find(item => item.dictValue === whId)
return dictItem ? dictItem.dictLabel : null
},
/** 查询库存管理列表 */ /** 查询库存管理列表 */
getList() { getList() {
this.loading = true this.loading = true
......
...@@ -395,7 +395,7 @@ ...@@ -395,7 +395,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-table v-if="isShow" v-loading="loading" border :data="tempList"> <el-table v-if="isShow" v-loading="loading" border :data="outTempList">
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="location" prop="location" :show-overflow-tooltip="true"> <el-table-column label="location" prop="location" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -412,13 +412,6 @@ ...@@ -412,13 +412,6 @@
{{ scope.row.qty || '-' }} {{ scope.row.qty || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="创建时间" prop="createDate" :show-overflow-tooltip="true">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table></el-form> </el-table></el-form>
</el-dialog> </el-dialog>
...@@ -431,7 +424,7 @@ import { ...@@ -431,7 +424,7 @@ import {
getOutcomeWmsApply, getOutcomeWmsApply,
delOutcomeWmsApply, delOutcomeWmsApply,
addOutcomeWmsApply, addOutcomeWmsApply,
updateOutcomeWmsApply, exportOutcomeWmsApply updateOutcomeWmsApply, exportOutcomeWmsApply, addOutcomeWmsApplyPtype
} from '@/api/outcomeWmsApply' } from '@/api/outcomeWmsApply'
import commonField from '@/utils/commonField' import commonField from '@/utils/commonField'
import { getDicts } from '@/api/system/dict/data' import { getDicts } from '@/api/system/dict/data'
...@@ -449,7 +442,7 @@ export default { ...@@ -449,7 +442,7 @@ export default {
manufacturer: [], manufacturer: [],
dateRange: [], dateRange: [],
isShow: false, isShow: false,
tempList: [], outTempList: [],
location: '', location: '',
lot: '', lot: '',
// 弹出层标题 // 弹出层标题
...@@ -683,6 +676,8 @@ export default { ...@@ -683,6 +676,8 @@ export default {
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.isShow = false
this.outTempList = []
this.form = { this.form = {
businessId: undefined, businessId: undefined,
remarks: undefined, remarks: undefined,
...@@ -931,7 +926,7 @@ export default { ...@@ -931,7 +926,7 @@ export default {
boxList: itemQty boxList: itemQty
} }
console.log('this.boxList:', obj) console.log('this.boxList:', obj)
addOutcomeWmsApply(obj).then(response => { addOutcomeWmsApplyPtype(obj).then(response => {
this.msgSuccess('新增成功') this.msgSuccess('新增成功')
this.open = false this.open = false
this.openGain = false this.openGain = false
...@@ -979,7 +974,7 @@ export default { ...@@ -979,7 +974,7 @@ export default {
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接 const href = window.URL.createObjectURL(blob)// 创建下载的链接
downloadElement.href = href downloadElement.href = href
downloadElement.download = '领用申请信息' + '.xls' // 下载后文件名 downloadElement.download = '申请信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement) document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载 downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素 document.body.removeChild(downloadElement)// 下载完成移除元素
...@@ -993,15 +988,15 @@ export default { ...@@ -993,15 +988,15 @@ export default {
const id = row.businessId const id = row.businessId
getOutcomeWmsApply(id).then(response => { getOutcomeWmsApply(id).then(response => {
if (response.data.length > 0) { if (response.data.length > 0) {
this.tempList = response.data this.outTempList = response.data
this.isShow = true this.isShow = true
} }
}) })
this.singleDetails = row this.singleDetails = row
console.log(row) console.log('row', row)
this.title = '详情信息' this.title = '详情信息'
this.openDetails = !this.openDetails this.openDetails = !this.openDetails
this.isShow = false this.isShow = !this.isShow
this.reset() this.reset()
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment