Browse Source

权限授权自动结算天数,自动填写物资类型,加入我的申请

dev
0.0 2 years ago
parent
commit
1fdd8314ab
  1. 4
      src/components/jeecg/HPlan.vue
  2. 2
      src/components/jeecg/modal/ProcessPlan.vue
  3. 21
      src/views/activiti/form/ProcessMaterialWarehousingForm.vue
  4. 84
      src/views/activiti/form/ProcessPermissionAuthorizationForm.vue
  5. 7
      src/views/activiti/form/ProcessUdgetPlanForm.vue

4
src/components/jeecg/HPlan.vue

@ -193,16 +193,18 @@
this.showText =rows[0].id
// update--end--autor:lvdandan-----date:20200630------for------
}
console.log("传过来的值>>>>>>>>>>>",rows[0].materialType)
if (this.triggerChange) {
//v-dectriggerChangetrue form setFieldsValue
this.$emit('callback', rows[0].id)
this.$emit('mounted', rows[0].id)
this.$emit('callType', rows[0].materialType)
} else {
//v-model field
// this.$emit("input",row[orgFieldsArr[destFieldsArr.indexOf(this.field)]])
this.$emit('input', this.showText, rows[0])
this.$emit('mounted', rows[0].id)
console.log(rows[0].id)
this.$emit('callType', rows[0].materialType)
}
}
}

2
src/components/jeecg/modal/ProcessPlan.vue

@ -366,8 +366,6 @@
this.$message.warning('请选择一条记录')
return false
}
console.log(this.selectionRows)
this.$emit('ok', this.selectionRows)
this.close()
},

21
src/views/activiti/form/ProcessMaterialWarehousingForm.vue

