瀏覽代碼

删除重复引入

Karsa 6 月之前
父節點
當前提交
36bd18737c

+ 0 - 180
src/views/custom_manage/components/CheckToDoDialog.vue

@@ -1,180 +0,0 @@
-<script setup>
-import { ref, watch } from "vue"
-import moment from "moment";
-
-import { customInterence } from '@/api/api.js'
-
-const props = defineProps({
-  ischeckToDoDialogShow: {
-    type: Boolean,
-    default: false,
-  },//控制弹窗展示
-  todoInfo: {
-    type: Object,
-  },//todo的info
-})
-
-const emits=defineEmits(['check','update:ischeckToDoDialogShow'])
-
-const textarea=ref("") //任务描述
-const remake=ref("")//任务备注
-const todoData=ref([])//表格数据
-const todoId=ref(0)//任务的id
-
-watch(()=>props.ischeckToDoDialogShow,()=>{
-  if(!props.ischeckToDoDialogShow) return 
-    //获取历史记录
-    customInterence.getHistory({
-      CompanyId:props.todoInfo.CompanyId
-    }).then(res=>{
-      if(res.Ret===200){
-        todoData.value = res.Data
-      }
-    })
-    //获取最新记录
-    customInterence.getToDoItem({
-        CompanyId:props.todoInfo.CompanyId
-      }).then(res=>{
-        if(res.Ret===200&&res.Data){
-          textarea.value = res.Data[0].Content
-          todoId.value = res.Data[0].Id
-          remake.value = res.Data[0].Remark||''
-        }
-    })
-})
-
-const closeDia=(type)=>{
-  if(type==='confirm'){
-    emits('check',{Id:todoId.value,Remark:remake.value})
-  }else{
-    emits("update:ischeckToDoDialogShow", false);
-  }
-  textarea.value= ""
-  remake.value=""
-  todoData.value=[]
-  todoId.value=0
-}
-const isLast=(info)=>{
-  if(info.$index===todoData.value.length-1){
-    return true
-  }else{
-    return false
-  }
-}
-
-</script>
-
-<template>
-  <el-dialog
-    v-if="props.ischeckToDoDialogShow"
-    :model-value="props.ischeckToDoDialogShow"
-    :close-on-click-modal="false"
-    :modal-append-to-body="false"
-    @close="closeDia"
-    width="889px"
-    v-dialogDrag
-    center
-  >
-    <template #header>
-      <div style="display: flex; align-items: center">
-        <span style="font-size: 16px"
-        >{{ props.todoInfo ? props.todoInfo.CompanyName : "" }}——任务审核详情</span>
-      </div>
-    </template>
-    <div class="dialog-container">
-      <div class="input-container">
-        <span>任务描述:</span>
-        <el-input
-          type="textarea"
-          disabled
-          :rows="2"
-          resize="none"
-          v-model="textarea"
-        >
-        </el-input>
-      </div>
-      <div class="input-container">
-        <span>备注:</span>
-        <el-input
-          type="textarea"
-          placeholder="请输入备注"
-          :rows="2"
-          resize="none"
-          v-model="remake"
-        >
-        </el-input>
-      </div>
-    </div>
-    <div class="foot-container">
-      <el-button type="primary" @click="closeDia('confirm')">确 定</el-button>
-      <el-button @click="closeDia('cancel')">取 消</el-button>
-    </div>
-    <div class="table-container">
-        <el-table
-			:data="todoData"
-      v-if="todoData"
-			border
-			max-height="300"
-			style="width: 100%; margin-top: 20px;margin-bottom: 20px">
-            <el-table-column label="任务描述" align="center" prop="Content">
-              <template #default="scope">
-                {{scope.row['Content']||'--'}}
-              </template>
-            </el-table-column>
-            <el-table-column label="创建时间" align="center" prop="CreateTime" :min-width="120">
-              <template #default="{row}">
-                <span>
-                  {{row['CreateTime']==='0001-01-01T00:00:00Z'?'':moment(row['CreateTime']).format('YYYY-MM-DD HH:mm:ss')}}
-                </span>
-              </template>
-            </el-table-column>
-            <el-table-column label="截止日期" align="center" prop="EndTimeStr" :min-width="120">
-              <template #default="scope">
-                  <span :style="{color:isLast(scope)&&scope.row['EndTimeStr']?'red':'#606266'}">
-                   {{scope.row['EndTimeStr']||'--'}}
-                  </span>
-              </template>
-            </el-table-column>
-            <el-table-column label="备注" align="center" prop="Remark" :min-width="120">
-              <template #default="scope">
-                  <span>
-                   {{scope.row['Remark']||'--'}}
-                  </span>
-              </template>
-            </el-table-column>
-        </el-table>
-    </div>
-  </el-dialog>
-</template>
-
-<style scoped lang="scss">
-.el-dialog {
-  .dialog-container {
-    .input-container {
-      display: flex;
-      align-items: center;
-      font-size: 16px;
-      margin-bottom: 30px;
-      span{
-        width:80px;
-        font-size: 14px;
-      }
-      .el-textarea {
-        font-size: 16px;
-      }
-    }
-  }
-  .foot-container {
-    display: flex;
-    justify-content: center;
-    margin-bottom: 20px;
-    .el-button {
-      width: 224px;
-      height: 40px;
-    }
-  }
-  // .table-container{
-
-  // }
-}
-</style>

