ZaiZai 1 ano atrás
pai
commit
8c1a70fa43

+ 1 - 1
src/views/data-fill/wbs.vue

@@ -104,7 +104,7 @@
                         <HcTooltip v-if="NodeStatus === '3'" keys="wbs_abolish">
                             <el-button hc-btn :laoding="abolishLoaing" color="#FF976A" style="color: white;" @click="abolishOneClick">撤回上报流程</el-button>
                         </HcTooltip>
-                        <el-button v-if="authBtnTabKey === '2'" hc-btn color="#37c0fe" :loading="syncdataloading" @click="syncdata">同步质检资料</el-button>
+                        <el-button v-if="authBtnTabKey === '2'" hc-btn color="#37c0fe" style="color: white;" :loading="syncdataloading" @click="syncdata">同步质检资料</el-button>
                         <HcTooltip v-if="NodeStatus !== '3'" keys="wbs_save">
                             <el-button
                                 :disabled="NodeStatus === '3' || ListItemDatas.length <= 0"

+ 9 - 9
src/views/ledger/components/table-form.vue

@@ -56,8 +56,8 @@
             <HcTooltip keys="ledger_query_save_form">
                 <el-button
                     :disabled="!isTableForm || taskStatus === 3 || taskStatus === 4"
-                    :loading="tableFormSaveLoading" hc-btn
-                    type="primary" @click="tableFormSaveClick"
+                    :loading="tableFormSaveLoading" hc-btn color="#12C060" style="color: white;"
+                    @click="tableFormSaveClick"
                 >
                     <HcIcon name="save" />
                     <span>保存</span>
@@ -66,7 +66,7 @@
             <HcTooltip keys="ledger_query_report_form">
                 <el-button
                     :disabled="!isTableForm || taskStatus === 1 || taskStatus === 3 || taskStatus === 4" hc-btn
-                    @click="reportModalClick"
+                    color="#FF976A" style="color: white;" @click="reportModalClick"
                 >
                     <HcIcon name="send-plane-2" />
                     <span>上报</span>
@@ -75,7 +75,7 @@
             <HcTooltip keys="ledger_query_preview_form">
                 <el-button
                     :disabled="!isTableForm || taskStatus === 1 " :loading="previewLoading" hc-btn
-                    @click="previewBussPdf"
+                    color="#A16222" @click="previewBussPdf"
                 >
                     <HcIcon name="eye" />
                     <span>预览</span>
@@ -84,7 +84,7 @@
             <HcTooltip keys="ledger_query_copy_form">
                 <el-button
                     :disabled="!isTableForm || taskStatus === 3 || taskStatus === 4" hc-btn
-                    @click="copyTableFormClick"
+                    color="#567722" @click="copyTableFormClick"
                 >
                     <HcIcon name="file-copy-2" />
                     <span>复制当前表格及内容</span>
@@ -93,7 +93,7 @@
             <HcTooltip keys="ledger_query_time_form">
                 <el-button
                     :disabled="!isTableForm || taskStatus === 3 || taskStatus === 4" hc-btn
-                    @click="copyTimeLogModal"
+                    color="#567722" @click="copyTimeLogModal"
                 >
                     <HcIcon name="file-copy-2" />
                     <span>复制任意时间</span>
@@ -102,7 +102,7 @@
             <HcTooltip keys="ledger_query_add_form">
                 <el-button
                     :disabled="!isTableForm || taskStatus === 3 || taskStatus === 4" hc-btn
-                    @click="addTableFormClick"
+                    color="#37c0fe" style="color: white;" @click="addTableFormClick"
                 >
                     <HcIcon name="add-circle" />
                     <span>新增表格</span>
@@ -111,7 +111,7 @@
             <HcTooltip keys="ledger_query_abolish_form">
                 <el-button
                     :disabled="!isTableForm || taskStatus === 1 || taskStatus === 2" hc-btn
