This commit is contained in:
parent
7758d128dc
commit
b406c7ddca
|
|
@ -65,8 +65,8 @@
|
|||
<el-form :model="exitForm" label-width="80px" size="small" inline @submit.native.prevent>
|
||||
</el-form>
|
||||
<div>
|
||||
<vue-easy-print tableShow ref="remarksPrintRefPass" style="padding: 0 20px; font-size: 18px">
|
||||
<div id="passId" style="padding: 0 20px; font-size: 18px">
|
||||
<vue-easy-print tableShow ref="remarksPrintRefPass">
|
||||
<div id="passId" style="margin: 20px;padding: 40px 60px; font-size: 18px;border: 2px solid #000; position: relative">
|
||||
<div style="text-align: center; font-weight: 600; font-size: 36px; margin-bottom: 40px">
|
||||
出 门 证
|
||||
</div>
|
||||
|
|
@ -83,15 +83,15 @@
|
|||
出门,请予放行。
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 40px 100px 15px; text-align: end">(公章)</div>
|
||||
<div style="text-align: end;margin-right: 90px;">{{ exitForm.addDate }}</div>
|
||||
<div style="margin: 40px 75px 15px; text-align: end">(公章)</div>
|
||||
<div style="text-align: end;margin-right: 50px;">{{ formatDate(exitForm.addDate) }}</div>
|
||||
<div>此证盖章有效</div>
|
||||
<div v-if="exitPermitDialogVisible" style="position: absolute; top: 160px; left: 500px">
|
||||
<div v-if="exitPermitDialogVisible" style="position: absolute; top: 126px; left: 460px">
|
||||
<canvas id="canvas" width="200" height="200"></canvas>
|
||||
</div>
|
||||
<div v-if="showImg" style="position: absolute; top: 160px; left: 500px">
|
||||
<!-- <div v-if="showImg" style="position: absolute; top: 126px; left: 460px">
|
||||
<img :src="canvasImgUrl" width="200" height="200" />
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</vue-easy-print>
|
||||
</div>
|
||||
|
|
@ -236,10 +236,11 @@ export default {
|
|||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.resetForm();
|
||||
this.open = true;
|
||||
// 处理时间 2025-08-20 转为 2025年08月20日
|
||||
formatDate(date) {
|
||||
if (!date) return '';
|
||||
const options = { year: 'numeric', month: 'long', day: 'numeric' };
|
||||
return new Date(date).toLocaleDateString('zh-CN', options);
|
||||
},
|
||||
|
||||
// 重置表单
|
||||
|
|
@ -343,7 +344,7 @@ export default {
|
|||
printable: 'passId',
|
||||
type: 'html',
|
||||
style: `
|
||||
@page { size: A5; margin: 0; }
|
||||
@page { size: A4; margin: 0; }
|
||||
body { margin: 0.5cm; font-family: SimSun; }
|
||||
#passId { font-size: 18px; padding: 0 20px; }
|
||||
`,
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@
|
|||
v-if="approveSignList.length > 0"
|
||||
>
|
||||
<div
|
||||
style="width: 80%; margin-left: 20px; height: 40px;transform: translateY(-30px)"
|
||||
style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)"
|
||||
v-for="(item, index) in approveSignList"
|
||||
:key="index"
|
||||
>
|
||||
|
|
@ -299,7 +299,7 @@
|
|||
<div class="item" style="width: 24%; display: flex; align-items: flex-start; flex-wrap: wrap">
|
||||
<div style="width: 30%">领料:</div>
|
||||
<div
|
||||
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap;transform: translateY(-30px)"
|
||||
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap; transform: translateY(-30px)"
|
||||
v-if="outSignList.length > 0"
|
||||
>
|
||||
<div
|
||||
|
|
@ -319,7 +319,7 @@
|
|||
<div class="item" style="width: 24%; display: flex; align-items: flex-start; flex-wrap: wrap">
|
||||
<div style="width: 30%">材料员:</div>
|
||||
<div
|
||||
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap;transform: translateY(-30px)"
|
||||
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap; transform: translateY(-30px)"
|
||||
v-if="confirmSign && confirmSign.confirmSignUrl"
|
||||
>
|
||||
<div style="width: 80%; margin-left: 25px">
|
||||
|
|
@ -334,7 +334,10 @@
|
|||
</div>
|
||||
<div class="item" style="width: 28%; display: flex; align-items: flex-start">
|
||||
<div style="width: 25%">库管:</div>
|
||||
<div style="width: 75%; display: flex; align-items: center; flex-wrap: wrap;transform: translateY(-30px)" v-if="kgSignList.length > 0">
|
||||
<div
|
||||
style="width: 75%; display: flex; align-items: center; flex-wrap: wrap; transform: translateY(-30px)"
|
||||
v-if="kgSignList.length > 0"
|
||||
>
|
||||
<div
|
||||
style="width: 80%; margin-left: 20px; height: 40px"
|
||||
v-for="(item, index) in kgSignList"
|
||||
|
|
@ -351,7 +354,10 @@
|
|||
</div>
|
||||
<div class="item" style="width: 25%; display: flex; align-items: flex-start">
|
||||
<div style="width: 25%">制单:</div>
|
||||
<div style="width: 75%;margin-left: 20px;transform: translateY(-30px)" v-if="leaseApplyData.leaseSignUrl">
|
||||
<div
|
||||
style="width: 75%; margin-left: 20px; transform: translateY(-30px)"
|
||||
v-if="leaseApplyData.leaseSignUrl"
|
||||
>
|
||||
<img
|
||||
:src="leaseApplyData.leaseSignUrl"
|
||||
style="width: 40px; height: 90px; max-width: 100%"
|
||||
|
|
@ -417,34 +423,37 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<vue-easy-print tableShow ref="remarksPrintRefPass" style="padding: 0 20px; font-size: 18px">
|
||||
<div id="passId" style="padding: 0 20px; font-size: 18px">
|
||||
<div style="text-align: center; font-weight: 600; font-size: 36px; margin-bottom: 40px">
|
||||
出 门 证
|
||||
</div>
|
||||
<div style="text-align: end">{{ passCode }}</div>
|
||||
<div style="line-height: 1.96">
|
||||
<div>门卫:</div>
|
||||
<div>
|
||||
<span style="margin-left: 25px">现有</span>
|
||||
<span style="min-width: 80px; border-bottom: 1px solid #000; padding: 0 5px">
|
||||
{{ passForm.carNumber }}
|
||||
</span>
|
||||
携带
|
||||
<span style="min-width: 80px; border-bottom: 1px solid #000; padding: 0 5px">{{ passContent }}</span>
|
||||
出门,请予放行。
|
||||
<vue-easy-print tableShow ref="remarksPrintRefPass">
|
||||
<div
|
||||
id="passId"
|
||||
style="margin: 20px; padding: 40px 60px; font-size: 18px; border: 2px solid #000; position: relative"
|
||||
>
|
||||
<div style="text-align: center; font-weight: 600; font-size: 36px; margin-bottom: 40px">
|
||||
出 门 证
|
||||
</div>
|
||||
<div style="text-align: end">{{ passCode }}</div>
|
||||
<div style="line-height: 1.96; margin-right: 65px">
|
||||
<div>门卫:</div>
|
||||
<div>
|
||||
<span style="margin-left: 25px">现有 </span>
|
||||
<span style="min-width: 80px; border-bottom: 1px solid #000; padding: 0 5px">
|
||||
{{ passForm.carNumber }}
|
||||
</span>
|
||||
,携带
|
||||
<span style="min-width: 80px; border-bottom: 1px solid #000; padding: 0 5px">{{ passContent }}</span>
|
||||
出门,请予放行。
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 40px 75px 15px; text-align: end">(公章)</div>
|
||||
<div style="text-align: end; margin-right: 50px">{{ passTime }}</div>
|
||||
<div>此证盖章有效</div>
|
||||
<div v-if="showPass" style="position: absolute; top: 126px; left: 460px">
|
||||
<canvas id="canvas" width="200" height="200"></canvas>
|
||||
</div>
|
||||
<!-- <div v-if="showImg" style="position: absolute; top: 126px; left: 490px">
|
||||
<img :src="canvasImgUrl" width="200" height="200" />
|
||||
</div> -->
|
||||
</div>
|
||||
<div style="margin: 60px 0 15px; text-align: end">(公章)</div>
|
||||
<div style="text-align: end">{{ passTime }}</div>
|
||||
<div>此证盖章有效</div>
|
||||
<div v-if="showPass" style="position: absolute; top: 120px; left: 590px">
|
||||
<canvas id="canvas" width="200" height="200"></canvas>
|
||||
</div>
|
||||
<div v-if="showImg" style="position: absolute; top: 110px; left: 590px">
|
||||
<img :src="canvasImgUrl" width="200" height="200" />
|
||||
</div>
|
||||
</div>
|
||||
</vue-easy-print>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
|
|
@ -728,20 +737,33 @@ export default {
|
|||
},
|
||||
printPass() {
|
||||
this.showImg = true
|
||||
const canvas = document.getElementById('canvas')
|
||||
this.canvasImgUrl = canvas.toDataURL('image/png') // base64 图像
|
||||
|
||||
// 确保canvas已完成渲染
|
||||
this.$nextTick(() => {
|
||||
this.$refs.remarksPrintRefPass.print()
|
||||
this.showImg = false
|
||||
const canvas = document.getElementById('canvas')
|
||||
if (canvas) {
|
||||
this.canvasImgUrl = canvas.toDataURL('image/png')
|
||||
|
||||
// 再次等待DOM更新
|
||||
this.$nextTick(() => {
|
||||
// 使用printJS作为备选方案
|
||||
printJS({
|
||||
printable: 'passId',
|
||||
type: 'html',
|
||||
style: `
|
||||
@page { size: A4; margin: 0; }
|
||||
body { margin: 0.5cm; font-family: SimSun; }
|
||||
#passId { font-size: 18px; padding: 0 20px; }
|
||||
`,
|
||||
scanStyles: false
|
||||
})
|
||||
|
||||
// 或者继续使用vue-easy-print
|
||||
// this.$refs.remarksPrintRefPass.print();
|
||||
this.showImg = false
|
||||
})
|
||||
}
|
||||
})
|
||||
// /passId
|
||||
// printJS({
|
||||
// printable: 'passId',
|
||||
// type: 'html',
|
||||
// targetStyles: ['*'],
|
||||
// scanStyles: true
|
||||
// })
|
||||
|
||||
},
|
||||
handleDialogClose() {
|
||||
this.showPass = false
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@
|
|||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 240px"
|
||||
>
|
||||
</el-date-picker>
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="keyWord">
|
||||
|
|
@ -26,33 +25,14 @@
|
|||
</el-form-item>
|
||||
|
||||
<el-form-item prop="taskStatus">
|
||||
<el-select
|
||||
v-model="queryParams.taskStatus"
|
||||
placeholder="请选择状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select v-model="queryParams.taskStatus" placeholder="请选择状态" clearable filterable style="width: 240px">
|
||||
<el-option v-for="item in statusList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</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>
|
||||
|
||||
|
|
@ -78,30 +58,32 @@
|
|||
</el-button>
|
||||
</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>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tableList" 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" :index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"/>
|
||||
<el-table-column label="申请人" align="center" prop="creator" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="申请时间" align="center" prop="createTime" width="110px" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="申请配件" align="center" prop="partName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="单号" align="center" prop="code" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="审核人" align="center" prop="auditor" width="110px" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="审核时间" align="center" prop="auditTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
width="60"
|
||||
align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
|
||||
/>
|
||||
<el-table-column label="申请人" align="center" prop="creator" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="申请时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
width="110px"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
<el-table-column label="申请配件" align="center" prop="partName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="单号" align="center" prop="code" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="审核人" align="center" prop="auditor" width="110px" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="审核时间" align="center" prop="auditTime" :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.repair_task_status":value="scope.row.taskStatus"/>
|
||||
|
|
@ -110,18 +92,21 @@
|
|||
<!-- <el-table-column label="备注" align="center" width="100" prop="remark" :show-overflow-tooltip="true"/> -->
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" style="margin-bottom: 10px" type="normal"
|
||||
@click="handleView(scope.row)"
|
||||
>查看
|
||||
<el-button size="mini" style="margin-bottom: 10px" type="normal" @click="handleView(scope.row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" style="margin-bottom: 10px" type="primary"
|
||||
<el-button
|
||||
size="mini"
|
||||
style="margin-bottom: 10px"
|
||||
type="primary"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.taskStatus == '0'"
|
||||
>审核
|
||||
>
|
||||
审核
|
||||
</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"
|
||||
v-if="scope.row.taskStatus == '1'" @click="handleLld(scope.row)"
|
||||
>领料单</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -135,34 +120,32 @@
|
|||
/>
|
||||
|
||||
<!-- 领料单弹窗 -->
|
||||
<el-dialog :visible.sync="open" width="800px" :title="title" append-to-body>
|
||||
<el-dialog :visible.sync="open" width="1000px" :title="title" append-to-body>
|
||||
<div style="height: 500px; overflow-y: scroll; padding: 0 20px">
|
||||
<!-- <vue-easy-print tableShow ref="remarksPrintRef" class="print"> -->
|
||||
<div id="checkId">
|
||||
<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: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||
<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: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
|
||||
<span>领料:</span>
|
||||
{{ leaseApplyData.deptName }}
|
||||
</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>
|
||||
{{ leaseApplyData.sendDeptName }}
|
||||
</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 v-if="leaseApplyData.createTime">{{ leaseApplyData.createTime.split(" ")[0] }}</span>
|
||||
<span v-if="leaseApplyData.createTime">{{ leaseApplyData.createTime.split(' ')[0] }}</span>
|
||||
</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>
|
||||
{{ leaseApplyData.code }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%;margin-top: 20px;">
|
||||
<el-table :data="leaseApplyDetails" class="table" border >
|
||||
<el-table-column label="序号" align="center" type="index" width="60px"/>
|
||||
<div style="width: 100%; margin-top: 20px">
|
||||
<!-- <el-table :data="leaseApplyDetails" class="table" border>
|
||||
<el-table-column label="序号" align="center" type="index" width="60px" />
|
||||
<el-table-column label="配件类型" align="center" prop="partType" />
|
||||
<el-table-column label="配件名称" align="center" prop="partName" />
|
||||
<el-table-column label="规格型号" align="center" prop="partModel" />
|
||||
|
|
@ -170,40 +153,120 @@
|
|||
<el-table-column label="审核状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status == '0'" style="color: #e6a23c">
|
||||
{{ "未审核" }}
|
||||
{{ '未审核' }}
|
||||
</div>
|
||||
<div v-if="scope.row.status == '1'" style="color: #67c23a">
|
||||
{{ "已审核" }}
|
||||
{{ '已审核' }}
|
||||
</div>
|
||||
<div v-if="scope.row.status == '2'" style="color: #f56c6c">
|
||||
{{ "驳回" }}
|
||||
{{ '驳回' }}
|
||||
</div>
|
||||
<!-- <div v-else style="color: red;"></div> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
</el-table>
|
||||
</el-table> -->
|
||||
<table border="1.5" class="table" style="border-collapse: collapse; width: 100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 60px; text-align: center">序号</th>
|
||||
<th style="text-align: center">配件类型</th>
|
||||
<th style="text-align: center">配件名称</th>
|
||||
<th style="text-align: center">规格型号</th>
|
||||
<th style="text-align: center">预领数量</th>
|
||||
<th style="text-align: center">审核状态</th>
|
||||
<th style="text-align: center">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(row, index) in leaseApplyDetails" :key="index">
|
||||
<td style="text-align: center">{{ index + 1 }}</td>
|
||||
<td style="text-align: center">{{ row.partType }}</td>
|
||||
<td style="text-align: center">{{ row.partName }}</td>
|
||||
<td style="text-align: center">{{ row.partModel }}</td>
|
||||
<td style="text-align: center">{{ row.preNum }}</td>
|
||||
<td style="text-align: center">
|
||||
<span v-if="row.status == '0'" style="color: #e6a23c">未审核</span>
|
||||
<span v-else-if="row.status == '1'" style="color: #67c23a">已审核</span>
|
||||
<span v-else-if="row.status == '2'" style="color: #f56c6c">驳回</span>
|
||||
</td>
|
||||
<td style="text-align: center">{{ row.remark }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<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;">
|
||||
<div style="width: 30%;">审核:</div>
|
||||
<div style="width: 70%;display: flex;align-items: center;flex-wrap: wrap;">
|
||||
<!-- <div style="width: 80%;margin-left: 20px;">
|
||||
<img :src="leaseApplyData.directAuditSignUrl" style="width: 40px;height: 100px;transform: rotate(-90deg);max-width: 100%;" alt="">
|
||||
</div> -->
|
||||
<div class="fillIn" style="margin-top: 50px; display: flex; justify-content: space-between">
|
||||
<div class="item" style="width: 23%; display: flex; align-items: flex-start; flex-wrap: wrap">
|
||||
<div style="width: 30%">审核:</div>
|
||||
<div
|
||||
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap"
|
||||
v-if="approveSignList.length > 0"
|
||||
>
|
||||
<div
|
||||
style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)"
|
||||
v-for="(item, index) in approveSignList"
|
||||
:key="index"
|
||||
>
|
||||
<img
|
||||
:src="item.outSignUrl"
|
||||
style="width: 40px; height: 90px; max-width: 100%"
|
||||
:style="{ transform: item.outSignType == 0 ? 'rotate(-90deg)' : '' }"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <img :src="leaseApplyData.directAuditSignUrl" style="width: 40px;height: 100px;transform: rotate(-90deg);max-width: 100%;" alt=""> -->
|
||||
</div>
|
||||
<div class="item" style="width: 24%;display: flex;align-items: center;flex-wrap: wrap;">
|
||||
<span>领料:</span>
|
||||
<div class="item" style="width: 24%; display: flex; align-items: flex-start; flex-wrap: wrap">
|
||||
<div style="width: 30%">领料:</div>
|
||||
<div
|
||||
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap; transform: translateY(-30px)"
|
||||
v-if="outSignList.length > 0"
|
||||
>
|
||||
<div
|
||||
style="width: 80%; margin-left: 20px; height: 40px"
|
||||
v-for="(item, index) in outSignList"
|
||||
:key="index"
|
||||
>
|
||||
<img
|
||||
:src="item.outSignUrl"
|
||||
style="width: 40px; height: 90px; max-width: 100%"
|
||||
:style="{ transform: item.outSignType == 0 ? 'rotate(-90deg)' : '' }"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" style="width: 24%;display: flex;align-items: center;flex-wrap: wrap;">
|
||||
<span>制单:</span>
|
||||
<div class="item" style="width: 28%; display: flex; align-items: flex-start">
|
||||
<div style="width: 25%">库管:</div>
|
||||
<div
|
||||
style="width: 75%; display: flex; align-items: center; flex-wrap: wrap; transform: translateY(-30px)"
|
||||
v-if="kgSignList.length > 0"
|
||||
>
|
||||
<div
|
||||
style="width: 80%; margin-left: 20px; height: 40px"
|
||||
v-for="(item, index) in kgSignList"
|
||||
:key="index"
|
||||
>
|
||||
<img
|
||||
:src="item.outSignUrl"
|
||||
style="width: 40px; height: 90px"
|
||||
:style="{ transform: item.outSignType == 0 ? 'rotate(-90deg)' : '' }"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</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=""> -->
|
||||
<div class="item" style="width: 25%; display: flex; align-items: flex-start">
|
||||
<div style="width: 25%">制单:</div>
|
||||
<div
|
||||
style="width: 75%; margin-left: 20px; transform: translateY(-30px)"
|
||||
v-if="leaseApplyData.leaseSignUrl"
|
||||
>
|
||||
<img
|
||||
:src="leaseApplyData.leaseSignUrl"
|
||||
style="width: 40px; height: 90px; max-width: 100%"
|
||||
:style="{ transform: leaseApplyData.leaseSignType == 0 ? 'rotate(-90deg)' : '' }"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -215,25 +278,16 @@
|
|||
<el-button @click="open = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getPartLeaseInfoListApi,getPartLeaseByTaskIdApi
|
||||
} from "@/api/part/partLease";
|
||||
import router from "@/router";
|
||||
import vueEasyPrint from "vue-easy-print";
|
||||
import printJS from 'print-js';
|
||||
import { getPartLeaseInfoListApi, getPartLeaseByTaskIdApi } from '@/api/part/partLease'
|
||||
import router from '@/router'
|
||||
import vueEasyPrint from 'vue-easy-print'
|
||||
import printJS from 'print-js'
|
||||
export default {
|
||||
name: "Home",
|
||||
name: 'Home',
|
||||
dicts: [],
|
||||
components: { vueEasyPrint },
|
||||
data() {
|
||||
|
|
@ -251,7 +305,11 @@ export default {
|
|||
// 总条数
|
||||
total: 0,
|
||||
//搜索下拉数据
|
||||
statusList: [{id:"0",name:"待审核"},{id:"1",name:"已审核"},{id:"2",name:"已驳回"}],
|
||||
statusList: [
|
||||
{ id: '0', name: '待审核' },
|
||||
{ id: '1', name: '已审核' },
|
||||
{ id: '2', name: '已驳回' }
|
||||
],
|
||||
// 字典表格数据
|
||||
tableList: [],
|
||||
// 日期范围
|
||||
|
|
@ -262,102 +320,106 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
time: null, //申请时间
|
||||
taskStatus: "",
|
||||
keyWord: "",
|
||||
taskStatus: '',
|
||||
keyWord: ''
|
||||
},
|
||||
form: {},
|
||||
passTemp: [],
|
||||
failTemp: [],
|
||||
//领料单
|
||||
open:false,
|
||||
title:"",
|
||||
open: false,
|
||||
title: '',
|
||||
leaseApplyDetails: [],
|
||||
leaseApplyData: {},
|
||||
};
|
||||
leaseApplyData: {}, // 领料单信息
|
||||
approveSignList: [], // 审批签字列表
|
||||
outSignList: [], // 领料签字列表
|
||||
kgSignList: [] // 库管签字列表
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
//打开领料单
|
||||
async handleLld(row) {
|
||||
this.title = "领料单";
|
||||
this.open = true;
|
||||
const res = await getPartLeaseByTaskIdApi({ taskId: row.taskId });
|
||||
this.leaseApplyDetails = res.data.detailsList;
|
||||
this.leaseApplyData = res.data.details;
|
||||
this.leaseApplyData.createTime=row.createTime
|
||||
this.leaseApplyData.code=row.code
|
||||
this.title = '领料单'
|
||||
this.open = true
|
||||
const res = await getPartLeaseByTaskIdApi({ taskId: row.taskId })
|
||||
console.log('🚀 ~ handleLld ~ res:', res)
|
||||
this.leaseApplyDetails = res.data.detailsList
|
||||
this.leaseApplyData = res.data.details
|
||||
this.leaseApplyData.createTime = row.createTime
|
||||
this.leaseApplyData.code = row.code
|
||||
},
|
||||
//打印
|
||||
print() {
|
||||
// this.$refs.remarksPrintRef.print();
|
||||
printJS({
|
||||
printable: 'checkId',
|
||||
type: 'html',
|
||||
targetStyles: ['*'],
|
||||
maxWidth:'1400'
|
||||
// 其他配置选项
|
||||
});
|
||||
//打印
|
||||
print() {
|
||||
// this.$refs.remarksPrintRef.print();
|
||||
printJS({
|
||||
printable: 'checkId',
|
||||
type: 'html',
|
||||
targetStyles: ['*'],
|
||||
maxWidth: '1400'
|
||||
// 其他配置选项
|
||||
})
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.passTemp = [];
|
||||
this.failTemp = [];
|
||||
this.ids = selection.map((item) => item.taskId);
|
||||
selection.forEach((item) => {
|
||||
this.passTemp.push({ status: "1",taskId:item.taskId, });
|
||||
});
|
||||
selection.forEach((item) => {
|
||||
this.failTemp.push({ status: "2",taskId:item.taskId, });
|
||||
});
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
this.passTemp = []
|
||||
this.failTemp = []
|
||||
this.ids = selection.map(item => item.taskId)
|
||||
selection.forEach(item => {
|
||||
this.passTemp.push({ status: '1', taskId: item.taskId })
|
||||
})
|
||||
selection.forEach(item => {
|
||||
this.failTemp.push({ status: '2', taskId: item.taskId })
|
||||
})
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
//是否可用勾选框
|
||||
selectable(row) {
|
||||
if (row.taskStatus == "10" || row.taskStatus == "6") {
|
||||
return true;
|
||||
if (row.taskStatus == '10' || row.taskStatus == '6') {
|
||||
return true
|
||||
} else {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
const params = {
|
||||
keyWord: this.queryParams.keyWord,
|
||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum,
|
||||
taskStatus: this.queryParams.taskStatus,
|
||||
};
|
||||
getPartLeaseInfoListApi(params).then((response) => {
|
||||
this.tableList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
taskStatus: this.queryParams.taskStatus
|
||||
}
|
||||
getPartLeaseInfoListApi(params).then(response => {
|
||||
this.tableList = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time = [];
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.keyWord = "";
|
||||
this.handleQuery();
|
||||
this.queryParams.time = []
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.keyWord = ''
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 通过按钮操作 */
|
||||
handlePassAll() {
|
||||
if (this.ids.length == 0) {
|
||||
this.$alert("请至少勾选一条审核数据", "提示", {
|
||||
type: "warning",
|
||||
confirmButtonText: "确定",
|
||||
});
|
||||
this.$alert('请至少勾选一条审核数据', '提示', {
|
||||
type: 'warning',
|
||||
confirmButtonText: '确定'
|
||||
})
|
||||
} else {
|
||||
// outerAudit(this.passTemp).then((response) => {
|
||||
// if (response.code == 200) {
|
||||
|
|
@ -371,10 +433,10 @@ export default {
|
|||
/** 驳回按钮操作 */
|
||||
handleFailAll() {
|
||||
if (this.ids.length == 0) {
|
||||
this.$alert("请至少勾选一条审核数据", "提示", {
|
||||
type: "warning",
|
||||
confirmButtonText: "确定",
|
||||
});
|
||||
this.$alert('请至少勾选一条审核数据', '提示', {
|
||||
type: 'warning',
|
||||
confirmButtonText: '确定'
|
||||
})
|
||||
} else {
|
||||
// outerAudit(this.failTemp).then((response) => {
|
||||
// if (response.code == 200) {
|
||||
|
|
@ -388,49 +450,49 @@ export default {
|
|||
|
||||
/** 查看按钮操作 */
|
||||
handleView(row) {
|
||||
this.$emit("queryTools", row.taskId, row.id, row);
|
||||
this.$emit('queryTools', row.taskId, row.id, row)
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.$emit("addTools", row.taskId, row.id,row);
|
||||
this.$emit('addTools', row.taskId, row.id, row)
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const formatTime = (date) => {
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
return `${year}${month}${day}_${hours}${minutes}${seconds}`;
|
||||
};
|
||||
const formatTime = date => {
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
const hours = String(date.getHours()).padStart(2, '0')
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0')
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0')
|
||||
return `${year}${month}${day}_${hours}${minutes}${seconds}`
|
||||
}
|
||||
|
||||
const currentTime = formatTime(new Date());
|
||||
const currentTime = formatTime(new Date())
|
||||
this.download(
|
||||
"/material/part_lease/export",
|
||||
'/material/part_lease/export',
|
||||
{
|
||||
...this.queryParams,
|
||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1]
|
||||
},
|
||||
`配件领用_${currentTime}.xlsx`
|
||||
);
|
||||
},
|
||||
)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler(to) {
|
||||
if (to.query.keyWord) {
|
||||
this.queryParams.keyWord = to.query.keyWord;
|
||||
this.queryParams.keyWord = to.query.keyWord
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
|
|
|
|||
Loading…
Reference in New Issue