master
xy 3 years ago
parent a33fffdd2e
commit 3df2c50d7d

@ -1,6 +1,6 @@
<template>
<div>
<Modal v-model="isShow" title="中标公告上传">
<Modal v-model="isShow" title="中标公告上传" @on-ok="submit">
<el-upload
style="width: 300px"
ref="upload"
@ -35,15 +35,20 @@
</template>
<script>
import { detailContract, editorContract } from '@/api/contract/contract'
export default {
data() {
return {
id: '',
isShow: false,
action: process.env.VUE_APP_UPLOAD_API,
fileList: [],
}
},
methods: {
setId (id) {
this.id = id
},
show() {
this.isShow = true
},
@ -67,8 +72,30 @@ export default {
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>

@ -186,7 +186,47 @@
</div>
</div>
</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>
@ -217,51 +257,40 @@
</xy-dialog>
<!-- 新增表 框架合同-->
<!-- <el-dialog-->
<!-- title="框架协议"-->
<!-- :visible.sync="isShowContractToContracts"-->
<!-- width="54%"-->
<!-- >-->
<!-- <Table-->
<!-- ref="contractTable"-->
<!-- :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="isShowContractToContracts = false"-->
<!-- > </el-button-->
<!-- >-->
<!-- </span>-->
<!-- </el-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;
getContractToContracts();
}"/>
</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>
</template>
<script>
import {
editorContract,
detailContract,
checkContractName
} from "@/api/contract/contract";
import {
editorContract,
detailContract,
checkContractName, getContract
} from '@/api/contract/contract'
import {
getBudget
} from "@/api/budget/budget";
@ -272,6 +301,7 @@
import {
Message
} from 'element-ui'
import { resetSelect } from '@/utils'
export default {
props: {
purchaseType: Array,
@ -470,6 +500,56 @@
],
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: {
@ -591,6 +671,7 @@
id: id
})
this.contrantId = res.id
this.selections = []
this.detail = {
name: res.name,
is_simple:res?.is_simple,
@ -608,6 +689,9 @@
}),
price: res.plan_price,
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 => {
return {
label: item.name,
@ -646,6 +730,15 @@
date: this.detail.date,
contract_plan_links: this.detail.plan.map(item => {
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 => {
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: {
},
watch: {
isShowContractToContracts(val) {
if(val){
this.getContractToContracts();
}else{
resetSelect(this.contractSelect);
this.contractList = [];
this.contractTotal = 0;
}
}
},
mounted() {
let that = this;

@ -194,7 +194,7 @@
<!-- 采购完成 -->
<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">
<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>
<!-- <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">
@ -203,9 +203,9 @@
</template>
<!-- 中标-->
<template v-if="false">
<Button class="slot-btns-item" size="small" type="primary" @click="">中标公告上传</Button>
</template>
<!-- <template v-if="false">-->
<!-- <Button class="slot-btns-item" size="small" type="primary" @click="">中标公告上传</Button>-->
<!-- </template>-->
<!--不需要走采购流程那么直接就是会签如果采购方式不需要招标的也是直接会签-->
<template
@ -525,7 +525,7 @@
show-total
@on-change="e => {
contractSelect.page = e;
getContracts();
getContractToContracts();
}"/>
</div>
@ -551,7 +551,7 @@
<!-- 查看付款计划-->
<contractPaymentRegistration ref="contractPaymentRegistration"></contractPaymentRegistration>
<biddingUpload ref="biddingUpload"></biddingUpload>
<biddingUpload ref="biddingUpload" @refresh="getContracts"></biddingUpload>
</div>
</template>
@ -733,6 +733,7 @@ export default {
status: "",
year: "",
plan_id: "",
outcome_type: 1,
plan_name: "请选择预算计划",
start_plan_price: undefined,
end_plan_price: undefined
@ -1894,7 +1895,13 @@ export default {
money:this.form?.money,
status:this.form?.is_simple ? 2 : 1,
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 => {
this.isShowAdd = false
Message({

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

@ -31,21 +31,21 @@
</span>
</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>-->
<!-- <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>
<span style="padding: 0 6px"> 科室 </span>
@ -67,28 +67,44 @@
</div>
<div>
<span style="padding: 0 6px"> 报销类型 </span>
<span style="padding: 0 6px"> 收入类型 </span>
<span>
<Select
v-model="select.type"
v-model="select.type_id"
clearable
placeholder="选择报销类型"
placeholder="选择收入类型"
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
}}</Option>
</Select>
</span>
</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>
<span style="padding: 0 6px"> 报销金额 </span>
<span>
<InputNumber
style="width: 110px"
placeholder="最低价"
v-model="select.end_money"
v-model="select.start_money"
:formatter="
(value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
"
@ -152,7 +168,46 @@
$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">
<Page
@ -181,6 +236,8 @@
ref="addIncomeRegistration"
@refresh="getList"
></addIncomeRegistration>
<detailIncome ref="detailIncome"></detailIncome>
</div>
</template>
@ -189,10 +246,12 @@ import { getparameter } from "@/api/system/dictionary";
import { index, destroy } from "@/api/income";
import { listdeptNoAuth } from "@/api/system/department";
import detailIncome from '@/views/inOut/component/detailIncome.vue'
import addIncomeRegistration from "@/views/inOut/component/addIncomeRegistration.vue";
export default {
components: {
addIncomeRegistration,
detailIncome
},
data() {
return {
@ -202,6 +261,10 @@ export default {
select: {
page: 1,
page_size: 10,
type_id: '',
way_id: '',
start_money: '',
end_money: ''
},
types: [],
departments: [],
@ -338,4 +401,16 @@ export default {
margin: 4px;
}
}
.slot-btns {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
align-content: flex-start;
& > Button {
margin: 2px 4px;
}
}
</style>

Loading…
Cancel
Save