lex-xin 4 年之前
父节点
当前提交
84749f1549

文件差异内容过多而无法显示
+ 0 - 0
dist/index.html


+ 5 - 1
dist/static/css/chunk-266d284c.5ce51240.css

@@ -1 +1,5 @@
-/deep/.avatar-uploader .el-upload,/deep/.upload-demo .el-upload{border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload:hover{border-color:#409eff}.avatar-uploader-icon{border:1px dashed #d9d9d9;font-size:28px;color:#8c939d;width:120px;height:120px;line-height:120px;text-align:center}.avatar{width:120px;height:120px;display:block}.ivu-upload{display:none}.shopImage{width:60px;height:60px}.shopDesc{max-height:70px;overflow:hidden}
+<<<<<<< HEAD:dist/static/css/chunk-266d284c.5ce51240.css
+/deep/.avatar-uploader .el-upload,/deep/.upload-demo .el-upload{border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload:hover{border-color:#409eff}.avatar-uploader-icon{border:1px dashed #d9d9d9;font-size:28px;color:#8c939d;width:120px;height:120px;line-height:120px;text-align:center}.avatar{width:120px;height:120px;display:block}.ivu-upload{display:none}.shopImage{width:60px;height:60px}.shopDesc{max-height:70px;overflow:hidden}
+=======
+/deep/.avatar-uploader .el-upload,/deep/.upload-demo .el-upload{border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload:hover{border-color:#409eff}.avatar-uploader-icon{border:1px dashed #d9d9d9;font-size:28px;color:#8c939d;width:120px;height:120px;line-height:120px;text-align:center}.avatar{width:120px;height:120px;display:block}.ivu-upload{display:none}.content-tooltip[data-v-754f10ff]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%;display:inline-block}.shopImage{width:60px;height:60px}.shopDesc{max-height:70px;overflow:hidden}
+>>>>>>> master:dist/static/css/chunk-956b3508.e3a6139a.css

文件差异内容过多而无法显示
+ 0 - 0
dist/static/css/chunk-4a3145a3.76eed2db.css


文件差异内容过多而无法显示
+ 0 - 0
dist/static/css/chunk-501cb04b.d349ef48.css


+ 5 - 0
dist/static/css/chunk-956b3508.e3a6139a.css

@@ -0,0 +1,5 @@
+<<<<<<< HEAD:dist/static/css/chunk-266d284c.5ce51240.css
+/deep/.avatar-uploader .el-upload,/deep/.upload-demo .el-upload{border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload:hover{border-color:#409eff}.avatar-uploader-icon{border:1px dashed #d9d9d9;font-size:28px;color:#8c939d;width:120px;height:120px;line-height:120px;text-align:center}.avatar{width:120px;height:120px;display:block}.ivu-upload{display:none}.shopImage{width:60px;height:60px}.shopDesc{max-height:70px;overflow:hidden}
+=======
+/deep/.avatar-uploader .el-upload,/deep/.upload-demo .el-upload{border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload:hover{border-color:#409eff}.avatar-uploader-icon{border:1px dashed #d9d9d9;font-size:28px;color:#8c939d;width:120px;height:120px;line-height:120px;text-align:center}.avatar{width:120px;height:120px;display:block}.ivu-upload{display:none}.content-tooltip[data-v-754f10ff]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%;display:inline-block}.shopImage{width:60px;height:60px}.shopDesc{max-height:70px;overflow:hidden}
+>>>>>>> master:dist/static/css/chunk-956b3508.e3a6139a.css

+ 5 - 0
dist/static/css/chunk-commons.0c9838f9.css

@@ -0,0 +1,5 @@
+<<<<<<< HEAD:dist/static/css/chunk-commons.9dd16d80.css
+.pagination-container[data-v-5985d484]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-5985d484]{display:none}.content-tooltip[data-v-754f10ff]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%;display:inline-block}
+=======
+.pagination-container[data-v-5985d484]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-5985d484]{display:none}
+>>>>>>> master:dist/static/css/chunk-commons.0c9838f9.css

+ 5 - 1
dist/static/css/chunk-commons.9dd16d80.css

@@ -1 +1,5 @@
-.pagination-container[data-v-5985d484]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-5985d484]{display:none}.content-tooltip[data-v-754f10ff]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%;display:inline-block}
+<<<<<<< HEAD:dist/static/css/chunk-commons.9dd16d80.css
+.pagination-container[data-v-5985d484]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-5985d484]{display:none}.content-tooltip[data-v-754f10ff]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%;display:inline-block}
+=======
+.pagination-container[data-v-5985d484]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-5985d484]{display:none}
+>>>>>>> master:dist/static/css/chunk-commons.0c9838f9.css

+ 1 - 0
dist/static/css/chunk-d09d58b6.3aaa6d98.css

@@ -0,0 +1 @@
+.content-tooltip[data-v-754f10ff]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%;display:inline-block}.dialog-footer[data-v-de543970]{width:100%;text-align:right}.reword-list[data-v-de543970]{display:-webkit-box;display:-ms-flexbox;display:flex}.reword-list .el-form-item[data-v-de543970]{-webkit-box-flex:1;-ms-flex:1;flex:1}.add-reword[data-v-de543970]{margin-bottom:22px;width:180px;border-style:dashed}

文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.3b387856.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-4a3145a3.8861ac6d.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-501cb04b.9bfa6081.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-956b3508.7b8f5e33.js


+ 1 - 0
dist/static/js/chunk-commons.be539945.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-commons"],{"333d":function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[a("el-pagination",e._b({attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},i=[],u=(a("c5f6"),a("09f4")),r={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:10},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total,sizes,prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&Object(u["a"])(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&Object(u["a"])(0,800)}}},o=r,p=(a("3dfc"),a("2877")),c=Object(p["a"])(o,n,i,!1,null,"5985d484",null);t["a"]=c.exports},"3dfc":function(e,t,a){"use strict";a("ab68")},ab68:function(e,t,a){}}]);

文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-d09d58b6.2b8b4c11.js


+ 29 - 13
src/views/businessManager/shopManager/shopList.vue

@@ -213,24 +213,32 @@
                          v-permission="'/purchaseLlist'"
                          @click="onPurchaseList(scope.row)"
                          type="text">进货清单</el-button>
-              <el-popconfirm title="你是否上架该商品?"
-                             @onConfirm="onUpdate(scope.row)"
+              <!-- <el-popconfirm title="你是否上架该商品?"
+                             @confirm="onUpdate(scope.row)"
                              v-if="scope.row.status == 0"
                              v-permission="'goods/updateGoodsStatus'">
                 <el-button slot="reference"
                            type="text">上架</el-button>
-              </el-popconfirm>
+              </el-popconfirm> -->
+              <el-button v-if="scope.row.status == 0"
+                         v-permission="'goods/updateGoodsStatus'"
+                         @click="onUpdate(scope.row, 0)"
+                         type="text">上架</el-button>
               <el-button v-if="scope.row.status == 0"
                          v-permission="scope.row.complementGoodsIdList ? 'goods/update' : '/shopOperation'"
                          @click="onShopOperation('update', scope.row)"
                          type="text">修改</el-button>
-              <el-popconfirm title="你是否下架该商品?"
-                             @onConfirm="onUpdate(scope.row)"
+              <el-button v-if="scope.row.status == 1"
+                         v-permission="'goods/updateGoodsStatus'"
+                         @click="onUpdate(scope.row, 1)"
+                         type="text">下架</el-button>
+              <!-- <el-popconfirm title="你是否下架该商品?"
+                             @confirm="onUpdate(scope.row)"
                              v-if="scope.row.status == 1"
                              v-permission="'goods/updateGoodsStatus'">
                 <el-button slot="reference"
                            type="text">下架</el-button>
-              </el-popconfirm>
+              </el-popconfirm> -->
               <!-- <el-button v-if="scope.row.status == 0"
                          v-permission="'goods/del'"
                          @click="onDelete(scope.row)"
@@ -649,13 +657,21 @@ export default {
         }
       })
     },
