正在显示
5 个修改的文件
包含
19 行增加
和
6 行删除
| @@ -50,9 +50,11 @@ class Activity extends Backend | @@ -50,9 +50,11 @@ class Activity extends Backend | ||
| 50 | if ($this->request->isAjax()) { | 50 | if ($this->request->isAjax()) { |
| 51 | //如果发送的来源是Selectpage,则转发到Selectpage | 51 | //如果发送的来源是Selectpage,则转发到Selectpage |
| 52 | if ($this->request->request('keyField')) { | 52 | if ($this->request->request('keyField')) { |
| 53 | + | ||
| 53 | return $this->selectpage(); | 54 | return $this->selectpage(); |
| 54 | } | 55 | } |
| 55 | list($where, $sort, $order, $offset, $limit) = $this->buildparams(); | 56 | list($where, $sort, $order, $offset, $limit) = $this->buildparams(); |
| 57 | + | ||
| 56 | $list = $this->model | 58 | $list = $this->model |
| 57 | ->with(['store','coupon']) | 59 | ->with(['store','coupon']) |
| 58 | ->where($where) | 60 | ->where($where) |
| 1 | <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | 1 | <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> |
| 2 | - | 2 | + <div class="" data-toggle="cxselect" data-selects="first,second"> |
| 3 | <div class="form-group"> | 3 | <div class="form-group"> |
| 4 | <label class="control-label col-xs-12 col-sm-2">{:__('Verification_store_id')}:</label> | 4 | <label class="control-label col-xs-12 col-sm-2">{:__('Verification_store_id')}:</label> |
| 5 | <div class="col-xs-12 col-sm-8"> | 5 | <div class="col-xs-12 col-sm-8"> |
| 6 | - <input id="c-verification_store_id" data-rule="required" data-source="verification/store/index" class="form-control selectpage" name="row[verification_store_id]" type="text" value=""> | 6 | + <input id="c-verification_store_id" data-rule="required" data-source="verification/store/index" class="first form-control selectpage" name="row[verification_store_id]" type="text" value=""> |
| 7 | </div> | 7 | </div> |
| 8 | </div> | 8 | </div> |
| 9 | <div class="form-group"> | 9 | <div class="form-group"> |
| 10 | <label class="control-label col-xs-12 col-sm-2">{:__('Verification_coupon_ids')}:</label> | 10 | <label class="control-label col-xs-12 col-sm-2">{:__('Verification_coupon_ids')}:</label> |
| 11 | <div class="col-xs-12 col-sm-8"> | 11 | <div class="col-xs-12 col-sm-8"> |
| 12 | - <input id="c-verification_coupon_ids" data-rule="required" data-multiple="true" min="0" data-source="verification/coupon/index" data-query-name="id" class="form-control selectpage" name="row[verification_coupon_ids]" type="text" value="" placeholder="请选择卡卷"> | 12 | + <input id="c-verification_coupon_ids" data-rule="required" data-multiple="true" min="0" data-source="verification/coupon/index?verification_store_id={$row.verification_store_id}" data-query-name="id" class="second form-control selectpage" name="row[verification_coupon_ids]" type="text" value="" placeholder="请选择卡卷"> |
| 13 | 13 | ||
| 14 | </div> | 14 | </div> |
| 15 | </div> | 15 | </div> |
| 16 | + </div> | ||
| 16 | <div class="form-group"> | 17 | <div class="form-group"> |
| 17 | <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label> | 18 | <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label> |
| 18 | <div class="col-xs-12 col-sm-8"> | 19 | <div class="col-xs-12 col-sm-8"> |
| 1 | <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> | 1 | <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action=""> |
| 2 | - | 2 | + <div class="" data-toggle="cxselect" data-selects="first,second"> |
| 3 | <div class="form-group"> | 3 | <div class="form-group"> |
| 4 | <label class="control-label col-xs-12 col-sm-2">{:__('Verification_store_id')}:</label> | 4 | <label class="control-label col-xs-12 col-sm-2">{:__('Verification_store_id')}:</label> |
| 5 | <div class="col-xs-12 col-sm-8"> | 5 | <div class="col-xs-12 col-sm-8"> |
| 6 | - <input id="c-verification_store_id" data-rule="required" data-source="verification/store/index" class="form-control selectpage" name="row[verification_store_id]" type="text" value="{$row.verification_store_id|htmlentities}"> | 6 | + <input id="c-verification_store_id" data-rule="required" data-source="verification/store/index" class="first form-control selectpage" name="row[verification_store_id]" type="text" value="{$row.verification_store_id|htmlentities}"> |
| 7 | </div> | 7 | </div> |
| 8 | </div> | 8 | </div> |
| 9 | <div class="form-group"> | 9 | <div class="form-group"> |
| 10 | <label class="control-label col-xs-12 col-sm-2">{:__('Verification_coupon_ids')}:</label> | 10 | <label class="control-label col-xs-12 col-sm-2">{:__('Verification_coupon_ids')}:</label> |
| 11 | <div class="col-xs-12 col-sm-8"> | 11 | <div class="col-xs-12 col-sm-8"> |
| 12 | - <input id="c-verification_coupon_ids" data-rule="required" data-source="verification/coupon/index" data-multiple="true" class="form-control selectpage" name="row[verification_coupon_ids]" type="text" value="{$row.verification_coupon_ids|htmlentities}"> | 12 | + <input id="c-verification_coupon_ids" data-rule="required" |
| 13 | + data-params='{"custom[verification_store_id":{$row.verification_coupon_ids}]}' | ||
| 14 | + data-source="verification/coupon/index?verification_store_id={$row.verification_store_id}" | ||
| 15 | + data-multiple="true" class="second form-control selectpage" | ||
| 16 | + name="row[verification_coupon_ids]" | ||
| 17 | + type="text" | ||
| 18 | + value="{$row.verification_coupon_ids|htmlentities}"> | ||
| 19 | + </div> | ||
| 13 | </div> | 20 | </div> |
| 14 | </div> | 21 | </div> |
| 15 | <div class="form-group"> | 22 | <div class="form-group"> |
| @@ -54,6 +54,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -54,6 +54,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
| 54 | Controller.api.bindevent(); | 54 | Controller.api.bindevent(); |
| 55 | }, | 55 | }, |
| 56 | edit: function () { | 56 | edit: function () { |
| 57 | + $("#c-verification_coupon_ids").data("params", function(){ | ||
| 58 | + return {custom: {verification_store_id: $("#c-verification_store_id").val()}}; | ||
| 59 | + }); | ||
| 57 | Controller.api.bindevent(); | 60 | Controller.api.bindevent(); |
| 58 | }, | 61 | }, |
| 59 | api: { | 62 | api: { |
-
请 注册 或 登录 后发表评论