|
|
|
|
@ -3,7 +3,7 @@ |
|
|
|
|
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page" |
|
|
|
|
:permission="permissionList" @search-change="searchChange" @search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" @on-load="onLoad" > |
|
|
|
|
@refresh-change="refreshChange" @on-load="onLoad"> |
|
|
|
|
<!-- @row-click="rowSelect" --> |
|
|
|
|
<template slot-scope="scope" slot="menuLeft"> |
|
|
|
|
<el-button size="small" plain @click.stop="handleDesign()">新增入库单 |
|
|
|
|
@ -12,12 +12,13 @@ |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="caigoudanmingcheng"> |
|
|
|
|
<el-button type="text" @click.stop="purchaseFn(scope.row)" v-if="scope.row.caigoudanmingcheng!=''">{{scope.row.caigoudanmingcheng}}</el-button> |
|
|
|
|
<el-button type="text" @click.stop="purchaseFn(scope.row)" v-if="scope.row.caigoudanmingcheng != ''">{{ |
|
|
|
|
scope.row.caigoudanmingcheng }}</el-button> |
|
|
|
|
<span v-else>无</span> |
|
|
|
|
</template> |
|
|
|
|
<template #menu="scope"> |
|
|
|
|
<el-button type="text" @click.stop="handleDetails(scope.row)">详情</el-button> |
|
|
|
|
<el-button type="text" v-if="scope.row.str7==1" @click.stop="handleEdit(scope.row)">编辑</el-button> |
|
|
|
|
<el-button type="text" v-if="scope.row.str7 == 1" @click.stop="handleEdit(scope.row)">编辑</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
<!-- 新增 --> |
|
|
|
|
@ -26,12 +27,13 @@ |
|
|
|
|
</inDialog> |
|
|
|
|
|
|
|
|
|
<!-- 采购单详情 --> |
|
|
|
|
<purchaseDialog :showDialog="purchaseOpen" v-if="purchaseOpen" @closeDialog="closeDialog" :purchaseTitle="purchaseTitle"></purchaseDialog> |
|
|
|
|
<purchaseDialog :showDialog="purchaseOpen" v-if="purchaseOpen" @closeDialog="closeDialog" |
|
|
|
|
:purchaseTitle="purchaseTitle"></purchaseDialog> |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { getList, remove } from "@/api/report/report"; |
|
|
|
|
import { getList } from "@/api/firstOrder/inbound"; |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
import inDialog from './components/inDialog.vue'; |
|
|
|
|
import purchaseDialog from './components/purchaseDialog.vue'; |
|
|
|
|
@ -70,72 +72,97 @@ export default { |
|
|
|
|
gridSpan: false, |
|
|
|
|
filterBtn: false, |
|
|
|
|
columnBtn: false, |
|
|
|
|
menuWidth:120, |
|
|
|
|
menu:true, |
|
|
|
|
menuWidth: 120, |
|
|
|
|
menu: true, |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
{ |
|
|
|
|
label: "采购单名称", |
|
|
|
|
prop: "caigoudanmingcheng", |
|
|
|
|
width:180, |
|
|
|
|
prop: "purchaseEneInfo", |
|
|
|
|
width: 180, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "仓库类型", |
|
|
|
|
prop: "str1", |
|
|
|
|
label: "仓库名称", |
|
|
|
|
prop: "warehouseName", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "入库单号", |
|
|
|
|
prop: "str2", |
|
|
|
|
prop: "orderNo", |
|
|
|
|
width: 110 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "入库时间", |
|
|
|
|
prop: "str3", |
|
|
|
|
label: "入库日期", |
|
|
|
|
prop: "inDate", |
|
|
|
|
search: true, |
|
|
|
|
type: "date", |
|
|
|
|
searchRange:true, |
|
|
|
|
type: "datetime", |
|
|
|
|
searchRange: true, |
|
|
|
|
startPlaceholder: '开始时间', |
|
|
|
|
endPlaceholder: "结束时间", |
|
|
|
|
|
|
|
|
|
format: 'yyyy-MM-DD HH:mm:ss', |
|
|
|
|
valueFormat: 'yyyy-MM-DD HH:mm:ss', |
|
|
|
|
width: 120, |
|
|
|
|
searchParam: 'startTime', |
|
|
|
|
searchEndParam: 'endTime' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "入库人", |
|
|
|
|
prop: "str4", |
|
|
|
|
prop: "inOperatorName", |
|
|
|
|
search: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "审批人", |
|
|
|
|
prop: "str5", |
|
|
|
|
label: "来源", |
|
|
|
|
prop: "source", |
|
|
|
|
search: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "事由", |
|
|
|
|
prop: "reason", |
|
|
|
|
search: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "来源", |
|
|
|
|
prop: "str6", |
|
|
|
|
label: "物资类型", |
|
|
|
|
prop: "materialType", |
|
|
|
|
search: false, |
|
|
|
|
type: 'select', |
|
|
|
|
// dicData:[{ |
|
|
|
|
// label: '办公物资', |
|
|
|
|
// value: '1' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// label: '其他物资', |
|
|
|
|
// value: '2' |
|
|
|
|
// }] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "审批人员", |
|
|
|
|
prop: "approverName", |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
label: "审批状态", |
|
|
|
|
prop: "str7", |
|
|
|
|
type:'select', |
|
|
|
|
dicData:[ |
|
|
|
|
{ |
|
|
|
|
label:'暂存', |
|
|
|
|
value:1 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label:'待审批', |
|
|
|
|
value:2 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label:'已审批', |
|
|
|
|
value:3 |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
label: "状态", |
|
|
|
|
prop: "status", |
|
|
|
|
type: 'select', |
|
|
|
|
// dicData:[ |
|
|
|
|
// { |
|
|
|
|
// label:'暂存', |
|
|
|
|
// value:1 |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// label:'待审批', |
|
|
|
|
// value:1 |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// label:'已审批', |
|
|
|
|
// value:2 |
|
|
|
|
// }, |
|
|
|
|
// ] |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
data: [{ |
|
|
|
|
caigoudanmingcheng:"2025年第一季度采购单", |
|
|
|
|
caigoudanmingcheng: "2025年第一季度采购单", |
|
|
|
|
str1: '类型一', |
|
|
|
|
str2: '00000001', |
|
|
|
|
str3: '2025-03-01', |
|
|
|
|
@ -144,7 +171,7 @@ export default { |
|
|
|
|
str6: '采购', |
|
|
|
|
str7: '1', |
|
|
|
|
}, { |
|
|
|
|
caigoudanmingcheng:"2025年第二季度采购单", |
|
|
|
|
caigoudanmingcheng: "2025年第二季度采购单", |
|
|
|
|
str1: '类型二', |
|
|
|
|
str2: '00000002', |
|
|
|
|
str3: '2025-03-02', |
|
|
|
|
@ -153,7 +180,7 @@ export default { |
|
|
|
|
str6: '采购', |
|
|
|
|
str7: '2', |
|
|
|
|
}, { |
|
|
|
|
caigoudanmingcheng:"", |
|
|
|
|
caigoudanmingcheng: "", |
|
|
|
|
str1: '类型三', |
|
|
|
|
str2: '00000002', |
|
|
|
|
str3: '2025-03-02', |
|
|
|
|
@ -162,7 +189,7 @@ export default { |
|
|
|
|
str6: '单项', |
|
|
|
|
str7: '3', |
|
|
|
|
}, { |
|
|
|
|
caigoudanmingcheng:"", |
|
|
|
|
caigoudanmingcheng: "", |
|
|
|
|
str1: '类型三', |
|
|
|
|
str2: '00000002', |
|
|
|
|
str3: '2025-03-02', |
|
|
|
|
@ -174,9 +201,9 @@ export default { |
|
|
|
|
inDialogVisible: false, |
|
|
|
|
inDialogTiltle: '入库', |
|
|
|
|
inDialogType: '',//弹框类型 |
|
|
|
|
purchaseOpen:false, |
|
|
|
|
purchaseTitle:'', |
|
|
|
|
inTitle:'', |
|
|
|
|
purchaseOpen: false, |
|
|
|
|
purchaseTitle: '', |
|
|
|
|
inTitle: '', |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
@ -198,29 +225,29 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
handleDesign() { |
|
|
|
|
handleDesign() { |
|
|
|
|
this.inDialogVisible = true |
|
|
|
|
this.inDialogType = 'add' |
|
|
|
|
this.inDialogTiltle = '新增入库' |
|
|
|
|
}, |
|
|
|
|
// 详情 |
|
|
|
|
handleDetails(row){ |
|
|
|
|
handleDetails(row) { |
|
|
|
|
this.inDialogVisible = true |
|
|
|
|
this.inDialogType = 'details' |
|
|
|
|
this.inDialogType = 'details' |
|
|
|
|
this.inDialogTiltle = '详情' |
|
|
|
|
}, |
|
|
|
|
// 编辑 |
|
|
|
|
handleEdit(){ |
|
|
|
|
handleEdit() { |
|
|
|
|
this.inDialogVisible = true |
|
|
|
|
this.inDialogType = 'edit' |
|
|
|
|
this.inDialogType = 'edit' |
|
|
|
|
this.inDialogTiltle = '编辑' |
|
|
|
|
}, |
|
|
|
|
// 采购单 |
|
|
|
|
purchaseFn(row){ |
|
|
|
|
purchaseFn(row) { |
|
|
|
|
this.purchaseOpen = true |
|
|
|
|
this.purchaseTitle = row.caigoudanmingcheng+'详情' |
|
|
|
|
this.purchaseTitle = row.caigoudanmingcheng + '详情' |
|
|
|
|
}, |
|
|
|
|
closeDialog(){ |
|
|
|
|
closeDialog() { |
|
|
|
|
this.purchaseOpen = false |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
@ -287,10 +314,37 @@ export default { |
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
// onLoad(page, params = {}) { |
|
|
|
|
// this.loading = true; |
|
|
|
|
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
|
|
|
|
// console.log(89122229,res.data.result) |
|
|
|
|
|
|
|
|
|
// // const data = res.data.data; |
|
|
|
|
// this.data = res.data.result.list; |
|
|
|
|
// this.loading = false; |
|
|
|
|
// this.page.total = res.data.result.total; |
|
|
|
|
// // this.selectionClear(); |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
|
|
this.loading = false |
|
|
|
|
const queryParams = { |
|
|
|
|
...params, |
|
|
|
|
...this.query, |
|
|
|
|
pageSize: page.pageSize, |
|
|
|
|
pageNum: page.currentPage |
|
|
|
|
}; |
|
|
|
|
if (queryParams.inDate && Array.isArray(queryParams.inDate)) { |
|
|
|
|
queryParams.startTime = queryParams.inDate[0]; |
|
|
|
|
queryParams.endTime = queryParams.inDate[1]; |
|
|
|
|
delete queryParams.inDate; |
|
|
|
|
} |
|
|
|
|
console.log("处理后的参数:", queryParams); |
|
|
|
|
getList(page.currentPage, page.pageSize, queryParams).then(res => { |
|
|
|
|
this.data = res.data.result.list; |
|
|
|
|
this.loading = false; |
|
|
|
|
this.page.total = res.data.result.total; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|