工地直转直转单接口对接
This commit is contained in:
parent
56292de5dd
commit
34d55b59e0
|
|
@ -46,7 +46,14 @@ export function passWorkSite(params = {}){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//直转申请审批-拒绝
|
||||||
|
export function refuseWorkSite(params = {}){
|
||||||
|
return request({
|
||||||
|
url:'/material/workSite/refuse',
|
||||||
|
method: 'post',
|
||||||
|
data:params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,29 +111,28 @@
|
||||||
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
|
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.status==0">待审批</span>
|
<span v-if="scope.row.status==0">待审批</span>
|
||||||
<span v-if="scope.row.status==1">审批同意</span>
|
<span v-if="scope.row.status==1" style="color:#02A7F0">审批同意</span>
|
||||||
|
<span v-if="scope.row.status==2" style="color:red">审批拒绝</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="不通过原因" align="center" prop="dictName" :show-overflow-tooltip="true" /> -->
|
<!-- <el-table-column label="不通过原因" align="center" prop="dictName" :show-overflow-tooltip="true" /> -->
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
>查看</el-button>
|
>查看</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="primary"
|
||||||
icon="el-icon-edit"
|
v-if="scope.row.status==0"
|
||||||
@click="handleExame(scope.row)"
|
@click="handleExame(scope.row)"
|
||||||
>审核</el-button>
|
>审核</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="info"
|
||||||
icon="el-icon-edit"
|
@click="handlePrint(scope.row)"
|
||||||
>直转单</el-button>
|
>直转单</el-button>
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|
@ -295,19 +294,77 @@
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer" style="text-align: right" v-if="handleState==2">
|
<div slot="footer" class="dialog-footer" style="text-align: right" v-if="handleState==2">
|
||||||
<el-button type="primary" @click="pass">同意</el-button>
|
<el-button type="primary" @click="pass">同意</el-button>
|
||||||
<el-button type="danger" >不同意</el-button>
|
<el-button type="danger" @click="refuse">不同意</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 直转单弹窗 -->
|
||||||
|
<el-dialog :visible.sync="openPrint" width="1000px" append-to-body>
|
||||||
|
<div style="height: 500px;overflow-y: scroll;padding: 0 20px;">
|
||||||
|
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
|
||||||
|
<div class="title" style="text-align: center;font-weight: 600;font-size: 16px;">
|
||||||
|
直转单
|
||||||
|
</div>
|
||||||
|
<div class="info" style="margin-top: 10px;display: flex;flex-wrap: wrap;">
|
||||||
|
<div class="item" style="width: 40%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||||
|
<span>退料单位:</span> {{ dialogParams.backUnitName }}
|
||||||
|
</div>
|
||||||
|
<div class="item" style="width: 60%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||||
|
<span>退料工程:</span> {{ dialogParams.backProName }}
|
||||||
|
</div>
|
||||||
|
<div class="item" style="width: 40%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||||
|
<span>领料单位:</span> {{ dialogParams.leaseUnitName }}
|
||||||
|
</div>
|
||||||
|
<div class="item" style="width: 60%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||||
|
<span>领料工程:</span> {{ dialogParams.leaseProName }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%;">
|
||||||
|
<el-table :data="deviceList" class="table" border style="margin-top: 20px;padding: 1px;width: 100%;">
|
||||||
|
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||||
|
<el-table-column label="序号" align="center" type="index" />
|
||||||
|
<el-table-column label="机具名称" align="center" prop="typeName" />
|
||||||
|
<el-table-column label="规格型号" align="center" prop="typeModelName"/>
|
||||||
|
<el-table-column label="计量单位" align="center" prop="unitName" />
|
||||||
|
<el-table-column label="设备编码" align="center" prop="maCode" />
|
||||||
|
<el-table-column label="直转数量" align="center" prop="directNum" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="fillIn" style="margin-top: 30px;display: flex;justify-content: space-between;">
|
||||||
|
<div class="item" style="width: 25%;">
|
||||||
|
<span>审核:</span>
|
||||||
|
</div>
|
||||||
|
<div class="item" style="width: 25%;">
|
||||||
|
<span>办理人:</span>
|
||||||
|
</div>
|
||||||
|
<div class="item" style="width: 25%;">
|
||||||
|
<span>操作人:</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</vue-easy-print>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
|
<el-button type="primary" @click="print">打 印</el-button>
|
||||||
|
<el-button @click="openPrint = false">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getUnitList, getProjectList, getProData, getUnitData, getAgreementInfoById,} from "@/api/claimAndRefund/receive";
|
import { getUnitList, getProjectList, getProData, getUnitData, getAgreementInfoById,} from "@/api/claimAndRefund/receive";
|
||||||
import { getWorkSiteList,getUseringData,submitWorkSite,getDetailInfo,passWorkSite } from "@/api/claimAndRefund/constructionSite";
|
import { getWorkSiteList,getUseringData,submitWorkSite,getDetailInfo,passWorkSite, refuseWorkSite } from "@/api/claimAndRefund/constructionSite";
|
||||||
import { getInfo } from '@/api/login'
|
import { getInfo } from '@/api/login'
|
||||||
|
import vueEasyPrint from 'vue-easy-print';
|
||||||
export default {
|
export default {
|
||||||
name: "ConstructionSite",
|
name: "ConstructionSite",
|
||||||
dicts: ['sys_normal_disable'],
|
dicts: ['sys_normal_disable'],
|
||||||
|
components:{vueEasyPrint},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
|
@ -340,6 +397,7 @@ export default {
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
openPrint: false,
|
||||||
handleState:0,//0新增1查看2审批
|
handleState:0,//0新增1查看2审批
|
||||||
dialogLoading: false,
|
dialogLoading: false,
|
||||||
dialogParams:{},
|
dialogParams:{},
|
||||||
|
|
@ -566,8 +624,9 @@ export default {
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["dialogForm"].validate(valid => {
|
this.$refs["dialogForm"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
if(this.selectedList.length>0){
|
||||||
let arr = []
|
let arr = []
|
||||||
this.deviceList.forEach((item,index)=>{
|
this.selectedList.forEach((item,index)=>{
|
||||||
arr[index] = {
|
arr[index] = {
|
||||||
typeId:item.typeId,
|
typeId:item.typeId,
|
||||||
maId:item.maId,
|
maId:item.maId,
|
||||||
|
|
@ -581,10 +640,19 @@ export default {
|
||||||
}
|
}
|
||||||
console.log(param)
|
console.log(param)
|
||||||
submitWorkSite(param).then(response => {
|
submitWorkSite(param).then(response => {
|
||||||
|
if(response.code==200){
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}else{
|
||||||
|
this.$modal.msgSuccess("新增失败");
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("请选择直转数据");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -621,7 +689,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
pass(){
|
pass(){
|
||||||
console.log(this.dialogParams)
|
// console.log(this.dialogParams)
|
||||||
let data = this.dialogParams
|
let data = this.dialogParams
|
||||||
let backList = this.deviceList.map(item=>{
|
let backList = this.deviceList.map(item=>{
|
||||||
item.status = 0;
|
item.status = 0;
|
||||||
|
|
@ -646,7 +714,7 @@ export default {
|
||||||
},
|
},
|
||||||
backApplyDetails:backList
|
backApplyDetails:backList
|
||||||
}
|
}
|
||||||
console.log(backApplyInfo,'backApplyInfo------')
|
// console.log(backApplyInfo,'backApplyInfo------')
|
||||||
let leaseList = this.deviceList.map(item=>{
|
let leaseList = this.deviceList.map(item=>{
|
||||||
item.status = 0;
|
item.status = 0;
|
||||||
item.typeCn = item.typeName
|
item.typeCn = item.typeName
|
||||||
|
|
@ -655,7 +723,7 @@ export default {
|
||||||
item.unitCn = item.unitName
|
item.unitCn = item.unitName
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
console.log(leaseList,'leaseList---------')
|
// console.log(leaseList,'leaseList---------')
|
||||||
let leaseApplyInfo = {
|
let leaseApplyInfo = {
|
||||||
types:2,
|
types:2,
|
||||||
unitId:data.leaseUnitId,
|
unitId:data.leaseUnitId,
|
||||||
|
|
@ -673,7 +741,7 @@ export default {
|
||||||
},
|
},
|
||||||
leaseApplyDetails:leaseList
|
leaseApplyDetails:leaseList
|
||||||
}
|
}
|
||||||
console.log(leaseApplyInfo)
|
// console.log(leaseApplyInfo)
|
||||||
let param = {
|
let param = {
|
||||||
id:this.dialogParams.id,
|
id:this.dialogParams.id,
|
||||||
backApplyInfo:backApplyInfo,
|
backApplyInfo:backApplyInfo,
|
||||||
|
|
@ -691,6 +759,35 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
refuse(row){
|
||||||
|
console.log(this.dialogParams)
|
||||||
|
let param = {
|
||||||
|
id:this.dialogParams.id
|
||||||
|
}
|
||||||
|
refuseWorkSite(param).then(res => {
|
||||||
|
if(res.code==200){
|
||||||
|
this.open = false;
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
this.getList()
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("操作失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//打开领料单
|
||||||
|
async handlePrint(row){
|
||||||
|
this.openPrint = true
|
||||||
|
|
||||||
|
this.getDetail({id:row.id})
|
||||||
|
|
||||||
|
// this.leaseApplyDetails = res.rows[0].leaseApplyDetails
|
||||||
|
// this.leaseApplyData = res.rows[0]
|
||||||
|
},
|
||||||
|
// 领料单 打印
|
||||||
|
print(){
|
||||||
|
this.$refs.remarksPrintRef.print();
|
||||||
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
// const dictIds = row.dictId || this.selectedList;
|
// const dictIds = row.dictId || this.selectedList;
|
||||||
|
|
@ -711,3 +808,34 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.print{
|
||||||
|
.title{
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.info{
|
||||||
|
margin-top: 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.item{
|
||||||
|
width: 50%;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fillIn{
|
||||||
|
margin-top: 15px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep.el-table .fixed-width .el-button--mini {
|
||||||
|
width: 60px !important;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue