btobapCheck.vue 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484
  1. <template>
  2. <div>
  3. <div class="mobile-header mobile-center-header">
  4. <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
  5. <p>应收对账
  6. <!--<span @click="addApCheck"><i class="icon-sousuo iconfont"></i>新增对账单</span>-->
  7. </p>
  8. <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise && user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
  9. </div>
  10. <div class="btobapCheck-wrapper">
  11. <div class="order-tab">
  12. <div class="order-tab-wrapper clearfix">
  13. <div class="fl active tab">B2B</div>
  14. <nuxt-link class="fl tab" to="/mobile/center/vendor/payCenter" tag="div" >
  15. 商城
  16. </nuxt-link>
  17. </div>
  18. </div>
  19. <div class="order-nav">
  20. <div :class="activeType === 'all' ? 'active': ''" @click="ChangeList('all')"><span>未对账</span></div>
  21. <!--<div :class="activeType === 'todo' ? 'active' : ''" @click="ChangeList('todo')"><span>待确认</span></div>-->
  22. <div :class="activeType === 'done' ? 'active': ''" @click="ChangeList('done')"><span>已对账</span></div>
  23. <div :class="activeType === 'end' ? 'active' : ''" @click="ChangeList('end')"><span>已作废</span></div>
  24. </div>
  25. <div v-show="activeType !== 'all'">
  26. <div class="search-content mi-search-content">
  27. <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="单据编号/客户名称/物料名称">
  28. <span @click="onFilter"><i class="iconfont icon-sousuo"></i></span>
  29. </div>
  30. <div class="btobapCheck-wrapper-scroll" id="btobapCheck-wrapper-scroll">
  31. <div class="filter-wrapper">
  32. <base-filter
  33. v-for="filterOption in filterOptions"
  34. :key="filterOption.selectOption"
  35. :selectItems="filterOption.selectItems"
  36. :defaultVal="filterOption.defaultVal"
  37. :selectOption="filterOption.selectOption"
  38. @selectAction="onSelectAction"
  39. @valueAction="onValueAction"
  40. :title="filterOption.title">
  41. </base-filter>
  42. </div>
  43. <div v-if="resourceList.content && resourceList.content.length > 0">
  44. <div class="invoice-btob-list" v-for="item in resourceList.content">
  45. <div class="invoice-btob-wrapper-top">
  46. <span class="read" v-if="!isUnread(item.id)" style="margin-right: 0.3rem">已读</span>
  47. <span class="noread" v-if="isUnread(item.id)" style="margin-right: 0.3rem">未读</span>
  48. <span style="margin-right: 0.3rem">{{item.recordDate | time}}</span>
  49. <span class="isPut" v-if="item.status">已提交</span>
  50. <span class="noPut" v-else>未提交</span>
  51. </div>
  52. <div class="invoice-btob-wrapper-middle">
  53. <div class="invoice-btob-wrapper-middle-title">{{item.custName}}</div>
  54. <div @click="lookDetails(item.id)"><span>单据编号:</span><a>{{item.code}}</a></div>
  55. </div>
  56. <div class="invoice-btob-wrapper-content">
  57. <div><span>对账期间:</span>{{item.beginDate | time}} - {{item.endDate | time}}</div>
  58. <div><span>对账金额:</span>{{isUser ? '-' : item.checkAmount}}</div>
  59. <div><span>明细条目:</span>{{item.items && item.items.length}}条</div>
  60. <div><span>对账人:</span>{{item.recorder}}</div>
  61. <!--<div><span>商品总数:</span>{{item.getTotalProd}}</div>-->
  62. <!--<div><span>对账结果:</span>{{item.checkStatus}}</div>-->
  63. </div>
  64. </div>
  65. </div>
  66. <empty-status
  67. v-else
  68. :text="'暂无对账信息'"
  69. :showLink="false"
  70. ></empty-status>
  71. <pull-up :fixId="'btobapCheck-wrapper-scroll'" :allPage="allPage" :page="filterParams.page" @pullUpAction="onPullUpAction"></pull-up>
  72. </div>
  73. </div>
  74. <div v-show="activeType === 'all'">
  75. <div class="search-content mi-search-content">
  76. <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="客户名称">
  77. <span @click="onFilter"><i class="iconfont icon-sousuo"></i></span>
  78. </div>
  79. <div class="timeLine-wrapper">
  80. <div class="inline-block left" @click="addMonth('out', 'outTimeMonth', -1)">
  81. <i class="iconfont icon-xiangzuo" style="font-size: 0.3rem"></i>
  82. </div>
  83. <div class="inline-block timeLine" style="text-indent: 0.12rem" @click="ShowMonthChoose('out', 'outTimeMonth')">{{outTimeMonth}}<i class="iconfont icon-arrow-down" style="font-size: 0.3rem"></i></div>
  84. <div class="inline-block right" @click="addMonth('out', 'outTimeMonth', 1)" v-show="MouthOutShow">
  85. <i class="iconfont icon-xiangyou" style="font-size: 0.3rem"></i>
  86. </div>
  87. </div>
  88. <div class="btobapCheck-wrapper-scroll btobapCheck-wrapper-scroll2" id="btobapCheck-wrapper-scroll2">
  89. <div v-if="resourceList.content && resourceList.content.length > 0">
  90. <div class="invoice-btob-list" v-for="item in resourceList.content">
  91. <div class="invoice-btob-wrapper-middle" style="border-top: 0">
  92. <div class="invoice-btob-wrapper-middle-title">{{item.myEnterprise && item.myEnterprise.enName}}</div>
  93. </div>
  94. <div class="invoice-btob-wrapper-middle">
  95. <div v-if="item.thisMonthCount && item.thisMonthCount.length > 0">
  96. <span class="inline-block" style="vertical-align: top">本月应收:</span>
  97. <div class="inline-block" style="vertical-align: top" >
  98. <div v-for="count in item.thisMonthCount" v-if="count.amount > 0">
  99. <span>{{count.currency}}:{{count.amount | computeNum(2)}}</span>
  100. </div>
  101. </div>
  102. </div>
  103. <div v-else><span>本月应收:0</span></div>
  104. <div v-if="item.totalCount && item.totalCount.length > 0">
  105. <span class="inline-block" style="vertical-align: top">应收总额:</span>
  106. <div class="inline-block" style="vertical-align: top" >
  107. <div v-for="count in item.totalCount" v-if="count.amount > 0">
  108. <span>{{count.currency}}:{{count.amount | computeNum(2)}}</span>
  109. </div>
  110. </div>
  111. </div>
  112. <div v-else><span>应收总额:0</span></div>
  113. </div>
  114. <div class="invoice-btob-wrapper-middle" @click="showApcheckList(item)">
  115. <div class="middle_btn">对账详情</div>
  116. </div>
  117. </div>
  118. </div>
  119. <empty-status
  120. v-else
  121. :text="'暂无对账信息'"
  122. :showLink="false"
  123. ></empty-status>
  124. <pull-up :fixId="'btobapCheck-wrapper-scroll2'" :allPage="allPage" :page="filterParams.page" @pullUpAction="onPullUpAction"></pull-up>
  125. </div>
  126. </div>
  127. </div>
  128. <modal-wrapper :title="isShowApcheckList.enName" :showModal="isShowApcheckList.show" @closeAction="deleteCheck" :bgColor="'#f1f3f6'" :hasFooter="true">
  129. <div slot="header" class="modal-h">
  130. <div class="modal-h-top">
  131. <span class="item inline-block" @click="checkAll()" v-show="!isShowApcheckList.showApcheck">
  132. <label class="mobile-cart-check" :class="{active: !isCheckAll}"></label>
  133. </span>
  134. <span class="inline-block overflowhidden">
  135. 应收客户:{{isShowApcheckList.enName}}
  136. </span>
  137. </div>
  138. <div class="timeLine-wrapper clearfix">
  139. <div v-show="!isShowApcheckList.showApcheck">
  140. <div style="margin-left: 0.5rem">
  141. <div class="inline-block left" @click="addMonth('inside', '', -1)">
  142. <i class="iconfont icon-xiangzuo" style="font-size: 0.3rem"></i>
  143. </div>
  144. <div class="inline-block timeLine" style="text-indent: 0.12rem" @click="ShowMonthChoose('inside')">{{isShowApcheckList.thisMonth}}<i class="iconfont icon-arrow-down" style="font-size: 0.3rem"></i></div>
  145. <div class="inline-block right" @click="addMonth('inside', '', 1)" v-show="MouthinShow">
  146. <i class="iconfont icon-xiangyou" style="font-size: 0.3rem"></i>
  147. </div>
  148. </div>
  149. <div style="clear:both"></div>
  150. <base-filter
  151. ref="baseFilter"
  152. v-for="filterOption in ApcheckfilterOptions"
  153. :ShowTitle="ShowTitle"
  154. :key="filterOption.selectOption"
  155. :selectItems="filterOption.selectItems"
  156. :defaultVal="filterOption.defaultVal"
  157. :selectOption="filterOption.selectOption"
  158. @selectAction="ApcheckonSelectAction"
  159. @valueAction="ApcheckonValueAction"
  160. :title="filterOption.title">
  161. </base-filter>
  162. </div>
  163. <div v-show="isShowApcheckList.showApcheck" style="line-height: 1.4rem;text-align: center">
  164. {{isShowApcheckList.startTime}} ~ {{isShowApcheckList.endTime}}
  165. </div>
  166. </div>
  167. <div style="height: 0.2rem; width: 100%;"></div>
  168. <!--<div class="timeLine" @click="ShowMonthChoose('inside')" style="text-indent: 0.12rem">{{isShowApcheckList.thisMonth}}<i class="iconfont icon-arrow-down" style="font-size: 0.3rem"></i></div>-->
  169. <!--<input type="month" v-model="isShowApcheckList.thisMonth" @change="showApcheckList()"/>-->
  170. </div>
  171. <div class="btobapCheck-modal">
  172. <div class="choosescreen-result">
  173. <div v-if="isShowApcheckList.list.length > 0">
  174. <div class="clearfix choosescreen-result-list" v-for="(item, index) in isShowApcheckList.list">
  175. <div>
  176. <div class="choosescreen-result-list-content">
  177. <div style="border-bottom: 1px solid #D3D3D3;padding-bottom: 0.2rem">
  178. <span class="item inline-block" @click="checkItem(item, index)" v-show="!isShowApcheckList.showApcheck">
  179. <label class="mobile-cart-check" :class="{active: item.check}"></label>
  180. </span>
  181. <div class="inline-block" style="margin-left: 0.15rem">
  182. <div class="OverHidden">采购单:<span>{{item.ordercode}}</span></div>
  183. <div class="OverHidden">物料名称:<span>{{item.prodtitle}}</span></div>
  184. <div class="OverHidden">规格型号:<span>{{item.prodspec}}</span></div>
  185. <div class="OverHidden">发货单:<span>{{item.sendcode}}</span></div>
  186. <!--<div class="OverHidden">序号:<span>{{index + 1}}</span></div>-->
  187. <!--<div class="OverHidden">类型:<span>{{item.piclass}}</span></div>-->
  188. <!--<div class="OverHidden">单据日期:<span>{{item.pidate | time}}</span></div>-->
  189. </div>
  190. </div>
  191. <div style="padding-top: 0.2rem">
  192. <span class="item inline-block" style="opacity: 0" v-show="!isShowApcheckList.showApcheck">
  193. <label class="mobile-cart-check"></label>
  194. </span>
  195. <div class="inline-block" style="margin-left: 0.15rem">
  196. <div class="OverHidden">发货数量:<span>{{item.qty}}</span></div>
  197. <div class="OverHidden">验收单:<span>{{item.inoutno}}</span></div>
  198. <div class="OverHidden">验收数量:<span>{{item.thischeckqty}}</span></div>
  199. <div class="OverHidden">单价:<span>{{item.currency}}:{{item.orderprice}}</span></div>
  200. <!--<div class="OverHidden">发货单:<span>{{item.sendcode}}</span></div>-->
  201. <div class="OverHidden">税率:<span>{{item.taxrate}}%</span></div>
  202. <!--<div class="OverHidden">客户料号:<span>{{item.prodcode}}</span></div>-->
  203. <!--<div class="OverHidden">金额:<span>{{}}</span></div>-->
  204. </div>
  205. </div>
  206. </div>
  207. <div class="clearfix" style="border-top:1px solid #D9D9D9;padding: 0 0.15rem;line-height: 0.8rem" >
  208. <div class="fl" style="font-size: 0.26rem">小计:</div>
  209. <div class="fr" style="color: #FF3208;font-size: 0.26rem">{{(item.qty || 0) * (item.orderprice || 0) | computeNum(2)}}</div>
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. <empty-status
  215. v-else
  216. :text="'暂无对账信息'"
  217. :showLink="false"
  218. ></empty-status>
  219. </div>
  220. </div>
  221. <div slot="footer" class="footerBtn clearfix">
  222. <span class="item inline-block" @click="checkAll()" v-show="!isShowApcheckList.showApcheck">
  223. <label class="mobile-cart-check" :class="{active: !isCheckAll}"></label>全选
  224. </span>
  225. <div class="fr bbgoresult" @click="goTopayfor" v-show="!isShowApcheckList.showApcheck">对账</div>
  226. <div class="fr" style="margin-right: 0.2rem" v-show="!isShowApcheckList.showApcheck">合计:<a style="color: #001408;">{{allMoney}}</a></div>
  227. <div class="fl" style="margin-left: 0.2rem" v-show="isShowApcheckList.showApcheck">合计:<a style="color: #001408;">{{allMoney}}</a></div>
  228. <div class="fr bbgoresult" v-show="isShowApcheckList.showApcheck" @click="submitCheck">提交</div>
  229. <div class="fr bbgoresult cancel" v-show="isShowApcheckList.showApcheck" @click="deleteCheck">取消</div>
  230. </div>
  231. </modal-wrapper>
  232. <modal-wrapper :title="'新增对账单'" :showModal="showModal" @closeAction="showModal = false">
  233. <div class="btobapCheck-modal">
  234. <div class="search-content mi-search-content">
  235. <input type="text" placeholder="选择对账客户">
  236. <span @click="toChooseUser"><i class="iconfont icon-sousuo"></i></span>
  237. </div>
  238. <div style="padding-left: 0.15rem">
  239. <span class="title inline-block" style="font-size: 0.28rem;color: #666666;line-height: 0.5rem;margin-top:0.18rem">单据时间:</span>
  240. <div class="date-wrap">
  241. <label>
  242. <i class="iconfont icon-ico-date"></i>
  243. <input type="date" v-model="dateObj.fromDate" @change="setDate('fromDate')">
  244. <p v-if="dateObj.fromDate">{{dateObj.fromDate | date}}</p>
  245. </label>
  246. <span>—</span>
  247. <label>
  248. <i class="iconfont icon-ico-date"></i>
  249. <input type="date" v-model="dateObj.toDate" @change="setDate('toDate')">
  250. <p v-if="dateObj.toDate">{{dateObj.toDate | date}}</p>
  251. </label>
  252. </div>
  253. </div>
  254. <div class="choosescreen clearfix">
  255. <div class="fr">{{'收起'}}筛选条件<i class="iconfont icon-arrow-up"></i></div>
  256. </div>
  257. <div class="choosescreen-list">
  258. <div><span>应付供应商:</span><input type="text" v-model="screenObj.key" placeholder="可用应付供应商名称筛选" /></div>
  259. <div><span>物料名称:</span><input type="text" placeholder="请输入物料名称" /></div>
  260. <div><span>税率:</span><input type="text" placeholder="请输入税率" /></div>
  261. <div><span>送货工厂:</span><input type="text" placeholder="请输入送货工厂名称" /></div>
  262. <div><span>规格:</span><input type="text" placeholder="请输入物料规格" /></div>
  263. </div>
  264. <div class="choosescreen-result">
  265. <div class="clearfix choosescreen-result-list">
  266. <span class="item inline-block">
  267. <label class="mobile-cart-check"></label>
  268. </span>
  269. <div class="choosescreen-result-list-content">
  270. <div>本次对账数:<span>1</span></div>
  271. <div>客户名称:<span>1</span></div>
  272. <div>单据编号:<span>1</span></div>
  273. <div>发货单号:<span>1</span></div>
  274. <div>序号:<span>1</span></div>
  275. <div>类型:<span>1</span></div>
  276. <div>单据日期:<span>1</span></div>
  277. <div>应付供应商:<span>1</span></div>
  278. <div>客户采购单:<span>1</span></div>
  279. <div>客户料号:<span>1</span></div>
  280. <div>客户物料名称:<span>1</span></div>
  281. <div>客户规格型号:<span>1</span></div>
  282. <div>送货工厂:<span>1</span></div>
  283. <div>数量:<span>1</span></div>
  284. <div>单价:<span>1</span></div>
  285. <div>币别:<span>1</span></div>
  286. <div>税率:<span>1</span></div>
  287. <div>金额:<span>1</span></div>
  288. <div>本次对账金额:<span>1</span></div>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. </modal-wrapper>
  294. <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
  295. <div class="fixedPicker" v-show="isShowMonthChoose">
  296. <picker :slots="slots" @change="onValuesChange" :showToolbar="true" ref="picker">
  297. <div class="titls">选择当前时间</div>
  298. <div class="leftBtn" @click="isShowMonthChoose=false">取消</div>
  299. <div class="rightBtn" @click="resultMonth">确定</div>
  300. </picker>
  301. </div>
  302. </div>
  303. </template>
  304. <script>
  305. import { Picker } from 'mint-ui'
  306. import { ModalWrapper, BaseFilter } from '~components/mobile/base'
  307. import { PullUp, EmptyStatus, RemindBox } from '~components/mobile/common'
  308. function years() {
  309. let _d = new Date()
  310. let _year = Number(_d.getFullYear())
  311. let arr = []
  312. let num = 2000
  313. for (let i = 2000; i < _year; i++) {
  314. num++
  315. arr.push(num + '年')
  316. }
  317. return arr
  318. }
  319. function getMonth() {
  320. let sdateTo = new Date()
  321. // console.log(sdateTo.getMonth() - 1)
  322. return sdateTo.getMonth() - 1
  323. }
  324. function getYear() {
  325. let num = 2000
  326. let sdateTo = new Date()
  327. let _year = sdateTo.getFullYear()
  328. for (let i = 0; i < 99; i++) {
  329. num++
  330. if (num === Number(_year)) {
  331. num = i
  332. break
  333. }
  334. }
  335. return num
  336. }
  337. export default {
  338. layout: 'mobileNoHeader',
  339. middleware: 'authenticated',
  340. data() {
  341. return {
  342. MouthinShow: true,
  343. MouthOutShow: true,
  344. ShowTitle: false,
  345. collectResult: '',
  346. timeoutCount: 0,
  347. isShowMonthChoose: false,
  348. slots: [
  349. {
  350. flex: 1,
  351. values: years(),
  352. className: 'slot1',
  353. textAlign: 'center',
  354. defaultIndex: getYear()
  355. }, {
  356. divider: true,
  357. content: '-',
  358. className: 'slot2'
  359. }, {
  360. flex: 1,
  361. values: ['01月', '02月', '03月', '04月', '05月', '06月', '07月', '08月', '09月', '10月', '11月', '12月'],
  362. className: 'slot3',
  363. textAlign: 'center',
  364. defaultIndex: getMonth()
  365. }
  366. ],
  367. activeType: 'all',
  368. filterParams: {
  369. keyword: '',
  370. page: 1,
  371. count: 10
  372. },
  373. filterOptions: [
  374. {
  375. title: '交易时间',
  376. selectOption: 'date',
  377. selectItems: [{
  378. key: '30天',
  379. val: 1
  380. }, {
  381. key: '90天',
  382. val: 2
  383. }, {
  384. key: '180天',
  385. val: 3
  386. }, {
  387. key: '自定义',
  388. val: 4
  389. }],
  390. defaultVal: 1
  391. }
  392. ],
  393. resourceList: {
  394. content: []
  395. },
  396. isUser: false,
  397. unreadCode: [],
  398. showModal: false,
  399. dateObj: {},
  400. screenObj: {},
  401. outTimeMonth: '',
  402. isShowApcheckList: {
  403. show: false,
  404. enName: '',
  405. thisMonth: '',
  406. list: [],
  407. showApcheck: false,
  408. id: '',
  409. startTime: '',
  410. endTime: '',
  411. objTime: {}
  412. },
  413. ApcheckfilterOptions: [
  414. {
  415. title: '',
  416. selectOption: 'date',
  417. selectItems: [{
  418. key: '自定义',
  419. val: 4
  420. }],
  421. defaultVal: 1
  422. }
  423. ],
  424. ShowApcheckChooseTime: false
  425. }
  426. },
  427. created() {
  428. this.$http.get('/account/role/isUser').then(res => {
  429. this.isUser = res.data.isUser
  430. })
  431. this.getUnread()
  432. let sdateTo = new Date()
  433. this.isShowApcheckList.thisMonth = sdateTo.getFullYear() + '-' + sdateTo.getMonth()
  434. this.outTimeMonth = sdateTo.getFullYear() + '-' + sdateTo.getMonth()
  435. },
  436. // mounted() {
  437. // this.$nextTick(() => {
  438. // this.$refs.picker.change()
  439. // })
  440. // },
  441. methods: {
  442. onValuesChange(picker, value) {
  443. // console.log(picker.getValues())
  444. if (!this.$value) {
  445. picker.setSlotValue(0, '2018年')
  446. picker.setSlotValue(1, '11月')
  447. this.$picker = picker
  448. }
  449. let _ns = value[0].replace('年', '')
  450. let _my = value[1].replace('月', '')
  451. this.$value = _ns + '-' + _my
  452. },
  453. // 选择月份完毕
  454. resultMonth() {
  455. this.isShowMonthChoose = false
  456. if (this.$monthType === 'out') {
  457. // let _time2 = new Date(this.$value)
  458. // _time2.setDate(1)
  459. // _time2.setMonth(_time2.getMonth() + 1)
  460. // _time2.setDate(_time2.getDate() - 1)
  461. let _time2 = this.computedTime(this.$value)
  462. let _d = this.computedTime(new Date())
  463. if (_time2.getTime() > _d.getTime()) {
  464. this.setRemindText('所选对账日期不能超过当前时间')
  465. return
  466. }
  467. let _sp = new Date()
  468. if (_time2.getTime() >= _sp.getTime()) {
  469. this.MouthOutShow = false
  470. } else {
  471. this.MouthOutShow = true
  472. }
  473. this.outTimeMonth = this.$value
  474. this.filterParams.page = 1
  475. this.setSelect('', '', true)
  476. } else {
  477. // let _time2 = new Date(this.$value)
  478. // _time2.setDate(1)
  479. // _time2.setMonth(_time2.getMonth() + 1)
  480. // _time2.setDate(_time2.getDate() - 1)
  481. let _time2 = this.computedTime(this.$value)
  482. let _d = this.computedTime(new Date())
  483. if (_time2.getTime() > _d.getTime()) {
  484. this.setRemindText('所选对账日期不能超过当前时间')
  485. return
  486. }
  487. let _sp = new Date()
  488. if (_time2.getTime() > _sp.getTime()) {
  489. this.MouthinShow = false
  490. } else {
  491. this.MouthinShow = true
  492. }
  493. this.$monthClick = true
  494. this.isShowApcheckList.thisMonth = this.$value
  495. this.ShowApcheckChooseTime = false
  496. this.$refs.baseFilter[0].setSelect(1)
  497. this.showApcheckList()
  498. }
  499. },
  500. // 立即对账
  501. addApCheck() {
  502. this.showModal = true
  503. },
  504. setRemindText: function (str) {
  505. this.collectResult = str
  506. this.timeoutCount++
  507. },
  508. setDate (type) {
  509. if (this.dateObj[type]) {
  510. // 初始化为00:00:00
  511. this.dateObj[type] = new Date(this.dateObj[type]).getTime() - 8 * 60 * 60 * 1000
  512. if (this.dateObj.fromDate && this.dateObj.toDate && this.dateObj.fromDate > this.dateObj.toDate) {
  513. if (type === 'fromDate') {
  514. this.setRemindText('起始时间不能大于结束时间')
  515. } else {
  516. this.setRemindText('结束时间不能小于起始时间')
  517. }
  518. this.dateObj[type] = null
  519. }
  520. // else {
  521. // if (this.dateObj.fromDate && this.dateObj.toDate && this.dateObj.fromDate === this.dateObj.toDate) {
  522. // // 23:59:59
  523. // this.dateObj.toDate += 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000
  524. // }
  525. // }
  526. // 23:59:59
  527. if (this.dateObj.toDate && type === 'toDate') {
  528. this.dateObj.toDate += (23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000)
  529. }
  530. } else {
  531. this.dateObj[type] = null
  532. }
  533. },
  534. toChooseUser() {
  535. console.log('选择客户')
  536. },
  537. onPullUpAction () {
  538. this.filterParams.page++
  539. this.setSelect(this.$selectObj.key, this.$selectObj.value, false)
  540. },
  541. getUnread() {
  542. this.$http.get('/sale/apCheck/unread').then(res => {
  543. this.unreadCode = res.data.content
  544. })
  545. },
  546. lookDetails(id) {
  547. console.log('前往详情并且设置为已读')
  548. // if (!this.isUnread(id)) { } else {
  549. // let sourceId = []
  550. // sourceId.push(id)
  551. // this.$http.post('/sale/tender/setRead', sourceId).then(res => {
  552. // this.getUnread()
  553. // })
  554. // }
  555. },
  556. isUnread: function (id) {
  557. for (let i in this.unreadCode) {
  558. if (id === this.unreadCode[i]) {
  559. return true
  560. }
  561. }
  562. },
  563. ChangeList(tp) {
  564. this.activeType = tp
  565. this.filterParams.page = 1
  566. this.setSelect(this.$selectObj.key, this.$selectObj.value, true)
  567. },
  568. onFilter() {
  569. this.filterParams.page = 1
  570. this.setSelect(this.$selectObj.key, this.$selectObj.value, true)
  571. },
  572. onSelectAction(selectObj) {
  573. this.$selectObj = selectObj
  574. this.setSelect(selectObj.key, selectObj.value, true)
  575. },
  576. onValueAction(selectObj) {
  577. this.$selectObj = selectObj
  578. this.setSelect(selectObj.key, selectObj.value, true)
  579. },
  580. ApcheckonSelectAction(selectObj) {
  581. if (this.$monthClick) return
  582. this.ShowApcheckChooseTime = true
  583. this.isShowApcheckList.objTime = selectObj
  584. this.getApcheckDetailsinfo(selectObj.key, selectObj.value)
  585. },
  586. ApcheckonValueAction(selectObj) {
  587. // if (this.$monthClick) return
  588. // this.isShowApcheckList.objTime = selectObj
  589. // this.getApcheckDetailsinfo(selectObj.key, selectObj.value)
  590. },
  591. // B2B未对账
  592. // NotapCheck () {
  593. // console.log('未对账')
  594. // },
  595. // 未对账详情
  596. showApcheckList(item) {
  597. this.isShowApcheckList.show = true
  598. this.isShowApcheckList.enName = item ? item.myEnterprise.enName : this.isShowApcheckList.enName
  599. this.getApcheckDetailsinfo()
  600. },
  601. // 未对账详情获取数据
  602. getApcheckDetailsinfo (...objTime) {
  603. if (!this.isShowApcheckList.show) return
  604. let _params = {
  605. params: {
  606. checkDate: this.isShowApcheckList.thisMonth,
  607. suuorname: this.isShowApcheckList.enName
  608. }
  609. }
  610. // 是否打开自定义时间选项 且
  611. if (this.ShowApcheckChooseTime && !this.$monthClick) {
  612. // let _fromDate = new Date(this.outTimeMonth + '-01 00:00:00').getTime()
  613. // let _d = this.computedTime(this.isShowApcheckList.thisMonth).getTime()
  614. _params = {
  615. params: {
  616. fromDate: objTime[1].fromDate,
  617. endDate: objTime[1].toDate,
  618. suuorname: this.isShowApcheckList.enName
  619. }
  620. }
  621. }
  622. this.$http.get('/sale/apCheck/getAllByKeywords', _params).then(res => {
  623. res.data.details.forEach(item => {
  624. item.check = true
  625. })
  626. this.$monthClick = false
  627. this.isShowApcheckList.list = res.data.details
  628. this.$nextTick(() => {
  629. this._initscroll()
  630. })
  631. })
  632. },
  633. // 对账全选
  634. checkAll() {
  635. let fl = true
  636. if (this.isCheckAll === 0) {
  637. fl = false
  638. }
  639. this.isShowApcheckList.list.forEach(item => {
  640. item.check = fl
  641. })
  642. },
  643. checkItem(item, index) {
  644. if (item.check) {
  645. item.check = false
  646. } else {
  647. this.$set(this.isShowApcheckList.list[index], 'check', true)
  648. }
  649. },
  650. // 对账按钮
  651. goTopayfor() {
  652. let apCheck = {
  653. custUu: '',
  654. custName: '',
  655. enUu: '',
  656. apDate: '',
  657. beginDate: '',
  658. endDate: '',
  659. checkStatus: '未对账',
  660. checkAmount: 0,
  661. currency: '',
  662. rate: '',
  663. items: [],
  664. taxrate: ''
  665. }
  666. // 保存来源单据相关信息
  667. let sourceInfos = []
  668. // 所允许的本次对账最大最小数量
  669. this.isShowApcheckList.list.maxThisCheckQty = 0
  670. this.isShowApcheckList.list.minThisCheckQty = 0
  671. let sameCust = true
  672. let validQty = true
  673. let _list = []
  674. this.isShowApcheckList.list.forEach((check) => {
  675. // 保存应收对账单明细行数据
  676. let item = {
  677. inoutno: '',
  678. inoutnodetno: '',
  679. orderCode: '',
  680. orderClass: '',
  681. orderDetno: '',
  682. price: '',
  683. checkQty: '',
  684. amount: '',
  685. sourceId: '',
  686. sourceTable: '',
  687. oldYCheckQty: '',
  688. status: 0,
  689. receiveCode: '',
  690. receiveName: '',
  691. prodCode: '',
  692. prodTitle: '',
  693. prodUnit: '',
  694. prodSpec: '',
  695. taxrate: '',
  696. sendcode: '',
  697. whname: '',
  698. custUserUU: ''
  699. }
  700. // 应收对账单明细行来源表信息
  701. let sourceInfo = {
  702. sourceId: '',
  703. sourceTable: '',
  704. newYCheckQty: ''
  705. }
  706. // 此次对账后新的已转数
  707. if (check.check === true) {
  708. _list.push(check)
  709. apCheck.custName = check.custname
  710. apCheck.enUu = check.enuu
  711. apCheck.checkAmount += (check.thischeckqty || 0) * (check.orderprice || 0)
  712. apCheck.apDate = check.pidate
  713. apCheck.rate = check.rate
  714. // 必须是同一家客户才能生成对账单,否则提示错误
  715. if (apCheck.custUu === '') {
  716. apCheck.custUu = check.custuu
  717. } else if (apCheck.custUu !== check.custuu) {
  718. sameCust = false
  719. this.setRemindText('请选择同一家客户')
  720. }
  721. // 必须是相同币别才能生成对账单,否则提示错误
  722. if (apCheck.currency === '') {
  723. apCheck.currency = check.currency
  724. } else if (apCheck.currency !== check.currency) {
  725. sameCust = false
  726. this.setRemindText('请选择同一种币别')
  727. }
  728. let re = /^[0-9]+.?[0-9]*$/
  729. // 必须是相同税率才能生成对账单,否则提示错误
  730. if (!re.test(apCheck.taxrate)) {
  731. // if (!angular.isNumber(apCheck.taxrate)) {
  732. apCheck.taxrate = check.taxrate
  733. } else if (apCheck.taxrate !== check.taxrate) {
  734. sameCust = false
  735. this.setRemindText('请选择相同的税率')
  736. }
  737. // 本次对账数量必须小于总对账数量
  738. if (check.qty > 0) {
  739. this.isShowApcheckList.list.maxThisCheckQty = check.qty
  740. this.isShowApcheckList.list.minThisCheckQty = 0
  741. if (check.qty - (check.ycheckqty || 0) < check.thischeckqty || check.thischeckqty < 0 || check.thischeckqty === 0) {
  742. validQty = false
  743. this.setRemindText('本次对账数量,填写有误!')
  744. }
  745. } else if (check.qty < 0) {
  746. this.isShowApcheckList.list.maxThisCheckQty = 0
  747. this.isShowApcheckList.list.minThisCheckQty = check.qty
  748. if (((-check.qty) - (-check.ycheckqty) < (-check.thischeckqty)) || check.thischeckqty > 0 || check.thischeckqty === 0) {
  749. validQty = false
  750. this.setRemindText('本次对账数量,填写有误!')
  751. }
  752. }
  753. if (this.ShowApcheckChooseTime) {
  754. let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
  755. let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
  756. // 获取筛选时间的开始时间为对账的开始时间
  757. apCheck.beginDate = _start.getTime()
  758. // 获取筛选的截止时间为对账的截止时间
  759. apCheck.endDate = _end.getTime()
  760. } else {
  761. this.isShowApcheckList.startTime = this.outTimeMonth + '-01'
  762. let _d = new Date(this.isShowApcheckList.startTime)
  763. let _start = _d
  764. _d.setDate(1)
  765. _d.setMonth(_d.getMonth() + 1)
  766. _d.setDate(_d.getDate() - 1)
  767. // 获取筛选时间的开始时间为对账的开始时间
  768. apCheck.beginDate = _start.getTime()
  769. // 获取筛选的截止时间为对账的截止时间
  770. apCheck.endDate = _d.getTime()
  771. }
  772. // 应收对账单明细行数据
  773. item.orderCode = check.ordercode
  774. item.orderClass = check.piclass
  775. item.orderDetno = check.orderdetno
  776. item.price = check.orderprice
  777. item.checkQty = check.thischeckqty
  778. item.amount = (check.thischeckqty || 0) * (check.orderprice || 0)
  779. item.sourceId = check.sourceid
  780. item.sourceTable = check.sourcetable
  781. item.oldYCheckQty = check.ycheckqty
  782. item.prodCode = check.prodcode
  783. item.prodTitle = check.prodtitle
  784. item.prodSpec = check.prodspec
  785. item.prodUnit = check.produnit
  786. item.inoutno = check.inoutno
  787. item.inoutnodetno = check.detno
  788. item.taxrate = check.taxrate
  789. item.receiveCode = check.receivecode
  790. item.receiveName = check.receivename
  791. item.sendcode = check.sendcode
  792. item.whname = check.whname
  793. item.custUserUU = check.custuseruu
  794. // 来源表相关信息
  795. sourceInfo.sourceid = check.sourceid
  796. sourceInfo.sourcetable = check.sourcetable
  797. sourceInfo.newYCheckQty = ((check.ycheckqty || 0) + check.thischeckqty)
  798. sourceInfos.push(sourceInfo)
  799. apCheck.items.push(item)
  800. // haveSelected = true
  801. // 如果是同一家客户,生成对账单的同时,关闭模态框
  802. }
  803. })
  804. if (sameCust && validQty) {
  805. this.isShowApcheckList.list = _list
  806. this.saveApCheck(apCheck)
  807. }
  808. },
  809. // 对账提交
  810. saveApCheck(apCheck) {
  811. if (apCheck.items.length === 0) {
  812. this.setRemindText('请先选择需要对账的数据')
  813. } else {
  814. this.$http.post('/sale/apCheck/operation/save', apCheck).then(res => {
  815. this.setRemindText('生成应收对账成功')
  816. this.isShowApcheckList.id = res.data.id
  817. this.isShowApcheckList.showApcheck = true
  818. if (this.ShowApcheckChooseTime) {
  819. let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
  820. let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
  821. this.isShowApcheckList.startTime = _start.getFullYear() + '-' + (_start.getMonth() + 1) + '-' + _start.getDate()
  822. this.isShowApcheckList.endTime = _end.getFullYear() + '-' + (_end.getMonth() + 1) + '-' + _end.getDate()
  823. } else {
  824. this.isShowApcheckList.startTime = this.outTimeMonth + '-01'
  825. let _d = this.computedTime(this.isShowApcheckList.startTime)
  826. this.isShowApcheckList.endTime = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate()
  827. }
  828. this.ShowApcheckChooseTime = false
  829. }, err => {
  830. this.setRemindText('生成对账单失败')
  831. })
  832. }
  833. },
  834. // 提交对账单
  835. submitCheck() {
  836. this.$http.post('sale/apCheck/operation/updateStatus?id=' + this.isShowApcheckList.id).then(res => {
  837. this.setRemindText('新增成功')
  838. this.isShowApcheckList.showApcheck = false
  839. this.isShowApcheckList.show = false
  840. this.isShowApcheckList.id = ''
  841. })
  842. },
  843. // 删除对账单
  844. deleteCheck() {
  845. if (this.isShowApcheckList.id === '') {
  846. this.isShowApcheckList.showApcheck = false
  847. this.isShowApcheckList.show = false
  848. this.isShowApcheckList.id = ''
  849. return
  850. }
  851. this.$http.post('/sale/apCheck/operation/deleteApCheck?id=' + this.isShowApcheckList.id, {}).then(res => {
  852. this.isShowApcheckList.showApcheck = false
  853. this.isShowApcheckList.show = false
  854. this.isShowApcheckList.id = ''
  855. let sourceInfos = []
  856. this.isShowApcheckList.list.forEach(item => {
  857. let sourceInfo = {
  858. sourceId: '',
  859. sourceTable: '',
  860. newYCheckQty: ''
  861. }
  862. sourceInfo.sourceId = item.sourceid
  863. sourceInfo.sourceTable = item.sourcetable
  864. sourceInfo.newYCheckQty = item.oldYCheckQty
  865. sourceInfos.push(sourceInfo)
  866. })
  867. this.$http.post('/sale/apCheck/update', sourceInfos).then(res => {})
  868. }, err => {
  869. this.setRemindText(err.response.data)
  870. })
  871. },
  872. // 月份+1
  873. addMonth(tp, key, val) {
  874. if (tp === 'inside') {
  875. let _sp = new Date()
  876. this.ShowApcheckChooseTime = false
  877. this.$monthClick = true
  878. let _d = this.computedTime(this.isShowApcheckList.thisMonth, val)
  879. let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
  880. this.isShowApcheckList.thisMonth = _d.getFullYear() + '-' + _m
  881. if (_d.getTime() >= _sp.getTime()) {
  882. this.MouthinShow = false
  883. } else {
  884. this.MouthinShow = true
  885. }
  886. this.$refs.baseFilter[0].setSelect(1)
  887. this.showApcheckList()
  888. } else {
  889. let _sp = new Date()
  890. let _d = this.computedTime(this[key], val)
  891. let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
  892. this[key] = _d.getFullYear() + '-' + _m
  893. if (_d.getTime() >= _sp.getTime()) {
  894. this.MouthOutShow = false
  895. } else {
  896. this.MouthOutShow = true
  897. }
  898. this.filterParams.page = 1
  899. this.setSelect('', '', true)
  900. }
  901. },
  902. computedTime(num, val) {
  903. let _d = new Date(num)
  904. if (val !== undefined) {
  905. _d.setMonth(_d.getMonth() + val)
  906. }
  907. _d.setDate(1)
  908. _d.setMonth(_d.getMonth() + 1)
  909. _d.setDate(_d.getDate() - 1)
  910. return _d
  911. },
  912. async setSelect(...val) {
  913. let _url = '/sale/apCheck/info/search'
  914. let itemL = {}
  915. if (this.activeType === 'all') {
  916. let _fromDate = this.outTimeMonth + '-01 00:00:00'
  917. // let _d = new Date(_fromDate)
  918. let _d = this.computedTime(_fromDate)
  919. // _d.setDate(1)
  920. // _d.setMonth(_d.getMonth() + 1)
  921. // _d.setDate(_d.getDate() - 1)
  922. let _endDate = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate() + ' 00:00:00'
  923. _endDate = new Date(_endDate).getTime()
  924. _fromDate = new Date(_fromDate).getTime()
  925. _url = '/sale/apCheck/customer'
  926. itemL = {
  927. params: {
  928. count: 20,
  929. page: this.filterParams.page,
  930. keyword: this.filterParams.keyword,
  931. searchFilter: {'fromDate': _fromDate, 'endDate': _endDate},
  932. sorting: { 'recordDate': 'desc' }
  933. }
  934. }
  935. } else {
  936. itemL = {
  937. params: {
  938. count: this.filterParams.count,
  939. page: this.filterParams.page,
  940. searchFilter: {'keyword': this.filterParams.keyword || '', 'fromDate': val[1].fromDate, 'endDate': val[1].toDate},
  941. sorting: {'recordDate': 'desc'},
  942. _state: this.activeType
  943. }
  944. }
  945. }
  946. let { data } = await this.$http.get(_url, itemL)
  947. if (!this.resourceList.content) {
  948. this.resourceList.content = []
  949. }
  950. data.content = data.content || []
  951. if (this.activeType !== 'all') {
  952. data.content.forEach(item => {
  953. item.checkAmount = item.checkAmount.toFixed(2)
  954. item.getTotalProd = 0
  955. item.items.forEach(im => {
  956. item.getTotalProd += im.checkQty
  957. })
  958. })
  959. } else {
  960. data.content.forEach((item) => {
  961. let _mouthArr = []
  962. let _totalArr = []
  963. item.thisMonthCount && item.thisMonthCount.forEach(count => {
  964. if (count.amount > 0) {
  965. _mouthArr.push(count)
  966. }
  967. })
  968. item.totalCount && item.totalCount.forEach(count => {
  969. if (count.amount > 0) {
  970. _totalArr.push(count)
  971. }
  972. })
  973. item.totalCount = _totalArr
  974. item.thisMonthCount = _mouthArr
  975. })
  976. console.log(data.content)
  977. }
  978. if (!val[2]) {
  979. this.resourceList.content.push(...data.content)
  980. data.content = this.resourceList.content
  981. } else {
  982. this.resourceList.content = []
  983. }
  984. this.resourceList = data
  985. },
  986. // 选择月份
  987. ShowMonthChoose(tp, key) {
  988. this.$monthType = tp
  989. if (tp === 'inside') {
  990. let _m = this.isShowApcheckList.thisMonth.split('-')[1].length < 2 ? '0' + this.isShowApcheckList.thisMonth.split('-')[1] : this.isShowApcheckList.thisMonth.split('-')[1]
  991. this.$picker.setSlotValue(0, this.isShowApcheckList.thisMonth.split('-')[0] + '年')
  992. this.$picker.setSlotValue(1, _m + '月')
  993. } else {
  994. let _m = this[key].split('-')[1].length < 2 ? '0' + this[key].split('-')[1] : this[key].split('-')[1]
  995. this.$picker.setSlotValue(0, this[key].split('-')[0] + '年')
  996. this.$picker.setSlotValue(1, _m + '月')
  997. }
  998. this.isShowMonthChoose = true
  999. }
  1000. },
  1001. computed: {
  1002. allPage () {
  1003. return Math.ceil(this.resourceList.totalElement / 10)
  1004. },
  1005. isEmpty () {
  1006. return this.resourceList.content.length === 0
  1007. },
  1008. allMoney() {
  1009. let sum = 0
  1010. this.isShowApcheckList.list.forEach(obj => {
  1011. if (obj.check) {
  1012. sum += obj.qty * (obj.orderprice || 0)
  1013. }
  1014. })
  1015. return sum
  1016. },
  1017. isCheckAll() {
  1018. if (this.isShowApcheckList.list.length === 0) {
  1019. return true
  1020. }
  1021. return this.isShowApcheckList.list.filter(item => {
  1022. return item.check === false
  1023. }).length
  1024. }
  1025. },
  1026. components: {
  1027. ModalWrapper,
  1028. BaseFilter,
  1029. PullUp,
  1030. EmptyStatus,
  1031. Picker,
  1032. RemindBox
  1033. },
  1034. filters: {
  1035. time: function (time) {
  1036. if (typeof time === 'number') {
  1037. if (!time) {
  1038. return '无'
  1039. } else {
  1040. let d = new Date(time)
  1041. let year = d.getFullYear()
  1042. let month = d.getMonth() + 1
  1043. let day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
  1044. return year + '-' + month + '-' + day
  1045. }
  1046. }
  1047. },
  1048. computeNum: function(price, num) {
  1049. return price.toFixed(num)
  1050. }
  1051. }
  1052. }
  1053. </script>
  1054. <style lang="scss" scoped>
  1055. @mixin overFlowHidden {
  1056. overflow: hidden;
  1057. text-overflow: ellipsis;
  1058. white-space: nowrap;
  1059. }
  1060. .fixedPicker {
  1061. position: fixed;
  1062. bottom: 0;
  1063. left: 0;
  1064. width: 100%;
  1065. height: 100%;
  1066. z-index: 9999;
  1067. background: rgba(0,0,0,0.5);
  1068. .picker {
  1069. width: 100%;
  1070. left: 0;
  1071. bottom: 0;
  1072. position: absolute;
  1073. background: #fff;
  1074. }
  1075. .titls {
  1076. text-align: center;
  1077. font-size: 0.24rem;
  1078. line-height: 0.5rem
  1079. }
  1080. .leftBtn {
  1081. color: #666;
  1082. font-size: 0.24rem;
  1083. position: absolute;
  1084. left: 0.2rem;
  1085. top: 0.1rem
  1086. }
  1087. .rightBtn {
  1088. top: 0.1rem;
  1089. color: #3e82f5;
  1090. font-size: 0.24rem;
  1091. position: absolute;
  1092. right: 0.2rem;
  1093. }
  1094. }
  1095. .mobile-header{
  1096. position: fixed;
  1097. top: 0;
  1098. z-index: 100;
  1099. width:100%;
  1100. height: 1.26rem;
  1101. line-height: 1.26rem;
  1102. /*border-bottom:.01rem solid #ccc;*/
  1103. background: #3e82f5;
  1104. padding:0 .2rem 0 .1rem;
  1105. color:#fff;
  1106. }
  1107. .mobile-header p{
  1108. overflow: hidden;
  1109. text-overflow: ellipsis;
  1110. white-space: nowrap;
  1111. font-size:.36rem;
  1112. text-align: center;
  1113. width: 6rem;
  1114. padding-left: 1rem;
  1115. }
  1116. .mobile-center-header p.en-name {
  1117. font-size: .3rem;
  1118. }
  1119. .mobile-header a{
  1120. font-size:.28rem;
  1121. color:#fff;
  1122. position: absolute;
  1123. }
  1124. .mobile-header a i{
  1125. font-size: .48rem;
  1126. margin-right: -.1rem;
  1127. }
  1128. .mobile-header p span {
  1129. position: absolute;
  1130. right: .4rem;
  1131. font-size: .28rem;
  1132. }
  1133. .mobile-header p span i {
  1134. font-size: .28rem;
  1135. }
  1136. .btobapCheck-wrapper {
  1137. background: #f1f3f6;
  1138. margin: 1.26rem 0 0.98rem 0;
  1139. .search-content {
  1140. padding: .24rem 0;
  1141. text-align: center;
  1142. background: #f1f3f6;
  1143. input {
  1144. width: 6.48rem;
  1145. height: .58rem;
  1146. line-height: .58rem;
  1147. border-radius: .14rem;
  1148. margin: 0 0 0 .11rem;
  1149. font-size: .26rem;
  1150. padding: 0 .71rem 0 .21rem;
  1151. border: 1px solid #3f84f6;
  1152. }
  1153. }
  1154. .order-tab {
  1155. background: #3f84f6;
  1156. padding-bottom: 0.2rem;
  1157. .order-tab-wrapper {
  1158. border: solid 1px #ffffff;
  1159. width: 7.06rem;
  1160. margin: 0 auto;
  1161. border-radius: 0.04rem;
  1162. line-height: 0.72rem;
  1163. height: 0.72rem;
  1164. overflow: hidden;
  1165. div {
  1166. color: #ffffff;
  1167. font-size: 0.28rem;
  1168. text-align: center;
  1169. width: 50%;
  1170. &.active {
  1171. background-color: #ffffff;
  1172. color: #3f84f6;
  1173. }
  1174. }
  1175. }
  1176. }
  1177. .order-nav {
  1178. background: #fff;
  1179. div {
  1180. height: 0.82rem;
  1181. line-height: 0.82rem;
  1182. display: inline-block;
  1183. width: 33.3%;
  1184. text-align: center;
  1185. font-size: .28rem;
  1186. color: #666;
  1187. &.active span{
  1188. color: #3f84f6;
  1189. border-bottom: 0.04rem solid #3f84f6;
  1190. padding-bottom: 0.2rem;
  1191. }
  1192. }
  1193. }
  1194. .btobapCheck-wrapper-scroll {
  1195. height: calc(100vh - 1.26rem - 0.98rem - 0.82rem - 1.06rem - 0.92rem);
  1196. overflow-y: auto;
  1197. &.btobapCheck-wrapper-scroll2 {
  1198. height: calc(100vh - 1.26rem - 0.98rem - 0.82rem - 1.06rem - 0.92rem - 1.3rem);
  1199. }
  1200. }
  1201. .filter-wrapper{
  1202. width: 7.1rem;
  1203. margin: 0 auto 0.27rem;
  1204. background: #fff;
  1205. padding: 0.27rem 0.2rem;
  1206. border-radius: 0.05rem;
  1207. }
  1208. .invoice-btob-list {
  1209. width: 7.1rem;
  1210. margin: 0 auto 0.2rem;
  1211. background: #FFFFFF;
  1212. border-radius: 0.05rem;
  1213. padding: 0 0.24rem;
  1214. }
  1215. .invoice-btob-wrapper-top {
  1216. height: 0.8rem;
  1217. span{
  1218. margin-top: 0.24rem;
  1219. display: inline-block;
  1220. font-size: 0.28rem;
  1221. color: #333333;
  1222. height:0.25rem;
  1223. &.read {
  1224. color: #15B262;
  1225. }
  1226. &.noread {
  1227. color: #DE4545;
  1228. }
  1229. &.isPut {
  1230. background: #15B262;
  1231. color: #FFFFFF;
  1232. font-size: 0.24rem;
  1233. border-radius: 0.04rem;
  1234. }
  1235. &.noPut {
  1236. font-size: 0.24rem;
  1237. background: #DE4545;
  1238. color: #FFFFFF;
  1239. border-radius: 0.04rem;
  1240. }
  1241. }
  1242. }
  1243. .invoice-btob-wrapper-middle {
  1244. border-top: 1px solid #D9D9D9;
  1245. @include overFlowHidden();
  1246. padding-top: 0.15rem;
  1247. font-size: 0.28rem;
  1248. color: #151515;
  1249. line-height: 0.5rem;
  1250. padding-bottom: 0.15rem;
  1251. span {
  1252. color: #666666;
  1253. }
  1254. .invoice-btob-wrapper-middle .tilte{
  1255. color: #333333;
  1256. }
  1257. .middle_btn {
  1258. text-align: center;
  1259. font-size: 0.26rem;
  1260. color: #333333;
  1261. }
  1262. }
  1263. .invoice-btob-wrapper-content {
  1264. border-top: 1px solid #D9D9D9;
  1265. @include overFlowHidden();
  1266. padding-top: 0.15rem;
  1267. font-size: 0.28rem;
  1268. color: #151515;
  1269. line-height: 0.5rem;
  1270. padding-bottom: 0.15rem;
  1271. span {
  1272. color: #666666;
  1273. }
  1274. }
  1275. }
  1276. .btobapCheck-modal {
  1277. .search-content input {border: 1px solid #3f84f6;}
  1278. .date-wrap{
  1279. text-align: center;
  1280. display: inline-block;
  1281. label {
  1282. width: 2.3rem;
  1283. height: .5rem;
  1284. line-height: .5rem;
  1285. border-radius: .04rem;
  1286. border: 1px solid #bfbfbf;
  1287. background: url(/images/mobile/select-arrow.png) no-repeat;
  1288. background-size: .12rem .06rem;
  1289. vertical-align: middle;
  1290. background-color: #fff;
  1291. background-position: 2.1rem .2rem;
  1292. position: relative;
  1293. margin: .2rem 0 0 0;
  1294. i {
  1295. font-size: .28rem;
  1296. color: #3f84f6;
  1297. margin-left: .1rem;
  1298. float: left;
  1299. }
  1300. input {
  1301. opacity: 0;
  1302. width: 2.22rem;
  1303. height: .5rem;
  1304. position: absolute;
  1305. left: 0;
  1306. z-index: 1;
  1307. }
  1308. p {
  1309. font-weight: normal;
  1310. font-size: .22rem;
  1311. color: #3E81F6;
  1312. text-align: left;
  1313. text-indent: 10px;
  1314. }
  1315. }
  1316. span {
  1317. color: #a0a0a0;
  1318. margin: 0.3rem .05rem 0;
  1319. width: .3rem;
  1320. display: inline-block;
  1321. text-align: center;
  1322. vertical-align: top;
  1323. }
  1324. }
  1325. .choosescreen {
  1326. padding: 0 0.15rem;
  1327. font-size: 0.28rem;
  1328. color: #418DF6;
  1329. line-height: 0.52rem;
  1330. i {
  1331. font-size: 0.28rem;
  1332. }
  1333. }
  1334. .choosescreen-list {
  1335. margin: 0 0.15rem;
  1336. padding-bottom: 0.28rem;;
  1337. border-bottom: 1px solid #D9D9D9;
  1338. div {
  1339. line-height: 0.76rem;
  1340. span {
  1341. font-size: 0.28rem;
  1342. color: #666666;
  1343. display: inline-block;
  1344. width: 1.68rem;
  1345. }
  1346. input {
  1347. height: 0.5rem;
  1348. line-height: 0.5rem;
  1349. width: 4.44rem;
  1350. margin-left: 0.18rem;
  1351. font-size: 0.28rem;
  1352. color: #333;
  1353. border: 1px solid #AEAEAE;
  1354. text-indent: 0.12rem;
  1355. }
  1356. }
  1357. }
  1358. .choosescreen-result {
  1359. .choosescreen-result-list {
  1360. /*padding: 0 0.15rem 0rem;*/
  1361. background: #fff;
  1362. margin:0 0 0.2rem;
  1363. }
  1364. .choosescreen-result-list-content {
  1365. /*display: inline-block;*/
  1366. vertical-align: middle;
  1367. margin: 0 0.15rem;
  1368. div.OverHidden {
  1369. @include overFlowHidden();
  1370. width: 5.5rem;
  1371. }
  1372. padding-top: 0.15rem;
  1373. font-size: 0.28rem;
  1374. color: #151515;
  1375. line-height: 0.5rem;
  1376. padding-bottom: 0.15rem;
  1377. span {
  1378. color: #666666;
  1379. }
  1380. }
  1381. }
  1382. }
  1383. .timeLine-wrapper {
  1384. background: #fff;
  1385. border-radius: 0.05rem;
  1386. height: 1.1rem;
  1387. width: 7.1rem;
  1388. margin: 0 auto 0.2rem;
  1389. padding: 0.3rem 0 0 2rem;
  1390. position: relative;
  1391. .left {
  1392. background: #fff;
  1393. color: #333;
  1394. padding: 0rem 0.1rem;
  1395. /*box-shadow: 0 0 2px #a0a0a0;*/
  1396. text-align: center;
  1397. margin-right: 0.2rem;
  1398. height: 0.5rem;
  1399. line-height: 0.5rem;
  1400. border: 1px solid #BFBFBF;
  1401. }
  1402. .right {
  1403. text-align: center;
  1404. background: #fff;
  1405. color: #333;
  1406. padding: 0rem 0.1rem;
  1407. /*box-shadow: 0 0 2px #a0a0a0;*/
  1408. margin-left: 0.2rem;
  1409. height: 0.5rem;
  1410. line-height: 0.5rem;
  1411. border: 1px solid #BFBFBF;
  1412. }
  1413. .rightBtn {
  1414. margin: 0.1rem 0.2rem 0 0;
  1415. }
  1416. }
  1417. .modal-h {
  1418. background: #F3F3F3;
  1419. .modal-h-top {
  1420. padding: 0.15rem;
  1421. }
  1422. .overflowhidden {
  1423. @include overFlowHidden();
  1424. width: 5.9rem;
  1425. font-size: 0.28rem;
  1426. color: #333333;
  1427. margin-left: 0.1rem;
  1428. }
  1429. .timeLine-wrapper {
  1430. width: 100%;
  1431. padding: 0.1rem 0 0.1rem 0rem;
  1432. height: 1.4rem;
  1433. margin: 0
  1434. }
  1435. }
  1436. div.timeLine {
  1437. background: #FFFFFF;
  1438. border: 1px solid #BFBFBF;
  1439. border-radius: 4px;
  1440. font-size: 0.28rem;
  1441. color: #3E81F6;
  1442. width: 1.7rem;
  1443. display: inline-block;
  1444. height: 0.5rem;
  1445. line-height: 0.5rem
  1446. }
  1447. .footerBtn {
  1448. padding: 0 0 0 0.15rem;
  1449. height: 1rem;
  1450. line-height: 1rem;
  1451. background: #fff;
  1452. font-size: 0.26rem;
  1453. color: #666666;
  1454. border-top: 1px solid #D3D3D3;
  1455. .bbgoresult {
  1456. background: #008BF7;
  1457. color: #fff;
  1458. width: 1.3rem;
  1459. text-align: center;
  1460. }
  1461. .cancel {
  1462. background: #fff;
  1463. color: #333;
  1464. height: 0.98rem;
  1465. }
  1466. }
  1467. </style>