配件管理修改
This commit is contained in:
parent
fb8c580fb8
commit
e4cec52a18
|
|
@ -121,4 +121,22 @@ export function getEquipmentThreeTypes(query) {
|
|||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 结算记录查询-列表
|
||||
export function getSltRecord(query) {
|
||||
return request({
|
||||
url: '/material/sltRecordQuery/getList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 结算记录查询-详情
|
||||
export function getSltRecordInfo(data) {
|
||||
return request({
|
||||
url: '/material/slt_agreement_info/getSltRecordDetailsList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
@ -43,4 +43,12 @@ export function getPartType(query) {
|
|||
method: 'post',
|
||||
data: data ,
|
||||
})
|
||||
}
|
||||
|
||||
export function innerVerify(data) {
|
||||
return request({
|
||||
url: '/material/part_check/innerVerify',
|
||||
method: 'post',
|
||||
data: data ,
|
||||
})
|
||||
}
|
||||
|
|
@ -37,25 +37,25 @@
|
|||
<div class="tabelAllTopUnit">
|
||||
<div class="costTopUnit">一、施工机具有偿使用费:</div>
|
||||
<div class="costRightUnit">
|
||||
{{ '¥924427.53' }}
|
||||
{{ leaseCost }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabelAllTopUnit">
|
||||
<div class="costTopUnit">二、施工机具维修费:</div>
|
||||
<div class="costRightUnit">
|
||||
{{ '¥924427.53' }}
|
||||
{{ repairCost }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabelAllTopUnit">
|
||||
<div class="costTopUnit">三、施工机具丢失费:</div>
|
||||
<div class="costRightUnit">
|
||||
{{ '¥924427.53' }}
|
||||
{{ loseCost }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabelAllTopUnit">
|
||||
<div class="costTopUnit">四、施工机具损坏赔偿费:</div>
|
||||
<div class="costRightUnit">
|
||||
{{ '¥924427.53' }}
|
||||
{{ scrapCost }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabelAllTopThree">
|
||||
|
|
@ -202,16 +202,10 @@
|
|||
{{ loseCost }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabelAllBottom">
|
||||
<div class="columnAllNum">合计:</div>
|
||||
<div class="columnAll">
|
||||
{{ costAll.toFixed(2) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-table :data="loseList">
|
||||
<el-table :data="reducList">
|
||||
<el-table-column label="减免费用明细" align="center">
|
||||
<el-table-column label="序号" align="center" type="index" width="60"/>
|
||||
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
||||
|
|
@ -233,7 +227,7 @@
|
|||
<div class="tabelAllBottom">
|
||||
<div class="columnAllNum">费用小计:</div>
|
||||
<div class="columnAll">
|
||||
{{ loseCost }}
|
||||
{{ reducCost }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabelAllBottom">
|
||||
|
|
@ -248,7 +242,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getSltInfo, submitFee,submitCosts } from '@/api/cost/cost'
|
||||
import { getSltRecordInfo, submitFee,submitCosts } from '@/api/business/index'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
|
|
@ -272,8 +266,8 @@ export default {
|
|||
scrapCost: 0,
|
||||
loseList: [], //丢失费用列表
|
||||
loseCost: 0,
|
||||
discountList: [], //减免费用列表
|
||||
discountCost: 0,
|
||||
reducList: [], //减免费用列表
|
||||
reducCost: 0,
|
||||
costAll: 0,
|
||||
deptName: undefined,
|
||||
applyList: [],
|
||||
|
|
@ -305,7 +299,7 @@ export default {
|
|||
},
|
||||
/** 查询列表 */
|
||||
getDataAll() {
|
||||
getSltInfo(this.rowData).then((response) => {
|
||||
getSltRecordInfo(this.rowData).then((response) => {
|
||||
this.leaseList = response.data.leaseList //租赁费用列表
|
||||
this.projectName = response.data.projectName
|
||||
this.unitName = response.data.unitName
|
||||
|
|
|
|||
|
|
@ -52,15 +52,19 @@
|
|||
<el-form-item prop="agreementCode">
|
||||
<el-input v-model="queryParams.agreementCode" placeholder="请输入协议号" clearable disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="sltStatus">
|
||||
<el-form-item prop="keyWord">
|
||||
<el-input v-model="queryParams.keyWord" placeholder="请输入关键词" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.sltStatus"
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择工程结算状态"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option label="未结算" value="0"></el-option>
|
||||
<el-option label="已结算" value="1"></el-option>
|
||||
<el-option label="待审核" value="1"></el-option>
|
||||
<el-option label="审核通过" value="2"></el-option>
|
||||
<el-option label="审核驳回" value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -88,8 +92,8 @@
|
|||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算时间" align="center" prop="agreementCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="结算人" align="center" prop="agreementCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="结算时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="结算人" align="center" prop="createBy" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="结算单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="结算工程" align="center" prop="projectName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true"/>
|
||||
|
|
@ -98,15 +102,15 @@
|
|||
{{ scope.row.costs.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算状态" align="center" prop="sltStatus" :show-overflow-tooltip="true">
|
||||
<el-table-column label="结算状态" align="center" prop="status" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.cost_status" :value="scope.row.sltStatus"/>
|
||||
<dict-tag :options="dict.type.cost_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
<!-- <template slot-scope="scope">
|
||||
<span v-if="scope.row.sltStatus == '0'">未结算</span>
|
||||
<span v-if="scope.row.sltStatus == '1'">已结算</span>
|
||||
<span v-if="scope.row.sltStatus == '2'">已审核</span>
|
||||
<span v-if="scope.row.sltStatus == '3'">已驳回</span>
|
||||
<span v-if="scope.row.status == '0'">未结算</span>
|
||||
<span v-if="scope.row.status == '1'">已结算</span>
|
||||
<span v-if="scope.row.status == '2'">已审核</span>
|
||||
<span v-if="scope.row.status == '3'">已驳回</span>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
||||
|
|
@ -127,91 +131,6 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 协议单弹窗 -->
|
||||
<el-dialog :visible.sync="openPrint" width="1100px" append-to-body>
|
||||
<div style="height: 600px; overflow-y: scroll">
|
||||
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
|
||||
<div 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: 65%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px;">
|
||||
</div>
|
||||
<div class="item" style=" width: 35%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px;">
|
||||
<span>协议号:</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabelColumn">
|
||||
<div class="columnLabel" style="width: 20%;">工程名称:</div>
|
||||
<div class="columnContent" style="width: 80%;">金上-湖北线路工程(川12标)</div>
|
||||
</div>
|
||||
<div class="tabelColumn">
|
||||
<div class="columnLabel" style="width: 20%;">承租单位:</div>
|
||||
<div class="columnContent" style="width: 40%;">金上-湖北线路工程(川12标)项目部</div>
|
||||
<div class="columnLabel" style="width: 10%;border-left: 1px solid #9c9c9c;">日期:</div>
|
||||
<div class="columnContent" style="width: 30%;">2024-12-01</div>
|
||||
</div>
|
||||
<div class="tabelColumn">
|
||||
<div class="columnLabel" style="width: 100%;">结算项目及金额(元)</div>
|
||||
</div>
|
||||
<div class="tabelColumn">
|
||||
<div class="columnLabel" style="width: 60%;">一、施工机具有偿使用费:</div>
|
||||
<div class="columnContent" style="width: 40%;">¥ 13144247. 44</div>
|
||||
</div>
|
||||
<div class="tabelColumn">
|
||||
<div class="columnLabel" style="width: 60%;">二、施工机具维修费:</div>
|
||||
<div class="columnContent" style="width: 40%;">¥ 13144247. 44</div>
|
||||
</div>
|
||||
<div class="tabelColumn">
|
||||
<div class="columnLabel" style="width: 60%;">三、施工机具丢失费:</div>
|
||||
<div class="columnContent" style="width: 40%;">¥ 13144247. 44</div>
|
||||
</div>
|
||||
<div class="tabelColumn">
|
||||
<div class="columnLabel" style="width: 60%;">四、施工机具损坏赔偿费:</div>
|
||||
<div class="columnContent" style="width: 40%;">¥ 13144247. 44</div>
|
||||
</div>
|
||||
<div class="tabelColumn">
|
||||
<div class="columnLabel" style="width: 20%;">费用合计金额(大写):</div>
|
||||
<div class="columnContent" style="width: 40%;">贰仟肆佰伍拾陆万伍仟肆佰捌拾玖元肆角伍分</div>
|
||||
<div class="columnContent" style="width: 40%;">¥ 24565489.45</div>
|
||||
</div>
|
||||
<div class="tabelColumn">
|
||||
<div class="columnLabel" style="width: 20%;">说明:</div>
|
||||
<div class="columnContent" style="width: 80%;">本协议一式三份,甲方一份,乙方一份,经双方签字后生效。</div>
|
||||
</div>
|
||||
<div class="tabelColumn" style="border: 1px solid #9c9c9c;">
|
||||
<div class="columnLabel" style="width: 20%;">备注:</div>
|
||||
<div class="columnContent" style="width: 80%;">此费用仅为在机具设备分公司发生费用,未计从项目部领用机具费用。</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="fillIn" style="margin-top: 20px; display: flex; justify-content: space-between;">
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>部门负责人:</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>承租负责人:</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>核算员:</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</vue-easy-print>
|
||||
</div>
|
||||
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<el-button type="primary" @click="print">打 印</el-button>
|
||||
<el-button @click="openPrint = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -222,7 +141,7 @@ import {
|
|||
getUnitList,
|
||||
getAgreementInfoById,
|
||||
} from '@/api/back/index.js'
|
||||
import { getSltAgreementInfo } from '@/api/cost/cost'
|
||||
import { getSltRecord } from '@/api/business/index'
|
||||
import vueEasyPrint from "vue-easy-print";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
|
@ -266,13 +185,14 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sltStatus: '',
|
||||
status: '',
|
||||
isCommit:'',
|
||||
unitId: null,
|
||||
projectId: null,
|
||||
agreementId: '',
|
||||
agreementCode: '',
|
||||
time: null,
|
||||
keyWord: '',
|
||||
},
|
||||
openPrint:false
|
||||
}
|
||||
|
|
@ -363,8 +283,17 @@ export default {
|
|||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
|
||||
getSltAgreementInfo(this.queryParams).then((response) => {
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
proId: this.queryParams.proId,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
status: this.queryParams.status,
|
||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum
|
||||
}
|
||||
getSltRecord(params).then((response) => {
|
||||
this.tableList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
|
|
@ -383,7 +312,7 @@ export default {
|
|||
this.queryParams={
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sltStatus: '',
|
||||
status: '',
|
||||
isCommit:'',
|
||||
unitId: null,
|
||||
projectId: null,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -63,7 +63,7 @@
|
|||
size="mini"
|
||||
icon="el-icon-back"
|
||||
@click="jumpList"
|
||||
>新购到货验收</el-button
|
||||
>配件入库</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
>
|
||||
</el-col> -->
|
||||
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
@click="batchPass"
|
||||
|
|
@ -87,19 +87,8 @@
|
|||
:disabled="multiple"
|
||||
>入库</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
@click="batchReject"
|
||||
icon="el-icon-close"
|
||||
v-show="!isView"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
>驳回</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
|
|
@ -107,14 +96,7 @@
|
|||
:data="tableList"
|
||||
ref="multipleTable"
|
||||
row-key="partId"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center" :selectable="selectable"
|
||||
:reserve-selection="true"
|
||||
/>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -160,6 +142,17 @@
|
|||
prop="productionTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="相关配套资料"
|
||||
align="center"
|
||||
prop=""
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<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="checkResult" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
|
|
@ -168,19 +161,16 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.part_task_status"
|
||||
:options="dict.type.purchase_task_status"
|
||||
:value="scope.row.status"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="180" v-if="!isView">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="success" @click="pass(scope.row)" v-if="scope.row.status==0">
|
||||
<el-button size="mini" type="success" @click="pass(scope.row)" v-if="scope.row.status==4">
|
||||
入库
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger" @click="reject(scope.row)" v-if="scope.row.status==0">
|
||||
驳回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -202,6 +192,65 @@
|
|||
<el-button size="mini" @click="confirmShow = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body>
|
||||
<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" :show-overflow-tooltip="true">
|
||||
<template>
|
||||
<div>{{this.rowData.maTypeName}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" align="center" :show-overflow-tooltip="true">
|
||||
<template>
|
||||
<div>{{this.rowData.partName}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="报告日期" align="center" prop="orgName" :show-overflow-tooltip="true"/>
|
||||
<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: center;">
|
||||
<!-- <el-upload ref="upload" :limit="1" :headers="upload.headers"
|
||||
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||
:on-success="handleFileSuccess" :auto-upload="true"
|
||||
>
|
||||
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload> -->
|
||||
|
||||
<el-button size="mini" type="text" @click="picturePreviewFile(scope.row)" v-if="scope.row.fileListTemp!=0">
|
||||
查看
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 图片查看弹窗 -->
|
||||
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px" >
|
||||
<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>
|
||||
|
||||
|
|
@ -213,12 +262,12 @@ import {
|
|||
uploadPurchaseFile,
|
||||
} from "@/api/purchase/goodsAccept";
|
||||
import { getPartType,partTypeWarehouse,partTypeReject } from '@/api/part/partAccept';
|
||||
import { getPartTypeCheckInfo } from '@/api/part/partArrived';
|
||||
import { getPartTypeCheckInfo,getPartTypeFileList } from '@/api/part/partArrived';
|
||||
import { downloadFile } from "@/utils/download";
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
name: "AcceptDetail",
|
||||
dicts: ["part_task_status"],
|
||||
dicts: ["purchase_task_status"],
|
||||
data() {
|
||||
return {
|
||||
Id: "",
|
||||
|
|
@ -279,6 +328,8 @@ export default {
|
|||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "/file/upload",
|
||||
},
|
||||
fileListInfo:[],
|
||||
dialogVisibleFile: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -297,14 +348,15 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//是否可用勾选框
|
||||
selectable(row) {
|
||||
if (row.status == 0) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
// //是否可用勾选框
|
||||
// selectable(row) {
|
||||
// console.log(row)
|
||||
// if (row.status == 2||row.status == 13 ||row.status == 14) {
|
||||
// return true
|
||||
// } else {
|
||||
// return false
|
||||
// }
|
||||
// },
|
||||
// 返回列表页
|
||||
jumpList() {
|
||||
const obj = { path: "/part/partAccept" };
|
||||
|
|
@ -380,55 +432,55 @@ export default {
|
|||
this.getList()
|
||||
}).catch(() => {});
|
||||
},
|
||||
//驳回
|
||||
reject(row) {
|
||||
const infos=[{id:row.id,partId:row.partId,purchaseNum:row.purchaseNum,taskId:this.taskId}]
|
||||
this.$modal.confirm('是否确认驳回该配件?')
|
||||
.then(function() {
|
||||
return partTypeReject(infos)
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess('驳回成功')
|
||||
this.getList()
|
||||
}).catch(() => {});
|
||||
},
|
||||
// //驳回
|
||||
// reject(row) {
|
||||
// const infos=[{id:row.id,partId:row.partId,purchaseNum:row.purchaseNum,taskId:this.taskId}]
|
||||
// this.$modal.confirm('是否确认驳回该配件?')
|
||||
// .then(function() {
|
||||
// return partTypeReject(infos)
|
||||
// }).then(() => {
|
||||
// this.$modal.msgSuccess('驳回成功')
|
||||
// this.getList()
|
||||
// }).catch(() => {});
|
||||
// },
|
||||
|
||||
//批量入库
|
||||
batchPass() {
|
||||
if(this.infos==0){
|
||||
this.$modal.msgError("请选择配件");
|
||||
return;
|
||||
}
|
||||
this.$modal.confirm('是否确认入库该配件?')
|
||||
.then(() => {
|
||||
return partTypeWarehouse(this.infos)
|
||||
})
|
||||
.then(() => {
|
||||
this.$modal.msgSuccess('入库成功')
|
||||
this.getList()
|
||||
// 清除表格的选中状态
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// //批量入库
|
||||
// batchPass() {
|
||||
// if(this.infos==0){
|
||||
// this.$modal.msgError("请选择配件");
|
||||
// return;
|
||||
// }
|
||||
// this.$modal.confirm('是否确认入库该配件?')
|
||||
// .then(() => {
|
||||
// return partTypeWarehouse(this.infos)
|
||||
// })
|
||||
// .then(() => {
|
||||
// this.$modal.msgSuccess('入库成功')
|
||||
// this.getList()
|
||||
// // 清除表格的选中状态
|
||||
// this.$refs.multipleTable.clearSelection();
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
|
||||
//批量驳回
|
||||
batchReject() {
|
||||
if(this.infos==0){
|
||||
this.$modal.msgError("请选择配件");
|
||||
return;
|
||||
}
|
||||
this.$modal.confirm('是否确认驳回该配件?')
|
||||
.then(() => {
|
||||
return partTypeReject(this.infos)
|
||||
})
|
||||
.then(() => {
|
||||
this.$modal.msgSuccess('驳回成功')
|
||||
this.getList()
|
||||
// 清除表格的选中状态
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// //批量驳回
|
||||
// batchReject() {
|
||||
// if(this.infos==0){
|
||||
// this.$modal.msgError("请选择配件");
|
||||
// return;
|
||||
// }
|
||||
// this.$modal.confirm('是否确认驳回该配件?')
|
||||
// .then(() => {
|
||||
// return partTypeReject(this.infos)
|
||||
// })
|
||||
// .then(() => {
|
||||
// this.$modal.msgSuccess('驳回成功')
|
||||
// this.getList()
|
||||
// // 清除表格的选中状态
|
||||
// this.$refs.multipleTable.clearSelection();
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
|
||||
//验收确认请求
|
||||
confirmCheck() {
|
||||
|
|
@ -449,40 +501,42 @@ 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.open = true;
|
||||
},
|
||||
//获取已上传文件
|
||||
getFileData() {
|
||||
let param = {
|
||||
modelId: this.rowData.typeId,
|
||||
taskType: 0,
|
||||
taskId: this.rowData.taskId,
|
||||
};
|
||||
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;
|
||||
});
|
||||
//文件管理
|
||||
openFileDialog(row){
|
||||
this.rowData=row;
|
||||
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(){
|
||||
let param = {
|
||||
modelId:this.rowData.partId,
|
||||
taskType:13,
|
||||
taskId:this.rowData.taskId
|
||||
}
|
||||
getPartTypeFileList(param).then((response) => {
|
||||
if(response.data.length>0){
|
||||
response.data.forEach(item=>{
|
||||
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
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
//上传
|
||||
beforeFileUpload(row) {
|
||||
this.rowData.fileType = row.fileType;
|
||||
|
|
@ -510,6 +564,11 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
picturePreviewFile(row) {
|
||||
this.fileListInfo = row.fileListTemp
|
||||
|
||||
this.dialogVisibleFile = true
|
||||
},
|
||||
//图片查看
|
||||
picturePreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
|
|
|
|||
|
|
@ -43,28 +43,6 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success" plain
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="passAll"
|
||||
>
|
||||
入库
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger" plain
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="rejectAll"
|
||||
>
|
||||
驳回
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning" plain
|
||||
|
|
@ -347,6 +325,7 @@ import { getToken } from '@/utils/auth'
|
|||
this.queryParams.startTime=undefined
|
||||
this.queryParams.endTime=undefined
|
||||
}
|
||||
this.queryParams.taskStage = 3
|
||||
getListNewBuy(this.queryParams).then(response => {
|
||||
this.tableList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,643 @@
|
|||
<template>
|
||||
<div class="app-container" id="acceptDetail">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="类型规格:" prop="partId">
|
||||
<el-select
|
||||
v-model="queryParams.partId"
|
||||
placeholder="请选择类型规格"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in materialModelList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="机具厂家:" prop="supplierId">
|
||||
<el-select v-model="queryParams.supplierId" placeholder="请选择机具厂家" clearable>
|
||||
<el-option
|
||||
v-for="dict in supplierList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="出厂日期:" prop="productionTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.productionTime"
|
||||
placeholder="请选择出厂日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
>
|
||||
</el-date-picker>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-back"
|
||||
@click="jumpList"
|
||||
>配件验收</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-col> -->
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
@click="batchPass"
|
||||
icon="el-icon-check"
|
||||
v-show="!isView"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
>合格</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
@click="batchReject"
|
||||
icon="el-icon-close"
|
||||
v-show="!isView"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
>不合格</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
ref="multipleTable"
|
||||
row-key="partId"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center" :selectable="selectable"
|
||||
:reserve-selection="true"
|
||||
/>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="配件类型"
|
||||
align="center"
|
||||
prop="maName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="配件名称"
|
||||
align="center"
|
||||
prop="maTypeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="partName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="到货数量"
|
||||
align="center"
|
||||
prop="purchaseNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
prop="unitName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<!-- <el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
prop="supplier"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="出厂日期"
|
||||
align="center"
|
||||
prop="productionTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="相关配套资料"
|
||||
align="center"
|
||||
prop=""
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<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"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.purchase_task_status"
|
||||
:value="scope.row.status"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="操作" align="center" width="180" v-if="!isView">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="success" @click="pass(scope.row)" v-if="scope.row.status==0">
|
||||
入库
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger" @click="reject(scope.row)" v-if="scope.row.status==0">
|
||||
驳回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
<!-- 验收弹窗 -->
|
||||
<el-dialog title="验收" :visible.sync="confirmShow" width="600px" height="300px">
|
||||
<div style="width: 100%; height: 80%; display: flex;margin-bottom: 10px;">
|
||||
<div style="width:15%;">验收结论:</div>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="3" style="width:80%;"
|
||||
placeholder="请输入结论"
|
||||
v-model="checkResult"
|
||||
maxlength="100">
|
||||
</el-input>
|
||||
</div>
|
||||
<div style="width: 100%;height: 20%;display: flex;justify-content: flex-end;align-items: center;">
|
||||
<el-button type="primary" @click="confirmCheck">确认</el-button>
|
||||
<el-button size="mini" @click="confirmShow = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body>
|
||||
<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" :show-overflow-tooltip="true">
|
||||
<template>
|
||||
<div>{{this.rowData.maTypeName}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" align="center" :show-overflow-tooltip="true">
|
||||
<template>
|
||||
<div>{{this.rowData.partName}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="报告日期" align="center" prop="orgName" :show-overflow-tooltip="true"/>
|
||||
<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: center;">
|
||||
<!-- <el-upload ref="upload" :limit="1" :headers="upload.headers"
|
||||
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||
:on-success="handleFileSuccess" :auto-upload="true"
|
||||
>
|
||||
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload> -->
|
||||
|
||||
<el-button size="mini" type="text" @click="picturePreviewFile(scope.row)" v-if="scope.row.fileListTemp!=0">
|
||||
查看
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 图片查看弹窗 -->
|
||||
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px" >
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import { getManufacturerSelect } from "@/api/ma/supplier";
|
||||
import {
|
||||
acceptInnerVerifyer,
|
||||
getPurchaseFileList,
|
||||
uploadPurchaseFile,
|
||||
} from "@/api/purchase/goodsAccept";
|
||||
import { getPartType,partTypeWarehouse,partTypeReject,innerVerify } from '@/api/part/partAccept';
|
||||
import { getPartTypeCheckInfo,getPartTypeFileList } from '@/api/part/partArrived';
|
||||
import { downloadFile } from "@/utils/download";
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
name: "AcceptDetail",
|
||||
dicts: ["purchase_task_status"],
|
||||
data() {
|
||||
return {
|
||||
Id: "",
|
||||
taskId: "",
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
dialogLoading: false,
|
||||
isView: false,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showHouse: false,
|
||||
materialModelList: [], //规格型号下拉
|
||||
supplierList: [], //厂家下拉
|
||||
ids: [],
|
||||
infos: [],
|
||||
checkList: [],
|
||||
// 总条数
|
||||
total: 0,
|
||||
//表格数据
|
||||
tableList: [],
|
||||
fixCodeList: ["否", "是"],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
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: "" },
|
||||
],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
partId: undefined,
|
||||
supplierId: undefined,
|
||||
productionTime: undefined,
|
||||
},
|
||||
//确认弹窗
|
||||
confirmShow: false,
|
||||
taskStatus: "", //3合格、1不合格
|
||||
checkResult: "",
|
||||
verifyPass: true, //true合格、false不合格
|
||||
//图片查看弹窗
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
//上传
|
||||
upload: {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "/file/upload",
|
||||
},
|
||||
fileListInfo:[],
|
||||
dialogVisibleFile: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
const taskId = this.$route.query && this.$route.query.taskId;
|
||||
const Id = this.$route.query && this.$route.query.Id;
|
||||
const isView = this.$route.query && this.$route.query.isView;
|
||||
this.taskId = taskId;
|
||||
this.Id = Id;
|
||||
if (isView == "true") {
|
||||
this.isView = true;
|
||||
} else {
|
||||
this.isView = false;
|
||||
}
|
||||
this.getPartType();
|
||||
console.log(this.isView);
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//是否可用勾选框
|
||||
selectable(row) {
|
||||
console.log(row)
|
||||
if (row.status == 2||row.status == 13 ||row.status == 14) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 返回列表页
|
||||
jumpList() {
|
||||
const obj = { path: "/part/partAcceptTwo" };
|
||||
this.$tab.closeOpenPage(obj);
|
||||
},
|
||||
getPartType() {
|
||||
getPartType({ level: 3 }).then((response) => {
|
||||
let matModelRes = response.data;
|
||||
this.materialModelList = matModelRes.map((item) => {
|
||||
return {
|
||||
label: item.partName,
|
||||
value: item.partId,
|
||||
};
|
||||
});
|
||||
});
|
||||
},
|
||||
getSupplierList() {
|
||||
getManufacturerSelect().then((response) => {
|
||||
let arrRes = response.rows;
|
||||
this.supplierList = arrRes.map((item) => {
|
||||
return {
|
||||
label: item.supplier,
|
||||
value: item.supplierId,
|
||||
};
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.id = this.Id;
|
||||
this.queryParams.taskId = this.taskId;
|
||||
getPartTypeCheckInfo(this.queryParams).then((response) => {
|
||||
this.tableList = response.data.partTypeCheckDetailsList;
|
||||
// this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.keyWord = null;
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection;
|
||||
this.infos = [];
|
||||
selection.forEach((item) => {
|
||||
this.infos.push({id:item.id,partId:item.partId,purchaseNum:item.purchaseNum,taskId:item.taskId});
|
||||
});
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
//入库
|
||||
pass(row) {
|
||||
// if(this.infos==0){
|
||||
// this.$modal.msgError("请选择配件");
|
||||
// return;
|
||||
// }
|
||||
|
||||
const infos=[{id:row.id,partId:row.partId,purchaseNum:row.purchaseNum,taskId:this.taskId}]
|
||||
this.$modal.confirm('是否确认入库该配件?')
|
||||
.then(function() {
|
||||
return partTypeWarehouse(infos)
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess('入库成功')
|
||||
this.getList()
|
||||
}).catch(() => {});
|
||||
},
|
||||
//驳回
|
||||
reject(row) {
|
||||
const infos=[{id:row.id,partId:row.partId,purchaseNum:row.purchaseNum,taskId:this.taskId}]
|
||||
this.$modal.confirm('是否确认驳回该配件?')
|
||||
.then(function() {
|
||||
return partTypeReject(infos)
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess('驳回成功')
|
||||
this.getList()
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
//批量入库
|
||||
batchPass() {
|
||||
if(this.infos==0){
|
||||
this.$modal.msgError("请选择配件");
|
||||
return;
|
||||
}
|
||||
this.taskStatus = "3";
|
||||
this.checkResult = "合格";
|
||||
this.verifyPass = true;
|
||||
this.checkList = [];
|
||||
this.checkList = this.ids.map((item) => {
|
||||
let obj = {
|
||||
taskId: item.taskId,
|
||||
partId: item.partId,
|
||||
checkResult: this.checkResult,
|
||||
};
|
||||
return obj;
|
||||
});
|
||||
this.confirmShow = true;
|
||||
},
|
||||
|
||||
//批量驳回
|
||||
batchReject() {
|
||||
if(this.infos==0){
|
||||
this.$modal.msgError("请选择配件");
|
||||
return;
|
||||
}
|
||||
this.taskStatus = "1";
|
||||
this.checkResult = "不合格";
|
||||
this.verifyPass = false;
|
||||
this.checkList = [];
|
||||
this.checkList = this.ids.map((item) => {
|
||||
let obj = {
|
||||
taskId: item.taskId,
|
||||
partId: item.partId,
|
||||
checkResult: this.checkResult,
|
||||
};
|
||||
return obj;
|
||||
});
|
||||
this.confirmShow = true;
|
||||
},
|
||||
|
||||
//验收确认请求
|
||||
confirmCheck() {
|
||||
this.checkList.forEach((item) => {
|
||||
item.checkResult = this.checkResult;
|
||||
});
|
||||
let param = {
|
||||
purchaseCheckDetailsList:this.checkList,
|
||||
verifyPass:this.verifyPass
|
||||
}
|
||||
console.log(param);
|
||||
innerVerify(param).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("验收成功");
|
||||
this.confirmShow = false;
|
||||
this.getList();
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
}
|
||||
});
|
||||
},
|
||||
//文件管理
|
||||
openFileDialog(row){
|
||||
this.rowData=row;
|
||||
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(){
|
||||
let param = {
|
||||
modelId:this.rowData.partId,
|
||||
taskType:13,
|
||||
taskId:this.rowData.taskId
|
||||
}
|
||||
getPartTypeFileList(param).then((response) => {
|
||||
if(response.data.length>0){
|
||||
response.data.forEach(item=>{
|
||||
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
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
//上传
|
||||
beforeFileUpload(row) {
|
||||
this.rowData.fileType = row.fileType;
|
||||
// this.rowData.dictLabel=row.dictLabel;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if (response.code == 200) {
|
||||
let param = {
|
||||
taskId: this.taskId,
|
||||
taskType: "0",
|
||||
name: response.data.name,
|
||||
url: response.data.url,
|
||||
modelId: this.rowData.typeId,
|
||||
fileType: this.rowData.fileType,
|
||||
};
|
||||
console.log(param);
|
||||
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;
|
||||
const parts = file.name.split(".");
|
||||
const extension = parts.pop();
|
||||
if (extension === 'doc' || extension === 'DOC' || extension === 'docx' || extension === 'DOCX' || extension === 'pdf' || extension === 'PDF') {
|
||||
const windowName = file.name;
|
||||
window.open(file.url, windowName);
|
||||
} else {
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"/material/part_arrived/exportDetails",
|
||||
{ taskId: this.taskId },
|
||||
`新购到货详情_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.uploadImg {
|
||||
padding-top: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.deviceCode {
|
||||
margin-top: 10px;
|
||||
padding-bottom: 20px;
|
||||
font-size: 18px;
|
||||
}
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
//隐藏图片上传框的css
|
||||
::v-deep.disabled {
|
||||
.el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,475 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item prop="dateRange">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键词"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
maxlength="20"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="taskStatus">
|
||||
<el-select
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
placeholder="状态筛选"
|
||||
v-model="queryParams.taskStatus"
|
||||
>
|
||||
<el-option
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id"
|
||||
v-for="dict in taskStatusList"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning" plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出数据</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="taskId" @selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" :selectable="selectable"/>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货时间" align="center" prop="arrivalTime" width="200" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="采购单号" align="center" prop="code" width="150" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="采购配件" align="center" prop="purchaseMaTypeName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="采购数量" align="center" prop="purchaseMaNumber" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="物资厂家" align="center" prop="supplier" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="创建人" align="center" prop="createBy" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="200" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="状态" align="center" prop="taskStatusName" :show-overflow-tooltip="true">
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.purchase_task_status" :value="scope.row.taskStatus"/>-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" width="230">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleView(scope.row)"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary" v-if="scope.row.taskStatusName == '未完成'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>
|
||||
验收
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="handlePrint(scope.row)"
|
||||
>
|
||||
验收单
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 入库单弹窗 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openPrint"
|
||||
width="1090px"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 500px; overflow-y: scroll">
|
||||
<!-- <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: 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;
|
||||
"
|
||||
>
|
||||
<span>生产厂家(供应商):{{printData.supplier}}</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>到货日期:{{printData.arrivalTime}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="printTableData"
|
||||
class="table"
|
||||
style="margin-top: 20px; width: 1000px; "
|
||||
border
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<el-table-column label="序号" align="center" type="index" row="2" width="60px"/>
|
||||
<el-table-column
|
||||
label="配件类型"
|
||||
align="center"
|
||||
prop="maName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="配件名称"
|
||||
align="center"
|
||||
prop="maTypeName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="partName"
|
||||
/>
|
||||
<el-table-column label="单位" align="center" prop="unitName" />
|
||||
<!-- <el-table-column label="采购数量" align="center" prop="purchaseNum" /> -->
|
||||
<el-table-column label="验收情况" align="center">
|
||||
<el-table-column
|
||||
label="到货数量"
|
||||
align="center"
|
||||
prop="purchaseNum"
|
||||
/>
|
||||
<el-table-column
|
||||
label="验收结论"
|
||||
align="center"
|
||||
prop="checkResult"
|
||||
/>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="fillIn" style="margin-top: 20px;display: flex;justify-content: space-between;" >
|
||||
<div class="item" style="width: 33%;display: flex;align-items: center;">
|
||||
<div style="width: 25%;">供应科:</div>
|
||||
<div style="width: 75%;display: flex;align-items: center;flex-wrap: wrap;" v-if="printDataSign.gySignUrl">
|
||||
<div v-for="(sign, index) in printDataSign.gySignUrl" :key="index" style="width: 35%;margin-left: 5px;">
|
||||
<img :src="sign.signUrl" :class="sign.signType=='0' ? 'image-type':'sign-type'" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" style="width: 33%;display: flex;align-items: center;">
|
||||
<div style="width: 30%;">生产技术科:</div>
|
||||
<div style="width: 70%;display: flex;align-items: center;flex-wrap: wrap;" v-if="printDataSign.scSignUrl">
|
||||
<div v-for="(sign, index) in printDataSign.scSignUrl" :key="index" style="width: 35%;margin-left: 5px;">
|
||||
<img :src="sign.signUrl" :class="sign.signType=='0' ? 'image-type':'sign-type'" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" style="width: 33%;display: flex;align-items: center;">
|
||||
<div style="width: 25%;">库管班:</div>
|
||||
<div style="width: 75%;display: flex;align-items: center;flex-wrap: wrap;" v-if="printDataSign.kgSignUrl">
|
||||
<div v-for="(sign, index) in printDataSign.kgSignUrl" :key="index" style="width: 35%;margin-left: 5px;">
|
||||
<img :src="sign.signUrl" :class="sign.signType=='0' ? 'image-type':'sign-type'" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<span>库管班:{{printData.warehouseTeam}}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </vue-easy-print> -->
|
||||
</div>
|
||||
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<el-button type="primary" @click="print">打 印</el-button>
|
||||
<el-button @click="openPrint = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getListNewBuy,getInBoundForm } from '@/api/part/partArrived';
|
||||
import { passAll, rejectAll } from '@/api/part/partAccept';
|
||||
import vueEasyPrint from "vue-easy-print";
|
||||
import { downloadFile } from '@/utils/download'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: "PartAcceptList",
|
||||
dicts: ['part_task_status'],
|
||||
components: { vueEasyPrint },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showHouse: false,
|
||||
dateRange:[],
|
||||
taskStatusList:[{id:'0',name:'未完成'},{id:'1',name:'已完成'}],
|
||||
ids: [],
|
||||
infos: [],
|
||||
// 总条数
|
||||
total: 0,
|
||||
//表格数据
|
||||
tableList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord:undefined,
|
||||
taskStatus:undefined,
|
||||
},
|
||||
openPrint: false,
|
||||
printData: {},
|
||||
printDataSign: {},
|
||||
printTableData: [],
|
||||
productionTechDeptOptions: [
|
||||
{ value: '0', label: '张三' },
|
||||
{ value: '1', label: '李四' },
|
||||
{ value: '2', label: '王五' },
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//是否可用勾选框
|
||||
selectable(row) {
|
||||
console.log(row)
|
||||
if (row.taskStatusName == '未完成') {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.taskStage = 2;
|
||||
if(this.dateRange.length>0){
|
||||
this.queryParams.startTime=this.dateRange[0]
|
||||
this.queryParams.endTime=this.dateRange[1]
|
||||
}else{
|
||||
this.queryParams.startTime=undefined
|
||||
this.queryParams.endTime=undefined
|
||||
}
|
||||
getListNewBuy(this.queryParams).then(response => {
|
||||
this.tableList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.dateRange=[]
|
||||
this.queryParams.keyWord=null;
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.taskId)
|
||||
this.infos = [];
|
||||
selection.forEach((item) => {
|
||||
this.infos.push({taskId:item.taskId});
|
||||
});
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleUpdate(row){
|
||||
console.log(row)
|
||||
let query = { Id:row.id,taskId: row.taskId,isView:"false" }
|
||||
this.$tab.closeOpenPage({
|
||||
path: '/part/partAcceptDetailTwo',
|
||||
query,
|
||||
})
|
||||
},
|
||||
//查看
|
||||
handleView(row){
|
||||
console.log(row)
|
||||
let query = { Id:row.id,taskId: row.taskId,isView:"true" }
|
||||
this.$tab.closeOpenPage({
|
||||
path: '/part/partAcceptDetailTwo',
|
||||
query,
|
||||
})
|
||||
},
|
||||
//批量入库
|
||||
passAll(){
|
||||
passAll(this.infos).then((response) => {
|
||||
if(response.code==200){
|
||||
this.$modal.msgSuccess('入库成功')
|
||||
}else{
|
||||
this.$modal.msgSuccess('入库失败')
|
||||
}
|
||||
this.getList()
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
}).catch(() => {
|
||||
this.$modal.msgError('入库失败')
|
||||
})
|
||||
},
|
||||
//批量驳回
|
||||
rejectAll(){
|
||||
rejectAll(this.infos).then((response) => {
|
||||
if(response.code==200){
|
||||
this.$modal.msgSuccess('驳回成功')
|
||||
}else{
|
||||
this.$modal.msgSuccess('驳回失败')
|
||||
}
|
||||
this.getList()
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
}).catch(() => {
|
||||
this.$modal.msgError('驳回失败')
|
||||
})
|
||||
},
|
||||
//查看入库单
|
||||
handlePrint(row) {
|
||||
// this.query.taskId = row.taskId
|
||||
this.openPrint = true;
|
||||
this.title = "机具配件到货验收单";
|
||||
let params = {
|
||||
id: row.id,
|
||||
taskId: row.taskId,
|
||||
};
|
||||
this.getPrintTable(params)
|
||||
},
|
||||
//获取入库单数据
|
||||
getPrintTable(params) {
|
||||
getInBoundForm({ id: params.id,taskId:params.taskId }).then((response) => {
|
||||
this.printDataSign = response.data;
|
||||
this.printData = response.data.partTypeCheckInfo;
|
||||
this.printTableData = response.data.partTypeCheckDetailsList;
|
||||
|
||||
});
|
||||
},
|
||||
//打印
|
||||
print() {
|
||||
// this.$refs.remarksPrintRef.print()
|
||||
printJS({
|
||||
printable: 'checkId',
|
||||
type: 'html',
|
||||
targetStyles: ['*'],
|
||||
maxWidth:'1400'
|
||||
// 其他配置选项
|
||||
});
|
||||
},
|
||||
handleExport() {
|
||||
this.download(
|
||||
"/material/part_arrived/export",
|
||||
{ ...this.queryParams},
|
||||
`配件新购到货_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.image-type {
|
||||
/* 旋转图片 */
|
||||
transform: rotate(-90deg);
|
||||
/* 确保旋转后的图片不会超出容器 */
|
||||
max-width: 100%;
|
||||
/* 保持图片的宽高比 */
|
||||
width: 40px;
|
||||
height: 80px;
|
||||
}
|
||||
.sign-type{
|
||||
width: 80px;
|
||||
height: 40px;
|
||||
}
|
||||
.uploadImg {
|
||||
padding-top: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.deviceCode {
|
||||
margin-top: 10px;
|
||||
padding-bottom: 20px;
|
||||
font-size: 18px;
|
||||
}
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
//隐藏图片上传框的css
|
||||
::v-deep.disabled {
|
||||
.el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.part_task_status" :value="scope.row.status"/>
|
||||
<dict-tag :options="dict.type.purchase_task_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ import { getToken } from '@/utils/auth'
|
|||
|
||||
export default {
|
||||
name: 'AddTools',
|
||||
dicts: ['part_task_status'],
|
||||
dicts: ['purchase_task_status'],
|
||||
// components: { Treeselect, HoldingpoleDialog },
|
||||
props: {
|
||||
isEdit: {
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@
|
|||
prop="remark"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="操作" align="center" width="230">
|
||||
<el-table-column label="操作" align="center" width="230" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
|
|
@ -198,10 +198,14 @@
|
|||
v-hasPermi="['purchase:info:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button size="mini" style="margin-bottom: 10px" type="success"
|
||||
v-if="scope.row.taskStatusName == '未完成'"
|
||||
@click="handleNotice(scope.row)"
|
||||
>通知</el-button>
|
||||
|
||||
<el-button size="mini" type="warning" @click="handlePrint(scope.row)"
|
||||
v-if="scope.row.taskStatusName == '已完成'"
|
||||
>入库单</el-button
|
||||
>验收单</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
|
|
@ -237,7 +241,7 @@
|
|||
class="title"
|
||||
style="text-align: center; font-weight: 600; font-size: 16px"
|
||||
>
|
||||
机具配件到货入库单
|
||||
机具配件到货验收单
|
||||
</div>
|
||||
<div
|
||||
class="info"
|
||||
|
|
@ -302,8 +306,8 @@
|
|||
prop="partName"
|
||||
/>
|
||||
<el-table-column label="单位" align="center" prop="unitName" />
|
||||
<el-table-column label="采购数量" align="center" prop="purchaseNum" />
|
||||
<!-- <el-table-column label="验收情况" align="center">
|
||||
<!-- <el-table-column label="采购数量" align="center" prop="purchaseNum" /> -->
|
||||
<el-table-column label="验收情况" align="center">
|
||||
<el-table-column
|
||||
label="到货数量"
|
||||
align="center"
|
||||
|
|
@ -312,45 +316,40 @@
|
|||
<el-table-column
|
||||
label="验收结论"
|
||||
align="center"
|
||||
prop="purchaseNum"
|
||||
prop="checkResult"
|
||||
/>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="unitName" /> -->
|
||||
</el-table>
|
||||
|
||||
<div
|
||||
class="fillIn"
|
||||
style="
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<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 class="fillIn" style="margin-top: 20px;display: flex;justify-content: space-between;" >
|
||||
<div class="item" style="width: 33%;display: flex;align-items: center;">
|
||||
<div style="width: 25%;">供应科:</div>
|
||||
<div style="width: 75%;display: flex;align-items: center;flex-wrap: wrap;" v-if="printDataSign.gySignUrl">
|
||||
<div v-for="(sign, index) in printDataSign.gySignUrl" :key="index" style="width: 35%;margin-left: 5px;">
|
||||
<img :src="sign.signUrl" :class="sign.signType=='0' ? 'image-type':'sign-type'" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>库管班:</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" style="width: 33%;display: flex;align-items: center;">
|
||||
<div style="width: 30%;">生产技术科:</div>
|
||||
<div style="width: 70%;display: flex;align-items: center;flex-wrap: wrap;" v-if="printDataSign.scSignUrl">
|
||||
<div v-for="(sign, index) in printDataSign.scSignUrl" :key="index" style="width: 35%;margin-left: 5px;">
|
||||
<img :src="sign.signUrl" :class="sign.signType=='0' ? 'image-type':'sign-type'" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" style="width: 33%;display: flex;align-items: center;">
|
||||
<div style="width: 25%;">库管班:</div>
|
||||
<div style="width: 75%;display: flex;align-items: center;flex-wrap: wrap;" v-if="printDataSign.kgSignUrl">
|
||||
<div v-for="(sign, index) in printDataSign.kgSignUrl" :key="index" style="width: 35%;margin-left: 5px;">
|
||||
<img :src="sign.signUrl" :class="sign.signType=='0' ? 'image-type':'sign-type'" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<span>库管班:{{printData.warehouseTeam}}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </vue-easy-print> -->
|
||||
|
|
@ -362,10 +361,74 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 通知弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="showPeople" width="800px" append-to-body @close="cancel">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form :model="form" ref="form" size="small" :inline="true" :rules="rules">
|
||||
<el-form-item label="通知内容:" prop="remark" label-width="100px">
|
||||
<el-input v-model="form.remark" type="textarea" maxlength="100" :autosize="{ minRows: 3, maxRows: 6 }" placeholder="请输入通知内容" style="width: 450px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="getListPeople" width="600px" height="450" @selection-change="handleSelectionUser">
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"/>
|
||||
<el-table-column label="人员名称" align="center" prop="userName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="所属机构" align="center" prop="deptName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="角色" align="center" prop="roleName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="联系电话" align="center" prop="telphone" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="danger"
|
||||
@click="handleDeletePeople(scope.row)" >删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<el-button type="primary" @click="addUserOpen">人员添加</el-button>
|
||||
<el-button type="primary" @click="configNotice">发起验收</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 人员添加 -->
|
||||
<el-dialog title="人员添加" :visible.sync="peopleOpen" v-if="peopleOpen" width="1000px" append-to-body>
|
||||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionAddUser" height="450">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column label="人员账号" align="center" key="userName" prop="userName" width="120" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="人员名称" align="center" key="nickName" prop="nickName" width="120" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="所属机构" align="center" key="deptName" prop="deptName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="角色" align="center" key="roleName" prop="roleName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="联系电话" align="center" key="telphone" prop="telphone"/>
|
||||
<!-- <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope" v-if="scope.row.userId !== 1">
|
||||
<el-button size="mini" type="text" icon="el-icon-plus" @click="addUser(scope.row)"
|
||||
>添加</el-button>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<el-button type="primary" @click="addUser">添加</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getPurchaseCheckInfo,
|
||||
getAcceptanceForm,
|
||||
purchaseCheckInfoRemove,
|
||||
getNoticePeople,
|
||||
getListUnSelected,
|
||||
addNoticeUser,
|
||||
bmNoticeInfo,
|
||||
delPeople,
|
||||
} from "@/api/purchase/goodsArrived";
|
||||
import { getListNewBuy, deletePartInfo, getInBoundForm } from '@/api/part/partArrived';
|
||||
import vueEasyPrint from "vue-easy-print";
|
||||
import printJS from 'print-js';
|
||||
|
|
@ -430,6 +493,7 @@ export default {
|
|||
},
|
||||
openPrint: false,
|
||||
printData: {},
|
||||
printDataSign: {},
|
||||
printTableData: [],
|
||||
// 供应商
|
||||
supplierStr: "",
|
||||
|
|
@ -439,6 +503,8 @@ export default {
|
|||
{ value: '1', label: '李四' },
|
||||
{ value: '2', label: '王五' },
|
||||
],
|
||||
showPeople: false,
|
||||
peopleOpen: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -523,6 +589,7 @@ export default {
|
|||
//获取入库单数据
|
||||
getPrintTable(params) {
|
||||
getInBoundForm({ id: params.id,taskId:params.taskId }).then((response) => {
|
||||
this.printDataSign = response.data;
|
||||
this.printData = response.data.partTypeCheckInfo;
|
||||
this.printTableData = response.data.partTypeCheckDetailsList;
|
||||
|
||||
|
|
@ -532,7 +599,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,
|
||||
|
|
@ -573,6 +640,128 @@ export default {
|
|||
`配件新购到货__${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
|
||||
//----消息通知
|
||||
getNowTime() {
|
||||
var today = new Date();
|
||||
var year = today.getFullYear(); //获取年份
|
||||
var month = today.getMonth() + 1; //获取月份
|
||||
var day = today.getDate(); //获取日期
|
||||
return year + "-" + month + "-" + day;
|
||||
},
|
||||
|
||||
handleNotice(row) {
|
||||
this.reset();
|
||||
this.form.taskId = row.taskId;
|
||||
this.$set(
|
||||
this.form,
|
||||
"remark",
|
||||
"各位同事您好,请于" +
|
||||
this.getNowTime() +
|
||||
"在宏源工业园,进行"+row.purchaseMaTypeName+"验收。"
|
||||
);
|
||||
this.getNoticeList();
|
||||
this.showPeople = true;
|
||||
},
|
||||
getNoticeList() {
|
||||
const taskId = this.form.taskId;
|
||||
getNoticePeople({ taskId: taskId }).then((response) => {
|
||||
this.getListPeople = response.rows;
|
||||
this.showPeople = true;
|
||||
this.loadingTwo = false;
|
||||
this.title = "通知";
|
||||
});
|
||||
},
|
||||
addUserOpen() {
|
||||
this.getAllUserList();
|
||||
this.peopleOpen = true;
|
||||
},
|
||||
/** 查询所有用户列表--可添加人员 */
|
||||
getAllUserList() {
|
||||
getListUnSelected().then((response) => {
|
||||
this.userList = response.rows;
|
||||
});
|
||||
},
|
||||
|
||||
// 多选框选中-添加人员
|
||||
handleSelectionAddUser(selection) {
|
||||
// console.log(selection)
|
||||
this.chosenUserList = selection;
|
||||
},
|
||||
//添加人员
|
||||
addUser() {
|
||||
if (this.chosenUserList.length < 1) {
|
||||
this.$message.error("请选择人员!");
|
||||
return;
|
||||
}
|
||||
// console.log(this.chosenUserList,"chosenUserList")
|
||||
addNoticeUser(this.chosenUserList).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.getNoticeList();
|
||||
this.peopleOpen = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleDeletePeople(row) {
|
||||
const ids = row.id;
|
||||
this.$modal
|
||||
.confirm("是否删除所选择的通知人员?")
|
||||
.then(function () {
|
||||
return delPeople(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getNoticeList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 多选框选中-通知人员
|
||||
handleSelectionUser(selection) {
|
||||
// console.log(selection)
|
||||
this.configUserList = selection;
|
||||
},
|
||||
//确认消息通知
|
||||
configNotice() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.configUserList.forEach((item, index) => {
|
||||
console.log(item);
|
||||
// item.telphone = item.telphone
|
||||
// item.remark = this.form.remark
|
||||
this.phoneNumbers.push(item.telphone);
|
||||
});
|
||||
let param = {
|
||||
taskId: this.form.taskId,
|
||||
phoneNumbers: this.phoneNumbers,
|
||||
content: this.form.remark,
|
||||
isPartFlag: 0,
|
||||
};
|
||||
if (this.configUserList.length > 0) {
|
||||
bmNoticeInfo(param).then((response) => {
|
||||
console.log(response);
|
||||
if (response.code == 200) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
});
|
||||
this.showPeople = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: "请选择通知人员!",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 人员取消按钮
|
||||
cancel() {
|
||||
this.showPeople = false;
|
||||
this.reset();
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
@ -593,4 +782,17 @@ export default {
|
|||
width: 70px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.image-type {
|
||||
/* 旋转图片 */
|
||||
transform: rotate(-90deg);
|
||||
/* 确保旋转后的图片不会超出容器 */
|
||||
max-width: 100%;
|
||||
/* 保持图片的宽高比 */
|
||||
width: 40px;
|
||||
height: 80px;
|
||||
}
|
||||
.sign-type{
|
||||
width: 80px;
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.part_task_status" :value="scope.row.status"/>
|
||||
<dict-tag :options="dict.type.purchase_task_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -147,7 +147,7 @@ import { uploadPurchaseFile, } from "@/api/purchase/goodsAccept";
|
|||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: 'QueryTools',
|
||||
dicts: ['part_task_status'],
|
||||
dicts: ['purchase_task_status'],
|
||||
components: {
|
||||
// UploadImg,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue