btobapCheck.vue 53 KB

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