物料申领记录查询条件逻辑调整

master
zhangdi 11 months ago
parent 79e7c53de0
commit 31be6d6b88
  1. 8
      src/api/goodsManagement/goods.js
  2. 147
      src/views/goodsManagement/goodsList.vue
  3. 15
      src/views/goodsManagement/reciviceList.vue

@ -70,3 +70,11 @@ export const getDetailLog = (query) =>{
params:query
})
}
// 物料申领记录 getDetailApplyLog
export const getDetailApplyLog = (query) =>{
return request({
url:'/api/applyDetail/list',
method:'get',
params:query
})
}

@ -34,6 +34,7 @@
<el-button @click="handleApply(row)" v-show="permission.goodsReceive">申领</el-button>
<el-button @click="handleWarning(row)" v-show="permission.goodsAlarm">预警设置</el-button>
<el-button @click="handleLog(row)" v-show="permission.goodsLog">入库记录</el-button>
<el-button @click="handleApplyLog(row)" >申领记录</el-button>
<!-- -->
</template>
</avue-crud>
@ -253,6 +254,19 @@
</avue-crud>
</el-dialog>
<!-- 物资申领记录列表 -->
<el-dialog title="物资申领记录" :visible.sync="applyVisible" :append-to-body="true" width="70%"
:close-on-click-modal="false">
<avue-crud :option="applyoption" :table-loading="loading" :data="applyData" :page.sync="applyPage" ref="crud"
v-model="applyForm">
<template slot-scope="{ row }" slot="status">
<el-tag :type="row.status == 0 ? '' : row.status == 1 ? 'success' : row.status == 2 ? 'info' : row.status == -1 ? 'danger' : 'warning'">
{{ row.status == 0 ? '待审批' : row.status == 1 ? '待领取' : row.status == 2 ? '已完成' : row.status == 3 ? '待归还' : row.status == -1 ? '已驳回' : ''
}}
</el-tag>
</template>
</avue-crud>
</el-dialog>
</el-col>
</el-row>
</template>
@ -260,7 +274,7 @@
<script>
import SelectTree from '../../components/selectTree/tree.vue'
import { mapGetters } from "vuex";
import { getGoodsList, saveGoods, batchStore, getDetail, editGoods, applyGoods, inOrder, getDetailLog } from '@/api/goodsManagement/goods'
import { getGoodsList, saveGoods, batchStore, getDetail, editGoods, applyGoods, inOrder, getDetailLog,getDetailApplyLog } from '@/api/goodsManagement/goods'
import { getChildList } from '@/api/system/dictbiz'
import { addPurchase } from '@/api/purchaseManagement/purchase'
import { nextTick } from 'vue';
@ -364,34 +378,14 @@ export default {
search: true,
overHidden: true,
},
// {
// label: "",
// labelWidth: 120,
// prop: "goodsType",
// hide: true,
// type: "select",
// props: {
// label: "dictLabel",
// value: "dictValue",
// },
// search:true,
// dicData:[
// {dictValue:'001',dictLabel:''},
// {dictValue:'002',dictLabel:''},
// ]
// },
{
label: "物品大类",
labelWidth: 120,
prop: "bigClassName",
overHidden: true,
},
// {
// label: "",
// labelWidth: 120,
// prop: "typeName",
// overHidden:true,
// },
{
label: "品牌",
labelWidth: 120,
@ -428,6 +422,7 @@ export default {
labelWidth: 120,
overHidden: true,
slot: true,
search: true,
},
{
label: "单位",
@ -583,6 +578,85 @@ export default {
prop: 'enterNum'
},
]
},
applyVisible: false,//
applyData: [],
applyForm: {},
applyPage: {
pageSize: 10,
currentPage: 1,
total: 0,
},
applyoption: {
height: "auto",
calcHeight: 30,
tip: false,
searchShow: false,
searchMenuSpan: 6,
border: true,
index: true,
dialogType: "dialog",
dialogClickModal: false,
addBtn: false,
viewBtn: false,
editBtn: false,
delBtn: false,
searchShowBtn: false,
refreshBtn: false,
columnBtn: false,
selection: true,
printBtn: true,
menuWidth: 350,
menu:false,
column: [
{
label: '库存id',
prop: 'productCode'
},
{
label: '物料名称',
prop: 'productName'
},
{
label: '申领单号',
prop: 'applyCode'
},
{
label: "申领人",
labelWidth: 120,
prop: "applyUser",
search: true,
overHidden: true,
},
{
label: "需求单号",
labelWidth: 120,
prop: "requirementCode",
// search: true,
overHidden: true,
},
{
label: "申领时间",
labelWidth: 120,
prop: "applyTime",
overHidden: true,
},
{
label: '申领数量',
prop: 'applyNum'
},
{
label: '实际出库数量',
prop: 'outNum'
},
{
label: '状态',
labelWidth: 120,
overHidden: true,
prop: 'status',
slot: true
},
]
}
}
},
@ -618,11 +692,25 @@ export default {
getDetailLog(query).then(res => {
if (res.data.code == 200) {
this.logData = res.data.data.records
console.log(111111,res.data.data.records)
this.logPage.total = res.data.data.total
}
})
},
//
handleApplyLog(row){
this.applyVisible = true
let query = {
productCode: row.inventoryId,
current:this.applyPage.currentPage,
size:this.applyPage.pageSize,
}
getDetailApplyLog(query).then(res => {
if (res.data.code == 200) {
this.applyData = res.data.data.records
this.applyPage.total = res.data.data.total
}
})
},
changeWare(val) {
this.addForm.warehouseName = this.warehouseList.find(item => item.id == val).name
},
@ -744,7 +832,8 @@ export default {
parameter: item.rule, //
count: 0, //
goodsNumber: item.num, //
returnTime: ''
returnTime: '',
productCode:item.inventoryId
})
})
this.receiveForm.applyUser = this.userInfo.user_name
@ -940,7 +1029,8 @@ export default {
parameter: row.rule, //
count: 0, //
goodsNumber: row.num, //
returnTime: '' //
returnTime: '',
productCode:row.inventoryId //
})
this.receiveForm.applyUser = this.userInfo.user_name
this.dialogReceive = true
@ -1064,7 +1154,8 @@ export default {
xh: item.model, //
rule: item.parameter, //
applyNum: item.count, //
returnTime: item.returnTime !== '' ? item.returnTime + ' 23:59:59' : ''
returnTime: item.returnTime !== '' ? item.returnTime + ' 23:59:59' : '',
productCode:item.productCode
})
})
let query = {
@ -1100,6 +1191,8 @@ export default {
bigClassId: this.searchForm.bigClassId ? this.searchForm.bigClassId : null,
current: this.page.currentPage, //
size: this.page.pageSize,
warehouseName:params.warehouseName
}
getGoodsList(query).then(res => {
this.data = res.data.data.records

@ -185,6 +185,8 @@ export default {
tip: false,
searchShow: true,
searchMenuSpan: 6,
searchSpan:8,
searchLabelWidth:120,
border: true,
index: true,
selection: true,
@ -197,7 +199,7 @@ export default {
searchShowBtn: false,
refreshBtn: false,
columnBtn: false,
menuWidth: 200,
menuWidth: 300,
searchEnter:true,
gridBtn:false,
column: [
@ -263,6 +265,7 @@ export default {
searchValue: dateFormat(new Date(), "yyyy-MM-dd"),
searchClearable: false,
},
// {
// label: "",
// labelWidth: 120,
@ -292,6 +295,13 @@ export default {
overHidden: true,
slot: true,
},
{
label: "实验室",
labelWidth: 120,
overHidden: true,
search: true,
prop: "reportUnitName",
},
{
label: '状态',
labelWidth: 120,
@ -578,7 +588,8 @@ export default {
endTime: this.searchFrom.timeRange&&this.searchFrom.timeRange.length != 0 ? this.searchFrom.timeRange[1].toString() + ' 23:59:59' : null,
isReturn: this.searchFrom.isReturn ? this.searchFrom.isReturn : null,
dataType:this.dataTypes,
applyUser:this.searchFrom.applyUser
applyUser:this.searchFrom.applyUser,
reportUnitName:this.searchFrom.reportUnitName
}
getReciviceList(query).then(res => {
this.data = res.data.data.records

Loading…
Cancel
Save