dict.php 30 KB

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