新购验收
This commit is contained in:
parent
e710cbdac0
commit
4d5b66281e
|
|
@ -19,10 +19,19 @@ export function getPurchaseDetailsList(query) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 外层批量验收合格API
|
// 外层批量验收合格API
|
||||||
export function acceptancePurchase(data) {
|
export function acceptOuterVerify(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/material/purchase_check_info/acceptance',
|
url: '/material/purchase_check_info/outerVerify',
|
||||||
method: 'post',
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 内层批量验收合格API
|
||||||
|
export function acceptInnerVerifyer(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/purchase_check_info/innerVerify',
|
||||||
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -380,7 +380,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDeviceType(){
|
getDeviceType(){
|
||||||
getDeviceType({level:2}).then(response => {
|
getDeviceType({level:2,skipPermission:1}).then(response => {
|
||||||
let matTypeRes = response.data;
|
let matTypeRes = response.data;
|
||||||
this.materialTypeList = matTypeRes.map((item) => {
|
this.materialTypeList = matTypeRes.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -389,7 +389,7 @@
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
getDeviceType({level:3}).then(response => {
|
getDeviceType({level:3,skipPermission:1}).then(response => {
|
||||||
let matNameRes = response.data;
|
let matNameRes = response.data;
|
||||||
this.materialNameList = matNameRes.map((item) => {
|
this.materialNameList = matNameRes.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -398,7 +398,7 @@
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
getDeviceType({level:4}).then(response => {
|
getDeviceType({level:4,skipPermission:1}).then(response => {
|
||||||
let matModelRes = response.data;
|
let matModelRes = response.data;
|
||||||
this.materialModelList = matModelRes.map((item) => {
|
this.materialModelList = matModelRes.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|
@ -47,10 +47,13 @@
|
||||||
>新购到货验收</el-button
|
>新购到货验收</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</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-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success" @click="batchPass"
|
||||||
icon="el-icon-check" v-show="!isView"
|
icon="el-icon-check" v-show="!isView"
|
||||||
size="mini" :disabled="multiple"
|
size="mini" :disabled="multiple"
|
||||||
>合格</el-button>
|
>合格</el-button>
|
||||||
|
|
@ -58,17 +61,16 @@
|
||||||
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger" @click="batchReject"
|
||||||
icon="el-icon-close" v-show="!isView"
|
icon="el-icon-close" v-show="!isView"
|
||||||
size="mini" :disabled="multiple"
|
size="mini" :disabled="multiple"
|
||||||
>不合格</el-button>
|
>不合格</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="teamId" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="typeId" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" v-if="!isView"/>
|
<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 label="序号" align="center" width="80" type="index">
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物资名称" align="center" prop="maTypeName" :show-overflow-tooltip="true"/>
|
<el-table-column label="物资名称" align="center" prop="maTypeName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
<el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
||||||
|
|
@ -87,10 +89,10 @@
|
||||||
<el-table-column label="验收结论" align="center" prop="checkResult" :show-overflow-tooltip="true"/>
|
<el-table-column label="验收结论" align="center" prop="checkResult" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="操作" align="center" width="180">
|
<el-table-column label="操作" align="center" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="success">
|
<el-button size="mini" type="success" @click="pass(scope.row)">
|
||||||
合格
|
合格
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="danger">
|
<el-button size="mini" type="danger" @click="reject(scope.row)">
|
||||||
不合格
|
不合格
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -150,14 +152,25 @@
|
||||||
<img width="100%" height="500px" :src="dialogImageUrl" />
|
<img width="100%" height="500px" :src="dialogImageUrl" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 验收弹窗 -->
|
||||||
|
<el-dialog :visible.sync="confirmShow" width="500px" height="300px" >
|
||||||
|
<div style="width: 100%;height: 80%;display: flex;">
|
||||||
|
<div>验收结论</div>
|
||||||
|
<el-input type="textarea" :rows="2" 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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getDeviceType} from "@/api/ma/device";
|
import { getDeviceType} from "@/api/ma/device";
|
||||||
import { getManufacturerSelect} from "@/api/ma/supplier";
|
import { getManufacturerSelect} from "@/api/ma/supplier";
|
||||||
import { getPurchaseDetailsList,getPurchaseFileList,uploadPurchaseFile } from "@/api/purchase/goodsAccept";
|
import { getPurchaseDetailsList,acceptInnerVerifyer,getPurchaseFileList,uploadPurchaseFile } from "@/api/purchase/goodsAccept";
|
||||||
import { downloadFile } from '@/utils/download'
|
import { downloadFile } from '@/utils/download'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -180,6 +193,7 @@
|
||||||
materialModelList:[],//规格型号下拉
|
materialModelList:[],//规格型号下拉
|
||||||
supplierList:[],//厂家下拉
|
supplierList:[],//厂家下拉
|
||||||
ids:[],
|
ids:[],
|
||||||
|
checkList:[],
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
//表格数据
|
//表格数据
|
||||||
|
|
@ -205,6 +219,10 @@
|
||||||
supplierId:undefined,
|
supplierId:undefined,
|
||||||
productionTime:undefined,
|
productionTime:undefined,
|
||||||
},
|
},
|
||||||
|
//确认弹窗
|
||||||
|
confirmShow: false,
|
||||||
|
taskStatus:"",//3合格、1不合格
|
||||||
|
checkResult:"",
|
||||||
//图片查看弹窗
|
//图片查看弹窗
|
||||||
dialogImageUrl: '',
|
dialogImageUrl: '',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
|
@ -215,10 +233,10 @@
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
url: process.env.VUE_APP_BASE_API + '/file/upload'
|
url: process.env.VUE_APP_BASE_API + '/file/upload'
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
const taskId = this.$route.query && this.$route.query.taskId
|
const taskId = this.$route.query && this.$route.query.taskId
|
||||||
const Id = this.$route.query && this.$route.query.Id
|
const Id = this.$route.query && this.$route.query.Id
|
||||||
const isView = this.$route.query && this.$route.query.isView
|
const isView = this.$route.query && this.$route.query.isView
|
||||||
|
|
@ -230,8 +248,7 @@
|
||||||
this.isView=false;
|
this.isView=false;
|
||||||
}
|
}
|
||||||
this.getDeviceType()
|
this.getDeviceType()
|
||||||
this.getSupplierList()
|
// this.getSupplierList()
|
||||||
|
|
||||||
console.log(this.isView)
|
console.log(this.isView)
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
@ -242,7 +259,7 @@
|
||||||
this.$tab.closeOpenPage(obj)
|
this.$tab.closeOpenPage(obj)
|
||||||
},
|
},
|
||||||
getDeviceType(){
|
getDeviceType(){
|
||||||
getDeviceType({level:4}).then(response => {
|
getDeviceType({level:4,skipPermission:1}).then(response => {
|
||||||
let matModelRes = response.data;
|
let matModelRes = response.data;
|
||||||
this.materialModelList = matModelRes.map((item) => {
|
this.materialModelList = matModelRes.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -268,6 +285,7 @@
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.id=this.Id
|
this.queryParams.id=this.Id
|
||||||
this.queryParams.taskId=this.taskId
|
this.queryParams.taskId=this.taskId
|
||||||
|
this.queryParams.taskStatus=2
|
||||||
getPurchaseDetailsList(this.queryParams).then(response => {
|
getPurchaseDetailsList(this.queryParams).then(response => {
|
||||||
this.tableList = response.data.purchaseCheckDetailsList;
|
this.tableList = response.data.purchaseCheckDetailsList;
|
||||||
this.tableList.forEach((item) => {
|
this.tableList.forEach((item) => {
|
||||||
|
|
@ -290,10 +308,85 @@
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection
|
||||||
this.single = selection.length != 1
|
this.single = selection.length != 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
|
//合格
|
||||||
|
pass(row){
|
||||||
|
this.taskStatus='3';
|
||||||
|
this.checkResult="合格";
|
||||||
|
let obj = {
|
||||||
|
taskId:row.taskId,
|
||||||
|
typeId:row.typeId,
|
||||||
|
status:this.taskStatus,
|
||||||
|
checkResult:this.checkResult
|
||||||
|
}
|
||||||
|
this.checkList=[]
|
||||||
|
this.checkList.push(obj)
|
||||||
|
this.confirmShow=true;
|
||||||
|
},
|
||||||
|
//不合格
|
||||||
|
reject(row){
|
||||||
|
this.taskStatus='1';
|
||||||
|
this.checkResult="不合格";
|
||||||
|
let obj = {
|
||||||
|
taskId:row.taskId,
|
||||||
|
typeId:row.typeId,
|
||||||
|
status:this.taskStatus,
|
||||||
|
checkResult:this.checkResult
|
||||||
|
}
|
||||||
|
this.checkList=[]
|
||||||
|
this.checkList.push(obj)
|
||||||
|
this.confirmShow=true;
|
||||||
|
},
|
||||||
|
//批量合格
|
||||||
|
batchPass(){
|
||||||
|
this.taskStatus='3';
|
||||||
|
this.checkResult="合格";
|
||||||
|
this.checkList=[]
|
||||||
|
this.checkList=this.ids.map(item=>{
|
||||||
|
let obj = {
|
||||||
|
taskId:item.taskId,
|
||||||
|
typeId:item.typeId,
|
||||||
|
status:this.taskStatus,
|
||||||
|
checkResult:this.checkResult
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
this.confirmShow=true;
|
||||||
|
},
|
||||||
|
//批量不合格
|
||||||
|
batchReject(){
|
||||||
|
this.taskStatus='1';
|
||||||
|
this.checkResult="不合格";
|
||||||
|
this.checkList=[]
|
||||||
|
this.checkList=this.ids.map(item=>{
|
||||||
|
let obj = {
|
||||||
|
taskId:item.taskId,
|
||||||
|
typeId:item.typeId,
|
||||||
|
status:this.taskStatus,
|
||||||
|
checkResult:this.checkResult
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
this.confirmShow=true;
|
||||||
|
},
|
||||||
|
//验收确认请求
|
||||||
|
confirmCheck(){
|
||||||
|
this.checkList.forEach(item=>{
|
||||||
|
item.checkResult=this.checkResult
|
||||||
|
})
|
||||||
|
console.log(this.checkList)
|
||||||
|
acceptInnerVerifyer(this.checkList).then(response => {
|
||||||
|
if(response.code==200){
|
||||||
|
this.$modal.msgSuccess('验收成功')
|
||||||
|
this.confirmShow=false;
|
||||||
|
this.getList()
|
||||||
|
this.$refs.multipleTable.clearSelection()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
//文件管理
|
//文件管理
|
||||||
openFileDialog(row){
|
openFileDialog(row){
|
||||||
this.rowData=row;
|
this.rowData=row;
|
||||||
|
|
@ -305,6 +398,7 @@
|
||||||
this.getFileData()
|
this.getFileData()
|
||||||
this.open=true
|
this.open=true
|
||||||
},
|
},
|
||||||
|
//获取已上传文件
|
||||||
getFileData(){
|
getFileData(){
|
||||||
let param = {
|
let param = {
|
||||||
modelId:this.rowData.typeId,
|
modelId:this.rowData.typeId,
|
||||||
|
|
@ -322,6 +416,7 @@
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//上传
|
||||||
beforeFileUpload(row){
|
beforeFileUpload(row){
|
||||||
this.rowData.fileType=row.fileType;
|
this.rowData.fileType=row.fileType;
|
||||||
// this.rowData.dictLabel=row.dictLabel;
|
// this.rowData.dictLabel=row.dictLabel;
|
||||||
|
|
@ -358,7 +453,10 @@
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('/material/purchase_check_info/exportDetails',{taskId:this.taskId},`新购到货详情_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="teamId" @selection-change="handleSelectionChange" border>
|
<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" />
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
|
||||||
<el-table-column label="序号" align="center" width="80" type="index">
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -286,7 +286,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPurchaseList,acceptancePurchase,getPurchaseCheckFormByTaskId } from "@/api/purchase/goodsAccept";
|
import { getPurchaseList,acceptOuterVerify,getPurchaseCheckFormByTaskId } from "@/api/purchase/goodsAccept";
|
||||||
import { downloadFile } from '@/utils/download'
|
import { downloadFile } from '@/utils/download'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -340,7 +340,7 @@
|
||||||
this.queryParams.startTime=undefined
|
this.queryParams.startTime=undefined
|
||||||
this.queryParams.endTime=undefined
|
this.queryParams.endTime=undefined
|
||||||
}
|
}
|
||||||
this.queryParams.modelName="新购验收"
|
this.queryParams.taskStatus="2"
|
||||||
getPurchaseList(this.queryParams).then(response => {
|
getPurchaseList(this.queryParams).then(response => {
|
||||||
this.tableList = response.rows;
|
this.tableList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
|
|
@ -361,7 +361,7 @@
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map(item => item.taskId)
|
||||||
this.single = selection.length != 1
|
this.single = selection.length != 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
|
|
@ -384,9 +384,19 @@
|
||||||
},
|
},
|
||||||
//批量合格
|
//批量合格
|
||||||
acceptancePurchase(){
|
acceptancePurchase(){
|
||||||
acceptancePurchase(this.ids).then((response) => {
|
let param={
|
||||||
this.$modal.msgSuccess('操作成功')
|
taskIds:this.ids,
|
||||||
|
status:3,
|
||||||
|
checkResult:"合格"
|
||||||
|
}
|
||||||
|
acceptOuterVerify(param).then((response) => {
|
||||||
|
if(response.code==200){
|
||||||
|
this.$modal.msgSuccess('操作成功')
|
||||||
|
}else{
|
||||||
|
this.$modal.msgSuccess('操作失败')
|
||||||
|
}
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.$refs.multipleTable.clearSelection()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$modal.msgError('操作失败')
|
this.$modal.msgError('操作失败')
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -565,9 +565,8 @@ export default {
|
||||||
//获取任务详情--- 编辑回显数据
|
//获取任务详情--- 编辑回显数据
|
||||||
getTaskInfo() {
|
getTaskInfo() {
|
||||||
// this.loading = true;
|
// this.loading = true;
|
||||||
getPurchaseCheckInfo({taskId:this.taskId,id:this.id}).then((response) => {
|
getPurchaseCheckInfo({taskId:this.taskId,id:this.id,taskStatus:1}).then((response) => {
|
||||||
this.maForm = response.data.purchaseCheckInfo
|
this.maForm = response.data.purchaseCheckInfo
|
||||||
|
|
||||||
this.maForm.id = response.data.purchaseCheckInfo.id
|
this.maForm.id = response.data.purchaseCheckInfo.id
|
||||||
this.maForm.taskId = response.data.purchaseCheckInfo.taskId
|
this.maForm.taskId = response.data.purchaseCheckInfo.taskId
|
||||||
this.maForm.arrivalTime = response.data.purchaseCheckInfo.arrivalTime
|
this.maForm.arrivalTime = response.data.purchaseCheckInfo.arrivalTime
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ export default {
|
||||||
this.$tab.closeOpenPage(obj)
|
this.$tab.closeOpenPage(obj)
|
||||||
},
|
},
|
||||||
getDeviceType(){
|
getDeviceType(){
|
||||||
getDeviceType({level:4}).then(response => {
|
getDeviceType({level:4,skipPermission:1}).then(response => {
|
||||||
let matModelRes = response.data;
|
let matModelRes = response.data;
|
||||||
this.materialModelList = matModelRes.map((item) => {
|
this.materialModelList = matModelRes.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue