bug修改
This commit is contained in:
@@ -307,7 +307,7 @@ export default {
|
||||
checkDutyCode(rules, value, callback) {
|
||||
if (value) {
|
||||
if (!dutyCode(value)) {
|
||||
callback('请输入15位、18位数字和大写英文字母')
|
||||
callback('请输入15位、18位的信用代码')
|
||||
return
|
||||
}
|
||||
if (!this.model.id) {
|
||||
|
||||
@@ -602,6 +602,7 @@ export default {
|
||||
calculateOutstandingAmount() {
|
||||
if (this.accountsReceivableNum !== null && this.amountReceivedNum !== null) {
|
||||
this.model.outstandingAmount = Number(this.accountsReceivableNum) - Number(this.amountReceivedNum)
|
||||
this.model.outstandingAmount = this.model.outstandingAmount.toFixed(2)
|
||||
if (this.model.outstandingAmount === 0) {
|
||||
this.model.accountStatus = '3'
|
||||
} else if (this.model.outstandingAmount > 0 && this.model.outstandingAmount < Number(this.accountsReceivableNum)) {
|
||||
|
||||
@@ -663,6 +663,7 @@ export default {
|
||||
calculateOutstandingAmount() {
|
||||
if (this.accountsReceivableNum !== null && this.amountReceivedNum !== null) {
|
||||
this.model.outstandingAmount = Number(this.accountsReceivableNum) - Number(this.amountReceivedNum)
|
||||
this.model.outstandingAmount = this.model.outstandingAmount.toFixed(2)
|
||||
// 未收金额 === 0,已付全款状态
|
||||
if (this.model.outstandingAmount <= 0) {
|
||||
this.model.accountStatus = '3'
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:loading="loading"
|
||||
:loading="confirmLoading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
@@ -292,6 +292,7 @@ export default {
|
||||
this.$message.warn('请选择项目后再提交关联')
|
||||
return
|
||||
}
|
||||
this.confirmLoading = true
|
||||
let submitData = []
|
||||
let projectItem
|
||||
this.selectedRowKeys.forEach(item => {
|
||||
@@ -309,6 +310,8 @@ export default {
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
|
||||
+12
-2
@@ -50,7 +50,7 @@
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:loading="loading"
|
||||
:loading="confirmLoading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
@@ -74,7 +74,7 @@
|
||||
<!-- 工作组项目新增-->
|
||||
<working-group-member-unit-module
|
||||
ref="workingGroupMemberForm"
|
||||
@ok="modalFormOk"
|
||||
@ok="addOk"
|
||||
v-bind="$attrs"
|
||||
:disabled-charge-company="true"
|
||||
:is-contract-num-disabled="true"
|
||||
@@ -183,6 +183,7 @@ export default {
|
||||
this.$message.warn('请选择项目后再提交关联')
|
||||
return
|
||||
}
|
||||
this.confirmLoading = true
|
||||
let submitData = []
|
||||
let projectItem
|
||||
this.selectedRowKeys.forEach(item => {
|
||||
@@ -201,6 +202,8 @@ export default {
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
@@ -219,6 +222,13 @@ export default {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
)
|
||||
},
|
||||
/**
|
||||
* 新增完成后关闭两个对话框
|
||||
*/
|
||||
addOk() {
|
||||
this.close()
|
||||
this.$emit('ok')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,11 +93,17 @@
|
||||
<!-- 个人统计-->
|
||||
<div class="container-item">
|
||||
<div class="container-item-title">个人统计(前10)</div>
|
||||
<div class="container-item-echarts" id="personalStatistics"></div>
|
||||
<template v-if="personalData.length > 0">
|
||||
<div class="container-item-echarts" id="personalStatistics"></div>
|
||||
</template>
|
||||
<a-empty v-else/>
|
||||
</div>
|
||||
<div class="container-item">
|
||||
<div class="container-item-title">科室统计(前10)</div>
|
||||
<div class="container-item-echarts" id="departStatistics"></div>
|
||||
<template v-if="departData.length > 0">
|
||||
<div class="container-item-echarts" id="departStatistics"></div>
|
||||
</template>
|
||||
<a-empty v-else/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 工作组统计and企业统计-->
|
||||
@@ -105,11 +111,17 @@
|
||||
<!-- 个人统计-->
|
||||
<div class="container-item">
|
||||
<div class="container-item-title">工作组统计(前10)</div>
|
||||
<div class="container-item-echarts" id="workingGroupStatistics"></div>
|
||||
<template v-if="workingGroupData.length > 0">
|
||||
<div class="container-item-echarts" id="workingGroupStatistics"></div>
|
||||
</template>
|
||||
<a-empty v-else/>
|
||||
</div>
|
||||
<div class="container-item">
|
||||
<div class="container-item-title">企业统计(前10)</div>
|
||||
<div class="container-item-echarts" id="companyStatistics"></div>
|
||||
<template v-if="companyData.length > 0">
|
||||
<div class="container-item-echarts" id="companyStatistics"></div>
|
||||
</template>
|
||||
<a-empty v-else/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -173,7 +185,7 @@ export default {
|
||||
position: 'center',
|
||||
formatter: function (params) {
|
||||
return params.name.length > 8 ? params.name.substr(0, 8) + '...' : params.name
|
||||
},
|
||||
}
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
@@ -226,6 +238,9 @@ export default {
|
||||
* 初始化个人统计echarts
|
||||
*/
|
||||
initPersonalStatisticsEcharts() {
|
||||
if (this.personalData.length === 0) {
|
||||
return
|
||||
}
|
||||
let strData = JSON.stringify(this.personalData)
|
||||
strData = strData.replaceAll('principalName', 'name').replaceAll('comeAllMoney', 'value')
|
||||
let arr = JSON.parse(strData)
|
||||
@@ -248,6 +263,9 @@ export default {
|
||||
* 初始化科室统计echarts
|
||||
*/
|
||||
initDepartStatisticsEcharts() {
|
||||
if (this.departData.length === 0) {
|
||||
return
|
||||
}
|
||||
let strData = JSON.stringify(this.departData)
|
||||
strData = strData.replaceAll('departName', 'name').replaceAll('comeAllMoney', 'value')
|
||||
let arr = JSON.parse(strData)
|
||||
@@ -270,6 +288,9 @@ export default {
|
||||
* 初始化工作组统计echarts
|
||||
*/
|
||||
initWorkingGroupStatisticsEcharts() {
|
||||
if (this.workingGroupData.length === 0) {
|
||||
return
|
||||
}
|
||||
let strData = JSON.stringify(this.workingGroupData)
|
||||
strData = strData.replaceAll('workGroup', 'name').replaceAll('comeAllMoney', 'value')
|
||||
let arr = JSON.parse(strData)
|
||||
@@ -292,6 +313,9 @@ export default {
|
||||
* 初始化企业统计echarts
|
||||
*/
|
||||
initCompanyStatisticsEcharts() {
|
||||
if (this.companyData.length === 0) {
|
||||
return
|
||||
}
|
||||
let strData = JSON.stringify(this.companyData)
|
||||
strData = strData.replaceAll('chargeCompanyName', 'name').replaceAll('comeAllMoney', 'value')
|
||||
let arr = JSON.parse(strData)
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
<!-- table表格区域-->
|
||||
<div>
|
||||
<a-table rowKey="id"
|
||||
v-if="dataSource.length > 0"
|
||||
size="middle"
|
||||
:scroll="{x: 1300}"
|
||||
:columns="columns"
|
||||
:data-source="dataSource"
|
||||
:pagination="ipagination"
|
||||
:expandedRowKeys.sync="expandedRowKeys"
|
||||
bordered
|
||||
:defaultExpandAllRows="true"
|
||||
:loading="loading"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
@@ -190,10 +190,52 @@ export default {
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
dataSource: []
|
||||
dataSource: [],
|
||||
expandedRowKeys: [], // 展开数据的id
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadData(arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.error('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
//加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
// 清除展开的行id
|
||||
this.expandedRowKeys = []
|
||||
var params = this.getQueryParams()//查询条件
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
this.dataSource = res.result.records || res.result
|
||||
// 表格有数据则需要展开
|
||||
if (this.dataSource.length > 0) {
|
||||
this.dataSource.forEach(item => {
|
||||
this.expandedRowKeys.push(item.id)
|
||||
})
|
||||
this.$forceUpdate()
|
||||
}
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total
|
||||
//清空列表选中
|
||||
this.onClearSelected()
|
||||
} else {
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
}
|
||||
if (res.code === 510) {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
this.loading = false
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 下拉框的搜索
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
|
||||
@@ -46,10 +46,10 @@
|
||||
class="j-table-force-nowrap">
|
||||
|
||||
<!-- 输入-->
|
||||
<template slot="input-text" slot-scope="text, record">
|
||||
<template slot="input-text" slot-scope="text, record, index">
|
||||
<a-input placeholder="请输入备注"
|
||||
v-model="record.remark"
|
||||
:maxLength='50'
|
||||
v-model="remarkList[index]"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</template>
|
||||
|
||||
@@ -81,7 +81,9 @@ export default {
|
||||
tableData: {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: []
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
visible: {
|
||||
type: Boolean,
|
||||
@@ -168,6 +170,7 @@ export default {
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
remarkList: [], // 备注列表
|
||||
inputIncomingAmount: null, // 输入的来款金额
|
||||
disableMixinCreated: true,
|
||||
sumAmountOwed: 0 // 总欠款金额
|
||||
@@ -197,14 +200,14 @@ export default {
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
let formData = []
|
||||
this.dataSource.forEach(item => {
|
||||
this.dataSource.forEach((item, index) => {
|
||||
if (Number(item.thisIncomingAmount) > 0) {
|
||||
let obj = {
|
||||
amountReceived: item.thisIncomingAmount,
|
||||
paymentDate: values.paymentDate,
|
||||
projectId: item.id,
|
||||
projectType: item.projectType,
|
||||
remark: item.remark
|
||||
remark: this.remarkList[index]
|
||||
}
|
||||
formData.push(obj)
|
||||
}
|
||||
@@ -227,13 +230,14 @@ export default {
|
||||
},
|
||||
open() {
|
||||
this.dataSource = this.tableData
|
||||
this.dataSource.forEach(item => {
|
||||
item.remark = null
|
||||
this.dataSource.forEach(() => {
|
||||
this.remarkList.push('')
|
||||
})
|
||||
this.loadData()
|
||||
},
|
||||
close() {
|
||||
this.form.resetFields()
|
||||
this.remarkList = []
|
||||
this.clearThisTimeAmount()
|
||||
this.$emit('update:visible', false)
|
||||
},
|
||||
|
||||
@@ -85,10 +85,10 @@
|
||||
</template>
|
||||
|
||||
<!-- 输入-->
|
||||
<template slot="input-text" slot-scope="text, record">
|
||||
<template slot="input-text" slot-scope="text, record, index">
|
||||
<a-input placeholder="请输入备注"
|
||||
v-model="record.remark"
|
||||
:maxLength='50'
|
||||
v-model="remarkList[index]"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</template>
|
||||
|
||||
@@ -146,6 +146,11 @@ export default {
|
||||
if (value) {
|
||||
this.open()
|
||||
}
|
||||
},
|
||||
packContactId(value) {
|
||||
if (value) {
|
||||
this.postContactChange(value)
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -209,6 +214,7 @@ export default {
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
remarkList: [], // 备注列表
|
||||
validatorRules: {
|
||||
invoiceAmount: {
|
||||
rules: [{ required: true, validator: this.checkMoney }],
|
||||
@@ -236,7 +242,8 @@ export default {
|
||||
}
|
||||
},
|
||||
inputInvoicingAmount: null, // 输入的开票金额
|
||||
sumAmountOwed: 0 // 总未开票金额
|
||||
sumAmountOwed: 0, // 总未开票金额,
|
||||
packContact: {}, // 邮寄联系人信息
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -290,7 +297,12 @@ export default {
|
||||
postalCode: res.result.postalCode,
|
||||
contactAddress: res.result.contactAddress
|
||||
}
|
||||
this.form.setFieldsValue(pick(obj, 'postalCode', 'contactAddress'))
|
||||
if (this.packContactId) {
|
||||
this.packContact = obj
|
||||
this.packContact.contactId = value
|
||||
} else {
|
||||
this.form.setFieldsValue(pick(obj, 'postalCode', 'contactAddress'))
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -333,16 +345,19 @@ export default {
|
||||
if (!err) {
|
||||
let bmpList = []
|
||||
let data = this.dataSource.filter(tt => tt.thisInvoicingAmount !== 0 && tt.thisInvoicingAmount)
|
||||
data.forEach(item => {
|
||||
data.forEach((item, index) => {
|
||||
let obj = {
|
||||
invoiceAmount: item.thisInvoicingAmount,
|
||||
projectId: item.id,
|
||||
projectType: item.projectType,
|
||||
remark: item.remark
|
||||
remark: this.remarkList[index]
|
||||
}
|
||||
bmpList.push(obj)
|
||||
})
|
||||
let param = values
|
||||
if (this.packContactId) {
|
||||
param = Object.assign(param, this.packContact)
|
||||
}
|
||||
param.bmpList = bmpList
|
||||
addPayBill(param).then(res => {
|
||||
if (res.success) {
|
||||
@@ -360,10 +375,9 @@ export default {
|
||||
this.close()
|
||||
},
|
||||
open() {
|
||||
console.log(this.selectedData)
|
||||
this.dataSource = this.selectedData
|
||||
this.dataSource.forEach(item => {
|
||||
item.remark = null
|
||||
this.dataSource.forEach(() => {
|
||||
this.remarkList.push('')
|
||||
})
|
||||
this.loadData()
|
||||
},
|
||||
|
||||
@@ -92,11 +92,13 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="goFilesMaintenance(record)" v-has="'workingGroupProject:fileMaintenance'">文件维护</a>
|
||||
<a @click="goConferenceMaintenance(record)" v-has="'workingGroupProject:meetingMaintenance'">会议维护</a>
|
||||
<a @click="copyWorkGroup(record.id)" v-has="'workingGroupProject:copy'" v-if="record.canOperate">复制</a>
|
||||
<a @click="handleEdit(record)" v-has="'workingGroupProject:edit'" v-if="record.canOperate">编辑</a>
|
||||
<a @click="handleDelete(record.id)" v-has="'workingGroupProject:delete'" v-if="record.canOperate">删除</a>
|
||||
<template v-if="record.showOperate">
|
||||
<a @click="goFilesMaintenance(record)" v-has="'workingGroupProject:fileMaintenance'">文件维护</a>
|
||||
<a @click="goConferenceMaintenance(record)" v-has="'workingGroupProject:meetingMaintenance'">会议维护</a>
|
||||
<a @click="copyWorkGroup(record.id)" v-has="'workingGroupProject:copy'" v-if="record.canOperate">复制</a>
|
||||
<a @click="handleEdit(record)" v-has="'workingGroupProject:edit'" v-if="record.canOperate">编辑</a>
|
||||
<a @click="handleDelete(record.id)" v-has="'workingGroupProject:delete'" v-if="record.canOperate">删除</a>
|
||||
</template>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -170,7 +172,8 @@ export default {
|
||||
width: 300,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
]
|
||||
],
|
||||
operateData: [] // 进行操作权限校验时使用的数据
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -196,19 +199,6 @@ export default {
|
||||
} else {
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
// 判断登录用户是否为负责人B
|
||||
this.dataSource.forEach((item, index) => {
|
||||
// (负责人B不可操作)
|
||||
checkoutWorkingGroupPrincipal({ id: item.id }).then(res => {
|
||||
// 不可操作则置否
|
||||
if (res.success) {
|
||||
item.canOperate = true
|
||||
} else {
|
||||
item.canOperate = false
|
||||
}
|
||||
this.$set(this.dataSource, index, item)
|
||||
})
|
||||
})
|
||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
}
|
||||
if (res.code === 510) {
|
||||
@@ -216,6 +206,34 @@ export default {
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
// 判断登录用户是否为负责人B
|
||||
if (this.dataSource.length > 0) {
|
||||
for (let index = 0; index < this.dataSource.length; index++) {
|
||||
this.checkWorkingGroupPrincipal(index).then((res) => {
|
||||
res.showOperate = true
|
||||
this.$set(this.dataSource, index, res)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 判断登录用户是否为负责人B
|
||||
*/
|
||||
checkWorkingGroupPrincipal(index) {
|
||||
let item = this.dataSource[index]
|
||||
// (负责人B不可操作)
|
||||
return new Promise(resolve => {
|
||||
checkoutWorkingGroupPrincipal({ id: item.id }).then(res => {
|
||||
// 不可操作则置否
|
||||
if (res.success) {
|
||||
item.canOperate = true
|
||||
} else {
|
||||
item.canOperate = false
|
||||
}
|
||||
}).finally(() => {
|
||||
resolve(item)
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -139,10 +139,10 @@
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="收费通知" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-upload file-type="pdf"
|
||||
file-type-error-message="请pdf文件"
|
||||
:multiple="false"
|
||||
<j-upload file-type-error-message="请上传收费通知"
|
||||
:multiple="true"
|
||||
:return-id="true"
|
||||
:number="1"
|
||||
bizPath="payment"
|
||||
v-decorator="['chargeNoticeId', validatorRules.chargeNoticeId]"
|
||||
:trigger-change="true"></j-upload>
|
||||
|
||||
Reference in New Issue
Block a user