Browse Source

部分新需求,部分页面增加账户信息

cz 1 year ago
parent
commit
3f44cea1d6

+ 1 - 0
src/components/process/SF/Contract.vue

@@ -1935,6 +1935,7 @@ const handleRemoveFile = (file, index) => {
     formData.data.contractProductList[index].prodFileList.splice(sonIndex, 1);
   }
 };
+
 const onPreviewFile = (file) => {
   if (file && file.fileUrl) {
     window.open(file.fileUrl, "_blank");

File diff suppressed because it is too large
+ 633 - 207
src/components/process/SF/CostControl.vue


+ 37 - 14
src/views/EHSD/saleContract/accountingSubjects/index.vue

@@ -78,6 +78,7 @@ const defaultPropsOne = {
   label: "label",
 };
 const userList = ref([]);
+const paymentTypeData = ref([]);
 const typeList = ref([
   {
     label: "公司",
@@ -111,20 +112,30 @@ const config = computed(() => {
   return [];
 });
 const getDict = () => {
-  proxy
-    .get("/tenantUser/list", {
-      pageNum: 1,
-      pageSize: 10000,
-      tenantId: useUserStore().user.tenantId,
-    })
-    .then((res) => {
-      userList.value = res.rows.map((item) => {
-        return {
-          label: item.nickName,
-          value: item.userId,
-        };
-      });
+  // proxy
+  //   .get("/tenantUser/list", {
+  //     pageNum: 1,
+  //     pageSize: 10000,
+  //     tenantId: useUserStore().user.tenantId,
+  //   })
+  //   .then((res) => {
+  //     userList.value = res.rows.map((item) => {
+  //       return {
+  //         label: item.nickName,
+  //         value: item.userId,
+  //       };
+  //     });
+  //   });
+
+  proxy.post("/paymentType/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    paymentTypeData.value = res.rows.map((item) => {
+      return {
+        ...item,
+        label: item.name,
+        value: item.id,
+      };
     });
+  });
 };
 const deptAllData = ref([]);
 const getList = (req) => {
@@ -140,7 +151,7 @@ const getList = (req) => {
       }, 200);
     });
 };
-// getDict();
+getDict();
 getList();
 const modalType = ref("add");
 const dialogVisible = ref(false);
@@ -169,6 +180,15 @@ const formConfig = computed(() => {
       label: "名称",
     },
     {
+      type: "select",
+      label: "收付款类型",
+      prop: "paymentTypeId",
+      itemWidth: 100,
+      data: paymentTypeData.value,
+      // clearable: true,
+      fn: (val) => {},
+    },
+    {
       type: "input",
       prop: "calculateItemName",
       label: "核算项目名称",
@@ -200,6 +220,9 @@ const formConfig = computed(() => {
 const rules = ref({
   subjectsName: [{ required: true, message: "请输入名称", trigger: "blur" }],
   sort: [{ required: true, message: "请输入科目排序", trigger: "blur" }],
+  paymentTypeId: [
+    { required: true, message: "请选择收费款类型", trigger: "change" },
+  ],
 });
 const disabledType = ref(false);
 const openModal = (row) => {

+ 231 - 0
src/views/JST/shopManage/index copy.vue

@@ -0,0 +1,231 @@
+<template>
+  <div class="pageIndexClass">
+    <div>
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :action-list="[
+              {
+                text: '添加店铺',
+                action: () => openModal('add'),
+                disabled: false,
+              },
+        ]" @get-list="getList">
+
+        <template #name="{ item }">
+          <div>
+            <span class="el-click">{{ item.name }}</span>
+          </div>
+        </template>
+
+      </byTable>
+    </div>
+    <el-dialog :title="modalType == 'add' ? '添加店铺' : '编辑店铺'" v-model="dialogVisible" width="500px" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="defualt" v-debounce>取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="defualt" v-debounce :loading="submitLoading">
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const treeData = ref([]);
+const dialogVisible = ref(false);
+const modalType = ref("add");
+const selectConfig = computed(() => []);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "店铺编号",
+        prop: "code",
+      },
+    },
+    {
+      attrs: {
+        label: " 店铺名称",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "负责部门",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              proxy
+                .msgConfirm()
+                .then((res) => {
+                  proxy
+                    .post("/shopInfo/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      proxy.msgTip("删除成功", 1);
+                      getList();
+                    });
+                })
+                .catch((err) => {});
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+});
+const formDom = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "code",
+      label: "店铺编号",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "店铺名称",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "负责部门",
+      data: treeData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+const rules = ref({
+  deptId: [{ required: true, message: "请选择负责部门", trigger: "change" }],
+  name: [{ required: true, message: "请输入店铺名称", trigger: "blur" }],
+  code: [{ required: true, message: "请输入店铺编号", trigger: "blur" }],
+});
+
+const getDeptData = () => {
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      treeData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDeptData();
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/shopInfo/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {
+    definition: "2",
+    fileList: [],
+  };
+};
+
+const submitForm = () => {
+  formDom.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/shopInfo/" + modalType.value, formData.data).then(
+      (res) => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => {
+        submitLoading.value = false;
+      }
+    );
+  });
+};
+
+const getDtl = (row) => {
+  modalType.value = "edit";
+  proxy.post("/shopInfo/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    dialogVisible.value = true;
+  });
+};
+
+getList();
+</script>
+
+<style lang="scss" scoped>
+.content {
+  padding: 20px;
+}
+</style>

