bug修改
This commit is contained in:
@@ -52,6 +52,8 @@ const removePackProject = (param) => postAction('/pack/payPackCompanyProject/rem
|
||||
const batchRemovePackProject = (param) => postAction('/pack/payPackCompanyProject/removeBatch', param)
|
||||
// 企业管理审核
|
||||
const aduitCompany = (param) => getAction('/company/payCompanyManagement/audit', param)
|
||||
// 企业管理删除确认是否有联系人
|
||||
const checkContactByCompany = (param) => getAction('/company/payCompanyManagement/queryCompanyByIdFindContacts', param)
|
||||
// 资料分发
|
||||
const distribute = (param) => postAction('/project/payWorkingGroupDistributionRecord/add', param)
|
||||
// 资料批量分发
|
||||
@@ -100,6 +102,7 @@ export {
|
||||
removePackProject,
|
||||
batchRemovePackProject,
|
||||
aduitCompany,
|
||||
checkContactByCompany,
|
||||
distribute,
|
||||
batchDistribute,
|
||||
distributeMemberList,
|
||||
|
||||
@@ -34,8 +34,11 @@
|
||||
@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-->
|
||||
@@ -61,9 +64,10 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="handleAudit(record.id)" v-if="record.dataSource===2 && record.status===2" v-has="'company:confirm'">确认</a>
|
||||
<a @click="handleAudit(record.id)" v-if="record.dataSource===2 && record.status===2"
|
||||
v-has="'company:confirm'">确认</a>
|
||||
<a @click="handleEdit(record)" v-has="'company:edit'">编辑</a>
|
||||
<a @click="handleDelete(record.id)" v-has="'company:delete'">删除</a>
|
||||
<a @click="confirmDelete(record)" v-has="'company:delete'">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -78,7 +82,8 @@ import JEllipsis from '@comp/jero/JEllipsis'
|
||||
import BusinessManagementModule from './modules/BusinessManagementModule'
|
||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
||||
import { aduitCompany } from '../../api/incomePaymentsApi'
|
||||
import { aduitCompany, checkContactByCompany } from '../../api/incomePaymentsApi'
|
||||
import { getAction } from '../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'BusinessManagement',
|
||||
@@ -177,9 +182,9 @@ export default {
|
||||
const that = this
|
||||
this.$confirm({
|
||||
title: '确认',
|
||||
content: '确认该单位信息吗?',
|
||||
content: '确认该单位/开票信息吗?',
|
||||
onOk: function () {
|
||||
aduitCompany({id: id}).then((res) => {
|
||||
aduitCompany({ id: id }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.result)
|
||||
that.loadData()
|
||||
@@ -189,6 +194,91 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 单个删除的确认
|
||||
* @param record
|
||||
*/
|
||||
confirmDelete(record) {
|
||||
const that = this
|
||||
checkContactByCompany({ id: record.id }).then((res) => {
|
||||
if (res.success) {
|
||||
let confirmContent = '确定要删除该企业吗?'
|
||||
if (res.result && res.result.length > 0) {
|
||||
confirmContent = `${ res.result.join(',').toString() }下有联系人,确定要删除该企业吗?`
|
||||
}
|
||||
this.$confirm({
|
||||
title: '确认删除',
|
||||
content: confirmContent,
|
||||
onOk: function () {
|
||||
getAction(that.url.delete, { id: record.id }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
|
||||
if (that.ipagination.current > 1 && ((that.ipagination.current - 1) * that.ipagination.pageSize) + 1 === that.ipagination.total) {
|
||||
that.ipagination.current -= 1
|
||||
}
|
||||
that.loadData()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
batchDel() {
|
||||
if (!this.url.deleteBatch) {
|
||||
this.$message.error('请设置url.deleteBatch属性!')
|
||||
return
|
||||
}
|
||||
if (this.selectedRowKeys.length <= 0) {
|
||||
this.$message.warning('请选择一条记录!')
|
||||
return
|
||||
} else {
|
||||
let ids = ''
|
||||
for (let a = 0; a < this.selectedRowKeys.length; a++) {
|
||||
ids += this.selectedRowKeys[a] + ','
|
||||
}
|
||||
checkContactByCompany({ id: ids }).then((res) => {
|
||||
if (res.success) {
|
||||
let confirmContent = '是否删除选中数据?'
|
||||
if (res.result && res.result.length > 0) {
|
||||
confirmContent = `${res.result.join(',').toString()}下有联系人,确定要删除选中企业吗?`
|
||||
}
|
||||
const that = this
|
||||
this.$confirm({
|
||||
title: '确认删除',
|
||||
content: confirmContent,
|
||||
onOk: function () {
|
||||
that.loading = true
|
||||
getAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
// 判断当前删除的数据是否是最后一页的全部数据,如果是的话页码减一
|
||||
if (that.ipagination.current > 1 && (that.ipagination.current === Math.ceil(that.ipagination.total / that.ipagination.pageSize)) &&
|
||||
that.selectedRowKeys.length === that.dataSource.length
|
||||
) {
|
||||
that.ipagination.current -= 1
|
||||
}
|
||||
that.loadData()
|
||||
that.onClearSelected()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<a-form-item label="信用代码" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入信用代码"
|
||||
v-decorator="['dutyCode', validatorRules.dutyCode]"
|
||||
:maxLength='50'
|
||||
:maxLength='18'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -258,7 +258,7 @@ export default {
|
||||
if (phoneReg(value) || isPhone(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback('请填写正确的电话号码')
|
||||
callback('请输入正确的电话号码')
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<a-row>
|
||||
<a-col :xxl="4" :xl="10" :lg="12" :md="12" :sm="24">
|
||||
<a-form-item label="文件名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入文件名称" v-model="queryParam.workGroup"></a-input>
|
||||
<a-input placeholder="请输入文件名称" v-model="queryParam.fileName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<span class="table-page-search-submitButtons">
|
||||
|
||||
@@ -251,6 +251,9 @@ export default {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'workingGroupProject', 'year', 'principalIdA', 'principalIdB', 'convokeNum', 'operationCycle', 'yearChargeA', 'chargeNoticeNoA', 'chargeNoticeAId', 'yearChargeB', 'chargeNoticeNoB', 'chargeNoticeBId', 'missionAndObjectives', 'remarks'))
|
||||
if (!this.model.id) {
|
||||
this.form.setFieldsValue({'year': (new Date().getFullYear()).toString()})
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
>
|
||||
<a-input
|
||||
type="text"
|
||||
v-decorator="['username',{ rules: validatorRules.username.rules}]"
|
||||
v-decorator="['username',validatorRules.username]"
|
||||
placeholder="请输入用户名">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
@@ -35,7 +35,7 @@
|
||||
>
|
||||
<a-input
|
||||
type="text"
|
||||
v-decorator="['phone',{ rules: validatorRules.phone.rules}]"
|
||||
v-decorator="['phone',validatorRules.phone]"
|
||||
placeholder="请输入手机号">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
@@ -50,7 +50,7 @@
|
||||
:labelCol="{span: 5}"
|
||||
:wrapperCol="{span: 19}">
|
||||
<a-input
|
||||
v-decorator="['verifyCode', { rules: validatorRules.verifyCode.rules}]"
|
||||
v-decorator="['verifyCode', validatorRules.verifyCode]"
|
||||
type="text"
|
||||
placeholder="请输入验证码">
|
||||
</a-input>
|
||||
@@ -72,7 +72,7 @@
|
||||
:wrapperCol="{span: 19}">
|
||||
<a-input
|
||||
placeholder="请输入新密码"
|
||||
v-decorator="['password', { rules: validatorRules.password.rules}]"
|
||||
v-decorator="['password', validatorRules.password]"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
autocomplete="new-password"
|
||||
type="password">
|
||||
@@ -89,7 +89,7 @@
|
||||
:wrapperCol="{span: 19}">
|
||||
<a-input
|
||||
placeholder="请输入确认密码"
|
||||
v-decorator="['confirmPassword', { rules: validatorRules.confirmPassword.rules}]"
|
||||
v-decorator="['confirmPassword', validatorRules.confirmPassword]"
|
||||
type="password"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
autocomplete="new-password">
|
||||
@@ -134,7 +134,9 @@ export default {
|
||||
},
|
||||
phone: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入手机号码!' }, { validator: this.validatePhone }],
|
||||
{ required: true, message: '请输入手机号码!' },
|
||||
{ validator: this.validatePhone }
|
||||
],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
verifyCode: {
|
||||
@@ -242,7 +244,7 @@ export default {
|
||||
if (!err) {
|
||||
const hide = this.$message.loading('验证码发送中..', 0)
|
||||
let smsParams = {
|
||||
phone: phone,
|
||||
phone: phone
|
||||
}
|
||||
getAction('/sys/sendVerificationCode', smsParams).then(res => {
|
||||
if (!res.success) {
|
||||
@@ -279,7 +281,7 @@ export default {
|
||||
// 密码禁止粘贴
|
||||
handleOperate() {
|
||||
return false
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user