-    onUpdate (row) {
-      updateGoodsStatus({
-        goodsId: row.id,
-        status: row.status ? 0 : 1
-      }).then(res => {
-        this.messageTips(row.status ? '下架' : '上架', res)
-      })
+    async onUpdate (row, type) {
+      let title = type == 1 ? '你是否下架该商品?' : '你是否上架该商品?'
+      this.$confirm(title, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        await updateGoodsStatus({
+          goodsId: row.id,
+          status: row.status ? 0 : 1
+        }).then(res => {
+          this.messageTips(row.status ? '下架' : '上架', res)
+        })
+      }).catch(() => {
+      });
     },
     onPurchaseList (row) {
       let pageInfo = JSON.stringify(this.pageInfo)

+ 35 - 0
src/views/chargeManager/api.js

@@ -11,3 +11,38 @@ export function getPaymentConfigs(data) {
     })
 }
 
+// 新增按费用类型配置
+export function addTypeRoute(data) {
+  return request({
+    url: api + '/paymentConfig/addTypeRoute',
+    method: 'post',
+    headers: {
+      'content-type': 'application/x-www-form-urlencoded'
+    },
+    data: qs.stringify(data)
+  })
+}
+
+// 更新按费用类型配置
+export function updateTypeRoute(data) {
+  return request({
+    url: api + '/paymentConfig/updateTypeRoute',
+    method: 'post',
+    headers: {
+      'content-type': 'application/x-www-form-urlencoded'
+    },
+    data: qs.stringify(data)
+  })
+}
+
+// 删除按费用类型配置
+export function delTypeRoute(data) {
+  return request({
+    url: api + '/paymentConfig/delTypeRoute',
+    method: 'post',
+    headers: {
+      'content-type': 'application/x-www-form-urlencoded'
+    },
+    data: qs.stringify(data)
+  })
+}

