dict.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  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. 'addBook' => ['id' => 67, 'name' => 'addBook'],
  326. //减少预订
  327. 'delBook' => ['id' => 68, 'name' => 'delBook'],
  328. ],
  329. "capitalTypeList" => [//流水类型的对应链接,后台收支明细查看时跳转的链接
  330. 0 => ['link' => '/capital/order-detail', 'name' => '网店', 'orderLink' => '/order/detail', 'id' => 0,],
  331. 2 => ['link' => '/capital/active-order-detail', 'name' => '活动报名', 'id' => 2,],
  332. 4 => ['link' => '/capital/recharge-detail', 'name' => '充值', 'id' => 4,],
  333. 5 => ['link' => '/capital/user-unite', 'name' => '帐号关联', 'id' => 5,],
  334. 6 => ['link' => '/capital/draw-cash', 'name' => '提现', 'id' => 6,],
  335. 7 => ['link' => '/capital/apply-order-detail', 'name' => '接入申请', 'id' => 7,],
  336. 8 => ['link' => '/capital/merge-user', 'name' => '帐号合并', 'id' => 8,],
  337. 9 => ['link' => '/capital/renew', 'name' => '续费', 'id' => 9,],
  338. 10 => ['link' => '/capital/order-detail', 'name' => '订单', 'id' => 10,],
  339. 11 => ['link' => '/capital/purchase-detail', 'name' => '订单', 'id' => 11,],
  340. 12 => ['link' => '/capital/purchase-detail', 'name' => '培训报名', 'id' => 12,],
  341. 20 => ['link' => '', 'name' => '采购结算', 'id' => 20,],
  342. 25 => ['link' => '', 'name' => '采购', 'id' => 25,],
  343. 30 => ['link' => '', 'name' => '使用平台优惠券', 'id' => 30,],
  344. 35 => ['link' => '', 'name' => '报损', 'id' => 35,],
  345. 38 => ['link' => '', 'name' => '采购退款', 'id' => 38,],
  346. 40 => ['link' => '', 'name' => '销售退款', 'id' => 40,],
  347. 45 => ['link' => '', 'name' => '盘点', 'id' => 45,],
  348. 46 => ['link' => '', 'name' => '佣金', 'id' => 46,],
  349. 48 => ['link' => '', 'name' => '预订单多退少补', 'id' => 48,],
  350. 50 => ['link' => '', 'name' => '预订单多退少补', 'id' => 50,],
  351. 51 => ['link' => '', 'name' => '预订单补款', 'id' => 51,],
  352. 52 => ['link' => '', 'name' => '花店预订补尾款', 'id' => 52,],
  353. 53 => ['link' => '', 'name' => '采购盆栽等', 'id' => 53,],
  354. 54 => ['link' => '', 'name' => '退货退款', 'id' => 54,],
  355. 55 => ['link' => '', 'name' => '存入现金', 'id' => 55,],
  356. 56 => ['link' => '', 'name' => '取出现金', 'id' => 56,],
  357. 57 => ['link' => '', 'name' => '支出登记', 'id' => 57,],
  358. 58 => ['link' => '', 'name' => '结算', 'id' => 58,],
  359. 59 => ['link' => '', 'name' => '退货退款', 'id' => 59,],
  360. 60 => ['link' => '', 'name' => '零交会报名', 'id' => 60,],
  361. 61 => ['link' => '', 'name' => '结账支出', 'id' => 61,],
  362. 62 => ['link' => '', 'name' => '充值', 'id' => 62,],
  363. 63 => ['link' => '', 'name' => '充值', 'id' => 63,],
  364. 64 => ['link' => '', 'name' => '结账', 'id' => 64,],
  365. 65 => ['link' => '', 'name' => '结账', 'id' => 65,],
  366. 66 => ['link' => '', 'name' => '充值', 'id' => 66,],
  367. 67 => ['link' => '', 'name' => '新增预订', 'id' => 67,],
  368. 68 => ['link' => '', 'name' => '减少预订', 'id' => 68,],
  369. ],
  370. //用户来源
  371. 'userSource' => [
  372. 0 => 'official',
  373. 1 => 'alipay',
  374. 2 => 'mini',
  375. 3 => 'app',
  376. ],
  377. 'userSourceGetId' => [
  378. 'official' => ['id' => 0, 'name' => 'official'],
  379. 'alipay' => ['id' => 1, 'name' => 'alipay'],
  380. 'mini' => ['id' => 2, 'name' => 'mini'],
  381. 'app' => ['id' => 3, 'name' => 'app'],
  382. ],
  383. //达达取消原因
  384. 'dadaCancelReason' => [
  385. [
  386. 'id' => 1,
  387. 'reason' => '没有配送员接单',
  388. ],
  389. [
  390. 'id' => 2,
  391. 'reason' => '配送员没来取货',
  392. ],
  393. [
  394. 'id' => 3,
  395. 'reason' => '配送员态度太差',
  396. ],
  397. [
  398. 'id' => 4,
  399. 'reason' => '顾客取消订单',
  400. ],
  401. [
  402. 'id' => 5,
  403. 'reason' => '订单填写错误',
  404. ],
  405. [
  406. 'id' => 34,
  407. 'reason' => '配送员让我取消此单',
  408. ],
  409. [
  410. 'id' => 35,
  411. 'reason' => '配送员不愿上门取货',
  412. ],
  413. [
  414. 'id' => 36,
  415. 'reason' => '我不需要配送了',
  416. ],
  417. [
  418. 'id' => 37,
  419. 'reason' => '配送员以各种理由表示无法完成订单',
  420. ],
  421. ],
  422. //来源
  423. 'fromType' => [
  424. 'shop' => 1,//门店
  425. 'mall' => 2,//商城
  426. 'friend' => 3,//微信客服号
  427. 'mt' => 4,//美团
  428. 'elm' => 5,//饿了么
  429. ],
  430. 'fromTypeMap' => [
  431. 1 => '门店',
  432. 2 => '商城',
  433. 3 => '微信',
  434. 4 => '美团',
  435. 5 => '饿了么',
  436. ],
  437. 'expendType' => [
  438. 'dz' => 0,//店租
  439. 'sd' => 1,//水电
  440. 'wy' => 2,//物业
  441. 'hs' => 3,//伙食
  442. 'fz' => 4,//房租
  443. 'qt' => 5,//其它
  444. ],
  445. 'expendTypeMap' => [
  446. 0 => '店租', 1 => '水电', 2 => '物业', 3 => '伙食', 4 => '房租', 5 => '其它', 6 => '物品',
  447. ],
  448. 'expendTypeList' => [
  449. ['id' => 6, 'name' => '物品'],
  450. ['id' => 0, 'name' => '店租'],
  451. ['id' => 1, 'name' => '水电'],
  452. ['id' => 2, 'name' => '物业'],
  453. ['id' => 3, 'name' => '伙食'],
  454. ['id' => 4, 'name' => '房租'],
  455. ['id' => 5, 'name' => '其它'],
  456. ],
  457. ];
  458. //取配置文件的值
  459. public static function getDict($category, $first = null, $second = null, $mainId = 0)
  460. {
  461. $respond = self::$data[$category];
  462. if (isset($first) && isset($second)) {
  463. if (isset($respond[$first][$second]) == false) {
  464. util::fail("没有找到相应字典 category:{$category} first:{$first} second:{$second}");
  465. }
  466. return $respond[$first][$second];
  467. }
  468. if (isset($first)) {
  469. if (isset($respond[$first]) == false) {
  470. util::fail("没有找到相应字典 category:{$category} first:{$first}");
  471. }
  472. return $respond[$first];
  473. }
  474. if (getenv('YII_ENV') == 'production') {
  475. //老油云漫梦金鹏的德邦不需要收运费,搜索关键词dbNoFee
  476. if (in_array($mainId, [20528]) && $category == 'transCost') {
  477. $respond = [
  478. ['sign' => 0, 'perKiloCost' => 0],
  479. ['sign' => 1, 'perKiloCost' => 0],
  480. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 0], ['num' => 30, 'amount' => 0], ['num' => 50, 'amount' => 0], ['num' => 70, 'amount' => 0], ['num' => 100, 'amount' => 0]]],
  481. ['sign' => 3, 'perKiloCost' => 0],
  482. ['sign' => 4, 'perKiloCost' => 0],
  483. ['sign' => 5, 'perKiloCost' => 0],
  484. ];
  485. }
  486. } else {
  487. //石头花艺的德邦不需要收运费,搜索关键词dbNoFee
  488. if (in_array($mainId, [644]) && $category == 'transCost') {
  489. $respond = [
  490. ['sign' => 0, 'perKiloCost' => 0],
  491. ['sign' => 1, 'perKiloCost' => 0],
  492. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 0], ['num' => 30, 'amount' => 0], ['num' => 50, 'amount' => 0], ['num' => 70, 'amount' => 0], ['num' => 100, 'amount' => 0]]],
  493. ['sign' => 3, 'perKiloCost' => 0],
  494. ['sign' => 4, 'perKiloCost' => 0],
  495. ['sign' => 5, 'perKiloCost' => 0],
  496. ];
  497. }
  498. }
  499. return $respond;
  500. }
  501. //列出所有的常量 ssh 2021.3.18
  502. public static function get($mainId = 0)
  503. {
  504. $respond = self::$data;
  505. //根据环境获取小程序原始ID
  506. if (isset($respond['miniOriginalId']['dev'])) {
  507. $respond['miniOriginalId']['current'] = $respond['miniOriginalId']['dev'];
  508. }
  509. if (getenv('YII_ENV') == 'production') {
  510. if (isset($respond['miniOriginalId']['product'])) {
  511. $respond['miniOriginalId']['current'] = $respond['miniOriginalId']['product'];
  512. }
  513. }
  514. if (getenv('YII_ENV') != 'production') {
  515. $respond['hdMiniMessage'] = $respond['hdMiniMessageDev'];
  516. }
  517. if (getenv('YII_ENV') == 'production') {
  518. //老油云漫梦金鹏的德邦不需要收运费,搜索关键词dbNoFee
  519. if (in_array($mainId, [20528])) {
  520. $respond['transCost'] = [
  521. ['sign' => 0, 'perKiloCost' => 0],
  522. ['sign' => 1, 'perKiloCost' => 0],
  523. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 0], ['num' => 30, 'amount' => 0], ['num' => 50, 'amount' => 0], ['num' => 70, 'amount' => 0], ['num' => 100, 'amount' => 0]]],
  524. ['sign' => 3, 'perKiloCost' => 0],
  525. ['sign' => 4, 'perKiloCost' => 0],
  526. ['sign' => 5, 'perKiloCost' => 0],
  527. ];
  528. }
  529. } else {
  530. //石头花艺的德邦不需要收运费,搜索关键词dbNoFee
  531. if (in_array($mainId, [644])) {
  532. $respond['transCost'] = [
  533. ['sign' => 0, 'perKiloCost' => 0],
  534. ['sign' => 1, 'perKiloCost' => 0],
  535. ['sign' => 2, 'option' => [['num' => 20, 'amount' => 0], ['num' => 30, 'amount' => 0], ['num' => 50, 'amount' => 0], ['num' => 70, 'amount' => 0], ['num' => 100, 'amount' => 0]]],
  536. ['sign' => 3, 'perKiloCost' => 0],
  537. ['sign' => 4, 'perKiloCost' => 0],
  538. ['sign' => 5, 'perKiloCost' => 0],
  539. ];
  540. }
  541. }
  542. return $respond;
  543. }
  544. }