Browse Source

防止重复

dev
kilo 2 years ago
parent
commit
3f4b0f096e
  1. 4
      src/views/activiti/form/ProcessMaterialWarehousingForm.vue
  2. 4
      src/views/activiti/form/ProcessMaterialsAllotForm.vue
  3. 4
      src/views/activiti/form/ProcessMaterialsDeliveryForm.vue
  4. 4
      src/views/activiti/form/ProcessPermissionAuthorizationForm.vue
  5. 4
      src/views/activiti/form/ProcessSmaterialsScrapForm.vue
  6. 61
      src/views/activiti/form/ProcessUdgetPlanForm.vue

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

@ -504,6 +504,7 @@
formData.title = this.processData.title formData.title = this.processData.title
formData.processInstanceId = this.processData.id formData.processInstanceId = this.processData.id
} }
if(this.btndisabled === false){
this.btndisabled = true this.btndisabled = true
httpAction(url, formData, method).then((res) => { httpAction(url, formData, method).then((res) => {
if (res.success) { if (res.success) {
@ -518,6 +519,7 @@
this.btndisabled = false this.btndisabled = false
}) })
} }
}
}) })
}) })
@ -562,6 +564,7 @@
method = 'put' method = 'put'
} }
console.log('格式化后的数据', formData) console.log('格式化后的数据', formData)
if(this.btndisabled === false){
this.btndisabled = true this.btndisabled = true
httpAction(url, formData, method).then((res) => { httpAction(url, formData, method).then((res) => {
if (res.success) { if (res.success) {
@ -575,6 +578,7 @@
this.btndisabled = false this.btndisabled = false
}) })
} }
}
}) })
}) })

4
src/views/activiti/form/ProcessMaterialsAllotForm.vue

@ -811,6 +811,7 @@
} }
} }
console.log('提交方法', method) console.log('提交方法', method)
if(this.btndisabled === false){
this.btndisabled = true this.btndisabled = true
httpAction(url, formData, method).then((res) => { httpAction(url, formData, method).then((res) => {
if (res.success) { if (res.success) {
@ -825,6 +826,7 @@
this.btndisabled = false this.btndisabled = false
}) })
} }
}
}) })
}) })
@ -870,6 +872,7 @@
method = 'put' method = 'put'
} }
console.log('提交方法', method) console.log('提交方法', method)
if (this.btndisabled === false){
this.btndisabled = true this.btndisabled = true
httpAction(url, formData, method).then((res) => { httpAction(url, formData, method).then((res) => {
if (res.success) { if (res.success) {
@ -883,6 +886,7 @@
this.btndisabled = false this.btndisabled = false
}) })
} }
}
}) })
}) })

4
src/views/activiti/form/ProcessMaterialsDeliveryForm.vue

@ -1364,6 +1364,7 @@
formData.processInstanceId = this.processData.id formData.processInstanceId = this.processData.id
} }
console.log('提交方法', method) console.log('提交方法', method)
if(this.btndisabled === false){
this.btndisabled = true this.btndisabled = true
httpAction(url, formData, method).then((res) => { httpAction(url, formData, method).then((res) => {
if (res.success) { if (res.success) {
@ -1378,6 +1379,7 @@
this.btndisabled = false this.btndisabled = false
}) })
} }
}
}) })
}) })
@ -1429,6 +1431,7 @@
method = 'put' method = 'put'
} }
console.log('提交方法', method) console.log('提交方法', method)
if (this.btndisabled === false){
this.btndisabled = true this.btndisabled = true
httpAction(url, formData, method).then((res) => { httpAction(url, formData, method).then((res) => {
if (res.success) { if (res.success) {
@ -1442,6 +1445,7 @@
this.btndisabled = false this.btndisabled = false
}) })
} }
}
}) })
}) })

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

@ -322,6 +322,7 @@
this.$message.error("授权开始时间不能大于授权结束时间") this.$message.error("授权开始时间不能大于授权结束时间")
return; return;
} }
if(this.btndisabled === false){
this.btndisabled = true; this.btndisabled = true;
httpAction(httpurl,formData,method).then((res)=>{ httpAction(httpurl,formData,method).then((res)=>{
if(res.success){ if(res.success){
@ -334,6 +335,7 @@
this.btndisabled = false; this.btndisabled = false;
}) })
} }
}
}) })
}, },
@ -365,6 +367,7 @@
this.$message.error("授权开始时间不能大于授权结束时间") this.$message.error("授权开始时间不能大于授权结束时间")
return; return;
} }
if (this.btndisabled === false){
this.btndisabled = true; this.btndisabled = true;
httpAction(httpurl,formData,method).then((res)=>{ httpAction(httpurl,formData,method).then((res)=>{
if(res.success){ if(res.success){
@ -376,6 +379,7 @@
this.btndisabled = false; this.btndisabled = false;
}) })
} }
}
}) })
}, },

