Browse Source

fix:暂存

Tang 2 năm trước cách đây
mục cha
commit
9c7f684a31

+ 1 - 1
.env.development

@@ -5,8 +5,8 @@ VUE_APP_TITLE =中正平台
 ENV = 'development'
 
 # 中正云教育管理后台/开发环境
+# VUE_APP_BASE_API = 'http://192.168.1.24:7077/'
 VUE_APP_BASE_API = 'http://192.168.1.24:7077/'
-# VUE_APP_BASE_API = 'http://192.168.1.24:5030/'
 VUE_APP_IMG_API = 'https://file-dev.xyyxt.net'
 
 # 路由懒加载

+ 24 - 0
src/api/financed/index.js

@@ -97,4 +97,28 @@ export function sellerList(query) {
     method: "get",
     params: query,
   });
+}
+// 机构分成列表
+export function tenantList(query) {
+  return request({
+    url: "/system/top/order/queryTenantList",
+    method: "get",
+    params: query,
+  });
+}
+// 修改备注
+export function updateRemark(data) {
+  return request({
+    url: "/system/top/order/updateRemark",
+    method: "post",
+    data,
+  });
+}
+// 订单应收应付统计
+export function countOrderNum(query) {
+  return request({
+    url: "/system/top/order/countOrderNum",
+    method: "get",
+    params: query,
+  });
 }

+ 16 - 6
src/components/searchBoxNew.vue

@@ -116,7 +116,10 @@
           >
             <el-option
               v-for="(items, indexs) in educationType"
-              v-show="!item.filter || (item.filter && items.educationName === '继续教育')"
+              v-show="
+                !item.filter ||
+                (item.filter && items.educationName === '继续教育')
+              "
               :key="indexs"
               :label="items.educationName"
               :value="items.id"
@@ -147,7 +150,13 @@
             <el-option
               v-for="(items, indexs) in newBusinessLevel"
               :key="indexs"
-              v-show="!item.filter || (item.filter && (items.projectName === '造价师' || items.projectName === '建造师') && items.businessName === '二级')"
+              v-show="
+                !item.filter ||
+                (item.filter &&
+                  (items.projectName === '造价师' ||
+                    items.projectName === '建造师') &&
+                  items.businessName === '二级')
+              "
               :label="items.projectName + '-' + items.businessName"
               :value="items.id"
             ></el-option>
@@ -159,6 +168,7 @@
             :placeholder="item.placeholder"
             :size="size"
             clearable
+            filterable
           >
             <el-option
               v-for="(items, indexs) in systemtenantlist"
@@ -361,8 +371,8 @@
             <el-option
               v-for="(items, indexs) in item.options"
               :key="indexs"
-              :label="items.label"
-              :value="items.value"
+              :label="items[item.selectLabel || 'label']"
+              :value="items[item.selectValue || 'value']"
               :disabled="items.disable"
             ></el-option>
           </el-select>
