master
xy 3 years ago
parent b4fd1f327b
commit eaa4ae5f03

@ -21,7 +21,7 @@
<script>
import { index } from "@/api/budget/planTarget";
import { save, show } from "@/api/achievements/evaluate"
import { save, show, index as evaluateIndex } from "@/api/achievements/evaluate"
import { resetSelect } from "@/utils";
import { getToken } from "@/utils/auth";
@ -229,9 +229,12 @@ export default {
expandChange({ row, expanded }) {
console.log(row, expanded)
if(expanded.indexOf(row) !== -1) {
show({ id:2 }).then(res => {
this.$integrateData(row._form,res)
row._fileList = res.files.map(i => {
evaluateIndex({
type: this.type,
plan_target_id: row.id
}).then(res => {
res.data.length > 0 ? this.$integrateData(row._form,res.data[0]) : ''
row._fileList = res.data[0]?.files?.map(i => {
return {
name: i.name,
url: i.url,
@ -241,6 +244,18 @@ export default {
}
})
})
// show({ id:2 }).then(res => {
// this.$integrateData(row._form,res)
// row._fileList = res.files.map(i => {
// return {
// name: i.name,
// url: i.url,
// response: {
// id: i.id
// }
// }
// })
// })
}
},

@ -551,7 +551,6 @@ export default {
);
getOutDetail({ tbname: "caigou", out_contract_id: this.id }).then(
(res) => {
console.log(11111, res);
this.outCaigouDetail = res;
}
);

@ -392,6 +392,25 @@
</div>
</div>
</template>
<template v-slot:contract_to_contracts>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>关联的框架协议合同
</div>
<div class="xy-table-item-content">
<div class="contract-add-plan" style="width: 300px;" @click="isShowContractToContracts = true">
<template v-if="form.plan.length > 0">
<template v-for="item in form.plan">
<Tag closable color="primary" @on-close="delPlan(item)">{{ item.label }}</Tag>
</template>
</template>
<template v-else>
<div class="contract-add-plan-no-plan">请选择关联的框架协议合同</div>
</template>
</div>
</div>
</div>
</template>
<template v-slot:plan>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -444,7 +463,7 @@
<!-- 新增表 预算计划 -->
<xy-dialog :is-show.sync="isShowPlan" :width="720" title="预算计划" @on-ok="planSelect">
<template v-slot:normalContent>
<template>
<div style="display: flex;">
<el-select placeholder="科室选择" clearable size="small" v-model="planSearch.plan_department_id"
style="width: 160px;">
@ -475,6 +494,33 @@
</template>
</xy-dialog>
<!-- 新增表 框架合同-->
<el-dialog title="框架协议" :visible.sync="isShowContractToContracts" width="54%">
<Table
:data="contractList"
:columns="contractTable"
:loading="loading"
border
size="small"
@on-selection-change="selectionChange"
></Table>
<div style="display: flex; justify-content: center; margin: 10px 0">
<Page :total="contractTotal"
size="small"
show-elevator
show-total
@on-change="e => {
contractSelect.page = e;
getContracts();
}"/>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowContractToContracts = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</el-dialog>
<!-- 编辑-->
<editor ref="editor" :is-show-editor.sync="isShowEditor" :money-way="moneyWay" :purchase-type="purchaseType"
:purchase-way="purchaseWay" @success="getContracts"></editor>
@ -513,8 +559,8 @@ import {
getOatoken
} from "@/api/oatoken"
import {
parseTime
} from "@/utils"
parseTime, resetSelect
} from '@/utils'
import {
Message
} from "element-ui";
@ -1032,7 +1078,7 @@ export default {
}
],
planTable: [{
width: 36,
width: 40,
sortable: false,
type: 'selection',
fixed: "left"
@ -1112,7 +1158,7 @@ export default {
is_substitute: 0,
is_framework: 0,
use_framework_buy: 0,
contract_to_contracts: [],
},
plan: [],
rules: {
@ -1175,6 +1221,58 @@ export default {
planTotal: 0,
plansPageIndex: 1,
//
isShowContract: false,
isShowContractToContracts: false,
contractSelect: {
page: 1,
page_size: 10
},
contractTotal: 0,
contractList: [],
loading: false,
contractTable: [
{
type: "selection",
width: 56,
align: "center",
},
{
title: "项目名称",
key: "name",
minWidth: 180,
align: "left",
},
{
title: "采购形势",
width: 120,
render: (h,{row}) => {
return h('span',{},row.purchase_type?.value || "无")
}
},
{
title: "项目类型",
width: 120,
render: (h,{row}) => {
let map = new Map([
[1,"服务"],
[2,"货物"],
[3,"工程"]
])
return h('span',{},map.get(row.type))
}
},
{
title: "采购方式",
width: 120,
render: (h,{row}) => {
return h('span',{},row.purchase_way?.value || "无")
}
}
],
selections: [], //
isShowEditor: false,
}
},
@ -1732,6 +1830,35 @@ export default {
this.getContracts()
})
},
//
async getContractToContracts() {
const res = await getContract(this.contractSelect)
this.contractList = res.list.data
this.contractTotal = res.list.total
},
selectionChange(selection) {
this.selections = Array.from(
new Set(
selection.map((item) => item.id)
)
);
console.log(this.selections);
},
},
watch: {
isShowContractToContracts(val) {
if(val){
this.getContractToContracts();
}else{
this.selections = [];
resetSelect(this.contractSelect);
this.contractList = [];
this.contractTotal = 0;
}
}
},
mounted() {
this.window.width = screen.availWidth * 0.95

Loading…
Cancel
Save