+ 0 - 129
src/views/custom_manage/components/HistoryToDoDialog.vue

@@ -1,129 +0,0 @@
-<script setup>
-import { ref, watch } from "vue"
-import moment from "moment";
-
-import { customInterence } from '@/api/api.js'
-
-const props = defineProps({
-  isHistoryDialogShow: {
-    type: Boolean,
-    default: false,
-  },//控制弹窗展示
-  todoInfo: {
-    type: Object,
-  },//todo的info
-})
-
-const emits=defineEmits(['update:isHistoryDialogShow'])
-
-const todoData=ref([])//表格数据
-const tableLabel=[
-    {
-        label:'任务描述',
-        key:'Content',
-        widthsty:150
-    },
-    {
-        label:'客户类型',
-        key:'ProductId',
-        widthsty:80
-    },
-    {
-        label:'创建人',
-        key:'CreateUserName'
-    },
-    {
-        label:'创建时间',
-        key:'CreateTime',
-        minwidthsty:150
-    },
-    {
-        label:'截止日期',
-        key:'EndTimeStr',
-        minwidthsty:120
-    },
-    {
-        label:'备注',
-        key:'Remark',
-        widthsty:150
-    },
-    {
-        label:'审核人',
-        key:'ApproveUserName'
-    },
-    {
-        label:'审核时间',
-        key:'ApproveTime',
-        minwidthsty:150
-    }
-]
-
-watch(()=>props.isHistoryDialogShow,()=>{
-  if(!props.isHistoryDialogShow) return 
-    //获取历史记录
-    customInterence.getHistory({
-      CompanyId:props.todoInfo.CompanyId
-    }).then(res=>{
-      if(res.Ret===200&&res.Data){
-        todoData.value = res.Data
-      }
-    })
-})
-
-const closeDia=()=>{
-  todoData.value=[]
-  emits("update:isHistoryDialogShow", false);
-}
-
-</script>
-
-<template>
-  <el-dialog
-    v-if="props.isHistoryDialogShow"
-    :model-value="props.isHistoryDialogShow"
-    :close-on-click-modal="false"
-    :modal-append-to-body="false"
-    @close="closeDia"
-    width="1020px"
-    v-dialogDrag
-    center
-  >
-    <template #header>
-      <div style="display: flex; align-items: center">
-        <span style="font-size: 16px"
-          >{{ props.todoInfo ? props.todoInfo.CompanyName : "" }}——任务历史记录</span
-        >
-      </div>
-    </template>
-
-    <div class="dialog-container">
-        <div class="table-container">
-            <el-table
-                v-if="todoData"
-                :data="todoData"
-                border
-                max-height="600"
-                style="width: 100%; margin-bottom: 20px">
-                <el-table-column align="center"
-                    v-for="item in tableLabel" :key="item.key"
-                    :label="item.label"
-                    :prop="item.prop"
-                    :width="item.widthsty" 
-                    :min-width="item.minwidthsty"
-                >
-                <template #default="{row}">
-                  <span v-if="['CreateTime','ApproveTime'].includes(item.key)">
-                   {{row[item.key]==='0001-01-01T00:00:00Z'?'--':moment(row[item.key]).format('YYYY-MM-DD HH:mm:ss')}}
-                  </span>
-                  <span v-else-if="item.key==='ProductId'">{{row[item.key]===1?'ficc':'权益'}}</span>
-                  <span v-else>{{row[item.key]||'--'}}</span>
-                </template>
-                </el-table-column>
-            </el-table>
-        </div>
-    </div>
-  </el-dialog>
-</template>
-
-<style scoped lang="scss">
-</style>

+ 0 - 265
src/views/custom_manage/components/ModifyToDoDialog.vue

