首页领料任务催办功能完善,页面优化等问题

This commit is contained in:
BianLzhaoMin 2024-06-14 17:24:17 +08:00
parent e4e4ce6dea
commit 2e0814935e
10 changed files with 592 additions and 443 deletions

View File

@ -54,11 +54,11 @@
style="width: 240px" style="width: 240px"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="设备类型" prop="selDeviceTypeChangeValue"> <el-form-item label="设备类型" prop="companyId">
<el-select <el-select
@change="selDeviceTypeChange" @change="selDeviceTypeChange"
style="width: 240px" style="width: 240px"
v-model="selDeviceTypeChangeValue" v-model="queryParams.companyId"
:disabled="leaseApplyDetails.length > 0" :disabled="leaseApplyDetails.length > 0"
placeholder="请选择设备类型" placeholder="请选择设备类型"
clearable clearable
@ -399,6 +399,13 @@ export default {
type: 'number', type: 'number',
}, },
], ],
companyId: [
{
required: true,
message: '请选择设备类型',
trigger: 'change',
},
],
// leasePerson: [ // leasePerson: [
// { // {
// required: true, message: '', trigger: 'blur', // required: true, message: '', trigger: 'blur',
@ -557,6 +564,7 @@ export default {
this.queryParams.examineStatusId = '32' this.queryParams.examineStatusId = '32'
} }
this.queryParams.unitId = data.unitId this.queryParams.unitId = data.unitId
this.queryParams.companyId = data.companyId
this.queryParams.proId = data.proId this.queryParams.proId = data.proId
this.queryParams.leaseApplyInfo.phone = this.queryParams.leaseApplyInfo.phone =
data.leaseApplyInfoList[0].phone data.leaseApplyInfoList[0].phone
@ -586,6 +594,7 @@ export default {
this.queryParams.examineStatusId = '32' this.queryParams.examineStatusId = '32'
} }
this.queryParams.unitId = data.unitId this.queryParams.unitId = data.unitId
this.queryParams.companyId = data.companyId
this.queryParams.proId = data.proId this.queryParams.proId = data.proId
this.queryParams.leaseApplyInfo.phone = this.queryParams.leaseApplyInfo.phone =
data.leaseApplyInfoList[0].phone data.leaseApplyInfoList[0].phone
@ -699,7 +708,7 @@ export default {
throw e throw e
} }
this.queryParams.createBy = this.user.userName this.queryParams.createBy = this.user.userName
this.queryParams.companyId = this.user.companyId // this.queryParams.companyId = this.user.companyId
this.queryParams.userId = this.user.userId this.queryParams.userId = this.user.userId
let res let res

View File

