领料出库接口对接,退料接收页面开发

This commit is contained in:
zhouzy062 2024-03-28 17:59:26 +08:00
parent 546b65a536
commit 59043e9b67
4 changed files with 990 additions and 66 deletions

View File

@ -246,9 +246,23 @@ export function getLeaseAuditListDetail(query) {
})
}
//领料出库 编码出库获取编码
export function getDetailsByTypeId(query) {
return request({
url: '/base/leaseOutDetails/getDetailsByTypeId',
method: 'get',
params: query
})
}
// 领料出库 编码出库 保存
export function submitOut(params){
return request({
url: '/base/leaseOutDetails/submitOut',
method: 'post',
data: params
})
}

View File

@ -169,21 +169,26 @@
<span style="margin-right: 50px;color: red;">
部分设备出库时需进行装车,需记录车牌号码
</span>
</el-form>
<el-form :model="outQuery" ref="outQuery" size="small" :inline="true" label-width="100px">
<el-form-item label="设备编码" prop="maCode">
<el-input v-model="outQuery.maCode" maxlength="20"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleOutQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetOutQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
@click="saveCodeOut"
>出库</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="outCodeList" height="500" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" />
@ -215,36 +220,42 @@
<span style="margin-right: 50px;color: red;">
部分设备出库时需进行装车,需记录车牌号码
</span>
</el-form>
<el-table v-loading="loading" :data="outCodeList" 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">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.outNum"
placeholder="请输入出库数量"
type="number"
min="1" @input="checkNum(scope.row)"
clearable
style="width: 100%"
/>
</template>
</el-table-column>
</el-table>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
@click="saveCodeOut"
>出库</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="outNumList" 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">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.inputNum"
placeholder="请输入出库数量"
type="number" min="1"
@input="checkNum(scope.row)"
clearable
style="width: 100%"
/>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { operate,getRecords } from "@/api/claimAndRefund/secondStore";
import { getUnitData,getProData,getLeaseAuditList,getLeaseAuditListDetail } from "@/api/claimAndRefund/receive.js"
import { getUnitData,getProData,getLeaseAuditList,getLeaseAuditListDetail,getDetailsByTypeId,submitOut } from "@/api/claimAndRefund/receive.js"
import { getTypeList } from "@/api/store/warehousing";
import { equipmentTypeTree } from "@/api/store/tools";
import Treeselect from "@riophae/vue-treeselect";
@ -257,7 +268,7 @@
//
loading: false,
//
ids: [],
maCodeList: [],
//
single: true,
//
@ -289,7 +300,7 @@
},
//
form: {},
//
//
openLeaseDevices:false,
isView:false,
dialogQuery: {
@ -300,7 +311,7 @@
},
dialogList:[],
dialogTotal: 0,
outObj:{},
openCode:false,//
openNum:false,//
outNum:0,//
@ -317,7 +328,6 @@
},
outTotal: 0,//-
outCodeList:[],//
outNumParam:{},
outNumList:[],//
};
@ -403,7 +413,7 @@
},
/** 查询列表 */
getDialogList() {
console.log(this.dialogQuery)
// console.log(this.dialogQuery)
getLeaseAuditListDetail(this.dialogQuery).then(response => {
this.dialogList = response.data.rows;
this.dialogTotal = response.data.total;
@ -432,16 +442,27 @@
codeOut(row){
this.title='编码出库'
this.openCode=true;
this.outNum = row.outNum
this.outNum = row.outNum;
this.outQuery.typeId = row.typeId;
this.outObj = row
this.handleOutQuery()
},
//
numOut(row){
this.title='数量出库'
this.openNum=true
this.outNumParam = {}
this.getNumList()
this.resetForm("numOutForm");
// console.log(row)
let obj = {}
this.$set(obj,'taskId',row.taskId)
this.$set(obj,'parentId',row.parentId)
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]
},
handleOutQuery() {
this.outQuery.pageNum = 1;
@ -452,32 +473,60 @@
this.handleOutQuery();
},
getCodeList() {
// getLeaseAuditListDetail(this.outQuery).then(response => {
// this.outCodeList = response.data.rows;
// this.outTotal = response.data.total;
// }
// );
},
getNumList() {
// getLeaseAuditListDetail(this.outQuery).then(response => {
// this.outNumList = response.data.rows;
// }
// );
},
//
checkNum(row){
if(row.outNum<=1){
row.outNum = 1
}
getDetailsByTypeId(this.outQuery).then(response => {
this.outCodeList = response.data.rows;
if(response.data.total){
this.outTotal = response.data.total;
}
}
);
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictId)
this.single = selection.length!=1
this.multiple = !selection.length
this.maCodeList = selection.map(item => item.maId)
},
//
saveCodeOut(){
console.log(this.outObj)
let params = this.maCodeList.map(item=>{
let obj = {
id:this.outObj.id,
maId:item,
manageType:0,
typeId:this.outObj.typeId,
parentId:this.outObj.parentId,
outNum:this.outObj.outNum,
taskId:this.outObj.taskId,
}
return obj
})
console.log(params)
// let params = {
// id:this.outObj.id,
// // maId:this.outQuery.maId,
// typeId:this.outObj.typeId,
// parentId:this.outObj.parentId,
// outNum:this.outObj.outNum,
// taskId:this.outObj.taskId,
// }
submitOut(params).then(response => {
// this.outCodeList = response.rows;
// this.outTotal = response.total;
}
);
},
//
checkNum(row){
if(row.inputNum<=1){
row.inputNum = 1
}
},
/** 提交按钮 */
submitForm: function(type) {
@ -486,7 +535,7 @@
/** 导出按钮操作 */
handleExport() {
this.downloadJson('material/secondaryWarehouse/exportList',JSON.stringify(this.queryParams), `二级库_${new Date().getTime()}.xlsx`)
// this.downloadJson('material/secondaryWarehouse/exportList',JSON.stringify(this.queryParams), `_${new Date().getTime()}.xlsx`)
},
}
};

