Commit 34cca976 authored by hubaoshan's avatar hubaoshan

1

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