2022.8.15 问题修改

master
271556543@qq.com 4 years ago
parent d3a68dab0b
commit d1fde042e8

@ -2,7 +2,7 @@
ENV = 'development' ENV = 'development'
# base api # base api
VUE_APP_BASE_API = '' VUE_APP_BASE_API = 'http://hdcontract.ali251.langye.net'
#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

@ -39,7 +39,9 @@
</slot> </slot>
</lx-header> </lx-header>
<xy-table :table-item="table" :list="list" @delete="deleteTable" @editor="showEditor"></xy-table> <xy-table :table-item="table" :list="list" @delete="deleteTable" @editor="showEditor" :show-summary="true" :summary-method="summary">
</xy-table>
<div style="display: flex;justify-content: flex-end;"> <div style="display: flex;justify-content: flex-end;">
<Page :total="total" show-elevator @on-change="pageChange"/> <Page :total="total" show-elevator @on-change="pageChange"/>
@ -255,6 +257,7 @@ export default {
] ]
}, },
list:[], list:[],
totalMoney:0,
total:0, total:0,
pageIndex:1, pageIndex:1,
table:[ table:[
@ -329,6 +332,30 @@ export default {
} }
}, },
methods: { methods: {
//
summary(param){
const { columns, data } = param
const sums = []
columns.map((column,index) => {
if(index === 0){
sums[index] = '总计'
return
}
if(column.property === 'money'){
sums[index] = this.totalMoney
return
}
// const values = data.map(item => Number(item[column.property]));
// if (!values.every(value => isNaN(value)) && (column.property === 'money' || column.property === 'plan_price'|| column.property === 'fund_log_total')) {
//
// sums[index] = sums[index].toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
// } else {
// sums[index] = '';
// }
})
return sums
},
// //
pageChange(e){ pageChange(e){
this.pageIndex = e this.pageIndex = e
@ -349,8 +376,9 @@ export default {
type:this.select.type, type:this.select.type,
plan_department_id:this.select.department plan_department_id:this.select.department
}).then(res=>{ }).then(res=>{
this.list = res.data this.list = res.list.data
this.total = res.total this.total = res.list.total
this.totalMoney = res.total_money
}) })
}, },
// //

