bug修改
This commit is contained in:
@@ -34,8 +34,8 @@
|
||||
@change="handleImportExcel" v-has="'company:import'">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('企业管理')" v-has="'company:export'">导出</a-button>
|
||||
<a-button type="primary" icon="download" @click="downTemplate('企业管理导入模板')" v-has="'company:downTemplate'">下载模板</a-button>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('单位/开票信息')" v-has="'company:export'">导出</a-button>
|
||||
<a-button type="primary" icon="download" @click="downTemplate('单位/开票信息导入模板')" v-has="'company:downTemplate'">下载模板</a-button>
|
||||
<a-button type="danger" icon="delete" @click="batchDel" v-has="'company:batchDel'">批量删除</a-button>
|
||||
</div>
|
||||
<!-- 操作按钮区域-end-->
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
@change="handleSignedCompanyChange"></company-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12" style="margin-bottom: -5px">
|
||||
<a-col :xxl="6" :xl="8" :sm="12" style="margin-bottom: 0">
|
||||
<a-form-item label="签订联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<select-contacts placeholder="请选择签订联系人"
|
||||
:selected-company="selectedCompany"
|
||||
|
||||
@@ -115,6 +115,7 @@ export default {
|
||||
this.form.resetFields()
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
console.log(this.model)
|
||||
let date = new Date()
|
||||
let sendDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
|
||||
this.$nextTick(() => {
|
||||
|
||||
@@ -118,12 +118,16 @@ export default {
|
||||
this.form.resetFields()
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
let date = new Date()
|
||||
let sendDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({'sendDate': sendDate})
|
||||
this.form.setFieldsValue(pick(this.model, 'sendMethod', 'sendDate', 'postNo', 'remark'))
|
||||
})
|
||||
if (!this.model.sendDate) {
|
||||
let date = new Date()
|
||||
let sendDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({'sendDate': sendDate})
|
||||
})
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
|
||||
@@ -65,10 +65,16 @@
|
||||
<!-- 操作按钮区域-->
|
||||
<div class="table-operator">
|
||||
<a-button type="primary" icon="plus" @click="handlePack" v-has="'packProject:pack'">打包</a-button>
|
||||
<a-button type="danger" icon="close-circle" @click="batchCancelPack" v-has="'packProject:batchCancelPack'">批量取消打包</a-button>
|
||||
<a-button type="primary" icon="pay-circle" @click="batchIncomePayment" v-has="'packProject:batchIncomePayment'">批量来款</a-button>
|
||||
<a-button type="primary" icon="file-text" @click="batchInvoicing" v-has="'packProject:batchInvoicing'">批量开票</a-button>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('打包项目列表')" v-has="'packProject:export'">导出</a-button>
|
||||
<a-button type="danger" icon="close-circle" @click="batchCancelPack" v-has="'packProject:batchCancelPack'">
|
||||
批量取消打包
|
||||
</a-button>
|
||||
<a-button type="primary" icon="pay-circle" @click="batchIncomePayment" v-has="'packProject:batchIncomePayment'">
|
||||
批量来款
|
||||
</a-button>
|
||||
<a-button type="primary" icon="file-text" @click="batchInvoicing" v-has="'packProject:batchInvoicing'">批量开票
|
||||
</a-button>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('打包项目列表')" v-has="'packProject:export'">导出
|
||||
</a-button>
|
||||
</div>
|
||||
<!-- 操作按钮区域-end-->
|
||||
|
||||
@@ -118,9 +124,11 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="incomePayment(record)" :disabled="Number(record.receivableAmount) === 0" v-has="'packProject:incomePayment'">来款</a>
|
||||
<a @click="incomePayment(record)" :disabled="Number(record.receivableAmount) === 0"
|
||||
v-has="'packProject:incomePayment'">来款</a>
|
||||
<a @click="cancelPack(record.id)" v-has="'packProject:cancelPack'">取消打包</a>
|
||||
<a @click="invoicing(record)" :disabled="record.needInvoice === 0 || Number(record.receivableAmount) === 0" v-has="'packProject:invoicing'">开票</a>
|
||||
<a @click="invoicing(record)" :disabled="record.needInvoice === 0 || Number(record.receivableAmount) === 0"
|
||||
v-has="'packProject:invoicing'">开票</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -163,6 +171,9 @@
|
||||
:project-type="selectProjectType"
|
||||
:project-name="selectProjectName"
|
||||
@ok="modalFormOk"></invoicing-stage-module>
|
||||
|
||||
<!-- 项目详情-->
|
||||
<project-detail-modal ref="projectDetail"></project-detail-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -178,6 +189,7 @@ import BatchInvoicingModule from './modules/BatchInvoicingModule'
|
||||
import ArriveStageModule from '../financialManagement/arriveAndInvoicing/modules/ArriveStageModule'
|
||||
import InvoicingStageModule from '../financialManagement/arriveAndInvoicing/modules/InvoicingStageModule'
|
||||
import { getPackCompanyById, batchRemovePackProject, removePackProject } from '../../api/incomePaymentsApi'
|
||||
import ProjectDetailModal from '../../components/ProjectDetailModal'
|
||||
|
||||
export default {
|
||||
name: 'PackProjectMaintenance',
|
||||
@@ -189,7 +201,8 @@ export default {
|
||||
BatchIncomePaymentModule,
|
||||
BatchInvoicingModule,
|
||||
ArriveStageModule,
|
||||
InvoicingStageModule
|
||||
InvoicingStageModule,
|
||||
ProjectDetailModal
|
||||
},
|
||||
mixins: [JeroListMixin],
|
||||
data() {
|
||||
@@ -508,7 +521,7 @@ export default {
|
||||
// 开票
|
||||
if (operateType === 'invoic') {
|
||||
// 是否存在不需要发票的项目
|
||||
if (arr.some(item => item.needInvoice === 0 || Number(item.receivableAmount) === 0)){
|
||||
if (arr.some(item => item.needInvoice === 0 || Number(item.receivableAmount) === 0)) {
|
||||
reject('存在不需要发票的项目!')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -600,13 +600,18 @@ export default {
|
||||
*/
|
||||
validateContact(rule, value, callback) {
|
||||
if (value) {
|
||||
// 需要联动验证的字段
|
||||
let fieldArr = ['contactsIdOne', 'contactsIdTwo', 'contactsIdThree']
|
||||
// 去掉当前更改的字段
|
||||
fieldArr = fieldArr.filter(tt => tt !== rule.field)
|
||||
const contactObj = this.form.getFieldsValue(['contactsIdOne', 'contactsIdTwo', 'contactsIdThree'])
|
||||
const contactArr = Object.values(contactObj)
|
||||
contactArr.filter(tt => tt !== undefined)
|
||||
console.log(contactArr)
|
||||
if (isRepeat(contactArr)) {
|
||||
callback('请选择不同的企业联系人')
|
||||
} else {
|
||||
// 进行其余两个联系人字段的重复校验
|
||||
this.form.validateFields(fieldArr)
|
||||
callback()
|
||||
}
|
||||
callback()
|
||||
|
||||
+18
-2
@@ -250,7 +250,14 @@ export default {
|
||||
],
|
||||
filters: {
|
||||
id: this.$route.query.workGroupId
|
||||
}
|
||||
},
|
||||
// 给定当年作为来款年份默认查询条件
|
||||
queryParam: {
|
||||
year: new Date().getFullYear().toString()
|
||||
},
|
||||
lastQueryParam: {
|
||||
year: new Date().getFullYear().toString()
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -309,7 +316,16 @@ export default {
|
||||
},
|
||||
true
|
||||
)
|
||||
}
|
||||
},
|
||||
searchReset() {
|
||||
this.lastQueryParam = {
|
||||
year: new Date().getFullYear().toString()
|
||||
}
|
||||
this.queryParam = {
|
||||
year: new Date().getFullYear().toString()
|
||||
}
|
||||
this.loadData(1)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user