更新
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
<div @click="gopaly" class="oilNextFooter-butten flex jc ac">
|
||||
{{ text }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<van-popup round :style="{ height: '60%' }" position="bottom" v-model="isShow.details">
|
||||
<div class="details-popup">
|
||||
@@ -21,11 +20,10 @@
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import detailsCard from "../../cashier/components/detailsCard.vue";
|
||||
import detailsCard from '../../cashier/components/detailsCard.vue'
|
||||
import oilOrderApi from '@/api/oil-order.js'
|
||||
export default {
|
||||
props: {
|
||||
@@ -58,7 +56,7 @@ export default {
|
||||
{
|
||||
lable: '加油升数:',
|
||||
value: '---'
|
||||
},
|
||||
}
|
||||
],
|
||||
|
||||
[
|
||||
@@ -86,9 +84,8 @@ export default {
|
||||
valueStyle: {
|
||||
color: '#FF0000'
|
||||
}
|
||||
},
|
||||
],
|
||||
|
||||
}
|
||||
]
|
||||
],
|
||||
isShow: {
|
||||
details: false
|
||||
@@ -103,21 +100,19 @@ export default {
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
|
||||
this.updateFn()
|
||||
},
|
||||
methods: {
|
||||
updateFn() {
|
||||
this.$nextTick(function () {
|
||||
this.detailsList[0][0].value = this.oilDetails.siteName;
|
||||
this.detailsList[0][1].value = this.seleOil.oilProductCode + ' ' + this.seleOil.oilsBar + '号枪';
|
||||
this.detailsList[0][2].value = Number(this.seleOil.volume).toFixed(2) + 'L';
|
||||
this.detailsList[1][0].value = '¥' + Number(this.seleOil.payRealAmount + this.seleOil.oilDiscountAmount).toFixed(2);
|
||||
this.detailsList[1][1].value = '-¥' + Number(this.seleOil.oilDiscountAmount).toFixed(2);
|
||||
this.detailsList[1][3].value = '-¥' + Number(this.seleOil.payRealAmount).toFixed(2);
|
||||
this.detailsList[0][0].value = this.oilDetails.siteName
|
||||
this.detailsList[0][1].value = this.seleOil.oilProductCode + ' ' + this.seleOil.oilsBar + '号枪'
|
||||
this.detailsList[0][2].value = Number(this.seleOil.volume).toFixed(2) + 'L'
|
||||
this.detailsList[1][0].value = '¥' + Number(this.seleOil.payRealAmount + this.seleOil.oilDiscountAmount).toFixed(2)
|
||||
this.detailsList[1][1].value = '-¥' + Number(this.seleOil.oilDiscountAmount).toFixed(2)
|
||||
this.detailsList[1][3].value = '-¥' + Number(this.seleOil.payRealAmount).toFixed(2)
|
||||
})
|
||||
},
|
||||
update(e) {
|
||||
@@ -127,31 +122,31 @@ export default {
|
||||
return !position?.latitude && !position?.longitude ? true : false
|
||||
},
|
||||
gopaly() {
|
||||
let position = this.$pinia.state.value.user.position;
|
||||
let position = this.$pinia.state.value.user.position
|
||||
if (this.positionChenk(position)) {
|
||||
position = JSON.parse(localStorage.getItem("position"))
|
||||
position = JSON.parse(localStorage.getItem('position'))
|
||||
if (this.positionChenk(position)) {
|
||||
console.log(position, this.$pinia.state.value.user.position, '地理位置错误');
|
||||
console.log(position, this.$pinia.state.value.user.position, '地理位置错误')
|
||||
return
|
||||
}
|
||||
}
|
||||
let page = {
|
||||
shareCompanyQuota: 0, // 共享标识
|
||||
priceId: this.seleOil.priceId, //类型:String 必有字段 备注:油价主键
|
||||
orderType: "REAL_ORDER", //类型:String 必有字段 备注:订单类型(REAL_ORDER:真实订单 VIRTUAL_ORDER:虚拟订单)
|
||||
orderSource: "WECHAT_MINIAPPS", //类型:String 必有字段 备注:订单来源(WECHAT_MINIAPPS)
|
||||
plateNumber: this.seleOil.plateNumber, //类型:String 必有字段 备注:车牌号
|
||||
siteUserName: '一号加油员', //类型:String 必有字段 备注:加油员
|
||||
oilsBar: this.seleOil.oilsBar, //类型:Number 必有字段 备注:油枪
|
||||
volume: this.seleOil.volume, //类型:Number 必有字段 备注:加油升数
|
||||
realPrice: this.seleOil.payRealAmount, //类型:Number 必有字段 备注:实际加油价格
|
||||
suppleMark: 0, //类型:Number 必有字段 备注:补录标识(0:实时订单 1:补录订单)
|
||||
createSource: "H5_COMPANY_AUTH", //类型:String 必有字段 备注:创建来源( XOIL_DRIVER_COMPANY_WECHAT_APPLET)
|
||||
// "deviceImei": "mock", //类型:String 可有字段 备注:设备唯一码
|
||||
// "networkIp": "mock" //类型:String 可有字段 备注:ip地址
|
||||
priceId: this.seleOil.priceId, //油价主键
|
||||
orderType: 'REAL_ORDER', //订单类型(REAL_ORDER:真实订单 VIRTUAL_ORDER:虚拟订单)
|
||||
orderSource: 'WECHAT_MINIAPPS', //订单来源(WECHAT_MINIAPPS)
|
||||
plateNumber: this.seleOil.plateNumber, //车牌号
|
||||
siteUserName: '一号加油员', //加油员
|
||||
oilsBar: this.seleOil.oilsBar, //油枪
|
||||
volume: this.seleOil.volume, //加油升数
|
||||
realPrice: this.seleOil.payRealAmount, //实际加油价格
|
||||
suppleMark: 0, //补录标识(0:实时订单 1:补录订单)
|
||||
createSource: 'H5_COMPANY_AUTH', //创建来源( XOIL_DRIVER_COMPANY_WECHAT_APPLET)
|
||||
// "deviceImei": "mock", //设备唯一码
|
||||
// "networkIp": "mock" //ip地址
|
||||
kaliState: 1,
|
||||
'version': 1,
|
||||
'xoilAmountGun': Number(Number(this.seleOil.payRealAmount + this.seleOil.oilDiscountAmount).toFixed(2)),
|
||||
version: 1,
|
||||
xoilAmountGun: Number(Number(this.seleOil.payRealAmount + this.seleOil.oilDiscountAmount).toFixed(2)),
|
||||
latitude: position.latitude,
|
||||
longitude: position.longitude
|
||||
}
|
||||
@@ -162,7 +157,7 @@ export default {
|
||||
oilOrderApi.createOrder(page).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.$router.push({
|
||||
'path': '/cashier',
|
||||
path: '/cashier',
|
||||
query: {
|
||||
order: JSON.stringify(res.data)
|
||||
}
|
||||
@@ -173,7 +168,7 @@ export default {
|
||||
console.log(page, '+++')
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -186,9 +181,8 @@ export default {
|
||||
|
||||
.details-popup-one:last-child {
|
||||
margin-top: 0px;
|
||||
border-top: dashed 0px #B9B9B9;
|
||||
border-bottom: dashed 0px #B9B9B9;
|
||||
|
||||
border-top: dashed 0px #b9b9b9;
|
||||
border-bottom: dashed 0px #b9b9b9;
|
||||
}
|
||||
|
||||
.details-popup-title {
|
||||
@@ -200,9 +194,9 @@ export default {
|
||||
|
||||
.details-popup-one {
|
||||
height: 220px;
|
||||
border-top: dashed 1px #B9B9B9;
|
||||
border-top: dashed 1px #b9b9b9;
|
||||
margin-top: 45px;
|
||||
border-bottom: dashed 1px #B9B9B9;
|
||||
border-bottom: dashed 1px #b9b9b9;
|
||||
overflow: auto;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
@@ -220,8 +214,7 @@ export default {
|
||||
|
||||
.oilNextFooter-price {
|
||||
font-size: 28px;
|
||||
color: #FE0505;
|
||||
|
||||
color: #fe0505;
|
||||
}
|
||||
|
||||
.oilNextFooter-hj {
|
||||
@@ -232,14 +225,13 @@ export default {
|
||||
.oilNextFooter-butten {
|
||||
width: 314px;
|
||||
height: 90px;
|
||||
background: #FF6700;
|
||||
background: #ff6700;
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
opacity: 1;
|
||||
font-family: PingFang SC-中等, PingFang SC;
|
||||
font-weight: normal;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
font-size: 32px;
|
||||
|
||||
}
|
||||
|
||||
.oilNextFooter {
|
||||
@@ -260,4 +252,4 @@ export default {
|
||||
justify-content: space-between;
|
||||
z-index: 9;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user