salesOrderDetails.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241
  1. <template>
  2. <view style="padding-top: 1rpx;">
  3. <u--form labelPosition="left" :labelStyle="{color: '#fd4b09'}" :model="form" ref="form" labelWidth="150rpx"
  4. style="margin-top: 10rpx;padding-bottom: 130rpx;">
  5. <view style="width: calc(96%);margin: 0 auto;background-color: #fff;border-radius: 20rpx;">
  6. <u-cell-group :border="false">
  7. <u-cell :border="false" center title="基础信息" arrow-direction="down">
  8. <view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd4b09;"></view>
  9. </u-cell>
  10. </u-cell-group>
  11. <view style="padding: 0 10rpx;">
  12. <u-form-item label="客户名称" prop="cname" borderBottom @click="selectCustomer">
  13. <u-input v-model="form.corpsName" inputAlign="right" border="none" placeholder="请选择" disabled
  14. disabledColor="#ffffff" />
  15. </u-form-item>
  16. <u-form-item label="送货地址" prop="cname" borderBottom>
  17. <u-input v-model="form.arrivalAddress" inputAlign="right" border="none" placeholder="请选择"
  18. :disabled="form.confirmStatus == 1" disabledColor="#ffffff">
  19. <template slot="suffix">
  20. <u-icon name="map" color="#fd4b09" @tap="getMap"></u-icon>
  21. </template>
  22. </u-input>
  23. </u-form-item>
  24. <u-form-item label="销售日期" prop="cname" borderBottom
  25. @click="filterAll(['businesDate','businesDate'])">
  26. <u-input v-model="form.businesDate" inputAlign="right" border="none" placeholder="请选择" disabled
  27. disabledColor="#ffffff" />
  28. </u-form-item>
  29. <u-form-item label="送货日期" prop="cname" borderBottom
  30. @click="filterAll(['requiredDeliveryDate','requiredDeliveryDate'])">
  31. <u-input v-model="form.requiredDeliveryDate" inputAlign="right" border="none" placeholder="请选择"
  32. disabled disabledColor="#ffffff" />
  33. </u-form-item>
  34. <u-form-item label="计划收款日期" labelWidth="190rpx" prop="cname" borderBottom
  35. @click="filterAll(['advanceCollectionDate','advanceCollectionDate'])">
  36. <u-input v-model="form.advanceCollectionDate" inputAlign="right" border="none" placeholder="请选择"
  37. disabled disabledColor="#ffffff" />
  38. </u-form-item>
  39. <u-form-item label="销售单号" prop="cname" borderBottom>
  40. <u-input v-model="form.sysNo" border="none" inputAlign="right" placeholder="请输入" disabled
  41. disabledColor="#ffffff" />
  42. </u-form-item>
  43. </view>
  44. </view>
  45. <view
  46. style="width: calc(96%);margin: 0 auto;background-color: #fff;border-radius: 20rpx;margin-top: 20rpx;">
  47. <u-cell-group :border="false">
  48. <u-cell :border="false" center @click="selectProduct">
  49. <view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd4b09;"></view>
  50. <view slot="title">
  51. <view style="display: flex;">
  52. <view>产品列表({{form.orderItemsList.length}})</view>
  53. <u-icon v-if="form.confirmStatus == 0" name="plus-circle" color="#fd4b09" size="18"
  54. style="margin-left: 20rpx;"></u-icon>
  55. </view>
  56. </view>
  57. <view slot="value">
  58. <view style="font-size: 14rpx;">总金额¥<view
  59. style="display: initial;font-size: 28rpx;font-weight: bold">{{amountNumber.amount}}
  60. </view>
  61. </view>
  62. </view>
  63. <u-icon slot="right-icon" name="arrow-right"></u-icon>
  64. </u-cell>
  65. </u-cell-group>
  66. <view style="padding: 0 10rpx;">
  67. <view
  68. style="display: flex;font-size: 12rpx;text-align: center;padding: 10rpx 0;border-top: 1rpx solid #ccc;">
  69. <view>
  70. <view>销售总数量</view>
  71. <view style="font-size: 16rpx;font-weight: bold;">{{amountNumber.saleAll}}</view>
  72. </view>
  73. <view style="margin: 0 50rpx;">|</view>
  74. <view>
  75. <view>送货总数量</view>
  76. <view style="font-size: 16rpx;font-weight: bold;">{{amountNumber.deliveryAll}}</view>
  77. </view>
  78. <view style="margin: 0 50rpx;">|</view>
  79. <view>
  80. <view>总数</view>
  81. <view style="font-size: 16rpx;font-weight: bold;">{{amountNumber.saleAll}}</view>
  82. </view>
  83. </view>
  84. <view
  85. style="display: flex;font-size: 12rpx;text-align: center;padding: 10rpx 0;border-top: 1rpx solid #ccc;border-bottom: 1rpx solid #ccc;">
  86. <view>
  87. <view>成本</view>
  88. <view style="font-size: 16rpx;font-weight: bold;">{{form.costAmount?form.costAmount:'0.00'}}</view>
  89. <!-- <view style="font-size: 16rpx;font-weight: bold;">{{amountNumber.cost?amountNumber.cost.toFixed(2):'0.00'}}</view> -->
  90. </view>
  91. <view style="margin: 0 50rpx;">|</view>
  92. <view>
  93. <view>毛利</view>
  94. <view style="font-size: 16rpx;font-weight: bold;">{{amountNumber.grossProfit?amountNumber.grossProfit.toFixed(2):'0.00'}}</view>
  95. </view>
  96. <view style="margin: 0 50rpx;">|</view>
  97. <view>
  98. <view>送货</view>
  99. <view style="font-size: 16rpx;font-weight: bold;">{{amountNumber.delivery}}</view>
  100. </view>
  101. </view>
  102. <u-cell v-for="(item,index) in form.orderItemsList" :key="index">
  103. <view slot="label">
  104. <!-- customStyle="margin-bottom: 10px" -->
  105. <u-row>
  106. <u-col span="2.9">
  107. <u--image :showLoading="true"
  108. :src="item.url?item.url:'../../../static/images/404.png'" width="80px"
  109. height="80px" radius="10">
  110. </u--image>
  111. </u-col>
  112. <u-col span="9.1">
  113. <view
  114. style="font-size: 36rpx;width: 530rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  115. {{item.cname}}
  116. </view>
  117. <view style="display: flex;justify-content: space-between;">
  118. <view style="color: #707070;">单价:¥{{Number(item.price).toFixed(2)}}</view>
  119. <view style="color: #707070;">数量:{{item.storageInQuantity?parseInt(item.storageInQuantity):item.storageInQuantity}}</view>
  120. </view>
  121. <view style="display: flex;justify-content: space-between;">
  122. <view style="color: #707070;">金额:¥{{item.amount}}</view>
  123. <view v-if="form.confirmStatus == 0" style="color: #707070; color: red;"
  124. @click="deleteProduct(index)">
  125. <u-button type="error" size="mini" text="删除"></u-button>
  126. </view>
  127. </view>
  128. </u-col>
  129. </u-row>
  130. </view>
  131. </u-cell>
  132. </view>
  133. </view>
  134. <view
  135. style="width: calc(96%);margin: 0 auto;background-color: #fff;border-radius: 20rpx;margin-top: 20rpx;">
  136. <u-cell-group :border="false">
  137. <u-cell :border="false" center title="费用信息" arrow-direction="down">
  138. <view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd4b09;"></view>
  139. </u-cell>
  140. </u-cell-group>
  141. <view style="padding: 0 10rpx;">
  142. <!-- <u-form-item label="订单金额" prop="mailbox" borderBottom>
  143. <u-input v-model="form.purchaseAmount" inputAlign="right" border="none" placeholder="请输入"
  144. disabled disabledColor="#ffffff" />
  145. </u-form-item> -->
  146. <!-- <u-form-item label="优惠金额" prop="mailbox" borderBottom>
  147. <u-input v-model="form.thisUsedProfit" inputAlign="right" border="none" placeholder="请输入"
  148. :disabled="form.confirmStatus == 1" disabledColor="#ffffff" @change="calculationContract" />
  149. </u-form-item> -->
  150. <u-form-item label="订单金额" prop="mailbox" borderBottom>
  151. <u-input v-model="form.orderAmount" inputAlign="right" border="none" placeholder="请输入" disabled
  152. disabledColor="#ffffff" />
  153. </u-form-item>
  154. <u-form-item label="优惠金额" prop="mailbox" borderBottom>
  155. <u-input v-model="form.thisUsedProfit" inputAlign="right" border="none" placeholder="请输入"
  156. :disabled="JsonthisUsedProfit != 0" disabledColor="#ffffff"
  157. @blur="calculationContract"/>
  158. </u-form-item>
  159. <u-form-item label="应收金额" prop="mailbox" borderBottom>
  160. <u-input v-model="form.debitAmount" inputAlign="right" border="none" placeholder="请输入" disabled
  161. disabledColor="#ffffff" />
  162. </u-form-item>
  163. <view v-if="form.confirmStatus == 1">
  164. <u-form-item label="已收金额" @click="filterAll(['settlmentAmount','settlmentAmount'])"
  165. prop="mailbox" borderBottom>
  166. <u-input v-model="form.settlmentAmount" inputAlign="right" border="none" placeholder="请输入"
  167. disabled disabledColor="#ffffff" />
  168. </u-form-item>
  169. <u-form-item label="会员卡收款" prop="mailbox" borderBottom labelWidth="190rpx">
  170. <u-input v-model="form.memberAmout" type="digit" inputAlign="right" border="none" placeholder="请输入"
  171. :disabled="false" disabledColor="#ffffff" @blur="memberBalancechange">
  172. <template slot="suffix">
  173. <text style="margin-left: 10rpx; border-left: 1rpx solid #000;padding-left: 10rpx;">余额:{{balanceAmount}}</text>
  174. </template>
  175. </u-input>
  176. </u-form-item>
  177. <u-form-item label="本次收款" prop="mailbox" borderBottom>
  178. <u-input type="number" clearable v-model="form.currentAmount" inputAlign="right"
  179. border="none" placeholder="请输入"
  180. :disabled="form.confirmStatus == 0 || (form.debitAmount - form.settlmentAmount) == 0"
  181. disabledColor="#ffffff" />
  182. </u-form-item>
  183. <u-form-item label="收款账户" prop="mailbox" borderBottom @click="filterAll(['account','account'])">
  184. <u-input v-model="form.account" inputAlign="right" border="none" placeholder="请选择" disabled
  185. disabledColor="#ffffff">
  186. <template slot="suffix" style="text-align: center;">
  187. <u-icon name="plus-circle" size="18" @click.native.stop="newCompany()"></u-icon>
  188. </template>
  189. </u-input>
  190. </u-form-item>
  191. <u-form-item label="收款单号" prop="mailbox" borderBottom>
  192. <u-input v-model="form.receiptNo" inputAlign="right" border="none" disabled
  193. disabledColor="#ffffff" />
  194. </u-form-item>
  195. </view>
  196. </view>
  197. </view>
  198. <view
  199. style="width: calc(96%);margin: 0 auto;background-color: #fff;border-radius: 20rpx;margin-top: 20rpx;">
  200. <u-cell-group :border="false">
  201. <u-cell :border="false" center title="图片信息" arrow-direction="down">
  202. <view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd4b09;"></view>
  203. <view slot="value">
  204. <view v-if="form.confirmStatus == 1" @click.stop="saveAttachment"
  205. style="padding: 2rpx 20rpx;border:1rpx solid #FD4B09;border-radius: 100rpx;color: #FD4B09;">
  206. 保存
  207. </view>
  208. </view>
  209. </u-cell>
  210. </u-cell-group>
  211. <view style="padding: 0 10rpx;">
  212. <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
  213. :maxCount="10"></u-upload>
  214. </view>
  215. </view>
  216. </u--form>
  217. <view style="width: 100%;position: fixed;bottom: 0;background-color: #fff;border-top: 1rpx solid #ccc;">
  218. <view style="width: 100%;display: flex;font-size: 24rpx;">
  219. <view
  220. style="width: 20%;display: grid;justify-items: center;padding: 10rpx 0;border-right: 1rpx solid #ccc;"
  221. @click="deleteDoc">
  222. <u-icon name="trash"></u-icon>
  223. <view>删除</view>
  224. </view>
  225. <view @click="copyDocument" style="width: 20%;display: grid;justify-items: center;">
  226. <u-icon name="file-text"></u-icon>
  227. <view>复制新增</view>
  228. </view>
  229. <view @click="conserve" v-if="form.confirmStatus == 0"
  230. style="width: 30%;background-color: #5ac725;display: grid;justify-items: center;">
  231. <u-icon name="edit-pen" color="#fff"></u-icon>
  232. <view style="color: #fff;">保存</view>
  233. </view>
  234. <view v-if="form.confirmStatus == 0" @click="submit(0)"
  235. style="width: 30%;background-color: #fd4b09;display: grid;justify-items: center;">
  236. <u-icon name="checkmark" color="#fff"></u-icon>
  237. <view style="color: #fff;">提交</view>
  238. </view>
  239. <view v-if="form.confirmStatus == 1" @click="submit(1)"
  240. style="width: 20%;background-color: #fd4b09;display: grid;justify-items: center;">
  241. <u-icon name="close" color="#fff"></u-icon>
  242. <view style="color: #fff;">撤销提交</view>
  243. </view>
  244. <view v-if="form.confirmStatus == 1" style="width: 40%;">
  245. <view @click="confirmReceipt" v-if="(form.debitAmount - form.settlmentAmount) > 0"
  246. style="background-color: #5ac725;display: grid;justify-items: center;height: 100%;">
  247. <u-icon name="checkmark" color="#fff"></u-icon>
  248. <view style="color: #fff;">确认收款</view>
  249. </view>
  250. <view v-else style="background-color: #b3b3b3;display: grid;justify-items: center;height: 100%;">
  251. <u-icon name="checkmark" color="#fff"></u-icon>
  252. <view style="color: #fff;">已全部收款</view>
  253. </view>
  254. </view>
  255. </view>
  256. </view>
  257. <view v-if="choice" class="mask" @touchmove.stop.prevent="moveHandle" @click="choice = !choice">
  258. <view class="choice">
  259. <view style="display: flex;;justify-content: right;margin-right: 5rpx;">
  260. <view
  261. style="width: 40rpx;height: 40rpx;background-color: #fff;border-radius: 10rpx;transform: rotate(45deg);margin-top: -8rpx;z-index: -1;">
  262. </view>
  263. </view>
  264. <view style="margin-top: -25rpx;z-index: 99;background-color: #fff;">
  265. <u-cell-group :border="false">
  266. <u-cell icon="edit-pen" :title="connected?'打印':'未连接'" @click.native.stop="connectingDevices"></u-cell>
  267. <u-cell icon="photo" title="保存图片" :border="false" @click.native.stop="generatePictures">
  268. </u-cell>
  269. </u-cell-group>
  270. </view>
  271. </view>
  272. </view>
  273. <u-datetime-picker :show="timeOpen" v-model="datetime" mode="date" @cancel="timeOpen = false"
  274. @confirm="confirmTiem"></u-datetime-picker>
  275. <u-picker :show="showOpen" :columns="columns" keyName="dictValue" @cancel="showOpen = false"
  276. @confirm="showPicker"></u-picker>
  277. <u-toast ref="uToast"></u-toast>
  278. </view>
  279. </template>
  280. <script>
  281. import {
  282. typeSave,
  283. removeFile,
  284. submitApp,
  285. remind,
  286. confirm,
  287. revoke,
  288. removeItem,
  289. removeId,
  290. copyOrder,
  291. collectPayment,
  292. saveAtta,
  293. getCorpDesc
  294. } from '@/api/views/sale/salesOrderDetails.js'
  295. import http from '@/http/api.js'
  296. import {
  297. clientId,
  298. clientSecret
  299. } from '@/common/setting'
  300. import {
  301. dateFormat
  302. } from '@/common/dateFormat'
  303. // #ifdef APP-PLUS
  304. const HanyinPlugin = uni.requireNativePlugin('Hanyin-Plugin'); //汉印
  305. import printConnect from "@/common/print.js"; //引入打印机模板文件
  306. let print;
  307. // #endif
  308. import {
  309. GET_REQUEST_DATA
  310. } from "@/store/gettersType.js";
  311. import {
  312. mapGetters,
  313. mapActions
  314. } from 'vuex';
  315. import {
  316. DX
  317. } from '@/common/dateFormat.js';
  318. export default {
  319. data() {
  320. return {
  321. form: {
  322. orderItemsList: [],
  323. },
  324. datetime: Number(new Date()),
  325. timeOpen: false,
  326. fileList1: [],
  327. screen: [],
  328. showOpen: false,
  329. choice: false,
  330. columns: [],
  331. connected:false,
  332. amountNumber: {
  333. deliveryAll: 0,
  334. cost: 0,
  335. grossProfit: 0,
  336. delivery: 0,
  337. saleAll: 0,
  338. amount: 0
  339. },
  340. // 会员卡余额
  341. balanceAmount:0,
  342. // 深拷贝的优惠金额数据
  343. JsonthisUsedProfit:0
  344. }
  345. },
  346. onLoad(data) {
  347. // 获取详情信息
  348. this.refresh(data.id)
  349. getCorpDesc({id:data.corpId}).then(res=>{
  350. this.balanceAmount = res.data.balanceAmount?res.data.balanceAmount:0
  351. })
  352. },
  353. computed: {
  354. ...mapGetters([GET_REQUEST_DATA])
  355. },
  356. onShow() {
  357. this.choice = false
  358. let this_ = this
  359. // #ifdef APP-PLUS
  360. HanyinPlugin.IsOpened(res => {
  361. this_.connected = res.state
  362. if(this_.GET_REQUEST_DATA.length == 0){
  363. this_.connected = false
  364. print = new printConnect({},1); //打印机连接
  365. }
  366. });
  367. // #endif
  368. },
  369. onNavigationBarButtonTap(e) {
  370. this.choice = !this.choice
  371. },
  372. methods: {
  373. //跳转连接设备
  374. connectingDevices() {
  375. if(this.connected){
  376. this.senBleLabel()
  377. }else{
  378. uni.$u.route('/pages/views/bluetooth/index', {
  379. data: JSON.stringify(this.form)
  380. });
  381. }
  382. },
  383. senBleLabel() {
  384. // if (!print) return;
  385. console.log(this.$Mock.printTemplate.pagConfig)
  386. this.$Mock.printTemplate.pagConfig = 0
  387. let data = []
  388. let i = 0
  389. for (let item of this.form.orderItemsList) {
  390. data.push({
  391. "top": Number(i * 40 + 90),
  392. "left": "0",
  393. "textAlign": "start",
  394. "width": "270",
  395. "fontSize": 9,
  396. "text": item.cname,
  397. "type": "text",
  398. "fontWeight": "400",
  399. "height": "20"
  400. })
  401. data.push({
  402. "top": Number(i * 40 + 110),
  403. "left": "140",
  404. "textAlign": "start",
  405. "width": "40",
  406. "fontSize": 8,
  407. "text": Number(item.storageInQuantity),
  408. "type": "text",
  409. "fontWeight": "400",
  410. "height": "20"
  411. })
  412. data.push({
  413. "top": Number(i * 40 + 110),
  414. "left": "160",
  415. "textAlign": "start",
  416. "width": "50",
  417. "fontSize": 8,
  418. "text": item.price,
  419. "type": "text",
  420. "fontWeight": "400",
  421. "height": "20"
  422. })
  423. data.push({
  424. "top": Number(i * 40 + 110),
  425. "left": "210",
  426. "textAlign": "start",
  427. "width": "60",
  428. "fontSize": 8,
  429. "text": item.amount,
  430. "type": "text",
  431. "fontWeight": "400",
  432. "height": "20"
  433. })
  434. i++
  435. }
  436. data.push({
  437. "top": Number(i * 40 + 90),
  438. "left": "20",
  439. "textAlign": "start",
  440. "width": "270",
  441. "fontSize": 9,
  442. "text": "合计:",
  443. "type": "text",
  444. "fontWeight": "400",
  445. "height": "20"
  446. })
  447. data.push({
  448. "top": Number(i * 40 + 90),
  449. "left": "140",
  450. "textAlign": "start",
  451. "width": "40",
  452. "fontSize": 8,
  453. "text": this.amountNumber.saleAll,
  454. "type": "text",
  455. "fontWeight": "400",
  456. "height": "20"
  457. })
  458. data.push({
  459. "top": Number(i * 40 + 90),
  460. "left": "210",
  461. "textAlign": "start",
  462. "width": "60",
  463. "fontSize": 8,
  464. "text": this.form.debitAmount,
  465. "type": "text",
  466. "fontWeight": "400",
  467. "height": "20"
  468. })
  469. data.push({
  470. "top": Number(i * 40 + 110),
  471. "left": "20",
  472. "textAlign": "start",
  473. "width": "270",
  474. "fontSize": 9,
  475. "text": "产品合计:",
  476. "type": "text",
  477. "fontWeight": "400",
  478. "height": "20"
  479. })
  480. data.push({
  481. "top": Number(i * 40 + 110),
  482. "left": "70",
  483. "textAlign": "start",
  484. "width": "70",
  485. "fontSize": 8,
  486. "text": this.amountNumber.amount,
  487. "type": "text",
  488. "fontWeight": "400",
  489. "height": "20"
  490. })
  491. data.push({
  492. "top": Number(i * 40 + 110),
  493. "left": "140",
  494. "textAlign": "start",
  495. "width": "60",
  496. "fontSize": 8,
  497. "text": "合计金额:",
  498. "type": "text",
  499. "fontWeight": "400",
  500. "height": "20"
  501. })
  502. data.push({
  503. "top": Number(i * 40 + 110),
  504. "left": "190",
  505. "textAlign": "start",
  506. "width": "80",
  507. "fontSize": 8,
  508. "text": DX(this.amountNumber.amount),
  509. "type": "text",
  510. "fontWeight": "400",
  511. "height": "40"
  512. })
  513. data.push({
  514. "top": Number(i * 40 + 130),
  515. "left": "20",
  516. "textAlign": "start",
  517. "width": "270",
  518. "fontSize": 9,
  519. "text": "订货电话:" + this.form.clientAttn,
  520. "type": "text",
  521. "fontWeight": "400",
  522. "height": "20"
  523. })
  524. data.push({
  525. "top": Number(i * 40 + 150),
  526. "left": "20",
  527. "textAlign": "start",
  528. "width": "270",
  529. "fontSize": 9,
  530. "text": "制单人:" + this.form.client,
  531. "type": "text",
  532. "fontWeight": "400",
  533. "height": "20"
  534. })
  535. data.push({
  536. "top": Number(i * 40 + 150),
  537. "left": "140",
  538. "textAlign": "start",
  539. "width": "80",
  540. "fontSize": 8,
  541. "text": "收货人(签字):",
  542. "type": "text",
  543. "fontWeight": "400",
  544. "height": "20"
  545. })
  546. print.startPrint({
  547. SALES_SLIP: this.form.sysNo,
  548. CUSTOMER_NAME: this.form.corpsName,
  549. SALES_DATE: this.form.businesDate.slice(0, 10)
  550. }, {
  551. pageHeight: (this.form.orderItemsList.length * 40) / 3
  552. }, data);
  553. },
  554. generatePictures() {
  555. uni.$u.route('/pages/views/bluetooth/salesSlipTable', {
  556. data: JSON.stringify(this.form)
  557. });
  558. },
  559. //遮罩层禁止点击空方法
  560. moveHandle() {},
  561. newCompany() {
  562. uni.$u.route('/pages/views/product/createCompany', {
  563. code: "account",
  564. title: "收款账户"
  565. });
  566. },
  567. // 优惠金额的change
  568. calculationContract() {
  569. // let data = {
  570. // // 订单金额
  571. // orderAmount: this.form.orderAmount ? Number(this.form.orderAmount) : 0,
  572. // // 优惠金额
  573. // thisUsedProfit:this.form.thisUsedProfit ? Number(this.form.thisUsedProfit) : 0,
  574. // // 已收金额
  575. // settlmentAmount:this.form.settlmentAmount ? Number(this.form.settlmentAmount) : 0,
  576. // // 会员卡金额
  577. // memberBalance: this.form.memberBalance ? Number(this.form.memberBalance) : 0
  578. // }
  579. // let curr = (data.orderAmount - data.thisUsedProfit - data.settlmentAmount).toFixed(2)
  580. // if (curr <= Number(this.balanceAmount)) {
  581. // this.form.memberBalance = curr
  582. // this.form.debitAmount = 0
  583. // this.form.currentAmount = 0
  584. // }else {
  585. // this.form.memberBalance = Number(this.balanceAmount)
  586. // this.form.debitAmount = (data.orderAmount - data.thisUsedProfit - data.settlmentAmount - data.memberBalance).toFixed(2)
  587. // this.form.currentAmount = this.form.debitAmount
  588. // }
  589. // 订单金额
  590. this.form.orderAmount = this.form.orderAmount ? Number(this.form.orderAmount) : 0
  591. // 优惠金额
  592. this.form.thisUsedProfit = this.form.thisUsedProfit ? Number(this.form.thisUsedProfit) : 0
  593. // 已收金额
  594. this.form.settlmentAmount = this.form.settlmentAmount ? Number(this.form.settlmentAmount) : 0
  595. // 应收金额
  596. this.form.debitAmount = this.form.debitAmount?Number(this.form.debitAmount):0
  597. // 会员卡金额
  598. this.form.memberAmout = this.form.memberAmout ? Number(this.form.memberAmout) : 0
  599. if (this.form.thisUsedProfit < 0) {
  600. this.$refs.uToast.show({
  601. type: 'error',
  602. icon: false,
  603. message: "优惠金额不能小于零",
  604. })
  605. this.form.thisUsedProfit = 0
  606. }
  607. if (this.form.thisUsedProfit > this.form.orderAmount) {
  608. this.$refs.uToast.show({
  609. type: 'error',
  610. icon: false,
  611. message: "优惠金额不能大于订单金额",
  612. })
  613. this.form.thisUsedProfit = 0
  614. }
  615. this.form.debitAmount = this.form.orderAmount - this.form.thisUsedProfit
  616. this.formTwo.memberAmout = this.formTwo.debitAmount - this.formTwo.currentAmount
  617. this.formTwo.currentAmount = this.formTwo.debitAmount - this.formTwo.memberAmout
  618. },
  619. // 会员卡收款监听事件
  620. memberBalancechange(){
  621. // let data = {
  622. // // 订单金额
  623. // orderAmount: this.form.orderAmount ? Number(this.form.orderAmount) : 0,
  624. // // 优惠金额
  625. // thisUsedProfit:this.form.thisUsedProfit ? Number(this.form.thisUsedProfit) : 0,
  626. // // 已收金额
  627. // settlmentAmount:this.form.settlmentAmount ? Number(this.form.settlmentAmount) : 0,
  628. // // 会员卡金额
  629. // memberBalance: this.form.memberBalance ? Number(this.form.memberBalance) : 0
  630. // }
  631. // if (Number(this.form.memberBalance) < 0) {
  632. // this.form.memberBalance = 0
  633. // data.memberBalance = 0
  634. // }
  635. // const curr = (data.orderAmount - data.thisUsedProfit - data.settlmentAmount).toFixed(2)
  636. // if (Number(this.form.memberBalance) > curr) {
  637. // this.form.memberBalance = curr
  638. // data.memberBalance = curr
  639. // }
  640. // this.form.currentAmount = (data.orderAmount - data.thisUsedProfit - data.settlmentAmount - data.memberBalance).toFixed(2)
  641. // 订单金额
  642. this.form.orderAmount = this.form.orderAmount ? Number(this.form.orderAmount) : 0
  643. // 优惠金额
  644. this.form.thisUsedProfit = this.form.thisUsedProfit ? Number(this.form.thisUsedProfit) : 0
  645. // 已收金额
  646. this.form.settlmentAmount = this.form.settlmentAmount ? Number(this.form.settlmentAmount) : 0
  647. // 应收金额
  648. this.form.debitAmount = this.form.debitAmount?Number(this.form.debitAmount):0
  649. // 会员卡金额
  650. this.form.memberAmout = this.form.memberAmout ? Number(this.form.memberAmout) : 0
  651. if (this.form.memberAmout < 0) {
  652. this.$delete(this.form, 'memberAmout')
  653. this.$set(this.form, 'memberAmout', 0)
  654. this.$refs.uToast.show({
  655. type: 'error',
  656. icon: false,
  657. message: "会员卡金额不能小于零",
  658. })
  659. // this.form.memberAmout = 0
  660. }
  661. if (this.form.memberAmout >= this.balanceAmount) {
  662. this.$delete(this.form, 'memberAmout')
  663. this.$set(this.form, 'memberAmout', this.balanceAmount)
  664. // this.form.memberAmout = this.balanceAmount
  665. this.form.currentAmount = 0
  666. this.$refs.uToast.show({
  667. type: 'error',
  668. icon: false,
  669. message: "会员卡金额不能大于余额",
  670. })
  671. }
  672. const curr = this.form.debitAmount - this.form.settlmentAmount
  673. if (this.form.memberAmout > curr) {
  674. // this.form.memberAmout = curr
  675. this.$delete(this.form, 'memberAmout')
  676. this.$set(this.form, 'memberAmout', curr)
  677. }
  678. this.form.currentAmount = this.form.debitAmount - this.form.settlmentAmount - this.form.memberAmout
  679. },
  680. getMap() {
  681. let this_ = this
  682. uni.chooseLocation({
  683. success: function(res) {
  684. this_.$set(this_.form, "arrivalAddress", res.address)
  685. }
  686. });
  687. },
  688. copyDocument() {
  689. let form = {
  690. ...this.form,
  691. orderFilesList: this.fileList1
  692. }
  693. if (form.orderFilesList.length > 0) {
  694. form.orderFilesList.forEach(item => delete item.status)
  695. }
  696. let this_ = this
  697. uni.showModal({
  698. title: '提示',
  699. content: "是否确认复制新增",
  700. success: function(rest) {
  701. if (rest.confirm == true) {
  702. uni.showLoading({
  703. title: '加载中',
  704. mask: true
  705. });
  706. copyOrder(form).then(res => {
  707. uni.hideLoading();
  708. uni.showToast({
  709. icon: "none",
  710. title: '复制新增成功',
  711. mask: true
  712. });
  713. this_.form = res.data
  714. this_.fileList1 = res.data.orderFilesList
  715. this_.amountNumber = {
  716. deliveryAll: 0, //送货总数量
  717. cost: 0, //成本
  718. grossProfit: 0, //毛利
  719. delivery: 0, //送货
  720. saleAll: 0, //销售数量
  721. amount: 0
  722. }
  723. for (let item of this_.form.orderItemsList) {
  724. this_.amountNumber.saleAll += Number(item.storageInQuantity)
  725. this_.amountNumber.cost += Number(item.storageInQuantity) * Number(
  726. item.purchasePrice)
  727. this_.amountNumber.delivery += Number(item.actualQuantity)
  728. this_.amountNumber.deliveryAll += Number(item.actualQuantity)
  729. this_.amountNumber.amount += Number(item.amount)
  730. this_.amountNumber.grossProfit += Number(item.amount) - (item
  731. .purchasePrice ? Number(item.storageInQuantity) * Number(
  732. item.purchasePrice) : 0)
  733. }
  734. this.form.orderAmount = this.amountNumber.amount
  735. })
  736. }
  737. }
  738. })
  739. },
  740. deleteDoc() {
  741. if (this.form.id) {
  742. let this_ = this
  743. if (this_.form.confirmStatus == 1) {
  744. return uni.showToast({
  745. icon: "none",
  746. title: '禁止删除',
  747. mask: true
  748. });
  749. }
  750. uni.showModal({
  751. title: '提示',
  752. content: "是否确认删除",
  753. success: function(rest) {
  754. if (rest.confirm == true) {
  755. removeId({
  756. id: this_.form.id
  757. }).then(res => {
  758. uni.showToast({
  759. icon: "none",
  760. title: '删除成功',
  761. mask: true
  762. });
  763. setTimeout(function() {
  764. uni.navigateBack()
  765. }, 1000);
  766. })
  767. }
  768. }
  769. })
  770. } else {
  771. uni.showToast({
  772. icon: "none",
  773. title: '未保存',
  774. mask: true
  775. });
  776. }
  777. },
  778. deleteProduct(index) {
  779. let this_ = this
  780. if (this_.form.orderItemsList[index].id) {
  781. uni.showModal({
  782. title: '提示',
  783. content: "是否确认删除",
  784. success: function(rest) {
  785. if (rest.confirm == true) {
  786. uni.showLoading({
  787. title: '加载中',
  788. mask: true
  789. });
  790. removeItem({
  791. itemId: this_.form.orderItemsList[index].id
  792. }).then(res => {
  793. uni.hideLoading();
  794. uni.showToast({
  795. icon: "none",
  796. title: '删除成功',
  797. mask: true
  798. });
  799. this_.form.orderItemsList.splice(index, 1)
  800. }).catch(err => {
  801. uni.hideLoading();
  802. })
  803. }
  804. }
  805. })
  806. } else {
  807. this_.form.orderItemsList.splice(index, 1)
  808. }
  809. },
  810. //时间确认选择
  811. confirmTiem(e) {
  812. this.form[this.screen[1]] = dateFormat(new Date(e.value), "YYYY-MM-DD HH:mm:ss")
  813. this.timeOpen = false
  814. },
  815. // 下拉选择
  816. showPicker(e) {
  817. this.form[this.screen[1]] = e.value[0].dictValue
  818. this.showOpen = false
  819. },
  820. //集合筛选条件
  821. filterAll(screen) {
  822. if (screen[1] == "account") {
  823. if (this.form.confirmStatus == 0) {
  824. return uni.showToast({
  825. icon: "none",
  826. title: '禁止操作',
  827. mask: true
  828. });
  829. } else if ((this.form.debitAmount - this.form.settlmentAmount) == 0) {
  830. return uni.showToast({
  831. icon: "none",
  832. title: '禁止操作',
  833. mask: true
  834. });
  835. }
  836. } else {
  837. if (screen[1] !== "settlmentAmount") {
  838. if (this.form.confirmStatus == 1) {
  839. return uni.showToast({
  840. icon: "none",
  841. title: '禁止操作',
  842. mask: true
  843. });
  844. }
  845. }
  846. }
  847. this.screen = screen
  848. switch (screen[1]) {
  849. case "businesDate":
  850. this.timeOpen = true
  851. break;
  852. case "requiredDeliveryDate":
  853. this.timeOpen = true
  854. break;
  855. case "advanceCollectionDate":
  856. this.timeOpen = true
  857. break;
  858. case "account":
  859. this.$u.api.getWorkDicts('account').then(res => {
  860. this.columns = [res.data]
  861. this.showOpen = true
  862. })
  863. break;
  864. case "settlmentAmount":
  865. uni.$u.route('/pages/views/salesSlip/collectionList', this.form);
  866. break;
  867. }
  868. },
  869. // 获取详情数据
  870. refresh(id) {
  871. uni.showLoading({
  872. title: '加载中',
  873. mask: true
  874. });
  875. typeSave({
  876. id: id
  877. }).then(res => {
  878. this.form = res.data
  879. // 深拷贝优惠金额判断是否可以编辑
  880. this.JsonthisUsedProfit = JSON.parse(JSON.stringify(this.form.thisUsedProfit))
  881. this.form.memberAmout = 0
  882. this.fileList1 = res.data.orderFilesList
  883. this.amountNumber = {
  884. deliveryAll: 0, //送货总数量
  885. cost: 0, //成本
  886. grossProfit: 0, //毛利
  887. delivery: 0, //送货
  888. saleAll: 0, //销售数量
  889. amount: 0
  890. }
  891. for (let item of this.form.orderItemsList) {
  892. this.amountNumber.saleAll += Number(item.storageInQuantity)
  893. this.amountNumber.cost += Number(item.storageInQuantity) * Number(item.purchasePrice)
  894. this.amountNumber.delivery += Number(item.actualQuantity)
  895. this.amountNumber.deliveryAll += Number(item.actualQuantity)
  896. this.amountNumber.amount += Number(item.amount)
  897. this.amountNumber.grossProfit += Number(item.amount) - (item.purchasePrice ? Number(item
  898. .storageInQuantity) * Number(item.purchasePrice) : 0)
  899. }
  900. this.form.orderAmount = this.amountNumber.amount
  901. setTimeout(function() {
  902. uni.hideLoading();
  903. }, 500);
  904. })
  905. },
  906. //确认收款
  907. confirmReceipt() {
  908. let this_ = this
  909. let form = {
  910. ...this_.form,
  911. orderFilesList: this_.fileList1
  912. }
  913. if (form.orderFilesList.length > 0) {
  914. form.orderFilesList.forEach(item => delete item.status)
  915. }
  916. // if (!form.currentAmount) {
  917. // return uni.showToast({
  918. // icon: "none",
  919. // title: '本次收款金额不能为空',
  920. // mask: true,
  921. // duration: 2000
  922. // });
  923. // }
  924. // 判断本次收款和会员卡收款不能为空
  925. if (!this.form.currentAmount || this.form.currentAmount == 0) {
  926. if (!this.form.memberAmout || this.form.memberAmout == 0) {
  927. return uni.showToast({
  928. icon: "none",
  929. title: '本次收款金额或会员卡金额不能为空或零',
  930. mask: true
  931. });
  932. }
  933. }
  934. if (!form.account) {
  935. return uni.showToast({
  936. icon: "none",
  937. title: '未选择收款账户',
  938. mask: true,
  939. duration: 2000
  940. });
  941. }
  942. form.currentAmount = form.currentAmount?form.currentAmount:0
  943. uni.showModal({
  944. title: '收款:',
  945. content: '现金收款:' + form.currentAmount +'元\n会员卡收款:' + form.memberAmout + '元',
  946. success: function(rest) {
  947. if (rest.confirm == true) {
  948. uni.showLoading({
  949. title: '加载中',
  950. mask: true
  951. });
  952. collectPayment(form).then(res => {
  953. uni.showToast({
  954. icon: "none",
  955. title: '收款成功',
  956. mask: true,
  957. duration: 2000
  958. });
  959. setTimeout(function() {
  960. uni.hideLoading();
  961. this_.refresh(res.data.id)
  962. }, 1000);
  963. })
  964. }
  965. }
  966. })
  967. },
  968. //保存附件
  969. saveAttachment() {
  970. let form = {
  971. pid: this.form.id,
  972. orderFilesList: this.fileList1
  973. }
  974. if (form.orderFilesList.length > 0) {
  975. form.orderFilesList.forEach(item => delete item.status)
  976. }
  977. uni.showLoading({
  978. title: '加载中',
  979. mask: true
  980. });
  981. saveAtta(form).then(res => {
  982. uni.showToast({
  983. icon: "none",
  984. title: '保存成功',
  985. mask: true
  986. });
  987. let _this = this
  988. setTimeout(function() {
  989. uni.hideLoading();
  990. _this.refresh(res.data.id)
  991. }, 1000);
  992. })
  993. },
  994. //保存
  995. conserve() {
  996. let form = {
  997. ...this.form,
  998. orderFilesList: this.fileList1
  999. }
  1000. if (form.orderFilesList.length > 0) {
  1001. form.orderFilesList.forEach(item => delete item.status)
  1002. }
  1003. uni.showLoading({
  1004. title: '加载中',
  1005. mask: true
  1006. });
  1007. submitApp(form).then(res => {
  1008. uni.showToast({
  1009. icon: "none",
  1010. title: '保存成功',
  1011. mask: true
  1012. });
  1013. let _this = this
  1014. setTimeout(function() {
  1015. uni.hideLoading();
  1016. _this.refresh(res.data.id)
  1017. }, 1000);
  1018. })
  1019. },
  1020. //提交
  1021. submit(type) {
  1022. this.form.currentAmount = 0
  1023. let form = {
  1024. ...this.form,
  1025. orderFilesList: this.fileList1
  1026. }
  1027. let this_ = this
  1028. uni.showLoading({
  1029. title: '提交中',
  1030. mask: true
  1031. });
  1032. if (type == 0) {
  1033. remind(form).then(res => {
  1034. uni.hideLoading();
  1035. if (res.data) {
  1036. uni.showModal({
  1037. title: '提示',
  1038. content: res.data,
  1039. success: function(rest) {
  1040. if (rest.confirm == true) {
  1041. uni.showLoading({
  1042. title: '提交中',
  1043. mask: true
  1044. });
  1045. confirm(form).then(resth => {
  1046. uni.showToast({
  1047. icon: "none",
  1048. title: '提交成功',
  1049. mask: true
  1050. });
  1051. setTimeout(function() {
  1052. // uni.hideLoading();
  1053. this_.refresh(resth.data.id)
  1054. }, 1000);
  1055. })
  1056. }
  1057. }
  1058. })
  1059. } else {
  1060. uni.showLoading({
  1061. title: '提交中',
  1062. mask: true
  1063. });
  1064. confirm(form).then(rest => {
  1065. uni.showToast({
  1066. icon: "none",
  1067. title: '提交成功',
  1068. mask: true
  1069. });
  1070. setTimeout(function() {
  1071. uni.hideLoading();
  1072. this_.refresh(rest.data.id)
  1073. }, 1000);
  1074. })
  1075. }
  1076. })
  1077. } else if (type == 1) {
  1078. revoke(form).then(res => {
  1079. uni.showToast({
  1080. icon: "none",
  1081. title: '撤销成功',
  1082. mask: true
  1083. });
  1084. setTimeout(function() {
  1085. uni.hideLoading();
  1086. this_.refresh(res.data.id)
  1087. }, 1000);
  1088. })
  1089. }
  1090. },
  1091. //客户选择返回触发
  1092. otherFun(customer) {
  1093. this.form.corpsName = customer.cname
  1094. this.form.corpId = customer.id
  1095. },
  1096. selectProduct() {
  1097. if (this.form.confirmStatus == 0) {
  1098. this.$u.route('/pages/views/salesSlip/selectProduct', this.form);
  1099. }
  1100. },
  1101. //商品选择返回
  1102. getProduct(dataList) {
  1103. for (let item of dataList) {
  1104. this.form.orderItemsList.push({
  1105. ...item
  1106. })
  1107. }
  1108. this.amountNumber = {
  1109. deliveryAll: 0, //送货总数量
  1110. cost: 0, //成本
  1111. grossProfit: 0, //毛利
  1112. delivery: 0, //送货
  1113. saleAll: 0, //销售数量
  1114. amount: 0
  1115. }
  1116. for (let item of this.form.orderItemsList) {
  1117. this.amountNumber.saleAll += Number(item.storageInQuantity)
  1118. this.amountNumber.cost += Number(item.storageInQuantity) * Number(item.purchasePrice)
  1119. this.amountNumber.delivery += Number(item.actualQuantity)
  1120. this.amountNumber.deliveryAll += item.actualQuantity ? Number(item.actualQuantity) : 0
  1121. this.amountNumber.amount += Number(item.amount)
  1122. this.amountNumber.grossProfit += Number(item.amount) - (item.purchasePrice ? Number(item
  1123. .storageInQuantity) * Number(item.purchasePrice) : 0)
  1124. }
  1125. this.form.orderAmount = this.amountNumber.amount
  1126. },
  1127. selectCustomer() {
  1128. this.$u.route('/pages/views/salesSlip/selectCustomer', {
  1129. corpType: 'KH'
  1130. });
  1131. },
  1132. // 新增图片
  1133. async afterRead(event) {
  1134. // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
  1135. let lists = [].concat(event.file)
  1136. let fileListLen = this[`fileList${event.name}`].length
  1137. lists.map((item) => {
  1138. this[`fileList${event.name}`].push({
  1139. ...item,
  1140. status: 'uploading',
  1141. message: '上传中'
  1142. })
  1143. })
  1144. for (let i = 0; i < lists.length; i++) {
  1145. const result = await this.uploadFilePromise(lists[i].url)
  1146. let item = this[`fileList${event.name}`][fileListLen]
  1147. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  1148. status: 'success',
  1149. sort: this.fileList1.length,
  1150. fileName: JSON.parse(result).data.originalName,
  1151. url: JSON.parse(result).data.link
  1152. }))
  1153. fileListLen++
  1154. }
  1155. },
  1156. uploadFilePromise(url) {
  1157. return new Promise((resolve, reject) => {
  1158. let a = uni.uploadFile({
  1159. url: http.config.baseURL +
  1160. '/blade-resource/oss/endpoint/put-file', // 仅为示例,非真实的接口地址
  1161. filePath: url,
  1162. name: 'file',
  1163. formData: {
  1164. user: 'test'
  1165. },
  1166. header: {
  1167. // 客户端认证参数
  1168. 'Authorization': 'Basic ' + Base64.encode(clientId + ':' +
  1169. clientSecret),
  1170. 'Blade-Auth': 'bearer ' + uni.getStorageSync('accessToken')
  1171. },
  1172. success: (res) => {
  1173. setTimeout(() => {
  1174. resolve(res.data)
  1175. }, 1000)
  1176. }
  1177. });
  1178. })
  1179. },
  1180. // 删除图片
  1181. deletePic(event) {
  1182. let this_ = this
  1183. uni.showModal({
  1184. title: '提示',
  1185. content: '是否确认删除',
  1186. success: function(rest) {
  1187. if (rest.confirm == true) {
  1188. if (this_[`fileList${event.name}`][event.index].id) {
  1189. removeFile({
  1190. ids: this_[`fileList${event.name}`][event.index].id
  1191. }).then(res => {
  1192. this_[`fileList${event.name}`].splice(event.index, 1)
  1193. })
  1194. } else {
  1195. this_[`fileList${event.name}`].splice(event.index, 1)
  1196. }
  1197. }
  1198. }
  1199. })
  1200. },
  1201. }
  1202. }
  1203. </script>
  1204. <style lang="scss" scoped>
  1205. ::v-deep .u-cell__body {
  1206. padding: 20rpx 10rpx;
  1207. }
  1208. .choice {
  1209. position: fixed;
  1210. right: 10rpx;
  1211. border-radius: 10rpx;
  1212. padding: 0 10rpx 10rpx 10rpx;
  1213. background-color: #fff;
  1214. // #ifdef H5
  1215. top: calc(var(--status-bar-height) + 44px + 20rpx);
  1216. // #endif
  1217. // #ifdef APP-PLUS
  1218. top: 30rpx,
  1219. // #endif
  1220. }
  1221. .mask {
  1222. width: 100%;
  1223. height: 100%;
  1224. position: fixed;
  1225. top: 0;
  1226. bottom: 0;
  1227. background-color: rgba(1, 1, 1, 0.3);
  1228. }
  1229. </style>