@@ -708,7 +718,7 @@ export default {
       "beforeLists",
       "applySiteAddress",
       "certificate",
-      "systemtenantlist"
+      "systemtenantlist",
     ]),
     /**
      * @remarks 过滤选择器列表
@@ -1045,4 +1055,4 @@ export default {
     margin-bottom: 0px;
   }
 }
-</style>
+</style>

+ 0 - 1
src/directive/common/int.js

@@ -1,5 +1,4 @@
 import { checkNum } from "@/utils/index";
-import { set } from "nprogress";
 export default {
   inserted(el, binding, vnode) {
     el.addEventListener("keyup", (e) => {

+ 2 - 2
src/utils/request.js

@@ -7,9 +7,9 @@ import methods from '@/utils/methodsTool';
 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
-// export const baseURL = process.env.VUE_APP_BASE_API
+export const baseURL = process.env.VUE_APP_BASE_API
 // export const baseURL = 'https://ptapi.gdzzkj.net/'
-export const baseURL = 'http://192.168.1.7:7077/'
+// export const baseURL = 'http://192.168.1.7:7077/'
 export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分

+ 178 - 41
src/views/financed/arap/index.vue

@@ -5,9 +5,9 @@
       @change="changeSearch"
       style="margin-bottom: 10px"
     >
-      <el-radio-button label="1">应收账款</el-radio-button>
-      <el-radio-button label="2">机构分成</el-radio-button>
-      <el-radio-button label="3">业务员提成</el-radio-button>
+      <el-radio-button :label="0">应收账款</el-radio-button>
+      <el-radio-button :label="1">机构分成</el-radio-button>
+      <el-radio-button :label="2">业务员提成</el-radio-button>
     </el-radio-group>
     <search-box-new
       ref="searchBox"
@@ -16,11 +16,20 @@
       @search="search"
       @init="init"
     />
+    <div class="dis_flex_order_li">
+      <div class="list" v-for="(item, index) in showTabList[type]" :key="index">
+        <img :src="item.img" alt="" />
+        <div class="right">
+          <h4>{{ item.label }}:</h4>
+          <p>{{ countInfo[item.prop] }}{{ item.ch || "元" }}</p>
+        </div>
+      </div>
+    </div>
     <table-list
       :key="type"
       rowKey="id"
       ref="tableList"
-      @openDialog="openDialog"
+      @openDialog="(row) => openDialog(row, 0)"
       :tableSets="tableSet"
       :tableData="tableData"
       :navText="navText"
@@ -69,12 +78,29 @@
       </template>
       <template slot="btn" slot-scope="props">
         <el-button
+          v-if="type == 0"
           type="text"
           :disabled="props.scope.row.creditStatus == 1"
-          @click="handelClick(props.scope.row)"
+          @click="openDialog(props.scope.row, 1)"
         >
           催款提醒
         </el-button>
+        <template v-else>
+          <el-button
+            type="text"
+            :disabled="props.scope.row.creditStatus == 1"
+            @click="openDialog(props.scope.row, 2)"
+          >
+            点击审核
+          </el-button>
+          <el-button
+            type="text"
+            style="color: #e6a23c"
+            @click="openDialog(props.scope.row, 3)"
+          >
+            修改备注
+          </el-button>
+        </template>
       </template>
     </table-list>
     <pagination
@@ -84,13 +110,18 @@
       @search="search"
     />
     <dislog-tip
-      :dialogVisible.sync="dialogVisible"
+      :dialogVisible.sync="tipDialogVisible"
       :orderInfo="activeOrderInfo"
       @search="search"
-    ></dislog-tip>
-    <dislogOrderDetails
-      :dialogVisible.sync="orderDialogVisible"
-    ></dislogOrderDetails>
+    />
+    <!-- 订单详情 -->
+    <dislog-order-details :dialogVisible.sync="orderDialogVisible" />
+    <arap-remarks
+      :orderSn="activeOrderInfo.orderSn"
+      :remark="activeOrderInfo.remark"
+      @search="search"
+      :dialogVisible.sync="remarkDialogVisible"
+    ></arap-remarks>
   </div>
 </template>
 
@@ -100,8 +131,15 @@ import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 import dislogTip from "./dislogTip.vue";
 import dislogOrderDetails from "../components/dislogOrderDetails.vue";
+import arapRemarks from "../components/arapRemarks.vue";
 import { exportFn } from "@/utils/index.js";
-import { orderList, sellerList, orderExport } from "@/api/financed/index";
+import {
+  orderList,
+  sellerList,
+  tenantList,
+  orderExport,
+  countOrderNum,
+} from "@/api/financed/index";
 export default {
   name: "cost",
   components: {
@@ -110,9 +148,43 @@ export default {
     pagination,
     dislogTip,
     dislogOrderDetails,
+    arapRemarks,
   },
   data() {
     return {
+      showTabList: [
+        [
+          {
+            label: "合同金额",
+            prop: "orderPriceTotal",
+            img: require("@/assets/images/合同金额@2x.png"),
+          },
+          {
+            label: "已收账款",
+            prop: "orderReceivedTotal",
+            img: require("@/assets/images/已收款@2x.png"),
+          },
+          {
+            label: "未收账款",
+            prop: "orderUncollectedTotal",
+            img: require("@/assets/images/未收款@2x.png"),
+          },
+        ],
+        [
+          {
+            label: "待付账款",
+            prop: "sellerPay",
+            img: require("@/assets/images/未收款@2x.png"),
+          },
+        ],
+        [
+          {
+            label: "待付账款",
+            prop: "tenantPay",
+            img: require("@/assets/images/未收款@2x.png"),
+          },
+        ],
+      ],
       loading: false, //当前表单加载是否加载动画
       navText: {
         title: "应收应付",
@@ -130,7 +202,7 @@ export default {
         pageNum: 1,
       },
       // 表单
-      tableSet1: [
+      tableSet0: [
         {
           label: "下单时间",
           prop: "buyTime",
@@ -197,7 +269,7 @@ export default {
           hidden: true,
         },
       ],
-      tableSet2: [
+      tableSet1: [
         {
           label: "下单时间",
           prop: "startTime",
@@ -206,44 +278,46 @@ export default {
         },
         {
           label: "订单单号",
-          prop: "name",
+          prop: "orderSn",
           hidden: true,
         },
         {
           label: "机构名称",
-          prop: "name",
+          prop: "tenantName",
           hidden: true,
         },
         {
           label: "待付账款(元)",
-          prop: "name",
+          prop: "divideCompanyMoney",
           hidden: true,
         },
         {
           label: "预付时间",
-          prop: "name",
+          prop: "predictPayTime",
           hidden: true,
         },
         {
           label: "剩余天数",
-          prop: "name",
+          prop: "predictReceiveDay",
           hidden: true,
         },
         {
           label: "审核状态",
-          prop: "name",
+          prop: "refundStatus",
           hidden: true,
+          scope: "solt",
+          soltName: "refundStatus",
         },
         {
           label: "备注",
-          prop: "name",
+          prop: "remark",
           hidden: true,
         },
       ],
-      tableSet3: [
+      tableSet2: [
         {
           label: "下单时间",
-          prop: "lastTime",
+          prop: "buyTime",
           hidden: true,
           scope: "aTimeList",
         },
@@ -289,25 +363,35 @@ export default {
           scope: "solt",
           soltName: "refundStatus",
         },
+        {
+          label: "备注",
+          prop: "remark",
+          hidden: true,
+        },
       ],
       tableData: [], //表单数据
       total: 0, //一共多少条
-      dialogVisible: false,
+      tipDialogVisible: false,
       orderDialogVisible: false,
-      type: 1,
+      remarkDialogVisible: false,
+      type: 0,
       activeOrderInfo: {},
+      roleList: [],
+      countInfo: {},
     };
   },
   created() {
-    this.search(2);
+    this.init();
   },
   methods: {
-    openDialog(data) {
-      console.log(data);
-      this.orderDialogVisible = true;
+    openDialog(data, type) {
+      this.activeOrderInfo = data;
+      this[
+        ["order", "tip", "examine", "remark"][type] + "DialogVisible"
+      ] = true;
     },
     batchExport() {
-      const fn = [orderExport, orderExport, orderExport][this.type - 1];
+      const fn = [orderExport, orderExport, orderExport][this.type];
       fn(this.backData()).then((res) => {
         if (res.msg) {
           exportFn(res.msg, "导出应收应付数据");
@@ -326,14 +410,10 @@ export default {
       return data;
     },
     changeSearch() {
-      this.init();
-    },
-    handelClick(row) {
-      this.activeOrderInfo = row;
-      this.dialogVisible = true;
+      this.search(2);
     },
     getDataList(data) {
-      const fn = [orderList, orderList, sellerList][this.type - 1];
+      const fn = [orderList, tenantList, sellerList][this.type];
       fn(data)
         .then((res) => {
           this.tableData = res.rows;
@@ -369,8 +449,20 @@ export default {
       return data;
     },
     init() {
+      this.getRoleList();
+      this.getCountOrderNum();
       this.search(2);
     },
+    getRoleList() {
+      this.$api.obtainRoleList().then((res) => {
+        this.roleList = res.rows;
+      });
+    },
+    getCountOrderNum() {
+      countOrderNum().then((res) => {
+        this.countInfo = res.data;
+      });
+    },
   },
   computed: {
     tableSet() {
@@ -398,16 +490,15 @@ export default {
       if (this.type != 1) {
         data.unshift(
           {
-            prop: "status1",
+            prop: "roleId",
             placeholder: "角色选择",
             scope: "select",
-            options: [
-              { label: "已结清", value: 1 },
-              { label: "未结清", value: 0 },
-            ],
+            options: this.roleList,
+            selectValue: "roleId",
+            selectLabel: "roleName",
           },
           {
-            prop: "checkStatus",
+            prop: "divideStatus",
             placeholder: "审核状态",
             scope: "select",
             options: [
@@ -416,6 +507,11 @@ export default {
               { label: "未通过", value: 2 },
               { label: "已撤销", value: 3 },
             ],
+          },
+          {
+            prop: "tenantId",
+            placeholder: "机构选择",
+            scope: "systemtenantlist",
           }
         );
       } else {
@@ -438,4 +534,45 @@ export default {
     content: ",";
   }
 }
+.dis_flex_order_li {
+  display: flex;
+  align-items: center;
+  flex-wrap: wrap;
+  & > .list {
+    user-select: none;
+    cursor: pointer;
+    transition: all 0.3s;
+    box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.2);
+    &:hover {
+      transform: scale(1.04);
+    }
+    width: 136px;
+    height: 44px;
+    border-radius: 6px;
+    display: flex;
+    align-items: center;
+    flex-shrink: 0;
+    margin-right: 10px;
+    margin-bottom: 10px;
+    & > img {
+      margin-left: 2px;
+      width: 40px;
+      height: 40px;
+    }
+    & > .right {
+      flex: 1;
+      padding-left: 4px;
+      & > h4 {
+        color: #000;
+        margin: 0;
+        font-size: 12px;
+      }
+      & > p {
+        font-size: 12px;
+        color: red;
+        margin: 0;
+      }
+    }
+  }
+}
 </style>

+ 74 - 0
src/views/financed/components/arapRemarks.vue

@@ -0,0 +1,74 @@
+<template>
+  <div>
+    <BaseDialog
+      width="600px"
+      :isShow.sync="isShow"
+      title="修改备注"
+      @submit="submitForm"
+    >
+      <el-input
+        :rows="6"
+        type="textarea"
+        placeholder="请输入备注"
+        v-model="value"
+      ></el-input>
+    </BaseDialog>
+  </div>
+</template>
+
+<script>
+import { updateRemark } from "@/api/financed/index";
+export default {
+  name: "remarks",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    orderSn: {
+      type: Number,
+    },
+    remark: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      value: "",
+    };
+  },
+
+  mounted() {},
+
+  methods: {
+    init() {
+      this.value = this.remark;
+    },
+    submitForm() {
+      updateRemark({ orderSn: this.orderSn, remark: this.value }).then(
+        (res) => {
+          this.$message.success("修改备注成功");
+          this.isShow = false;
+          this.$emit("search");
+        }
+      );
+    },
+  },
+  computed: {
+    isShow: {
+      get() {
+        if (this.dialogVisible) {
+          this.init();
+        }
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>