|
|
@@ -1,25 +1,46 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
- <view class="head">
|
|
|
- <text>订单号: {{formData.orderNo}}</text>
|
|
|
- </view>
|
|
|
+ <u-sticky>
|
|
|
+ <view class="head" style="background-color: #3c9cff; color: #fff; width: 960rpx;">
|
|
|
+ <text>订单号: {{formData.orderNo}}</text>
|
|
|
+ </view>
|
|
|
+ </u-sticky>
|
|
|
<view class="striping"></view>
|
|
|
<view class="head" @click="telFun">
|
|
|
<text>驾驶员: {{formData.driver1Name == null ? '' : formData.driver1Name}} 电话: {{formData.driver1mobile == null ? '' : formData.driver1mobile}}</text>
|
|
|
</view>
|
|
|
- <u-collapse>
|
|
|
- <!-- <u-collapse-item title="报销费用" name="claim expense"> -->
|
|
|
+
|
|
|
+ <u-tabs :list="tabs" @change="change"
|
|
|
+ :activeStyle="{
|
|
|
+ width: '180rpx',
|
|
|
+ height: '60rpx',
|
|
|
+ color: '#fff',
|
|
|
+ backgroundColor: '#3c9cff',
|
|
|
+ borderRadius: '80rpx',
|
|
|
+ lineHeight: '60rpx',
|
|
|
+ textAlign: 'center'
|
|
|
+ }"
|
|
|
+ :inactiveStyle="{
|
|
|
+ width: '180rpx',
|
|
|
+ height: '60rpx',
|
|
|
+ color: '#3c9cff',
|
|
|
+ backgroundColor: '#f0f0f0f0',
|
|
|
+ borderRadius: '80rpx',
|
|
|
+ lineHeight: '60rpx',
|
|
|
+ textAlign: 'center'
|
|
|
+ }"></u-tabs>
|
|
|
+ <view v-if="isTabs == '行程费用'">
|
|
|
<view class="box-box">
|
|
|
<view class="box">
|
|
|
<view class="data">
|
|
|
<text class="key">ETC金额</text>
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnLoadetc" v-model="formData.loadetc" />
|
|
|
+ type="digit" @input="checkUnLoadetc" v-model="formData.loadetc" />
|
|
|
</view>
|
|
|
<view class="data">
|
|
|
<text class="key">现金过路费</text>
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnLoadtoll" v-model="formData.loadtoll" />
|
|
|
+ type="digit" @input="checkUnLoadtoll" v-model="formData.loadtoll" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -27,12 +48,12 @@
|
|
|
<view class="data">
|
|
|
<text class="key">公司加油(升)</text>
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnOilhomeQty" v-model="formData.oilhomeQty" />
|
|
|
+ type="digit" @input="checkUnOilhomeQty" v-model="formData.oilhomeQty" />
|
|
|
</view>
|
|
|
<view class="data">
|
|
|
<text class="key">加油金额</text>
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnOilhomeAmt" v-model="formData.oilhomeAmt" />
|
|
|
+ type="digit" @input="checkUnOilhomeAmt" v-model="formData.oilhomeAmt" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -54,14 +75,14 @@
|
|
|
<view class="data">
|
|
|
<text class="key">升数</text>
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnOilappoint1Qty" placeholder="请输入升数"
|
|
|
+ type="digit" @input="checkUnOilappoint1Qty" placeholder="请输入升数"
|
|
|
v-model="formData.oilappoint1Qty" />
|
|
|
</view>
|
|
|
<view class="data">
|
|
|
<text class="key">金额</text>
|
|
|
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnOilappoint1Amt" placeholder="请输入金额"
|
|
|
+ type="digit" @input="checkUnOilappoint1Amt" placeholder="请输入金额"
|
|
|
v-model="formData.oilappoint1Amt" />
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -79,14 +100,14 @@
|
|
|
<view class="data">
|
|
|
<text class="key">升数</text>
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnOilappoint2Qty" placeholder="请输入升数"
|
|
|
+ type="digit" @input="checkUnOilappoint2Qty" placeholder="请输入升数"
|
|
|
v-model="formData.oilappoint2Qty" />
|
|
|
</view>
|
|
|
<view class="data">
|
|
|
<text class="key">金额</text>
|
|
|
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnOilappoint2Amt" placeholder="请输入金额"
|
|
|
+ type="digit" @input="checkUnOilappoint2Amt" placeholder="请输入金额"
|
|
|
v-model="formData.oilappoint2Amt" />
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -95,12 +116,12 @@
|
|
|
<view class="data">
|
|
|
<text class="key">现金加油(升)</text>
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnOilcash1Qty" v-model="formData.oilcash1Qty" />
|
|
|
+ type="digit" @input="checkUnOilcash1Qty" v-model="formData.oilcash1Qty" />
|
|
|
</view>
|
|
|
<view class="data">
|
|
|
<text class="key">加油金额</text>
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnOilcash1Amt" v-model="formData.oilcash1Amt" />
|
|
|
+ type="digit" @input="checkUnOilcash1Amt" v-model="formData.oilcash1Amt" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -109,25 +130,27 @@
|
|
|
<view class="data">
|
|
|
<text class="key">油卡加油(升)</text>
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnOilcardQty" v-model="formData.oilcardQty" />
|
|
|
+ type="digit" @input="checkUnOilcardQty" v-model="formData.oilcardQty" />
|
|
|
</view>
|
|
|
<view class="data">
|
|
|
<text class="key">加油金额</text>
|
|
|
<input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnOilcardAmt" v-model="formData.oilcardAmt" />
|
|
|
+ type="digit" @input="checkUnOilcardAmt" v-model="formData.oilcardAmt" />
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="box-two">
|
|
|
<text class="key">备 注</text>
|
|
|
- <input class="value" selection-start="0" selection-end="9999" :disabled="disabled" v-model="formData.driverassdesc" />
|
|
|
+ <input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
+ v-model="formData.driverassdesc" />
|
|
|
</view>
|
|
|
<!-- </u-collapse-item> -->
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="box-box" style="margin-top: 40rpx;">
|
|
|
- <u-upload :fileList="fileList1" @afterRead="imgUploading" @delete="deletePic" name="1" multiple
|
|
|
- :disabled="this.status376 == 6" :previewFullImage="true"></u-upload>
|
|
|
+ <u-upload :fileList="fileList1" accept="image" :sizeType="['compressed']" capture="camera"
|
|
|
+ @afterRead="imgUploading" @delete="deletePic" name="1" multiple :disabled="disabled"
|
|
|
+ :previewFullImage="true"></u-upload>
|
|
|
</view>
|
|
|
|
|
|
<!-- <u-collapse-item title="照片" name="img" ref="collapseHeight">
|
|
|
@@ -136,41 +159,72 @@
|
|
|
|
|
|
</u-collapse-item> -->
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
+ <view v-if="isTabs == '其他费用'">
|
|
|
+ <!-- <view class="h">其他费用</view> -->
|
|
|
|
|
|
- <u-collapse-item title="其他费用" name="cost breakdown">
|
|
|
- <view class="table">
|
|
|
- <view class="data vertical-layout" v-for="(item, index) in itemsList" :key="index">
|
|
|
- <view class="name">
|
|
|
- <text style="color: #3c9cff;">{{ item.cname }}</text>
|
|
|
- </view>
|
|
|
- <view class="sum">
|
|
|
- <!-- <input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnAmt(item.amt, index)" cursor-spacing="15"
|
|
|
+ <!-- <u-collapse-item title="其他费用 ¥" name="cost breakdown"> -->
|
|
|
+ <view class="table">
|
|
|
+ <view class="data vertical-layout" v-for="(item, index) in itemsList" :key="index">
|
|
|
+ <view class="name">
|
|
|
+ <text style="color: #3c9cff;">{{ item.cname }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="sum">
|
|
|
+ <!-- <input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
+ type="digit" @input="checkUnAmt(item.amt, index)" cursor-spacing="15"
|
|
|
:adjust-position="true" v-model="item.amt" /> -->
|
|
|
- <input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
- inputmode="decimal" @input="checkUnAmt(item.amt, index)" @click="inputHeight" cursor-spacing="30"
|
|
|
- :always-embed="true" :adjust-position="true" v-model="item.amt" />
|
|
|
- </view>
|
|
|
+ <input class="value" selection-start="0" selection-end="9999" :disabled="disabled"
|
|
|
+ type="digit" @input="checkUnAmt(item.amt, index)" @click="inputHeight"
|
|
|
+ cursor-spacing="30" :always-embed="true" :adjust-position="true" v-model="item.amt" />
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="remarks" style="border-bottom: 2rpx dotted #000;">
|
|
|
+ <input v-model="item.remarks" placeholder="请输入备注">
|
|
|
</view>
|
|
|
</view>
|
|
|
- </u-collapse-item>
|
|
|
- </u-collapse>
|
|
|
-
|
|
|
- <view class="input" :style="{'height':vHeight + 'rpx'}">
|
|
|
-
|
|
|
+ </view>
|
|
|
+ <!-- </u-collapse-item> -->
|
|
|
+ <!-- </u-collapse> -->
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
+ <!-- <view class="input" :style="{'height':vHeight + 'rpx'}">
|
|
|
+
|
|
|
+ </view> -->
|
|
|
+
|
|
|
<view class="cushion">
|
|
|
|
|
|
</view>
|
|
|
|
|
|
- <view class="bottom vertical-layout" v-if="status376 == 2 || status376 == 0">
|
|
|
+
|
|
|
+ <view class="bottom vertical-layout" style="z-index: 4;" v-if="status376 == 2 || status376 == 0">
|
|
|
+ <!-- <view style="height: 20rpx;"></view>
|
|
|
<button class="submit" iconColor="#3c9cff" type="primary" @click="submit">提交费用</button>
|
|
|
+ <view style="height: 20rpx;"></view> -->
|
|
|
+
|
|
|
+ <view class="bottom-bottom">
|
|
|
+ <view class="money">
|
|
|
+ <!-- 金额合集 -->
|
|
|
+ <text>报销:</text> {{' '}}
|
|
|
+ <text style="color: #ff9f1c;">¥ {{money}}</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="button">
|
|
|
+ <!-- 提交按钮 -->
|
|
|
+ <view class="button-button">
|
|
|
+ <u-button iconColor="#3c9cff" shape="circle" type="primary" @click="submit"
|
|
|
+ text="提交费用"></u-button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
<!-- 遮盖罩 -->
|
|
|
- <u-loading-page :loading="loading"></u-loading-page>
|
|
|
+ <u-loading-page :loading="loading" style="z-index: 9999;"></u-loading-page>
|
|
|
|
|
|
<!-- 消息提示 -->
|
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
@@ -190,7 +244,7 @@
|
|
|
insertLoadFeeItems,
|
|
|
getLoadFeeItems
|
|
|
} from "@/api/reimbursement"
|
|
|
-
|
|
|
+
|
|
|
import {
|
|
|
getOrderBillsPlansByid,
|
|
|
putOrderBillsPlansByid,
|
|
|
@@ -227,7 +281,16 @@
|
|
|
// 删除弹框
|
|
|
deleteShow: false,
|
|
|
event: {},
|
|
|
- vHeight: 0
|
|
|
+ vHeight: 0,
|
|
|
+ tabs: [{
|
|
|
+ name: '行程费用'
|
|
|
+ }, {
|
|
|
+ name: '其他费用'
|
|
|
+ }],
|
|
|
+ isTabs: '行程费用',
|
|
|
+ // 报销金额
|
|
|
+ money: 0
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
onUnload() {
|
|
|
@@ -258,11 +321,16 @@
|
|
|
this.itemsList = costBreakdownList;
|
|
|
this.fileList1 = res.data.fileList1;
|
|
|
this.loading = false;
|
|
|
+
|
|
|
+ this.calculatMoney();
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ change(item) {
|
|
|
+ this.isTabs = item.name;
|
|
|
+ },
|
|
|
// 保存内容
|
|
|
submit() {
|
|
|
|
|
|
@@ -275,57 +343,118 @@
|
|
|
})
|
|
|
} else if (this.status376 == 2 || this.status376 == 0) {
|
|
|
|
|
|
+ // let isMo = false;
|
|
|
+
|
|
|
+ // for (const key in this.itemsList) {
|
|
|
+ // if (this.itemsList[key].amt == null) {
|
|
|
+ // isMo = true;
|
|
|
+ // continue;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if (this.formData.loadetc == null ||
|
|
|
+ // this.formData.loadtoll == null ||
|
|
|
+ // this.formData.oilhomeQty == null ||
|
|
|
+ // this.formData.oilhomeAmt == null ||
|
|
|
+ // this.formData.oilappoint1Qty == null ||
|
|
|
+ // this.formData.oilappoint1Amt == null ||
|
|
|
+ // this.formData.oilappoint2Qty == null ||
|
|
|
+ // this.formData.oilappoint2Amt == null ||
|
|
|
+ // this.formData.oilcash1Qty == null ||
|
|
|
+ // this.formData.oilcash1Amt == null ||
|
|
|
+ // this.formData.oilcardQty == null ||
|
|
|
+ // this.formData.oilcardAmt == null || isMo
|
|
|
+ // ) {
|
|
|
+ // this.$refs.uToast.show({
|
|
|
+ // type: 'warning',
|
|
|
+ // icon: false,
|
|
|
+ // message: "请输入金额或升数!",
|
|
|
+ // iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+
|
|
|
+ let isMo = false;
|
|
|
+
|
|
|
+ for (const key in this.itemsList) {
|
|
|
+ if (this.itemsList[key].amt == null) {
|
|
|
+ this.itemsList[key].amt = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ // let money = ['loadetc', 'loadtoll', 'oilhomeQty', 'oilhomeAmt', 'oilappoint1Qty', 'oilappoint1Amt', 'oilappoint2Qty', 'oilappoint2Amt', 'oilcash1Qty', 'oilcash1Amt', 'oilcardQty', 'oilcardAmt'];
|
|
|
+ // for (const item of money) {
|
|
|
+ // this.formData[item] = 0
|
|
|
+ // // this.formData.money[key] == null;
|
|
|
+ // // this.formData.loadetc == null;
|
|
|
+ // // this.formData.money[key] = 0;
|
|
|
+ // }
|
|
|
|
|
|
- if (this.formData.loadetc == null ||
|
|
|
- this.formData.loadtoll == null ||
|
|
|
- this.formData.oilhomeQty == null ||
|
|
|
- this.formData.oilhomeAmt == null ||
|
|
|
- this.formData.oilappoint1Qty == null ||
|
|
|
- this.formData.oilappoint1Amt == null ||
|
|
|
- this.formData.oilappoint2Qty == null ||
|
|
|
- this.formData.oilappoint2Amt == null ||
|
|
|
- this.formData.oilcash1Qty == null ||
|
|
|
- this.formData.oilcash1Amt == null ||
|
|
|
- this.formData.oilcardQty == null ||
|
|
|
- this.formData.oilcardAmt == null
|
|
|
- ) {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'warning',
|
|
|
- icon: false,
|
|
|
- message: "请输入金额或升数!",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.loading = true;
|
|
|
- var list = [];
|
|
|
- for (var item in this.itemsList) {
|
|
|
- var amt = this.itemsList[item].amt;
|
|
|
- if (amt != null) {
|
|
|
- var items = this.itemsList[item];
|
|
|
- list.push(items);
|
|
|
- }
|
|
|
+ if (this.formData.loadetc == null) {
|
|
|
+ this.formData.loadetc = 0;
|
|
|
+ }
|
|
|
+ if (this.formData.loadtoll == null) {
|
|
|
+ this.formData.loadtoll = 0;
|
|
|
+ }
|
|
|
+ if (this.formData.oilhomeQty == null) {
|
|
|
+ this.formData.oilhomeQty = 0;
|
|
|
+ }
|
|
|
+ if (this.formData.oilhomeAmt == null) {
|
|
|
+ this.formData.oilhomeAmt = 0;
|
|
|
+ }
|
|
|
+ if (this.formData.oilappoint1Qty == null) {
|
|
|
+ this.formData.oilappoint1Qty = 0;
|
|
|
+ }
|
|
|
+ if (this.formData.oilappoint1Amt == null) {
|
|
|
+ this.formData.oilappoint1Amt = 0;
|
|
|
+ }
|
|
|
+ if (this.formData.oilappoint2Qty == null) {
|
|
|
+ this.formData.oilappoint2Qty = 0;
|
|
|
+ }
|
|
|
+ if (this.formData.oilappoint2Amt == null) {
|
|
|
+ this.formData.oilappoint2Amt = 0;
|
|
|
+ }
|
|
|
+ if (this.formData.oilcash1Qty == null) {
|
|
|
+ this.formData.oilcash1Qty = 0;
|
|
|
+ }
|
|
|
+ if (this.formData.oilcash1Amt == null) {
|
|
|
+ this.formData.oilcash1Amt = 0;
|
|
|
+ }
|
|
|
+ if (this.formData.oilcardQty == null) {
|
|
|
+ this.formData.oilcardQty = 0;
|
|
|
+ }
|
|
|
+ if (this.formData.oilcardAmt == null) {
|
|
|
+ this.formData.oilcardAmt = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ this.loading = true;
|
|
|
+ var list = [];
|
|
|
+ for (var item in this.itemsList) {
|
|
|
+ var amt = this.itemsList[item].amt;
|
|
|
+ if (amt != null) {
|
|
|
+ var items = this.itemsList[item];
|
|
|
+ list.push(items);
|
|
|
}
|
|
|
- this.formData.itemsVoList = list;
|
|
|
- insertLoadFeeItems(this.formData).then(res => {
|
|
|
- this.loading = false;
|
|
|
- if (res.code == 200) {
|
|
|
- // 保存成功弹窗提示
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- message: "保存成功!",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
|
|
|
- })
|
|
|
- } else {
|
|
|
- // 保存失败消息
|
|
|
- this.$refs.uToast.show({
|
|
|
- icon: false,
|
|
|
- message: "保存失败请重试!",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
}
|
|
|
+ this.formData.itemsVoList = list;
|
|
|
+ insertLoadFeeItems(this.formData).then(res => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.code == 200) {
|
|
|
+ // 保存成功弹窗提示
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'success',
|
|
|
+ message: "保存成功!",
|
|
|
+ iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 保存失败消息
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ icon: false,
|
|
|
+ message: "保存失败请重试!",
|
|
|
+ iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
},
|
|
|
@@ -340,12 +469,12 @@
|
|
|
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
|
|
|
})
|
|
|
} else if (this.status376 == 2 || this.status376 == 0) {
|
|
|
- this.event = event;
|
|
|
- this.deleteShow = true;
|
|
|
+ this.event = event;
|
|
|
+ this.deleteShow = true;
|
|
|
}
|
|
|
},
|
|
|
deleteImg() {
|
|
|
-
|
|
|
+
|
|
|
var event = this.event;
|
|
|
var url = event.file.url;
|
|
|
var index = url.lastIndexOf("\/");
|
|
|
@@ -375,7 +504,6 @@
|
|
|
},
|
|
|
// 新增图片
|
|
|
imgUploading(event) {
|
|
|
-
|
|
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
|
|
let lists = [].concat(event.file)
|
|
|
let fileListLen = this[`fileList${event.name}`].length
|
|
|
@@ -387,15 +515,34 @@
|
|
|
})
|
|
|
})
|
|
|
for (let i = 0; i < lists.length; i++) {
|
|
|
+ let date = this.dateToString("yyyyMMdd");
|
|
|
+ let dateHHmmss = this.dateToString("yyyy-MM-dd HH:mm:ss");
|
|
|
+ this.formData.date = date;
|
|
|
insertTmsAttachMngs(this.formData).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
let data = {
|
|
|
name: 'avatarfile',
|
|
|
filePath: lists[i].url
|
|
|
}
|
|
|
+ // 获取经纬度
|
|
|
+ let longitude = '';
|
|
|
+ let latitude = '';
|
|
|
+ // uni.getLocation({
|
|
|
+ // type: 'wgs84',
|
|
|
+ // success: function(res) {
|
|
|
+ // console.log('当前位置的经度:' + res.longitude);
|
|
|
+ // console.log('当前位置的纬度:' + res.latitude);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
let dataForm = {
|
|
|
- attachId: res.data
|
|
|
+ attachId: res.data,
|
|
|
+ longitude: longitude,
|
|
|
+ latitude: latitude,
|
|
|
+ updateDate: dateHHmmss
|
|
|
}
|
|
|
+
|
|
|
+ console.log(dataForm);
|
|
|
+ // 上传图片
|
|
|
pictureUploading(data, dataForm).then(res => {
|
|
|
let item = this[`fileList${event.name}`][fileListLen]
|
|
|
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(
|
|
|
@@ -411,6 +558,23 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ dateToString(fmt) {
|
|
|
+ var date = new Date();
|
|
|
+ var o = {
|
|
|
+ "M+": date.getMonth() + 1, //月份
|
|
|
+ "d+": date.getDate(), //日
|
|
|
+ "H+": date.getHours(), //小时
|
|
|
+ "m+": date.getMinutes(), //分
|
|
|
+ "s+": date.getSeconds(), //秒
|
|
|
+ "q+": Math.floor((date.getMonth() + 3) / 3), //季度
|
|
|
+ "S": date.getMilliseconds() //毫秒
|
|
|
+ };
|
|
|
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|
|
+ for (var k in o)
|
|
|
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[
|
|
|
+ k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
|
|
+ return fmt;
|
|
|
+ },
|
|
|
// 定点加油1清空
|
|
|
gasstation1Change() {
|
|
|
this.formData.oilappoint1Qty = 0;
|
|
|
@@ -439,39 +603,35 @@
|
|
|
selectionChange(e) {
|
|
|
this.selectedIndexs = e.detail.index;
|
|
|
},
|
|
|
- groupChangeOne(n) {
|
|
|
- if (n == this.radioValueOne && this.numOne == 0) {
|
|
|
- // 第一次相等即执行以下代码
|
|
|
- this.numOne++
|
|
|
- } else {
|
|
|
- // 第一次后相等即执行以下代码
|
|
|
- // 置空 radioGroupValue 即取消选中的值
|
|
|
- this.formData.gasstation1 = ''
|
|
|
- // 初始化 num
|
|
|
- this.numOne = 0
|
|
|
- }
|
|
|
- },
|
|
|
- radioChangeOne(n) {
|
|
|
- this.radioValueOne = n
|
|
|
- // 切换选项后需要初始化 num
|
|
|
- this.numOne = 0
|
|
|
- },
|
|
|
- groupChangeTwo(n) {
|
|
|
- if (n == this.radioValueTwo && this.numTwo == 0) {
|
|
|
- // 第一次相等即执行以下代码
|
|
|
- this.numTwo++
|
|
|
- } else {
|
|
|
- // 第一次后相等即执行以下代码
|
|
|
- // 置空 radioGroupValue 即取消选中的值
|
|
|
- this.formData.gasstation2 = ''
|
|
|
- // 初始化 num
|
|
|
- this.numTwo = 0
|
|
|
+
|
|
|
+ // 计算报销金额
|
|
|
+ calculatMoney() {
|
|
|
+ let loadetc = this.formData.loadetc == null ? 0 : this.formData.loadetc;
|
|
|
+ let loadtoll = this.formData.loadtoll == null ? 0 : this.formData.loadtoll;
|
|
|
+ let oilhomeAmt = this.formData.oilhomeAmt == null ? 0 : this.formData.oilhomeAmt;
|
|
|
+ let oilappoint1Amt = this.formData.oilappoint1Amt == null ? 0 : this.formData.oilappoint1Amt;
|
|
|
+ let oilappoint2Amt = this.formData.oilappoint2Amt == null ? 0 : this.formData.oilappoint2Amt;
|
|
|
+ let oilcash1Amt = this.formData.oilcash1Amt == null ? 0 : this.formData.oilcash1Amt;
|
|
|
+ let oilcardAmt = this.formData.oilcardAmt == null ? 0 : this.formData.oilcardAmt;
|
|
|
+
|
|
|
+ let itemsMoney = 0;
|
|
|
+
|
|
|
+ for (const key in this.itemsList) {
|
|
|
+ let a = this.itemsList[key].amt == null ? 0 : this.itemsList[key].amt;
|
|
|
+ itemsMoney += Number(a);
|
|
|
}
|
|
|
- },
|
|
|
- radioChangeTwo(n) {
|
|
|
- this.radioValueTwo = n
|
|
|
- // 切换选项后需要初始化 num
|
|
|
- this.numTwo = 0
|
|
|
+
|
|
|
+ loadetc = Number(loadetc)
|
|
|
+ loadtoll = Number(loadtoll)
|
|
|
+ oilhomeAmt = Number(oilhomeAmt)
|
|
|
+ oilappoint1Amt = Number(oilappoint1Amt)
|
|
|
+ oilappoint2Amt = Number(oilappoint2Amt)
|
|
|
+ oilcash1Amt = Number(oilcash1Amt)
|
|
|
+ oilcardAmt = Number(oilcardAmt)
|
|
|
+ itemsMoney = Number(itemsMoney)
|
|
|
+
|
|
|
+ this.money = loadetc + loadtoll + oilhomeAmt + oilappoint1Amt + oilappoint2Amt + oilcash1Amt + oilcardAmt +
|
|
|
+ itemsMoney;
|
|
|
},
|
|
|
checkUnLoadetc(e) {
|
|
|
//正则表达试
|
|
|
@@ -480,7 +640,7 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.formData.loadetc = e.target.value
|
|
|
})
|
|
|
-
|
|
|
+ this.calculatMoney();
|
|
|
},
|
|
|
checkUnLoadtoll(e) {
|
|
|
//正则表达试
|
|
|
@@ -489,6 +649,7 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.formData.loadtoll = e.target.value
|
|
|
})
|
|
|
+ this.calculatMoney();
|
|
|
|
|
|
},
|
|
|
checkUnOilhomeQty(e) {
|
|
|
@@ -498,6 +659,7 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.formData.oilhomeQty = e.target.value
|
|
|
})
|
|
|
+ this.calculatMoney();
|
|
|
|
|
|
},
|
|
|
checkUnOilhomeAmt(e) {
|
|
|
@@ -507,6 +669,7 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.formData.oilhomeAmt = e.target.value
|
|
|
})
|
|
|
+ this.calculatMoney();
|
|
|
|
|
|
},
|
|
|
checkUnOilappoint1Qty(e) {
|
|
|
@@ -516,6 +679,7 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.formData.oilappoint1Qty = e.target.value
|
|
|
})
|
|
|
+ this.calculatMoney();
|
|
|
|
|
|
},
|
|
|
checkUnOilappoint1Amt(e) {
|
|
|
@@ -525,6 +689,7 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.formData.oilappoint1Amt = e.target.value
|
|
|
})
|
|
|
+ this.calculatMoney();
|
|
|
|
|
|
},
|
|
|
checkUnOilappoint2Qty(e) {
|
|
|
@@ -534,6 +699,7 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.formData.oilappoint2Qty = e.target.value
|
|
|
})
|
|
|
+ this.calculatMoney();
|
|
|
|
|
|
},
|
|
|
checkUnOilappoint2Amt(e) {
|
|
|
@@ -544,6 +710,7 @@
|
|
|
this.formData.oilappoint2Amt = e.target.value
|
|
|
})
|
|
|
|
|
|
+ this.calculatMoney();
|
|
|
},
|
|
|
checkUnOilcash1Qty(e) {
|
|
|
//正则表达试
|
|
|
@@ -552,6 +719,7 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.formData.oilcash1Qty = e.target.value
|
|
|
})
|
|
|
+ this.calculatMoney();
|
|
|
|
|
|
},
|
|
|
checkUnOilcash1Amt(e) {
|
|
|
@@ -561,6 +729,7 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.formData.oilcash1Amt = e.target.value
|
|
|
})
|
|
|
+ this.calculatMoney();
|
|
|
|
|
|
},
|
|
|
checkUnOilcardQty(e) {
|
|
|
@@ -570,6 +739,7 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.formData.oilcardQty = e.target.value
|
|
|
})
|
|
|
+ this.calculatMoney();
|
|
|
|
|
|
},
|
|
|
checkUnOilcardAmt(e) {
|
|
|
@@ -579,15 +749,17 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.formData.oilcardAmt = e.target.value
|
|
|
})
|
|
|
+ this.calculatMoney();
|
|
|
|
|
|
},
|
|
|
checkUnAmt(amt, index) {
|
|
|
-
|
|
|
+
|
|
|
var amt = (amt.match(/^\d*(\.?\d{0,2})/g)[0]) || null
|
|
|
//重新赋值给input
|
|
|
this.$nextTick(() => {
|
|
|
this.itemsList[index].amt = amt
|
|
|
})
|
|
|
+ this.calculatMoney();
|
|
|
},
|
|
|
inputHeight() {
|
|
|
// if (this.vHeight == 0) {
|
|
|
@@ -606,6 +778,22 @@
|
|
|
display: flex;
|
|
|
}
|
|
|
|
|
|
+ .h {
|
|
|
+ margin-top: 20rpx;
|
|
|
+ height: 100rpx;
|
|
|
+ padding-left: 40rpx;
|
|
|
+ font-weight: 900;
|
|
|
+ border-top: 2rpx solid #f0f0f0f0;
|
|
|
+ border-bottom: 2rpx solid #f0f0f0f0;
|
|
|
+
|
|
|
+ line-height: 100rpx;
|
|
|
+
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #3c9cff;
|
|
|
+
|
|
|
+ // background-color: pink;
|
|
|
+ }
|
|
|
+
|
|
|
// 分割线
|
|
|
.striping {
|
|
|
width: 100%;
|
|
|
@@ -614,8 +802,8 @@
|
|
|
}
|
|
|
|
|
|
.box-box {
|
|
|
- padding-left: 50rpx;
|
|
|
- padding-right: 50rpx;
|
|
|
+ padding-left: 30rpx;
|
|
|
+ padding-right: 30rpx;
|
|
|
}
|
|
|
|
|
|
.content {
|
|
|
@@ -644,7 +832,7 @@
|
|
|
width: 100%;
|
|
|
border-bottom: 2rpx solid #f0f0f0f0;
|
|
|
// padding-left: 50rpx;
|
|
|
- font-size: 30rpx;
|
|
|
+ // font-size: 30rpx;
|
|
|
|
|
|
|
|
|
color: #3b3b3b;
|
|
|
@@ -671,7 +859,7 @@
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
- font-size: 30rpx;
|
|
|
+ // font-size: 30rpx;
|
|
|
}
|
|
|
|
|
|
.quantity-aum {
|
|
|
@@ -711,9 +899,9 @@
|
|
|
// overflow: hidden;
|
|
|
height: 100rpx;
|
|
|
|
|
|
- border-bottom: 2rpx solid #f0f0f0f0;
|
|
|
+ // border-bottom: 2rpx solid #f0f0f0f0;
|
|
|
|
|
|
- font-size: 30rpx;
|
|
|
+ // font-size: 30rpx;
|
|
|
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -762,51 +950,52 @@
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
- font-size: 30rpx;
|
|
|
+ // font-size: 30rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.box-two {
|
|
|
-
|
|
|
+
|
|
|
color: #3b3b3b;
|
|
|
-
|
|
|
+
|
|
|
overflow: hidden;
|
|
|
height: 100rpx;
|
|
|
-
|
|
|
+
|
|
|
padding-left: 20rpx;
|
|
|
// margin-right: 20rpx;
|
|
|
-
|
|
|
- font-size: 30rpx;
|
|
|
-
|
|
|
+
|
|
|
+ // font-size: 30rpx;
|
|
|
+
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
-
|
|
|
+
|
|
|
.key {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
display: inline-block;
|
|
|
width: 24%;
|
|
|
- color: #3c9cff;
|
|
|
-
|
|
|
+ color: #3c9cff;
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.value {
|
|
|
margin-left: 20rpx;
|
|
|
width: calc(100% - 24%);
|
|
|
color: #3b3b3b;
|
|
|
// margin-right: 20rpx;
|
|
|
border-bottom: 2rpx dotted #000;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.table {
|
|
|
+ // margin-top: 40rpx;
|
|
|
margin-left: 20rpx;
|
|
|
margin-right: 20rpx;
|
|
|
|
|
|
.data {
|
|
|
- font-size: 30rpx;
|
|
|
+ // font-size: 30rpx;
|
|
|
width: 100%;
|
|
|
height: 100rpx;
|
|
|
border-bottom: 2rpx solid #f0f0f0f0;
|
|
|
@@ -815,16 +1004,21 @@
|
|
|
.name {
|
|
|
|
|
|
text-align: right;
|
|
|
- width: 20%;
|
|
|
+ width: 25%;
|
|
|
margin-left: 20rpx;
|
|
|
color: #000;
|
|
|
}
|
|
|
|
|
|
.sum {
|
|
|
+ width: 20%;
|
|
|
margin-left: 20rpx;
|
|
|
- margin-right: 80rpx;
|
|
|
+ margin-right: 40rpx;
|
|
|
border-bottom: 2rpx dotted #000;
|
|
|
}
|
|
|
+
|
|
|
+ .remarks {
|
|
|
+ width: 30%;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -840,26 +1034,64 @@
|
|
|
|
|
|
// 底部提交按钮
|
|
|
.bottom {
|
|
|
+ height: 130rpx;
|
|
|
display: block;
|
|
|
position: fixed;
|
|
|
bottom: calc(var(--window-bottom));
|
|
|
width: 100%;
|
|
|
+ // background-color: #f0f0f0f0;
|
|
|
+ // background-color: pink;
|
|
|
+ background-color: white;
|
|
|
+
|
|
|
+ .bottom-bottom {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ // .submit {
|
|
|
+ // width: 95%;
|
|
|
+ // background-color: #0b68ffff;
|
|
|
+ // }
|
|
|
+
|
|
|
+ .money {
|
|
|
+
|
|
|
+ font-size: 28rpx;
|
|
|
+ height: 130rpx;
|
|
|
+ margin-right: 80rpx;
|
|
|
+ line-height: 130rpx;
|
|
|
+
|
|
|
+ margin-left: 10%;
|
|
|
+ }
|
|
|
|
|
|
- .submit {
|
|
|
- background-color: #0b68ffff;
|
|
|
+ .button {
|
|
|
+ width: 300rpx;
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+
|
|
|
+ margin-right: 10%;
|
|
|
+
|
|
|
+ .button-button {
|
|
|
+ padding: 10% 0;
|
|
|
+ background-clip: content-box;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.input {
|
|
|
width: 100%;
|
|
|
// height: 100rpx;
|
|
|
// background-color: red;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.cushion {
|
|
|
width: 100%;
|
|
|
- height: 104rpx;
|
|
|
+ height: 200rpx;
|
|
|
background-color: #f0f0f0f0;
|
|
|
}
|
|
|
|