二级库问题调试

This commit is contained in:
BianLzhaoMin 2025-01-16 18:17:07 +08:00
parent f634e3069a
commit 0eb6b57d39
2 changed files with 90 additions and 13 deletions

View File

@ -37,3 +37,12 @@ export function getRecordsApi(data) {
params: data, params: data,
}) })
} }
// 二级库 报废管理列表接口
export function getScrapListApi(data) {
return request({
url: '/material/secondaryWarehouse/getSecondScrapList',
method: 'get',
params: data,
})
}

View File

@ -52,7 +52,7 @@
" "
/> />
<el-table-column <el-table-column
prop="name" prop="typeName"
align="center" align="center"
label="机具名称" label="机具名称"
show-overflow-tooltip show-overflow-tooltip
@ -60,37 +60,60 @@
<el-table-column <el-table-column
label="规格型号" label="规格型号"
align="center" align="center"
prop="unitName" prop="modelName"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <!-- <el-table-column
label="设备编码" label="设备编码"
align="center" align="center"
prop="unitName" prop="unitName"
show-overflow-tooltip show-overflow-tooltip
/> /> -->
<el-table-column <el-table-column
label="计量单位" label="计量单位"
align="center" align="center"
prop="unitName" prop="nuitName"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
label="库存数量" label="库存数量"
align="center" align="center"
prop="unitName" prop="num"
show-overflow-tooltip
/>
<el-table-column
label="报废数量"
align="center"
prop="unitName"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column label="报废数量" align="center">
<template slot-scope="scope">
<template v-if="scope.row.manageType == 0">
<el-button
size="mini"
type="primary"
@click="onViewCode(scope.row.maIds, scope.$index)"
>
编码选择
{{
scope.row.maCodeList.length > 0
? `(${scope.row.maCodeList.length})`
: ''
}}
</el-button>
</template>
<el-input-number
v-else
:min="0"
:precision="0"
:max="scope.row.num"
v-model="scope.row.outNum"
style="width: 120px"
placeholder="输入数量"
size="small"
/>
</template>
</el-table-column>
<el-table-column <el-table-column
label="报废原因" label="报废原因"
align="center" align="center"
prop="unitName" prop=""
show-overflow-tooltip show-overflow-tooltip
/> />
</el-table> </el-table>
@ -99,6 +122,8 @@
<script> <script>
import PageHeader from '@/components/pageHeader' import PageHeader from '@/components/pageHeader'
import { getConfigListApi } from '@/api/claimAndRefund/config-pages.js'
import { secondaryWarehouseList } from '@/api/claimAndRefund/secondStore'
export default { export default {
components: { PageHeader }, components: { PageHeader },
props: { props: {
@ -112,11 +137,23 @@ export default {
unitList: [], unitList: [],
typeList: [], typeList: [],
tableList: [], tableList: [],
total: 0,
loading: false,
selectCodeVisible: false,
codeList: [],
pageContent: '报废申请', pageContent: '报废申请',
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}, },
currentIndex: 0,
queryCodeParams: {
maCode: '',
maIds: '',
type: 1,
pageNum: 1,
pageSize: 10,
},
} }
}, },
methods: { methods: {
@ -133,6 +170,37 @@ export default {
.then(async () => {}) .then(async () => {})
.catch(() => {}) .catch(() => {})
}, },
getList() {
this.loading = true
secondaryWarehouseList(this.queryParams).then((res) => {
this.tableList = res.rows
this.total = res.total
this.loading = false
this.tableList = this.tableList.map((e) => {
return {
...e,
outNum: 0,
maCodeList: [],
}
})
})
},
//
onViewCode(maIds, index) {
this.queryCodeParams.maIds = maIds
this.currentIndex = index
this.getMaStatusByMaIdData()
this.queryCodeParams.maCode = ''
this.selectCodeVisible = true
},
async getMaStatusByMaIdData() {
const res = await getMaStatusByMaIdApi(this.queryCodeParams)
this.codeList = res.rows
},
},
created() {
this.getList()
}, },
} }
</script> </script>