@ -255,7 +255,9 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.leaseApplyInfoList[0].remark }}</span> <span>{{
scope.row.leaseApplyInfoList[0].remark || ''
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="160"> <el-table-column label="操作" align="center" width="160">

View File

@ -179,7 +179,7 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
label="领料人" label="现场领料人"
align="center" align="center"
prop="leasePerson" prop="leasePerson"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
@ -191,7 +191,7 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
label="申请人" label="领料申请人"
align="center" align="center"
prop="applyFor" prop="applyFor"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"

View File

@ -6,7 +6,7 @@
:pageContent="pageContent" :pageContent="pageContent"
@goBack="goBack" @goBack="goBack"
/> />
<keep-alive include="Home"> <keep-alive :include="includeCom">
<component <component
:is="isShowComponent" :is="isShowComponent"
:isView="isView" :isView="isView"
@ -35,11 +35,13 @@ export default {
pageContent: '', pageContent: '',
auditingTaskId: '', auditingTaskId: '',
isView: false, isView: false,
includeCom: '',
} }
}, },
methods: { methods: {
/* 审核按钮 */ /* 审核按钮 */
pickingAuditing(taskId) { pickingAuditing(taskId) {
this.includeCom = ''
this.auditingTaskId = taskId this.auditingTaskId = taskId
this.isView = false this.isView = false
this.pageContent = '领料任务审批' this.pageContent = '领料任务审批'
@ -47,6 +49,7 @@ export default {
}, },
/* 查看按钮 */ /* 查看按钮 */
pickingView(taskId) { pickingView(taskId) {
this.includeCom = 'Home'
this.auditingTaskId = taskId this.auditingTaskId = taskId
this.isView = true this.isView = true
this.pageContent = '领料审批详情' this.pageContent = '领料审批详情'

View File

@ -51,10 +51,23 @@
style="width: 240px" style="width: 240px"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="设备类型" prop="selDeviceTypeChangeValue">
<el-select
@change="selDeviceTypeChange"
style="width: 240px"
v-model="selDeviceTypeChangeValue"
:disabled="leaseApplyDetails.length > 0"
placeholder="请选择设备类型"
clearable
>
<el-option label="机具设备" value="101"></el-option>
<el-option label="调试设备" value="102"></el-option>
</el-select>
</el-form-item>
<el-form-item label="物品类型" prop="status"> <el-form-item label="物品类型" prop="status">
<el-cascader <el-cascader
placeholder="请输入物品类型" placeholder="请输入物品类型"
:options="deviceTypeTree" :options="deviceTypeTreeNew"
:props="deviceTypeTreeProps" :props="deviceTypeTreeProps"
v-model="deviceType" v-model="deviceType"
@change="deviceTypeChange" @change="deviceTypeChange"
@ -466,8 +479,11 @@ export default {
}, },
companyId: '', companyId: '',
createBy: '', createBy: '',
userId: '',
isEdit: 'true', isEdit: 'true',
rowId: '', rowId: '',
selDeviceTypeChangeValue: '',
deviceTypeTreeNew: [],
} }
}, },
mounted() { mounted() {
@ -488,6 +504,7 @@ export default {
getInfo().then((res) => { getInfo().then((res) => {
this.companyId = res.user.companyId this.companyId = res.user.companyId
this.createBy = res.user.userName this.createBy = res.user.userName
this.userId = res.user.userId
}) })
}, },
computed: { computed: {
@ -722,6 +739,7 @@ export default {
} }
this.queryParams.createBy = this.user.name this.queryParams.createBy = this.user.name
this.queryParams.companyId = this.companyId this.queryParams.companyId = this.companyId
this.queryParams.userId = this.userId
this.queryParams.backApplyInfo = { this.queryParams.backApplyInfo = {
backPerson: this.queryParams.backPerson, backPerson: this.queryParams.backPerson,
phone: this.queryParams.phone, phone: this.queryParams.phone,
@ -733,6 +751,7 @@ export default {
let params = { let params = {
companyId: this.companyId, companyId: this.companyId,
createBy: this.createBy, createBy: this.createBy,
userId: this.userId,
id: this.rowId, id: this.rowId,
agreementId: this.queryParams.agreementId, agreementId: this.queryParams.agreementId,
backApplyInfo: this.queryParams.backApplyInfo, backApplyInfo: this.queryParams.backApplyInfo,
@ -754,6 +773,7 @@ export default {
let params = { let params = {
companyId: this.companyId, companyId: this.companyId,
createBy: this.createBy, createBy: this.createBy,
userId: this.userId,
agreementId: this.queryParams.agreementId, agreementId: this.queryParams.agreementId,
backApplyInfo: this.queryParams.backApplyInfo, backApplyInfo: this.queryParams.backApplyInfo,
backApplyDetails: backApplyDetails:
@ -894,6 +914,17 @@ export default {
template.useNum = node.data.useNum template.useNum = node.data.useNum
return template return template
}, },
//
selDeviceTypeChange(val) {
console.log(val, '设备类型选择-----')
console.log(this.deviceTypeTree, '树形数据源--')
this.deviceTypeTreeNew = this.deviceTypeTree.filter(
(e) => e.companyId == val,
)
},
}, },
} }
</script> </script>

View File

@ -285,7 +285,7 @@
size="medium" size="medium"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
v-if="scope.row.applyStatus == '0'" v-if="scope.row.taskStatus == '37'"
v-hasPermi="['return:auditing:auditing']" v-hasPermi="['return:auditing:auditing']"
@click="handleUpdate(scope.row, 'update')" @click="handleUpdate(scope.row, 'update')"
> >

View File

View File

@ -203,12 +203,17 @@
type="text" type="text"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
style="color: #e6a23c" style="color: #e6a23c"
v-if="row.taskTypeId == 29" v-if="
row.taskTypeId == 29 &&
userId === parseInt(row.createBy)
"
@click=" @click="
handleUrging( handleUrging(
row.taskTypeId, parseInt(row.taskTypeId), //
parseInt(row.companyId), //
row.taskEvent, //
parseInt(row.createBy), //
row.taskCode, row.taskCode,
row.taskEvent,
row.taskId, row.taskId,
) )
" "
@ -267,6 +272,22 @@
> >
</div> </div>
</el-dialog> </el-dialog>
<!-- 催办详情 -->
<DialogModel
:dialogConfig="dialogConfig"
@closeDialogOuter="closeDialogOuter"
>
<template slot="outerContent">
<el-tag
style="margin-right: 8px"
v-for="item in toPersonInfoDetails"
:key="item.v_user_id"
>
{{ item.v_name }}
</el-tag>
</template>
</DialogModel>
</div> </div>
</template> </template>
@ -277,8 +298,13 @@ import {
getToPersonInfoAp, getToPersonInfoAp,
sendUrgingMessageApi, sendUrgingMessageApi,
} from '@/api/index' } from '@/api/index'
import DialogModel from '@/components/DialogModel'
export default { export default {
name: 'myIndex', name: 'myIndex',
components: {
DialogModel,
},
data() { data() {
return { return {
// //
@ -356,6 +382,16 @@ export default {
// //
bmNoticeInfoList: [], bmNoticeInfoList: [],
}, },
dialogConfig: {
outerWidth: '50%',
outerTitle: '催办人详情',
outerVisible: false,
},
userId: parseInt(sessionStorage.getItem('userId')),
deptId: parseInt(sessionStorage.getItem('deptId')),
toPersonInfoDetails: [],
} }
}, },
created() { created() {
@ -422,18 +458,30 @@ export default {
}, },
/* 催办按钮 */ /* 催办按钮 */
async handleUrging(id, taskCode, taskStatus, taskId) { async handleUrging(
/* 先获取催办人信息 */ taskTypeId,
const { data: res } = await getToPersonInfoAp({ companyId,
taskStatus, taskStatus,
}) createBy,
taskCode,
taskId,
) {
const personParams = {
taskTypeId, //
companyId, //
taskStatus, //
createBy, //
deptId: this.deptId, //
}
/* 先获取催办人信息 */
const { data: res } = await getToPersonInfoAp(personParams)
res.map((e) => { res.map((e) => {
this.toPersonInfo.push({ this.toPersonInfo.push({
noticeUser: e.userId, noticeUser: e.userId,
phone: e.phonenumber, phone: e.phonenumber,
modelName: '领料催办', modelName: '领料催办',
companyId: e.companyId, companyId: e.companyId,
v_name: e.nickName, v_name: e.userName,
}) })
}) })
@ -465,6 +513,31 @@ export default {
this.toPersonInfo = [] this.toPersonInfo = []
this.urgingDialogVisible = false this.urgingDialogVisible = false
}, },
/* 查看催办人详情 */
async handleViewDetails(taskTypeId, companyId, taskStatus, createBy) {
this.toPersonInfoDetails = []
const personParams = {
taskTypeId, //
companyId, //
taskStatus, //
createBy, //
deptId: this.deptId, //
}
/* 先获取催办人信息 */
const { data: res } = await getToPersonInfoAp(personParams)
res.map((e) => {
this.toPersonInfoDetails.push({
v_user_id: e.userId,
v_name: e.userName,
})
})
this.dialogConfig.outerVisible = true
},
/* 关闭外层弹框 */
closeDialogOuter(val) {
this.dialogConfig.outerVisible = val
},
}, },
} }
</script> </script>

View File

@ -9,7 +9,12 @@
width="600px" width="600px"
> >
<div class="form_box_one" v-if="!isShow"> <div class="form_box_one" v-if="!isShow">
<el-form ref="dynamicValidateForm" :model="dynamicValidateForm" class="demo-dynamic" label-width="90px"> <el-form
ref="dynamicValidateForm"
:model="dynamicValidateForm"
class="demo-dynamic"
label-width="90px"
>
<div class="bor_box"> <div class="bor_box">
<p class="form_box_title">编码管理设备</p> <p class="form_box_title">编码管理设备</p>
<div class="form_box_line"></div> <div class="form_box_line"></div>
@ -24,7 +29,10 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="损坏原因:"> <el-form-item label="损坏原因:">
<el-radio-group style="width: 350px" v-model="dynamicValidateForm.scrapType"> <el-radio-group
style="width: 350px"
v-model="dynamicValidateForm.scrapType"
>
<el-radio :label="1">人为</el-radio> <el-radio :label="1">人为</el-radio>
<el-radio :label="0">自然</el-radio> <el-radio :label="0">自然</el-radio>
</el-radio-group> </el-radio-group>
@ -52,10 +60,14 @@
> >
<template> <template>
<el-row class="upload-tip"> <el-row class="upload-tip">
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary"
>点击上传</el-button
>
</el-row> </el-row>
<el-row class="upload-tip"> <el-row class="upload-tip">
<span class="tip-text">请上传jpgjpegpng格式的图片单张图片大小不可超过5M最多可上传3张</span> <span class="tip-text"
>请上传jpgjpegpng格式的图片单张图片大小不可超过5M最多可上传3张</span
>
</el-row> </el-row>
</template> </template>
</upload> </upload>
@ -69,7 +81,12 @@
</div> </div>
</div> </div>
<div class="form_box_two" v-if="isShow"> <div class="form_box_two" v-if="isShow">
<el-form ref="dynamicValidateFormTwo" :model="dynamicValidateFormTwo" class="demo-dynamic" label-width="100px"> <el-form
ref="dynamicValidateFormTwo"
:model="dynamicValidateFormTwo"
class="demo-dynamic"
label-width="100px"
>
<p class="form_box_title">数量管理设备</p> <p class="form_box_title">数量管理设备</p>
<div class="form_box_line"></div> <div class="form_box_line"></div>
<div class="form_box_item"> <div class="form_box_item">
@ -100,7 +117,10 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="损坏原因:"> <el-form-item label="损坏原因:">
<el-radio-group style="width: 350px" v-model="dynamicValidateFormTwo.scrapType"> <el-radio-group
style="width: 350px"
v-model="dynamicValidateFormTwo.scrapType"
>
<el-radio :label="1">人为</el-radio> <el-radio :label="1">人为</el-radio>
<el-radio :label="0">自然</el-radio> <el-radio :label="0">自然</el-radio>
</el-radio-group> </el-radio-group>
@ -129,10 +149,14 @@
> >
<template> <template>
<el-row class="upload-tip"> <el-row class="upload-tip">
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary"
>点击上传</el-button
>
</el-row> </el-row>
<el-row class="upload-tip"> <el-row class="upload-tip">
<span class="tip-text">请上传jpgjpegpng格式的图片单张图片大小不可超过5M最多可上传3张</span> <span class="tip-text"
>请上传jpgjpegpng格式的图片单张图片大小不可超过5M最多可上传3张</span
>
</el-row> </el-row>
</template> </template>
</upload> </upload>
@ -149,7 +173,10 @@
<script> <script>
import uploadImage from './uploadImage.vue' import uploadImage from './uploadImage.vue'
import upload from './upload.vue' import upload from './upload.vue'
import { submitRepairApplyApi, getRepairMaTypeListApi } from '@/api/repairTest/repair' import {
submitRepairApplyApi,
getRepairMaTypeListApi,
} from '@/api/repairTest/repair'
import { getInfo } from '@/api/login' import { getInfo } from '@/api/login'
export default { export default {
components: { components: {
@ -214,10 +241,10 @@ export default {
} }
}, },
mounted() { mounted() {
this.$eventBus.$on('taskId', taskId => { this.$eventBus.$on('taskId', (taskId) => {
this.taskId = taskId this.taskId = taskId
}) })
getInfo().then(res => { getInfo().then((res) => {
this.companyId = res.user.companyId this.companyId = res.user.companyId
}) })
}, },
@ -225,8 +252,10 @@ export default {
handleRemove(file, fileList) { handleRemove(file, fileList) {
this.fileList = fileList this.fileList = fileList
console.log('fileListRemove', fileList) console.log('fileListRemove', fileList)
fileList.map(item => { fileList.map((item) => {
this.fileIds = fileList.map(item => item.response.data.id).join(',') this.fileIds = fileList
.map((item) => item.response.data.id)
.join(',')
}) })
}, },
handlePreview(file) { handlePreview(file) {
@ -237,14 +266,16 @@ export default {
}, },
handleSuccess(response, fileList) { handleSuccess(response, fileList) {
this.fileList = fileList this.fileList = fileList
fileList.map(item => { fileList.map((item) => {
this.fileIds = fileList.map(item => item.response.data.id).join(',') this.fileIds = fileList
.map((item) => item.response.data.id)
.join(',')
}) })
}, },
//-- //--
numberIntegerValidator(rule, value, callback) { numberIntegerValidator(rule, value, callback) {
const reg = /^\+?[1-9][0-9]*$/ const reg = /^\+?[1-9][0-9]*$/
if ((value && reg.test(value)) && value <= this.rowObj.repairNum) { if (value && reg.test(value) && value <= this.rowObj.repairNum) {
callback() callback()
} else { } else {
callback(new Error('请输入大于0并且小于维修总量的正整数')) callback(new Error('请输入大于0并且小于维修总量的正整数'))
@ -255,7 +286,7 @@ export default {
taskId: this.taskId, taskId: this.taskId,
} }
this.loading = true this.loading = true
getRepairMaTypeListApi(params).then(res => { getRepairMaTypeListApi(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.repairList = res.rows this.repairList = res.rows
this.total = res.total this.total = res.total
@ -264,7 +295,7 @@ export default {
}) })
}, },
submit() { submit() {
this.$refs['dynamicValidateForm'].validate(valid => { this.$refs['dynamicValidateForm'].validate((valid) => {
if (valid) { if (valid) {
// //
let params = { let params = {
@ -281,7 +312,7 @@ export default {
} }
this.fullscreenLoading = true this.fullscreenLoading = true
submitRepairApplyApi(params) submitRepairApplyApi(params)
.then(res => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.fileList = [] this.fileList = []
this.fileIds = [] this.fileIds = []
@ -301,7 +332,7 @@ export default {
}) })
}, },
submitTwo() { submitTwo() {
this.$refs['dynamicValidateFormTwo'].validate(valid => { this.$refs['dynamicValidateFormTwo'].validate((valid) => {
if (valid) { if (valid) {
// //
let params = { let params = {
@ -319,7 +350,7 @@ export default {
} }
this.fullscreenLoading = true this.fullscreenLoading = true
submitRepairApplyApi(params) submitRepairApplyApi(params)
.then(res => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$refs.dynamicValidateFormTwo.clearValidate() this.$refs.dynamicValidateFormTwo.clearValidate()
this.fileList = [] this.fileList = []
@ -341,8 +372,8 @@ export default {
}) })
}, },
fileListChange(data) { fileListChange(data) {
data.map(item => { data.map((item) => {
this.fileIds = data.map(item => item.id).join(',') this.fileIds = data.map((item) => item.id).join(',')
}) })
}, },
init() { init() {
@ -355,7 +386,7 @@ export default {
this.dynamicValidateFormTwo = {} this.dynamicValidateFormTwo = {}
this.isShow = true this.isShow = true
} }
getInfo().then(res => { getInfo().then((res) => {
this.companyId = res.user.companyId this.companyId = res.user.companyId
}) })
this.fileList = [] this.fileList = []
@ -363,7 +394,7 @@ export default {
}, },
// //
cancel() { cancel() {
this.$refs.dynamicValidateFormTwo.clearValidate() // this.$refs.dynamicValidateFormTwo.clearValidate()
this.dialogShowFlag = false this.dialogShowFlag = false
this.fileList = [] this.fileList = []
}, },

View File

@ -46,8 +46,8 @@ module.exports = {
// target: `http://10.40.92.51:28080`, //超 // target: `http://10.40.92.51:28080`, //超
// target: `http://10.40.92.81:8080`, //韩/ // target: `http://10.40.92.81:8080`, //韩/
// target: `http://10.40.92.74:8080`,//旭/ // target: `http://10.40.92.74:8080`,//旭/
target: `http://10.40.92.138:28080`, //帅 // target: `http://10.40.92.138:28080`, //帅
// target: `http://10.40.92.253:28080`, //福 target: `http://10.40.92.253:28080`, //福
//******** 注意事项 ********* */ //******** 注意事项 ********* */
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target; //1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;