master
xy 3 years ago
parent f7121a26ed
commit 96e036672e

@ -0,0 +1,33 @@
import request from '@/utils/request'
export function index(params) {
return request({
method: "get",
url: "/api/admin/pre_plan/index",
params
})
}
export function show(params) {
return request({
method: "get",
url: "/api/admin/pre_plan/show",
params
})
}
export function save(data) {
return request({
method: "post",
url: "/api/admin/pre_plan/save",
data
})
}
export function destroy(params) {
return request({
method: "get",
url: "/api/admin/pre_plan/destroy",
params
})
}

@ -0,0 +1,305 @@
<template>
<div>
<xy-dialog
ref="dialog"
:is-show.sync="isShow"
type="form"
:title="type === 'add' ? '新增预算计划上传' : '编辑预算计划上传'"
:form="form"
:rules="rules"
@submit="submit"
>
<template v-slot:year>
<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">
<el-date-picker
type="year"
v-model="form.year"
placeholder="请选择项目所属年份"
style="width: 300px"
value-format="yyyy"
></el-date-picker>
</div>
</div>
</template>
<template v-slot:plan_department_id>
<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">
<el-select
v-model="form.plan_department_id"
clearable
placeholder="请选择科室"
style="width: 300px"
>
<el-option
v-for="item in plan_department_ids"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:remark>
<div class="xy-table-item">
<div class="xy-table-item-label">备注 </div>
<div class="xy-table-item-content">
<el-input
type="textarea"
:autosize="{ minRows: 2 }"
v-model="form.remark"
clearable
placeholder="请输入备注"
style="width: 300px"
></el-input>
</div>
</div>
</template>
<template v-slot:file_ids>
<div class="xy-table-item">
<div class="xy-table-item-label">文件 </div>
<div class="xy-table-item-content">
<el-upload
style="width: 300px"
ref="upload"
multiple
:headers="{
'Authorization':'Bearer ' + getToken()
}"
:on-success="successHandle"
:before-upload="uploadBefore"
accept="application/x-rar-compressed,application/zip,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf"
:action="action"
:file-list="fileList"
:auto-upload="false"
:on-remove="removeHande"
>
<el-button slot="trigger" size="small" type="primary"
>选取文件</el-button
>
<el-button
style="margin-left: 10px"
size="small"
type="success"
@click="$refs['upload'].submit()"
>开始上传</el-button
>
<div slot="tip" class="el-upload__tip">
支持文件格式.rar .zip .doc .docx .pdf
<br />单个文件不能超过500kb
</div>
</el-upload>
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import { show, save } from "@/api/budget/prePlan";
import { getToken } from "@/utils/auth"
export default {
props: {
plan_department_ids: {
type: Array,
default: () => [],
},
},
data() {
return {
isShow: false,
id: "",
type: "",
action: process.env.VUE_APP_UPLOAD_API,
fileList: [],
form: {
year: "",
plan_department_id: "",
remark: "",
file_ids: "",
},
rules: {
year: [
{
required: true,
message: "请填写项目所属年份",
},
],
plan_department_id: [
{
required: true,
message: "请填写科室",
},
],
},
};
},
methods: {
getToken,
show() {
this.isShow = true;
},
hidden() {
this.isShow = false;
},
init() {
this.form = {
year: "",
plan_department_id: "",
remark: "",
file_ids: "",
};
},
setForm(key = [], value = []) {
if (key instanceof Array) {
key.forEach((key, index) => {
this.form[key] = value[index] ?? "";
});
}
if (typeof key === "string") {
this.form[key] = value;
}
if (!key) {
this.init();
}
},
//
successHandle(response, file, fileList) {
this.fileList = fileList;
},
removeHande(file, fileList) {
this.fileList = fileList;
},
uploadBefore(file) {
console.log(file);
if (file.size / 1000 > 500) {
this.$message({
type: "warning",
message: "上传文件大小超过500kb",
});
return false;
}
},
async getDetail() {
const res = await show({ id: this.id });
this.$integrateData(this.form, res);
},
submit() {
if (this.type === "add") {
if (this.form.hasOwnProperty("id")) {
delete this.form.id;
}
}
if (this.type === "editor") {
Object.defineProperty(this.form, "id", {
value: this.id,
enumerable: true,
configurable: true,
writable: true,
});
}
save(this.form).then((res) => {
this.$message({
type: "success",
message:
this.type === "add"
? "新增预算计划上传"
: "编辑预算计划上传" + "成功",
});
this.isShow = false;
this.$emit("refresh");
});
},
},
watch: {
isShow(val) {
if (val) {
if (this.type === "editor") {
this.getDetail();
}
} else {
this.id = "";
this.type = "";
this.init();
this.$refs["dialog"].clearValidate();
delete this.form.id;
}
},
},
};
</script>
<style scoped lang="scss">
.xy-table-item-label{
width: 180px;
}
::v-deep .el-input__inner {
text-align: left;
}
.img__delete {
transform: scale(0.8, 0.8);
position: absolute;
top: 4px;
right: 4px;
}
::v-deep .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
::v-deep .avatar-uploader .el-upload:hover {
border-color: #338de3;
}
::v-deep .el-upload--picture-card {
font-size: 28px;
color: #8c939d;
width: 80px !important;
height: 80px !important;
line-height: 80px !important;
text-align: center;
}
::v-deep .avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 80px !important;
height: 80px !important;
line-height: 80px !important;
text-align: center;
}
::v-deep .avatar {
width: 80px !important;
display: block;
border-radius: 6px;
}
::v-deep .el-input__inner {
text-align: left;
}
</style>