+ 43 - 14
src/views/JST/shopManage/index.vue

@@ -60,14 +60,26 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: " 店铺名称",
+        label: "店铺名称",
         prop: "name",
       },
     },
     {
       attrs: {
-        label: "负责部门",
-        prop: "deptName",
+        label: "开户行",
+        prop: "accountBank",
+      },
+    },
+    {
+      attrs: {
+        label: "开户名",
+        prop: "accountName",
+      },
+    },
+    {
+      attrs: {
+        label: "账号",
+        prop: "accountNumber",
       },
     },
     {
@@ -143,15 +155,36 @@ const formConfig = computed(() => {
       itemWidth: 100,
       disabled: false,
     },
+    // {
+    //   type: "treeSelect",
+    //   prop: "deptId",
+    //   label: "负责部门",
+    //   data: treeData.value,
+    //   propsTreeLabel: "deptName",
+    //   propsTreeValue: "deptId",
+    //   itemWidth: 100,
+    //   disabled: false,
+    // },
+    {
+      type: "input",
+      prop: "accountBank",
+      label: "开户行",
+      placeholder: "请输入开户行",
+      itemWidth: 100,
+    },
     {
-      type: "treeSelect",
-      prop: "deptId",
-      label: "负责部门",
-      data: treeData.value,
-      propsTreeLabel: "deptName",
-      propsTreeValue: "deptId",
+      type: "input",
+      prop: "accountName",
+      label: "开户名",
+      placeholder: "请输入开户名",
+      itemWidth: 100,
+    },
+    {
+      type: "input",
+      prop: "accountNumber",
+      label: "账号",
+      placeholder: "请输入账号",
       itemWidth: 100,
-      disabled: false,
     },
   ];
 });
@@ -194,10 +227,6 @@ const openModal = () => {
     definition: "2",
     fileList: [],
   };
