index.vue 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162
  1. <template>
  2. <view class="content">
  3. <u-sticky>
  4. <view class="head" style="background-color: #3c9cff; color: #fff;">
  5. <view>
  6. <text>{{ formData.carRegNo == null ? '' : formData.carRegNo }}</text>
  7. </view>
  8. <view>
  9. <text>{{ formData.goodsCName == null ? '' : formData.goodsCName }}</text>
  10. </view>
  11. </view>
  12. <view class="head-no-addr">
  13. <view>
  14. <text v-if="formData.loadFactory">{{formData.loadFactory}}</text>
  15. <text v-else>{{formData.loadAddr}}</text>
  16. </view>
  17. <!-- <span class="icon iconfont" style="font-size: 100rpx; color: #fcbd71; height: 80rpx;">&#xe6fb;</span> -->
  18. <view><text>【到】</text></view>
  19. <view>
  20. <text v-if="formData.unLoadFactory">{{formData.unLoadFactory}}</text>
  21. <text v-else>{{formData.unLoadAddr}}</text>
  22. </view>
  23. </view>
  24. </u-sticky>
  25. <view class="striping"></view>
  26. <!-- 审核意见 -->
  27. <view style="margin: 20rpx;" v-if="formData.audit2Desc">
  28. <text style="color: #3c9cff; margin-right: 20rpx; margin-left: 50rpx;">审 核 意 见</text>
  29. <text style="border-bottom: 2rpx dotted #000;">{{formData.audit2Desc}}</text>
  30. </view>
  31. <u-tabs :list="tabs" @change="change" :activeStyle="{
  32. width: '180rpx',
  33. height: '60rpx',
  34. color: '#fff',
  35. backgroundColor: '#3c9cff',
  36. borderRadius: '80rpx',
  37. lineHeight: '60rpx',
  38. textAlign: 'center'
  39. }" :inactiveStyle="{
  40. width: '180rpx',
  41. height: '60rpx',
  42. color: '#3c9cff',
  43. backgroundColor: '#f0f0f0f0',
  44. borderRadius: '80rpx',
  45. lineHeight: '60rpx',
  46. textAlign: 'center'
  47. }"></u-tabs>
  48. <view v-if="isTabs == '行程费用'">
  49. <view class="box-box">
  50. <view class="box">
  51. <view class="data">
  52. <!-- <text class="key">ETC金额</text>
  53. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  54. @input="checkUnLoadetc" v-model="formData.loadetc" /> -->
  55. <text class="key" style="width: 45%;">公司加油(升)</text>
  56. <input class="value" style="width: calc(45% - 80rpx);" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  57. @input="checkUnOilhomeQty" v-model="formData.oilhomeQty" />
  58. <view style="margin-left: 10rpx; width: 80rpx; height: 60rpx; position: relative; background-color: #3c9cff; border-radius: 80rpx">
  59. <u-upload :sizeType="['compressed']"
  60. @afterRead="imgUploading($event, '公司加油')" @delete="deletePic" name="1" multiple :disabled="disabled"
  61. :previewFullImage="true">
  62. <uni-icons type="camera" style="position: absolute; top: 6rpx; left: 16rpx;" color="#fff" size="24"/>
  63. </u-upload>
  64. </view>
  65. </view>
  66. <view class="data" style="width: 40%;">
  67. <text class="key">现金过路费</text>
  68. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  69. @input="checkUnLoadtoll" v-model="formData.loadtoll" />
  70. </view>
  71. </view>
  72. <!-- <view class="box">
  73. <view class="data">
  74. <text class="key">公司加油(升)</text>
  75. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  76. @input="checkUnOilhomeQty" v-model="formData.oilhomeQty" />
  77. </view>
  78. <view class="data"> -->
  79. <!-- <text class="key">加油金额</text>
  80. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  81. @input="checkUnOilhomeAmt" v-model="formData.oilhomeAmt" /> -->
  82. <!-- </view>
  83. </view> -->
  84. <view class="box">
  85. <view class="data-two">
  86. <text class="key">定点加油1</text>
  87. <view class="list">
  88. <uni-data-select style="width: 520rpx;" :disabled="disabled" :localdata="gasStationList"
  89. v-model="formData.gasstation1" @change="gasstation1Change"></uni-data-select>
  90. </view>
  91. </view>
  92. </view>
  93. <view class="box">
  94. <view class="data">
  95. <text class="key" style="width: 45%;">升&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数</text>
  96. <input class="value" style="width: calc(45% - 80rpx);" selection-start="0" selection-end="9999" :disabled="disabled || formData.gasstation1 == '' || formData.gasstation1 == null" type="digit"
  97. @input="checkUnOilappoint1Qty" placeholder-style="font-size:24rpx" placeholder="请输入升数" v-model="formData.oilappoint1Qty" />
  98. <view style="margin-left: 10rpx; width: 80rpx; height: 60rpx; position: relative; background-color: #3c9cff; border-radius: 80rpx">
  99. <u-upload :sizeType="['compressed']"
  100. @afterRead="imgUploading($event, '定点加油1')" @delete="deletePic" name="1" multiple :disabled="disabled"
  101. :previewFullImage="true">
  102. <uni-icons type="camera" style="position: absolute; top: 6rpx; left: 16rpx;" color="#fff" size="24"/>
  103. </u-upload>
  104. </view>
  105. </view>
  106. <view class="data" style="width: 40%;">
  107. <text class="key">金&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;额</text>
  108. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled || formData.gasstation1 == '' || formData.gasstation1 == null" type="digit"
  109. @input="checkUnOilappoint1Amt" placeholder-style="font-size:24rpx" placeholder="请输入金额" v-model="formData.oilappoint1Amt" />
  110. </view>
  111. </view>
  112. <view class="box">
  113. <view class="data-two">
  114. <text class="key">定点加油2</text>
  115. <view class="list">
  116. <uni-data-select style="width: 520rpx;" :disabled="disabled" :localdata="gasStationList"
  117. v-model="formData.gasstation2" @change="gasstation2Change"></uni-data-select>
  118. </view>
  119. </view>
  120. </view>
  121. <view class="box">
  122. <view class="data">
  123. <text class="key" style="width: 45%;">升&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数</text>
  124. <input class="value" style="width: calc(45% - 80rpx);" selection-start="0" selection-end="9999" :disabled="disabled || formData.gasstation2 == '' || formData.gasstation2 == null" type="digit"
  125. @input="checkUnOilappoint2Qty" placeholder-style="font-size:24rpx" placeholder="请输入升数" v-model="formData.oilappoint2Qty" />
  126. <view style="margin-left: 10rpx; width: 80rpx; height: 60rpx; position: relative; background-color: #3c9cff; border-radius: 80rpx">
  127. <u-upload :sizeType="['compressed']"
  128. @afterRead="imgUploading($event, '定点加油2')" @delete="deletePic" name="1" multiple :disabled="disabled"
  129. :previewFullImage="true">
  130. <uni-icons type="camera" style="position: absolute; top: 6rpx; left: 16rpx;" color="#fff" size="24"/>
  131. </u-upload>
  132. </view>
  133. </view>
  134. <view class="data" style="width: 40%;">
  135. <text class="key">金&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;额</text>
  136. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled || formData.gasstation2 == '' || formData.gasstation2 == null" type="digit"
  137. @input="checkUnOilappoint2Amt" placeholder-style="font-size:24rpx" placeholder="请输入金额" v-model="formData.oilappoint2Amt" />
  138. </view>
  139. </view>
  140. <view class="box">
  141. <view class="data-two">
  142. <text class="key">定点加油3</text>
  143. <view class="list">
  144. <uni-data-select style="width: 520rpx;" :disabled="disabled" :localdata="gasStationList"
  145. v-model="formData.gasstation3" @change="gasstation3Change"></uni-data-select>
  146. </view>
  147. </view>
  148. </view>
  149. <view class="box">
  150. <view class="data">
  151. <text class="key" style="width: 45%;">升&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数</text>
  152. <input class="value" style="width: calc(45% - 80rpx);" selection-start="0" selection-end="9999" :disabled="disabled || formData.gasstation3 == '' || formData.gasstation3 == null" type="digit"
  153. @input="checkUnOilappoint3Qty" placeholder-style="font-size:24rpx" placeholder="请输入升数" v-model="formData.oilappoint3Qty" />
  154. <view style="margin-left: 10rpx; width: 80rpx; height: 60rpx; position: relative; background-color: #3c9cff; border-radius: 80rpx">
  155. <u-upload :sizeType="['compressed']"
  156. @afterRead="imgUploading($event, '定点加油3')" @delete="deletePic" name="1" multiple :disabled="disabled"
  157. :previewFullImage="true">
  158. <uni-icons type="camera" style="position: absolute; top: 6rpx; left: 16rpx;" color="#fff" size="24"/>
  159. </u-upload>
  160. </view>
  161. </view>
  162. <view class="data" style="width: 40%;">
  163. <text class="key">金&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;额</text>
  164. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled || formData.gasstation3 == '' || formData.gasstation3 == null" type="digit"
  165. @input="checkUnOilappoint3Amt" placeholder-style="font-size:24rpx" placeholder="请输入金额" v-model="formData.oilappoint3Amt" />
  166. </view>
  167. </view>
  168. <view class="box">
  169. <view class="data">
  170. <text class="key" style="width: 45%;">现金加油(升)</text>
  171. <input class="value" style="width: calc(45% - 80rpx);" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  172. @input="checkUnOilcash1Qty" v-model="formData.oilcash1Qty" />
  173. <view style="margin-left: 10rpx; width: 80rpx; height: 60rpx; position: relative; background-color: #3c9cff; border-radius: 80rpx">
  174. <u-upload :sizeType="['compressed']"
  175. @afterRead="imgUploading($event, '现金加油')" @delete="deletePic" name="1" multiple :disabled="disabled"
  176. :previewFullImage="true">
  177. <uni-icons type="camera" style="position: absolute; top: 6rpx; left: 16rpx;" color="#fff" size="24"/>
  178. </u-upload>
  179. </view>
  180. </view>
  181. <view class="data" style="width: 40%;">
  182. <text class="key">加油金额</text>
  183. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  184. @input="checkUnOilcash1Amt" v-model="formData.oilcash1Amt" />
  185. </view>
  186. </view>
  187. <view class="box">
  188. <view class="data">
  189. <text class="key" style="width: 45%;">油卡加油(升)</text>
  190. <input class="value" style="width: calc(45% - 80rpx);" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  191. @input="checkUnOilcardQty" v-model="formData.oilcardQty" />
  192. <view style="margin-left: 10rpx; width: 80rpx; height: 60rpx; position: relative; background-color: #3c9cff; border-radius: 80rpx">
  193. <u-upload :sizeType="['compressed']"
  194. @afterRead="imgUploading($event, '油卡加油')" @delete="deletePic" name="1" multiple :disabled="disabled"
  195. :previewFullImage="true">
  196. <uni-icons type="camera" style="position: absolute; top: 6rpx; left: 16rpx;" color="#fff" size="24"/>
  197. </u-upload>
  198. </view>
  199. </view>
  200. <view class="data" style="width: 40%;">
  201. <text class="key">加油金额</text>
  202. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  203. @input="checkUnOilcardAmt" v-model="formData.oilcardAmt" />
  204. </view>
  205. </view>
  206. <view class="box-two">
  207. <text class="key">定点尿素</text>
  208. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  209. @input="checkUnRepairamt" v-model="formData.repairamt" />
  210. </view>
  211. <view class="box-two">
  212. <text class="key">是否加满</text>
  213. <view class="u-page__tag-item" v-for="(item, index) in radios" :key="index">
  214. <uni-tag :disabled="disabled" size="normal" type="primary" :text="item.name" :inverted="!item.checked" @click="radioClick(index)"></uni-tag>
  215. </view>
  216. </view>
  217. <view class="box-two">
  218. <text class="key">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</text>
  219. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
  220. v-model="formData.driverassdesc" />
  221. </view>
  222. <!-- </u-collapse-item> -->
  223. </view>
  224. <view class="box-box" style="margin-top: 40rpx;">
  225. <view style="margin-bottom: 20rpx;">
  226. <!-- <text style="color: #3c9cff;">单据拍照存档</text> -->
  227. <text style="color: #3c9cff;">单据拍照存档</text>
  228. </view>
  229. <u-upload :fileList="fileList1":sizeType="['compressed']"
  230. @afterRead="imgUploading" @delete="deletePic" name="1" multiple :disabled="disabled"
  231. :previewFullImage="true"></u-upload>
  232. </view>
  233. <view style="text-align: end; padding-right: 20rpx; font-size: 32rpx;">
  234. <text>报销:</text> {{' '}}
  235. <text style="color: #ff9f1c;">¥ {{money}} 元</text>
  236. </view>
  237. </view>
  238. <view v-if="isTabs == '其他费用'">
  239. <view class="table">
  240. <view class="data vertical-layout" v-for="(item, index) in itemsList" :key="index">
  241. <view class="name">
  242. <text style="color: #3c9cff;">{{ item.cname }}</text>
  243. </view>
  244. <view class="sum">
  245. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  246. @input="checkUnAmt(item.amt, index)" @click="inputHeight" cursor-spacing="30"
  247. :always-embed="true" :adjust-position="true" v-model="item.amt" />
  248. </view>
  249. <view class="remarks" style="border-bottom: 2rpx dotted #000;">
  250. <input v-model="item.remarks" placeholder-style="font-size:24rpx" :disabled="disabled" placeholder="请输入备注">
  251. </view>
  252. </view>
  253. </view>
  254. </view>
  255. <view v-if="isTabs == '行程绕路'">
  256. <view style="margin: 20rpx 30rpx;">
  257. <view class="box-two">
  258. <text class="key" style="width: 260rpx;">绕路里程空(公里)</text>
  259. <input class="value-two" style="border-bottom: 2rpx dotted #000;" selection-start="0" selection-end="9999" disabled
  260. @input="checkUnDetourEmptyMile" v-model="formData.detourEmptyMile" />
  261. </view>
  262. <view class="box-two">
  263. <text class="key" style="width: 260rpx;">绕路里程重(公里)</text>
  264. <input class="value-two" style="border-bottom: 2rpx dotted #000;" selection-start="0" selection-end="9999" disabled
  265. @input="checkUnDetourLoadMile" v-model="formData.detourLoadMile" />
  266. </view>
  267. <view class="box-two">
  268. <text class="key" style="width: 260rpx;">绕&nbsp;&nbsp;&nbsp;&nbsp;路&nbsp;&nbsp;&nbsp;&nbsp;原&nbsp;&nbsp;&nbsp;&nbsp;因</text>
  269. <input class="value-two" style="border-bottom: 2rpx dotted #000;" selection-start="0" selection-end="9999" disabled
  270. v-model="formData.detourDesc" />
  271. </view>
  272. </view>
  273. </view>
  274. <view class="cushion">
  275. </view>
  276. <!-- <view class="bottom vertical-layout" style="z-index: 4;" v-if="status376 == 2 || status376 == 0">
  277. <view class="bottom-bottom">
  278. <view class="money">
  279. <text>报销:</text> {{' '}}
  280. <text style="color: #ff9f1c;">¥ {{money}}</text>
  281. </view>
  282. <view class="button">
  283. <view class="button-button">
  284. <u-button iconColor="#3c9cff" shape="circle" type="primary" @click="submitShow = true"
  285. :disabled="disabled" text="提交费用"></u-button>
  286. </view>
  287. </view>
  288. </view>
  289. </view> -->
  290. <view v-if="formData.ifStarted && formData.ifStarted != 'A'">
  291. <!-- 驾驶员 -->
  292. <view v-if="button" class="bottom" style="z-index: 4;">
  293. <view class="row">
  294. <view class="button">
  295. <u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="saveDisabled"
  296. @click="submitVerify()" text="保存数据"></u-button>
  297. </view>
  298. <view class="button">
  299. <u-button iconColor="#fe8c00;" color="#fe8c00" shape="circle" type="primary" :disabled="upDisabled"
  300. @click="upButtonClick('TJ')" text="提交报账单"></u-button>
  301. </view>
  302. </view>
  303. </view>
  304. <!-- 队长 -->
  305. <view v-else class="bottom" style="z-index: 4;">
  306. <view class="row">
  307. <view class="button">
  308. <u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="sDisabled"
  309. @click="auditTClick" text="通过"></u-button>
  310. </view>
  311. <view class="button">
  312. <u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="sDisabled"
  313. @click="auditFClick" text="驳回"></u-button>
  314. </view>
  315. </view>
  316. </view>
  317. </view>
  318. <!-- 遮盖罩 -->
  319. <!-- <u-loading-page :loading="true" :zIndex="20000"></u-loading-page> -->
  320. <u-loading-page :loading="loading"></u-loading-page>
  321. <!-- 消息提示 -->
  322. <u-toast ref="uToast"></u-toast>
  323. <u-modal :show="submitShow" title="提示" showCancelButton @confirm="submit" @cancel="submitShow = false">
  324. <view class="slot-content">
  325. <rich-text nodes="确定要保存数据吗?"></rich-text>
  326. </view>
  327. </u-modal>
  328. <u-modal :show="upAuditShow" confirmColor="#fe8c00" title="提示" showCancelButton @confirm="upReview" @cancel="upAuditShow = false">
  329. <view class="slot-content">
  330. <rich-text nodes="点击确认后该业务将锁定,无法添加修改费用报销!确定要提交吗?"></rich-text>
  331. </view>
  332. </u-modal>
  333. <u-modal :show="deleteShow" title="提示" showCancelButton @confirm="deleteImg" @cancel="deleteShow = false">
  334. <view class="slot-content">
  335. <rich-text nodes="确定删除这张图片吗?"></rich-text>
  336. </view>
  337. </u-modal>
  338. <u-modal :show="auditTShow" title="提示" showCancelButton @confirm="check('T')" @cancel="auditTShow = false">
  339. <view class="slot-content" style="display: flex; flex-direction: column; align-items: center;">
  340. <rich-text nodes="确定要审核通过吗?"></rich-text>
  341. <input style="margin-top: 20rpx;"
  342. selection-start="0"
  343. selection-end="9999"
  344. placeholder="请输入通过意见"
  345. placeholder-style="font-size: 28rpx"
  346. v-model="formData.audit2Desc"
  347. />
  348. </view>
  349. </u-modal>
  350. <u-modal :show="auditFShow" title="提示" showCancelButton @confirm="check('F')" @cancel="auditFShow = false">
  351. <view class="slot-content" style="display: flex; flex-direction: column; align-items: center;">
  352. <rich-text nodes="确定要驳回吗?"></rich-text>
  353. <input style="margin-top: 20rpx;"
  354. selection-start="0"
  355. selection-end="9999"
  356. placeholder="请输入驳回意见"
  357. placeholder-style="font-size: 28rpx"
  358. v-model="formData.audit2Desc"
  359. />
  360. </view>
  361. </u-modal>
  362. </view>
  363. </template>
  364. <script>
  365. import {
  366. getGasStations,
  367. getItems,
  368. insertLoadFeeItems,
  369. getLoadFeeItems,
  370. isMileage
  371. } from "@/api/reimbursement"
  372. import {
  373. getOrderBillsPlansByid,
  374. putOrderBillsPlansByid,
  375. insertTmsAttachMngs,
  376. pictureUploading,
  377. deleteTmsAttachMngs,
  378. submitAudit,
  379. audit
  380. } from "@/api/particulars"
  381. export default {
  382. data() {
  383. return {
  384. radios: [{
  385. name: '加满了',
  386. checked: false,
  387. }, {
  388. name: '没加满',
  389. checked: false,
  390. }],
  391. orderNo: '',
  392. // 遮盖罩
  393. loading: true,
  394. formData: {
  395. // itemsVoList: [],
  396. // oilappoint1Qty: 1,
  397. // oilappoint2Qty: 1
  398. },
  399. // 报销费用list
  400. gasStationList: [],
  401. // 其他费用list
  402. itemsList: [],
  403. // 其他费用被选中
  404. selectedIndexs: [],
  405. radioValueOne: '', // 当前 radio 的值
  406. numOne: 0, //用于区分是否是重复选中
  407. radioValueTwo: '', // 当前 radio 的值
  408. numTwo: 0, //用于区分是否是重复选中
  409. // 输入框禁用
  410. disabled: false,
  411. // 保存数据按钮
  412. saveDisabled: false,
  413. // 提交数据按钮
  414. upDisabled: false,
  415. // 审核按钮禁用
  416. sDisabled: true,
  417. // 底部按钮
  418. button: null,
  419. status376: 0,
  420. selectionLength: 0,
  421. fileList1: [],
  422. // 删除弹框
  423. deleteShow: false,
  424. // 提交费用弹窗
  425. submitShow: false,
  426. // 提交审核弹框
  427. upAuditShow: false,
  428. // 审核通过弹框
  429. auditTShow: false,
  430. // 审核驳回弹框
  431. auditFShow: false,
  432. event: {},
  433. vHeight: 0,
  434. tabs: [{
  435. name: '行程费用'
  436. }, {
  437. name: '其他费用'
  438. }, {
  439. name: '行程绕路',
  440. badge: {},
  441. }],
  442. isTabs: '行程费用',
  443. // 报销金额
  444. money: 0
  445. }
  446. },
  447. onUnload() {
  448. this.formData = {};
  449. this.loading = true;
  450. },
  451. onLoad: function(option) {
  452. this.status376 = option.status;
  453. this.orderNo = option.orderNo;
  454. if (this.status376 == 6) {
  455. this.disabled = true;
  456. }
  457. this.getData();
  458. this.getLoadFeeItemsfun()
  459. },
  460. methods: {
  461. radioClick(index) {
  462. for (var i = 0; i < this.radios.length; i++) {
  463. if (i == index) {
  464. if (index == 0) {
  465. this.radios[i].checked = true
  466. this.formData.oilfilLed = 'T'
  467. } else if (index == 1) {
  468. this.radios[i].checked = true
  469. this.formData.oilfilLed = 'F'
  470. }
  471. } else {
  472. this.radios[i].checked = false
  473. }
  474. }
  475. console.log(this.formData.oilfilLed);
  476. },
  477. change(item) {
  478. this.isTabs = item.name;
  479. },
  480. auditTClick() {
  481. this.formData.audit2Desc = "审核通过"
  482. this.auditTShow = true
  483. },
  484. auditFClick() {
  485. this.formData.audit2Desc = null
  486. this.auditFShow = true
  487. },
  488. getData() {
  489. // 报销费用下拉选
  490. getGasStations().then(res => {
  491. // this.gasStationList = res.data
  492. for (var item in res.data) {
  493. var data = {
  494. text: res.data[item].cname,
  495. value: res.data[item].cname
  496. };
  497. this.gasStationList.push(data);
  498. }
  499. getItems().then(res => {
  500. this.itemsList = res.data
  501. })
  502. })
  503. },
  504. getLoadFeeItemsfun(){
  505. getLoadFeeItems(this.orderNo).then(res => {
  506. res.data.loadetc == 0 ? res.data.loadetc = null : res.data.loadetc
  507. res.data.loadtoll == 0 ? res.data.loadtoll = null : res.data.loadtoll
  508. res.data.oilhomeQty == 0 ? res.data.oilhomeQty = null : res.data.oilhomeQty
  509. res.data.oilhomeAmt == 0 ? res.data.oilhomeAmt = null : res.data.oilhomeAmt
  510. res.data.oilappoint1Qty == 0 ? res.data.oilappoint1Qty = null : res.data.oilappoint1Qty
  511. res.data.oilappoint1Amt == 0 ? res.data.oilappoint1Amt = null : res.data.oilappoint1Amt
  512. res.data.oilappoint2Qty == 0 ? res.data.oilappoint2Qty = null : res.data.oilappoint2Qty
  513. res.data.oilappoint2Amt == 0 ? res.data.oilappoint2Amt = null : res.data.oilappoint2Amt
  514. res.data.oilappoint3Qty == 0 ? res.data.oilappoint3Qty = null : res.data.oilappoint3Qty
  515. res.data.oilappoint3Amt == 0 ? res.data.oilappoint3Amt = null : res.data.oilappoint3Amt
  516. res.data.oilcash1Qty == 0 ? res.data.oilcash1Qty = null : res.data.oilcash1Qty
  517. res.data.oilcash1Amt == 0 ? res.data.oilcash1Amt = null : res.data.oilcash1Amt
  518. res.data.oilcardQty == 0 ? res.data.oilcardQty = null : res.data.oilcardQty
  519. res.data.oilcardAmt == 0 ? res.data.oilcardAmt = null : res.data.oilcardAmt
  520. res.data.detourEmptyMile == 0 ? res.data.detourEmptyMile = null : res.data.detourEmptyMile
  521. res.data.detourLoadMile == 0 ? res.data.detourLoadMile = null : res.data.detourLoadMile
  522. res.data.repairamt == 0 ? res.data.repairamt = null : res.data.repairamt
  523. if (res.data.oilfilLed != null) {
  524. if (res.data.oilfilLed == 'F') {
  525. this.radios[1].checked = true
  526. } else if (res.data.oilfilLed == 'T') {
  527. this.radios[0].checked = true
  528. }
  529. }
  530. for (let item of this.itemsList) {
  531. if (item == 0) {
  532. item.amt = null
  533. }
  534. }
  535. // // 角色
  536. for (let role of res.data.roleList) {
  537. if (role == 'DZ') {
  538. this.button = false;
  539. this.disabled = true;
  540. }
  541. if (role == 'JSY') {
  542. this.button = true;
  543. this.disabled = false;
  544. }
  545. }
  546. // 审核中
  547. if (
  548. res.data.ifStarted == "S") {
  549. this.disabled = true;
  550. this.saveDisabled = true;
  551. this.upDisabled = true;
  552. this.sDisabled = false;
  553. }
  554. // 审核完成
  555. if (
  556. res.data.ifStarted == "A") {
  557. this.disabled = true;
  558. this.saveDisabled = true;
  559. this.upDisabled = true;
  560. }
  561. // 未提交
  562. // if (res.data.ifLoaded != "T" ||
  563. // res.data.ifUnLoaded != "T") {
  564. // this.disabled = false;
  565. // this.saveDisabled = false;
  566. // this.upDisabled = true;
  567. // }
  568. if ((res.data.detourEmptyMile != null && res.data.detourEmptyMile != 0) || (res.data.detourLoadMile != null && res.data.detourLoadMile != 0)) {
  569. for (var i = 0; i < this.tabs.length; i++) {
  570. if (this.tabs[i].name === '行程绕路') {
  571. this.tabs[i].badge.isDot = true;
  572. }
  573. }
  574. }
  575. this.formData = res.data;
  576. var costBreakdownList = res.data.loadFeeItemsList;
  577. this.itemsList = costBreakdownList;
  578. for (const key in this.itemsList) {
  579. if (this.itemsList[key].amt == 0) {
  580. this.itemsList[key].amt = null;
  581. }
  582. }
  583. this.fileList1 = res.data.fileList1;
  584. this.loading = false;
  585. // isMileage(this.orderNo).then(res => {
  586. // if (res.msg == 410) {
  587. // // this.disabled = true;
  588. // // this.upDisabled = true;
  589. // // this.$refs.uToast.show({
  590. // // type: 'warning',
  591. // // icon: false,
  592. // // message: "当前报单有待提交里程!",
  593. // // iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  594. // // })
  595. // }
  596. // })
  597. // this.calculatMoney();
  598. })
  599. },
  600. // 事件审核按钮
  601. upButtonClick(type) {
  602. if(this.formData.loadQty == null) {
  603. this.$refs.uToast.show({
  604. type: 'warning',
  605. icon: false,
  606. message: "没有装车吨位!",
  607. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  608. })
  609. return
  610. } else if(this.formData.loadDate == null) {
  611. this.$refs.uToast.show({
  612. type: 'warning',
  613. icon: false,
  614. message: "没有装车时间!",
  615. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  616. })
  617. return
  618. } else if(this.formData.oilfilLed == null || this.formData.oilfilLed == '') {
  619. this.$refs.uToast.show({
  620. type: 'warning',
  621. icon: false,
  622. message: "请选择是否加满",
  623. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  624. })
  625. return false
  626. } else if(this.formData.unLoadQty == null) {
  627. this.$refs.uToast.show({
  628. type: 'warning',
  629. icon: false,
  630. message: "没有卸车吨位!",
  631. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  632. })
  633. return
  634. } else if(this.formData.unLoadDate == null) {
  635. this.$refs.uToast.show({
  636. type: 'warning',
  637. icon: false,
  638. message: "没有卸车时间!",
  639. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  640. })
  641. return
  642. } else if (this.formData.ifOrder2ed == 'F') {
  643. this.upAuditShow = false;
  644. this.$refs.uToast.show({
  645. type: 'warning',
  646. icon: false,
  647. message: "装卸信息提交后才能报账!",
  648. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  649. })
  650. return
  651. } else if (this.formData.ifOrder2ed != 'O' && this.formData.ifOrder2ed != 'S') {
  652. this.upAuditShow = false;
  653. this.$refs.uToast.show({
  654. type: 'warning',
  655. icon: false,
  656. message: "请先提交卸车信息!",
  657. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  658. })
  659. return
  660. }
  661. if (this.formData.gasstation1 != null && this.formData.gasstation1 != '') {
  662. if (this.formData.oilappoint1Qty == 0) {
  663. this.$refs.uToast.show({
  664. type: 'warning',
  665. icon: false,
  666. message: "升数不可以是0",
  667. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  668. })
  669. return
  670. }
  671. if (this.formData.oilappoint1Amt == 0) {
  672. this.$refs.uToast.show({
  673. type: 'warning',
  674. icon: false,
  675. message: "金额不可以是0",
  676. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  677. })
  678. return
  679. }
  680. if (this.formData.oilappoint1Qty == null || this.formData.oilappoint1Qty == '') {
  681. this.$refs.uToast.show({
  682. type: 'warning',
  683. icon: false,
  684. message: "请输入定点加油1的升数",
  685. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  686. })
  687. return
  688. }
  689. if (this.formData.oilappoint1Amt == null || this.formData.oilappoint1Amt == '') {
  690. this.$refs.uToast.show({
  691. type: 'warning',
  692. icon: false,
  693. message: "请输入定点加油1的金额",
  694. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  695. })
  696. return
  697. }
  698. }
  699. if (this.formData.gasstation2 != null && this.formData.gasstation2 != '') {
  700. if (this.formData.oilappoint2Qty == 0) {
  701. this.$refs.uToast.show({
  702. type: 'warning',
  703. icon: false,
  704. message: "升数不可以是0",
  705. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  706. })
  707. return
  708. }
  709. if (this.formData.oilappoint2Amt == 0) {
  710. this.$refs.uToast.show({
  711. type: 'warning',
  712. icon: false,
  713. message: "金额不可以是0",
  714. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  715. })
  716. return
  717. }
  718. if (this.formData.oilappoint2Qty == null || this.formData.oilappoint2Qty == '') {
  719. this.$refs.uToast.show({
  720. type: 'warning',
  721. icon: false,
  722. message: "请输入定点加油2的升数",
  723. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  724. })
  725. return
  726. }
  727. if (this.formData.oilappoint2Amt == null || this.formData.oilappoint2Amt == '') {
  728. this.$refs.uToast.show({
  729. type: 'warning',
  730. icon: false,
  731. message: "请输入定点加油2的金额",
  732. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  733. })
  734. return
  735. }
  736. }
  737. if (this.formData.gasstation3 != null && this.formData.gasstation3 != '') {
  738. if (this.formData.oilappoint3Qty == 0) {
  739. this.$refs.uToast.show({
  740. type: 'warning',
  741. icon: false,
  742. message: "升数不可以是0",
  743. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  744. })
  745. return
  746. }
  747. if (this.formData.oilappoint3Amt == 0) {
  748. this.$refs.uToast.show({
  749. type: 'warning',
  750. icon: false,
  751. message: "金额不可以是0",
  752. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  753. })
  754. return
  755. }
  756. if (this.formData.oilappoint3Qty == null || this.formData.oilappoint3Qty == '') {
  757. this.$refs.uToast.show({
  758. type: 'warning',
  759. icon: false,
  760. message: "请输入定点加油3的升数",
  761. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  762. })
  763. return
  764. }
  765. if (this.formData.oilappoint3Amt == null || this.formData.oilappoint3Amt == '') {
  766. this.$refs.uToast.show({
  767. type: 'warning',
  768. icon: false,
  769. message: "请输入定点加油3的金额",
  770. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  771. })
  772. return
  773. }
  774. }
  775. if (type == 'BX') {
  776. this.submitShow = true
  777. } else if (type == 'TJ') {
  778. this.upAuditShow = true
  779. }
  780. },
  781. submitVerify() {
  782. if (this.formData.oilfilLed == null || this.formData.oilfilLed == '') {
  783. this.$refs.uToast.show({
  784. type: 'warning',
  785. icon: false,
  786. message: "请选择是否加满",
  787. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  788. })
  789. return false
  790. }
  791. if (this.formData.gasstation1 != null && this.formData.gasstation1 != '') {
  792. if (this.formData.oilappoint1Qty == 0) {
  793. this.$refs.uToast.show({
  794. type: 'warning',
  795. icon: false,
  796. message: "升数不可以是0",
  797. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  798. })
  799. return false
  800. }
  801. if (this.formData.oilappoint1Amt == 0) {
  802. this.$refs.uToast.show({
  803. type: 'warning',
  804. icon: false,
  805. message: "金额不可以是0",
  806. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  807. })
  808. return false
  809. }
  810. if (this.formData.oilappoint1Qty == null || this.formData.oilappoint1Qty == '') {
  811. this.$refs.uToast.show({
  812. type: 'warning',
  813. icon: false,
  814. message: "请输入定点加油1的升数",
  815. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  816. })
  817. return false
  818. }
  819. if (this.formData.oilappoint1Amt == null || this.formData.oilappoint1Amt == '') {
  820. this.$refs.uToast.show({
  821. type: 'warning',
  822. icon: false,
  823. message: "请输入定点加油1的金额",
  824. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  825. })
  826. return false
  827. }
  828. }
  829. if (this.formData.gasstation2 != null && this.formData.gasstation2 != '') {
  830. if (this.formData.oilappoint2Qty == 0) {
  831. this.$refs.uToast.show({
  832. type: 'warning',
  833. icon: false,
  834. message: "升数不可以是0",
  835. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  836. })
  837. return false
  838. }
  839. if (this.formData.oilappoint2Amt == 0) {
  840. this.$refs.uToast.show({
  841. type: 'warning',
  842. icon: false,
  843. message: "金额不可以是0",
  844. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  845. })
  846. return false
  847. }
  848. if (this.formData.oilappoint2Qty == null || this.formData.oilappoint2Qty == '') {
  849. this.$refs.uToast.show({
  850. type: 'warning',
  851. icon: false,
  852. message: "请输入定点加油2的升数",
  853. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  854. })
  855. return false
  856. }
  857. if (this.formData.oilappoint2Amt == null || this.formData.oilappoint2Amt == '') {
  858. this.$refs.uToast.show({
  859. type: 'warning',
  860. icon: false,
  861. message: "请输入定点加油2的金额",
  862. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  863. })
  864. return false
  865. }
  866. }
  867. if (this.formData.gasstation3 != null && this.formData.gasstation3 != '') {
  868. if (this.formData.oilappoint3Qty == 0) {
  869. this.$refs.uToast.show({
  870. type: 'warning',
  871. icon: false,
  872. message: "升数不可以是0",
  873. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  874. })
  875. return false
  876. }
  877. if (this.formData.oilappoint3Amt == 0) {
  878. this.$refs.uToast.show({
  879. type: 'warning',
  880. icon: false,
  881. message: "金额不可以是0",
  882. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  883. })
  884. return false
  885. }
  886. if (this.formData.oilappoint3Qty == null || this.formData.oilappoint3Qty == '') {
  887. this.$refs.uToast.show({
  888. type: 'warning',
  889. icon: false,
  890. message: "请输入定点加油3的升数",
  891. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  892. })
  893. return false
  894. }
  895. if (this.formData.oilappoint3Amt == null || this.formData.oilappoint3Amt == '') {
  896. this.$refs.uToast.show({
  897. type: 'warning',
  898. icon: false,
  899. message: "请输入定点加油3的金额",
  900. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  901. })
  902. return false
  903. }
  904. }
  905. // else if (this.status376 == 6) {
  906. // this.$refs.uToast.show({
  907. // type: 'warning',
  908. // icon: false,
  909. // message: "不允许保存!",
  910. // iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  911. // })
  912. // return false
  913. // }
  914. this.submitShow = true
  915. return true
  916. },
  917. // 保存内容
  918. submit() {
  919. // if ((this.status376 == 2 || this.status376 == 0)) {
  920. if (true) {
  921. let isMo = false;
  922. for (const key in this.itemsList) {
  923. if (this.itemsList[key].amt == null) {
  924. this.itemsList[key].amt = 0;
  925. }
  926. }
  927. if (this.formData.loadetc == null) {
  928. this.formData.loadetc = 0;
  929. }
  930. if (this.formData.loadtoll == null) {
  931. this.formData.loadtoll = 0;
  932. }
  933. if (this.formData.oilhomeQty == null) {
  934. this.formData.oilhomeQty = 0;
  935. }
  936. if (this.formData.oilhomeAmt == null) {
  937. this.formData.oilhomeAmt = 0;
  938. }
  939. if (this.formData.oilappoint1Qty == null) {
  940. this.formData.oilappoint1Qty = 0;
  941. }
  942. if (this.formData.oilappoint1Amt == null) {
  943. this.formData.oilappoint1Amt = 0;
  944. }
  945. if (this.formData.oilappoint2Qty == null) {
  946. this.formData.oilappoint2Qty = 0;
  947. }
  948. if (this.formData.oilappoint2Amt == null) {
  949. this.formData.oilappoint2Amt = 0;
  950. }
  951. if (this.formData.oilappoint3Qty == null) {
  952. this.formData.oilappoint3Qty = 0;
  953. }
  954. if (this.formData.oilappoint3Amt == null) {
  955. this.formData.oilappoint3Amt = 0;
  956. }
  957. if (this.formData.oilcash1Qty == null) {
  958. this.formData.oilcash1Qty = 0;
  959. }
  960. if (this.formData.oilcash1Amt == null) {
  961. this.formData.oilcash1Amt = 0;
  962. }
  963. if (this.formData.oilcardQty == null) {
  964. this.formData.oilcardQty = 0;
  965. }
  966. if (this.formData.oilcardAmt == null) {
  967. this.formData.oilcardAmt = 0;
  968. }
  969. if (this.formData.gasstation1 == null) {
  970. this.formData.gasstation1 = 0;
  971. }
  972. if (this.formData.gasstation2 == null) {
  973. this.formData.gasstation2 = 0;
  974. }
  975. if (this.formData.gasstation3 == null) {
  976. this.formData.gasstation3 = 0;
  977. }
  978. if (this.formData.repairamt == null) {
  979. this.formData.repairamt = 0;
  980. }
  981. this.loading = true;
  982. // var list = [];
  983. // for (var item in this.itemsList) {
  984. // var amt = this.itemsList[item].amt;
  985. // if (amt != null) {
  986. // var items = this.itemsList[item];
  987. // list.push(items);
  988. // }
  989. // }
  990. // for (let item of this.itemsList) {
  991. // if (item == 0) {
  992. // item.amt = null
  993. // }
  994. // }
  995. // this.formData.itemsVoList = list;
  996. this.formData.itemsVoList = this.itemsList;
  997. insertLoadFeeItems(this.formData).then(res => {
  998. this.submitShow = false;
  999. if (res.code == 200) {
  1000. // 报销费用下拉选
  1001. getGasStations().then(res => {
  1002. // this.gasStationList = res.data
  1003. for (var item in res.data) {
  1004. var data = {
  1005. text: res.data[item].cname,
  1006. value: res.data[item].cname
  1007. };
  1008. this.gasStationList.push(data);
  1009. }
  1010. getItems().then(res => {
  1011. this.itemsList = res.data
  1012. getLoadFeeItems(this.orderNo).then(res => {
  1013. res.data.loadetc == 0 ? res.data.loadetc = null : res.data.loadetc
  1014. res.data.loadtoll == 0 ? res.data.loadtoll = null : res.data.loadtoll
  1015. res.data.oilhomeQty == 0 ? res.data.oilhomeQty = null : res.data.oilhomeQty
  1016. res.data.oilhomeAmt == 0 ? res.data.oilhomeAmt = null : res.data.oilhomeAmt
  1017. res.data.oilappoint1Qty == 0 ? res.data.oilappoint1Qty = null : res.data.oilappoint1Qty
  1018. res.data.oilappoint1Amt == 0 ? res.data.oilappoint1Amt = null : res.data.oilappoint1Amt
  1019. res.data.oilappoint2Qty == 0 ? res.data.oilappoint2Qty = null : res.data.oilappoint2Qty
  1020. res.data.oilappoint2Amt == 0 ? res.data.oilappoint2Amt = null : res.data.oilappoint2Amt
  1021. res.data.oilappoint3Qty == 0 ? res.data.oilappoint3Qty = null : res.data.oilappoint3Qty
  1022. res.data.oilappoint3Amt == 0 ? res.data.oilappoint3Amt = null : res.data.oilappoint3Amt
  1023. res.data.oilcash1Qty == 0 ? res.data.oilcash1Qty = null : res.data.oilcash1Qty
  1024. res.data.oilcash1Amt == 0 ? res.data.oilcash1Amt = null : res.data.oilcash1Amt
  1025. res.data.oilcardQty == 0 ? res.data.oilcardQty = null : res.data.oilcardQty
  1026. res.data.oilcardAmt == 0 ? res.data.oilcardAmt = null : res.data.oilcardAmt
  1027. res.data.detourEmptyMile == 0 ? res.data.detourEmptyMile = null : res.data.detourEmptyMile
  1028. res.data.detourLoadMile == 0 ? res.data.detourLoadMile = null : res.data.detourLoadMile
  1029. res.data.repairamt == 0 ? res.data.repairamt = null : res.data.repairamt
  1030. if (res.data.oilfilLed != null) {
  1031. if (res.data.oilfilLed == 'F') {
  1032. this.radios[1].checked = true
  1033. } else if (res.data.oilfilLed == 'T') {
  1034. this.radios[0].checked = true
  1035. }
  1036. }
  1037. for (let item of this.itemsList) {
  1038. if (item == 0) {
  1039. item.amt = null
  1040. }
  1041. }
  1042. // 角色
  1043. for (let role of res.data.roleList) {
  1044. if (role == 'DZ') {
  1045. this.button = false;
  1046. }
  1047. }
  1048. // 审核中
  1049. if (
  1050. res.data.ifStarted == "S") {
  1051. this.disabled = true;
  1052. this.saveDisabled = true;
  1053. this.upDisabled = true;
  1054. this.sDisabled = false;
  1055. }
  1056. // 审核完成
  1057. if (
  1058. res.data.ifStarted == "A") {
  1059. this.disabled = true;
  1060. this.saveDisabled = true;
  1061. this.upDisabled = true;
  1062. }
  1063. // 未提交
  1064. // if (res.data.ifLoaded != "T" ||
  1065. // res.data.ifUnLoaded != "T") {
  1066. // this.disabled = false;
  1067. // this.saveDisabled = false;
  1068. // this.upDisabled = true;
  1069. // }
  1070. this.formData = res.data;
  1071. var costBreakdownList = res.data.loadFeeItemsList;
  1072. this.itemsList = costBreakdownList;
  1073. for (const key in this.itemsList) {
  1074. if (this.itemsList[key].amt == 0) {
  1075. this.itemsList[key].amt = null;
  1076. }
  1077. }
  1078. this.fileList1 = res.data.fileList1;
  1079. this.$refs.uToast.show({
  1080. type: 'success',
  1081. message: "保存成功!",
  1082. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  1083. })
  1084. this.loading = false;
  1085. })
  1086. })
  1087. })
  1088. // this.getData();
  1089. // 保存成功弹窗提示
  1090. // this.$refs.uToast.show({
  1091. // type: 'success',
  1092. // message: "保存成功!",
  1093. // iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  1094. // })
  1095. } else {
  1096. // 保存失败消息
  1097. this.$refs.uToast.show({
  1098. icon: false,
  1099. message: "保存失败请重试!",
  1100. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
  1101. })
  1102. }
  1103. })
  1104. }
  1105. },
  1106. // 提交审核
  1107. upReview() {
  1108. // if (this.status376 == 6) {
  1109. // this.upAuditShow = false;
  1110. // this.$refs.uToast.show({
  1111. // type: 'warning',
  1112. // icon: false,
  1113. // message: "不允许保存!",
  1114. // iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  1115. // })
  1116. // } else if (this.status376 == 2 || this.status376 == 0) {
  1117. if (this.formData.ifOrder2ed != 'O' && this.formData.ifOrder2ed != 'S') {
  1118. this.upAuditShow = false;
  1119. this.$refs.uToast.show({
  1120. type: 'warning',
  1121. icon: false,
  1122. message: "请先提交报账单!",
  1123. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  1124. })
  1125. } else if (this.formData.ifOrder2ed == 'O' || this.formData.ifOrder2ed == 'S') {
  1126. let isMo = false;
  1127. for (const key in this.itemsList) {
  1128. if (this.itemsList[key].amt == null) {
  1129. this.itemsList[key].amt = 0;
  1130. }
  1131. }
  1132. if (this.formData.loadetc == null) {
  1133. this.formData.loadetc = 0;
  1134. }
  1135. if (this.formData.loadtoll == null) {
  1136. this.formData.loadtoll = 0;
  1137. }
  1138. if (this.formData.oilhomeQty == null) {
  1139. this.formData.oilhomeQty = 0;
  1140. }
  1141. if (this.formData.oilhomeAmt == null) {
  1142. this.formData.oilhomeAmt = 0;
  1143. }
  1144. if (this.formData.oilappoint1Qty == null) {
  1145. this.formData.oilappoint1Qty = 0;
  1146. }
  1147. if (this.formData.oilappoint1Amt == null) {
  1148. this.formData.oilappoint1Amt = 0;
  1149. }
  1150. if (this.formData.oilappoint2Qty == null) {
  1151. this.formData.oilappoint2Qty = 0;
  1152. }
  1153. if (this.formData.oilappoint2Amt == null) {
  1154. this.formData.oilappoint2Amt = 0;
  1155. }
  1156. if (this.formData.oilappoint3Qty == null) {
  1157. this.formData.oilappoint3Qty = 0;
  1158. }
  1159. if (this.formData.oilappoint3Amt == null) {
  1160. this.formData.oilappoint3Amt = 0;
  1161. }
  1162. if (this.formData.oilcash1Qty == null) {
  1163. this.formData.oilcash1Qty = 0;
  1164. }
  1165. if (this.formData.oilcash1Amt == null) {
  1166. this.formData.oilcash1Amt = 0;
  1167. }
  1168. if (this.formData.oilcardQty == null) {
  1169. this.formData.oilcardQty = 0;
  1170. }
  1171. if (this.formData.oilcardAmt == null) {
  1172. this.formData.oilcardAmt = 0;
  1173. }
  1174. if (this.formData.gasstation1 == null) {
  1175. this.formData.gasstation1 = 0;
  1176. }
  1177. if (this.formData.gasstation2 == null) {
  1178. this.formData.gasstation2 = 0;
  1179. }
  1180. if (this.formData.gasstation3 == null) {
  1181. this.formData.gasstation3 = 0;
  1182. }
  1183. if (this.formData.repairamt == null) {
  1184. this.formData.repairamt = 0;
  1185. }
  1186. this.loading = true;
  1187. // var list = [];
  1188. // for (var item in this.itemsList) {
  1189. // var amt = this.itemsList[item].amt;
  1190. // if (amt != null) {
  1191. // var items = this.itemsList[item];
  1192. // list.push(items);
  1193. // }
  1194. // }
  1195. this.formData.itemsVoList = this.itemsList;
  1196. submitAudit(this.formData).then(res => {
  1197. this.submitShow = false
  1198. this.upAuditShow = false;
  1199. if (res.msg == 'ok') {
  1200. getGasStations().then(res => {
  1201. for (var item in res.data) {
  1202. var data = {
  1203. text: res.data[item].cname,
  1204. value: res.data[item].cname
  1205. };
  1206. this.gasStationList.push(data);
  1207. }
  1208. getItems().then(res => {
  1209. this.itemsList = res.data
  1210. getLoadFeeItems(this.orderNo).then(res => {
  1211. res.data.loadetc == 0 ? res.data.loadetc = null : res.data.loadetc
  1212. res.data.loadtoll == 0 ? res.data.loadtoll = null : res.data.loadtoll
  1213. res.data.oilhomeQty == 0 ? res.data.oilhomeQty = null : res.data.oilhomeQty
  1214. res.data.oilhomeAmt == 0 ? res.data.oilhomeAmt = null : res.data.oilhomeAmt
  1215. res.data.oilappoint1Qty == 0 ? res.data.oilappoint1Qty = null : res.data.oilappoint1Qty
  1216. res.data.oilappoint1Amt == 0 ? res.data.oilappoint1Amt = null : res.data.oilappoint1Amt
  1217. res.data.oilappoint2Qty == 0 ? res.data.oilappoint2Qty = null : res.data.oilappoint2Qty
  1218. res.data.oilappoint2Amt == 0 ? res.data.oilappoint2Amt = null : res.data.oilappoint2Amt
  1219. res.data.oilappoint3Qty == 0 ? res.data.oilappoint3Qty = null : res.data.oilappoint3Qty
  1220. res.data.oilappoint3Amt == 0 ? res.data.oilappoint3Amt = null : res.data.oilappoint3Amt
  1221. res.data.oilcash1Qty == 0 ? res.data.oilcash1Qty = null : res.data.oilcash1Qty
  1222. res.data.oilcash1Amt == 0 ? res.data.oilcash1Amt = null : res.data.oilcash1Amt
  1223. res.data.oilcardQty == 0 ? res.data.oilcardQty = null : res.data.oilcardQty
  1224. res.data.oilcardAmt == 0 ? res.data.oilcardAmt = null : res.data.oilcardAmt
  1225. res.data.detourEmptyMile == 0 ? res.data.detourEmptyMile = null : res.data.detourEmptyMile
  1226. res.data.detourLoadMile == 0 ? res.data.detourLoadMile = null : res.data.detourLoadMile
  1227. res.data.repairamt == 0 ? res.data.repairamt = null : res.data.repairamt
  1228. if (res.data.oilfilLed != null) {
  1229. if (res.data.oilfilLed == 'F') {
  1230. this.radios[1].checked = true
  1231. } else if (res.data.oilfilLed == 'T') {
  1232. this.radios[0].checked = true
  1233. }
  1234. }
  1235. for (let item of this.itemsList) {
  1236. if (item == 0) {
  1237. item.amt = null
  1238. }
  1239. }
  1240. // 角色
  1241. for (let role of res.data.roleList) {
  1242. if (role == 'DZ') {
  1243. this.button = false;
  1244. }
  1245. }
  1246. // 审核中
  1247. if (
  1248. res.data.ifStarted == "S") {
  1249. this.disabled = true;
  1250. this.saveDisabled = true;
  1251. this.upDisabled = true;
  1252. this.sDisabled = false;
  1253. }
  1254. // 审核完成
  1255. if (
  1256. res.data.ifStarted == "A") {
  1257. this.disabled = true;
  1258. this.saveDisabled = true;
  1259. this.upDisabled = true;
  1260. }
  1261. // 未提交
  1262. // if (res.data.ifLoaded != "T" ||
  1263. // res.data.ifUnLoaded != "T") {
  1264. // this.disabled = false;
  1265. // this.saveDisabled = false;
  1266. // this.upDisabled = true;
  1267. // }
  1268. this.formData = res.data;
  1269. var costBreakdownList = res.data.loadFeeItemsList;
  1270. this.itemsList = costBreakdownList;
  1271. for (const key in this.itemsList) {
  1272. if (this.itemsList[key].amt == 0) {
  1273. this.itemsList[key].amt = null;
  1274. }
  1275. }
  1276. this.fileList1 = res.data.fileList1;
  1277. this.$refs.uToast.show({
  1278. type: 'success',
  1279. message: "提交审核成功!",
  1280. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  1281. })
  1282. this.loading = false;
  1283. })
  1284. })
  1285. })
  1286. // this.getData();
  1287. // // 保存成功弹窗提示
  1288. // this.$refs.uToast.show({
  1289. // type: 'success',
  1290. // message: "提交审核成功!",
  1291. // iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  1292. // })
  1293. } else {
  1294. // 保存失败消息
  1295. this.$refs.uToast.show({
  1296. icon: false,
  1297. message: "提交审核失败请重试!",
  1298. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
  1299. })
  1300. }
  1301. })
  1302. }
  1303. },
  1304. // 审核
  1305. check(type) {
  1306. this.loading = true;
  1307. var data = {
  1308. orderNo: this.orderNo,
  1309. entityId: this.formData.entityId,
  1310. audit2Desc: this.formData.audit2Desc ? this.formData.audit2Desc : '',
  1311. lineNo: this.formData.lineNo,
  1312. auditType: type
  1313. }
  1314. audit(data).then(res => {
  1315. if (res.msg == 'ok') {
  1316. this.getData();
  1317. this.sDisabled = false;
  1318. if (type == 'T') {
  1319. this.auditTShow = false;
  1320. } else if (type == 'F') {
  1321. this.auditFShow = false;
  1322. }
  1323. // 保存成功弹窗提示
  1324. this.$refs.uToast.show({
  1325. type: 'success',
  1326. message: "审核成功!",
  1327. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  1328. })
  1329. this.sDisabled = true;
  1330. this.loading = false;
  1331. } else {
  1332. // 保存失败消息
  1333. this.$refs.uToast.show({
  1334. icon: false,
  1335. message: "审核失败请重试!",
  1336. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
  1337. })
  1338. this.loading = false;
  1339. }
  1340. })
  1341. },
  1342. // 删除图片
  1343. deletePic(event) {
  1344. if (this.disabled) {
  1345. this.$refs.uToast.show({
  1346. type: 'warning',
  1347. icon: false,
  1348. message: "不允许修改!",
  1349. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  1350. })
  1351. } else {
  1352. this.event = event;
  1353. this.deleteShow = true;
  1354. }
  1355. },
  1356. deleteImg() {
  1357. var event = this.event;
  1358. var url = event.file.url;
  1359. var index = url.lastIndexOf("\/");
  1360. var attachId = url.substring(index + 1, url.length);
  1361. deleteTmsAttachMngs(attachId).then(res => {
  1362. if (res.code == 200) {
  1363. this[`fileList${event.name}`].splice(event.index, 1)
  1364. // 删除成功消息
  1365. this.$refs.uToast.show({
  1366. type: 'success',
  1367. message: "删除成功!",
  1368. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  1369. })
  1370. } else {
  1371. // 删除失败消息
  1372. this.$refs.uToast.show({
  1373. icon: false,
  1374. message: "删除失败请重试!",
  1375. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
  1376. })
  1377. }
  1378. this.event = {};
  1379. this.deleteShow = false;
  1380. })
  1381. },
  1382. // 新增图片
  1383. imgUploading(event, nameType) {
  1384. // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
  1385. let lists = [].concat(event.file)
  1386. let fileListLen = this[`fileList${event.name}`].length
  1387. lists.map((item) => {
  1388. this[`fileList${event.name}`].push({
  1389. ...item,
  1390. status: 'uploading',
  1391. message: '上传中'
  1392. })
  1393. })
  1394. for (let i = 0; i < lists.length; i++) {
  1395. let date = this.dateToString("yyyyMMdd");
  1396. let dateHHmmss = this.dateToString("yyyy-MM-dd HH:mm:ss");
  1397. this.formData.date = date;
  1398. let reqData = this.formData
  1399. reqData.attachdesc = nameType
  1400. insertTmsAttachMngs(reqData).then(res => {
  1401. if (res.code == 200) {
  1402. uni.compressImage({
  1403. src: lists[i].url,
  1404. quality: 80,
  1405. success: ress => {
  1406. let data = {
  1407. name: 'avatarfile',
  1408. filePath: ress.tempFilePath
  1409. }
  1410. // 获取经纬度
  1411. let longitude = '';
  1412. let latitude = '';
  1413. uni.getLocation({
  1414. type: 'wgs84',
  1415. isHighAccuracy: true,
  1416. geocode: true,
  1417. fail: () => {
  1418. this.fileList1.pop();
  1419. this.$refs.uToast.show({
  1420. type: 'warning',
  1421. icon: false,
  1422. message: "请打开定位!",
  1423. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  1424. })
  1425. return
  1426. },
  1427. success: (map) => {
  1428. longitude = map.longitude
  1429. latitude = map.latitude
  1430. let dataForm = {
  1431. attachId: res.data,
  1432. longitude: longitude,
  1433. latitude: latitude,
  1434. updateDate: dateHHmmss,
  1435. carRegNo:this.formData.carRegNo
  1436. }
  1437. // 上传图片
  1438. pictureUploading(data, dataForm).then(res => {
  1439. let item = this[`fileList${event.name}`][fileListLen]
  1440. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(
  1441. item, {
  1442. status: 'success',
  1443. message: '',
  1444. url: res.data
  1445. }))
  1446. fileListLen++
  1447. })
  1448. }
  1449. });
  1450. }
  1451. })
  1452. }
  1453. })
  1454. }
  1455. },
  1456. dateToString(fmt) {
  1457. var date = new Date();
  1458. var o = {
  1459. "M+": date.getMonth() + 1, //月份
  1460. "d+": date.getDate(), //日
  1461. "H+": date.getHours(), //小时
  1462. "m+": date.getMinutes(), //分
  1463. "s+": date.getSeconds(), //秒
  1464. "q+": Math.floor((date.getMonth() + 3) / 3), //季度
  1465. "S": date.getMilliseconds() //毫秒
  1466. };
  1467. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
  1468. for (var k in o)
  1469. if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[
  1470. k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  1471. return fmt;
  1472. },
  1473. // 定点加油1清空
  1474. gasstation1Change() {
  1475. this.formData.oilappoint1Qty = null;
  1476. this.formData.oilappoint1Amt = null;
  1477. },
  1478. // 定点加油2清空
  1479. gasstation2Change() {
  1480. this.formData.oilappoint2Qty = null;
  1481. this.formData.oilappoint2Amt = null;
  1482. },
  1483. // 定点加油3清空
  1484. gasstation3Change() {
  1485. this.formData.oilappoint3Qty = null;
  1486. this.formData.oilappoint3Amt = null;
  1487. },
  1488. // 点击拨打电话
  1489. telFun() {
  1490. if (this.formData.driver1mobile != null && this.formData.driver1mobile != '') {
  1491. uni.makePhoneCall({
  1492. phoneNumber: this.formData.driver1mobile, //电话号码
  1493. success: function(e) {
  1494. // console.log(e);
  1495. },
  1496. fail: function(e) {
  1497. // console.log(e);
  1498. }
  1499. })
  1500. }
  1501. },
  1502. // 其他费用表格勾选事件
  1503. selectionChange(e) {
  1504. this.selectedIndexs = e.detail.index;
  1505. },
  1506. // 计算报销金额
  1507. calculatMoney() {
  1508. let loadetc = this.formData.loadetc == null ? 0 : this.formData.loadetc;
  1509. let loadtoll = this.formData.loadtoll == null ? 0 : this.formData.loadtoll;
  1510. let oilhomeAmt = this.formData.oilhomeAmt == null ? 0 : this.formData.oilhomeAmt;
  1511. let oilappoint1Amt = this.formData.oilappoint1Amt == null ? 0 : this.formData.oilappoint1Amt;
  1512. let oilappoint2Amt = this.formData.oilappoint2Amt == null ? 0 : this.formData.oilappoint2Amt;
  1513. let oilappoint3Amt = this.formData.oilappoint3Amt == null ? 0 : this.formData.oilappoint3Amt;
  1514. let oilcash1Amt = this.formData.oilcash1Amt == null ? 0 : this.formData.oilcash1Amt;
  1515. let oilcardAmt = this.formData.oilcardAmt == null ? 0 : this.formData.oilcardAmt;
  1516. let itemsMoney = 0;
  1517. for (const key in this.itemsList) {
  1518. let a = this.itemsList[key].amt == null ? 0 : this.itemsList[key].amt;
  1519. itemsMoney += Number(a);
  1520. }
  1521. loadetc = Number(loadetc)
  1522. loadtoll = Number(loadtoll)
  1523. oilhomeAmt = Number(oilhomeAmt)
  1524. oilappoint1Amt = Number(oilappoint1Amt)
  1525. oilappoint2Amt = Number(oilappoint2Amt)
  1526. oilappoint3Amt = Number(oilappoint3Amt)
  1527. oilcash1Amt = Number(oilcash1Amt)
  1528. oilcardAmt = Number(oilcardAmt)
  1529. itemsMoney = Number(itemsMoney)
  1530. this.money = loadetc + loadtoll + oilhomeAmt + oilappoint1Amt + oilappoint2Amt + oilcash1Amt + oilcardAmt +
  1531. oilappoint3Amt + itemsMoney;
  1532. },
  1533. checkUnLoadetc(e) {
  1534. //正则表达试
  1535. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1536. //重新赋值给input
  1537. this.$nextTick(() => {
  1538. this.formData.loadetc = e.target.value
  1539. })
  1540. this.calculatMoney();
  1541. },
  1542. checkUnLoadtoll(e) {
  1543. //正则表达试
  1544. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1545. //重新赋值给input
  1546. this.$nextTick(() => {
  1547. this.formData.loadtoll = e.target.value
  1548. })
  1549. this.calculatMoney();
  1550. },
  1551. checkUnOilhomeQty(e) {
  1552. //正则表达试
  1553. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1554. //重新赋值给input
  1555. this.$nextTick(() => {
  1556. this.formData.oilhomeQty = e.target.value
  1557. })
  1558. this.calculatMoney();
  1559. },
  1560. checkUnOilhomeAmt(e) {
  1561. //正则表达试
  1562. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1563. //重新赋值给input
  1564. this.$nextTick(() => {
  1565. this.formData.oilhomeAmt = e.target.value
  1566. })
  1567. this.calculatMoney();
  1568. },
  1569. checkUnOilappoint1Qty(e) {
  1570. //正则表达试
  1571. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1572. //重新赋值给input
  1573. this.$nextTick(() => {
  1574. this.formData.oilappoint1Qty = e.target.value
  1575. })
  1576. this.calculatMoney();
  1577. },
  1578. checkUnOilappoint1Amt(e) {
  1579. //正则表达试
  1580. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1581. //重新赋值给input
  1582. this.$nextTick(() => {
  1583. this.formData.oilappoint1Amt = e.target.value
  1584. })
  1585. this.calculatMoney();
  1586. },
  1587. checkUnOilappoint2Qty(e) {
  1588. //正则表达试
  1589. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1590. //重新赋值给input
  1591. this.$nextTick(() => {
  1592. this.formData.oilappoint2Qty = e.target.value
  1593. })
  1594. this.calculatMoney();
  1595. },
  1596. checkUnOilappoint2Amt(e) {
  1597. //正则表达试
  1598. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1599. //重新赋值给input
  1600. this.$nextTick(() => {
  1601. this.formData.oilappoint2Amt = e.target.value
  1602. })
  1603. this.calculatMoney();
  1604. },
  1605. checkUnOilappoint3Qty(e) {
  1606. //正则表达试
  1607. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1608. //重新赋值给input
  1609. this.$nextTick(() => {
  1610. this.formData.oilappoint3Qty = e.target.value
  1611. })
  1612. this.calculatMoney();
  1613. },
  1614. checkUnOilappoint3Amt(e) {
  1615. //正则表达试
  1616. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1617. //重新赋值给input
  1618. this.$nextTick(() => {
  1619. this.formData.oilappoint3Amt = e.target.value
  1620. })
  1621. this.calculatMoney();
  1622. },
  1623. checkUnOilcash1Qty(e) {
  1624. //正则表达试
  1625. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1626. //重新赋值给input
  1627. this.$nextTick(() => {
  1628. this.formData.oilcash1Qty = e.target.value
  1629. })
  1630. this.calculatMoney();
  1631. },
  1632. checkUnOilcash1Amt(e) {
  1633. //正则表达试
  1634. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1635. //重新赋值给input
  1636. this.$nextTick(() => {
  1637. this.formData.oilcash1Amt = e.target.value
  1638. })
  1639. this.calculatMoney();
  1640. },
  1641. checkUnOilcardQty(e) {
  1642. //正则表达试
  1643. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1644. //重新赋值给input
  1645. this.$nextTick(() => {
  1646. this.formData.oilcardQty = e.target.value
  1647. })
  1648. this.calculatMoney();
  1649. },
  1650. checkUnOilcardAmt(e) {
  1651. //正则表达试
  1652. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1653. //重新赋值给input
  1654. this.$nextTick(() => {
  1655. this.formData.oilcardAmt = e.target.value
  1656. })
  1657. this.calculatMoney();
  1658. },
  1659. checkUnRepairamt(e) {
  1660. //正则表达试
  1661. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1662. //重新赋值给input
  1663. this.$nextTick(() => {
  1664. this.formData.repairamt = e.target.value
  1665. })
  1666. this.calculatMoney();
  1667. },
  1668. checkUnAmt(amt, index) {
  1669. var amt = (amt.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1670. //重新赋值给input
  1671. this.$nextTick(() => {
  1672. this.itemsList[index].amt = amt
  1673. })
  1674. this.calculatMoney();
  1675. },
  1676. checkUnDetourEmptyMile(e) {
  1677. //正则表达试
  1678. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1679. //重新赋值给input
  1680. this.$nextTick(() => {
  1681. this.formData.detourEmptyMile = e.target.value
  1682. })
  1683. },
  1684. checkUnDetourLoadMile(e) {
  1685. //正则表达试
  1686. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1687. //重新赋值给input
  1688. this.$nextTick(() => {
  1689. this.formData.detourLoadMile = e.target.value
  1690. })
  1691. },
  1692. inputHeight() {
  1693. // if (this.vHeight == 0) {
  1694. this.vHeight = 600;
  1695. // } else {
  1696. // this.vHeight = 0;
  1697. // }
  1698. }
  1699. }
  1700. }
  1701. </script>
  1702. <style lang="scss">
  1703. @import url("/font/iconfont.css");
  1704. // 修改布局方向为纵向布局
  1705. .vertical-layout {
  1706. display: flex;
  1707. }
  1708. .h {
  1709. margin-top: 20rpx;
  1710. height: 100rpx;
  1711. padding-left: 40rpx;
  1712. // font-weight: 900;
  1713. border-top: 2rpx solid #f0f0f0f0;
  1714. border-bottom: 2rpx solid #f0f0f0f0;
  1715. line-height: 100rpx;
  1716. font-size: 30rpx;
  1717. color: #3c9cff;
  1718. // background-color: pink;
  1719. }
  1720. // 分割线
  1721. .striping {
  1722. width: 100%;
  1723. height: 4rpx;
  1724. background-color: #f0f0f0f0;
  1725. }
  1726. .box-box {
  1727. // padding-left: 30rpx;
  1728. padding-right: 30rpx;
  1729. }
  1730. .content {
  1731. box-sizing: border-box;
  1732. background-color: white;
  1733. .head {
  1734. color: #3c9cff;
  1735. // width: 100%;
  1736. height: 40rpx;
  1737. padding: 0 30rpx;
  1738. vertical-align: middle;
  1739. // display: table-cell;
  1740. display: flex;
  1741. align-items: flex-end;
  1742. justify-content: space-between;
  1743. box-sizing: border-box;
  1744. font-size: 34rpx;
  1745. font-weight: 700;
  1746. // background-color: red;
  1747. }
  1748. .head-no-addr {
  1749. // width: 960rpx;
  1750. height: 100rpx;
  1751. // padding-left: 30rpx;
  1752. padding: 0 30rpx;
  1753. vertical-align: middle;
  1754. color: #fff;
  1755. font-size: 34rpx;
  1756. font-weight: 700;
  1757. display: flex;
  1758. align-items: center;
  1759. justify-content: space-between;
  1760. box-sizing: border-box;
  1761. background-color: #3c9cff;
  1762. }
  1763. .box-list {
  1764. color: #3b3b3b;
  1765. width: 100%;
  1766. border-bottom: 2rpx solid #f0f0f0f0;
  1767. // padding-left: 50rpx;
  1768. // font-size: 30rpx;
  1769. color: #3b3b3b;
  1770. .icon {
  1771. // width: 100rpx;
  1772. margin-top: 50rpx;
  1773. // font-size: 50rpx;
  1774. // color: #4888ff;
  1775. }
  1776. .list {
  1777. margin-top: 30rpx;
  1778. margin-bottom: 20rpx;
  1779. width: 100%;
  1780. height: 100%;
  1781. // background-color: pink;
  1782. height: auto;
  1783. display: flex;
  1784. flex-wrap: wrap;
  1785. // font-size: 30rpx;
  1786. }
  1787. .quantity-aum {
  1788. margin-bottom: 25rpx;
  1789. .aaa {
  1790. width: 50%;
  1791. .key {
  1792. display: inline-block;
  1793. width: 50%;
  1794. margin-left: 20rpx;
  1795. // margin-right: 80rpx;
  1796. border-bottom: 2rpx dotted #000;
  1797. }
  1798. }
  1799. .bbb {
  1800. width: 50%;
  1801. .value {
  1802. width: 50%;
  1803. margin-left: 20rpx;
  1804. // margin-right: 20rpx;
  1805. border-bottom: 2rpx dotted #000;
  1806. }
  1807. }
  1808. }
  1809. }
  1810. .box {
  1811. color: #3b3b3b;
  1812. // overflow: hidden;
  1813. height: 100rpx;
  1814. // border-bottom: 2rpx solid #f0f0f0f0;
  1815. // font-size: 30rpx;
  1816. display: flex;
  1817. align-items: center;
  1818. .data {
  1819. width: 60%;
  1820. display: flex;
  1821. align-items: center;
  1822. .key {
  1823. width: 55%;
  1824. text-align: right;
  1825. color: #3c9cff;
  1826. }
  1827. .value {
  1828. margin-left: 20rpx;
  1829. width: 45%;
  1830. color: #3b3b3b;
  1831. border-bottom: 2rpx dotted #000;
  1832. }
  1833. }
  1834. .data-two {
  1835. width: 100%;
  1836. display: flex;
  1837. align-items: center;
  1838. .key {
  1839. width: 35%;
  1840. text-align: right;
  1841. color: #3c9cff;
  1842. }
  1843. .list {
  1844. margin-top: 30rpx;
  1845. margin-bottom: 20rpx;
  1846. width: 100%;
  1847. height: 100%;
  1848. // background-color: pink;
  1849. height: auto;
  1850. display: flex;
  1851. flex-wrap: wrap;
  1852. // font-size: 30rpx;
  1853. }
  1854. }
  1855. }
  1856. .box-two {
  1857. color: #3b3b3b;
  1858. overflow: hidden;
  1859. height: 100rpx;
  1860. padding-left: 20rpx;
  1861. // margin-right: 20rpx;
  1862. // font-size: 30rpx;
  1863. display: flex;
  1864. align-items: center;
  1865. .key {
  1866. display: inline-block;
  1867. width: 24%;
  1868. color: #3c9cff;
  1869. }
  1870. .value {
  1871. margin-left: 20rpx;
  1872. width: calc(100% - 24%);
  1873. color: #3b3b3b;
  1874. // margin-right: 20rpx;
  1875. border-bottom: 2rpx dotted #000;
  1876. }
  1877. }
  1878. .table {
  1879. // margin-top: 40rpx;
  1880. margin-left: 20rpx;
  1881. margin-right: 20rpx;
  1882. .data {
  1883. // font-size: 30rpx;
  1884. width: 100%;
  1885. height: 100rpx;
  1886. border-bottom: 2rpx solid #f0f0f0f0;
  1887. align-items: center;
  1888. .name {
  1889. text-align: right;
  1890. width: 25%;
  1891. margin-left: 20rpx;
  1892. color: #000;
  1893. }
  1894. .sum {
  1895. width: 20%;
  1896. margin-left: 20rpx;
  1897. margin-right: 40rpx;
  1898. border-bottom: 2rpx dotted #000;
  1899. }
  1900. .remarks {
  1901. width: 30%;
  1902. }
  1903. }
  1904. }
  1905. .primary {
  1906. background-color: #0b68ffff;
  1907. }
  1908. .attention {
  1909. padding: 30rpx;
  1910. padding-left: 50rpx;
  1911. padding-bottom: 40rpx;
  1912. }
  1913. .bottom {
  1914. position: fixed;
  1915. bottom: calc(var(--window-bottom));
  1916. width: 100%;
  1917. height: 130rpx;
  1918. background-color: white;
  1919. .row {
  1920. display: flex;
  1921. justify-content: space-evenly;
  1922. height: 130rpx;
  1923. align-items: center;
  1924. .button {
  1925. width: 300rpx;
  1926. // width: 660rpx;
  1927. }
  1928. }
  1929. }
  1930. .input {
  1931. width: 100%;
  1932. // height: 100rpx;
  1933. // background-color: red;
  1934. }
  1935. .cushion {
  1936. width: 100%;
  1937. height: 200rpx;
  1938. background-color: #f0f0f0f0;
  1939. }
  1940. }
  1941. .u-page__tag-item {
  1942. margin-right: 20px;
  1943. }
  1944. </style>