btobapCheck.vue 53 KB

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