|
|
|
@ -9,6 +9,11 @@
|
|
|
|
|
<a-input v-decorator="['id']" placeholder="" style="width: 100%"/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8" v-show="false"> |
|
|
|
|
<a-form-item label="流程流转条件" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-input v-decorator="['haveAndNot']" placeholder="" style="width: 100%" disabled/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8" v-show="false"> |
|
|
|
|
<a-form-item label="ID" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-input v-decorator="['id']" placeholder="" style="width: 100%"/> |
|
|
|
@ -42,9 +47,10 @@
|
|
|
|
|
dictCode="material_type" placeholder="请选择物资类型"/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8" v-if="task" > |
|
|
|
|
<a-col :span="8" v-if="task"> |
|
|
|
|
<a-form-item label="被调拨部门" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<j-select-depart v-decorator="['beAllotDepartment',validatorRules.beAllotDepartment]" @change ='Department'/> |
|
|
|
|
<j-select-depart v-decorator="['beAllotDepartment',validatorRules.beAllotDepartment]" |
|
|
|
|
@change='Department'/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="8 |
|
|
|
@ -66,20 +72,20 @@
|
|
|
|
|
:dataSource="processMaterialsAllotListTable.dataSource" |
|
|
|
|
:maxHeight="300" |
|
|
|
|
:disabled="this.heid" |
|
|
|
|
:isabled = "isabled" |
|
|
|
|
:isabled="isabled" |
|
|
|
|
:rowNumber="true" |
|
|
|
|
:rowSelection="true" |
|
|
|
|
:actionButton="true" |
|
|
|
|
@valueChange ="onSelect" |
|
|
|
|
@valueChange="onSelect" |
|
|
|
|
@descriptionFetch="descriptionFetchData" |
|
|
|
|
/> |
|
|
|
|
</a-tab-pane> |
|
|
|
|
</a-tabs> |
|
|
|
|
<j-form-container > |
|
|
|
|
<j-form-container> |
|
|
|
|
<a-form :form="form"> |
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="24" > |
|
|
|
|
<a-form-item label="流程说明" > |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-item label="流程说明"> |
|
|
|
|
<j-editor v-decorator="[ 'opinion', {} ]" triggerChange></j-editor> |
|
|
|
|
<!--<a-input type="textarea" v-decorator="[ 'opinion' ]" :rows="4" />--> |
|
|
|
|
</a-form-item> |
|
|
|
@ -88,12 +94,13 @@
|
|
|
|
|
</a-form> |
|
|
|
|
</j-form-container> |
|
|
|
|
<div class="div_process"> |
|
|
|
|
<a-form-item v-if="!disabled" :wrapperCol="{ span: 24 }" style="text-align: center"> |
|
|
|
|
<a-form-item v-if="!disabled" :wrapperCol="{ span: 24 }" style="text-align: center" v-show="isHava"> |
|
|
|
|
<a-button type="primary" :disabled="disabled||btndisabled" @click="handleSubmit">保存</a-button> |
|
|
|
|
<a-button style="margin-left: 8px" type="primary" :disabled="disabled||btndisabled" @click="applySubmit">提交申请</a-button> |
|
|
|
|
<a-button style="margin-left: 8px" type="primary" :disabled="disabled||btndisabled" @click="applySubmit">提交申请 |
|
|
|
|
</a-button> |
|
|
|
|
<a-button style="margin-left: 8px" :disabled="disabled" @click="close">取消</a-button> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item v-if="task" :wrapperCol="{ span: 24 }" style="text-align: center"> |
|
|
|
|
<a-form-item v-if="task" :wrapperCol="{ span: 24 }" style="text-align: center" v-show="isHava"> |
|
|
|
|
<a-button type="primary" @click="passTask">通过</a-button> |
|
|
|
|
<a-button style="margin-left: 8px" @click="backTask">驳回</a-button> |
|
|
|
|
</a-form-item> |
|
|
|
@ -131,7 +138,7 @@
|
|
|
|
|
return { |
|
|
|
|
heid: true, |
|
|
|
|
isabled: true, |
|
|
|
|
libraryAssociationIdInvisible:'ZK', |
|
|
|
|
libraryAssociationIdInvisible: 'ZK', |
|
|
|
|
labelCol: { |
|
|
|
|
xs: { span: 24 }, |
|
|
|
|
sm: { span: 6 } |
|
|
|
@ -283,30 +290,31 @@
|
|
|
|
|
getForm: '/actBusiness/getForm', |
|
|
|
|
add: '/hy/processMaterialsAllot/add', |
|
|
|
|
edit: '/hy/processMaterialsAllot/edit', |
|
|
|
|
addAlloApply:'/hy/processMaterialsAllot/addAlloApply', |
|
|
|
|
editAlloApply:'/hy/processMaterialsAllot/editAlloApply', |
|
|
|
|
addAlloApply: '/hy/processMaterialsAllot/addAlloApply', |
|
|
|
|
editAlloApply: '/hy/processMaterialsAllot/editAlloApply', |
|
|
|
|
queryById: '/hy/processMaterialsAllot/queryById', |
|
|
|
|
descriptionRake: '/wastematerials/processWasteMaterials/wasteMaterialsName', //查询物料组 |
|
|
|
|
descriptionRakeUrl: '/hy/processMaterialWarehousingList/queryByIdWarehousingList', //查询物料组 |
|
|
|
|
merchandiseNewsList: '/wastematerials/processWasteMaterials/merchandiseNewsName', |
|
|
|
|
unitWasteNameUrl: '/unitwaste/processUnitWasteWarehouseCode/unitWasteName', |
|
|
|
|
puwwlistByuntil:'/unitwaste/processUnitWasteWarehouseCode/list', |
|
|
|
|
getFirstNode:'/actProcessIns/getFirstNode', |
|
|
|
|
puwwlistByuntil: '/unitwaste/processUnitWasteWarehouseCode/list', |
|
|
|
|
getFirstNode: '/actProcessIns/getFirstNode', |
|
|
|
|
processMaterialsAllotList: { |
|
|
|
|
list: '/hy/processMaterialsAllot/queryProcessMaterialsAllotListByMainId' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
btndisabled: false, |
|
|
|
|
describes:'', |
|
|
|
|
assignees:'', |
|
|
|
|
isHava:false, |
|
|
|
|
describes: '', |
|
|
|
|
assignees: '', |
|
|
|
|
validatorRules: { |
|
|
|
|
// 'blur'是鼠标失去焦点的时候会触发验证 |
|
|
|
|
materialType: { rules: [{ required: true, message: '请选择物资类型!' }] }, |
|
|
|
|
beAllotDepartment: { rules: [{ required: true, message: '被调拨部门不能为空!' }] }, |
|
|
|
|
processPlan: { rules: [{ required: true, message: '请选择流程计划!' }] } |
|
|
|
|
}, |
|
|
|
|
bigIdMerchandiseNewsList:[], |
|
|
|
|
materialGroupId: undefined, |
|
|
|
|
bigIdMerchandiseNewsList: [], |
|
|
|
|
materialGroupId: undefined |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
props: { |
|
|
|
@ -378,37 +386,37 @@
|
|
|
|
|
methods: { |
|
|
|
|
async onSelect(record) { |
|
|
|
|
// console.log(record) |
|
|
|
|
let isDB = true; |
|
|
|
|
if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined){ |
|
|
|
|
let isDB = true |
|
|
|
|
if (record.row.materialGroup !== '' && record.row.materialGroup !== undefined) { |
|
|
|
|
|
|
|
|
|
if(record.row.id !== '' && record.row.id !== undefined && this.materialGroupId !== record.row.materialGroup ){ |
|
|
|
|
if (record.row.id !== '' && record.row.id !== undefined && this.materialGroupId !== record.row.materialGroup) { |
|
|
|
|
// console.log("执行materialGroup") |
|
|
|
|
this.fetchMerchandiseNews(record.row.materialGroup,1); |
|
|
|
|
let value = [ |
|
|
|
|
{ |
|
|
|
|
rowKey: record.row.id, |
|
|
|
|
values: { |
|
|
|
|
'equipment': '', |
|
|
|
|
'materialGroup': record.row.materialGroup, |
|
|
|
|
'materialName': '', |
|
|
|
|
'materialUnit': '', |
|
|
|
|
'supplierId': '', |
|
|
|
|
'materialPrice': '', |
|
|
|
|
// 'number': '', |
|
|
|
|
'allotNumber': '', |
|
|
|
|
'materialAmount': '', |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
this.$nextTick(()=>{ |
|
|
|
|
this.$refs.processMaterialsAllotList.setValues(value); |
|
|
|
|
}) |
|
|
|
|
this.materialGroupId = record.row.materialGroup; |
|
|
|
|
isDB = false; |
|
|
|
|
this.fetchMerchandiseNews(record.row.materialGroup, 1) |
|
|
|
|
let value = [ |
|
|
|
|
{ |
|
|
|
|
rowKey: record.row.id, |
|
|
|
|
values: { |
|
|
|
|
'equipment': '', |
|
|
|
|
'materialGroup': record.row.materialGroup, |
|
|
|
|
'materialName': '', |
|
|
|
|
'materialUnit': '', |
|
|
|
|
'supplierId': '', |
|
|
|
|
'materialPrice': '', |
|
|
|
|
// 'number': '', |
|
|
|
|
'allotNumber': '', |
|
|
|
|
'materialAmount': '' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.$refs.processMaterialsAllotList.setValues(value) |
|
|
|
|
}) |
|
|
|
|
this.materialGroupId = record.row.materialGroup |
|
|
|
|
isDB = false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== '' && record.row.allotNumber === '' && isDB ){ |
|
|
|
|
if (record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== '' && record.row.allotNumber === '' && isDB) { |
|
|
|
|
// console.log("执行materialNumber") |
|
|
|
|
let materialName = {} |
|
|
|
|
this.bigIdMerchandiseNewsList.forEach(item => { |
|
|
|
@ -417,7 +425,7 @@
|
|
|
|
|
name: item.merchandiseName, |
|
|
|
|
unit: item.materialsUnit, |
|
|
|
|
supplierName: item.supplierId, |
|
|
|
|
price: item.materialPrice, |
|
|
|
|
price: item.materialPrice |
|
|
|
|
// number : item.residueNumber === undefined ? 0 : item.residueNumber, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -433,22 +441,22 @@
|
|
|
|
|
'supplierId': materialName.supplierName, |
|
|
|
|
'materialPrice': materialName.price, |
|
|
|
|
// 'number': materialName.number, |
|
|
|
|
'materialAmount': 0, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
'materialAmount': 0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
// console.log("",values); |
|
|
|
|
this.$refs.processMaterialsAllotList.setValues(values); |
|
|
|
|
this.$refs.processMaterialsAllotList.setValues(values) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 根据请发数量计算 |
|
|
|
|
if(record.row.allotNumber !== '' && record.row.allotNumber !== undefined && isDB){ |
|
|
|
|
let res = record.row; |
|
|
|
|
if (record.row.allotNumber !== '' && record.row.allotNumber !== undefined && isDB) { |
|
|
|
|
let res = record.row |
|
|
|
|
let materialName = {} |
|
|
|
|
this.bigIdMerchandiseNewsList.forEach(item => { |
|
|
|
|
if (item.merchandiseNewsId === record.row.equipment) { |
|
|
|
|
materialName = { |
|
|
|
|
number : item.residueNumber === undefined ? 0 : item.residueNumber, |
|
|
|
|
number: item.residueNumber === undefined ? 0 : item.residueNumber |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -458,7 +466,7 @@
|
|
|
|
|
// this.$message.warn("输入调拨数量不能大于库存数量") |
|
|
|
|
// res.allotNumber = materialName.number; |
|
|
|
|
// } |
|
|
|
|
if(res.id != undefined){ |
|
|
|
|
if (res.id != undefined) { |
|
|
|
|
let value = [ |
|
|
|
|
{ |
|
|
|
|
rowKey: res.id, |
|
|
|
@ -471,135 +479,135 @@
|
|
|
|
|
// 'materialPrice': res.price, |
|
|
|
|
// 'number': res.number, |
|
|
|
|
'allotNumber': res.allotNumber, |
|
|
|
|
'materialAmount': res.materialPrice * parseInt( res.allotNumber), |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
'materialAmount': res.materialPrice * parseInt(res.allotNumber) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
this.$nextTick(()=>{ |
|
|
|
|
this.$refs.processMaterialsAllotList.setValues(value); |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.$refs.processMaterialsAllotList.setValues(value) |
|
|
|
|
}) |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.log('****>',value) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
fetchMerchandiseNews(value){ //查询物料清单信息 |
|
|
|
|
fetchMerchandiseNews(value) { //查询物料清单信息 |
|
|
|
|
//查询大品类数据 |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
//你的逻辑代码 |
|
|
|
|
let par = { |
|
|
|
|
delFlag: 0, |
|
|
|
|
descriptionId:value, |
|
|
|
|
descriptionId: value |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
this.bigIdMerchandiseNewsList = []; |
|
|
|
|
let qc = []; |
|
|
|
|
let numberList = []; |
|
|
|
|
if(this.processMaterialsAllotListTable.columns[1].options.length > 0){ |
|
|
|
|
this.processMaterialsAllotListTable.columns[1].options = []; |
|
|
|
|
this.bigIdMerchandiseNewsList = [] |
|
|
|
|
let qc = [] |
|
|
|
|
let numberList = [] |
|
|
|
|
if (this.processMaterialsAllotListTable.columns[1].options.length > 0) { |
|
|
|
|
this.processMaterialsAllotListTable.columns[1].options = [] |
|
|
|
|
} |
|
|
|
|
this.$refs.processMaterialsAllotList.getValues((a,b,c)=>{ |
|
|
|
|
console.log(a,b,c) |
|
|
|
|
b.forEach(item =>{ |
|
|
|
|
if(item.equipment !== '' && item.equipment !== undefined && item.equipment !== null){ |
|
|
|
|
numberList.push(item.equipment); |
|
|
|
|
this.$refs.processMaterialsAllotList.getValues((a, b, c) => { |
|
|
|
|
console.log(a, b, c) |
|
|
|
|
b.forEach(item => { |
|
|
|
|
if (item.equipment !== '' && item.equipment !== undefined && item.equipment !== null) { |
|
|
|
|
numberList.push(item.equipment) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
getAction(this.url.merchandiseNewsList,par).then((res)=>{ |
|
|
|
|
if(res.success){ |
|
|
|
|
console.log(res.result); |
|
|
|
|
let newList = res.result; |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
getAction(this.url.merchandiseNewsList, par).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
console.log(res.result) |
|
|
|
|
let newList = res.result |
|
|
|
|
// console.log("12312312:"+numberList.length); |
|
|
|
|
if(numberList.length > 0){ |
|
|
|
|
newList.forEach( item => { |
|
|
|
|
if (numberList.length > 0) { |
|
|
|
|
newList.forEach(item => { |
|
|
|
|
qc.push({ |
|
|
|
|
title : item.materialsNumber, |
|
|
|
|
value : item.merchandiseNewsId, |
|
|
|
|
disabled : false |
|
|
|
|
title: item.materialsNumber, |
|
|
|
|
value: item.merchandiseNewsId, |
|
|
|
|
disabled: false |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
numberList.forEach( num => { |
|
|
|
|
qc.forEach( i => { |
|
|
|
|
if(num === i.value){ |
|
|
|
|
numberList.forEach(num => { |
|
|
|
|
qc.forEach(i => { |
|
|
|
|
if (num === i.value) { |
|
|
|
|
// console.log(num,i.value); |
|
|
|
|
i.disabled = true; |
|
|
|
|
i.disabled = true |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
this.processMaterialsAllotListTable.columns[1].options = qc; |
|
|
|
|
}else{ |
|
|
|
|
newList.forEach( item => { |
|
|
|
|
this.processMaterialsAllotListTable.columns[1].options = qc |
|
|
|
|
} else { |
|
|
|
|
newList.forEach(item => { |
|
|
|
|
this.processMaterialsAllotListTable.columns[1].options.push({ |
|
|
|
|
title : item.materialsNumber, |
|
|
|
|
value : item.merchandiseNewsId, |
|
|
|
|
disabled : false |
|
|
|
|
title: item.materialsNumber, |
|
|
|
|
value: item.merchandiseNewsId, |
|
|
|
|
disabled: false |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// console.log(this.processUdgetPlanMaterialTable.columns[1].options); |
|
|
|
|
resolve(this.bigIdMerchandiseNewsList = res.result ); |
|
|
|
|
resolve(this.bigIdMerchandiseNewsList = res.result) |
|
|
|
|
// return |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
descriptionFetchData(value){ //查询物料组 |
|
|
|
|
descriptionFetchData(value) { //查询物料组 |
|
|
|
|
//查询数据 |
|
|
|
|
let par = { |
|
|
|
|
delFlag: 0, |
|
|
|
|
accountingAttributes: value, |
|
|
|
|
accountingAttributes: value |
|
|
|
|
// sysOrgCode: this.data.sysOrgCode |
|
|
|
|
} |
|
|
|
|
getAction(this.url.descriptionRake,par).then((res)=>{ |
|
|
|
|
if(res.success){ |
|
|
|
|
getAction(this.url.descriptionRake, par).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
|
|
|
|
|
if(this.processMaterialsAllotListTable.columns[0].options.length > 0){ |
|
|
|
|
this.processMaterialsAllotListTable.columns[0].options = []; |
|
|
|
|
if (this.processMaterialsAllotListTable.columns[0].options.length > 0) { |
|
|
|
|
this.processMaterialsAllotListTable.columns[0].options = [] |
|
|
|
|
} |
|
|
|
|
res.result.forEach( item => { |
|
|
|
|
res.result.forEach(item => { |
|
|
|
|
this.processMaterialsAllotListTable.columns[0].options.push({ |
|
|
|
|
title : item.descriptionName, |
|
|
|
|
value : item.descriptionId, |
|
|
|
|
title: item.descriptionName, |
|
|
|
|
value: item.descriptionId |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
getAction(this.url.unitWasteNameUrl,null).then((res)=>{ |
|
|
|
|
if(res.success){ |
|
|
|
|
if(this.processMaterialsAllotListTable.columns[6].options.length > 0){ |
|
|
|
|
this.processMaterialsAllotListTable.columns[6].options = []; |
|
|
|
|
getAction(this.url.unitWasteNameUrl, null).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
if (this.processMaterialsAllotListTable.columns[6].options.length > 0) { |
|
|
|
|
this.processMaterialsAllotListTable.columns[6].options = [] |
|
|
|
|
} |
|
|
|
|
res.result.forEach( item => { |
|
|
|
|
res.result.forEach(item => { |
|
|
|
|
this.processMaterialsAllotListTable.columns[6].options.push({ |
|
|
|
|
title : item.departName, |
|
|
|
|
value : item.libraryAssociationIdInvisible, |
|
|
|
|
title: item.departName, |
|
|
|
|
value: item.libraryAssociationIdInvisible |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.materialGroupId = undefined; |
|
|
|
|
this.materialGroupId = undefined |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
materialType(val) { |
|
|
|
|
if (val !== undefined) { |
|
|
|
|
this.heid = false |
|
|
|
|
this.descriptionFetchData(val); |
|
|
|
|
this.descriptionFetchData(val) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
/*回显数据*/ |
|
|
|
|
init() { |
|
|
|
|
this.btndisabled = true |
|
|
|
|
var r = this.processData; |
|
|
|
|
this.getAssignees(r); |
|
|
|
|
var r = this.processData |
|
|
|
|
this.getAssignees(r) |
|
|
|
|
// console.log("2323232323232323232323232323232323232323",r) |
|
|
|
|
this.getAction(this.url.queryById, { |
|
|
|
|
id: r.tableId, |
|
|
|
@ -649,13 +657,13 @@
|
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
for (let i = 0; i < formData.processMaterialsAllotListList.length; i++) { |
|
|
|
|
if (i==0){ |
|
|
|
|
this.describes=formData.processMaterialsAllotListList[i].materialName |
|
|
|
|
}else { |
|
|
|
|
this.describes=this.describes+"---"+formData.processMaterialsAllotListList[i].materialName |
|
|
|
|
if (i == 0) { |
|
|
|
|
this.describes = formData.processMaterialsAllotListList[i].materialName |
|
|
|
|
} else { |
|
|
|
|
this.describes = this.describes + '---' + formData.processMaterialsAllotListList[i].materialName |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
formData.describes=this.describes; |
|
|
|
|
formData.describes = this.describes |
|
|
|
|
this.form.validateFields((err, values) => { |
|
|
|
|
if (!err) { |
|
|
|
|
formData.procDefId = this.processData.id |
|
|
|
@ -668,31 +676,31 @@
|
|
|
|
|
let method = 'post' |
|
|
|
|
if (!this.isNew) { |
|
|
|
|
url = this.url.editAlloApply |
|
|
|
|
method = 'put'; |
|
|
|
|
formData.assignees=this.assignees |
|
|
|
|
formData.tableName = this.processData.tableName; |
|
|
|
|
formData.procDefId = this.processData.procDefId; |
|
|
|
|
formData.procDeTitle = this.processData.processName; |
|
|
|
|
formData.title=this.processData.title; |
|
|
|
|
formData.processInstanceId=this.processData.id; |
|
|
|
|
if (!this.assignees){ |
|
|
|
|
method = 'put' |
|
|
|
|
formData.assignees = this.assignees |
|
|
|
|
formData.tableName = this.processData.tableName |
|
|
|
|
formData.procDefId = this.processData.procDefId |
|
|
|
|
formData.procDeTitle = this.processData.processName |
|
|
|
|
formData.title = this.processData.title |
|
|
|
|
formData.processInstanceId = this.processData.id |
|
|
|
|
if (!this.assignees) { |
|
|
|
|
this.$message.error('审批节点未分配候选审批人员,请联系管理员!') |
|
|
|
|
return; |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
console.log('提交方法', method) |
|
|
|
|
this.btndisabled = true |
|
|
|
|
httpAction(url,formData,method).then((res)=>{ |
|
|
|
|
if (res.success){ |
|
|
|
|
httpAction(url, formData, method).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
this.$message.success('提交申请成功!') |
|
|
|
|
//todo 将表单的数据传给父组件 |
|
|
|
|
this.$emit('loadData') |
|
|
|
|
this.close(); |
|
|
|
|
}else { |
|
|
|
|
this.close() |
|
|
|
|
} else { |
|
|
|
|
this.$message.error(res.message) |
|
|
|
|
} |
|
|
|
|
}).finally(()=>{ |
|
|
|
|
this.btndisabled = false; |
|
|
|
|
}).finally(() => { |
|
|
|
|
this.btndisabled = false |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -718,13 +726,13 @@
|
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
for (let i = 0; i < formData.processMaterialsAllotListList.length; i++) { |
|
|
|
|
if (i==0){ |
|
|
|
|
this.describes=formData.processMaterialsAllotListList[i].materialName |
|
|
|
|
}else { |
|
|
|
|
this.describes=this.describes+"---"+formData.processMaterialsAllotListList[i].materialName |
|
|
|
|
if (i == 0) { |
|
|
|
|
this.describes = formData.processMaterialsAllotListList[i].materialName |
|
|
|
|
} else { |
|
|
|
|
this.describes = this.describes + '---' + formData.processMaterialsAllotListList[i].materialName |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
formData.describes=this.describes; |
|
|
|
|
formData.describes = this.describes |
|
|
|
|
this.form.validateFields((err, values) => { |
|
|
|
|
if (!err) { |
|
|
|
|
formData.procDefId = this.processData.id |
|
|
|
@ -770,9 +778,15 @@
|
|
|
|
|
if (this.data.id != null && this.data.id != '' && this.data.id != undefined && this.data.fileId != null && this.data.fileId != '') { |
|
|
|
|
//1、文件回显 |
|
|
|
|
this.data = getRecord(this.data) |
|
|
|
|
} |
|
|
|
|
console.log(this.data.haveAndNot,"------------666666666666665555555555555555") |
|
|
|
|
|
|
|
|
|
if (this.data.haveAndNot==0){ |
|
|
|
|
this.isHava=true; |
|
|
|
|
this.disabled=true |
|
|
|
|
console.log(this.disabled,"55555555555555555555555") |
|
|
|
|
} |
|
|
|
|
let fieldval = pick(this.data, 'id', 'company', 'createTime', 'sysOrgCode', 'createBy', 'materialType', 'beAllotDepartment', 'fileId') |
|
|
|
|
let fieldval = pick(this.data, 'id', 'company', 'createTime', 'sysOrgCode', 'createBy', 'materialType', 'beAllotDepartment', 'fileId', 'haveAndNot') |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.form.setFieldsValue(fieldval) |
|
|
|
|
}) |
|
|
|
@ -804,18 +818,18 @@
|
|
|
|
|
validateError(msg) { |
|
|
|
|
this.$message.error(msg) |
|
|
|
|
}, |
|
|
|
|
Department(value){ |
|
|
|
|
if (value !== null || value !=='' || value !==undefined){ |
|
|
|
|
Department(value) { |
|
|
|
|
if (value !== null || value !== '' || value !== undefined) { |
|
|
|
|
let params = {} |
|
|
|
|
params.unit = value |
|
|
|
|
getAction(this.url.puwwlistByuntil, params).then((rest) => { |
|
|
|
|
console.log("rest>>>>>>>>>>>>>>>>>>>>>>>>>>>>",rest) |
|
|
|
|
if (rest.success && rest.result.total>0) { |
|
|
|
|
console.log('rest>>>>>>>>>>>>>>>>>>>>>>>>>>>>', rest) |
|
|
|
|
if (rest.success && rest.result.total > 0) { |
|
|
|
|
this.libraryAssociationIdInvisible = value |
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
this.libraryAssociationIdInvisible = 'ZK' |
|
|
|
|
} |
|
|
|
|
console.log("value>>>>>>>>>>>>>>>>>>>>>>>>>>>>",this.libraryAssociationIdInvisible) |
|
|
|
|
console.log('value>>>>>>>>>>>>>>>>>>>>>>>>>>>>', this.libraryAssociationIdInvisible) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -836,20 +850,24 @@
|
|
|
|
|
this.form.setFieldsValue(fieldval) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getAssignees(v){ |
|
|
|
|
getAction(this.url.getFirstNode,{procDefId:v.procDefId,tableId:v.tableId,tableName:v.tableName}).then(res => { |
|
|
|
|
getAssignees(v) { |
|
|
|
|
getAction(this.url.getFirstNode, { |
|
|
|
|
procDefId: v.procDefId, |
|
|
|
|
tableId: v.tableId, |
|
|
|
|
tableName: v.tableName |
|
|
|
|
}).then(res => { |
|
|
|
|
if (res.success) { |
|
|
|
|
if (res.result.users && res.result.users.length > 0) { |
|
|
|
|
// 默认勾选 |
|
|
|
|
let ids = []; |
|
|
|
|
let ids = [] |
|
|
|
|
res.result.users.forEach(e => { |
|
|
|
|
ids.push(e.username); |
|
|
|
|
}); |
|
|
|
|
this.assignees = ids.join(","); |
|
|
|
|
ids.push(e.username) |
|
|
|
|
}) |
|
|
|
|
this.assignees = ids.join(',') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|