浏览代码

数据分离

wenjie 8 月之前
父节点
当前提交
2c4dffcd88

二进制
dist.zip


+ 1 - 1
src/utils/config.js

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2024-01-05 16:08:18
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-10-23 11:20:56
+ * @LastEditTime: 2024-10-29 17:17:03
  * @FilePath: \admin-manage\src\utils\config.js
  * @Description: 124234
  * 

+ 1 - 1
src/utils/request.js

@@ -33,7 +33,7 @@ service.interceptors.request.use(
       // ['X-Token'] is a custom headers key
       // please modify it according to the actual situation
       config.headers['Accesstoken'] = getToken()
-      config.headers['code'] = 1
+      config.headers['code'] = 3
       config.headers['epid'] = localStorage.getItem('epid')
       // config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
     // }

+ 69 - 8
src/views/merchantManage/addUser.vue

@@ -25,8 +25,28 @@
       </el-form-item>
       <el-form-item label="绑定主商户" prop="platformType">
           <el-checkbox-group v-model="setQuery.platformType">
-            <el-checkbox label="1">慧研学惠生活</el-checkbox>
-            <el-checkbox label="2" >印象贵大</el-checkbox>
+            <div class="flex" v-for="(item,index) in masterShopOptions" :key="index" ><el-checkbox :label="item.value">{{item.label}}</el-checkbox> 
+            <el-form-item v-if="setQuery.platformType.includes(item.value)" :prop="'platformShareLists.' + index + '.shareId'" :rules="{required: true, message: '请选择分账规则', trigger: 'change'}">
+              <el-select
+                v-model="setQuery.platformShareLists[index].shareId"
+                class="item-width-300"
+                size="small"
+
+                placeholder="请选择商品分账规则"
+              >
+                <el-option
+                  v-for="item in ruleOptions"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+            </div>
+   
+            <!-- <el-checkbox label="1">慧研学惠生活</el-checkbox>
+            <el-checkbox label="2" >印象贵大</el-checkbox> -->
           </el-checkbox-group>
         </el-form-item>
       <el-form-item label="商户名称:" prop="accountName">
@@ -96,10 +116,10 @@
           :maxlength="11"
           size="small"
           class="item-width-300"
-           :disabled="this.$route.query.id"
+           :disabled="!!this.$route.query.id"
         ></el-input>
       </el-form-item>
-      <el-form-item label="商品分账规则:" prop="shareId">
+      <!-- <el-form-item label="商品分账规则:" prop="shareId">
         <el-select
           v-model="setQuery.shareId"
           class="item-width-300"
@@ -113,7 +133,7 @@
           >
           </el-option>
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="备注:" prop="notes">
         <el-input
           v-model="setQuery.notes"
@@ -165,7 +185,8 @@ export default {
         phoneNum: "",
         province: "",
         shareId:'',
-        platformType:[]
+        platformType:[],
+        platformShareLists:[]
       },
       region:{
         "code": "",
@@ -226,6 +247,9 @@ export default {
         this.countyList = []
       }
     }),
