Browse Source

修改首页数据显示

dev
caoyizhong 2 years ago
parent
commit
de092a060a
  1. 18
      src/views/activiti/applyHome.vue
  2. 119
      src/views/activiti/form/ProcessMaterialsDeliveryForm.vue
  3. 14
      src/views/suppliesstronger/ProcessSuppliesStrongerList.vue

18
src/views/activiti/applyHome.vue

@ -9,10 +9,10 @@
<a-empty description="无流程可供选择" v-if="activeKeyAll.length==0" />
<div v-else >
<a-collapse v-model="activeKey">
<a-collapse-panel v-for="(value, index) in activeKeyAll" :header="filterDictText(dictOptions,value)||'未分类'" :key="value">
<a-collapse-panel v-for="(value, index) in activeKeyAll" :header="filterDictText(dictOptions,value)||'未分类'" :key="value" >
<a-list :grid="{ gutter: 20,column:4}" :dataSource="processDataMap[value]">
<a-list-item slot="renderItem" slot-scope="item" >
<a-card v-if="item.name=='预算计划采购流程'" v-has="'applyHome:planAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px'}" :headStyle="{'border-radius':'12px'}">
<template slot="renderItem" slot-scope="item" >
<a-card v-if="item.name=='预算计划采购流程'" style="margin-bottom: 1%" v-has="'applyHome:planAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px','width':'24%','display': 'inline-block','margin-right':'1%'}" :headStyle="{'border-radius':'12px'}">
<div slot="title">
<a-row style="text-align: center;">
<!-- <a-col span="12" :title="item.name">{{item.name}} </a-col>-->
@ -26,7 +26,7 @@
<br/>
<b>说明</b>{{item.description}}-->
</a-card>
<a-card v-if="item.name=='物资入库流程'" v-has="'applyHome:warehousingAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px'}" :headStyle="{'border-radius':'12px'}">
<a-card v-if="item.name=='物资入库流程'" v-has="'applyHome:warehousingAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px','width':'24%','display': 'inline-block','margin-right':'1%'}" :headStyle="{'border-radius':'12px'}">
<div slot="title">
<a-row style="text-align: center;">
<!-- <a-col span="12" :title="item.name">{{item.name}} </a-col>-->
@ -40,7 +40,7 @@
<br/>
<b>说明</b>{{item.description}}-->
</a-card>
<a-card v-if="item.name=='物资出库流程'" v-has="'applyHome:deliberyAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px'}" :headStyle="{'border-radius':'12px'}">
<a-card v-if="item.name=='物资出库流程'" v-has="'applyHome:deliberyAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px','width':'24%','display': 'inline-block','margin-right':'1%'}" :headStyle="{'border-radius':'12px'}">
<div slot="title">
<a-row style="text-align: center;">
<!-- <a-col span="12" :title="item.name">{{item.name}} </a-col>-->
@ -54,7 +54,7 @@
<br/>
<b>说明</b>{{item.description}}-->
</a-card>
<a-card v-if="item.name=='物资调拨流程'" v-has="'applyHome:allotAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px'}" :headStyle="{'border-radius':'12px'}">
<a-card v-if="item.name=='物资调拨流程'" v-has="'applyHome:allotAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px','width':'24%','display': 'inline-block','margin-right':'1%'}" :headStyle="{'border-radius':'12px'}">
<div slot="title">
<a-row style="text-align: center;">
<!-- <a-col span="12" :title="item.name">{{item.name}} </a-col>-->
@ -68,7 +68,7 @@
<br/>
<b>说明</b>{{item.description}}-->
</a-card>
<a-card v-if="item.name=='物资报废流程'" v-has="'applyHome:srcapAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px'}" :headStyle="{'border-radius':'12px'}">
<a-card v-if="item.name=='物资报废流程'" v-has="'applyHome:srcapAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px','width':'24%','display': 'inline-block','margin-right':'1%'}" :headStyle="{'border-radius':'12px'}">
<div slot="title">
<a-row style="text-align: center;">
<!-- <a-col span="12" :title="item.name">{{item.name}} </a-col>-->
@ -82,7 +82,7 @@
<br/>
<b>说明</b>{{item.description}}-->
</a-card>
<a-card v-if="item.name=='权限授权流程'" v-has="'applyHome:authAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px'}" :headStyle="{'border-radius':'12px'}">
<a-card v-if="item.name=='权限授权流程'" v-has="'applyHome:authAdd'" hoverable @click="chooseProcess(item)" class="forRadius" :style="{'background-color':item.color,'border-radius':'12px','width':'24%','display': 'inline-block','margin-right':'1%'}" :headStyle="{'border-radius':'12px'}">
<div slot="title">
<a-row style="text-align: center;">
<!-- <a-col span="12" :title="item.name">{{item.name}} </a-col>-->
@ -96,7 +96,7 @@
<br/>
<b>说明</b>{{item.description}}-->
</a-card>
</a-list-item>
</template>
</a-list>
</a-collapse-panel>
</a-collapse>

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

