|
|
|
@ -267,9 +267,9 @@ |
|
|
|
<span class="dialog-footer"> |
|
|
|
<el-button style="background-color: #7E91FF;" @click="closeAddForm">取消</el-button> |
|
|
|
<el-button v-if="addOrEdit == 1" style="background-color: #2741DE; margin-left: 2.5vw;" |
|
|
|
type="primary" @click="throttledhandleAddForm">确定</el-button> |
|
|
|
type="primary" @click="throttledhandleAddForm" :disabled="ifAddDone">确定</el-button> |
|
|
|
<el-button v-else-if="addOrEdit == 2" style="background-color: #2741DE; margin-left: 2.5vw;" |
|
|
|
type="primary" @click="throttledhandleEditForm">编辑</el-button> |
|
|
|
type="primary" @click="throttledhandleEditForm" :disabled="ifReAddDone">编辑</el-button> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
@ -428,6 +428,10 @@ const total = ref(0) // 总条数 |
|
|
|
const pageInfo = ref({ pageSize: 10, pageNum: 1 }) // 分页信息 |
|
|
|
const numUnitList = ref(['年', '月']) |
|
|
|
|
|
|
|
//防止重复点击状态管理 |
|
|
|
const ifAddDone = ref(false) |
|
|
|
const ifReAddDone = ref(false) |
|
|
|
|
|
|
|
// 角色标识:固定为客服(删除财务、总部财务、超级管理员标识) |
|
|
|
const kefu = ref(true) |
|
|
|
const caiwu = ref(false) |
|
|
|
@ -683,6 +687,7 @@ const handleAddForm = async () => { |
|
|
|
if (addFormData.value.payTime) { |
|
|
|
addFormData.value.payTime = moment(addFormData.value.payTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
ifAddDone.value = true |
|
|
|
const result = await request({ |
|
|
|
url: '/cashCollection/add', |
|
|
|
data: { |
|
|
|
@ -702,9 +707,11 @@ const handleAddForm = async () => { |
|
|
|
getlist() |
|
|
|
closeAddForm() |
|
|
|
} |
|
|
|
ifAddDone.value = false |
|
|
|
} catch (error) { |
|
|
|
console.log('新增报错:', error); |
|
|
|
ElMessage.error('请完善表单信息后提交'); |
|
|
|
ifAddDone.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -732,6 +739,7 @@ const handleEditForm = async () => { |
|
|
|
if (addFormData.value.payTime) { |
|
|
|
addFormData.value.payTime = moment(addFormData.value.payTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
ifReAddDone.value = true |
|
|
|
const result = await request({ |
|
|
|
url: '/cashCollection/reSubmit', |
|
|
|
data: { |
|
|
|
@ -751,8 +759,10 @@ const handleEditForm = async () => { |
|
|
|
getlist() |
|
|
|
closeAddForm() |
|
|
|
} |
|
|
|
ifReAddDone.value = false |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
ifReAddDone.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|