View File

@ -0,0 +1,453 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable
style="width: 240px"
/>
</el-form-item>
<el-form-item label="单位名称" prop="unitId">
<el-select
v-model="queryParams.unitId"
clearable filterable
@change="getAgreementByUnit"
style="width: 240px"
placeholder="请选择"
>
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="工程名称" prop="proId">
<el-select
v-model="queryParams.proId"
clearable filterable
@change="getAgreementByProId"
style="width: 240px"
placeholder="请选择"
>
<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="typeId">
<el-cascader
v-model="queryParams.typeId"
:options="deptOptions"
:props="{
expandTrigger: 'hover',
label: 'label',
value: 'id',
checkStrictly: true,
}"
@change="handleNodeClick"
aria-placeholder="请选择极具类型"
>
</el-cascader>
</el-form-item>
<el-form-item label="协议号" prop="agreementCode">
<el-input
v-model="queryParams.agreementCode"
placeholder="请选择协议号"
clearable
style="width: 240px"
/>
</el-form-item>
<el-form-item label="退料状态" prop="taskStatus">
<el-select
v-model="queryParams.taskStatus"
clearable filterable
style="width: 240px"
placeholder="请选择"
>
<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="time">
<el-date-picker
v-model="queryParams.time"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
>
</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"
plain
size="mini"
@click="handleExam"
:disabled="multiple"
>批量审核</el-button
>
</el-col> -->
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList">
<el-table-column label="序号" sortable align="center" type="index" />
<el-table-column label="退料单号" align="center" prop="code" :show-overflow-tooltip="true"/>
<el-table-column label="退料单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="退料工程" align="center" prop="lotName" :show-overflow-tooltip="true"/>
<el-table-column label="退料人员" align="center" prop="backPerson" :show-overflow-tooltip="true"/>
<el-table-column label="联系电话" align="center" prop="phone" :show-overflow-tooltip="true"/>
<el-table-column label="申请时间" align="center" prop="backTime" :show-overflow-tooltip="true"/>
<el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true"/>
<el-table-column label="退料状态" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<!-- 状态 37-待审核 38-已审核 -->
<el-button type="text" v-if="scope.row.applyStatus == '0'">
待审核
</el-button>
<el-button type="text" style="color: #67c23a" v-if="scope.row.applyStatus == '1'||scope.row.applyStatus == '3'">
退料通过
</el-button>
<el-button type="text" style="color: red" v-if="scope.row.applyStatus == '2'||scope.row.applyStatus == '4'">
退料驳回
</el-button>
<el-button type="text" style="color: #67c23a" v-if="scope.row.taskStatus == '40'&& scope.row.applyStatus != '0'">
退料完成
</el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
<template slot-scope="scope">
<el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row, 'see')">
查看
</el-button>
<el-button size="mini" type="warning" @click="handleReturn(scope.row, 'see')">
退料
</el-button>
<el-button size="mini" type="primary" @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"
/>
<!-- 退料单 -->
<dialogForm
:dialogTitle="title"
:isShowFlag.sync="isShowOneFlag"
:rowObj="rowObj"
:priKey="priKey"
></dialogForm>
</div>
</template>
<script>
import { getBackAuditList, getViewByExamine, ApiBackApplyAudit,ApiBackApplyRefuse } from "@/api/claimAndRefund/return.js"
import { getInfo } from "@/api/login";
import { getUnitData, getProData, getAgreementInfoById, } from "@/api/claimAndRefund/receive.js"
import dialogForm from "./dialogFormExame.vue";
export default {
// name: "ReturnExamine",
components: { dialogForm, },
data() {
return {
type: '',
isShowOneFlag: false,//退
priKey: '',
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
typeList: [],
//
title: "",
//
open: false,
//
dateRange: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: '',//
unitId: "",//id
lotId: '',//id
taskStatus: '',//
typeId: '',//
time: '',
agreementCode: '',//
startTime: '',
endTime: ''
},
companyId: '',
deptOptions: [],
unitList: [],
proList: [],
taskStatusList: [
{
name: '待审核',
id: '37'
},
{
name: '已审核',
id: '38'
}
],
rowObj: {},
};
},
created() {
this.initSelectData()
this.InitIGetInfo()
},
methods: {
InitIGetInfo() {
getInfo().then(res => {
this.companyId = res.user.companyId
this.getList();
})
},
//
handleNodeClick(ev) {
},
//
initSelectData() {
this.GetUnitData()
this.GetProData()
},
//
async GetUnitData() {
const params = {
}
const res = await getUnitData(params)
this.unitList = res.data
console.log('GetUnitData ======================', res)
},
//
async GetProData() {
const params = {
id: this.queryParams.unitId
}
const res = await getProData(params)
this.proList = res.data
console.log('GetProData ======================', res)
},
//
async InitGetAgreementInfoById() {
const {
unitId,
proId
} = this.queryParams
if (!unitId || !proId) {
return
}
const params = {
unitId: unitId,
projectId: proId
}
const res = await getAgreementInfoById(params)
// this.proList = res.data
console.log('getAgreementInfoById ======================', res)
this.queryParams.agreementCode = res.data.agreementCode
},
getAgreementByProId() {
this.InitGetAgreementInfoById()
},
getAgreementByUnit() {
this.GetProData()
},
/** 查询字典类型列表 startTime,结束日期endTime */
async getList() {
this.loading = true;
this.queryParams.startTime = this.queryParams.time[0]
this.queryParams.endTime = this.queryParams.time[1]
try {
let params = {
companyId: this.companyId,
...this.queryParams
}
console.log("paramsparamsparams", params)
const res = await getBackAuditList(params)
this.typeList = res.data.rows;
this.total = res.data.total;
this.loading = false;
} catch (error) {
}
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.handleQuery();
},
//退
handlePrint(row) {
// this.title = "退";
this.isShowOneFlag = true
this.rowObj = row
},
//
handleSee(row) {
this.$tab.closeOpenPage({
path:'/claimAndRefund/returnInDetail',
query:{
// Id:row.id,
isView:true,
}
})
},
//退
handleReturn(row) {
this.$tab.closeOpenPage({
path:'/claimAndRefund/returnInDetail',
// query:{
// Id:row.id,
// isEdit:true,
// }
})
},
/** 导出按钮操作 */
handleExport() {
// this.download('material/backApply/exportExamine', {
// ...this.queryParams
// }, `退_${new Date().getTime()}.xlsx`)
},
}
};
</script>
<style lang="scss" scoped>
.submit_box {
display: flex;
justify-content: flex-start;
align-items: center;
.submit_box_title {
display: flex;
flex-direction: column;
margin-left: 15px;
:first-child {
font-size: 14px;
font-weight: 600;
}
:last-child {
margin-top: 6px;
font-size: 12px;
}
}
}
.submit_box_two {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
margin-left: 30%;
.submit_box_title {
display: flex;
flex-direction: column;
margin-left: 10px;
font-size: 18px;
font-weight: 600;
}
}
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
.dialog-footer {
display: flex;
justify-content: flex-end;
align-items: center;
}
</style>

