This commit is contained in:
bb_pan 2025-03-24 11:02:37 +08:00
parent fbdd534e80
commit 54b48cbde4
3 changed files with 57 additions and 125 deletions

View File

@ -233,6 +233,7 @@
:before-remove="beforeRemove" :before-remove="beforeRemove"
:on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)" :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:on-preview="handlePreview"
:on-success="(res, file, fileList) => handleSuccess(res, file, fileList, scope.row)" :on-success="(res, file, fileList) => handleSuccess(res, file, fileList, scope.row)"
> >
<el-button :disabled="isView" size="mini" type="text">点击上传</el-button> <el-button :disabled="isView" size="mini" type="text">点击上传</el-button>
@ -265,7 +266,7 @@
v-model="maCode" v-model="maCode"
placeholder="请输入" placeholder="请输入"
size="mini" size="mini"
style="margin-right: 10px; width: 220px" style="margin: 0 10px; width: 220px"
></el-input> ></el-input>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getMachineList" <el-button type="primary" icon="el-icon-search" size="mini" @click="getMachineList"
>查询</el-button >查询</el-button
@ -575,6 +576,7 @@ export default {
taskId: '', taskId: '',
typeId: '', typeId: '',
maCode: '', // maCode: '', //
diaRow: {},
// //
machineList: [], machineList: [],
selectedList: [], selectedList: [],
@ -604,6 +606,7 @@ export default {
this.createBy = res.user.userName this.createBy = res.user.userName
}) })
this.taskId = this.rejectTaskId this.taskId = this.rejectTaskId
console.log('🚀 ~ mounted ~ this.rejectTaskId:', this.rejectTaskId)
this.rowId = this.rejectId this.rowId = this.rejectId
if (this.taskId && this.isEdit) { if (this.taskId && this.isEdit) {
Promise.all([ Promise.all([
@ -1218,9 +1221,7 @@ export default {
this.getMachineList() this.getMachineList()
}, },
// //
getMachineList(row) { getMachineList() {
console.log('🚀 ~ getMachineList ~ row:', row.typeId)
this.typeId = row.typeId
const params = { const params = {
unitId: this.queryParams.unitId, unitId: this.queryParams.unitId,
projectId: this.queryParams.proId, projectId: this.queryParams.proId,
@ -1231,7 +1232,7 @@ export default {
this.machineList = res.data this.machineList = res.data
// this.machineList row.numList id // this.machineList row.numList id
this.machineList.forEach((item) => { this.machineList.forEach((item) => {
if (row.numList.some((item2) => item2.maId == item.maId)) { if (this.diaRow.numList.some((item2) => item2.maId == item.maId)) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.codeTableList.toggleRowSelection(item, true) this.$refs.codeTableList.toggleRowSelection(item, true)
}) })
@ -1250,7 +1251,9 @@ export default {
this.selectedList = [] this.selectedList = []
this.currentRow = row this.currentRow = row
if (type == 1) { if (type == 1) {
this.getMachineList(row) this.typeId = row.typeId
this.diaRow = row
this.getMachineList()
} else { } else {
if (row.numList.length == 0) { if (row.numList.length == 0) {
// //
@ -1329,7 +1332,7 @@ export default {
handlePreview(file) { handlePreview(file) {
console.log('🚀 ~ handlePreview ~ file:', file) console.log('🚀 ~ handlePreview ~ file:', file)
if (file.response) { if (file.response) {
window.open(file.response.data.fileUrl) window.open('http://192.168.0.56:39080'+file.response.data.fileUrl)
} else { } else {
window.open(file.fileUrl) window.open(file.fileUrl)
} }

View File

@ -10,12 +10,7 @@
label-width="100px" label-width="100px"
> >
<el-form-item label="关键字" prop="keyWord"> <el-form-item label="关键字" prop="keyWord">
<el-input <el-input v-model="queryParams.keyWord" placeholder="请输入关键字" clearable style="width: 240px" />
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable
style="width: 240px"
/>
</el-form-item> </el-form-item>
<el-form-item label="退料单位" prop="unitId"> <el-form-item label="退料单位" prop="unitId">
<el-select <el-select
@ -26,12 +21,7 @@
style="width: 240px" style="width: 240px"
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
v-for="item in unitList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工程名称" prop="lotId"> <el-form-item label="工程名称" prop="lotId">
@ -43,12 +33,7 @@
style="width: 240px" style="width: 240px"
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
v-for="item in proList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="协议号" prop="agreementCode"> <el-form-item label="协议号" prop="agreementCode">
@ -56,17 +41,26 @@
v-model="queryParams.agreementCode" v-model="queryParams.agreementCode"
placeholder="请选择协议号" placeholder="请选择协议号"
clearable clearable
disabled
style="width: 240px" style="width: 240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工机具类型" prop="typeId"> <el-form-item label="工机具名称" prop="typeId">
<Tree <!-- <Tree
ref="mychildSon" ref="mychildSon"
:width="240" :width="240"
:dataList="deptList" :dataList="deptList"
@changeId="selectDrop" @changeId="selectDrop"
></Tree> ></Tree> -->
<treeselect
v-model="queryParams.typeId"
:options="deptList"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"
placeholder="请选择所属上级"
style="width: 240px"
@select="selectDrop"
/>
</el-form-item> </el-form-item>
<el-form-item label="退料状态" prop="taskStatus"> <el-form-item label="退料状态" prop="taskStatus">
@ -89,7 +83,7 @@
<el-form-item label="退料申请时间" prop="dateRange"> <el-form-item label="退料申请时间" prop="dateRange">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
type="datetimerange" type="daterange"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
@ -99,19 +93,8 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
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-item>
</el-form> </el-form>
@ -127,9 +110,7 @@
> >
</el-col> --> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain size="mini" @click="handleAdd" <el-button type="primary" plain size="mini" @click="handleAdd">退料接收</el-button>
>退料接收</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -143,10 +124,7 @@
> >
</el-col> </el-col>
<right-toolbar <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="typeList" border> <el-table v-loading="loading" :data="typeList" border>
@ -154,64 +132,17 @@
align="center" align="center"
label="序号" label="序号"
type="index" type="index"
:index=" :index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
indexContinuation(queryParams.pageNum, queryParams.pageSize)
"
/> />
<el-table-column <el-table-column label="退料单号" align="center" prop="code" show-overflow-tooltip />
label="退料单号" <el-table-column label="退料单位" align="center" prop="unitName" show-overflow-tooltip />
align="center" <el-table-column label="退料工程" align="center" prop="lotName" show-overflow-tooltip />
prop="code" <el-table-column label="退料类型名称" align="center" prop="typeName" show-overflow-tooltip />
show-overflow-tooltip <el-table-column label="退料人员" align="center" prop="backPerson" show-overflow-tooltip />
/> <el-table-column label="联系电话" align="center" prop="phone" show-overflow-tooltip />
<el-table-column <el-table-column label="申请时间" align="center" prop="backTime" show-overflow-tooltip />
label="退料单位" <el-table-column label="协议号" align="center" prop="agreementCode" show-overflow-tooltip />
align="center" <el-table-column label="退料状态" align="center" prop="taskName" show-overflow-tooltip></el-table-column>
prop="unitName"
show-overflow-tooltip
/>
<el-table-column
label="退料工程"
align="center"
prop="lotName"
show-overflow-tooltip
/>
<el-table-column
label="退料规格型号"
align="center"
prop="typeName"
show-overflow-tooltip
/>
<el-table-column
label="退料人员"
align="center"
prop="backPerson"
show-overflow-tooltip
/>
<el-table-column
label="联系电话"
align="center"
prop="phone"
show-overflow-tooltip
/>
<el-table-column
label="申请时间"
align="center"
prop="backTime"
show-overflow-tooltip
/>
<el-table-column
label="协议号"
align="center"
prop="agreementCode"
show-overflow-tooltip
/>
<el-table-column
label="退料状态"
align="center"
prop="taskName"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
@ -283,17 +214,15 @@ import {
getBackReceiveList, getBackReceiveList,
} from '@/api/claimAndRefund/return.js' } from '@/api/claimAndRefund/return.js'
import { getInfo } from '@/api/login' import { getInfo } from '@/api/login'
import { import { getUnitData, getProData, getAgreementInfoById } from '@/api/claimAndRefund/receive.js'
getUnitData,
getProData,
getAgreementInfoById,
} from '@/api/claimAndRefund/receive.js'
import dialogForm from '@/views/claimAndRefund/return/dialogFormExame.vue' import dialogForm from '@/views/claimAndRefund/return/dialogFormExame.vue'
import { listPartTypeApi } from '@/api/repairTest/repair' import { listPartTypeApi } from '@/api/repairTest/repair'
import Tree from '@/views/claimAndRefund/return/tree.vue' import Tree from '@/views/claimAndRefund/return/tree.vue'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default { export default {
// name: "ReturnExamine", // name: "ReturnExamine",
components: { dialogForm, Tree }, components: { dialogForm, Treeselect },
data() { data() {
return { return {
type: '', type: '',
@ -328,7 +257,7 @@ export default {
unitId: '', //id unitId: '', //id
lotId: '', //id lotId: '', //id
taskStatus: '', // taskStatus: '', //
typeId: '', // typeId: null, //
time: '', time: '',
agreementCode: '', // agreementCode: '', //
startTime: '', startTime: '',
@ -355,10 +284,10 @@ export default {
name: '退料完成', name: '退料完成',
id: '40', id: '40',
}, },
{ // {
name: '退料未开始', // name: '退',
id: '139', // id: '139',
}, // },
// { // {
// name: '退', // name: '退',
// id: '101', // id: '101',
@ -381,10 +310,7 @@ export default {
}, },
getTree() { getTree() {
listPartTypeApi().then((response) => { listPartTypeApi().then((response) => {
console.log( console.log('🚀 ~ listPartTypeApi ~ response.data:', response.data)
'🚀 ~ listPartTypeApi ~ response.data:',
response.data,
)
this.deptList = response.data this.deptList = response.data
}) })
}, },
@ -463,7 +389,7 @@ export default {
this.dateRange = [] this.dateRange = []
// this.resetForm("queryForm"); // this.resetForm("queryForm");
this.$refs.queryForm.resetFields() this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = '' // this.$refs.mychildSon.inputValue = ''
this.initSelectData() this.initSelectData()
this.handleQuery() this.handleQuery()
}, },
@ -475,7 +401,7 @@ export default {
}, },
handleEdit(row) { handleEdit(row) {
this.$emit('returnEdit',row.id, row.taskId) this.$emit('returnEdit', row.id, row.taskId)
}, },
//退 //退
@ -506,7 +432,7 @@ export default {
// taskId: row.taskId, // taskId: row.taskId,
// }, // },
// }) // })
this.$emit('receiveReturn', row.id, row.taskId,row.agreementId) this.$emit('receiveReturn', row.id, row.taskId, row.agreementId)
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {

View File

@ -49,9 +49,11 @@ export default {
// 退 // 退
returnApply() { returnApply() {
this.rejectId = '' this.rejectId = ''
this.rejectTaskId = ''
this.pageContent = '新建退料任务' this.pageContent = '新建退料任务'
this.isShowComponent = 'AddReturn' this.isShowComponent = 'AddReturn'
this.isEdit = false this.isEdit = false
this.isView = false
}, },
// 退 // 退
returnEdit(id,taskId) { returnEdit(id,taskId) {
@ -60,6 +62,7 @@ export default {
this.pageContent = '编辑退料任务' this.pageContent = '编辑退料任务'
this.isShowComponent = 'AddReturn' this.isShowComponent = 'AddReturn'
this.isEdit = true this.isEdit = true
this.isView = false
}, },
// //
receiveView(id, taskId) { receiveView(id, taskId) {