领料模块领料单优化

This commit is contained in:
zzyuan 2025-01-08 14:40:33 +08:00
parent 6a2a644b1c
commit 6d92114f41
4 changed files with 151 additions and 411 deletions

BIN
src/assets/signTemp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -197,12 +197,12 @@
<el-input <el-input
v-model.number="scope.row.preNum" v-model.number="scope.row.preNum"
controls-position="right" type="number" controls-position="right" type="number"
style="width: 100%" style="width: 100%" :disabled="scope.row.alNum&&scope.row.alNum!=0"
:min="0" @input="(v)=>(scope.row.unitValue==1?scope.row.preNum=Number(v.replace(/[^\d.]/g,'')) : scope.row.preNum=Number(v.replace(/[^\d]/g,'')))" :min="0" @input="(v)=>(scope.row.unitValue==1?scope.row.preNum=Number(v.replace(/[^\d.]/g,'')) : scope.row.preNum=Number(v.replace(/[^\d]/g,'')))"
></el-input> ></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="已出库数量" align="center" prop="alNum" v-if="maForm.taskId" :show-overflow-tooltip="true"/>
<!-- <el-table-column align="center" label="出库数量" prop="alNum" /> --> <!-- <el-table-column align="center" label="出库数量" prop="alNum" /> -->
<el-table-column <el-table-column
label="备注" label="备注"
@ -225,7 +225,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
style="color: red" style="color: red" v-if="!scope.row.alNum||scope.row.alNum==0"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button >删除</el-button
> >
@ -655,6 +655,10 @@ export default {
this.$message.error(`${i + 1} 行的 ${'预领数量必须大于0'} `); this.$message.error(`${i + 1} 行的 ${'预领数量必须大于0'} `);
return return
} }
if(this.equipmentList[i].preNum>this.equipmentList[i].storageNum){
this.$message.error(`${i + 1} 行的 ${'预领数量不可大于库存量'} `);
return
}
} }
console.log("projectId", this.projectTemp); console.log("projectId", this.projectTemp);

View File

