Эх сурвалжийг харах

Merge branch 'feature/2210-changeOrderType' into dev

kevin_zhangl 3 жил өмнө
parent
commit
b3f4d12b40

+ 16 - 1
backendApi/modules/v1/models/lists/shop/OrderList.php

@@ -169,11 +169,26 @@ class OrderList extends \common\libs\dataList\DataList implements DataListInterf
                             if($row['ORDER_TYPE']=='ZC'){
                                 $orderType = '报单';
                             }else{
-                                $orderType = ($row['PAY_TYPE']=='cash') ? '重消' : '积分';
+//                                $orderType = ($row['PAY_TYPE']=='cash') ? '重消' : '积分';
+                                $orderType = '复消';
                             }
                         return $orderType;
                     },
                 ],
+                'PAY_TYPE' => [
+                    'header' => '支付方式',
+                    'value' => function ($row) {
+                        switch ($row['PAY_TYPE']) {
+                            case 'cash':
+                                return '充值账户支付';
+                            case 'exchange':
+                                return '复消积分支付';
+                            default:
+                                return '无业绩兑换点数支付';
+                        }
+                    },
+                    'headerOther' => ['width' => '190'],
+                ],
                 'IS_AUTO' => [
                     'header' => 'Is Auto', // 是否自动
                     'value' => function ($row) {

+ 1 - 1
common/config/params.php

@@ -44,7 +44,7 @@ return [
     'shopWalletType' => [
         'cash' =>[
             'value'=>'cash',
-            'title'=>'现金钱包',
+            'title'=>'充值账户',
         ],
     ],
     'shopFlowType' => [

+ 1 - 1
common/helpers/user/Info.php

@@ -604,7 +604,7 @@ class Info {
      * @return array|null
      */
     public static function getLastInfo($userId){
-        $data = User::findOneAsArray('ID=:ID', [':ID' => $userId], 'LAST_DEC_LV AS DEC_LV,EMP_LV,STATUS');
+        $data = User::findOneAsArray('ID=:ID', [':ID' => $userId], 'LAST_DEC_LV AS DEC_LV,EMP_LV,LAST_EMP_LV,STATUS');
         return $data;
     }
 

+ 0 - 3
common/models/forms/TransferForm.php

@@ -301,9 +301,6 @@ class TransferForm extends Model {
         if (!$this->validate()) {
             return null;
         }
-        if ($this->_fromUserInfo['ID']==$this->_toUserInfo['ID']){
-            throw new \Exception('不能给自己转账');
-        }
         $fromData = Balance::getLogData($this->_fromUserInfo['ID']);
         $toData = Balance::getLogData($this->_toUserInfo['ID']);
         $this->userOperateLogger->saveBeforeContent=array_merge($fromData,$toData);

+ 3 - 1
frontendApi/modules/v1/controllers/ShopController.php

@@ -168,12 +168,14 @@ class ShopController extends BaseController {
             if($value['ORDER_TYPE']=='ZC'){
                 $data['list'][$key]['ORDER_TYPE'] = '报单';
             }else{
-                $data['list'][$key]['ORDER_TYPE'] = in_array($value['PAY_TYPE'], ['cash', 'paystack']) ? '复消': '积分';
+//                $data['list'][$key]['ORDER_TYPE'] = in_array($value['PAY_TYPE'], ['cash', 'paystack']) ? '复消': '积分';
+                $data['list'][$key]['ORDER_TYPE'] = '复消';
             }
             //$data['list'][$key]['PROVINCE_NAME'] = $value['PROVINCE'] ? Region::getCnName($value['PROVINCE']) : '';
            //$data['list'][$key]['CITY_NAME'] = $value['CITY'] ? Region::getCnName($value['CITY']) : '';
             //$data['list'][$key]['COUNTY_NAME'] = $value['COUNTY'] ? Region::getCnName($value['COUNTY']) : '';
             $data['list'][$key]['PAY_AT'] = Date::convert($value['PAY_AT'],'Y-m-d H:i:s');
+            $data['list'][$key]['PAY_TYPE'] = $value['PAY_TYPE'] == 'cash' ? '消费点数支付' : ($value['PAY_TYPE'] == 'exchange' ? '复消点数支付' : '业绩兑换点数支付');
         }
         return static::notice($data);
     }

+ 2 - 1
frontendEle/src/views/dashboard/index.vue

@@ -136,7 +136,8 @@
         if (type) return require('@/assets/emp-ico-' + type + '.png')
       },
       getEmpBg (type) {
-        if (type !== 0) return 'backgroundImage:url(' + require('@/assets/emp-bg-' + type + '.png') + ')'
+        let index = parseInt(type)
+        if (index) return 'backgroundImage:url(' + require('@/assets/emp-bg-' + index + '.png') + ')'
       },
       sub_str(str, len = 15) {
         if (str) return str.slice(0, len)

+ 9 - 18
frontendEle/src/views/finance/transfer-add.vue

@@ -58,7 +58,6 @@ import Vue from 'vue'
 import store from '@/utils/vuexStore'
 import network from '@/utils/network'
 import tool from '@/utils/tool'
-import userInfo from '@/utils/userInfo'
 
 export default {
   name: 'finance_withdraw-add',
@@ -96,23 +95,15 @@ export default {
     }
   },
   methods: {
-      handleChange() {
-          if (this.form.toUserName.trim() != userInfo.userName()){
-              this.loading = true
-              network.getData('user/full-info', {userName: this.form.toUserName}).then(response => {
-                  this.form.toRealName = response.REAL_NAME
-                  this.loading = false
-              }).catch(response => {
-                      this.loading = false
-              })
-          } else {
-            this.form.toUserName = ''
-            this.$message({
-              message: '不能给自己转账',
-              type: 'error'
-            })
-          }
-      },
+    handleChange() {
+      this.loading = true
+      network.getData('user/full-info', {userName: this.form.toUserName}).then(response => {
+        this.form.toRealName = response.REAL_NAME
+        this.loading = false
+      }).catch(response => {
+        this.loading = false
+      })
+    },
     chkReal(){
       this.realAmount = tool.formatPrice(this.form.amount * (100-this.fee) * 0.01)
     },

+ 1 - 0
frontendEle/src/views/shop/order-list.vue

@@ -22,6 +22,7 @@
         <el-table-column label="收货电话" prop="MOBILE"></el-table-column>
         <el-table-column label="支付时间" prop="PAY_AT"></el-table-column>
         <el-table-column label="订单类型" prop="ORDER_TYPE"></el-table-column>
+        <el-table-column label="支付类型" prop="PAY_TYPE"></el-table-column>
       </el-table>
       <div class="white-box-footer">
         <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>