Merge remote-tracking branch 'origin/material-ui' into material-ui
This commit is contained in:
commit
dd78391934
|
|
@ -407,7 +407,7 @@ export default {
|
|||
},
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "联系电话不能为空", trigger: "blur" },
|
||||
{ required: false, message: "联系电话不能为空", trigger: "blur" },
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: "请输入正确的手机号码",
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@
|
|||
</div>
|
||||
<div class="item" style="width: 40%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||
<span>发料单位:</span>
|
||||
{{ leaseApplyData.sendUnit }}
|
||||
{{ "机具物流分公司" }}
|
||||
</div>
|
||||
<div class="item" style="width: 30%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||
<span>时间:</span>
|
||||
|
|
@ -237,10 +237,10 @@
|
|||
|
||||
<el-table :data="leaseApplyDetails" class="table" border style="width: 100%;">
|
||||
<el-table-column label="序号" align="center" type="index" width="60px"/>
|
||||
<el-table-column label="类型名称" align="center" prop="typeName" />
|
||||
<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="preNum" />
|
||||
<el-table-column label="领用数量" align="center" prop="preNum" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="出库方式" align="center" prop="manageType">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -263,9 +263,6 @@
|
|||
<div class="item" style="width: 24%;display: flex;align-items: center;flex-wrap: wrap;">
|
||||
<span>领料:</span>
|
||||
</div>
|
||||
<div class="item" style="width: 24%;display: flex;align-items: center;flex-wrap: wrap;">
|
||||
<span>制单:</span>
|
||||
</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;">
|
||||
|
|
@ -275,6 +272,9 @@
|
|||
<img src="../../../../../assets/signTemp.png" style="width: 45%;height: 30px;" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" style="width: 24%;display: flex;align-items: center;flex-wrap: wrap;">
|
||||
<span>制单:</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </vue-easy-print> -->
|
||||
|
|
|
|||
|
|
@ -891,7 +891,7 @@ export default {
|
|||
|
||||
this.printTableData = res.data.leaseOutVoList
|
||||
setTimeout(() => {
|
||||
this.chapter('机具检验专用章', '安徽送边电工程有限公司机具(物流)分公司')
|
||||
this.chapter('机具检验章', '安徽送变电工程有限公司机具(物流)分公司')
|
||||
}, 200)
|
||||
this.openPrint = true
|
||||
this.title = '出库检验单'
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
class="title"
|
||||
style="text-align: center; font-weight: 600; font-size: 16px"
|
||||
>
|
||||
机具配件到货入库单
|
||||
新购入库单
|
||||
</div>
|
||||
<div
|
||||
class="info"
|
||||
|
|
@ -132,18 +132,7 @@
|
|||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>单据编号:{{printData.code}}</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
width: 40%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
|
|
@ -155,7 +144,7 @@
|
|||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
width: 30%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
|
|
@ -163,6 +152,17 @@
|
|||
>
|
||||
<span>到货日期:{{printData.arrivalTime}}</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 30%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>单据编号:{{printData.code}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="printTableData"
|
||||
|
|
@ -208,33 +208,22 @@
|
|||
class="fillIn"
|
||||
style="
|
||||
margin-top: 20px;
|
||||
margin-left: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>供应科:</span>
|
||||
<span>审核:</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>生产技术科:</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>生产技术科:</span>
|
||||
<!-- <el-select v-model="printData.productionTechDept" placeholder="请选择生产技术科">
|
||||
<el-option v-for="item in productionTechDeptOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>库管班:</span>
|
||||
<span>库管员:</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -402,7 +391,7 @@ import { getToken } from '@/utils/auth'
|
|||
handlePrint(row) {
|
||||
// this.query.taskId = row.taskId
|
||||
this.openPrint = true;
|
||||
this.title = "机具配件到货入库单";
|
||||
this.title = "新购入库单";
|
||||
let params = {
|
||||
id: row.id,
|
||||
taskId: row.taskId,
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
class="title"
|
||||
style="text-align: center; font-weight: 600; font-size: 16px"
|
||||
>
|
||||
机具配件到货验收单
|
||||
到货验收单
|
||||
</div>
|
||||
<div
|
||||
class="info"
|
||||
|
|
@ -131,18 +131,7 @@
|
|||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>单据编号:{{printData.code}}</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
width: 40%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
|
|
@ -154,7 +143,7 @@
|
|||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
width: 30%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
|
|
@ -162,6 +151,17 @@
|
|||
>
|
||||
<span>到货日期:{{printData.arrivalTime}}</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 30%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>单据编号:{{printData.code}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="printTableData"
|
||||
|
|
@ -397,7 +397,7 @@ import { getToken } from '@/utils/auth'
|
|||
handlePrint(row) {
|
||||
// this.query.taskId = row.taskId
|
||||
this.openPrint = true;
|
||||
this.title = "机具配件到货验收单";
|
||||
this.title = "到货验收单";
|
||||
let params = {
|
||||
id: row.id,
|
||||
taskId: row.taskId,
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@
|
|||
class="title"
|
||||
style="text-align: center; font-weight: 600; font-size: 16px"
|
||||
>
|
||||
机具配件到货验收单
|
||||
到货验收单
|
||||
</div>
|
||||
<div
|
||||
class="info"
|
||||
|
|
@ -250,18 +250,7 @@
|
|||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>单据编号:{{printData.code}}</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
width: 40%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
|
|
@ -273,7 +262,7 @@
|
|||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
width: 30%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
|
|
@ -281,6 +270,17 @@
|
|||
>
|
||||
<span>到货日期:{{printData.arrivalTime}}</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 30%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>单据编号:{{printData.code}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="printTableData"
|
||||
|
|
@ -616,7 +616,7 @@ export default {
|
|||
handlePrint(row) {
|
||||
// this.query.taskId = row.taskId
|
||||
this.openPrint = true;
|
||||
this.title = "机具配件到货验收单";
|
||||
this.title = "到货验收单";
|
||||
let params = {
|
||||
id: row.id,
|
||||
taskId: row.taskId,
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@
|
|||
</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>
|
||||
<span>领料:</span>
|
||||
{{ leaseApplyData.deptName }}
|
||||
</div>
|
||||
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||
|
|
|
|||
|
|
@ -133,22 +133,22 @@
|
|||
<vue-easy-print tableShow ref="remarksPrintRef" class="print" style="padding: 0 5px;">
|
||||
<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: 100%;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;">
|
||||
style="width: 40%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||
<span>生产厂家(供应商):{{printData.supplier}}</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||
style="width: 30%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||
<span>到货日期:{{printData.arrivalDate}}</span>
|
||||
</div>
|
||||
<div class="item" style="width: 30%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||
<span>单据编号:{{printData.code}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="printTableData" class="table" style="margin-top: 20px;width: 1000px;padding-bottom: 1px;" border>
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
|
|
@ -160,7 +160,7 @@
|
|||
<el-table-column label="采购数量" align="center" prop="purchaseNum"/>
|
||||
<el-table-column label="验收结论" align="center" prop="checkResult"/>
|
||||
<el-table-column label="质保质量" align="center">
|
||||
<el-table-column label="实收份数" align="center" prop="checkNum"/>
|
||||
<el-table-column label="实收份数" align="center" prop="fileReceiveNum"/>
|
||||
<el-table-column label="符合要求" align="center"/>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
|
@ -344,7 +344,7 @@
|
|||
// this.query.taskId = row.taskId
|
||||
this.getPrintTable(row.taskId)
|
||||
this.openPrint = true
|
||||
this.title = '新购工机具验收单'
|
||||
this.title = '到货验收单'
|
||||
},
|
||||
//获取验收单数据
|
||||
getPrintTable(taskId) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出厂日期" prop="productionTime">
|
||||
<!-- <el-form-item label="出厂日期" prop="productionTime">
|
||||
<el-date-picker
|
||||
v-model="maForm.productionTime"
|
||||
style="width: 240px"
|
||||
|
|
@ -45,6 +45,37 @@
|
|||
@change="productionTimeChange"
|
||||
:picker-options="pickerOptionsForProduction"
|
||||
></el-date-picker>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="出厂日期" prop="productionTime">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<el-radio-group v-model="dateType" @change="handleDateTypeChange">
|
||||
<el-radio-button label="day">选择某天</el-radio-button>
|
||||
<el-radio-button label="month">选择月份</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div style="height: 40px; flex: 1;">
|
||||
<el-date-picker
|
||||
v-if="dateType === 'day'"
|
||||
v-model="maForm.productionTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="请选择出厂日期"
|
||||
@change="productionTimeChange"
|
||||
:picker-options="pickerOptionsForProduction"
|
||||
></el-date-picker>
|
||||
|
||||
<el-date-picker
|
||||
v-if="dateType === 'month'"
|
||||
v-model="maForm.productionTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM"
|
||||
type="month"
|
||||
placeholder="请选择出厂月份"
|
||||
@change="productionMonthChange"
|
||||
:picker-options="pickerOptionsForProductionMonth"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="税率" prop="taxRate">
|
||||
<el-input
|
||||
|
|
@ -73,7 +104,7 @@
|
|||
collapse-tags
|
||||
:filter-method="handleSearchImpl"
|
||||
:popper-class="'type-select-dropdown'"
|
||||
:popper-append-to-body="false"
|
||||
:popper-append-to-body="true"
|
||||
@visible-change="handleVisibleChange"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -253,9 +284,10 @@
|
|||
<el-date-picker
|
||||
v-model="scope.row.productionTime"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date" :disabled="scope.row.status!=1&&scope.row.status!=12"
|
||||
placeholder="出厂日期"
|
||||
:value-format="dateType === 'day' ? 'yyyy-MM-dd' : 'yyyy-MM'"
|
||||
:type="dateType === 'day' ? 'date' : 'month'"
|
||||
:disabled="scope.row.status !== 1 && scope.row.status !== 12"
|
||||
:placeholder="dateType === 'day' ? '请选择出厂日期' : '请选择出厂月份'"
|
||||
clearable
|
||||
></el-date-picker>
|
||||
</template>
|
||||
|
|
@ -270,14 +302,14 @@
|
|||
<div
|
||||
style="color: #02a7f0; cursor: pointer"
|
||||
@click="openFileDialog(scope.row)"
|
||||
v-if="scope.row.isExitFile == 0"
|
||||
v-if="scope.row.isExitFile == 1"
|
||||
>
|
||||
报告管理
|
||||
</div>
|
||||
<div
|
||||
style="color: red; cursor: pointer"
|
||||
@click="openFileDialog(scope.row)"
|
||||
v-if="scope.row.isExitFile == 1"
|
||||
v-if="scope.row.isExitFile == 0"
|
||||
>
|
||||
报告管理
|
||||
</div>
|
||||
|
|
@ -317,7 +349,6 @@
|
|||
<el-table :data="fileDataList" width="100%" height="350px">
|
||||
<el-table-column label="序号" type="index" width="55" align="center"/>
|
||||
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="类型名称" align="center" :show-overflow-tooltip="true">
|
||||
<template>
|
||||
<div>{{this.rowData.maTypeName}}</div>
|
||||
|
|
@ -332,23 +363,18 @@
|
|||
<el-table-column label="截止有效期" align="center" prop="orgName" :show-overflow-tooltip="true"/> -->
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||
<el-upload ref="upload" :limit="3" :headers="upload.headers"
|
||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||
<el-upload ref="upload" :headers="upload.headers"
|
||||
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||
:on-success="handleFileSuccess" :auto-upload="true"
|
||||
:on-success="(response, file, fileList) => handleFileSuccess(scope.row, response, file, fileList)" :auto-upload="true"
|
||||
:before-upload="(file) => beforeUpload(scope.row, file)"
|
||||
>
|
||||
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="picturePreview(scope.row)"
|
||||
v-if="scope.row.url"
|
||||
style="margin-left: 20px"
|
||||
>
|
||||
<el-button size="mini" type="text" @click="picturePreviewFile(scope.row)" v-if="scope.row.fileListTemp!=0" style="margin-left: 20px;">
|
||||
查看
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -360,9 +386,27 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 图片查看弹窗 -->
|
||||
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px" >
|
||||
<el-dialog :visible.sync="dialogVisible" width="800px" >
|
||||
<img width="100%" height="500px" :src="dialogImageUrl" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 文件查看列表 -->
|
||||
<el-dialog title="文件列表" :visible.sync="dialogVisibleFile" width="500px" height="500px" >
|
||||
<el-table :data="fileListInfo" width="100%" height="350px">
|
||||
<el-table-column label="序号" type="index" width="55" align="center"/>
|
||||
<el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url" >
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" @click="pictureDelete(scope.row,scope.$index)" v-if="scope.row.url" style="color:red">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -436,15 +480,17 @@ export default {
|
|||
open: false,
|
||||
rowData:{},
|
||||
fileDataList: [
|
||||
{ dictLabel: '合格证', fileType: '0', name: '', url: '' },
|
||||
{ dictLabel: '型式试验报告', fileType: '1', name: '', url: '' },
|
||||
{ dictLabel: '出厂检测报告', fileType: '2', name: '', url: '' },
|
||||
{ dictLabel: '第三方监测报告', fileType: '3', name: '', url: '' },
|
||||
{ dictLabel: '其他', fileType: '4', name: '', url: '' }
|
||||
{dictLabel:"合格证",fileType:"0",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"型式试验报告",fileType:"1",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"第三方监测报告",fileType:"3",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"其他",fileType:"4",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
],
|
||||
fileListInfo: [],
|
||||
//图片查看弹窗
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
dialogVisibleFile: false,
|
||||
//上传
|
||||
upload: {
|
||||
// 设置上传的请求头部
|
||||
|
|
@ -457,12 +503,14 @@ export default {
|
|||
equipmentId: undefined,
|
||||
productionTime: ''
|
||||
},
|
||||
dateType: 'day', // 默认选择天
|
||||
maForm: {
|
||||
taxRate:13,
|
||||
arrivalTime: '',
|
||||
purchaser: '',
|
||||
remark: '',
|
||||
purchaseNumber: ''
|
||||
purchaseNumber: '',
|
||||
productionTime: '',
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -533,15 +581,32 @@ export default {
|
|||
//限制出厂日期不能大于到货日期
|
||||
pickerOptionsForProduction() {
|
||||
return {
|
||||
disabledDate: (time) => {
|
||||
if (this.maForm.arrivalTime) {
|
||||
const standardFormat = this.maForm.arrivalTime.replace(/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/, '$1-$2-$3T$4:$5:$6')
|
||||
const arrivalDate = new Date(standardFormat)
|
||||
arrivalDate.setHours(23, 59, 59, 999)
|
||||
return time.getTime() >= arrivalDate.getTime()
|
||||
}
|
||||
return false
|
||||
disabledDate: (time) => {
|
||||
if (this.maForm.arrivalTime) {
|
||||
const standardFormat = this.maForm.arrivalTime.replace(/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/, '$1-$2-$3T$4:$5:$6')
|
||||
const arrivalDate = new Date(standardFormat)
|
||||
arrivalDate.setHours(23, 59, 59, 999)
|
||||
return time.getTime() >= arrivalDate.getTime()
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
pickerOptionsForProductionMonth() {
|
||||
return {
|
||||
disabledDate: (time) => {
|
||||
if (this.maForm.arrivalTime) {
|
||||
const standardFormat = this.maForm.arrivalTime.replace(/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/, '$1-$2-$3T$4:$5:$6')
|
||||
const arrivalDate = new Date(standardFormat)
|
||||
arrivalDate.setHours(23, 59, 59, 999)
|
||||
// 禁用整月,如果该月的任何一天大于到货日期
|
||||
const monthStart = new Date(time.getFullYear(), time.getMonth(), 1)
|
||||
const monthEnd = new Date(time.getFullYear(), time.getMonth() + 1, 0)
|
||||
return monthStart.getTime() >= arrivalDate.getTime()
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -559,6 +624,28 @@ export default {
|
|||
this.equipmentType()
|
||||
},
|
||||
methods: {
|
||||
handleDateTypeChange(val) {
|
||||
console.log("xxxxx",val)
|
||||
if (val === 'day') {
|
||||
// 切换到选择某天时,清空月份选择
|
||||
this.maForm.productionTime = '';
|
||||
// 将表格中的月份数据转换为该月第一天
|
||||
this.equipmentList.forEach(item => {
|
||||
if (item.status === 1 || item.status === 12 && item.productionTime) {
|
||||
item.productionTime = `${item.productionTime}-01`;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 切换到选择月份时,清空日期选择
|
||||
this.maForm.productionTime = '';
|
||||
// 将表格中的日期数据转换为月份
|
||||
this.equipmentList.forEach(item => {
|
||||
if (item.status === 1 || item.status === 12 && item.productionTime) {
|
||||
item.productionTime = item.productionTime.slice(0, 7);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 格式化日期的函数
|
||||
formatDate(date) {
|
||||
const year = date.getFullYear();
|
||||
|
|
@ -715,7 +802,7 @@ export default {
|
|||
purchaseNum : 1,
|
||||
fixCode: '0',
|
||||
status:1,
|
||||
isExitFile:'0',
|
||||
isExitFile:'1',
|
||||
bmFileInfos:[]
|
||||
|
||||
})
|
||||
|
|
@ -820,13 +907,22 @@ export default {
|
|||
});
|
||||
},
|
||||
//选择出厂日期
|
||||
productionTimeChange(val){
|
||||
this.equipmentList.forEach(item=>{
|
||||
if(item.status==1||item.status==12){
|
||||
item.productionTime=val
|
||||
}
|
||||
productionTimeChange(val) {
|
||||
this.equipmentList.forEach(item => {
|
||||
if(item.status == 1 || item.status == 12) {
|
||||
item.productionTime = val
|
||||
}
|
||||
})
|
||||
},
|
||||
//选择出厂日期
|
||||
productionMonthChange(val) {
|
||||
console.log("yyyyyyy",val)
|
||||
this.equipmentList.forEach(item => {
|
||||
if (item.status === 1 || item.status === 12) {
|
||||
item.productionTime = val;
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取任务详情--- 编辑回显数据
|
||||
async getTaskInfo() {
|
||||
// this.loading = true;
|
||||
|
|
@ -839,9 +935,21 @@ export default {
|
|||
this.maForm.supplierId = response.data.purchaseCheckInfo.supplierId
|
||||
this.maForm.remark = response.data.purchaseCheckInfo.remark
|
||||
this.maForm.taxRate = response.data.purchaseCheckInfo.taxRate
|
||||
// this.maForm.purchaseNumber = response.data.purchaseNumber
|
||||
// this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList
|
||||
// 判断 productionTime 格式
|
||||
const productionTime = response.data.purchaseCheckInfo.productionTime;
|
||||
if (productionTime && productionTime.length === 10) { // 假设 10 位长度为 yyyy-MM-dd
|
||||
this.dateType = 'day';
|
||||
this.maForm.productionTime = productionTime;
|
||||
|
||||
} else if (productionTime && productionTime.length === 7) { // 假设 7 位长度为 yyyy-MM
|
||||
this.dateType = 'month';
|
||||
this.maForm.productionTime = productionTime;
|
||||
} else {
|
||||
// 默认选择某天
|
||||
this.dateType = 'day';
|
||||
this.maForm.productionTime = '';
|
||||
}
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList
|
||||
this.equipmentList.forEach(item=>{
|
||||
item.rentPriceDisabled=true
|
||||
})
|
||||
|
|
@ -913,16 +1021,15 @@ export default {
|
|||
}
|
||||
},
|
||||
//文件管理
|
||||
openFileDialog(row){
|
||||
this.rowData = row
|
||||
this.fileDataList = [
|
||||
{ dictLabel: '合格证', fileType: '0', name: '', url: '' },
|
||||
{ dictLabel: '型式试验报告', fileType: '1', name: '', url: '' },
|
||||
{ dictLabel: '出厂检测报告', fileType: '2', name: '', url: '' },
|
||||
{ dictLabel: '第三方监测报告', fileType: '3', name: '', url: '' },
|
||||
{ dictLabel: '其他', fileType: '4', name: '', url: '' }
|
||||
]
|
||||
if (this.taskId == '') {
|
||||
async openFileDialog(row) {
|
||||
console.log('1111111',row)
|
||||
this.rowData = row;
|
||||
if (this.taskId == "") {
|
||||
this.fileDataList = [{dictLabel:"合格证",fileType:"0",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"型式试验报告",fileType:"1",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"第三方监测报告",fileType:"3",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"其他",fileType:"4",name:"",url:"",fileList:[],fileListTemp:[]}]
|
||||
// console.log(this.rowData)
|
||||
// console.log(this.rowData.bmFileInfos)
|
||||
if(this.rowData.bmFileInfos.length>0){
|
||||
|
|
@ -930,26 +1037,93 @@ export default {
|
|||
let index = this.fileDataList.findIndex(v=>v.fileType==item.fileType)
|
||||
this.fileDataList[index].name = item.name
|
||||
this.fileDataList[index].url = item.url
|
||||
this.fileDataList[index].fileList.push({
|
||||
"name": item.name,
|
||||
"url": item.url,
|
||||
})
|
||||
this.fileDataList[index].fileListTemp.push({
|
||||
"name": item.name,
|
||||
"url": item.url,
|
||||
})
|
||||
})
|
||||
}
|
||||
}else{
|
||||
this.getFileData()
|
||||
} else {
|
||||
this.fileDataList = [{dictLabel:"合格证",fileType:"0",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"型式试验报告",fileType:"1",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"第三方监测报告",fileType:"3",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"其他",fileType:"4",name:"",url:"",fileList:[],fileListTemp:[]}]
|
||||
if (this.rowData.bmFileInfos == null) {
|
||||
|
||||
await this.getFileData()
|
||||
|
||||
if (this.rowData.bmFileInfos.length > 0) {
|
||||
this.rowData.bmFileInfos.forEach(item=>{
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==item.fileType)
|
||||
this.fileDataList[index].name = item.name
|
||||
this.fileDataList[index].url = item.url
|
||||
this.fileDataList[index].fileList.push({
|
||||
"name": item.name,
|
||||
"url": item.url,
|
||||
})
|
||||
this.fileDataList[index].fileListTemp.push({
|
||||
"name": item.name,
|
||||
"url": item.url,
|
||||
})
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if(this.rowData.bmFileInfos.length>0){
|
||||
this.rowData.bmFileInfos.forEach(item=>{
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==item.fileType)
|
||||
this.fileDataList[index].name = item.name
|
||||
this.fileDataList[index].url = item.url
|
||||
this.fileDataList[index].fileList.push({
|
||||
"name": item.name,
|
||||
"url": item.url,
|
||||
})
|
||||
this.fileDataList[index].fileListTemp.push({
|
||||
"name": item.name,
|
||||
"url": item.url,
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
this.open=true
|
||||
},
|
||||
getFileData(){
|
||||
async getFileData(){
|
||||
let param = {
|
||||
modelId:this.rowData.typeId,
|
||||
taskType:0,
|
||||
taskId:this.rowData.taskId
|
||||
}
|
||||
getPurchaseFileList(param)
|
||||
this.rowData.bmFileInfos = []
|
||||
await getPurchaseFileList(param)
|
||||
.then(response => {
|
||||
if(response.rows.length>0){
|
||||
response.rows.forEach(item=>{
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==item.fileType)
|
||||
this.fileDataList[index].name = item.name
|
||||
this.fileDataList[index].url = item.url
|
||||
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
|
||||
item.fileDetailList.forEach(item2=>{
|
||||
// this.fileDataList[index].fileList.push({
|
||||
// name:item2.name,
|
||||
// url:item2.url
|
||||
// })
|
||||
// this.fileDataList[index].fileListTemp.push({
|
||||
// name:item2.name,
|
||||
// url:item2.url
|
||||
// })
|
||||
const obj = {
|
||||
"taskId": this.taskId,
|
||||
"taskType": "0",
|
||||
"name": item2.name,
|
||||
"url": item2.url,
|
||||
"modelId": this.rowData.partId,
|
||||
"fileType": item2.fileType,
|
||||
}
|
||||
this.rowData.bmFileInfos.push(obj)
|
||||
console.log('77777777',this.rowData)
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
@ -958,22 +1132,37 @@ export default {
|
|||
beforeFileUpload(row){
|
||||
this.rowData.fileType = row.fileType
|
||||
},
|
||||
|
||||
beforeUpload(row, file) {
|
||||
row.fileList.push(file);
|
||||
console.log('6666666',row.fileList)
|
||||
if (row.fileList.length > 3) {
|
||||
this.$message.warning('最多只能上传三张图片');
|
||||
// 删除最后一个文件
|
||||
row.fileList.pop();
|
||||
return false; // 阻止上传
|
||||
}
|
||||
return true; // 允许上传
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if(response.code==200){
|
||||
if (this.taskId == '') {
|
||||
//新增逻辑
|
||||
handleFileSuccess(row,response, file, fileList) {
|
||||
if (response.code == 200) {
|
||||
if (this.taskId == "") {//新增逻辑
|
||||
row.fileListTemp.push({
|
||||
"name": response.data.name,
|
||||
"url": response.data.url,
|
||||
})
|
||||
// console.log(response)
|
||||
// console.log(this.rowData)
|
||||
// console.log(this.rowData.bmFileInfos)
|
||||
let obj = {
|
||||
taskId: this.taskId,
|
||||
taskType: '0',
|
||||
name: response.data.name,
|
||||
url: response.data.url,
|
||||
modelId: this.rowData.typeId,
|
||||
fileType: this.rowData.fileType
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
"taskId": this.taskId,
|
||||
"taskType": "0",
|
||||
"name": response.data.name,
|
||||
"url": response.data.url,
|
||||
"modelId": this.rowData.partId,
|
||||
"fileType": this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
}
|
||||
//根据文件上传返回更新文件管理弹窗内容
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==this.rowData.fileType)
|
||||
|
|
@ -990,27 +1179,61 @@ export default {
|
|||
}else{
|
||||
this.rowData.bmFileInfos.push(obj)
|
||||
}
|
||||
} else {
|
||||
//编辑逻辑
|
||||
let param = {
|
||||
taskId: this.taskId,
|
||||
taskType: '0',
|
||||
name: response.data.name,
|
||||
url: response.data.url,
|
||||
modelId: this.rowData.typeId,
|
||||
fileType: this.rowData.fileType
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
|
||||
} else {//编辑逻辑
|
||||
row.fileListTemp.push({
|
||||
"name": response.data.name,
|
||||
"url": response.data.url,
|
||||
})
|
||||
let obj = {
|
||||
"taskId": this.taskId,
|
||||
"taskType": "0",
|
||||
"name": response.data.name,
|
||||
"url": response.data.url,
|
||||
"modelId": this.rowData.partId,
|
||||
"fileType": this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
}
|
||||
//根据文件上传返回更新文件管理弹窗内容
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==this.rowData.fileType)
|
||||
this.fileDataList[index].name = response.data.name
|
||||
this.fileDataList[index].url = response.data.url
|
||||
//判断当前上传的文件是否已上传过-再往机具类型数据中插入
|
||||
if(this.rowData.bmFileInfos.length>0){
|
||||
let index2 = this.rowData.bmFileInfos.findIndex(v=>v.fileType==this.rowData.fileType)
|
||||
if(index2>-1){//相同类型文件重复上传-替换
|
||||
this.rowData.bmFileInfos.splice(index2,0,obj)
|
||||
}else{//不存在相同类型文件-添加
|
||||
this.rowData.bmFileInfos.push(obj)
|
||||
}
|
||||
}else{
|
||||
this.rowData.bmFileInfos.push(obj)
|
||||
}
|
||||
uploadPurchaseFile(param)
|
||||
.then(response => {
|
||||
uploadPurchaseFile(param).then((response) => {
|
||||
this.$modal.msgSuccess('上传成功')
|
||||
this.getFileData()
|
||||
|
||||
}).catch(() => {
|
||||
this.$modal.msgError('上传失败')
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
picturePreviewFile(row) {
|
||||
row.fileList = []
|
||||
row.fileListTemp.forEach(item=>{
|
||||
row.fileList.push({
|
||||
"name": item.name,
|
||||
"url": item.url,
|
||||
})
|
||||
})
|
||||
this.fileId = row.fileType
|
||||
this.fileListInfo = row.fileListTemp
|
||||
|
||||
this.dialogVisibleFile = true
|
||||
},
|
||||
|
||||
|
||||
//图片查看
|
||||
picturePreview(file) {
|
||||
this.dialogImageUrl = file.url.replaceAll("#","%23")
|
||||
|
|
@ -1024,6 +1247,25 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
//删除图片
|
||||
pictureDelete(row, id) {
|
||||
let index = id
|
||||
this.fileListInfo = this.fileListInfo.filter(item => item.url !== row.url);
|
||||
this.fileDataList[this.fileId].fileList = this.fileDataList[this.fileId].fileList.filter(item => item.url !== row.url);
|
||||
this.fileDataList[this.fileId].fileListTemp = this.fileDataList[this.fileId].fileListTemp.filter(item => item.url !== row.url);
|
||||
let bmFiles = []
|
||||
this.rowData.bmFileInfos.forEach((item)=>{
|
||||
if (item.fileType != this.fileId) {
|
||||
bmFiles.push(item)
|
||||
}else{
|
||||
if (item.url!= row.url) {
|
||||
bmFiles.push(item)
|
||||
}
|
||||
}
|
||||
})
|
||||
this.rowData.bmFileInfos = bmFiles;
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
// console.log(row.id)
|
||||
|
|
@ -1140,6 +1382,9 @@ export default {
|
|||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
::v-deep .el-picker-panel {
|
||||
z-index: 999999 !important;
|
||||
}
|
||||
.popper-select {
|
||||
.el-cascader-panel .el-scrollbar .el-checkbox {
|
||||
display: none;
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@
|
|||
prop=""
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div style="color: #02A7F0;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==0">报告管理</div>
|
||||
<div style="color: red;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==1">报告管理</div>
|
||||
<div style="color: #02A7F0;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==1">报告管理</div>
|
||||
<div style="color: red;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==0">报告管理</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
|
||||
|
|
@ -89,7 +89,6 @@
|
|||
<el-table :data="fileDataList" width="100%" height="350px">
|
||||
<el-table-column label="序号" type="index" width="55" align="center"/>
|
||||
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="类型名称" align="center" :show-overflow-tooltip="true">
|
||||
<template>
|
||||
<div>{{this.rowData.maTypeName}}</div>
|
||||
|
|
@ -114,7 +113,7 @@
|
|||
</el-button>
|
||||
</el-upload> -->
|
||||
|
||||
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url">
|
||||
<el-button size="mini" type="text" @click="picturePreviewFile(scope.row)" v-if="scope.row.fileListTemp!=0">
|
||||
查看
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -130,6 +129,21 @@
|
|||
<img width="100%" height="500px" :src="dialogImageUrl" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 文件查看列表 -->
|
||||
<el-dialog title="文件列表" :visible.sync="dialogVisibleFile" width="500px" height="500px" >
|
||||
<el-table :data="fileListInfo" width="100%" height="350px">
|
||||
<el-table-column label="序号" type="index" width="55" align="center"/>
|
||||
<el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url" >
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -186,6 +200,7 @@ export default {
|
|||
{dictLabel:"第三方监测报告",fileType:"3",name:"",url:""},
|
||||
{dictLabel:"其他",fileType:"4",name:"",url:""},
|
||||
],
|
||||
fileListInfo: [],
|
||||
//上传
|
||||
upload: {
|
||||
// 设置上传的请求头部
|
||||
|
|
@ -196,6 +211,7 @@ export default {
|
|||
//图片查看弹窗
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
dialogVisibleFile: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -222,38 +238,67 @@ export default {
|
|||
//文件管理
|
||||
openFileDialog(row){
|
||||
this.rowData=row;
|
||||
this.fileDataList = [{dictLabel:"合格证",fileType:"0",name:"",url:""},
|
||||
{dictLabel:"型式试验报告",fileType:"1",name:"",url:""},
|
||||
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:""},
|
||||
{dictLabel:"第三方监测报告",fileType:"3",name:"",url:""},
|
||||
{dictLabel:"其他",fileType:"4",name:"",url:""}]
|
||||
this.getFileData()
|
||||
this.fileDataList = [{dictLabel:"合格证",fileType:"0",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"型式试验报告",fileType:"1",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"第三方监测报告",fileType:"3",name:"",url:"",fileList:[],fileListTemp:[]},
|
||||
{dictLabel:"其他",fileType:"4",name:"",url:"",fileList:[],fileListTemp:[]}]
|
||||
this.getFileData()
|
||||
this.open=true
|
||||
},
|
||||
getFileData(){
|
||||
async getFileData(){
|
||||
let param = {
|
||||
modelId:this.rowData.typeId,
|
||||
taskType:0,
|
||||
taskId:this.rowData.taskId
|
||||
}
|
||||
getPurchaseFileList(param).then((response) => {
|
||||
await getPurchaseFileList(param)
|
||||
.then(response => {
|
||||
if(response.rows.length>0){
|
||||
console.log("xxxxxxxxxxx")
|
||||
response.rows.forEach(item=>{
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==item.fileType)
|
||||
this.fileDataList[index].name = item.name
|
||||
this.fileDataList[index].url = item.url
|
||||
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
|
||||
|
||||
this.fileDataList[index].fileList.push({
|
||||
name:item.name,
|
||||
url:item.url
|
||||
})
|
||||
|
||||
this.fileDataList[index].fileListTemp.push({
|
||||
name:item.name,
|
||||
url:item.url
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
beforeFileUpload(row){
|
||||
this.rowData.fileType=row.fileType;
|
||||
this.rowData.fileType = row.fileType
|
||||
},
|
||||
|
||||
beforeUpload(row, file) {
|
||||
row.fileList.push(file);
|
||||
console.log('6666666',row.fileList)
|
||||
if (row.fileList.length > 3) {
|
||||
this.$message.warning('最多只能上传三张图片');
|
||||
// 删除最后一个文件
|
||||
row.fileList.pop();
|
||||
return false; // 阻止上传
|
||||
}
|
||||
return true; // 允许上传
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if(response.code==200){
|
||||
if(this.taskId==""){//新增逻辑
|
||||
handleFileSuccess(row,response, file, fileList) {
|
||||
if (response.code == 200) {
|
||||
if (this.taskId == "") {//新增逻辑
|
||||
row.fileListTemp.push({
|
||||
"name": response.data.name,
|
||||
"url": response.data.url,
|
||||
})
|
||||
// console.log(response)
|
||||
// console.log(this.rowData)
|
||||
// console.log(this.rowData.bmFileInfos)
|
||||
|
|
@ -262,9 +307,9 @@ export default {
|
|||
"taskType": "0",
|
||||
"name": response.data.name,
|
||||
"url": response.data.url,
|
||||
"modelId": this.rowData.typeId,
|
||||
"modelId": this.rowData.partId,
|
||||
"fileType": this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
}
|
||||
//根据文件上传返回更新文件管理弹窗内容
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==this.rowData.fileType)
|
||||
|
|
@ -281,26 +326,51 @@ export default {
|
|||
}else{
|
||||
this.rowData.bmFileInfos.push(obj)
|
||||
}
|
||||
|
||||
}else{//编辑逻辑
|
||||
let param = {
|
||||
|
||||
} else {//编辑逻辑
|
||||
row.fileListTemp.push({
|
||||
"name": response.data.name,
|
||||
"url": response.data.url,
|
||||
})
|
||||
let obj = {
|
||||
"taskId": this.taskId,
|
||||
"taskType": "0",
|
||||
"name": response.data.name,
|
||||
"url": response.data.url,
|
||||
"modelId": this.rowData.typeId,
|
||||
"modelId": this.rowData.partId,
|
||||
"fileType": this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
}
|
||||
//根据文件上传返回更新文件管理弹窗内容
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==this.rowData.fileType)
|
||||
this.fileDataList[index].name = response.data.name
|
||||
this.fileDataList[index].url = response.data.url
|
||||
//判断当前上传的文件是否已上传过-再往机具类型数据中插入
|
||||
if(this.rowData.bmFileInfos.length>0){
|
||||
let index2 = this.rowData.bmFileInfos.findIndex(v=>v.fileType==this.rowData.fileType)
|
||||
if(index2>-1){//相同类型文件重复上传-替换
|
||||
this.rowData.bmFileInfos.splice(index2,0,obj)
|
||||
}else{//不存在相同类型文件-添加
|
||||
this.rowData.bmFileInfos.push(obj)
|
||||
}
|
||||
}else{
|
||||
this.rowData.bmFileInfos.push(obj)
|
||||
}
|
||||
uploadPurchaseFile(param).then((response) => {
|
||||
this.$modal.msgSuccess('上传成功')
|
||||
this.getFileData()
|
||||
|
||||
}).catch(() => {
|
||||
this.$modal.msgError('上传失败')
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
picturePreviewFile(row) {
|
||||
this.fileListInfo = row.fileListTemp
|
||||
|
||||
this.dialogVisibleFile = true
|
||||
},
|
||||
//图片查看
|
||||
picturePreview(file) {
|
||||
this.dialogImageUrl = file.url.replaceAll('#','%23');
|
||||
|
|
|
|||
|
|
@ -140,16 +140,16 @@
|
|||
<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" 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">
|
||||
<div style="text-align: center; font-weight: 600; font-size: 30px">新购入库单</div>
|
||||
<div style="margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: flex-end; width: 95%">
|
||||
<!-- <div style="flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
|
||||
<span>单据编号:{{ printData.code }}</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="item" style=" flex-shrink: 0; margin-bottom: 5px; font-size: 14px;">
|
||||
<span>生产厂家(供应商):{{printData.supplierName}}</span>
|
||||
</div> -->
|
||||
<div class="item" style="flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
|
||||
<span>入库日期:{{ printData.arrivalDate }}</span>
|
||||
<span>单据编号:{{ printData.code }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="printTableData" class="table" border style="margin-top: 20px; padding: 1px">
|
||||
|
|
@ -159,6 +159,7 @@
|
|||
<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" prop="inputTime" />
|
||||
<!-- <el-table-column label="配送信息" align="center">
|
||||
<el-table-column label="采购数量" align="center" prop="purchaseNum"
|
||||
/>
|
||||
|
|
@ -192,7 +193,7 @@
|
|||
<div class="fillIn" style="margin-top: 20px; display: flex; justify-content: space-between">
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>审核(班长){{ printData.reviewer }}</span>
|
||||
<span>审核:{{ printData.reviewer }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -345,7 +346,7 @@ export default {
|
|||
// this.query.taskId = row.taskId
|
||||
this.getPrintTable(row.taskId)
|
||||
this.openPrint = true
|
||||
this.title = '新购工机具验收单'
|
||||
this.title = '新购入库单'
|
||||
},
|
||||
//获取验收单数据
|
||||
getPrintTable(taskId) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue