zhengyiming
7 天以前 ec9197c5fc1690036834b6d267beec55aabba18d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<template>
  <LoadingLayout :loading="isLoading">
    <AppScrollContainer>
      <ChunkCell title="结算单详情">
        <template #titleRight>
          <el-button type="primary" icon="Download" @click="handleDownloadTemplate()"
            >电子回单下载</el-button
          >
        </template>
        <ProForm :model="form" ref="formRef" label-width="120px" :is-read="true">
          <ProFormCol>
            <ProFormColItem :span="8">
              <ProFormItemV2 label="所属任务:" prop="name">
                <ProFormText v-model="form.name"> </ProFormText>
              </ProFormItemV2>
            </ProFormColItem>
            <ProFormColItem :span="8">
              <ProFormItemV2 label="任务编号:" prop="name">
                <ProFormText v-model="form.name"> </ProFormText>
              </ProFormItemV2>
            </ProFormColItem>
            <ProFormColItem :span="8"></ProFormColItem>
          </ProFormCol>
          <ProFormCol>
            <ProFormColItem :span="8">
              <ProFormItemV2 label="结算单名称:" prop="name">
                <ProFormText v-model="form.name"> </ProFormText>
              </ProFormItemV2>
            </ProFormColItem>
            <ProFormColItem :span="8">
              <ProFormItemV2 label="上传时间:" prop="name">
                <ProFormDatePicker
                  v-model="form.name"
                  type="date"
                  format="YYYY-MM-DD HH:mm"
                ></ProFormDatePicker>
              </ProFormItemV2>
            </ProFormColItem>
            <ProFormColItem :span="8"></ProFormColItem>
          </ProFormCol>
          <ProFormCol>
            <ProFormColItem :span="8">
              <ProFormItemV2 label="结算金额:" prop="money">
                <ProFormInputNumber v-model="form.money"> </ProFormInputNumber>
              </ProFormItemV2>
            </ProFormColItem>
            <ProFormColItem :span="8">
              <ProFormItemV2 label="实发金额:" prop="money">
                <ProFormInputNumber v-model="form.money"> </ProFormInputNumber>
              </ProFormItemV2>
            </ProFormColItem>
            <ProFormColItem :span="8">
              <ProFormItemV2 label="状态:" prop="status">
                <ProFormRadio v-model="form.status" :value-enum="[{ label: '是', value: 1 }]">
                </ProFormRadio>
              </ProFormItemV2>
            </ProFormColItem>
          </ProFormCol>
        </ProForm>
      </ChunkCell>
      <ChunkCell title="结算流程">
        <div class="step-wrapper">
          <el-steps :active="1" align-center finish-status="process">
            <el-step title="结算单上传" :icon="Edit">
              <template #description>
                <div>创建人:{{ form.name }}</div>
                <div>时间:{{ form.name }}</div>
                <TextOverTooltip>备注:{{ form.name }}</TextOverTooltip>
              </template>
            </el-step>
            <el-step title="结算付款" :icon="Upload">
              <template #description>
                <div>创建人:{{ form.name }}</div>
                <div>时间:{{ form.name }}</div>
                <TextOverTooltip
                  >备注:{{ 'form.nameform.nameform.eform.nameform.nameform.name' }}</TextOverTooltip
                >
              </template>
            </el-step>
          </el-steps>
        </div>
      </ChunkCell>
      <ChunkCell title="结算名单">
        <ProTableQueryFilterBar @on-reset="reset">
          <template #query>
            <QueryFilterItem>
              <SearchInput
                v-model="extraParamState.searchWord"
                style="width: 300px"
                placeholder="人员姓名/身份证号/手机号"
                @on-click-search="getList"
              >
              </SearchInput>
            </QueryFilterItem>
          </template>
        </ProTableQueryFilterBar>
        <ProTableV2
          v-bind="proTableProps"
          :columns="SettlementListColumns"
          :operationBtns="operationBtns"
          :auto-height="false"
          ref="proTable"
          :tableProps="{
            maxHeight: '400px',
          }"
        >
        </ProTableV2>
      </ChunkCell>
    </AppScrollContainer>
  </LoadingLayout>
</template>
<script setup lang="ts">
import {
  LoadingLayout,
  AppScrollContainer,
  ChunkCell,
  ProForm,
  ProFormItemV2,
  ProFormText,
  ProFormCol,
  ProFormColItem,
  ProFormDatePicker,
  ProFormInputNumber,
  ProFormRadio,
  useTable,
  ProTableV2,
  defineOperationBtns,
  SearchInput,
  QueryFilterItem,
  ProTableQueryFilterBar,
  TextOverTooltip,
} from '@bole-core/components';
import { Edit, Upload } from '@element-plus/icons-vue';
import { SettlementListColumns } from './constants';
import { useQuery } from '@tanstack/vue-query';
import { downloadFileByUrl, OrderInputType } from '@bole-core/core';
 
defineOptions({
  name: 'ServiceChargeDetail',
});
 
const operationBtns = defineOperationBtns([
  {
    data: {
      enCode: 'downloadBtn',
      name: '下载回单',
    },
  },
]);
 
const route = useRoute();
const id = (route.params.id as string) ?? '';
 
const form = reactive({
  name: '',
  money: 0,
  status: 1,
});
 
const { isLoading } = useQuery({
  queryKey: ['flexTaskServices/getFlexTaskDetail', id],
  queryFn: async () => {
    return await flexTaskServices.getFlexTaskDetail(
      { id: id },
      {
        showLoading: false,
      }
    );
  },
  placeholderData: () => ({} as API.GetFlexTaskDetailForBackOutput),
  onSuccess(data) {},
  enabled: !!id,
});
 
const {
  getDataSource: getList,
  proTableProps,
  paginationState,
  extraParamState,
  reset,
} = useTable(
  async ({ pageIndex, pageSize }, extraParamState) => {
    try {
      let params: API.GetFlexEnterpriseInput = {
        pageModel: {
          rows: pageSize,
          page: pageIndex,
          orderInput: extraParamState.orderInput,
        },
        searchWord: extraParamState.searchWord,
      };
 
      let res = await flexEnterpriseServices.getFlexEnterpriseList(params);
      return res;
    } catch (error) {
      console.log('error: ', error);
    }
  },
  {
    defaultExtraParams: {
      searchWord: '',
      orderInput: [{ property: 'id', order: OrderInputType.Desc }],
    },
    queryKey: ['flexEnterpriseServices/getFlexEnterpriseList'],
    columnsRenderProps: {},
  }
);
 
function handleDownloadTemplate() {
  downloadFileByUrl('', '电子回单');
}
 
onMounted(() => {
  getList();
});
</script>
 
<style lang="scss" scoped>
@use '@/style/common.scss' as *;
 
.step-wrapper {
  margin: 0 auto;
  padding: 24px 0;
}
</style>
<style lang="scss">
.text-over-tooltip-content {
  max-width: 600px;
  word-break: break-all;
}
</style>