master
xy 3 years ago
parent 03c01da9d6
commit 56da388794

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

@ -0,0 +1,13 @@
import request from "@/utils/request"
export function getOutDetail({ tbname,out_contract_id }) {
return request({
method: 'get',
url: '/index.php',
requestBase: '/old',
params: {
s: "/Api/flowDetail",
tbname,
out_contract_id
}
})
}

@ -41,20 +41,45 @@ export default {
},
methods: {
footerRender(){
return (
<div>
<Button ghost type="primary" on-click={this.reset}>重置</Button>
<Button type="primary" on-click={this.submit}>确定</Button>
</div>
)
if(this.type === 'form'){
return (
<div>
<Button ghost type="primary" on-click={this.reset}>重置</Button>
<Button type="primary" on-click={this.submit}>{this.okText || '确定'}</Button>
</div>
)
}
if(this.type === 'normal'){
return (
<div>
<Button ghost type="primary" on-click={()=>{this.$emit('update:isShow',false)}}>取消</Button>
<Button type="primary" on-click={()=>{this.$emit('on-ok')}}>{this.okText || '确定'}</Button>
</div>
)
}
},
showChange(e){
this.$emit('update:isShow',e)
},
cancelClick(){
this.$emit('update:isShow',false)
validate(){
return new Promise((resolve,reject)=>{
this.$refs['elForm'].validate().then(res=>{
if(res){
resolve(res)
}else{
reject(res)
}
}).catch(err=>{
reject(err)
this.$Message.warning({
content:'请填写完整信息',
duration:1
})
})
})
},
reset(){
this.$emit('reset')
if(this.type === 'normal'){
return
}
@ -75,6 +100,16 @@ export default {
},
okClick(){
this.$emit('on-ok')
},
clearValidate(){
this.$refs['elForm'].clearValidate()
}
},
watch:{
isShow(val){
if(!val && this.type === 'form'){
this.reset()
}
}
},
render(h) {
@ -88,7 +123,7 @@ export default {
footer slot:
footerContent
*/
const {cancelClick,okText,okClick,footerRender,width,type,$scopedSlots,rules,form,showChange,isShow,title} = this
const {okText,okClick,footerRender,width,type,$scopedSlots,rules,form,showChange,isShow,title} = this
return (
<Modal
ok-text={okText}
@ -101,14 +136,16 @@ export default {
default(){
if(type === "form"){
let formItems = []
Object.keys(form).map((key)=>{
formItems.push(
<el-form-item
prop={key}>
{eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)}
</el-form-item>
)
})
for(let key in form){
if(form.hasOwnProperty(key) && $scopedSlots[key]){
formItems.push(
<el-form-item
prop={key}>
{eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)}
</el-form-item>
)
}
}
return (
<el-form
style={title.length === 0 ? {'margin-top':'32px'} : {}}
@ -143,20 +180,19 @@ export default {
return (
<div
style={title.length === 0 ? {'margin-top':'32px'} : {}}>
{$scopedSlots.normalContent ? $scopedSlots.normalContent() : ''}
{$scopedSlots.default ? $scopedSlots.default() : ''}
</div>
)
}
},
header(){
if($scopedSlots.headerContent){
return $scopedSlots.headerContent()
}
},
footer(){
{
if(type === 'form') return ($scopedSlots.footerContent ? $scopedSlots.footerContent() : footerRender())
if(type === 'normal') return (
<div>
<Button ghost type="primary" on-click={cancelClick}>取消</Button>
<Button type="primary" on-click={okClick}>确定</Button>
</div>
)
if(type === 'form' || type === 'normal') return ($scopedSlots.footerContent ? $scopedSlots.footerContent() : footerRender())
}
}
}}>
@ -167,6 +203,72 @@ export default {
</script>
<style lang="scss">
.xy-table-item-label{
width: 140px;
text-align: right;
}
.xy-table-item-min{
position: relative;
&::after{
z-index: 1;
position: absolute;
right: 0;
top: 0;
content:'(分钟)'
}
::v-deep .el-input__clear{
position: relative;
right: 46px;
z-index: 2;
}
}
.xy-table-item-price{
position: relative;
&::after{
z-index: 1;
position: absolute;
right: 0;
top: 0;
content:'(元)'
}
::v-deep .el-input__clear{
padding: 0 6px;
position: relative;
right: 30px;
z-index: 2;
}
}
.xy-table-item-price-wan{
position: relative;
&::after{
padding: 0 6px;
position: absolute;
right: 0;
top: 0;
content:'(万元)'
}
::v-deep .el-input__clear{
position: relative;
right: 46px;
z-index: 2;
}
}
.xy-table-item-price-percent{
position: relative;
&::after{
padding: 0 6px;
position: absolute;
right: 0;
top: 0;
content:'%'
}
::v-deep .el-input__clear{
position: relative;
right: 46px;
z-index: 2;
}
}
.vertical-center-modal{
display: flex;
align-items: center;
@ -179,13 +281,14 @@ export default {
.ivu-modal-body{
max-height: 65vh !important;
min-height: 300px;
overflow-y: scroll;
overflow: scroll;
}
.xy-table-item{
display: flex;
align-items: center;
margin-right: 80px;
padding-right: 80px;
&-label{
padding: 0 20px;
@ -194,7 +297,12 @@ export default {
}
}
.el-form-item{
flex-shrink: 0;
flex-basis: 50%;
}
.el-form-item__error{
white-space: nowrap;
word-break: keep-all !important;
top: 100% !important;
left: calc(100% - 80px) !important;

@ -212,7 +212,7 @@ export default {
grid-template-rows: 50px;
grid-template-areas: "logo . menu . user";
z-index: 9999;
z-index: 1000;
position: fixed;
top: 0;
left: 0;

@ -47,6 +47,14 @@ import moment from 'moment'
Vue.prototype.$moment = moment;
Vue.prototype.$integrateData = (target,value) => {
for(let i in target){
if(target.hasOwnProperty(i) && value.hasOwnProperty(i)){
target[i] = value[i]
}
}
}
new Vue({
el: '#app',
router,

@ -20,7 +20,7 @@ const service = axios.create({
// request interceptor
service.interceptors.request.use(
config => {
config.baseURL = config.requestBase || process.env.VUE_APP_DOMIAN
if (!config.noloading) {
// do something before request is sent
loading = Loading.service({

@ -0,0 +1,199 @@
<template>
<div>
<xy-dialog
ref="dialog"
:is-show.sync="isShow"
type="form"
:title="type === 'add' ? '新增绩效指标类型' : '编辑绩效指标类型'"
:form="form"
:rules="rules"
@submit="submit"
>
<template v-slot:pid>
<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-cascader
:key="cascaderId_pid"
clearable
style="width: 300px"
:show-all-levels="false"
v-model="form.pid"
:options="pids"
:props="{ value: 'id', label: 'name', checkStrictly: true }"
@change="pidCascaderHandler"
></el-cascader>
</div>
</div>
</template>
<template v-slot:name>
<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-input
v-model="form.name"
clearable
placeholder="请输入名称"
style="width: 300px"
></el-input>
</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:sort>
<div class="xy-table-item">
<div class="xy-table-item-label">排序 </div>
<div class="xy-table-item-content">
<el-input-number
v-model="form.sort"
clearable
placeholder="请输入排序"
style="width: 300px"
:controls="false"
:precision="0"
></el-input-number>
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import { show, save } from "@/api/achievements/types";
export default {
props: {
pids:Array
},
data() {
return {
isShow: false,
id: "",
type: "",
cascaderId_pid: "",
form: {
pid: "",
name: "",
remark: "",
sort: "",
},
rules: {
pid: [
{
required: true,
message: "请填写上级",
},
],
name: [
{
required: true,
message: "请填写名称",
},
],
},
};
},
methods: {
show() {
this.isShow = true;
},
hidden() {
this.isShow = false;
},
init() {
this.form = {
pid: "",
name: "",
remark: "",
sort: "",
};
},
pidCascaderHandler(e) {
if (e.length > 0) {
this.form.pid = e.at(-1);
} else {
this.form.pid = "";
}
},
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;
}
},
pids() {
++this.cascaderId_pid;
},
},
};
</script>
<style scoped lang="scss">
::v-deep .el-input__inner {
text-align: left;
}
</style>

@ -0,0 +1,84 @@
<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="select.page = 1,getList()">查询</Button>
<Button style="margin-left: 10px" type="primary" @click="$refs['addTypes'].show()"></Button>
</div>
</slot>
</lx-header>
<xy-table :list="list" :table-item="table" >
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="total" @on-change="" show-elevator show-sizer @on-page-size-change="" />
</div>
<addTypes ref="addTypes" @refresh="getList"></addTypes>
</div>
</template>
<script>
import { index } from "@/api/achievements/types"
import addTypes from '@/views/achievements/components/addTypes.vue'
export default {
components:{
addTypes
},
data() {
return {
select:{
keyword: "",
page: 1,
page_size: 10
},
total: 0,
table: [
{
label: "一级指标名称"
},
{
label: "二级指标名称"
},
{
label: "三级指标名称"
}
],
list: []
}
},
methods: {
async getList() {
const res = await index(this.select)
this.list = res.data
}
},
computed: {},
created() {
this.getList()
}
}
</script>
<style scoped lang="scss">
.selects{
display: flex;
align-items: center;
flex-wrap: wrap;
}
</style>

@ -28,7 +28,7 @@
</el-option>
</el-select>
</span>
<el-switch v-model="isTree" @change="changeTree" active-text="树形结构">
<el-switch v-model="isTree" @change="changeTree" active-text="树形结构" style="margin-left: 4px;">
</el-switch>
<Button style="margin-left: 10px" type="primary" @click="showAdd('')"></Button>
<Button style="margin-left: 10px" type="primary" @click="getBudgets"></Button>

@ -0,0 +1,77 @@
<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="">查询</Button>
</div>
</slot>
</lx-header>
<xy-table :list="list" :table-item="table" >
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="total" @on-change="" show-elevator show-sizer @on-page-size-change="" />
</div>
</div>
</template>
<script>
export default {
data() {
return {
select:{
keyword: ""
},
total: 0,
table: [
{
label: "一级指标名称"
},
{
label: "二级指标名称"
},
{
label: "三级指标名称"
},
{
label: "计算符号"
},
{
label: "半年(程)指标值"
},
{
label: "全年(程)指标值"
},
{
label: "单位"
}
],
list: []
}
},
methods: {},
computed: {}
}
</script>
<style scoped lang="scss">
.selects{
display: flex;
align-items: center;
flex-wrap: wrap;
}
</style>

File diff suppressed because it is too large Load Diff

@ -264,8 +264,9 @@
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.is_simple" active-text="" inactive-text="" :active-value="1" :inactive-value="0"/>
<span>水电煤报刊订阅网络通讯车辆使用等费用付款</span>
</div>
<div>水电煤报刊订阅网络通讯车辆使用等费用付款</div>
</div>
</template>
<template v-slot:supply v-if="form.is_simple">
@ -1385,7 +1386,7 @@ export default {
}
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OUT_URL}?s=/flow/add/modid/8&oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
`${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/8&oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
let bidding = window.open(url, 'bidding',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
@ -1400,11 +1401,18 @@ export default {
"type": this.type.filter(item => {
return item.value === row.type
})[0]?.label,
"yusuan": row?.plan_price
"yusuan": row?.plan_price.toString(),
"zijinlaiyuan":row.money_way_detail.reduce((prev,cur,index) => {
if(index === 0) {
return cur.value
}else{
return prev + "," + cur.value
}
},"")
}
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OUT_URL}?s=/flow/add/modid/8&oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
`${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/8&username=${this.$store.state.user.username}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
let buyProcess = window.open(url, 'buyProcess',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
@ -1419,7 +1427,7 @@ export default {
}
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OUT_URL}?s=/flow/add/modid/9&oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
`${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/9&username=${this.$store.state.user.username}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
let signProcess = window.open(url, 'signProcess',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
@ -1797,4 +1805,7 @@ export default {
content: '(元)'
}
}
.xy-table-item-label{
width: 200px;
}
</style>

@ -12,20 +12,20 @@
<router-link :to="`/statisticalReport/budgetProgress`">
<div class="progress-card">
<div class="progress-card-item">
<div class="progress-card-item__num">{{moneyFormat(statistic.progress.money_total_1)}}</div>
<div class="progress-card-item__num">{{moneyFormat(statistic.progress ? statistic.progress.money_total_1 : 0)}}</div>
<div class="progress-card-item__label">年初预算合计金额</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">{{moneyFormat(statistic.progress.money_total_2)}}</div>
<div class="progress-card-item__num">{{moneyFormat(statistic.progress ? statistic.progress.money_total_2 : 0)}}</div>
<div class="progress-card-item__label">调整后预算合计金额</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">{{moneyFormat(statistic.progress.use_money_total)}}</div>
<div class="progress-card-item__num">{{moneyFormat(statistic.progress? statistic.progress.use_money_total : 0)}}</div>
<div class="progress-card-item__label">已支付金额</div>
</div>
<div class="progress-card-item">
<div class="progress-card-item__num">
{{toper(statistic.progress.money_total_1,statistic.progress.money_total_2,statistic.progress.use_money_total)}}%
{{toper(statistic.progress ? statistic.progress.money_total_1 : 0,statistic.progress ? statistic.progress.money_total_2 : 0,statistic.progress? statistic.progress.use_money_total : 0)}}%
</div>
<div class="progress-card-item__label">进展率</div>
</div>

@ -50,7 +50,7 @@ module.exports = {
target: process.env.VUE_APP_OUT_URL,
changeOrigin: true, //配置跨域
pathRewrite: {
['^/oa' ]: process.env.VUE_APP_OUT_URL
['^/oa']: process.env.VUE_APP_OUT_URL
}
},
[process.env.VUE_APP_DOMIAN]: {
@ -64,7 +64,7 @@ module.exports = {
target: process.env.VUE_APP_OUT_OLD,
changeOrigin: true, //配置跨域
pathRewrite: {
['^' + process.env.VUE_APP_OUT_OLD]: process.env.VUE_APP_OUT_OLD
['^/old']: process.env.VUE_APP_OUT_OLD
}
}
}

Loading…
Cancel
Save