| | |
| | | open_basedir="D:/wwwroot/hj.dev.com/;C:/Windows/Temp/;C:/Temp/;D:/BtSoft/temp/session/" |
| | | open_basedir="D:/wwwroot/chandizhida-backend/;C:/Windows/Temp/;C:/Temp/;D:/BtSoft/temp/session/" |
| | |
| | | $res = $form->search(); |
| | | $plugins = (new DataForm())->getPluginSign(); |
| | | $res['plugin_list'] = $plugins['list_cn']; |
| | | |
| | | return $this->asJson($res); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取员工的角色信息 |
| | | */ |
| | | public static function getUserRole() |
| | | { |
| | | $user = User::find()->where([ |
| | | 'id' => \Yii::$app->user->id |
| | | ])->with(['role.permissions'])->asArray()->one(); |
| | | |
| | | return $user['role']; |
| | | } |
| | | |
| | | /** |
| | | * 多商户权限路由 |
| | | * @return array |
| | | */ |
| | |
| | | |
| | | use app\core\response\ApiCode; |
| | | use app\events\OrderEvent; |
| | | use app\forms\common\CommonUser; |
| | | use app\forms\common\CommonDistrict; |
| | | use app\forms\common\mch\MchSettingForm; |
| | | use app\forms\common\order\CommonOrder; |
| | |
| | | if (!$this->validate()) { |
| | | return $this->getErrorResponse(); |
| | | } |
| | | $role = CommonUser::getUserRole(); |
| | | if($role[0]['name'] == '提货客服'){ |
| | | $this->plugin = 'exchange'; |
| | | } |
| | | |
| | | $query = $this->getAllQuery(); |
| | | |
| | | if ($this->flag == "EXPORT") { |
| | |
| | | 'export_list' => $this->getFieldsList(), |
| | | 'plugins' => $menuList, |
| | | 'hide_function' => \Yii::$app->role->getHideFunction(), |
| | | 'send_type_list' => $this->getSendTypeList() |
| | | 'send_type_list' => $this->getSendTypeList(), |
| | | 'role' => $role |
| | | ], |
| | | ]; |
| | | } |
| | |
| | | { |
| | | if (\Yii::$app->request->isAjax) { |
| | | $form = new RecordForm(); |
| | | $form->card_no = \Yii::$app->request->get('card_no'); |
| | | $form->code = \Yii::$app->request->get('code'); |
| | | $this->asJson($form->showInfo()); |
| | | } |
| | |
| | | class RecordForm extends Model |
| | | { |
| | | public $code; |
| | | public $card_no; |
| | | public $user_id; |
| | | public $token; |
| | | |
| | |
| | | return [ |
| | | [['code'], 'required'], |
| | | [['user_id'], 'number'], |
| | | [['code', 'token'], 'string'], |
| | | [['code', 'token','card_no'], 'string'], |
| | | ]; |
| | | } |
| | | |
| | | public function attributeLabels() |
| | | { |
| | | return [ |
| | | 'code' => '兑换码', |
| | | 'code' => '密码', |
| | | 'card_no'=>'卡号', |
| | | 'user_id' => '小程序用户', |
| | | ]; |
| | | } |
| | |
| | | |
| | | $create = new ExchangeFactory( |
| | | $this->code, |
| | | $this->card_no, |
| | | \Yii::$app->user->id, |
| | | '', |
| | | \Yii::$app->appPlatform |
| | |
| | | try { |
| | | $create = new ExchangeFactory( |
| | | $this->code, |
| | | $this->card_no, |
| | | \Yii::$app->user->id, |
| | | $this->token, |
| | | \Yii::$app->appPlatform |
| | |
| | | try { |
| | | $create = new ExchangeFactory( |
| | | $this->code, |
| | | $this->card_no, |
| | | \Yii::$app->user->id, |
| | | $this->token, |
| | | \Yii::$app->appPlatform |
| | |
| | | if(e.data.data.hide_function) { |
| | | this.hide_function = e.data.data.hide_function; |
| | | } |
| | | if(e.data.data.role[0].name == '提货客服'){ |
| | | this.search.plugin = 'exchange'; |
| | | this.isdisabled = true; |
| | | }else{ |
| | | this.isdisabled = false; |
| | | } |
| | | |
| | | } |
| | | }).catch(e => { |
| | | }); |
| | |
| | | |
| | | <div v-if="isShowOrderPlugin" class="item-box" flex="dir:left cross:center"> |
| | | <div class="label">订单类型</div> |
| | | <el-select size="small" style="width: 120px" v-model="search.plugin" @change="toSearch" |
| | | <el-select size="small" style="width: 120px" v-model="search.plugin" @change="toSearch" :disabled="true" |
| | | placeholder="订单类型"> |
| | | <el-option v-for="item in plugins" :key="item.sign" :label="item.name" |
| | | :value="item.sign"> |
| | |
| | | return { |
| | | search: {}, |
| | | newActiveName: null, |
| | | isShowClear: false, |
| | | isShowClear: false, |
| | | isdisabled:false, |
| | | } |
| | | }, |
| | | methods: { |