新购入库单

This commit is contained in:
bb_pan 2025-03-19 18:32:52 +08:00
parent b0212fcc5e
commit eb2ae45acb
1 changed files with 333 additions and 440 deletions

View File

@ -1,13 +1,6 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item prop="dateRange">
<el-date-picker
v-model="dateRange"
@ -16,8 +9,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
></el-date-picker>
</el-form-item>
<el-form-item prop="keyWord">
<el-input
@ -29,36 +21,14 @@
/>
</el-form-item>
<el-form-item prop="isFinish">
<el-select
clearable
filterable
style="width: 240px"
placeholder="状态筛选"
v-model="queryParams.isFinish"
>
<el-option
:key="dict.id"
:label="dict.name"
:value="dict.id"
v-for="dict in taskStatusList"
/>
<el-select clearable filterable style="width: 240px" placeholder="状态筛选" v-model="queryParams.isFinish">
<el-option :key="dict.id" :label="dict.name" :value="dict.id" v-for="dict in taskStatusList" />
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
@ -75,14 +45,7 @@
</el-col> -->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
</el-col>
</el-row>
@ -100,41 +63,24 @@
align="center"
:reserve-selection="true"
/> -->
<el-table-column
label="序号"
align="center"
width="80"
type="index"
>
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{
(queryParams.pageNum - 1) * queryParams.pageSize +
scope.$index +
1
}}</span>
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
label="到货时间"
align="center"
prop="arrivalTime" width="180"
:show-overflow-tooltip="true"
/>
<el-table-column
label="采购单号"
align="center"
prop="code" width="150"
:show-overflow-tooltip="true"
/>
<el-table-column label="到货时间" align="center" prop="arrivalTime" width="180" :show-overflow-tooltip="true" />
<el-table-column label="采购单号" align="center" prop="code" width="150" :show-overflow-tooltip="true" />
<el-table-column
label="采购物资"
align="center" width="150"
align="center"
width="150"
prop="purchaseMaTypeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="采购数量"
align="center" width="100"
align="center"
width="100"
prop="purchaseMaNumber"
:show-overflow-tooltip="true"
/>
@ -157,54 +103,27 @@
<span>{{ scope.row.taxRate }}%</span>
</template>
</el-table-column>
<el-table-column
label="物资厂家"
align="center"
prop="supplier" width="100"
:show-overflow-tooltip="true"
/>
<el-table-column
label="操作人"
align="center"
prop="createBy" width="100"
:show-overflow-tooltip="true"
/>
<el-table-column
label="操作时间"
align="center"
prop="createTime" width="180"
:show-overflow-tooltip="true"
/>
<el-table-column
label="状态"
align="center"
prop="taskStatusName"
:show-overflow-tooltip="true"
>
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.purchase_task_status" :value="scope.row.taskStatus"/>-->
<!-- </template>-->
<el-table-column label="物资厂家" align="center" prop="supplier" width="100" :show-overflow-tooltip="true" />
<el-table-column label="操作人" align="center" prop="createBy" width="100" :show-overflow-tooltip="true" />
<el-table-column label="操作时间" align="center" prop="createTime" width="180" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" prop="taskStatusName" :show-overflow-tooltip="true">
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.purchase_task_status" :value="scope.row.taskStatus"/>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" width="250" fixed="right">
<template slot-scope="scope">
<el-button size="mini" @click="handleView(scope.row)">
查看
</el-button>
<el-button size="mini" @click="handleView(scope.row)">查看</el-button>
<el-button
size="mini"
type="primary" v-if="scope.row.taskStatusName=='未完成'"
type="primary"
v-if="scope.row.taskStatusName == '未完成'"
@click="handleUpdate(scope.row)"
>
入库
</el-button>
<!-- <el-button
size="mini"
type="warning"
@click="handlePrint(scope.row)"
>
入库单
</el-button> -->
<el-button size="mini" type="warning" @click="handlePrint(scope.row)">入库单</el-button>
</template>
</el-table-column>
</el-table>
@ -218,40 +137,29 @@
/>
<!-- 验收单弹窗 -->
<el-dialog
:title="title"
:visible.sync="openPrint"
width="1100px"
append-to-body
>
<el-dialog :title="title" :visible.sync="openPrint" width="800px" append-to-body>
<div style="height: 500px; overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div class="title" style="text-align: center;font-weight: 600;font-size: 16px;">
机具设备到货验收单
</div>
<div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap" >
<div class="item" style="width: 100%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<vue-easy-print tableShow ref="remarksPrintRef" class="print" style="margin: 0 20px">
<div style="text-align: center; font-weight: 600; font-size: 30px">机具设备新购入库单</div>
<div style="margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: space-between; width: 95%">
<div style="flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>单据编号{{ printData.code }}</span>
</div>
<div class="item" style=" width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px;">
<!-- <div class="item" style=" flex-shrink: 0; margin-bottom: 5px; font-size: 14px;">
<span>生产厂家供应商{{printData.supplierName}}</span>
</div>
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<span>到货日期{{ printData.arrivalDate }}</span>
</div> -->
<div class="item" style="flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>入库日期{{ printData.arrivalDate }}</span>
</div>
</div>
<el-table :data="printTableData" class="table" border
style="margin-top: 20px;width: 1000px;padding-bottom: 1px;">
<el-table :data="printTableData" class="table" border style="margin-top: 20px; padding: 1px">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" row="2"
/>
<el-table-column label="物资名称" align="center" prop="maTypeName"
/>
<el-table-column label="规格型号" align="center" prop="typeName"
/>
<el-table-column label="单位" align="center" prop="unitName"
/>
<el-table-column label="配送信息" align="center">
<el-table-column label="序号" align="center" type="index" row="2" />
<el-table-column label="物资名称" align="center" prop="maTypeName" />
<el-table-column label="规格型号" align="center" prop="typeName" />
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="入库数量" align="center" prop="inputNum" />
<!-- <el-table-column label="配送信息" align="center">
<el-table-column label="采购数量" align="center" prop="purchaseNum"
/>
<el-table-column
@ -270,12 +178,8 @@
align="center"
/>
</el-table-column>
</el-table-column>
<el-table-column
label="备注"
align="center"
prop="remark"
/>
</el-table-column> -->
<el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column-->
<!-- label="合格证及技术资料"-->
@ -285,14 +189,7 @@
<!-- <el-table-column label="包装" align="center" prop="" />-->
</el-table>
<div
class="fillIn"
style="
margin-top: 20px;
display: flex;
justify-content: space-between;
"
>
<div class="fillIn" style="margin-top: 20px; display: flex; justify-content: space-between">
<div class="item" style="width: 33%">
<div>
<span>供应科{{ printData.supplyDept }}</span>
@ -301,19 +198,13 @@
<div class="item" style="width: 33%">
<div>
<span
>生产技术科{{
printData.productionTechDept
}}</span
>
<span>生产技术科{{ printData.productionTechDept }}</span>
</div>
</div>
<div class="item" style="width: 33%">
<div>
<span
>库管班{{ printData.warehouseTeam }}</span
>
<span>库管班{{ printData.warehouseTeam }}</span>
</div>
</div>
</div>
@ -329,16 +220,14 @@
</template>
<script>
import {
getPurchaseList,
acceptancePurchase,
getPurchaseCheckFormByTaskId,
} from '@/api/purchase/goodsAccept'
import { getPurchaseList, acceptancePurchase, getPurchaseCheckFormByTaskId } from '@/api/purchase/goodsAccept'
import { downloadFile } from '@/utils/download'
import { getToken } from '@/utils/auth'
import vueEasyPrint from 'vue-easy-print'
export default {
name: 'GoodsAcceptList',
dicts: ['purchase_task_status'],
components: { vueEasyPrint },
data() {
return {
//
@ -351,7 +240,10 @@ export default {
showSearch: true,
showHouse: false,
dateRange: [],
taskStatusList:[{id:'0',name:'未完成'},{id:'1',name:'已完成'}],
taskStatusList: [
{ id: '0', name: '未完成' },
{ id: '1', name: '已完成' }
],
ids: [],
//
total: 0,
@ -365,17 +257,17 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: undefined,
keyWord: undefined
// taskStatus: 4,
},
openPrint: false,
printData: {},
printTableData: [],
printTableData: []
}
},
created() {
if(this.$route.query.code){
this.queryParams.keyWord=this.$route.query.code
if (this.$route.query.code) {
this.queryParams.keyWord = this.$route.query.code
}
this.getList()
},
@ -393,7 +285,7 @@ export default {
// this.queryParams.statusList=[3,13,4,14,19]
this.queryParams.taskStage = 4
// this.queryParams.modelName=""
getPurchaseList(this.queryParams).then((response) => {
getPurchaseList(this.queryParams).then(response => {
this.tableList = response.data.rows
this.total = response.data.total
this.loading = false
@ -413,7 +305,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id)
this.ids = selection.map(item => item.id)
this.single = selection.length != 1
this.multiple = !selection.length
},
@ -422,7 +314,7 @@ export default {
let query = { Id: row.id, taskId: row.taskId, isView: 'false' }
this.$tab.closeOpenPage({
path: '/purchase/goodsEntryDetail',
query,
query
})
},
//
@ -431,13 +323,13 @@ export default {
let query = { Id: row.id, taskId: row.taskId, isView: 'true' }
this.$tab.closeOpenPage({
path: '/purchase/goodsEntryDetail',
query,
query
})
},
//
acceptancePurchase() {
acceptancePurchase(this.ids)
.then((response) => {
.then(response => {
this.$modal.msgSuccess('操作成功')
this.getList()
})
@ -454,7 +346,7 @@ export default {
},
//
getPrintTable(taskId) {
getPurchaseCheckFormByTaskId(taskId).then((response) => {
getPurchaseCheckFormByTaskId(taskId).then(response => {
this.printData = response.data
this.printTableData = response.data.materialList
// let supplierList = []
@ -469,17 +361,18 @@ export default {
},
//
print() {
console.log('打印')
this.$refs.remarksPrintRef.print()
},
handleExport() {
this.download(
"/material/purchase_check_info/export",
{ ...this.queryParams,statusList:[3,13,4,14,19],taskStage: 4 },
'/material/purchase_check_info/export',
{ ...this.queryParams, statusList: [3, 13, 4, 14, 19], taskStage: 4 },
`新购到货入库_${new Date().getTime()}.xlsx`
);
},
},
)
}
}
}
</script>
<style lang="scss" scoped>