+    // 'setQuery.platformType'(val) {
+    //   console.log(123);
+    // }
   },
   methods: {
     // 获取地区数据
@@ -255,7 +279,22 @@ export default {
       accountDetail({accountId}).then((res) => {
         if (res.state == "Success") {
           this.setQuery = res.content
-          this.setQuery.platformType = this.setQuery.platformType.split(',')
+          this.$set(this.setQuery,'platformShareLists',[])
+          this.masterShopOptions.map(item=>{
+            this.setQuery.platformShareLists.push({
+              shareId:'',
+              platformType:item.value
+            })
+          })
+          let platformShareLists = JSON.parse(this.setQuery.platformShares)
+          platformShareLists.map(item=>{
+            this.setQuery.platformShareLists.map(i=>{
+              if(item.platformType == i.platformType){
+                i.shareId = item.shareId
+              }
+            })
+          })
+          this.setQuery.platformType = this.setQuery.platformType.split(',').map(Number)
 
           setTimeout(() => {
             this.isInit = false
@@ -286,6 +325,14 @@ export default {
             if(this.$route.query.id){
               delete obj.phoneNum
             }
+            let platformShareLists = JSON.parse(JSON.stringify(obj.platformShareLists))
+            obj.platformShareLists = []
+            platformShareLists.map((item,index)=>{
+              if(item.shareId&&obj.platformType.includes(item.platformType)){
+                obj.platformShareLists.push(item)
+              }
+            
+            })
             obj.platformType = obj.platformType.toString()
 
           addOrUpdateAccount(obj).then((res) => {
@@ -310,7 +357,8 @@ export default {
                 notes: "",
                 phoneNum: "",
                 province: "",
-                platformType:[]
+                platformType:[],
+                platformShareLists:[]
               };
               this.$router.push("/merchantManage/index");
             }
@@ -321,6 +369,13 @@ export default {
   },
 
   created() {
+    this.setQuery.platformShareLists=[]
+    this.masterShopOptions.map(item=>{
+      this.setQuery.platformShareLists.push({
+        shareId:'',
+        platformType:item.value
+      })
+    })
     this.getRuleList()
     if(this.$route.query.title == '编辑商户'){
       // this.setQuery = JSON.parse( sessionStorage.getItem('shopUser') )
@@ -335,6 +390,12 @@ export default {
 <style lang="scss" scoped>
 .addUser {
      padding-bottom: 40px;
+     .flex{
+      width: 500px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+     }
   .btn-group {
     display: flex;
     align-items: center;

+ 38 - 0
src/views/operationManage/goodsManage/index.vue

@@ -18,6 +18,23 @@
           class="item-width-200 ml10"
         ></el-input>
 
+        <el-select
+          v-model="platformType"
+          multiple
+          size="small"
+          clearable
+          class="item-width-200 ml10"
+          placeholder="请选择主商户"
+        >
+          <el-option
+            v-for="item in masterShopOptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+
         <el-button
         class="ml10"
         type="primary"
@@ -89,6 +106,17 @@
       >
       </el-table-column>
 
+       <el-table-column
+          prop="accountChildType"
+          align="center"
+          label="所属平台"
+          fit
+        >
+        <template slot-scope="scope">
+          {{filterMasterName(scope.row.platformType )}}
+        </template>
+        </el-table-column>
+
       <template v-if="activeName == '审核未通过商品'">
         <el-table-column
           prop="applyTime"
@@ -97,6 +125,7 @@
           show-overflow-tooltip
         >
         </el-table-column>
+        
         <el-table-column
           prop="checkTime"
           align="center"
@@ -153,7 +182,9 @@ export default {
       tableData: [],
       loading: false,
       goodsTypeObj:JSON.parse(sessionStorage.getItem('goodsTypeObj')),
+      platformType:"",
       query: {
+        platformType:null,
         applyState:'',
         status: '3',
         goodsName: "",
@@ -181,6 +212,13 @@ export default {
         this.goodsList()
 
     },
+    platformType(val) {
+        if(val.length){
+          this.query.platformType = val.join(',')
+        }else{
+          this.query.platformType = null
+        }
+      }
     // query: {
     //   handler: debounce(function (val) {
     //     this.goodsList()

+ 1 - 1
src/views/operationManage/orderManage/index.vue

@@ -305,7 +305,7 @@ export default {
         else if(goodsModelList[0].jobFlowMap == 'Kfc'){
           return {
             goodsName:goodsModelList[0].goodsInfo.goodsName,
-            price:goodsModelList[0].goodsInfo.products[0].sellPrice
+            price:goodsModelList[0].goodsInfo.products[0].selPrice
           }
         }else{
           return {

+ 2 - 2
src/views/operationManage/orderManage/orderDetail.vue

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-11-01 14:21:43
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-10-23 14:53:16
+ * @LastEditTime: 2024-10-28 14:27:46
  * @FilePath: \admin-manage\src\views\operationManage\orderManage\orderDetail.vue
  * @Description:
  *
@@ -156,7 +156,7 @@
         show-overflow-tooltip
       >
        <template slot-scope="scope">
-        {{scope.row.sellPrice }}
+        {{scope.row.selPrice }}
       </template>
       </el-table-column>
        <el-table-column

+ 4 - 0
src/views/userManage/memberManage/index.vue

@@ -143,6 +143,10 @@ export default {
         {
           label:'印象贵大',
           value:2
+        },
+        {
+          label:'中数未来生活宝',
+          value:3
         }
       ],
       loading: false,