| New file |
| | |
| | | <div id="payCarModel" 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 "> |
| | | <vc:i18n name="缴费" namespace="payCar"></vc:i18n> |
| | | </h3> |
| | | <div class="ibox-content"> |
| | | <!-- 2. 缴费时间 --> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label"> |
| | | <vc:i18n name="缴费时间" namespace="payCar"></vc:i18n> |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="payCarInfo.payTime" type="text" |
| | | :placeholder="vc.i18n('必填,请填写缴费时间','payCar')" class="form-control addPayTime"> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 3. 缴费金额(必填,支持两位小数) --> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label"> |
| | | <vc:i18n name="缴费金额" namespace="payCar"></vc:i18n> |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <input v-model.number="payCarInfo.payAmount" type="number" |
| | | :placeholder="vc.i18n('必填,请填写正数金额(元)','payCar')" class="form-control" min="0.01" |
| | | step="0.01"> |
| | | <span class="text-muted">注:金额需大于0,支持两位小数</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 4. 支付方式(下拉框,必填) --> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label"> |
| | | <vc:i18n name="支付方式" namespace="payCar"></vc:i18n> |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <select class="custom-select" v-model="payCarInfo.primeRate"> |
| | | <option selected disabled value=""> |
| | | {{vc.i18n('必填,请选择支付方式','payCar')}} |
| | | </option> |
| | | <option value="现金">现金</option> |
| | | <option value="POS刷卡">POS刷卡</option> |
| | | <option value="微信二维码">微信二维码</option> |
| | | <option value="支付宝二维码">支付宝二维码</option> |
| | | <option value="转账">转账</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label"> |
| | | <vc:i18n name="纸质发票号" namespace="payCar"></vc:i18n> |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <input v-model.trim="payCarInfo.invoiceNo" type="text" |
| | | :placeholder="vc.i18n('选填,请填写实际纸质发票号','payCar')" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label"> |
| | | <vc:i18n name="纸质收据号" namespace="payCar"></vc:i18n> |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <input v-model.trim="payCarInfo.receiptNo" type="text" |
| | | :placeholder="vc.i18n('选填,请填写实际纸质收据号','payCar')" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <!-- 5. 转账人(仅支付方式为"转账"时显示,必填) --> |
| | | <div class="form-group row" v-if="payCarInfo.primeRate === '转账'"> |
| | | <label class="col-sm-2 col-form-label"> |
| | | <vc:i18n name="转账人" namespace="payCar"></vc:i18n> |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <input v-model.trim="payCarInfo.transferorName" type="text" |
| | | :placeholder="vc.i18n('必填,请填写转账人姓名/账号','payCar')" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <!-- 1. 缴费人(必填) --> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label"> |
| | | <vc:i18n name="缴费人" namespace="payCar"></vc:i18n> |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <input v-model.trim="payCarInfo.payerName" type="text" |
| | | :placeholder="vc.i18n('必填,请填写实际缴费人姓名','payCar')" class="form-control"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label"> |
| | | <vc:i18n name="备注:" namespace="payCar"></vc:i18n> |
| | | </label> |
| | | <div class="col-sm-10"> |
| | | <textarea :placeholder="vc.i18n('可填,请填写备注','payCar')" class="form-control" |
| | | v-model="payCarInfo.remark"> |
| | | </textarea> |
| | | </div> |
| | | </div> |
| | | <!-- 按钮区域 --> |
| | | <div class="ibox-content text-right"> |
| | | <button class="btn btn-warning mr-3" type="button" data-dismiss="modal"> |
| | | <i class="fa fa-times"></i> 取消 |
| | | </button> |
| | | <button class="btn btn-primary" type="button" @click="saveApplyRoomDiscountInfo()"> |
| | | <i class="fa fa-check"></i> 保存 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function (vc) { |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener: vc.propTypes.string, // 父组件名称(如需回调保留) |
| | | callBackFunction: vc.propTypes.string // 父组件监听方法(如需回调保留) |
| | | }, |
| | | data: { |
| | | payCarInfo: { |
| | | inoutId: '', |
| | | payerName: '', // 缴费人 |
| | | payTime: '', // 缴费时间 |
| | | payAmount: '', // 缴费金额 |
| | | primeRate: '', // 支付方式(CASH/WECHAT/ALIPAY/TRANSFER) |
| | | transferorName: '', // 转账人(仅转账时用) |
| | | invoiceNo: '', |
| | | receiptNo: '', |
| | | remark: '' |
| | | } |
| | | }, |
| | | _initMethod: function () { |
| | | $that._initpayCarDateInfo(); |
| | | }, |
| | | _initEvent: function () { |
| | | vc.on('payCar', 'openPayCarModal', function (params) { |
| | | console.log(params, params.inoutId); |
| | | $that.payCarInfo.inoutId = params.inoutId || ''; |
| | | $('#payCarModel').modal('show'); |
| | | }); |
| | | }, |
| | | methods: { |
| | | _initpayCarDateInfo: function () { |
| | | $('.addPayTime').datetimepicker({ |
| | | language: 'zh-CN', |
| | | fontAwesome: 'fa', |
| | | format: 'yyyy-mm-dd hh:ii:ss', |
| | | initTime: true, |
| | | initialDate: new Date(), |
| | | autoClose: 1, |
| | | todayBtn: true |
| | | }); |
| | | $('.addPayTime').datetimepicker() |
| | | .on('changeDate', function (ev) { |
| | | var value = $(".addPayTime").val(); |
| | | $that.payCarInfo.payTime = value; |
| | | }); |
| | | |
| | | document.querySelector('.form-control.addPayTime')?.addEventListener('click', function (e) { |
| | | e.currentTarget.blur(); |
| | | }); |
| | | }, |
| | | |
| | | // 核心表单验证(仅验证5个核心字段) |
| | | payCarValidate() { |
| | | const $that = this; |
| | | return vc.validate.validate({ |
| | | payCarInfo: $that.payCarInfo |
| | | }, { |
| | | // 缴费人验证 |
| | | 'payCarInfo.payerName': [ |
| | | { limit: "required", param: "", errInfo: "缴费人不能为空" }, |
| | | { limit: "maxLength", param: "64", errInfo: "缴费人姓名不能超过64字符" } |
| | | ], |
| | | // 缴费时间验证 |
| | | 'payCarInfo.payTime': [ |
| | | { limit: "required", param: "", errInfo: "缴费时间不能为空" }, |
| | | // { limit: "datetime", param: "", errInfo: "缴费时间格式错误(yyyy-mm-dd hh:ii:ss)" } |
| | | ], |
| | | // 缴费金额验证 |
| | | 'payCarInfo.payAmount': [ |
| | | { limit: "required", param: "", errInfo: "缴费金额不能为空" }, |
| | | { limit: "min", param: "0.01", errInfo: "缴费金额必须大于0" }, |
| | | { limit: "number", param: "", errInfo: "缴费金额必须为数字" } |
| | | ], |
| | | // 支付方式验证 |
| | | 'payCarInfo.primeRate': [ |
| | | { limit: "required", param: "", errInfo: "支付方式不能为空" } |
| | | ], |
| | | // 转账人:仅支付方式为"转账"时必填 |
| | | 'payCarInfo.transferorName': [ |
| | | { |
| | | limit: "requiredIf", |
| | | param: "payCarInfo.primeRate,TRANSFER", |
| | | errInfo: "选择转账方式需填写转账人" |
| | | }, |
| | | { limit: "maxLength", param: "128", errInfo: "转账人信息不能超过128字符" } |
| | | ] |
| | | }); |
| | | }, |
| | | |
| | | // 保存缴费信息(核心提交逻辑) |
| | | saveApplyRoomDiscountInfo: function () { |
| | | const $that = this; |
| | | // 表单验证 |
| | | if (!$that.payCarValidate()) { |
| | | vc.toast(vc.validate.errInfo); |
| | | return; |
| | | } |
| | | |
| | | // // 1. 若需要回调给父组件(如外部处理数据) |
| | | // if (vc.notNull($that.$props.callBackListener)) { |
| | | // vc.emit($that.$props.callBackListener, $that.$props.callBackFunction, $that.payCarInfo); |
| | | // $('#payCarModel').modal('hide'); |
| | | // $that.clearPayCarInfo(); // 清空表单 |
| | | // return; |
| | | // } |
| | | |
| | | // 2. 直接提交接口(如无需回调,保留此段) |
| | | vc.http.apiPost( |
| | | '/carInout.saveCarInoutFeeHistory', // 接口地址根据实际调整 |
| | | JSON.stringify($that.payCarInfo), |
| | | { emulateJSON: true }, |
| | | function (json, res) { |
| | | const _json = JSON.parse(json); |
| | | if (_json.code == 0) { |
| | | $('#payCarModel').modal('hide'); |
| | | $that.clearPayCarInfo(); |
| | | vc.toast("缴费信息保存成功"); |
| | | } else { |
| | | vc.toast(_json.msg); |
| | | } |
| | | }, |
| | | function (errInfo, error) { |
| | | console.error('保存失败:', errInfo); |
| | | vc.message(errInfo); |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | // 清空表单(仅重置核心字段) |
| | | clearPayCarInfo: function () { |
| | | const $that = this; |
| | | $that.payCarInfo = { |
| | | payerName: '', |
| | | payTime: $that._formatCurrentTime(), // 重置为当前时间 |
| | | payAmount: '', |
| | | primeRate: '', |
| | | transferorName: '', |
| | | invoiceNo: '', |
| | | receiptNo: '', |
| | | remark: '' |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| | |
| | | (function(vc) { |
| | | (function (vc) { |
| | | |
| | | vc.extends({ |
| | | data: { |
| | |
| | | configId: '', |
| | | } |
| | | }, |
| | | _initMethod: function() { |
| | | _initMethod: function () { |
| | | |
| | | }, |
| | | _initEvent: function() { |
| | | vc.on('viewFeeConfigData', 'showData', function(_param) { |
| | | _initEvent: function () { |
| | | vc.on('viewFeeConfigData', 'showData', function (_param) { |
| | | $that.viewFeeConfigDataInfo.configId = _param.configId; |
| | | $that._loadFeeConfigData(); |
| | | }); |
| | | }, |
| | | methods: { |
| | | _loadFeeConfigData: function() { |
| | | _loadFeeConfigData: function () { |
| | | let param = { |
| | | params: { |
| | | page: 1, |
| | |
| | | }; |
| | | //发送get请求 |
| | | vc.http.apiGet('/feeConfig.listFeeConfigs', param, |
| | | function(json, res) { |
| | | function (json, res) { |
| | | let _feeConfigManageInfo = JSON.parse(json); |
| | | let _feeConfig = _feeConfigManageInfo.feeConfigs[0]; |
| | | vc.emit('viewData', 'openViewDataModal', { |
| | |
| | | "催缴类型": _feeConfig.billTypeName, |
| | | "付费类型": _feeConfig.paymentCd == '1200' ? '预付费' : '后付费', |
| | | "缴费周期": _feeConfig.paymentCycle, |
| | | "计费起始时间": _feeConfig.startTime.split(' ')[0], |
| | | "计费终止时间": _feeConfig.endTime.split(' ')[0], |
| | | // "计费起始时间": _feeConfig.startTime.split(' ')[0], |
| | | // "计费终止时间": _feeConfig.endTime.split(' ')[0], |
| | | "公式": _feeConfig.computingFormulaName, |
| | | "计费单价": _feeConfig.computingFormula == '2002' ? '-' : _feeConfig.squarePrice, |
| | | "附加/固定费用": _feeConfig.additionalAmount, |
| | | } |
| | | }) |
| | | }, |
| | | function(errInfo, error) { |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | |
| | | <th class="text-center"> |
| | | <vc:i18n name="实收金额" namespace="tempCarPayment"></vc:i18n> |
| | | </th> |
| | | <!-- <th class="text-center"> |
| | | <vc:i18n name="支付时间" namespace="tempCarPayment"></vc:i18n> |
| | | </th> --> |
| | | <th class="text-center"> |
| | | <vc:i18n name="补缴金额" namespace="tempCarPayment"></vc:i18n> |
| | | </th> |
| | | <th class="text-center"> |
| | | <vc:i18n name="缴费人" namespace="tempCarPayment"></vc:i18n> |
| | | </th> |
| | | <th class="text-center"> |
| | | <vc:i18n name="缴费状态" namespace="tempCarPayment"></vc:i18n> |
| | | </th> |
| | | <th class="text-center"> |
| | | <vc:i18n name="操作" namespace="tempCarPayment"></vc:i18n> |
| | | </th> |
| | | </tr> |
| | | </thead> |
| | |
| | | <!-- <td class="text-center">{{carIn.payTypeName}}</td> --> |
| | | <!-- <td class="text-center">{{carIn.payCharge}}</td> --> |
| | | <td class="text-center">{{carIn.money||'-'}}</td> |
| | | <td class="text-center">{{carIn.carInoutFeeHistory.payAmount||'-'}}</td> |
| | | <td class="text-center">{{carIn.carInoutFeeHistory.payerName||'-'}}</td> |
| | | <!-- <td class="text-center">{{carIn.createTime}}</td> --> |
| | | <td class="text-center" v-if="carIn.state == '100300'">未支付</td> |
| | | <td class="text-center" v-if="carIn.state == '100400'">支付完成</td> |
| | | <td class="text-center" v-if="carIn.state == '100600'">支付超时重新支付</td> |
| | | <td class="text-center" v-if="carIn.state == '100700'">补缴完成</td> |
| | | <td class="text-center hc-table-fix-right-td" v-if="carIn.state == '100300'"> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openPayCarModal(carIn)"> |
| | | <vc:i18n name="缴费" namespace="tempCarPayment"></vc:i18n> |
| | | </button> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create path="property/payCar" callBackListener="" callBackFunction=""></vc:create> |
| | | </div> |
| | |
| | | }); |
| | | }, |
| | | methods: { |
| | | _openPayCarModal: function (carIn) { |
| | | console.log('======inoutId=====', carIn); |
| | | |
| | | vc.emit('payCar', 'openPayCarModal', { inoutId: carIn.inoutId }); |
| | | }, |
| | | _loadParkingArea: function () { |
| | | let param = { |
| | | params: { |
| | |
| | | }); |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理',errInfo,error); |
| | | console.log('请求失败处理', errInfo, error); |
| | | // $that.tempCarPaymentInfo.payments = error.body; |
| | | |
| | | }); |