@ -316,7 +316,7 @@ export default {
return "服务" return "服务"
break; break;
case 2: case 2:
return "货" return "货"
break; break;
case 3: case 3:
return "工程" return "工程"

@ -19,7 +19,7 @@
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-select clearable placeholder="请选择项目类型" v-model="detail.type" style="width: 300px;"> <el-select clearable placeholder="请选择项目类型" v-model="detail.type" style="width: 300px;">
<el-option v-for="item in [{label:'服务',value:1},{label:'货',value:2},{label:'工程',value:3}]" :label="item.label" :value="item.value"></el-option> <el-option v-for="item in [{label:'服务',value:1},{label:'货',value:2},{label:'工程',value:3}]" :label="item.label" :value="item.value"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -64,7 +64,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>资金渠道 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>资金渠道
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-select clearable placeholder="请选择资金渠道" v-model="detail.fundingChannels" style="width: 300px;"> <el-select multiple clearable placeholder="请选择资金渠道" v-model="detail.fundingChannels" style="width: 300px;">
<el-option v-for="item in moneyWay" :value="item.id" :label="item.value"></el-option> <el-option v-for="item in moneyWay" :value="item.id" :label="item.value"></el-option>
</el-select> </el-select>
</div> </div>
@ -279,7 +279,7 @@ export default {
type:res.type, type:res.type,
methods:res.purchase_type_id, methods:res.purchase_type_id,
modality:res.purchase_way_id, modality:res.purchase_way_id,
fundingChannels:res.money_way_id, fundingChannels:res.money_way_id.split(',').map(item =>{return Number(item)}),
price:res.plan_price, price:res.plan_price,
isBudget:res.is_plan === 1 ? true : false, isBudget:res.is_plan === 1 ? true : false,
plan:res.plans.map(item=>{ plan:res.plans.map(item=>{
@ -301,7 +301,7 @@ export default {
is_plan:this.detail.isBudget ? 1 : 0, is_plan:this.detail.isBudget ? 1 : 0,
purchase_type_id:this.detail.methods, purchase_type_id:this.detail.methods,
purchase_way_id:this.detail.modality, purchase_way_id:this.detail.modality,
money_way_id:this.detail.fundingChannels, money_way_id:this.detail.fundingChannels.toString(),
plan_price:this.detail.price, plan_price:this.detail.price,
name:this.detail.name, name:this.detail.name,
contract_plan_links:this.detail.plan.map(item=>{ contract_plan_links:this.detail.plan.map(item=>{

@ -323,9 +323,16 @@ export default {
} }
} }
}, },
async mounted() { watch:{
await this.getBudgets() isShowPaymentRegistration(newVal){
} if(newVal){
this.getBudgets()
}
}
},
// async mounted() {
// await this.getBudgets()
// }
} }
</script> </script>

@ -33,7 +33,7 @@
<div style="grid-area: tb7-4"></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-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-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-3" class="print-table1-grid-center">{{priceFormat(registration.discount_money)}}</div>
<div style="grid-area: tb8-4;padding-left: 0.6vw;display: block;"> <div style="grid-area: tb8-4;padding-left: 0.6vw;display: block;">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<div><span v-if="registration.type == '进度款'"></span></div> <div><span v-if="registration.type == '进度款'"></span></div>
@ -41,7 +41,7 @@
</div> </div>
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<div><span v-if="registration.type == '质保金'"></span></div> <div><span v-if="registration.type == '质保金'"></span></div>
<div style="height: 1.8vw;min-width: 6vw;border-bottom: 2px #000 solid;margin-left: 2vw;font-size: 12px;"> <div style="height: 1.8vw;min-width: 6vw;border-bottom: 2px #000 solid;margin-left: 2vw;font-size: 15px;">
<span v-if="registration.type!='进度款'&&registration.type!='质保金'&&registration.type!='结算款'"> {{registration.type}} </span> <span v-if="registration.type!='进度款'&&registration.type!='质保金'&&registration.type!='结算款'"> {{registration.type}} </span>
</div> </div>
<div>其他</div> <div>其他</div>

@ -4,6 +4,13 @@
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<div class="selects"> <div class="selects">
<div>
<span style="padding: 0 6px;word-break: keep-all;">关键字</span>
<span>
<Input v-model="select.keyword" clearable placeholder="关键字搜索" style="width: 200px"/>
</span>
</div>
<div> <div>
<span style="padding: 0 6px;word-break: keep-all;">创建日期</span> <span style="padding: 0 6px;word-break: keep-all;">创建日期</span>
<span> <span>
@ -94,7 +101,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div class="slot-btns"> <div class="slot-btns">
<template v-if="scope.row.status === 2"> <template v-if="scope.row.status === 2">
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['paymentRegistration'].isShowPaymentRegistration = true,$refs['paymentRegistration'].getContract(scope.row)">付款登记</Button> <Button class="slot-btns-item" type="primary" size="small" @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true">付款登记</Button>
</template> </template>
<template v-if="scope.row.status === 1 && scope.row.join_status === 3"> <template v-if="scope.row.status === 1 && scope.row.join_status === 3">
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['contractSign'].isShow = true,$refs['contractSign'].contractId = scope.row.id">签订合同</Button> <Button class="slot-btns-item" type="primary" size="small" @click="$refs['contractSign'].isShow = true,$refs['contractSign'].contractId = scope.row.id">签订合同</Button>
@ -211,7 +218,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>资金渠道 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>资金渠道
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-select placeholder="请选择资金渠道" v-model="form.fundingChannels" style="width: 300px;"> <el-select multiple placeholder="请选择资金渠道" v-model="form.fundingChannels" style="width: 300px;">
<el-option v-for="item in moneyWay" :value="item.id" :label="item.value"></el-option> <el-option v-for="item in moneyWay" :value="item.id" :label="item.value"></el-option>
</el-select> </el-select>
</div> </div>
@ -335,6 +342,7 @@ export default {
// //
select:{ select:{
keyword:'',
showDatePicker:'', showDatePicker:'',
pageIndex:1, pageIndex:1,
startDate:"", startDate:"",
@ -347,7 +355,7 @@ export default {
priceMax:null, priceMax:null,
status:"" status:""
}, },
type:[{label:'服务',value:1},{label:'货',value:2},{label:'工程',value:3}], type:[{label:'服务',value:1},{label:'货',value:2},{label:'工程',value:3}],
purchaseType: [],// purchaseType: [],//
purchaseWay:[],// purchaseWay:[],//
moneyWay:[],// moneyWay:[],//
@ -378,7 +386,7 @@ export default {
return "服务" return "服务"
break; break;
case 2: case 2:
return "货" return "货"
break; break;
case 3: case 3:
return "工程" return "工程"
@ -396,7 +404,14 @@ export default {
{ {
label:"资金来源", label:"资金来源",
width: 120, width: 120,
prop:"money_way.value" customFn:(row)=>{
{
return row.money_way_detail.map(item => {
return (<div>{item.value}</div>)
})
}
}
}, },
{ {
label:'已付金额', label:'已付金额',
@ -612,7 +627,7 @@ export default {
methods:"", methods:"",
modality:"", modality:"",
price:"", price:"",
fundingChannels:"", fundingChannels:[],
isBudget:true, isBudget:true,
plan:[] plan:[]
}, },
@ -859,6 +874,7 @@ export default {
// //
async getContracts(){ async getContracts(){
const res = await getContract({ const res = await getContract({
keyword:this.select.keyword,
page_size:10, page_size:10,
page:this.select.pageIndex, page:this.select.pageIndex,
start_created_at:this.select.startDate, start_created_at:this.select.startDate,
@ -908,7 +924,7 @@ export default {
}, },
// //
toggleSelection(plans) { toggleSelection(plans) {
if (plans) { if (plans && plans.length > 0) {
this.plans.filter(plan => { this.plans.filter(plan => {
return plans.includes(plan.id) return plans.includes(plan.id)
}).map(row => { }).map(row => {
@ -927,13 +943,12 @@ export default {
}, },
// //
submit(){ submit(){
//console.log(this.form)
addContrant({ addContrant({
type:this.form.type, type:this.form.type,
is_plan:this.form.isBudget ? 1 : 0, is_plan:this.form.isBudget ? 1 : 0,
purchase_type_id:this.form.methods, purchase_type_id:this.form.methods,
purchase_way_id:this.form.modality, purchase_way_id:this.form.modality,
money_way_id:this.form.fundingChannels, money_way_id:`${this.form.fundingChannels.toString()}`,
plan_price:this.form.price, plan_price:this.form.price,
name:this.form.name, name:this.form.name,
contract_plan_links:this.form.plan.map(item=>{ contract_plan_links:this.form.plan.map(item=>{

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

Loading…
Cancel
Save