btobarCheck.vue 53 KB

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