|
@@ -667,7 +667,7 @@ export default {
|
|
|
textMap: {
|
|
|
update: '编辑',
|
|
|
create: '新增',
|
|
|
- see: '查看/特殊申购l',
|
|
|
+ see: '查看',
|
|
|
examine1: '审核1',
|
|
|
examine2: '审核2',
|
|
|
examine3: '审核3',
|
|
@@ -1387,6 +1387,12 @@ export default {
|
|
|
},
|
|
|
// 查看
|
|
|
form_see(row) {
|
|
|
+ // 查看/特殊申购
|
|
|
+ if(row.purchase_type == 1 || row.purchase_type == 3){
|
|
|
+ this.textMap.see = '特殊申购'
|
|
|
+ }else{
|
|
|
+ this.textMap.see = '查看'
|
|
|
+ }
|
|
|
this.dialogStatus = 'see'
|
|
|
this.dialogFormVisibleSee = true
|
|
|
this.seeTemp = Object.assign({}, row)
|
|
@@ -1395,12 +1401,12 @@ export default {
|
|
|
this.listSee = []
|
|
|
this.getdataListSee.parammaps.id = this.seeTemp.id
|
|
|
this.getSeeList()
|
|
|
+ },
|
|
|
+ getFlowPath(){
|
|
|
// 流程图
|
|
|
var reason = '未通过原因:' + this.seeTemp.workflowNote
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
if (this.seeTemp.purchase_type < 0 || this.seeTemp.purchase_type == 0 ) {
|
|
|
+ if(this.isApplyEx4 == true){
|
|
|
if (this.seeTemp.statue === 2) {
|
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '场长审核' },{ title: '采购审核' }]
|
|
|
this.active = 1
|
|
@@ -1423,8 +1429,8 @@ export default {
|
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '场长审核' }, { title: '采购审核' }]
|
|
|
this.active = 4
|
|
|
} else if (this.seeTemp.statue === 11) {
|
|
|
- this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }]
|
|
|
- this.active = 5
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }]
|
|
|
+ this.active = 5
|
|
|
} else if (this.seeTemp.statue === 12) {
|
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核' , date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson, status: 'error', reason: reason }, { title: '采购审核' }]
|
|
|
this.active = 5
|
|
@@ -1436,11 +1442,46 @@ export default {
|
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson },{ title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
|
|
|
this.active = 6
|
|
|
}
|
|
|
+ }else{
|
|
|
+ if (this.seeTemp.statue === 2) {
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '采购审核' }]
|
|
|
+ this.active = 1
|
|
|
+ } else if (this.seeTemp.statue === 3) {
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
|
|
|
+ this.active = 2
|
|
|
+ } else if (this.seeTemp.statue === 4) {
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
|
|
|
+ this.active = 2
|
|
|
+ } else if (this.seeTemp.statue === 9) {
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核' }, { title: '采购审核' }]
|
|
|
+ this.active = 3
|
|
|
+ } else if (this.seeTemp.statue === 10) {
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson, status: 'error', reason: reason }, { title: '供应主管审核' }, { title: '采购审核' }]
|
|
|
+ this.active = 3
|
|
|
+ } else if (this.seeTemp.statue === 5) {
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
|
|
|
+ this.active = 4
|
|
|
+ } else if (this.seeTemp.statue === 6) {
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '采购审核' }]
|
|
|
+ this.active = 4
|
|
|
+ } else if (this.seeTemp.statue === 11) {
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
|
|
|
+ this.active = 4
|
|
|
+ } else if (this.seeTemp.statue === 12) {
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
|
|
|
+ this.active = 4
|
|
|
+ } else if (this.seeTemp.statue === 7) {
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
|
|
|
+ this.active = 6
|
|
|
+ } else if (this.seeTemp.statue === 8) {
|
|
|
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
|
|
|
+ this.active = 6
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if(this.seeTemp.purchase_type == 3){
|
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }]
|
|
|
this.active = 1
|
|
|
}else {
|
|
|
- // 待写
|
|
|
if (this.seeTemp.statue === 2) {
|
|
|
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '财务审核' },{ title: '场长审核' },{ title: '采购审核' }]
|
|
|
this.active = 1
|
|
@@ -1482,10 +1523,9 @@ export default {
|
|
|
this.active = 7
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
getSeeList() {
|
|
|
+ this.listLoadingSee = true
|
|
|
GetDataByName(this.getdataListSee).then(response => {
|
|
|
if (response.data.list !== null) {
|
|
|
console.log('查看下方table数据', response.data.list)
|
|
@@ -1493,17 +1533,34 @@ export default {
|
|
|
this.listAdd = response.data.list
|
|
|
var sumPrices = 0
|
|
|
response.data.list.forEach(function(i,j){
|
|
|
- sumPrices = sumPrices + i["sumPrice"]
|
|
|
+ sumPrices = sumPrices + (parseFloat(i.price1) *parseFloat(i.amount) )
|
|
|
})
|
|
|
console.log("总价sumPrices",sumPrices)
|
|
|
- var priceObj = response.data.list.find(obj => obj.price >= 500)
|
|
|
+ var priceObj = false
|
|
|
+ var priceArr = []
|
|
|
+ response.data.list.forEach(function(i,j){
|
|
|
+ if(parseFloat(i.price1) * parseFloat(i.amount) >= 500){
|
|
|
+ priceArr.push(true)
|
|
|
+ }else{
|
|
|
+ priceArr.push(false)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ if (priceArr.includes(true)) {
|
|
|
+ priceObj = true
|
|
|
+ } else {
|
|
|
+ priceObj = false
|
|
|
+ }
|
|
|
console.log("priceObj",priceObj)
|
|
|
//总价大于2000 或单价>500
|
|
|
if(sumPrices >= 2000 || priceObj){
|
|
|
this.isApplyEx4 = true
|
|
|
+ this.getFlowPath()
|
|
|
} else {
|
|
|
this.isApplyEx4 = false
|
|
|
+ this.getFlowPath()
|
|
|
}
|
|
|
+
|
|
|
for (let i = 0; i < response.data.list.length; i++) {
|
|
|
if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
|
|
|
console.log(process.env.VUE_APP_BASE_API + response.data.list[i].srcpath, '=======1')
|
|
@@ -1520,8 +1577,6 @@ export default {
|
|
|
this.listAdd[i].srcpath = ''
|
|
|
this.listAdd[i].picpath = ''
|
|
|
}
|
|
|
- console.log(process.env.VUE_APP_BASE_API)
|
|
|
- console.log(this.listSee, '============')
|
|
|
}
|
|
|
}
|
|
|
if (response.data.total) {
|
|
@@ -1905,14 +1960,22 @@ export default {
|
|
|
this.requestParam.parammaps = {}
|
|
|
this.requestParam.parammaps.id = this.examineTemp.id
|
|
|
if (this.examineTemp.statue == 1) {
|
|
|
- if(this.isApplyEx4 == true){
|
|
|
- this.requestParam.parammaps.statue = 5
|
|
|
+ if(this.examineTemp.purchase_type !== 1 || this.examineTemp.purchase_type !== 3){
|
|
|
+ if(this.isApplyEx4 == true){
|
|
|
+ this.requestParam.parammaps.statue = 5
|
|
|
+ }else{
|
|
|
+ this.requestParam.parammaps.statue = 11
|
|
|
+ }
|
|
|
}else{
|
|
|
this.requestParam.parammaps.statue = 11
|
|
|
}
|
|
|
} else if (this.examineTemp.statue == 2) {
|
|
|
- if(this.isApplyEx4 == true){
|
|
|
- this.requestParam.parammaps.statue = 6
|
|
|
+ if(this.examineTemp.purchase_type !== 1 || this.examineTemp.purchase_type !== 3){
|
|
|
+ if(this.isApplyEx4 == true){
|
|
|
+ this.requestParam.parammaps.statue = 6
|
|
|
+ }else{
|
|
|
+ this.requestParam.parammaps.statue = 12
|
|
|
+ }
|
|
|
}else{
|
|
|
this.requestParam.parammaps.statue = 12
|
|
|
}
|