card.php 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. <?php
  2. $type = array
  3. (
  4. 1 => '否',
  5. 2 => '是',
  6. );
  7. $range_type = array
  8. (
  9. 1 => '全部商品可用',
  10. 2 => '指定商品可用',
  11. );
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'card',
  16. # 显示给用户看的名称
  17. 'lang' => '优惠券管理',
  18. 'order' => 100,
  19. 'check' => 'key',
  20. # 数据结构
  21. 'struct' => array
  22. (
  23. 'id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => 'ID',
  27. 'default' => '',
  28. 'desc' => '',
  29. 'match' => 'is_numeric',
  30. 'search' => 'order',
  31. 'list' => true,
  32. ),
  33. 'project_id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '项目ID',
  37. 'default' => '',
  38. 'desc' => '请输入项目',
  39. 'match' => 'is_numeric',
  40. 'list' => true,
  41. ),
  42. 'hr1' => array
  43. (
  44. 'name' => '基本信息',
  45. 'class' => '',//本项必须填写
  46. 'attr' => '',
  47. ),
  48. 'key' => array
  49. (
  50. 'type' => 'varchar-20',
  51. 'name' => '优惠券key-通过key值搜索数据,key请不要重复',
  52. 'default' => '',
  53. 'desc' => '优惠券key-通过key值搜索数据',
  54. 'match' => 'is_string',
  55. 'update' => 'text',
  56. 'list' => true,
  57. 'edit' => true,
  58. ),
  59. 'name' => array
  60. (
  61. 'type' => 'varchar-120',
  62. 'name' => '名称',
  63. 'default' => '',
  64. 'desc' => '名称',
  65. 'match' => 'is_string',
  66. 'update' => 'text',
  67. 'list' => true,
  68. ),
  69. 'description' => array
  70. (
  71. 'type' => 'varchar-120',
  72. 'name' => '使用说明',
  73. 'default' => '',
  74. 'desc' => '使用说明',
  75. 'match' => 'is_string',
  76. 'update' => 'textarea',
  77. //'list' => true,
  78. ),
  79. 'create_num' => array
  80. (
  81. 'type' => 'int-11',
  82. 'name' => '生成数量',
  83. 'default' => '',
  84. 'desc' => '生成数量',
  85. 'match' => 'is_numeric',
  86. 'update' => 'text',
  87. 'list' => true,
  88. 'edit' => true,
  89. ),
  90. 'edate' => array
  91. (
  92. 'type' => 'int-11',
  93. 'name' => '优惠券结束时间',
  94. 'match' => 'is_numeric',
  95. 'desc' => '优惠券结束时间',
  96. 'update' => 'date',
  97. //'list' => 'date("Y-m-d H:i:s", {sdate})',
  98. 'callback' => 'maketime',
  99. ),
  100. 'sdate' => array
  101. (
  102. 'type' => 'int-11',
  103. 'name' => '优惠券生效时间',
  104. 'match' => 'is_numeric',
  105. 'desc' => '优惠券生效时间',
  106. 'update' => 'date',
  107. //'list' => 'date("Y-m-d H:i:s", {sdate})',
  108. 'callback' => 'maketime',
  109. ),
  110. 'hr2' => array
  111. (
  112. 'name' => '基本设置',
  113. 'class' => '',//本项必须填写
  114. 'attr' => '',
  115. ),
  116. 'quota' => array
  117. (
  118. 'type' => 'int-11',
  119. 'name' => '每人限领个数',
  120. 'default' => '-1',
  121. 'desc' => '每人限领个数',
  122. 'match' => 'option',
  123. 'update' => 'text',
  124. ),
  125. 'total' => array
  126. (
  127. 'type' => 'int-11',
  128. 'name' => '总库存',
  129. 'default' => '1',
  130. 'desc' => '总库存',
  131. 'match' => 'option',
  132. 'update' => 'text',
  133. ),
  134. 'value' => array
  135. (
  136. 'type' => 'varchar-30',
  137. 'name' => '优惠券面值-如果填写了以下随机面额,则本字段为随机面额最小值',
  138. 'default' => '0.01',
  139. 'desc' => '优惠券面值',
  140. 'match' => 'option',
  141. 'update' => 'text',
  142. ),
  143. 'value_random_to' => array
  144. (
  145. 'type' => 'varchar-20',
  146. 'name' => '优惠券随机面额-随机面额最大值',
  147. 'default' => '',
  148. 'desc' => '优惠券随机面额',
  149. 'match' => 'option',
  150. 'update' => 'text',
  151. ),
  152. 'specify_item_ids' => array
  153. (
  154. 'type' => 'varchar-600',
  155. 'name' => '可选商品ID-需要指定可用商品ID,多个用半角逗号分隔,如不指定则为全部商品可用',
  156. 'default' => '',
  157. 'desc' => '可选商品ID',
  158. 'match' => 'option',
  159. 'update' => 'text',
  160. //'list' => true,
  161. ),
  162. 'at_least' => array
  163. (
  164. 'type' => 'varchar-20',
  165. 'name' => '优惠券使用价格-订单满这个价格,优惠券才可以使用',
  166. 'default' => '',
  167. 'desc' => '订单满这个价格,优惠券才可以使用',
  168. 'match' => 'option',
  169. 'update' => 'text',
  170. //'list' => true,
  171. ),
  172. 'discount' => array
  173. (
  174. 'type' => 'varchar-20',
  175. 'name' => '优惠券使用折扣-如填写88,就是8.8折',
  176. 'default' => '',
  177. 'desc' => '优惠券使用折扣',
  178. 'match' => 'option',
  179. 'update' => 'text',
  180. //'list' => true,
  181. ),
  182. 'expire_notice' => array
  183. (
  184. 'type' => 'tinyint-1',
  185. 'name' => '是否发送提醒-是否到期前4天发送提醒',
  186. 'default' => '1',
  187. 'desc' => '是否发送提醒',
  188. 'match' => 'option',
  189. 'update' => 'select',
  190. 'option' => $type,
  191. ),
  192. 'is_forbid_preference' => array
  193. (
  194. 'type' => 'tinyint-1',
  195. 'name' => '是否仅原价购买商品时可用',
  196. 'default' => '1',
  197. 'desc' => '是否仅原价购买商品时可用',
  198. 'match' => 'option',
  199. 'update' => 'select',
  200. 'option' => $type,
  201. ),
  202. 'is_share' => array
  203. (
  204. 'type' => 'tinyint-1',
  205. 'name' => '是否可分享领取链接',
  206. 'default' => '1',
  207. 'desc' => '是否可分享领取链接',
  208. 'match' => 'option',
  209. 'update' => 'select',
  210. 'option' => $type,
  211. ),
  212. 'mark_tag_ids' => array
  213. (
  214. 'type' => 'varchar-600',
  215. 'name' => '标签设置-领取优惠券要给用户打上的标签的ID,多个用半角逗号分隔',
  216. 'default' => '',
  217. 'desc' => '标签设置',
  218. 'match' => 'option',
  219. 'update' => 'text',
  220. //'list' => true,
  221. ),
  222. 'need_user_level' => array
  223. (
  224. 'type' => 'int-11',
  225. 'name' => '是否限制领用者的等级-小于0表示不限制,大于0 表示领用者必须是这个等级ID',
  226. 'default' => '-1',
  227. 'desc' => '是否限制领用者的等级',
  228. 'match' => 'option',
  229. 'update' => 'text',
  230. ),
  231. 'hr3' => array
  232. (
  233. 'name' => '微信设置',
  234. 'class' => '',//本项必须填写
  235. 'attr' => '',
  236. ),
  237. 'is_sync_weixin' => array
  238. (
  239. 'type' => 'tinyint-1',
  240. 'name' => '是否同步微信卡券',
  241. 'default' => '1',
  242. 'desc' => '是否同步微信卡券',
  243. 'match' => 'option',
  244. 'update' => 'select',
  245. 'option' => $type,
  246. ),
  247. 'weixin_title' => array
  248. (
  249. 'type' => 'varchar-30',
  250. 'name' => '卡券标题',
  251. 'default' => '',
  252. 'desc' => '卡券标题',
  253. 'match' => 'option',
  254. 'update' => 'text',
  255. //'list' => true,
  256. ),
  257. 'weixin_sub_title' => array
  258. (
  259. 'type' => 'varchar-30',
  260. 'name' => '卡券副标题',
  261. 'default' => '',
  262. 'desc' => '卡券副标题',
  263. 'match' => 'option',
  264. 'update' => 'text',
  265. //'list' => true,
  266. ),
  267. 'weixin_color_rgb' => array
  268. (
  269. 'type' => 'varchar-20',
  270. 'name' => '卡券颜色的值-例如:#55bd47',
  271. 'default' => '',
  272. 'desc' => '卡券颜色的值',
  273. 'match' => 'option',
  274. 'update' => 'text',
  275. //'list' => true,
  276. ),
  277. 'service_phone' => array
  278. (
  279. 'type' => 'varchar-20',
  280. 'name' => '卡券的客服电话',
  281. 'default' => '',
  282. 'desc' => '卡券的客服电话',
  283. 'match' => 'option',
  284. 'update' => 'text',
  285. //'list' => true,
  286. ),
  287. 'hr4' => array
  288. (
  289. 'name' => '微信模板消息设置',
  290. 'class' => '',//本项必须填写
  291. 'attr' => '',
  292. ),
  293. 'msg_key' => array
  294. (
  295. 'type' => 'varchar-20',
  296. 'name' => '模板消息key',
  297. 'default' => '',
  298. 'desc' => '模板消息key',
  299. 'match' => 'is_string',
  300. 'update' => 'text',
  301. //'list' => true,
  302. //'edit' => true,
  303. ),
  304. 'msg_page' => array
  305. (
  306. 'type' => 'varchar-200',
  307. 'name' => '页面路径',
  308. 'default' => 'pages/index/index',
  309. 'desc' => '页面路径',
  310. 'match' => 'is_string',
  311. 'update' => 'text',
  312. //'list' => true,
  313. ),
  314. 'msg_content' => array
  315. (
  316. 'type' => 'text-255',
  317. 'name' => '模板内容',
  318. 'default' => '',
  319. 'desc' => '请输入内容',
  320. 'match' => 'is_string',
  321. 'update' => array
  322. (
  323. array
  324. (
  325. 'col' => 'key',
  326. 'name' => '标识',
  327. 'default' => '',
  328. 'desc' => '请输入标识',
  329. 'match' => 'is_string',
  330. 'update' => 'text',
  331. ),
  332. array
  333. (
  334. 'col' => 'value',
  335. 'name' => '内容值',
  336. 'default' => '',
  337. 'desc' => '内容值',
  338. 'match' => 'is_string',
  339. 'update' => 'textarea',
  340. ),
  341. ),
  342. ),
  343. 'state' => array
  344. (
  345. 'type' => 'tinyint-1',
  346. 'name' => '状态',
  347. 'default' => '1',
  348. 'desc' => '请选择状态',
  349. 'match' => 'is_numeric',
  350. ),
  351. 'cdate' => array
  352. (
  353. 'type' => 'int-11',
  354. 'name' => '更新时间',
  355. 'match' => array('is_numeric', time()),
  356. 'desc' => '',
  357. 'default' => '',
  358. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  359. ),
  360. ),
  361. 'top' => Dever::config('base', 'youzan')->top,
  362. 'manage' => array
  363. (
  364. //'delete' => false,
  365. //'insert' => false,
  366. //'edit' => false,
  367. 'list_button' => array
  368. (
  369. 'oper' => array('立刻生成', '"youzan/card.create?id={id}"'),
  370. ),
  371. ),
  372. );