index.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659
  1. <template>
  2. <view class="content">
  3. <u-sticky>
  4. <view class="head" style="background-color: #3c9cff; color: #fff;">
  5. <!-- <text>订单号: {{formData.orderNo}}</text> -->
  6. <view>
  7. <text>{{ formData.carRegNo == null ? '' : formData.carRegNo }}</text>
  8. </view>
  9. <view>
  10. <text>{{ formData.goodsCName == null ? '' : formData.goodsCName }}</text>
  11. </view>
  12. </view>
  13. <view class="head-no-addr">
  14. <view>
  15. <text>{{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>{{formData.unLoadAddr}}</text>
  21. </view>
  22. </view>
  23. </u-sticky>
  24. <view class="striping"></view>
  25. <!-- <view class="head" @click="telFun">
  26. <text>驾驶员: {{formData.driver1Name == null ? '' : formData.driver1Name}}&nbsp;电话:&nbsp;{{formData.driver1mobile == null ? '' : formData.driver1mobile}}</text>
  27. </view> -->
  28. <u-tabs :list="tabs" @change="change" :activeStyle="{
  29. width: '180rpx',
  30. height: '60rpx',
  31. color: '#fff',
  32. backgroundColor: '#3c9cff',
  33. borderRadius: '80rpx',
  34. lineHeight: '60rpx',
  35. textAlign: 'center'
  36. }" :inactiveStyle="{
  37. width: '180rpx',
  38. height: '60rpx',
  39. color: '#3c9cff',
  40. backgroundColor: '#f0f0f0f0',
  41. borderRadius: '80rpx',
  42. lineHeight: '60rpx',
  43. textAlign: 'center'
  44. }"></u-tabs>
  45. <view v-if="isTabs == '行程费用'">
  46. <view class="box-box">
  47. <view class="box">
  48. <view class="data">
  49. <text class="key">ETC金额</text>
  50. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  51. @input="checkUnLoadetc" v-model="formData.loadetc" />
  52. </view>
  53. <view class="data">
  54. <text class="key">现金过路费</text>
  55. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  56. @input="checkUnLoadtoll" v-model="formData.loadtoll" />
  57. </view>
  58. </view>
  59. <view class="box">
  60. <view class="data">
  61. <text class="key">公司加油(升)</text>
  62. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  63. @input="checkUnOilhomeQty" v-model="formData.oilhomeQty" />
  64. </view>
  65. <view class="data">
  66. <text class="key">加油金额</text>
  67. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  68. @input="checkUnOilhomeAmt" v-model="formData.oilhomeAmt" />
  69. </view>
  70. </view>
  71. <view class="box">
  72. <view class="data-two">
  73. <text class="key">定点加油1</text>
  74. <view class="list">
  75. <uni-data-select :disabled="disabled" :localdata="gasStationList"
  76. v-model="formData.gasstation1" @change="gasstation1Change"></uni-data-select>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="box">
  81. <view class="data">
  82. <text class="key">升&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数</text>
  83. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  84. @input="checkUnOilappoint1Qty" placeholder-style="font-size:24rpx" placeholder="请输入升数" v-model="formData.oilappoint1Qty" />
  85. </view>
  86. <view class="data">
  87. <text class="key">金&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;额</text>
  88. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  89. @input="checkUnOilappoint1Amt" placeholder-style="font-size:24rpx" placeholder="请输入金额" v-model="formData.oilappoint1Amt" />
  90. </view>
  91. </view>
  92. <view class="box">
  93. <view class="data-two">
  94. <text class="key">定点加油2</text>
  95. <view class="list">
  96. <uni-data-select :disabled="disabled" :localdata="gasStationList"
  97. v-model="formData.gasstation2" @change="gasstation2Change"></uni-data-select>
  98. </view>
  99. </view>
  100. </view>
  101. <view class="box">
  102. <view class="data">
  103. <text class="key">升&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数</text>
  104. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  105. @input="checkUnOilappoint2Qty" placeholder-style="font-size:24rpx" placeholder="请输入升数" v-model="formData.oilappoint2Qty" />
  106. </view>
  107. <view class="data">
  108. <text class="key">金&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;额</text>
  109. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  110. @input="checkUnOilappoint2Amt" placeholder-style="font-size:24rpx" placeholder="请输入金额" v-model="formData.oilappoint2Amt" />
  111. </view>
  112. </view>
  113. <view class="box">
  114. <view class="data-two">
  115. <text class="key">定点加油3</text>
  116. <view class="list">
  117. <uni-data-select :disabled="disabled" :localdata="gasStationList"
  118. v-model="formData.gasstation3" @change="gasstation3Change"></uni-data-select>
  119. </view>
  120. </view>
  121. </view>
  122. <view class="box">
  123. <view class="data">
  124. <text class="key">升&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数</text>
  125. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  126. @input="checkUnOilappoint3Qty" placeholder-style="font-size:24rpx" placeholder="请输入升数" v-model="formData.oilappoint3Qty" />
  127. </view>
  128. <view class="data">
  129. <text class="key">金&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;额</text>
  130. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  131. @input="checkUnOilappoint3Amt" placeholder-style="font-size:24rpx" placeholder="请输入金额" v-model="formData.oilappoint3Amt" />
  132. </view>
  133. </view>
  134. <view class="box">
  135. <view class="data">
  136. <text class="key">现金加油(升)</text>
  137. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  138. @input="checkUnOilcash1Qty" v-model="formData.oilcash1Qty" />
  139. </view>
  140. <view class="data">
  141. <text class="key">加油金额</text>
  142. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  143. @input="checkUnOilcash1Amt" v-model="formData.oilcash1Amt" />
  144. </view>
  145. </view>
  146. <view class="box">
  147. <view class="data">
  148. <text class="key">油卡加油(升)</text>
  149. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  150. @input="checkUnOilcardQty" v-model="formData.oilcardQty" />
  151. </view>
  152. <view class="data">
  153. <text class="key">加油金额</text>
  154. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  155. @input="checkUnOilcardAmt" v-model="formData.oilcardAmt" />
  156. </view>
  157. </view>
  158. <view class="box-two">
  159. <text class="key">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</text>
  160. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
  161. v-model="formData.driverassdesc" />
  162. </view>
  163. <!-- </u-collapse-item> -->
  164. </view>
  165. <view class="box-box" style="margin-top: 40rpx;">
  166. <view style="margin-bottom: 20rpx;">
  167. <text style="color: #3c9cff;">单据拍照存档</text>
  168. </view>
  169. <u-upload :fileList="fileList1" accept="image" :sizeType="['compressed']" capture="camera"
  170. @afterRead="imgUploading" @delete="deletePic" name="1" multiple :disabled="disabled"
  171. :previewFullImage="true"></u-upload>
  172. </view>
  173. </view>
  174. <view v-if="isTabs == '其他费用'">
  175. <view class="table">
  176. <view class="data vertical-layout" v-for="(item, index) in itemsList" :key="index">
  177. <view class="name">
  178. <text style="color: #3c9cff;">{{ item.cname }}</text>
  179. </view>
  180. <view class="sum">
  181. <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" type="digit"
  182. @input="checkUnAmt(item.amt, index)" @click="inputHeight" cursor-spacing="30"
  183. :always-embed="true" :adjust-position="true" v-model="item.amt" />
  184. </view>
  185. <view class="remarks" style="border-bottom: 2rpx dotted #000;">
  186. <input v-model="item.remarks" placeholder-style="font-size:24rpx" placeholder="请输入备注">
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. <view class="cushion">
  192. </view>
  193. <!-- <view class="bottom vertical-layout" style="z-index: 4;" v-if="status376 == 2 || status376 == 0">
  194. <view class="bottom-bottom">
  195. <view class="money">
  196. <text>报销:</text> {{' '}}
  197. <text style="color: #ff9f1c;">¥ {{money}}</text>
  198. </view>
  199. <view class="button">
  200. <view class="button-button">
  201. <u-button iconColor="#3c9cff" shape="circle" type="primary" @click="submitShow = true"
  202. :disabled="disabled" text="提交费用"></u-button>
  203. </view>
  204. </view>
  205. </view>
  206. </view> -->
  207. <!-- 驾驶员 -->
  208. <view v-if="button">
  209. <view class="bottom" style="z-index: 4;">
  210. <view class="row">
  211. <view class="button">
  212. <u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="saveDisabled"
  213. @click="submitShow = true" text="保存数据"></u-button>
  214. </view>
  215. <view class="button">
  216. <u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="upDisabled"
  217. @click="upButtonClick('TJ')" text="提交报账单"></u-button>
  218. </view>
  219. </view>
  220. </view>
  221. </view>
  222. <!-- 队长 -->
  223. <view v-if="!button">
  224. <view class="bottom" style="z-index: 4;">
  225. <view class="row">
  226. <view class="button">
  227. <u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="sDisabled"
  228. @click="auditTShow = true" text="通过"></u-button>
  229. </view>
  230. <view class="button">
  231. <u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="sDisabled"
  232. @click="auditFShow = true" text="驳回"></u-button>
  233. </view>
  234. </view>
  235. </view>
  236. </view>
  237. <!-- 遮盖罩 -->
  238. <u-loading-page :loading="loading" style="z-index: 9999;"></u-loading-page>
  239. <!-- 消息提示 -->
  240. <u-toast ref="uToast"></u-toast>
  241. <u-modal :show="submitShow" title="提示" showCancelButton @confirm="submit" @cancel="submitShow = false">
  242. <view class="slot-content">
  243. <rich-text nodes="确定要保存数据吗?"></rich-text>
  244. </view>
  245. </u-modal>
  246. <u-modal :show="upAuditShow" title="提示" showCancelButton @confirm="upReview" @cancel="upAuditShow = false">
  247. <view class="slot-content">
  248. <rich-text nodes="确定要提交账单吗?"></rich-text>
  249. </view>
  250. </u-modal>
  251. <u-modal :show="deleteShow" title="提示" showCancelButton @confirm="deleteImg" @cancel="deleteShow = false">
  252. <view class="slot-content">
  253. <rich-text nodes="确定删除这张图片吗?"></rich-text>
  254. </view>
  255. </u-modal>
  256. <u-modal :show="auditTShow" title="提示" showCancelButton @confirm="check('T')" @cancel="auditTShow = false">
  257. <view class="slot-content">
  258. <rich-text nodes="确定要审核通过吗?"></rich-text>
  259. </view>
  260. </u-modal>
  261. <u-modal :show="auditFShow" title="提示" showCancelButton @confirm="check('F')" @cancel="auditFShow = false">
  262. <view class="slot-content">
  263. <rich-text nodes="确定要驳回审核吗?"></rich-text>
  264. </view>
  265. </u-modal>
  266. </view>
  267. </template>
  268. <script>
  269. import {
  270. getGasStations,
  271. getItems,
  272. insertLoadFeeItems,
  273. getLoadFeeItems,
  274. isMileage
  275. } from "@/api/reimbursement"
  276. import {
  277. getOrderBillsPlansByid,
  278. putOrderBillsPlansByid,
  279. insertTmsAttachMngs,
  280. pictureUploading,
  281. deleteTmsAttachMngs,
  282. submitAudit,
  283. audit
  284. } from "@/api/particulars"
  285. export default {
  286. data() {
  287. return {
  288. orderNo: '',
  289. // 遮盖罩
  290. loading: true,
  291. formData: {
  292. // itemsVoList: [],
  293. // oilappoint1Qty: 1,
  294. // oilappoint2Qty: 1
  295. },
  296. // 报销费用list
  297. gasStationList: [],
  298. // 其他费用list
  299. itemsList: [],
  300. // 其他费用被选中
  301. selectedIndexs: [],
  302. radioValueOne: '', // 当前 radio 的值
  303. numOne: 0, //用于区分是否是重复选中
  304. radioValueTwo: '', // 当前 radio 的值
  305. numTwo: 0, //用于区分是否是重复选中
  306. // 输入框禁用
  307. disabled: false,
  308. // 保存数据按钮
  309. saveDisabled: false,
  310. // 提交数据按钮
  311. upDisabled: false,
  312. // 审核按钮禁用
  313. sDisabled: true,
  314. // 底部按钮
  315. button: true,
  316. status376: 0,
  317. selectionLength: 0,
  318. fileList1: [],
  319. // 删除弹框
  320. deleteShow: false,
  321. // 提交费用弹窗
  322. submitShow: false,
  323. // 提交审核弹框
  324. upAuditShow: false,
  325. // 审核通过弹框
  326. auditTShow: false,
  327. // 审核驳回弹框
  328. auditFShow: false,
  329. event: {},
  330. vHeight: 0,
  331. tabs: [{
  332. name: '行程费用'
  333. }, {
  334. name: '其他费用'
  335. }],
  336. isTabs: '行程费用',
  337. // 报销金额
  338. money: 0
  339. }
  340. },
  341. onUnload() {
  342. this.formData = {};
  343. this.loading = true;
  344. },
  345. onLoad: function(option) {
  346. this.status376 = option.status;
  347. this.orderNo = option.orderNo;
  348. if (this.status376 == 6) {
  349. this.disabled = true;
  350. }
  351. this.getData();
  352. },
  353. methods: {
  354. change(item) {
  355. this.isTabs = item.name;
  356. },
  357. getData() {
  358. // 报销费用下拉选
  359. getGasStations().then(res => {
  360. // this.gasStationList = res.data
  361. for (var item in res.data) {
  362. var data = {
  363. text: res.data[item].cname,
  364. value: res.data[item].cname
  365. };
  366. this.gasStationList.push(data);
  367. }
  368. getItems().then(res => {
  369. this.itemsList = res.data
  370. getLoadFeeItems(this.orderNo).then(res => {
  371. res.data.loadetc == 0 ? res.data.loadetc = null : res.data.loadetc
  372. res.data.loadtoll == 0 ? res.data.loadtoll = null : res.data.loadtoll
  373. res.data.oilhomeQty == 0 ? res.data.oilhomeQty = null : res.data.oilhomeQty
  374. res.data.oilhomeAmt == 0 ? res.data.oilhomeAmt = null : res.data.oilhomeAmt
  375. res.data.oilappoint1Qty == 0 ? res.data.oilappoint1Qty = null : res.data.oilappoint1Qty
  376. res.data.oilappoint1Amt == 0 ? res.data.oilappoint1Amt = null : res.data.oilappoint1Amt
  377. res.data.oilappoint2Qty == 0 ? res.data.oilappoint2Qty = null : res.data.oilappoint2Qty
  378. res.data.oilappoint2Amt == 0 ? res.data.oilappoint2Amt = null : res.data.oilappoint2Amt
  379. res.data.oilappoint3Qty == 0 ? res.data.oilappoint3Qty = null : res.data.oilappoint3Qty
  380. res.data.oilappoint3Amt == 0 ? res.data.oilappoint3Amt = null : res.data.oilappoint3Amt
  381. res.data.oilcash1Qty == 0 ? res.data.oilcash1Qty = null : res.data.oilcash1Qty
  382. res.data.oilcash1Amt == 0 ? res.data.oilcash1Amt = null : res.data.oilcash1Amt
  383. res.data.oilcardQty == 0 ? res.data.oilcardQty = null : res.data.oilcardQty
  384. res.data.oilcardAmt == 0 ? res.data.oilcardAmt = null : res.data.oilcardAmt
  385. for (let item of this.itemsList) {
  386. if (item == 0) {
  387. item.amt = null
  388. }
  389. }
  390. // 角色
  391. for (let role of res.data.roleList) {
  392. if (role == 'DZ') {
  393. console.log(123);
  394. this.button = false;
  395. this.disabled = true;
  396. }
  397. if (role == 'JSY') {
  398. this.disabled = false;
  399. }
  400. }
  401. // 审核中
  402. if (
  403. res.data.ifStarted == "S") {
  404. this.disabled = true;
  405. this.saveDisabled = true;
  406. this.upDisabled = true;
  407. this.sDisabled = false;
  408. }
  409. // 审核完成
  410. if (
  411. res.data.ifStarted == "A") {
  412. this.disabled = true;
  413. this.saveDisabled = true;
  414. this.upDisabled = true;
  415. }
  416. // 未提交
  417. // if (res.data.ifLoaded != "T" ||
  418. // res.data.ifUnLoaded != "T") {
  419. // this.disabled = false;
  420. // this.saveDisabled = false;
  421. // this.upDisabled = true;
  422. // }
  423. this.formData = res.data;
  424. var costBreakdownList = res.data.loadFeeItemsList;
  425. this.itemsList = costBreakdownList;
  426. for (const key in this.itemsList) {
  427. if (this.itemsList[key].amt == 0) {
  428. this.itemsList[key].amt = null;
  429. }
  430. }
  431. this.fileList1 = res.data.fileList1;
  432. this.loading = false;
  433. // isMileage(this.orderNo).then(res => {
  434. // if (res.msg == 410) {
  435. // // this.disabled = true;
  436. // // this.upDisabled = true;
  437. // // this.$refs.uToast.show({
  438. // // type: 'warning',
  439. // // icon: false,
  440. // // message: "当前报单有待提交里程!",
  441. // // iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  442. // // })
  443. // }
  444. // })
  445. // this.calculatMoney();
  446. })
  447. })
  448. })
  449. },
  450. // 事件审核按钮
  451. upButtonClick(type) {
  452. if(this.formData.loadQty == null) {
  453. this.$refs.uToast.show({
  454. type: 'warning',
  455. icon: false,
  456. message: "没有装车吨位!",
  457. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  458. })
  459. } else if(this.formData.loadDate == null) {
  460. this.$refs.uToast.show({
  461. type: 'warning',
  462. icon: false,
  463. message: "没有装车时间!",
  464. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  465. })
  466. } else if(this.formData.unLoadQty == null) {
  467. this.$refs.uToast.show({
  468. type: 'warning',
  469. icon: false,
  470. message: "没有卸车吨位!",
  471. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  472. })
  473. } else if(this.formData.unLoadDate == null) {
  474. this.$refs.uToast.show({
  475. type: 'warning',
  476. icon: false,
  477. message: "没有卸车时间!",
  478. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  479. })
  480. } else {
  481. if (type == 'BX') {
  482. this.submitShow = true
  483. } else if (type == 'TJ') {
  484. this.upAuditShow = true
  485. }
  486. }
  487. },
  488. // 保存内容
  489. submit() {
  490. if (this.status376 == 6) {
  491. this.$refs.uToast.show({
  492. type: 'warning',
  493. icon: false,
  494. message: "不允许保存!",
  495. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  496. })
  497. } else if (this.status376 == 2 || this.status376 == 0) {
  498. let isMo = false;
  499. for (const key in this.itemsList) {
  500. if (this.itemsList[key].amt == null) {
  501. this.itemsList[key].amt = 0;
  502. }
  503. }
  504. if (this.formData.loadetc == null) {
  505. this.formData.loadetc = 0;
  506. }
  507. if (this.formData.loadtoll == null) {
  508. this.formData.loadtoll = 0;
  509. }
  510. if (this.formData.oilhomeQty == null) {
  511. this.formData.oilhomeQty = 0;
  512. }
  513. if (this.formData.oilhomeAmt == null) {
  514. this.formData.oilhomeAmt = 0;
  515. }
  516. if (this.formData.oilappoint1Qty == null) {
  517. this.formData.oilappoint1Qty = 0;
  518. }
  519. if (this.formData.oilappoint1Amt == null) {
  520. this.formData.oilappoint1Amt = 0;
  521. }
  522. if (this.formData.oilappoint2Qty == null) {
  523. this.formData.oilappoint2Qty = 0;
  524. }
  525. if (this.formData.oilappoint2Amt == null) {
  526. this.formData.oilappoint2Amt = 0;
  527. }
  528. if (this.formData.oilappoint3Qty == null) {
  529. this.formData.oilappoint3Qty = 0;
  530. }
  531. if (this.formData.oilappoint3Amt == null) {
  532. this.formData.oilappoint3Amt = 0;
  533. }
  534. if (this.formData.oilcash1Qty == null) {
  535. this.formData.oilcash1Qty = 0;
  536. }
  537. if (this.formData.oilcash1Amt == null) {
  538. this.formData.oilcash1Amt = 0;
  539. }
  540. if (this.formData.oilcardQty == null) {
  541. this.formData.oilcardQty = 0;
  542. }
  543. if (this.formData.oilcardAmt == null) {
  544. this.formData.oilcardAmt = 0;
  545. }
  546. if (this.formData.gasstation1 == null) {
  547. this.formData.gasstation1 = 0;
  548. }
  549. if (this.formData.gasstation2 == null) {
  550. this.formData.gasstation2 = 0;
  551. }
  552. if (this.formData.gasstation3 == null) {
  553. this.formData.gasstation3 = 0;
  554. }
  555. this.loading = true;
  556. // var list = [];
  557. // for (var item in this.itemsList) {
  558. // var amt = this.itemsList[item].amt;
  559. // if (amt != null) {
  560. // var items = this.itemsList[item];
  561. // list.push(items);
  562. // }
  563. // }
  564. // for (let item of this.itemsList) {
  565. // if (item == 0) {
  566. // item.amt = null
  567. // }
  568. // }
  569. // this.formData.itemsVoList = list;
  570. this.formData.itemsVoList = this.itemsList;
  571. insertLoadFeeItems(this.formData).then(res => {
  572. this.submitShow = false;
  573. if (res.code == 200) {
  574. // 报销费用下拉选
  575. getGasStations().then(res => {
  576. // this.gasStationList = res.data
  577. for (var item in res.data) {
  578. var data = {
  579. text: res.data[item].cname,
  580. value: res.data[item].cname
  581. };
  582. this.gasStationList.push(data);
  583. }
  584. getItems().then(res => {
  585. this.itemsList = res.data
  586. getLoadFeeItems(this.orderNo).then(res => {
  587. res.data.loadetc == 0 ? res.data.loadetc = null : res.data.loadetc
  588. res.data.loadtoll == 0 ? res.data.loadtoll = null : res.data.loadtoll
  589. res.data.oilhomeQty == 0 ? res.data.oilhomeQty = null : res.data.oilhomeQty
  590. res.data.oilhomeAmt == 0 ? res.data.oilhomeAmt = null : res.data.oilhomeAmt
  591. res.data.oilappoint1Qty == 0 ? res.data.oilappoint1Qty = null : res.data.oilappoint1Qty
  592. res.data.oilappoint1Amt == 0 ? res.data.oilappoint1Amt = null : res.data.oilappoint1Amt
  593. res.data.oilappoint2Qty == 0 ? res.data.oilappoint2Qty = null : res.data.oilappoint2Qty
  594. res.data.oilappoint2Amt == 0 ? res.data.oilappoint2Amt = null : res.data.oilappoint2Amt
  595. res.data.oilappoint3Qty == 0 ? res.data.oilappoint3Qty = null : res.data.oilappoint3Qty
  596. res.data.oilappoint3Amt == 0 ? res.data.oilappoint3Amt = null : res.data.oilappoint3Amt
  597. res.data.oilcash1Qty == 0 ? res.data.oilcash1Qty = null : res.data.oilcash1Qty
  598. res.data.oilcash1Amt == 0 ? res.data.oilcash1Amt = null : res.data.oilcash1Amt
  599. res.data.oilcardQty == 0 ? res.data.oilcardQty = null : res.data.oilcardQty
  600. res.data.oilcardAmt == 0 ? res.data.oilcardAmt = null : res.data.oilcardAmt
  601. for (let item of this.itemsList) {
  602. if (item == 0) {
  603. item.amt = null
  604. }
  605. }
  606. // 角色
  607. for (let role of res.data.roleList) {
  608. if (role == 'DZ') {
  609. this.button = false;
  610. }
  611. }
  612. // 审核中
  613. if (
  614. res.data.ifStarted == "S") {
  615. this.disabled = true;
  616. this.saveDisabled = true;
  617. this.upDisabled = true;
  618. this.sDisabled = false;
  619. }
  620. // 审核完成
  621. if (
  622. res.data.ifStarted == "A") {
  623. this.disabled = true;
  624. this.saveDisabled = true;
  625. this.upDisabled = true;
  626. }
  627. // 未提交
  628. // if (res.data.ifLoaded != "T" ||
  629. // res.data.ifUnLoaded != "T") {
  630. // this.disabled = false;
  631. // this.saveDisabled = false;
  632. // this.upDisabled = true;
  633. // }
  634. this.formData = res.data;
  635. var costBreakdownList = res.data.loadFeeItemsList;
  636. this.itemsList = costBreakdownList;
  637. for (const key in this.itemsList) {
  638. if (this.itemsList[key].amt == 0) {
  639. this.itemsList[key].amt = null;
  640. }
  641. }
  642. this.fileList1 = res.data.fileList1;
  643. this.$refs.uToast.show({
  644. type: 'success',
  645. message: "保存成功!",
  646. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  647. })
  648. this.loading = false;
  649. })
  650. })
  651. })
  652. // this.getData();
  653. // 保存成功弹窗提示
  654. // this.$refs.uToast.show({
  655. // type: 'success',
  656. // message: "保存成功!",
  657. // iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  658. // })
  659. } else {
  660. // 保存失败消息
  661. this.$refs.uToast.show({
  662. icon: false,
  663. message: "保存失败请重试!",
  664. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
  665. })
  666. }
  667. })
  668. }
  669. },
  670. // 提交审核
  671. upReview() {
  672. if (this.status376 == 6) {
  673. this.upAuditShow = false;
  674. this.$refs.uToast.show({
  675. type: 'warning',
  676. icon: false,
  677. message: "不允许保存!",
  678. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  679. })
  680. } else if (this.status376 == 2 || this.status376 == 0) {
  681. let isMo = false;
  682. for (const key in this.itemsList) {
  683. if (this.itemsList[key].amt == null) {
  684. this.itemsList[key].amt = 0;
  685. }
  686. }
  687. if (this.formData.loadetc == null) {
  688. this.formData.loadetc = 0;
  689. }
  690. if (this.formData.loadtoll == null) {
  691. this.formData.loadtoll = 0;
  692. }
  693. if (this.formData.oilhomeQty == null) {
  694. this.formData.oilhomeQty = 0;
  695. }
  696. if (this.formData.oilhomeAmt == null) {
  697. this.formData.oilhomeAmt = 0;
  698. }
  699. if (this.formData.oilappoint1Qty == null) {
  700. this.formData.oilappoint1Qty = 0;
  701. }
  702. if (this.formData.oilappoint1Amt == null) {
  703. this.formData.oilappoint1Amt = 0;
  704. }
  705. if (this.formData.oilappoint2Qty == null) {
  706. this.formData.oilappoint2Qty = 0;
  707. }
  708. if (this.formData.oilappoint2Amt == null) {
  709. this.formData.oilappoint2Amt = 0;
  710. }
  711. if (this.formData.oilappoint3Qty == null) {
  712. this.formData.oilappoint3Qty = 0;
  713. }
  714. if (this.formData.oilappoint3Amt == null) {
  715. this.formData.oilappoint3Amt = 0;
  716. }
  717. if (this.formData.oilcash1Qty == null) {
  718. this.formData.oilcash1Qty = 0;
  719. }
  720. if (this.formData.oilcash1Amt == null) {
  721. this.formData.oilcash1Amt = 0;
  722. }
  723. if (this.formData.oilcardQty == null) {
  724. this.formData.oilcardQty = 0;
  725. }
  726. if (this.formData.oilcardAmt == null) {
  727. this.formData.oilcardAmt = 0;
  728. }
  729. if (this.formData.gasstation1 == null) {
  730. this.formData.gasstation1 = 0;
  731. }
  732. if (this.formData.gasstation2 == null) {
  733. this.formData.gasstation2 = 0;
  734. }
  735. if (this.formData.gasstation3 == null) {
  736. this.formData.gasstation3 = 0;
  737. }
  738. this.loading = true;
  739. // var list = [];
  740. // for (var item in this.itemsList) {
  741. // var amt = this.itemsList[item].amt;
  742. // if (amt != null) {
  743. // var items = this.itemsList[item];
  744. // list.push(items);
  745. // }
  746. // }
  747. this.formData.itemsVoList = this.itemsList;
  748. submitAudit(this.formData).then(res => {
  749. this.submitShow = false
  750. this.upAuditShow = false;
  751. if (res.msg == 'ok') {
  752. getGasStations().then(res => {
  753. for (var item in res.data) {
  754. var data = {
  755. text: res.data[item].cname,
  756. value: res.data[item].cname
  757. };
  758. this.gasStationList.push(data);
  759. }
  760. getItems().then(res => {
  761. this.itemsList = res.data
  762. getLoadFeeItems(this.orderNo).then(res => {
  763. res.data.loadetc == 0 ? res.data.loadetc = null : res.data.loadetc
  764. res.data.loadtoll == 0 ? res.data.loadtoll = null : res.data.loadtoll
  765. res.data.oilhomeQty == 0 ? res.data.oilhomeQty = null : res.data.oilhomeQty
  766. res.data.oilhomeAmt == 0 ? res.data.oilhomeAmt = null : res.data.oilhomeAmt
  767. res.data.oilappoint1Qty == 0 ? res.data.oilappoint1Qty = null : res.data.oilappoint1Qty
  768. res.data.oilappoint1Amt == 0 ? res.data.oilappoint1Amt = null : res.data.oilappoint1Amt
  769. res.data.oilappoint2Qty == 0 ? res.data.oilappoint2Qty = null : res.data.oilappoint2Qty
  770. res.data.oilappoint2Amt == 0 ? res.data.oilappoint2Amt = null : res.data.oilappoint2Amt
  771. res.data.oilappoint3Qty == 0 ? res.data.oilappoint3Qty = null : res.data.oilappoint3Qty
  772. res.data.oilappoint3Amt == 0 ? res.data.oilappoint3Amt = null : res.data.oilappoint3Amt
  773. res.data.oilcash1Qty == 0 ? res.data.oilcash1Qty = null : res.data.oilcash1Qty
  774. res.data.oilcash1Amt == 0 ? res.data.oilcash1Amt = null : res.data.oilcash1Amt
  775. res.data.oilcardQty == 0 ? res.data.oilcardQty = null : res.data.oilcardQty
  776. res.data.oilcardAmt == 0 ? res.data.oilcardAmt = null : res.data.oilcardAmt
  777. for (let item of this.itemsList) {
  778. if (item == 0) {
  779. item.amt = null
  780. }
  781. }
  782. // 角色
  783. for (let role of res.data.roleList) {
  784. if (role == 'DZ') {
  785. this.button = false;
  786. }
  787. }
  788. // 审核中
  789. if (
  790. res.data.ifStarted == "S") {
  791. this.disabled = true;
  792. this.saveDisabled = true;
  793. this.upDisabled = true;
  794. this.sDisabled = false;
  795. }
  796. // 审核完成
  797. if (
  798. res.data.ifStarted == "A") {
  799. this.disabled = true;
  800. this.saveDisabled = true;
  801. this.upDisabled = true;
  802. }
  803. // 未提交
  804. // if (res.data.ifLoaded != "T" ||
  805. // res.data.ifUnLoaded != "T") {
  806. // this.disabled = false;
  807. // this.saveDisabled = false;
  808. // this.upDisabled = true;
  809. // }
  810. this.formData = res.data;
  811. var costBreakdownList = res.data.loadFeeItemsList;
  812. this.itemsList = costBreakdownList;
  813. for (const key in this.itemsList) {
  814. if (this.itemsList[key].amt == 0) {
  815. this.itemsList[key].amt = null;
  816. }
  817. }
  818. this.fileList1 = res.data.fileList1;
  819. this.$refs.uToast.show({
  820. type: 'success',
  821. message: "提交审核成功!",
  822. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  823. })
  824. this.loading = false;
  825. })
  826. })
  827. })
  828. // this.getData();
  829. // // 保存成功弹窗提示
  830. // this.$refs.uToast.show({
  831. // type: 'success',
  832. // message: "提交审核成功!",
  833. // iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  834. // })
  835. } else {
  836. // 保存失败消息
  837. this.$refs.uToast.show({
  838. icon: false,
  839. message: "提交审核失败请重试!",
  840. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
  841. })
  842. }
  843. })
  844. }
  845. },
  846. // 审核
  847. check(type) {
  848. var data = {
  849. orderNo: this.orderNo,
  850. entityId: this.formData.entityId,
  851. auditType: type
  852. }
  853. audit(data).then(res => {
  854. if (res.msg == 'ok') {
  855. this.getData();
  856. this.sDisabled = false;
  857. if (type == 'T') {
  858. this.auditTShow = false;
  859. } else if (type == 'F') {
  860. this.auditFShow = false;
  861. }
  862. // 保存成功弹窗提示
  863. this.$refs.uToast.show({
  864. type: 'success',
  865. message: "审核成功!",
  866. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  867. })
  868. } else {
  869. // 保存失败消息
  870. this.$refs.uToast.show({
  871. icon: false,
  872. message: "审核失败请重试!",
  873. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
  874. })
  875. }
  876. })
  877. },
  878. // 删除图片
  879. deletePic(event) {
  880. if (this.disabled) {
  881. this.$refs.uToast.show({
  882. type: 'warning',
  883. icon: false,
  884. message: "不允许修改!",
  885. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
  886. })
  887. } else {
  888. this.event = event;
  889. this.deleteShow = true;
  890. }
  891. },
  892. deleteImg() {
  893. var event = this.event;
  894. var url = event.file.url;
  895. var index = url.lastIndexOf("\/");
  896. var attachId = url.substring(index + 1, url.length);
  897. deleteTmsAttachMngs(attachId).then(res => {
  898. if (res.code == 200) {
  899. this[`fileList${event.name}`].splice(event.index, 1)
  900. // 删除成功消息
  901. this.$refs.uToast.show({
  902. type: 'success',
  903. message: "删除成功!",
  904. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
  905. })
  906. } else {
  907. // 删除失败消息
  908. this.$refs.uToast.show({
  909. icon: false,
  910. message: "删除失败请重试!",
  911. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
  912. })
  913. }
  914. this.event = {};
  915. this.deleteShow = false;
  916. })
  917. },
  918. // 新增图片
  919. imgUploading(event) {
  920. // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
  921. let lists = [].concat(event.file)
  922. let fileListLen = this[`fileList${event.name}`].length
  923. lists.map((item) => {
  924. this[`fileList${event.name}`].push({
  925. ...item,
  926. status: 'uploading',
  927. message: '上传中'
  928. })
  929. })
  930. for (let i = 0; i < lists.length; i++) {
  931. let date = this.dateToString("yyyyMMdd");
  932. let dateHHmmss = this.dateToString("yyyy-MM-dd HH:mm:ss");
  933. this.formData.date = date;
  934. insertTmsAttachMngs(this.formData).then(res => {
  935. if (res.code == 200) {
  936. let data = {
  937. name: 'avatarfile',
  938. filePath: lists[i].url
  939. }
  940. // 获取经纬度
  941. let longitude = '';
  942. let latitude = '';
  943. // uni.getLocation({
  944. // type: 'wgs84',
  945. // success: function(res) {
  946. // console.log('当前位置的经度:' + res.longitude);
  947. // console.log('当前位置的纬度:' + res.latitude);
  948. // }
  949. // });
  950. let dataForm = {
  951. attachId: res.data,
  952. longitude: longitude,
  953. latitude: latitude,
  954. updateDate: dateHHmmss
  955. }
  956. console.log(dataForm);
  957. // 上传图片
  958. pictureUploading(data, dataForm).then(res => {
  959. let item = this[`fileList${event.name}`][fileListLen]
  960. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(
  961. item, {
  962. status: 'success',
  963. message: '',
  964. url: res.data
  965. }))
  966. fileListLen++
  967. })
  968. }
  969. })
  970. }
  971. },
  972. dateToString(fmt) {
  973. var date = new Date();
  974. var o = {
  975. "M+": date.getMonth() + 1, //月份
  976. "d+": date.getDate(), //日
  977. "H+": date.getHours(), //小时
  978. "m+": date.getMinutes(), //分
  979. "s+": date.getSeconds(), //秒
  980. "q+": Math.floor((date.getMonth() + 3) / 3), //季度
  981. "S": date.getMilliseconds() //毫秒
  982. };
  983. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
  984. for (var k in o)
  985. if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[
  986. k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  987. return fmt;
  988. },
  989. // 定点加油1清空
  990. gasstation1Change() {
  991. this.formData.oilappoint1Qty = 0;
  992. this.formData.oilappoint1Amt = 0;
  993. },
  994. // 定点加油2清空
  995. gasstation2Change() {
  996. this.formData.oilappoint2Qty = 0;
  997. this.formData.oilappoint2Amt = 0;
  998. },
  999. // 定点加油3清空
  1000. gasstation3Change() {
  1001. this.formData.oilappoint3Qty = 0;
  1002. this.formData.oilappoint3Amt = 0;
  1003. },
  1004. // 点击拨打电话
  1005. telFun() {
  1006. if (this.formData.driver1mobile != null && this.formData.driver1mobile != '') {
  1007. uni.makePhoneCall({
  1008. phoneNumber: this.formData.driver1mobile, //电话号码
  1009. success: function(e) {
  1010. // console.log(e);
  1011. },
  1012. fail: function(e) {
  1013. // console.log(e);
  1014. }
  1015. })
  1016. }
  1017. },
  1018. // 其他费用表格勾选事件
  1019. selectionChange(e) {
  1020. this.selectedIndexs = e.detail.index;
  1021. },
  1022. // 计算报销金额
  1023. // calculatMoney() {
  1024. // let loadetc = this.formData.loadetc == null ? 0 : this.formData.loadetc;
  1025. // let loadtoll = this.formData.loadtoll == null ? 0 : this.formData.loadtoll;
  1026. // let oilhomeAmt = this.formData.oilhomeAmt == null ? 0 : this.formData.oilhomeAmt;
  1027. // let oilappoint1Amt = this.formData.oilappoint1Amt == null ? 0 : this.formData.oilappoint1Amt;
  1028. // let oilappoint2Amt = this.formData.oilappoint2Amt == null ? 0 : this.formData.oilappoint2Amt;
  1029. // let oilappoint3Amt = this.formData.oilappoint3Amt == null ? 0 : this.formData.oilappoint3Amt;
  1030. // let oilcash1Amt = this.formData.oilcash1Amt == null ? 0 : this.formData.oilcash1Amt;
  1031. // let oilcardAmt = this.formData.oilcardAmt == null ? 0 : this.formData.oilcardAmt;
  1032. // let itemsMoney = 0;
  1033. // for (const key in this.itemsList) {
  1034. // let a = this.itemsList[key].amt == null ? 0 : this.itemsList[key].amt;
  1035. // itemsMoney += Number(a);
  1036. // }
  1037. // loadetc = Number(loadetc)
  1038. // loadtoll = Number(loadtoll)
  1039. // oilhomeAmt = Number(oilhomeAmt)
  1040. // oilappoint1Amt = Number(oilappoint1Amt)
  1041. // oilappoint2Amt = Number(oilappoint2Amt)
  1042. // oilappoint3Amt = Number(oilappoint3Amt)
  1043. // oilcash1Amt = Number(oilcash1Amt)
  1044. // oilcardAmt = Number(oilcardAmt)
  1045. // itemsMoney = Number(itemsMoney)
  1046. // this.money = loadetc + loadtoll + oilhomeAmt + oilappoint1Amt + oilappoint2Amt + oilcash1Amt + oilcardAmt +
  1047. // oilappoint3Amt + itemsMoney;
  1048. // },
  1049. checkUnLoadetc(e) {
  1050. //正则表达试
  1051. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1052. //重新赋值给input
  1053. this.$nextTick(() => {
  1054. this.formData.loadetc = e.target.value
  1055. })
  1056. this.calculatMoney();
  1057. },
  1058. checkUnLoadtoll(e) {
  1059. //正则表达试
  1060. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1061. //重新赋值给input
  1062. this.$nextTick(() => {
  1063. this.formData.loadtoll = e.target.value
  1064. })
  1065. this.calculatMoney();
  1066. },
  1067. checkUnOilhomeQty(e) {
  1068. //正则表达试
  1069. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1070. //重新赋值给input
  1071. this.$nextTick(() => {
  1072. this.formData.oilhomeQty = e.target.value
  1073. })
  1074. this.calculatMoney();
  1075. },
  1076. checkUnOilhomeAmt(e) {
  1077. //正则表达试
  1078. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1079. //重新赋值给input
  1080. this.$nextTick(() => {
  1081. this.formData.oilhomeAmt = e.target.value
  1082. })
  1083. this.calculatMoney();
  1084. },
  1085. checkUnOilappoint1Qty(e) {
  1086. //正则表达试
  1087. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1088. //重新赋值给input
  1089. this.$nextTick(() => {
  1090. this.formData.oilappoint1Qty = e.target.value
  1091. })
  1092. this.calculatMoney();
  1093. },
  1094. checkUnOilappoint1Amt(e) {
  1095. //正则表达试
  1096. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1097. //重新赋值给input
  1098. this.$nextTick(() => {
  1099. this.formData.oilappoint1Amt = e.target.value
  1100. })
  1101. this.calculatMoney();
  1102. },
  1103. checkUnOilappoint2Qty(e) {
  1104. //正则表达试
  1105. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1106. //重新赋值给input
  1107. this.$nextTick(() => {
  1108. this.formData.oilappoint2Qty = e.target.value
  1109. })
  1110. this.calculatMoney();
  1111. },
  1112. checkUnOilappoint2Amt(e) {
  1113. //正则表达试
  1114. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1115. //重新赋值给input
  1116. this.$nextTick(() => {
  1117. this.formData.oilappoint2Amt = e.target.value
  1118. })
  1119. this.calculatMoney();
  1120. },
  1121. checkUnOilappoint3Qty(e) {
  1122. //正则表达试
  1123. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1124. //重新赋值给input
  1125. this.$nextTick(() => {
  1126. this.formData.oilappoint3Qty = e.target.value
  1127. })
  1128. this.calculatMoney();
  1129. },
  1130. checkUnOilappoint3Amt(e) {
  1131. //正则表达试
  1132. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1133. //重新赋值给input
  1134. this.$nextTick(() => {
  1135. this.formData.oilappoint3Amt = e.target.value
  1136. })
  1137. this.calculatMoney();
  1138. },
  1139. checkUnOilcash1Qty(e) {
  1140. //正则表达试
  1141. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1142. //重新赋值给input
  1143. this.$nextTick(() => {
  1144. this.formData.oilcash1Qty = e.target.value
  1145. })
  1146. this.calculatMoney();
  1147. },
  1148. checkUnOilcash1Amt(e) {
  1149. //正则表达试
  1150. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1151. //重新赋值给input
  1152. this.$nextTick(() => {
  1153. this.formData.oilcash1Amt = e.target.value
  1154. })
  1155. this.calculatMoney();
  1156. },
  1157. checkUnOilcardQty(e) {
  1158. //正则表达试
  1159. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
  1160. //重新赋值给input
  1161. this.$nextTick(() => {
  1162. this.formData.oilcardQty = e.target.value
  1163. })
  1164. this.calculatMoney();
  1165. },
  1166. checkUnOilcardAmt(e) {
  1167. //正则表达试
  1168. e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1169. //重新赋值给input
  1170. this.$nextTick(() => {
  1171. this.formData.oilcardAmt = e.target.value
  1172. })
  1173. this.calculatMoney();
  1174. },
  1175. checkUnAmt(amt, index) {
  1176. var amt = (amt.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  1177. //重新赋值给input
  1178. this.$nextTick(() => {
  1179. this.itemsList[index].amt = amt
  1180. })
  1181. this.calculatMoney();
  1182. },
  1183. inputHeight() {
  1184. // if (this.vHeight == 0) {
  1185. this.vHeight = 600;
  1186. // } else {
  1187. // this.vHeight = 0;
  1188. // }
  1189. }
  1190. }
  1191. }
  1192. </script>
  1193. <style lang="scss">
  1194. @import url("/font/iconfont.css");
  1195. // 修改布局方向为纵向布局
  1196. .vertical-layout {
  1197. display: flex;
  1198. }
  1199. .h {
  1200. margin-top: 20rpx;
  1201. height: 100rpx;
  1202. padding-left: 40rpx;
  1203. // font-weight: 900;
  1204. border-top: 2rpx solid #f0f0f0f0;
  1205. border-bottom: 2rpx solid #f0f0f0f0;
  1206. line-height: 100rpx;
  1207. font-size: 30rpx;
  1208. color: #3c9cff;
  1209. // background-color: pink;
  1210. }
  1211. // 分割线
  1212. .striping {
  1213. width: 100%;
  1214. height: 4rpx;
  1215. background-color: #f0f0f0f0;
  1216. }
  1217. .box-box {
  1218. padding-left: 30rpx;
  1219. padding-right: 30rpx;
  1220. }
  1221. .content {
  1222. box-sizing: border-box;
  1223. background-color: white;
  1224. .head {
  1225. color: #3c9cff;
  1226. // width: 100%;
  1227. height: 40rpx;
  1228. padding: 0 30rpx;
  1229. vertical-align: middle;
  1230. // display: table-cell;
  1231. display: flex;
  1232. align-items: flex-end;
  1233. justify-content: space-between;
  1234. box-sizing: border-box;
  1235. font-size: 34rpx;
  1236. font-weight: 700;
  1237. // background-color: red;
  1238. }
  1239. .head-no-addr {
  1240. // width: 960rpx;
  1241. height: 100rpx;
  1242. // padding-left: 30rpx;
  1243. padding: 0 30rpx;
  1244. vertical-align: middle;
  1245. color: #fff;
  1246. font-size: 34rpx;
  1247. font-weight: 700;
  1248. display: flex;
  1249. align-items: center;
  1250. justify-content: space-between;
  1251. box-sizing: border-box;
  1252. background-color: #3c9cff;
  1253. }
  1254. .box-list {
  1255. color: #3b3b3b;
  1256. width: 100%;
  1257. border-bottom: 2rpx solid #f0f0f0f0;
  1258. // padding-left: 50rpx;
  1259. // font-size: 30rpx;
  1260. color: #3b3b3b;
  1261. .icon {
  1262. // width: 100rpx;
  1263. margin-top: 50rpx;
  1264. // font-size: 50rpx;
  1265. // color: #4888ff;
  1266. }
  1267. .list {
  1268. margin-top: 30rpx;
  1269. margin-bottom: 20rpx;
  1270. width: 100%;
  1271. height: 100%;
  1272. // background-color: pink;
  1273. height: auto;
  1274. display: flex;
  1275. flex-wrap: wrap;
  1276. // font-size: 30rpx;
  1277. }
  1278. .quantity-aum {
  1279. margin-bottom: 25rpx;
  1280. .aaa {
  1281. width: 50%;
  1282. .key {
  1283. display: inline-block;
  1284. width: 50%;
  1285. margin-left: 20rpx;
  1286. // margin-right: 80rpx;
  1287. border-bottom: 2rpx dotted #000;
  1288. }
  1289. }
  1290. .bbb {
  1291. width: 50%;
  1292. .value {
  1293. width: 50%;
  1294. margin-left: 20rpx;
  1295. // margin-right: 20rpx;
  1296. border-bottom: 2rpx dotted #000;
  1297. }
  1298. }
  1299. }
  1300. }
  1301. .box {
  1302. color: #3b3b3b;
  1303. // overflow: hidden;
  1304. height: 100rpx;
  1305. // border-bottom: 2rpx solid #f0f0f0f0;
  1306. // font-size: 30rpx;
  1307. display: flex;
  1308. align-items: center;
  1309. .data {
  1310. width: 50%;
  1311. display: flex;
  1312. align-items: center;
  1313. .key {
  1314. width: 55%;
  1315. text-align: right;
  1316. color: #3c9cff;
  1317. }
  1318. .value {
  1319. margin-left: 20rpx;
  1320. width: 45%;
  1321. color: #3b3b3b;
  1322. border-bottom: 2rpx dotted #000;
  1323. }
  1324. }
  1325. .data-two {
  1326. width: 100%;
  1327. display: flex;
  1328. align-items: center;
  1329. .key {
  1330. width: 35%;
  1331. text-align: right;
  1332. color: #3c9cff;
  1333. }
  1334. .list {
  1335. margin-top: 30rpx;
  1336. margin-bottom: 20rpx;
  1337. width: 100%;
  1338. height: 100%;
  1339. // background-color: pink;
  1340. height: auto;
  1341. display: flex;
  1342. flex-wrap: wrap;
  1343. // font-size: 30rpx;
  1344. }
  1345. }
  1346. }
  1347. .box-two {
  1348. color: #3b3b3b;
  1349. overflow: hidden;
  1350. height: 100rpx;
  1351. padding-left: 20rpx;
  1352. // margin-right: 20rpx;
  1353. // font-size: 30rpx;
  1354. display: flex;
  1355. align-items: center;
  1356. .key {
  1357. display: inline-block;
  1358. width: 24%;
  1359. color: #3c9cff;
  1360. }
  1361. .value {
  1362. margin-left: 20rpx;
  1363. width: calc(100% - 24%);
  1364. color: #3b3b3b;
  1365. // margin-right: 20rpx;
  1366. border-bottom: 2rpx dotted #000;
  1367. }
  1368. }
  1369. .table {
  1370. // margin-top: 40rpx;
  1371. margin-left: 20rpx;
  1372. margin-right: 20rpx;
  1373. .data {
  1374. // font-size: 30rpx;
  1375. width: 100%;
  1376. height: 100rpx;
  1377. border-bottom: 2rpx solid #f0f0f0f0;
  1378. align-items: center;
  1379. .name {
  1380. text-align: right;
  1381. width: 25%;
  1382. margin-left: 20rpx;
  1383. color: #000;
  1384. }
  1385. .sum {
  1386. width: 20%;
  1387. margin-left: 20rpx;
  1388. margin-right: 40rpx;
  1389. border-bottom: 2rpx dotted #000;
  1390. }
  1391. .remarks {
  1392. width: 30%;
  1393. }
  1394. }
  1395. }
  1396. .primary {
  1397. background-color: #0b68ffff;
  1398. }
  1399. .attention {
  1400. padding: 30rpx;
  1401. padding-left: 50rpx;
  1402. padding-bottom: 40rpx;
  1403. }
  1404. // 底部提交按钮
  1405. // .bottom {
  1406. // height: 130rpx;
  1407. // display: block;
  1408. // position: fixed;
  1409. // bottom: calc(var(--window-bottom));
  1410. // width: 100%;
  1411. // // background-color: #f0f0f0f0;
  1412. // // background-color: pink;
  1413. // background-color: white;
  1414. // .bottom-bottom {
  1415. // width: 100%;
  1416. // height: 100%;
  1417. // position: relative;
  1418. // display: flex;
  1419. // // .submit {
  1420. // // width: 95%;
  1421. // // background-color: #0b68ffff;
  1422. // // }
  1423. // .money {
  1424. // font-size: 28rpx;
  1425. // height: 130rpx;
  1426. // margin-right: 80rpx;
  1427. // line-height: 130rpx;
  1428. // margin-left: 10%;
  1429. // }
  1430. // .button {
  1431. // width: 300rpx;
  1432. // position: absolute;
  1433. // right: 0;
  1434. // margin-right: 10%;
  1435. // .button-button {
  1436. // padding: 10% 0;
  1437. // background-clip: content-box;
  1438. // }
  1439. // }
  1440. // }
  1441. // }
  1442. .bottom {
  1443. position: fixed;
  1444. bottom: calc(var(--window-bottom));
  1445. width: 100%;
  1446. height: 130rpx;
  1447. background-color: white;
  1448. .row {
  1449. display: flex;
  1450. justify-content: space-evenly;
  1451. height: 130rpx;
  1452. align-items: center;
  1453. .button {
  1454. width: 300rpx;
  1455. // width: 660rpx;
  1456. }
  1457. }
  1458. }
  1459. .input {
  1460. width: 100%;
  1461. // height: 100rpx;
  1462. // background-color: red;
  1463. }
  1464. .cushion {
  1465. width: 100%;
  1466. height: 200rpx;
  1467. background-color: #f0f0f0f0;
  1468. }
  1469. }
  1470. </style>