2022.8.15 问题修改

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

@ -2,7 +2,7 @@
ENV = 'development'
# 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://192.168.60.18:2021

@ -39,7 +39,9 @@
</slot>
</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;">
<Page :total="total" show-elevator @on-change="pageChange"/>
@ -255,6 +257,7 @@ export default {
]
},
list:[],
totalMoney:0,
total:0,
pageIndex:1,
table:[
@ -329,6 +332,30 @@ export default {
}
},
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){
this.pageIndex = e
@ -349,8 +376,9 @@ export default {
type:this.select.type,
plan_department_id:this.select.department
}).then(res=>{
this.list = res.data
this.total = res.total
this.list = res.list.data
this.total = res.list.total
this.totalMoney = res.total_money
})
},
//

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

@ -19,7 +19,7 @@
</div>
<div class="xy-table-item-content">
<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>
</div>
</div>
@ -64,7 +64,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>资金渠道
</div>
<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-select>
</div>
@ -279,7 +279,7 @@ export default {
type:res.type,
methods:res.purchase_type_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,
isBudget:res.is_plan === 1 ? true : false,
plan:res.plans.map(item=>{
@ -301,7 +301,7 @@ export default {
is_plan:this.detail.isBudget ? 1 : 0,
purchase_type_id:this.detail.methods,
purchase_way_id:this.detail.modality,
money_way_id:this.detail.fundingChannels,
money_way_id:this.detail.fundingChannels.toString(),
plan_price:this.detail.price,
name:this.detail.name,
contract_plan_links:this.detail.plan.map(item=>{

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

@ -33,7 +33,7 @@
<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-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="display: flex;align-items: center;">
<div><span v-if="registration.type == '进度款'"></span></div>
@ -41,7 +41,7 @@
</div>
<div style="display: flex;align-items: center;">
<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>
</div>
<div>其他</div>

@ -4,6 +4,13 @@
<div slot="content"></div>
<slot>
<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>
<span style="padding: 0 6px;word-break: keep-all;">创建日期</span>
<span>
@ -94,7 +101,7 @@
<template slot-scope="scope">
<div class="slot-btns">
<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 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>
@ -211,7 +218,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>资金渠道
</div>
<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-select>
</div>
@ -335,6 +342,7 @@ export default {
//
select:{
keyword:'',
showDatePicker:'',
pageIndex:1,
startDate:"",
@ -347,7 +355,7 @@ export default {
priceMax:null,
status:""
},
type:[{label:'服务',value:1},{label:'货',value:2},{label:'工程',value:3}],
type:[{label:'服务',value:1},{label:'货',value:2},{label:'工程',value:3}],
purchaseType: [],//
purchaseWay:[],//
moneyWay:[],//
@ -378,7 +386,7 @@ export default {
return "服务"
break;
case 2:
return "货"
return "货"
break;
case 3:
return "工程"
@ -396,7 +404,14 @@ export default {
{
label:"资金来源",
width: 120,
prop:"money_way.value"
customFn:(row)=>{
{
return row.money_way_detail.map(item => {
return (<div>{item.value}</div>)
})
}
}
},
{
label:'已付金额',
@ -612,7 +627,7 @@ export default {
methods:"",
modality:"",
price:"",
fundingChannels:"",
fundingChannels:[],
isBudget:true,
plan:[]
},
@ -859,6 +874,7 @@ export default {
//
async getContracts(){
const res = await getContract({
keyword:this.select.keyword,
page_size:10,
page:this.select.pageIndex,
start_created_at:this.select.startDate,
@ -908,7 +924,7 @@ export default {
},
//
toggleSelection(plans) {
if (plans) {
if (plans && plans.length > 0) {
this.plans.filter(plan => {
return plans.includes(plan.id)
}).map(row => {
@ -927,13 +943,12 @@ export default {
},
//
submit(){
//console.log(this.form)
addContrant({
type:this.form.type,
is_plan:this.form.isBudget ? 1 : 0,
purchase_type_id:this.form.methods,
purchase_way_id:this.form.modality,
money_way_id:this.form.fundingChannels,
money_way_id:`${this.form.fundingChannels.toString()}`,
plan_price:this.form.price,
name:this.form.name,
contract_plan_links:this.form.plan.map(item=>{

@ -1,157 +1,157 @@
'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_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')
}
)
}
}

Loading…
Cancel
Save