-  if (currencyData.value && currencyData.value.length > 0) {
-    formData.data.currency = currencyData.value[0].dictKey;
-    formData.data.costCurrency = currencyData.value[0].dictKey;
-  }
 };
 
 const submitForm = () => {

+ 83 - 76
src/views/finance/fundManage/costControl/index.vue

@@ -75,38 +75,56 @@ const config = computed(() => {
   return [
     {
       attrs: {
-        label: "企业信息",
-        prop: "corporationName",
+        label: "交易类型",
+        prop: "tradeType",
       },
     },
     {
       attrs: {
-        label: "账户别名",
-        prop: "alias",
+        label: "记账凭证号",
+        prop: "voucherNo",
       },
     },
     {
       attrs: {
-        label: "开户银行",
-        prop: "openingBank",
+        label: "申请时间",
+        prop: "applyTime",
       },
     },
     {
       attrs: {
-        label: "账户名",
-        prop: "name",
+        label: "流水号",
+        prop: "code",
       },
     },
     {
       attrs: {
-        label: "账号",
-        prop: "accountOpening",
+        label: "业务公司",
+        prop: "companyName",
       },
     },
     {
       attrs: {
-        label: "联行号",
-        prop: "interbankNumber",
+        label: "业务部门",
+        prop: "deptId",
+      },
+    },
+    {
+      attrs: {
+        label: "开户行",
+        prop: "accountBank",
+      },
+    },
+    {
+      attrs: {
+        label: "开户名",
+        prop: "accountName",
+      },
+    },
+    {
+      attrs: {
+        label: "开户账号",
+        prop: "accountNumber",
       },
     },
     {
@@ -117,48 +135,44 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          {
-            attrs: {
-              label: "修改",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              update(row);
-            },
-          },
-          {
-            attrs: {
-              label: "删除",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              ElMessageBox.confirm(
-                "此操作将永久删除该数据, 是否继续?",
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
-                proxy
-                  .post("/accountManagement/delete", {
-                    id: row.id,
-                  })
-                  .then(() => {
-                    ElMessage({
-                      message: "删除成功",
-                      type: "success",
-                    });
-                    getList();
-                  });
-              });
-            },
-          },
+          row.status == 0
+            ? {
+                attrs: {
+                  label: "修改",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  update(row);
+                },
+              }
+            : {},
+          row.status == 0
+            ? {
+                attrs: {
+                  label: "删除",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  proxy
+                    .msgConfirm()
+                    .then((res) => {
+                      proxy
+                        .post("/costControl/delete", {
+                          id: row.id,
+                        })
+                        .then((res) => {
+                          proxy.msgTip("操作成功", 1);
+                          getList();
+                        });
+                    })
+                    .catch((err) => {});
+                },
+              }
+            : {},
         ];
       },
     },
@@ -179,15 +193,13 @@ const typeData = ref([
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/accountManagement/page", sourceList.value.pagination)
-    .then((res) => {
-      sourceList.value.data = res.rows;
-      sourceList.value.pagination.total = res.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-    });
+  proxy.post("/costControl/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
 };
 
 getList();
@@ -430,20 +442,15 @@ const submitForm = () => {
   });
 };
 const update = (row) => {
-  modalType.value = "edit";
-  loadingDialog.value = true;
-  proxy.post("/accountManagement/detail", { id: row.id }).then((res) => {
-    res.accountRemainderList = res.accountRemainderList.map((item) => {
-      return {
-        id: item.id,
-        currency: item.currency,
-        remainder: item.remainder,
-      };
-    });
-    formData.data = res;
-    loadingDialog.value = false;
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "cost_control_flow",
+      flowName: "费控流程",
+      businessId: row.id,
+      random: proxy.random(),
+    },
   });
-  dialogVisible.value = true;
 };
 </script>
 

+ 38 - 18
src/views/finance/fundManage/paymentType/index.vue

@@ -12,11 +12,21 @@
 
     <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="60%">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
-        <template #other>
+        <template #main>
           <div style="width:100%">
-            <el-checkbox-group v-model="formData.data.checkList">
-              <el-checkbox v-for="item in checkBoxList" :label="item.label" :value="item.value" />
-
+            <el-checkbox-group v-model="formData.data.mainCheckList">
+              <el-checkbox v-for="item in checkBoxMap.infoField" :value="item.key" :label="item.key" :key="item.key">
+                {{item.val}}
+              </el-checkbox>
+            </el-checkbox-group>
+          </div>
+        </template>
+        <template #detail>
+          <div style="width:100%">
+            <el-checkbox-group v-model="formData.data.detailCheckList">
+              <el-checkbox v-for="item in checkBoxMap.detailField" :value="item.key" :label="item.key" :key="item.key">
+                {{item.val}}
+              </el-checkbox>
             </el-checkbox-group>
           </div>
         </template>
@@ -48,7 +58,7 @@ const typeData = ref([
     value: 20,
   },
 ]);
