btobapCheck.vue 52 KB

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