dict.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. <?php
  2. namespace common\components;
  3. //字典
  4. class dict
  5. {
  6. public static $data = [
  7. 'getPayType' => 1,
  8. 'appVersion' => 2,
  9. 'transType' => [
  10. //德邦
  11. 'db' => 0,
  12. //顺丰
  13. 'sh' => 1,
  14. //冷链
  15. 'll' => 2,
  16. //航空
  17. 'hk' => 3,
  18. //同城配送
  19. 'local' => 4,
  20. //到店自取
  21. 'zt' => 5,
  22. ],
  23. //昆明基地包装费计算
  24. 'kmPackCost' => [
  25. ['num' => 10, 'amount' => 15],
  26. ['num' => 25, 'amount' => 25],
  27. ['num' => 30, 'amount' => 30],
  28. ['num' => 40, 'amount' => 35],
  29. ['num' => 50, 'amount' => 40],
  30. ['num' => 60, 'amount' => 45],
  31. ['num' => 80, 'amount' => 65],
  32. ['num' => 100, 'amount' => 80],
  33. ],
  34. //昆明基地包装费计算2
  35. 'kmPackCost2' => [
  36. ['num' => 10, 'amount' => 0],
  37. ['num' => 25, 'amount' => 0],
  38. ['num' => 30, 'amount' => 0],
  39. ['num' => 40, 'amount' => 0],
  40. ['num' => 50, 'amount' => 0],
  41. ['num' => 60, 'amount' => 0],
  42. ['num' => 80, 'amount' => 0],
  43. ['num' => 100, 'amount' => 0],
  44. ],
  45. //测试环境
  46. // 'kmPackCost' => [
  47. // ['num' => 10, 'amount' => 0.15],
  48. // ['num' => 25, 'amount' => 0.25],
  49. // ['num' => 30, 'amount' => 0.3],
  50. // ['num' => 40, 'amount' => 0.35],
  51. // ['num' => 50, 'amount' => 0.40],
  52. // ['num' => 60, 'amount' => 0.45],
  53. // ['num' => 80, 'amount' => 0.65],
  54. // ['num' => 100, 'amount' => 0.8],
  55. // ],
  56. //重量计算标准,包括德邦、顺丰、冷链和航空。其中冷链物流,40公斤以下小件,60公斤以下中件,100公斤以下大件
  57. 'transCost' => [
  58. ['sign' => 0, 'perKiloCost' => 5],
  59. ['sign' => 1, 'perKiloCost' => 9],
  60. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 50], ['num' => 30, 'amount' => 80], ['num' => 50, 'amount' => 120], ['num' => 70, 'amount' => 180], ['num' => 100, 'amount' => 200]]],
  61. ['sign' => 3, 'perKiloCost' => 4],
  62. ['sign' => 4, 'perKiloCost' => 0],
  63. ['sign' => 5, 'perKiloCost' => 0],
  64. ],
  65. //测试环境,德邦、顺丰、冷链和航空
  66. // 'transCost' => [
  67. // ['sign' => 0, 'perKiloCost' => 0.05],
  68. // ['sign' => 1, 'perKiloCost' => 0.09],
  69. // ['sign' => 2, 'option' => [['num' => 40, 'amount' => 0.05], ['num' => 60, 'amount' => 0.1], ['num' => 100, 'amount' => 0.2]]],
  70. // ['sign' => 3, 'perKiloCost' => 0.04],
  71. // ],
  72. //默认开启订阅消息
  73. 'subscribeMessage' => 1,
  74. 'hdMiniMessage' => [
  75. //优惠券到账通知
  76. 'giveCoupon' => ['msgId' => '_MqYqXLgNPWvHg-tUuh3vJMTb2aAOvvIFf0Vm2pwjiI'],
  77. //购买成功通知
  78. 'cgSuccess' => ['msgId' => 'UAIsxaFbkyi34CRYqncQ6pNsjNgn6Gcqte_AoHmPbxA'],
  79. //账单生成提醒
  80. 'remindHdClear' => ['msgId' => 'Xyjo2M0uMbrTLg76wuMf0b7i_tqjcqosKj-hACDHPds'],
  81. //发货通知
  82. 'fhNotice' => ['msgId' => 'WyktXtxES58RwUbkXhD1N9lNNmxM3tNKiOuDf_YG_DQ'],
  83. //售后通知
  84. 'afterSale' => ['msgId' => 'QbQLZy-Mxv1wrqKHhaH8lM6BuXDZv4IoOZPHpJQmMTY'],
  85. ],
  86. 'hdMiniMessageDev' => [
  87. //优惠券到账通知
  88. 'giveCoupon' => ['msgId' => 'r7BIUWRqpVmqqOqdtq5BhjffkLyOaZxi0fvme_l-V8A'],
  89. //购买成功通知
  90. 'cgSuccess' => ['msgId' => 'ZfCmPfD96W_H0-pWDyQHCJQC5ht41NXtTS8nP28xKQQ'],
  91. //账单生成提醒
  92. 'remindHdClear' => ['msgId' => '1mj55S920TbW_iF_jpHQrdVShs7LQgPBzy_GeU3kbhk'],
  93. //发货通知
  94. 'fhNotice' => ['msgId' => 'aqrvfRVus0PbxaSeqhuPd6W4T7awoQX9nIT2y2jLPB0'],
  95. //售后通知
  96. 'afterSale' => ['msgId' => 'eLRc2blfKBMsuGHkFnQ_rWDBZwMmJErr7L-BDwAHBLc'],
  97. ],
  98. 'mtConfig' => [
  99. 'app_id' => '119094',
  100. 'app_secret' => 'b7e86d768391180f805621b40ec31e33',
  101. 'request_url' => '', // 默认 `https://waimaiopen.meituan.com/api/v1/`
  102. ],
  103. //小程序原始ID
  104. 'miniOriginalId' => [
  105. 'dev' => ['mall' => 'gh_071ff9f39df6', 'hd' => 'gh_177befc881cb', 'ghs' => 'gh_2a429284375a', 'jd' => '',],
  106. 'product' => ['mall' => 'gh_38f1a1af64ca', 'hd' => 'gh_73b8b357d19a', 'ghs' => 'gh_2e886744af66', 'jd' => '',],
  107. 'current' => ['mall' => '', 'hd' => '', 'ghs' => '', 'jd' => '',],
  108. ],
  109. //是否需要打印
  110. 'needPrint' => [
  111. 'need' => 1,
  112. 'noNeed' => 2,
  113. ],
  114. //结账方式
  115. 'hasPay' => [
  116. //待付款,扫码付
  117. 'unPay' => 0,
  118. //线下
  119. 'payed' => 1,
  120. //欠款
  121. 'debt' => 2,
  122. //现金
  123. 'cash' => 3,
  124. ],
  125. 'hasPayMap' => [
  126. ],
  127. //产品属性
  128. 'property' => [
  129. //商品
  130. 'goods' => 0,
  131. //花材
  132. 'item' => 1,
  133. ],
  134. //单位类型 0大单位 1小单位
  135. 'unitType' => [
  136. 'big' => 0,
  137. 'small' => 1,
  138. ],
  139. //配送方式,0免费送货 1到店自取 2跑腿 3发物流 4快递
  140. 'sendType' => [
  141. 'carGet' => 0,
  142. 'shopGet' => 1,
  143. 'thirdSend' => 2,
  144. 'wl' => 3,
  145. 'express' => 4,
  146. ],
  147. //批发店囤货时显示给零售库存的最高值
  148. 'showMaxStock' => 260,
  149. //余额满miniCashAmount才能提现
  150. 'miniCashAmount' => 1,
  151. //本条流水的余额是否可以提现
  152. 'yeTx' => [
  153. //不可以
  154. 'canNot' => 1,
  155. //可以
  156. 'can' => 2,
  157. ],
  158. //平台资产
  159. 'ptAsset' => [
  160. 'hdBalance' => ['id' => 1, 'name' => '零售余额'],
  161. 'ghsBalance' => ['id' => 2, 'name' => '供货商余额'],
  162. 'hdTxBalance' => ['id' => 3, 'name' => '零售可提现'],
  163. 'ghsTxBalance' => ['id' => 4, 'name' => '供货商可提现'],
  164. ],
  165. //是否在线支付
  166. 'onlinePay' => ['not' => 1, 'yes' => 2],
  167. //商家开单了,客户多少秒后未付款,自动标记欠款。由于未付款单自动标记为欠款,商家开的订单360天内都不过期。此功能弃用
  168. 'local_gys_kd_auto_set_debt_time' => 600,
  169. //客户采购订单有效期是多少秒,有效期内可以支付,到期自动取消。
  170. 'order_pay_has_time' => 600,
  171. //客户采购线上付款的,在订单到期前多少秒还能支付
  172. 'order_online_pay_has_ahead_time' => 100,
  173. 'expressList' => [
  174. [
  175. "id" => 1,
  176. "deliveryId" => "dada",
  177. "deliveryName" => "达达"
  178. ]
  179. ],
  180. //默认的日期搜索选项
  181. 'dateDefaultOption' => [
  182. ['name' => '昨天', 'value' => 'yesterday'],
  183. ['name' => '今天', 'value' => 'today',],
  184. ['name' => '本月', 'value' => 'thisMonth',],
  185. ['name' => '上月', 'value' => 'lastMonth',],
  186. ['name' => '今年', 'value' => 'thisYear',],
  187. ],
  188. //所属平台类型
  189. 'ptStyle' => [
  190. 'hd' => 1,//零售花店端
  191. 'ghs' => 2,//二级批发端
  192. 'mall' => 3,//商城端
  193. 'kmGhs' => 4,//基地端
  194. ],
  195. //订单发起方,与ptStyle一致
  196. 'cgStyle' => [
  197. 'hd' => 1,//零售花店端
  198. 'ghs' => 2,//二级批发端
  199. 'mall' => 3,//商城端
  200. 'kmGhs' => 4,//基地端
  201. ],
  202. //结帐方式
  203. 'clearStyle' => [
  204. 'hd2Gys' => 1,//零售主动供货商结帐
  205. 'gys2Hd' => 2,//供货商要求花店结帐
  206. 'gys2KmGys' => 3,//供货商向昆明供货商结帐
  207. 'kmGys2gys' => 4,//昆明供货商向供货商结账
  208. ],
  209. 'merchantStatus' => ['checking' => 0, 'pass' => 1, 'noPass' => 2, 'freeze' => 3, 'unfreeze' => 4, 'shut' => 5],
  210. //涨价方式
  211. 'riseType' => ['noRise' => 0, 'percent' => 1, 'amount' => 2,],
  212. 'riseTypeName' => [0 => '不涨价', 1 => '按百分比', 2 => '按金额'],
  213. //支付方式
  214. 'payWay' => ['wxPay' => 0, 'alipay' => 1, 'balancePay' => 2, 'debtPay' => 3, 'cash' => 4, 'bankCard' => 5, 'unknown' => 9, 'unPay' => 10,],
  215. 'payWayName' => [0 => '微信', 1 => '支付宝', 2 => '余额', 3 => '欠款', 4 => '现金', 5 => '银行卡', 9 => '其它', 10 => '待付款'],
  216. 'payWayFullName' => [0 => '微信支付', 1 => '支付宝', 2 => '余额支付', 3 => '欠款支付', 4 => '现金', 5 => '银行卡', 9 => '其它', 10 => '待付款'],
  217. //后台支付方式选项
  218. 'htPayWayOption' => [
  219. ['name' => '微信', 'id' => 0],
  220. ['name' => '支付宝', 'id' => 1],
  221. ['name' => '现金', 'id' => 4],
  222. ['name' => '银行卡', 'id' => 5],
  223. ],
  224. //优惠类型
  225. 'discountType' => [
  226. //没有优惠
  227. 'noDiscount' => 1,
  228. //使用平台优惠券
  229. 'usePtCoupon' => 2,
  230. //商家打折
  231. 'discount' => 3,
  232. //红包
  233. 'hb' => 4,
  234. ],
  235. 'payStatus' => ['cancel' => -1, 'waitForPay' => 0, 'waitForSend' => 1],
  236. 'sendStatusName' => [0 => '待发货', 1 => '送货中', 2 => '已送达'],
  237. 'sendStatus' => ['waitForSend' => 0, 'sending' => 1, 'reached' => 2],
  238. 'replyType' => ['redirectUrl' => 0, 'text' => 1, 'news' => 2, 'multiNews' => 3],
  239. 'goodsStatusName' => [0 => '正常', 1 => '下架', 2 => '删除'],
  240. 'goodsStatus' => ['online' => 0, 'soldOut' => 1, 'del' => 2],
  241. 'goodsDelStatusName' => [0 => '正常,未删除', 1 => '删除'],
  242. 'goodsDelStatus' => ['normal' => 0, 'del' => 1],
  243. 'reachPeriodName' => [0 => '上午', 1 => '下午', 2 => '晚上'],
  244. 'reachPeriod' => ['am' => 0, 'pm' => 1, 'night' => 2],
  245. //运费
  246. 'freight' => [
  247. 'firstDistance' => 5000,//5公里内
  248. 'firstPrice' => 0,//16元运费
  249. 'nextDistance' => 1000,//每增加1公里
  250. 'nextPrice' => 2,//增加2元
  251. ],
  252. "io" => ['payout' => 0, 'income' => 1, 'other' => 2],
  253. "ioName" => [0 => '支出', 1 => '收入', 2 => '其它'],
  254. //流水类型,充值支付回调时的订单类型
  255. "capitalType" => [
  256. 'xhOrder' => ['id' => 0, 'name' => 'xhOrder'],
  257. 'xhActiveOrder' => ['id' => 2, 'name' => 'xhActiveOrder'],
  258. //充值
  259. 'xhRecharge' => ['id' => 4, 'name' => 'xhRecharge'],
  260. //支付宝关联微信
  261. 'xhUserUnite' => ['id' => 5, 'name' => 'xhUserUnite'],
  262. 'xhDrawCash' => ['id' => 6, 'name' => 'xhDrawCash'],
  263. 'xhApplyOrder' => ['id' => 7, 'name' => 'xhApplyOrder'],
  264. 'xhMergeUser' => ['id' => 8, 'name' => 'xhMergeUser'],
  265. 'xhRenew' => ['id' => 9, 'name' => 'xhRenew'],
  266. //供货商订单
  267. 'xhGhsOrder' => ['id' => 10, 'name' => 'xhGhsOrder'],
  268. //零售采购
  269. 'xhPurchase' => ['id' => 11, 'name' => 'xhPurchase'],
  270. //培训报名
  271. 'pxApply' => ['id' => 12, 'name' => 'pxApply'],
  272. //花店采购结算
  273. 'hdPurchaseClear' => ['id' => 20, 'name' => 'hdPurchaseClear'],
  274. //供货商采购
  275. 'ghsPurchase' => ['id' => 25, 'name' => 'ghsPurchase'],
  276. //供货商出库
  277. 'ghsCheckOut' => ['id' => 26, 'name' => 'ghsCheckOut'],
  278. //供货商入库
  279. 'ghsCheckIn' => ['id' => 27, 'name' => 'ghsCheckIn'],
  280. 'usePtCoupon' => ['id' => 30, 'name' => 'usePtCoupon'],
  281. 'wastage' => ['id' => 35, 'name' => 'wastage'],
  282. //零售采购退款
  283. 'cgRefund' => ['id' => 38, 'name' => 'cgRefund'],
  284. //供货商销售退款
  285. 'saleRefund' => ['id' => 40, 'name' => 'saleRefund'],
  286. 'pd' => ['id' => 45, 'name' => 'pd'],
  287. //供货商的佣金 lqh 2021.12.11
  288. 'brokerage' => ['id' => 46, 'name' => 'brokerage'],
  289. //供货商销售单对账
  290. 'ghsXsClear' => ['id' => 20, 'name' => 'ghsXsClear'],
  291. //城市供货商的预订单多付退款
  292. 'ghsBookRefund' => ['id' => 48, 'name' => 'ghsBookRefund'],
  293. //花店预订退款
  294. 'hdBookRefund' => ['id' => 50, 'name' => 'hdBookRefund'],
  295. //城市供货商的预订单少付补款
  296. 'ghsBookOrderGetBack' => ['id' => 51, 'name' => 'ghsBookOrderGetBack'],
  297. //花店预订补尾款
  298. 'hdBookFinalPay' => ['id' => 52, 'name' => 'hdBookFinalPay'],
  299. 'hdCgPlant' => ['id' => 53, 'name' => 'hdCgPlant'],
  300. //花店订单退款
  301. 'hdOrderRefund' => ['id' => 54, 'name' => 'hdOrderRefund'],
  302. //存入现金
  303. 'inMoney' => ['id' => 55, 'name' => 'inMoney'],
  304. //取出现金
  305. 'outMoney' => ['id' => 56, 'name' => 'outMoney'],
  306. //支出登记
  307. 'expendRegister' => ['id' => 57, 'name' => 'expendRegister'],
  308. //花店销售结账单
  309. 'hdXsClear' => ['id' => 58, 'name' => 'hdXsClear'],
  310. 'hdRefund' => ['id' => 59, 'name' => 'hdRefund'],
  311. 'ljhApply' => ['id' => 60, 'name' => 'ljhApply'],
  312. //供货商结账支出
  313. 'ghsClearExpend' => ['id' => 61, 'name' => 'ghsClearExpend'],
  314. //供货商帮客户充值
  315. 'ghsHelpCustomRecharge' => ['id' => 62, 'name' => 'ghsHelpCustomRecharge'],
  316. //客户让供货商帮忙充值
  317. 'customAskGhsRecharge' => ['id' => 63, 'name' => 'customAskGhsRecharge'],
  318. //供货商帮客户用余额结账
  319. 'ghsHelpCustomUseBalanceClear' => ['id' => 64, 'name' => 'ghsHelpCustomUseBalanceClear'],
  320. //客户请供货商帮忙用余额结账
  321. 'customAskGhsUseBalanceClear' => ['id' => 65, 'name' => 'customAskGhsUseBalanceClear'],
  322. //客户主动向供货商充值
  323. 'customRechargeToGhs' => ['id' => 66, 'name' => 'customRechargeToGhs'],
  324. ],
  325. "capitalTypeList" => [//流水类型的对应链接,后台收支明细查看时跳转的链接
  326. 0 => ['link' => '/capital/order-detail', 'name' => '网店', 'orderLink' => '/order/detail', 'id' => 0,],
  327. 2 => ['link' => '/capital/active-order-detail', 'name' => '活动报名', 'id' => 2,],
  328. 4 => ['link' => '/capital/recharge-detail', 'name' => '充值', 'id' => 4,],
  329. 5 => ['link' => '/capital/user-unite', 'name' => '帐号关联', 'id' => 5,],
  330. 6 => ['link' => '/capital/draw-cash', 'name' => '提现', 'id' => 6,],
  331. 7 => ['link' => '/capital/apply-order-detail', 'name' => '接入申请', 'id' => 7,],
  332. 8 => ['link' => '/capital/merge-user', 'name' => '帐号合并', 'id' => 8,],
  333. 9 => ['link' => '/capital/renew', 'name' => '续费', 'id' => 9,],
  334. 10 => ['link' => '/capital/order-detail', 'name' => '订单', 'id' => 10,],
  335. 11 => ['link' => '/capital/purchase-detail', 'name' => '订单', 'id' => 11,],
  336. 12 => ['link' => '/capital/purchase-detail', 'name' => '培训报名', 'id' => 12,],
  337. 20 => ['link' => '', 'name' => '采购结算', 'id' => 20,],
  338. 25 => ['link' => '', 'name' => '采购', 'id' => 25,],
  339. 30 => ['link' => '', 'name' => '使用平台优惠券', 'id' => 30,],
  340. 35 => ['link' => '', 'name' => '报损', 'id' => 35,],
  341. 38 => ['link' => '', 'name' => '采购退款', 'id' => 38,],
  342. 40 => ['link' => '', 'name' => '销售退款', 'id' => 40,],
  343. 45 => ['link' => '', 'name' => '盘点', 'id' => 45,],
  344. 46 => ['link' => '', 'name' => '佣金', 'id' => 46,],
  345. 48 => ['link' => '', 'name' => '预订单多退少补', 'id' => 48,],
  346. 50 => ['link' => '', 'name' => '预订单多退少补', 'id' => 50,],
  347. 51 => ['link' => '', 'name' => '预订单补款', 'id' => 51,],
  348. 52 => ['link' => '', 'name' => '花店预订补尾款', 'id' => 52,],
  349. 53 => ['link' => '', 'name' => '采购盆栽等', 'id' => 53,],
  350. 54 => ['link' => '', 'name' => '退货退款', 'id' => 54,],
  351. 55 => ['link' => '', 'name' => '存入现金', 'id' => 55,],
  352. 56 => ['link' => '', 'name' => '取出现金', 'id' => 56,],
  353. 57 => ['link' => '', 'name' => '支出登记', 'id' => 57,],
  354. 58 => ['link' => '', 'name' => '结算', 'id' => 58,],
  355. 59 => ['link' => '', 'name' => '退货退款', 'id' => 59,],
  356. 60 => ['link' => '', 'name' => '零交会报名', 'id' => 60,],
  357. 61 => ['link' => '', 'name' => '结账支出', 'id' => 61,],
  358. 62 => ['link' => '', 'name' => '充值', 'id' => 62,],
  359. 63 => ['link' => '', 'name' => '充值', 'id' => 63,],
  360. 64 => ['link' => '', 'name' => '结账', 'id' => 64,],
  361. 65 => ['link' => '', 'name' => '结账', 'id' => 65,],
  362. 66 => ['link' => '', 'name' => '充值', 'id' => 66,],
  363. ],
  364. //用户来源
  365. 'userSource' => [
  366. 0 => 'official',
  367. 1 => 'alipay',
  368. 2 => 'mini',
  369. 3 => 'app',
  370. ],
  371. 'userSourceGetId' => [
  372. 'official' => ['id' => 0, 'name' => 'official'],
  373. 'alipay' => ['id' => 1, 'name' => 'alipay'],
  374. 'mini' => ['id' => 2, 'name' => 'mini'],
  375. 'app' => ['id' => 3, 'name' => 'app'],
  376. ],
  377. //达达取消原因
  378. 'dadaCancelReason' => [
  379. [
  380. 'id' => 1,
  381. 'reason' => '没有配送员接单',
  382. ],
  383. [
  384. 'id' => 2,
  385. 'reason' => '配送员没来取货',
  386. ],
  387. [
  388. 'id' => 3,
  389. 'reason' => '配送员态度太差',
  390. ],
  391. [
  392. 'id' => 4,
  393. 'reason' => '顾客取消订单',
  394. ],
  395. [
  396. 'id' => 5,
  397. 'reason' => '订单填写错误',
  398. ],
  399. [
  400. 'id' => 34,
  401. 'reason' => '配送员让我取消此单',
  402. ],
  403. [
  404. 'id' => 35,
  405. 'reason' => '配送员不愿上门取货',
  406. ],
  407. [
  408. 'id' => 36,
  409. 'reason' => '我不需要配送了',
  410. ],
  411. [
  412. 'id' => 37,
  413. 'reason' => '配送员以各种理由表示无法完成订单',
  414. ],
  415. ],
  416. //来源
  417. 'fromType' => [
  418. 'shop' => 1,//门店
  419. 'mall' => 2,//商城
  420. 'friend' => 3,//微信客服号
  421. 'mt' => 4,//美团
  422. 'elm' => 5,//饿了么
  423. ],
  424. 'fromTypeMap' => [
  425. 1 => '门店',
  426. 2 => '商城',
  427. 3 => '微信',
  428. 4 => '美团',
  429. 5 => '饿了么',
  430. ],
  431. 'expendType' => [
  432. 'dz' => 0,//店租
  433. 'sd' => 1,//水电
  434. 'wy' => 2,//物业
  435. 'hs' => 3,//伙食
  436. 'fz' => 4,//房租
  437. 'qt' => 5,//其它
  438. ],
  439. 'expendTypeMap' => [
  440. 0 => '店租', 1 => '水电', 2 => '物业', 3 => '伙食', 4 => '房租', 5 => '其它', 6 => '物品', 7 => '办公用品'
  441. ],
  442. 'expendTypeList' => [
  443. ['id' => 7, 'name' => '办公用品'],
  444. ['id' => 6, 'name' => '物品'],
  445. ['id' => 0, 'name' => '店租'],
  446. ['id' => 1, 'name' => '水电'],
  447. ['id' => 2, 'name' => '物业'],
  448. ['id' => 3, 'name' => '伙食'],
  449. ['id' => 4, 'name' => '房租'],
  450. ['id' => 5, 'name' => '其它'],
  451. ],
  452. ];
  453. //取配置文件的值
  454. public static function getDict($category, $first = null, $second = null, $mainId = 0)
  455. {
  456. $respond = self::$data[$category];
  457. if (isset($first) && isset($second)) {
  458. if (isset($respond[$first][$second]) == false) {
  459. util::fail("没有找到相应字典 category:{$category} first:{$first} second:{$second}");
  460. }
  461. return $respond[$first][$second];
  462. }
  463. if (isset($first)) {
  464. if (isset($respond[$first]) == false) {
  465. util::fail("没有找到相应字典 category:{$category} first:{$first}");
  466. }
  467. return $respond[$first];
  468. }
  469. if (getenv('YII_ENV') == 'production') {
  470. //老油云漫梦金鹏的德邦不需要收运费,搜索关键词dbNoFee
  471. if (in_array($mainId, [20528]) && $category == 'transCost') {
  472. $respond = [
  473. ['sign' => 0, 'perKiloCost' => 0],
  474. ['sign' => 1, 'perKiloCost' => 0],
  475. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 0], ['num' => 30, 'amount' => 0], ['num' => 50, 'amount' => 0], ['num' => 70, 'amount' => 0], ['num' => 100, 'amount' => 0]]],
  476. ['sign' => 3, 'perKiloCost' => 0],
  477. ['sign' => 4, 'perKiloCost' => 0],
  478. ['sign' => 5, 'perKiloCost' => 0],
  479. ];
  480. }
  481. } else {
  482. //石头花艺的德邦不需要收运费,搜索关键词dbNoFee
  483. if (in_array($mainId, [644]) && $category == 'transCost') {
  484. $respond = [
  485. ['sign' => 0, 'perKiloCost' => 0],
  486. ['sign' => 1, 'perKiloCost' => 0],
  487. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 0], ['num' => 30, 'amount' => 0], ['num' => 50, 'amount' => 0], ['num' => 70, 'amount' => 0], ['num' => 100, 'amount' => 0]]],
  488. ['sign' => 3, 'perKiloCost' => 0],
  489. ['sign' => 4, 'perKiloCost' => 0],
  490. ['sign' => 5, 'perKiloCost' => 0],
  491. ];
  492. }
  493. }
  494. return $respond;
  495. }
  496. //列出所有的常量 ssh 2021.3.18
  497. public static function get($mainId = 0)
  498. {
  499. $respond = self::$data;
  500. //根据环境获取小程序原始ID
  501. if (isset($respond['miniOriginalId']['dev'])) {
  502. $respond['miniOriginalId']['current'] = $respond['miniOriginalId']['dev'];
  503. }
  504. if (getenv('YII_ENV') == 'production') {
  505. if (isset($respond['miniOriginalId']['product'])) {
  506. $respond['miniOriginalId']['current'] = $respond['miniOriginalId']['product'];
  507. }
  508. }
  509. if (getenv('YII_ENV') != 'production') {
  510. $respond['hdMiniMessage'] = $respond['hdMiniMessageDev'];
  511. }
  512. if (getenv('YII_ENV') == 'production') {
  513. //老油云漫梦金鹏的德邦不需要收运费,搜索关键词dbNoFee
  514. if (in_array($mainId, [20528])) {
  515. $respond['transCost'] = [
  516. ['sign' => 0, 'perKiloCost' => 0],
  517. ['sign' => 1, 'perKiloCost' => 0],
  518. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 0], ['num' => 30, 'amount' => 0], ['num' => 50, 'amount' => 0], ['num' => 70, 'amount' => 0], ['num' => 100, 'amount' => 0]]],
  519. ['sign' => 3, 'perKiloCost' => 0],
  520. ['sign' => 4, 'perKiloCost' => 0],
  521. ['sign' => 5, 'perKiloCost' => 0],
  522. ];
  523. }
  524. } else {
  525. //石头花艺的德邦不需要收运费,搜索关键词dbNoFee
  526. if (in_array($mainId, [644])) {
  527. $respond['transCost'] = [
  528. ['sign' => 0, 'perKiloCost' => 0],
  529. ['sign' => 1, 'perKiloCost' => 0],
  530. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 0], ['num' => 30, 'amount' => 0], ['num' => 50, 'amount' => 0], ['num' => 70, 'amount' => 0], ['num' => 100, 'amount' => 0]]],
  531. ['sign' => 3, 'perKiloCost' => 0],
  532. ['sign' => 4, 'perKiloCost' => 0],
  533. ['sign' => 5, 'perKiloCost' => 0],
  534. ];
  535. }
  536. }
  537. return $respond;
  538. }
  539. }