|
@@ -39,7 +39,7 @@
|
|
|
<span>{{ row.orderId }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="面积" align="center" width="130" prop="reportNo">
|
|
|
+ <el-table-column label="面积" align="center" width="130">
|
|
|
<template slot-scope="{row}">
|
|
|
<span>{{ row.acreage }}</span>
|
|
|
</template>
|
|
@@ -102,12 +102,12 @@
|
|
|
<el-table-column fixed="right" label="操作" width="130" align="center">
|
|
|
<template slot-scope="{row}">
|
|
|
<el-button round type="text" size="small" @click="orderDetail(row)">详情</el-button>
|
|
|
- <el-button type="text" size="small" @click="productionList(row)">产品包</el-button>
|
|
|
+ <el-button type="text" size="small" @click="productionList(row.id)">产品包</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</parentTable>
|
|
|
</y-page-list-layout>
|
|
|
- <el-dialog :visible.sync="productionListDialog" width="60%" center custom-class="doWarehouseClass">
|
|
|
+ <el-dialog :visible.sync="productionListDialog" width="60%" center custom-class="doWarehouseClass" @closed="cleanProductionListDialog()">
|
|
|
<el-collapse v-model="activeName" accordion v-if="bag.productions.length>0">
|
|
|
<el-collapse-item v-for="(r,index) in bag.productions" :name="index">
|
|
|
<template slot="title">
|
|
@@ -116,10 +116,11 @@
|
|
|
{{r.productionNo}}
|
|
|
</template>
|
|
|
<el-card style="margin-top:20px" shadow="hover">
|
|
|
- <div slot="header" class="clearfix">
|
|
|
- <!-- <span style="font-size:16px;font-weight:bold;">{{aliasProductionType(r.production)}}</span> -->
|
|
|
- <el-button v-if="(r.production!='STATEMENT' && r.repertoryState !=null && !r.repertoryState)"
|
|
|
- style="float: right; padding: 3px 0;margin-left:10px" type="text" @click="openApplyOutWarehouseList(bag)">出库申请</el-button>
|
|
|
+ <div slot="header" class="clearfix" >
|
|
|
+ <el-button v-if="(r.production!='STATEMENT' && r.repertoryState !=null && !r.repertoryState)"
|
|
|
+ style="float: right; padding: 3px 0;margin-left:10px" type="text" @click="openApplyOutWarehouseList(bag.businessId)">出库申请记录</el-button>
|
|
|
+ <el-button v-if="(taskId && r.production!='STATEMENT' && r.repertoryState !=null && !r.repertoryState)"
|
|
|
+ style="float: right; padding: 3px 0;margin-left:10px" type="text" @click="openOutApply(bag.businessId)">出库申请</el-button>
|
|
|
</div>
|
|
|
<el-form :model="r">
|
|
|
<el-row>
|
|
@@ -205,7 +206,6 @@
|
|
|
<el-empty v-else description="暂无产品"></el-empty>
|
|
|
</el-dialog>
|
|
|
<el-dialog :visible.sync="outWarehouseListDialog" width="70%" center custom-class="doWarehouseClass" >
|
|
|
- <el-button type="danger" round @click="outWarehouseDialog = true">新增出库申请</el-button>
|
|
|
<div style="margin-top:30px;">
|
|
|
<el-table
|
|
|
:data="outApllyList"
|
|
@@ -217,7 +217,7 @@
|
|
|
label="申请时实收款金额(元)"
|
|
|
width="180">
|
|
|
<template slot-scope="{row}">
|
|
|
- <span>{{ row.realAmount==null?'-': row.realAmount}}</span>
|
|
|
+ <span style="color:red;font-weight: bold;">{{ row.realAmount==null?'未收款': row.realAmount}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -376,7 +376,6 @@ export default {
|
|
|
bag:{
|
|
|
businessId:null,
|
|
|
businessType:null,
|
|
|
- reportNo:null,
|
|
|
productions:[]
|
|
|
},
|
|
|
activeName: '0',
|
|
@@ -393,6 +392,14 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getPage();
|
|
|
+ this.todoBusinessId = this.$route.query.todoBusinessId;
|
|
|
+ this.taskId = this.$route.query.tId;
|
|
|
+ this.currentNodeId = this.$route.query.cId;
|
|
|
+ this.orderId = this.$route.query.orderId;
|
|
|
+ if(this.todoBusinessId){
|
|
|
+ this.productionListDialog = true;
|
|
|
+ this.productionList(this.todoBusinessId)
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
getPage() {
|
|
@@ -431,12 +438,10 @@ export default {
|
|
|
orderDetail(row){
|
|
|
this.$router.push(`/personal/order?id=${row.id}&couldEdit=${false}&recall=${true}$couldBack=${true}&back=${'/personal/my/order'}`)
|
|
|
},
|
|
|
- productionList(row){
|
|
|
+ productionList(id){
|
|
|
this.productionListDialog = true;
|
|
|
- this.outWarehouse.orderFundId = row.orderFundId;
|
|
|
- this.outWarehouse.realAmount = row.realAmount;
|
|
|
- if (row.id){
|
|
|
- this.$api.businessProduction.personalBag(row.id).then(res=>{
|
|
|
+ if (id){
|
|
|
+ this.$api.businessProduction.personalBag(id).then(res=>{
|
|
|
if (res.code === 200 && res.data!=null){
|
|
|
let prods = res.data.productions
|
|
|
if (prods){
|
|
@@ -473,44 +478,97 @@ export default {
|
|
|
}
|
|
|
return '报告(技术报告、结果报告)'
|
|
|
},
|
|
|
- openApplyOutWarehouseList(bag){
|
|
|
- this.getListByBizTypeProductionId(bag.businessId);
|
|
|
+ openApplyOutWarehouseList(businessId){
|
|
|
+ this.getListByBizTypeProductionId(businessId);
|
|
|
this.outWarehouseListDialog = true;
|
|
|
- this.outWarehouse.businessType = 'PERSOANL_BUSINESS';
|
|
|
- this.outWarehouse.businessId = bag.businessId;
|
|
|
+
|
|
|
},
|
|
|
- getListByBizTypeProductionId(orderId){
|
|
|
- this.$api.productionOutWarehouse.getPersonalByOrderId(orderId).then(res=>{
|
|
|
+ getListByBizTypeProductionId(businessId){
|
|
|
+ this.$api.productionOutWarehouse.getPersonalByOrderId(businessId).then(res=>{
|
|
|
if (res.code === 200){
|
|
|
this.outApllyList = res.data;
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
doApplyOut(){
|
|
|
- let taskRecordDTO = new Object();
|
|
|
- taskRecordDTO.recordId = this.taskId;
|
|
|
- taskRecordDTO.taskData = this.outWarehouse;
|
|
|
- console.log(this.outWarehouse);
|
|
|
- this.$api.productionOutWarehouse.add(taskRecordDTO).then(res=>{
|
|
|
+ this.$refs.outWarehouse.validate(valid=>{
|
|
|
+ if (valid){
|
|
|
+ let taskRecordDTO = new Object();
|
|
|
+ taskRecordDTO.recordId = this.taskId;
|
|
|
+ taskRecordDTO.taskData = this.outWarehouse;
|
|
|
+ console.log(this.outWarehouse);
|
|
|
+ this.$api.productionOutWarehouse.add(taskRecordDTO).then(res=>{
|
|
|
+ if (res.code === 200 && res.data){
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '出库申请已提交',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ this.commitNode();
|
|
|
+ this.outWarehouseDialog = false;
|
|
|
+ this.outWarehouseListDialog = false;
|
|
|
+ this.productionListDialog = false;
|
|
|
+ }else {
|
|
|
+ this.$notify({
|
|
|
+ title: '失败',
|
|
|
+ message: '出库申请提交失败',
|
|
|
+ type: 'error',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ commitNode(){
|
|
|
+ let commit = new Object;
|
|
|
+ commit.instanceNodeId = this.currentNodeId;
|
|
|
+ commit.state = 'PASS';
|
|
|
+ commit.comments = this.outWarehouse.remark;
|
|
|
+ commit.businessSubId = this.orderId;
|
|
|
+ this.$api.workflow.commit(commit).then(res=>{
|
|
|
if (res.code === 200 && res.data){
|
|
|
this.$notify({
|
|
|
title: '成功',
|
|
|
- message: '出库申请已提交',
|
|
|
+ message: '工作流节点提交成功。',
|
|
|
type: 'success',
|
|
|
duration: 2000
|
|
|
});
|
|
|
- this.commitNode();
|
|
|
- this.outWarehouseDialog = false;
|
|
|
- this.outWarehouseListDialog = false;
|
|
|
- }else {
|
|
|
+ }else{
|
|
|
this.$notify({
|
|
|
title: '失败',
|
|
|
- message: '出库申请提交失败',
|
|
|
+ message: '工作流节点提交失败,请联系管理员。',
|
|
|
type: 'error',
|
|
|
duration: 2000
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ cleanProductionListDialog(){
|
|
|
+ this.bag.productions = [];
|
|
|
+ this.bag.businessId=null;
|
|
|
+ this.bag.property = null;
|
|
|
+ },
|
|
|
+ openOutApply(businessId){
|
|
|
+ const applys = this.outApllyList;
|
|
|
+ if (applys.length===0){
|
|
|
+ this.getListByBizTypeProductionId(businessId);
|
|
|
+ }
|
|
|
+ for (let i in applys){
|
|
|
+ if (applys[i].departmentCheckState==null){
|
|
|
+ this.$notify({
|
|
|
+ title: '提示',
|
|
|
+ message: '已有申请待审核,请勿重复申请。',
|
|
|
+ type: 'info',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.outWarehouse.businessType = 'PERSONAL_BUSINESS';
|
|
|
+ this.outWarehouse.businessId = businessId;
|
|
|
+ this.outWarehouseDialog = true;
|
|
|
}
|
|
|
},
|
|
|
|