@@ -1,265 +0,0 @@
-
-<script setup>
-import { ref, watch,computed } from "vue"
-import { ElMessage } from 'element-plus'
-
-import { customInterence } from '@/api/api.js'
-
-const props = defineProps({
-  type:{
-    type:String,
-    default:'add'
-  },//是新增还是修改
-  isModifyDialogShow: {
-    type: Boolean,
-    default: false,
-  },//控制弹窗展示
-  todoInfo: {
-    type: Object,
-  },//todo的info
-})
-
-const emits=defineEmits(['modify','update:isModifyDialogShow'])
-
-const textarea=ref("") //任务描述
-const activeTab=ref(1)
-const Tabs=[
-  {
-    label: "FICC任务",
-    key: 1,
-    textarea: "FiccTextarea",
-  },
-  {
-    label: "权益任务",
-    key: 2,
-    textarea: "qyTextarea",
-  },
-] //任务类型
-const todoId=ref(0)//编辑时有用,任务的id
-const todoList=ref(null)//编辑时有用,任务的列表
-const editTabs=ref([])
-const modiDate=ref(null)//截止时间
-const pickerOptions={
-    disabledDate(time) {
-      return time.getTime() < Date.now() - 24*60*60*1000;
-    }
-}
-const Role=computed(()=>{
-  return localStorage.getItem("Role");
-})
-const isTabsShow=computed(()=>{
-  if(Role.value==='admin'&&props.todoInfo.IsShared&&props.type==='add'){
-    return true
-  }else{
-    return false
-  }  
-})
-const ProductId=computed(()=>{
-  if(props.todoInfo.IsShared){
-    return activeTab.value
-  }else{
-    return props.todoInfo.CompanyType==='ficc'?1:2
-  }
-})
-
-watch(()=>props.isModifyDialogShow,()=>{
-  if(props.type==='edit'&&props.isModifyDialogShow){
-    //获取最新记录
-    customInterence.getToDoItem({
-      CompanyId:props.todoInfo.CompanyId
-    }).then(res=>{
-      if(res.Ret===200){
-        if(!props.todoInfo.IsShared){
-          textarea.value = res.Data[0].Content
-          modiDate.value = res.Data[0].EndTimeStr
-          todoId.value = res.Data[0].Id
-          editTabs.value=[]
-        }else{
-          todoList.value = res.Data
-          if(todoList.value.length>1){
-            editTabs.value = Tabs.value
-          }else{
-            editTabs.value = Tabs.value?.filter(i=>i.key===todoList.value[0].ProductId)
-          }
-          if(Role.value!=='admin'){
-            editTabs.value=[]
-          }
-          activeTab.value = todoList.value[0].ProductId
-          textarea.value = todoList.value[0].Content
-          modiDate.value = res.Data[0].EndTimeStr
-          todoId.value = todoList.value[0].Id
-        }  
-      }
-    })
-  }
-})
-
-const closeDia=(type)=>{
-  if(type==='confirm'){
-    if(!checkInput()) return
-    emits('modify',{
-      type:props.type,
-      Description:textarea.value,
-      ProductId:ProductId.value,
-      CompanyId:props.todoInfo.CompanyId,
-      Id:todoId.value,
-      EndTime:modiDate.value
-    })
-    textarea.value=''
-    modiDate.value=null
-    activeTab.value=1
-    editTabs.value=[]
-  }else{
-    activeTab.value=1
-    textarea.value=''
-    modiDate.value=null
-    editTabs.value=[]
-    emits("update:isModifyDialogShow", false);
-  }
-}
-const changeTabs=({ key, textarea })=>{
-  if (key === activeTab.value) return;
-  activeTab.value = key;
-  if(props.type==='add'){
-    textarea.value = "";
-    modiDate.value=null
-  }else{
-    textarea.value = todoList.value.filter(i=>i.ProductId===key)[0].Content
-    modiDate.value = todoList.value.filter(i=>i.ProductId===key)[0].EndTimeStr
-    todoId.value = todoList.value.filter(i=>i.ProductId===key)[0].Id
-  }     
-}
-const checkInput=()=>{
-  let flag = true
-  if(!textarea.value.length){
-      ElMessage.error('请输入任务描述')
-      flag = false
-  }else if(props.type==='add'&!modiDate.value){
-    ElMessage.error('请输入截止时间')
-    flag=false
-  }
-  return flag
-}
-
-</script>
-
-<template>
-  <el-dialog
-    v-if="props.isModifyDialogShow"
-    :model-value="props.isModifyDialogShow"
-    :close-on-click-modal="false"
-    :modal-append-to-body="false"
-    @close="closeDia"
-    width="889px"
-    v-dialogDrag
-    center
-  >
-    <template #header>
-      <div style="display: flex; align-items: center">
-        <span style="font-size: 16px"
-          >{{ props.todoInfo ? props.todoInfo.CompanyName : "" }}——任务详情</span
-        >
-      </div>
-    </template>
-    <div class="dialog-container">
-      <div class="tabs" v-if="isTabsShow">
-        <span
-          class="tab-item"
-          v-for="item in Tabs"
-          :key="item.key"
-          @click="changeTabs(item)"
-          :style="activeTab === item.key ? 'color:#409EFF;' : ''"
-          >{{ item.label }}</span
-        >
-      </div>
-      <div class="tabs" v-if="props.type==='edit'">
-        <span
-          class="tab-item"
-          v-for="item in editTabs"
-          :key="item.key"
-          @click="changeTabs(item)"
-          :style="activeTab === item.key ? 'color:#409EFF;' : ''"
-          >{{ item.label }}</span
-        >
-      </div>
-      <div class="input-container">
-        <div class="input-item">
-          <span>*</span>
-          <el-input
-            type="textarea"
-            :rows="12"
-            placeholder="请输入任务描述"
-            v-model="textarea"
-            required
-          >
-        </el-input>
-        </div>
-        <div class="input-item">
-          <span>*</span>
-          <el-date-picker
-            style="width: 220px;"
-            v-model="modiDate"
-            type="date"
-            format="YYYY-MM-DD"
-            value-format="yyyy-MM-dd"
-            :picker-options="pickerOptions"
-            placeholder="截止日期">
-          </el-date-picker>
-        </div>
-      </div>
-    </div>
-    <template #footer>
-      <div class="foot-container">
-        <el-button type="primary" @click="closeDia('confirm')">确 定</el-button>
-        <el-button @click="closeDia('cancel')">取 消</el-button>
-      </div>
-    </template>
-  </el-dialog>
-</template>
-
-<style scoped lang="scss">
-.el-dialog {
-  .dialog-container {
-    .tabs {
-      margin-bottom: 10px;
-      .tab-item {
-        font-size: 14px;
-        color: #999999;
-        cursor: pointer;
-        margin-right: 20px;
-      }
-    }
-    .input-container {
-      font-size: 16px;
-      margin-bottom: 30px;
-      .el-textarea {
-        font-size: 16px;
-      }
-      .input-item{
-        display: flex;
-        margin-bottom:20px;
-        font-size: 14px;
-        span{
-          color: red;
-          margin-right: 5px;
-          &.time{
-            margin-left: 5px;
-            align-self: center;
-          }
-          &.empty{
-            color: #606266;
-          }
-        }
-      }
-      
-    }
-  }
-  .foot-container {
-    margin-bottom: 20px;
-    .el-button {
-      width: 224px;
-      height: 40px;
-    }
-  }
-}
-</style>

