10.15
This commit is contained in:
parent
2285d94d08
commit
8a4189a778
@ -414,7 +414,7 @@
|
||||
<accountPending :amount="oilGunClearing.amount" @changeAmount="changeAmount"></accountPending>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="accountPending = false">取 消</el-button>
|
||||
<el-button type="primary" @click="accountPending = false">确 定</el-button>
|
||||
<el-button type="primary" @click="addHangbill">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
@ -445,7 +445,8 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 确认充值-->
|
||||
<el-dialog :close-on-click-modal="false" title="确认支付订单" :visible.sync="openConfirm" width="500px" append-to-body
|
||||
<el-dialog :close-on-click-modal="false" title="确认支付订单" :visible.sync="openConfirm" width="500px"
|
||||
append-to-body
|
||||
@close="onDialogClose">
|
||||
<div v-if="isPay"
|
||||
v-loading="loading">
|
||||
@ -562,6 +563,7 @@ import {
|
||||
import {getReturnCode, printOilOrderReport} from '@/api/print'
|
||||
import {addLJGoods, scanAppletQrCode} from "@/api/cashier/oilorder";
|
||||
import {cashierOrderByOrderNo} from '@/api/cashier/cashierorder'
|
||||
import {addHangBill} from "../../../api/cashier/hangbill";
|
||||
|
||||
export default {
|
||||
dicts: ['CardCoupon_type'],
|
||||
@ -665,6 +667,8 @@ export default {
|
||||
pickUpTheOrder: false,
|
||||
accountPending: false,
|
||||
memberRecharge: false,
|
||||
// 挂账订单信息
|
||||
credit: {},
|
||||
//会员搜索列表
|
||||
vipUserList: [],
|
||||
chooseVipUser: {},
|
||||
@ -1807,6 +1811,95 @@ export default {
|
||||
},
|
||||
changeAmount(val) {
|
||||
console.log(val, 1807)
|
||||
this.credit = val
|
||||
},
|
||||
// 添加挂账记录
|
||||
addHangbill() {
|
||||
addHangBill(this.credit).then(async response => {
|
||||
if (response.data == 1) {
|
||||
await this.addOrder();
|
||||
this.$modal.msgSuccess("挂账记录添加成功");
|
||||
this.accountPending = false;
|
||||
// this.printLocally()
|
||||
this.oilOrderReport()
|
||||
|
||||
this.payType = "WECHAT"
|
||||
this.restVipUser();
|
||||
this.resetting1();
|
||||
} else {
|
||||
this.$modal.msgError("挂账单位可用额度不足,无法进行挂账");
|
||||
}
|
||||
})
|
||||
},
|
||||
// 添加挂账订单信息
|
||||
async addOrder() {
|
||||
if (this.oilGunClearing) {
|
||||
this.payForm.oilOrder = JSON.stringify({
|
||||
oilPrice: this.oilGunClearing.oilPrice,
|
||||
oils: this.oilGunClearing.oilNameId,
|
||||
oilGunNum: this.oilGunClearing.id,
|
||||
tankId: this.oilGunClearing.tankId,
|
||||
activeId: this.chooseAct.hasOwnProperty('actId') ? this.chooseAct.activeId : null,
|
||||
activeType: this.chooseAct.hasOwnProperty('type') ? this.chooseAct.activeType : null,
|
||||
})
|
||||
} else {
|
||||
this.payForm.oilOrder = null
|
||||
}
|
||||
|
||||
|
||||
//商品 集合
|
||||
this.payForm.goodsOrder = JSON.stringify(this.goodsList)
|
||||
//支付方式
|
||||
this.payForm.payType = this.payType
|
||||
//油品订单金额
|
||||
this.payForm.oilAmount = this.oilGunClearing.amount || 0
|
||||
//商品订单金额
|
||||
this.payForm.goodsAmount = this.getGoodsNum
|
||||
//油品实付金额
|
||||
this.payForm.oilActualPay = this.oilGunClearing.amount || 0
|
||||
//商品实付金额
|
||||
this.payForm.goodsActualPay = this.getGoodsNum
|
||||
//油枪id
|
||||
this.payForm.oilGunId = this.oilGunClearing.id
|
||||
//活动营销优惠金额
|
||||
this.payForm.activeAmount = this.chooseAct.disAmount || 0.0
|
||||
|
||||
//优惠卷类型
|
||||
this.payForm.couponType = this.chooseCoupon.hasOwnProperty('type') ? this.chooseCoupon.type : null
|
||||
//优惠券id
|
||||
this.payForm.couponId = this.chooseCoupon.hasOwnProperty('couponId') ? this.chooseCoupon.id : null
|
||||
|
||||
//付款用户
|
||||
this.payForm.payUser = this.chooseVipUser.mobile
|
||||
//油品优惠金额
|
||||
this.payForm.oilDiscount = 0;
|
||||
//商品优惠金额
|
||||
this.payForm.goodsDiscount = 0;
|
||||
|
||||
//会员消费金额 (储值卡需要减少的金额)
|
||||
this.payForm.consumeAmount = this.realAmount;
|
||||
//会员id
|
||||
this.payForm.userId = this.chooseVipUser.id
|
||||
//终端 默认传PC
|
||||
this.payForm.terminal = "PC"
|
||||
//商品 ids
|
||||
// 将集合内 所有id 拼接 , 隔开 this.goodsList
|
||||
this.payForm.goodsIds = this.goodsList.map(item => item.id).join(",")
|
||||
//购买商品的总数量 计算属性
|
||||
this.payForm.goodsNum = this.getGoodsListNum
|
||||
//油品 + 商品 的实付总额
|
||||
this.payForm.allAmount = this.realAmount
|
||||
|
||||
|
||||
this.payForm.paymentType = this.payType
|
||||
|
||||
console.log('支付类型', this.payForm.paymentType)
|
||||
|
||||
//支付弹窗 相关
|
||||
this.payForm.realyPayBills = this.realAmount
|
||||
await addLJGoods(this.payForm).then(response => {
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 设置选中的支付方式
|
||||
|
@ -127,7 +127,7 @@ export default {
|
||||
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input type="textarea" v-model="ruleForm.remark"></el-input>
|
||||
<el-input type="textarea" v-model="ruleForm.remark" @input="changeAmount"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user