index.vue 61 KB

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