-                    @click="abolishTableFormClick"
+                    color="#FF976A" style="color: white;" @click="abolishTableFormClick"
                 >
                     <HcIcon name="delete-bin-3" />
                     <span>废除</span>
@@ -772,7 +772,7 @@ const closeBussDataInfo = async (item, index) => {
         //处理数据
         if (!error && code === 200) {
            window.$message.success('删除成功')
-           
+
         } else {
             window.$message.error('操作失败')
         }

+ 95 - 82
src/views/ledger/components/table-list.vue

@@ -3,113 +3,127 @@
         <HcCard>
             <template #header>
                 <div class="w-64">
-                    <HcDatePicker :dates="betweenTime" clearable size="large" @change="betweenTimeUpdate"/>
+                    <HcDatePicker :dates="betweenTime" clearable size="large" @change="betweenTimeUpdate" />
                 </div>
                 <div class="w-40 ml-3">
                     <el-select v-model="searchForm.createUser" block clearable placeholder="请选择记录人" size="large">
-                        <el-option v-for="item in recordData" :label="item['userName']" :value="item['userId']"/>
+                        <el-option v-for="item in recordData" :label="item.userName" :value="item.userId" />
                     </el-select>
                 </div>
                 <div class="ml-2">
                     <el-button size="large" type="primary" @click="searchClick">
-                        <HcIcon name="search-2"/>
+                        <HcIcon name="search-2" />
                         <span>搜索</span>
                     </el-button>
                 </div>
             </template>
             <template #extra>
                 <HcTooltip keys="ledger_query_report">
-                    <el-button :disabled="tableCheckedKeys.length <= 0" :loading="reportLoading" hc-btn type="primary"
-                               @click="reportModalClick">
-                        <HcIcon name="send-plane-2"/>
+                    <el-button
+                        :disabled="tableCheckedKeys.length <= 0" :loading="reportLoading" hc-btn
+                        color="#FF976A" style="color: white;" @click="reportModalClick"
+                    >
+                        <HcIcon name="send-plane-2" />
                         <span>批量上报</span>
                     </el-button>
                 </HcTooltip>
                 <HcTooltip keys="ledger_query_abolish">
-                    <el-button :disabled="tableCheckedKeys.length <= 0" :loading="abolishLoading" hc-btn
-                               @click="batchAbolishClick">
-                        <HcIcon name="delete-bin-3"/>
+                    <el-button
+                        :disabled="tableCheckedKeys.length <= 0" :loading="abolishLoading" hc-btn
+                        color="#A16222" @click="batchAbolishClick"
+                    >
+                        <HcIcon name="delete-bin-3" />
                         <span>批量废除</span>
                     </el-button>
                 </HcTooltip>
                 <HcTooltip keys="ledger_query_delete">
-                    <el-button :disabled="tableCheckedKeys.length <= 0" :loading="deleteLoading" hc-btn
-                               @click="batchDeleteClick">
-                        <HcIcon name="delete-bin"/>
+                    <el-button
+                        :disabled="tableCheckedKeys.length <= 0" :loading="deleteLoading" hc-btn
+                        color="#e03997" @click="batchDeleteClick"
+                    >
+                        <HcIcon name="delete-bin" />
                         <span>批量删除</span>
                     </el-button>
                 </HcTooltip>
                 <HcTooltip keys="ledger_query_print">
-                    <el-button :disabled="tableCheckedKeys.length <= 0" :loading="previewPrintLoading" hc-btn
-                               @click="previewAndPrintClick">
-                        <HcIcon name="printer"/>
+                    <el-button
+                        :disabled="tableCheckedKeys.length <= 0" :loading="previewPrintLoading" hc-btn
+                        color="#567722" @click="previewAndPrintClick"
+                    >
+                        <HcIcon name="printer" />
                         <span>批量预览/打印</span>
                     </el-button>
                 </HcTooltip>
             </template>
-            <HcTable ref="tableListRef" :column="tableListColumn" :datas="tableListData" :loading="tableLoading" isCheck
-                     @selection-change="tableSelectionChange">
-                <template #action="{row}">
+            <HcTable
+                ref="tableListRef" :column="tableListColumn" :datas="tableListData" :loading="tableLoading" is-check
+                @selection-change="tableSelectionChange"
+            >
+                <template #action="{ row }">
                     <HcTooltip keys="ledger_query_table_query">
                         <el-button plain size="small" type="primary" @click="handleTableQuery(row)">查询</el-button>
                     </HcTooltip>
                     <HcTooltip keys="ledger_query_table_del">
-                        <el-button :disabled="!row.operation || row.status !== 0" plain size="small" type="danger"
-                                   @click="handleTableDel(row)">删除
+                        <el-button
+                            :disabled="!row.operation || row.status !== 0" plain size="small" type="danger"
+                            @click="handleTableDel(row)"
+                        >
+                            删除
                         </el-button>
                     </HcTooltip>
                 </template>
             </HcTable>
             <template #action>
-                <HcPages :pages="searchForm" @change="pageChange"/>
+                <HcPages :pages="searchForm" @change="pageChange" />
             </template>
         </HcCard>
 
-        <!--批量上报审批-->
-        <HcReportModal :contractId="contractId"
-                       :datas="reportDatas"
-                       :ids="reportIds"
-                       :projectId="projectId"
-                       :show="showReportModal"
-                       :taskName="reportTaskName"
-                       :typeData="menuItem.primaryKeyId"
-                       isDatas
-                       title="批量上报审批"
-                       type="log"
-                       url="contractLog/batchTask"
-                       @finish="showReportFinish"
-                       @hide="showReportModal = false"
-                       @tagClose="reportTaskTagClose"
+        <!-- 批量上报审批 -->
+        <HcReportModal
+            :contract-id="contractId"
+            :datas="reportDatas"
+            :ids="reportIds"
+            :project-id="projectId"
+            :show="showReportModal"
+            :task-name="reportTaskName"
+            :type-data="menuItem.primaryKeyId"
+            is-datas
+            title="批量上报审批"
+            type="log"
+            url="contractLog/batchTask"
+            @finish="showReportFinish"
+            @hide="showReportModal = false"
+            @tagClose="reportTaskTagClose"
         />
     </div>
 </template>
 
 <script setup>
-import {ref, watch, nextTick} from "vue";
-import queryApi from '~api/ledger/query';
-import {eVisaTaskCheckApi} from "~api/other"
-import {arrToId, getArrValue, getObjValue, isString} from "js-fast-way"
+import { nextTick, ref, watch } from 'vue'
+import queryApi from '~api/ledger/query'
+import { eVisaTaskCheckApi } from '~api/other'
+import { arrToId, getArrValue, getObjValue, isString } from 'js-fast-way'
 
 //参数
 const props = defineProps({
     projectId: {
         type: [String, Number],
-        default: ''
+        default: '',
     },
     contractId: {
         type: [String, Number],
-        default: ''
+        default: '',
     },
     items: {
         type: Object,
-        default: () => ({})
-    }
+        default: () => ({}),
+    },
 })
 
 //变量
