btobapCheck.vue 52 KB

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