退料接收接口对接

This commit is contained in:
zhouzy062 2024-04-08 17:21:40 +08:00
parent a40363f3e5
commit 95918a1669
7 changed files with 309 additions and 77 deletions

View File

@ -149,7 +149,7 @@ export function getBackReceiveList(query) {
params: query
})
}
// 退料审核新增
// 退料接收详情列表
export function receiveView(data) {
return request({
url: '/base/backReceive/receiveViewWeb',
@ -158,3 +158,20 @@ export function receiveView(data) {
})
}
// 退料接收弹窗详情
export function backReceiveRecordWeb(data) {
return request({
url: '/base/backReceive/backReceiveRecordWeb',
method: 'post',
data: data
})
}
// 退料接收 数量接收
export function setNumBack(data) {
return request({
url: 'base/backReceive/setNumBack',
method: 'post',
data: data
})
}

View File

@ -74,19 +74,19 @@ export const constantRoutes = [
}
]
},
// {
// path: '/dashboard',
// component: Layout,
// redirect: 'dashboard',
// children: [
// {
// path: 'dashboard',
// component: () => import('@/views/dashboard'),
// name: 'Dashboard',
// meta: { title: '数据大屏', icon: 'dashboard', breadcrumb: false}
// }
// ]
// },
{
path: '/dashboard',
component: Layout,
redirect: 'dashboard',
children: [
{
path: 'dashboard',
component: () => import('@/views/dashboard'),
name: 'Dashboard',
meta: { title: '数据大屏', icon: 'dashboard', breadcrumb: false}
}
]
},
{
path: '/user',
component: Layout,

View File

@ -150,7 +150,8 @@ export default {
init() {
let params = {
taskId: this.rowObj.taskId,
agreementId: this.rowObj.agreementId
agreementId: this.rowObj.agreementId,
badId:this.rowObj.badId,
}
materialReturnNoteByExamine(params).then(res => {
this.tableData = res.data

View File

@ -20,20 +20,16 @@
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="协议号" prop="agreementCode">
<el-input maxlength="50" v-model="queryParams.agreementCode" placeholder="请选择单位工程" disabled clearable style="width: 240px" />
</el-form-item>
<el-form-item label="工机具类型" prop="typeId">
<el-cascader
v-model="queryParams.typeId"
:options="deptOptions"
:props="{
expandTrigger: 'hover',
label: 'typeName',
value: 'typeId',
checkStrictly: true,
}"
@change="handleNodeClick"
aria-placeholder="请选择极具类型"
>
</el-cascader>
<Tree
ref="mychildSon"
:width="240"
:dataList="deptList"
@changeId="selectDrop"
></Tree>
</el-form-item>
<el-form-item label="退料申请时间" prop="time">
<el-date-picker
@ -56,9 +52,7 @@
<el-option v-for="item in taskStatusList" :key="item.id" :label="item.name" :value="item.id" > </el-option>
</el-select>
</el-form-item>
<el-form-item label="协议号" prop="agreementCode">
<el-input maxlength="50" v-model="queryParams.agreementCode" placeholder="请选择协议号" clearable style="width: 240px" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button >
@ -336,6 +330,7 @@
</template>
<script>
import { listPartTypeApi } from "@/api/repairTest/repair";
import { listType, getType, delType, addType, updateType, refreshCache ,getUseTypeTree} from "@/api/system/dict/type";
import { ApiGetBackApplyList, getViewByApply, backApplyDelApi, submitBackApplyApi } from "@/api/claimAndRefund/return.js"
import {
@ -343,12 +338,13 @@ import {
} from "@/api/login";
import { getUnitData, getProData, getAgreementInfoById, } from "@/api/claimAndRefund/receive.js"
import dialogForm from "./dialogForm.vue";
import Tree from './tree.vue'
// 10:42startTime,endTime typeId
// http://localhost/claimAndRefund/return/returnApply
export default {
name: "",
dicts: ['sys_normal_disable'],
components: { dialogForm, },
components: { dialogForm,Tree },
data() {
return {
fullscreenLoading: false,
@ -375,6 +371,7 @@ export default {
open: false,
//
dateRange: [],
deptList: [],
//
queryParams: {
pageNum: 1,
@ -433,8 +430,17 @@ export default {
// this.getList();
this.initSelectData()
this.InitIGetInfo()
this.getTree();
},
methods: {
getTree() {
listPartTypeApi().then(response => {
this.deptList = response.data
});
},
selectDrop(value) {
this.queryParams.typeId = value
},
// claimAndRefund/return/returnApplyAdd
// claimAndRefund/return/returnApplyAdd
/** 查询字典类型列表 startTime,结束日期endTime */
@ -483,6 +489,7 @@ export default {
this.dateRange = [];
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = '';
this.initSelectData()
this.handleQuery();
},
@ -649,7 +656,7 @@ export default {
// this.initGetUseTypeTree()
},
handleNodeClick(ev) {
console.log(ev)
},
initSelectData() {
this.GetUnitData()
@ -687,7 +694,7 @@ export default {
const res = await getAgreementInfoById(params)
// this.proList = res.data
this.queryParams.agreementCode = res.data.agreementCode
this.initGetUseTypeTree(res.data.agreementId)
// this.initGetUseTypeTree(res.data.agreementId)
},
getAgreementByUnitAndProId() {
this.InitGetAgreementInfoById()

View File

@ -716,7 +716,8 @@ export default {
agreementId: this.rowObj.agreementId,
pageNum: this.dialogQueryParams.pageNum,
pageSize: this.dialogQueryParams.pageSize,
keyWord:this.dialogQueryParams.keyWord
keyWord:this.dialogQueryParams.keyWord,
badId:this.rowObj.badId,
}
getViewByExamine(params).then(res => {
this.loadingList = res.rows
@ -750,8 +751,10 @@ export default {
}
let params = {
ids: this.rowObj.id
ids: this.rowObj.id,
returnDetailList:this.loadingList
}
// console.log(params)
ApiBackApplyAudit(params).then(res => {
if (res.code == 200) {
this.open = false

View File

@ -68,11 +68,17 @@
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" />
<el-table-column label="退料数量" align="center" prop="num" :show-overflow-tooltip="true"/>
<el-table-column label="合格数量" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="维修数量" align="center" prop="" :show-overflow-tooltip="true"/>
<el-table-column label="预报废数量" align="center" prop="" :show-overflow-tooltip="true"/>
<el-table-column label="状态" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="退料数量" align="center" prop="preNum" :show-overflow-tooltip="true"/>
<el-table-column label="待审批数量" align="center" prop="num" :show-overflow-tooltip="true" />
<!-- <el-table-column label="维修数量" align="center" prop="" :show-overflow-tooltip="true"/>
<el-table-column label="预报废数量" align="center" prop="" :show-overflow-tooltip="true"/> -->
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.status==0">待审批</span>
<span v-if="scope.row.status==1">进行中</span>
<span v-if="scope.row.status==2">已出库</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
<template slot-scope="scope">
<el-button size="mini" @click="handleViewCode(scope.row)" v-if="scope.row.manageType=='0'">
@ -175,23 +181,44 @@
<el-button
type="primary"
size="mini"
v-if="returnNum>0"
@click="saveNumReturn"
>保存</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="numList" height="500">
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="退料数量" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="合格数量" align="center" prop="outNum" :show-overflow-tooltip="true" />
<el-table-column label="待维修数量" align="center" prop="alNum" :show-overflow-tooltip="true" />
<el-table-column label="待报废数量" align="center" prop="inputNum">
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" />
<el-table-column label="退料数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="合格数量" align="center" prop="qualifiedNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.inputNum"
placeholder="请输入出库数量"
type="number" min="1"
@input="checkNum(scope.row)"
v-model.number="scope.row.qualifiedNum"
placeholder="请输入合格数量"
type="number" min="0"
clearable
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="待维修数量" align="center" prop="serviceNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.serviceNum"
placeholder="请输入待维修数量"
type="number" min="0"
clearable
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="待报废数量" align="center" prop="scrapNum">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.scrapNum"
placeholder="请输入待报废数量"
type="number" min="0"
clearable
style="width: 100%"
/>
@ -204,16 +231,18 @@
</template>
<script>
import { receiveView } from "@/api/claimAndRefund/return";
import { receiveView ,backReceiveRecordWeb,setNumBack } from "@/api/claimAndRefund/return";
import { getTypeList } from "@/api/store/warehousing";
import { equipmentTypeTree } from "@/api/store/tools";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getInfo } from "@/api/login";
export default {
// name: "returnInDetail",
components: { Treeselect },
data() {
return {
createBy: '', //
//
loading: false,
//
@ -274,6 +303,10 @@
this.equipmentType();
this.getList();
getInfo().then(res => {
this.createBy = res.user.userId
})
},
methods: {
//
@ -340,18 +373,37 @@
handleViewCode(row){
this.title = '查看';
this.openCode = true;
this.codeQuery.parentId = row.id;
this.codeQuery.typeId = row.modelId;
this.dialogIsView = true;
this.returnNum = row.num;
this.handleCodeQuery()
},
handleViewNum(row){
this.title = '查看';
this.openNum = true;
this.dialogIsView = true;
let obj = {}
this.$set(obj,'taskId',row.taskId)
this.$set(obj,'parentId',row.id)
this.$set(obj,'typeName',row.typeName)
this.$set(obj,'typeCode',row.typeCode)
this.$set(obj,'typeId',row.modelId)
this.$set(obj,'num',row.num)//退
this.returnNum = row.num
this.$set(obj,'qualifiedNum',0)//
this.$set(obj,'serviceNum',0)//
this.$set(obj,'scrapNum',0)//
this.numList = [obj]
},
//退
handleCodeReturn(row){
this.title = '编码退料';
this.openCode = true;
this.dialogIsView = false
this.codeQuery.parentId = row.id;
this.codeQuery.typeId = row.modelId;
this.dialogIsView = false;
this.returnNum = row.num
this.handleCodeQuery()
},
//退
@ -361,15 +413,16 @@
this.dialogIsView = false
let obj = {}
this.$set(obj,'taskId',row.taskId)
this.$set(obj,'parentId',row.parentId)
this.$set(obj,'parentId',row.id)
this.$set(obj,'typeName',row.typeName)
this.$set(obj,'typeModelName',row.typeModelName)
this.$set(obj,'typeId',row.typeId)
// this.$set(obj,'alNum ',row.alNum)//
// this.$set(obj,'outNum',row.outNum)//
// this.$set(obj,'inputNum',1)//
this.outNumList = [obj]
this.$set(obj,'typeCode',row.typeCode)
this.$set(obj,'typeId',row.modelId)
this.$set(obj,'num',row.num)//退
this.returnNum = row.num
this.$set(obj,'qualifiedNum',0)//
this.$set(obj,'serviceNum',0)//
this.$set(obj,'scrapNum',0)//
this.numList = [obj]
// this.getNumList()
},
//退
@ -384,25 +437,71 @@
},
//退
getCodeList() {
console.log('获取退料编码列表')
// getLeaseAuditListDetail(this.codeQuery).then(response => {
// this.outCodeList = response.data.rows;
// this.outTotal = response.data.total;
// }
// );
},
//退
getNumList() {
console.log('获取退料数量列表')
// getLeaseAuditListDetail(this.codeQuery).then(response => {
// this.outCodeList = response.data.rows;
// this.outTotal = response.data.total;
// }
// );
},
/** 提交按钮 */
submitForm() {
// console.log('退')
// console.log(this.codeQuery)
backReceiveRecordWeb(this.codeQuery).then(response => {
// this.codeList = response.data.rows;
// this.codeTotal = response.data.total;
}
);
},
/** 数量退料按钮 */
saveNumReturn() {
let data = this.numList[0]
let sumUnmber = data.qualifiedNum+data.serviceNum+data.scrapNum;
if(sumUnmber>this.returnNum){
this.$modal.msgError("退料总量已大于待退料数量!");
}else{
let arr = []
if(data.qualifiedNum>0){
let obj = {
parentId:data.parentId,
typeId:data.typeId,
manageType:1,
createBy:this.createBy,
backStatus:1,
backNum:data.qualifiedNum
}
arr.push(obj)
}
if(data.serviceNum>0){
let obj = {
parentId:data.parentId,
typeId:data.typeId,
manageType:1,
createBy:this.createBy,
backStatus:2,
backNum:data.serviceNum
}
arr.push(obj)
}
if(data.scrapNum>0){
let obj = {
parentId:data.parentId,
typeId:data.typeId,
manageType:1,
createBy:this.createBy,
backStatus:3,
backNum:data.scrapNum
}
arr.push(obj)
}
let param = {
taskId:data.taskId,
arr:arr
}
// console.log(arr)
// console.log(param)
setNumBack(param).then(response => {
if(response.code==200){
this.$modal.msgSuccess("操作成功");
this.openNum = false;
this.handleQuery();
}
});
}
},
}
};

View File

@ -0,0 +1,105 @@
<template>
<div>
<div v-clickoutside="closeTree">
<div @click="inputFocus">
<el-input
v-model="inputValue"
:style="'width:' + width + 'px'"
placeholder="请选择工机具类型"
></el-input>
</div>
<div class="treeModule">
<el-tree
class="ORGTree"
v-show="ishowTree"
ref="tree"
:data="dataList"
key="id"
node-key="id"
highlight-current
@node-click="handleNodeClick"
:props="defaultProps"
>
</el-tree>
</div>
</div>
</div>
</template>
<script>
import Clickoutside from "element-ui/src/utils/clickoutside";
export default {
directives: { Clickoutside },
props: {
dataList: {
type: Array,
default: () => {
return []
}
},
// name: {
// type: String,
// default: ''
// },
width: {
type: Number,
default: 300
}
},
watch: {
},
data() {
return {
mineStatusValue: [],
inputValue: '',
dataLists: [],
defaultProps: {
children: 'children',
label: 'label',
},
ishowTree: false,
}
},
mounted() {
},
// watch: {
// name: function () {
// this.inputValue = this.name
// }
// },
methods: {
inputFocus() {
if (this.ishowTree == true) {
this.ishowTree = false
} else {
this.ishowTree = true
}
},
//
closeTree() {
this.ishowTree = false
},
handleNodeClick(e) {
this.inputValue = e.label
this.$emit('changeId', e.id)
this.ishowTree = false
}
}
}
</script>
<style scoped>
.treeModule {
position: absolute; /*这里一定要设置*/
z-index: 999999; /*这里是该元素与显示屏的距离,据说越大越好,但是我也没有看到效果,因为没有它也是可以的*/
}
.ORGTree {
width: 240px;
height: 200px;
overflow: auto;
border: 1px solid #ccc7c7;
}
</style>