@ -27,7 +27,7 @@
<a-col :span="8" >
<a-form-item label="关联预算流程" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-input v-decorator="['processUdgetPlanId']" placeholder="请输入关联预算流程" ></a-input>-->
<h-plan v-decorator="['processUdgetPlanId',validatorRules.processUdgetPlanId]" :trigger-change="true" code="demo" field="name" orgFields="name" @mounted="getPlanList" destFields="name" :multi="true"/>
<h-plan v-decorator="['processUdgetPlanId',validatorRules.processUdgetPlanId]" :trigger-change="true" code="demo" field="name" orgFields="name" @mounted="getPlanList" @callType="getcallType" destFields="name" :multi="true"/>
<!-- <j-popup-->
<!-- v-decorator="['one']"-->
<!-- :trigger-change="true"-->
@ -40,7 +40,7 @@
<a-col :span="8" >
<a-form-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag type="list" v-decorator="['materialType']" :trigger-change="true" dictCode="material_type"
placeholder="请选择物资类型"/>
placeholder="物资类型" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" >
@ -539,6 +539,23 @@ import JSelectCompany from '../../../components/jeecgbiz/JSelectCompany'
// }
// })
},
getcallType(type){
console.log("传过来的类型>>>>>>>>>>>>",type)
let param={}
param.materialType = type;
this.data=param;
let fieldval =pick(this.data,'materialType')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
// params.id=id;
// this.requestSubTableData(this.url.list, params, this.processMaterialWarehousingListTable)
// getAction(this.url.list,params).then((res)=>{
// if(res.success){
// console.log('',res.result)
// }
// })
},
popupCallback(company,row) {
let res=JSON.parse(row);
console.log('获取我的数据',res.id)

84
src/views/activiti/form/ProcessPermissionAuthorizationForm.vue

@ -10,7 +10,7 @@
</a-col>
<a-col :span="12">
<a-form-item label="流程发起时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" style="width: 100%" />
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
@ -34,28 +34,28 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="授权时间(开启时间)" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择授权时间(开启时间)" v-decorator="['privilegedTimeStart',validatorRules.privilegedTimeStart]" :trigger-change="true" style="width: 100%" />
<a-form-item label="授权开启时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择授权时间(开启时间)" v-decorator="['privilegedTimeStart',validatorRules.privilegedTimeStart]" @change="dateback" :trigger-change="true" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="授权时间(结束时间)" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择授权时间(结束时间)" v-decorator="['privilegedTimeEnd',validatorRules.privilegedTimeEnd]" :trigger-change="true" style="width: 100%" />
<a-form-item label="授权结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择授权时间(结束时间)" v-decorator="['privilegedTimeEnd',validatorRules.privilegedTimeEnd]" @change="dateback2" :trigger-change="true" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="是否继续授权" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-switch v-decorator="['continueAuthorize']" ></j-switch>
<j-dict-select-tag v-decorator="['continueAuthorize', {}]" placeholder="是否继续授权" :type="'radio'" :triggerChange="true" dictCode="authorize_code"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="授权时间(确认时间)" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['privilegedAffirmedTime',validatorRules.privilegedAffirmedTime]" placeholder="请输入授权时间(确认时间)" ></a-input>
<a-form-item label="授权确认时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择授权时间(确认时间)" v-decorator="['privilegedAffirmedTime',validatorRules.privilegedAffirmedTime]" :trigger-change="true" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="授权天数" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input-number v-decorator="['authorizationNumberDays',validatorRules.authorizationNumberDays]" placeholder="请输入授权天数" style="width: 100%" />
<a-input-number v-decorator="['authorizationNumberDays']" placeholder="授权天数" style="width: 100%" disabled/>
</a-form-item>
</a-col>
<!-- <a-col :span="12">-->
@ -259,7 +259,6 @@
//
this.form.validateFields((err, values) => {
if (!err) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
@ -270,16 +269,26 @@
method = 'put';
}
let formData = Object.assign(this.model, values);
formData.procDefId = this.processData.id;
formData.procDeTitle = this.processData.name;
formData.title=this.processData.description;
if (!formData.tableName)formData.tableName = this.processData.businessTable;
console.log('格式化后的数据',formData)
console.log("表单提交数据",formData)
if (new Date(formData.privilegedTimeStart).getTime()/100>=new Date(formData.privilegedTimeEnd).getTime()/100){
this.$message.error("授权开始时间不能大于授权结束时间")
return;
}
this.btndisabled = true;
httpAction(httpurl,formData,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
that.$emit('afterSubmit',formData);
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
this.btndisabled = false;
})
}
@ -300,6 +309,57 @@
this.form.setFieldsValue(fieldval)
})
},
dateback(data){
if (this.form.getFieldsValue().privilegedTimeEnd !== undefined){
let date = new Date(this.form.getFieldsValue().privilegedTimeEnd).getTime();
let time = new Date(data).getTime();
if (time >= date){
let param={}
param.authorizationNumberDays = Number(0);
this.data=param;
let fieldval =pick(this.data,'authorizationNumberDays')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
this.$message.warning('开始时间不能大于等于结束时间');
}else {
let day = (date - time)/(1000*3600*24)
let param={}
param.authorizationNumberDays = Number(day);
this.data=param;
let fieldval =pick(this.data,'authorizationNumberDays')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
}
}
},
dateback2(data){
if (this.form.getFieldsValue().privilegedTimeStart !== undefined){
let date = new Date(this.form.getFieldsValue().privilegedTimeStart).getTime();
let time = new Date(data).getTime();
if (time <= date){
let param={}
param.authorizationNumberDays = Number(0);
this.data=param;
let fieldval =pick(this.data,'authorizationNumberDays')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
this.$message.warning('结束时间不能小于等于结束时间');
}else {
let day = ( time- date)/(1000*3600*24)
let param={}
param.authorizationNumberDays = Number(day);
this.data=param;
let fieldval =pick(this.data,'authorizationNumberDays')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
}
}
},
}
}
</script>

7
src/views/activiti/form/ProcessUdgetPlanForm.vue

@ -649,9 +649,9 @@
processUdgetPlanMaterialList: allValues.tablesValue[0].values
}
},
orgCodeTxt(a){
console.log("当前选中用户部门",a)
},
// orgCodeTxt(a){
// console.log("",a)
// },
//
showFlowData() {
if (this.formBpm === true) {
@ -671,7 +671,6 @@
let res=JSON.parse(row);
console.log('获取我的数据',res.id)
let param={}
param.createBy=res.username;
param.company=company;
param.sysOrgCode=res.departIds;

Loading…
Cancel
Save