新购管理
This commit is contained in:
parent
4ddcabaef0
commit
3f57f7b93f
|
|
@ -0,0 +1,63 @@
|
|||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from '@/utils/bonus'
|
||||
// 查询新购验收任务列表
|
||||
export function getPurchaseList(query) {
|
||||
return request({
|
||||
url: '/material/purchase_check_info/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询新购验收任务详细列表
|
||||
export function getPurchaseDetailsList(query) {
|
||||
return request({
|
||||
url: '/material/purchase_check_info/getInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 外层批量验收合格API
|
||||
export function acceptancePurchase(data) {
|
||||
return request({
|
||||
url: '/material/purchase_check_info/acceptance',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//根据任务id查询报告附件
|
||||
export function getPurchaseFileList(query) {
|
||||
return request({
|
||||
url: '/material/purchase_check_details/fileList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 上传报告附件 - 异步
|
||||
export function uploadPurchaseFile(data) {
|
||||
return request({
|
||||
url: '/material/purchase_check_details/uploadFile',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询新购验收任务详细列表
|
||||
export function getPurchaseCheckFormByTaskId(taskId) {
|
||||
return request({
|
||||
url: '/material/purchase_check_info/getPurchaseCheckFormByTaskId/'+taskId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -16,6 +16,7 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="head-container" style>
|
||||
<div class="grid-content bg-purple-dark" align="left">组织人员树</div>
|
||||
<el-tree
|
||||
style="height: 700px; overflow: scroll"
|
||||
:data="treeOptions"
|
||||
|
|
@ -46,6 +47,7 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="head-container" style>
|
||||
<div class="grid-content bg-purple-dark" align="left">物资类型树</div>
|
||||
<el-tree
|
||||
style="height: 700px; overflow: scroll"
|
||||
:data="treeOptionsTwo"
|
||||
|
|
@ -141,8 +143,6 @@
|
|||
row-key="typeId"
|
||||
default-expand-all
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
@select="selectTr"
|
||||
@select-all="handleSelectAll"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
|
|
@ -219,6 +219,14 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
|
@ -317,6 +325,8 @@ export default {
|
|||
queryParams: {
|
||||
typeName: undefined,
|
||||
level: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
// phonenumber: undefined,
|
||||
// status: undefined,
|
||||
// typeId: undefined
|
||||
|
|
@ -481,7 +491,8 @@ export default {
|
|||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
// this.queryParams.pageNum = 1;
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
|
|
@ -517,6 +528,13 @@ export default {
|
|||
this.multiple = !selection.length;
|
||||
|
||||
},
|
||||
|
||||
// //单选操作-跨页
|
||||
// handlerSelect(val, row) {
|
||||
// this.ids.indexOf(row.deviceCode) === -1
|
||||
// ? this.currentSelection.push(row.deviceCode)
|
||||
// : this.currentSelection.splice(this.currentSelection.indexOf(row.deviceCode), 1)
|
||||
// },
|
||||
handleSelect(selection, row) {
|
||||
this.toggleSelection(selection, row);
|
||||
},
|
||||
|
|
@ -527,49 +545,49 @@ export default {
|
|||
|
||||
},
|
||||
|
||||
//选择某行
|
||||
selectTr(selection,row){
|
||||
this.$set(row,'isChecked',!row.isChecked);
|
||||
this.$nextTick(()=>{
|
||||
this.isAllSelect = row.isChecked;
|
||||
this.toggleSelect(row,row.isChecked,'tr');
|
||||
});
|
||||
},
|
||||
// //选择某行
|
||||
// selectTr(selection,row){
|
||||
// this.$set(row,'isChecked',!row.isChecked);
|
||||
// this.$nextTick(()=>{
|
||||
// this.isAllSelect = row.isChecked;
|
||||
// this.toggleSelect(row,row.isChecked,'tr');
|
||||
// });
|
||||
// },
|
||||
|
||||
//递归子级
|
||||
toggleSelect(data,flag,type){
|
||||
if(type === 'all'){
|
||||
if(data.length > 0){
|
||||
data.forEach(item=>{
|
||||
this.toggleSelection(item, flag);
|
||||
if(item.children && item.children.length > 0){
|
||||
this.toggleSelect(item.children,flag,type)
|
||||
}
|
||||
})
|
||||
}
|
||||
}else {
|
||||
if(data.children && data.children.length > 0){
|
||||
data.children.forEach(item =>{
|
||||
item.isChecked = !item.isChecked;
|
||||
this.$refs.multipleTable.toggleRowSelection(item, flag);
|
||||
this.toggleSelect(item,flag,type);
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
// //递归子级
|
||||
// toggleSelect(data,flag,type){
|
||||
// if(type === 'all'){
|
||||
// if(data.length > 0){
|
||||
// data.forEach(item=>{
|
||||
// this.toggleSelection(item, flag);
|
||||
// if(item.children && item.children.length > 0){
|
||||
// this.toggleSelect(item.children,flag,type)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }else {
|
||||
// if(data.children && data.children.length > 0){
|
||||
// data.children.forEach(item =>{
|
||||
// item.isChecked = !item.isChecked;
|
||||
// this.$refs.multipleTable.toggleRowSelection(item, flag);
|
||||
// this.toggleSelect(item,flag,type);
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
|
||||
|
||||
//改变选中
|
||||
toggleSelection(row, flag) {
|
||||
this.$set(row,'isChecked',flag);
|
||||
this.$nextTick(()=>{
|
||||
if (flag) {
|
||||
this.$refs.multipleTable.toggleRowSelection(row, flag);
|
||||
} else {
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
}
|
||||
});
|
||||
},
|
||||
// //改变选中
|
||||
// toggleSelection(row, flag) {
|
||||
// this.$set(row,'isChecked',flag);
|
||||
// this.$nextTick(()=>{
|
||||
// if (flag) {
|
||||
// this.$refs.multipleTable.toggleRowSelection(row, flag);
|
||||
// } else {
|
||||
// this.$refs.multipleTable.clearSelection();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
|
||||
|
||||
/** 绑定按钮操作 */
|
||||
|
|
@ -596,6 +614,7 @@ export default {
|
|||
this.$modal.msgSuccess("绑定成功");
|
||||
this.ids = null;
|
||||
this.userList = null;
|
||||
this.userIdTemp = -1
|
||||
this.getTreeData();
|
||||
this.getList();
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
|
|
@ -720,6 +739,13 @@ export default {
|
|||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.grid-content {
|
||||
border-radius: 4px;
|
||||
min-height: 24px;
|
||||
}
|
||||
.bg-purple-dark {
|
||||
background: #e5e9f2;
|
||||
}
|
||||
|
||||
::v-deep .el-tree .el-tree-node__expand-icon.expanded {
|
||||
-webkit-transform: rotate(0deg);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,372 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||
<el-form-item label="类型规格:" prop="typeId" >
|
||||
<el-select v-model="queryParams.typeId" 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 HH:mm:ss"
|
||||
type="datetime">
|
||||
</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="success"
|
||||
icon="el-icon-check" v-show="!isView"
|
||||
size="mini" :disabled="multiple"
|
||||
>合格</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
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="teamId" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" v-if="!isView"/>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="物资名称" align="center" prop="maTypeName" />
|
||||
<el-table-column label="规格型号" align="center" prop="typeName" />
|
||||
<el-table-column label="单位" align="center" prop="unitName"/>
|
||||
<el-table-column label="采购数量" align="center" prop="purchaseNum" />
|
||||
<el-table-column label="购置单价(元含税)" align="center" prop="purchasePrice" />
|
||||
<el-table-column label="购置单价(元不含税)" align="center" prop="purchasePrice" />
|
||||
|
||||
<el-table-column label="供应商" align="center" prop="supplierName" />
|
||||
<el-table-column label="出厂日期" align="center" prop="productionTime" />
|
||||
<el-table-column label="相关配套资料" align="center" prop="">
|
||||
<template slot-scope="scope">
|
||||
<div style="color: rgb(2, 167, 240);cursor: pointer;" @click="openFileDialog(scope.row)">报告管理</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="验收结论" align="center" prop="checkResult" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="success">
|
||||
合格
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger">
|
||||
不合格
|
||||
</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="报告管理" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-table v-loading="dialogLoading" :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="fileName" :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.typeName}}</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: space-between;">
|
||||
<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="picturePreview(scope.row)" v-if="scope.row.fileUrl">
|
||||
查看
|
||||
</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>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDeviceType} from "@/api/ma/device";
|
||||
import { getManufacturerSelect} from "@/api/ma/supplier";
|
||||
import { getPurchaseDetailsList,getPurchaseFileList,uploadPurchaseFile } from "@/api/purchase/goodsAccept";
|
||||
import { downloadFile } from '@/utils/download'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: "GoodsAcceptDetail",
|
||||
data() {
|
||||
return {
|
||||
Id:'',
|
||||
taskId:'',
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
dialogLoading: false,
|
||||
isView: false,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showHouse: false,
|
||||
materialModelList:[],//规格型号下拉
|
||||
supplierList:[],//厂家下拉
|
||||
ids:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
//表格数据
|
||||
tableList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
rowData:{},
|
||||
fileDataList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
typeId:undefined,
|
||||
supplierId:undefined,
|
||||
productionTime:undefined,
|
||||
},
|
||||
//图片查看弹窗
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
//上传
|
||||
upload: {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/file/upload'
|
||||
},
|
||||
};
|
||||
},
|
||||
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.getDeviceType()
|
||||
this.getSupplierList()
|
||||
|
||||
console.log(this.isView)
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 返回列表页
|
||||
jumpList() {
|
||||
const obj = { path: '/purchase/goodsAccept' }
|
||||
this.$tab.closeOpenPage(obj)
|
||||
},
|
||||
getDeviceType(){
|
||||
getDeviceType({level:4}).then(response => {
|
||||
let matModelRes = response.data;
|
||||
this.materialModelList = matModelRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId,
|
||||
};
|
||||
});
|
||||
});
|
||||
},
|
||||
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
|
||||
getPurchaseDetailsList(this.queryParams).then(response => {
|
||||
this.tableList = response.data.purchaseCheckDetailsList;
|
||||
// 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.map(item => item.id)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
//文件管理
|
||||
openFileDialog(row){
|
||||
this.rowData=row;
|
||||
this.getFileData()
|
||||
this.open=true
|
||||
},
|
||||
getFileData(){
|
||||
let param = {
|
||||
typeId:this.rowData.typeId,
|
||||
taskId:this.rowData.taskId
|
||||
}
|
||||
this.dialogLoading=true
|
||||
getPurchaseFileList(param).then((response) => {
|
||||
this.fileDataList=response.data
|
||||
this.dialogLoading = false;
|
||||
}).catch(() => {this.dialogLoading = false;})
|
||||
},
|
||||
beforeFileUpload(row){
|
||||
this.rowData.dictCode=row.dictCode;
|
||||
this.rowData.dictLabel=row.dictLabel;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if(response.code==200){
|
||||
let param = {
|
||||
"id": this.Id,
|
||||
"taskId": this.taskId,
|
||||
"fileName": response.data.name,
|
||||
"fileUrl": response.data.url,
|
||||
"typeId": this.rowData.typeId,
|
||||
"dictCode": this.rowData.dictCode,
|
||||
"dictLabel": this.rowData.dictLabel,
|
||||
"modelId": this.rowData.typeId,
|
||||
"createBy": ""
|
||||
}
|
||||
console.log(param)
|
||||
uploadPurchaseFile(param).then((response) => {
|
||||
this.$modal.msgSuccess('上传成功')
|
||||
this.getFileData()
|
||||
}).catch(() => {
|
||||
this.$modal.msgError('上传失败')
|
||||
})
|
||||
}
|
||||
},
|
||||
//图片查看
|
||||
picturePreview(file) {
|
||||
this.dialogImageUrl = file.fileUrl;
|
||||
const parts = file.fileName.split('.');
|
||||
const extension = parts.pop();
|
||||
if(extension === 'doc'||extension === 'docx'||extension === 'pdf'){
|
||||
const windowName = file.fileName;
|
||||
window.open(file.fileUrl,windowName)
|
||||
}else{
|
||||
this.dialogVisible = true
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</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,467 @@
|
|||
<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="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
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 v-model="queryParams.taskStatus" placeholder="请选择任务状态" clearable>
|
||||
<el-option
|
||||
v-for="item in taskStatusList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</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="success" plain
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="acceptancePurchase"
|
||||
>
|
||||
验收合格
|
||||
</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-row>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="teamId" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
|
||||
<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" />
|
||||
<el-table-column label="采购单号" align="center" prop="code" />
|
||||
<el-table-column label="采购物资" align="center" prop="purchaseMaTypeName" />
|
||||
<el-table-column label="采购数量" align="center" prop="purchaseMaNumber" />
|
||||
<el-table-column label="采购价格(元含税)" align="center" prop="purchaseTaxPrice" width="80"/>
|
||||
<el-table-column label="采购价格(元不含税)" align="center" prop="purchaseNoTaxPrice" width="98"/>
|
||||
<el-table-column label="税率" align="center" prop="taxRate" />
|
||||
<el-table-column label="操作人" align="center" prop="createUserName" />
|
||||
<el-table-column label="操作时间" align="center" prop="createTime" />
|
||||
<el-table-column label="状态" align="center" prop="taskStatus">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.taskStatus==0">待提交</span>
|
||||
<span v-if="scope.row.taskStatus==1">待通知</span>
|
||||
<span v-if="scope.row.taskStatus==2">待验收</span>
|
||||
<span v-if="scope.row.taskStatus==3">待绑定</span>
|
||||
<span v-if="scope.row.taskStatus==4">待入库</span>
|
||||
<span v-if="scope.row.taskStatus==5">已完成</span>
|
||||
<span v-if="scope.row.taskStatus==6">驳回待验收</span>
|
||||
<span v-if="scope.row.taskStatus==7">驳回待绑定</span>
|
||||
<span v-if="scope.row.taskStatus==8">驳回待入库</span>
|
||||
<span v-if="scope.row.taskStatus==9">入库进行中</span>
|
||||
<span v-if="scope.row.taskStatus==10">未完成</span>
|
||||
<span v-else>/</span>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleView(scope.row)"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@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="1100px"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 500px; overflow-y: scroll">
|
||||
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
|
||||
<div
|
||||
class="title"
|
||||
style="
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
"
|
||||
>
|
||||
机具设备到货验收单
|
||||
</div>
|
||||
<div
|
||||
class="info"
|
||||
style="margin-top: 10px; display: flex; flex-wrap: wrap"
|
||||
>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>单据编号:{{printData.code}}</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>生产厂家(供应商):{{printData.supplierName}}</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>到货日期:{{printData.arrivalDate}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<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" />-->
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
row=2
|
||||
/>
|
||||
<el-table-column
|
||||
label="物资名称"
|
||||
align="center"
|
||||
prop="maTypeName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
prop="unitName"
|
||||
/>
|
||||
<el-table-column label="配送信息" align="center">
|
||||
<el-table-column
|
||||
label="采购数量"
|
||||
align="center"
|
||||
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"
|
||||
/>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
prop="remark"
|
||||
/>
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="合格证及技术资料"-->
|
||||
<!-- align="center"-->
|
||||
<!-- prop=""-->
|
||||
<!-- />-->
|
||||
<!-- <el-table-column label="包装" align="center" prop="" />-->
|
||||
</el-table>
|
||||
|
||||
<div
|
||||
class="fillIn"
|
||||
style="
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>供应科:{{printData.supplyDept}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>生产技术科:{{printData.productionTechDept}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>库管班:{{printData.warehouseTeam}}</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>
|
||||
|
||||
<script>
|
||||
import { getPurchaseList,acceptancePurchase,getPurchaseCheckFormByTaskId } from "@/api/purchase/goodsAccept";
|
||||
import { downloadFile } from '@/utils/download'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: "GoodsAcceptList",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showHouse: false,
|
||||
dateRange:[],
|
||||
taskStatusList:[{id:'1',name:'待验收'},{id:'2',name:'验收合格'},{id:'3',name:'验收未通过'}],
|
||||
ids:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
//表格数据
|
||||
tableList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord:undefined,
|
||||
taskStatus:undefined,
|
||||
},
|
||||
openPrint: false,
|
||||
printData: {},
|
||||
printTableData: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
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
|
||||
}
|
||||
this.queryParams.modelName="新购验收"
|
||||
getPurchaseList(this.queryParams).then(response => {
|
||||
this.tableList = response.rows;
|
||||
this.total = response.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.id)
|
||||
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: '/purchase/goodsAcceptDetail',
|
||||
query,
|
||||
})
|
||||
},
|
||||
//查看
|
||||
handleView(row){
|
||||
console.log(row)
|
||||
let query = { Id:row.id,taskId: row.taskId,isView:"true" }
|
||||
this.$tab.closeOpenPage({
|
||||
path: '/purchase/goodsAcceptDetail',
|
||||
query,
|
||||
})
|
||||
},
|
||||
//批量合格
|
||||
acceptancePurchase(){
|
||||
acceptancePurchase(this.ids).then((response) => {
|
||||
this.$modal.msgSuccess('操作成功')
|
||||
this.getList()
|
||||
}).catch(() => {
|
||||
this.$modal.msgError('操作失败')
|
||||
})
|
||||
},
|
||||
//查看验收单
|
||||
handlePrint(row) {
|
||||
// this.query.taskId = row.taskId
|
||||
this.getPrintTable(row.taskId)
|
||||
this.openPrint = true
|
||||
this.title = '新购工机具验收单'
|
||||
},
|
||||
//获取验收单数据
|
||||
getPrintTable(taskId) {
|
||||
getPurchaseCheckFormByTaskId(taskId).then((response) => {
|
||||
this.printData = response.data
|
||||
this.printTableData = response.data.materialList
|
||||
// let supplierList = []
|
||||
// this.printTableData.forEach((e) => {
|
||||
// if (e.supplier) {
|
||||
// supplierList.push(e.supplier)
|
||||
// }
|
||||
// })
|
||||
// supplierList = [...new Set(supplierList)]
|
||||
// this.supplierStr = supplierList.join(',')
|
||||
})
|
||||
},
|
||||
//打印
|
||||
print() {
|
||||
this.$refs.remarksPrintRef.print()
|
||||
},
|
||||
|
||||
|
||||
handleExport() {
|
||||
// this.download('/material/ma_machine/export', {
|
||||
// ...this.queryParams
|
||||
// }, `仓库管理_${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,250 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||
<el-form-item label="类型规格:" prop="typeId" >
|
||||
<el-select v-model="queryParams.typeId" 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 HH:mm:ss"
|
||||
type="datetime">
|
||||
</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="success"
|
||||
icon="el-icon-check" v-show="!isView"
|
||||
size="mini" :disabled="multiple"
|
||||
>合格</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
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="teamId" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" v-if="!isView"/>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="物资名称" align="center" prop="maTypeName" />
|
||||
<el-table-column label="规格型号" align="center" prop="typeName" />
|
||||
<el-table-column label="单位" align="center" prop="unitName"/>
|
||||
<el-table-column label="采购数量" align="center" prop="purchaseNum" />
|
||||
<el-table-column label="购置单价(元含税)" align="center" prop="purchasePrice" />
|
||||
<el-table-column label="购置单价(元不含税)" align="center" prop="purchasePrice" />
|
||||
<el-table-column label="供应商" align="center" prop="supplierName" />
|
||||
<el-table-column label="出厂日期" align="center" prop="productionTime" />
|
||||
<el-table-column label="相关配套资料" align="center" prop="" />
|
||||
<el-table-column label="验收结论" align="center" prop="checkResult" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="success">
|
||||
合格
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger">
|
||||
不合格
|
||||
</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"
|
||||
/> -->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDeviceType} from "@/api/ma/device";
|
||||
import { getManufacturerSelect} from "@/api/ma/supplier";
|
||||
import { getPurchaseDetailsList } from "@/api/purchase/goodsAccept";
|
||||
import { downloadFile } from '@/utils/download'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: "GoodsAcceptDetail",
|
||||
data() {
|
||||
return {
|
||||
Id:'',
|
||||
taskId:'',
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
isView: false,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showHouse: false,
|
||||
materialModelList:[],//规格型号下拉
|
||||
supplierList:[],//厂家下拉
|
||||
ids:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
//表格数据
|
||||
tableList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
rowData:{},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
typeId:undefined,
|
||||
supplierId:undefined,
|
||||
productionTime:undefined,
|
||||
},
|
||||
};
|
||||
},
|
||||
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.getDeviceType()
|
||||
this.getSupplierList()
|
||||
console.log(this.isView)
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 返回列表页
|
||||
jumpList() {
|
||||
const obj = { path: '/purchase/goodsEntry' }
|
||||
this.$tab.closeOpenPage(obj)
|
||||
},
|
||||
getDeviceType(){
|
||||
getDeviceType({level:4}).then(response => {
|
||||
let matModelRes = response.data;
|
||||
this.materialModelList = matModelRes.map((item) => {
|
||||
return {
|
||||
label: item.typeName,
|
||||
value: item.typeId,
|
||||
};
|
||||
});
|
||||
});
|
||||
},
|
||||
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
|
||||
getPurchaseDetailsList(this.queryParams).then(response => {
|
||||
this.tableList = response.data.purchaseCheckDetailsList;
|
||||
// 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.map(item => item.id)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</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,250 @@
|
|||
<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="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
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 v-model="queryParams.taskStatus" placeholder="请选择任务状态" clearable>
|
||||
<el-option
|
||||
v-for="item in taskStatusList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</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="success"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
>
|
||||
入库
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
>
|
||||
驳回
|
||||
</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-row>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="teamId" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
|
||||
<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" />
|
||||
<el-table-column label="采购单号" align="center" prop="code" />
|
||||
<el-table-column label="采购物资" align="center" prop="purchaseMaTypeName" />
|
||||
<el-table-column label="采购数量" align="center" prop="purchaseMaNumber" />
|
||||
<el-table-column label="采购价格(元含税)" align="center" prop="purchaseTaxPrice" width="80"/>
|
||||
<el-table-column label="采购价格(元不含税)" align="center" prop="purchaseNoTaxPrice" width="98"/>
|
||||
<el-table-column label="税率" align="center" prop="taxRate" />
|
||||
<el-table-column label="创建人" align="center" prop="createUserName" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="状态" align="center" prop="taskStatus">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.taskStatus==0">待提交</span>
|
||||
<span v-if="scope.row.taskStatus==1">待通知</span>
|
||||
<span v-if="scope.row.taskStatus==2">待验收</span>
|
||||
<span v-if="scope.row.taskStatus==3">待绑定</span>
|
||||
<span v-if="scope.row.taskStatus==4">待入库</span>
|
||||
<span v-if="scope.row.taskStatus==5">已完成</span>
|
||||
<span v-if="scope.row.taskStatus==6">驳回待验收</span>
|
||||
<span v-if="scope.row.taskStatus==7">驳回待绑定</span>
|
||||
<span v-if="scope.row.taskStatus==8">驳回待入库</span>
|
||||
<span v-if="scope.row.taskStatus==9">入库进行中</span>
|
||||
<span v-if="scope.row.taskStatus==10">未完成</span>
|
||||
<span v-else>/</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini"
|
||||
@click="handleView(scope.row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" type="success"
|
||||
@click="handleUpdate(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"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPurchaseList } from "@/api/purchase/goodsAccept";
|
||||
import { downloadFile } from '@/utils/download'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: "GoodsAcceptList",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showHouse: false,
|
||||
dateRange:[],
|
||||
taskStatusList:[{id:'1',name:'待验收'},{id:'2',name:'验收合格'},{id:'3',name:'验收未通过'}],
|
||||
ids:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
//表格数据
|
||||
tableList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord:undefined,
|
||||
taskStatus:undefined,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
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
|
||||
}
|
||||
this.queryParams.modelName="新购入库"
|
||||
getPurchaseList(this.queryParams).then(response => {
|
||||
this.tableList = response.rows;
|
||||
this.total = response.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.id)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleUpdate(row){
|
||||
console.log(row)
|
||||
|
||||
},
|
||||
|
||||
handleView(row){
|
||||
console.log(row)
|
||||
let query = { Id:row.id,taskId: row.taskId,isView:"true" }
|
||||
this.$tab.closeOpenPage({
|
||||
path: '/purchase/goodsEntryDetail',
|
||||
query,
|
||||
})
|
||||
},
|
||||
handleExport() {
|
||||
// this.download('/material/ma_machine/export', {
|
||||
// ...this.queryParams
|
||||
// }, `仓库管理_${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>
|
||||
Loading…
Reference in New Issue