+ 7 - 5
src/views/dataReport_manage/statistic/todoTaskList.vue

@@ -22,10 +22,10 @@ import { InfoFilled } from '@element-plus/icons-vue'
 
 import { dataMainInterface,customInterence} from '@/api/api.js';
 import mPage from '@/components/mPage.vue';
-import ModifyToDoDialog from '@/views/custom_manage/components/ModifyToDoDialog.vue'
-import CheckToDoDialog from '@/views/custom_manage/components/CheckToDoDialog.vue'
-import HistoryToDoDialog from '@/views/custom_manage/components/HistoryToDoDialog.vue'
-import AccumulativeFrequencyDlg from '@/views/custom_manage/components/accumulativeFrequencyDlg.vue'
+import ModifyToDoDialog from '@/views/custom_manage/custom/components/ModifyToDoDialog.vue'
+import CheckToDoDialog from '@/views/custom_manage/custom/components/CheckToDoDialog.vue'
+import HistoryToDoDialog from '@/views/custom_manage/custom/components/HistoryToDoDialog.vue'
+import AccumulativeFrequencyDlg from '@/views/custom_manage/custom/components/accumulativeFrequencyDlg.vue'
 import { formatTime } from '@/utils/date'
 
 const $router = useRouter()
@@ -547,13 +547,15 @@ init()
 			:type="modifyToDoType"
 			v-model:isModifyDialogShow="isModifyDialogShow"
 			@modify="handleModifyToDo"
+			@close="isModifyDialogShow=false"
 		></Modify-to-do-dialog>
 		<check-to-do-dialog 
 			:todoInfo="todoInfo" 
 			v-model:ischeckToDoDialogShow="ischeckToDoDialogShow"
 			@check="handleApprove"
+			@close="ischeckToDoDialogShow=false"
 		></check-to-do-dialog>
-		<history-to-do-dialog :todoInfo="todoInfo" v-model:isHistoryDialogShow="isHistoryDialogShow"></history-to-do-dialog>
+		<history-to-do-dialog :todoInfo="todoInfo" v-model:isHistoryDialogShow="isHistoryDialogShow" @close="isHistoryDialogShow=false"></history-to-do-dialog>
 		<!-- 路演的弹窗 -->
 		<accumulative-frequency-dlg v-model:accumulativeFrequencyDlg="accumulativeFrequencyDlg" v-model:accumulativeFrequencyItem="accumulativeFrequencyItem" />
 	</div>