+ 11 - 5
src/views/chargeManager/index.vue

@@ -7,11 +7,14 @@
     <div class="m-core">
       <!-- navMenu -->
       <el-tabs v-model.trim="activeIndex" type="card" @tab-click="handleClick">
-        <el-tab-pane label="比例" name="0" v-if="permissionList.scalc">
-            <one v-if="activeIndex == 0" />
+        <el-tab-pane label="分润" name="0" v-if="permissionList.share">
+            <three v-if="activeIndex == 0" />
         </el-tab-pane>
-        <el-tab-pane label="金额" name="1" v-if="permissionList.money">
-            <two v-if="activeIndex == 1" />
+        <el-tab-pane label="比例" name="1" v-if="permissionList.scalc">
+            <one v-if="activeIndex == 1" />
+        </el-tab-pane>
+        <el-tab-pane label="金额" name="2" v-if="permissionList.money">
+            <two v-if="activeIndex == 2" />
         </el-tab-pane>
       </el-tabs>
     </div>
@@ -20,11 +23,13 @@
 <script>
 import one from './one'
 import two from './two'
+import three from './three'
 import { permission} from '@/utils/directivePage'
 export default {
   components: {
     one,
-    two
+    two,
+    three
   },
   name: 'chargeManager',
   data () {
@@ -33,6 +38,7 @@ export default {
       permissionList: {
         scalc: permission('/chargeManager/scalc'),
         money: permission('/chargeManager/money'),
+        share: permission('/chargeManager/share'),
       }
     }
   },

+ 308 - 0
src/views/chargeManager/share-model.vue

@@ -0,0 +1,308 @@
+<template>
+    <div>
+        <el-form :model="form" :rules="rules" ref="ruleForm">
+            <el-form-item label="所属分部" prop="organId" :label-width="formLabelWidth">
+                <el-select v-model.trim="form.organId" :disabled="formActionTitle === 'update'" placeholder="请选择所属分部">
+                    <el-option
+                    v-for="item in branchList"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                    ></el-option>
+                </el-select>
+            </el-form-item>
+            <el-row :gutter="10" v-for="(service, index) in form.serviceList" :key="index + 1000">
+                <el-col :span="9">
+                    <el-form-item :label-width="formLabelWidth" :label="`服务收入${index + 1}`" :prop="'serviceList.' + index + '.feeType'" :rules="[{ required: true, message: '请选择收费方式', trigger: 'change' }]">
+                    <el-select
+                        v-model.trim="service.feeType"
+                        placeholder="请选择收费方式"
+                        style="width: 100% !important;"
+                        disabled
+                    >
+                        <el-option value="SERVICE" label="服务收入"></el-option>
+                        <el-option value="SELL" label="销售收入"></el-option>
+                    </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                    <el-form-item :prop="'serviceList.' + index + '.organId'" :rules="[
+                    { required: true, message: '请选择分润分部', trigger: 'change' },
+                    ]">
+                    <el-select
+                        v-model.trim="service.organId"
+                        placeholder="分润分部"
+                        clearable
+                    >
+                        <el-option
+                        v-for="(item, index) in calcBranchList"
+                        :key="index"
+                        :label="item.label"
+                        :value="item.value"
+                        :disabled="item.disabled"
+                        ></el-option>
+                    </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                    <el-form-item :prop="'serviceList.' + index + '.scale'" :rules="[
+                        { required: true, validator: validSale, trigger: 'blur, change' },
+                        { required: true, message: '比例必须为数字值', trigger: 'blur, change' }
+                    ]">
+                        <el-input
+                            type="number"
+                            min="0"
+                            max="100"
+                            placeholder="分润比例"
+                            @mousewheel.native.prevent
+                            v-model.number="service.scale"
+                        >
+                            <i slot="suffix">%</i>
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                    <el-button icon="el-icon-plus" @click="onAddDomain('SERVICE')" circle></el-button>
+                    <el-button icon="el-icon-minus" :disabled="form.serviceList.length <= 1" @click="onRemoveDomain('SERVICE', service)" circle type="danger"></el-button>
+                </el-col>
+            </el-row>
+            <el-divider></el-divider>
+            <el-row :gutter="10" v-for="(domain, index) in form.sellList" :key="index">
+                <el-col :span="9">
+                    <el-form-item :label-width="formLabelWidth" :label="`销售收入${index + 1}`" :prop="'sellList.' + index + '.feeType'" :rules="[
+                    { required: true, message: '请选择收费方式', trigger: 'change' },
+                    ]">
+                    <el-select
+                        v-model.trim="domain.feeType"
+                        placeholder="请选择收费方式"
+                        style="width: 100% !important;"
+                        disabled
+                    >
+                        <el-option value="SERVICE" label="服务收入"></el-option>
+                        <el-option value="SELL" label="销售收入"></el-option>
+                    </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                    <el-form-item :prop="'sellList.' + index + '.organId'" :rules="[
+                    { required: true, message: '请选择分润分部', trigger: 'change' },
+                    ]">
+                    <el-select
+                        v-model.trim="domain.organId"
+                        placeholder="分润分部"
+                        clearable
+                    >
+                        <el-option
+                        v-for="(item, index) in calcBranchList"
+                        :key="index"
+                        :label="item.label"
+                        :value="item.value"
+                        :disabled="item.disabled"
+                        ></el-option>
+                    </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                    <el-form-item :prop="'sellList.' + index + '.scale'" :rules="[
+                        { required: true, validator: validSale, trigger: 'blur, change' },
+                        { required: true, message: '比例必须为数字值', trigger: 'blur, change' }
+                    ]">
+                        <el-input
+                            type="number"
+                            v-number
+                            min="0"
+                            max="100"
+                            placeholder="分润比例"
+                            @mousewheel.native.prevent
+                            v-model.number="domain.scale"
+                        >
+                            <i slot="suffix">%</i>
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="5">
+                    <el-button icon="el-icon-plus" @click="onAddDomain('SELL')" circle></el-button>
+                    <el-button icon="el-icon-minus" :disabled="form.sellList.length <= 1" @click="onRemoveDomain('SELL', domain)" circle type="danger"></el-button>
+                </el-col>
+            </el-row>
+        </el-form>
+
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="close">取 消</el-button>
+            <el-button @click="onChargeSubmit('ruleForm')" type="primary">确 定</el-button>
+        </span>
+    </div>
+</template>
+
+<script>
+import { getPaymentConfigs, addTypeRoute, updateTypeRoute } from "./api";
+import cleanDeep from 'clean-deep'
+const validSale = (rule, value, callback) => {
+  if (value != 0 && typeof value === 'string') {
+    callback(new Error("请输入分润比例"));
+  } else if (value < 0) {
+    callback(new Error("分润比例不能小于0"));
+  } else if (value > 101) {
+    callback(new Error("分润比例不能大于100"));
+  } else {
+    callback();
+  }
+};
+export default {
+    props:['detail', 'branchList', 'close', 'getList', 'formActionTitle'],
+    data() {
+        return {
+            formLabelWidth: "100px",
+            form: {
+                id: null,
+                organId: null,
+                serviceList: [{
+                    feeType: 'SERVICE',
+                    organId: null,
+                    scale: null,
+                }],
+                sellList: [{
+                    feeType: 'SELL',
+                    organId: null,
+                    scale: null
+                }]
+            },
+            validSale: validSale,
+            rules: {
+                organId: [
+                    { required: true, message: "请选择所属分部", trigger: "change" }
+                ]
+            },
+            calcBranchList: [], // 可选比例分部
+        }
+    },
+    mounted() {
+        this.getPaymentBranchList()
+        let detail = this.detail
+        if(detail && this.formActionTitle == 'update') {
+            this.form = {
+                id: detail.id,
+                organId: detail.organId,
+                serviceList: [],
+                sellList: []
+            }
+            const routeScale = detail.typeRouteScale ? detail.typeRouteScale : []
+            routeScale.forEach(item => {
+                if(item.feeType === 'SERVICE') {
+                    this.form.serviceList.push({
+                        feeType: 'SERVICE',
+                        organId: item.organId,
+                        scale: item.scale,
+                    })
+                } else if(item.feeType === 'SELL') {
+                    this.form.sellList.push({
+                        feeType: 'SELL',
+                        organId: item.organId,
+                        scale: item.scale,
+                    })
+                }
+            })
+        }
+    },
+    methods: {
+        onChargeSubmit(formName) {
+            this.$refs[formName].validate(valid => {
+                const form = this.form
+                let serviceCount = 0
+                form.serviceList.forEach(item => {
+                    serviceCount += item.scale
+                })
+                if(Number(serviceCount.toFixed(5)) !== 100) {
+                    this.$message.error('服务收入分润比例总和必须为100')
+                    return
+                }
+                let sellCount = 0
+                form.sellList.forEach(item => {
+                    sellCount += item.scale
+                })
+                if(Number(sellCount.toFixed(5)) !== 100) {
+                    this.$message.error('销售收入分润比例总和必须为100')
+                    return
+                }
+                if (valid) {
+                    const params = {
+                        id: form.id,
+                        organId: form.organId,
+                        typeRouteScale: JSON.stringify((form.serviceList).concat(form.sellList))
+                    }
+                    if (this.formActionTitle == "create") {
+                        addTypeRoute(cleanDeep(params)).then(res => {
+                            this.messageTips("添加", res);
+                        });
+                    } else if (this.formActionTitle == "update") {
+                        updateTypeRoute(cleanDeep(params)).then(res => {
+                            this.messageTips("修改", res);
+                        });
+                    }
+                } else {
+                    return;
+                }
+            });
+        },
+        messageTips(title, res) {
+            if (res.code == 200) {
+                this.$message.success(title + "成功");
+                this.chargeStatus = false;
+                this.close()
+                this.getList();
+            } else {
+                this.$message.error(res.msg);
+            }
+        },
+        async getPaymentBranchList() {
+            await getPaymentConfigs(cleanDeep({ payType: 'ADAPAY' })).then(res => {
+                if (res.code == 200 && res.data) {
+                    res.data.forEach(item => {
+                        this.calcBranchList.push({
+                            label: item.organName,
+                            value: item.organId,
+                            payType: item.payType
+                        });
+                    });
+                }
+            });
+        },
+        onAddDomain(type) { // 添加
+            const tempObj = {
+                organId: null,
+                scale: null
+            }
+            if(type === 'SERVICE') {
+                tempObj['feeType'] = 'SERVICE'
+                this.form.serviceList.push(tempObj)
+            } else if(type === 'SELL') {
+                tempObj['feeType'] = 'SELL'
+                this.form.sellList.push(tempObj)
+            }
+
+        },
+        onRemoveDomain(type, item) { // 删除
+            let form = this.form
+            if(type === 'SERVICE') {
+                const index = form.serviceList.indexOf(item)
+                if (index !== -1) {
+                    form.serviceList.splice(index, 1)
+                }
+            } else if(type === 'SELL') {
+                const index = form.sellList.indexOf(item)
+                if (index !== -1) {
+                    form.sellList.splice(index, 1)
+                }
+            }
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.dialog-footer{
+    display: block;
+    text-align: right;
+    margin-top: 20px;
+  }
+</style>

+ 216 - 0
src/views/chargeManager/three.vue

@@ -0,0 +1,216 @@
+<template>
+  <div class="m-container">
+    <div class="m-core">
+      <div @click="chargeOperation('create')" v-permission="'paymentConfig/addTypeRoute'" class="newBand">添加</div>
+      <!-- 列表 -->
+      <div class="tableWrap">
+        <el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+          <el-table-column align="center" prop="organName" label="分部"></el-table-column>
+          <el-table-column align="center" label="收费方式">
+            <template slot-scope="scope">
+              <div v-if="scope.row.typeRouteScale && scope.row.typeRouteScale.length > 0">
+                <p v-for="(item, index) in scope.row.typeRouteScale" :key="index">
+                  {{ getOrganToStr(item.organId) }}--{{ getTypes(item.feeType) }} {{ item.scale }}%
+                </p>
+              </div>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" width="250px" label="操作">
+            <template slot-scope="scope">
+              <el-button
+                @click="chargeOperation('update', scope.row)"
+                v-permission="'paymentConfig/updateTypeRoute'"
+                type="text"
+              >修改</el-button>
+              <el-button
+                @click="chargeDel(scope.row)"
+                v-permission="'paymentConfig/delTypeRoute'"
+                type="text"
+              >删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          :total="pageInfo.total"
+          :page.sync="pageInfo.page"
+          :limit.sync="pageInfo.limit"
+          :page-sizes="pageInfo.page_size"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+
+    <el-dialog
+      :title="formTitle[formActionTitle]"
+      :visible.sync="chargeStatus"
+      v-if="chargeStatus"
+      width="700px"
+    >
+      <share-model :detail.sync="rowDetail"
+              :branchList="branchList"
+              :formActionTitle="formActionTitle"
+              :close="onFormClose"
+              :getList="getList" />
+    </el-dialog>
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import {
+  paymentConfigQueryPage
+} from "@/api/systemManage";
+import { delTypeRoute } from "./api";
+import { branchQueryPage } from "@/api/specialSetting";
+import ShareModel from './share-model'
+export default {
+  name: "chargeProfitManager",
+  components: { pagination, ShareModel },
+  data() {
+    return {
+      tableList: [],
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
+      },
+      chargeStatus: false,
+      branchList: [], // 分部列表
+      formActionTitle: "create",
+      formTitle: {
+        create: "添加分润",
+        update: "修改分润"
+      },
+      rowDetail: {}
+    };
+  },
+  mounted() {
+    this.getList();
+    this.getRoleList()
+  },
+  methods: {
+    getOrganToStr(id) {
+      let name = null
+      this.branchList.forEach(item => {
+        if(item.value == id) {
+          name = item.label
+        }
+      })
+      return name
+    },
+    getTypes(type) {
+      let template = {
+        'SERVICE': '服务收入',
+        'SELL': '销售收入'
+      }
+      return template[type]
+    },
+    getList() {
+      let params = {
+        hasTypeRoute: 1
+      };
+      params.rows = this.pageInfo.limit;
+      params.page = this.pageInfo.page;
+      paymentConfigQueryPage(params).then(res => {
+        if (res.code == 200 && res.data) {
+          res.data.rows.forEach(item => {
+            if(item.typeRouteScale) {
+              item.typeRouteScale = JSON.parse(item.typeRouteScale)
+            }
+          })
+          this.tableList = res.data.rows;
+          this.pageInfo.total = res.data.total;
+        }
+      });
+    },
+    async getRoleList(val) {
+      await branchQueryPage({
+        // 获取分部
+        delFlag: 0,
+        rows: 9999
+      }).then(res => {
+        if (res.code == 200 && res.data && res.data.rows) {
+          res.data.rows.forEach(item => {
+            this.branchList.push({
+              label: item.name,
+              value: item.id
+            });
+          });
+        }
+      });
+    },
+    chargeOperation(type, data) {
+      this.formActionTitle = type;
+      this.chargeStatus = true;
+      // 修改的时候
+      if (type == "update") {
+        this.rowDetail = data
+      }
+    },
+    chargeDel(row) {
+      // 删除数据
+      // paymentConfigDel
+      this.$confirm("你确定删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          delTypeRoute({ id: row.id }).then(res => {
+            this.messageTips("删除", res);
+          });
+        })
+        .catch();
+    },
+    messageTips(title, res) {
+      if (res.code == 200) {
+          this.$message.success(title + "成功");
+          this.chargeStatus = false;
+          this.getList();
+      } else {
+          this.$message.error(res.msg);
+      }
+    },
+    onFormClose(formName) {
+      this.chargeStatus = false
+      // this.$refs[formName].resetFields();
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+/deep/.el-button--primary {
+  background: #14928a;
+  border-color: #14928a;
+  color: #fff;
+  &:hover,
+  &:active,
+  &:focus {
+    background: #14928a;
+    border-color: #14928a;
+    color: #fff;
+  }
+}
+
+/deep/.el-select,
+/deep/.el-date-editor.el-input {
+  width: 100% !important;
+}
+
+.moreRule {
+  background: #f0f0f0;
+  position: relative;
+
+  .el-form-item__error {
+    color: #f56c6c;
+    font-size: 12px;
+    line-height: 1;
+    position: absolute;
+    left: 100px;
+    top: 100%;
+    margin-top: -21px;
+  }
+}
+</style>

部分文件因为文件数量过多而无法显示