mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化代码
This commit is contained in:
parent
4e4258b63b
commit
92492680e1
16
app.js
16
app.js
@ -31,17 +31,17 @@ let opts = {
|
||||
}
|
||||
|
||||
|
||||
//app.use('/callComponent',proxy('https://app.demo.winqi.cn/',opts));
|
||||
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
// app.use('/callComponent',proxy('https://app.demo.winqi.cn/',opts));
|
||||
// app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
// app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
|
||||
|
||||
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
//app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
app.use('/callComponent',proxy('http://owner.homecommunity.cn:8008',opts));
|
||||
app.use('/app',proxy('http://owner.homecommunity.cn:8008',opts));
|
||||
|
||||
app.use('/callComponent',proxy('http://127.0.0.1:8008',opts));
|
||||
app.use('/app',proxy('http://127.0.0.1:8008',opts));
|
||||
app.use('/ws',proxy('http://127.0.0.1:8008',opts));
|
||||
// app.use('/callComponent',proxy('http://127.0.0.1:8008',opts));
|
||||
// app.use('/app',proxy('http://127.0.0.1:8008',opts));
|
||||
// app.use('/ws',proxy('http://127.0.0.1:8008',opts));
|
||||
// app.use('/callComponent',proxy('http://192.168.1.106:8012',opts));
|
||||
// app.use('/app',proxy('http://192.168.1.106:8012',opts));
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">优惠券类型</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editCouponPoolInfo.couponType">
|
||||
<select class="custom-select" disabled v-model="editCouponPoolInfo.couponType">
|
||||
<option selected value="">请选择优惠券类型</option>
|
||||
<option value="1001">普通劵</option>
|
||||
</select>
|
||||
@ -19,7 +19,7 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">优惠券名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCouponPoolInfo.couponName" type="text" placeholder="必填,请填写优惠券名称"
|
||||
<input v-model="editCouponPoolInfo.couponName" disabled type="text" placeholder="必填,请填写优惠券名称"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
@ -36,7 +36,7 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">面值</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCouponPoolInfo.actualPrice" type="number" placeholder="必填,请填写面值"
|
||||
<input v-model="editCouponPoolInfo.actualPrice" disabled type="number" placeholder="必填,请填写面值"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
@ -57,14 +57,14 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">有效期</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCouponPoolInfo.validityDay" type="number" placeholder="必填,请填写有效期"
|
||||
<input v-model="editCouponPoolInfo.validityDay" disabled type="number" placeholder="必填,请填写有效期"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">排序</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCouponPoolInfo.seq" type="number" placeholder="必填,请填写排序" class="form-control">
|
||||
<input v-model="editCouponPoolInfo.seq" disabled type="number" placeholder="必填,请填写排序" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -20,6 +20,9 @@
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-12 text-right">
|
||||
<button type="button" class="btn btn-white btn-sm" v-on:click="unlicensedCarIn()">
|
||||
无牌车入场
|
||||
</button>
|
||||
<button type="button" class="btn btn-white btn-sm" v-on:click="customCarIn('1101')">
|
||||
手动进场
|
||||
</button>
|
||||
|
||||
@ -229,8 +229,21 @@
|
||||
type: _type,
|
||||
machineId: _machineId
|
||||
})
|
||||
},
|
||||
unlicensedCarIn: function (_type) {
|
||||
let _machineId = $that.parkingAreaControlVideoInfo.inMachineId;
|
||||
|
||||
if (!_machineId) {
|
||||
vc.toast('请选择入场摄像头');
|
||||
return;
|
||||
}
|
||||
vc.emit('unlicensedCarMachineQrCode', 'open', {
|
||||
type: '1101',
|
||||
machineId: _machineId
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
@ -0,0 +1,24 @@
|
||||
<div id="unlicensedCarMachineQrCodeModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b ">无牌车辆进场</h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group text-center " style="margin-top: 50px;">
|
||||
<div id="qrcode" style="width:200px; height:200px;margin:0 auto "></div>
|
||||
<div class="margin-top">无牌车进场二维码</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,72 @@
|
||||
(function (vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
unlicensedCarMachineQrCodeInfo: {
|
||||
carNum: '',
|
||||
amount: '',
|
||||
remark: '',
|
||||
type: '1101',
|
||||
payCharge: '',
|
||||
machineId: ''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('unlicensedCarMachineQrCode', 'open', function (_params) {
|
||||
vc.component.refreshUnlicensedCarMachineQrCodeInfoInfo();
|
||||
$('#unlicensedCarMachineQrCodeModel').modal('show');
|
||||
// = _params;
|
||||
vc.copyObject(_params, vc.component.unlicensedCarMachineQrCodeInfo);
|
||||
vc.component.unlicensedCarMachineQrCodeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_loadQrCodeUrl:function(){
|
||||
//判断是否支付
|
||||
var param = {
|
||||
params: {
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
boxId: $that.parkingAreaControlFeeInfo.boxId,
|
||||
machineId: $that.parkingAreaControlFeeInfo.machineId,
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/machine.unlicensedCarMachineQrCodeUrl',
|
||||
param,
|
||||
function (json, res) {
|
||||
let _info = JSON.parse(json);
|
||||
$that._viewQr(_info.data)
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_viewQr: function (_data) {
|
||||
document.getElementById("qrcode").innerHTML = "";
|
||||
let qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||
text: "无牌车入场二维码", //你想要填写的文本
|
||||
width: 200, //生成的二维码的宽度
|
||||
height: 200, //生成的二维码的高度
|
||||
colorDark: "#000000", // 生成的二维码的深色部分
|
||||
colorLight: "#ffffff", //生成二维码的浅色部分
|
||||
correctLevel: QRCode.CorrectLevel.H
|
||||
});
|
||||
qrcode.makeCode(_data.url);
|
||||
},
|
||||
refreshUnlicensedCarMachineQrCodeInfoInfo: function () {
|
||||
vc.component.unlicensedCarMachineQrCodeInfo = {
|
||||
carNum: '',
|
||||
amount: '',
|
||||
remark: '',
|
||||
type: '1101',
|
||||
payCharge: '',
|
||||
machineId: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc, window.vc.component);
|
||||
@ -46,8 +46,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">商家购买记录表ID</th>
|
||||
<th class="text-center">优惠券</th>
|
||||
<th class="text-center">店铺ID</th>
|
||||
<th class="text-center">店铺</th>
|
||||
<th class="text-center">优惠券名称</th>
|
||||
<th class="text-center">面值</th>
|
||||
<th class="text-center">购买价格</th>
|
||||
@ -62,8 +61,7 @@
|
||||
<tbody>
|
||||
<tr v-for="couponDetail in couponDetailManageInfo.couponDetails">
|
||||
<td class="text-center">{{couponDetail.detailId}}</td>
|
||||
<td class="text-center">{{couponDetail.poolId}}</td>
|
||||
<td class="text-center">{{couponDetail.shopId}}</td>
|
||||
<td class="text-center">{{couponDetail.shopName}}</td>
|
||||
<td class="text-center">{{couponDetail.couponName}}</td>
|
||||
<td class="text-center">{{couponDetail.actualPrice}}</td>
|
||||
<td class="text-center">{{couponDetail.buyPrice}}</td>
|
||||
|
||||
@ -74,10 +74,10 @@
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditCouponPoolModel(couponPool)">修改</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<!-- <div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteCouponPoolModel(couponPool)">删除</button>
|
||||
</div>
|
||||
</div> -->
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user