ticketHand.wxml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <!--pages/ticketHand/ticketHand.wxml-->
  2. <view class="divide" />
  3. <!-- 发票对象 -->
  4. <ticket-type bindselect="selectObj" />
  5. <!-- 发票种类 -->
  6. <ticket-cate bindselect="selectCate" />
  7. <!-- 征税方式 -->
  8. <ticket-zs bindselect="selectZs" />
  9. <!-- 购方信息 -->
  10. <view class="formArea noMargin">
  11. <view class="lineGroup">
  12. <view class="lineInner">
  13. <view class="label middle">
  14. <text class="star">*</text>
  15. 发票抬头
  16. </view>
  17. <view class="content">
  18. <input
  19. bindinput="getcustomerName"
  20. value="{{buyer.customerName}}"
  21. maxlength="80"
  22. class="input"
  23. placeholder="请输入购方名称"
  24. placeholder-class="placeholderStyle"
  25. />
  26. </view>
  27. <button bindtap="toSearch" class="searchBtn">查询</button>
  28. </view>
  29. </view>
  30. <view class="lineGroup">
  31. <view class="lineInner">
  32. <view class="label middle">
  33. <text wx:if="{{customerType===2}}" class="star">*</text>
  34. 税号
  35. </view>
  36. <view class="content">
  37. <input
  38. bindinput="getentTaxId"
  39. value="{{buyer.entTaxId}}"
  40. maxlength="20"
  41. class="input"
  42. placeholder="请输入税号"
  43. placeholder-class="placeholderStyle"
  44. />
  45. </view>
  46. </view>
  47. </view>
  48. <picker
  49. bindchange="setPayees"
  50. value="{{payeesIndex}}"
  51. range="{{payees}}"
  52. class="lineGroup"
  53. >
  54. <view class="lineInner">
  55. <view class="label middle">
  56. <text class="star">*</text>
  57. 收款人
  58. </view>
  59. <view class="content">
  60. <view class="diyInput nopadding left">
  61. <text wx:if="{{payeesIndex!==''}}">{{payees[payeesIndex]}}</text>
  62. <text wx:else class="placeholderStyle">请选择收款人</text>
  63. </view>
  64. </view>
  65. </view>
  66. </picker>
  67. <view wx:if="{{payeesIndex===0}}" class="lineGroup">
  68. <view class="lineInner">
  69. <view class="label middle" />
  70. <view class="content">
  71. <input
  72. bindinput="getPayees"
  73. value="{{payeesText}}"
  74. class="input"
  75. maxlength="8"
  76. placeholder="请输入收款人"
  77. placeholder-class="placeholderStyle"
  78. />
  79. </view>
  80. </view>
  81. </view>
  82. <picker
  83. bindchange="setReviewers"
  84. value="{{reviewersIndex}}"
  85. range="{{reviewers}}"
  86. class="lineGroup"
  87. >
  88. <view class="lineInner">
  89. <view class="label middle">
  90. <text class="star">*</text>
  91. 复核人
  92. </view>
  93. <view class="content">
  94. <view class="diyInput nopadding left">
  95. <text wx:if="{{reviewersIndex!==''}}">{{reviewers[reviewersIndex]}}</text>
  96. <text wx:else class="placeholderStyle">请选择复核人</text>
  97. </view>
  98. </view>
  99. </view>
  100. </picker>
  101. <view wx:if="{{reviewersIndex===0}}" class="lineGroup">
  102. <view class="lineInner">
  103. <view class="label middle" />
  104. <view class="content">
  105. <input
  106. bindinput="getReviewers"
  107. value="{{reviewersText}}"
  108. class="input"
  109. maxlength="8"
  110. placeholder="请输入复核人"
  111. placeholder-class="placeholderStyle"
  112. />
  113. </view>
  114. </view>
  115. </view>
  116. <picker
  117. bindchange="setDrawers"
  118. value="{{drawersIndex}}"
  119. range="{{drawers}}"
  120. class="lineGroup"
  121. >
  122. <view class="lineInner">
  123. <view class="label middle">
  124. <text class="star">*</text>
  125. 开票人
  126. </view>
  127. <view class="content">
  128. <view class="diyInput nopadding left">
  129. <text wx:if="{{drawersIndex!==''}}">{{drawers[drawersIndex]}}</text>
  130. <text wx:else class="placeholderStyle">请选择开票人</text>
  131. </view>
  132. </view>
  133. </view>
  134. </picker>
  135. <view wx:if="{{drawersIndex===0}}" class="lineGroup">
  136. <view class="lineInner">
  137. <view class="label middle" />
  138. <view class="content">
  139. <input
  140. bindinput="getDrawers"
  141. value="{{drawersText}}"
  142. class="input"
  143. maxlength="8"
  144. placeholder="请输入开票人"
  145. placeholder-class="placeholderStyle"
  146. />
  147. </view>
  148. </view>
  149. </view>
  150. <block wx:if="{{spreadFlag}}">
  151. <view class="lineGroup">
  152. <view class="lineInner">
  153. <view class="label middle">电话</view>
  154. <view class="content">
  155. <input
  156. bindinput="getMobile"
  157. value="{{buyer.contactPhone}}"
  158. class="input"
  159. maxlength="20"
  160. placeholder="请输入电话号码"
  161. placeholder-class="placeholderStyle"
  162. />
  163. </view>
  164. </view>
  165. </view>
  166. <view class="lineGroup">
  167. <view class="lineInner">
  168. <view class="label middle">地址</view>
  169. <view class="content">
  170. <input
  171. bindinput="getAddress"
  172. value="{{buyer.address}}"
  173. class="input"
  174. maxlength="80"
  175. placeholder="请输入地址"
  176. placeholder-class="placeholderStyle"
  177. />
  178. </view>
  179. </view>
  180. </view>
  181. <view class="lineGroup">
  182. <view class="lineInner">
  183. <view class="label middle">开户银行</view>
  184. <view class="content">
  185. <input
  186. bindinput="getBankName"
  187. value="{{bankName}}"
  188. class="input"
  189. maxlength="75"
  190. placeholder="请输入开户银行"
  191. placeholder-class="placeholderStyle"
  192. />
  193. </view>
  194. </view>
  195. </view>
  196. <view class="lineGroup">
  197. <view class="lineInner">
  198. <view class="label middle">银行账号</view>
  199. <view class="content">
  200. <input
  201. bindinput="getBankAccount"
  202. value="{{buyer.bankAccount}}"
  203. class="input"
  204. maxlength="25"
  205. placeholder="请输入银行账号"
  206. placeholder-class="placeholderStyle"
  207. />
  208. </view>
  209. </view>
  210. </view>
  211. <view class="lineGroup">
  212. <view class="lineInner">
  213. <view class="label middle">备注说明</view>
  214. <view class="content">
  215. <view class="textareaWrap">
  216. <textarea
  217. bindinput="getremark"
  218. value="{{remark}}"
  219. class="textarea"
  220. maxlength="200"
  221. placeholder="请输入备注说明"
  222. placeholder-class="placeholderStyle"
  223. />
  224. </view>
  225. </view>
  226. </view>
  227. </view>
  228. </block>
  229. <view class="lineSpread">
  230. <button bindtap="spreadBuyer" class="btn">{{spreadFlag?'收起更多填写项':'展开更多填写项'}}</button>
  231. </view>
  232. </view>
  233. <!-- 项目明细 -->
  234. <view class="formTitle">
  235. <text class="label">发票内容</text>
  236. </view>
  237. <view wx:for="{{proList}}" wx:key="productId" class="formArea">
  238. <view bindtap="toSearchPro" data-index="{{index}}" class="lineGroup">
  239. <view class="lineInner">
  240. <view class="label">货物或应税劳务名称</view>
  241. <view class="content">
  242. <view class="diyInput hasArrow">
  243. <view wx:if="{{item.productName}}">{{item.productName}}</view>
  244. <view wx:if="{{!item.productName}}" class="placeholderStyle">请选择</view>
  245. <i class="arrow iconfont icon-arrowr" />
  246. </view>
  247. </view>
  248. </view>
  249. </view>
  250. <view class="lineGroup">
  251. <view class="lineInner">
  252. <view class="label">单价(含税)</view>
  253. <view class="content ticket {{item.price?'hasUnit':''}}">
  254. <input
  255. bindblur="getPrice"
  256. data-index="{{index}}"
  257. value="{{item.price}}"
  258. class="input right"
  259. type="digit"
  260. placeholder="请输入单价"
  261. placeholder-class="placeholderStyle"
  262. />
  263. <view class="unit">元</view>
  264. <!-- <view wx:if="{{!item.price}}" class="diyInput">
  265. <view class="placeholderStyle">根据货物选择自动带入并可修改</view>
  266. </view> -->
  267. </view>
  268. </view>
  269. </view>
  270. <view class="lineGroup">
  271. <view class="lineInner">
  272. <view class="label">数量</view>
  273. <view class="content">
  274. <view class="cart">
  275. <cart
  276. bindadd="add"
  277. bindminus="minus"
  278. num="{{item.quantity}}"
  279. bindsetInput="inputNum"
  280. data-index="{{index}}"
  281. />
  282. </view>
  283. </view>
  284. </view>
  285. </view>
  286. <view class="lineGroup">
  287. <view class="lineInner">
  288. <view class="label">金额合计(含税)</view>
  289. <view class="content ticket hasUnit">
  290. <input
  291. bindblur="getTotalMoney"
  292. data-index="{{index}}"
  293. value="{{item.totalMoney}}"
  294. class="input right"
  295. type="digit"
  296. placeholder="请输入金额合计(含税)"
  297. placeholder-class="placeholderStyle"
  298. />
  299. <view class="unit">元</view>
  300. <!-- <view class="diyInput">
  301. <view wx:if="{{item.totalMoney}}">{{item.totalMoney}} 元</view>
  302. <view wx:if="{{!item.totalMoney}}" class="placeholderStyle">根据货物选择自动计算</view>
  303. </view> -->
  304. </view>
  305. </view>
  306. </view>
  307. <block wx:if="{{item.spreadFlag}}">
  308. <view class="lineGroup">
  309. <view class="lineInner">
  310. <view class="label">税率</view>
  311. <view class="content">
  312. <view class="diyInput">
  313. <picker
  314. wx:if="{{item.taxRate}}"
  315. bindchange="setRate"
  316. disabled="{{(!!item.preferentialType||item.zeroRateFlag!==null)?true:false}}"
  317. data-index="{{index}}"
  318. value="{{item.taxRateArrIndex}}"
  319. range="{{item.taxRateArr}}"
  320. class="selectRate"
  321. >
  322. <view class="lineInner">
  323. <view class="label" />
  324. </view>
  325. </picker>
  326. <view wx:if="{{item.taxRate}}">{{item.taxRate?item.taxRate*100+'%':0+'%'}}</view>
  327. <view wx:if="{{!item.taxRate}}" class="placeholderStyle">根据货物选择自动带入可修改</view>
  328. </view>
  329. </view>
  330. </view>
  331. </view>
  332. <view class="lineGroup gray">
  333. <view class="lineInner">
  334. <view class="label">税额</view>
  335. <view class="content">
  336. <view class="diyInput">
  337. <view wx:if="{{item.totalRate}}">{{item.totalRate}} 元</view>
  338. <view wx:if="{{!item.totalRate}}" class="placeholderStyle">根据货物选择自动计算</view>
  339. </view>
  340. </view>
  341. </view>
  342. </view>
  343. </block>
  344. <view class="lineSpread">
  345. <button bindtap="spread" data-index="{{index}}" class="btn">{{item.spreadFlag?'点击收起':'点击展开'}}</button>
  346. <button
  347. wx:if="{{index>0}}"
  348. bindtap="delete"
  349. data-index="{{index}}"
  350. class="btn"
  351. >删除
  352. </button>
  353. </view>
  354. </view>
  355. <view bindtap="addTicket" class="formArea">
  356. <view class="lineGroup">
  357. <view class="lineInner">
  358. <view class="label center">
  359. <i class="iconfont icon-add1" />
  360. <text>添加商品</text>
  361. </view>
  362. </view>
  363. </view>
  364. </view>
  365. <view class="formArea noMargin">
  366. <view class="lineGroup">
  367. <view class="lineInner">
  368. <view class="label">发票总金额</view>
  369. <view class="content">
  370. <view class="diyInput">{{moneyTotal?'¥'+moneyTotal:0}}</view>
  371. </view>
  372. </view>
  373. </view>
  374. <view class="lineGroup">
  375. <view class="lineInner">
  376. <view class="label">发票总税额</view>
  377. <view class="content">
  378. <view class="diyInput">{{rateTotal?'¥'+rateTotal:0}}</view>
  379. </view>
  380. </view>
  381. </view>
  382. </view>
  383. <!-- 接收方式 -->
  384. <view class="formTitle">
  385. <text class="label">接收方式</text>
  386. </view>
  387. <receive bindselect="selectType" />
  388. <view class="formArea">
  389. <view wx:if="{{curValue===1}}" class="lineGroup">
  390. <view class="lineInner">
  391. <view class="label mr">
  392. <text class="star">*</text>
  393. 邮箱
  394. </view>
  395. <view class="content">
  396. <input
  397. bindinput="getDetail"
  398. value="{{interactTypeDetail}}"
  399. class="input"
  400. maxlength="-1"
  401. placeholder="请填写邮箱"
  402. placeholder-class="placeholderStyle"
  403. />
  404. </view>
  405. </view>
  406. </view>
  407. <view wx:if="{{curValue===2}}" class="lineGroup">
  408. <view class="lineInner">
  409. <view class="label mr">
  410. <text class="star">*</text>
  411. 手机号码
  412. </view>
  413. <view class="content">
  414. <input
  415. bindinput="getDetail"
  416. value="{{interactTypeDetail}}"
  417. class="input"
  418. maxlength="-1"
  419. placeholder="请填写手机号码"
  420. placeholder-class="placeholderStyle"
  421. />
  422. </view>
  423. </view>
  424. </view>
  425. </view>
  426. <view class="placeholderBtn" />
  427. <customer-bottom>
  428. <view class="fixedBottom">
  429. <button bindtap="submitData" class="btn">确定</button>
  430. </view>
  431. </customer-bottom>