刘翔宇-旅管家 4 years ago
commit 1478f67ab7

@ -2,8 +2,9 @@
ENV = 'development'
# base api
VUE_APP_DOMIAN=http://hdcontract.ali251.langye.net/
VUE_APP_DOMIAN=http://192.168.60.99:9003/
#VUE_APP_DOMIAN=http://hdcontract.ali251.langye.net/
VUE_APP_BASE_API = ''
VUE_APP_OUT_URL = http://suzhouhedaooa.langye.net
#VUE_APP_OUT_URL = http://suzhouhedaooa.langye.net
#VUE_APP_OUT_URL = http://192.168.60.18:2021
VUE_APP_OUT_URL = http://192.168.60.18:2021

3
.gitignore vendored

@ -7,6 +7,9 @@ yarn-error.log*
package-lock.json
tests/**/coverage/
.env.development
.env.production
# Editor directories and files
.idea
.vscode

@ -125,7 +125,8 @@ export default {
{
'display':'flex',
'align-items':'center',
'flex-wrap':'wrap'
'flex-wrap':'wrap',
'min-width':'380px'
}
}>
{

@ -126,3 +126,12 @@ export function debounce(fn,delay=500){
}, delay)
}
}
//金额分隔
export function moneyFormatter(money,precision=2){
return Number(money).toFixed(precision).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
//金额分隔复原
export function moneyRecovery(money){
return parseFloat(money.replace(/[^\d\.-]/g, ""));
}

@ -6,7 +6,7 @@ let loading;
// create an axios instance
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
baseURL: process.env.VUE_APP_DOMIAN, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
timeout: 5000 // request timeout
})

File diff suppressed because it is too large Load Diff

