|
|
@@ -152,6 +152,8 @@
|
|
|
}}条)</span>
|
|
|
<el-button type="primary" link @click="handleUpdateValidDate()"> 批量设置有效期
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" link @click="handleUpdateCostRatio()"> 批量设置比例
|
|
|
+ </el-button>
|
|
|
<el-button type="primary" link @click="handleCopy({})"> 批量复制
|
|
|
</el-button>
|
|
|
<ComplexTable showSelect :tableData="costitem.ptlAgreementCostVoList" :columns="columns"
|
|
|
@@ -278,7 +280,7 @@
|
|
|
<autoLoadingButton type="primary" :on-click="submitCopy">确定</autoLoadingButton>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
- <el-dialog :close-on-click-modal="false" v-model="copyDialog2" title="复制" width="500">
|
|
|
+ <el-dialog :close-on-click-modal="false" v-model="copyDialog2" title="批量设置有效期" width="500">
|
|
|
<el-form inline>
|
|
|
<el-form-item label="有效期">
|
|
|
<el-date-picker v-model="effectiveFailureTime" type="daterange" range-separator="至" start-placeholder="开始时间"
|
|
|
@@ -289,6 +291,25 @@
|
|
|
<autoLoadingButton type="primary" :on-click="submitUpdate">确定</autoLoadingButton>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog :close-on-click-modal="false" v-model="copyDialog3" title="批量设置比例" width="500">
|
|
|
+ <el-form :model="costRatioForm" label-width="140px">
|
|
|
+ <el-form-item label="操作类型">
|
|
|
+ <el-radio-group v-model="costRatioForm.operationType">
|
|
|
+ <el-radio value="ADD" size="large">增加</el-radio>
|
|
|
+ <el-radio value="SUBTRACT" size="large">减少</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="入口比例调整值">
|
|
|
+ <el-input-number v-model="costRatioForm.inletRatio" :min="0" :max="100" :precision="2" :step="1" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="入口留点比例调整值">
|
|
|
+ <el-input-number v-model="costRatioForm.inletKeepPointRatio" :min="0" :max="100" :precision="2" :step="1" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <autoLoadingButton type="primary" :on-click="submitUpdate1">确定</autoLoadingButton>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<!-- 行为区域 -->
|
|
|
@@ -1088,10 +1109,10 @@ const submitUpdate = () => {
|
|
|
ElMessage.error('请选择有效期')
|
|
|
return
|
|
|
}
|
|
|
- const params={
|
|
|
- costIds:costIds.value,
|
|
|
- effectiveTime:effectiveFailureTime.value[0],
|
|
|
- failureTime:effectiveFailureTime.value[1],
|
|
|
+ const params = {
|
|
|
+ costIds: costIds.value,
|
|
|
+ effectiveTime: effectiveFailureTime.value[0],
|
|
|
+ failureTime: effectiveFailureTime.value[1],
|
|
|
}
|
|
|
api.agreementApi.agreementCostBatchUpdateValidDate(params).then((res: any) => {
|
|
|
if (res.code == '200') {
|
|
|
@@ -1101,6 +1122,35 @@ const submitUpdate = () => {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+const copyDialog3 = ref(false)
|
|
|
+const costRatioForm = ref({})
|
|
|
+const handleUpdateCostRatio = () => {
|
|
|
+ if (!costIds.value.length) {
|
|
|
+ ElMessage.error('请选择费用')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ costRatioForm.value = {
|
|
|
+ operationType: 'ADD',
|
|
|
+ inletRatio: undefined,
|
|
|
+ inletKeepPointRatio: undefined,
|
|
|
+ }
|
|
|
+ copyDialog3.value = true
|
|
|
+}
|
|
|
+
|
|
|
+const submitUpdate1 = () => {
|
|
|
+ const params = {
|
|
|
+ costIds: costIds.value,
|
|
|
+ ...costRatioForm.value
|
|
|
+ }
|
|
|
+ api.agreementApi.batchAdjustCostRatio(params).then((res: any) => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ ElMessage.success('修改成功')
|
|
|
+ copyDialog3.value = false
|
|
|
+ agreementRulesList()
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
</script>
|
|
|
<!-- 样式区域 -->
|
|
|
<style lang='scss' scoped>
|