|
|
@@ -150,8 +150,10 @@
|
|
|
:label="costitem.productName" :name="costitem.productName">
|
|
|
<span class="strong">{{ costitem.productName }}费用({{ costitem.ptlAgreementCostVoList.length
|
|
|
}}条)</span>
|
|
|
- <el-button type="primary" link @click="handleCopy({})"> 批量复制
|
|
|
- </el-button>
|
|
|
+ <el-button type="primary" link @click="handleUpdateValidDate()"> 批量设置有效期
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" link @click="handleCopy({})"> 批量复制
|
|
|
+ </el-button>
|
|
|
<ComplexTable showSelect :tableData="costitem.ptlAgreementCostVoList" :columns="columns"
|
|
|
:maxHeight="250" :showIndex="false" :columnwidth="200" @selectionChange="(arr) => costIds = arr"
|
|
|
@select-all="(arr) => costIds = arr">
|
|
|
@@ -276,6 +278,17 @@
|
|
|
<autoLoadingButton type="primary" :on-click="submitCopy">确定</autoLoadingButton>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <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="开始时间"
|
|
|
+ end-placeholder="结束时间" value-format="YYYY-MM-DD HH:mm:ss" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <autoLoadingButton type="primary" :on-click="submitUpdate">确定</autoLoadingButton>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<!-- 行为区域 -->
|
|
|
@@ -928,7 +941,7 @@ const rulesList = ref([])
|
|
|
const handleCopy = (row) => {
|
|
|
agreementId.value = ''
|
|
|
coverRuleId.value = ''
|
|
|
- if(row.id) costIds.value = [row.id]
|
|
|
+ if (row.id) costIds.value = [row.id]
|
|
|
openDialog()
|
|
|
}
|
|
|
|
|
|
@@ -1059,6 +1072,35 @@ const uploadImage = (file: any) => {
|
|
|
});
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+const copyDialog2 = ref(false)
|
|
|
+const effectiveFailureTime = ref([])
|
|
|
+const handleUpdateValidDate = () => {
|
|
|
+ if (!costIds.value.length) {
|
|
|
+ ElMessage.error('请选择费用')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ effectiveFailureTime.value = []
|
|
|
+ copyDialog2.value = true
|
|
|
+}
|
|
|
+const submitUpdate = () => {
|
|
|
+ if (!effectiveFailureTime.value.length) {
|
|
|
+ ElMessage.error('请选择有效期')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const params={
|
|
|
+ costIds:costIds.value,
|
|
|
+ effectiveTime:effectiveFailureTime.value[0],
|
|
|
+ failureTime:effectiveFailureTime.value[1],
|
|
|
+ }
|
|
|
+ api.agreementApi.agreementCostBatchUpdateValidDate(params).then((res: any) => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ ElMessage.success('修改成功')
|
|
|
+ copyDialog2.value = false
|
|
|
+ agreementRulesList()
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
</script>
|
|
|
<!-- 样式区域 -->
|
|
|
<style lang='scss' scoped>
|