@ -1,13 +1,6 @@
<template> <template>
<div> <div>
<el-form <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<el-form-item label="日期"> <el-form-item label="日期">
<el-date-picker <el-date-picker
v-model="queryParams.time" v-model="queryParams.time"
@ -100,175 +93,50 @@
></right-toolbar> ></right-toolbar>
</el-row> </el-row>
<el-table <el-table v-loading="loading" :data="typeList" row-key="id" @selection-change="handleSelectionChange" border>
v-loading="loading" <el-table-column type="selection" width="55" align="center" :selectable="selectable"/>
:data="typeList"
row-key="id"
@selection-change="handleSelectionChange"
border
>
<el-table-column
type="selection"
width="55"
align="center"
:selectable="selectable"
/>
<el-table-column width="60" align="center" label="序号" type="index" > <el-table-column width="60" align="center" label="序号" type="index" >
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="申请时间" align="center" prop="createTime" width="160" :show-overflow-tooltip="true"/>
align="center" <el-table-column label="申请人" align="center" prop="createBy" width="100" :show-overflow-tooltip="true"/>
width="100" <el-table-column label="实施单位" align="center" prop="impUnitName" width="120px" :show-overflow-tooltip="true"/>
label="申请时间" <el-table-column label="合同主体" align="center" prop="contractPart" width="120px" :show-overflow-tooltip="true"/>
prop="createTime" <el-table-column label="租赁单位" align="center" prop="leaseUnit" width="150px" :show-overflow-tooltip="true"/>
<el-table-column label="租赁工程" align="center" prop="leaseProject" width="150px" :show-overflow-tooltip="true"/>
/> <!-- <el-table-column label="领料物资类型" align="center" prop="maTypeNames" width="110px" :show-overflow-tooltip="true"/> -->
<el-table-column <el-table-column label="协议号" align="center" prop="agreementCode" width="140" :show-overflow-tooltip="true"/>
label="申请人" <el-table-column label="租赁申请单号" align="center" prop="code" width="140px" :show-overflow-tooltip="true"></el-table-column>
width="100" <el-table-column label="领料人" align="center" prop="leasePerson" :show-overflow-tooltip="true"/>
align="center" <!-- <el-table-column label="领料人电话" align="center" prop="phone" width="120px" :show-overflow-tooltip="true"/> -->
prop="createBy" <el-table-column label="状态" align="center" prop="taskStatus" :show-overflow-tooltip="true" width="150">
:show-overflow-tooltip="true"
/>
<el-table-column
label="实施单位"
align="center"
prop="impUnitName"
width="150px"
:show-overflow-tooltip="true"
/>
<el-table-column
label="合同主体"
align="center"
prop="contractPart"
width="150px"
:show-overflow-tooltip="true"
/>
<el-table-column
label="租赁单位"
align="center"
prop="leaseUnit"
width="150px"
:show-overflow-tooltip="true"
/>
<el-table-column
label="租赁工程"
align="center"
prop="leaseProject"
width="150px"
:show-overflow-tooltip="true"
/>
<!-- <el-table-column
label="领料物资类型"
align="center"
prop="maTypeNames"
width="110px"
:show-overflow-tooltip="true"
/> -->
<el-table-column
label="协议号"
align="center"
prop="agreementCode"
width="140"
:show-overflow-tooltip="true"
/>
<el-table-column
label="租赁申请单号"
align="center"
prop="code"
width="140px"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
label="领料人"
align="center"
prop="leasePerson"
:show-overflow-tooltip="true"
/>
<!-- <el-table-column
label="领料人电话"
align="center"
prop="phone"
width="120px"
:show-overflow-tooltip="true"
/> -->
<el-table-column
label="状态"
align="center"
prop="taskStatus"
:show-overflow-tooltip="true"
>
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag :options="dict.type.lease_task_status" :value="scope.row.taskStatus"/>
:options="dict.type.lease_task_status"
:value="scope.row.taskStatus"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="备注" align="center" width="100" prop="remark" :show-overflow-tooltip="true"/>
label="备注"
align="center"
width="100"
prop="remark"
:show-overflow-tooltip="true"
/>
<el-table-column label="操作" align="center" width="300" fixed="right"> <el-table-column label="操作" align="center" width="300" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" style="margin-bottom: 10px" type="normal"
size="mini"
style="margin-bottom: 10px"
type="normal"
@click="handleView(scope.row)" @click="handleView(scope.row)"
>查看 >查看</el-button>
</el-button> <el-button size="mini" style="margin-bottom: 10px" type="primary"
<el-button @click="handleUpdate(scope.row)" v-if="scope.row.taskStatus != 4" v-hasPermi="['purchase:info:edit']"
size="mini" >编辑</el-button>
style="margin-bottom: 10px" <el-button size="mini" style="margin-bottom: 10px" type="success"
type="primary" @click="handleSend(scope.row)" v-if="scope.row.taskStatus == 1" v-hasPermi="['purchase:person:notice']"
@click="handleUpdate(scope.row)" >发布</el-button>
v-if="scope.row.taskStatus != 4" <el-button size="mini" type="warning"
v-hasPermi="['purchase:info:edit']" v-if="scope.row.taskStatus != 1" @click="handleLld(scope.row)"
>编辑 >领料单</el-button>
</el-button> <el-button size="mini" type="warning"
@click="handlePrint(scope.row)" v-if="scope.row.taskStatus == 4"
<el-button >出库检验单</el-button>
size="mini" <el-button size="mini" type="danger"
style="margin-bottom: 10px" @click="handleDeletePurchase(scope.row)" v-if="scope.row.taskStatus == 1" v-hasPermi="['purchase:info:remove']"
type="success" >删除</el-button>
@click="handleSend(scope.row)"
v-if="scope.row.taskStatus == 1"
v-hasPermi="['purchase:person:notice']"
>发布
</el-button>
<el-button
size="mini"
type="warning"
v-if="scope.row.taskStatus != 1"
@click="handleLld(scope.row)"
>领料单
</el-button>
<el-button
size="mini"
type="warning"
@click="handlePrint(scope.row)"
v-if="scope.row.taskStatus == 4"
>出库检验单
</el-button>
<el-button
size="mini"
type="danger"
@click="handleDeletePurchase(scope.row)"
v-if="scope.row.taskStatus == 1"
v-hasPermi="['purchase:info:remove']"
>删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -281,58 +149,26 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 验收单弹窗 --> <!-- 出库检验单弹窗 -->
<el-dialog <el-dialog :title="title" :visible.sync="openPrint" width="1100px" append-to-body>
:title="title"
:visible.sync="openPrint"
width="1100px"
append-to-body
>
<div style="height: 600px; overflow-y: scroll;padding: 0 20px"> <div style="height: 600px; overflow-y: scroll;padding: 0 20px">
<!-- <vue-easy-print tableShow ref="remarksPrintRefCheck" class="print" :printable="'checkId'"> --> <!-- <vue-easy-print tableShow ref="remarksPrintRefCheck" class="print" :printable="'checkId'"> -->
<div id="checkId"> <div id="checkId">
<div <div class="title" style="text-align: center; font-weight: 600; font-size: 16px">
class="title"
style="text-align: center; font-weight: 600; font-size: 16px"
>
施工机具设备出库检验记录表 施工机具设备出库检验记录表
</div> </div>
<div <div class="info" style="margin-top: 10px; display: flex; align-items: center;">
class="info" <div class="item"
style="margin-top: 10px; display: flex; flex-wrap: wrap" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>领用工程</span> <span>领用工程</span>
{{ checkDataInfo.leaseProject }} {{ checkDataInfo.leaseProject }}
</div> </div>
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>使用单位</span> <span>使用单位</span>
{{ checkDataInfo.leaseUnit }} {{ checkDataInfo.leaseUnit }}
</div> </div>
</div> </div>
<el-table <el-table :data="printTableData" class="table" style="margin-top: 20px;width: 1000px; padding: 2px" border>
:data="printTableData"
class="table"
style="margin-top: 20px;width: 1000px; padding-bottom: 1px"
border
>
<el-table-column label="机具名称" align="center" prop="typeName"/> <el-table-column label="机具名称" align="center" prop="typeName"/>
<el-table-column label="规格型号" align="center" prop="typeModelName" /> <el-table-column label="规格型号" align="center" prop="typeModelName" />
<el-table-column label="单位" align="center" prop="unit" width="40px"/> <el-table-column label="单位" align="center" prop="unit" width="40px"/>
@ -347,15 +183,7 @@
<el-table-column label="备注" align="center" prop="remark"/> <el-table-column label="备注" align="center" prop="remark"/>
</el-table> </el-table>
<div <div class="fillIn" style="margin-top: 20px;display: flex;align-items: center;justify-content: right;">
class="fillIn"
style="
margin-top: 20px;
display: flex;
align-items: center;
justify-content: right;
"
>
<div class="item" style="width: 30%; align-items: center;position: relative;"> <div class="item" style="width: 30%; align-items: center;position: relative;">
<div> <div>
<span>检验单位</span> <span>检验单位</span>
@ -364,7 +192,6 @@
<canvas id="canvas" width="165" height="165" style="position: absolute; top: 50%; left: 90%; transform: translate(-100%, -50%);"></canvas> <canvas id="canvas" width="165" height="165" style="position: absolute; top: 50%; left: 90%; transform: translate(-100%, -50%);"></canvas>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- </vue-easy-print> --> <!-- </vue-easy-print> -->
@ -376,41 +203,20 @@
<el-button @click="closeDialogAndRefresh"> </el-button> <el-button @click="closeDialogAndRefresh"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 领料单弹窗 --> <!-- 领料单弹窗 -->
<el-dialog :visible.sync="open" width="800px" :title="title" append-to-body> <el-dialog :visible.sync="open" width="800px" :title="title" append-to-body>
<div style="height: 500px; overflow-y: scroll; padding: 0 20px"> <div style="height: 500px; overflow-y: scroll; padding: 0 20px">
<vue-easy-print tableShow ref="remarksPrintRef" class="print"> <vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div <div class="title" style="text-align: center; font-weight: 600; font-size: 16px">
class="title"
style="text-align: center; font-weight: 600; font-size: 16px"
>
领料单 领料单
</div> </div>
<div <div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap" >
class="info" <div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
style="margin-top: 10px; display: flex; flex-wrap: wrap"
>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>领料单位</span> <span>领料单位</span>
{{ leaseApplyData.leaseUnit }} {{ leaseApplyData.leaseUnit }}
</div> </div>
<div <div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>工程名称</span> <span>工程名称</span>
{{ leaseApplyData.leaseProject }} {{ leaseApplyData.leaseProject }}
</div> </div>
@ -418,97 +224,48 @@
<span>时间</span> <span>时间</span>
<span v-if="leaseApplyData.createTime">{{ leaseApplyData.createTime.split(" ")[0] }}</span> <span v-if="leaseApplyData.createTime">{{ leaseApplyData.createTime.split(" ")[0] }}</span>
</div> </div>
<div <div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>编号</span> <span>编号</span>
{{ leaseApplyData.code }} {{ leaseApplyData.code }}
</div> </div>
</div> </div>
<el-table <div style="width: 100%;margin-top: 20px;">
:data="leaseApplyDetails" <el-table :data="leaseApplyDetails" class="table" border style="padding: 2px;">
class="table"
border
style="margin-top: 20px; padding: 1px"
>
<el-table-column label="序号" align="center" type="index" /> <el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" /> <el-table-column label="类型名称" align="center" prop="typeName" />
<!-- <el-table-column type="expand">
<template slot-scope="scope">
<div class="nested-table-container">
<el-table :data="scope.row.maTypeDetails" style="width: 100%">
&lt;!&ndash; 子表格的列 &ndash;&gt;
<el-table-column label="序号" align="center" type="index"/>
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column
label="规格型号"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="预领数量"
align="center"
prop="preNum"
:show-overflow-tooltip="true"
/>
</el-table>
</div>
</template>
</el-table-column>-->
<el-table-column label="规格型号" align="center" prop="typeName" /> <el-table-column label="规格型号" align="center" prop="typeName" />
<el-table-column label="计量单位" align="center" prop="unitName" /> <el-table-column label="计量单位" align="center" prop="unitName" />
<el-table-column label="预领数量" align="center" prop="preNum" /> <el-table-column label="预领数量" align="center" prop="preNum" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column <el-table-column label="出库方式" align="center" prop="manageType">
label="出库方式"
align="center"
prop="manageType"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.manageType == 0" style="color: blue;" @click="codeInfo(scope.row)">编码出库</span> <span v-if="scope.row.manageType == 0" style="color: blue;" @click="codeInfo(scope.row)">编码出库</span>
<span v-if="scope.row.manageType == 1">数量出库</span> <span v-if="scope.row.manageType == 1">数量出库</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column-->
<!-- label="出库方式"-->
<!-- align="center"-->
<!-- prop="manageTypeName"-->
<!-- />-->
</el-table> </el-table>
<div
class="fillIn"
style="
margin-top: 30px;
display: flex;
justify-content: space-between;
"
>
<div class="item" style="width: 25%">
<span>审核</span>
</div> </div>
<div class="item" style="width: 25%"> <div class="fillIn" style="margin-top: 30px;display: flex;justify-content: space-between;">
<div class="item" style="width: 24%;display: flex;align-items: center;flex-wrap: wrap;">
<span>审核</span>
<img src="../../../../../assets/signTemp.png" style="width: 80px;height: 30px;" alt="">
</div>
<div class="item" style="width: 24%;display: flex;align-items: center;flex-wrap: wrap;">
<span>领料</span> <span>领料</span>
</div> </div>
<div class="item" style="width: 25%"> <div class="item" style="width: 24%;display: flex;align-items: center;flex-wrap: wrap;">
<span>仓库</span>
</div>
<div class="item" style="width: 25%">
<span>制单</span> <span>制单</span>
</div> </div>
<div class="item" style="width: 28%;display: flex;align-items: center;">
<div style="width: 25%;">库管</div>
<div style="width: 75%;display: flex;align-items: center;flex-wrap: wrap;">
<img src="../../../../../assets/signTemp.png" style="width: 45%;height: 30px;" alt="">
<img src="../../../../../assets/signTemp.png" style="width: 45%;height: 30px;" alt="">
<img src="../../../../../assets/signTemp.png" style="width: 45%;height: 30px;" alt="">
<img src="../../../../../assets/signTemp.png" style="width: 45%;height: 30px;" alt="">
</div>
</div>
</div> </div>
</vue-easy-print> </vue-easy-print>
</div> </div>
@ -519,40 +276,17 @@
</el-dialog> </el-dialog>
<!-- 编码管理查看弹窗 --> <!-- 编码管理查看弹窗 -->
<el-dialog <el-dialog :title="titleView" :visible.sync="showView" width="800px" append-to-body>
:title="titleView"
:visible.sync="showView"
width="800px"
append-to-body
>
<div style="overflow-y: scroll"> <div style="overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRefView" class="print"> <vue-easy-print tableShow ref="remarksPrintRefView" class="print">
<div <div class="title" style="text-align: center; font-weight: 600; font-size: 16px; margin-bottom:20px">
class="title"
style="text-align: center; font-weight: 600; font-size: 16px; margin-bottom:20px"
>
领料单编号明细 领料单编号明细
</div> </div>
<el-table :data="getListViewInfo" width="600px" height="450"> <el-table :data="getListViewInfo" style="padding: 1px;">
<el-table-column align="center" label="序号" type="index" width="55" /> <el-table-column align="center" label="序号" type="index" width="55" />
<el-table-column <el-table-column label="类型名称" align="center" prop="materialName" :show-overflow-tooltip="true"/>
label="类型名称" <el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true"/>
align="center" <el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
prop="materialName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="设备编码"
align="center"
prop="maCode"
:show-overflow-tooltip="true"
/>
</el-table> </el-table>
</vue-easy-print> </vue-easy-print>
</div> </div>
@ -779,7 +513,7 @@ export default {
this.printTableData = res.data.leaseOutVoList; this.printTableData = res.data.leaseOutVoList;
setTimeout(() => { setTimeout(() => {
this.chapter('检验专用章', '机具设备分公司') this.chapter('检验专用章', '机具设备分公司')
}, 200); }, 500);
this.openPrint = true; this.openPrint = true;
this.title = "出库检验单"; this.title = "出库检验单";
}, },
@ -809,6 +543,7 @@ export default {
printable: 'checkId', printable: 'checkId',
type: 'html', type: 'html',
targetStyles: ['*'], targetStyles: ['*'],
maxWidth:'1200'
// //
}); });
}, },
@ -988,4 +723,5 @@ export default {
width: 70px !important; width: 70px !important;
margin-bottom: 10px; margin-bottom: 10px;
} }
</style> </style>

View File

@ -728,10 +728,10 @@
<span>领料</span> <span>领料</span>
</div> </div>
<div class="item" style="width: 25%"> <div class="item" style="width: 25%">
<span>仓库</span> <span>制单</span>
</div> </div>
<div class="item" style="width: 25%"> <div class="item" style="width: 25%">
<span>制单</span> <span>库管</span>
</div> </div>
</div> </div>
</vue-easy-print> </vue-easy-print>