dict.php 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  1. <?php
  2. namespace common\components;
  3. //字典
  4. class dict
  5. {
  6. public static $data = [
  7. // 配送方式默认配置
  8. 'shMethod' => [
  9. 0 => [
  10. 'name' => '送货',
  11. 'originName' => '送货',
  12. 'calcType' => 0,
  13. 'status' => 1,
  14. 'sort' => 1,
  15. 'minAmount' => 0.00,
  16. 'minNum' => 0,
  17. 'unMeet' => 0,
  18. 'unMeetFee' => 0.00,
  19. // 附加费重收:0 按自然日;1 按冷却秒数(默认 1800=0.5 小时)
  20. 'unMeetLockType' => 0,
  21. 'unMeetLockSeconds' => 1800,
  22. 'startKm' => 0.00,
  23. 'startPrice' => 0.00,
  24. 'perKmPrice' => 0.00,
  25. 'changeRate' => 0.00
  26. ],
  27. 1 => [
  28. 'name' => '自取',
  29. 'originName' => '自取',
  30. 'calcType' => 0,
  31. 'status' => 1,
  32. 'sort' => 2,
  33. 'minAmount' => 0.00,
  34. 'minNum' => 0,
  35. 'unMeet' => 0,
  36. 'unMeetFee' => 0.00,
  37. 'unMeetLockType' => 0,
  38. 'unMeetLockSeconds' => 1800,
  39. 'startKm' => 0.00,
  40. 'startPrice' => 0.00,
  41. 'perKmPrice' => 0.00,
  42. 'changeRate' => 0.00
  43. ],
  44. 2 => [
  45. 'name' => '跑腿',
  46. 'originName' => '跑腿',
  47. 'calcType' => 0,
  48. 'status' => 1,
  49. 'sort' => 3,
  50. 'minAmount' => 0.00,
  51. 'minNum' => 0,
  52. 'unMeet' => 0,
  53. 'unMeetFee' => 0.00,
  54. 'unMeetLockType' => 0,
  55. 'unMeetLockSeconds' => 1800,
  56. 'startKm' => 0.00,
  57. 'startPrice' => 0.00,
  58. 'perKmPrice' => 0.00,
  59. 'changeRate' => 0.00
  60. ],
  61. 4 => [
  62. 'name' => '快递',
  63. 'originName' => '快递',
  64. 'calcType' => 0,
  65. 'status' => 1,
  66. 'sort' => 4,
  67. 'minAmount' => 0.00,
  68. 'minNum' => 0,
  69. 'unMeet' => 0,
  70. 'unMeetFee' => 0.00,
  71. 'unMeetLockType' => 0,
  72. 'unMeetLockSeconds' => 1800,
  73. 'startKm' => 0.00,
  74. 'startPrice' => 0.00,
  75. 'perKmPrice' => 0.00,
  76. 'changeRate' => 0.00
  77. ],
  78. 3 => [
  79. 'name' => '物流',
  80. 'originName' => '物流',
  81. 'calcType' => 0,
  82. 'status' => 1,
  83. 'sort' => 5,
  84. 'minAmount' => 0.00,
  85. 'minNum' => 0,
  86. 'unMeet' => 0,
  87. 'unMeetFee' => 0.00,
  88. 'unMeetLockType' => 0,
  89. 'unMeetLockSeconds' => 1800,
  90. 'startKm' => 0.00,
  91. 'startPrice' => 0.00,
  92. 'perKmPrice' => 0.00,
  93. 'changeRate' => 0.00
  94. ],
  95. ],
  96. // 花店配送方式默认配置(xhPsMethod):与 ghs shMethod 独立,新店注册/首次拉配置时写入
  97. // 默认仅启用跑腿(用自定义计费)+自取;送货/物流/快递禁用
  98. 'psMethod' => [
  99. 0 => [
  100. 'name' => '送货',
  101. 'originName' => '送货',
  102. 'calcType' => 0,
  103. 'status' => 0,
  104. 'sort' => 3,
  105. 'minAmount' => 0.00,
  106. 'minNum' => 0,
  107. 'unMeet' => 0,
  108. 'unMeetFee' => 0.00,
  109. 'unMeetLockType' => 0,
  110. 'unMeetLockSeconds' => 1800,
  111. 'startKm' => 0.00,
  112. 'startPrice' => 0.00,
  113. 'perKmPrice' => 0.00,
  114. 'changeRate' => 0.00,
  115. 'hsFreeKm' => 0.00,
  116. 'hsPerKmPrice' => 0.00,
  117. ],
  118. 1 => [
  119. 'name' => '自取',
  120. 'originName' => '自取',
  121. 'calcType' => 0,
  122. 'status' => 1,
  123. 'sort' => 2,
  124. 'minAmount' => 0.00,
  125. 'minNum' => 0,
  126. 'unMeet' => 0,
  127. 'unMeetFee' => 0.00,
  128. 'unMeetLockType' => 0,
  129. 'unMeetLockSeconds' => 1800,
  130. 'startKm' => 0.00,
  131. 'startPrice' => 0.00,
  132. 'perKmPrice' => 0.00,
  133. 'changeRate' => 0.00,
  134. 'hsFreeKm' => 0.00,
  135. 'hsPerKmPrice' => 0.00,
  136. ],
  137. 2 => [
  138. 'name' => '跑腿',
  139. 'originName' => '跑腿',
  140. // 新店默认用自定义计费,避免未绑定跑腿商户无法下单
  141. 'calcType' => 1,
  142. 'status' => 1,
  143. 'sort' => 1,
  144. 'minAmount' => 0.00,
  145. 'minNum' => 0,
  146. 'unMeet' => 0,
  147. 'unMeetFee' => 0.00,
  148. 'unMeetLockType' => 0,
  149. 'unMeetLockSeconds' => 1800,
  150. 'startKm' => 5.00,
  151. 'startPrice' => 15.00,
  152. 'perKmPrice' => 3.00,
  153. 'changeRate' => 0.00,
  154. 'hsFreeKm' => 0.00,
  155. 'hsPerKmPrice' => 0.00,
  156. ],
  157. 3 => [
  158. 'name' => '物流',
  159. 'originName' => '物流',
  160. 'calcType' => 0,
  161. 'status' => 0,
  162. 'sort' => 5,
  163. 'minAmount' => 0.00,
  164. 'minNum' => 0,
  165. 'unMeet' => 0,
  166. 'unMeetFee' => 0.00,
  167. 'unMeetLockType' => 0,
  168. 'unMeetLockSeconds' => 1800,
  169. 'startKm' => 0.00,
  170. 'startPrice' => 0.00,
  171. 'perKmPrice' => 0.00,
  172. 'changeRate' => 0.00,
  173. 'hsFreeKm' => 0.00,
  174. 'hsPerKmPrice' => 0.00,
  175. ],
  176. 4 => [
  177. 'name' => '快递',
  178. 'originName' => '快递',
  179. 'calcType' => 0,
  180. 'status' => 0,
  181. 'sort' => 4,
  182. 'minAmount' => 0.00,
  183. 'minNum' => 0,
  184. 'unMeet' => 0,
  185. 'unMeetFee' => 0.00,
  186. 'unMeetLockType' => 0,
  187. 'unMeetLockSeconds' => 1800,
  188. 'startKm' => 0.00,
  189. 'startPrice' => 0.00,
  190. 'perKmPrice' => 0.00,
  191. 'changeRate' => 0.00,
  192. 'hsFreeKm' => 0.00,
  193. 'hsPerKmPrice' => 0.00,
  194. ],
  195. ],
  196. //APP通知打开关闭状态 1打开 0关闭
  197. 'appNotice' => 1,
  198. //微信通知打开关闭状态 1打开 0关闭
  199. 'wxNotice' => 1,
  200. //是否具备地址功能 0不具备 1具备
  201. 'hasMap' => 1,
  202. //mainId对应物流月结账号
  203. 'expressBizIdMap' => [
  204. //长春花路鲜花,
  205. '36707' => '4312960899',
  206. //龙岩花掌柜
  207. '50' => '5925274162',
  208. ],
  209. //花材售后原因
  210. 'itemRefundOption' => [
  211. 0 => ['id' => 0, 'name' => '未选'],
  212. 1 => ['id' => 1, 'name' => '烂瓣,掉瓣'],
  213. 2 => ['id' => 2, 'name' => '上点'],
  214. 3 => ['id' => 3, 'name' => '少货'],
  215. 4 => ['id' => 4, 'name' => '品质问题退差价'],
  216. ],
  217. //允许看商家列表的人员
  218. 'couldLookAllShop' => [
  219. 4,//石头
  220. 7335,//骆总
  221. 1960,//少奇
  222. ],
  223. 'getPayType' => 1,
  224. 'appVersion' => 2,
  225. 'transType' => [
  226. //德邦
  227. 'db' => 0,
  228. //顺丰
  229. 'sh' => 1,
  230. //冷链
  231. 'll' => 2,
  232. //航空
  233. 'hk' => 3,
  234. //同城配送
  235. 'local' => 4,
  236. //到店自取
  237. 'zt' => 5,
  238. ],
  239. //昆明基地包装费计算
  240. 'kmPackCost' => [
  241. ['num' => 10, 'amount' => 15],
  242. ['num' => 25, 'amount' => 25],
  243. ['num' => 30, 'amount' => 30],
  244. ['num' => 40, 'amount' => 35],
  245. ['num' => 50, 'amount' => 40],
  246. ['num' => 60, 'amount' => 45],
  247. ['num' => 80, 'amount' => 65],
  248. ['num' => 100, 'amount' => 80],
  249. ],
  250. //昆明基地包装费计算2
  251. 'kmPackCost2' => [
  252. ['num' => 10, 'amount' => 0],
  253. ['num' => 25, 'amount' => 0],
  254. ['num' => 30, 'amount' => 0],
  255. ['num' => 40, 'amount' => 0],
  256. ['num' => 50, 'amount' => 0],
  257. ['num' => 60, 'amount' => 0],
  258. ['num' => 80, 'amount' => 0],
  259. ['num' => 100, 'amount' => 0],
  260. ],
  261. //昆明基地包装费计算3
  262. 'kmPackCost3' => [
  263. ['num' => 20, 'amount' => 30],
  264. ['num' => 50, 'amount' => 60],
  265. ['num' => 100, 'amount' => 80],
  266. ],
  267. //测试环境
  268. // 'kmPackCost' => [
  269. // ['num' => 10, 'amount' => 0.15],
  270. // ['num' => 25, 'amount' => 0.25],
  271. // ['num' => 30, 'amount' => 0.3],
  272. // ['num' => 40, 'amount' => 0.35],
  273. // ['num' => 50, 'amount' => 0.40],
  274. // ['num' => 60, 'amount' => 0.45],
  275. // ['num' => 80, 'amount' => 0.65],
  276. // ['num' => 100, 'amount' => 0.8],
  277. // ],
  278. //重量计算标准,包括德邦、顺丰、冷链和航空。其中冷链物流,40公斤以下小件,60公斤以下中件,100公斤以下大件
  279. 'transCost' => [
  280. ['sign' => 0, 'perKiloCost' => 5],
  281. ['sign' => 1, 'perKiloCost' => 9],
  282. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 50], ['num' => 30, 'amount' => 80], ['num' => 50, 'amount' => 120], ['num' => 70, 'amount' => 180], ['num' => 100, 'amount' => 200]]],
  283. ['sign' => 3, 'perKiloCost' => 4],
  284. ['sign' => 4, 'perKiloCost' => 0],
  285. ['sign' => 5, 'perKiloCost' => 0],
  286. ],
  287. //测试环境,德邦、顺丰、冷链和航空
  288. // 'transCost' => [
  289. // ['sign' => 0, 'perKiloCost' => 0.05],
  290. // ['sign' => 1, 'perKiloCost' => 0.09],
  291. // ['sign' => 2, 'option' => [['num' => 40, 'amount' => 0.05], ['num' => 60, 'amount' => 0.1], ['num' => 100, 'amount' => 0.2]]],
  292. // ['sign' => 3, 'perKiloCost' => 0.04],
  293. // ],
  294. //默认开启订阅消息
  295. 'subscribeMessage' => 1,
  296. 'hdMiniMessage' => [
  297. //优惠券到账通知
  298. 'giveCoupon' => ['msgId' => '_MqYqXLgNPWvHg-tUuh3vJMTb2aAOvvIFf0Vm2pwjiI'],
  299. //购买成功通知
  300. 'cgSuccess' => ['msgId' => 'UAIsxaFbkyi34CRYqncQ6pNsjNgn6Gcqte_AoHmPbxA'],
  301. //账单生成提醒
  302. 'remindHdClear' => ['msgId' => 'Xyjo2M0uMbrTLg76wuMf0b7i_tqjcqosKj-hACDHPds'],
  303. //发货通知
  304. 'fhNotice' => ['msgId' => 'WyktXtxES58RwUbkXhD1N9lNNmxM3tNKiOuDf_YG_DQ'],
  305. //售后通知
  306. 'afterSale' => ['msgId' => 'QbQLZy-Mxv1wrqKHhaH8lM6BuXDZv4IoOZPHpJQmMTY'],
  307. ],
  308. 'hdMiniMessageDev' => [
  309. //优惠券到账通知
  310. 'giveCoupon' => ['msgId' => 'r7BIUWRqpVmqqOqdtq5BhjffkLyOaZxi0fvme_l-V8A'],
  311. //购买成功通知
  312. 'cgSuccess' => ['msgId' => 'ZfCmPfD96W_H0-pWDyQHCJQC5ht41NXtTS8nP28xKQQ'],
  313. //账单生成提醒
  314. 'remindHdClear' => ['msgId' => '1mj55S920TbW_iF_jpHQrdVShs7LQgPBzy_GeU3kbhk'],
  315. //发货通知
  316. 'fhNotice' => ['msgId' => 'aqrvfRVus0PbxaSeqhuPd6W4T7awoQX9nIT2y2jLPB0'],
  317. //售后通知
  318. 'afterSale' => ['msgId' => 'eLRc2blfKBMsuGHkFnQ_rWDBZwMmJErr7L-BDwAHBLc'],
  319. ],
  320. 'mtConfig' => [
  321. 'app_id' => '119094',
  322. 'app_secret' => 'b7e86d768391180f805621b40ec31e33',
  323. 'request_url' => '', // 默认 `https://waimaiopen.meituan.com/api/v1/`
  324. ],
  325. //小程序原始ID
  326. 'miniOriginalId' => [
  327. 'dev' => ['mall' => 'gh_071ff9f39df6', 'hd' => 'gh_177befc881cb', 'ghs' => 'gh_2a429284375a', 'jd' => '',],
  328. 'product' => ['mall' => 'gh_38f1a1af64ca', 'hd' => 'gh_73b8b357d19a', 'ghs' => 'gh_2e886744af66', 'jd' => '',],
  329. 'current' => ['mall' => '', 'hd' => '', 'ghs' => '', 'jd' => '',],
  330. ],
  331. //是否需要打印
  332. 'needPrint' => [
  333. 'need' => 1,
  334. 'noNeed' => 2,
  335. ],
  336. //结账方式
  337. 'hasPay' => [
  338. //待付款,扫码付
  339. 'unPay' => 0,
  340. //线下
  341. 'payed' => 1,
  342. //欠款
  343. 'debt' => 2,
  344. //现金
  345. 'cash' => 3,
  346. //余额
  347. 'balance' => 4,
  348. ],
  349. 'hasPayMap' => [
  350. ],
  351. //产品属性
  352. 'property' => [
  353. //商品
  354. 'goods' => 0,
  355. //花材
  356. 'item' => 1,
  357. ],
  358. //单位类型 0大单位 1小单位
  359. 'unitType' => [
  360. 'big' => 0,
  361. 'small' => 1,
  362. ],
  363. //配送方式,0送货上门 1到店自取 2跑腿 3发物流 4快递
  364. 'sendType' => [
  365. 'carGet' => 0,
  366. 'shopGet' => 1,
  367. 'thirdSend' => 2,
  368. 'wl' => 3,
  369. 'express' => 4,
  370. ],
  371. //批发店囤货时显示给零售库存的最高值
  372. 'showMaxStock' => 260,
  373. //余额满miniCashAmount才能提现
  374. 'miniCashAmount' => 1,
  375. //本条流水的余额是否可以提现
  376. 'yeTx' => [
  377. //不可以
  378. 'canNot' => 1,
  379. //可以
  380. 'can' => 2,
  381. ],
  382. //平台资产
  383. 'ptAsset' => [
  384. 'hdBalance' => ['id' => 1, 'name' => '零售余额'],
  385. 'ghsBalance' => ['id' => 2, 'name' => '供货商余额'],
  386. 'hdTxBalance' => ['id' => 3, 'name' => '零售可提现'],
  387. 'ghsTxBalance' => ['id' => 4, 'name' => '供货商可提现'],
  388. ],
  389. //是否在线支付
  390. 'onlinePay' => ['not' => 1, 'yes' => 2],
  391. //商家开单了,客户多少秒后未付款,自动标记欠款。由于未付款单自动标记为欠款,商家开的订单360天内都不过期。此功能弃用
  392. 'local_gys_kd_auto_set_debt_time' => 600,
  393. //客户采购订单有效期是多少秒,有效期内可以支付,到期自动取消。
  394. 'order_pay_has_time' => 600,
  395. //客户采购线上付款的,在订单到期前多少秒还能支付
  396. 'order_online_pay_has_ahead_time' => 100,
  397. 'expressList' => [
  398. [
  399. "id" => 1,
  400. "deliveryId" => "dada",
  401. "deliveryName" => "达达"
  402. ]
  403. ],
  404. //默认的日期搜索选项
  405. 'dateDefaultOption' => [
  406. ['name' => '昨天', 'value' => 'yesterday'],
  407. ['name' => '今天', 'value' => 'today',],
  408. ['name' => '本月', 'value' => 'thisMonth',],
  409. ['name' => '上月', 'value' => 'lastMonth',],
  410. ['name' => '今年', 'value' => 'thisYear',],
  411. ['name' => '近一周', 'value' => 'last7Days',],
  412. ['name' => '近30天', 'value' => 'last30Days',],
  413. ],
  414. //所属平台类型
  415. 'ptStyle' => [
  416. 'hd' => 1,//零售花店端
  417. 'ghs' => 2,//二级批发端
  418. 'mall' => 3,//商城端
  419. 'kmGhs' => 4,//基地端
  420. ],
  421. //订单发起方,与ptStyle一致
  422. 'cgStyle' => [
  423. 'hd' => 1,//零售花店端
  424. 'ghs' => 2,//二级批发端
  425. 'mall' => 3,//商城端
  426. 'kmGhs' => 4,//基地端
  427. ],
  428. //结帐方式
  429. 'clearStyle' => [
  430. 'hd2Gys' => 1,//零售主动供货商结帐
  431. 'gys2Hd' => 2,//供货商要求花店结帐
  432. 'gys2KmGys' => 3,//供货商向昆明供货商结帐
  433. 'kmGys2gys' => 4,//昆明供货商向供货商结账
  434. ],
  435. 'merchantStatus' => ['checking' => 0, 'pass' => 1, 'noPass' => 2, 'freeze' => 3, 'unfreeze' => 4, 'shut' => 5],
  436. //涨价方式
  437. 'riseType' => ['noRise' => 0, 'percent' => 1, 'amount' => 2,],
  438. 'riseTypeName' => [0 => '不涨价', 1 => '按百分比', 2 => '按金额'],
  439. //支付方式
  440. 'payWay' => ['wxPay' => 0, 'alipay' => 1, 'balancePay' => 2, 'debtPay' => 3, 'cash' => 4, 'bankCard' => 5, 'unknown' => 9, 'unPay' => 10, 'deduction' => 11,],
  441. 'payWayName' => [0 => '微信', 1 => '支付宝', 2 => '余额', 3 => '欠款', 4 => '现金', 5 => '银行卡', 9 => '其它', 10 => '待付款', 11 => '抵扣'],
  442. 'payWayFullName' => [0 => '微信支付', 1 => '支付宝', 2 => '余额支付', 3 => '欠款支付', 4 => '现金', 5 => '银行卡', 9 => '其它', 10 => '待付款', 11 => '抵扣'],
  443. //后台支付方式选项
  444. 'htPayWayOption' => [
  445. ['name' => '微信', 'id' => 0],
  446. ['name' => '支付宝', 'id' => 1],
  447. ['name' => '现金', 'id' => 4],
  448. ['name' => '银行卡', 'id' => 5],
  449. ],
  450. //零售会员的等级
  451. 'memberLevel' => ['general' => 1, 'silver' => 2, 'gold' => 3, 'diamond' => 4, 'blackGold' => 5,],
  452. 'memberLevelName' => [1 => '会员', 2 => '白银会员', 3 => '黄金会员', 4 => '钻石会员', 5 => '黑金会员'],
  453. 'memberLevelMap' => [
  454. ['name' => '会员', 'level' => 1, 'levelSn' => 'general', 'amount' => 3000,],
  455. ['name' => '白银会员', 'level' => 2, 'levelSn' => 'silver', 'amount' => 6000,],
  456. ['name' => '黄金会员', 'level' => 3, 'levelSn' => 'gold', 'amount' => 10000,],
  457. ['name' => '钻石会员', 'level' => 4, 'levelSn' => 'diamond', 'amount' => 20000,],
  458. ['name' => '黑金会员', 'level' => 5, 'levelSn' => 'blackGold', 'amount' => 100000,],
  459. ],
  460. 'rechargeMap' => [
  461. ['recharge' => 500, 'give' => 3,],
  462. ['recharge' => 1000, 'give' => 10,],
  463. ['recharge' => 2000, 'give' => 30,],
  464. ['recharge' => 5000, 'give' => 100,],
  465. ['recharge' => 10000, 'give' => 280,],
  466. ],
  467. //优惠类型
  468. 'discountType' => [
  469. //没有优惠
  470. 'noDiscount' => 1,
  471. //使用平台优惠券
  472. 'usePtCoupon' => 2,
  473. //商家打折
  474. 'discount' => 3,
  475. //红包
  476. 'hb' => 4,
  477. ],
  478. 'payStatus' => ['cancel' => -1, 'waitForPay' => 0, 'waitForSend' => 1],
  479. 'sendStatusName' => [0 => '待发货', 1 => '送货中', 2 => '已送达'],
  480. 'sendStatus' => ['waitForSend' => 0, 'sending' => 1, 'reached' => 2],
  481. 'replyType' => ['redirectUrl' => 0, 'text' => 1, 'news' => 2, 'multiNews' => 3],
  482. 'goodsStatusName' => [0 => '正常', 1 => '下架', 2 => '删除'],
  483. 'goodsStatus' => ['online' => 0, 'soldOut' => 1, 'del' => 2],
  484. 'goodsDelStatusName' => [0 => '正常,未删除', 1 => '删除'],
  485. 'goodsDelStatus' => ['normal' => 0, 'del' => 1],
  486. 'reachPeriodName' => [0 => '上午', 1 => '下午', 2 => '晚上'],
  487. 'reachPeriod' => ['am' => 0, 'pm' => 1, 'night' => 2],
  488. //运费
  489. 'freight' => [
  490. 'firstDistance' => 5000,//5公里内
  491. 'firstPrice' => 0,//16元运费
  492. 'nextDistance' => 1000,//每增加1公里
  493. 'nextPrice' => 2,//增加2元
  494. ],
  495. //4
  496. "io" => ['payout' => 0, 'income' => 1, 'other' => 2],
  497. "ioName" => [0 => '支出', 1 => '收入', 2 => '其它'],
  498. //流水类型,充值支付回调时的订单类型
  499. "capitalType" => [
  500. //散客买花
  501. 'xhOrder' => ['id' => 0, 'name' => 'xhOrder'],
  502. 'xhActiveOrder' => ['id' => 2, 'name' => 'xhActiveOrder'],
  503. //散客向零售花店充值
  504. 'xhRecharge' => ['id' => 4, 'name' => 'xhRecharge'],
  505. //支付宝关联微信
  506. 'xhUserUnite' => ['id' => 5, 'name' => 'xhUserUnite'],
  507. 'xhDrawCash' => ['id' => 6, 'name' => 'xhDrawCash'],
  508. 'xhApplyOrder' => ['id' => 7, 'name' => 'xhApplyOrder'],
  509. 'xhMergeUser' => ['id' => 8, 'name' => 'xhMergeUser'],
  510. 'xhRenew' => ['id' => 9, 'name' => 'xhRenew'],
  511. //供货商订单
  512. 'xhGhsOrder' => ['id' => 10, 'name' => 'xhGhsOrder'],
  513. //零售采购
  514. 'xhPurchase' => ['id' => 11, 'name' => 'xhPurchase'],
  515. //培训报名
  516. 'pxApply' => ['id' => 12, 'name' => 'pxApply'],
  517. //花店采购结算
  518. 'hdPurchaseClear' => ['id' => 20, 'name' => 'hdPurchaseClear'],
  519. //供货商采购
  520. 'ghsPurchase' => ['id' => 25, 'name' => 'ghsPurchase'],
  521. //供货商出库
  522. 'ghsCheckOut' => ['id' => 26, 'name' => 'ghsCheckOut'],
  523. //供货商入库
  524. 'ghsCheckIn' => ['id' => 27, 'name' => 'ghsCheckIn'],
  525. 'usePtCoupon' => ['id' => 30, 'name' => 'usePtCoupon'],
  526. 'wastage' => ['id' => 35, 'name' => 'wastage'],
  527. //零售采购退款
  528. 'cgRefund' => ['id' => 38, 'name' => 'cgRefund'],
  529. //供货商销售退款
  530. 'saleRefund' => ['id' => 40, 'name' => 'saleRefund'],
  531. 'pd' => ['id' => 45, 'name' => 'pd'],
  532. //供货商的佣金 lqh 2021.12.11
  533. 'brokerage' => ['id' => 46, 'name' => 'brokerage'],
  534. //供货商销售单对账
  535. 'ghsXsClear' => ['id' => 20, 'name' => 'ghsXsClear'],
  536. //城市供货商的预订单多付退款
  537. 'ghsBookRefund' => ['id' => 48, 'name' => 'ghsBookRefund'],
  538. //花店预订退款
  539. 'hdBookRefund' => ['id' => 50, 'name' => 'hdBookRefund'],
  540. //城市供货商的预订单少付补款
  541. 'ghsBookOrderGetBack' => ['id' => 51, 'name' => 'ghsBookOrderGetBack'],
  542. //花店预订补尾款
  543. 'hdBookFinalPay' => ['id' => 52, 'name' => 'hdBookFinalPay'],
  544. 'hdCgPlant' => ['id' => 53, 'name' => 'hdCgPlant'],
  545. //花店订单退款
  546. 'hdOrderRefund' => ['id' => 54, 'name' => 'hdOrderRefund'],
  547. //存入现金
  548. 'inMoney' => ['id' => 55, 'name' => 'inMoney'],
  549. //取出现金
  550. 'outMoney' => ['id' => 56, 'name' => 'outMoney'],
  551. //支出登记
  552. 'expendRegister' => ['id' => 57, 'name' => 'expendRegister'],
  553. //花店销售结账单
  554. 'hdXsClear' => ['id' => 58, 'name' => 'hdXsClear'],
  555. 'hdRefund' => ['id' => 59, 'name' => 'hdRefund'],
  556. 'ljhApply' => ['id' => 60, 'name' => 'ljhApply'],
  557. //供货商结账支出
  558. 'ghsClearExpend' => ['id' => 61, 'name' => 'ghsClearExpend'],
  559. //供货商帮客户充值
  560. 'ghsHelpCustomRecharge' => ['id' => 62, 'name' => 'ghsHelpCustomRecharge'],
  561. //客户叫供货商充值
  562. 'customAskGhsRecharge' => ['id' => 63, 'name' => 'customAskGhsRecharge'],
  563. //供货商帮客户用余额结账
  564. 'ghsHelpCustomUseBalanceClear' => ['id' => 64, 'name' => 'ghsHelpCustomUseBalanceClear'],
  565. //客户请供货商帮忙用余额结账
  566. 'customAskGhsUseBalanceClear' => ['id' => 65, 'name' => 'customAskGhsUseBalanceClear'],
  567. //客户主动向供货商充值
  568. 'customRechargeToGhs' => ['id' => 66, 'name' => 'customRechargeToGhs'],
  569. //供货商采购单售后
  570. 'ghsCgOrderRefund' => ['id' => 67, 'name' => 'ghsCgOrderRefund'],
  571. //供货商采购单结账
  572. 'ghsCgOrderClear' => ['id' => 68, 'name' => 'ghsCgOrderClear'],
  573. //供货商的采购单取消
  574. 'ghsCgCancel' => ['id' => 70, 'name' => 'ghsCgCancel'],
  575. //借库存
  576. 'loanStock' => ['id' => 71, 'name' => 'loanStock'],
  577. //新增预订
  578. 'addBook' => ['id' => 72, 'name' => 'addBook'],
  579. //减少预订
  580. 'delBook' => ['id' => 73, 'name' => 'delBook'],
  581. //供货商采购退款
  582. 'ghsCgRefund' => ['id' => 74, 'name' => 'ghsCgRefund'],
  583. //供货商帮客户充值(售后返充)
  584. 'ghsHelpCustomRechargeReturn' => ['id' => 75, 'name' => 'ghsHelpCustomRechargeReturn'],
  585. //客户叫供货商充值(售后返充)
  586. 'customAskGhsRechargeReturn' => ['id' => 76, 'name' => 'customAskGhsRechargeReturn'],
  587. //减少散客的余额
  588. 'deduct' => ['id' => 77, 'name' => 'deduct'],
  589. //如果涉及是系统处理和操作,都可以用这个流水类型
  590. 'system' => ['id' => 78, 'name' => 'system'],
  591. 'scanPay' => ['id' => 79, 'name' => 'scanPay'],
  592. 'scanPayRefund' => ['id' => 80, 'name' => 'scanPayRefund'],
  593. // AccountMoneyClass 首次合并挂账入 balance 时写入余额变动的事项类型
  594. 'balanceMerge' => ['id' => 81, 'name' => 'balanceMerge'],
  595. // 客户充值退款(供货商后台操作)
  596. 'customRechargeRefund' => ['id' => 82, 'name' => 'customRechargeRefund'],
  597. // 商城分红存入花店余额(xhDistributionDepositLog)
  598. 'distributionDeposit' => ['id' => 83, 'name' => 'distributionDeposit'],
  599. // 花店注册年度会员支付
  600. 'hdRegisterOrder' => ['id' => 84, 'name' => 'hdRegisterOrder'],
  601. // 邀请佣金存入中央钱包(xhMainInviteFlow + xhMainWalletChange)
  602. 'inviteCommissionDeposit' => ['id' => 85, 'name' => 'inviteCommissionDeposit'],
  603. // 中央钱包微信充值(xhMainWalletRecharge + xhMainWalletChange)
  604. 'mainWalletRecharge' => ['id' => 86, 'name' => 'mainWalletRecharge'],
  605. ],
  606. "capitalTypeList" => [//流水类型的对应链接,后台收支明细查看时跳转的链接
  607. 0 => ['link' => '/capital/order-detail', 'name' => '网店', 'orderLink' => '/order/detail', 'id' => 0,],
  608. 2 => ['link' => '/capital/active-order-detail', 'name' => '活动报名', 'id' => 2,],
  609. 4 => ['link' => '/capital/recharge-detail', 'name' => '充值', 'id' => 4,],
  610. 5 => ['link' => '/capital/user-unite', 'name' => '帐号关联', 'id' => 5,],
  611. 6 => ['link' => '/capital/draw-cash', 'name' => '提现', 'id' => 6,],
  612. 7 => ['link' => '/capital/apply-order-detail', 'name' => '接入申请', 'id' => 7,],
  613. 8 => ['link' => '/capital/merge-user', 'name' => '帐号合并', 'id' => 8,],
  614. 9 => ['link' => '/capital/renew', 'name' => '续费', 'id' => 9,],
  615. 10 => ['link' => '/capital/order-detail', 'name' => '订单', 'id' => 10,],
  616. 11 => ['link' => '/capital/purchase-detail', 'name' => '订单', 'id' => 11,],
  617. 12 => ['link' => '/capital/purchase-detail', 'name' => '培训报名', 'id' => 12,],
  618. 20 => ['link' => '', 'name' => '采购结算', 'id' => 20,],
  619. 25 => ['link' => '', 'name' => '采购', 'id' => 25,],
  620. 30 => ['link' => '', 'name' => '使用平台优惠券', 'id' => 30,],
  621. 35 => ['link' => '', 'name' => '报损', 'id' => 35,],
  622. 38 => ['link' => '', 'name' => '采购退款', 'id' => 38,],
  623. 40 => ['link' => '', 'name' => '销售退款', 'id' => 40,],
  624. 45 => ['link' => '', 'name' => '盘点', 'id' => 45,],
  625. 46 => ['link' => '', 'name' => '佣金', 'id' => 46,],
  626. 48 => ['link' => '', 'name' => '预订单多退少补', 'id' => 48,],
  627. 50 => ['link' => '', 'name' => '预订单多退少补', 'id' => 50,],
  628. 51 => ['link' => '', 'name' => '预订单补款', 'id' => 51,],
  629. 52 => ['link' => '', 'name' => '花店预订补尾款', 'id' => 52,],
  630. 53 => ['link' => '', 'name' => '采购盆栽等', 'id' => 53,],
  631. 54 => ['link' => '', 'name' => '退货退款', 'id' => 54,],
  632. 55 => ['link' => '', 'name' => '存入现金', 'id' => 55,],
  633. 56 => ['link' => '', 'name' => '取出现金', 'id' => 56,],
  634. 57 => ['link' => '', 'name' => '支出登记', 'id' => 57,],
  635. 58 => ['link' => '', 'name' => '结算', 'id' => 58,],
  636. 59 => ['link' => '', 'name' => '退货退款', 'id' => 59,],
  637. 60 => ['link' => '', 'name' => '零交会报名', 'id' => 60,],
  638. 61 => ['link' => '', 'name' => '结账支出', 'id' => 61,],
  639. 62 => ['link' => '', 'name' => '充值', 'id' => 62,],
  640. 63 => ['link' => '', 'name' => '充值', 'id' => 63,],
  641. 64 => ['link' => '', 'name' => '结账', 'id' => 64,],
  642. 65 => ['link' => '', 'name' => '结账', 'id' => 65,],
  643. 66 => ['link' => '', 'name' => '充值', 'id' => 66,],
  644. 67 => ['link' => '', 'name' => '采购售后', 'id' => 67,],
  645. 68 => ['link' => '', 'name' => '采购单结账', 'id' => 68,],
  646. 70 => ['link' => '', 'name' => '采购单取消', 'id' => 70,],
  647. 71 => ['link' => '', 'name' => '借库存', 'id' => 71,],
  648. 72 => ['link' => '', 'name' => '新增预订', 'id' => 72,],
  649. 73 => ['link' => '', 'name' => '减少预订', 'id' => 73,],
  650. 74 => ['link' => '', 'name' => '采购退款', 'id' => 74,],
  651. 75 => ['link' => '', 'name' => '售后返充', 'id' => 75,],
  652. 76 => ['link' => '', 'name' => '售后返充', 'id' => 76,],
  653. 77 => ['link' => '', 'name' => '手动减少', 'id' => 77,],
  654. 78 => ['link' => '', 'name' => '系统操作', 'id' => 78,],
  655. 79 => ['link' => '', 'name' => '扫码付款', 'id' => 79,],
  656. 80 => ['link' => '', 'name' => '扫码退款', 'id' => 80,],
  657. 81 => ['link' => '', 'name' => '账户合并', 'id' => 81,],
  658. 82 => ['link' => '', 'name' => '充值退款', 'id' => 82,],
  659. 83 => ['link' => '', 'name' => '分红存入', 'id' => 83,],
  660. ],
  661. //用户来源
  662. 'userSource' => [
  663. 0 => 'official',
  664. 1 => 'alipay',
  665. 2 => 'mini',
  666. 3 => 'app',
  667. ],
  668. 'userSourceGetId' => [
  669. 'official' => ['id' => 0, 'name' => 'official'],
  670. 'alipay' => ['id' => 1, 'name' => 'alipay'],
  671. 'mini' => ['id' => 2, 'name' => 'mini'],
  672. 'app' => ['id' => 3, 'name' => 'app'],
  673. ],
  674. //来源
  675. 'fromType' => [
  676. 'shop' => 1,//门店
  677. 'mall' => 2,//商城
  678. 'friend' => 3,//微信朋友圈
  679. 'mt' => 4,//美团
  680. 'elm' => 5,//饿了么
  681. ],
  682. 'fromTypeMap' => [
  683. 1 => '门店',
  684. 2 => '商城',
  685. 3 => '微信',
  686. 4 => '美团',
  687. 5 => '饿了么',
  688. ],
  689. 'expendType' => [
  690. 'dz' => 0,//店租
  691. 'sd' => 1,//水电
  692. 'wy' => 2,//物业
  693. 'hs' => 3,//伙食
  694. 'fz' => 4,//房租
  695. 'qt' => 5,//其它
  696. ],
  697. 'expendTypeMap' => [
  698. 0 => '店租', 1 => '水电', 2 => '物业', 3 => '伙食', 4 => '房租', 5 => '其它', 6 => '物品', 7 => '办公用品', 8 => '运费', 9 => '工资', 10 => '线下售后'
  699. ],
  700. 'expendTypeList' => [
  701. ['id' => 9, 'name' => '工资'],
  702. ['id' => 8, 'name' => '运费'],
  703. ['id' => 7, 'name' => '办公用品'],
  704. ['id' => 6, 'name' => '物品'],
  705. ['id' => 0, 'name' => '店租'],
  706. ['id' => 1, 'name' => '水电'],
  707. ['id' => 2, 'name' => '物业'],
  708. ['id' => 3, 'name' => '伙食'],
  709. ['id' => 10, 'name' => '线下售后'],
  710. ['id' => 4, 'name' => '房租'],
  711. ['id' => 5, 'name' => '其它'],
  712. ],
  713. 'hdRegisterConfig' => [
  714. 'price' => 0.02, //花店开通费用
  715. 'commissionAmount' => 88.00, //默认分佣金额 (默认)
  716. 'hdDiscountAmount' => 88.00 //花店优惠金额 (默认)
  717. ]
  718. ];
  719. //取配置文件的值
  720. public static function getDict($category, $first = null, $second = null, $mainId = 0)
  721. {
  722. $respond = self::$data[$category];
  723. if (isset($first) && isset($second)) {
  724. if (isset($respond[$first][$second]) == false) {
  725. util::fail("没有找到相应字典 category:{$category} first:{$first} second:{$second}");
  726. }
  727. return $respond[$first][$second];
  728. }
  729. if (isset($first)) {
  730. if (isset($respond[$first]) == false) {
  731. util::fail("没有找到相应字典 category:{$category} first:{$first}");
  732. }
  733. return $respond[$first];
  734. }
  735. if (getenv('YII_ENV') == 'production') {
  736. //老油云漫梦金鹏 徐记花卉 康多鲜 旭海 不需要收运费,搜索关键词dbNoFee
  737. if (in_array($mainId, [20528, 10866, 38657, 41121]) && $category == 'transCost') {
  738. $respond = [
  739. ['sign' => 0, 'perKiloCost' => 0],
  740. ['sign' => 1, 'perKiloCost' => 0],
  741. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 0], ['num' => 30, 'amount' => 0], ['num' => 50, 'amount' => 0], ['num' => 70, 'amount' => 0], ['num' => 100, 'amount' => 0]]],
  742. ['sign' => 3, 'perKiloCost' => 0],
  743. ['sign' => 4, 'perKiloCost' => 0],
  744. ['sign' => 5, 'perKiloCost' => 0],
  745. ];
  746. }
  747. } else {
  748. }
  749. return $respond;
  750. }
  751. //列出所有的常量 ssh 2021.3.18
  752. public static function get($mainId = 0)
  753. {
  754. $respond = self::$data;
  755. //根据环境获取小程序原始ID
  756. if (isset($respond['miniOriginalId']['dev'])) {
  757. $respond['miniOriginalId']['current'] = $respond['miniOriginalId']['dev'];
  758. }
  759. if (getenv('YII_ENV') == 'production') {
  760. if (isset($respond['miniOriginalId']['product'])) {
  761. $respond['miniOriginalId']['current'] = $respond['miniOriginalId']['product'];
  762. }
  763. }
  764. if (getenv('YII_ENV') != 'production') {
  765. $respond['hdMiniMessage'] = $respond['hdMiniMessageDev'];
  766. }
  767. if (getenv('YII_ENV') == 'production') {
  768. //老油云漫梦金鹏、徐记花卉、康多鲜、旭海不需要收运费,搜索关键词dbNoFee
  769. if (in_array($mainId, [20528, 10866, 38657, 41121])) {
  770. $respond['transCost'] = [
  771. ['sign' => 0, 'perKiloCost' => 0],
  772. ['sign' => 1, 'perKiloCost' => 0],
  773. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 0], ['num' => 30, 'amount' => 0], ['num' => 50, 'amount' => 0], ['num' => 70, 'amount' => 0], ['num' => 100, 'amount' => 0]]],
  774. ['sign' => 3, 'perKiloCost' => 0],
  775. ['sign' => 4, 'perKiloCost' => 0],
  776. ['sign' => 5, 'perKiloCost' => 0],
  777. ];
  778. }
  779. } else {
  780. }
  781. return $respond;
  782. }
  783. public static function getNewMethod($shopId)
  784. {
  785. $newShop = !getenv('NEW_METHOD_SHOP') ? '' : getenv('NEW_METHOD_SHOP');
  786. if (empty($newShop)) {
  787. return [];
  788. }
  789. $newShop = trim($newShop);
  790. $arr = explode(',', $newShop);
  791. if (empty($arr)) {
  792. return false;
  793. }
  794. if (in_array($shopId, $arr)) {
  795. return true;
  796. }
  797. return false;
  798. }
  799. }