master
xy 3 years ago
parent a33fffdd2e
commit 3df2c50d7d

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<Modal v-model="isShow" title="中标公告上传"> <Modal v-model="isShow" title="中标公告上传" @on-ok="submit">
<el-upload <el-upload
style="width: 300px" style="width: 300px"
ref="upload" ref="upload"
@ -35,15 +35,20 @@
</template> </template>
<script> <script>
import { detailContract, editorContract } from '@/api/contract/contract'
export default { export default {
data() { data() {
return { return {
id: '',
isShow: false, isShow: false,
action: process.env.VUE_APP_UPLOAD_API, action: process.env.VUE_APP_UPLOAD_API,
fileList: [], fileList: [],
} }
}, },
methods: { methods: {
setId (id) {
this.id = id
},
show() { show() {
this.isShow = true this.isShow = true
}, },
@ -67,8 +72,30 @@ export default {
return false; return false;
} }
}, },
async getDetail () {
const res = await detailContract({
id: this.id
})
this.detail = res
},
submit () {
this.detail.invite_status = 3
this.detail.tender_id = this.fileList[0].response?.id
editorContract(this.detail).then(res => {
this.hide()
this.$emit('refresh')
})
}
}, },
computed: {} computed: {},
watch: {
isShow (newVal) {
if (newVal) {
this.getDetail()
}
}
}
} }
</script> </script>