@ -397,6 +397,7 @@
queryById: '/hy/processMaterialsDelivery/queryById',
descriptionRake: '/suppliesstronger/processSuppliesStronger/descriptionName', //
wasteMaterialsUrl: '/wastematerials/processWasteMaterials/wasteMaterialsName', //
supplierUrl: '/suppliesstronger/processSuppliesStronger/merchandiseNews', //
merchandiseNewsList: '/suppliesstronger/processSuppliesStronger/merchandiseNews',
wasteMaterialsList: '/wastematerials/processWasteMaterials/merchandiseNewsName', //
puwwlist: '/unitwaste/processUnitWasteWarehouseCode/queryById',
@ -421,7 +422,8 @@
},
materialGroupId: undefined,
accountingAttributesVal: '',
hiegs: true
hiegs: true,
hiegkucun: []
}
},
props: {
@ -529,7 +531,7 @@
async chaKan(log) {
let pas = await log.target.getValuesPromise(log.rowIds)
// console.log("",pas);
console.log("执行了",pas);
if (!!pas[log.index].repertory) {
this.wateNumber = pas[log.index].repertory
} else {
@ -714,52 +716,77 @@
//
await this.getEquipmentAll(record.row.equipment)
eAll = 1
}
}
this.materialGroupId = record.row.equipment
}
console.log("this.data.materialType",this.deliveryType);
//
if (record.column.key == 'pleaseSendNumber' && isMA || record.column.key == 'actualSendNumber' && isMA) {
// console.log("333333333333")
let res = record.row
let materialName = {}
this.bigIdMerchandiseNewsList.forEach(item => {
if (item.merchandiseNewsId === record.row.equipment) {
materialName = {
residueNumber: item.residueNumber === undefined ? 0 : item.residueNumber
}
}
})
// if (eAll === 0) {
// if (parseInt(res.pleaseSendNumber) > parseInt(materialName.residueNumber)) {
// this.$message.warn('')
// res.pleaseSendNumber = materialName.residueNumber
// res.actualSendNumber = materialName.residueNumber
// } else {
// res.actualSendNumber = res.pleaseSendNumber
// }
// } else if (eAll === 1) {
// // console.log("000000000000000",this.equipmentAll);
// if (parseInt(res.pleaseSendNumber) > parseInt(this.equipmentAll[0].materialQuantity)) {
// this.$message.warn('')
// res.pleaseSendNumber = this.equipmentAll[0].materialQuantity
// res.actualSendNumber = this.equipmentAll[0].materialQuantity
// } else {
// res.actualSendNumber = res.pleaseSendNumber
console.log("执行了333333333333",record.row)
let res = record.row;
// let materialName = {}
// this.bigIdMerchandiseNewsList.forEach(item => {
// if (item.merchandiseNewsId === record.row.equipment) {
// // console.log("item.residueNumber",item)
// materialName = {
// residueNumber: item.residueNumber === undefined ? 0 : item.residueNumber
// }
// }
// } else if (eAll === 2) {
// // console.log("00000000000022222",this.equipmentAll);
// if (parseInt(res.pleaseSendNumber) > parseInt(this.equipmentAll[0].residueNumber)) {
// this.$message.warn('')
// res.pleaseSendNumber = this.equipmentAll[0].residueNumber
// res.actualSendNumber = this.equipmentAll[0].residueNumber
// } else {
// res.actualSendNumber = res.pleaseSendNumber
// }
// }
// })
if (eAll === 0 && !this.actualNumber) {
// console.log("hiegkucun111",this.hiegkucun);
this.hiegkucun.forEach( item =>{
// console.log("res.actualSendNumber",res.actualSendNumber,item);
if (parseInt(res.actualSendNumber) > parseInt(item.materialQuantity)) {
this.$message.warn('输入的实发数不能大于库存数')
// res.pleaseSendNumber = materialName.residueNumber
res.actualSendNumber = parseInt(item.materialQuantity);
} else {
res.actualSendNumber = res.actualSendNumber
}
})
} else if (eAll === 1 && !this.actualNumber) {
this.hiegkucun.forEach( item => {
if (parseInt(res.actualSendNumber) > parseInt(item.materialQuantity)) {
this.$message.warn('输入的实发数不能大于库存数')
// res.pleaseSendNumber = materialName.residueNumber
res.actualSendNumber = item.materialQuantity;
} else {
res.actualSendNumber = res.pleaseSendNumber;
}
})
console.log("000000000000000",this.equipmentAll);
// if (parseInt(res.pleaseSendNumber) > parseInt(this.equipmentAll[0].materialQuantity)) {
// this.$message.warn('')
// res.pleaseSendNumber = this.equipmentAll[0].materialQuantity
// res.actualSendNumber = this.equipmentAll[0].materialQuantity
// } else {
// res.actualSendNumber = res.pleaseSendNumber
// }
} else if (eAll === 2 && !this.actualNumber) {
this.hiegkucun.forEach( item => {
if (parseInt(res.actualSendNumber) > parseInt(item.materialQuantity)) {
this.$message.warn('输入的实发数不能大于库存数')
// res.pleaseSendNumber = materialName.residueNumber
res.actualSendNumber = item.materialQuantity;
} else {
res.actualSendNumber = res.pleaseSendNumber;
}
})
console.log("00000000000022222",this.equipmentAll);
// if (parseInt(res.pleaseSendNumber) > parseInt(this.equipmentAll[0].residueNumber)) {
// this.$message.warn('')
// res.pleaseSendNumber = this.equipmentAll[0].residueNumber
// res.actualSendNumber = this.equipmentAll[0].residueNumber
// } else {
// res.actualSendNumber = res.pleaseSendNumber
// }
}
if (res.id !== undefined) {
let value = [
{
@ -1630,8 +1657,16 @@
dataSource = result.records
}
}
// console.log('tab.dataSource', dataSource)
this.hiegkucun = [];
let numb = [];
dataSource.forEach(it =>{
getAction(this.url.supplierUrl,{merchandiseNewsId:it.equipment}).then( res =>{
// console.log("-=-=-=-=",res.result[0]);
numb.push(res.result[0]);
})
});
this.hiegkucun = numb;
console.log('tab.dataSource', dataSource)
dataSource.forEach(item => {
let par = { id: item.materialGroup }
let param = { id: item.equipment }

14
src/views/suppliesstronger/ProcessSuppliesStrongerList.vue

@ -204,6 +204,20 @@
// return 0;
// }
},
{
title:'科室消耗数量',
align:"center",
dataIndex: 'residueNumber',
customRender:function (t,r,index) {
// console.log(r)
if(r.residueNumber === undefined){
return 0;
}else{
return r.residueNumber;
}
}
},
{
title:'核算属性',
align:"center",

Loading…
Cancel
Save