|
@@ -0,0 +1,246 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+$type = array
|
|
|
+(
|
|
|
+
|
|
|
+ 1 => '单行输入框',
|
|
|
+ 2 => '多行输入框',
|
|
|
+ 3 => '城市选择框',
|
|
|
+ 4 => '单图片上传',
|
|
|
+ 5 => '多图片上传',
|
|
|
+
|
|
|
+
|
|
|
+ 11 => '单选框',
|
|
|
+ 12 => '多选框',
|
|
|
+);
|
|
|
+
|
|
|
+$must = array
|
|
|
+(
|
|
|
+ 1 => '必填',
|
|
|
+ 2 => '选填',
|
|
|
+);
|
|
|
+
|
|
|
+$content_type = array
|
|
|
+(
|
|
|
+ 1 => '需要用户选择',
|
|
|
+ 2 => '需要用户输入',
|
|
|
+);
|
|
|
+
|
|
|
+$match = array
|
|
|
+(
|
|
|
+ 1 => '所有字符',
|
|
|
+ 2 => '中文',
|
|
|
+ 3 => '中文+英文',
|
|
|
+ 4 => '中文+英文+数字',
|
|
|
+ 5 => '英文',
|
|
|
+ 6 => '英文+数字',
|
|
|
+ 7 => '手机',
|
|
|
+ 8 => '邮箱',
|
|
|
+);
|
|
|
+
|
|
|
+$id = Dever::input('search_option_product_id');
|
|
|
+$name = '';
|
|
|
+if ($id > 0) {
|
|
|
+ $info = Dever::db('service/product')->one($id);
|
|
|
+ $name = $info['name'] . '-';
|
|
|
+}
|
|
|
+
|
|
|
+return array
|
|
|
+(
|
|
|
+
|
|
|
+ 'name' => 'info',
|
|
|
+
|
|
|
+ 'lang' => $name . '问卷管理',
|
|
|
+ 'order' => 100,
|
|
|
+ 'menu' => false,
|
|
|
+
|
|
|
+ 'struct' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => 'ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+
|
|
|
+
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'page_number' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '页号',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '请输入页号',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'list' => true,
|
|
|
+ 'order' => 'asc',
|
|
|
+ 'edit' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'reorder' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '序号',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '请输入序号',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'list' => true,
|
|
|
+ 'order' => 'asc',
|
|
|
+ 'edit' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'name' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-200',
|
|
|
+ 'name' => '标题',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '标题',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'search' => 'fulltext',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'info' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-800',
|
|
|
+ 'name' => '描述',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '描述',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'textarea',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'product_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '产品',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '产品',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'hidden',
|
|
|
+ 'value' => Dever::input('search_option_product_id')
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'type' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '问卷类型',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '问卷类型',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'option' => $type,
|
|
|
+ 'search' => 'select',
|
|
|
+ 'update' => 'radio',
|
|
|
+ 'list' => true,
|
|
|
+ 'control' => 'type',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'must' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '是否必填',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '是否必填',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'option' => $must,
|
|
|
+ 'update' => 'select',
|
|
|
+ 'list' => true,
|
|
|
+ 'edit' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'match' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '验证规则',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '验证规则',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'option' => $match,
|
|
|
+
|
|
|
+ 'show' => 'type=1,2',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'content' => array
|
|
|
+ (
|
|
|
+ 'type' => 'text-255',
|
|
|
+ 'name' => '选项设置',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '选项设置',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'show' => 'type=11,12',
|
|
|
+ 'update' => array
|
|
|
+ (
|
|
|
+ array
|
|
|
+ (
|
|
|
+ 'col' => 'score',
|
|
|
+ 'name' => '选项分数-用于计算最终结果,暂时可以不填',
|
|
|
+ 'default' => '0',
|
|
|
+ 'desc' => '选项分数',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ ),
|
|
|
+
|
|
|
+ array
|
|
|
+ (
|
|
|
+ 'col' => 'ctype',
|
|
|
+ 'name' => '选项类型',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '选项类型',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'option' => $content_type,
|
|
|
+ 'update' => 'radio',
|
|
|
+ 'control' => 'ctype',
|
|
|
+ ),
|
|
|
+
|
|
|
+ array
|
|
|
+ (
|
|
|
+ 'col' => 'title',
|
|
|
+ 'name' => '选项标题',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '请输入选项标题',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'text',
|
|
|
+ ),
|
|
|
+
|
|
|
+ array
|
|
|
+ (
|
|
|
+ 'col' => 'pic',
|
|
|
+ 'name' => '选项图片',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '选项图片',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'image',
|
|
|
+ 'key' => '1',
|
|
|
+ 'show' => 'ctype=1',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'state' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '状态',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '请选择状态',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'cdate' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '申请时间',
|
|
|
+ 'match' => array('is_numeric', time()),
|
|
|
+ 'desc' => '',
|
|
|
+
|
|
|
+ 'insert' => true,
|
|
|
+ 'search' => 'date',
|
|
|
+ 'list' => 'date("Y-m-d H:i:s", {cdate})',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+);
|