@ -186,7 +186,47 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:is_framework>
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px;">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否框架协议
</div>
<div class="xy-table-item-content">
<el-switch v-model="detail.is_framework" active-text="" inactive-text="" :active-value="1"
:inactive-value="0"/>
</div>
</div>
</template>
<template v-slot:use_framework_buy>
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px;">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否使用框架协议内的采购
</div>
<div class="xy-table-item-content">
<el-switch v-model="detail.use_framework_buy" active-text="" inactive-text="" :active-value="1"
:inactive-value="0"/>
</div>
</div>
</template>
<template v-slot:contract_to_contracts v-if="detail.use_framework_buy">
<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="selections.length > 0">
<template v-for="item in selections">
<Tag closable color="primary" @on-close="delSelections(item)">{{ item.name }}</Tag>
</template>
</template>
<template v-else>
<div class="contract-add-plan-no-plan">请选择关联的框架协议合同</div>
</template>
</div>
</div>
</div>
</template>
</xy-dialog> </xy-dialog>
@ -217,51 +257,40 @@
</xy-dialog> </xy-dialog>
<!-- 新增表 框架合同--> <!-- 新增表 框架合同-->
<!-- <el-dialog--> <el-dialog title="框架协议" :visible.sync="isShowContractToContracts" width="54%">
<!-- title="框架协议"--> <Table
<!-- :visible.sync="isShowContractToContracts"--> :data="contractList"
<!-- width="54%"--> :columns="contractTable"
<!-- >--> :loading="loading"
<!-- <Table--> border
<!-- ref="contractTable"--> size="small"
<!-- :data="contractList"--> @on-selection-change="selectionChange"
<!-- :columns="contractTable"--> ></Table>
<!-- :loading="loading"--> <div style="display: flex; justify-content: center; margin: 10px 0">
<!-- border--> <Page :total="contractTotal"
<!-- size="small"--> size="small"
<!-- @on-selection-change="selectionChange"--> show-elevator
<!-- ></Table>--> show-total
<!-- <div style="display: flex; justify-content: center; margin: 10px 0">--> @on-change="e => {
<!-- <Page--> contractSelect.page = e;
<!-- :total="contractTotal"--> getContractToContracts();
<!-- size="small"--> }"/>
<!-- show-elevator--> </div>
<!-- show-total-->
<!-- @on-change="--> <span slot="footer" class="dialog-footer">
<!-- (e) => {--> <el-button @click="isShowContractToContracts = false"> </el-button>
<!-- contractSelect.page = e;--> <el-button type="primary" @click="isShowContractToContracts = false"> </el-button>
<!-- getContracts();--> </span>
<!-- }--> </el-dialog>
<!-- "-->
<!-- />-->
<!-- </div>-->
<!-- <span slot="footer" class="dialog-footer">-->
<!-- <el-button @click="isShowContractToContracts = false"> </el-button>-->
<!-- <el-button type="primary" @click="isShowContractToContracts = false"-->
<!-- > </el-button-->
<!-- >-->
<!-- </span>-->
<!-- </el-dialog>-->
</div> </div>
</template> </template>
<script> <script>
import { import {
editorContract, editorContract,
detailContract, detailContract,
checkContractName checkContractName, getContract
} from "@/api/contract/contract"; } from '@/api/contract/contract'
import { import {
getBudget getBudget
} from "@/api/budget/budget"; } from "@/api/budget/budget";
@ -272,6 +301,7 @@
import { import {
Message Message
} from 'element-ui' } from 'element-ui'
import { resetSelect } from '@/utils'
export default { export default {
props: { props: {
purchaseType: Array, purchaseType: Array,
@ -470,6 +500,56 @@
], ],
planTotal: 0, planTotal: 0,
selections: [],
contractSelect: {
page: 1,
page_size: 10,
is_framework: 1
},
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 || "无")
}
}
],
contractTotal: 0,
isShowContractToContracts: false
} }
}, },
methods: { methods: {
@ -591,6 +671,7 @@
id: id id: id
}) })
this.contrantId = res.id this.contrantId = res.id
this.selections = []
this.detail = { this.detail = {
name: res.name, name: res.name,
is_simple:res?.is_simple, is_simple:res?.is_simple,
@ -608,6 +689,9 @@
}), }),
price: res.plan_price, price: res.plan_price,
isBudget: res.is_plan === 1 ? true : false, isBudget: res.is_plan === 1 ? true : false,
is_framework:res.is_framework,
use_framework_buy: res.use_framework_buy,
contract_to_contracts: res.contract_to_contracts,
plan: res.plans.map(item => { plan: res.plans.map(item => {
return { return {
label: item.name, label: item.name,
@ -646,6 +730,15 @@
date: this.detail.date, date: this.detail.date,
contract_plan_links: this.detail.plan.map(item => { contract_plan_links: this.detail.plan.map(item => {
return item.value return item.value
}),
is_framework:this.detail.is_framework,
use_framework_buy: this.detail.use_framework_buy,
contract_to_contracts:this.selections.map(i => {
return {
contract_id: this.contrantId,
to_contract_id: i.id,
use_money: i.money
}
}) })
}).then(res => { }).then(res => {
this.isShowEditor = false this.isShowEditor = false
@ -657,9 +750,47 @@
}) })
}, },
//
async getContractToContracts() {
const res = await getContract(this.contractSelect)
let selectedIds = this.selections.map(i => i.id)
this.contractList = res.list.data.map(item => {
return {
...item,
_checked: !!selectedIds.find(i => i === item.id),
}
})
this.contractTotal = res.list.total
},
selectionChange(selection) {
this.selections = Array.from(
new Set(
selection
)
);
},
delSelections(val) {
this.selections.map((item, index) => {
if (item.id === val.id) {
this.selections.splice(index, 1)
}
})
},
}, },
computed: { computed: {
},
watch: {
isShowContractToContracts(val) {
if(val){
this.getContractToContracts();
}else{
resetSelect(this.contractSelect);
this.contractList = [];
this.contractTotal = 0;
}
}
}, },
mounted() { mounted() {
let that = this; let that = this;

@ -194,7 +194,7 @@
<!-- 采购完成 --> <!-- 采购完成 -->
<template <template
v-if="scope.row.invite_status === 1 && scope.row.purchase_status === 3 && (scope.row.purchase_way ? scope.row.purchase_way.remark === 'true' : false) && !scope.row.is_substitute"> v-if="scope.row.invite_status === 1 && scope.row.purchase_status === 3 && (scope.row.purchase_way ? scope.row.purchase_way.remark === 'true' : false) && !scope.row.is_substitute">
<Button class="slot-btns-item" size="small" type="primary" @click="$refs['biddingUpload'].show()"></Button> <Button class="slot-btns-item" size="small" type="primary" @click="$refs['biddingUpload'].setId(scope.row.id),$refs['biddingUpload'].show()"></Button>
</template> </template>
<!-- <Button class="slot-btns-item" type="primary" size="small">附件管理</Button>--> <!-- <Button class="slot-btns-item" type="primary" size="small">附件管理</Button>-->
<template v-if="scope.row.req_status === 1 && scope.row.is_plan === 0 && !scope.row.is_substitute"> <template v-if="scope.row.req_status === 1 && scope.row.is_plan === 0 && !scope.row.is_substitute">
@ -203,9 +203,9 @@
</template> </template>
<!-- 中标--> <!-- 中标-->
<template v-if="false"> <!-- <template v-if="false">-->
<Button class="slot-btns-item" size="small" type="primary" @click="">中标公告上传</Button> <!-- <Button class="slot-btns-item" size="small" type="primary" @click="">中标公告上传</Button>-->
</template> <!-- </template>-->
<!--不需要走采购流程那么直接就是会签如果采购方式不需要招标的也是直接会签--> <!--不需要走采购流程那么直接就是会签如果采购方式不需要招标的也是直接会签-->
<template <template
@ -525,7 +525,7 @@
show-total show-total
@on-change="e => { @on-change="e => {
contractSelect.page = e; contractSelect.page = e;
getContracts(); getContractToContracts();
}"/> }"/>
</div> </div>
@ -551,7 +551,7 @@
<!-- 查看付款计划--> <!-- 查看付款计划-->
<contractPaymentRegistration ref="contractPaymentRegistration"></contractPaymentRegistration> <contractPaymentRegistration ref="contractPaymentRegistration"></contractPaymentRegistration>
<biddingUpload ref="biddingUpload"></biddingUpload> <biddingUpload ref="biddingUpload" @refresh="getContracts"></biddingUpload>
</div> </div>
</template> </template>
@ -733,6 +733,7 @@ export default {
status: "", status: "",
year: "", year: "",
plan_id: "", plan_id: "",
outcome_type: 1,
plan_name: "请选择预算计划", plan_name: "请选择预算计划",
start_plan_price: undefined, start_plan_price: undefined,
end_plan_price: undefined end_plan_price: undefined
@ -1894,7 +1895,13 @@ export default {
money:this.form?.money, money:this.form?.money,
status:this.form?.is_simple ? 2 : 1, status:this.form?.is_simple ? 2 : 1,
is_framework:this.form?.is_framework, is_framework:this.form?.is_framework,
contract_to_contracts:this.form.contract_to_contracts use_framework_buy:this.form.use_framework_buy,
contract_to_contracts:this.selections.map(i => {
return {
to_contract_id: i.id,
use_money: i.money
}
})
}).then(res => { }).then(res => {
this.isShowAdd = false this.isShowAdd = false
Message({ Message({

@ -19,7 +19,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:report_type v-if="contractType == 2"> <template v-slot:report_type v-if="outcomeType == 2">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px" <span style="color: red; font-weight: 600; padding-right: 4px"
@ -44,7 +44,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:other_type v-if="contractType == 3"> <template v-slot:other_type v-if="outcomeType == 3">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px" <span style="color: red; font-weight: 600; padding-right: 4px"
@ -347,6 +347,7 @@ export default {
}, },
submit() { submit() {
this.form.outcome_type = this.outcomeType
this.form.contract_plan_links = this.form.contract_plan_links.map(i => i?.value) this.form.contract_plan_links = this.form.contract_plan_links.map(i => i?.value)
if (this.type === "add") { if (this.type === "add") {
if (this.form.hasOwnProperty("id")) { if (this.form.hasOwnProperty("id")) {
@ -521,7 +522,7 @@ export default {
}, },
}, },
computed: { computed: {
contractType () { outcomeType () {
return this.$route.path.split('_')[1] return this.$route.path.split('_')[1]
}, },
typeText () { typeText () {

@ -0,0 +1,124 @@
<template>
<div>
<Modal v-model="isShow" title="收入登记" footer-hide width="46">
<div class="base-info">
<div class="base-info-item">
<div class="base-info-item-title">收入事项</div>
<div class="base-info-item-content">{{ detail.name }}</div>
</div>
<div class="base-info-item">
<div class="base-info-item-title">收入类型</div>
<div class="base-info-item-content">{{ detail.type ? detail.type.value : '' }}</div>
</div>
<div class="base-info-item">
<div class="base-info-item-title">收入方式</div>
<div class="base-info-item-content">{{ detail.way ? detail.way.value : '' }}</div>
</div>
<div class="base-info-item">
<div class="base-info-item-title">收入来源</div>
<div class="base-info-item-content">{{ detail.from }}</div>
</div>
<div class="base-info-item">
<div class="base-info-item-title">备注</div>
<div class="base-info-item-content">{{ detail.remark }}</div>
</div>
<div class="base-info-item">
<div class="base-info-item-title">收入金额</div>
<div class="base-info-item-content">{{ detail.money }}</div>
</div>
<div class="base-info-item">
<div class="base-info-item-title">附件</div>
<div class="base-info-item-content">
<a v-for="item in detail.files" :href="item.url">{{ item.original_name }}</a>
</div>
</div>
</div>
</Modal>
</div>
</template>
<script>
import { show } from '@/api/income'
export default {
data() {
return {
id: '',
isShow: false,
detail: {}
}
},
methods: {
show () {
this.isShow = true
},
hide () {
this.isShow = false
},
setId (id) {
this.id = id
},
async getDetail () {
const res = await show({
id:this.id
})
this.detail = res
}
},
computed: {
},
watch: {
isShow (newVal) {
if (newVal) {
this.getDetail()
} else {
this.id = ''
}
}
}
}
</script>
<style scoped lang="scss">
.base-info {
&-title {
font-weight: 600;
padding: 0 10px;
}
&-item {
display: flex;
margin-top: 8px;
&-title {
padding: 0 20px;
}
&-content {
}
&-unit {
margin-left: 20px;
}
}
}
a {
color: red;
text-decoration: none;
transition: all 0.2s;
}
a:hover {
color: red;
text-decoration: underline;
}
</style>

@ -11,161 +11,219 @@
<div> <div>
<span style="padding: 0 6px">创建日期</span> <span style="padding: 0 6px">创建日期</span>
<span> <span>
<DatePicker <DatePicker
:value="select.year" :value="select.year"
placeholder="选择开始日期" placeholder="选择开始日期"
placement="bottom" placement="bottom"
style="width: 114px" style="width: 114px"
type="date" type="date"
@on-change="(e) => (select.year = e)" @on-change="(e) => (select.year = e)"
></DatePicker> ></DatePicker>
<DatePicker <DatePicker
:value="select.year" :value="select.year"
placeholder="选择结束日期" placeholder="选择结束日期"
placement="bottom" placement="bottom"
style="width: 114px;margin-left: 6px;" style="width: 114px; margin-left: 6px"
type="date" type="date"
@on-change="(e) => (select.year = e)" @on-change="(e) => (select.year = e)"
></DatePicker> ></DatePicker>
</span> </span>
</div> </div>
<!-- <div>-->
<!-- <span style="padding: 0 6px"> 项目类型 </span>-->
<!-- <span>-->
<!-- <Select-->
<!-- v-model="select.type"-->
<!-- clearable-->
<!-- placeholder="选择项目类型"-->
<!-- style="width: 130px"-->
<!-- >-->
<!-- <Option v-for="item in types" :key="item.id" :value="item.id">{{-->
<!-- item.value }}-->
<!-- </Option>-->
<!-- </Select>-->
<!-- </span>-->
<!-- </div>-->
<div> <div>
<span style="padding: 0 6px"> 项目类型 </span> <span style="padding: 0 6px"> 科室 </span>
<span> <span>
<Select <Select
v-model="select.type" placeholder="科室选择"
clearable clearable
placeholder="选择项目类型" v-model="select.department"
style="width: 130px" style="width: 130px"
> >
<Option v-for="item in types" :key="item.id" :value="item.id">{{ <Option
item.value }} v-for="item in departments"
</Option> :key="item.id"
</Select> :value="item.id"
>{{ item.name }}</Option
>
</Select>
</span> </span>
</div> </div>
<div> <div v-if="this.$route.path.split('_')[1] == 2">
<span style="padding: 0 6px"> 科室 </span> <span style="padding: 0 6px"> 报销类型 </span>
<span> <span>
<Select <Select
placeholder="科室选择" v-model="select.type"
clearable clearable
v-model="select.department" placeholder="选择报销类型"
style="width: 130px" style="width: 130px"
> >
<Option v-for="item in departments" :key="item.id" :value="item.id">{{ item.name }}</Option> <Option
</Select> v-for="item in [
</span> {
value: '医药报销支出',
id: 1,
},
{
value: '出差报销支出',
id: 2,
},
]"
:key="item.id"
:value="item.id"
>{{ item.value }}</Option
>
</Select>
</span>
</div> </div>
<div> <div v-if="$route.path.split('_')[1] == 3">
<span style="padding: 0 6px"> 报销类型 </span> <span style="padding: 0 6px"> 其他支出类型 </span>
<span> <span>
<Select <Select
v-model="select.type" v-model="select.type"
clearable clearable
placeholder="选择报销类型" placeholder="选择其他支出类型"
style="width: 130px" style="width: 130px"
> >
<Option v-for="item in types" :key="item.id" :value="item.id">{{ <Option
item.value v-for="item in otherType"
}}</Option> :key="item.id"
</Select> :value="item.id"
</span> >{{ item.value }}</Option
>
</Select>
</span>
</div> </div>
<div> <div>
<span style="padding: 0 6px"> 报销金额 </span> <span style="padding: 0 6px"> {{ $route.path.split('_')[1] == 2 ? '报销金额' : '其他支出金额' }} </span>
<span> <span>
<InputNumber <InputNumber
style="width: 110px;" style="width: 110px"
placeholder="最低价" placeholder="最低价"
v-model="select.end_money" v-model="select.start_plan_price"
:formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')" :formatter="
:parser="value => value.replace(/\s?|(,*)/g, '')"></InputNumber> (value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
<InputNumber "
style="width: 110px;margin-left: 6px;" :parser="(value) => value.replace(/\s?|(,*)/g, '')"
placeholder="最高价" ></InputNumber>
v-model="select.end_money" <InputNumber
:formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')" style="width: 110px; margin-left: 6px"
:parser="value => value.replace(/\s?|(,*)/g, '')"></InputNumber> placeholder="最高价"
</span> v-model="select.end_plan_price"
:formatter="
(value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
"
:parser="(value) => value.replace(/\s?|(,*)/g, '')"
></InputNumber>
</span>
</div> </div>
<div> <div>
<span style="padding: 0 6px"> 状态 </span> <span style="padding: 0 6px"> 状态 </span>
<span> <span>
<Select <Select
v-model="select.type" v-model="select.type"
clearable clearable
placeholder="选择状态" placeholder="选择状态"
style="width: 110px" style="width: 110px"
> >
<Option v-for="item in types" :key="item.id" :value="item.id">{{ <Option v-for="item in types" :key="item.id" :value="item.id">{{
item.value item.value
}}</Option> }}</Option>
</Select> </Select>
</span> </span>
</div> </div>
<Button style="margin-left: 10px" type="primary" @click="$refs['addExpenseAccount'].type= 'add',$refs['addExpenseAccount'].show()"
>新增</Button
>
<Button style="margin-left: 10px" type="primary" @click="getList"
>查询</Button
>
<Button <Button
style="margin-left: 10px" style="margin-left: 10px"
type="primary" type="primary"
@click=" @click="
init ($refs['addExpenseAccount'].type = 'add'),
$refs['addExpenseAccount'].show()
" "
>重置 >新增</Button
>
<Button style="margin-left: 10px" type="primary" @click="getList"
>查询</Button
>
<Button style="margin-left: 10px" type="primary" @click="init"
>重置
</Button> </Button>
</div> </div>
</slot> </slot>
</lx-header> </lx-header>
<xy-table row-key="id" <xy-table
:list="list" row-key="id"
:table-item="table" :list="list"
@delete="row => destroy(row.id)" :table-item="table"
@editor="row => { @delete="(row) => destroy(row.id)"
$refs['addExpenseAccount'].setType('editor'); @editor="
$refs['addExpenseAccount'].setId(row.id); (row) => {
$refs['addExpenseAccount'].show(); $refs['addExpenseAccount'].setType('editor');
}"></xy-table> $refs['addExpenseAccount'].setId(row.id);
$refs['addExpenseAccount'].show();
}
"
></xy-table>
<div style="display: flex;justify-content: flex-end;padding: 10px 0;"> <div style="display: flex; justify-content: flex-end; padding: 10px 0">
<Page :total="total" <Page
@on-change="e => { :total="total"
select.page = e; @on-change="
getList() (e) => {
}" select.page = e;
show-elevator getList();
show-sizer }
@on-page-size-change="e => { "
select.page_size = e; show-elevator
select.page = 1; show-sizer
getList(); @on-page-size-change="
}" /> (e) => {
select.page_size = e;
select.page = 1;
getList();
}
"
/>
</div> </div>
<addExpenseAccount :other_types="otherType" :departments="departments" ref="addExpenseAccount" @refresh="getList"></addExpenseAccount> <addExpenseAccount
:other_types="otherType"
:departments="departments"
ref="addExpenseAccount"
@refresh="getList"
></addExpenseAccount>
</div> </div>
</template> </template>
<script> <script>
import { getContract ,delContract } from '@/api/contract/contract' import { getContract, delContract } from "@/api/contract/contract";
import { getparameter } from '@/api/system/dictionary' import { getparameter } from "@/api/system/dictionary";
import { listdeptNoAuth } from '@/api/system/department' import { listdeptNoAuth } from "@/api/system/department";
import addExpenseAccount from '@/views/inOut/component/addExpenseAccount.vue' import addExpenseAccount from "@/views/inOut/component/addExpenseAccount.vue";
export default { export default {
components: { components: {
addExpenseAccount addExpenseAccount,
}, },
data() { data() {
return { return {
@ -173,7 +231,16 @@ export default {
total: 0, total: 0,
select: { select: {
page: 1, page: 1,
page_size: 10 page_size: 10,
start_created_at: "",
end_created_at: "",
start_plan_price: '',
end_plan_price: '',
department_id: "",
report_type: "",
other_type: "",
is_myself: "",
outcome_type: "",
}, },
types: [], types: [],
departments: [], departments: [],
@ -181,71 +248,71 @@ export default {
list: [], list: [],
table: [ table: [
{ {
prop: 'name', prop: "name",
label: '项目名称', label: "项目名称",
width: 190, width: 190,
fixed: 'left' fixed: "left",
}, },
{ {
label: this.$route.path.split('_')[1] == 2 ? '报销类型' : '支出类型', label: this.$route.path.split("_")[1] == 2 ? "报销类型" : "支出类型",
width: 160, width: 160,
customFn:row => { customFn: (row) => {
let map = new Map([ let map = new Map([
[1,'医药报销支出'], [1, "医药报销支出"],
[2,'出差报销支出'] [2, "出差报销支出"],
]) ]);
return this.$route.path.split('_')[1] == 2 ? ( return this.$route.path.split("_")[1] == 2 ? (
<span>{ map.get(row.report_type) }</span> <span>{map.get(row.report_type)}</span>
) : ( ) : (
<span>{ row.other_type?.value }</span> <span>{row.other_type?.value}</span>
) );
} },
}, },
{ {
prop: '', prop: "from",
label: '资金来源', label: "资金来源",
width: 160, width: 160,
}, },
{ {
prop: '', prop: "money",
label: '报销金额(元)', label: "报销金额(元)",
width: 140, width: 140,
align: 'right' align: "right",
}, },
{ {
prop: '', prop: "use_money_total",
label: '实际报销金额(元)', label: "实际报销金额(元)",
width: 140, width: 140,
align: 'right' align: "right",
}, },
{ {
prop: '', prop: "has_money_total",
label: '已付金额', label: "已付金额",
width: 140, width: 140,
align: 'right' align: "right",
}, },
{ {
prop: 'department.name', prop: "department.name",
label: '业务科室', label: "业务科室",
width: 140 width: 140,
}, },
{ {
prop: '', prop: "",
label: '状态', label: "状态",
width: 140 width: 140,
}, },
{ {
prop: 'admin.name', prop: "admin.name",
label: '经办人', label: "经办人",
width: 140 width: 140,
}, },
{ {
prop: 'created_at', prop: "created_at",
label: '创建日期', label: "创建日期",
width: 180 width: 180,
} },
] ],
} };
}, },
methods: { methods: {
init() { init() {
@ -257,56 +324,55 @@ export default {
} }
} }
this.select.page = 1 this.select.page = 1;
this.select.page_size = 10 this.select.page_size = 10;
}, },
async getList () { async getList() {
const res = await getContract(this.select) const res = await getContract(this.select);
this.list = res.list.data this.list = res.list.data;
this.total = res.list.total this.total = res.list.total;
}, },
async getDepartment() { async getDepartment() {
this.departments = await listdeptNoAuth() this.departments = await listdeptNoAuth();
}, },
async getOtherType () { async getOtherType() {
const res = await getparameter({ const res = await getparameter({
number: 'other_type' number: "other_type",
}) });
this.otherType = res.detail this.otherType = res.detail;
}, },
destroy (id) { destroy(id) {
delContract({ delContract({
id id,
}).then(res => { }).then((res) => {
this.getList() this.getList();
}) });
} },
}, },
computed: { computed: {
typeText () { typeText() {
return function (type) { return function (type) {
if (type == 2) { if (type == 2) {
return '报销' return "报销";
} }
if (type == 3) { if (type == 3) {
return '其他支出' return "其他支出";
} }
} };
} },
}, },
created() { created() {
this.getDepartment() this.select.outcome_type = this.$route.path.split("_")[1];
this.getOtherType() this.select.is_myself = this.$route.path.split("_")[2];
this.getList() this.getDepartment();
this.getOtherType();
this.getList();
}, },
beforeRouteEnter (to, from , next) { };
next()
}
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

@ -31,21 +31,21 @@
</span> </span>
</div> </div>
<div> <!-- <div>-->
<span style="padding: 0 6px"> 项目类型 </span> <!-- <span style="padding: 0 6px"> 项目类型 </span>-->
<span> <!-- <span>-->
<Select <!-- <Select-->
v-model="select.type" <!-- v-model="select.type"-->
clearable <!-- clearable-->
placeholder="选择项目类型" <!-- placeholder="选择项目类型"-->
style="width: 130px" <!-- style="width: 130px"-->
> <!-- >-->
<Option v-for="item in types" :key="item.id" :value="item.id" <!-- <Option v-for="item in types" :key="item.id" :value="item.id"-->
>{{ item.value }} <!-- >{{ item.value }}-->
</Option> <!-- </Option>-->
</Select> <!-- </Select>-->
</span> <!-- </span>-->
</div> <!-- </div>-->
<div> <div>
<span style="padding: 0 6px"> 科室 </span> <span style="padding: 0 6px"> 科室 </span>
@ -67,28 +67,44 @@
</div> </div>
<div> <div>
<span style="padding: 0 6px"> 报销类型 </span> <span style="padding: 0 6px"> 收入类型 </span>
<span> <span>
<Select <Select
v-model="select.type" v-model="select.type_id"
clearable clearable
placeholder="选择报销类型" placeholder="选择收入类型"
style="width: 130px" style="width: 130px"
> >
<Option v-for="item in types" :key="item.id" :value="item.id">{{ <Option v-for="item in incomeType" :key="item.id" :value="item.id">{{
item.value item.value
}}</Option> }}</Option>
</Select> </Select>
</span> </span>
</div> </div>
<div>
<span style="padding: 0 6px"> 收入方式 </span>
<span>
<Select
v-model="select.way_id"
clearable
placeholder="选择收入类型"
style="width: 130px"
>
<Option v-for="item in way" :key="item.id" :value="item.id">{{
item.value
}}</Option>
</Select>
</span>
</div>
<div> <div>
<span style="padding: 0 6px"> 报销金额 </span> <span style="padding: 0 6px"> 报销金额 </span>
<span> <span>
<InputNumber <InputNumber
style="width: 110px" style="width: 110px"
placeholder="最低价" placeholder="最低价"
v-model="select.end_money" v-model="select.start_money"
:formatter=" :formatter="
(value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',') (value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
" "
@ -152,7 +168,46 @@
$refs['addIncomeRegistration'].show(); $refs['addIncomeRegistration'].show();
} }
" "
></xy-table> >
<template #btns v-if="/List$/.test($route.path)">
<el-table-column
fixed="right"
header-align="center"
label="操作"
width="200"
>
<template slot-scope="{ row }">
<div class="slot-btns">
<Button
size="small"
type="primary"
@click="
$refs['addIncomeRegistration'].setId(row.id),
$refs['addIncomeRegistration'].setType('editor'),
$refs['addIncomeRegistration'].show()
"
>
编辑
</Button>
<Button @click="$refs['detailIncome'].setId(row.id),$refs['detailIncome'].show()" size="small" type="info">
查看
</Button>
<Poptip
:transfer="true"
confirm
placement="bottom"
title="确认要删除吗"
@on-ok="destroy(row.id)"
>
<i-button class="slot-btns-item" size="small" type="error"
>删除</i-button
>
</Poptip>
</div>
</template>
</el-table-column>
</template>
</xy-table>
<div style="display: flex; justify-content: flex-end; padding: 10px 0"> <div style="display: flex; justify-content: flex-end; padding: 10px 0">
<Page <Page
@ -181,6 +236,8 @@
ref="addIncomeRegistration" ref="addIncomeRegistration"
@refresh="getList" @refresh="getList"
></addIncomeRegistration> ></addIncomeRegistration>
<detailIncome ref="detailIncome"></detailIncome>
</div> </div>
</template> </template>
@ -189,10 +246,12 @@ import { getparameter } from "@/api/system/dictionary";
import { index, destroy } from "@/api/income"; import { index, destroy } from "@/api/income";
import { listdeptNoAuth } from "@/api/system/department"; import { listdeptNoAuth } from "@/api/system/department";
import detailIncome from '@/views/inOut/component/detailIncome.vue'
import addIncomeRegistration from "@/views/inOut/component/addIncomeRegistration.vue"; import addIncomeRegistration from "@/views/inOut/component/addIncomeRegistration.vue";
export default { export default {
components: { components: {
addIncomeRegistration, addIncomeRegistration,
detailIncome
}, },
data() { data() {
return { return {
@ -202,6 +261,10 @@ export default {
select: { select: {
page: 1, page: 1,
page_size: 10, page_size: 10,
type_id: '',
way_id: '',
start_money: '',
end_money: ''
}, },
types: [], types: [],
departments: [], departments: [],
@ -338,4 +401,16 @@ export default {
margin: 4px; margin: 4px;
} }
} }
.slot-btns {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
align-content: flex-start;
& > Button {
margin: 2px 4px;
}
}
</style> </style>

Loading…
Cancel
Save