BillRoomForm.vue 110 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087
  1. <template>
  2. <a-spin :spinning="confirmLoading">
  3. <j-form-container :disabled="formDisabled">
  4. <a-form-model
  5. ref="form"
  6. :model="model"
  7. :rules="validatorRules"
  8. slot="detail"
  9. >
  10. <a-row>
  11. <div>
  12. <div style="display: flex; gap: 15px">
  13. <div style="width: 57%">
  14. <a-tabs
  15. hide-add
  16. type="editable-card"
  17. v-model="activeKey"
  18. :tabBarStyle="{ fontWeight: 600 }"
  19. @edit="editTabs"
  20. @tabClick="tabClick"
  21. >
  22. <a-tab-pane
  23. v-for="(room, aindex) in model.roomIds"
  24. :key="room.id"
  25. :tab="room.name"
  26. :closable="true"
  27. force-render
  28. >
  29. <div style="display: flex; justify-content: space-between">
  30. <h4
  31. style="
  32. color: rgba(255, 141, 26, 1);
  33. font-weight: 600;
  34. "
  35. >
  36. 宾客信息{{ utcTxt }}
  37. </h4>
  38. <div v-if="model.roomIds&&model.roomIds.length>1"><a-switch v-model="otherRoomSync" />附属房间录入信息</div>
  39. </div>
  40. <a-divider />
  41. <!-- <a-col :span="8">
  42. <a-form-model-item
  43. label="姓名"
  44. :labelCol="labelCol"
  45. :wrapperCol="wrapperCol"
  46. :prop="`rooms[${index}].key1`"
  47. :rules="[
  48. {
  49. required: true,
  50. message: '请输入姓名!',
  51. trigger: 'change',
  52. },
  53. ]"
  54. >
  55. <a-auto-complete
  56. v-model="room.key1"
  57. placeholder="请输入姓名"
  58. @search="handleSearch"
  59. @select="(e) => handleSelectMember(room, e)"
  60. >
  61. <template slot="dataSource">
  62. <a-select-option
  63. v-for="item in result"
  64. :key="item"
  65. >{{ item }}</a-select-option
  66. >
  67. </template>
  68. </a-auto-complete>
  69. </a-form-model-item>
  70. </a-col> -->
  71. <a-col :span="12">
  72. <a-form-model-item
  73. label="姓名"
  74. :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
  75. :wrapperCol="{
  76. xs: { span: 24 },
  77. sm: { span: 16 },
  78. }"
  79. :prop="`roomIds[${aindex}].key1`"
  80. :rules="[
  81. {
  82. required: true,
  83. message: '请输入姓名!',
  84. trigger: 'change',
  85. },
  86. ]"
  87. >
  88. <a-auto-complete style="width: 60%;"
  89. v-model="room.key1"
  90. placeholder="请输入姓名"
  91. @search="handleSearch"
  92. @select="(e) => handleSelectMember(room, e)"
  93. >
  94. <template slot="dataSource">
  95. <a-select-option
  96. v-for="item in customerList"
  97. :key="item.id"
  98. >{{ item.name }}-{{ item.phone }}</a-select-option
  99. >
  100. </template>
  101. </a-auto-complete>
  102. <a-icon type="contacts" style="font-size: 18px;margin-left: 5px;" @click="readCardNo" />
  103. <span style="cursor: pointer;" v-if="room.busMemberCard&&room.busMemberCard.id" @click="showMemberCard(room.busMemberCard)">会员</span>
  104. <span style="cursor: pointer;" v-if="room.busMarketAgreementUnit&&room.busMarketAgreementUnit.id" @click="showAgreementUnit(room.busMarketAgreementUnit)"> 协议</span>
  105. <span style="cursor: pointer;" v-if="room.ruZhuHistory&&room.ruZhuHistory.phone" @click="showRuZhuHistory(room.ruZhuHistory.phone)"> 客史</span>
  106. </a-form-model-item>
  107. </a-col>
  108. <a-col :span="6">
  109. <a-form-model-item
  110. label="性别"
  111. :labelCol="labelCol"
  112. :wrapperCol="wrapperCol"
  113. :prop="`roomIds[${aindex}].key2`"
  114. :rules="[
  115. {
  116. required: true,
  117. message: '请选择性别!',
  118. trigger: 'change',
  119. },
  120. ]"
  121. >
  122. <a-select v-model="room.key2" placeholder="请选择性别">
  123. <a-select-option :value="1"> 男 </a-select-option>
  124. <a-select-option :value="2"> 女 </a-select-option>
  125. </a-select>
  126. </a-form-model-item>
  127. </a-col>
  128. <a-col :span="6">
  129. <a-form-model-item
  130. label="民族"
  131. :labelCol="labelCol"
  132. :wrapperCol="wrapperCol"
  133. :prop="`roomIds[${aindex}].key3`"
  134. :rules="[
  135. {
  136. required: true,
  137. message: '请选择民族!',
  138. trigger: 'change',
  139. },
  140. ]"
  141. >
  142. <a-select v-model="room.key3" placeholder="请选择民族">
  143. <a-select-option value="汉"> 汉 </a-select-option>
  144. <a-select-option value="回"> 回 </a-select-option>
  145. </a-select>
  146. </a-form-model-item>
  147. </a-col>
  148. <a-col :span="16">
  149. <a-form-model-item
  150. label="身份证号"
  151. :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
  152. :wrapperCol="{
  153. xs: { span: 24 },
  154. sm: { span: 16 },
  155. }"
  156. :prop="`roomIds[${aindex}].key4`"
  157. >
  158. <a-input
  159. v-model="room.key4"
  160. placeholder="请输身份证号"
  161. ></a-input>
  162. </a-form-model-item>
  163. </a-col>
  164. <a-col :span="8">
  165. <a-form-model-item
  166. label="手机号"
  167. :labelCol="labelCol"
  168. :wrapperCol="wrapperCol"
  169. :prop="`roomIds[${aindex}].key5`"
  170. >
  171. <a-input
  172. v-model="room.key5"
  173. placeholder="请输入手机号"
  174. ></a-input>
  175. </a-form-model-item>
  176. </a-col>
  177. <a-col :span="24">
  178. <a-form-model-item
  179. label="联系地址"
  180. :labelCol="{ xs: { span: 24 }, sm: { span: 3 } }"
  181. :wrapperCol="{
  182. xs: { span: 24 },
  183. sm: { span: 16 },
  184. }"
  185. prop="key6"
  186. >
  187. <a-input
  188. v-model="room.key6"
  189. placeholder="请输入联系地址"
  190. ></a-input>
  191. </a-form-model-item>
  192. </a-col>
  193. <a-col :span="24">
  194. <div
  195. style="display: flex; justify-content: space-between"
  196. >
  197. <div></div>
  198. <div>
  199. <a-button type="link" @click="puls(room)">
  200. 添加同住
  201. </a-button>
  202. <a-icon
  203. type="right"
  204. v-if="room.invalid"
  205. @click="room.invalid=false"
  206. />
  207. <a-icon type="down" v-else @click="room.invalid=true" />
  208. </div>
  209. </div>
  210. </a-col>
  211. <template v-for="(item, index) in room.livingCustomers2" v-if="!room.invalid">
  212. <a-col :span="4">
  213. <a-form-model-item
  214. :wrapperCol="{
  215. xs: { span: 24 },
  216. sm: { span: 22 },
  217. }"
  218. :prop="`roomIds[${aindex}].livingCustomers2[${index}].customerName`"
  219. :rules="[
  220. {
  221. required: true,
  222. message: '请输入姓名!',
  223. trigger: 'change',
  224. },
  225. ]"
  226. >
  227. <a-input
  228. v-model="item.customerName"
  229. placeholder="姓名"
  230. ></a-input>
  231. </a-form-model-item>
  232. </a-col>
  233. <a-col :span="4">
  234. <a-form-model-item
  235. :wrapperCol="{
  236. xs: { span: 24 },
  237. sm: { span: 22 },
  238. }"
  239. :prop="`roomIds[${aindex}].livingCustomers2[${index}].gender`"
  240. >
  241. <a-select placeholder="性别" v-model="item.gender">
  242. <a-select-option :value="1"> 男 </a-select-option>
  243. <a-select-option :value="2"> 女 </a-select-option>
  244. </a-select>
  245. </a-form-model-item>
  246. </a-col>
  247. <a-col :span="4">
  248. <a-form-model-item
  249. :wrapperCol="{
  250. xs: { span: 24 },
  251. sm: { span: 22 },
  252. }"
  253. :prop="`roomIds[${aindex}].livingCustomers2[${index}].certType`"
  254. >
  255. <a-select placeholder="证件" v-model="item.certType">
  256. <a-select-option :value="1">
  257. 身份证
  258. </a-select-option>
  259. <a-select-option :value="2"> 护照 </a-select-option>
  260. </a-select>
  261. </a-form-model-item>
  262. </a-col>
  263. <a-col :span="6">
  264. <a-form-model-item
  265. :wrapperCol="{
  266. xs: { span: 24 },
  267. sm: { span: 23 },
  268. }"
  269. :prop="`roomIds[${aindex}].livingCustomers2[${index}].certNo`"
  270. :rules="[
  271. {
  272. required: true,
  273. message: '请输入证件号!',
  274. trigger: 'change',
  275. },
  276. ]"
  277. >
  278. <a-input
  279. v-model="item.certNo"
  280. placeholder="证件号"
  281. ></a-input>
  282. </a-form-model-item>
  283. </a-col>
  284. <a-col :span="6">
  285. <a-form-model-item
  286. :wrapperCol="{
  287. xs: { span: 24 },
  288. sm: { span: 24 },
  289. }"
  290. :prop="`roomIds[${aindex}].livingCustomers2[${index}].phone`"
  291. :rules="[
  292. {
  293. required: true,
  294. message: '请输入手机号!',
  295. trigger: 'change',
  296. },
  297. ]"
  298. >
  299. <a-input
  300. v-model="item.phone"
  301. placeholder="手机号"
  302. style="width: 120px"
  303. ></a-input>
  304. <a-icon type="contacts" style="font-size: 18px;margin-left: 5px;" @click="readCardNo" />
  305. <a-icon
  306. type="minus-circle"
  307. style="color: #f56c6c"
  308. class="dynamic-delete-button"
  309. v-if="room.livingCustomers2.length > 0"
  310. @click="() => remove(room, index)"
  311. />
  312. </a-form-model-item>
  313. </a-col>
  314. </template>
  315. </a-tab-pane>
  316. <div slot="tabBarExtraContent">
  317. <a-button type="link" @click="pulsRoom()">
  318. 增加房间
  319. </a-button>
  320. </div>
  321. </a-tabs>
  322. <h4
  323. style="
  324. color: rgba(255, 141, 26, 1);
  325. font-weight: 600;
  326. margin-top: 20px;
  327. "
  328. >
  329. 入住信息
  330. </h4>
  331. <a-divider />
  332. <a-col :span="12">
  333. <a-form-model-item
  334. label="入住类型"
  335. :labelCol="labelCol"
  336. :wrapperCol="wrapperCol"
  337. prop="orderInfo.bookingType"
  338. >
  339. <a-select
  340. placeholder="入住类型"
  341. v-model="model.orderInfo.bookingType"
  342. @change="bookingTypeChange"
  343. >
  344. <a-select-option :value="1"> 全天 </a-select-option>
  345. <a-select-option :value="2"> 钟点 </a-select-option>
  346. <a-select-option :value="3"> 自用 </a-select-option>
  347. <a-select-option :value="4"> 免费 </a-select-option>
  348. <a-select-option :value="5"> 长租 </a-select-option>
  349. </a-select>
  350. </a-form-model-item>
  351. </a-col>
  352. <a-col :span="12">
  353. <a-form-model-item
  354. label="订单来源"
  355. :labelCol="labelCol"
  356. :wrapperCol="wrapperCol"
  357. prop="orderInfo.customerSource"
  358. >
  359. <a-select
  360. placeholder="订单来源"
  361. v-model="model.orderInfo.customerSource"
  362. @change="customerSourceChange"
  363. >
  364. <a-select-option
  365. :value="item.id"
  366. v-for="(item, index) in customerSourceList"
  367. :key="item.id"
  368. >
  369. {{ item.itemText }}
  370. </a-select-option>
  371. </a-select>
  372. </a-form-model-item>
  373. </a-col>
  374. <a-col :span="12" v-if="model.orderInfo.bookingType == 2">
  375. <a-form-model-item
  376. label="时长"
  377. :labelCol="labelCol"
  378. :wrapperCol="wrapperCol"
  379. prop="orderInfo.hourRoomId"
  380. >
  381. <a-select
  382. placeholder="时长"
  383. v-model="model.orderInfo.hourRoomId"
  384. @change="hourRoomIdChange"
  385. >
  386. <a-select-option
  387. :value="item.id"
  388. v-for="(item, index) in hourRoomRuleList"
  389. :key="item.id"
  390. >
  391. {{ item.hourRoomName }}
  392. </a-select-option>
  393. </a-select>
  394. </a-form-model-item>
  395. </a-col>
  396. <a-col :span="12" v-else>
  397. <a-form-model-item
  398. label="天数"
  399. :labelCol="labelCol"
  400. :wrapperCol="wrapperCol"
  401. prop="orderInfo.dayCount"
  402. >
  403. <a-input-number
  404. v-model="model.orderInfo.dayCount"
  405. placeholder="天数"
  406. :min="1"
  407. @change="dayCountChange"
  408. ></a-input-number
  409. >天
  410. </a-form-model-item>
  411. </a-col>
  412. <a-col :span="12">
  413. <a-form-model-item
  414. label="外部单号"
  415. :labelCol="labelCol"
  416. :wrapperCol="wrapperCol"
  417. prop="orderInfo.outerOrdersNo"
  418. >
  419. <a-input
  420. v-model="model.orderInfo.outerOrdersNo"
  421. placeholder="外部单号"
  422. ></a-input>
  423. </a-form-model-item>
  424. </a-col>
  425. <a-col :span="12">
  426. <a-form-model-item
  427. label="入住时间"
  428. :labelCol="labelCol"
  429. :wrapperCol="wrapperCol"
  430. prop="orderInfo.arrivalTime2"
  431. >
  432. <j-date
  433. placeholder="入住时间"
  434. v-model="model.orderInfo.arrivalTime2"
  435. style="width: 120px"
  436. :allowClear="false"
  437. :disabled-date="disabledDate"
  438. @change="arrivalTimeChange"
  439. />
  440. <a-time-picker
  441. style="width: 80px; margin-left: 2px"
  442. v-model="model.orderInfo.arrivalTimeSpan"
  443. :default-value="moment('12:00', 'HH:mm')"
  444. format="HH:mm"
  445. :allowClear="false"
  446. @change="arrivalTimeSpanChange"
  447. />
  448. </a-form-model-item>
  449. </a-col>
  450. <a-col :span="12">
  451. <a-form-model-item
  452. label="预离时间"
  453. :labelCol="labelCol"
  454. :wrapperCol="wrapperCol"
  455. prop="orderInfo.dueOutTime2"
  456. >
  457. <j-date
  458. placeholder="预离时间"
  459. v-model="model.orderInfo.dueOutTime2"
  460. style="width: 120px"
  461. :allowClear="false"
  462. :disabled-date="disabledDate"
  463. :disabled="model.orderInfo.bookingType === 2"
  464. @change="arrivalTimeChange2"
  465. />
  466. <a-time-picker
  467. style="width: 80px; margin-left: 2px"
  468. v-model="model.orderInfo.dueOutTimeSpan"
  469. format="HH:mm"
  470. :allowClear="false"
  471. :disabled="model.orderInfo.bookingType === 2"
  472. />
  473. </a-form-model-item>
  474. </a-col>
  475. <a-col :span="12">
  476. <a-form-model-item
  477. label="宾客类型"
  478. :labelCol="labelCol"
  479. :wrapperCol="wrapperCol"
  480. prop="orderInfo.customerType"
  481. >
  482. <a-select
  483. placeholder="宾客类型"
  484. v-model="model.orderInfo.customerType"
  485. >
  486. <a-select-option :value="1"> 散客 </a-select-option>
  487. <a-select-option :value="2"> 会员 </a-select-option>
  488. <a-select-option :value="3"> 协议单位 </a-select-option>
  489. <a-select-option :value="4"> 中介 </a-select-option>
  490. </a-select>
  491. </a-form-model-item>
  492. </a-col>
  493. <a-col :span="24" v-if="model.orderInfo.customerType === 2">
  494. <a-card :bordered="true" style="width: 100%;padding: 0 !important;">
  495. <p>
  496. <a-form-model-item
  497. label="会员"
  498. :labelCol="{
  499. xs: { span: 24 },
  500. sm: { span: 2 },
  501. }"
  502. :wrapperCol="{
  503. xs: { span: 24 },
  504. sm: { span: 22 },
  505. }"
  506. prop="orderInfo.vipCustomerId"
  507. >
  508. <a-auto-complete v-model="vipCustomerData.name" @select="(e)=>handleSelectVip(e)" @search="handleSearchVip">
  509. <template slot="dataSource">
  510. <a-select-option
  511. :key="item.id"
  512. :value="item.id"
  513. :label="item.name"
  514. v-for="(item, index) in busMemberCardList"
  515. >
  516. {{ item.name }}-{{ item.gradeName }}-{{ item.balance }}
  517. </a-select-option>
  518. </template>
  519. </a-auto-complete>
  520. </a-form-model-item>
  521. </p>
  522. <p>
  523. <a-row>
  524. <a-col :span="8">名称:{{ vipCustomerData.name }}</a-col>
  525. <a-col :span="8">电话:{{ vipCustomerData.mobile }}</a-col>
  526. <a-col :span="8">级别:{{ vipCustomerData.gradeName }}</a-col>
  527. </a-row>
  528. <a-row>
  529. <a-col :span="8">余额:{{ vipCustomerData.balance }}</a-col>
  530. <a-col :span="8">积分:{{ vipCustomerData.integral }}</a-col>
  531. <a-col :span="8">卡号:{{ vipCustomerData.cardNo }}</a-col>
  532. </a-row>
  533. </p>
  534. </a-card>
  535. </a-col>
  536. <!-- <a-col :span="12" v-if="model.orderInfo.customerType === 3">
  537. <a-form-model-item
  538. label="协议单位"
  539. :labelCol="labelCol"
  540. :wrapperCol="wrapperCol"
  541. prop="orderInfo.roomPriceSlnId"
  542. >
  543. <a-select
  544. placeholder="协议单位"
  545. option-label-prop="label"
  546. v-model="model.orderInfo.contractTeamId"
  547. @change="contractTeamIdChange"
  548. >
  549. <a-select-option
  550. :key="item.id"
  551. :value="item.id"
  552. :label="item.customerName"
  553. v-for="(item, index) in busMarketAgreementUnitList"
  554. >
  555. {{ item.customerName }}
  556. </a-select-option>
  557. </a-select>
  558. </a-form-model-item>
  559. </a-col> -->
  560. <!-- <a-col :span="12"></a-col> -->
  561. <a-col :span="24" v-if="model.orderInfo.customerType === 3">
  562. <!-- <a-form-model-item
  563. label="协议合同"
  564. :labelCol="labelCol"
  565. :wrapperCol="wrapperCol"
  566. prop="orderInfo.contractTeamProtocolId"
  567. >
  568. <span style="color:red;cursor: pointer;" @click="showAgreementUnitTable(model.orderInfo.contractTeamId)">{{ model.orderInfo.contractTeamProtocolName }}</span>
  569. </a-form-model-item> -->
  570. <a-card :bordered="true" style="width: 100%;padding: 0 !important;">
  571. <a-row>
  572. <a-col :span="12">
  573. <a-form-model-item
  574. label="协议单位"
  575. :labelCol="labelCol"
  576. :wrapperCol="wrapperCol"
  577. prop="orderInfo.contractTeamId"
  578. >
  579. <a-auto-complete v-model="agreementUnitData.customerName" @select="(e)=>handleSelectAgreementUnit(e)" @search="handleSearchAgreementUnit">
  580. <template slot="dataSource">
  581. <a-select-option
  582. :key="item.id"
  583. :value="item.id"
  584. :label="item.customerName"
  585. v-for="(item, index) in busMarketAgreementUnitList"
  586. >
  587. {{ item.customerName }}
  588. </a-select-option>
  589. </template>
  590. </a-auto-complete>
  591. </a-form-model-item>
  592. </a-col>
  593. <a-col :span="12">
  594. <a-form-model-item
  595. label="协议合同"
  596. :labelCol="labelCol"
  597. :wrapperCol="wrapperCol"
  598. prop="orderInfo.contractTeamProtocolId"
  599. >
  600. <span style="color:red;cursor: pointer;" @click="showAgreementUnitTable(model.orderInfo.contractTeamId)">{{ model.orderInfo.contractTeamProtocolName }}</span>
  601. </a-form-model-item>
  602. </a-col>
  603. </a-row>
  604. <p>
  605. <a-row>
  606. <a-col :span="12">名称:{{ agreementUnitData.customerName }}</a-col>
  607. <a-col :span="12">签约开始日期:{{ busMarketAgreementCustomer.signTime }}</a-col>
  608. <a-col :span="12">签约结束日期:{{ busMarketAgreementCustomer.effective }}</a-col>
  609. <a-col :span="12">可用额度:{{ agreementUnitData.balance||0 }}</a-col>
  610. </a-row>
  611. </p>
  612. </a-card>
  613. </a-col>
  614. <a-col :span="12">
  615. <a-form-model-item
  616. label="房价方案"
  617. :labelCol="labelCol"
  618. :wrapperCol="wrapperCol"
  619. prop="orderInfo.roomPriceSlnId"
  620. >
  621. <a-select
  622. placeholder="房价方案"
  623. v-model="model.orderInfo.roomPriceSlnId"
  624. >
  625. <a-select-option value="会员价"> 会员价 </a-select-option>
  626. <a-select-option value="平日价"> 平日价 </a-select-option>
  627. </a-select>
  628. </a-form-model-item>
  629. </a-col>
  630. <a-col :span="12">
  631. <a-form-model-item
  632. label="销售员工"
  633. :labelCol="labelCol"
  634. :wrapperCol="wrapperCol"
  635. prop="orderInfo.warranter"
  636. >
  637. <a-select
  638. placeholder="销售员工"
  639. v-model="model.orderInfo.warranter"
  640. >
  641. <a-select-option
  642. :value="item.id"
  643. v-for="item in warranterList"
  644. :key="item.id"
  645. >
  646. {{ item.name }}
  647. </a-select-option>
  648. </a-select>
  649. </a-form-model-item>
  650. </a-col>
  651. <a-col :span="12">
  652. <a-form-model-item
  653. label="早餐数量"
  654. :labelCol="labelCol"
  655. :wrapperCol="wrapperCol"
  656. prop="orderInfo.breakfastNum"
  657. >
  658. <a-input-number
  659. v-model="model.orderInfo.breakfastNum"
  660. placeholder="早餐数量"
  661. :min="0"
  662. ></a-input-number
  663. >份
  664. </a-form-model-item>
  665. </a-col>
  666. <a-col :span="24">
  667. <a-form-model-item
  668. label="订单备注"
  669. :labelCol="{ xs: { span: 24 }, sm: { span: 3 } }"
  670. :wrapperCol="{
  671. xs: { span: 24 },
  672. sm: { span: 15 },
  673. }"
  674. prop="orderInfo.remark"
  675. >
  676. <a-textarea
  677. v-model="model.orderInfo.remark"
  678. rows="4"
  679. placeholder="订单备注"
  680. />
  681. </a-form-model-item>
  682. </a-col>
  683. </div>
  684. <div style="width: 43%">
  685. <div
  686. style="
  687. display: flex;
  688. justify-content: space-between;
  689. align-items: center;
  690. "
  691. >
  692. <h4
  693. style="
  694. color: rgba(255, 141, 26, 1);
  695. font-weight: 600;
  696. margin-top: 15px;
  697. "
  698. >
  699. 财务信息
  700. </h4>
  701. <div>
  702. <a-switch v-model="depositSplit" />押金均摊记账到每个房间
  703. </div>
  704. </div>
  705. <a-divider />
  706. <a-table
  707. :columns="columns"
  708. :data-source="model.roomPrices"
  709. :pagination="false"
  710. rowKey="id"
  711. :scroll="{ y: 200, x: 500 }"
  712. >
  713. <template slot="prefPrice" slot-scope="text, record, index">
  714. <div>
  715. {{text}}<a-icon @click="onCellExpand(index)" style="margin-left:10px;" type="edit" />
  716. <!-- <editable-cell
  717. :text="text"
  718. @change.stop="onCellChange('prefPrice', index, $event)"
  719. /> -->
  720. </div>
  721. </template>
  722. <template slot="deposit" slot-scope="text, record, index">
  723. <!-- <editable-cell
  724. :text="text"
  725. @change="onCellChangeCopy('deposit', index, $event)"
  726. /> -->
  727. <a-input-number v-model="record.deposit" @change="onCellChangeCopy('deposit', index, $event)"></a-input-number>
  728. </template>
  729. </a-table>
  730. <div
  731. style="
  732. color: rgba(255, 87, 51, 1);
  733. font-weight: 600;
  734. text-align: right;
  735. "
  736. >
  737. 合计应收:{{ amount.toFixed(2) }}
  738. </div>
  739. <div
  740. style="
  741. display: flex;
  742. justify-content: space-between;
  743. align-items: center;
  744. margin-top: 30px;
  745. "
  746. >
  747. <!-- <h4
  748. style="
  749. color: rgba(255, 141, 26, 1);
  750. font-weight: 600;
  751. margin-top: 15px;
  752. "
  753. >
  754. 收款
  755. </h4> -->
  756. <a-tabs
  757. default-active-key="1"
  758. @change="paymentTabsChange"
  759. :tabBarStyle="{ fontWeight: 600 }"
  760. >
  761. <a-tab-pane key="1" tab="收款">
  762. <a-table
  763. :columns="columns2"
  764. :data-source="model.orderFees"
  765. :pagination="false"
  766. rowKey="id"
  767. :scroll="{ y: 160 }"
  768. >
  769. <template
  770. slot="subjectTypeLabel"
  771. slot-scope="text, record, index"
  772. >
  773. <div>
  774. <!-- <a-input
  775. style="margin: -5px 0"
  776. :value="text"
  777. @change="
  778. (e) => handleChange(e.target.value, index, 'subjectTypeLabel')
  779. "
  780. /> -->
  781. <a-select
  782. v-model="model.orderFees[index].subjectType"
  783. placeholder="费项"
  784. >
  785. <a-select-option :value="2">
  786. 房费
  787. </a-select-option>
  788. <a-select-option :value="1">
  789. 押金
  790. </a-select-option>
  791. </a-select>
  792. </div>
  793. </template>
  794. <template
  795. slot="payType"
  796. slot-scope="text, record, index"
  797. >
  798. <div>
  799. <a-select
  800. v-model="model.orderFees[index].payType"
  801. placeholder="收款方式"
  802. >
  803. <a-select-option
  804. :value="item.id"
  805. v-for="item in payTypeList"
  806. :key="item.id"
  807. >
  808. {{ item.name }}
  809. </a-select-option>
  810. </a-select>
  811. </div>
  812. </template>
  813. <template slot="money" slot-scope="text, record, index">
  814. <div>
  815. <a-input-number
  816. v-model="record.money"
  817. :min="0"
  818. @change="presetNumChange($event, record)"
  819. />
  820. </div>
  821. </template>
  822. </a-table>
  823. <div
  824. style="color: rgba(255, 141, 26, 1); font-weight: 200"
  825. >
  826. <p style="margin-bottom: 2px">
  827. <template></template>
  828. 实收:{{ orderFeesText }}
  829. </p>
  830. <p style="margin-bottom: 2px">
  831. 合计实款:{{ orderFeesAmout.toFixed(2) }}
  832. </p>
  833. </div>
  834. <div
  835. style="color: rgba(255, 87, 51, 1); font-weight: 200"
  836. >
  837. <p v-if="orderFeesArrearsAmout < 0">
  838. 欠费:{{ orderFeesArrearsAmout.toFixed(2) }}元
  839. </p>
  840. </div>
  841. </a-tab-pane>
  842. <a-tab-pane key="2" tab="信用卡预授权">
  843. <a-row
  844. v-for="(item, index) in payPalModel.list"
  845. :key="index"
  846. >
  847. <a-col :span="9">
  848. <a-form-model-item
  849. :labelCol="{
  850. xs: { span: 24 },
  851. sm: { span: 5 },
  852. }"
  853. :wrapperCol="{
  854. xs: { span: 24 },
  855. sm: { span: 22 },
  856. }"
  857. prop="key1"
  858. >
  859. <a-input
  860. v-model="item.key1"
  861. placeholder="银行卡号"
  862. ></a-input>
  863. </a-form-model-item>
  864. </a-col>
  865. <a-col :span="9">
  866. <a-form-model-item
  867. :labelCol="{
  868. xs: { span: 24 },
  869. sm: { span: 5 },
  870. }"
  871. :wrapperCol="{
  872. xs: { span: 24 },
  873. sm: { span: 22 },
  874. }"
  875. prop="key2"
  876. >
  877. <a-input
  878. v-model="item.key2"
  879. placeholder="预授权号"
  880. :min="1"
  881. ></a-input>
  882. </a-form-model-item>
  883. </a-col>
  884. <a-col :span="6">
  885. <a-form-model-item
  886. :labelCol="{
  887. xs: { span: 24 },
  888. sm: { span: 5 },
  889. }"
  890. :wrapperCol="{
  891. xs: { span: 24 },
  892. sm: { span: 22 },
  893. }"
  894. prop="key3"
  895. >
  896. <a-input-number
  897. v-model="item.key3"
  898. placeholder="金额"
  899. :min="1"
  900. ></a-input-number>
  901. </a-form-model-item>
  902. </a-col>
  903. </a-row>
  904. </a-tab-pane>
  905. <div slot="tabBarExtraContent">
  906. <a-switch v-model="paymentSplit" />押金、房费分开收款
  907. <a-button type="link" @click="pulsFee">
  908. 添加费项
  909. </a-button>
  910. </div>
  911. </a-tabs>
  912. </div>
  913. <div style="display:flex;justify-content: end; margin-top:20px;">
  914. <a-checkbox defaultChecked>打印入住登记单</a-checkbox></div>
  915. </div>
  916. </div>
  917. </div>
  918. </a-row>
  919. </a-form-model>
  920. </j-form-container>
  921. <select-room-form-modal
  922. ref="modalSelectRoomForm"
  923. @ok="modalFormOk"
  924. ></select-room-form-modal>
  925. <!-- 修改每日单价弹窗 -->
  926. <a-modal :visible="editPriceModal" title="调价" @cancel="editPriceModal = false" :width="800" @ok="editPriceOk">
  927. <template v-if="editPriceData.length>0">
  928. <table v-for="(item, index) in editPriceData" :key="index">
  929. <tr v-if="index==0">
  930. <td style="text-align:center;background:#722ed1;color:#fff;">
  931. <!-- 房号 -->
  932. </td>
  933. <td style="text-align:center;background:#722ed1;color:#fff;">
  934. 批量调价
  935. </td>
  936. <td style="text-align:center;background:#1890ff;color:#fff;">
  937. 价格调整(元/天)
  938. </td>
  939. </tr>
  940. <th>
  941. <tr>
  942. <td style="text-align:center;color:#722ed1;height:60px;width:100px;">
  943. <div>房号</div>
  944. <div style="line-height:30px">
  945. {{item.roomNo}}
  946. </div>
  947. </td>
  948. </tr>
  949. </th>
  950. <th>
  951. <tr>
  952. <td style="text-align:center;color:#722ed1;height:60px">
  953. <div>每日房价</div>
  954. <div>
  955. <a-input-number :min="0" :defaultValue="item.marketPrice" :placeholder="item.marketPrice.toString()" @change="batchPrice($event, index)"></a-input-number>
  956. </div>
  957. </td>
  958. </tr>
  959. </th>
  960. <th style="display:flex;flex-wrap:wrap;height:60px;overflow: auto;">
  961. <td v-for="(sItem, sIndex) in item.edit" :key="sIndex">
  962. <div style="text-align:center;">
  963. {{sItem.day}}
  964. </div>
  965. <div>
  966. <a-input-number :min="0" v-model="sItem.price" />
  967. </div>
  968. </td>
  969. </th>
  970. </table>
  971. </template>
  972. </a-modal>
  973. <member-card-modal ref="modalMemberCardInfo"></member-card-modal>
  974. <agreement-unit-modal ref="modalAgreementUnitInfo"></agreement-unit-modal>
  975. <agreement-unit-modal-table ref="modalAgreementUnitTable" @ok="modalAgreementUnitTableOk"></agreement-unit-modal-table>
  976. <history-modal ref="modalHistoryInfo"></history-modal>
  977. </a-spin>
  978. </template>
  979. <script>
  980. import { httpAction, getAction, postAction } from "@/api/manage";
  981. import { validateDuplicateValue } from "@/utils/util";
  982. import moment from "moment";
  983. import EditableCell from "./EditableCell.vue";
  984. import SelectRoomFormModal from "./SelectRoomFormModal.vue";
  985. import MemberCardModal from "./MemberCardModal";
  986. import AgreementUnitModal from "./AgreementUnitModal";
  987. import AgreementUnitModalTable from "./AgreementUnitModalTable";
  988. import HistoryModal from "./HistoryModal";
  989. import { set } from 'vue';
  990. const columns = [
  991. // {
  992. // title: "",
  993. // dataIndex: "key",
  994. // width: 20,
  995. // },
  996. {
  997. title: "房间号",
  998. dataIndex: "roomNo",
  999. width: 70,
  1000. },
  1001. {
  1002. title: "房型",
  1003. dataIndex: "layoutName",
  1004. width: 80,
  1005. },
  1006. {
  1007. title: "门市价",
  1008. dataIndex: "marketPrice",
  1009. width: 60,
  1010. },
  1011. {
  1012. title: "优惠价",
  1013. dataIndex: "prefPrice",
  1014. width: 80,
  1015. scopedSlots: { customRender: "prefPrice" },
  1016. },
  1017. {
  1018. title: "天数",
  1019. dataIndex: "day",
  1020. width: 50,
  1021. },
  1022. {
  1023. title: "房费",
  1024. dataIndex: "roomFee",
  1025. width: 60,
  1026. },
  1027. {
  1028. title: "押金",
  1029. dataIndex: "deposit",
  1030. scopedSlots: { customRender: "deposit" },
  1031. width: 100,
  1032. },
  1033. ];
  1034. const columns2 = [
  1035. {
  1036. title: "费项",
  1037. dataIndex: "subjectType",
  1038. width: "25%",
  1039. scopedSlots: { customRender: "subjectTypeLabel" },
  1040. },
  1041. {
  1042. title: "收款方式",
  1043. dataIndex: "payType",
  1044. width: "25%",
  1045. scopedSlots: { customRender: "payType" },
  1046. },
  1047. {
  1048. title: "应缴",
  1049. dataIndex: "receivable",
  1050. width: "25%",
  1051. scopedSlots: { customRender: "prefPrice" },
  1052. },
  1053. {
  1054. title: "实收",
  1055. dataIndex: "money",
  1056. width: "25%",
  1057. scopedSlots: { customRender: "money" },
  1058. },
  1059. ];
  1060. const date = new Date();
  1061. const endDate = new Date(date.setDate(date.getDate() + 1));
  1062. export default {
  1063. name: "BillRoomForm",
  1064. components: {
  1065. EditableCell,
  1066. SelectRoomFormModal,
  1067. MemberCardModal,
  1068. AgreementUnitModal,
  1069. AgreementUnitModalTable,
  1070. HistoryModal,
  1071. },
  1072. props: {
  1073. //表单禁用
  1074. disabled: {
  1075. type: Boolean,
  1076. default: false,
  1077. required: false,
  1078. },
  1079. },
  1080. data() {
  1081. return {
  1082. utcTxt: null,
  1083. editDepositModal: false,
  1084. //会员选中数据
  1085. vipCustomerData: {},
  1086. agreementUnitData: { customerName: "" },
  1087. busMarketAgreementCustomer: {},
  1088. otherRoomSync: true,
  1089. payPalModel: { list: [{ key1: "", key2: "", key3: "" }] },
  1090. depositSplit: true,
  1091. paymentSplit: true,
  1092. activeKey: "",
  1093. PriceData: [],
  1094. newTabIndex: 0,
  1095. //调价弹窗
  1096. editPriceModal: false,
  1097. //调价的索引
  1098. editPriceIndex: null,
  1099. selectedRowKeys: [],
  1100. // data,
  1101. columns,
  1102. // data2,
  1103. columns2,
  1104. wakeList: [{}],
  1105. // model: { rooms: panes, data: data, data2: data2 },
  1106. modelDefault: {},
  1107. model: {
  1108. // data: data,
  1109. orderInfo: {
  1110. rooms: [],
  1111. data: [],
  1112. data2: [],
  1113. bookingOrdersType: 1,
  1114. arrivalTime2: moment(new Date()).format("YYYY-MM-DD"),
  1115. dueOutTime2: moment(endDate).format("YYYY-MM-DD"),
  1116. arrivalTimeSpan: moment(new Date(), "HH:mm"),
  1117. dueOutTimeSpan: moment("12:00", "HH:mm"),
  1118. bookingType: 1,
  1119. dayCount: 1,
  1120. warrantType: 1,
  1121. hourRoomId: "",
  1122. breakfastNum: 0,
  1123. vipCustomerId: "",
  1124. customerType: 1,
  1125. contractTeamProtocolName: "",
  1126. customerSource: "",
  1127. },
  1128. roomIds: [{customerSource:''}],
  1129. livingRoomDayPrices: [],
  1130. roomPrices: [],
  1131. orderFees: [],
  1132. },
  1133. labelCol: {
  1134. xs: { span: 24 },
  1135. sm: { span: 7 },
  1136. },
  1137. wrapperCol: {
  1138. xs: { span: 24 },
  1139. sm: { span: 16 },
  1140. },
  1141. confirmLoading: false,
  1142. validatorRules: {
  1143. "orderInfo.bookingType": [
  1144. { required: true, message: "请选择入住类型!" },
  1145. ],
  1146. "orderInfo.arrivalTime2": [
  1147. { required: true, message: "请选择入住时间!" },
  1148. ],
  1149. "orderInfo.dueOutTime2": [
  1150. { required: true, message: "请选择预离时间!" },
  1151. ],
  1152. "orderInfo.customerSource": [
  1153. { required: true, message: "请选择客人来源!" },
  1154. ],
  1155. "orderInfo.bookingDicWay": [
  1156. { required: true, message: "请选择预定方式!" },
  1157. ],
  1158. "orderInfo.customerType": [
  1159. { required: true, message: "请选择客人类型!" },
  1160. ],
  1161. contactName: [{ required: true, message: "请输入联系人!" }],
  1162. phone: [{ required: true, message: "请输入电话!" }],
  1163. },
  1164. url: {
  1165. add: "business/busRoomBookingOrders/living",
  1166. edit: "business/busRoomBookingOrders/living",
  1167. queryById: "/business/busMeetingRoom/queryById",
  1168. },
  1169. result: [],
  1170. selectIndex: 0,
  1171. customerSourceList: [],
  1172. bookingdicWayList: [],
  1173. warranterList: [],
  1174. hourRoomRuleList: [],
  1175. canUserRooms: [],
  1176. customerList: [],
  1177. oldcustomerList: [],
  1178. depositRule: {},
  1179. roomLayoutList: [],
  1180. amount: 0,
  1181. roomIdsIndex: 0,
  1182. roomIdsIndexId:null,
  1183. oldBusMemberCardList: [],
  1184. busMemberCardList: [],
  1185. payTypeList: [],
  1186. busMemberCard: {},
  1187. oldBusMarketAgreementUnitList: [],
  1188. busMarketAgreementUnitList: [],
  1189. ruZhuHistoryList: [],
  1190. remenmberPayState: null,
  1191. loadRemenmberPayState: false,
  1192. roomListCopy:[]
  1193. };
  1194. },
  1195. computed: {
  1196. editPriceData() {
  1197. // let arr = [];
  1198. // arr.length = this.model.orderInfo.dayCount;
  1199. // for (let i = 0; i < arr.length; i++) {
  1200. // arr[i] = {
  1201. // day: this.addDate(this.model.orderInfo.arrivalTime2, i),
  1202. // price:
  1203. // (this.model.roomPrices[this.editPriceIndex] &&
  1204. // this.model.roomPrices[this.editPriceIndex].prefPrice) ||
  1205. // 0,
  1206. // };
  1207. // let idx =
  1208. // this.model.roomPrices[this.editPriceIndex] &&
  1209. // this.model.roomPrices[this.editPriceIndex].editPriceTime &&
  1210. // this.model.roomPrices[this.editPriceIndex].editPriceTime.findIndex(
  1211. // (item) => item == arr[i].day
  1212. // );
  1213. // if (idx > -1) {
  1214. // console.log(idx);
  1215. // arr[i].price = this.model.roomPrices[this.editPriceIndex].editPrice[idx];
  1216. // }
  1217. // arr[i] = {
  1218. // day: this.addDate(this.model.orderInfo.arrivalTime2, i),
  1219. // price:0
  1220. // };
  1221. // }
  1222. console.log(this.model.roomPrices);
  1223. console.log('99999999999999999999999',this.daysBetween(this.model.orderInfo.arrivalTime2, this.model.orderInfo.dueOutTimeSpan));
  1224. let copy = JSON.parse(JSON.stringify(this.model.roomPrices));
  1225. for (let i = 0; i < copy.length; i++) {
  1226. let money = copy[i].prefPrice;
  1227. let brr = [];
  1228. // brr.length = this.model.orderInfo.dayCount;
  1229. // brr.length = this.daysBetween(this.model.orderInfo.arrivalTime2, this.model.orderInfo.dueOutTime2)
  1230. brr.length = copy[i].day;
  1231. for (let j = 0; j < brr.length; j++) {
  1232. brr[j] = {
  1233. day: this.addDate(this.model.orderInfo.arrivalTime2, j),
  1234. price: money,
  1235. };
  1236. if (
  1237. this.model.roomPrices[i].editPriceTime &&
  1238. this.model.roomPrices[i].editPriceTime.length > 0
  1239. ) {
  1240. let idx = this.model.roomPrices[i].editPriceTime.findIndex(
  1241. (item) => item == brr[j].day
  1242. );
  1243. if (idx > -1) {
  1244. brr[j].price = this.model.roomPrices[i].editPrice[idx];
  1245. }
  1246. }
  1247. }
  1248. // brr.fill({day: this.addDate(this.model.orderInfo.arrivalTime2, i),price:money})
  1249. // brr[i] = {
  1250. // day: this.addDate(this.model.orderInfo.arrivalTime2, i),
  1251. // price:money
  1252. // };
  1253. copy[i].edit = brr;
  1254. // copy[i].day = this.model.roomPrices.filter(item=>item.roomId == copy[i].roomId)[0].day
  1255. if (this.roomIdsIndex==0) {
  1256. copy[i].day = this.daysBetween(this.model.orderInfo.arrivalTime2, this.model.orderInfo.dueOutTime2)
  1257. }
  1258. // copy[i].day = this.model.orderInfo.dayCount;
  1259. // copy[i].day = this.daysBetween(this.model.orderInfo.arrivalTime2, this.model.orderInfo.dueOutTime2)
  1260. }
  1261. console.log(copy);
  1262. this.PriceData = copy;
  1263. return copy;
  1264. },
  1265. formDisabled() {
  1266. return this.disabled;
  1267. },
  1268. orderFeesAmout() {
  1269. var sum = 0;
  1270. this.model.orderFees.forEach((item) => {
  1271. sum += item.money;
  1272. });
  1273. return sum;
  1274. },
  1275. orderFeesArrearsAmout() {
  1276. return this.orderFeesAmout - this.amount;
  1277. },
  1278. orderFeesText() {
  1279. var text = "";
  1280. this.model.orderFees.forEach((item) => {
  1281. var find = this.payTypeList.find((t) => t.id == item.payType);
  1282. if (find) {
  1283. text += find.name + ":" + item.money + "元;";
  1284. }
  1285. });
  1286. return text;
  1287. },
  1288. cPhone() {
  1289. let a = this.model.roomIds.map((t) => t.key5);
  1290. return a;
  1291. },
  1292. },
  1293. watch: {
  1294. 'model.roomIds'(val){
  1295. if (val.length > 0) {
  1296. val.forEach(ele=>{
  1297. if (!ele.customerSource) {
  1298. ele.customerSource = this.model.orderInfo.customerSource
  1299. }
  1300. })
  1301. console.log(this.model.roomIds);
  1302. // model.roomIds[roomIdsIndex].customerSource = model.orderInfo.customerSource
  1303. }
  1304. },
  1305. 'model.orderInfo.bookingType'(val,old){
  1306. debugger
  1307. if (val) {
  1308. this.model.orderInfo.dayCount = this.daysBetween(this.model.orderInfo.arrivalTime2, this.model.orderInfo.dueOutTime2)
  1309. }
  1310. if(old == 2 && val == 3 || val == 4){
  1311. this.editPriceData.forEach(item=>{
  1312. let arr = {}
  1313. arr = this.roomListCopy.filter(t=>t.roomId == item.roomId)[0]
  1314. item.marketPrice = arr.marketPrice
  1315. item.prefPrice = 0
  1316. item.roomFee = 0
  1317. })
  1318. this.editPriceOk()
  1319. }
  1320. if (val == 3 || val == 4) {
  1321. this.editPriceData.forEach(item=>{
  1322. item.edit.forEach((ele) => {
  1323. ele.price = 0;
  1324. });
  1325. })
  1326. this.editPriceOk()
  1327. }
  1328. if (val == 1 || val == 5) {
  1329. this.editPriceData.forEach(item=>{
  1330. let arr = {}
  1331. arr = this.roomListCopy.filter(t=>t.roomId == item.roomId)[0]
  1332. console.log(arr);
  1333. item.marketPrice = arr.marketPrice
  1334. item.prefPrice = item.marketPrice
  1335. item.roomFee = item.marketPrice
  1336. item.edit.forEach((ele) => {
  1337. ele.price = item.prefPrice;
  1338. });
  1339. })
  1340. this.editPriceOk()
  1341. }
  1342. if (val == 2) {
  1343. console.log(this.hourRoomRuleList);
  1344. let obj = this.hourRoomRuleList.filter(item=>item.id == this.model.orderInfo.hourRoomId)[0]
  1345. this.editPriceData.forEach(item=>{
  1346. item.marketPrice = obj.afterOpenRoomPay
  1347. item.prefPrice = obj.afterOpenRoomPay
  1348. item.roomFee = obj.afterOpenRoomPay
  1349. if (item.edit) {
  1350. item.edit.forEach((ele) => {
  1351. ele.price = item.prefPrice;
  1352. });
  1353. }
  1354. })
  1355. this.editPriceOk()
  1356. }
  1357. },
  1358. otherRoomSync(value) {
  1359. if (!value) {
  1360. if (this.modelDefault.roomIds && this.modelDefault.roomIds.length > 0) {
  1361. if (this.modelDefault.roomIds[0].key1) {
  1362. for (var i = 1; i < this.modelDefault.roomIds.length; i++) {
  1363. var room = this.modelDefault.roomIds[i];
  1364. if (!room.key1) {
  1365. this.$set(room, "key1", this.modelDefault.roomIds[0].key1);
  1366. this.$set(room, "key2", this.modelDefault.roomIds[0].key2);
  1367. this.$set(room, "key3", this.modelDefault.roomIds[0].key3);
  1368. this.$set(room, "key4", this.modelDefault.roomIds[0].key4);
  1369. this.$set(room, "key5", this.modelDefault.roomIds[0].key5);
  1370. this.$set(room, "key6", this.modelDefault.roomIds[0].key6);
  1371. this.$set(
  1372. room,
  1373. "customerId",
  1374. this.modelDefault.roomIds[0].customerId
  1375. );
  1376. }
  1377. }
  1378. }
  1379. }
  1380. }
  1381. },
  1382. depositSplit(value) {
  1383. if (!value) {
  1384. var yajin = this.model.roomPrices.reduce((sum, val) => {
  1385. let total = sum + val.deposit;
  1386. return isNaN(total) ? 0 : total;
  1387. }, 0);
  1388. this.model.roomPrices.forEach((t) => {
  1389. t.deposit = 0;
  1390. });
  1391. this.model.roomPrices[0].deposit = yajin;
  1392. } else {
  1393. this.model.roomPrices.forEach((t) => {
  1394. t.deposit = this.compuleDeposit(t.marketPrice);
  1395. });
  1396. }
  1397. },
  1398. paymentSplit(value) {
  1399. if (this.loadRemenmberPayState) {
  1400. console.log(1111111, this.loadRemenmberPayState);
  1401. if (!value) {
  1402. var list2 = this.model.orderFees.filter(
  1403. (t) => t.subjectType == 2 && (!t.add || t.add != 1)
  1404. );
  1405. var list1 = this.model.orderFees.filter((t) => t.subjectType == 1);
  1406. var list = this.model.orderFees.filter(
  1407. (t) =>
  1408. (t.subjectType != 1 && t.subjectType != 2) ||
  1409. (t.add && t.add == 1)
  1410. );
  1411. list2.forEach((t) => {
  1412. var yjList = list1.filter((b) => b.roomId == t.roomId);
  1413. var yajin = yjList.reduce((sum, val) => {
  1414. let total = sum + val.money;
  1415. return isNaN(total) ? 0 : total;
  1416. }, 0);
  1417. t.yajing = yajin;
  1418. t.money += yajin;
  1419. t.receivable = t.money;
  1420. });
  1421. this.model.orderFees = [...list, ...list2];
  1422. } else {
  1423. // var list2 = this.model.orderFees.filter(
  1424. // (t) => t.subjectType == 2 && (!t.add || t.add != 1)
  1425. // );
  1426. // var list1 = [];
  1427. // var list = this.model.orderFees.filter(
  1428. // (t) =>
  1429. // (t.subjectType != 1 && t.subjectType != 2) || (t.add && t.add == 1)
  1430. // );
  1431. // list2.forEach((t) => {
  1432. // if (t.yajing && t.yajing > 0) {
  1433. // t.money -= t.yajing;
  1434. // t.receivable = t.money;
  1435. // var item = JSON.parse(JSON.stringify(t));
  1436. // item.subjectType = 1;
  1437. // item.money = t.yajing;
  1438. // item.yajing = 0;
  1439. // item.receivable = item.money;
  1440. // list1.push(item);
  1441. // }
  1442. // });
  1443. // list = [...list, ...list1];
  1444. // this.model.orderFees = [...list, ...list2];
  1445. this.loadOrderFees();
  1446. }
  1447. }
  1448. },
  1449. // "model.roomIds": {
  1450. // handler(newValue, oldValue) {
  1451. // console.log(newValue, oldValue);
  1452. // },
  1453. // deep: true,
  1454. // immediate: true,
  1455. // },
  1456. cPhone: {
  1457. handler: function (val, old) {
  1458. console.log(val, old);
  1459. var index = this.model.roomIds.findIndex((t) => t.id == this.activeKey);
  1460. if (index >= 0) {
  1461. var find = this.model.roomIds[index];
  1462. find.busMemberCard = this.busMemberCardList.find(
  1463. (t) => t.mobile == val[index]
  1464. );
  1465. if (!find.busMemberCard) {
  1466. find.busMarketAgreementUnit = this.busMarketAgreementUnitList.find(
  1467. (t) => t.phone == val[index]
  1468. );
  1469. } else {
  1470. find.busMarketAgreementUnit = {};
  1471. }
  1472. if (find.busMemberCard && find.busMemberCard.id) {
  1473. this.model.orderInfo.customerType = 2;
  1474. this.model.orderInfo.roomPriceSlnId = find.busMemberCard.id;
  1475. } else if (
  1476. find.busMarketAgreementUnit &&
  1477. find.busMarketAgreementUnit.id
  1478. ) {
  1479. this.model.orderInfo.customerType = 3;
  1480. } else {
  1481. this.model.orderInfo.customerType = 1;
  1482. }
  1483. if (this.ruZhuHistoryList && this.ruZhuHistoryList.length > 0) {
  1484. find.ruZhuHistory = this.ruZhuHistoryList.find(
  1485. (t) => t.phone == val[index]
  1486. );
  1487. }
  1488. }
  1489. },
  1490. deep: true,
  1491. immediate: true,
  1492. },
  1493. },
  1494. created() {
  1495. // postAction("/business/busRoomBookingOrders/test-utc",{
  1496. // createTime: new Date()
  1497. // }).then(res=>{
  1498. // let d = new Date(res.result)
  1499. // this.utcTxt = `======服务端返回UTC:${res.result}===LocalDateTime:${d.toLocaleString()}`
  1500. // })
  1501. var _info = JSON.parse(localStorage.getItem("storeInfo"));
  1502. if (_info) {
  1503. this.model.hotelId = _info.id;
  1504. }
  1505. //备份model原始值
  1506. this.modelDefault = JSON.parse(JSON.stringify(this.model));
  1507. getAction("/business/busDictItem/list", {
  1508. hotelId: _info.id,
  1509. dictId: "1639538915239743490",
  1510. }).then((res) => {
  1511. if (res.success) {
  1512. this.customerSourceList = res.result.records;
  1513. if (this.customerSourceList) {
  1514. this.model.orderInfo.customerSource = this.customerSourceList[0].id;
  1515. }
  1516. }
  1517. });
  1518. getAction("/business/busDictItem/list", {
  1519. hotelId: _info.id,
  1520. dictId: "1639544187093995521",
  1521. }).then((res) => {
  1522. if (res.success) {
  1523. this.bookingdicWayList = res.result.records;
  1524. }
  1525. });
  1526. getAction("/business/busSalesPerson/list", {
  1527. hotelId: _info.id,
  1528. pageNo: 1,
  1529. pageSize: 100,
  1530. }).then((res) => {
  1531. if (res.success) {
  1532. this.warranterList = res.result.records;
  1533. }
  1534. });
  1535. getAction("/rooms/cesHourRoomRule/list", {
  1536. pageNo: 1,
  1537. pageSize: 100,
  1538. }).then((res) => {
  1539. if (res.success) {
  1540. this.hourRoomRuleList = res.result.records;
  1541. }
  1542. });
  1543. getAction("/bus/busCustomer/list", {}).then((res) => {
  1544. if (res.success) {
  1545. this.customerList = res.result.records;
  1546. this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
  1547. }
  1548. });
  1549. getAction("/business/busDepositSetting/queryByHotelId", {
  1550. hotelId: _info.id,
  1551. }).then((res) => {
  1552. if (res.success) {
  1553. this.depositRule = res.result;
  1554. }
  1555. });
  1556. getAction("/business/busMemberCard/list", {
  1557. pageSize: 99999,
  1558. pageNo: 1,
  1559. }).then((res) => {
  1560. if (res.success) {
  1561. this.busMemberCardList = res.result.records;
  1562. this.oldBusMemberCardList = JSON.parse(
  1563. JSON.stringify(this.busMemberCardList)
  1564. );
  1565. }
  1566. });
  1567. getAction("/business/busMarketAgreementUnit/list", {
  1568. pageSize: 99999,
  1569. pageNo: 1,
  1570. }).then((res) => {
  1571. if (res.success) {
  1572. this.busMarketAgreementUnitList = res.result.records;
  1573. this.oldBusMarketAgreementUnitList = JSON.parse(
  1574. JSON.stringify(res.result.records)
  1575. );
  1576. }
  1577. });
  1578. postAction("/rooms/cesAllDayPriceRule/fetch", { hotelId: _info.id }).then(
  1579. (res) => {
  1580. if (res.success) {
  1581. if (
  1582. res.result &&
  1583. res.result.cesAllDayPriceRule &&
  1584. res.result.cesAllDayPriceRule.leaveTime
  1585. ) {
  1586. this.model.orderInfo.dueOutTimeSpan = moment(
  1587. res.result.cesAllDayPriceRule.leaveTime,
  1588. "HH:mm"
  1589. );
  1590. }
  1591. }
  1592. this.loadRooms();
  1593. }
  1594. );
  1595. getAction("/business/busRoomBookingOrders/ruzhu-history-list", {
  1596. phone: "",
  1597. pageSize: 99999,
  1598. pageNo: 1,
  1599. }).then((res) => {
  1600. if (res.success) {
  1601. this.ruZhuHistoryList = res.result.records;
  1602. }
  1603. });
  1604. // this.getcesRoomLayout();
  1605. },
  1606. methods: {
  1607. customerSourceChange(e){
  1608. console.log(e);
  1609. let idx = this.model.roomIds.findIndex(item=>item.id == this.roomIdsIndexId)
  1610. this.model.roomIds[idx].customerSource = e
  1611. },
  1612. //计算两个日期之间相隔多少天
  1613. daysBetween(date1, date2) {
  1614. const oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds
  1615. const firstDate = new Date(date1);
  1616. const secondDate = new Date(date2);
  1617. if (secondDate<firstDate) {
  1618. this.$message.warning("离开时间不能小于预离时间");
  1619. return
  1620. }
  1621. const diffDays = Math.round(Math.abs((firstDate - secondDate) / oneDay));
  1622. if (diffDays == 0) {
  1623. return 1
  1624. }
  1625. return diffDays;
  1626. },
  1627. priceInput(e, idx, sidx) {
  1628. console.log(e, idx, sidx);
  1629. this.editPriceData[idx].edit[sidx].price = e;
  1630. },
  1631. handleSearchAgreementUnit(value) {
  1632. let result;
  1633. if (!value) {
  1634. result = this.oldBusMarketAgreementUnitList;
  1635. } else {
  1636. result = this.oldBusMarketAgreementUnitList.filter((t) =>
  1637. t.customerName.includes(value)
  1638. );
  1639. }
  1640. this.busMarketAgreementUnitList = JSON.parse(JSON.stringify(result));
  1641. },
  1642. handleSelectAgreementUnit(value) {
  1643. let result = this.busMarketAgreementUnitList.find((t) => t.id == value);
  1644. this.model.orderInfo.contractTeamId = value;
  1645. this.agreementUnitData = JSON.parse(JSON.stringify(result));
  1646. this.contractTeamIdChange(value);
  1647. },
  1648. handleSearchVip(value) {
  1649. let result;
  1650. if (!value) {
  1651. result = this.oldBusMemberCardList;
  1652. } else {
  1653. console.log("this.oldBusMemberCardList", this.oldBusMemberCardList);
  1654. result = this.oldBusMemberCardList.filter((t) => {
  1655. return (
  1656. t.name.includes(value) ||
  1657. (t.cardNo && t.cardNo.includes(value)) ||
  1658. (t.mobile && t.mobile.includes(value))
  1659. );
  1660. });
  1661. }
  1662. this.busMemberCardList = JSON.parse(JSON.stringify(result));
  1663. },
  1664. handleSelectVip(value) {
  1665. console.log(value);
  1666. let result = this.busMemberCardList.find((t) => t.id == value);
  1667. this.model.orderInfo.vipCustomerId = value;
  1668. this.vipCustomerData = JSON.parse(JSON.stringify(result));
  1669. this.vipCustomerIdChange(result.id);
  1670. },
  1671. loadOrderFees() {
  1672. var arr = [];
  1673. if (!this.loadRemenmberPayState) {
  1674. arr = this.remenmberPayState.split("-");
  1675. this.paymentSplit = arr[0] == "1";
  1676. }
  1677. var orderFees = [];
  1678. var roomIndex = 0;
  1679. var payType = this.payTypeList[0];
  1680. this.model.roomPrices.forEach((item) => {
  1681. var money = item.roomFee;
  1682. var deposit = item.deposit;
  1683. if (!orderFees.some((t) => t.roomId == this.model.roomIds[0].id)) {
  1684. if (!this.paymentSplit) {
  1685. money = item.roomFee + deposit;
  1686. }
  1687. if (!this.paymentSplit) {
  1688. if (arr.length === 3) {
  1689. if (arr[1] == "1") {
  1690. orderFees.push({
  1691. subjectType: 2,
  1692. subjectTypeLabel: "预收房费",
  1693. payType: payType ? payType.id : "",
  1694. payTypeLabel: payType ? payType.name : "",
  1695. receivable: money,
  1696. money: money,
  1697. roomId: this.model.roomIds[0].id,
  1698. });
  1699. } else if (arr[1] == "2") {
  1700. orderFees.push({
  1701. subjectType: 1,
  1702. subjectTypeLabel: "押金",
  1703. payType: payType ? payType.id : "",
  1704. payTypeLabel: payType ? payType.name : "",
  1705. receivable: deposit,
  1706. money: deposit,
  1707. roomId: this.model.roomIds[0].id,
  1708. });
  1709. }
  1710. } else {
  1711. orderFees.push({
  1712. subjectType: 2,
  1713. subjectTypeLabel: "预收房费",
  1714. payType: payType ? payType.id : "",
  1715. payTypeLabel: payType ? payType.name : "",
  1716. receivable: money,
  1717. money: money,
  1718. roomId: this.model.roomIds[0].id,
  1719. });
  1720. }
  1721. } else {
  1722. orderFees.push({
  1723. subjectType: 2,
  1724. subjectTypeLabel: "预收房费",
  1725. payType: payType ? payType.id : "",
  1726. payTypeLabel: payType ? payType.name : "",
  1727. receivable: money,
  1728. money: money,
  1729. roomId: this.model.roomIds[0].id,
  1730. });
  1731. }
  1732. if (this.paymentSplit) {
  1733. if (deposit > 0) {
  1734. orderFees.push({
  1735. subjectType: 1,
  1736. subjectTypeLabel: "押金",
  1737. payType: payType ? payType.id : "",
  1738. payTypeLabel: payType ? payType.name : "",
  1739. receivable: deposit,
  1740. money: deposit,
  1741. roomId: this.model.roomIds[0].id,
  1742. });
  1743. }
  1744. }
  1745. } else {
  1746. var find = orderFees.find(
  1747. (t) => t.subjectType == 2 && t.roomId == this.model.roomIds[0].id
  1748. );
  1749. if (find) {
  1750. if (roomIndex == 0) {
  1751. find.money = item.roomFee;
  1752. find.receivable = item.roomFee;
  1753. } else {
  1754. find.money += item.roomFee;
  1755. find.receivable += item.roomFee;
  1756. }
  1757. if (!this.paymentSplit) {
  1758. find.money += deposit;
  1759. find.receivable += deposit;
  1760. }
  1761. }
  1762. if (this.paymentSplit) {
  1763. var find2 = orderFees.find(
  1764. (t) => t.subjectType == 1 && t.roomId == this.model.roomIds[0].id
  1765. );
  1766. if (find2) {
  1767. if (deposit > 0) {
  1768. if (roomIndex == 0) {
  1769. find2.money = deposit;
  1770. find2.receivable = deposit;
  1771. } else {
  1772. find2.money += deposit;
  1773. find2.receivable += deposit;
  1774. }
  1775. }
  1776. }
  1777. }
  1778. }
  1779. roomIndex++;
  1780. });
  1781. this.model.orderFees = orderFees;
  1782. setTimeout(() => {
  1783. this.loadRemenmberPayState = true;
  1784. }, 100);
  1785. },
  1786. readCardNo() {
  1787. this.$message.error("接口程序未打开,请打开接口程序");
  1788. },
  1789. contractTeamIdChange(e) {
  1790. this.model.orderInfo.contractTeamId = e;
  1791. getAction("/business/busMarketAgreementCustomer/list", {
  1792. agreementId: this.model.orderInfo.contractTeamId,
  1793. }).then((res) => {
  1794. if (res.success) {
  1795. var list = res.result.records;
  1796. if (list && list.length > 0) {
  1797. this.model.orderInfo.contractTeamProtocolName = list[0].name;
  1798. this.model.orderInfo.contractTeamProtocolId = list[0].id;
  1799. this.busMarketAgreementCustomer = list[0];
  1800. var info = list[0];
  1801. if (info.fixedDiscount == 1 && info.discount > 0) {
  1802. if (this.model.roomPrices && this.model.roomPrices.length > 0) {
  1803. var i = 0;
  1804. this.model.roomPrices.forEach((t) => {
  1805. t.prefPrice = (t.marketPrice * info.discount) / 100;
  1806. t.roomFee = t.prefPrice * t.day;
  1807. var editPrice = [];
  1808. if (t.editPrice && t.editPrice.length > 0) {
  1809. t.editPrice.forEach((p) => {
  1810. editPrice.push(t.prefPrice);
  1811. });
  1812. t.editPrice = editPrice;
  1813. }
  1814. this.editPriceIndex = i;
  1815. this.editPriceOk();
  1816. i++;
  1817. console.log("t", t);
  1818. });
  1819. }
  1820. }
  1821. }
  1822. }
  1823. });
  1824. },
  1825. vipCustomerIdChange(vipCustomerId) {
  1826. var find = this.busMemberCardList.find((t) => t.id == vipCustomerId);
  1827. getAction("/org.jeecg.modules.business/busMarketMember/queryById", {
  1828. id: find.gradeId,
  1829. }).then((res) => {
  1830. if (res.success) {
  1831. var info = res.result;
  1832. if (info) {
  1833. if (info.type == 0 && info.discount > 0) {
  1834. if (this.model.roomPrices && this.model.roomPrices.length > 0) {
  1835. var i = 0;
  1836. this.model.roomPrices.forEach((t) => {
  1837. t.prefPrice = (t.marketPrice * info.discount) / 100;
  1838. t.roomFee = t.prefPrice * t.day;
  1839. var editPrice = [];
  1840. if (t.editPrice && t.editPrice.length > 0) {
  1841. t.editPrice.forEach((p) => {
  1842. editPrice.push(t.prefPrice);
  1843. });
  1844. t.editPrice = editPrice;
  1845. }
  1846. this.editPriceIndex = i;
  1847. this.editPriceOk();
  1848. i++;
  1849. console.log("t", t);
  1850. });
  1851. }
  1852. }
  1853. }
  1854. }
  1855. });
  1856. },
  1857. modalAgreementUnitTableOk(e) {
  1858. var info = e;
  1859. this.model.orderInfo.contractTeamProtocolName = info.name;
  1860. this.model.orderInfo.contractTeamProtocolId = info.id;
  1861. this.busMarketAgreementCustomer = info;
  1862. if (info.fixedDiscount == 1 && info.discount > 0) {
  1863. if (this.model.roomPrices && this.model.roomPrices.length > 0) {
  1864. var i = 0;
  1865. this.model.roomPrices.forEach((t) => {
  1866. t.prefPrice = (t.marketPrice * info.discount) / 100;
  1867. t.roomFee = t.prefPrice * t.day;
  1868. var editPrice = [];
  1869. if (t.editPrice && t.editPrice.length > 0) {
  1870. t.editPrice.forEach((p) => {
  1871. editPrice.push(t.prefPrice);
  1872. });
  1873. t.editPrice = editPrice;
  1874. }
  1875. this.editPriceIndex = i;
  1876. this.editPriceOk();
  1877. i++;
  1878. console.log("t", t);
  1879. });
  1880. }
  1881. }
  1882. },
  1883. showRuZhuHistory(phone) {
  1884. this.$refs.modalHistoryInfo.add(phone);
  1885. this.$refs.modalHistoryInfo.title = "历史入住信息";
  1886. this.$refs.modalHistoryInfo.disableSubmit = true;
  1887. },
  1888. showMemberCard(busMemberCard) {
  1889. console.log("busMemberCard", busMemberCard);
  1890. this.$refs.modalMemberCardInfo.edit(busMemberCard);
  1891. this.$refs.modalMemberCardInfo.title = "会员信息";
  1892. this.$refs.modalMemberCardInfo.disableSubmit = true;
  1893. },
  1894. showAgreementUnit(busMarketAgreementUnit) {
  1895. console.log("busMarketAgreementUnit", busMarketAgreementUnit);
  1896. this.$refs.modalAgreementUnitInfo.edit(busMarketAgreementUnit);
  1897. this.$refs.modalAgreementUnitInfo.title = "协议单位信息";
  1898. this.$refs.modalAgreementUnitInfo.disableSubmit = true;
  1899. },
  1900. showAgreementUnitTable(agreementId) {
  1901. this.$refs.modalAgreementUnitTable.add(agreementId);
  1902. this.$refs.modalAgreementUnitTable.title = "选择协议";
  1903. this.$refs.modalAgreementUnitTable.disableSubmit = true;
  1904. },
  1905. //批量调价
  1906. batchPrice(e, index) {
  1907. console.log(e);
  1908. // this.editPriceData.forEach((ele) => {
  1909. // ele.price = e;
  1910. // });
  1911. this.editPriceData[index].edit.forEach((ele) => {
  1912. ele.price = e;
  1913. });
  1914. },
  1915. //根据传入的数字将日期加上对应的天数
  1916. addDate(date, days) {
  1917. // console.log(date, days);
  1918. let time = new Date(date);
  1919. time.setDate(time.getDate() + days);
  1920. let m = time.getMonth() + 1;
  1921. let d = time.getDate();
  1922. if (m < 10) {
  1923. m = "0" + m;
  1924. }
  1925. if (d < 10) {
  1926. d = "0" + d;
  1927. }
  1928. return time.getFullYear() + "-" + m + "-" + d;
  1929. },
  1930. /**
  1931. * 点击修改图标时
  1932. */
  1933. onCellExpand(idx) {
  1934. console.log(idx);
  1935. this.editPriceIndex = idx;
  1936. console.log("11111111111111111111111", this.model.roomPrices);
  1937. this.editPriceModal = true;
  1938. },
  1939. /**
  1940. * 修改完成
  1941. */
  1942. editPriceOk() {
  1943. console.log(this.model.roomPrices);
  1944. // this.model.roomPrices[this.editPriceIndex].editPriceTime = [];
  1945. // this.model.roomPrices[this.editPriceIndex].editPrice = [];
  1946. // this.editPriceData.forEach((ele) => {
  1947. // this.model.roomPrices[this.editPriceIndex].editPriceTime.push(ele.day);
  1948. // this.model.roomPrices[this.editPriceIndex].editPrice.push(ele.price);
  1949. // });
  1950. // console.log(this.model.roomPrices);
  1951. // this.model.roomPrices[this.editPriceIndex].prefPrice =
  1952. // this.editPriceData[0].price;
  1953. // this.onCellChange(
  1954. // "prefPrice",
  1955. // this.editPriceIndex,
  1956. // this.editPriceData[0].price
  1957. // );
  1958. // this.editPriceData.forEach((ele) => {
  1959. // ele.price = 0;
  1960. // });
  1961. this.model.roomPrices = JSON.parse(JSON.stringify(this.editPriceData));
  1962. this.model.roomPrices.forEach((ele, index) => {
  1963. ele.editPriceTime = [];
  1964. ele.editPrice = [];
  1965. ele.edit.forEach((t, tdx) => {
  1966. ele.editPriceTime.push(t.day), ele.editPrice.push(t.price);
  1967. });
  1968. ele.prefPrice = ele.edit[0].price;
  1969. });
  1970. // this.editPriceData.forEach((ele, index) => {
  1971. // if (this.model.roomPrices[index].roomId==ele.roomId) {
  1972. // this.model.roomPrices[index].editPriceTime = [];
  1973. // this.model.roomPrices[index].editPrice = [];
  1974. // ele.edit.forEach(t=>{
  1975. // this.model.roomPrices[index].editPriceTime.push(t.day);
  1976. // this.model.roomPrices[index].editPrice.push(t.price);
  1977. // this.model.roomPrices[index].prefPrice = ele.edit[0].price;
  1978. // })
  1979. // this.onCellChange(
  1980. // "prefPrice",
  1981. // index,
  1982. // ele.edit[0].price
  1983. // );
  1984. // }
  1985. // });
  1986. console.log(this.model.roomPrices);
  1987. this.editPriceModal = false;
  1988. var sum = 0;
  1989. var money2 = 0;
  1990. var deposit2 = 0;
  1991. for (var i = 0; i < this.model.roomPrices.length; i++) {
  1992. var money = 0;
  1993. var item = this.model.roomPrices[i];
  1994. if (item.editPrice && item.editPrice.length > 0) {
  1995. item.editPrice.forEach((p) => {
  1996. money += p;
  1997. });
  1998. item.roomFee = money;
  1999. sum += money + item.deposit;
  2000. } else {
  2001. sum += item.roomFee + item.deposit;
  2002. }
  2003. money2 += item.roomFee;
  2004. deposit2 += item.deposit;
  2005. // var find = this.model.orderFees.find(
  2006. // (t) =>
  2007. // t.subjectType == 2 &&
  2008. // t.roomId == this.model.roomPrices[this.editPriceIndex].roomId
  2009. // );
  2010. // if (find && find.roomId == item.roomId) {
  2011. // find.money = money;
  2012. // find.receivable = money;
  2013. // }
  2014. }
  2015. var find = this.model.orderFees.find(
  2016. (t) => t.subjectType == 2 && t.roomId == this.model.roomIds[0].id
  2017. );
  2018. if (find) {
  2019. find.money = money2;
  2020. find.receivable = money2;
  2021. if (!this.paymentSplit) {
  2022. find.money += deposit2;
  2023. find.receivable += deposit2;
  2024. }
  2025. }
  2026. var find2 = this.model.orderFees.find(
  2027. (t) => t.subjectType == 1 && t.roomId == this.model.roomIds[0].id
  2028. );
  2029. if (find2) {
  2030. find2.money = deposit2;
  2031. find2.receivable = deposit2;
  2032. }
  2033. this.amount = sum;
  2034. },
  2035. presetNumChange(e, record) {
  2036. console.log(e, record);
  2037. },
  2038. async getcesRoomLayout() {
  2039. await getAction("/rooms/cesRoomLayout/list", {
  2040. pageSize: 99999,
  2041. pageNo: 1,
  2042. }).then((res) => {
  2043. if (res.success) {
  2044. this.roomLayoutList = res.result.records;
  2045. console.log("roomLayoutList");
  2046. }
  2047. });
  2048. },
  2049. async getbusRoomPayType() {
  2050. await getAction("/business/busRoomPayType/list", {
  2051. pageSize: 99999,
  2052. pageNo: 1,
  2053. }).then((res) => {
  2054. if (res.success) {
  2055. this.payTypeList = res.result.records;
  2056. }
  2057. });
  2058. },
  2059. roomPriceSlnIdChange(e) {
  2060. this.model.orderInfo.vipCustomerId = e;
  2061. },
  2062. loadRooms() {
  2063. // this.model.roomPrices = [];
  2064. // this.model.roomIds = [];
  2065. // this.amount = 0;
  2066. getAction("/rooms/cesRooms/can-user-rooms", {
  2067. startOf:
  2068. this.model.orderInfo.arrivalTime2 +
  2069. " " +
  2070. moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm"),
  2071. endOf:
  2072. this.model.orderInfo.dueOutTime2 +
  2073. " " +
  2074. moment(this.model.orderInfo.dueOutTimeSpan).format("HH:mm"),
  2075. bookingType: this.model.orderInfo.bookingType,
  2076. hourRoomRuleId: this.model.orderInfo.hourRoomId,
  2077. cancelLayout: true,
  2078. }).then((res) => {
  2079. if (res.success) {
  2080. res.result.forEach((t) => {
  2081. // t.layout = Object.assign({}, t.layout, {
  2082. // presetNum: 0,
  2083. // oldTags: t.layout.canUseCount,
  2084. // });
  2085. t.buildingRooms.forEach((b) => {
  2086. b.floorRooms.forEach((f) => {
  2087. this.$set(
  2088. f,
  2089. "check",
  2090. this.model.roomIds.some((r) => r.id == f.id) ? 1 : 0
  2091. );
  2092. });
  2093. });
  2094. });
  2095. this.canUserRooms = res.result;
  2096. }
  2097. });
  2098. },
  2099. hourRoomIdChange() {
  2100. if (this.model.orderInfo.bookingType === 2) {
  2101. var find = this.hourRoomRuleList.find(
  2102. (t) => t.id === this.model.orderInfo.hourRoomId
  2103. );
  2104. if (find) {
  2105. var mDate = moment(
  2106. this.model.orderInfo.arrivalTime2 +
  2107. " " +
  2108. moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm")
  2109. ).add(find.afterOpenRoom, "minutes");
  2110. this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
  2111. this.model.orderInfo.dueOutTimeSpan = moment(
  2112. mDate.format("HH:mm"),
  2113. "HH:mm"
  2114. );
  2115. }
  2116. let obj = this.hourRoomRuleList.filter(item=>item.id == this.model.orderInfo.hourRoomId)[0]
  2117. this.editPriceData.forEach(item=>{
  2118. item.marketPrice = obj.afterOpenRoomPay
  2119. item.prefPrice = obj.afterOpenRoomPay
  2120. item.roomFee = obj.afterOpenRoomPay
  2121. if (item.edit) {
  2122. item.edit.forEach((ele) => {
  2123. ele.price = item.prefPrice;
  2124. });
  2125. }
  2126. })
  2127. this.editPriceOk()
  2128. }
  2129. this.loadRooms();
  2130. },
  2131. bookingTypeChange(e) {
  2132. if (this.model.orderInfo.bookingType == 1) {
  2133. this.model.orderInfo.hourRoomId = "";
  2134. } else {
  2135. var hourRoomRule = this.hourRoomRuleList[0];
  2136. if (hourRoomRule) {
  2137. this.model.orderInfo.hourRoomId = hourRoomRule.id;
  2138. }
  2139. }
  2140. if (this.model.orderInfo.bookingType === 2) {
  2141. var find = this.hourRoomRuleList.find(
  2142. (t) => t.id === this.model.orderInfo.hourRoomId
  2143. );
  2144. if (find) {
  2145. var mDate = moment(
  2146. this.model.orderInfo.arrivalTime2 +
  2147. " " +
  2148. moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm")
  2149. ).add(find.afterOpenRoom, "minutes");
  2150. this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
  2151. this.model.orderInfo.dueOutTimeSpan = moment(
  2152. mDate.format("HH:mm"),
  2153. "HH:mm"
  2154. );
  2155. }
  2156. this.model.orderInfo.dayCount = this.daysBetween(
  2157. this.model.orderInfo.arrivalTime2,
  2158. this.model.orderInfo.dueOutTime2
  2159. );
  2160. this.dayCountChange()
  2161. } else if (this.model.orderInfo.bookingType === 1) {
  2162. var mDate = moment(this.model.orderInfo.arrivalTime2).add(1, "days");
  2163. this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
  2164. }
  2165. this.loadRooms();
  2166. },
  2167. dayCountChange(e) {
  2168. if (e) {
  2169. this.model.orderInfo.dueOutTime2 = moment(
  2170. this.model.orderInfo.arrivalTime2
  2171. )
  2172. .add(e, "days")
  2173. .format("YYYY-MM-DD");
  2174. }
  2175. this.loadRooms();
  2176. // this.edit(this.modelDefault);
  2177. if (this.roomIdsIndex==0) {
  2178. var i = 0;
  2179. this.model.roomPrices.forEach((t) => {
  2180. t.day = this.model.orderInfo.dayCount;
  2181. this.editPriceIndex = i;
  2182. this.editPriceOk();
  2183. i++;
  2184. });
  2185. }else{
  2186. this.model.roomPrices[this.roomIdsIndex].day = this.model.orderInfo.dayCount;
  2187. this.editPriceIndex = this.roomIdsIndex;
  2188. this.editPriceOk();
  2189. }
  2190. console.log(this.model.roomPrices);
  2191. },
  2192. disabledDate(current) {
  2193. return current && current < moment().add(-1, "days").endOf("day");
  2194. },
  2195. arrivalTimeChange(e) {
  2196. var v = parseInt(
  2197. (new Date(this.model.orderInfo.dueOutTime2).getTime() -
  2198. new Date(this.model.orderInfo.arrivalTime2).getTime()) /
  2199. (1000 * 60 * 60 * 24)
  2200. );
  2201. if (v <= 0) {
  2202. this.model.orderInfo.dueOutTime2 = moment(
  2203. this.model.orderInfo.arrivalTime2
  2204. )
  2205. .add(1, "days")
  2206. .format("YYYY-MM-DD");
  2207. }
  2208. v = parseInt(
  2209. (new Date(this.model.orderInfo.dueOutTime2).getTime() -
  2210. new Date(this.model.orderInfo.arrivalTime2).getTime()) /
  2211. (1000 * 60 * 60 * 24)
  2212. );
  2213. this.model.orderInfo.dayCount = Math.abs(v);
  2214. // this.loadRooms();
  2215. this.dayCountChange();
  2216. },
  2217. arrivalTimeChange2(e) {
  2218. var v = parseInt(
  2219. (new Date(this.model.orderInfo.dueOutTime2).getTime() -
  2220. new Date(this.model.orderInfo.arrivalTime2).getTime()) /
  2221. (1000 * 60 * 60 * 24)
  2222. );
  2223. if (v <= 0) {
  2224. this.model.orderInfo.arrivalTime2 = moment(
  2225. this.model.orderInfo.dueOutTime2
  2226. )
  2227. .add(-1, "days")
  2228. .format("YYYY-MM-DD");
  2229. }
  2230. v = parseInt(
  2231. (new Date(this.model.orderInfo.dueOutTime2).getTime() -
  2232. new Date(this.model.orderInfo.arrivalTime2).getTime()) /
  2233. (1000 * 60 * 60 * 24)
  2234. );
  2235. this.model.orderInfo.dayCount = Math.abs(v);
  2236. // this.loadRooms();
  2237. this.dayCountChange();
  2238. },
  2239. arrivalTimeSpanChange(m, time) {
  2240. console.log(time);
  2241. console.log(moment(m).format("HH:mm"));
  2242. if (this.model.orderInfo.bookingType === 2) {
  2243. var find = this.hourRoomRuleList.find(
  2244. (t) => t.id === this.model.orderInfo.hourRoomId
  2245. );
  2246. if (find) {
  2247. var mDate = moment(
  2248. this.model.orderInfo.arrivalTime2 +
  2249. " " +
  2250. moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm")
  2251. ).add(find.afterOpenRoom, "minutes");
  2252. this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
  2253. this.model.orderInfo.dueOutTimeSpan = moment(
  2254. mDate.format("HH:mm"),
  2255. "HH:mm"
  2256. );
  2257. }
  2258. }
  2259. this.loadRooms();
  2260. },
  2261. handleSearch(value) {
  2262. let result;
  2263. if (!value) {
  2264. result = this.oldcustomerList;
  2265. } else {
  2266. result = this.oldcustomerList.filter((t) => t.name.includes(value));
  2267. }
  2268. this.customerList = result;
  2269. },
  2270. handleSelectMember(room, e) {
  2271. console.log("room", room);
  2272. var find = this.customerList.find((t) => t.id === e);
  2273. this.$set(room, "key1", find.name);
  2274. this.$set(room, "key2", 1);
  2275. this.$set(room, "key3", "汉");
  2276. this.$set(room, "key5", find.phone);
  2277. this.$set(room, "customerId", find.id);
  2278. },
  2279. pulsRoom() {
  2280. console.log(this.canUserRooms);
  2281. this.$refs.modalSelectRoomForm.add(this.canUserRooms);
  2282. this.$refs.modalSelectRoomForm.title = "选择房间";
  2283. this.$refs.modalSelectRoomForm.disableSubmit = false;
  2284. },
  2285. paymentTabsChange(e) {},
  2286. pulsFee() {
  2287. var payType = this.payTypeList[0];
  2288. this.model.orderFees.push({
  2289. add: 1,
  2290. subjectType: 2,
  2291. subjectTypeLabel: "预收房费",
  2292. payType: payType ? payType.id : "",
  2293. payTypeLabel: payType ? payType.name : "",
  2294. receivable: 0,
  2295. money: 0,
  2296. roomId: this.model.roomIds[0].id,
  2297. });
  2298. },
  2299. onCellChange(key, dataIndex, value) {
  2300. console.log(key, value);
  2301. console.log(this.model.roomPrices[dataIndex]);
  2302. const dataSource = [...this.model.roomPrices];
  2303. const target = dataSource[dataIndex];
  2304. console.log("target", target);
  2305. if (target) {
  2306. target[key] = value;
  2307. target.roomFee = value * target.day;
  2308. target.deposit = this.compuleDeposit(value);
  2309. this.model.roomPrices = dataSource;
  2310. }
  2311. // var sum = 0;
  2312. // this.model.roomPrices.forEach(function (item) {
  2313. // sum += item.roomFee + item.deposit;
  2314. // });
  2315. // this.amount = sum;
  2316. // console.log("this.model.roomPrices", this.model.roomPrices);
  2317. },
  2318. onCellChangeCopy(key, dataIndex, value) {
  2319. console.log(key, value);
  2320. console.log(this.depositRule);
  2321. console.log(this.model.roomPrices[dataIndex]);
  2322. const dataSource = [...this.model.roomPrices];
  2323. const target = dataSource[dataIndex];
  2324. console.log("target", target);
  2325. if (target) {
  2326. target[key] = value;
  2327. // target.roomFee = value * target.day;
  2328. // target.deposit = this.compuleDeposit(value);
  2329. this.model.roomPrices = dataSource;
  2330. }
  2331. // this.editPriceData.forEach(ele=>{
  2332. // if (target.roomId==ele.roomId) {
  2333. // ele.deposit = target.deposit
  2334. // }
  2335. // })
  2336. var sum = 0;
  2337. var money2 = 0;
  2338. var deposit2 = 0;
  2339. for (var i = 0; i < this.model.roomPrices.length; i++) {
  2340. var money = 0;
  2341. var item = this.model.roomPrices[i];
  2342. if (item.editPrice && item.editPrice.length > 0) {
  2343. item.editPrice.forEach((p) => {
  2344. money += p;
  2345. });
  2346. item.roomFee = money;
  2347. sum += money + item.deposit;
  2348. } else {
  2349. sum += item.roomFee + item.deposit;
  2350. }
  2351. money2 += item.roomFee;
  2352. deposit2 += item.deposit;
  2353. // var find = this.model.orderFees.find(
  2354. // (t) =>
  2355. // t.subjectType == 2 &&
  2356. // t.roomId == this.model.roomPrices[this.editPriceIndex].roomId
  2357. // );
  2358. // if (find && find.roomId == item.roomId) {
  2359. // find.money = money;
  2360. // find.receivable = money;
  2361. // }
  2362. }
  2363. var find = this.model.orderFees.find(
  2364. (t) => t.subjectType == 2 && t.roomId == this.model.roomIds[0].id
  2365. );
  2366. if (find) {
  2367. find.money = money2;
  2368. find.receivable = money2;
  2369. if (!this.paymentSplit) {
  2370. find.money += deposit2;
  2371. find.receivable += deposit2;
  2372. }
  2373. }
  2374. var find2 = this.model.orderFees.find(
  2375. (t) => t.subjectType == 1 && t.roomId == this.model.roomIds[0].id
  2376. );
  2377. if (find2) {
  2378. find2.money = deposit2;
  2379. find2.receivable = deposit2;
  2380. }
  2381. this.amount = sum;
  2382. },
  2383. // handleChange(value, index, column) {
  2384. // const newData = [...this.data2];
  2385. // const target = newData[index];
  2386. // if (target) {
  2387. // target[column] = value;
  2388. // this.data2 = newData;
  2389. // }
  2390. // },
  2391. onEdit(targetKey, action) {
  2392. this[action](targetKey);
  2393. },
  2394. add() {
  2395. console.log(1);
  2396. const panes = this.panes;
  2397. const activeKey = `newTab${this.newTabIndex++}`;
  2398. panes.push({
  2399. title: `New Tab ${activeKey}`,
  2400. content: "",
  2401. key: activeKey,
  2402. });
  2403. this.panes = panes;
  2404. this.activeKey = activeKey;
  2405. },
  2406. onSelectChange(selectedRowKeys, selectionRows) {
  2407. this.selectedRowKeys = selectedRowKeys;
  2408. this.selectionRows = selectionRows;
  2409. },
  2410. handleAdd() {},
  2411. puls(room) {
  2412. if (!room.livingCustomers2) {
  2413. this.$set(room, "livingCustomers2", [
  2414. { gender: 1, certType: 1, roomId: room.id },
  2415. ]);
  2416. } else {
  2417. room.livingCustomers2.push({ gender: 1, certType: 1, roomId: room.id });
  2418. }
  2419. },
  2420. remove(room, index) {
  2421. room.livingCustomers2.splice(index, 1);
  2422. },
  2423. moment,
  2424. onChange(e) {
  2425. console.log(e);
  2426. },
  2427. add2(roomLive) {
  2428. this.modelDefault = Object.assign({}, this.modelDefault, {
  2429. roomIds: [roomLive],
  2430. });
  2431. this.edit(this.modelDefault);
  2432. },
  2433. editTabs(e) {
  2434. console.log("editTabs", e);
  2435. var index = this.model.roomIds.findIndex((t) => t.id == e);
  2436. this.model.roomIds.splice(index, 1);
  2437. console.log("this.canUserRooms", this.canUserRooms);
  2438. this.canUserRooms.forEach((t) => {
  2439. t.buildingRooms.forEach((b) => {
  2440. b.floorRooms.forEach((f) => {
  2441. if (f.id == e) {
  2442. f.check = 0;
  2443. }
  2444. });
  2445. });
  2446. });
  2447. this.model.roomPrices = this.model.roomPrices.filter(
  2448. (t) => t.roomId != e
  2449. );
  2450. // this.model.orderFees = this.model.orderFees.filter((t) => t.roomId != e);
  2451. this.model.orderFees.forEach((t) => {
  2452. if (t.roomId == e) {
  2453. t.roomId = this.model.roomIds[0].id;
  2454. }
  2455. });
  2456. var sum = 0;
  2457. var money2 = 0;
  2458. var deposit2 = 0;
  2459. for (var i = 0; i < this.model.roomPrices.length; i++) {
  2460. var money = 0;
  2461. var item = this.model.roomPrices[i];
  2462. if (item.editPrice && item.editPrice.length > 0) {
  2463. item.editPrice.forEach((p) => {
  2464. money += p;
  2465. });
  2466. item.roomFee = money;
  2467. sum += money + item.deposit;
  2468. } else {
  2469. sum += item.roomFee + item.deposit;
  2470. }
  2471. money2 += item.roomFee;
  2472. deposit2 += item.deposit;
  2473. }
  2474. var find = this.model.orderFees.find(
  2475. (t) => t.subjectType == 2 && t.roomId == this.model.roomIds[0].id
  2476. );
  2477. if (find) {
  2478. find.money = money2;
  2479. find.receivable = money2;
  2480. }
  2481. var find2 = this.model.orderFees.find(
  2482. (t) => t.subjectType == 1 && t.roomId == this.model.roomIds[0].id
  2483. );
  2484. if (find2) {
  2485. find2.money = deposit2;
  2486. find2.receivable = deposit2;
  2487. }
  2488. this.amount = sum;
  2489. this.roomIdsIndex = 0;
  2490. },
  2491. tabClick(e) {
  2492. console.log("tabClick", e);
  2493. var index = this.model.roomIds.findIndex((t) => t.id == e);
  2494. console.log("index", index);
  2495. this.model.orderInfo.customerSource = this.model.roomIds[index].customerSource;
  2496. this.model.orderInfo.dayCount = this.model.roomPrices[index].day;
  2497. this.roomIdsIndexId = e
  2498. this.roomIdsIndex = index;
  2499. },
  2500. modalFormOk(e) {
  2501. console.log("e", e);
  2502. this.model.roomPrices = this.model.roomPrices.filter((t) =>
  2503. e.some((r) => r.id == t.roomId)
  2504. );
  2505. this.model.orderFees = this.model.orderFees.filter((t) =>
  2506. e.some((r) => r.id == t.roomId)
  2507. );
  2508. var roomIds = this.model.roomIds.filter((t) =>
  2509. e.some((r) => r.id == t.id)
  2510. );
  2511. var newRoomIds = e.filter(
  2512. (t) => !this.model.roomIds.some((r) => r.id == t.id)
  2513. );
  2514. this.modelDefault = Object.assign({}, this.modelDefault, {
  2515. roomIds: [...roomIds, ...newRoomIds],
  2516. roomPrices: this.model.roomPrices,
  2517. orderFees: this.model.orderFees,
  2518. orderInfo: this.model.orderInfo,
  2519. });
  2520. if (!this.otherRoomSync) {
  2521. if (this.modelDefault.roomIds && this.modelDefault.roomIds.length > 0) {
  2522. if (this.modelDefault.roomIds[0].key1) {
  2523. for (var i = 1; i < this.modelDefault.roomIds.length; i++) {
  2524. var room = this.modelDefault.roomIds[i];
  2525. if (!room.key1) {
  2526. this.$set(room, "key1", this.modelDefault.roomIds[0].key1);
  2527. this.$set(room, "key2", this.modelDefault.roomIds[0].key2);
  2528. this.$set(room, "key3", this.modelDefault.roomIds[0].key3);
  2529. this.$set(room, "key4", this.modelDefault.roomIds[0].key4);
  2530. this.$set(room, "key5", this.modelDefault.roomIds[0].key5);
  2531. this.$set(room, "key6", this.modelDefault.roomIds[0].key6);
  2532. this.$set(
  2533. room,
  2534. "customerId",
  2535. this.modelDefault.roomIds[0].customerId
  2536. );
  2537. }
  2538. }
  2539. }
  2540. }
  2541. }
  2542. if (this.modelDefault.roomIds && this.modelDefault.roomIds.length > 2) {
  2543. var mainRoom = this.modelDefault.roomIds[0];
  2544. var sortRooms = this.modelDefault.roomIds
  2545. .filter((t) => t.id != mainRoom.id)
  2546. .sort(function (a, b) {
  2547. return a.name.toUpperCase() > b.name.toUpperCase() ? 1 : -1;
  2548. });
  2549. this.modelDefault.roomIds = [...[mainRoom], ...sortRooms];
  2550. }
  2551. console.log(this.modelDefault);
  2552. console.log(" this.modelDefault.roomIds", this.modelDefault.roomIds);
  2553. this.canUserRooms[0].buildingRooms.forEach((ele) => {
  2554. ele.floorRooms.forEach((b) => {
  2555. b.check = 0;
  2556. });
  2557. this.modelDefault.roomIds.forEach((t) => {
  2558. ele.floorRooms.forEach((b) => {
  2559. if (b.id == t.id) {
  2560. b.check = 1;
  2561. }
  2562. });
  2563. });
  2564. });
  2565. this.edit(this.modelDefault);
  2566. },
  2567. compuleDeposit(prefPrice) {
  2568. var deposit = 0;
  2569. if (this.depositRule) {
  2570. if (this.depositRule.depositType === 1) {
  2571. deposit = prefPrice * this.depositRule.depositMultiple;
  2572. } else if (this.depositRule.depositType === 2) {
  2573. deposit = prefPrice + this.depositRule.depositMultiple;
  2574. } else if (this.depositRule.depositType === 3) {
  2575. deposit = this.depositRule.depositMoney;
  2576. }
  2577. }
  2578. return deposit;
  2579. },
  2580. getSubjectTypeLabel(value) {
  2581. switch (value) {
  2582. case 1:
  2583. return "押金";
  2584. case 2:
  2585. return "预收房费";
  2586. default:
  2587. return "";
  2588. }
  2589. },
  2590. addList(roomLiveList, key) {
  2591. console.log("roomLiveList", roomLiveList);
  2592. this.modelDefault = Object.assign({}, this.modelDefault, {
  2593. roomIds: JSON.parse(JSON.stringify(roomLiveList)),
  2594. });
  2595. this.modelDefault.orderInfo.bookingOrdersType = key;
  2596. this.model.orderInfo.bookingOrdersType = key;
  2597. this.edit(this.modelDefault);
  2598. },
  2599. async edit(record) {
  2600. console.log("edit", record);
  2601. this.activeKey = record.roomIds[0].id;
  2602. this.visible = true;
  2603. this.model = Object.assign({}, record);
  2604. console.log("this.model", this.model);
  2605. if (this.roomLayoutList.length === 0) {
  2606. await this.getcesRoomLayout();
  2607. }
  2608. if (this.payTypeList == 0) {
  2609. await this.getbusRoomPayType();
  2610. }
  2611. if (!this.remenmberPayState) {
  2612. await this.getHotelInfo();
  2613. }
  2614. if (this.customerSourceList) {
  2615. if (!this.model.orderInfo.customerSource) {
  2616. this.model.orderInfo.customerSource = this.customerSourceList[0].id;
  2617. }
  2618. }
  2619. if (this.model.roomIds && this.model.roomIds.length > 0) {
  2620. this.activeKey = this.model.roomIds[0].id;
  2621. var roomPrices = [];
  2622. var orderFees = [];
  2623. var roomIndex = 0;
  2624. this.model.roomIds.forEach((item) => {
  2625. if (!item.key2) {
  2626. this.$set(item, "key2", 1);
  2627. this.$set(item, "key3", "汉");
  2628. }
  2629. var roomLayout = this.roomLayoutList.find(
  2630. (t) => (t.id = item.layoutId)
  2631. );
  2632. this.editPriceIndex = this.model.roomPrices.findIndex(
  2633. (t) => t.roomId == item.id
  2634. );
  2635. var find = this.model.roomPrices[this.editPriceIndex];
  2636. if (!find) {
  2637. var obj = {
  2638. roomNo: item.name,
  2639. roomId: item.id,
  2640. marketPrice: item.marketPrice,
  2641. prefPrice: item.marketPrice,
  2642. day: this.model.orderInfo.dayCount,
  2643. roomFee: item.marketPrice * this.model.orderInfo.dayCount,
  2644. deposit: this.compuleDeposit(item.marketPrice),
  2645. layoutName: roomLayout ? roomLayout.name : "",
  2646. layoutId: item.layoutId,
  2647. };
  2648. roomPrices.push(obj);
  2649. } else {
  2650. find.day = this.model.orderInfo.dayCount;
  2651. this.editPriceOk();
  2652. }
  2653. var payType = this.payTypeList[0];
  2654. // if (!this.model.orderFees.some((t) => t.roomId == item.id)) {
  2655. // orderFees.push({
  2656. // subjectType: 2,
  2657. // subjectTypeLabel: "预收房费",
  2658. // payType: payType ? payType.id : "",
  2659. // payTypeLabel: payType ? payType.name : "",
  2660. // receivable: item.marketPrice * this.model.orderInfo.dayCount,
  2661. // money: item.marketPrice * this.model.orderInfo.dayCount,
  2662. // roomId: item.id,
  2663. // });
  2664. // var deposit = this.compuleDeposit(item.marketPrice);
  2665. // if (deposit > 0) {
  2666. // orderFees.push({
  2667. // subjectType: 1,
  2668. // subjectTypeLabel: "押金",
  2669. // payType: payType ? payType.id : "",
  2670. // payTypeLabel: payType ? payType.name : "",
  2671. // receivable: deposit,
  2672. // money: deposit,
  2673. // roomId: item.id,
  2674. // });
  2675. // }
  2676. // } else {
  2677. // // var find = this.model.orderFees.find(
  2678. // // (t) => t.subjectType == 2 && t.roomId == item.id
  2679. // // );
  2680. // // if (find) {
  2681. // // find.money = money;
  2682. // // find.receivable = money;
  2683. // // }
  2684. // }
  2685. // if (
  2686. // !this.model.orderFees.some(
  2687. // (t) => t.roomId == this.model.roomIds[0].id
  2688. // )
  2689. // ) {
  2690. // orderFees.push({
  2691. // subjectType: 2,
  2692. // subjectTypeLabel: "预收房费",
  2693. // payType: payType ? payType.id : "",
  2694. // payTypeLabel: payType ? payType.name : "",
  2695. // receivable: item.marketPrice * this.model.orderInfo.dayCount,
  2696. // money: item.marketPrice * this.model.orderInfo.dayCount,
  2697. // roomId: this.model.roomIds[0].id,
  2698. // });
  2699. // var deposit = this.compuleDeposit(item.marketPrice);
  2700. // if (deposit > 0) {
  2701. // orderFees.push({
  2702. // subjectType: 1,
  2703. // subjectTypeLabel: "押金",
  2704. // payType: payType ? payType.id : "",
  2705. // payTypeLabel: payType ? payType.name : "",
  2706. // receivable: deposit,
  2707. // money: deposit,
  2708. // roomId: this.model.roomIds[0].id,
  2709. // });
  2710. // }
  2711. // } else {
  2712. // var deposit = this.compuleDeposit(item.marketPrice);
  2713. // var find = this.model.orderFees.find(
  2714. // (t) => t.subjectType == 2 && t.roomId == this.model.roomIds[0].id
  2715. // );
  2716. // if (find) {
  2717. // if (roomIndex == 0) {
  2718. // find.money = item.marketPrice * this.model.orderInfo.dayCount;
  2719. // find.receivable =
  2720. // item.marketPrice * this.model.orderInfo.dayCount;
  2721. // } else {
  2722. // find.money += item.marketPrice * this.model.orderInfo.dayCount;
  2723. // find.receivable +=
  2724. // item.marketPrice * this.model.orderInfo.dayCount;
  2725. // }
  2726. // if (!this.paymentSplit) {
  2727. // find.money += deposit;
  2728. // find.receivable += deposit;
  2729. // }
  2730. // }
  2731. // var find2 = this.model.orderFees.find(
  2732. // (t) => t.subjectType == 1 && t.roomId == this.model.roomIds[0].id
  2733. // );
  2734. // if (find2) {
  2735. // if (deposit > 0) {
  2736. // if (roomIndex == 0) {
  2737. // find2.money = deposit;
  2738. // find2.receivable = deposit;
  2739. // } else {
  2740. // find2.money += deposit;
  2741. // find2.receivable += deposit;
  2742. // }
  2743. // }
  2744. // }
  2745. // }
  2746. // roomIndex++;
  2747. });
  2748. this.model.roomPrices = [...this.model.roomPrices, ...roomPrices];
  2749. if (this.roomListCopy.length==0) {
  2750. this.roomListCopy = JSON.parse(JSON.stringify(this.model.roomPrices));
  2751. }else{
  2752. this.roomListCopy = [...this.roomListCopy,...roomPrices]
  2753. }
  2754. // let type = JSON.parse(JSON.stringify(this.model.orderInfo.bookingType))
  2755. // this.model.orderInfo.bookingType = 9999
  2756. // setTimeout(() => {
  2757. // this.model.orderInfo.bookingType = type
  2758. // }, 100);
  2759. if(this.model.orderInfo.bookingType==3 || this.model.orderInfo.bookingType==4){
  2760. this.model.roomPrices.forEach(ele=>{
  2761. ele.prefPrice = 0
  2762. ele.roomFee = 0
  2763. })
  2764. this.editPriceOk()
  2765. }
  2766. if (this.model.orderInfo.bookingType == 2) {
  2767. let obj = this.hourRoomRuleList.filter(item=>item.id == this.model.orderInfo.hourRoomId)[0]
  2768. this.editPriceData.forEach(item=>{
  2769. item.marketPrice = obj.afterOpenRoomPay
  2770. item.prefPrice = obj.afterOpenRoomPay
  2771. item.roomFee = obj.afterOpenRoomPay
  2772. if (item.edit) {
  2773. item.edit.forEach((ele) => {
  2774. ele.price = item.prefPrice;
  2775. });
  2776. }
  2777. })
  2778. this.editPriceOk()
  2779. }
  2780. if (this.model.roomPrices && this.model.roomPrices.length > 2) {
  2781. var mainRoom = this.model.roomPrices[0];
  2782. var sortRooms = this.model.roomPrices
  2783. .filter((t) => t.roomId != mainRoom.roomId)
  2784. .sort(function (a, b) {
  2785. return a.roomNo.toUpperCase() > b.roomNo.toUpperCase() ? 1 : -1;
  2786. });
  2787. this.model.roomPrices = [...[mainRoom], ...sortRooms];
  2788. }
  2789. var sum = 0;
  2790. this.model.roomPrices.forEach(function (item) {
  2791. sum += item.roomFee + item.deposit;
  2792. });
  2793. this.amount = sum;
  2794. // console.log("orderFees", orderFees);
  2795. this.loadOrderFees();
  2796. // this.depositSplit(this.depositSplit)
  2797. if (!this.depositSplit) {
  2798. var yajin = this.model.roomPrices.reduce((sum, val) => {
  2799. let total = sum + val.deposit;
  2800. return isNaN(total) ? 0 : total;
  2801. }, 0);
  2802. this.model.roomPrices.forEach((t) => {
  2803. t.deposit = 0;
  2804. });
  2805. this.model.roomPrices[0].deposit = yajin;
  2806. } else {
  2807. this.model.roomPrices.forEach((t) => {
  2808. t.deposit = this.compuleDeposit(t.marketPrice);
  2809. });
  2810. }
  2811. // this.model.orderFees = [...this.model.orderFees, ...orderFees];
  2812. }
  2813. },
  2814. async getHotelInfo() {
  2815. var _info = JSON.parse(localStorage.getItem("storeInfo"));
  2816. await getAction("/business/busHotel/queryById", { id: _info.id }).then(
  2817. (res) => {
  2818. if (res.success) {
  2819. this.remenmberPayState = res.result.remenmberPayState || "1-1-2";
  2820. }
  2821. }
  2822. );
  2823. },
  2824. submitForm() {
  2825. const that = this;
  2826. console.log(that.model.orderInfo);
  2827. that.model.livingRoomDayPrices = [];
  2828. console.log("that.model.roomPrices", that.model.roomPrices);
  2829. that.model.roomPrices.forEach((t) => {
  2830. for (var b = 0; b < that.model.orderInfo.dayCount; b++) {
  2831. var dayTime = moment(this.model.orderInfo.arrivalTime2)
  2832. .add(b, "days")
  2833. .format("YYYY-MM-DD");
  2834. console.log(t.editPriceTime);
  2835. if (t.editPriceTime && t.editPriceTime[b]) {
  2836. that.model.livingRoomDayPrices.push({
  2837. livingType: 1,
  2838. dayTime: t.editPriceTime ? (t.editPriceTime[b] || '').toString() : dayTime,
  2839. // price: t.editPrice? t.editPrice[b].toString() : t.prefPrice,
  2840. price:
  2841. t.editPrice && t.editPriceTime && t.editPriceTime[b] == dayTime
  2842. ? t.editPrice[b].toString()
  2843. : t.prefPrice,
  2844. // dayTime: dayTime,
  2845. // price: t.prefPrice,
  2846. roomLayoutId: t.layoutId,
  2847. roomId: t.roomId,
  2848. });
  2849. }
  2850. if (!t.editPriceTime) {
  2851. that.model.livingRoomDayPrices.push({
  2852. livingType: 1,
  2853. dayTime: dayTime,
  2854. // price: t.editPrice? t.editPrice[b].toString() : t.prefPrice,
  2855. price:t.prefPrice,
  2856. // dayTime: dayTime,
  2857. // price: t.prefPrice,
  2858. roomLayoutId: t.layoutId,
  2859. roomId: t.roomId,
  2860. });
  2861. }
  2862. }
  2863. });
  2864. // let arr = JSON.parse(JSON.stringify(that.model.roomIds))
  2865. that.model.roomIds.forEach((t) => {
  2866. console.log(t);
  2867. console.log(that.model.roomPrices.findIndex((item) => item.roomId == t.id))
  2868. let info = {}
  2869. let idx;
  2870. idx = that.model.roomPrices.findIndex((item) => item.roomId == t.id)
  2871. info = JSON.parse(JSON.stringify(that.model.orderInfo))
  2872. info.dueOutTime = that.addDate(info.arrivalTime2, that.model.roomPrices[idx].day) + " " + moment(that.model.orderInfo.dueOutTimeSpan).format("HH:mm")
  2873. // info.dueOutTime = that.model.roomPrices[idx].editPriceTime[that.model.roomPrices[idx].editPriceTime.length-1] + " " + moment(that.model.orderInfo.dueOutTimeSpan).format("HH:mm")
  2874. t.roomOrderInfo = info
  2875. t.roomOrderInfo.customerSource = t.customerSource
  2876. t.roomId = t.id;
  2877. var obj = {
  2878. certNo: t.key4,
  2879. certType: 1,
  2880. customerId: t.customerId,
  2881. customerName: t.key1,
  2882. gender: t.key2,
  2883. phone: t.key5,
  2884. nation: t.key3,
  2885. address: t.key6,
  2886. roomId: t.id,
  2887. };
  2888. if (!t.livingCustomers2 || t.livingCustomers2.length == 0) {
  2889. t.livingCustomers = [obj];
  2890. } else {
  2891. t.livingCustomers = [...[obj], ...t.livingCustomers2];
  2892. }
  2893. });
  2894. // this.model.roomIds = arr
  2895. console.log("this.model", this.model);
  2896. if (that.model.roomIds.length <= 0) {
  2897. that.$message.warning("请先添加房间");
  2898. return;
  2899. }
  2900. // return
  2901. // 触发表单验证
  2902. this.$refs.form.validate((valid, err) => {
  2903. if (valid) {
  2904. this.model.orderInfo.arrivalTime =
  2905. this.model.orderInfo.arrivalTime2 +
  2906. " " +
  2907. moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm");
  2908. this.model.orderInfo.dueOutTime =
  2909. this.model.orderInfo.dueOutTime2 +
  2910. " " +
  2911. moment(this.model.orderInfo.dueOutTimeSpan).format("HH:mm");
  2912. that.confirmLoading = true;
  2913. let httpurl = "";
  2914. let method = "";
  2915. if (!this.model.id) {
  2916. httpurl += this.url.add;
  2917. method = "post";
  2918. } else {
  2919. httpurl += this.url.edit;
  2920. method = "put";
  2921. }
  2922. console.log(this.model);
  2923. // return
  2924. // this.model.orderInfo.bookingOrdersType = this.modelDefault.orderInfo.bookingOrdersType;
  2925. // if (this.model.orderInfo.bookingOrdersId) {
  2926. // httpurl = "/business/busRoomBookingOrders/add-batch";
  2927. // method = "post";
  2928. // }
  2929. // that.$emit("ok", {order:'res.result', model:this.model});
  2930. // return
  2931. httpAction(httpurl, this.model, method)
  2932. .then((res) => {
  2933. if (res.success) {
  2934. that.$message.success(res.message);
  2935. that.$emit("ok", { order: res.result, model: that.model });
  2936. var arr = [
  2937. that.paymentSplit ? 1 : 2,
  2938. this.model.orderFees[0].subjectType == 1 ? 2 : 1,
  2939. this.model.orderFees[0].subjectType == 1 ? 2 : 1,
  2940. ];
  2941. getAction("/business/busHotel/set-pay-state", {
  2942. hotelId: this.model.hotelId,
  2943. type: arr.join("-"),
  2944. }).then((res) => {});
  2945. } else {
  2946. if (res.message.indexOf("与预约时间有冲突") >= 0) {
  2947. that.$confirm({
  2948. title: "提示",
  2949. content: res.message + "是否确定入住?",
  2950. onOk: function () {
  2951. that.model.confirm = true;
  2952. httpAction(httpurl, that.model, method)
  2953. .then((res) => {
  2954. if (res.success) {
  2955. that.$message.success(res.message);
  2956. that.$emit("ok", {
  2957. order: res.result,
  2958. model: that.model,
  2959. });
  2960. } else {
  2961. if (res.message.indexOf("与预约时间有冲突") >= 0) {
  2962. } else {
  2963. that.$message.warning(res.message);
  2964. }
  2965. }
  2966. })
  2967. .finally(() => {
  2968. that.confirmLoading = false;
  2969. });
  2970. },
  2971. });
  2972. } else {
  2973. that.$message.warning(res.message);
  2974. }
  2975. }
  2976. })
  2977. .finally(() => {
  2978. that.confirmLoading = false;
  2979. });
  2980. } else {
  2981. console.log(err);
  2982. var keys = Object.keys(err);
  2983. console.log("keys", keys);
  2984. var some = keys.some(
  2985. (t) => t.indexOf("roomIds[" + this.roomIdsIndex + "]") >= 0
  2986. );
  2987. if (!some) {
  2988. this.$message.warning("请输入其他房间必填信息");
  2989. }
  2990. }
  2991. });
  2992. },
  2993. },
  2994. };
  2995. </script>
  2996. <style scoped>
  2997. /deep/ .ant-btn-link {
  2998. flex: 1;
  2999. color: rgba(255, 141, 26, 1) !important;
  3000. }
  3001. /deep/ .ant-btn-background-ghost {
  3002. color: rgba(0, 0, 0, 0.45) !important;
  3003. }
  3004. .menu {
  3005. display: flex;
  3006. flex-direction: column;
  3007. flex: 1;
  3008. color: #fff;
  3009. margin-top: 12px;
  3010. }
  3011. .dynamic-delete-button {
  3012. cursor: pointer;
  3013. position: relative;
  3014. /* top: 4px; */
  3015. margin-left: 5px;
  3016. font-size: 18px;
  3017. color: #1890ff;
  3018. transition: all 0.3s;
  3019. }
  3020. .dynamic-delete-button:hover {
  3021. color: #777;
  3022. }
  3023. .dynamic-delete-button[disabled] {
  3024. cursor: not-allowed;
  3025. opacity: 0.5;
  3026. }
  3027. /deep/.ant-table-thead > tr > th {
  3028. background: rgba(42, 130, 228, 1);
  3029. color: #ffffff;
  3030. }
  3031. /deep/.ant-divider-horizontal {
  3032. margin: 12px 0 !important;
  3033. }
  3034. /deep/ .ant-table-tbody .ant-table-row td {
  3035. padding-top: 5px;
  3036. padding-bottom: 5px;
  3037. }
  3038. /deep/.ant-table-thead > tr > th,
  3039. .ant-table-tbody > tr > td {
  3040. padding: 5px 5px !important;
  3041. overflow-wrap: break-word;
  3042. }
  3043. /deep/ .ant-form-item {
  3044. margin-bottom: 5px !important;
  3045. }
  3046. /deep/ .ant-tabs-nav .ant-tabs-tab-active {
  3047. color: rgba(255, 141, 26, 1);
  3048. }
  3049. /deep/.ant-tabs-nav .ant-tabs-tab:hover {
  3050. color: rgba(255, 141, 26, 1);
  3051. }
  3052. /deep/.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active {
  3053. color: rgba(255, 141, 26, 1);
  3054. }
  3055. </style>