@ -0,0 +1,98 @@
<template>
<div style="padding: 0 20px;">
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="绩效指标">
<div slot="content"></div>
<slot>
<div class="selects">
<div>
<span style="padding: 0 6px;word-break: keep-all;">
关键字
</span>
<Input v-model="select.keyword" placeholder="请输入关键字" style="width: 180px"></Input>
</div>
<Button style="margin-left: 10px" type="primary"
@click="">重置
</Button>
<Button style="margin-left: 10px" type="primary" @click="getList"></Button>
<Button style="margin-left: 10px" type="primary" @click="$refs['addUpload'].type = 'add',$refs['addUpload'].show()">新增</Button>
</div>
</slot>
</lx-header>
<xy-table :list="list"
:table-item="table"
@editor="row => {
$refs['addUpload'].id = row.id;
$refs['addUpload'].type = 'edit';
$refs['addUpload'].show();
}"
@delete="">
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="total" @on-change="" show-elevator show-sizer @on-page-size-change="" />
</div>
<addUpload :plan_department_ids="depts" ref="addUpload" @refresh="getList"></addUpload>
</div>
</template>
<script>
import { index,destroy } from "@/api/budget/prePlan"
import { listdeptNoAuth } from "@/api/system/department"
import addUpload from "./components/addUpload.vue"
export default {
components:{
addUpload
},
data() {
return {
depts: [],
select: {
page: 1,
page_size: 10
},
total: 0,
table: [
{
label: "项目所属年份",
prop: "year",
width:160
},
{
label: "备注",
prop: "remark",
minWidth: 200
}
],
list: []
}
},
methods: {
async getDept() {
const res = await listdeptNoAuth({page:1,page_size:999})
this.depts = res.data
},
async getList() {
const res = await index(this.select)
this.list = res.data
this.total = res.total || 0
}
},
computed: {},
created() {
this.getList();
this.getDept();
}
}
</script>
<style scoped lang="scss">
.selects{
display: flex;
align-items: center;
flex-wrap: wrap;
}
</style>

@ -424,12 +424,32 @@ export default {
audit_money: this.paymentRegistrationForm.audit_money,
};
addFundLog(data).then((res) => {
this.isShowPaymentRegistration = false;
//
editorContract({
id: this.contract.id,
audit_money: this.form.audit_money,
}).then((r) => {
this.$emit("paid",{
name: this.contract?.name,
type: this.contract?.type,
number: this.contract?.number,
id: this.contract?.id,
reason: this.paymentRegistrationForm.remark,
yizhifucishu: this.actNumsTotal(),
yizhifujine: this.totalMoney(),
zongjia: this.totalApplyMoney()
})
console.log({
name: this.contract?.name,
type: this.contract?.type,
number: this.contract?.number,
id: this.contract?.id,
reason: this.paymentRegistrationForm.remark,
yizhifucishu: this.actNumsTotal(),
yizhifujine: this.totalMoney(),
zongjia: this.totalApplyMoney()
})
this.isShowPaymentRegistration = false;
Message({
type: "success",
message: "操作成功",

@ -166,8 +166,8 @@
<Button class="slot-btns-item"
size="small"
type="primary"
@click="paying(scope.row)">
<!-- @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"-->
@click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true">
<!-- paying(scope.row) @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"-->
付款登记
</Button>
@ -177,7 +177,7 @@
<Button class="slot-btns-item"
size="small"
type="primary"
@click="paying(scope.row)">
@click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true">
<!-- @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"-->
付款登记
@ -331,7 +331,7 @@
</div>
<div class="xy-table-item-content">
<el-select v-model="form.modality" placeholder="请选择采购类型" style="width: 300px;">
<el-option v-for="item in purchaseWay" :label="item.value" :value="item.id"></el-option>
<el-option v-for="item in purchaseWayFormat()" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
@ -401,7 +401,7 @@
</div>
</div>
</template>
<template v-slot:contract_to_contracts>
<template v-slot:contract_to_contracts v-if="form.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>关联的框架协议合同
@ -538,7 +538,7 @@
<detail ref="detailContract"></detail>
<!--付款登记-->
<paymentRegistration ref="paymentRegistration"></paymentRegistration>
<paymentRegistration ref="paymentRegistration" @paid="paying"></paymentRegistration>
<!-- 合同签订-->
<contractSign ref="contractSign" @signSuccess="getContracts"></contractSign>
@ -1582,6 +1582,7 @@ export default {
},
//
async paying(row) {
console.log(11)
// this.setNowContract(row,'pay')
let baseInfo = {
"title": row?.name,
@ -1590,6 +1591,10 @@ export default {
})[0]?.label,
"hetongbianhao": row?.number,
"out_pay_id": row.id,
"reason": row?.reason,
"yizhifucishu": row?.yizhifucishu,
"yizhifujine": row?.yizhifujine,
"zongjia": row?.zongjia
//"\\":row.supply
}
let url =
@ -1902,6 +1907,19 @@ export default {
);
},
},
computed: {
purchaseWayFormat() {
return function() {
if(!this.form.methods) {
return this.purchaseWay
}else{
let temp = this.purchaseType.find(i => i.id === this.form.methods)
let arr = temp?.remark?.split(",")?.map(i => Number(i))
return this.purchaseWay.filter(i => arr.indexOf(i.id) !== -1)
}
}
}
},
watch: {
isShowContractToContracts(val) {
if(val){

Loading…
Cancel
Save