Selaa lähdekoodia

Merge branch 'dev' into x_d_5.1

谢杰标 2 vuotta sitten
vanhempi
commit
e0437455a5

+ 1 - 1
.env.staging

@@ -10,7 +10,7 @@ ENV = 'staging'
 # 测试
 VUE_APP_BASE_API = 'http://192.168.1.222:7077/'
 # 预发布
-VUE_APP_BASE_API1 = 'http://120.79.166.78:19007/'
+VUE_APP_BASE_API1 = 'http://192.168.1.222:8077/'
 #图片
 VUE_APP_IMG_API = 'https://file-dev.xyyxt.net'
 

+ 2 - 1
src/api/api.js

@@ -89,11 +89,12 @@ import integral from "../fxApi/integral"//商户列表
 import vipUser from "../fxApi/vipUser"//会员列表
 import configKey from "../fxApi/configKey"//积分规则
 import merchant from "../fxApi/merchant"//合作商户
-
+import goodsClassification from '../fxApi/goodsClassification'//商户分类
 
 
 // 导入对应模块------------------------
 export default {
+    ...goodsClassification,
     ...merchant,
     ...configKey,
     ...vipUser,

+ 1 - 1
src/components/BaseDialog.vue

@@ -80,7 +80,7 @@ export default {
   },
   methods: {
     confirmBtn() {
-      this.$emit("submit", "123");
+      this.$emit("submit");
     },
     close() {
       this.$emit("close");

+ 1 - 7
src/components/Comon/pictureList.vue

@@ -5,7 +5,7 @@
       <div class="right">
         <h4>{{ item.label }}:</h4>
         <p>
-          {{ formatPrice(item.value || info[item.prop]) }}{{ item.ch || "元" }}
+          {{ item.value || info[item.prop] | formatPrice }}{{ item.ch || "元" }}
         </p>
       </div>
     </div>
@@ -45,12 +45,6 @@ export default {
     backFullSrc(name) {
       return require(`@/assets/images/${name}@2x.png`);
     },
-    formatPrice(price) {
-      return price.toLocaleString(
-        "zh-CN",
-        (undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })
-      );
-    },
   },
 };
 </script>

+ 18 - 0
src/components/searchBoxNew.vue

@@ -171,6 +171,22 @@
               :value="items.merId"
             ></el-option>
           </el-select>
+          <!-- 商户店铺列表 -->
+          <el-select
+            v-else-if="item.scope === 'storeList'"
+            v-model="formData[item.prop]"
+            :placeholder="item.placeholder"
+            :size="size"
+            clearable
+            filterable
+          >
+            <el-option
+              v-for="(items, indexs) in storeList"
+              :key="indexs"
+              :label="items.storeName"
+              :value="items.storeId"
+            ></el-option>
+          </el-select>
           <!-- 机构列表 -->
           <el-select
             v-else-if="item.scope === 'systemtenantlist'"
@@ -221,6 +237,7 @@
             v-model="formData[item.prop]"
             :placeholder="item.placeholder"
             :size="size"
+            clearable
           >
             <el-option
               v-for="(items, indexs) in roleList"
@@ -753,6 +770,7 @@ export default {
       "systemtenantlist",
       "roleList",
       "merList",
+      "storeList",
     ]),
     /**
      * @remarks 过滤选择器列表

+ 19 - 4
src/components/tableList.vue

@@ -123,7 +123,9 @@
         width="55"
         header-align="center"
         fixed="left"
-        :selectable="navText.selectableStatus?navText.selectableFunc:selectFuncTrue"
+        :selectable="
+          navText.selectableStatus ? navText.selectableFunc : selectFuncTrue
+        "
       >
       </el-table-column>
       <el-table-column
@@ -593,7 +595,7 @@
             }}</span
           >
           <span v-else-if="item.scope === 'aTimeList'">{{
-            scope.row[item.prop] === null
+            scope.row[item.prop] === null || scope.row[item.prop] === 0
               ? "--"
               : $methodsTools.onlyForma(scope.row[item.prop], !item.isDiszing)
           }}</span>
@@ -752,6 +754,13 @@
                   ).toFixed(2) + "%"
             }}
           </span>
+          <span v-else-if="item.scope === 'toFixedYuan'">
+            {{
+              scope.row[item.prop] || scope.row[item.prop] == 0
+                ? scope.row[item.prop].toFixed(2)
+                : scope.row[item.prop]
+            }}
+          </span>
           <span v-else-if="item.scope === 'cType'">
             <el-tag
               type="success"
@@ -968,6 +977,12 @@
           <div v-else-if="item.scope === 'solt'">
             <slot :name="item.soltName" :scope="scope"></slot>
           </div>
+          <div v-else-if="item.scope === 'fill'">
+            {{ scope.row[item.prop] || "--" }}
+          </div>
+          <div v-else-if="item.scope === 'formatPrice'">
+            {{ scope.row[item.prop] | formatPrice }}
+          </div>
           <span v-else>
             {{ scope.row[item.prop] }}
             {{
@@ -1258,8 +1273,8 @@ export default {
     this.initTR();
   },
   methods: {
-    selectFuncTrue(){
-      return true
+    selectFuncTrue() {
+      return true;
     },
     radioChange(val) {},
     /**

+ 7 - 0
src/directive/filter/index.js

@@ -0,0 +1,7 @@
+// 金额格式化
+export function formatPrice(price) {
+  return price?.toLocaleString(
+    "zh-CN",
+    (undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })
+  );
+}

+ 3 - 1
src/directive/index.js

@@ -5,7 +5,8 @@ import dialogDragWidth from "./dialog/dragWidth";
 import dialogDragHeight from "./dialog/dragHeight";
 import throttle from "./common/throttle";
 import int from "./common/int";
-
+import { formatPrice } from "./filter/index";
+console.log(formatPrice, "formatPrice");
 const install = function (Vue) {
   Vue.directive("hasRole", hasRole);
   Vue.directive("hasPermi", hasPermi);
@@ -14,6 +15,7 @@ const install = function (Vue) {
   Vue.directive("dialogDragHeight", dialogDragHeight);
   Vue.directive("throttle", throttle);
   Vue.directive("int", int);
+  Vue.filter("formatPrice", formatPrice);
 };
 
 if (window.Vue) {

+ 43 - 0
src/fxApi/goodsClassification.js

@@ -0,0 +1,43 @@
+import request from '@/utils/request' //引入axios请求及拦截器
+export default {
+    //新增类目
+    addmallgoodscategorysave(data) {
+        return request({
+            url: '/mall/goods/category/save', 
+            method: 'post',
+            data
+        })
+    },
+    //修改类目
+    editmallgoodscategorysave(data) {
+        return request({
+            url: '/mall/goods/category/update',
+            method: 'post',
+            data
+        })
+    },
+    //查询类目列表
+    mallgoodscategorylist(data) {
+        return request({
+            url: '/mall/goods/category/list',
+            method: 'get',
+            params: data
+        })
+    },
+    //类目树
+    mallgoodscategorytree(data) {
+        return request({
+            url: '/mall/goods/category/tree',
+            method: 'get',
+            params: data
+        })
+    },
+    //批量删除类目
+    mallgoodscategorybatchdel(data) {
+        return request({
+            url: '/mall/goods/category/batch/del',
+            method: 'post',
+            data
+        })
+    },
+}

+ 9 - 1
src/fxApi/temp.js

@@ -113,8 +113,16 @@ export default {
     //机构Id
     systemtenantbankId(data) {
         return request({
-            url: '/system/tenant/bank/'+data,
+            url: '/system/tenant/bank/' + data,
             method: 'get',
         })
     },
+    //批量删除机构
+    systemtenantdeletetop(data) {
+        return request({
+            url: '/system/tenant/delete/top',
+            method: 'post',
+            data
+        })
+    },
 }

+ 7 - 7
src/layout/components/Navbar.vue

@@ -183,13 +183,13 @@ export default {
     },
   },
   mounted() {
-    // if (this.$route.name !== "StationLetter") {
-    //   this.$api.inquireinformsys_userinformUnReadSum().then((res) => {
-    //     if (res.data > 0) {
-    //       this.getDontReadList();
-    //     }
-    //   });
-    // }
+    if (this.$route.name !== "StationLetter") {
+      this.$api.inquireinformsys_userinformUnReadSum().then((res) => {
+        if (res.data > 0) {
+          this.getDontReadList();
+        }
+      });
+    }
   },
   methods: {
     /**

+ 68 - 61
src/main.js

@@ -1,81 +1,88 @@
-import Vue from 'vue'
+import Vue from "vue";
 
-import Cookies from 'js-cookie'
+import Cookies from "js-cookie";
 
-import Element from 'element-ui'
-import AFTableColumn from 'af-table-column'
-import './assets/fonts/iconfont.css'
-import './assets/styles/element-variables.scss'
+import Element from "element-ui";
+import AFTableColumn from "af-table-column";
+import "./assets/fonts/iconfont.css";
+import "./assets/styles/element-variables.scss";
 
-import '@/assets/styles/index.scss' // global css
-import '@/assets/styles/ruoyi.scss' // ruoyi css
-import App from './App'
-import store from './store'
-import api from '@/api/api'
-import gsap from 'gsap'
-import upload from '@/utils/uploadFile'
-import router from './router'
-import directive from './directive' //directive
-import plugins from './plugins' // plugins
-import './assets/icons' // icon
-import './permission' // permission control
+import "@/assets/styles/index.scss"; // global css
+import "@/assets/styles/ruoyi.scss"; // ruoyi css
+import App from "./App";
+import store from "./store";
+import api from "@/api/api";
+import gsap from "gsap";
+import upload from "@/utils/uploadFile";
+import router from "./router";
+import directive from "./directive"; //directive
+import plugins from "./plugins"; // plugins
+import "./assets/icons"; // icon
+import "./permission"; // permission control
 import { getDicts } from "@/api/system/dict/data";
 import { getConfigKey } from "@/api/system/config";
-import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
+import {
+  parseTime,
+  resetForm,
+  addDateRange,
+  selectDictLabel,
+  selectDictLabels,
+  handleTree,
+} from "@/utils/ruoyi";
 // 通用弹窗
 import BaseDialog from "@/components/BaseDialog";
 // 分页组件
 import Pagination from "@/components/Paginations";
 // 自定义表格工具组件
-import RightToolbar from "@/components/RightToolbar"
+import RightToolbar from "@/components/RightToolbar";
 // 富文本组件
-import Editor from "@/components/Editor"
+import Editor from "@/components/Editor";
 // 文件上传组件
-import FileUpload from "@/components/FileUpload"
+import FileUpload from "@/components/FileUpload";
 // 字典标签组件
-import DictTag from '@/components/DictTag'
+import DictTag from "@/components/DictTag";
 // 头部标签组件
-import VueMeta from 'vue-meta'
+import VueMeta from "vue-meta";
 // 字典数据组件
-import DictData from '@/components/DictData'
-import methodsTools from '@/utils/methodsTool'
-import bus from '@/utils/eventBus'
+import DictData from "@/components/DictData";
+import methodsTools from "@/utils/methodsTool";
+import bus from "@/utils/eventBus";
 // 全局方法挂载
 
-Vue.prototype.$store = store
-Vue.prototype.getDicts = getDicts
-Vue.prototype.getConfigKey = getConfigKey
-Vue.prototype.parseTime = parseTime
-Vue.prototype.resetForm = resetForm
-Vue.prototype.addDateRange = addDateRange
-Vue.prototype.selectDictLabel = selectDictLabel
-Vue.prototype.selectDictLabels = selectDictLabels
-Vue.prototype.handleTree = handleTree
-Vue.prototype.$api = api
-Vue.prototype.$upload = upload
-Vue.prototype.$methodsTools = methodsTools
-Vue.prototype.$bus = bus
-Vue.prototype.gsap = gsap
+Vue.prototype.$store = store;
+Vue.prototype.getDicts = getDicts;
+Vue.prototype.getConfigKey = getConfigKey;
+Vue.prototype.parseTime = parseTime;
+Vue.prototype.resetForm = resetForm;
+Vue.prototype.addDateRange = addDateRange;
+Vue.prototype.selectDictLabel = selectDictLabel;
+Vue.prototype.selectDictLabels = selectDictLabels;
+Vue.prototype.handleTree = handleTree;
+Vue.prototype.$api = api;
+Vue.prototype.$upload = upload;
+Vue.prototype.$methodsTools = methodsTools;
+Vue.prototype.$bus = bus;
+Vue.prototype.gsap = gsap;
 
 // 全局组件挂载
-Vue.component('DictTag', DictTag)
-Vue.component('Pagination', Pagination)
-Vue.component('BaseDialog', BaseDialog)
-Vue.component('RightToolbar', RightToolbar)
-Vue.component('Editor', Editor)
-Vue.component('FileUpload', FileUpload)
+Vue.component("DictTag", DictTag);
+Vue.component("Pagination", Pagination);
+Vue.component("BaseDialog", BaseDialog);
+Vue.component("RightToolbar", RightToolbar);
+Vue.component("Editor", Editor);
+Vue.component("FileUpload", FileUpload);
 const fontRate = {
   CHAR_RATE: 1.1, // 汉字比率
   NUM_RATE: 0.65, // 数字
-  OTHER_RATE: 0.8 // 除汉字和数字以外的字符的比率
-}
-const fontSize = 16
+  OTHER_RATE: 0.8, // 除汉字和数字以外的字符的比率
+};
+const fontSize = 16;
 // 注册组件
-Vue.use(AFTableColumn, { fontRate, fontSize })
-Vue.use(directive)
-Vue.use(plugins)
-Vue.use(VueMeta)
-DictData.install()
+Vue.use(AFTableColumn, { fontRate, fontSize });
+Vue.use(directive);
+Vue.use(plugins);
+Vue.use(VueMeta);
+DictData.install();
 
 /**
  * If you don't want to use mock-server
@@ -87,14 +94,14 @@ DictData.install()
  */
 
 Vue.use(Element, {
-  size: Cookies.get('size') || 'medium' // set element-ui default size
-})
+  size: Cookies.get("size") || "medium", // set element-ui default size
+});
 
