首页催办发送接口调试

This commit is contained in:
BianLzhaoMin 2024-04-17 13:20:11 +08:00
parent ce1e2d59ff
commit b677a7ff11
10 changed files with 1948 additions and 1518 deletions

View File

@ -32,7 +32,7 @@ export const getToPersonInfoAp = (data) => {
/* 催办信息发送 */ /* 催办信息发送 */
export const sendUrgingMessageApi = (data) => { export const sendUrgingMessageApi = (data) => {
return request.post('/**', data) return request.post('/material/todo/urgentProcessing', data)
} }

View File

@ -1,29 +1,56 @@
<template> <template>
<div class="app-container" id="receiveApplyAdd"> <div class="app-container" id="receiveApplyAdd">
<el-form :model="queryParams" ref="queryForm" size="small" :rules="queryRules" :inline="true" v-show="showSearch"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:rules="queryRules"
:inline="true"
v-show="showSearch"
>
<el-row> <el-row>
<el-form-item label="领料单位" prop="unitId"> <el-form-item label="领料单位" prop="unitId">
<el-select v-model="queryParams.unitId" filterable clearable @change="GetProData" style="width: 240px" placeholder="请选择"> <el-select
v-model="queryParams.unitId"
filterable
clearable
@change="GetProData"
style="width: 240px"
placeholder="请选择"
>
<el-option <el-option
v-for="item in unitList" v-for="item in unitList"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id"> :value="item.id"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="领料工程" prop="proId"> <el-form-item label="领料工程" prop="proId">
<el-select v-model="queryParams.proId" filterable clearable @change="GetUnitData" style="width: 240px" placeholder="请选择"> <el-select
v-model="queryParams.proId"
filterable
clearable
@change="GetUnitData"
style="width: 240px"
placeholder="请选择"
>
<el-option <el-option
v-for="item in proList" v-for="item in proList"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id"> :value="item.id"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="协议号" prop="agreementCode"> <el-form-item label="协议号" prop="agreementCode">
<el-input maxlength="50" v-model="queryParams.agreementCode" disabled></el-input maxlength="50" > <el-input
maxlength="50"
v-model="queryParams.agreementCode"
disabled
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="物品类型" prop="status"> <el-form-item label="物品类型" prop="status">
<el-cascader <el-cascader
@ -33,17 +60,20 @@
v-model="deviceType" v-model="deviceType"
@change="deviceTypeChange" @change="deviceTypeChange"
ref="deviceTypeCascader" ref="deviceTypeCascader"
filterable></el-cascader> filterable
></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="领料人" prop="leasePerson"> <el-form-item label="领料人" prop="leasePerson">
<el-input maxlength="50" <el-input
maxlength="50"
v-model="queryParams.leaseApplyInfo.leasePerson" v-model="queryParams.leaseApplyInfo.leasePerson"
placeholder="请输入领料人" placeholder="请输入领料人"
clearable clearable
/> />
</el-form-item> </el-form-item>
<el-form-item label="领料人电话" prop="phone"> <el-form-item label="领料人电话" prop="phone">
<el-input maxlength="11" <el-input
maxlength="11"
v-model="queryParams.leaseApplyInfo.phone" v-model="queryParams.leaseApplyInfo.phone"
placeholder="请输入领料人电话" placeholder="请输入领料人电话"
clearable clearable
@ -51,7 +81,8 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="roleName"> <el-form-item label="备注" prop="roleName">
<el-input maxlength="100" <el-input
maxlength="100"
v-model="queryParams.leaseApplyInfo.remark" v-model="queryParams.leaseApplyInfo.remark"
placeholder="请输入备注" placeholder="请输入备注"
clearable clearable
@ -61,9 +92,7 @@
/> />
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row> </el-row>
</el-row>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
@ -74,7 +103,8 @@
icon="el-icon-back" icon="el-icon-back"
size="mini" size="mini"
@click="handleBack" @click="handleBack"
>领料申请</el-button> >领料申请</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -84,7 +114,8 @@
size="mini" size="mini"
v-if="isEdit == 'true'" v-if="isEdit == 'true'"
@click="handleAdd" @click="handleAdd"
>保存</el-button> >保存</el-button
>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
@ -98,11 +129,23 @@
</el-col> --> </el-col> -->
</el-row> </el-row>
<el-table v-loading="loading" :data="leaseApplyDetails" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="leaseApplyDetails"
@selection-change="handleSelectionChange"
>
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" type="index" width="80" /> <el-table-column label="序号" type="index" width="80" />
<el-table-column label="类型名称" prop="typeCn" :show-overflow-tooltip="true" /> <el-table-column
<el-table-column label="规格型号" prop="guigeCn" :show-overflow-tooltip="true" /> label="类型名称"
prop="typeCn"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
prop="guigeCn"
:show-overflow-tooltip="true"
/>
<el-table-column label="计量单位" prop="unitCn" /> <el-table-column label="计量单位" prop="unitCn" />
<el-table-column label="库存数量" prop="num" /> <el-table-column label="库存数量" prop="num" />
<el-table-column label="预领数量" align="center"> <el-table-column label="预领数量" align="center">
@ -111,7 +154,8 @@
v-model.number="scope.row.preNum" v-model.number="scope.row.preNum"
placeholder="请输入预领数量" placeholder="请输入预领数量"
type="number" type="number"
min="1" @input="checkNum(scope.row)" min="1"
@input="checkNum(scope.row)"
clearable clearable
style="width: 100%" style="width: 100%"
/> />
@ -119,7 +163,8 @@
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="备注" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input maxlength="100" <el-input
maxlength="100"
v-model="scope.row.remark" v-model="scope.row.remark"
placeholder="请输入备注" placeholder="请输入备注"
clearable clearable
@ -127,7 +172,13 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" v-if="isEdit=='true'"> <el-table-column
label="操作"
align="center"
fixed="right"
class-name="small-padding fixed-width"
v-if="isEdit == 'true'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button--> <!-- <el-button-->
<!-- size="mini"--> <!-- size="mini"-->
@ -140,22 +191,31 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete({...scope.row,index:scope.$index})" @click="
>删除</el-button> handleDelete({ ...scope.row, index: scope.$index })
"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</template> </template>
<script> <script>
import { getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role"; import {
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; getRole,
delRole,
addRole,
updateRole,
dataScope,
changeRoleStatus,
deptTreeSelect,
} from '@/api/system/role'
import {
treeselect as menuTreeselect,
roleMenuTreeselect,
} from '@/api/system/menu'
import { import {
getProData, getProData,
getUnitData, getUnitData,
@ -165,23 +225,23 @@ import {
getLeaseListAll, getLeaseListAll,
editLeaseApply, editLeaseApply,
getLeaseApplyListAll, getLeaseApplyListAll,
getLeaseApplyAuditListAll getLeaseApplyAuditListAll,
} from '@/api/claimAndRefund/receive' } from '@/api/claimAndRefund/receive'
import { getInfo } from '@/api/login' import { getInfo } from '@/api/login'
export default { export default {
name: "ReceiveApplyAdd", name: 'ReceiveApplyAdd',
data() { data() {
const validatePhone = (rule, value, callback) => { const validatePhone = (rule, value, callback) => {
if (!value) { if (!value) {
callback(new Error("退料人电话不能为空")); callback(new Error('退料人电话不能为空'))
// this.$message.error(""); // this.$message.error("");
} else if (value.length < 11) { } else if (value.length < 11) {
callback(new Error("电话号码格式不正确")); callback(new Error('电话号码格式不正确'))
// this.$message.error(""); // this.$message.error("");
} else { } else {
callback(); callback()
}
} }
};
return { return {
user: null, // user: null, //
// //
@ -199,7 +259,7 @@ export default {
// //
roleList: [], roleList: [],
// //
title: "", title: '',
// //
open: false, open: false,
// //
@ -214,25 +274,25 @@ export default {
// //
dataScopeOptions: [ dataScopeOptions: [
{ {
value: "1", value: '1',
label: "全部数据权限" label: '全部数据权限',
}, },
{ {
value: "2", value: '2',
label: "自定数据权限" label: '自定数据权限',
}, },
{ {
value: "3", value: '3',
label: "本部门数据权限" label: '本部门数据权限',
}, },
{ {
value: "4", value: '4',
label: "本部门及以下数据权限" label: '本部门及以下数据权限',
}, },
{ {
value: "5", value: '5',
label: "仅本人数据权限" label: '仅本人数据权限',
} },
], ],
// //
menuOptions: [], menuOptions: [],
@ -240,7 +300,6 @@ export default {
deptOptions: [], deptOptions: [],
// //
queryParams: { queryParams: {
types: 2, types: 2,
unitId: null, unitId: null,
@ -255,10 +314,10 @@ export default {
leaseApplyInfo: { leaseApplyInfo: {
leasePerson: '', leasePerson: '',
phone: '', phone: '',
remark: '' remark: '',
}, },
// //
leaseApplyDetails:[] leaseApplyDetails: [],
}, },
leaseApplyDetails: [], leaseApplyDetails: [],
@ -281,13 +340,19 @@ export default {
queryRules: { queryRules: {
unitId: [ unitId: [
{ {
required:true,message:'请选择来往单位',trigger:'change',type:'number' required: true,
} message: '请选择来往单位',
trigger: 'change',
type: 'number',
},
], ],
proId: [ proId: [
{ {
required:true,message:'请选择工程',trigger:'change',type:'number' required: true,
} message: '请选择工程',
trigger: 'change',
type: 'number',
},
], ],
// leasePerson: [ // leasePerson: [
// { // {
@ -309,7 +374,7 @@ export default {
// //
deviceTypeTreeProps: { deviceTypeTreeProps: {
multiple: false, multiple: false,
value:'id' value: 'id',
}, },
// //
deviceType: null, deviceType: null,
@ -317,22 +382,34 @@ export default {
// //
form: {}, form: {},
defaultProps: { defaultProps: {
children: "children", children: 'children',
label: "label" label: 'label',
}, },
// //
rules: { rules: {
roleName: [ roleName: [
{ required: true, message: "角色名称不能为空", trigger: "blur" } {
required: true,
message: '角色名称不能为空',
trigger: 'blur',
},
], ],
roleKey: [ roleKey: [
{ required: true, message: "权限字符不能为空", trigger: "blur" } {
required: true,
message: '权限字符不能为空',
trigger: 'blur',
},
], ],
roleSort: [ roleSort: [
{ required: true, message: "角色顺序不能为空", trigger: "blur" } {
] required: true,
message: '角色顺序不能为空',
trigger: 'blur',
},
],
},
} }
};
}, },
created() { created() {
this.GetUserInfo() this.GetUserInfo()
@ -350,7 +427,7 @@ export default {
this.GetTaskDetail2(this.$route.query.taskId) this.GetTaskDetail2(this.$route.query.taskId)
} }
this.taskId = this.$route.query.taskId this.taskId = this.$route.query.taskId
this.isEdit = this.$route.query.isEdit; this.isEdit = this.$route.query.isEdit
// console.log(typeof(this.isEdit)) // console.log(typeof(this.isEdit))
// this.$set('isEdit',this.$route.query.isEdit) // this.$set('isEdit',this.$route.query.isEdit)
}, },
@ -365,7 +442,7 @@ export default {
// //
async GetUnitData() { async GetUnitData() {
const params = { const params = {
id:this.queryParams.proId id: this.queryParams.proId,
} }
const res = await getUnitData(params) const res = await getUnitData(params)
this.unitList = res.data this.unitList = res.data
@ -375,7 +452,7 @@ export default {
// //
async GetProData() { async GetProData() {
const params = { const params = {
id:this.queryParams.unitId id: this.queryParams.unitId,
} }
const res = await getProData(params) const res = await getProData(params)
this.proList = res.data this.proList = res.data
@ -386,22 +463,21 @@ export default {
// //
async GetDeviceTypeTree() { async GetDeviceTypeTree() {
const params = { const params = {
level:4 level: 4,
} }
const res = await getDeviceTypeTree(params) const res = await getDeviceTypeTree(params)
this.deviceTypeTree = res.data this.deviceTypeTree = res.data
}, },
// id // id
async GetAgreementInfoById() { async GetAgreementInfoById() {
if (this.queryParams.unitId && this.queryParams.proId) { if (this.queryParams.unitId && this.queryParams.proId) {
const params = { const params = {
unitId: this.queryParams.unitId, unitId: this.queryParams.unitId,
projectId: this.queryParams.proId projectId: this.queryParams.proId,
} }
const res = await getAgreementInfoById(params) const res = await getAgreementInfoById(params)
if (!(res.data && res.data.agreementId)) { if (!(res.data && res.data.agreementId)) {
this.$message.error('当前单位和工程未上传'); this.$message.error('当前单位和工程未上传')
this.queryParams.unitId = null this.queryParams.unitId = null
this.queryParams.proId = null this.queryParams.proId = null
@ -430,16 +506,18 @@ export default {
} }
this.queryParams.unitId = data.unitId this.queryParams.unitId = data.unitId
this.queryParams.proId = data.proId this.queryParams.proId = data.proId
this.queryParams.leaseApplyInfo.phone = data.leaseApplyInfoList[0].phone this.queryParams.leaseApplyInfo.phone =
this.queryParams.leaseApplyInfo.leasePerson = data.leaseApplyInfoList[0].leasePerson data.leaseApplyInfoList[0].phone
this.queryParams.leaseApplyInfo.leasePerson =
data.leaseApplyInfoList[0].leasePerson
this.queryParams.agreementCode = data.agreementCode this.queryParams.agreementCode = data.agreementCode
this.queryParams.agreementId = data.agreementId this.queryParams.agreementId = data.agreementId
this.queryParams.leaseApplyInfo.remark = data.leaseApplyInfoList[0].remark this.queryParams.leaseApplyInfo.remark =
data.leaseApplyInfoList[0].remark
this.leaseApplyInfoList = data.leaseApplyInfoList this.leaseApplyInfoList = data.leaseApplyInfoList
this.leaseApplyDetails = data.leaseApplyDetails.map(item => { this.leaseApplyDetails = data.leaseApplyDetails.map((item) => {
return this.handelEchoData(item) return this.handelEchoData(item)
}) })
}, },
// //
async GetTaskDetail2(taskId) { async GetTaskDetail2(taskId) {
@ -457,20 +535,24 @@ export default {
} }
this.queryParams.unitId = data.unitId this.queryParams.unitId = data.unitId
this.queryParams.proId = data.proId this.queryParams.proId = data.proId
this.queryParams.leaseApplyInfo.phone = data.leaseApplyInfoList[0].phone this.queryParams.leaseApplyInfo.phone =
this.queryParams.leaseApplyInfo.leasePerson = data.leaseApplyInfoList[0].leasePerson data.leaseApplyInfoList[0].phone
this.queryParams.leaseApplyInfo.leasePerson =
data.leaseApplyInfoList[0].leasePerson
this.queryParams.agreementCode = data.agreementCode this.queryParams.agreementCode = data.agreementCode
this.queryParams.agreementId = data.agreementId this.queryParams.agreementId = data.agreementId
this.queryParams.leaseApplyInfo.remark = data.leaseApplyInfoList[0].remark this.queryParams.leaseApplyInfo.remark =
data.leaseApplyInfoList[0].remark
this.leaseApplyInfoList = data.leaseApplyInfoList this.leaseApplyInfoList = data.leaseApplyInfoList
this.leaseApplyDetails = data.leaseApplyDetails.map(item => { this.leaseApplyDetails = data.leaseApplyDetails.map((item) => {
return this.handelEchoData(item) return this.handelEchoData(item)
}) })
}, },
// //
handelEchoData(item) { handelEchoData(item) {
const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem)) const template = JSON.parse(
JSON.stringify(this.leaseApplyDetailsItem),
)
template.createBy = item.createBy template.createBy = item.createBy
template.companyId = item.companyId template.companyId = item.companyId
template.typeId = item.typeId template.typeId = item.typeId
@ -488,34 +570,34 @@ export default {
// //
reset() { reset() {
if (this.$refs.menu != undefined) { if (this.$refs.menu != undefined) {
this.$refs.menu.setCheckedKeys([]); this.$refs.menu.setCheckedKeys([])
} }
this.menuExpand = false, ;(this.menuExpand = false),
this.menuNodeAll = false, (this.menuNodeAll = false),
this.deptExpand = true, (this.deptExpand = true),
this.deptNodeAll = false, (this.deptNodeAll = false),
this.form = { (this.form = {
roleId: undefined, roleId: undefined,
roleName: undefined, roleName: undefined,
roleKey: undefined, roleKey: undefined,
roleSort: 0, roleSort: 0,
status: "0", status: '0',
menuIds: [], menuIds: [],
deptIds: [], deptIds: [],
menuCheckStrictly: true, menuCheckStrictly: true,
deptCheckStrictly: true, deptCheckStrictly: true,
remark: undefined remark: undefined,
}; })
this.resetForm("form"); this.resetForm('form')
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRange = []; this.dateRange = []
this.resetForm("queryForm"); this.resetForm('queryForm')
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
@ -526,14 +608,14 @@ export default {
// //
handleCommand(command, row) { handleCommand(command, row) {
switch (command) { switch (command) {
case "handleDataScope": case 'handleDataScope':
this.handleDataScope(row); this.handleDataScope(row)
break; break
case "handleAuthUser": case 'handleAuthUser':
this.handleAuthUser(row); this.handleAuthUser(row)
break; break
default: default:
break; break
} }
}, },
@ -543,56 +625,80 @@ export default {
if (!valid) { if (!valid) {
return false return false
} else { } else {
this.queryParams.leaseApplyDetails = this.leaseApplyDetails this.queryParams.leaseApplyDetails =
this.leaseApplyDetails
if (this.queryParams.leaseApplyDetails.length == 0) { if (this.queryParams.leaseApplyDetails.length == 0) {
this.$message.error('请添加数据'); this.$message.error('请添加数据')
return return
} }
this.queryParams.leaseApplyDetails.forEach(item=>{ this.queryParams.leaseApplyDetails.forEach((item) => {
if(item.num==0){ /* if (item.num == 0) {
this.$message.error('机具类型库存量为零无法领料'); this.$message.error(
'机具类型库存量为零无法领料',
)
return return
} } */
if (item.preNum == '') { if (item.preNum == '') {
this.$message.error('请填写预领数量'); this.$message.error('请填写预领数量')
return return
} }
}) })
this.queryParams.createBy = this.user.userName this.queryParams.createBy = this.user.userName
this.queryParams.companyId = this.user.companyId this.queryParams.companyId = this.user.companyId
let res; let res
if (this.taskId) { if (this.taskId) {
this.leaseApplyInfoList.forEach(v => { this.leaseApplyInfoList.forEach((v) => {
v = Object.assign(v,this.queryParams.leaseApplyInfo) v = Object.assign(
this.$set(v,'leaseApplyDetails',this.queryParams.leaseApplyDetails) v,
this.queryParams.leaseApplyInfo,
)
this.$set(
v,
'leaseApplyDetails',
this.queryParams.leaseApplyDetails,
)
}) })
const params = { const params = {
...this.queryParams,taskId:this.taskId, ...this.queryParams,
leaseApplyInfoList:this.leaseApplyInfoList taskId: this.taskId,
leaseApplyInfoList: this.leaseApplyInfoList,
} }
res = await editLeaseApply(params) res = await editLeaseApply(params)
} else { } else {
// console.log(this.queryParams) // console.log(this.queryParams)
let isNum =
this.queryParams.leaseApplyDetails.every(
(e) => e.num != 0,
)
if (!isNum) {
this.$message.error(
'机具类型库存量为零无法领料',
)
return
}
res = await submitLeaseApply(this.queryParams) res = await submitLeaseApply(this.queryParams)
} }
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: res.msg message: res.msg,
})
this.$tab.closeOpenPage({
path: '/claimAndRefund/receive/receiveApply',
}) })
this.$tab.closeOpenPage({ path: "/claimAndRefund/receive/receiveApply"});
} }
} }
}) })
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleBack(row) { handleBack(row) {
this.$tab.closeOpenPage({ path: "/claimAndRefund/receive/receiveApply"}); this.$tab.closeOpenPage({
path: '/claimAndRefund/receive/receiveApply',
})
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
@ -616,8 +722,15 @@ export default {
/////// ///////
deviceTypeChange(val) { deviceTypeChange(val) {
console.log(val) console.log(val)
let nodes = null; let nodes = null
nodes = this.$refs.deviceTypeCascader.getCheckedNodes().length > 0 ? this.$refs.deviceTypeCascader.getCheckedNodes() : [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)] nodes =
this.$refs.deviceTypeCascader.getCheckedNodes().length > 0
? this.$refs.deviceTypeCascader.getCheckedNodes()
: [
this.$refs.deviceTypeCascader.panel.getNodeByValue(
val,
),
]
if (nodes[0].level != 4) { if (nodes[0].level != 4) {
return return
} }
@ -626,17 +739,17 @@ export default {
for (let i = 0; i < this.leaseApplyDetails.length; i++) { for (let i = 0; i < this.leaseApplyDetails.length; i++) {
if (this.leaseApplyDetails[i].typeId == nodes[0].data.id) { if (this.leaseApplyDetails[i].typeId == nodes[0].data.id) {
this.leaseApplyDetails.splice(i, 1) this.leaseApplyDetails.splice(i, 1)
break; break
} }
} }
this.leaseApplyDetails.push( this.leaseApplyDetails.push(this.handelTableItemData(nodes[0]))
this.handelTableItemData(nodes[0])
)
this.deviceType = {} this.deviceType = {}
}, },
//// ////
handelTableItemData(node) { handelTableItemData(node) {
const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem)) const template = JSON.parse(
JSON.stringify(this.leaseApplyDetailsItem),
)
template.createBy = this.user.name template.createBy = this.user.name
console.log(node.data) console.log(node.data)
template.num = node.data.num template.num = node.data.num
@ -647,12 +760,14 @@ export default {
template.guigeCn = node.pathLabels[3] template.guigeCn = node.pathLabels[3]
if (this.taskId) { if (this.taskId) {
const index = this.leaseApplyInfoList.find(key => key.companyId == node.data.companyId) const index = this.leaseApplyInfoList.find(
(key) => key.companyId == node.data.companyId,
)
template.parenntId = index ? index.id : '' template.parenntId = index ? index.id : ''
} }
return template return template
},
},
} }
}
};
</script> </script>

View File

@ -153,27 +153,96 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="typeList"> <el-table v-loading="loading" :data="typeList">
<el-table-column label="序号" sortable align="center" type="index" /> <el-table-column
<el-table-column label="退料单号" align="center" prop="code" :show-overflow-tooltip="true"/> label="序号"
<el-table-column label="退料单位" align="center" prop="unitName" :show-overflow-tooltip="true"/> sortable
<el-table-column label="退料工程" align="center" prop="lotName" :show-overflow-tooltip="true"/> align="center"
<el-table-column label="退料机具" align="center" prop="typeName" :show-overflow-tooltip="true"/> type="index"
<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
<el-table-column label="申请时间" align="center" prop="backTime" :show-overflow-tooltip="true"/> label="退料单号"
<el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true"/> align="center"
<el-table-column label="退料状态" align="center" prop="taskName" :show-overflow-tooltip="true"> 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="typeName"
: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"
prop="taskName"
:show-overflow-tooltip="true"
>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250"> <el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="250"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row, 'see')"> <el-button
size="mini"
plain
icon="el-icon-zoom-in"
@click="handleSee(scope.row, 'see')"
>
查看 查看
</el-button> </el-button>
<el-button size="mini" type="warning" @click="handleReturn(scope.row, 'see')" v-if="scope.row.taskStatus!='40'"> <el-button
size="mini"
type="warning"
@click="handleReturn(scope.row, 'see')"
v-if="scope.row.taskStatus != '40'"
>
退料 退料
</el-button> </el-button>
<el-button size="mini" type="primary" @click="handlePrint(scope.row)"> <el-button
size="mini"
type="primary"
@click="handlePrint(scope.row)"
>
退料单 退料单
</el-button> </el-button>
</template> </template>
@ -195,19 +264,27 @@
:rowObj="rowObj" :rowObj="rowObj"
:priKey="priKey" :priKey="priKey"
></dialogForm> ></dialogForm>
</div> </div>
</template> </template>
<script> <script>
import { getBackAuditList, getViewByExamine, ApiBackApplyAudit,ApiBackApplyRefuse,getBackReceiveList } from "@/api/claimAndRefund/return.js" import {
import { getInfo } from "@/api/login"; getBackAuditList,
import { getUnitData, getProData, getAgreementInfoById, } from "@/api/claimAndRefund/receive.js" getViewByExamine,
import dialogForm from "./dialogFormExame.vue"; ApiBackApplyAudit,
ApiBackApplyRefuse,
getBackReceiveList,
} 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 { export default {
// name: "ReturnExamine", // name: "ReturnExamine",
components: { dialogForm, }, components: { dialogForm },
data() { data() {
return { return {
type: '', type: '',
@ -228,7 +305,7 @@
// //
typeList: [], typeList: [],
// //
title: "", title: '',
// //
open: false, open: false,
// //
@ -238,14 +315,14 @@
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
keyWord: '', // keyWord: '', //
unitId: "",//id unitId: '', //id
lotId: '', //id lotId: '', //id
taskStatus: '', // taskStatus: '', //
typeId: '', // typeId: '', //
time: '', time: '',
agreementCode: '', // agreementCode: '', //
startTime: '', startTime: '',
endTime: '' endTime: '',
}, },
companyId: '', companyId: '',
deptOptions: [], deptOptions: [],
@ -254,15 +331,15 @@
taskStatusList: [ taskStatusList: [
{ {
name: '待审核', name: '待审核',
id: '37' id: '37',
}, },
{ {
name: '已审核', name: '已审核',
id: '38' id: '38',
} },
], ],
rowObj: {}, rowObj: {},
}; }
}, },
created() { created() {
this.initSelectData() this.initSelectData()
@ -270,15 +347,13 @@
}, },
methods: { methods: {
InitIGetInfo() { InitIGetInfo() {
getInfo().then(res => { getInfo().then((res) => {
this.companyId = res.user.companyId this.companyId = res.user.companyId
this.getList(); this.getList()
}) })
}, },
// //
handleNodeClick(ev) { handleNodeClick(ev) {},
},
// //
initSelectData() { initSelectData() {
this.GetUnitData() this.GetUnitData()
@ -286,9 +361,7 @@
}, },
// //
async GetUnitData() { async GetUnitData() {
const params = { const params = {}
}
const res = await getUnitData(params) const res = await getUnitData(params)
this.unitList = res.data this.unitList = res.data
console.log('GetUnitData ======================', res) console.log('GetUnitData ======================', res)
@ -296,7 +369,7 @@
// //
async GetProData() { async GetProData() {
const params = { const params = {
id: this.queryParams.unitId id: this.queryParams.unitId,
} }
const res = await getProData(params) const res = await getProData(params)
this.proList = res.data this.proList = res.data
@ -305,16 +378,13 @@
}, },
// //
async InitGetAgreementInfoById() { async InitGetAgreementInfoById() {
const { const { unitId, proId } = this.queryParams
unitId,
proId
} = this.queryParams
if (!unitId || !proId) { if (!unitId || !proId) {
return return
} }
const params = { const params = {
unitId: unitId, unitId: unitId,
projectId: proId projectId: proId,
} }
const res = await getAgreementInfoById(params) const res = await getAgreementInfoById(params)
// this.proList = res.data // this.proList = res.data
@ -336,29 +406,28 @@
let params = { let params = {
flag: 1, flag: 1,
companyId: this.companyId, companyId: this.companyId,
...this.queryParams ...this.queryParams,
} }
console.log("paramsparamsparams", params) console.log('paramsparamsparams', params)
const res = await getBackReceiveList(params) const res = await getBackReceiveList(params)
this.typeList = res.data.rows; this.typeList = res.data.rows
this.total = res.data.total; this.total = res.data.total
this.loading = false; this.loading = false
} catch (error) { } catch (error) {}
}
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRange = []; this.dateRange = []
// this.resetForm("queryForm"); // this.resetForm("queryForm");
this.$refs.queryForm.resetFields() this.$refs.queryForm.resetFields()
this.initSelectData() this.initSelectData()
this.handleQuery(); this.handleQuery()
}, },
//退 //退
handlePrint(row) { handlePrint(row) {
@ -369,33 +438,35 @@
// //
handleSee(row) { handleSee(row) {
this.$tab.closeOpenPage({ this.$tab.closeOpenPage({
path:'/claimAndRefund/returnInDetail', path: '/claimAndRefund/return/returnInDetail',
query: { query: {
Id: row.id, Id: row.id,
isView: true, isView: true,
} },
}) })
}, },
//退 //退
handleReturn(row) { handleReturn(row) {
this.$tab.closeOpenPage({ this.$tab.closeOpenPage({
path:'/claimAndRefund/returnInDetail', path: '/claimAndRefund/return/returnInDetail',
query: { query: {
Id: row.id, Id: row.id,
taskId:row.taskId taskId: row.taskId,
} },
}) })
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('base/backReceive/export', { this.download(
...this.queryParams 'base/backReceive/export',
}, `退料接收_${new Date().getTime()}.xlsx`) {
...this.queryParams,
}, },
`退料接收_${new Date().getTime()}.xlsx`,
)
}} },
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.submit_box { .submit_box {

View File

@ -1,6 +1,13 @@
<template> <template>
<div class="app-container" id="returnInDetail"> <div class="app-container" id="returnInDetail">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="80px"
>
<!-- <el-form-item label="关键字" prop="keyword"> <!-- <el-form-item label="关键字" prop="keyword">
<el-input <el-input
v-model="queryParams.keyword" v-model="queryParams.keyword"
@ -15,7 +22,8 @@
<el-select <el-select
v-model="queryParams.typeId" v-model="queryParams.typeId"
placeholder="请选择类型名称" placeholder="请选择类型名称"
clearable filterable clearable
filterable
style="width: 240px" style="width: 240px"
> >
<el-option <el-option
@ -29,36 +37,44 @@
<el-form-item label="规格型号" prop="modelId"> <el-form-item label="规格型号" prop="modelId">
<treeselect <treeselect
v-model="queryParams.modelId" v-model="queryParams.modelId"
default-expand-all :options="equipmentTypeList" default-expand-all
:options="equipmentTypeList"
placeholder="请选择规格型号" placeholder="请选择规格型号"
:disable-branch-nodes="true" :disable-branch-nodes="true"
style="width: 240px;" style="width: 240px"
noChildrenText="没有数据了" noChildrenText="没有数据了"
noOptionsText="没有数据" noOptionsText="没有数据"
noResultsText="没有搜索结果"/> noResultsText="没有搜索结果"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</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-item>
</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 icon="el-icon-back" size="mini" @click="back"
icon="el-icon-back" >返回</el-button
size="mini" >
@click="back"
>返回</el-button>
</el-col> </el-col>
<el-col :span="1.5" v-if="!isView"> <el-col :span="1.5" v-if="!isView">
<el-button <el-button type="primary" size="mini" @click="completeBack"
type="primary" >完成退料</el-button
size="mini" @click="completeBack" >
>完成退料</el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -66,10 +82,30 @@
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" type="index" /> <el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" /> <el-table-column
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" /> label="类型名称"
<el-table-column label="申请数量" align="center" prop="preNum" :show-overflow-tooltip="true"/> align="center"
<el-table-column label="退料数量" align="center" prop="num" :show-overflow-tooltip="true" /> 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="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="" :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"> <!-- <el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
@ -79,18 +115,49 @@
<span v-if="scope.row.status==2">已出库</span> <span v-if="scope.row.status==2">已出库</span>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300"> <el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="300"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" @click="handleViewCode(scope.row)" v-if="scope.row.manageType=='0'"> <el-button
size="mini"
@click="handleViewCode(scope.row)"
v-if="scope.row.manageType == '0'"
>
查看 查看
</el-button> </el-button>
<el-button size="mini" @click="handleViewNum(scope.row)" v-if="scope.row.manageType=='1'"> <el-button
size="mini"
@click="handleViewNum(scope.row)"
v-if="scope.row.manageType == '1'"
>
查看 查看
</el-button> </el-button>
<el-button size="mini" type="primary" @click="handleCodeReturn(scope.row)" v-if="!isView&&scope.row.manageType=='0'&&scope.row.num>0"> <el-button
size="mini"
type="primary"
@click="handleCodeReturn(scope.row)"
v-if="
!isView &&
scope.row.manageType == '0' &&
scope.row.num > 0
"
>
编码退料 编码退料
</el-button> </el-button>
<el-button size="mini" type="primary" @click="handleNumReturn(scope.row)" v-if="!isView&&scope.row.manageType=='1'&&scope.row.num>0"> <el-button
size="mini"
type="primary"
@click="handleNumReturn(scope.row)"
v-if="
!isView &&
scope.row.manageType == '1' &&
scope.row.num > 0
"
>
数量退料 数量退料
</el-button> </el-button>
<!-- <el-button size="mini" icon="el-icon-zoom-in"> <!-- <el-button size="mini" icon="el-icon-zoom-in">
@ -108,19 +175,40 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 编码退料弹窗 --> <!-- 编码退料弹窗 -->
<el-dialog :title="title" :visible.sync="openCode" width="1200px" append-to-body> <el-dialog
<div style="margin-left: 40px;margin-bottom: 10px;"> :title="title"
:visible.sync="openCode"
width="1200px"
append-to-body
>
<div style="margin-left: 40px; margin-bottom: 10px">
退料数量{{ returnNum }} 退料数量{{ returnNum }}
</div> </div>
<el-form :model="codeQuery" ref="codeQuery" size="small" :inline="true" label-width="100px"> <el-form
:model="codeQuery"
ref="codeQuery"
size="small"
:inline="true"
label-width="100px"
>
<el-form-item label="设备编码" prop="maCode"> <el-form-item label="设备编码" prop="maCode">
<el-input v-model="codeQuery.maCode" maxlength="20" /> <el-input v-model="codeQuery.maCode" maxlength="20" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleCodeQuery">查询</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetCodeQuery">重置</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-item>
</el-form> </el-form>
@ -131,7 +219,8 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="saveCodeBackBatch(1)" @click="saveCodeBackBatch(1)"
>批量合格</el-button> >批量合格</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -139,7 +228,8 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="saveCodeBackBatch(2)" @click="saveCodeBackBatch(2)"
>批量维修</el-button> >批量维修</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -147,25 +237,69 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="saveCodeBackBatch(3)" @click="saveCodeBackBatch(3)"
>批量报废</el-button> >批量报废</el-button
>
</el-col> </el-col>
</el-row> </el-row>
<el-table v-loading="loading" :data="codeList" height="500" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="codeList"
height="500"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" /> <el-table-column label="序号" align="center" type="index" />
<el-table-column label="设备类型" align="center" prop="typeName" :show-overflow-tooltip="true" /> <el-table-column
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" /> label="设备类型"
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true" /> align="center"
<el-table-column label="状态" align="center" prop="maStatus" :show-overflow-tooltip="true" /> prop="typeName"
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="!dialogIsView" width="250"> :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"
width="250"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="success" @click="saveCodeBack(scope.row,1)"> <el-button
size="mini"
type="success"
@click="saveCodeBack(scope.row, 1)"
>
合格 合格
</el-button> </el-button>
<el-button size="mini" type="primary" @click="saveCodeBack(scope.row,2)"> <el-button
size="mini"
type="primary"
@click="saveCodeBack(scope.row, 2)"
>
待维修 待维修
</el-button> </el-button>
<el-button size="mini" type="warning" @click="saveCodeBack(scope.row,3)"> <el-button
size="mini"
type="warning"
@click="saveCodeBack(scope.row, 3)"
>
预报废 预报废
</el-button> </el-button>
</template> </template>
@ -181,8 +315,13 @@
</el-dialog> </el-dialog>
<!-- 数量退料弹窗 --> <!-- 数量退料弹窗 -->
<el-dialog :title="title" :visible.sync="openNum" width="1200px" append-to-body> <el-dialog
<div style="margin-left: 40px;margin-bottom: 10px;"> :title="title"
:visible.sync="openNum"
width="1200px"
append-to-body
>
<div style="margin-left: 40px; margin-bottom: 10px">
退料数量{{ returnNum }} 退料数量{{ returnNum }}
</div> </div>
<el-row :gutter="10" class="mb8" v-if="!dialogIsView"> <el-row :gutter="10" class="mb8" v-if="!dialogIsView">
@ -192,43 +331,79 @@
size="mini" size="mini"
v-if="returnNum > 0" v-if="returnNum > 0"
@click="saveNumReturn" @click="saveNumReturn"
>保存</el-button> >保存</el-button
>
</el-col> </el-col>
</el-row> </el-row>
<el-table v-loading="loading" :data="numList" height="500"> <el-table v-loading="loading" :data="numList" height="500">
<el-table-column label="序号" align="center" type="index" /> <el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" /> <el-table-column
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" /> label="类型名称"
<el-table-column label="退料数量" align="center" prop="backNum" :show-overflow-tooltip="true" /> align="center"
<el-table-column label="合格数量" align="center" prop="qualifiedNum" :show-overflow-tooltip="true" > 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="backNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="合格数量"
align="center"
prop="qualifiedNum"
:show-overflow-tooltip="true"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model.number="scope.row.qualifiedNum" v-model.number="scope.row.qualifiedNum"
placeholder="请输入合格数量" placeholder="请输入合格数量"
type="number" min="0" type="number"
clearable :disabled="dialogIsView" min="0"
clearable
:disabled="dialogIsView"
style="width: 100%" style="width: 100%"
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="待维修数量" align="center" prop="serviceNum" :show-overflow-tooltip="true"> <el-table-column
label="待维修数量"
align="center"
prop="serviceNum"
:show-overflow-tooltip="true"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model.number="scope.row.serviceNum" v-model.number="scope.row.serviceNum"
placeholder="请输入待维修数量" placeholder="请输入待维修数量"
type="number" min="0" type="number"
clearable :disabled="dialogIsView" min="0"
clearable
:disabled="dialogIsView"
style="width: 100%" style="width: 100%"
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="待报废数量" align="center" prop="scrapNum"> <el-table-column
label="待报废数量"
align="center"
prop="scrapNum"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model.number="scope.row.scrapNum" v-model.number="scope.row.scrapNum"
placeholder="请输入待报废数量" placeholder="请输入待报废数量"
type="number" min="0" type="number"
clearable :disabled="dialogIsView" min="0"
clearable
:disabled="dialogIsView"
style="width: 100%" style="width: 100%"
/> />
</template> </template>
@ -240,12 +415,20 @@
</template> </template>
<script> <script>
import { receiveView ,getBackMachine,backReceiveRecordWeb,setNumBack,setCodeBack, getRecord, endBack } from "@/api/claimAndRefund/return"; import {
import { getTypeList } from "@/api/store/warehousing"; receiveView,
import { equipmentTypeTree } from "@/api/store/tools"; getBackMachine,
import Treeselect from "@riophae/vue-treeselect"; backReceiveRecordWeb,
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; setNumBack,
import { getInfo } from "@/api/login"; setCodeBack,
getRecord,
endBack,
} 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 { export default {
// name: "returnInDetail", // name: "returnInDetail",
components: { Treeselect }, components: { Treeselect },
@ -267,7 +450,7 @@
// //
deviceList: [], deviceList: [],
// //
title: "", title: '',
isView: false, // isView: false, //
dialogIsView: false, // dialogIsView: false, //
openIn: false, openIn: false,
@ -283,12 +466,13 @@
unitId: undefined, unitId: undefined,
modelId: undefined, modelId: undefined,
typeId: undefined typeId: undefined,
}, },
openCode: false, // openCode: false, //
openNum: false, // openNum: false, //
returnNum: 0, //退 returnNum: 0, //退
codeQuery: {//- codeQuery: {
//-
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 20,
maCode: undefined, maCode: undefined,
@ -296,7 +480,7 @@
codeTotal: 0, //- codeTotal: 0, //-
codeList: [], // codeList: [], //
numList: [], // numList: [], //
}; }
}, },
created() { created() {
if (this.$route.query.isView) { if (this.$route.query.isView) {
@ -305,44 +489,59 @@
this.isView = false this.isView = false
} }
if (this.$route.query.Id) { if (this.$route.query.Id) {
this.queryParams.id = this.$route.query.Id; this.queryParams.id = this.$route.query.Id
} }
if (this.$route.query.taskId) { if (this.$route.query.taskId) {
this.queryParams.taskId = this.$route.query.taskId; this.queryParams.taskId = this.$route.query.taskId
} }
this.getTypeList(); this.getTypeList()
this.equipmentType(); this.equipmentType()
this.getList(); this.getList()
getInfo().then(res => { getInfo().then((res) => {
this.createBy = res.user.userId this.createBy = res.user.userId
}) })
}, },
methods: { methods: {
// //
getTypeList() { getTypeList() {
getTypeList({level:'3'}).then(response => { getTypeList({ level: '3' }).then((response) => {
this.typeList = response.data; this.typeList = response.data
} })
)
}, },
// //
equipmentType() { equipmentType() {
equipmentTypeTree().then(response => { equipmentTypeTree().then((response) => {
this.equipmentTypeList = response.data; this.equipmentTypeList = response.data
this.equipmentTypeList.forEach((item, index) => { this.equipmentTypeList.forEach((item, index) => {
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
item.children.forEach((item2, index2) => { item.children.forEach((item2, index2) => {
if(item2.children&&item2.children.length>0){ if (
item2.children.forEach(item3=>{ item2.children &&
if(item3.children&&item3.children.length>0){ item2.children.length > 0
item3.children.forEach(item4=>{ ) {
item4.machineTypeName = item3.typeName item2.children.forEach((item3) => {
item4.specificationType = item4.typeName if (
this.$set(item4, 'purchasePrice', 0); item3.children &&
this.$set(item4, 'purchaseNum', 1); 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,
)
}) })
} }
}) })
@ -350,36 +549,37 @@
}) })
} }
}) })
}); })
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true
receiveView(this.queryParams).then(response => { receiveView(this.queryParams).then((response) => {
this.deviceList = response.data.rows; this.deviceList = response.data.rows
this.total = response.data.total; this.total = response.data.total
this.loading = false; this.loading = false
} })
);
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm('queryForm')
this.handleQuery(); this.handleQuery()
}, },
// //
back() { back() {
this.$tab.closeOpenPage({ path: "/claimAndRefund/returnIn"}); this.$tab.closeOpenPage({
path: '/claimAndRefund/return/returnIn',
})
}, },
//退 //退
async completeBack() { async completeBack() {
let param1 = { let param1 = {
parentId:this.queryParams.id parentId: this.queryParams.id,
} }
const res1 = await getRecord(param1) const res1 = await getRecord(param1)
console.log(res1) console.log(res1)
@ -387,65 +587,75 @@
let param = { let param = {
createBy: this.createBy, createBy: this.createBy,
parentId: this.queryParams.id, parentId: this.queryParams.id,
taskId:this.queryParams.taskId taskId: this.queryParams.taskId,
} }
endBack(param).then(response => { endBack(param).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess('操作成功')
this.back(); this.back()
} }
}); })
} }
}, },
// //
handleViewCode(row) { handleViewCode(row) {
this.title = '查看'; this.title = '查看'
this.openCode = true; this.openCode = true
this.resetForm("codeQuery"); this.resetForm('codeQuery')
this.codeQuery.parentId = row.id; this.codeQuery.parentId = row.id
this.codeQuery.typeId = row.modelId; this.codeQuery.typeId = row.modelId
this.dialogIsView = true; this.dialogIsView = true
this.returnNum = Number(row.num); this.returnNum = Number(row.num)
this.handleCodeQuery() this.handleCodeQuery()
}, },
// //
handleViewNum(row) { handleViewNum(row) {
let param = { let param = {
parentId: row.id, parentId: row.id,
typeId:row.modelId typeId: row.modelId,
} }
backReceiveRecordWeb(param).then(res=>{ backReceiveRecordWeb(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.title = '查看'; this.title = '查看'
this.openNum = true; this.openNum = true
this.dialogIsView = true; this.dialogIsView = true
this.numList=res.data.rows; this.numList = res.data.rows
this.numList.forEach(item=>{ this.numList.forEach((item) => {
if(item.backStatus=='1'){item.qualifiedNum = item.backNum;item.serviceNum=0;item.scrapNum=0;} if (item.backStatus == '1') {
if(item.backStatus=='2'){item.serviceNum = item.backNum;item.qualifiedNum=0;item.scrapNum=0;} item.qualifiedNum = item.backNum
if(item.backStatus=='3'){item.scrapNum = item.backNum;item.qualifiedNum=0;item.serviceNum=0;} item.serviceNum = 0
item.scrapNum = 0
}
if (item.backStatus == '2') {
item.serviceNum = item.backNum
item.qualifiedNum = 0
item.scrapNum = 0
}
if (item.backStatus == '3') {
item.scrapNum = item.backNum
item.qualifiedNum = 0
item.serviceNum = 0
}
}) })
} }
}) })
}, },
//退 //退
handleCodeReturn(row) { handleCodeReturn(row) {
this.title = '编码退料'; this.title = '编码退料'
this.openCode = true; this.openCode = true
this.resetForm("codeQuery"); this.resetForm('codeQuery')
this.codeQuery.parentId = row.id; this.codeQuery.parentId = row.id
this.codeQuery.taskId = row.taskId; this.codeQuery.taskId = row.taskId
this.codeQuery.typeId = row.modelId; this.codeQuery.typeId = row.modelId
this.dialogIsView = false; this.dialogIsView = false
this.returnNum = Number(row.num); this.returnNum = Number(row.num)
this.handleCodeQuery() this.handleCodeQuery()
}, },
//退 //退
handleNumReturn(row) { handleNumReturn(row) {
this.title = '数量退料'; this.title = '数量退料'
this.openNum = true; this.openNum = true
this.dialogIsView = false this.dialogIsView = false
let obj = {} let obj = {}
this.$set(obj, 'taskId', row.taskId) this.$set(obj, 'taskId', row.taskId)
@ -454,7 +664,7 @@
this.$set(obj, 'typeCode', row.typeCode) this.$set(obj, 'typeCode', row.typeCode)
this.$set(obj, 'typeId', row.modelId) this.$set(obj, 'typeId', row.modelId)
this.$set(obj, 'backNum', row.num) //退 this.$set(obj, 'backNum', row.num) //退
this.returnNum = Number(row.num); this.returnNum = Number(row.num)
this.$set(obj, 'qualifiedNum', 0) // this.$set(obj, 'qualifiedNum', 0) //
this.$set(obj, 'serviceNum', 0) // this.$set(obj, 'serviceNum', 0) //
this.$set(obj, 'scrapNum', 0) // this.$set(obj, 'scrapNum', 0) //
@ -463,47 +673,53 @@
}, },
//退 //退
handleCodeQuery() { handleCodeQuery() {
this.codeQuery.pageNum = 1; this.codeQuery.pageNum = 1
if (this.dialogIsView) { if (this.dialogIsView) {
this.getCodeViewList() this.getCodeViewList()
} else { } else {
this.getCodeList(); this.getCodeList()
} }
}, },
//退 //退
resetCodeQuery() { resetCodeQuery() {
this.resetForm("codeQuery"); this.resetForm('codeQuery')
this.handleCodeQuery(); this.handleCodeQuery()
}, },
//退 //退
getCodeList() { getCodeList() {
getBackMachine(this.codeQuery).then(response => { getBackMachine(this.codeQuery).then((response) => {
this.codeList = response.data.rows; this.codeList = response.data.rows
this.codeTotal = response.data.total; this.codeTotal = response.data.total
}); })
}, },
//退 //退
getCodeViewList() { getCodeViewList() {
backReceiveRecordWeb(this.codeQuery).then(response => { backReceiveRecordWeb(this.codeQuery).then((response) => {
this.codeList = response.data.rows; this.codeList = response.data.rows
this.codeList this.codeList
this.codeList.forEach(item=>{ this.codeList.forEach((item) => {
item.typeModelName = item.typeCode item.typeModelName = item.typeCode
if(item.backStatus=='1'){item.maStatus = '合格'} if (item.backStatus == '1') {
if(item.backStatus=='2'){item.maStatus = '维修'} item.maStatus = '合格'
if(item.backStatus=='3'){item.maStatus = '报废'} }
if (item.backStatus == '2') {
item.maStatus = '维修'
}
if (item.backStatus == '3') {
item.maStatus = '报废'
}
})
this.codeTotal = response.data.total
}) })
this.codeTotal = response.data.total;
});
}, },
/** 数量退料按钮 */ /** 数量退料按钮 */
saveNumReturn() { saveNumReturn() {
let data = this.numList[0] let data = this.numList[0]
let sumUnmber = data.qualifiedNum+data.serviceNum+data.scrapNum; let sumUnmber =
data.qualifiedNum + data.serviceNum + data.scrapNum
if (sumUnmber > this.returnNum) { if (sumUnmber > this.returnNum) {
this.$modal.msgError("退料总量已大于待退料数量!"); this.$modal.msgError('退料总量已大于待退料数量!')
} else { } else {
let arr = [] let arr = []
if (data.qualifiedNum > 0) { if (data.qualifiedNum > 0) {
@ -513,7 +729,7 @@
manageType: 1, manageType: 1,
createBy: this.createBy, createBy: this.createBy,
backStatus: 1, backStatus: 1,
backNum:data.qualifiedNum backNum: data.qualifiedNum,
} }
arr.push(obj) arr.push(obj)
} }
@ -524,7 +740,7 @@
manageType: 1, manageType: 1,
createBy: this.createBy, createBy: this.createBy,
backStatus: 2, backStatus: 2,
backNum:data.serviceNum backNum: data.serviceNum,
} }
arr.push(obj) arr.push(obj)
} }
@ -535,55 +751,55 @@
manageType: 1, manageType: 1,
createBy: this.createBy, createBy: this.createBy,
backStatus: 3, backStatus: 3,
backNum:data.scrapNum backNum: data.scrapNum,
} }
arr.push(obj) arr.push(obj)
} }
let param = { let param = {
taskId: data.taskId, taskId: data.taskId,
arr:arr arr: arr,
} }
// console.log(arr) // console.log(arr)
// console.log(param) // console.log(param)
setNumBack(param).then(response => { setNumBack(param).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess('操作成功')
this.openNum = false; this.openNum = false
this.handleQuery(); this.handleQuery()
} }
}); })
} }
}, },
/** 编码退料按钮 */ /** 编码退料按钮 */
saveCodeBack(row, type) { saveCodeBack(row, type) {
if (this.returnNum == 0) { if (this.returnNum == 0) {
this.$modal.msgError("退料数量为零,无法操作!"); this.$modal.msgError('退料数量为零,无法操作!')
} else { } else {
let arr = [{ let arr = [
{
parentId: this.codeQuery.parentId, parentId: this.codeQuery.parentId,
typeId: row.typeId, typeId: row.typeId,
backNum: 1, backNum: 1,
backStatus: type, backStatus: type,
manageType: 0, manageType: 0,
createBy: this.createBy, createBy: this.createBy,
maId:row.maId maId: row.maId,
},
}] ]
let param = { let param = {
taskId: this.codeQuery.taskId, taskId: this.codeQuery.taskId,
arr:arr arr: arr,
} }
setCodeBack(param).then(response => { setCodeBack(param).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess('操作成功')
// this.openCode = false; // this.openCode = false;
this.returnNum = Number(this.returnNum)-1; this.returnNum = Number(this.returnNum) - 1
this.handleCodeQuery(); this.handleCodeQuery()
this.handleQuery(); this.handleQuery()
} }
}); })
} }
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
@ -593,12 +809,11 @@
}, },
/** 编码退料 - 批量操作 */ /** 编码退料 - 批量操作 */
saveCodeBackBatch(type) { saveCodeBackBatch(type) {
if (this.codeSelectList.length > this.returnNum) { if (this.codeSelectList.length > this.returnNum) {
this.$modal.msgError("退料总量已大于待退料数量!"); this.$modal.msgError('退料总量已大于待退料数量!')
} else { } else {
let arr = []; let arr = []
arr = this.codeSelectList.map(item=>{ arr = this.codeSelectList.map((item) => {
return { return {
parentId: this.codeQuery.parentId, parentId: this.codeQuery.parentId,
typeId: item.typeId, typeId: item.typeId,
@ -606,27 +821,29 @@
backStatus: type, backStatus: type,
manageType: 0, manageType: 0,
createBy: this.createBy, createBy: this.createBy,
maId:item.maId maId: item.maId,
} }
}) })
let param = { let param = {
taskId: this.codeQuery.taskId, taskId: this.codeQuery.taskId,
arr:arr arr: arr,
} }
// console.log(param) // console.log(param)
setCodeBack(param).then(response => { setCodeBack(param).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess('操作成功')
// this.openCode = false; // this.openCode = false;
this.returnNum = Number(this.returnNum)-this.codeSelectList.length; this.returnNum =
this.handleCodeQuery(); Number(this.returnNum) -
this.handleQuery(); this.codeSelectList.length
this.handleCodeQuery()
this.handleQuery()
} }
}); })
} }
},
},
} }
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini { ::v-deep.el-table .fixed-width .el-button--mini {
@ -634,8 +851,7 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
.clickText { .clickText {
color: #02A7F0; color: #02a7f0;
cursor: pointer; cursor: pointer;
} }
</style> </style>

View File

@ -122,7 +122,7 @@
> </el-button > </el-button
> >
<!-- 代办事件为新购任务时显示催办按钮 --> <!-- 代办事件为领料任务时显示催办按钮 -->
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -321,7 +321,6 @@
taskStatus, taskStatus,
}) })
res.map((e) => { res.map((e) => {
if (e.phonenumber) {
this.toPersonInfo.push({ this.toPersonInfo.push({
noticeUser: e.userId, noticeUser: e.userId,
phone: e.phonenumber, phone: e.phonenumber,
@ -329,7 +328,6 @@
companyId: e.companyId, companyId: e.companyId,
v_name: e.nickName, v_name: e.nickName,
}) })
}
}) })
this.sendMessageParams.message = `宁夏送变电工程有限公司提示:您有一条任务单号为 ${taskCode} 的待办任务未处理,请及时处理。` this.sendMessageParams.message = `宁夏送变电工程有限公司提示:您有一条任务单号为 ${taskCode} 的待办任务未处理,请及时处理。`
@ -346,10 +344,7 @@
/* 催办发送 */ /* 催办发送 */
async submitForm() { async submitForm() {
this.sendMessageParams.bmNoticeInfoList = this.toPersonInfo this.sendMessageParams.bmNoticeInfoList = this.toPersonInfo
const { data: res } = await sendUrgingMessageApi( const res = await sendUrgingMessageApi(this.sendMessageParams)
this.sendMessageParams,
)
if (res.code == 200) { if (res.code == 200) {
this.$message.success('发送成功!') this.$message.success('发送成功!')
this.toPersonInfo = [] this.toPersonInfo = []

View File

@ -208,10 +208,6 @@
</script> </script>
<style scoped> <style scoped>
.el-table :empty::before {
content: '-';
color: gray;
}
.margin-top { .margin-top {
margin-top: -15px; margin-top: -15px;
} }

View File

@ -0,0 +1,12 @@
<template>
<div>
<!-- 盘点报废 -->
盘点报废
</div>
</template>
<script>
export default {}
</script>
<style></style>

View File

@ -0,0 +1,12 @@
<template>
<div>
<!-- 预报废管理 -->
预报废管理
</div>
</template>
<script>
export default {}
</script>
<style></style>

View File

@ -0,0 +1,12 @@
<template>
<div>
<!-- 报废管理 -->
报废管理
</div>
</template>
<script>
export default {}
</script>
<style></style>

View File

@ -43,6 +43,7 @@ module.exports = {
// target: `https://z.csgmall.com.cn`, // target: `https://z.csgmall.com.cn`,
target: `http://10.40.92.14:8080`, //福 target: `http://10.40.92.14:8080`, //福
// target: `http://10.40.92.8:8080`, //福
//******** 注意事项 ********* */ //******** 注意事项 ********* */
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址; //1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址;