-const projectId = ref(props.projectId);
-const contractId = ref(props.contractId);
-const menuItem = ref(props.items);
+const projectId = ref(props.projectId)
+const contractId = ref(props.contractId)
+const menuItem = ref(props.items)
 
 //监听
 watch(() => [
@@ -137,32 +151,32 @@ const getQueryData = () => {
 //获取记录人数据
 const recordData = ref([])
 const queryFillUser = async () => {
-    const {primaryKeyId} = menuItem.value
-    const {data} = await queryApi.queryFillUser({
+    const { primaryKeyId } = menuItem.value
+    const { data } = await queryApi.queryFillUser({
         contractId: contractId.value,
-        primaryKeyId: primaryKeyId
+        primaryKeyId: primaryKeyId,
     })
     recordData.value = getArrValue(data)
 }
 
 //搜索表单
-const searchForm = ref({queryTime: '', createUser: null, current: 1, size: 20, total: 0})
+const searchForm = ref({ queryTime: '', createUser: null, current: 1, size: 20, total: 0 })
 
 //日期时间被选择
 const betweenTime = ref(null)
-const betweenTimeUpdate = ({arr, query}) => {
+const betweenTimeUpdate = ({ arr, query }) => {
     betweenTime.value = arr
     searchForm.value.queryTime = query
 }
 
 //搜索
 const searchClick = () => {
-    searchForm.value.current = 1;
+    searchForm.value.current = 1
     getTableData()
 }
 
 //分页被点击
-const pageChange = ({current, size}) => {
+const pageChange = ({ current, size }) => {
     searchForm.value.current = current
     searchForm.value.size = size
     getTableData()
@@ -171,20 +185,20 @@ const pageChange = ({current, size}) => {
 //获取数据
 const tableLoading = ref(false)
 const tableListColumn = ref([
-    {key: 'recordTime', name: '记录日期'},
-    {key: 'statusValue', name: '流程状态'},
-    {key: 'createUserName', name: '记录人员'},
-    {key: 'action', name: '操作', width: 200}
+    { key: 'recordTime', name: '记录日期' },
+    { key: 'statusValue', name: '流程状态' },
+    { key: 'createUserName', name: '记录人员' },
+    { key: 'action', name: '操作', width: 200 },
 ])
 const tableListData = ref([])
 const getTableData = async () => {
     //初始数据处理
     tableLoading.value = true
-    const {primaryKeyId} = menuItem.value
+    const { primaryKeyId } = menuItem.value
     tableListRef.value?.clearSelection()
     tableCheckedKeys.value = []
     //请求数据
-    const {error, code, data} = await queryApi.constructionLogPage({
+    const { error, code, data } = await queryApi.constructionLogPage({
         ...searchForm.value,
         wbsNodeId: primaryKeyId,
         projectId: projectId.value,
@@ -207,7 +221,7 @@ const tableListRef = ref(null)
 const tableCheckedKeys = ref([])
 const tableSelectionChange = (rows) => {
     tableCheckedKeys.value = rows.filter((item) => {
-        return (item ?? '') !== '';
+        return (item ?? '') !== ''
     })
 }
 
@@ -218,9 +232,9 @@ const reportDatas = ref([])
 const reportLoading = ref(false)
 const showReportModal = ref(false)
 const reportModalClick = async () => {
-    const rows = tableCheckedKeys.value;
+    const rows = tableCheckedKeys.value
     //判断是否满足条件
-    const result = rows.every(({status}) => {
+    const result = rows.every(({ status }) => {
         return status !== 1 && status !== 2
     })
     //判断状态
@@ -228,7 +242,7 @@ const reportModalClick = async () => {
         reportLoading.value = true
         const taskCheck = await eVisaTaskCheckApi({
             projectId: projectId.value,
-            contractId: contractId.value
+            contractId: contractId.value,
         })
         if (taskCheck) {
             //初始ID
@@ -239,7 +253,7 @@ const reportModalClick = async () => {
             rows.forEach(item => {
                 reportDataArr.push({
                     id: item?.id,
-                    name: item?.fileName
+                    name: item?.fileName,
                 })
             })
             reportDatas.value = reportDataArr
@@ -257,7 +271,7 @@ const reportModalClick = async () => {
 
 //上报的审批内容移除
 const reportTaskTagClose = (index) => {
-    const row = tableCheckedKeys.value[index];
+    const row = tableCheckedKeys.value[index]
     tableListRef.value?.toggleRowSelection(row, false)
 }
 
@@ -270,9 +284,9 @@ const showReportFinish = () => {
 //批量废除
 const abolishLoading = ref(false)
 const batchAbolishClick = () => {
-    const rows = tableCheckedKeys.value;
+    const rows = tableCheckedKeys.value
     //判断是否满足条件
-    const result = rows.every(({status, operation}) => {
+    const result = rows.every(({ status, operation }) => {
         return status !== 0 && status !== 3 && operation
     })
     //判断状态
@@ -287,7 +301,7 @@ const batchAbolishClick = () => {
                 if (action === 'confirm') {
                     batchAbolishSave(ids)
                 }
-            }
+            },
         })
     } else {
         window.$message?.warning('未上报的文件,和不是自己的文件,不能废除')
@@ -297,7 +311,7 @@ const batchAbolishClick = () => {
 //废除勾选的已上报文件
 const batchAbolishSave = async (ids) => {
     abolishLoading.value = true
-    const {error, code} = await queryApi.batchAbolish({ids: ids})
+    const { error, code } = await queryApi.batchAbolish({ ids: ids })
     //处理数据
     abolishLoading.value = false
     if (!error && code === 200) {
@@ -309,9 +323,9 @@ const batchAbolishSave = async (ids) => {
 
 //批量删除
 const batchDeleteClick = () => {
-    const rows = tableCheckedKeys.value;
+    const rows = tableCheckedKeys.value
     //判断是否满足条件
-    const result = rows.every(({status, operation}) => {
+    const result = rows.every(({ status, operation }) => {
         return status === 0 && operation
     })
     //判断状态
@@ -325,7 +339,7 @@ const batchDeleteClick = () => {
                 if (action === 'confirm') {
                     theLogRemoveByIds(ids)
                 }
-            }
+            },
         })
     } else {
         window.$message?.warning('只能删除自己的未上报日志文件')
@@ -336,11 +350,11 @@ const batchDeleteClick = () => {
 const previewPrintLoading = ref(false)
 const previewAndPrintClick = async () => {
     previewPrintLoading.value = true
-    const rows = tableCheckedKeys.value;
+    const rows = tableCheckedKeys.value
     const rowsIds = arrToId(rows)
     const ids = rowsIds.split(',')
-    const {error, code, data} = await queryApi.theLogPreviewAndPrint({
-        ids: ids
+    const { error, code, data } = await queryApi.theLogPreviewAndPrint({
+        ids: ids,
     })
     //处理数据
     previewPrintLoading.value = false
@@ -351,7 +365,7 @@ const previewAndPrintClick = async () => {
 }
 
 //查询
-const handleTableQuery = ({evisaPdfUrl, pdfUrl}) => {
+const handleTableQuery = ({ evisaPdfUrl, pdfUrl }) => {
     if (evisaPdfUrl) {
         window.open(evisaPdfUrl, '_blank')
     } else if (pdfUrl) {
@@ -362,7 +376,7 @@ const handleTableQuery = ({evisaPdfUrl, pdfUrl}) => {
 }
 
 //删除
-const handleTableDel = ({id, status, operation}) => {
+const handleTableDel = ({ id, status, operation }) => {
     //判断是否满足条件
     if (status === 0 && operation) {
         window?.$messageBox?.alert('是否删除勾选的日志文件?', '删除文件', {
@@ -373,7 +387,7 @@ const handleTableDel = ({id, status, operation}) => {
                 if (action === 'confirm') {
                     theLogRemoveByIds([id])
                 }
-            }
+            },
         })
     } else {
         window.$message?.warning('只能删除自己的未上报日志文件')
@@ -384,8 +398,8 @@ const handleTableDel = ({id, status, operation}) => {
 const deleteLoading = ref(false)
 const theLogRemoveByIds = async (ids) => {
     deleteLoading.value = true
-    const {error, code} = await queryApi.theLogRemoveByIds({
-        ids: ids
+    const { error, code } = await queryApi.theLogRemoveByIds({
+        ids: ids,
     })
     deleteLoading.value = false
     if (!error && code === 200) {
@@ -394,7 +408,6 @@ const theLogRemoveByIds = async (ids) => {
         getTableData()
     }
 }
-
 </script>
 
 <style lang="scss" scoped>