btobapCheck.vue 54 KB

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