btobapCheck.vue 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490
  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 | priceFilter}}</a></div>
  227. <div class="fl" style="margin-left: 0.2rem" v-show="isShowApcheckList.showApcheck">合计:<a style="color: #001408;">{{allMoney | priceFilter}}</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.isShowApcheckList.show = true
  498. this.getApcheckDetailsinfo()
  499. }
  500. },
  501. // 立即对账
  502. addApCheck() {
  503. this.showModal = true
  504. },
  505. setRemindText: function (str) {
  506. this.collectResult = str
  507. this.timeoutCount++
  508. },
  509. setDate (type) {
  510. if (this.dateObj[type]) {
  511. // 初始化为00:00:00
  512. this.dateObj[type] = new Date(this.dateObj[type]).getTime() - 8 * 60 * 60 * 1000
  513. if (this.dateObj.fromDate && this.dateObj.toDate && this.dateObj.fromDate > this.dateObj.toDate) {
  514. if (type === 'fromDate') {
  515. this.setRemindText('起始时间不能大于结束时间')
  516. } else {
  517. this.setRemindText('结束时间不能小于起始时间')
  518. }
  519. this.dateObj[type] = null
  520. }
  521. // else {
  522. // if (this.dateObj.fromDate && this.dateObj.toDate && this.dateObj.fromDate === this.dateObj.toDate) {
  523. // // 23:59:59
  524. // this.dateObj.toDate += 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000
  525. // }
  526. // }
  527. // 23:59:59
  528. if (this.dateObj.toDate && type === 'toDate') {
  529. this.dateObj.toDate += (23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000)
  530. }
  531. } else {
  532. this.dateObj[type] = null
  533. }
  534. },
  535. toChooseUser() {
  536. console.log('选择客户')
  537. },
  538. onPullUpAction () {
  539. this.filterParams.page++
  540. this.setSelect(this.$selectObj.key, this.$selectObj.value, false)
  541. },
  542. getUnread() {
  543. this.$http.get('/sale/apCheck/unread').then(res => {
  544. this.unreadCode = res.data.content
  545. })
  546. },
  547. lookDetails(id) {
  548. console.log('前往详情并且设置为已读')
  549. // if (!this.isUnread(id)) { } else {
  550. // let sourceId = []
  551. // sourceId.push(id)
  552. // this.$http.post('/sale/tender/setRead', sourceId).then(res => {
  553. // this.getUnread()
  554. // })
  555. // }
  556. },
  557. isUnread: function (id) {
  558. for (let i in this.unreadCode) {
  559. if (id === this.unreadCode[i]) {
  560. return true
  561. }
  562. }
  563. },
  564. ChangeList(tp) {
  565. this.activeType = tp
  566. this.filterParams.page = 1
  567. this.setSelect(this.$selectObj.key, this.$selectObj.value, true)
  568. },
  569. onFilter() {
  570. this.filterParams.page = 1
  571. this.setSelect(this.$selectObj.key, this.$selectObj.value, true)
  572. },
  573. onSelectAction(selectObj) {
  574. this.$selectObj = selectObj
  575. this.setSelect(selectObj.key, selectObj.value, true)
  576. },
  577. onValueAction(selectObj) {
  578. this.$selectObj = selectObj
  579. this.setSelect(selectObj.key, selectObj.value, true)
  580. },
  581. ApcheckonSelectAction(selectObj) {
  582. if (this.$monthClick) return
  583. this.ShowApcheckChooseTime = true
  584. this.isShowApcheckList.objTime = selectObj
  585. this.getApcheckDetailsinfo(selectObj.key, selectObj.value)
  586. },
  587. ApcheckonValueAction(selectObj) {
  588. // if (this.$monthClick) return
  589. // this.isShowApcheckList.objTime = selectObj
  590. // this.getApcheckDetailsinfo(selectObj.key, selectObj.value)
  591. },
  592. // B2B未对账
  593. // NotapCheck () {
  594. // console.log('未对账')
  595. // },
  596. // 未对账详情
  597. showApcheckList(item) {
  598. this.isShowApcheckList.show = true
  599. this.isShowApcheckList.enName = item ? item.myEnterprise.enName : this.isShowApcheckList.enName
  600. this.isShowApcheckList.thisMonth = this.outTimeMonth
  601. this.getApcheckDetailsinfo()
  602. },
  603. // 未对账详情获取数据
  604. getApcheckDetailsinfo (...objTime) {
  605. if (!this.isShowApcheckList.show) return
  606. let _params = {
  607. params: {
  608. checkDate: this.isShowApcheckList.thisMonth,
  609. suuorname: this.isShowApcheckList.enName
  610. }
  611. }
  612. // 是否打开自定义时间选项 且
  613. if (this.ShowApcheckChooseTime && !this.$monthClick) {
  614. // let _fromDate = new Date(this.outTimeMonth + '-01 00:00:00').getTime()
  615. // let _d = this.computedTime(this.isShowApcheckList.thisMonth).getTime()
  616. _params = {
  617. params: {
  618. fromDate: objTime[1].fromDate,
  619. endDate: objTime[1].toDate,
  620. suuorname: this.isShowApcheckList.enName
  621. }
  622. }
  623. }
  624. this.$http.get('/sale/apCheck/getAllByKeywords', _params).then(res => {
  625. res.data.details.forEach(item => {
  626. item.check = true
  627. })
  628. this.$monthClick = false
  629. this.isShowApcheckList.list = res.data.details
  630. this.$nextTick(() => {
  631. this._initscroll()
  632. })
  633. })
  634. },
  635. // 对账全选
  636. checkAll() {
  637. let fl = true
  638. if (this.isCheckAll === 0) {
  639. fl = false
  640. }
  641. this.isShowApcheckList.list.forEach(item => {
  642. item.check = fl
  643. })
  644. },
  645. checkItem(item, index) {
  646. if (item.check) {
  647. item.check = false
  648. } else {
  649. this.$set(this.isShowApcheckList.list[index], 'check', true)
  650. }
  651. },
  652. // 对账按钮
  653. goTopayfor() {
  654. let apCheck = {
  655. custUu: '',
  656. custName: '',
  657. enUu: '',
  658. apDate: '',
  659. beginDate: '',
  660. endDate: '',
  661. checkStatus: '未对账',
  662. checkAmount: 0,
  663. currency: '',
  664. rate: '',
  665. items: [],
  666. taxrate: ''
  667. }
  668. // 保存来源单据相关信息
  669. let sourceInfos = []
  670. // 所允许的本次对账最大最小数量
  671. this.isShowApcheckList.list.maxThisCheckQty = 0
  672. this.isShowApcheckList.list.minThisCheckQty = 0
  673. let sameCust = true
  674. let validQty = true
  675. let _list = []
  676. this.isShowApcheckList.list.forEach((check) => {
  677. // 保存应收对账单明细行数据
  678. let item = {
  679. inoutno: '',
  680. inoutnodetno: '',
  681. orderCode: '',
  682. orderClass: '',
  683. orderDetno: '',
  684. price: '',
  685. checkQty: '',
  686. amount: '',
  687. sourceId: '',
  688. sourceTable: '',
  689. oldYCheckQty: '',
  690. status: 0,
  691. receiveCode: '',
  692. receiveName: '',
  693. prodCode: '',
  694. prodTitle: '',
  695. prodUnit: '',
  696. prodSpec: '',
  697. taxrate: '',
  698. sendcode: '',
  699. whname: '',
  700. custUserUU: ''
  701. }
  702. // 应收对账单明细行来源表信息
  703. let sourceInfo = {
  704. sourceId: '',
  705. sourceTable: '',
  706. newYCheckQty: ''
  707. }
  708. // 此次对账后新的已转数
  709. if (check.check === true) {
  710. _list.push(check)
  711. apCheck.custName = check.custname
  712. apCheck.enUu = check.enuu
  713. apCheck.checkAmount += (check.thischeckqty || 0) * (check.orderprice || 0)
  714. apCheck.apDate = check.pidate
  715. apCheck.rate = check.rate
  716. // 必须是同一家客户才能生成对账单,否则提示错误
  717. if (apCheck.custUu === '') {
  718. apCheck.custUu = check.custuu
  719. } else if (apCheck.custUu !== check.custuu) {
  720. sameCust = false
  721. this.setRemindText('请选择同一家客户')
  722. }
  723. // 必须是相同币别才能生成对账单,否则提示错误
  724. if (apCheck.currency === '') {
  725. apCheck.currency = check.currency
  726. } else if (apCheck.currency !== check.currency) {
  727. sameCust = false
  728. this.setRemindText('请选择同一种币别')
  729. }
  730. let re = /^[0-9]+.?[0-9]*$/
  731. // 必须是相同税率才能生成对账单,否则提示错误
  732. if (!re.test(apCheck.taxrate)) {
  733. // if (!angular.isNumber(apCheck.taxrate)) {
  734. apCheck.taxrate = check.taxrate
  735. } else if (apCheck.taxrate !== check.taxrate) {
  736. sameCust = false
  737. this.setRemindText('请选择相同的税率')
  738. }
  739. // 本次对账数量必须小于总对账数量
  740. if (check.qty > 0) {
  741. this.isShowApcheckList.list.maxThisCheckQty = check.qty
  742. this.isShowApcheckList.list.minThisCheckQty = 0
  743. if (check.qty - (check.ycheckqty || 0) < check.thischeckqty || check.thischeckqty < 0 || check.thischeckqty === 0) {
  744. validQty = false
  745. this.setRemindText('本次对账数量,填写有误!')
  746. }
  747. } else if (check.qty < 0) {
  748. this.isShowApcheckList.list.maxThisCheckQty = 0
  749. this.isShowApcheckList.list.minThisCheckQty = check.qty
  750. if (((-check.qty) - (-check.ycheckqty) < (-check.thischeckqty)) || check.thischeckqty > 0 || check.thischeckqty === 0) {
  751. validQty = false
  752. this.setRemindText('本次对账数量,填写有误!')
  753. }
  754. }
  755. if (this.ShowApcheckChooseTime) {
  756. let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
  757. let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
  758. // 获取筛选时间的开始时间为对账的开始时间
  759. apCheck.beginDate = _start.getTime()
  760. // 获取筛选的截止时间为对账的截止时间
  761. apCheck.endDate = _end.getTime()
  762. } else {
  763. this.isShowApcheckList.startTime = this.isShowApcheckList.thisMonth + '-01'
  764. let _d = new Date(this.isShowApcheckList.startTime)
  765. _d.setDate(1)
  766. _d.setMonth(_d.getMonth() + 1)
  767. _d.setDate(_d.getDate() - 1)
  768. // 获取筛选时间的开始时间为对账的开始时间
  769. apCheck.beginDate = new Date(this.isShowApcheckList.startTime).getTime()
  770. // 获取筛选的截止时间为对账的截止时间
  771. apCheck.endDate = _d.getTime()
  772. }
  773. // 应收对账单明细行数据
  774. item.orderCode = check.ordercode
  775. item.orderClass = check.piclass
  776. item.orderDetno = check.orderdetno
  777. item.price = check.orderprice
  778. item.checkQty = check.thischeckqty
  779. item.amount = (check.thischeckqty || 0) * (check.orderprice || 0)
  780. item.sourceId = check.sourceid
  781. item.sourceTable = check.sourcetable
  782. item.oldYCheckQty = check.ycheckqty
  783. item.prodCode = check.prodcode
  784. item.prodTitle = check.prodtitle
  785. item.prodSpec = check.prodspec
  786. item.prodUnit = check.produnit
  787. item.inoutno = check.inoutno
  788. item.inoutnodetno = check.detno
  789. item.taxrate = check.taxrate
  790. item.receiveCode = check.receivecode
  791. item.receiveName = check.receivename
  792. item.sendcode = check.sendcode
  793. item.whname = check.whname
  794. item.custUserUU = check.custuseruu
  795. // 来源表相关信息
  796. sourceInfo.sourceid = check.sourceid
  797. sourceInfo.sourcetable = check.sourcetable
  798. sourceInfo.newYCheckQty = ((check.ycheckqty || 0) + check.thischeckqty)
  799. sourceInfos.push(sourceInfo)
  800. apCheck.items.push(item)
  801. // haveSelected = true
  802. // 如果是同一家客户,生成对账单的同时,关闭模态框
  803. }
  804. })
  805. if (sameCust && validQty) {
  806. this.saveApCheck(apCheck, _list)
  807. }
  808. },
  809. // 对账提交
  810. saveApCheck(apCheck, _list) {
  811. if (apCheck.items.length === 0) {
  812. this.setRemindText('请先选择需要对账的数据')
  813. } else {
  814. this.$http.post('/sale/apCheck/operation/save', apCheck).then(res => {
  815. this.isShowApcheckList.list = _list
  816. this.setRemindText('生成应收对账成功')
  817. this.isShowApcheckList.id = res.data.id
  818. this.isShowApcheckList.showApcheck = true
  819. if (this.ShowApcheckChooseTime) {
  820. let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
  821. let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
  822. this.isShowApcheckList.startTime = _start.getFullYear() + '-' + (_start.getMonth() + 1) + '-' + _start.getDate()
  823. this.isShowApcheckList.endTime = _end.getFullYear() + '-' + (_end.getMonth() + 1) + '-' + _end.getDate()
  824. } else {
  825. this.isShowApcheckList.startTime = this.isShowApcheckList.thisMonth + '-01'
  826. let _d = this.computedTime(this.isShowApcheckList.startTime)
  827. this.isShowApcheckList.endTime = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate()
  828. }
  829. this.ShowApcheckChooseTime = false
  830. }, err => {
  831. this.setRemindText(err.response.data || err)
  832. })
  833. }
  834. },
  835. // 提交对账单
  836. submitCheck() {
  837. this.$http.post('/sale/apCheck/operation/updateStatus?id=' + this.isShowApcheckList.id).then(res => {
  838. this.setRemindText('新增成功')
  839. this.isShowApcheckList.showApcheck = false
  840. this.isShowApcheckList.show = false
  841. this.isShowApcheckList.id = ''
  842. })
  843. },
  844. // 删除对账单
  845. deleteCheck() {
  846. // if (this.isShowApcheckList.id === '') {
  847. this.isShowApcheckList.showApcheck = false
  848. this.isShowApcheckList.show = false
  849. this.isShowApcheckList.id = ''
  850. // return
  851. // }
  852. // this.$http.post('/sale/apCheck/operation/deleteApCheck?id=' + this.isShowApcheckList.id, {}).then(res => {
  853. // this.isShowApcheckList.showApcheck = false
  854. // this.isShowApcheckList.show = false
  855. // this.isShowApcheckList.id = ''
  856. //
  857. // let sourceInfos = []
  858. // this.isShowApcheckList.list.forEach(item => {
  859. // let sourceInfo = {
  860. // sourceId: '',
  861. // sourceTable: '',
  862. // newYCheckQty: ''
  863. // }
  864. // sourceInfo.sourceId = item.sourceid
  865. // sourceInfo.sourceTable = item.sourcetable
  866. // sourceInfo.newYCheckQty = item.oldYCheckQty
  867. // sourceInfos.push(sourceInfo)
  868. // })
  869. // this.$http.post('/sale/apCheck/update', sourceInfos).then(res => {})
  870. // }, err => {
  871. // this.setRemindText(err.response.data)
  872. // })
  873. },
  874. // 月份+1
  875. addMonth(tp, key, val) {
  876. if (tp === 'inside') {
  877. let _sp = new Date()
  878. this.ShowApcheckChooseTime = false
  879. this.$monthClick = true
  880. let _d = this.computedTime(this.isShowApcheckList.thisMonth, val)
  881. let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
  882. this.isShowApcheckList.thisMonth = _d.getFullYear() + '-' + _m
  883. if (_d.getTime() >= _sp.getTime()) {
  884. this.MouthinShow = false
  885. } else {
  886. this.MouthinShow = true
  887. }
  888. this.$refs.baseFilter[0].setSelect(1)
  889. this.isShowApcheckList.show = true
  890. this.getApcheckDetailsinfo()
  891. } else {
  892. let _sp = new Date()
  893. let _d = this.computedTime(this[key], val)
  894. let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
  895. this[key] = _d.getFullYear() + '-' + _m
  896. if (_d.getTime() >= _sp.getTime()) {
  897. this.MouthOutShow = false
  898. } else {
  899. this.MouthOutShow = true
  900. }
  901. this.filterParams.page = 1
  902. this.setSelect('', '', true)
  903. }
  904. },
  905. computedTime(num, val) {
  906. let _d = new Date(num)
  907. if (val !== undefined) {
  908. _d.setMonth(_d.getMonth() + val)
  909. }
  910. _d.setDate(1)
  911. _d.setMonth(_d.getMonth() + 1)
  912. _d.setDate(_d.getDate() - 1)
  913. return _d
  914. },
  915. async setSelect(...val) {
  916. let _url = '/sale/apCheck/info/search'
  917. let itemL = {}
  918. if (this.activeType === 'all') {
  919. let _fromDate = this.outTimeMonth + '-01 00:00:00'
  920. // let _d = new Date(_fromDate)
  921. let _d = this.computedTime(_fromDate)
  922. // _d.setDate(1)
  923. // _d.setMonth(_d.getMonth() + 1)
  924. // _d.setDate(_d.getDate() - 1)
  925. let _endDate = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate() + ' 00:00:00'
  926. _endDate = new Date(_endDate).getTime()
  927. _fromDate = new Date(_fromDate).getTime()
  928. _url = '/sale/apCheck/customer'
  929. itemL = {
  930. params: {
  931. count: 20,
  932. page: this.filterParams.page,
  933. keyword: this.filterParams.keyword,
  934. searchFilter: {'fromDate': _fromDate, 'endDate': _endDate},
  935. sorting: { 'recordDate': 'desc' }
  936. }
  937. }
  938. } else {
  939. itemL = {
  940. params: {
  941. count: this.filterParams.count,
  942. page: this.filterParams.page,
  943. searchFilter: {'keyword': this.filterParams.keyword || '', 'fromDate': val[1].fromDate, 'endDate': val[1].toDate},
  944. sorting: {'recordDate': 'desc'},
  945. _state: this.activeType
  946. }
  947. }
  948. }
  949. let { data } = await this.$http.get(_url, itemL)
  950. if (!this.resourceList.content) {
  951. this.resourceList.content = []
  952. }
  953. data.content = data.content || []
  954. if (this.activeType !== 'all') {
  955. data.content.forEach(item => {
  956. item.checkAmount = item.checkAmount.toFixed(2)
  957. item.getTotalProd = 0
  958. item.items.forEach(im => {
  959. item.getTotalProd += im.checkQty
  960. })
  961. })
  962. } else {
  963. data.content.forEach((item) => {
  964. let _mouthArr = []
  965. let _totalArr = []
  966. item.thisMonthCount && item.thisMonthCount.forEach(count => {
  967. if (count.amount > 0) {
  968. _mouthArr.push(count)
  969. }
  970. })
  971. item.totalCount && item.totalCount.forEach(count => {
  972. if (count.amount > 0) {
  973. _totalArr.push(count)
  974. }
  975. })
  976. item.totalCount = _totalArr
  977. item.thisMonthCount = _mouthArr
  978. })
  979. console.log(data.content)
  980. }
  981. if (!val[2]) {
  982. this.resourceList.content.push(...data.content)
  983. data.content = this.resourceList.content
  984. } else {
  985. this.resourceList.content = []
  986. }
  987. this.resourceList = data
  988. },
  989. // 选择月份
  990. ShowMonthChoose(tp, key) {
  991. this.$monthType = tp
  992. if (tp === 'inside') {
  993. this.ShowApcheckChooseTime = false
  994. this.$monthClick = true
  995. this.$refs.baseFilter[0].setSelect(1)
  996. let _m = this.isShowApcheckList.thisMonth.split('-')[1].length < 2 ? '0' + this.isShowApcheckList.thisMonth.split('-')[1] : this.isShowApcheckList.thisMonth.split('-')[1]
  997. this.$picker.setSlotValue(0, this.isShowApcheckList.thisMonth.split('-')[0] + '年')
  998. this.$picker.setSlotValue(1, _m + '月')
  999. } else {
  1000. let _m = this[key].split('-')[1].length < 2 ? '0' + this[key].split('-')[1] : this[key].split('-')[1]
  1001. this.$picker.setSlotValue(0, this[key].split('-')[0] + '年')
  1002. this.$picker.setSlotValue(1, _m + '月')
  1003. }
  1004. this.isShowMonthChoose = true
  1005. }
  1006. },
  1007. computed: {
  1008. allPage () {
  1009. return Math.ceil(this.resourceList.totalElement / 10)
  1010. },
  1011. isEmpty () {
  1012. return this.resourceList.content.length === 0
  1013. },
  1014. allMoney() {
  1015. let sum = 0
  1016. this.isShowApcheckList.list.forEach(obj => {
  1017. if (obj.check) {
  1018. sum += obj.qty * (obj.orderprice || 0)
  1019. }
  1020. })
  1021. return sum
  1022. },
  1023. isCheckAll() {
  1024. if (this.isShowApcheckList.list.length === 0) {
  1025. return true
  1026. }
  1027. return this.isShowApcheckList.list.filter(item => {
  1028. return item.check === false
  1029. }).length
  1030. }
  1031. },
  1032. components: {
  1033. ModalWrapper,
  1034. BaseFilter,
  1035. PullUp,
  1036. EmptyStatus,
  1037. Picker,
  1038. RemindBox
  1039. },
  1040. filters: {
  1041. time: function (time) {
  1042. if (typeof time === 'number') {
  1043. if (!time) {
  1044. return '无'
  1045. } else {
  1046. let d = new Date(time)
  1047. let year = d.getFullYear()
  1048. let month = d.getMonth() + 1
  1049. let day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
  1050. return year + '-' + month + '-' + day
  1051. }
  1052. }
  1053. },
  1054. computeNum: function(price, num) {
  1055. return Math.floor(price * 100) / 100
  1056. // price.toString().toFixed(num)
  1057. }
  1058. }
  1059. }
  1060. </script>
  1061. <style lang="scss" scoped>
  1062. @mixin overFlowHidden {
  1063. overflow: hidden;
  1064. text-overflow: ellipsis;
  1065. white-space: nowrap;
  1066. }
  1067. .fixedPicker {
  1068. position: fixed;
  1069. bottom: 0;
  1070. left: 0;
  1071. width: 100%;
  1072. height: 100%;
  1073. z-index: 9999;
  1074. background: rgba(0,0,0,0.5);
  1075. .picker {
  1076. width: 100%;
  1077. left: 0;
  1078. bottom: 0;
  1079. position: absolute;
  1080. background: #fff;
  1081. }
  1082. .titls {
  1083. text-align: center;
  1084. font-size: 0.24rem;
  1085. line-height: 0.5rem
  1086. }
  1087. .leftBtn {
  1088. color: #666;
  1089. font-size: 0.24rem;
  1090. position: absolute;
  1091. left: 0.2rem;
  1092. top: 0.1rem
  1093. }
  1094. .rightBtn {
  1095. top: 0.1rem;
  1096. color: #3e82f5;
  1097. font-size: 0.24rem;
  1098. position: absolute;
  1099. right: 0.2rem;
  1100. }
  1101. }
  1102. .mobile-header{
  1103. position: fixed;
  1104. top: 0;
  1105. z-index: 100;
  1106. width:100%;
  1107. height: 1.26rem;
  1108. line-height: 1.26rem;
  1109. /*border-bottom:.01rem solid #ccc;*/
  1110. background: #3e82f5;
  1111. padding:0 .2rem 0 .1rem;
  1112. color:#fff;
  1113. }
  1114. .mobile-header p{
  1115. overflow: hidden;
  1116. text-overflow: ellipsis;
  1117. white-space: nowrap;
  1118. font-size:.36rem;
  1119. text-align: center;
  1120. width: 6rem;
  1121. padding-left: 1rem;
  1122. }
  1123. .mobile-center-header p.en-name {
  1124. font-size: .3rem;
  1125. }
  1126. .mobile-header a{
  1127. font-size:.28rem;
  1128. color:#fff;
  1129. position: absolute;
  1130. }
  1131. .mobile-header a i{
  1132. font-size: .48rem;
  1133. margin-right: -.1rem;
  1134. }
  1135. .mobile-header p span {
  1136. position: absolute;
  1137. right: .4rem;
  1138. font-size: .28rem;
  1139. }
  1140. .mobile-header p span i {
  1141. font-size: .28rem;
  1142. }
  1143. .btobapCheck-wrapper {
  1144. background: #f1f3f6;
  1145. margin: 1.26rem 0 0.98rem 0;
  1146. .search-content {
  1147. padding: .24rem 0;
  1148. text-align: center;
  1149. background: #f1f3f6;
  1150. input {
  1151. width: 6.48rem;
  1152. height: .58rem;
  1153. line-height: .58rem;
  1154. border-radius: .14rem;
  1155. margin: 0 0 0 .11rem;
  1156. font-size: .26rem;
  1157. padding: 0 .71rem 0 .21rem;
  1158. border: 1px solid #3f84f6;
  1159. }
  1160. }
  1161. .order-tab {
  1162. background: #3f84f6;
  1163. padding-bottom: 0.2rem;
  1164. .order-tab-wrapper {
  1165. border: solid 1px #ffffff;
  1166. width: 7.06rem;
  1167. margin: 0 auto;
  1168. border-radius: 0.04rem;
  1169. line-height: 0.72rem;
  1170. height: 0.72rem;
  1171. overflow: hidden;
  1172. div {
  1173. color: #ffffff;
  1174. font-size: 0.28rem;
  1175. text-align: center;
  1176. width: 50%;
  1177. &.active {
  1178. background-color: #ffffff;
  1179. color: #3f84f6;
  1180. }
  1181. }
  1182. }
  1183. }
  1184. .order-nav {
  1185. background: #fff;
  1186. div {
  1187. height: 0.82rem;
  1188. line-height: 0.82rem;
  1189. display: inline-block;
  1190. width: 33.3%;
  1191. text-align: center;
  1192. font-size: .28rem;
  1193. color: #666;
  1194. &.active span{
  1195. color: #3f84f6;
  1196. border-bottom: 0.04rem solid #3f84f6;
  1197. padding-bottom: 0.2rem;
  1198. }
  1199. }
  1200. }
  1201. .btobapCheck-wrapper-scroll {
  1202. height: calc(100vh - 1.26rem - 0.98rem - 0.82rem - 1.06rem - 0.92rem);
  1203. overflow-y: auto;
  1204. &.btobapCheck-wrapper-scroll2 {
  1205. height: calc(100vh - 1.26rem - 0.98rem - 0.82rem - 1.06rem - 0.92rem - 1.3rem);
  1206. }
  1207. }
  1208. .filter-wrapper{
  1209. width: 7.1rem;
  1210. margin: 0 auto 0.27rem;
  1211. background: #fff;
  1212. padding: 0.27rem 0.2rem;
  1213. border-radius: 0.05rem;
  1214. }
  1215. .invoice-btob-list {
  1216. width: 7.1rem;
  1217. margin: 0 auto 0.2rem;
  1218. background: #FFFFFF;
  1219. border-radius: 0.05rem;
  1220. padding: 0 0.24rem;
  1221. }
  1222. .invoice-btob-wrapper-top {
  1223. height: 0.8rem;
  1224. span{
  1225. margin-top: 0.24rem;
  1226. display: inline-block;
  1227. font-size: 0.28rem;
  1228. color: #333333;
  1229. height:0.25rem;
  1230. &.read {
  1231. color: #15B262;
  1232. }
  1233. &.noread {
  1234. color: #DE4545;
  1235. }
  1236. &.isPut {
  1237. background: #15B262;
  1238. color: #FFFFFF;
  1239. font-size: 0.24rem;
  1240. border-radius: 0.04rem;
  1241. }
  1242. &.noPut {
  1243. font-size: 0.24rem;
  1244. background: #DE4545;
  1245. color: #FFFFFF;
  1246. border-radius: 0.04rem;
  1247. }
  1248. }
  1249. }
  1250. .invoice-btob-wrapper-middle {
  1251. border-top: 1px solid #D9D9D9;
  1252. @include overFlowHidden();
  1253. padding-top: 0.15rem;
  1254. font-size: 0.28rem;
  1255. color: #151515;
  1256. line-height: 0.5rem;
  1257. padding-bottom: 0.15rem;
  1258. span {
  1259. color: #666666;
  1260. }
  1261. .invoice-btob-wrapper-middle .tilte{
  1262. color: #333333;
  1263. }
  1264. .middle_btn {
  1265. text-align: center;
  1266. font-size: 0.26rem;
  1267. color: #333333;
  1268. }
  1269. }
  1270. .invoice-btob-wrapper-content {
  1271. border-top: 1px solid #D9D9D9;
  1272. @include overFlowHidden();
  1273. padding-top: 0.15rem;
  1274. font-size: 0.28rem;
  1275. color: #151515;
  1276. line-height: 0.5rem;
  1277. padding-bottom: 0.15rem;
  1278. span {
  1279. color: #666666;
  1280. }
  1281. }
  1282. }
  1283. .btobapCheck-modal {
  1284. .search-content input {border: 1px solid #3f84f6;}
  1285. .date-wrap{
  1286. text-align: center;
  1287. display: inline-block;
  1288. label {
  1289. width: 2.3rem;
  1290. height: .5rem;
  1291. line-height: .5rem;
  1292. border-radius: .04rem;
  1293. border: 1px solid #bfbfbf;
  1294. background: url(/images/mobile/select-arrow.png) no-repeat;
  1295. background-size: .12rem .06rem;
  1296. vertical-align: middle;
  1297. background-color: #fff;
  1298. background-position: 2.1rem .2rem;
  1299. position: relative;
  1300. margin: .2rem 0 0 0;
  1301. i {
  1302. font-size: .28rem;
  1303. color: #3f84f6;
  1304. margin-left: .1rem;
  1305. float: left;
  1306. }
  1307. input {
  1308. opacity: 0;
  1309. width: 2.22rem;
  1310. height: .5rem;
  1311. position: absolute;
  1312. left: 0;
  1313. z-index: 1;
  1314. }
  1315. p {
  1316. font-weight: normal;
  1317. font-size: .22rem;
  1318. color: #3E81F6;
  1319. text-align: left;
  1320. text-indent: 10px;
  1321. }
  1322. }
  1323. span {
  1324. color: #a0a0a0;
  1325. margin: 0.3rem .05rem 0;
  1326. width: .3rem;
  1327. display: inline-block;
  1328. text-align: center;
  1329. vertical-align: top;
  1330. }
  1331. }
  1332. .choosescreen {
  1333. padding: 0 0.15rem;
  1334. font-size: 0.28rem;
  1335. color: #418DF6;
  1336. line-height: 0.52rem;
  1337. i {
  1338. font-size: 0.28rem;
  1339. }
  1340. }
  1341. .choosescreen-list {
  1342. margin: 0 0.15rem;
  1343. padding-bottom: 0.28rem;;
  1344. border-bottom: 1px solid #D9D9D9;
  1345. div {
  1346. line-height: 0.76rem;
  1347. span {
  1348. font-size: 0.28rem;
  1349. color: #666666;
  1350. display: inline-block;
  1351. width: 1.68rem;
  1352. }
  1353. input {
  1354. height: 0.5rem;
  1355. line-height: 0.5rem;
  1356. width: 4.44rem;
  1357. margin-left: 0.18rem;
  1358. font-size: 0.28rem;
  1359. color: #333;
  1360. border: 1px solid #AEAEAE;
  1361. text-indent: 0.12rem;
  1362. }
  1363. }
  1364. }
  1365. .choosescreen-result {
  1366. .choosescreen-result-list {
  1367. /*padding: 0 0.15rem 0rem;*/
  1368. background: #fff;
  1369. margin:0 0 0.2rem;
  1370. }
  1371. .choosescreen-result-list-content {
  1372. /*display: inline-block;*/
  1373. vertical-align: middle;
  1374. margin: 0 0.15rem;
  1375. div.OverHidden {
  1376. @include overFlowHidden();
  1377. width: 5.5rem;
  1378. }
  1379. padding-top: 0.15rem;
  1380. font-size: 0.28rem;
  1381. color: #151515;
  1382. line-height: 0.5rem;
  1383. padding-bottom: 0.15rem;
  1384. span {
  1385. color: #666666;
  1386. }
  1387. }
  1388. }
  1389. }
  1390. .timeLine-wrapper {
  1391. background: #fff;
  1392. border-radius: 0.05rem;
  1393. height: 1.1rem;
  1394. width: 7.1rem;
  1395. margin: 0 auto 0.2rem;
  1396. padding: 0.3rem 0 0 2rem;
  1397. position: relative;
  1398. .left {
  1399. background: #fff;
  1400. color: #333;
  1401. padding: 0rem 0.1rem;
  1402. /*box-shadow: 0 0 2px #a0a0a0;*/
  1403. text-align: center;
  1404. margin-right: 0.2rem;
  1405. height: 0.5rem;
  1406. line-height: 0.5rem;
  1407. border: 1px solid #BFBFBF;
  1408. }
  1409. .right {
  1410. text-align: center;
  1411. background: #fff;
  1412. color: #333;
  1413. padding: 0rem 0.1rem;
  1414. /*box-shadow: 0 0 2px #a0a0a0;*/
  1415. margin-left: 0.2rem;
  1416. height: 0.5rem;
  1417. line-height: 0.5rem;
  1418. border: 1px solid #BFBFBF;
  1419. }
  1420. .rightBtn {
  1421. margin: 0.1rem 0.2rem 0 0;
  1422. }
  1423. }
  1424. .modal-h {
  1425. background: #F3F3F3;
  1426. .modal-h-top {
  1427. padding: 0.15rem;
  1428. }
  1429. .overflowhidden {
  1430. @include overFlowHidden();
  1431. width: 5.9rem;
  1432. font-size: 0.28rem;
  1433. color: #333333;
  1434. margin-left: 0.1rem;
  1435. }
  1436. .timeLine-wrapper {
  1437. width: 100%;
  1438. padding: 0.1rem 0 0.1rem 0rem;
  1439. height: 1.4rem;
  1440. margin: 0
  1441. }
  1442. }
  1443. div.timeLine {
  1444. background: #FFFFFF;
  1445. border: 1px solid #BFBFBF;
  1446. border-radius: 4px;
  1447. font-size: 0.28rem;
  1448. color: #3E81F6;
  1449. width: 1.7rem;
  1450. display: inline-block;
  1451. height: 0.5rem;
  1452. line-height: 0.5rem
  1453. }
  1454. .footerBtn {
  1455. padding: 0 0 0 0.15rem;
  1456. height: 1rem;
  1457. line-height: 1rem;
  1458. background: #fff;
  1459. font-size: 0.26rem;
  1460. color: #666666;
  1461. border-top: 1px solid #D3D3D3;
  1462. .bbgoresult {
  1463. background: #008BF7;
  1464. color: #fff;
  1465. width: 1.3rem;
  1466. text-align: center;
  1467. }
  1468. .cancel {
  1469. background: #fff;
  1470. color: #333;
  1471. height: 0.98rem;
  1472. }
  1473. }
  1474. </style>