View File

@ -0,0 +1,408 @@
<template>
<div class="app-container" id="returnInDetail">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="关键字" prop="keyword">
<el-input
v-model="queryParams.keyword"
placeholder="请输入关键字"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="类型名称" prop="typeId">
<el-select
v-model="queryParams.typeId"
placeholder="请选择类型名称"
clearable filterable
style="width: 240px"
>
<el-option
v-for="typeItem in typeList"
:key="typeItem.typeId"
:label="typeItem.typeName"
:value="typeItem.typeId"
/>
</el-select>
</el-form-item>
<el-form-item label="规格型号" prop="modelId">
<treeselect
v-model="queryParams.modelId"
default-expand-all :options="equipmentTypeList"
placeholder="请选择规格型号"
:disable-branch-nodes="true"
style="width: 240px;"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"/>
</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
icon="el-icon-back"
size="mini"
@click="back"
>返回</el-button>
</el-col>
<el-col :span="1.5" v-if="!isView">
<el-button
type="primary"
size="mini"
>完成退料</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="deviceList">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<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="modelName" :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="" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
<template slot-scope="scope">
<el-button size="mini" @click="handleView(scope.row)">
查看
</el-button>
<el-button size="mini" type="primary" @click="handleCodeReturn(scope.row)" v-if="!isView">
编码退料
</el-button>
<el-button size="mini" type="primary" @click="handleNumReturn(scope.row)" v-if="!isView">
数量退料
</el-button>
<!-- <el-button size="mini" icon="el-icon-zoom-in">
撤回
</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="openCode" width="1200px" append-to-body>
<div style="margin-left: 40px;margin-bottom: 10px;">
退料数量{{returnNum}}
</div>
<el-form :model="codeQuery" ref="codeQuery" size="small" :inline="true" label-width="100px">
<el-form-item label="设备编码" prop="maCode">
<el-input v-model="codeQuery.maCode" maxlength="20"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleCodeQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetCodeQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8" v-if="!dialogIsView">
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
>保存</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
size="mini"
>批量合格</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
>批量维修</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="codeList" height="500" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<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="maCode" :show-overflow-tooltip="true" />
<el-table-column label="退料状态" align="center" prop="maStatus" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="!dialogIsView">
<template slot-scope="scope">
<el-button size="mini" type="success" icon="el-icon-zoom-in">
合格
</el-button>
<el-button size="mini" type="primary" icon="el-icon-zoom-in">
待维修
</el-button>
<el-button size="mini" type="warning" icon="el-icon-zoom-in">
预报废
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="codeTotal>0"
:total="codeTotal"
:page.sync="codeQuery.pageNum"
:limit.sync="codeQuery.pageSize"
@pagination="getCodeList"
/>
</el-dialog>
<!-- 数量退料弹窗 -->
<el-dialog :title="title" :visible.sync="openNum" width="1200px" append-to-body>
<el-row :gutter="10" class="mb8" v-if="!dialogIsView">
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
>保存</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">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.inputNum"
placeholder="请输入出库数量"
type="number" min="1"
@input="checkNum(scope.row)"
clearable
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="报废信息" align="center" prop="" :show-overflow-tooltip="true" />
</el-table>
</el-dialog>
</div>
</template>
<script>
import { secondaryWarehouseList } from "@/api/claimAndRefund/secondStore";
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";
export default {
// name: "returnInDetail",
components: { Treeselect },
data() {
return {
//
loading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
deviceList: [],
//
title: "",
isView: false,//
dialogIsView: false,//
openIn: false,
//
dateRange: [],
//
typeList: [],
equipmentTypeList: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
unitId: undefined,
modelId: undefined,
typeId: undefined
},
openCode:false,//
openNum:false,//
returnNum:0,//退
codeQuery: {//-
pageNum: 1,
pageSize: 20,
maCode: undefined,
},
codeTotal: 0,//-
codeList:[],//
numList:[],//
};
},
created() {
if (this.$route.query.isView) {
this.isView = this.$route.query.isView
}else{
this.isView = false
}
this.getTypeList();
this.equipmentType();
this.getList();
},
methods: {
//
getTypeList() {
getTypeList({level:'3'}).then(response => {
this.typeList = response.data;
}
)
},
//
equipmentType() {
equipmentTypeTree().then(response => {
this.equipmentTypeList = response.data;
this.equipmentTypeList.forEach((item,index)=>{
if(item.children&&item.children.length>0){
item.children.forEach((item2,index2)=>{
if(item2.children&&item2.children.length>0){
item2.children.forEach(item3=>{
if(item3.children&&item3.children.length>0){
item3.children.forEach(item4=>{
item4.machineTypeName = item3.typeName
item4.specificationType = item4.typeName
this.$set(item4, 'purchasePrice', 0);
this.$set(item4, 'purchaseNum', 1);
})
}
})
}
})
}
})
});
},
/** 查询列表 */
getList() {
this.loading = true;
secondaryWarehouseList(this.queryParams).then(response => {
this.deviceList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
back(){
this.$tab.closeOpenPage({ path: "/claimAndRefund/returnIn"});
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictId)
this.single = selection.length!=1
this.multiple = !selection.length
},
//
handleView(row){
this.title = '查看';
this.openCode = true;
this.dialogIsView = true;
},
//退
handleCodeReturn(row){
this.title = '编码退料';
this.openCode = true;
this.handleCodeQuery()
},
//退
handleNumReturn(row){
this.title = '数量退料';
this.openNum = true;
let obj = {}
this.$set(obj,'taskId',row.taskId)
this.$set(obj,'parentId',row.parentId)
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.getNumList()
},
//退
handleCodeQuery() {
this.codeQuery.pageNum = 1;
this.getCodeList();
},
//退
resetCodeQuery() {
this.resetForm("codeQuery");
this.handleCodeQuery();
},
//退
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() {
},
}
};
</script>
<style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
.clickText{
color: #02A7F0;
cursor: pointer;
}
</style>