dict.php 32 KB

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