-const checkBoxList = ref([]);
+const checkBoxMap = ref({});
 const sourceList = ref({
   data: [],
   pagination: {
@@ -137,16 +147,9 @@ const config = computed(() => {
 });
 const corporationList = ref([]);
 const getDict = () => {
-  proxy
-    .post("/dictTenantData/page", {
-      pageNum: 1,
-      pageSize: 999,
-      dictCode: "account_currency",
-      tenantId: useUserStore().user.tenantId,
-    })
-    .then((res) => {
-      checkBoxList.value = res;
-    });
+  proxy.post("/costControl/getFieldInfo").then((res) => {
+    checkBoxMap.value = res;
+  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -214,8 +217,13 @@ const formConfig = computed(() => {
     },
     {
       type: "slot",
-      slotName: "other",
-      label: "勾选需要字段",
+      slotName: "main",
+      label: "主要字段",
+    },
+    {
+      type: "slot",
+      slotName: "detail",
+      label: "明细字段",
     },
   ];
 });
@@ -231,7 +239,8 @@ const formData = reactive({
 const openModal = (val) => {
   modalType.value = val;
   formData.data = {
-    accountRemainderList: [{ currency: "", remainder: undefined }],
+    mainCheckList: [],
+    detailCheckList: [],
   };
   loadingDialog.value = false;
   dialogVisible.value = true;
@@ -265,6 +274,11 @@ const isRepeat = (arr) => {
 const submitForm = () => {
   submit.value.handleSubmit(() => {
     loadingDialog.value = true;
+    let dynamicFieldJson = {
+      mainCheckList: formData.data.mainCheckList,
+      detailCheckList: formData.data.detailCheckList,
+    };
+    formData.data.dynamicFieldJson = JSON.stringify(dynamicFieldJson);
     proxy.post("/paymentType/" + modalType.value, formData.data).then(
       () => {
         proxy.msgTip("操作成功", 1);
@@ -278,11 +292,17 @@ const submitForm = () => {
     );
   });
 };
+
 const update = (row) => {
   modalType.value = "edit";
   loadingDialog.value = true;
   proxy.post("/paymentType/detail", { id: row.id }).then((res) => {
     formData.data = res;
+    if (res && res.dynamicFieldJson) {
+      let jsonObj = JSON.parse(res.dynamicFieldJson);
+      formData.data.mainCheckList = jsonObj.mainCheckList;
+      formData.data.detailCheckList = jsonObj.detailCheckList;
+    }
     loadingDialog.value = false;
   });
   dialogVisible.value = true;

+ 4 - 3
src/views/process/processApproval/index.vue

@@ -230,7 +230,7 @@ const route = useRoute();
 const props = defineProps({
   query: Object,
 });
-const StagFlowKey = ref(["contract_flow"]);
+const StagFlowKey = ref(["contract_flow", "cost_control_flow"]);
 // tab切换逻辑
 const activeName = ref("first");
 let auxiliaryData = ref([]);
@@ -423,8 +423,8 @@ const handleSubmitStag = async (_type) => {
                 btnLoading.value = false;
               }
             );
-          } else if (flowForm.flowKey == "subscribe_flow") {
-            proxy.post("/contract/add", data).then(
+          } else if (flowForm.flowKey == "cost_control_flow") {
+            proxy.post("/costControl/add", data).then(
               (res) => {
                 skipPage();
               },
@@ -456,6 +456,7 @@ const skipPage = () => {
     discuss_price_flow: "PriceSheetEHSD",
     after_sales_flow: "AfterSales",
     sales_outbound_approved_flow: "Contract",
+    cost_control_flow: "CostControl",
   };
   const useTagsStore = useTagsViewStore();
   useTagsStore.delVisitedView(router.currentRoute.value);

+ 21 - 0
src/views/systemTenant/tenant/userTenant/index.vue

@@ -331,6 +331,27 @@ const formConfig = computed(() => {
       clearable: false,
       data: companyData.value,
     },
+    {
+      type: "input",
+      prop: "accountBank",
+      label: "开户行",
+      placeholder: "请输入开户行",
+      itemWidth: 100,
+    },
+    {
+      type: "input",
+      prop: "accountName",
+      label: "开户名",
+      placeholder: "请输入开户名",
+      itemWidth: 100,
+    },
+    {
+      type: "input",
+      prop: "accountNumber",
+      label: "账号",
+      placeholder: "请输入账号",
+      itemWidth: 100,
+    },
   ];
 });
 const rules = ref({

Some files were not shown because too many files changed in this diff