Merge branch 'material-ui' of http://192.168.30.2:3000/bonus/bonus-ui into material-ui
This commit is contained in:
commit
f61f8a0ad8
|
|
@ -26,11 +26,13 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<!--
|
||||
<el-col :span="8">
|
||||
<el-form-item label="采购申请编号">
|
||||
<el-input v-model="detailsInfo.applyCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
-->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="标准配置">
|
||||
<el-input v-model="detailsInfo.leaseUnit" />
|
||||
|
|
@ -41,15 +43,15 @@
|
|||
<el-input v-model="detailsInfo.phone" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="类型规格">
|
||||
<el-input v-model="detailsInfo.maTypeNames" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row></el-row> -->
|
||||
</el-form>
|
||||
|
||||
<TitleTip :title="`明细信息`" />
|
||||
|
|
@ -151,7 +153,7 @@ export default {
|
|||
leaseId: '', // 外键id
|
||||
taskCode: '', // 任务编码
|
||||
unitName: '', // 单位名称
|
||||
projectName: '', // 项目名称
|
||||
projectName: '' // 项目名称
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -172,7 +174,9 @@ export default {
|
|||
async onHandleAuditing(type) {
|
||||
// 组装参数
|
||||
// 1. 先找出当前用户有权限的所有节点
|
||||
const userAuthorizedNodes = this.auditingList.filter(e => e.configValues && e.configValues.includes(this.userId));
|
||||
const userAuthorizedNodes = this.auditingList.filter(
|
||||
e => e.configValues && e.configValues.includes(this.userId)
|
||||
)
|
||||
|
||||
if (userAuthorizedNodes.length === 0) {
|
||||
this.$modal.msgError('未查询到您的审核权限!')
|
||||
|
|
@ -181,16 +185,16 @@ export default {
|
|||
|
||||
// 2. 根据当前节点状态找出应该审核的节点
|
||||
// 优先找待审核的节点(isAccept === 0)
|
||||
let currentNode = userAuthorizedNodes.find(node => node.isAccept === 0);
|
||||
let currentNode = userAuthorizedNodes.find(node => node.isAccept === 0)
|
||||
|
||||
// 如果没有待审核的节点,则使用第一个有权限的节点
|
||||
if (!currentNode) {
|
||||
currentNode = userAuthorizedNodes[0];
|
||||
currentNode = userAuthorizedNodes[0]
|
||||
}
|
||||
|
||||
console.log('当前审核节点:', currentNode);
|
||||
console.log('当前审核节点:', currentNode)
|
||||
|
||||
const { recordId, id, typeId, isAccept } = currentNode;
|
||||
const { recordId, id, typeId, isAccept } = currentNode
|
||||
|
||||
// if (isAccept != 0) {
|
||||
// this.$modal.msgError('当前已审核,不可重复审核')
|
||||
|
|
@ -201,9 +205,9 @@ export default {
|
|||
typeId,
|
||||
recordId,
|
||||
nodeId: id
|
||||
});
|
||||
})
|
||||
|
||||
this.auditingParams.isAccept = type;
|
||||
this.auditingParams.isAccept = type
|
||||
|
||||
this.auditingParams.leaseId = this.detailsInfo.id
|
||||
|
||||
|
|
@ -214,23 +218,23 @@ export default {
|
|||
this.auditingParams.projectName = this.detailsInfo.leaseProject
|
||||
|
||||
// 找出当前节点在审核列表中的索引
|
||||
const currentIndex = this.auditingList.findIndex(e => e.id === id);
|
||||
const currentIndex = this.auditingList.findIndex(e => e.id === id)
|
||||
|
||||
if (currentIndex !== -1 && currentIndex !== this.auditingList.length - 1) {
|
||||
this.auditingParams.nextNodeId = this.auditingList[currentIndex + 1].id;
|
||||
this.auditingParams.nextNodeId = this.auditingList[currentIndex + 1].id
|
||||
}
|
||||
|
||||
console.log('提交的审核参数:', this.auditingParams);
|
||||
console.log('提交的审核参数:', this.auditingParams)
|
||||
|
||||
const res = await submitAuditingApi(this.auditingParams);
|
||||
console.log(res, '提交结果');
|
||||
const res = await submitAuditingApi(this.auditingParams)
|
||||
console.log(res, '提交结果')
|
||||
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess('审核成功');
|
||||
this.$modal.msgSuccess('审核成功')
|
||||
setTimeout(() => {
|
||||
const obj = { path: '/business-examine/receive-apply' };
|
||||
this.$tab.closeOpenPage(obj);
|
||||
}, 500);
|
||||
const obj = { path: '/business-examine/receive-apply' }
|
||||
this.$tab.closeOpenPage(obj)
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -246,11 +250,14 @@ export default {
|
|||
|
||||
console.log('审核列表数据:', this.auditingList)
|
||||
console.log('当前用户ID:', this.userId)
|
||||
console.log('审核权限检查:', this.auditingList.map(item => ({
|
||||
console.log(
|
||||
'审核权限检查:',
|
||||
this.auditingList.map(item => ({
|
||||
nodeName: item.nodeName,
|
||||
configValues: item.configValues,
|
||||
hasPermission: item.configValues && item.configValues.includes(this.userId)
|
||||
})))
|
||||
}))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -486,7 +486,7 @@ export default {
|
|||
}
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: '联系电话不能为空', trigger: 'blur' },
|
||||
// { required: true, message: '联系电话不能为空', trigger: 'blur' },
|
||||
{
|
||||
pattern: /^(?:(?:\+|00)86)?1[3-9]\d{9}$/,
|
||||
message: '请输入正确的手机号码',
|
||||
|
|
@ -500,13 +500,6 @@ export default {
|
|||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
supplierPlace: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入供货地点',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
bmFileInfos: [
|
||||
{
|
||||
required: false, // 是否分包商(是:合同编号必填)
|
||||
|
|
@ -593,22 +586,48 @@ export default {
|
|||
}
|
||||
// 重置表单验证状态,避免旧的错误提示残留
|
||||
this.$refs.maForm.clearValidate('deviceType')
|
||||
},
|
||||
|
||||
// 监听一下路由的type
|
||||
$route: {
|
||||
handler(newVal) {
|
||||
if (newVal.query.type == 'edit') {
|
||||
this.isEdit = true
|
||||
this.isDetail = false
|
||||
this.id = newVal.query.id
|
||||
const obj = Object.assign({}, newVal, { title: '领用申请编辑' })
|
||||
this.$tab.updatePage(obj)
|
||||
} else if (newVal.query.type == 'detail') {
|
||||
this.isEdit = false
|
||||
this.isDetail = true
|
||||
this.id = newVal.query.id
|
||||
const obj = Object.assign({}, this.$route, { title: '领用申请详情' })
|
||||
this.$tab.updatePage(obj)
|
||||
}
|
||||
|
||||
if (this.isEdit || this.isDetail) {
|
||||
console.log('isEdit', this.isEdit)
|
||||
this.getTaskInfo()
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// getCode()
|
||||
if (this.$route.query.type == 'edit') {
|
||||
this.isEdit = true
|
||||
this.isDetail = false
|
||||
this.id = this.$route.query.id
|
||||
const obj = Object.assign({}, this.$route, { title: '领用申请编辑' })
|
||||
this.$tab.updatePage(obj)
|
||||
// this.isEdit = true
|
||||
// this.isDetail = false
|
||||
// this.id = this.$route.query.id
|
||||
// const obj = Object.assign({}, this.$route, { title: '领用申请编辑' })
|
||||
// this.$tab.updatePage(obj)
|
||||
} else if (this.$route.query.type == 'detail') {
|
||||
this.isEdit = false
|
||||
this.isDetail = true
|
||||
this.id = this.$route.query.id
|
||||
const obj = Object.assign({}, this.$route, { title: '领用申请详情' })
|
||||
this.$tab.updatePage(obj)
|
||||
// this.isEdit = false
|
||||
// this.isDetail = true
|
||||
// this.id = this.$route.query.id
|
||||
// const obj = Object.assign({}, this.$route, { title: '领用申请详情' })
|
||||
// this.$tab.updatePage(obj)
|
||||
} else {
|
||||
this.isEdit = false
|
||||
this.isDetail = false
|
||||
|
|
@ -620,10 +639,10 @@ export default {
|
|||
this.equipmentType() //机具类型下拉选
|
||||
this.getStandardConfigList() // 标准配置下拉选
|
||||
this.getMaTypeNameOpt() // 类型名称下拉选
|
||||
if (this.isEdit || this.isDetail) {
|
||||
console.log('isEdit', this.isEdit)
|
||||
this.getTaskInfo()
|
||||
}
|
||||
// if (this.isEdit || this.isDetail) {
|
||||
// console.log('isEdit', this.isEdit)
|
||||
// this.getTaskInfo()
|
||||
// }
|
||||
console.log('🚀 ~ created ~ this.isDetail:', this.isDetail)
|
||||
console.log(this.$store, 'this.$store.getters')
|
||||
console.log(this.$route.query, 'this.$route.query')
|
||||
|
|
|
|||
|
|
@ -201,13 +201,34 @@
|
|||
:props="{ value: 'typeId', label: 'typeName' }"
|
||||
@change="changeType"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
filterable
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="typeModel">
|
||||
<el-select v-model="form.typeModel" multiple placeholder="请选择规格型号" clearable style="width: 100%">
|
||||
<el-select
|
||||
v-model="form.typeModel"
|
||||
multiple
|
||||
placeholder="请选择规格型号"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
filterable
|
||||
>
|
||||
<el-option v-for="item in typeModelOptions" :key="item.typeId" :label="item.name" :value="item.typeId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="数量" prop="num">
|
||||
<el-input-number
|
||||
v-model="form.num"
|
||||
placeholder="请输入数量"
|
||||
style="width: 100%"
|
||||
:precision="0"
|
||||
:step="10"
|
||||
:min="0"
|
||||
:max="9999"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<template>
|
||||
|
|
@ -303,7 +324,8 @@ export default {
|
|||
form: {
|
||||
configId: '', // 配置名称id
|
||||
typeIds: [], // 物资名称
|
||||
typeModel: [] // 规格型号
|
||||
typeModel: [], // 规格型号
|
||||
num: 0 // 数量
|
||||
},
|
||||
formRules: {
|
||||
configId: [{ required: true, message: '请选择配置名称', trigger: 'change' }],
|
||||
|
|
@ -419,6 +441,7 @@ export default {
|
|||
this.form.configId = this.form.configId || ''
|
||||
this.form.typeIds = []
|
||||
this.form.typeModel = []
|
||||
this.form.num = 0
|
||||
this.getConfigOpt()
|
||||
this.getTypeOptions()
|
||||
this.$nextTick(() => {
|
||||
|
|
@ -474,7 +497,8 @@ export default {
|
|||
try {
|
||||
const params = {
|
||||
configId: this.form.configId,
|
||||
typeIds: this.form.typeModel
|
||||
typeIds: this.form.typeModel,
|
||||
num: this.form.num
|
||||
}
|
||||
console.log('🚀 ~ 提交 params:', params)
|
||||
addConfigDetails(params)
|
||||
|
|
@ -520,17 +544,17 @@ export default {
|
|||
},
|
||||
/** 导出按钮作 */
|
||||
handleExport() {
|
||||
const formatTime = (date) => {
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
return `${year}${month}${day}_${hours}${minutes}${seconds}`;
|
||||
};
|
||||
const formatTime = date => {
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
const hours = String(date.getHours()).padStart(2, '0')
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0')
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0')
|
||||
return `${year}${month}${day}_${hours}${minutes}${seconds}`
|
||||
}
|
||||
|
||||
const currentTime = formatTime(new Date());
|
||||
const currentTime = formatTime(new Date())
|
||||
let queryTemp = this.queryParams
|
||||
this.download(
|
||||
'/material/standardConfig/export',
|
||||
|
|
|
|||
Loading…
Reference in New Issue