4
src/views/activiti/form/ProcessSmaterialsScrapForm.vue

@ -580,6 +580,7 @@
} }
} }
console.log('提交方法', method) console.log('提交方法', method)
if(this.btndisabled === false){
this.btndisabled = true this.btndisabled = true
httpAction(url, formData, method).then((res) => { httpAction(url, formData, method).then((res) => {
if (res.success) { if (res.success) {
@ -594,6 +595,7 @@
this.btndisabled = false this.btndisabled = false
}) })
} }
}
}) })
}) })
@ -632,6 +634,7 @@
method = 'put' method = 'put'
} }
console.log('提交方法', method) console.log('提交方法', method)
if(this.btndisabled === false){
this.btndisabled = true this.btndisabled = true
httpAction(url, formData, method).then((res) => { httpAction(url, formData, method).then((res) => {
if (res.success) { if (res.success) {
@ -645,6 +648,7 @@
this.btndisabled = false this.btndisabled = false
}) })
} }
}
}) })
}) })

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

@ -502,8 +502,7 @@
materialType: { rules: [{ required: true, message: '请选择物资类型!' }] }, materialType: { rules: [{ required: true, message: '请选择物资类型!' }] },
needTime: { rules: [{ required: true, message: '请选择需求时间!' }] }, needTime: { rules: [{ required: true, message: '请选择需求时间!' }] },
processPlan: { rules: [{ required: true, message: '请选择流程计划!' }] }, processPlan: { rules: [{ required: true, message: '请选择流程计划!' }] },
sort: { sort: { rules: [{ required: true, type:'number', max:999999999999, message: '请输入序号!(0 ~ 12个字符)'},
rules: [{ required: true, type: 'number', max: 999999999999, message: '请输入序号!(0 ~ 12个字符)' }
// { type:'number', max:999999999999, message: ' 0 12 '} // { type:'number', max:999999999999, message: ' 0 12 '}
// {validator: this.lengthCheck} // {validator: this.lengthCheck}
] ]
@ -585,7 +584,7 @@
immediate: true, immediate: true,
handler: function(val) { handler: function(val) {
this.planType = val this.planType = val
console.log('this.planType---', this.planType) console.log("this.planType---",this.planType)
} }
} }
}, },
@ -613,15 +612,15 @@
lengthCheck(rule, value, callback){ lengthCheck(rule, value, callback){
if (value.toString().length >= 12 ){ if (value.toString().length >= 12 ){
// console.log(""); // console.log("");
callback('长度应当在0 ~ 12 字符') callback("长度应当在0 ~ 12 字符")
} }
}, },
selectRowChange(a, b, c) { selectRowChange(a, b, c) {
// console.log("",a,b,c); // console.log("",a,b,c);
}, },
shifu(){ shifu(){
console.log('执行了') console.log("执行了");
this.isShifu = true this.isShifu = true;
}, },
// handleChange(value, key, column) { // handleChange(value, key, column) {
@ -670,7 +669,7 @@
this.hiegs = false this.hiegs = false
// this.fetchData(); // this.fetchData();
// this.fetchDataRake() // this.fetchDataRake()
this.fetchMerchandiseNews() this.fetchMerchandiseNews();
} }
}, },
// //
@ -800,20 +799,20 @@
// } // }
// console.log("5555",record.row); // console.log("5555",record.row);
// if ( !!record.row.materialNumber && isEr) { // if ( !!record.row.materialNumber && isEr) {
let b = false let b = false;
if(this.isShifu){ if(this.isShifu){
// console.log("0",record); // console.log("0",record);
for (const res of this.bigIdMerchandiseNewsList) { for (const res of this.bigIdMerchandiseNewsList) {
if(res.id === record.row.materialNumber ){ if(res.id === record.row.materialNumber ){
b = true b = true;
} }
} }
if(!b){ if(!b){
// console.log("111"); // console.log("111");
await this.fetchMerchandiseNews(null, record.row.materialNumber) await this.fetchMerchandiseNews(null,record.row.materialNumber );
} }
} }
this.isShifu = false this.isShifu = false;
if(record.column.key !== 'materialPrice' && record.column.key !== 'materialQuantity'){ if(record.column.key !== 'materialPrice' && record.column.key !== 'materialQuantity'){
if ( !!record.row.materialNumber && this.isBu !== record.row.materialNumber ) { if ( !!record.row.materialNumber && this.isBu !== record.row.materialNumber ) {
// console.log("2"); // console.log("2");
@ -853,13 +852,14 @@
] ]
// console.log("sadf1111") // console.log("sadf1111")
this.$refs.processUdgetPlanMaterial.setValues(values) this.$refs.processUdgetPlanMaterial.setValues(values)
return return ;
} }
}) })
}) })
this.processUdgetPlanMaterialTable.columns[0].options.push({ this.processUdgetPlanMaterialTable.columns[0].options.push({
title: materialName.materialClassify, title: materialName.materialClassify,
value: materialName.descriptionId value: materialName.descriptionId
@ -879,12 +879,14 @@
} }
] ]
this.$refs.processUdgetPlanMaterial.setValues(values) this.$refs.processUdgetPlanMaterial.setValues(values)
this.isBu = record.row.materialNumber this.isBu = record.row.materialNumber;
isEr = false isEr = false
} }
} }
} }
if (!!record.row.materialQuantity && !!record.row.materialPrice && isEr ) { if (!!record.row.materialQuantity && !!record.row.materialPrice && isEr ) {
// record.row.materialAmount = record.row.materialQuantity * record.row.materialPrice; // record.row.materialAmount = record.row.materialQuantity * record.row.materialPrice;
// console.log("3"); // console.log("3");
@ -972,12 +974,12 @@
}) })
}) })
} }
this.bigIdMerchandiseNewsList = res.result this.bigIdMerchandiseNewsList = res.result;
// resolve( this.bigIdMerchandiseNewsList ); // resolve( this.bigIdMerchandiseNewsList );
} }
resolve(this.bigIdMerchandiseNewsList) resolve( this.bigIdMerchandiseNewsList );
})
}) })
});
}, },
// fetchMerchandiseNews(value){ // // fetchMerchandiseNews(value){ //
@ -1076,7 +1078,7 @@
id: r.tableId id: r.tableId
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
console.log('res.result.planType--', res.result.planType) console.log("res.result.planType--",res.result.planType)
this.$emit('planType',res.result.planType) this.$emit('planType',res.result.planType)
this.planType = res.result.planType this.planType = res.result.planType
let formData = res.result let formData = res.result
@ -1162,8 +1164,8 @@
formData.procDefId = this.processData.id formData.procDefId = this.processData.id
formData.procDeTitle = this.processData.name formData.procDeTitle = this.processData.name
formData.title = this.processData.description formData.title = this.processData.description
formData.planType = this.planType formData.planType=this.planType;
console.log('this.planType++', this.planType) console.log("this.planType++",this.planType)
if (!formData.tableName) formData.tableName = this.processData.businessTable if (!formData.tableName) formData.tableName = this.processData.businessTable
var url = this.url.addFromTableApply var url = this.url.addFromTableApply
let method = 'post' let method = 'post'
@ -1177,21 +1179,23 @@
formData.title = this.processData.title formData.title = this.processData.title
formData.processInstanceId = this.processData.id formData.processInstanceId = this.processData.id
} }
this.btndisabled = true
console.log(formData, '表单数据') console.log(formData, '表单数据')
if(this.btndisabled === false){
this.btndisabled = true
httpAction(url,formData,method).then((res)=>{ httpAction(url,formData,method).then((res)=>{
if (res.success){ if (res.success){
this.$message.success('提交申请成功!') this.$message.success("提交申请成功!")
//todo //todo
this.$emit('loadData') this.$emit('loadData')
this.close() this.close();
}else { }else {
this.$message.error(res.message) this.$message.error(res.message)
} }
}).finally(()=>{ }).finally(()=>{
this.btndisabled = false this.btndisabled = false;
}) })
} }
}
}) })
}) })
@ -1265,7 +1269,8 @@
for (let i = 0; i < this.listId.length; i++) { for (let i = 0; i < this.listId.length; i++) {
// console.log(this.listId[i])\ // console.log(this.listId[i])\
this.descriptionId(this.listId[i]) this.descriptionId(this.listId[i]);
this.fetchMerchandiseNews(this.listId[i]) this.fetchMerchandiseNews(this.listId[i])
} }
@ -1347,7 +1352,7 @@
formData.procDefId = this.processData.id formData.procDefId = this.processData.id
formData.procDeTitle = this.processData.name formData.procDeTitle = this.processData.name
formData.title = this.processData.description formData.title = this.processData.description
formData.planType = this.planType formData.planType=this.planType;
if (!formData.tableName) formData.tableName = this.processData.businessTable if (!formData.tableName) formData.tableName = this.processData.businessTable
var url = this.url.add var url = this.url.add
let method = 'post' let method = 'post'
@ -1355,8 +1360,9 @@
url = this.url.edit url = this.url.edit
method = 'put' method = 'put'
} }
this.btndisabled = true
console.log(formData, '格式化的数据') console.log(formData, '格式化的数据')
if(this.btndisabled === false){
this.btndisabled = true
httpAction(url,formData,method).then((res)=>{ httpAction(url,formData,method).then((res)=>{
if (res.success){ if (res.success){
//this.$message.success("") //this.$message.success("")
@ -1366,9 +1372,10 @@
this.$message.error(res.message) this.$message.error(res.message)
} }
}).finally(()=>{ }).finally(()=>{
this.btndisabled = false this.btndisabled = false;
}) })
} }
}
}) })
}) })

Loading…
Cancel
Save