添加推广员时推广公司必填

master
liuweiwen 5 years ago
parent 39f1ea9d0c
commit 600ac3fd9e

@ -227,7 +227,9 @@ class PromoteController extends ThinkController
if (preg_match('/^[a-zA-Z0-9]{6,15}$/', $account)==false) {
$this->error('账号只能是6-15位字母或数字');
}
if (empty($company_id)) {
$this->error('请选择推广公司');
}
$promoteService = new PromoteService();
$status = $promoteService->addPromote($data);
if ($status) {

@ -38,6 +38,19 @@
<span class="notice-text">密码长度必须大于6位</span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>所属推广公司</td>
<td class="r">
<select name="company_id" id="company_id">
<option value="0">请选择推广公司</option>
<volist name="companys" id="vo">
<option value="{$vo.id}">{$vo.company_name}</option>
</volist>
</select>
<!-- <span class="notice-text">设置该推广员所属的推广公司</span>-->
</td>
</tr>
<tr>
<td class="l">账号状态:</td>
<td class="r table_radio">
@ -83,19 +96,6 @@
</tr>
<tr>
<td class="l">所属推广公司</td>
<td class="r">
<select name="company_id" id="company_id">
<option value="0">请选择推广公司</option>
<volist name="companys" id="vo">
<option value="{$vo.id}">{$vo.company_name}</option>
</volist>
</select>
<!-- <span class="notice-text">设置该推广员所属的推广公司</span>-->
</td>
</tr>
</tbody>
</table>
</div>

Loading…
Cancel
Save