Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
caoyizhong 2 years ago
parent
commit
848a957e3d
  1. 4
      src/views/accessrecords/statement/ProcessMaterialWarehousingStatement.vue
  2. 5
      src/views/accessrecords/statement/ProcessMaterialsPlanStatement.vue
  3. 4
      src/views/accessrecords/statement/ProcessMaterialsPlanStatement2.vue
  4. 1
      src/views/activiti/form/ProcessPermissionAuthorization.vue
  5. 134
      src/views/activiti/form/ProcessPermissionAuthorizationForm.vue

4
src/views/accessrecords/statement/ProcessMaterialWarehousingStatement.vue

@ -99,7 +99,7 @@
//
downWord() {
downFile(this.url.queryPlandDownWord, { id: this.queryParam.id }).then((data) => {
if (!data) {
if (!data.size>0) {
this.$message.warning("文件下载失败")
return
}
@ -116,7 +116,7 @@
},
previewWord() {
downFile(this.url.queryPlanPrevie, { id: this.queryParam.id }).then((data) => {
if (!data) {
if (!data.size>0) {
this.$message.warning("文件预览失败")
return
}

5
src/views/accessrecords/statement/ProcessMaterialsPlanStatement.vue

@ -97,7 +97,7 @@
//
downWord() {
downFile(this.url.queryPlandDownWord, { id: this.queryParam.id }).then((data) => {
if (!data) {
if (!data.size>0) {
this.$message.warning("文件下载失败")
return
}
@ -114,14 +114,13 @@
},
previewWord() {
downFile(this.url.queryPlanPrevie, { id: this.queryParam.id }).then((data) => {
if (!data) {
if (!data.size>0) {
this.$message.warning("文件预览失败")
return
}
console.log(data)
const blob = new Blob([data], { type: 'application/pdf' })
this.pdfSrc = window.URL.createObjectURL(blob)
console.log(this.pdfSrc)
window.open(this.pdfSrc)//
})
},

4
src/views/accessrecords/statement/ProcessMaterialsPlanStatement2.vue

@ -99,7 +99,7 @@
//
downWord() {
downFile(this.url.queryPlandDownWord, { id: this.queryParam.id }).then((data) => {
if (!data) {
if (!data.size>0) {
this.$message.warning("文件下载失败")
return
}
@ -116,7 +116,7 @@
},
previewWord() {
downFile(this.url.queryPlanPrevie, { id: this.queryParam.id }).then((data) => {
if (!data) {
if (!data.size>0) {
this.$message.warning("文件预览失败")
return
}

1
src/views/activiti/form/ProcessPermissionAuthorization.vue

@ -28,7 +28,6 @@
components: { ProcessPermissionAuthorizationForm, historicPictrue, historicDetail },
data() {
return {
isNew: ''
}
},
props: {

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

@ -218,6 +218,7 @@
let company = sessionStorage.getItem("PARENT_ID");
let userInfo=sessionStorage.getItem("USER_INFORMATION");
console.log(this.isNew,"++++++++++++++++++")
if (!this.isNew){
this.init();
}else {
@ -240,7 +241,7 @@
let formData = res.result;
formData.tableName = r.tableName;
this.data = formData;
console.log("表单回显数据",this.data)
console.log("表单回显数据-----------",this.data)
this.editAfter();
this.btndisabled = false;
}else {
@ -251,7 +252,7 @@
add () {
this.edit({});
},
edit (record) {
editAfter (record) {
this.form.resetFields();
this.model = Object.assign({}, record);
this.visible = true;
@ -260,8 +261,9 @@
this.data = getRecord(this.data)
}
console.log(this.data,"89898989")
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.data,'company','createTime','departId','createBy','authorizationPerson','authorizedPerson','privilegedTimeStart','privilegedTimeEnd','continueAuthorize','privilegedAffirmedTime','authorizationNumberDays','fileId','opinion'))
this.form.setFieldsValue(pick(this.data,'id','company','createTime','departId','createBy','authorizationPerson','authorizedPerson','privilegedTimeStart','privilegedTimeEnd','continueAuthorize','privilegedAffirmedTime','authorizationNumberDays','fileId','opinion'))
})
},
close() {
@ -289,74 +291,51 @@
},
/*提交申请*/
applySubmit(e) {
this.getAllTable().then(tables => {
return validateFormAndTables(this.form, tables)
}).then(allValues=>{
if (typeof this.classifyIntoFormData !== 'function') {
throw this.throwNotFunction('classifyIntoFormData')
}
let formData = this.classifyIntoFormData(allValues)
//
for (let i = 0; i < formData.processUdgetPlanMaterialList.length; i++) {
this.materialAmount=this.materialAmount+ formData.processUdgetPlanMaterialList[i].materialAmount;
if (i==0){
this.describes=formData.processUdgetPlanMaterialList[i].materialName
}else {
this.describes=this.describes+"---"+formData.processUdgetPlanMaterialList[i].materialName
const that = this;
//
this.form.validateFields((err, values) => {
if (!err) {
let httpurl = '';
let method = '';
let formData = Object.assign(this.model, values);
formData.procDefId = this.processData.id;
formData.procDeTitle = this.processData.name;
formData.title=this.processData.description;
formData.fileId = getStringArry(formData.fileId)
if (!formData.tableName)formData.tableName = this.processData.businessTable;
if(!formData.id){
httpurl+=this.url.addAuthorizationApply;
method = 'post';
}else{
httpurl+=this.url.editAuthorizationApply;
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
}
}
formData.fileId = getStringArry(formData.fileId)
formData.materialPrice=this.materialPrice;
formData.materialAmount=this.materialAmount;
formData.describes=this.describes;
if (new Date(formData.createTime).getTime()/100>new Date(formData.needTime).getTime()/100){
this.$message.error("需求时间不能小于当前流程发起时间")
return;
console.log('格式化后的数据---',method)
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){
this.$emit('loadData')
this.close();
}else{
that.$message.warning(res.message);
}
}).finally(() => {
this.btndisabled = false;
})
}
console.log(this.materialAmount,'采购总价')
console.log(this.opinion,'流程说明')
this.form.validateFields((err, values) => {
if (!err) {
formData.procDefId = this.processData.id;
formData.procDeTitle = this.processData.name;
formData.title=this.processData.description;
if (!formData.tableName)formData.tableName = this.processData.businessTable;
var url = this.url.addAuthorizationApply;
let method='post';
if (!this.isNew){
url = this.url.editAuthorizationApply;
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;
}
}
this.btndisabled = true;
console.log(formData,'表单数据')
httpAction(url,formData,method).then((res)=>{
if (res.success){
this.$message.success('提交申请成功!')
//todo
this.$emit('loadData')
this.close();
}else {
this.$message.error(res.message)
}
}).finally(()=>{
this.btndisabled = false;
})
}
})
})
},
handleSubmit () {
const that = this;
@ -365,20 +344,22 @@
if (!err) {
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
let formData = Object.assign(this.model, values);
formData.procDefId = this.processData.id;
formData.procDeTitle = this.processData.name;
formData.title=this.processData.description;
formData.fileId = getStringArry(formData.fileId)
if (!formData.tableName)formData.tableName = this.processData.businessTable;
console.log('格式化后的数据',formData)
if(!formData.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
console.log('格式化后的数据---',method)
console.log("表单提交数据",formData)
if (new Date(formData.privilegedTimeStart).getTime()/100>=new Date(formData.privilegedTimeEnd).getTime()/100){
this.$message.error("授权开始时间不能大于授权结束时间")
@ -387,8 +368,7 @@
this.btndisabled = true;
httpAction(httpurl,formData,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('afterSubmit',formData);
this.$emit('afterSubmit',formData)
}else{
that.$message.warning(res.message);
}

Loading…
Cancel
Save