-Vue.config.productionTip = false
+Vue.config.productionTip = false;
 
 new Vue({
-  el: '#app',
+  el: "#app",
   router,
   store,
-  render: h => h(App)
-})
+  render: (h) => h(App),
+});

+ 16 - 0
src/store/getters.js

@@ -29,6 +29,22 @@ const getters = {
     }
     return state.dict.indexnum
   },
+  categorytreeList(state) {
+    if (!state.dict.categorytreeList) {
+      api.mallgoodscategorytree({ status: 1 }).then(res => {
+        state.dict.categorytreeList = res.data
+      })
+    }
+    return state.dict.categorytreeList
+  },
+  storeList(state) {
+    if (!state.dict.storeList) {
+      api.mallstorelist({ status: 1 }).then(res => {
+        state.dict.storeList = res.rows
+      })
+    }
+    return state.dict.storeList
+  },
   merList(state) {
     if (!state.dict.merList) {
       api.mallmerchantlist({ status: 1 }).then(res => {

+ 20 - 0
src/store/modules/dict.js

@@ -33,8 +33,28 @@ const state = {
   indexnum: null,//模拟
   systemtenantlist: null,//机构列表
   merList: null,//店铺管理列表
+  storeList: null,//商户管理列表
+  categorytreeList: null,//商户分类列表
 }
 const mutations = {
+  //商户分类列表
+  CATEGORYTREELIST(state) {
+    api.mallgoodscategorytree({ status: 1 }).then(res => {
+      state.categorytreeList = res.data
+    })
+  },
+  //机构列表
+  TENANTLIST(state) {
+    api.systemtenantlist({ status: 1 }).then(res => {
+      state.systemtenantlist = res.rows
+    })
+  },
+  //商户管理列表
+  STORELIST(state) {
+    api.mallstorelist({ status: 1 }).then(res => {
+      state.storeList = res.rows
+    })
+  },
   //店铺管理列表
   MERLIST(state) {
     api.mallmerchantlist({ status: 1 }).then(res => {

+ 88 - 4
src/views/financed/arap/index.vue

@@ -76,7 +76,7 @@
         </div>
       </template>
       <template slot="status" slot-scope="props">
-        {{ backStatus(props.scope) }}
+        {{ backStatus(props.scope) | formatPrice }}
       </template>
       <template slot="btn" slot-scope="props">
         <el-button
@@ -106,7 +106,15 @@
             "
             @click="openDialog(props.scope.row, 1)"
           >
-            点击支付
+            {{
+              type == 1
+                ? "分成支付"
+                : type == 2
+                ? "提成支付"
+                : type == 3
+                ? "佣金支付"
+                : ""
+            }}
           </el-button>
           <el-button
             v-else
@@ -114,7 +122,15 @@
             :disabled="props.scope.row.checkStatus !== 0"
             @click="openDialog(props.scope.row, 1)"
           >
-            点击审核
+            {{
+              type == 1
+                ? "分成审核"
+                : type == 2
+                ? "提成审核"
+                : type == 3
+                ? "佣金审核"
+                : ""
+            }}
           </el-button>
           <el-button
             type="text"
@@ -277,6 +293,13 @@ export default {
         openCheckMore: true,
         changeWidth: "240px",
         custom: false,
+        tableColor: true,
+        tableColorFunc: ({ row, rowIndex }) => {
+          if (row.oId) {
+            return "child-row";
+          }
+          return "";
+        },
       },
       formData: {
         pageSize: 10,
@@ -333,21 +356,25 @@ export default {
           label: "合同金额(元)",
           prop: "orderPrice",
           hidden: true,
+          scope: "formatPrice",
         },
         {
           label: "已收账款(元)",
           prop: "orderReceived",
           hidden: true,
+          scope: "formatPrice",
         },
         {
           label: "已退金额(元)",
           prop: "orderRefunded",
           hidden: true,
+          scope: "formatPrice",
         },
         {
           label: "未收账款(元)",
           prop: "orderUncollected",
           hidden: true,
+          scope: "formatPrice",
         },
         {
           label: "预收时间",
@@ -359,6 +386,7 @@ export default {
           label: "剩余天数",
           prop: "predictReceiveDay",
           hidden: true,
+          scope: "fill",
         },
         {
           label: "提醒设置",
@@ -385,6 +413,8 @@ export default {
           label: "订单单号",
           prop: "orderSn",
           hidden: true,
+          scope: "fill",
+          width: 200,
         },
         {
           label: "类型",
@@ -405,6 +435,12 @@ export default {
           prop: "tenantName",
           hidden: true,
         },
+        {
+          label: "角色名称",
+          prop: "roleName",
+          hidden: true,
+          scope: "fill",
+        },
         {
           label: "已付分成(元)",
           prop: "payMoney",
@@ -444,6 +480,7 @@ export default {
           label: "剩余天数",
           prop: "predictPayDay",
           hidden: true,
+          scope: "fill",
         },
         {
           label: "审核状态",
@@ -474,7 +511,9 @@ export default {
         {
           label: "订单单号",
           prop: "orderSn",
+          scope: "fill",
           hidden: true,
+          width: 200,
         },
         {
           label: "类型",
@@ -495,6 +534,12 @@ export default {
           prop: "tenantName",
           hidden: true,
         },
+        {
+          label: "角色名称",
+          prop: "roleName",
+          hidden: true,
+          scope: "fill",
+        },
         {
           label: "业务员",
           prop: "createUsername",
@@ -562,13 +607,21 @@ export default {
         {
           label: "订单单号",
           prop: "orderSn",
+          scope: "fill",
           hidden: true,
+          width: 200,
         },
         {
           label: "机构名称",
           prop: "tenantName",
           hidden: true,
         },
+        {
+          label: "角色名称",
+          prop: "roleName",
+          hidden: true,
+          scope: "fill",
+        },
         {
           label: "已付佣金(元)",
           prop: "payMoney",
@@ -727,7 +780,7 @@ export default {
         });
     },
     load(tree, treeNode, resolve) {
-      monthOrderList({ divideLogId: tree.id })
+      monthOrderList({ divideLogId: tree.id, roleId: this.formData.roleId })
         .then((res) => {
           // id冲突会报错
           res.data.forEach((e) => {
@@ -801,6 +854,9 @@ export default {
           month: [],
         };
       }
+      this.maps.forEach((value, id) => {
+        this.update(id);
+      });
       this.getDataList();
     },
     init() {
@@ -833,6 +889,11 @@ export default {
       ];
       if (this.type != 0) {
         data.push(
+          {
+            prop: "roleId",
+            scope: "roleList",
+            placeholder: "角色选择",
+          },
           {
             prop: "monthTime",
             scope: "moreMonth",
@@ -881,6 +942,19 @@ export default {
           placeholder: "业务号",
         });
       }
+      if (this.type == 1) {
+        data.push({
+          prop: "billType",
+          placeholder: "账单类型",
+          scope: "select",
+          options: [
+            { label: "月份", value: 1 },
+            { label: "季度", value: 2 },
+            { label: "半年", value: 3 },
+            { label: "年度", value: 4 },
+          ],
+        });
+      }
       return data;
     },
   },
@@ -902,4 +976,14 @@ export default {
     content: ",";
   }
 }
+/deep/ {
+  .el-table {
+    .child-row {
+      background: #f0f9eb;
+      .el-table__cell {
+        background: #f0f9eb !important;
+      }
+    }
+  }
+}
 </style>

+ 26 - 2
src/views/financed/components/audit/dislogSet.vue

@@ -4,7 +4,7 @@
       :disabledBtn="disabledBtn"
       width="600px"
       :isShow.sync="isShow"
-      title="付款审核"
+      :title="titleComputers(info.checkFrom, info.orderSn)"
       @close="close"
       @submit="submitForm"
       :confirmName="info.orderSn ? '确定' : '确定支付'"
@@ -19,7 +19,9 @@
         </p>
         <div class="bgc_pink">
           <p>
-            待付账款:<span class="color_red">¥{{ form.divideCompanyMoney }}</span>
+            待付账款:<span class="color_red"
+              >¥{{ form.divideCompanyMoney }}</span
+            >
           </p>
         </div>
         <el-form
@@ -174,6 +176,28 @@ export default {
   mounted() {},
 
   methods: {
+    titleComputers(checkFrom, orderSn) {
+      var a = "";
+      switch (checkFrom) {
+        case 2:
+          a = "机构分成";
+          break;
+        case 3:
+          a = "业务员提成";
+          break;
+        case 4:
+          a = "佣金结算";
+          break;
+        default:
+          break;
+      }
+      if (orderSn) {
+        a += "审核";
+      } else {
+        a += "支付";
+      }
+      return a;
+    },
     fastInput(item) {
       this.formPay = {
         toBankAcount: item.proceedsAccount,

+ 37 - 19
src/views/financed/components/dislogOrderDetails.vue

@@ -59,7 +59,12 @@
               </el-image>
               <div v-if="desc.type === 'pretax'">
                 <span style="margin-right: 20px"
-                  >税前佣金:{{ detailInfo["pretaxBrokerage"] }}</span
+                  >税前佣金:{{
+                    detailInfo["pretaxBrokerage"] ||
+                    detailInfo["pretaxBrokerage"] == 0
+                      ? detailInfo["pretaxBrokerage"].toFixed(2)
+                      : detailInfo["pretaxBrokerage"]
+                  }}</span
                 ><span>税占比:{{ detailInfo["pretaxStr"] }}</span>
               </div>
               <div v-if="desc.type === 'time'">
@@ -72,19 +77,32 @@
                   </span>
                 </template>
               </div>
+              <div v-if="desc.type === 'money'">
+                {{
+                  detailInfo[desc.key] || detailInfo[desc.key] === 0
+                    ? detailInfo[desc.key].toFixed(2)
+                    : detailInfo[desc.key]
+                }}
+                <span
+                  v-if="desc.key === 'orderProfit'"
+                  :style="{
+                    color: detailInfo[desc.key] > 0 ? '#409eff' : '#f56c6c',
+                  }"
+                  >【{{ detailInfo[desc.key] > 0 ? "盈" : "亏" }}】</span
+                >
+                <span
+                  v-if="desc.key === 'orderUncollected'"
+                  :style="{
+                    color: detailInfo[desc.key] > 0 ? '#f56c6c' : '#409eff',
+                  }"
+                  >({{
+                    detailInfo[desc.key] > 0 ? "未结清" : "已结清"
+                  }})</span
+                >
+              </div>
             </div>
             <div v-else>
               {{ detailInfo[desc.key] }}
-              <span
-                v-if="desc.key === '888'"
-                :style="{ color: true ? '#409eff' : '#f56c6c' }"
-                >【{{ true ? "盈" : "亏" }}】</span
-              >
-              <span
-                v-if="desc.key === '999'"
-                :style="{ color: false ? '#409eff' : '#f56c6c' }"
-                >({{ true ? "已结清" : "未结清" }})</span
-              >
             </div>
           </el-descriptions-item>
         </el-descriptions>
@@ -129,14 +147,14 @@ export default {
         { label: "业务分类", key: "schemeName" },
         { label: "订单来源", key: "orderOrg" },
         { label: "申请时间", key: "buyTime", type: "time" },
-        { label: "盈亏(元)", key: "orderProfit" },
-        { label: "成本(元)", key: "orderCost" },
-        { label: "合同金额(元)", key: "orderPrice" },
-        { label: "已收账款(元)", key: "orderReceived" },
-        { label: "申请退款", key: "orderRefund" },
-        { label: "已退账款(元)", key: "orderRefunded" },
-        { label: "未收账款(元)", key: "orderUncollected" },
-        { label: "实际账款(元)", key: "orderPractical" },
+        { label: "盈亏(元)", key: "orderProfit", type: "money" },
+        { label: "成本(元)", key: "orderCost", type: "money" },
+        { label: "合同金额(元)", key: "orderPrice", type: "money" },
+        { label: "已收账款(元)", key: "orderReceived", type: "money" },
+        { label: "申请退款", key: "orderRefund", type: "money" },
+        { label: "已退账款(元)", key: "orderRefunded", type: "money" },
+        { label: "未收账款(元)", key: "orderUncollected", type: "money" },
+        { label: "实际账款(元)", key: "orderPractical", type: "money" },
         { label: "下单企业", key: "tenantName" },
         { label: "转账开户名", key: "openingName" },
         { label: "转账凭证", key: "attachmentList", type: "image" },

+ 2 - 0
src/views/financed/components/studentDetails.vue

@@ -193,11 +193,13 @@ export default {
         {
           label: "原价(元)",
           prop: "goodsPrice",
+          scope:"toFixedYuan",
           hidden: true,
         },
         {
           label: "单价(元)",
           prop: "goodsRealPrice",
+          scope:"toFixedYuan",
           hidden: true,
         },
         {

+ 58 - 11
src/views/financed/orderManageList/index.vue

@@ -31,10 +31,23 @@
             {{ item.label }}:
             <span
               v-if="item.label === '盈亏' && statisticsData[item.prop] !== 0"
-              >【{{ statisticsData[item.prop] > 0 ? "盈" : "亏" }}】</span
+              ><span
+                :style="
+                  statisticsData[item.prop] > 0
+                    ? 'color:rgb(99,93,247)'
+                    : 'color:red'
+                "
+                >【{{ statisticsData[item.prop] > 0 ? "盈" : "亏" }}】</span
+              ></span
             >
           </h4>
-          <p>{{ statisticsData[item.prop] }}{{ item.ch }}</p>
+          <p>
+            {{
+              item.ch === "元"
+                ? formatPrice(statisticsData[item.prop])
+                : statisticsData[item.prop]
+            }}{{ item.ch }}
+          </p>
         </div>
       </div>
     </div>
@@ -57,23 +70,31 @@
         <div>订单号:{{ props.scope.row["orderSn"] }}</div>
       </template>
       <template slot="orderPrice" slot-scope="props">
-        <div>合同金额:{{ props.scope.row["orderPrice"] }}</div>
-        <div>已收账款:{{ props.scope.row["orderReceived"] }}</div>
-        <div>申请退款:{{ props.scope.row["orderRefund"] }}</div>
-        <div>已退账款:{{ props.scope.row["orderRefunded"] }}</div>
-        <div>未收账款:{{ props.scope.row["orderUncollected"] }}</div>
+        <div>合同金额:{{ props.scope.row["orderPrice"].toFixed(2) }}</div>
+        <div>已收账款:{{ props.scope.row["orderReceived"].toFixed(2) }}</div>
+        <div>申请退款:{{ props.scope.row["orderRefund"].toFixed(2) }}</div>
+        <div>已退账款:{{ props.scope.row["orderRefunded"].toFixed(2) }}</div>
+        <div>未收账款:{{ props.scope.row["orderUncollected"].toFixed(2) }}</div>
         <div style="color: red">
           (预计收款时间){{
             $methodsTools.onlyForma(props.scope.row["predictReceiveTime"])
           }}
         </div>
-        <div>实际账款:{{ props.scope.row["orderPractical"] }}</div>
+        <div>实际账款:{{ props.scope.row["orderPractical"].toFixed(2) }}</div>
       </template>
       <template slot="inon" slot-scope="props">
-        <div>成本(元):{{ props.scope.row["orderCost"] }}</div>
-        <div>盈亏(元):{{ props.scope.row["orderProfit"] }}</div>
+        <div>成本(元):{{ props.scope.row["orderCost"].toFixed(2) }}</div>
+        <div>盈亏(元):{{ props.scope.row["orderProfit"].toFixed(2) }}</div>
         <div v-if="props.scope.row['orderProfit']">
-          【{{ props.scope.row["orderProfit"] > 0 ? "盈" : "亏" }}】
+          <span
+            :style="
+              props.scope.row['orderProfit'] > 0
+                ? 'color:rgb(99,93,247)'
+                : 'color:red'
+            "
+          >
+            【{{ props.scope.row["orderProfit"] > 0 ? "盈" : "亏" }}】</span
+          >
         </div>
       </template>
       <template slot="statusRoles" slot-scope="props">
@@ -354,6 +375,15 @@ export default {
             { label: "未开票", value: 0 },
           ],
         },
+        {
+          prop: "finishStatus",
+          placeholder: "完单状态",
+          scope: "select",
+          options: [
+            { label: "已完单", value: 1 },
+            { label: "未完单", value: 0 },
+          ],
+        },
         {
           placeholder: "时间",
           prop1: "startTime",
@@ -384,6 +414,7 @@ export default {
           hidden: true,
           scope: "solt",
           soltName: "orderInfo",
+          width: "300px",
         },
         {
           label: "订单金额(元)",
@@ -399,6 +430,16 @@ export default {
           scope: "solt",
           soltName: "inon",
         },
+        {
+          label: "完单状态",
+          prop: "finishStatus",
+          scope: "isOptions",
+          hidden: true,
+          options: [
+            { label: "已完单", value: 1 },
+            { label: "未完单", value: 0 },
+          ],
+        },
         {
           label: "审核状态",
           prop: "checkStatus",
@@ -502,6 +543,12 @@ export default {
     this.getStatistics();
   },
   methods: {
+    formatPrice(price) {
+      return price?.toLocaleString(
+        "zh-CN",
+        (undefined, { minimumFractionDigits: 2, maximumFractionDigits: 4 })
+      );
+    },
     //退款状态
     refundStatus(i) {
       var str = "";

+ 510 - 0
src/views/financed/stationLetter/index.vue

@@ -0,0 +1,510 @@
+<template>
+  <div id="stationLetter">
+    <div style="margin-bottom: 10px">
+      <p>
+        共{{ total }}封,其中<span style="color: red">{{ dontRead }}</span>
+        个消息未读
+      </p>
+      <div>
+        <el-button size="mini" type="primary" plain @click="haveRead"
+          >标记为已读</el-button
+        ><el-button
+          v-if="false"
+          size="mini"
+          type="primary"
+          plain
+          @click="notHaveRead"
+          >标记为未读</el-button
+        ><span style="font-size: 14px; margin-left: 10px">状态:</span
+        ><el-select
+          size="mini"
+          v-model="formData.receiptStatus"
+          placeholder="请选择状态"
+          @change="changeStatus"
+        >
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </div>
+    </div>
+    <el-table
+      :data="tableData"
+      style="width: 100%"
+      border
+      row-key="id"
+      ref="tableData"
+    >
+      <el-table-column
+        type="selection"
+        width="55"
+        align="center"
+        reserve-selection
+        :selectable="canSelect"
+      >
+      </el-table-column>
+
+      <template v-for="(item, index) in tableSet">
+        <el-table-column
+          :width="item.width"
+          :key="index"
+          :label="item.label"
+          align="center"
+          :sortable="item.prop === 'sort'"
+          :show-overflow-tooltip="true"
+          header-align="center"
+          :prop="item.prop"
+          sort-by="sort"
+        >
+          <template slot-scope="scope">
+            <i
+              v-if="item.scope === 'icon'"
+              :style="
+                scope.row[item.prop] === 0
+                  ? 'color:#409EFF;'
+                  : scope.row[item.prop] === 1
+                  ? 'color:#eee;'
+                  : ''
+              "
+              style="font-size: 18px"
+              class="el-icon-s-comment"
+            ></i>
+            <span v-else-if="item.scope === 'theme'">
+              <strong style="margin-left: 10px">{{
+                scope.row[item.prop1]
+              }}</strong
+              ><span>{{ scope.row[item.prop2] }}</span>
+            </span>
+            <span v-else-if="item.scope === 'aTimeList'">{{
+              $methodsTools.onlyForma(scope.row[item.prop])
+            }}</span>
+            <span v-else>{{ scope.row[item.prop] }}</span></template
+          ></el-table-column
+        ></template
+      ><el-table-column label="操作" align="center" fixed="right" width="180px">
+        <template slot-scope="scope">
+          <el-button size="mini" @click="newSee(scope.row)" type="text"
+            >立即查看</el-button
+          ><el-button
+            size="mini"
+            :disabled="scope.row.receiptStatus === 1"
+            @click="haveReadID(scope.row.id)"
+            type="text"
+            >标记为已读</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      :visible.sync="dialogCG"
+      width="760px"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">查看消息</div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Close@2x.png"
+            alt=""
+            @click="dialogCG = false"
+          />
+        </div>
+      </div>
+      <h3 style="color: #333; font-weight: bold">{{ newData.remind }}</h3>
+      <p>{{ newData.text }}</p>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogCG = false">关闭</el-button>
+        <el-button
+          v-if="false"
+          type="primary"
+          @click="
+            submitChecks(
+              newData.type === 2 || newData.type === 3
+                ? 2
+                : newData.type === 4
+                ? 3
+                : 1
+            )
+          "
+          >{{
+            newData.type === 2 || newData.type === 3
+              ? "查看订单"
+              : newData.type === 4
+              ? "查看活动"
+              : "查看学员"
+          }}</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  name: "StationLetter",
+  components: { pagination },
+  data() {
+    return {
+      newData: { remind: "" }, //当前数据
+      options: [
+        {
+          label: "全部",
+          value: "",
+        },
+        {
+          label: "已读",
+          value: 1,
+        },
+        {
+          label: "未读",
+          value: 0,
+        },
+      ],
+      total: 0,
+      dontRead: 0, //未读
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+        receiptStatus: "",
+        systemStatus: 1,
+      },
+      tableSet: [
+        {
+          label: "状态",
+          prop: "receiptStatus",
+          scope: "icon",
+          width: "80px",
+        },
+        {
+          label: "主题",
+          prop1: "remind",
+          prop2: "text",
+          scope: "theme",
+        },
+        {
+          label: "发送时间",
+          prop: "sendTime",
+          scope: "aTimeList",
+          width: "220px",
+        },
+      ],
+      tableData: [],
+      loading: false,
+      dialogCG: false,
+    };
+  },
+  mounted() {
+    this.search();
+    if (this.$route.params.id) {
+      this.$api.informsys_user(this.$route.params.id).then((res) => {
+        if (res.data) {
+          this.newSee(res.data);
+        }
+      });
+    }
+  },
+  methods: {
+    /**
+     * 查看消息
+     */
+    newSee(data) {
+      this.newData = JSON.parse(JSON.stringify(data));
+      this.dialogCG = true;
+      if (data.receiptStatus !== 1) {
+        this.haveReadID(data.id, false);
+      }
+    },
+    /**
+     * 单个标记已读
+     */
+    haveReadID(id, status = true) {
+      this.$api
+        .editupdateReadStatusBatch({ ids: [id], receiptStatus: 1 })
+        .then((res) => {
+          if (status) {
+            this.$message.success("已读成功");
+            this.$refs.tableData.clearSelection();
+          }
+          this.search();
+        });
+    },
+    /**
+     * 切换消息状态
+     */
+    changeStatus(val) {
+      this.formData.pageSize = 10;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    search() {
+      this.loading = true;
+      this.$api
+        .inquireinformsys_userlist(this.formData)
+        .then((res) => {
+          this.total = res.total;
+          this.tableData = res.rows;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+      this.$api
+        .inquireinformsys_userinformUnReadSum({ systemStatus: 1 })
+        .then((res) => {
+          this.dontRead = res.data;
+        });
+    },
+    /**
+     * 查看学员
+     */
+    submitChecks(int) {
+      this.dialogCG = false;
+      if (int === 3) {
+        const jump = () => {
+          //分销活动列表
+          this.$router.push({
+            name: "ActivityList",
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "ActivityList";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "ActivityList",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 2) {
+        const jump = () => {
+          //退款订单列表
+          this.$router.push({
+            name: "PendingRefundOrder",
+            params: {
+              orderSn: this.newData.orderSn,
+              type:
+                this.newData.type === 3
+                  ? "1,2"
+                  : this.newData.type === 2
+                  ? "0"
+                  : "",
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "PendingRefundOrder";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "PendingRefundOrder",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 1) {
+        const jump = () => {
+          //学员详情
+          this.$router.push({
+            name: "StudentXQ",
+            query: {
+              id: this.newData.studentUserId,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "StudentXQ";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "StudentXQ",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+    },
+    /**
+     * 已读
+     */
+    haveRead() {
+      const idList = this.$refs.tableData.selection.map((item) => {
+        return item.id;
+      });
+      if (idList.length == 0) {
+        this.$message.warning("请选择需要标记已读的数据");
+        return;
+      }
+      this.$api
+        .editupdateReadStatusBatch({ ids: idList, receiptStatus: 1 })
+        .then((res) => {
+          this.$message.success("已读成功");
+          this.$refs.tableData.clearSelection();
+          this.search();
+        });
+      console.log(idList);
+    },
+    notHaveRead() {
+      const idList = this.$refs.tableData.selection.map((item) => {
+        return item.id;
+      });
+      if (idList.length == 0) {
+        this.$message.warning("请选择需要标记已读的数据");
+        return;
+      }
+      this.$api
+        .editupdateReadStatusBatch({ ids: idList, receiptStatus: 0 })
+        .then((res) => {
+          this.$message.success("未读成功");
+          this.$refs.tableData.clearSelection();
+          this.search();
+        });
+      console.log(idList);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+    canSelect(row, index) {
+      if (row.receiptStatus === 0) {
+        return true;
+      } else {
+        return false;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__body {
+    max-height: 500px;
+    overflow: auto;
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+</style>

+ 147 - 42
src/views/integralManagement/giftGoods/dislog.vue

@@ -13,56 +13,86 @@
         ref="formData"
         label-width="100px"
         class="demo-ruleForm"
-      >
-        <el-form-item label="合作商户:" prop="a">
-          <el-input
-            clearable
-            v-model="formData.a"
-            placeholder="输入合作商户"
-          ></el-input> </el-form-item
-        ><el-form-item label="关联使用:" prop="b">
+        ><el-form-item label="关联使用:" prop="useType">
           <el-select
             multiple
             clearable
-            v-model="formData.b"
+            v-model="formData.useType"
             placeholder="请选择关联使用"
           >
             <el-option label="积分商城" :value="1"> </el-option
             ><el-option label="会员卡" :value="2"> </el-option>
-          </el-select> </el-form-item
-        ><el-form-item label="商品分类:" prop="">
+          </el-select>
+        </el-form-item>
+        <el-form-item label="合作商户:" prop="merId">
           <el-select
+            @change="changeMerId"
             clearable
-            v-model="formData.classification"
-            placeholder="请选择商品分类"
+            v-model="formData.merId"
+            placeholder="请选择合作商户"
           >
             <el-option
-              v-for="(item, index) in classificationList"
+              v-for="(item, index) in merList"
               :key="index"
-              :label="item.label"
-              :value="item.value"
+              :label="item.merName"
+              :value="item.merId"
+            >
+            </el-option></el-select></el-form-item
+        ><el-form-item label="商户店铺:" prop="storeId" v-if="formData.merId">
+          <el-select
+            @change="changeStoreId"
+            clearable
+            v-model="formData.storeId"
+            placeholder="请选择商户店铺"
+          >
+            <el-option
+              v-for="(item, index) in computerStore(storeList)"
+              :key="index"
+              :label="item.storeName"
+              :value="item.storeId"
             >
             </el-option>
           </el-select> </el-form-item
-        ><el-form-item label="商品名称:" prop="c">
+        ><el-form-item
+          label="商品分类:"
+          prop="categoryIds"
+          v-if="formData.storeId"
+        >
+          <el-cascader
+            clearable
+            placeholder="请选择商品分类"
+            v-model="formData.categoryIds"
+            :options="computerTree(categorytreeList)"
+            :show-all-levels="false"
+            :props="{
+              label: 'categoryName',
+              value: 'categoryId',
+              checkStrictly: true,
+              emitPath: false,
+            }"
+          ></el-cascader> </el-form-item
+        ><el-form-item label="商品名称:" prop="goodsName">
           <el-input
             clearable
-            v-model="formData.c"
+            v-model="formData.goodsName"
             placeholder="输入商品名称"
           ></el-input> </el-form-item
-        ><el-form-item label="商品主图:" prop="urls">
+        ><el-form-item label="商品主图:" prop="mainImg">
           <ul class="imgList">
             <li
               class="imgLi"
-              v-for="(item, index) in formData.urls"
+              v-for="(item, index) in formData.mainImg"
               :key="index"
             >
-              <i class="el-icon-error del" @click="formData.urls.splice(index,1)"></i>
+              <i
+                class="el-icon-error del"
+                @click="formData.mainImg.splice(index, 1)"
+              ></i>
               <el-image
                 style="width: 90px; height: 90px"
                 :src="$methodsTools.splitImgHost(item)"
                 :preview-src-list="
-                  formData.urls.map((i) => $methodsTools.splitImgHost(i))
+                  formData.mainImg.map((i) => $methodsTools.splitImgHost(i))
                 "
                 :initial-index="index"
               >
@@ -79,33 +109,59 @@
           <p style="color: #a4a4a4; margin: 0">
             建议尺寸:800*800像素;大小200K以下
           </p></el-form-item
-        ><el-form-item label="兑换积分:" prop="e">
-          <el-input-number
-            :controls="false"
-            v-model="formData.e"
-            placeholder="输入兑换积分"
-            :min="0"
-            :precision="0" /></el-form-item
-        ><el-form-item label="商品原价:" prop="f">
+        ><el-form-item label="商品原价:" prop="standPrice">
           <el-input-number
             :controls="false"
-            v-model="formData.f"
+            v-model="formData.standPrice"
             placeholder="输入商品原价"
             :min="0"
             :precision="2"
           /> </el-form-item
-        ><el-form-item label="会员优惠价:" prop="g">
+        ><el-form-item label="会员优惠价:" prop="specialPrice">
           <el-input-number
             :controls="false"
-            v-model="formData.g"
+            v-model="formData.specialPrice"
             placeholder="输入会员优惠价"
             :min="0"
             :precision="2"
-          />
+          /> </el-form-item
+        ><el-form-item label="可抵扣积分:" prop="e">
+          <el-input-number
+            :controls="false"
+            v-model="formData.e"
+            placeholder="输入可抵扣积分"
+            :min="0"
+            :precision="0" /></el-form-item
+        ><el-form-item label="状态:" prop="status">
+          <el-radio-group v-model="formData.status">
+            <el-radio :label="1">启用</el-radio
+            ><el-radio :label="0">禁用</el-radio>
+          </el-radio-group>
         </el-form-item>
         <el-form-item label="商品详情:">
+          <div style="margin-bottom: 14px">
+            <el-button
+              size="small"
+              @click="mobileDetailStatus = 1"
+              :type="mobileDetailStatus === 1 ? 'primary' : ''"
+              >手机端</el-button
+            >
+            <el-button
+              size="small"
+              @click="mobileDetailStatus = 2"
+              :type="mobileDetailStatus === 2 ? 'primary' : ''"
+              >电脑端</el-button
+            >
+          </div>
           <editor
-            v-model="formData.html"
+            v-show="mobileDetailStatus === 1"
+            v-model="formData.mobileDetailHtml"
+            :min-height="300"
+            :max-height="500"
+            :uploadStatus="2"
+          /><editor
+            v-show="mobileDetailStatus === 2"
+            v-model="formData.pcDetailHtml"
             :min-height="300"
             :max-height="500"
             :uploadStatus="2"
@@ -117,6 +173,7 @@
 </template>
 
 <script>
+import { mapGetters } from "vuex";
 import Editor from "@/components/Editor";
 export default {
   components: { Editor },
@@ -135,7 +192,7 @@ export default {
   },
   data() {
     return {
-      classificationList: [
+      categoryIdsList: [
         {
           label: "技术类",
           value: 1,
@@ -146,20 +203,40 @@ export default {
         },
       ],
       formData: {
+        useType: [],
+        merId: "",
+        storeId: "",
+        categoryIds: "",
         accountList: [{}],
         invoiceBo: {},
+        storeId: null,
+        status: 1,
       },
+      mobileDetailStatus: 1,
       rules: {
-        tenantName: [
-          { required: true, message: "请输入机构名称", trigger: "blur" },
+        useType: [
+          { required: true, message: "请选择关联使用", trigger: "change" },
         ],
-        billType: [
-          { required: true, message: "请选择账期类型", trigger: "change" },
+        merId: [
+          { required: true, message: "请选择合作商户", trigger: "change" },
         ],
+        storeId: [
+          { required: true, message: "请选择商户店铺", trigger: "change" },
+        ],
+        categoryIds: [
+          { required: true, message: "请选择商品分类", trigger: "change" },
+        ],
+        status: [{ required: true, message: "请选择状态", trigger: "change" }],
       },
     };
   },
   methods: {
+    changeMerId(e) {
+      this.$set(this.formData, "storeId", null);
+    },
+    changeStoreId(e) {
+      this.$set(this.formData, "categoryIds", null);
+    },
     uploadImg(e) {
       var self = this;
       var file = e.target.files[0];
@@ -182,7 +259,16 @@ export default {
         });
     },
     init() {
-      this.formData = JSON.parse(JSON.stringify(this.activeData));
+      this.formData = {
+        useType:[],
+        merId: "",
+        storeId: "",
+        categoryIds: "",
+        accountList: [{}],
+        invoiceBo: {},
+        storeId: null,
+        status: 1,
+      };
     },
     close() {
       this.$refs["formData"].resetFields();
@@ -200,6 +286,25 @@ export default {
     },
   },
   computed: {
+    ...mapGetters(["merList", "storeList", "categorytreeList"]),
+    computerStore: function () {
+      return function (rows) {
+        var array = [];
+        if (rows?.length > 0) {
+          array = rows.filter((i) => i.merId == this.formData.merId) || [];
+        }
+        return array;
+      };
+    },
+    computerTree: function () {
+      return function (rows) {
+        var array = [];
+        if (rows?.length > 0) {
+          array = rows.filter((i) => i.storeId === this.formData.storeId);
+        }
+        return array;
+      };
+    },
     isShow: {
       get() {
         if (this.dialogVisible) {
@@ -264,7 +369,7 @@ export default {
   width: 220px;
   margin-right: 10px;
 }
-.del{
+.del {
   color: red;
   position: absolute;
   top: 0;

+ 214 - 0
src/views/integralManagement/goodsClassification/dislog.vue

@@ -0,0 +1,214 @@
+<template>
+  <div>
+    <BaseDialog
+      width="580px"
+      :isShow.sync="isShow"
+      :title="formData.categoryId ? '编辑分类' : '添加分类'"
+      @submit="submitForm"
+      @close="close"
+    >
+      <el-form
+        :model="formData"
+        :rules="rules"
+        ref="formData"
+        label-width="100px"
+        class="demo-ruleForm"
+      >
+        <el-form-item label="合作商户:" prop="merId">
+          <el-select
+            :disabled="doneEdit"
+            @change="changeMerId"
+            clearable
+            v-model="formData.merId"
+            placeholder="请选择合作商户"
+          >
+            <el-option
+              v-for="(item, index) in merList"
+              :key="index"
+              :label="item.merName"
+              :value="item.merId"
+            >
+            </el-option></el-select></el-form-item
+        ><el-form-item label="商户店铺:" prop="storeId" v-if="formData.merId">
+          <el-select
+            :disabled="doneEdit"
+            @change="changeStoreId"
+            clearable
+            v-model="formData.storeId"
+            placeholder="请选择商户店铺"
+          >
+            <el-option
+              v-for="(item, index) in computerStore(storeList)"
+              :key="index"
+              :label="item.storeName"
+              :value="item.storeId"
+            >
+            </el-option>
+          </el-select> </el-form-item
+        ><el-form-item
+          label="上级分类:"
+          prop="parentId"
+          v-if="formData.storeId"
+        >
+          <el-cascader
+            :disabled="doneEdit"
+            clearable
+            placeholder="请选择上级分类"
+            v-model="formData.parentId"
+            :options="computerTree(categorytreeList)"
+            :show-all-levels="false"
+            :props="{
+              label: 'categoryName',
+              value: 'categoryId',
+              checkStrictly: true,
+              emitPath: false,
+            }"
+          ></el-cascader> </el-form-item
+        ><el-form-item label="商品分类:" prop="categoryName">
+          <el-input
+            placeholder="请输入商品分类"
+            v-model="formData.categoryName"
+          /> </el-form-item
+        ><el-form-item label="状态:" prop="status">
+          <el-radio-group v-model="formData.status">
+            <el-radio :label="1">启用</el-radio
+            ><el-radio :label="0">禁用</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+    </BaseDialog>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+export default {
+  name: "",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    treeData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      doneEdit: false,
+      formData: {
+        merId: "",
+        storeId: "",
+        parentId: "",
+        categoryName: "",
+        status: 1,
+      },
+      rules: {
+        merId: [
+          { required: true, message: "请选择合作商户", trigger: "change" },
+        ],
+        storeId: [
+          { required: true, message: "请选择商户店铺", trigger: "change" },
+        ],
+        parentId: [
+          { required: true, message: "请选择上级分类", trigger: "change" },
+        ],
+        categoryName: [
+          { required: true, message: "请输入商品分类", trigger: "blur" },
+        ],
+        status: [{ required: true, message: "请选择状态", trigger: "change" }],
+      },
+    };
+  },
+  methods: {
+    changeMerId(e) {
+      this.$set(this.formData, "storeId", null);
+    },
+    changeStoreId(e) {
+      this.$set(this.formData, "parentId", null);
+    },
+    init() {
+      this.formData = JSON.parse(JSON.stringify(this.treeData));
+      if (this.formData.createTime) {
+        this.doneEdit = true;
+      } else {
+        this.doneEdit = false;
+      }
+    },
+    close() {
+      this.$refs["formData"].resetFields();
+    },
+    submitForm() {
+      this.$refs["formData"].validate((valid) => {
+        if (valid) {
+          this.$api[
+            this.formData.categoryId
+              ? "editmallgoodscategorysave"
+              : "addmallgoodscategorysave"
+          ](this.formData).then((res) => {
+            this.$message.success("成功");
+            this.$store.commit("CATEGORYTREELIST");
+            this.isShow = false;
+            this.$emit("search");
+          });
+        } else {
+          return false;
+        }
+      });
+    },
+  },
+  computed: {
+    ...mapGetters(["merList", "storeList", "categorytreeList"]),
+    computerStore: function () {
+      return function (rows) {
+        var array = [];
+        if (rows?.length > 0) {
+          array = rows.filter((i) => i.merId == this.formData.merId) || [];
+        }
+        return array;
+      };
+    },
+    computerTree: function () {
+      return function (rows) {
+        var array = [
+          {
+            categoryId: 0,
+            categoryName: "---无---",
+          },
+        ];
+        if (rows?.length > 0) {
+          array.push(
+            ...rows.filter((i) => i.storeId === this.formData.storeId)
+          );
+        }
+        return array;
+      };
+    },
+    isShow: {
+      get() {
+        if (this.dialogVisible) {
+          this.init();
+        }
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.el-input {
+  width: 220px;
+  margin-right: 10px;
+}
+.el-select {
+  width: 220px;
+  margin-right: 10px;
+}
+</style>

+ 240 - 0
src/views/integralManagement/goodsClassification/index.vue

@@ -0,0 +1,240 @@
+<template>
+  <div id="">
+    <search-box-new
+      ref="searchBox"
+      :formData="formData"
+      :formList="formList"
+      @search="search"
+      @init="init"
+    />
+    <table-list
+      rowKey="categoryId"
+      ref="tableList"
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      :loading="loading"
+      @addClick="addClick"
+    >
+      <template slot="customize">
+        <el-button type="warning" @click="remove"> 批量删除 </el-button>
+      </template>
+      <template slot="status" slot-scope="props">
+        <el-switch
+          v-model="props.scope.row.status"
+          active-color="#13ce66"
+          inactive-color="#ff4949"
+          :active-value="1"
+          :inactive-value="0"
+          @change="statusChange($event, props.scope.row)"
+        >
+        </el-switch>
+      </template>
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="addClick(props.scope.row, 1)"
+          >编辑</el-button
+        ><el-button type="text" @click="addClick(props.scope.row, 2)"
+          >添加</el-button
+        ><el-button type="text" @click="del(props.scope.row)">删除</el-button>
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize.sync="formData.pageSize"
+      :currentPage.sync="formData.pageNum"
+      @search="search"
+    />
+    <dislog
+      :dialogVisible.sync="dialogVisible"
+      @search="search"
+      :treeData="treeData"
+    ></dislog>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+import dislog from "./dislog.vue";
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  name: "GoodsClassification",
+  components: { searchBoxNew, tableList, pagination, dislog },
+  data() {
+    return {
+      loading: false,
+      navText: {
+        title: "商品分类",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: true,
+        addHide: false,
+        custom: false,
+        openCheckMore: true,
+      },
+      formList: [
+        {
+          prop: "merId",
+          placeholder: "请选择合作商户",
+          scope: "merList",
+        },
+        {
+          prop: "storeId",
+          placeholder: "请选择商户店铺",
+          scope: "storeList",
+        },
+        {
+          prop: "storeName",
+          placeholder: "输入分类名称",
+        },
+      ],
+      formData: {},
+      tableSet: [
+        {
+          label: "分类名称",
+          prop: "categoryName",
+          hidden: true,
+        },
+        {
+          label: "合作商户",
+          prop: "merName",
+          hidden: true,
+        },
+        {
+          label: "商户店铺",
+          prop: "storeName",
+          hidden: true,
+        },
+        {
+          label: "启用状态",
+          prop: "status",
+          hidden: true,
+          scope: "solt",
+          soltName: "status",
+        },
+        {
+          label: "创建时间",
+          prop: "createTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+      ],
+      tableData: [],
+      total: 0,
+      dialogVisible: false,
+      treeData: {},
+    };
+  },
+  created() {
+    this.search(2);
+  },
+  methods: {
+    remove() {
+      if (this.$refs.tableList.allCheckData.length === 0) {
+        this.$message.error("请勾选数据");
+        return;
+      }
+      this.$confirm("确定批量删除选中的数据吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api
+            .mallgoodscategorybatchdel(
+              this.$refs.tableList.allCheckData.map((i) => i.categoryId)
+            )
+            .then(() => {
+              this.$message.success("批量删除成功");
+              this.$store.commit("CATEGORYTREELIST");
+              this.search(3);
+            });
+        })
+        .catch(() => {});
+    },
+    addClick(data, status) {
+      if (data) {
+        var datas = JSON.parse(JSON.stringify(data));
+        if (status === 2) {
+          datas.parentId = datas.categoryId;
+          datas.categoryId = null;
+          datas.categoryName = null;
+          datas.status = 1;
+        }
+        this.treeData = datas;
+      } else {
+        this.treeData = {
+          merId: "",
+          storeId: "",
+          parentId: "",
+          categoryName: "",
+          status: 1,
+        };
+      }
+      this.dialogVisible = true;
+    },
+    search(v) {
+      this.loading = true;
+      if (v === 2) {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+          status: "0,1",
+        };
+        this.$nextTick(() => {
+          this.$refs.tableList.clearMoreActive();
+        });
+      }
+      if (v === 3) {
+        this.$nextTick(() => {
+          this.$refs.tableList.clearMoreActive();
+        });
+      }
+      this.$api
+        .mallgoodscategorylist(this.formData)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    statusChange(e, row) {
+      this.$api
+        .editmallgoodscategorysave({ categoryId: row.categoryId, status: e })
+        .then((res) => {
+          this.$message.success("操作成功");
+          this.$store.commit("CATEGORYTREELIST");
+          row.status = e;
+        })
+        .catch(() => {
+          return (row.status = e ? 0 : 1);
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    del(v) {
+      this.$confirm("确定删除此内容?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api.mallgoodscategorybatchdel([v.categoryId]).then((res) => {
+            this.$message.success("删除成功");
+            this.$store.commit("CATEGORYTREELIST");
+            this.search(3);
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 13 - 9
src/views/integralManagement/merchantManageMent/dislog.vue

@@ -49,12 +49,14 @@
             clearable
             v-model="formData.initPwd"
             placeholder="请输入密码"
-          ></el-input>
+          ></el-input> </el-form-item
+        ><el-form-item label="状态:" prop="status">
+          <el-radio-group v-model="formData.status">
+            <el-radio :label="1">启用</el-radio
+            ><el-radio :label="0">禁用</el-radio>
+          </el-radio-group>
         </el-form-item>
       </el-form>
-      <template slot="slotBtn">
-        <el-button type="success" @click="submitForm(true)">启用</el-button>
-      </template>
     </BaseDialog>
   </div>
 </template>
@@ -97,6 +99,7 @@ export default {
         telphone: "",
         merAccount: "",
         initPwd: "",
+        status: 1,
       },
       rules: {
         merName: [
@@ -110,6 +113,7 @@ export default {
         ],
         initPwd: [{ required: false, message: "请输入密码", trigger: "blur" }],
         telphone: [{ required: true, validator: checkTel, trigger: "blur" }],
+        status: [{ required: true, message: "请选择状态", trigger: "change" }],
       },
     };
   },
@@ -128,19 +132,19 @@ export default {
           telphone: "",
           merAccount: "manager",
           initPwd: "",
+          status: 1,
         };
       }
     },
     close() {
       this.$refs["formData"].resetFields();
     },
-    submitForm(status) {
+    submitForm() {
       this.$refs["formData"].validate((valid) => {
         if (valid) {
-          this.$api[this.merId ? "editmallmerchant" : "addmallmerchant"]({
-            status: status ? 1 : 0,
-            ...this.formData,
-          }).then((res) => {
+          this.$api[this.merId ? "editmallmerchant" : "addmallmerchant"](
+            this.formData
+          ).then((res) => {
             this.$message.success("成功");
             this.isShow = false;
             this.$store.commit("MERLIST");

+ 14 - 10
src/views/integralManagement/storeManageMent/dislog.vue

@@ -41,12 +41,14 @@
             clearable
             v-model="formData.address"
             placeholder="请输入店铺地址"
-          ></el-input>
+          ></el-input> </el-form-item
+        ><el-form-item label="状态:" prop="status">
+          <el-radio-group v-model="formData.status">
+            <el-radio :label="1">启用</el-radio
+            ><el-radio :label="0">禁用</el-radio>
+          </el-radio-group>
         </el-form-item>
       </el-form>
-      <template slot="slotBtn">
-        <el-button type="success" @click="submitForm(true)">启用</el-button>
-      </template>
     </BaseDialog>
   </div>
 </template>
@@ -71,6 +73,7 @@ export default {
         merId: "",
         storeName: "",
         address: "",
+        status: 1,
       },
       rules: {
         merId: [
@@ -82,6 +85,7 @@ export default {
         address: [
           { required: false, message: "请输入店铺地址", trigger: "blur" },
         ],
+        status: [{ required: true, message: "请选择状态", trigger: "change" }],
       },
     };
   },
@@ -97,21 +101,21 @@ export default {
           merId: "",
           storeName: "",
           address: "",
+          status: 1,
         };
       }
-      console.log(this.merList, "---merList");
     },
     close() {
       this.$refs["formData"].resetFields();
     },
-    submitForm(status) {
+    submitForm() {
       this.$refs["formData"].validate((valid) => {
         if (valid) {
-          this.$api[this.storeId ? "editmallstore" : "addmallstore"]({
-            status: status ? 1 : 0,
-            ...this.formData,
-          }).then((res) => {
+          this.$api[this.storeId ? "editmallstore" : "addmallstore"](
+            this.formData
+          ).then((res) => {
             this.$message.success("成功");
+            this.$store.commit("STORELIST");
             this.isShow = false;
             this.$emit("search");
           });

+ 3 - 0
src/views/integralManagement/storeManageMent/index.vue

@@ -141,6 +141,7 @@ export default {
             })
             .then(() => {
               this.$message.success("批量删除成功");
+              this.$store.commit("STORELIST");
               this.search(3);
             });
         })
@@ -183,6 +184,7 @@ export default {
         .editmallstore({ storeId: row.storeId, merId: row.merId, status: e })
         .then((res) => {
           this.$message.success("操作成功");
+              this.$store.commit("STORELIST");
           row.status = e;
         })
         .catch(() => {
@@ -203,6 +205,7 @@ export default {
             .editmallmerchant({ storeId: row.storeId, status: -1 })
             .then((res) => {
               this.$message.success("删除成功");
+              this.$store.commit("STORELIST");
               this.search();
             });
         })

+ 1 - 0
src/views/systemManagement/mechanism/dislog.vue

@@ -231,6 +231,7 @@ export default {
             this.activeData.tenantId ? "systemtenantedittop" : "systemtenantadd"
           ](this.formData).then((res) => {
             this.$message.success("成功");
+            this.$store.commit("TENANTLIST");
             this.isShow = false;
             this.$emit("search");
           });

+ 55 - 33
src/views/systemManagement/mechanism/index.vue

@@ -8,7 +8,7 @@
       @init="init"
     />
     <table-list
-      rowKey="id"
+      rowKey="tenantId"
       ref="tableList"
       :tableSets="tableSet"
       :tableData="tableData"
@@ -16,6 +16,9 @@
       :loading="loading"
       @addClick="addClick"
     >
+      <template slot="customize">
+        <el-button type="warning" @click="remove"> 批量删除 </el-button>
+      </template>
       <template slot="status" slot-scope="props">
         <el-popover placement="right" width="650" trigger="click">
           <el-table border :data="props.scope.row.accountList">
@@ -94,7 +97,7 @@
       <template slot="btn" slot-scope="props">
         <el-button type="text" @click="addClick(props.scope.row)"
           >修改</el-button
-        >
+        ><el-button type="text" @click="del(props.scope.row)">删除</el-button>
       </template>
     </table-list>
     <pagination
@@ -127,9 +130,10 @@ export default {
         index: 0,
         ch: "条",
         num: true,
-        choice: false,
+        choice: true,
         addHide: false,
         custom: false,
+        openCheckMore: true,
       },
       formList: [
         {
@@ -159,22 +163,6 @@ export default {
           scope: "solt",
           soltName: "accountPeriodSetting",
         },
-        {
-          label: "分成模式",
-          prop: "divideModel",
-          hidden: true,
-          scope: "isOptions",
-          options: [
-            {
-              label: "机构分成",
-              value: 1,
-            },
-            {
-              label: "业务员分成",
-              value: 2,
-            },
-          ],
-        },
         {
           label: "是否有商户号",
           prop: "commercialTenant",
@@ -248,6 +236,14 @@ export default {
           pageSize: 10,
           pageNum: 1,
         };
+        this.$nextTick(() => {
+          this.$refs.tableList.clearMoreActive();
+        });
+      }
+      if (v === 3) {
+        this.$nextTick(() => {
+          this.$refs.tableList.clearMoreActive();
+        });
       }
       this.$api
         .systemtenantlist(this.formData)
@@ -264,20 +260,46 @@ export default {
       this.search(2);
     },
     del(v) {
-      this.$alert(
-        "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
-        "提示",
-        {
-          dangerouslyUseHTMLString: true,
-        }
-      )
-        .then(() => {})
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "已取消删除",
-          });
-        });
+      this.$confirm("确定删除此内容?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api
+            .systemtenantdeletetop({ tenantIds: [v.tenantId] })
+            .then((res) => {
+              this.$message.success("删除成功");
+              this.$store.commit("TENANTLIST");
+              this.search(3);
+            });
+        })
+        .catch(() => {});
+    },
+    remove() {
+      if (this.$refs.tableList.allCheckData.length === 0) {
+        this.$message.error("请勾选数据");
+        return;
+      }
+      this.$confirm("确定批量删除选中的数据吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api
+            .systemtenantdeletetop({
+              tenantIds: this.$refs.tableList.allCheckData.map(
+                (i) => i.tenantId
+              ),
+            })
+            .then(() => {
+              this.$message.success("批量删除成功");
+              this.$store.commit("TENANTLIST");
+              this.search(3);
+            });
+        })
+        .catch(() => {});
     },
   },
 };

+ 0 - 1
src/views/systemSettings/menu/index.vue

@@ -397,7 +397,6 @@ export default {
       if (row.menuType == "F") {
         return "";
       }
-      console.log("this.statusOptions, row.status",this.statusOptions, row.status)
       return this.selectDictLabel(this.statusOptions, row.status);
     },
     // 取消按钮