@ -14,7 +14,7 @@
</span>
<span>
<Select placeholder="选择预算类型" v-model="select.type" style="width:130px;" clearable>
<Option v-for="item in [{label:'部门预算',value:1},{label:'水务计划',value:2}]" :value="item.value" :key="item.value">{{ item.label }}</Option>
<Option v-for="item in types" :value="item.id" :key="item.id">{{ item.value }}</Option>
</Select>
</span>
@ -49,14 +49,15 @@
</template>
<script>
import {addBudget,getBudget,delBudget,editorBudget,detailBudget} from "@/api/budget/budget"
import {getBudget,detailBudget} from "@/api/budget/budget"
import {listdeptNoAuth} from "@/api/system/department"
import {Message} from "element-ui";
import {parseTime} from "@/utils"
import {getparameter} from '@/api/system/dictionary'
import {moneyFormatter, parseTime} from "@/utils"
export default {
data() {
return {
isShowAdd:false,
types:[],
form:{
name:"",
type:"",
@ -104,17 +105,11 @@ export default {
label:"预算类型",
prop:'type',
width:115,
formatter:(cell,data,value)=>{
switch (value){
case 1:
return "部门预算"
break;
case 2:
return "水务计划"
break;
default:
return "未知"
}
formatter: (cell, data, value) => {
let res = this.types.filter(item => {
return item.id === value
})
return res[0]?.value || '未知'
}
},
{
@ -131,7 +126,10 @@ export default {
label:'项目金额(元)',
prop:'money',
align:'right',
width: 160
width: 160,
formatter:(cell,data,value)=>{
return moneyFormatter(value)
}
},
{
label:"创建信息",
@ -163,6 +161,11 @@ export default {
}
},
methods: {
async getTypes(){
const res = await getparameter({number:'money_way'})
this.types = res.detail
},
//
summary(param){
this.$nextTick(()=>{
@ -176,7 +179,7 @@ export default {
return
}
if(column.property === 'money'){
sums[index] = this.totalMoney
sums[index] = moneyFormatter(this.totalMoney)
return
}
// const values = data.map(item => Number(item[column.property]));
@ -235,6 +238,7 @@ export default {
},
},
mounted() {
this.getTypes()
this.getDepartment()
this.getBudgets()
}

@ -45,7 +45,7 @@
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>合同金额
</div>
<div class="xy-table-item-content xy-table-item-price-wan">
<div class="xy-table-item-content xy-table-item-price">
<el-input placeholder="请填写合同金额" v-model="form.money" style="width: 300px;"/>
</div>
</div>
@ -266,7 +266,7 @@ export default {
let res = await getOatoken()
let url =`/oa/admin/flow/view/${this.contract.join_last_flow_id}?oatoken=${res.oatoken}&get_raw=1`
const oaInfo = await axios.get(url)
this.form.money = Number(oaInfo.data.flow['合同金额(万元)'])
this.form.money = Number(oaInfo.data.flow['合同金额(万元)'])/10000
this.form.number = oaInfo.data.flow['合同编号']
this.form.supply = oaInfo.data.flow['承包商\\供应商']
this.form.carryDepartment = oaInfo.data.flow['执行部门']

@ -25,8 +25,8 @@
</div>
<div class="base-info-item">
<div class="base-info-item-title">项目预算</div>
<div class="base-info-item-content">{{detail.plan_price}}</div>
<div class="base-info-item-unit">()</div>
<div class="base-info-item-content">{{moneyFormat(detail.plan_price)}}</div>
<div class="base-info-item-unit">()</div>
</div>
<div class="base-info-item">
<div class="base-info-item-title">资金渠道</div>
@ -46,7 +46,7 @@
<div class="sign-info-item">
<div class="sign-info-item-title">合同金额</div>
<div class="sign-info-item-content">{{detail.money}}</div>
<div class="sign-info-item-unit"></div>
<div class="sign-info-item-unit"></div>
</div>
<div style="display: flex;justify-content: space-between">
<div class="sign-info-item" style="flex-basis: 50%">
@ -99,6 +99,8 @@ import {delContractSign, getContractSign} from "@/api/contractSign/contractSign"
import {parseTime} from "@/utils"
import {getOatoken} from "@/api/oatoken";
import {Message} from "element-ui";
import {moneyFormatter} from "@/utils"
import {getparameter} from "@/api/system/dictionary";
import detailContractSign from "./detailContractSign"
export default {
@ -130,10 +132,20 @@ export default {
width:100,
sortable: false,
customFn:(row)=>{
const typeSwitch = (type) => {
{
let res = this.planTypes.filter(item => {
return item.id === type
})
return res[0]?.value || '未知'
}
}
return (
<div>
<Tag color="primary">
{row.type === 1 ? '部门预算' : '水务计划'}
{
typeSwitch(row.type)
}
</Tag>
</div>
)
@ -149,13 +161,21 @@ export default {
label:"金额",
sortable: false,
prop:'money',
align:'right'
align:'right',
minWidth:200,
formatter:(v1,v2,value)=>{
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label:'使用金额',
sortable: false,
prop:'useMoney',
align:'right'
align:'right',
minWidth:200,
formatter:(v1,v2,value)=>{
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
}
],
journalTable:[
@ -189,6 +209,7 @@ export default {
}
],
signPlan:[],
planTypes:[],
planTable:[
{
prop:'date',
@ -202,7 +223,11 @@ export default {
prop:'money',
label:'金额(元)',
align:'right',
minWidth:180,
sortable:false,
formatter:(v1,v2,value)=>{
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
prop:'content',
@ -220,6 +245,11 @@ export default {
}
},
methods: {
async getPlanTypes(){
const res = await getparameter({number:'money_way'})
this.planTypes = res.detail
},
async seeBuyProcess(){
if(!this.detail?.purchase_last_flow_id){
Message({
@ -286,12 +316,14 @@ export default {
})[0]
return {
id:item.id,
type:item.type,
name:item.name,
money:item.money,
useMoney:res.use_money
}
})
this.detail.plans = linkPlanTable
console.log(this.detail)
let plan = await getContractSign({contract_id:id})
this.signPlan = plan.data
@ -321,6 +353,9 @@ export default {
case 3:
return "工程"
break;
case 4:
return '其他'
break;
default:
return "未知"
}
@ -333,6 +368,11 @@ export default {
})
return res.toString()
}
},
moneyFormat(){
return function (money){
return moneyFormatter(money)
}
}
},
mounted() {

@ -12,7 +12,7 @@
</div>
<div class="payment-registration-row">
<div class="payment-registration-row-title">合同金额</div>
<div class="payment-registration-row-content">{{form.contract.money}} </div>
<div class="payment-registration-row-content">{{moneyFormat(form.contract.money)}} </div>
</div>
</template>
@ -70,15 +70,17 @@
</template>
<template v-slot:is_end>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否最后一笔
<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="form.is_end" @change="toggleSelection"/>
<el-switch v-model="form.is_end" />
<!-- @change="toggleSelection"-->
</div>
</div>
</template>
<template v-slot:extraFormBottom v-if="form.is_end">
<template v-slot:extraFormBottom v-if="false">
<Input search enter-button=" " placeholder="搜索预算计划.." v-model="searchContent" @on-search="getBudgets"/>
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px;" ref="planTable" @select="selectPlan">
<template v-slot:btns>
@ -99,6 +101,7 @@
</template>
<script>
import {moneyFormatter} from '@/utils'
import {detailFundLog,editorFundLog} from "@/api/paymentRegistration/fundLog"
import {getBudget} from "@/api/budget/budget";
import {Message} from "element-ui";
@ -131,6 +134,12 @@ export default {
case 2:
return "水务计划"
break;
case 3:
return '补助经费'
break;
case 4:
return '其他'
break;
default:
return "未知"
}
@ -246,6 +255,13 @@ export default {
}
},
},
computed:{
moneyFormat(){
return function (money){
return moneyFormatter(money)
}
}
},
mounted() {
}

@ -53,7 +53,7 @@
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>合同预算价
</div>
<div class="xy-table-item-content xy-table-item-price-wan">
<div class="xy-table-item-content xy-table-item-price">
<el-input clearable placeholder="请填写合同预算价" v-model="detail.price" style="width: 300px;"/>
</div>
</div>
@ -72,15 +72,15 @@
</template>
<template v-slot:isBudget>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否预算
<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.isBudget"/>
</div>
</div>
</template>
<template v-if="detail.isBudget" v-slot:plan>
<template v-slot:plan>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>关联预算计划
@ -192,17 +192,11 @@ export default {
{
label:"分类",
prop:'type',
formatter:(cell,data,value)=>{
switch (value){
case 1:
return "部门预算"
break;
case 2:
return "水务计划"
break;
default:
return "未知"
}
formatter:(cell, data, value) => {
let res = this.moneyWay.filter(item => {
return item.id === value
})
return res[0]?.value || '未知'
}
},
{

@ -91,8 +91,8 @@
</template>
<template v-slot:isLast>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否最后一笔
<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 disabled v-model="paymentRegistrationForm.isLast"/>
@ -209,6 +209,12 @@ export default {
case 2:
return "水务计划"
break;
case 3:
return '补助经费'
break;
case 4:
return '其他'
break;
default:
return "未知"
}

@ -89,15 +89,16 @@
</template>
<template v-slot:isLast>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否最后一笔
<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="paymentRegistrationForm.isLast" @change="toggleSelection"/>
<el-switch v-model="paymentRegistrationForm.isLast" />
<!-- @change="toggleSelection"-->
</div>
</div>
</template>
<template v-slot:extraFormBottom v-if="paymentRegistrationForm.isLast">
<template v-slot:extraFormBottom v-if="false">
<Input search enter-button=" " placeholder="搜索预算计划.." v-model="searchContent" @on-search="getBudgets"/>
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px;" ref="planTable" @select="selectPlan">
<template v-slot:btns>
@ -133,12 +134,13 @@ export default {
pageIndex:1,
//
plans:[],
planTypes:[],
contract:{},
payment:[],//
payTable:[
{
label:'支付金额',
prop:'act_money',
prop:'apply_money',
sortable:false,
align:'right'
},
@ -183,17 +185,11 @@ export default {
{
label:"分类",
prop:'type',
formatter:(cell,data,value)=>{
switch (value){
case 1:
return "部门预算"
break;
case 2:
return "水务计划"
break;
default:
return "未知"
}
formatter: (cell, data, value) => {
let res = this.planTypes.filter(item => {
return item.id === value
})
return res[0]?.value || '未知'
}
},
{
@ -210,6 +206,11 @@ export default {
}
},
methods: {
async getPlanTypes(){
const res = await getparameter({number:'money_way'})
this.planTypes = res.detail
},
//
pageChange(e){
this.pageIndex = e
@ -330,9 +331,9 @@ export default {
}
}
},
// async mounted() {
// await this.getBudgets()
// }
mounted() {
this.getPlanTypes()
}
}
</script>

@ -1,6 +1,6 @@
<template>
<div v-if="registration">
<xy-dialog title="打印预览" :is-show.sync="isShow" :width="69" @on-ok="print" ok-text="">
<xy-dialog title="打印预览" :is-show.sync="isShow" :width="70" @on-ok="print" ok-text="">
<template v-slot:normalContent>
<div class="print-table1" id="printtable1" ref="printtable">
<div class="print-table1-title">苏州市河道管理处资金划拨审批单</div>
@ -32,8 +32,8 @@
<div style="grid-area: tb7-3" class="print-table1-grid-center">{{priceFormat(registration.discount_money)}}</div>
<div style="grid-area: tb7-4"></div>
<div style="grid-area: tb8-1" class="print-table1-grid-center">E</div>
<div style="grid-area: tb8-2" class="print-table1-grid-center">本期应付款</div>
<div style="grid-area: tb8-3" class="print-table1-grid-center">{{priceFormat(registration.apply_money)}}</div>
<div style="grid-area: tb8-2;font-weight: 600" class="print-table1-grid-center">本期应付款</div>
<div style="grid-area: tb8-3;font-weight: 600" class="print-table1-grid-center">{{priceFormat(registration.apply_money)}}</div>
<div style="grid-area: tb8-4;padding-left: 0.6vw;display: block;">
<div style="display: flex;align-items: center;">
<div><span v-if="registration.type == '进度款'"></span></div>
@ -73,6 +73,8 @@
<div style="grid-area: tb14-2;" class="print-table1-grid-bottom3">财审科分管领导</div>
<div style="grid-area: tb14-3;" class="print-table1-grid-bottom3">单位负责人</div>
</div>
<div style="text-align: right;padding-top: 4px;font-size: 20px;">打印时间{{new Date().getFullYear()}}.{{new Date().getMonth()+1}}.{{new Date().getDate()}}</div>
</div>
</template>
</xy-dialog>

@ -226,15 +226,15 @@
</template>
<template v-slot:isBudget>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否预算
<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="form.isBudget"/>
</div>
</div>
</template>
<template v-if="form.isBudget" v-slot:plan>
<template v-slot:plan>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>关联预算计划
@ -312,9 +312,6 @@ import detail from "./components/detailContract"
import paymentRegistration from "./components/paymentRegistration";
import contractSign from "@/views/contract/components/contractSign";
import contractPaymentRegistration from "@/views/contract/components/contractPaymentRegistration";
import {login} from "@/api/user";
export default {
components:{
@ -511,20 +508,17 @@ export default {
}
},
{
label:'已付金额',
label:'已付金额(元)',
prop:'fund_log_total',
width:120,
width:180,
align:'right',
formatter:(cell,data,value)=>{
if(!value){
return '0.00'
}
return value
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label:"合同预算价(元)",
width: 160,
label:"合同预算价(元)",
width: 180,
prop:"plan_price",
align:'right',
formatter:(v1,v2,value)=>{
@ -532,10 +526,13 @@ export default {
}
},
{
label:'合同签订价(元)',
label:'合同签订价(元)',
width: 180,
prop:'money',
align:'right'
align:'right',
formatter:(cell,data,value)=>{
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label:"合同状态",
@ -589,6 +586,7 @@ export default {
planPriceTotal:0
},
planTypes:[],
planTable:[
{
width: 36,
@ -598,17 +596,11 @@ export default {
{
label:"分类",
prop:'type',
formatter:(cell,data,value)=>{
switch (value){
case 1:
return "部门预算"
break;
case 2:
return "水务计划"
break;
default:
return "未知"
}
formatter: (cell, data, value) => {
let res = this.planTypes.filter(item => {
return item.id === value
})
return res[0]?.value || '未知'
}
},
{
@ -671,6 +663,11 @@ export default {
}
},
methods: {
async getPlanTypes(){
const res = await getparameter({number:'money_way'})
this.planTypes = res.detail
},
//
planInput(e,row){
if(!/^[0-9]+.?[0-9]*$/.test(e) && e){
@ -829,8 +826,8 @@ export default {
"项目类型":this.type.filter(item => {
return item.value === row.type
})[0]?.label,
"项目预算(万元)":row?.plan_price,
"资金渠道":row?.money_way?.value
"资金渠道":row?.money_way?.value,
"项目预算(万元)":row?.plan_price
}
let res = await getOatoken()
let url = `${process.env.VUE_APP_OUT_URL}/admin/flow/create/2?oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
@ -1113,7 +1110,7 @@ export default {
position: absolute;
right: 0;
top: 0;
content:'元)'
content:'元)'
}
}
</style>

@ -67,7 +67,10 @@ export default {
prop:'money',
label:'计划付款金额(元)',
align:'right',
width:168
width:170,
formatter:(v1,v2,value)=>{
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
prop:'date',

@ -82,13 +82,19 @@ export default {
label:"付款申请金额(元)",
prop:"apply_money",
align:'right',
width: 180
width: 180,
formatter:(v1,v2,value)=>{
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label:'实际支付金额',
label:'实际支付金额(元)',
prop:"act_money",
align:'right',
width: 180
width: 180,
formatter:(v1,v2,value)=>{
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label:"款项类型",
@ -105,9 +111,9 @@ export default {
}
},
{
label:"是否最后一笔",
label:"是否为预算内确定项目",
prop:"is_end",
width: 146,
width: 184,
formatter:(cell,data,value)=>{
return value == 1 ? "是" : "否"
}

@ -327,7 +327,7 @@ export default {
}
},
{
label:'已付金额',
label:'已付金额(元)',
prop:'fund_log_total',
width:120,
align:'right',
@ -339,7 +339,7 @@ export default {
}
},
{
label:"合同预算价(元)",
label:"合同预算价(元)",
width: 160,
prop:"plan_price",
align:'right',
@ -348,7 +348,7 @@ export default {
}
},
{
label:'合同签订价(元)',
label:'合同签订价(元)',
width: 180,
prop:'money',
align:'right'
@ -422,6 +422,12 @@ export default {
case 2:
return "水务计划"
break;
case 3:
return '补助经费'
break
case 4:
return '其他'
break
default:
return "未知"
}
@ -855,7 +861,7 @@ export default {
position: absolute;
right: 0;
top: 0;
content:'元)'
content:'元)'
}
}
</style>

@ -91,8 +91,8 @@
</template>
<template v-slot:isLast>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否最后一笔
<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 disabled v-model="paymentRegistrationForm.isLast"/>
@ -104,12 +104,12 @@
<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="xy-table-item-content xy-table-item-price">
<el-input placeholder="请填写实际付款金额" v-model="paymentRegistrationForm.actMoney" style="width: 300px;"/>
</div>
</div>
</template>
<template v-slot:extraFormBottom v-if="paymentRegistrationForm.isLast">
<template v-slot:extraFormBottom>
<Input search enter-button=" " placeholder="搜索预算计划.." v-model="searchContent" @on-search="getBudgets"/>
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px;" ref="planTable" @select="selectPlan">
<template v-slot:btns>
@ -147,10 +147,11 @@ export default {
plans:[],
contract:{},
payment:[],//
planTypes:[],
payTable:[
{
label:'支付金额',
prop:'act_money',
prop:'apply_money',
sortable:false,
align:'right'
},
@ -204,17 +205,11 @@ export default {
{
label:"分类",
prop:'type',
formatter:(cell,data,value)=>{
switch (value){
case 1:
return "部门预算"
break;
case 2:
return "水务计划"
break;
default:
return "未知"
}
formatter: (cell, data, value) => {
let res = this.planTypes.filter(item => {
return item.id === value
})
return res[0]?.value || '未知'
}
},
{
@ -231,6 +226,10 @@ export default {
}
},
methods: {
async getPlanTypes(){
const res = await getparameter({number:'money_way'})
this.planTypes = res.detail
},
//
pageChange(e){
this.pageIndex = e
@ -347,7 +346,7 @@ export default {
},
async mounted() {
await this.getBudgets()
await this.getPlanTypes()
}
}
</script>

@ -70,13 +70,19 @@ export default {
label:"付款申请金额(元)",
prop:"apply_money",
align:'right',
width: 170
width: 170,
formatter:(v1,v2,value)=>{
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label:'实际付款金额',
label:'实际付款金额(元)',
prop:"act_money",
align:'right',
width: 165
width: 170,
formatter:(v1,v2,value)=>{
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label:"款项类型",
@ -93,9 +99,9 @@ export default {
}
},
{
label:"是否最后一笔",
label:"是否为预算内确定项目",
prop:"is_end",
width: 146,
width: 184,
formatter:(cell,data,value)=>{
return value == 1 ? "是" : "否"
}

@ -50,19 +50,12 @@
<script>
import {getProgress} from "@/api/budget/budget"
import {listdeptNoAuth} from "@/api/system/department";
import {getparameter} from "@/api/system/dictionary";
export default {
data() {
return {
type:[
{
label:'部门预算',
value:1
},
{
label:'水务计划',
value:2
}
],//
type:[],//
departments:[],
select:{
pageIndex:1,
@ -84,17 +77,11 @@ export default {
prop:'type',
label:'预算类型',
width: 120,
formatter:(cell,data,value)=>{
switch (value){
case 1:
return "部门预算"
break;
case 2:
return "水务计划"
break;
default:
return "未知"
}
formatter: (cell, data, value) => {
let res = this.type.filter(item => {
return item.id === value
})
return res[0]?.value || '未知'
}
},
{
@ -110,7 +97,8 @@ export default {
{
prop:'content',
label:'描述',
align:'left'
align:'left',
minWidth:250
},
{
prop:'rate',
@ -124,6 +112,10 @@ export default {
}
},
methods: {
async getType(){
const res = await getparameter({number:'money_way'})
this.type = res.detail
},
//
pageChange(e){
this.select.pageIndex = e
@ -150,6 +142,7 @@ export default {
}
},
mounted() {
this.getType()
this.getDepartment()
this.getPlanProgress()
}

@ -1,157 +1,156 @@
'use strict'
const path = require('path')
const defaultSettings = require('./src/settings.js')
function resolve(dir) {
return path.join(__dirname, dir)
}
const name = defaultSettings.title || '合同业务管理系统' // page title
// If your port is set to 80,
// use administrator privileges to execute the command line.
// For example, Mac: sudo npm run
// You can change the port by the following methods:
// port = 9528 npm run dev OR npm run dev --port = 9528
const port = process.env.port || process.env.npm_config_port || 9530 // dev port
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
/**
* You will need to set publicPath if you plan to deploy your site under a sub path,
* for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/,
* then publicPath should be set to "/bar/".
* In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: '/admin/',
outputDir: '/Users/liuxiangyu/Work/szhedao/app/contract-business/contract-business-service/public/admin',
assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项
less: {
javascriptEnabled: true
}
}
},
devServer: {
port: port,
open: true,
overlay: {
warnings: false,
errors: true
},
//before: require('./mock/mock-server.js')
proxy: {
[process.env.VUE_APP_BASE_API]: {
target: 'http://hdcontract.ali251.langye.net',
//target: 'http://192.168.60.99:9003/',
changeOrigin: true, //配置跨域
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
},
'/oa': {
//target: 'http://suzhouhedaooa.langye.net',
target: 'http://192.168.60.18:2021',
changeOrigin: true, //配置跨域
pathRewrite: {
'/oa': '/'
}
}
}
},
configureWebpack: {
// provide the app's title in webpack's name field, so that
// it can be accessed in index.html to inject the correct title.
name: name,
resolve: {
alias: {
'@': resolve('src')
}
}
},
chainWebpack(config) {
// it can improve the speed of the first screen, it is recommended to turn on preload
config.plugin('preload').tap(() => [{
rel: 'preload',
// to ignore runtime.js
// https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
include: 'initial'
}])
// when there are many pages, it will cause too many meaningless requests
config.plugins.delete('prefetch')
// set svg-sprite-loader
config.module
.rule('svg')
.exclude.add(resolve('src/icons'))
.end()
config.module
.rule('icons')
.test(/\.svg$/)
.include.add(resolve('src/icons'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
.end()
// set preserveWhitespace
config.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
options.compilerOptions.preserveWhitespace = true
return options
})
.end()
config
.when(process.env.NODE_ENV !== 'development',
config => {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end()
config
.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
})
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
config.optimization.runtimeChunk('single')
}
)
}
'use strict'
const path = require('path')
const defaultSettings = require('./src/settings.js')
function resolve(dir) {
return path.join(__dirname, dir)
}
const name = defaultSettings.title || '合同业务管理系统' // page title
// If your port is set to 80,
// use administrator privileges to execute the command line.
// For example, Mac: sudo npm run
// You can change the port by the following methods:
// port = 9528 npm run dev OR npm run dev --port = 9528
const port = process.env.port || process.env.npm_config_port || 9530 // dev port
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
/**
* You will need to set publicPath if you plan to deploy your site under a sub path,
* for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/,
* then publicPath should be set to "/bar/".
* In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: '/admin/',
outputDir: '/Users/liuxiangyu/Work/szhedao/app/contract-business/contract-business-service/public/admin',
assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项
less: {
javascriptEnabled: true
}
}
},
devServer: {
port: port,
open: true,
overlay: {
warnings: false,
errors: true
},
//before: require('./mock/mock-server.js')
proxy: {
[process.env.VUE_APP_DOMIAN]: {
target: process.env.VUE_APP_DOMIAN,
changeOrigin: true, //配置跨域
pathRewrite: {
['^' + process.env.VUE_APP_DOMIAN]: process.env.VUE_APP_DOMIAN
}
},
'^/oa': {
target: process.env.VUE_APP_OUT_URL,
changeOrigin: true, //配置跨域
pathRewrite: {
['^/oa' ]: process.env.VUE_APP_OUT_URL
}
}
}
},
configureWebpack: {
// provide the app's title in webpack's name field, so that
// it can be accessed in index.html to inject the correct title.
name: name,
resolve: {
alias: {
'@': resolve('src')
}
}
},
chainWebpack(config) {
// it can improve the speed of the first screen, it is recommended to turn on preload
config.plugin('preload').tap(() => [{
rel: 'preload',
// to ignore runtime.js
// https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
include: 'initial'
}])
// when there are many pages, it will cause too many meaningless requests
config.plugins.delete('prefetch')
// set svg-sprite-loader
config.module
.rule('svg')
.exclude.add(resolve('src/icons'))
.end()
config.module
.rule('icons')
.test(/\.svg$/)
.include.add(resolve('src/icons'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
.end()
// set preserveWhitespace
config.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
options.compilerOptions.preserveWhitespace = true
return options
})
.end()
config
.when(process.env.NODE_ENV !== 'development',
config => {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end()
config
.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
})
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
config.optimization.runtimeChunk('single')
}
)
}
}

Loading…
Cancel
Save