Commit e41baeca authored by dcy's avatar dcy

退仓申请,审核中

parent 00aea215
......@@ -33,6 +33,14 @@ export function orderWarehouseInDelete(data){
data:data,
})
}
//获取退仓审批详情
export function getRollbackApprovalInfo(params){
return request({
url:'/order/order-warehouse-in/get-rollback-approval-info',
method:'get',
params
})
}
//通过bpmFormId 获得仓库审核单详情
export function warehouseApprovalGetByFormId(params){
return request({
......
......@@ -20,7 +20,9 @@
<work-flow xmlkey="retired_warehouse" v-model="params.copyUserId" />
</div>
<div>
<el-button @click="submit" type="primary" style="margin-right: 20px;">确定退仓</el-button>
<el-button v-if="isExamine" @click="submit" type="primary" style="margin-right: 20px;">确定退仓</el-button>
<el-button v-if="!isExamine" @click="$router.push({query:{id:details.formId},path:'/bpm/process-instance/detail'})" type="primary" style="margin-right: 20px;">审核中</el-button>
<el-button v-if="!isExamine" type="primary" style="margin-right: 20px;" @click="cancellationOfOrder">取消审核</el-button>
<el-button @click="$parent.show = false;">不,再考虑考虑</el-button>
</div>
</div>
......@@ -28,8 +30,12 @@
</template>
<!--退仓-->
<script>
import {getOrder} from "@/api/ecw/order";
import {orderWarehouseInDelete} from "@/api/ecw/batchSingleApplication";
import {cancelAdjust, getOrder} from "@/api/ecw/order";
import {
getRollbackApprovalInfo,
orderWarehouseInDelete,
warehouseApprovalCancel
} from "@/api/ecw/batchSingleApplication";
import workFlow from "@/components/WorkFlow";
export default {
......@@ -48,12 +54,25 @@ export default {
orderId:undefined,
orderNo:undefined,
reason:'',
copyUserId:[]
copyUserId:[],
},
isExamine:true,
details:{},
}
},
created() {
getOrder(this.orderId).then(r => this.orderDetails = r.data);
getRollbackApprovalInfo({orderId:this.orderId}).then(r => {
console.log(r)
if(r.data.status === 1){
this.details = r.data;
this.isExamine = false;
this.params.reason = JSON.parse(this.details.details).reason
}
})
},
methods:{
submit(){
......@@ -66,6 +85,26 @@ export default {
this.$parent.show = false
}
})
},
cancellationOfOrder(){
this.$prompt('请输入取消审核原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
warehouseApprovalCancel(this.details.id,value) .then(r => {
if(r.data){
this.$message.success('取消成功')
this.params = {}
this.$parent.show = false
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消成功'
});
});
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment