Browse Source

列表组件增加插槽功能

cz 1 year ago
parent
commit
e711891d11

+ 111 - 108
src/components/common-list.vue

@@ -1,120 +1,123 @@
 <template>
-	<div class="common-list">
-		<ul>
-			<li v-for="i in listData" :key="i.id">
-				<div
-					class="left-box"
-					style="margin-right: 20px"
-					v-if="isCheckbox"
-				>
-					<van-checkbox
-						v-model="i.checked"
-						icon-size="15px"
-						shape="square"
-						@change='listCheck'
-						:disabled="optionalValue ? (optionalValue != i[optionalKey]) : false"
-					></van-checkbox>
-				</div>
-				<div
-					class="center-content"
-					style="line-height: 24px"
-					@click="listCk(i)"
-				>
-					<div v-for="j in config" :key="j.prop">                                   
-						<span>{{ j.label }}:</span>{{ i[j.prop] }}
-					</div>
-				</div>
-				<div class="more-box" v-if="showMore" @click="listCk(i)">
-					<van-icon name="arrow" />
-				</div>
-			</li>
-		</ul>
-	</div>
+  <div class="common-list">
+    <ul>
+      <li v-for="i in listData" :key="i.id">
+        <div class="left-box" style="margin-right: 20px" v-if="isCheckbox">
+          <van-checkbox
+            v-model="i.checked"
+            icon-size="15px"
+            shape="square"
+            @change="listCheck"
+            :disabled="optionalValue ? optionalValue != i[optionalKey] : false"
+          ></van-checkbox>
+        </div>
+        <div
+          class="center-content"
+          style="line-height: 24px"
+          @click="listCk(i)"
+        >
+          <div v-for="j in config" :key="j.prop" style="display: flex">
+            <span>{{ j.label }}:</span>
+            <span v-if="j.type && j.type === 'slot'">
+              <slot :name="j.slotName" :row="i">
+                {{ j.slotName }}插槽占位符
+              </slot>
+            </span>
+            <span v-else>
+              {{ i[j.prop] }}
+            </span>
+          </div>
+        </div>
+        <div class="more-box" v-if="showMore" @click="listCk(i)">
+          <van-icon name="arrow" />
+        </div>
+      </li>
+    </ul>
+  </div>
 </template>
 <script setup>
-import { ref, getCurrentInstance, onMounted, defineProps, watch } from 'vue'
-const proxy = getCurrentInstance().proxy
+import { ref, getCurrentInstance, onMounted, defineProps, watch } from "vue";
+const proxy = getCurrentInstance().proxy;
 defineProps({
-	data: {
-		type: Array,
-		default: [],
-	},
-	config: {
-		type: Object,
-		default: [],
-	},
-	showMore: {
-		type: Boolean,
-		default: true,
-	},
-	isCheckbox: {
-		type: Boolean,
-		default: false,
-	},
-	optionalKey: {
-		type: String,
-		default: null,
-	},
-})
-let listData = ref([])
-let checkList = []
+  data: {
+    type: Array,
+    default: [],
+  },
+  config: {
+    type: Object,
+    default: [],
+  },
+  showMore: {
+    type: Boolean,
+    default: true,
+  },
+  isCheckbox: {
+    type: Boolean,
+    default: false,
+  },
+  optionalKey: {
+    type: String,
+    default: null,
+  },
+});
+let listData = ref([]);
+let checkList = [];
 watch(
-	() => proxy.data,
-	(newVal) => {
-		listData.value = newVal.map((i) => {
-			//判断是否有选中的
-			if (checkList.length > 0) {
-				checkList.map((j) => {
-					if (i.id == j.id) {
-						i.checked = true
-					}
-				})
-			}
-			return i
-		})
-	}
-)
-const optionalValue = ref(null)
+  () => proxy.data,
+  (newVal) => {
+    listData.value = newVal.map((i) => {
+      //判断是否有选中的
+      if (checkList.length > 0) {
+        checkList.map((j) => {
+          if (i.id == j.id) {
+            i.checked = true;
+          }
+        });
+      }
+      return i;
+    });
+  }
+);
+const optionalValue = ref(null);
 const listCheck = () => {
-	checkList = []
-	listData.value.map((i) => {
-		if (i.checked) {
-			checkList.push(i)
-			if(!optionalValue.value) {
-				optionalValue.value = i[proxy.optionalKey]
-			}
-		}
-	})
-	if(checkList.length == 0) {
-		optionalValue.value = null
-	}
-	proxy.$emit('onCheck', checkList)
-}
+  checkList = [];
+  listData.value.map((i) => {
+    if (i.checked) {
+      checkList.push(i);
+      if (!optionalValue.value) {
+        optionalValue.value = i[proxy.optionalKey];
+      }
+    }
+  });
+  if (checkList.length == 0) {
+    optionalValue.value = null;
+  }
+  proxy.$emit("onCheck", checkList);
+};
 const listCk = (item) => {
-	
-	proxy.$emit('onClick', item)
-}
+  proxy.$emit("onClick", item);
+};
 </script>
 <style lang="scss">
 .common-list {
-	ul {
-		margin-top: 10px;
-		li {
-			list-style: none;
-			position: relative;
-			display: flex;
-			box-sizing: border-box;
-			align-items: center;
-			justify-content: space-between;
-			padding: 12px 16px;
-			background: #fff;
-			border-bottom: 1px solid #f1f1f1;
-			.center-content {
-				flex: 1;
-			}
-			.left-box {
-			}
-		}
-	}
+  ul {
+    margin-top: 10px;
+    li {
+      list-style: none;
+      position: relative;
+      display: flex;
+      box-sizing: border-box;
+      align-items: center;
+      justify-content: space-between;
+      padding: 12px 16px;
+      background: #fff;
+      border-bottom: 1px solid #f1f1f1;
+      .center-content {
+        flex: 1;
+      }
+      .left-box {
+      }
+    }
+  }
 }
 </style>

+ 30 - 26
src/lang/cnCZ.js

@@ -3,32 +3,36 @@ export function cnCZ() {
     claim: {
       name: "到账认领",
       accountName: "账户名称",
-      amount: "交易金额",
-      amountMsg: "请输入交易金额",
-      tradingHour: "交易时间",
-      tradingHourMsg: "请选择交易时间",
-      digest: "摘要",
-      add: "添加流水",
-      edit: "编辑流水",
-      tradeInformation: "交易信息",
-      selectAccount: "选择账户",
-      selectAccountMsg: "请选择账户",
-      tradeType: "交易类型",
-      tradeTypeMsg: "请选择交易类型",
-      income: "收入",
-      disburse: "支出",
-      currency: "币种",
-      currencyMsg: "请选择币种",
-      contractArrival: "合同到账",
-      contractArrivalMsg: "请选择合同到账",
-      yes: "是",
-      no: "否",
-      peerInformation: "对方信息",
-      accountName: "账户名称",
-      bankDeposit: "开户银行",
-      bankAccountNumber: "银行账号",
-      otherInformation: "其他信息",
-      remark: "备注",
+      accountAmount: "到账金额",
+      accountTime: "到账时间",
+      oppositeAccount: "对方账户",
+      claimStatus: "认领状态",
+      accountInfo: "到账信息",
+      relatedContract: "关联合同",
+      contractCode: "合同编码",
+      relatedAmount: "关联金额",
+      contractCanNotBeEmpty: "合同不能为空",
+      relatedAmountCanNotBeEmpty: "关联金额不能为空",
+      addDetails: "请添加明细",
+      relatedAmountMustBeGreaterThanZero: "关联金额需大于零",
+      relatedAmountTotalNotBeGreaterThanAccountAmount: "关联金额总合不能大于到账金额",
+      cancelClaim: "取消认领",
+    },
+    arrivalQuality: {
+      name: "到货质检",
+      supplyName: "供应商",
+      productName: "物品名称",
+      productSpec: "规格型号",
+      arrivalNumber: "到货数量",
+      qualitySituation: "质检情况",
+      arrivalCode: "到货单号",
+      alreadyQualityNumber: "已质检数量",
+      qualityQualified: "质检合格",
+      qualityUnQualified: "质检不合格",
+      qualityQualifiedCanNotBeEmpty: "质检合格不能为空",
+      qualityUnQualifiedCanNotBeEmpty: "质检不合格不能为空",
+      qualityInspectionQuantityCannotBeZero: "质检数量不能为零",
+      qualityInspectionQuantityNotBeGreaterThanArrivalNumber: "质检数量加已质检数量不可大于到货数量",
     },
   };
 

+ 15 - 1
src/router/jxskRouter.js

@@ -75,7 +75,21 @@ export function jxskRouter() {
       name: "到账认领",
       component: () => import("../views/salesContract/claim/index.vue"),
     },
-
+    {
+      path: "claimAdd",
+      name: "到账认领添加",
+      component: () => import("../views/salesContract/claim/add.vue"),
+    },
+    {
+      path: "arrival",
+      name: "到货质检",
+      component: () => import("../views/procurementManagement/arrival/index.vue"),
+    },
+    {
+      path: "arrivalAdd",
+      name: "到货质检添加",
+      component: () => import("../views/procurementManagement/arrival/add.vue"),
+    },
   ];
   return jxskRouter;
 }

+ 185 - 0
src/views/procurementManagement/arrival/add.vue

@@ -0,0 +1,185 @@
+<template>
+  <div class="form">
+    <van-nav-bar
+      :title="$t('arrivalQuality.name')"
+      :left-text="$t('common.back')"
+      left-arrow
+      @click-left="onClickLeft"
+    >
+    </van-nav-bar>
+    <testForm
+      v-model="formData.data"
+      :formOption="formOption"
+      :formConfig="formConfig"
+      :rules="rules"
+      @onSubmit="onSubmit"
+      ref="formDom"
+    ></testForm>
+  </div>
+</template>
+
+<script setup>
+import { ref, reactive, getCurrentInstance, onMounted } from "vue";
+import { showSuccessToast, showFailToast } from "vant";
+import { useRoute } from "vue-router";
+import testForm from "@/components/testForm/index.vue";
+const proxy = getCurrentInstance().proxy;
+const route = useRoute();
+const formDom = ref(null);
+const formData = reactive({
+  data: {},
+});
+const rules = {
+  qualifiedCount: [
+    {
+      required: true,
+      message: proxy.t("arrivalQuality.qualityQualifiedCanNotBeEmpty"),
+    },
+  ],
+  noQualifiedCount: [
+    {
+      required: true,
+      message: proxy.t("arrivalQuality.qualityUnQualifiedCanNotBeEmpty"),
+    },
+  ],
+};
+const formOption = reactive({
+  readonly: false, //用于控制整个表单是否只读
+  disabled: false,
+  labelAlign: "top",
+  scroll: true,
+  labelWidth: "62pk",
+  submitBtnText: proxy.t("common.submit"),
+  btnConfig: {
+    isNeed: false,
+    listTitle: proxy.t("arrivalQuality.relatedContract"),
+    prop: "arrivalQualityContractList",
+    plain: true,
+    listConfig: [],
+  },
+});
+const formConfig = reactive([
+  {
+    type: "input",
+    label: proxy.t("arrivalQuality.supplyName"),
+    prop: "supplyName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("arrivalQuality.arrivalCode"),
+    prop: "code",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("arrivalQuality.productName"),
+    prop: "productName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("arrivalQuality.productSpec"),
+    prop: "productSpec",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("arrivalQuality.arrivalNumber"),
+    prop: "count",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("arrivalQuality.alreadyQualityNumber"),
+    prop: "sumQualityCount",
+    itemType: "text",
+    readonly: true,
+  },
+
+  {
+    type: "input",
+    label: proxy.t("arrivalQuality.qualityQualified"),
+    prop: "qualifiedCount",
+    itemType: "number",
+  },
+  {
+    type: "input",
+    label: proxy.t("arrivalQuality.qualityUnQualified"),
+    prop: "noQualifiedCount",
+    itemType: "number",
+  },
+]);
+const onClickLeft = () => history.back();
+
+onMounted(() => {
+  if (route.query && route.query.id) {
+    let ids = [route.query.id];
+    proxy.post("/arrivalDetail/detail", { ids }).then((res) => {
+      formData.data = {
+        arrivalId: route.query.arrivalId,
+        supplyId: route.query.supplyId,
+        supplyName: route.query.supplyName,
+        code: route.query.code,
+        productSpec: route.query.productSpec,
+        productName: route.query.productName,
+        count: route.query.count,
+        arrivalDetailId: res.data[0].id,
+        sumQualityCount: res.data[0].sumQualityCount,
+        qualifiedCount: "",
+        noQualifiedCount: "",
+      };
+    });
+  }
+});
+
+const onSubmit = () => {
+  let data = { ...formData.data };
+  if (Number(data.qualifiedCount) + Number(data.noQualifiedCount) > 0) {
+    if (
+      Number(data.qualifiedCount) +
+        Number(data.noQualifiedCount) +
+        Number(data.sumQualityCount) >
+      Number(data.count)
+    ) {
+      return showFailToast(
+        proxy.t(
+          "arrivalQuality.qualityInspectionQuantityNotBeGreaterThanArrivalNumber"
+        )
+      );
+    } else {
+      let obj = {
+        arrivalDetailId: data.arrivalDetailId,
+        qualifiedCount: data.qualifiedCount,
+        noQualifiedCount: data.noQualifiedCount,
+      };
+      delete data.arrivalDetailId;
+      delete data.qualifiedCount;
+      delete data.noQualifiedCount;
+      data.qualityDetailList = [obj];
+      proxy.post("/quality/add", data).then(
+        () => {
+          showSuccessToast(proxy.t("common.operationSuccessful"));
+          setTimeout(() => {
+            onClickLeft();
+          }, 500);
+        },
+        (err) => {
+          return showFailToast(err.message);
+        }
+      );
+    }
+  } else {
+    return showFailToast(
+      proxy.t("arrivalQuality.qualityInspectionQuantityCannotBeZero")
+    );
+  }
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 120 - 0
src/views/procurementManagement/arrival/index.vue

@@ -0,0 +1,120 @@
+<template>
+  <van-nav-bar
+    :title="$t('arrivalQuality.name')"
+    left-text=""
+    left-arrow
+    @click-left="onClickLeft"
+  >
+  </van-nav-bar>
+  <van-search
+    v-model="req.keyword"
+    :placeholder="$t('common.pleaseEnterKeywords')"
+    @search="onRefresh"
+  />
+  <van-pull-refresh v-model="loading" @refresh="onRefresh">
+    <div class="list">
+      <van-list
+        v-model:loading="loading"
+        :finished="finished"
+        :finished-text="$t('common.noMore')"
+        @load="getList"
+        style="margin-bottom: 60px"
+      >
+        <commonList :data="listData" @onClick="toDtl" :config="listConfig">
+          <template #quality="{ row }">
+            <div>
+              <span style="color: #70b603">{{ row.qualifiedCount }}</span>
+              /
+              <span style="color: #d9001b">{{ row.noQualifiedCount }}</span>
+              /
+              <span> {{ row.qualifiedCount + row.noQualifiedCount }}</span>
+            </div>
+          </template>
+        </commonList>
+      </van-list>
+    </div>
+  </van-pull-refresh>
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import commonList from "@/components/common-list.vue";
+
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => proxy.$router.push("/main/working");
+const req = ref({
+  pageNum: 1,
+  keyword: null,
+  dataType: "1",
+});
+const finished = ref(false);
+const onRefresh = () => {
+  req.value.pageNum = 1;
+  finished.value = false;
+  getList("refresh");
+};
+const loading = ref(false);
+const listData = ref([]);
+const getList = (type) => {
+  loading.value = true;
+  proxy
+    .post("/arrivalDetail/page", req.value)
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        res.data.rows = res.data.rows.map((x) => {
+          return {
+            ...x,
+          };
+        });
+      }
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
+      if (req.value.pageNum * 10 >= res.data.total) {
+        finished.value = true;
+      }
+      req.value.pageNum++;
+      loading.value = false;
+    })
+    .catch(() => {
+      loading.value = false;
+    });
+};
+const toDtl = (row) => {
+  proxy.$router.push({
+    path: "/main/arrivalAdd",
+    query: {
+      ...row,
+    },
+  });
+};
+const listConfig = ref([
+  {
+    label: proxy.t("arrivalQuality.supplyName"),
+    prop: "supplyName",
+  },
+  {
+    label: proxy.t("arrivalQuality.productName"),
+    prop: "productName",
+  },
+  {
+    label: proxy.t("arrivalQuality.productSpec"),
+    prop: "productSpec",
+  },
+  {
+    label: proxy.t("arrivalQuality.arrivalNumber"),
+    prop: "count",
+  },
+  {
+    type: "slot",
+    label: proxy.t("arrivalQuality.qualitySituation"),
+    slotName: "quality",
+  },
+]);
+</script>
+
+<style lang="scss" scoped>
+.list {
+  min-height: 70vh;
+}
+</style>

+ 230 - 0
src/views/salesContract/claim/add.vue

@@ -0,0 +1,230 @@
+<template>
+  <div class="form">
+    <van-nav-bar
+      :title="$t('claim.name')"
+      :left-text="$t('common.back')"
+      left-arrow
+      @click-left="onClickLeft"
+    >
+    </van-nav-bar>
+    <testForm
+      v-model="formData.data"
+      :formOption="formOption"
+      :formConfig="formConfig"
+      :rules="rules"
+      @onSubmit="onSubmit"
+      ref="formDom"
+    ></testForm>
+  </div>
+</template>
+
+<script setup>
+import { ref, reactive, getCurrentInstance, onMounted } from "vue";
+import { showSuccessToast, showFailToast } from "vant";
+import { useRoute } from "vue-router";
+import testForm from "@/components/testForm/index.vue";
+const proxy = getCurrentInstance().proxy;
+const route = useRoute();
+const formDom = ref(null);
+const formData = reactive({
+  data: {},
+});
+const rules = {
+  contractId: [
+    {
+      required: true,
+      message: proxy.t("claim.contractCanNotBeEmpty"),
+    },
+  ],
+  money: [
+    {
+      required: true,
+      message: proxy.t("claim.relatedAmountCanNotBeEmpty"),
+    },
+  ],
+};
+const formOption = reactive({
+  readonly: false, //用于控制整个表单是否只读
+  disabled: false,
+  labelAlign: "top",
+  scroll: true,
+  labelWidth: "62pk",
+  submitBtnText: proxy.t("common.submit"),
+  btnConfig: {
+    isNeed: true,
+    listTitle: proxy.t("claim.relatedContract"),
+    prop: "claimContractList",
+    plain: true,
+    listConfig: [
+      {
+        type: "picker",
+        label: proxy.t("claim.contractCode"),
+        prop: "contractId",
+        itemType: "onePicker",
+        showPicker: false,
+        readonly: false,
+        fieldNames: {
+          text: "code",
+          value: "id",
+        },
+        data: [],
+      },
+      {
+        type: "input",
+        itemType: "number",
+        label: proxy.t("claim.relatedAmount"),
+        prop: "money",
+      },
+    ],
+    clickFn: () => {
+      if (
+        formData.data.claimContractList &&
+        formData.data.claimContractList.length > 0
+      ) {
+        formData.data.claimContractList.push({
+          contractId: "",
+          contractCode: "",
+          money: "",
+        });
+      } else {
+        formData.data.claimContractList = [
+          {
+            contractId: "",
+            contractCode: "",
+            money: "",
+          },
+        ];
+      }
+    },
+  },
+});
+const formConfig = reactive([
+  {
+    type: "title",
+    title: proxy.t("claim.accountInfo"),
+  },
+  {
+    type: "input",
+    label: proxy.t("claim.accountName"),
+    prop: "accountManagementName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("claim.accountTime"),
+    prop: "transactionTime",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("claim.accountAmount"),
+    prop: "currencyMoney",
+    itemType: "text",
+    readonly: true,
+  },
+]);
+const onClickLeft = () => history.back();
+const getDict = () => {
+  proxy
+    .post("/contract/page", {
+      pageNum: 1,
+      pageSize: 9999,
+      status: "30",
+      refundStatusNew: "0,10",
+    })
+    .then((res) => {
+      formOption.btnConfig.listConfig[0].data = res.data.rows;
+    });
+};
+onMounted(() => {
+  getDict();
+  if (route.query.isClaim != "1") {
+    proxy
+      .get(`/claim/sumClaimMoney?businessId=${route.query.id}`)
+      .then((res) => {
+        let waitAmount = Number(route.query.amount) - Number(res.data);
+        formData.data = {
+          businessId: route.query.id,
+          status: route.query.status + "",
+          currency: route.query.currency,
+          waitAmount,
+          accountManagementId: route.query.accountManagementId,
+          accountManagementName: route.query.accountManagementName,
+          currencyMoney: route.query.currency + " " + parseFloat(waitAmount),
+          transactionTime: route.query.transactionTime,
+          claimContractList: [],
+        };
+      });
+  } else {
+    formOption.btnConfig.isNeed = false;
+    formOption.readonly = true;
+    formOption.submitBtnText = proxy.t("claim.cancelClaim");
+    proxy.post("/claim/claimRecord", { businessId: route.query.id }).then(
+      (res) => {
+        formData.data = {
+          accountManagementName: route.query.accountManagementName,
+          currencyMoney: route.query.currency + " " + route.query.amount,
+          transactionTime: route.query.transactionTime,
+          claimContractList: res.data,
+        };
+        // formDom.value.formDataListShowLabelOne();
+      },
+      (err) => {
+        return showFailToast(err.message);
+      }
+    );
+  }
+});
+
+const onSubmit = () => {
+  if (route.query.isClaim != "1") {
+    if (formData.data.claimContractList.length > 0) {
+      let list = formData.data.claimContractList;
+      for (let i = 0; i < list.length; i++) {
+        const e = list[i];
+        if (!(Number(e.money) > 0)) {
+          return showFailToast(
+            proxy.t("claim.relatedAmountMustBeGreaterThanZero")
+          );
+        }
+      }
+      const total = list.reduce((total, x) => (total += Number(x.money)), 0);
+      if (total > Number(formData.data.waitAmount)) {
+        return showFailToast(
+          proxy.t("claim.relatedAmountTotalNotBeGreaterThanAccountAmount")
+        );
+      }
+      formData.data.amount = total;
+      proxy.post("/claim/add", formData.data).then(
+        () => {
+          showSuccessToast(proxy.t("common.operationSuccessful"));
+          setTimeout(() => {
+            onClickLeft();
+          }, 500);
+        },
+        (err) => {
+          return showFailToast(err.message);
+        }
+      );
+    } else {
+      return showFailToast(proxy.t("claim.addDetails"));
+    }
+  } else {
+    proxy.post("/claim/delete", { id: route.query.id }).then(
+      () => {
+        showSuccessToast(proxy.t("common.operationSuccessful"));
+        setTimeout(() => {
+          onClickLeft();
+        }, 500);
+      },
+      (err) => {
+        return showFailToast(err.message);
+      }
+    );
+  }
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 32 - 29
src/views/salesContract/claim/index.vue

@@ -4,9 +4,7 @@
     left-text=""
     left-arrow
     @click-left="onClickLeft"
-    @click-right="onClickRight"
   >
-    <template #right>{{ $t("common.add") }}</template>
   </van-nav-bar>
   <van-search
     v-model="req.keyword"
@@ -37,17 +35,10 @@ import commonList from "@/components/common-list.vue";
 
 const proxy = getCurrentInstance().proxy;
 const onClickLeft = () => proxy.$router.push("/main/working");
-const onClickRight = () => {
-  proxy.$router.push({
-    path: "/main/processDtl",
-    query: {
-      flowKey: "account_request_funds_flow",
-    },
-  });
-};
 const req = ref({
   pageNum: 1,
   keyword: null,
+  dataType: "1",
 });
 const finished = ref(false);
 const onRefresh = () => {
@@ -63,10 +54,20 @@ const getList = (type) => {
     .post("/accountRunningWater/page", req.value)
     .then((res) => {
       if (res.data.rows && res.data.rows.length > 0) {
-        res.data.rows = res.data.rows.map((item) => {
+        res.data.rows = res.data.rows.map((x) => {
+          let text = "";
+          if (x.isClaim == 0) {
+            text = "未认领";
+          } else if (x.isClaim == 1) {
+            text = "已认领";
+          } else {
+            text = "部分认领";
+          }
           return {
-            ...item,
-            isClaimText: item.isClaim == 1 ? "是" : "否",
+            ...x,
+            isClaimText: text,
+            dfAcountName: x.name + ` (${x.accountOpening})`,
+            currencyMoney: x.currency + " " + x.amount,
           };
         });
       }
@@ -85,31 +86,33 @@ const getList = (type) => {
     });
 };
 const toDtl = (row) => {
-  // proxy.$router.push({
-  //   path: "/main/processDtl",
-  //   query: {
-  //     flowKey: "account_request_funds_flow",
-  //     id: row.flowInfoId,
-  //     processType: 20,
-  //   },
-  // });
+  proxy.$router.push({
+    path: "/main/claimAdd",
+    query: {
+      ...row,
+    },
+  });
 };
 const listConfig = ref([
   {
-    label: proxy.t("claim.createTime"),
-    prop: "createTime",
+    label: proxy.t("claim.accountName"),
+    prop: "accountManagementName",
+  },
+  {
+    label: proxy.t("claim.accountAmount"),
+    prop: "currencyMoney",
   },
   {
-    label: proxy.t("claim.currencyTotal"),
-    prop: "currencyTotal",
+    label: proxy.t("claim.accountTime"),
+    prop: "transactionTime",
   },
   {
-    label: proxy.t("claim.paymentRemarks"),
-    prop: "paymentRemarks",
+    label: proxy.t("claim.oppositeAccount"),
+    prop: "dfAcountName",
   },
   {
-    label: proxy.t("claim.fundsText"),
-    prop: "fundsText",
+    label: proxy.t("claim.claimStatus"),
+    prop: "isClaimText",
   },
 ]);
 </script>