feedback.php 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. <?php
  2. $type = array
  3. (
  4. 1 => '购买',
  5. 2 => '兑换',
  6. );
  7. $product_type = array
  8. (
  9. 1 => '有赞',
  10. 2 => '淘宝',
  11. 3 => '联系客服购买',
  12. );
  13. $status = array
  14. (
  15. 1 => '保存后立刻发送给用户',
  16. 2 => '保存后不发送给用户',
  17. );
  18. $sms = array
  19. (
  20. 1 => '不发送提醒短信',
  21. 2 => '发送提醒短信',
  22. );
  23. $product_update = array
  24. (
  25. 1 => '首次保存自动更新',
  26. 2 => '每次保存自动更新',
  27. 3 => '手动更新',
  28. );
  29. $product = function()
  30. {
  31. return Dever::db('service/product')->state();
  32. };
  33. $products = function()
  34. {
  35. return Dever::load('ku/lib/manage.products');
  36. };
  37. $id = Dever::input('search_option_product_id');
  38. $name = '';
  39. if ($id > 0) {
  40. $info = Dever::db('service/product')->one($id);
  41. $name = $info['name'] . '-';
  42. $uid = Dever::input('search_option_uid');
  43. $user = Dever::db('passport/user')->one($uid);
  44. $faname = $user['username'] . '的' . $info['name'];
  45. } else {
  46. $faname = '';
  47. }
  48. return array
  49. (
  50. # 表名
  51. 'name' => 'feedback',
  52. # 显示给用户看的名称
  53. 'lang' => $name . '设计方案',
  54. 'menu' => false,
  55. 'end' => array
  56. (
  57. //'update' => 'service/lib/manage.feedback',
  58. //'insert' => 'service/lib/manage.feedback',
  59. ),
  60. # 数据结构
  61. 'struct' => array
  62. (
  63. 'id' => array
  64. (
  65. 'type' => 'int-11',
  66. 'name' => 'ID',
  67. 'default' => '',
  68. 'desc' => '',
  69. 'match' => 'is_numeric',
  70. 'search' => 'order',
  71. 'update' => 'hidden',
  72. 'value' => Dever::input('where_id')
  73. //'list' => true,
  74. ),
  75. 'order_id' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '订单id',
  79. 'default' => '',
  80. 'desc' => '订单id',
  81. 'match' => 'is_numeric',
  82. 'update' => 'hidden',
  83. 'value' => Dever::input('search_option_order_id')
  84. ),
  85. 'product_id' => array
  86. (
  87. 'type' => 'int-11',
  88. 'name' => '产品id',
  89. 'default' => '',
  90. 'desc' => '产品id',
  91. 'match' => 'is_numeric',
  92. 'update' => 'text',
  93. 'update' => 'hidden',
  94. 'value' => Dever::input('search_option_product_id')
  95. ),
  96. 'uid' => array
  97. (
  98. 'type' => 'int-11',
  99. 'name' => '用户信息',
  100. 'default' => '',
  101. 'desc' => '用户信息',
  102. 'match' => 'is_numeric',
  103. 'update' => 'hidden',
  104. 'value' => Dever::input('search_option_uid')
  105. ),
  106. 'name' => array
  107. (
  108. 'type' => 'varchar-80',
  109. 'name' => '方案名称',
  110. 'default' => $faname,
  111. 'desc' => '方案名称',
  112. 'match' => 'is_string',
  113. 'update' => 'text',
  114. 'search' => 'fulltext',
  115. 'list' => true,
  116. ),
  117. 'info' => array
  118. (
  119. 'type' => 'varchar-200',
  120. 'name' => '设计用时描述',
  121. 'default' => '',
  122. 'desc' => '设计用时',
  123. 'match' => 'option',
  124. //'update' => 'text',
  125. //'search' => 'fulltext',
  126. //'list' => true,
  127. ),
  128. 'pic_xiaoguo' => array
  129. (
  130. 'type' => 'text-255',
  131. 'name' => '效果图',
  132. 'default' => '',
  133. 'desc' => '效果图',
  134. 'match' => 'option',
  135. //'update' => 'images',
  136. //'key' => '1',
  137. //'place' => '150',
  138. ),
  139. 'pic_pingmian' => array
  140. (
  141. 'type' => 'text-255',
  142. 'name' => '平面图',
  143. 'default' => '',
  144. 'desc' => '平面',
  145. 'match' => 'option',
  146. //'update' => 'images',
  147. //'key' => '1',
  148. //'place' => '150',
  149. ),
  150. 'pic_yanse' => array
  151. (
  152. 'type' => 'text-255',
  153. 'name' => '颜色参考图',
  154. 'default' => '',
  155. 'desc' => '颜色参考图',
  156. 'match' => 'option',
  157. //'update' => 'images',
  158. //'key' => '1',
  159. //'place' => '150',
  160. ),
  161. 'pic' => array
  162. (
  163. 'type' => 'varchar-150',
  164. 'name' => '方案封面-750px*自定义高度',
  165. 'default' => '',
  166. 'desc' => '最终效果图',
  167. 'match' => 'is_string',
  168. 'update' => 'image',
  169. 'key' => '1',
  170. 'place' => '150',
  171. ),
  172. 'pdf' => array
  173. (
  174. 'type' => 'varchar-150',
  175. 'name' => 'pdf文件',
  176. 'default' => '',
  177. 'desc' => 'pdf文件',
  178. 'match' => 'is_string',
  179. 'update' => 'upload',
  180. 'key' => '4',
  181. ),
  182. 'status' => array
  183. (
  184. 'type' => 'int-11',
  185. 'name' => '保存方式',
  186. 'default' => '1',
  187. 'desc' => '保存方式',
  188. 'match' => 'is_numeric',
  189. 'option' => $status,
  190. //'update' => 'radio',
  191. //'list' => true,
  192. //'control' => 'status',
  193. ),
  194. 'sms' => array
  195. (
  196. 'type' => 'int-11',
  197. 'name' => '是否发送短信-二次服务订单修正后,是否发送短信,首次提交无需修改该状态',
  198. 'default' => '1',
  199. 'desc' => '是否发送短信',
  200. 'match' => 'is_numeric',
  201. 'option' => $sms,
  202. //'update' => 'radio',
  203. //'list' => true,
  204. //'show' => 'status=2',
  205. ),
  206. 'products' => array
  207. (
  208. 'type' => 'text-255',
  209. 'name' => '商品清单-支持多个关键词,多个关键词请用“|”符号隔开,如搜索:鞋子|衣服',
  210. 'default' => '',
  211. 'desc' => '商品清单',
  212. 'match' => 'option',
  213. 'update' => 'text',
  214. //'option' => $products,
  215. //输入并自动完成
  216. //'autocomplete' => array('ku/lib/manage.search_product?json=1', 'id', 'ku/lib/manage.search_product_by_ids'),
  217. //输入之后出现弹窗,继续筛选
  218. 'searchbox' => array('ku/lib/manage.search_product_list?json=1', 'id', 'ku/lib/manage.search_product_by_ids', 'cate,brand', 'ku/lib/manage.search_cate,ku/lib/manage.search_brand'),
  219. ),
  220. 'num' => array
  221. (
  222. 'type' => 'int-11',
  223. 'name' => '用户评分',
  224. 'default' => '0',
  225. 'desc' => '用户评分',
  226. 'match' => 'is_numeric',
  227. //'update' => 'radio',
  228. 'list' => true,
  229. //'show' => 'status=2',
  230. ),
  231. 'isnum' => array
  232. (
  233. 'type' => 'int-11',
  234. 'name' => '用户评分1为已评分2为未评分',
  235. 'default' => '2',
  236. 'desc' => '用户评分',
  237. 'match' => 'is_numeric',
  238. //'update' => 'radio',
  239. //'list' => true,
  240. //'show' => 'status=2',
  241. ),
  242. 'msg' => array
  243. (
  244. 'type' => 'text-255',
  245. 'name' => '用户备注',
  246. 'default' => '',
  247. 'desc' => '用户备注',
  248. 'match' => 'option',
  249. //'update' => 'text',
  250. 'list' => true,
  251. //'option' => $products,
  252. ),
  253. 'product' => array
  254. (
  255. 'type' => 'longtext',
  256. 'name' => '旧商品清单',
  257. 'default' => '',
  258. 'desc' => '商品清单',
  259. 'match' => 'is_string',
  260. 'updates' => array
  261. (
  262. array
  263. (
  264. 'col' => 'type',
  265. 'name' => '商品类型',
  266. 'default' => '1',
  267. 'desc' => '商品类型',
  268. 'match' => 'is_numeric',
  269. 'option' => $product_type,
  270. 'update' => 'radio',
  271. 'control' => 'type',
  272. ),
  273. array
  274. (
  275. 'col' => 'link',
  276. 'name' => '商品链接-用于自动抓取商品名称、图片、价格等信息,注意:天猫不能自动抓取,请手动填写商品信息',
  277. 'default' => '',
  278. 'desc' => '商品链接',
  279. 'match' => 'is_string',
  280. 'update' => 'textarea',
  281. ),
  282. array
  283. (
  284. 'col' => 'taobao_code',
  285. 'name' => '淘宝高佣长/短链接',
  286. 'default' => '',
  287. 'desc' => '淘宝高佣长/短链接',
  288. 'match' => 'is_string',
  289. 'update' => 'textarea',
  290. 'show' => 'type=2'
  291. ),
  292. array
  293. (
  294. 'col' => 'youzan_path',
  295. 'name' => '商城的商品路径-如:pages/goods/detail/index?alias=3nwqrknhydgek',
  296. 'default' => '',
  297. 'desc' => '商城的商品路径',
  298. 'match' => 'is_string',
  299. 'update' => 'textarea',
  300. 'show' => 'type=1'
  301. ),
  302. array
  303. (
  304. 'col' => 'update',
  305. 'name' => '是否抓取最新商品信息-根据商品链接来抓取名称、价格、图片,如果选择手动更新,请手动填写以下商品信息',
  306. 'default' => '2',
  307. 'desc' => '抓取最新商品信息',
  308. 'match' => 'is_numeric',
  309. 'option' => $product_update,
  310. 'update' => 'radio',
  311. ),
  312. array
  313. (
  314. 'col' => 'name',
  315. 'name' => '商品名称',
  316. 'default' => '',
  317. 'desc' => '商品名称',
  318. 'match' => 'option',
  319. 'update' => 'text',
  320. ),
  321. array
  322. (
  323. 'col' => 'price',
  324. 'name' => '商品价格-输入整体价格',
  325. 'default' => '',
  326. 'desc' => '商品价格',
  327. 'match' => 'option',
  328. 'update' => 'text',
  329. ),
  330. array
  331. (
  332. 'col' => 'pic',
  333. 'name' => '商品图片',
  334. 'default' => '',
  335. 'desc' => '商品图片',
  336. 'match' => 'option',
  337. 'update' => 'image',
  338. 'key' => '1',
  339. ),
  340. ),
  341. ),
  342. 'state' => array
  343. (
  344. 'type' => 'tinyint-1',
  345. 'name' => '状态',
  346. 'default' => '1',
  347. 'desc' => '请选择状态',
  348. 'match' => 'is_numeric',
  349. ),
  350. 'cdate' => array
  351. (
  352. 'type' => 'int-11',
  353. 'name' => '申请时间',
  354. 'match' => array('is_numeric', time()),
  355. 'desc' => '',
  356. # 只有insert时才生效
  357. 'insert' => true,
  358. 'search' => 'date',
  359. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  360. ),
  361. ),
  362. 'manage' => array
  363. (
  364. ),
  365. );