|
@@ -330,6 +330,8 @@
|
|
|
<el-input v-model="scope.row.purpose" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- <el-table-column label="使用周期" min-width="120px" align="center" prop="lifeCycle" />
|
|
|
+ <el-table-column label="合同差异项" min-width="120px" align="center" prop="contractVarianceItem" /> -->
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
@@ -387,8 +389,8 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="申购日期:" prop="createTime">
|
|
|
- <el-date-picker v-model="seeTemp.createTime" :picker-options="pickerOptions" type="date" placeholder="申购日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" disabled />
|
|
|
+ <el-form-item label="申购日期:" prop="inputTime">
|
|
|
+ <el-date-picker v-model="seeTemp.inputTime" :picker-options="pickerOptions" type="date" placeholder="申购日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8" v-if="seeTemp.purchaseType == '2'">
|
|
@@ -473,11 +475,9 @@
|
|
|
<el-table-column label="现有库存" sortable prop="storageAmount" align="center" min-width="60" />
|
|
|
<el-table-column label="价格" sortable prop="price" align="center" min-width="60" />
|
|
|
<el-table-column label="申购数量" sortable prop="amount" align="center" min-width="60" />
|
|
|
- <el-table-column label="备注" min-width="110px" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ scope.row.purpose }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <!-- <el-table-column label="使用周期" min-width="120px" align="center" prop="lifeCycle" />
|
|
|
+ <el-table-column label="合同差异项" min-width="120px" align="center" prop="contractVarianceItem" /> -->
|
|
|
+ <el-table-column label="备注" min-width="110px" align="center" prop="purpose" />
|
|
|
</el-table>
|
|
|
<el-form
|
|
|
ref="seeTemp"
|
|
@@ -667,7 +667,7 @@ export default {
|
|
|
textMap: {
|
|
|
update: '编辑',
|
|
|
create: '新增',
|
|
|
- see: '查看/特殊申购l',
|
|
|
+ see: '查看',
|
|
|
examine1: '审核1',
|
|
|
examine2: '审核2',
|
|
|
examine3: '审核3',
|
|
@@ -803,6 +803,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
apply_subscribeData:{},
|
|
|
+ isApplyEx4:true,
|
|
|
myHeight:document.documentElement.clientHeight - 85- 150
|
|
|
}
|
|
|
},
|
|
@@ -1386,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)
|
|
@@ -1393,13 +1400,14 @@ export default {
|
|
|
console.log('查看上方数据(从table读取)', this.seeTemp)
|
|
|
this.listSee = []
|
|
|
this.getdataListSee.parammaps.id = this.seeTemp.id
|
|
|
+ this.isApplyEx4 = false
|
|
|
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
|
|
@@ -1422,8 +1430,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
|
|
@@ -1435,11 +1443,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
|
|
@@ -1481,15 +1524,44 @@ 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)
|
|
|
this.listSee = response.data.list
|
|
|
this.listAdd = response.data.list
|
|
|
+ var sumPrices = 0
|
|
|
+ response.data.list.forEach(function(i,j){
|
|
|
+ sumPrices = sumPrices + (parseFloat(i.price1) *parseFloat(i.amount) )
|
|
|
+ })
|
|
|
+ console.log("总价sumPrices",sumPrices)
|
|
|
+ var priceObj = false
|
|
|
+ var priceArr = []
|
|
|
+ response.data.list.forEach(function(i,j){
|
|
|
+ if(parseFloat(i.price1) >= 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')
|
|
@@ -1506,8 +1578,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) {
|
|
@@ -1869,17 +1939,21 @@ export default {
|
|
|
this.examineTemp = this.seeTemp
|
|
|
this.$set(this.seeTemp, 'statue', 1)
|
|
|
this.$set(this.seeTemp, 'workflowNote', '')
|
|
|
+ this.getdataListSee.parammaps.id = this.seeTemp.id
|
|
|
} else {
|
|
|
this.examineTemp = Object.assign({}, row)
|
|
|
+ this.getdataListSee.parammaps.id = this.examineTemp.id
|
|
|
this.$set(this.examineTemp, 'statue', 1)
|
|
|
this.$set(this.examineTemp, 'workflowNote', '')
|
|
|
}
|
|
|
+ this.getSeeList()
|
|
|
this.dialogStatus = 'examine3'
|
|
|
this.dialogFormVisible_Examine = true
|
|
|
this.statueReason = false
|
|
|
},
|
|
|
createExamineData3() {
|
|
|
console.log('点击了供应主管审核')
|
|
|
+ console.log(this.isApplyEx4,'=====')
|
|
|
this.isokDisable = true
|
|
|
setTimeout(() => {
|
|
|
this.isokDisable = false
|
|
@@ -1891,12 +1965,30 @@ export default {
|
|
|
this.requestParam.parammaps = {}
|
|
|
this.requestParam.parammaps.id = this.examineTemp.id
|
|
|
if (this.examineTemp.statue == 1) {
|
|
|
- this.requestParam.parammaps.statue = 5
|
|
|
+ if(this.examineTemp.purchase_type !== 1 && this.examineTemp.purchase_type !== 3){
|
|
|
+ console.log(this.isApplyEx4,'=====')
|
|
|
+ if(this.isApplyEx4 == true){
|
|
|
+ this.requestParam.parammaps.statue = 5
|
|
|
+ }else{
|
|
|
+ this.requestParam.parammaps.statue = 11
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.requestParam.parammaps.statue = 5
|
|
|
+ }
|
|
|
} else if (this.examineTemp.statue == 2) {
|
|
|
- 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 = 6
|
|
|
+ }
|
|
|
}
|
|
|
this.requestParam.parammaps.empId = Cookies.get('employeid')
|
|
|
this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
|
|
|
+ // return false
|
|
|
PostDataByName(this.requestParam).then(response => {
|
|
|
console.log('审核确认发送参数', this.requestParam)
|
|
|
this.isokDisable = false
|