btobarCheck.vue 53 KB

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