Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
55280a68ce
@ -7,7 +7,7 @@
|
||||
|
||||
<div class="right-menu">
|
||||
<template v-if="device!=='mobile'">
|
||||
<span v-if="day>=0" class="right-menu-item hover-effect" style="color: #ff1f1f; margin-right: 10px">油站有效期还剩{{day}}天</span>
|
||||
<span v-if="day>=0 && day<11" class="right-menu-item hover-effect" style="color: #ff1f1f; margin-right: 10px">油站有效期还剩{{day}}天</span>
|
||||
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
<ScreenData class="right-menu-item hover-effect" style="font-size: 24px"></ScreenData>
|
||||
|
@ -438,7 +438,8 @@ export default {
|
||||
let stock = new BigNumber(data.stock);
|
||||
// 计算库存差异
|
||||
|
||||
let addStocke = inventoryQuantity.plus(damageQuantity)
|
||||
let addStocke = inventoryQuantity.minus(damageQuantity)
|
||||
// let addStocke = inventoryQuantity.plus(damageQuantity)
|
||||
inventoryDiscrepancy = addStocke.minus(stock)
|
||||
// 计算盈亏金额
|
||||
profitLossAmount = inventoryDiscrepancy.multipliedBy(purchasePrice);
|
||||
|
@ -104,7 +104,8 @@
|
||||
<el-table-column label="礼品库存信息" align="center">
|
||||
<el-table-column label="总库存" align="center" prop="totalInventory" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="clickInventory(scope.row)">{{ scope.row.totalInventory===-1?'无限制': scope.row.totalInventory}}</el-button>
|
||||
<el-button v-if="scope.row.totalInventory" type="text" @click="clickInventory(scope.row)">{{ scope.row.totalInventory===-1?'无限制': scope.row.totalInventory}}</el-button>
|
||||
<el-button v-else type="text" @click="clickInventory(scope.row)">--</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已用" align="center" prop="usedInventory" width="80px">
|
||||
@ -279,7 +280,7 @@
|
||||
<el-col :span="7" v-if="showList.goods">
|
||||
<!-- giftQuantity-->
|
||||
<el-form-item label="商品库存" prop="">
|
||||
<el-input v-model="stock" controls-position="right" :min="1" :max="10" label="" style="width: 202px;" :disabled="true"></el-input>
|
||||
<el-input v-model="stock" controls-position="right" :min="1" :max="10" label="" style="width: 202px;" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -292,7 +293,7 @@
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="礼品库存" prop="totalInventory">
|
||||
<el-input v-model.number="dataForm.totalInventory" placeholder="礼品库存" maxlength="30" style="width: 202px;"/>
|
||||
<el-input :disabled="title === '修改礼品'" v-model.number="dataForm.totalInventory" placeholder="礼品库存" maxlength="30" style="width: 202px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -506,16 +507,17 @@
|
||||
|
||||
<el-dialog title="库存变更" :visible.sync="openInventory" width="500px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="inventoryForm" :rules="rulesInventory" label-width="100px">
|
||||
<el-form-item label="当前总库存" prop="totalInventory" >
|
||||
<el-input disabled v-model="inventoryForm.totalInventory" placeholder="" maxlength="30" style="width: 270px;">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="已用库存" prop="usedInventory" >
|
||||
<el-input disabled v-model="inventoryForm.usedInventory" placeholder="" maxlength="30" style="width: 270px;">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="当前总库存" prop="totalInventory" >-->
|
||||
<!-- <el-input disabled v-model="inventoryForm.totalInventory" placeholder="" maxlength="30" style="width: 270px;">-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="已用库存" prop="usedInventory" >-->
|
||||
<!-- <el-input disabled v-model="inventoryForm.usedInventory" placeholder="" maxlength="30" style="width: 270px;">-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="可用库存" prop="remainingInventory" >
|
||||
<el-input disabled v-model="inventoryForm.remainingInventory" placeholder="" maxlength="30" style="width: 270px;">
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="变更类型" prop="moneyRatio" >
|
||||
@ -828,6 +830,12 @@ export default {
|
||||
},
|
||||
|
||||
submitInventory: function(){
|
||||
console.log("inventoryForm",this.inventoryForm)
|
||||
|
||||
if (!this.inventoryForm.editInventory || this.inventoryForm.inventoryFlag == 2) {
|
||||
this.$message('请填写更改内容');
|
||||
return
|
||||
}
|
||||
if (this.inventoryForm.inventoryFlag === 1) {
|
||||
this.inventoryForm.editInventory = - this.inventoryForm.editInventory
|
||||
} else if(this.inventoryForm.inventoryFlag === 2) {
|
||||
@ -836,6 +844,8 @@ export default {
|
||||
if (this.inventoryForm.totalInventory == '无限制') {
|
||||
this.inventoryForm.editInventory = this.inventoryForm.editInventory+1
|
||||
}
|
||||
|
||||
console.log("inventoryForm",this.inventoryForm)
|
||||
updateGiftInventoryApi(this.inventoryForm).then(res=>{
|
||||
|
||||
this.getList();
|
||||
|
@ -497,13 +497,13 @@ export default {
|
||||
inventoryVolume:mul.storedQuantity,
|
||||
currentAveragePrice: mul.discountedPrice,
|
||||
currentInventoryVolume: mul.storedQuantity,
|
||||
|
||||
totalPrice: mul.totalPrice,
|
||||
theTotalPurchasePrice:getPurchaseByTankIdData.theTotalPurchasePrice, // 采购总价
|
||||
theAmountOfOilPurchased:getPurchaseByTankIdData.theAmountOfOilPurchased, // 采购油量
|
||||
purchaseUnitPrice:getPurchaseByTankIdData.purchaseUnitPrice, // 采购单价
|
||||
totalOilVolumeSold:getPurchaseByTankIdData.totalOilVolumeSold, // 销售总油量
|
||||
theTotalSalePrice:getPurchaseByTankIdData.theTotalSalePrice, // 销售总价
|
||||
totalPrice:getPurchaseByTankIdData.purchaseUnitPrice*getPurchaseByTankIdData.totalOilVolumeSold // 当前剩余油量总价
|
||||
// totalPrice:getPurchaseByTankIdData.purchaseUnitPrice*getPurchaseByTankIdData.totalOilVolumeSold // 当前剩余油量总价
|
||||
}
|
||||
|
||||
|
||||
|
@ -165,10 +165,10 @@
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="patchwork(scope.row)"-->
|
||||
<!-- type="primary" plain round>补打</el-button>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
v-if = "scope.row.status === 'paid'"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- v-if = "scope.row.status === 'paid'"-->
|
||||
<!-- @click="handleRefund(scope.row.id)"-->
|
||||
<!-- type="danger" plain round>退款</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -169,17 +169,17 @@
|
||||
<span>{{ parseTime(scope.row.payTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="patchwork(scope.row)"-->
|
||||
<!-- type="primary" plain round>补打</el-button>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
v-if = "scope.row.status === 'paid'"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- v-if = "scope.row.status === 'paid'"-->
|
||||
<!-- @click="handleRefund(scope.row.id)"-->
|
||||
<!-- type="danger" plain round>退款</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
|
@ -229,17 +229,17 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="patchwork(scope.row)"-->
|
||||
<!-- type="primary" plain round>补打</el-button>-->
|
||||
<el-button style="width: 60px" size="mini"
|
||||
@click="handleRefund(scope.row.id)"
|
||||
v-if = "scope.row.orderStatus === 'paid'"
|
||||
type="danger" plain round>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-button style="width: 60px" size="mini"-->
|
||||
<!-- @click="handleRefund(scope.row.id)"-->
|
||||
<!-- v-if = "scope.row.orderStatus === 'paid'"-->
|
||||
<!-- type="danger" plain round>退款</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination-box">
|
||||
|
@ -209,3 +209,11 @@ export function deptDelete(id) {
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
export function isTopLevelNodesApi(data) {
|
||||
return request({
|
||||
url: '/system/dept/isTopLevelNodes',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
@ -30,319 +30,322 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="17">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-card style="margin-bottom: 20px;">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="用户信息" name="list">
|
||||
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="68px">
|
||||
<el-form-item label="用户名" prop="accountName">
|
||||
<el-input
|
||||
v-model="queryParams.accountName"
|
||||
placeholder="请输入用户名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名" prop="accountName">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入真实姓名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="accountStatus">
|
||||
<el-select
|
||||
v-model="queryParams.accountStatus"
|
||||
placeholder="用户状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option key="1" label="启用" value="1"/>
|
||||
<el-option key="0" label="禁用" value="0"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- </el-card>-->
|
||||
<!-- <el-card >-->
|
||||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
|
||||
<el-table-column label="用户名" align="center" key="accountName" prop="accountName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" />
|
||||
|
||||
<el-table-column label="所属机构" align="center" prop="storeName" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.deptName ? scope.row.deptName : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" key="accountStatus" v-if="columns[2].visible">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.accountStatus"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createDate" v-if="columns[3].visible" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.createTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="160"
|
||||
class-name="small-padding fixed-width"
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="68px">
|
||||
<el-form-item label="用户名" prop="accountName">
|
||||
<el-input
|
||||
v-model="queryParams.accountName"
|
||||
placeholder="请输入用户名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名" prop="accountName">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入真实姓名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="accountStatus">
|
||||
<el-select
|
||||
v-model="queryParams.accountStatus"
|
||||
placeholder="用户状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<!-- v-hasPermi="['system:account:edit']" -->
|
||||
<!-- v-hasPermi="['system:account:delete']" -->
|
||||
<el-option key="1" label="启用" value="1"/>
|
||||
<el-option key="0" label="禁用" value="0"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:account:resetPwd', 'system:account:edit']">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-d-arrow-right el-icon--right"></i>更多
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:account:edit']">重置密码</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- tab第一张-->
|
||||
</el-tab-pane>
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- </el-card>-->
|
||||
<!-- <el-card >-->
|
||||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
|
||||
<el-table-column label="用户名" align="center" key="accountName" prop="accountName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" />
|
||||
|
||||
<el-table-column label="所属机构" align="center" prop="storeName" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.deptName ? scope.row.deptName : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" key="accountStatus" v-if="columns[2].visible">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.accountStatus"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createDate" v-if="columns[3].visible" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.createTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="160"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<!-- v-hasPermi="['system:account:edit']" -->
|
||||
<!-- v-hasPermi="['system:account:delete']" -->
|
||||
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:account:resetPwd', 'system:account:edit']">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-d-arrow-right el-icon--right"></i>更多
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:account:edit']">重置密码</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- tab第一张-->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="机构信息" name="info">
|
||||
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="父级节点" prop="name">
|
||||
<el-cascader :options="Thetree" v-model="cascader" :props="defaultProps" @change="handleChanges" :placeholder="parentName" ></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="父级节点" prop="name">
|
||||
<el-cascader :disabled="isTopDept" :options="Thetree" v-model="cascader" :props="defaultProps" @change="handleChanges" :placeholder="parentName" ></el-cascader>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="上级部门" prop="parentId">-->
|
||||
<!-- <treeselect v-model="cascader" :options="Thetree" :normalizer="normalizer" @change="handleChanges" placeholder="啊" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="节点名称" prop="deptName">
|
||||
<el-input v-model="ruleForm.deptName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人名称" prop="leaderName">
|
||||
<el-input v-model="ruleForm.leaderName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人电话" prop="leaderPhone">
|
||||
<el-input v-model="ruleForm.leaderPhone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="deptType">
|
||||
<el-radio-group v-model="ruleForm.deptType">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.node_type"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="上级部门" prop="parentId">-->
|
||||
<!-- <treeselect v-model="cascader" :options="Thetree" :normalizer="normalizer" @change="handleChanges" placeholder="啊" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="节点名称" prop="deptName">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.deptName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人名称" prop="leaderName">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.leaderName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人电话" prop="leaderPhone">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.leaderPhone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="deptType">
|
||||
<el-radio-group :disabled="isTopDept" v-model="ruleForm.deptType">
|
||||
<el-radio
|
||||
v-for="dict in judgementNodeType(dict.type.node_type)"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<template v-if="ruleForm.deptType !== '3'">
|
||||
<el-row >
|
||||
<el-col :span="20">
|
||||
<el-form-item label="额度设置方式" prop="">
|
||||
<el-radio-group v-model="ruleForm.turnoverType" @input="changeTheBillingRule">
|
||||
<el-radio label=1>无限制</el-radio>
|
||||
<el-radio label=2>时间限制</el-radio>
|
||||
<el-radio label=3>预付费</el-radio>
|
||||
<el-radio label=4>后付费</el-radio>
|
||||
<el-radio label=5>年付费</el-radio>
|
||||
<el-radio label=6>可创建油站站点数量</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '2'">
|
||||
<el-form-item label="时间限制" prop="turnoverType" style="width:220px">
|
||||
<el-date-picker
|
||||
v-model="timeFrame"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '3'">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="预付金额">
|
||||
<el-input-number v-model="ruleForm.prepaidAmount" @input="rateCalculation()">
|
||||
<template slot="append">元</template>
|
||||
</el-input-number>
|
||||
<template v-if="ruleForm.deptType !== '3'">
|
||||
<el-row >
|
||||
<el-col :span="20">
|
||||
<el-form-item label="额度设置方式" prop="">
|
||||
<el-radio-group :disabled="isTopDept" v-model="ruleForm.turnoverType" @input="changeTheBillingRule">
|
||||
<el-radio label=1>无限制</el-radio>
|
||||
<el-radio label=2>时间限制</el-radio>
|
||||
<el-radio label=3>预付费</el-radio>
|
||||
<el-radio label=4>后付费</el-radio>
|
||||
<el-radio label=5>年付费</el-radio>
|
||||
<el-radio label=6>可创建油站站点数量</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="费率">
|
||||
<el-input v-model="ruleForm.rates" @input="rateCalculation()">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="可跑流量">
|
||||
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '4'">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="费率">
|
||||
<el-input v-model="ruleForm.rates" @input="rateCalculation()">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="实际交易量">
|
||||
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="系统服务费">
|
||||
<el-input v-model="ruleForm.prepaidAmount" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '5'">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="时间范围">
|
||||
<template v-if="ruleForm.turnoverType === '2'">
|
||||
<el-form-item label="时间限制" prop="turnoverType" style="width:220px">
|
||||
<el-date-picker
|
||||
:disabled="isTopDept"
|
||||
v-model="timeFrame"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="价格">
|
||||
<el-input v-model="ruleForm.prepaidAmount"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '3'">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="预付金额">
|
||||
<el-input-number :disabled="isTopDept" v-model="ruleForm.prepaidAmount" @input="rateCalculation()">
|
||||
<template slot="append">元</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="费率">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.rates" @input="rateCalculation()">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="可跑流量">
|
||||
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '6'">
|
||||
<el-col :span="10">
|
||||
<template v-if="ruleForm.turnoverType === '4'">
|
||||
<el-col :span="6">
|
||||
<el-form-item :disabled="isTopDept" label="费率">
|
||||
<el-input v-model="ruleForm.rates" @input="rateCalculation()">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-form-item label="可创建油站数量" label-width="110px">
|
||||
<el-input-number v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
||||
:max="1000" label="可创建油站数量"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</template>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="实际交易量">
|
||||
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="系统服务费">
|
||||
<el-input v-model="ruleForm.prepaidAmount" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<el-row v-if="ruleForm.deptType === '3'">
|
||||
<el-form-item label="时间范围">
|
||||
<el-date-picker
|
||||
v-model="timeFrame"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
<template v-if="ruleForm.turnoverType === '5'">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="时间范围">
|
||||
<el-date-picker
|
||||
:disabled="isTopDept"
|
||||
v-model="timeFrame"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="价格">
|
||||
<el-input :disabled="isTopDept" v-model="ruleForm.prepaidAmount"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template v-if="ruleForm.turnoverType === '6'">
|
||||
<el-col :span="10">
|
||||
|
||||
<el-form-item label="可创建油站数量" label-width="110px">
|
||||
<el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
||||
:max="1000" label="可创建油站数量"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- <el-row v-if="ruleForm.deptType === '3'">-->
|
||||
<!-- <el-form-item label="时间范围">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="timeFrame"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- range-separator="至"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<el-form-item label="状态" prop="name">
|
||||
<el-switch :disabled="isTopDept" v-model="value10" @change="getswitch" ></el-switch>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="状态" prop="name">
|
||||
<el-switch v-model="value10" @change="getswitch" ></el-switch>
|
||||
</el-form-item>
|
||||
<template v-if="!isTopDept">
|
||||
<el-form-item v-if="pdinfo == 1">
|
||||
<el-button type="primary" @click="submitForms('ruleForm')">新增</el-button>
|
||||
<!--<el-button @click="resetForm('ruleForm')">重置</el-button> -->
|
||||
</el-form-item>
|
||||
<el-form-item v-if="pdinfo == 2">
|
||||
<el-button type="primary" @click="submitFormseide('ruleForm')">保存</el-button>
|
||||
<!--<el-button @click="resetForm('ruleForm')">重置</el-button> -->
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<el-form-item v-if="pdinfo == 1">
|
||||
<el-button type="primary" @click="submitForms('ruleForm')">新增</el-button>
|
||||
<!--<el-button @click="resetForm('ruleForm')">重置</el-button> -->
|
||||
</el-form-item>
|
||||
<el-form-item v-if="pdinfo == 2">
|
||||
<el-button type="primary" @click="submitFormseide('ruleForm')">保存</el-button>
|
||||
<!--<el-button @click="resetForm('ruleForm')">重置</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
@ -475,7 +478,7 @@ import {
|
||||
deptedit,
|
||||
deptDelete,
|
||||
Userlist,
|
||||
jklist, getDutyList
|
||||
jklist, getDutyList, isTopLevelNodesApi
|
||||
} from "@/api/system/Site/site";
|
||||
// import { getStoreStaffList } from "@/api/staff";
|
||||
import { getAccountList, getAccount, delAccount, addAccount, updateAccount, resetAccountPwd, changeAccountStatus } from "@/api/system/account";
|
||||
@ -483,15 +486,24 @@ import {
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import BigNumber from 'bignumber.js';
|
||||
import node from "../../../../gasStation-uni/uni_modules/uview-ui/components/u-parse/node/node.vue";
|
||||
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: "User",
|
||||
computed: {
|
||||
node() {
|
||||
return node
|
||||
}
|
||||
},
|
||||
dicts: ['node_type'],
|
||||
data() {
|
||||
return {
|
||||
isEditDept:true,
|
||||
isTopDept:true,
|
||||
|
||||
|
||||
timeFrame:[],
|
||||
value10:true,
|
||||
@ -504,7 +516,7 @@ export default {
|
||||
activeName: 'list',
|
||||
ruleForm: {
|
||||
parentId:'',
|
||||
deptType:'1',
|
||||
deptType:'3',
|
||||
status:'qy',
|
||||
leaderName:'',
|
||||
leaderPhone:'',
|
||||
@ -600,6 +612,7 @@ export default {
|
||||
status: '',
|
||||
deptId: ''
|
||||
},
|
||||
isClick: false,
|
||||
// 列信息
|
||||
columns: [
|
||||
{key: 0, label: `用户编号`, visible: true},
|
||||
@ -762,6 +775,17 @@ export default {
|
||||
this.cleanUp()
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 创建节点类型判断
|
||||
judgementNodeType(typeList) {
|
||||
let evenNumbers = typeList
|
||||
// isClick
|
||||
if (this.deptType == 3 || (this.deptType == 2 && !this.isClick)) {
|
||||
evenNumbers = typeList.filter(number => number.label === "基本门店");
|
||||
this.ruleForm.deptType = "3"
|
||||
}
|
||||
return evenNumbers
|
||||
},
|
||||
// 状态修改
|
||||
getswitch(e){
|
||||
console.log(e)
|
||||
@ -772,10 +796,26 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
activecilck(data){
|
||||
async activecilck(data){
|
||||
|
||||
// 判断是点击还是修改该
|
||||
this.isClick = true
|
||||
|
||||
console.log('点树',data)
|
||||
|
||||
this.cleanUp()
|
||||
|
||||
let flag = true
|
||||
await this.getIsTopLevelNodesApi(data.id).then(res=>{
|
||||
flag = res
|
||||
console.log('点树2222',res)
|
||||
|
||||
})
|
||||
this.$forceUpdate();
|
||||
this.isTopDept = flag
|
||||
|
||||
|
||||
|
||||
// 点击树之后
|
||||
this.queryParams.deptId = data.id
|
||||
this.deptType = data.deptType
|
||||
@ -819,7 +859,7 @@ export default {
|
||||
submitForms(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
console.log("timeFrame",this.timeFrame)
|
||||
if (this.timeFrame){
|
||||
this.ruleForm.turnoverStartTime = this.timeFrame[0]
|
||||
this.ruleForm.turnoverEndTime = this.timeFrame[1]
|
||||
@ -905,13 +945,21 @@ export default {
|
||||
}
|
||||
},
|
||||
// 新增数据
|
||||
addNode(id,label) {
|
||||
// 默认类型
|
||||
async addNode(id,label) {
|
||||
let _this = this
|
||||
// 默认类型
|
||||
this.isClick = false
|
||||
this.ruleForm.deptType = "3"
|
||||
this.$nextTick(() => {
|
||||
console.log("新增树的返回222", this.ruleForm);
|
||||
});
|
||||
|
||||
// _this.ruleForm.deptType = '1'
|
||||
// 点击树获取部门信息
|
||||
Userlist(id).then(res=>{
|
||||
await Userlist(id).then(res=>{
|
||||
console.log("新增树的返回",res)
|
||||
|
||||
this.deptType = res.data.deptType
|
||||
if (res.data.deptType === "3") {
|
||||
this.parentName = res.data.parentName
|
||||
this.ruleForm.parentId = res.data.parentId
|
||||
@ -921,6 +969,7 @@ export default {
|
||||
}
|
||||
|
||||
})
|
||||
this.isTopDept = false
|
||||
|
||||
},
|
||||
//修改树
|
||||
@ -999,16 +1048,37 @@ export default {
|
||||
},
|
||||
// <el-button size="mini" type="text" on-click={ () => this.appedit(data) }>修改</el-button>
|
||||
renderContent(h, { node, data, store }) {
|
||||
console.log("node",node)
|
||||
console.log("data",data)
|
||||
console.log("store",store)
|
||||
let isAdd = data.deptType == '3'
|
||||
return (
|
||||
<span class="custom-tree-node">
|
||||
<span class="custom-tree-box">{node.label}</span>
|
||||
<span>
|
||||
<el-button size="mini" type="text" on-click={ () => this.append(data) }>新增</el-button>
|
||||
|
||||
<el-button size="mini" type="text" on-click={ () => this.remove(node, data) }>删除</el-button>
|
||||
</span>
|
||||
{!isAdd ?
|
||||
<el-button size="mini" type="text" on-click={() => this.append(data)}>新增</el-button>
|
||||
: null
|
||||
}
|
||||
{node.level !== 1 ?
|
||||
<el-button size="mini" type="text" on-click={() => this.remove(node, data)}>删除</el-button>
|
||||
: null
|
||||
}
|
||||
</span>
|
||||
</span>);
|
||||
},
|
||||
|
||||
|
||||
async getIsTopLevelNodesApi(deptId) {
|
||||
let flag = false
|
||||
await isTopLevelNodesApi({deptId:deptId}).then(res =>{
|
||||
if (res.code === 200) {
|
||||
flag = res.data
|
||||
}
|
||||
})
|
||||
return flag
|
||||
},
|
||||
|
||||
/** 查询用户列表 */
|
||||
async getList() {
|
||||
console.log("123123123",this.form)
|
||||
@ -1225,7 +1295,14 @@ export default {
|
||||
|
||||
app.form.password1 = row.password
|
||||
//获取角色
|
||||
this.getRoleList();
|
||||
let permissionType
|
||||
|
||||
if (row.deptType === "3") {
|
||||
permissionType = 'staff'
|
||||
}else {
|
||||
permissionType = 'system'
|
||||
}
|
||||
this.getRoleList(permissionType);
|
||||
|
||||
},
|
||||
|
||||
@ -1354,8 +1431,9 @@ export default {
|
||||
}
|
||||
.left-box{
|
||||
box-sizing: border-box;
|
||||
height: 90vh;
|
||||
height: 75vh;
|
||||
padding: 15px;
|
||||
overflow-y: auto; /* 只显示垂直滚动条 */
|
||||
}
|
||||
.title-h{
|
||||
font-size: 18px;
|
||||
|
@ -182,7 +182,7 @@ public class CommissionRecordServiceImpl implements CommissionRecordService {
|
||||
queryWrapper.eq("type",type);
|
||||
queryWrapper.eq("order_no",orderNo);
|
||||
CommissionRecord commissionRecord = commissionRecordMapper.selectOne(queryWrapper);
|
||||
if (ObjectUtil.isNotEmpty(commissionRecord)){
|
||||
if (ObjectUtil.isNotEmpty(commissionRecord) && ObjectUtil.isNotEmpty(commissionRecord.getAmount())){
|
||||
CommissionRecord record = new CommissionRecord();
|
||||
if (type.equals("1")){
|
||||
record.setType("4");
|
||||
|
@ -42,7 +42,7 @@ public class MtInventoryDetails extends BaseEntity {
|
||||
/**
|
||||
* 库存差异
|
||||
*/
|
||||
private Double inventoryDiscrepancy;
|
||||
private Integer inventoryDiscrepancy;
|
||||
/**
|
||||
* 盘点数量
|
||||
*/
|
||||
|
@ -342,10 +342,16 @@
|
||||
|
||||
|
||||
|
||||
<!-- <update id="editGoods">-->
|
||||
<!-- update mt_goods set-->
|
||||
<!-- stock = stock + #{inventoryDiscrepancy} ,-->
|
||||
<!-- update_time = NOW()-->
|
||||
<!-- where id = #{goodsId}-->
|
||||
<!-- </update>-->
|
||||
<update id="editGoods">
|
||||
update mt_goods set
|
||||
stock = stock + #{inventoryDiscrepancy} ,
|
||||
update_time = NOW()
|
||||
stock = #{inventoryQuantity} ,
|
||||
update_time = NOW()
|
||||
where id = #{goodsId}
|
||||
</update>
|
||||
|
||||
|
@ -198,6 +198,7 @@
|
||||
|
||||
</where>
|
||||
group by mp.id
|
||||
order by mp.create_time DESC
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
|
@ -161,9 +161,11 @@
|
||||
mpd.id detailsId,
|
||||
s.id supplierId,
|
||||
s.name supplierName
|
||||
from mt_purchase_details mpd
|
||||
from mt_purchase mp
|
||||
left join mt_purchase_details mpd ON mp.id = mpd.purchase_id
|
||||
left join mt_goods mg ON mg.id = mpd.goods_id
|
||||
left join supplier s ON mg.supplier_id = s.id
|
||||
where mp.id = #{pId}
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.convenienceSore.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.fuint.business.convenienceSore.dto.MtInventoryDto;
|
||||
import com.fuint.business.convenienceSore.entity.*;
|
||||
@ -177,7 +178,7 @@ public class MtInventoryServiceImpl implements MtInventoryService {
|
||||
|
||||
//添加货损出库的数据
|
||||
|
||||
if (mtReturnsDetailsVO.getDamageQuantity()>0) {
|
||||
if (ObjectUtil.isNotEmpty(mtReturnsDetailsVO.getDamageQuantity()) && mtReturnsDetailsVO.getDamageQuantity()>0) {
|
||||
stockTrack = new StockTrack();
|
||||
stockTrack.setStockId(stockStatistic.getId());
|
||||
stockTrack.setStoreId(nowAccountInfo.getStoreId());
|
||||
|
@ -412,7 +412,8 @@
|
||||
<update id="updateInventory">
|
||||
update integral_gift
|
||||
set
|
||||
total_inventory = total_inventory + #{editInventory},
|
||||
total_inventory = total_inventory +0+ #{editInventory},
|
||||
remaining_inventory = remaining_inventory +0+ #{editInventory},
|
||||
update_by = #{updateBy},
|
||||
update_time = NOW()
|
||||
where id =#{id}
|
||||
|
@ -190,8 +190,31 @@ public class IntegralGiftServiceImpl implements IntegralGiftService {
|
||||
*/
|
||||
@Override
|
||||
public boolean updateInventory(@Param("id") Integer id,@Param("editInventory") Integer editInventory) {
|
||||
if (ObjectUtil.isEmpty(editInventory)) throw new RuntimeException("输入需要修改的数值");
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return this.integralGiftDao.updateInventory(id,editInventory,nowAccountInfo.getStaffId()) > 0;
|
||||
IntegralGift integralGift1 = this.integralGiftDao.queryById(id);
|
||||
if (editInventory<0 && integralGift1.getRemainingInventory() < -editInventory) {
|
||||
throw new RuntimeException("库存不得少于0");
|
||||
}
|
||||
int i = this.integralGiftDao.updateInventory(id,editInventory,nowAccountInfo.getStaffId());
|
||||
// 根据id查询积分商品
|
||||
IntegralGift integralGift = integralGiftDao.queryById(id);
|
||||
if ("实物商品".equals(integralGift.getGiftType()) && ObjectUtil.isNotEmpty(integralGift.getGoodsId())) {
|
||||
LJGoods byId = ljGoodsService.getById(integralGift.getGoodsId());
|
||||
if (editInventory>byId.getStock()) {
|
||||
// 当增加库存是需要判断商品库存是否足够
|
||||
throw new RuntimeException("该商品库存不足");
|
||||
}
|
||||
LJGoodsDto goods = new LJGoodsDto();
|
||||
goods.setId(byId.getId());
|
||||
goods.setStoreId(byId.getStoreId());
|
||||
goods.setNumberOfChanges(-editInventory);
|
||||
goods.setDocument("积分商品更改库存");
|
||||
ljGoodsService.editGoodsInventory(goods);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
@Resource
|
||||
RedisLock redisLock;
|
||||
|
@ -84,6 +84,7 @@ public class AllOrderInfo extends BaseEntity implements Serializable {
|
||||
* 退款订单
|
||||
*/
|
||||
private String refOrderNo;
|
||||
private String refBy;
|
||||
|
||||
}
|
||||
|
||||
|
@ -329,7 +329,8 @@ limit 1
|
||||
|
||||
<select id="greaseGunStatistics" resultType="java.util.Map">
|
||||
SELECT
|
||||
oo.oil_gun_num gunName,
|
||||
-- oo.oil_gun_num gunName,
|
||||
og.gun_name gunName,
|
||||
SUM(IF(order_status='paid', pay_amount, 0)) AS paidAmount,
|
||||
SUM(IF(order_status='paid', oil_num, 0)) AS oilNum,
|
||||
count(order_status='paid') numberOfDeals
|
||||
@ -415,12 +416,12 @@ limit 1
|
||||
select
|
||||
cu.unit_name name,
|
||||
hb.credit_unit_id ,
|
||||
sum(amount) amount,
|
||||
sum(outstand_amount) amount,
|
||||
count(*) numberOfDeals
|
||||
from
|
||||
hang_bill hb
|
||||
left join credit_unit cu ON hb.credit_unit_id = cu.id
|
||||
where hb.status = 0
|
||||
where hb.status IN (0,2)
|
||||
and hb.store_id = #{storeId}
|
||||
and hb.create_time BETWEEN #{startTime} AND #{endTime}
|
||||
group by hb.credit_unit_id
|
||||
|
@ -61,4 +61,11 @@ public interface LJOrderService extends IService<LJOrder> {
|
||||
Map<String, String> orderStatistics(LJOrder order);
|
||||
|
||||
LJOrder getStatisticsByTime(Date time ,Integer goodsId);
|
||||
|
||||
/**
|
||||
* 添加商品订单信息
|
||||
* @param order
|
||||
* @param goodsId 商品id
|
||||
*/
|
||||
void addGoodOrder(LJOrder order,Integer goodsId);
|
||||
}
|
||||
|
@ -155,6 +155,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
@Override
|
||||
@Transactional
|
||||
public int refund(Map<String, String> map) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Map<String, String> refund = new HashMap<>();
|
||||
// try {
|
||||
AllOrderInfo allOrderInfo = selectAllOrderInfoByOrderNo(map.get("orderNo"));
|
||||
@ -192,7 +193,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
throw new RuntimeException("该订单类型不支持退款!");
|
||||
}
|
||||
boolean flag = false;
|
||||
if (!"CASH".equals(allOrderInfo.getPayType()) && Double.valueOf(map.get("refundAmt")) > 0) {
|
||||
if (!"CASH".equals(allOrderInfo.getPayType()) && Integer.valueOf(map.get("refundAmt")) > 0) {
|
||||
try {
|
||||
refund = fyPayService.refund(map);
|
||||
} catch (Exception e) {
|
||||
@ -210,6 +211,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
allOrderInfo.setStatus("refund");
|
||||
allOrderInfo.setReasonRefund(map.get("refundRemark"));
|
||||
allOrderInfo.setRefOrderNo(map.get("refundOrderNo"));
|
||||
allOrderInfo.setRefBy(nowAccountInfo.getStaffId().toString());
|
||||
baseMapper.updateById(allOrderInfo);
|
||||
// 处理油品订单
|
||||
OilOrder oilOrder = new OilOrder();
|
||||
@ -218,7 +220,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
}
|
||||
|
||||
// 处理商品订单
|
||||
LJOrder ljOrder = new LJOrder();
|
||||
LJOrder ljOrder = null;
|
||||
|
||||
if (ObjectUtil.isNotEmpty(map.get("isGoods")) && "true".equals(map.get("isGoods"))) {
|
||||
ljOrder = ljOrderService.selectGoodsOrder(map.get("orderNo"));
|
||||
@ -237,13 +239,14 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
// 判断是否推掉优惠卷
|
||||
disposeOil(oilOrder,map);
|
||||
commissionRecordService.addRefundRecord(oilOrder.getOrderNo(),"1",oilOrder.getStaffId(),oilOrder.getStoreId());
|
||||
growthValueChangeService.refundGrowthValueChange(oilOrder.getOrderNo(),oilOrder.getUserId(),oilOrder.getStoreId());
|
||||
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(ljOrder)) {
|
||||
if (ObjectUtil.isNotEmpty(ljOrder) ) {
|
||||
disposeGoods(ljOrder,map.get("refundOrderNo"));
|
||||
commissionRecordService.addRefundRecord(ljOrder.getOrderNo(),"2",ljOrder.getStaffId(),ljOrder.getStoreId());
|
||||
}
|
||||
|
||||
growthValueChangeService.refundGrowthValueChange(oilOrder.getOrderNo(),oilOrder.getUserId(),oilOrder.getStoreId());
|
||||
if (flag) {
|
||||
return 1;// 当前为现金支付
|
||||
}
|
||||
@ -323,20 +326,22 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
oilTracking.setTankId(oilGun.getTankId());
|
||||
oilTracking.setOrderNumber(map.get("refundOrderNo"));
|
||||
OilTracking insert = oilTrackingService.insert(oilTracking);
|
||||
|
||||
// 处理储值卡
|
||||
if (ObjectUtil.isNotEmpty(order.getBalanceAmount())) {
|
||||
userBalanceService.addUserBalance(order.getUserId(),nowAccountInfo.getChainStoreId(),order.getBalanceAmount());
|
||||
}
|
||||
// 处理屯油卡
|
||||
if (ObjectUtil.isNotEmpty(order.getOilCardAmount())) {
|
||||
userBalanceService.addUserOil(order.getOils(),order.getUserId(),nowAccountInfo.getChainStoreId(),order.getOilCardAmount());
|
||||
}
|
||||
// 处理优惠券
|
||||
if (ObjectUtil.isNotEmpty(map.get("isOilVouchers")) && "true".equals(map.get("isOilVouchers"))) {
|
||||
if (ObjectUtil.isNotEmpty(order.getCouponId())) {
|
||||
cardFavorableRecordService.updateStatus(order.getCouponId());
|
||||
if (ObjectUtil.isNotEmpty(order.getUserId())) {
|
||||
// 处理储值卡
|
||||
if (ObjectUtil.isNotEmpty(order.getBalanceAmount())) {
|
||||
userBalanceService.addUserBalance(order.getUserId(),nowAccountInfo.getChainStoreId(),order.getBalanceAmount());
|
||||
}
|
||||
// 处理屯油卡
|
||||
if (ObjectUtil.isNotEmpty(order.getOilCardAmount())) {
|
||||
userBalanceService.addUserOil(order.getOils(),order.getUserId(),nowAccountInfo.getChainStoreId(),order.getOilCardAmount());
|
||||
}
|
||||
// 处理优惠券
|
||||
if (ObjectUtil.isNotEmpty(map.get("isOilVouchers")) && "true".equals(map.get("isOilVouchers"))) {
|
||||
if (ObjectUtil.isNotEmpty(order.getCouponId())) {
|
||||
cardFavorableRecordService.updateStatus(order.getCouponId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,26 +1,37 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import com.fuint.business.order.entity.OrderGoods;
|
||||
import com.fuint.business.order.mapper.LJOrderMapper;
|
||||
import com.fuint.business.order.service.LJOrderService;
|
||||
import com.fuint.business.order.service.OrderGoodsService;
|
||||
import com.fuint.business.order.vo.Excel.LJOrderExcel;
|
||||
import com.fuint.business.order.vo.LJOrderVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> implements LJOrderService {
|
||||
@Autowired
|
||||
@Lazy
|
||||
private OrderGoodsService orderGoodsService;
|
||||
|
||||
@Override
|
||||
public IPage<LJOrder> selectOrderList(Page page, LJOrder order) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
@ -110,4 +121,23 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
|
||||
public LJOrder getStatisticsByTime(Date time, Integer goodsId) {
|
||||
return baseMapper.getStatisticsByTime(time, goodsId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addGoodOrder(LJOrder order,Integer goodsId) {
|
||||
if (ObjectUtil.isEmpty(order.getOrderNo())){
|
||||
// 根据日期生成订单信息
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = "2345"+timestamp+randomString;
|
||||
order.setOrderNo(orderNo);
|
||||
}
|
||||
baseMapper.insert(order);
|
||||
LJOrder ljOrder = this.selectGoodsOrder(order.getOrderNo());
|
||||
OrderGoods orderGoods = new OrderGoods();
|
||||
orderGoods.setGoodsId(goodsId);
|
||||
orderGoods.setOrderId(ljOrder.getId());
|
||||
orderGoods.setNum(ljOrder.getGoodsNum());
|
||||
orderGoodsService.save(orderGoods);
|
||||
}
|
||||
}
|
||||
|
@ -62,10 +62,11 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
||||
trackService.insertStockTrack(stockTrack);
|
||||
|
||||
// 修改库存数量
|
||||
LJGoods ljGoods = goodsService.selectLJGoodsById(goods.getGoodsId());
|
||||
Integer stock = ljGoods.getStock();
|
||||
ljGoods.setStock(stock-goods.getNum());
|
||||
goodsService.updateLJGoods(ljGoods);
|
||||
// LJGoods ljGoods = goodsService.selectLJGoodsById(goods.getGoodsId());
|
||||
// Integer stock = ljGoods.getStock();
|
||||
// ljGoods.setStock(stock-goods.getNum());
|
||||
// goodsService.updateLJGoods(ljGoods);
|
||||
goodsService.subtractGoodesStockByLock(goods.getGoodsId(),goods.getNum());
|
||||
|
||||
// 添加销售统计信息
|
||||
SaleDetail saleDetail = new SaleDetail();
|
||||
|
@ -300,7 +300,7 @@
|
||||
LEFT JOIN oil_purchase p ON po.purchase_id = p.id
|
||||
WHERE
|
||||
p.STATUS = 'qrts'
|
||||
AND po.tank_id = 1
|
||||
AND po.tank_id = #{tankId}
|
||||
</select>
|
||||
|
||||
|
||||
|
@ -180,8 +180,8 @@ public class OilInventoryOrderServiceImpl implements OilInventoryOrderService {
|
||||
List<OilPurchaseOrder> oilPurchaseOrders = oilPurchaseOrderMapper.getlistByTankId(tankId);
|
||||
// 计算每个订单的平均进价并进行相加
|
||||
for (OilPurchaseOrder oilPurchaseOrder : oilPurchaseOrders) {
|
||||
bigSunPrice.add( new BigDecimal(oilPurchaseOrder.getTotalAmount().toString()));
|
||||
bigSumL.add( new BigDecimal(oilPurchaseOrder.getPurchaseVolume().toString()));
|
||||
bigSunPrice = bigSunPrice.add( new BigDecimal(oilPurchaseOrder.getTotalAmount().toString()));
|
||||
bigSumL = bigSumL.add( new BigDecimal(oilPurchaseOrder.getPurchaseVolume().toString()));
|
||||
}
|
||||
// 用总的钱数/总的量
|
||||
BigDecimal result = new BigDecimal(0);
|
||||
|
@ -159,7 +159,7 @@ public class OilTankServiceImpl implements OilTankService {
|
||||
BigDecimal totalAmountBigDecimal = new BigDecimal(totalAmount.toString());
|
||||
BigDecimal totalPriceBigDecimal = totalAmountBigDecimal.add(new BigDecimal(oilTank.getTotalPrice().toString()));
|
||||
// 计算单价
|
||||
BigDecimal discountedPriceBigDecimal = totalPriceBigDecimal.divide(storedQuantityBigDecimal,2);
|
||||
BigDecimal discountedPriceBigDecimal = totalPriceBigDecimal.divide(storedQuantityBigDecimal,2, BigDecimal.ROUND_HALF_UP);
|
||||
discountedPrice = Double.valueOf(discountedPriceBigDecimal.toString());
|
||||
} else {
|
||||
// 根据单价处理总价
|
||||
|
@ -33,5 +33,7 @@ public class ChainStoreInfo extends BaseEntity {
|
||||
private String leaderPhone;
|
||||
@TableField(exist = false)
|
||||
private List<MtStore> storeList;
|
||||
@TableField(exist = false)
|
||||
private Integer deptId;
|
||||
}
|
||||
|
||||
|
@ -10,13 +10,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
chain_store_info csi
|
||||
inner join sys_dept sd on sd.dept_id = csi.contract_dept_id
|
||||
inner join mt_store ms on ms.chain_store_id = csi.id
|
||||
where sd.ancestors like concat(#{ownDeptStr},'%')
|
||||
where (sd.ancestors like concat(#{ownDeptStr},'%') or csi.contract_dept_id = #{chainStoreInfo.contractDeptId})
|
||||
and csi.status = 'qy'
|
||||
and sd.if_delete = 0
|
||||
<if test="chainStoreInfo.storeName !=null and chainStoreInfo.storeName !=''">
|
||||
and (csi.store_name like concat('%',#{chainStoreInfo.storeName},'%') or ms.name like concat('%',#{chainStoreInfo.storeName},'%'))
|
||||
</if>
|
||||
|
||||
group by csi.id
|
||||
order by csi.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
<!--<if test="chainStoreInfo.contractDeptId !=null and chainStoreInfo.contractDeptId !=''">-->
|
||||
<!--and FIND_IN_SET(#{chainStoreInfo.contractDeptId}, sd.ancestors) > 0-->
|
||||
<!--</if>-->
|
||||
<!-- # and sd.dept_id = #{chainStoreInfo.contractDeptId}-->
|
@ -50,7 +50,15 @@ public class ChainStoreInfoServiceImpl extends ServiceImpl<ChainStoreInfoMapper,
|
||||
public IPage<ChainStoreInfo> listVo(Page page, ChainStoreInfo chainStoreInfo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
SysDept sysDept = deptService.getById(nowAccountInfo.getDeptId());
|
||||
IPage<ChainStoreInfo> res = baseMapper.listVo(page,chainStoreInfo,sysDept.getAncestors());
|
||||
if (ObjectUtil.isEmpty(chainStoreInfo.getContractDeptId())) {
|
||||
chainStoreInfo.setContractDeptId(nowAccountInfo.getDeptId());
|
||||
}
|
||||
String ancestors = sysDept.getAncestors();
|
||||
if (!"0".equals(sysDept.getAncestors())) {
|
||||
ancestors = sysDept.getAncestors()+sysDept.getDeptId();
|
||||
}
|
||||
|
||||
IPage<ChainStoreInfo> res = baseMapper.listVo(page,chainStoreInfo,ancestors);
|
||||
res.getRecords().forEach(it->{
|
||||
LambdaQueryWrapper<MtStore> queryWrapper =new LambdaQueryWrapper<>();
|
||||
if (ObjectUtil.isNotEmpty(chainStoreInfo.getStatus())) {
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.userManager.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.userManager.entity.UserBalance;
|
||||
import com.fuint.business.userManager.vo.UserBalanceVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UserBalanceMapper extends BaseMapper<UserBalance> {
|
||||
|
||||
@ -10,5 +11,5 @@ public interface UserBalanceMapper extends BaseMapper<UserBalance> {
|
||||
|
||||
int updateRefuelMoney(UserBalance userBalance);
|
||||
|
||||
int addUserBalance(Integer id, Double changeCardBalance);
|
||||
int addUserBalance(@Param("id") Integer id, @Param("changeCardBalance") Double changeCardBalance);
|
||||
}
|
||||
|
@ -78,21 +78,28 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
|
||||
|
||||
List<Map<String, String>> resultMapList = JSON.parseObject(userBalance.getRefuelMoney(), new TypeReference<List<Map<String, Object>>>() {});
|
||||
|
||||
|
||||
|
||||
for (Map<String, String> stringStringMap : resultMapList) {
|
||||
if (oilId.equals(stringStringMap.get("oilType"))) {
|
||||
BigDecimal resRefuelMoney = new BigDecimal(stringStringMap.get("refuelMoney"));
|
||||
BigDecimal refuelMoney = resRefuelMoney.add(new BigDecimal(changeOil.toString()));
|
||||
stringStringMap.put("refuelMoney",resRefuelMoney.toString());
|
||||
break;
|
||||
if (ObjectUtil.isNotEmpty(resultMapList)) {
|
||||
for (Map<String, String> stringStringMap : resultMapList) {
|
||||
if (oilId.equals(stringStringMap.get("oilType"))) {
|
||||
BigDecimal resRefuelMoney = new BigDecimal(stringStringMap.get("refuelMoney"));
|
||||
BigDecimal refuelMoney = resRefuelMoney.add(new BigDecimal(changeOil.toString()));
|
||||
stringStringMap.put("refuelMoney",resRefuelMoney.toString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
String jsonString = JSON.toJSONString(resultMapList);
|
||||
userBalance.setRefuelMoney(jsonString);
|
||||
}
|
||||
|
||||
String jsonString = JSON.toJSONString(resultMapList);
|
||||
userBalance.setRefuelMoney(jsonString);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
int row = baseMapper.updateRefuelMoney(userBalance);
|
||||
|
||||
// 增加屯油卡记录
|
||||
return row;
|
||||
}
|
||||
|
||||
@ -100,6 +107,8 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
|
||||
@Override
|
||||
public int addUserBalance(Integer userId, Integer chainStoreId, Double changeBalance) {
|
||||
UserBalance userBalance = selectUserBalance(userId, chainStoreId);
|
||||
|
||||
// 增加余额记录
|
||||
return baseMapper.addUserBalance(userBalance.getId(), changeBalance);
|
||||
}
|
||||
|
||||
|
@ -155,4 +155,14 @@ public class SysDeptController extends BaseController
|
||||
public ResponseObject getCountdown() {
|
||||
return getSuccessResult(deptService.getCountdown());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前节点是否为当前登录账号的顶级节点
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/isTopLevelNodes")
|
||||
public ResponseObject isTopLevelNodes(Integer deptId) {
|
||||
return getSuccessResult(deptService.isTopLevelNodes(deptId));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -125,4 +125,6 @@ public interface ISysDeptService extends IService<SysDept>
|
||||
public int deleteDeptById(Long deptId);
|
||||
|
||||
long getCountdown();
|
||||
|
||||
boolean isTopLevelNodes(Integer deptId);
|
||||
}
|
||||
|
@ -465,4 +465,13 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper,SysDept> imple
|
||||
|
||||
return -999;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTopLevelNodes(Integer deptId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
if (deptId.toString().equals(nowAccountInfo.getDeptId().toString())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
server.port=8008
|
||||
env.profile=dev
|
||||
#env.properties.path=D:/workspaces/oilSystem/fuintBackend/configure/
|
||||
env.properties.path=D:/oil/oil/oilSystem/fuintBackend/configure/
|
||||
env.properties.path=D:/code/oilSystem/fuintBackend/configure/
|
||||
|
||||
|
||||
|
||||
|
@ -73,6 +73,8 @@ public class TAccount extends BaseEntity implements Serializable {
|
||||
private Long deptId;
|
||||
@TableField(exist = false)
|
||||
private String deptName;
|
||||
@TableField(exist = false)
|
||||
private String deptType;
|
||||
// @TableField(exist = false)
|
||||
private String mobile;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
<select id="listAccount" resultType="com.fuint.repository.model.TAccount">
|
||||
SELECT
|
||||
ta.*,sd.dept_name, ms.mobile
|
||||
ta.*,sd.dept_name, ms.mobile,sd.dept_type deptType
|
||||
FROM
|
||||
`t_account` ta
|
||||
left join sys_dept sd on sd.dept_id = ta.dept_id
|
||||
|
@ -7,7 +7,7 @@ var MainJS = "CLodopfuncs.js",
|
||||
URL_HTTP1 = "http://localhost:8000/" + MainJS, //http用8000/18000
|
||||
URL_HTTP2 = "http://localhost:18000/" + MainJS,
|
||||
URL_HTTP3 = "https://localhost.lodop.net:8443/" + MainJS; //https用8000/8443
|
||||
|
||||
var connectFlag = false;
|
||||
var CreatedOKLodopObject, CLodopIsLocal, LoadJsState;
|
||||
|
||||
//==判断是否需要CLodop(那些不支持插件的浏览器):==
|
||||
@ -68,6 +68,10 @@ function checkOrTryHttp() {
|
||||
}
|
||||
head.insertBefore(JS1, head.firstChild);
|
||||
}
|
||||
// 判断本地是否存在 CLodopfuncs.js 文件的函数
|
||||
function isLocalFileExist() {
|
||||
return typeof window['getLodop'] === 'undefined'; // getLodop为CLodopfuncs.js提供的全局变量名称
|
||||
}
|
||||
|
||||
//==加载Lodop对象的主过程:==
|
||||
(function loadCLodop() {
|
||||
@ -77,14 +81,27 @@ function checkOrTryHttp() {
|
||||
if (!window.WebSocket && window.MozWebSocket) window.WebSocket = window.MozWebSocket;
|
||||
//ws方式速度快(小于200ms)且可避免CORS错误,但要求Lodop版本足够新:
|
||||
try {
|
||||
var WSK1 = new WebSocket(URL_WS1);
|
||||
WSK1.onopen = function (e) { setTimeout("checkOrTryHttp();", 200); }
|
||||
WSK1.onmessage = function (e) { if (!window.getCLodop) eval(e.data); }
|
||||
WSK1.onerror = function (e) {
|
||||
var WSK2 = new WebSocket(URL_WS2);
|
||||
WSK2.onopen = function (e) { setTimeout("checkOrTryHttp();", 200); }
|
||||
WSK2.onmessage = function (e) { if (!window.getCLodop) eval(e.data); }
|
||||
WSK2.onerror = function (e) { checkOrTryHttp(); }
|
||||
if (isLocalFileExist()) {
|
||||
var WSK1 = new WebSocket(URL_WS1);
|
||||
WSK1.onopen = function (e) {
|
||||
connectFlag = true
|
||||
setTimeout("checkOrTryHttp();", 200);
|
||||
}
|
||||
WSK1.onmessage = function (e) {
|
||||
if (!window.getCLodop) eval(e.data);
|
||||
}
|
||||
WSK1.onerror = function (e) {
|
||||
var WSK2 = new WebSocket(URL_WS2);
|
||||
WSK2.onopen = function (e) {
|
||||
setTimeout("checkOrTryHttp();", 200);
|
||||
}
|
||||
WSK2.onmessage = function (e) {
|
||||
if (!window.getCLodop) eval(e.data);
|
||||
}
|
||||
WSK2.onerror = function (e) {
|
||||
checkOrTryHttp();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
checkOrTryHttp();
|
||||
@ -93,6 +110,7 @@ function checkOrTryHttp() {
|
||||
|
||||
//==获取LODOP对象主过程,判断是否安装、需否升级:==
|
||||
function getLodop(oOBJECT, oEMBED) {
|
||||
try {
|
||||
var strFontTag = "<br><font color='#FF00FF'>打印控件";
|
||||
var strLodopInstall = strFontTag + "未安装!点击这里<a href='install_lodop32.exe' target='_self'>执行安装</a>";
|
||||
var strLodopUpdate = strFontTag + "需要升级!点击这里<a href='install_lodop32.exe' target='_self'>执行升级</a>";
|
||||
@ -110,7 +128,7 @@ function getLodop(oOBJECT, oEMBED) {
|
||||
var strLodop7Update_ARM = strLodop7FontTag + "需升级," + strLodop7HrefARM;
|
||||
var strInstallOK = ",成功后请刷新本页面或重启浏览器。</font>";
|
||||
var LODOP;
|
||||
try {
|
||||
|
||||
var isWinIE = (/MSIE/i.test(navigator.userAgent)) || (/Trident/i.test(navigator.userAgent));
|
||||
var isWinIE64 = isWinIE && (/x64/i.test(navigator.userAgent));
|
||||
var isLinuxX86 = (/Linux/i.test(navigator.platform)) && (/x86/i.test(navigator.platform));
|
||||
@ -186,4 +204,4 @@ function getLodop(oOBJECT, oEMBED) {
|
||||
alert("getLodop出错:" + err);
|
||||
}
|
||||
}
|
||||
export { getLodop };
|
||||
export { getLodop,connectFlag };
|
||||
|
@ -108,6 +108,11 @@ export const constantRoutes = [
|
||||
name: 'Integral',
|
||||
component: () => import('@/views/cashier/NewComponents/Integral'),
|
||||
},
|
||||
{
|
||||
path: '/IntegralOrder',
|
||||
name: 'Integral',
|
||||
component: () => import('@/views/cashier/NewComponents/integralOrder/pointsCashier'),
|
||||
},
|
||||
{
|
||||
path: '/Handover',
|
||||
name: 'Handover',
|
||||
|
@ -49,7 +49,7 @@ service.interceptors.request.use(config => {
|
||||
const s_url = sessionObj.url; // 请求地址
|
||||
const s_data = sessionObj.data; // 请求数据
|
||||
const s_time = sessionObj.time; // 请求时间
|
||||
const interval = 2000; // 间隔时间(ms),小于此时间视为重复提交
|
||||
const interval = 999; // 间隔时间(ms),小于此时间视为重复提交
|
||||
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
||||
const message = '数据正在处理,请耐心等待';
|
||||
console.warn(`[${s_url}]: ` + message)
|
||||
|
@ -62,11 +62,11 @@
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilPaid : '0' }}</div>
|
||||
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>油品优惠(实收)</div>
|
||||
<div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilDiacount : '0' }}</div>
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>油品优惠(实收)</div>-->
|
||||
<!-- <div>¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilDiacount : '0' }}</div>-->
|
||||
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<!-- <div class="input-box">-->
|
||||
<!-- <div>抹零总额(实收)</div>-->
|
||||
<!-- <div>¥2164.55</div>-->
|
||||
|
@ -412,6 +412,42 @@
|
||||
<el-drawer title="订单记录" :visible.sync="openOrderHistory" direction="rtl" size="1300px">
|
||||
<PointsCashier></PointsCashier>
|
||||
</el-drawer>
|
||||
|
||||
|
||||
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
|
||||
<div class="box-title">积分商城订单</div>
|
||||
<div class="box-ge">
|
||||
<div v-for="item in shoppingCart" :key="item.id">
|
||||
<div class="input-box">
|
||||
<div>商品名称</div>
|
||||
<div>{{ item.giftName }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>商品数量</div>
|
||||
<div>{{ item.markPurchases }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>价格</div>
|
||||
<span v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}积分</span>
|
||||
<span v-if="item.exchangeMethod == '积分+金额'">+</span>
|
||||
<span v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">¥{{item.exchangeAmount}}</span>
|
||||
<span v-if="item.exchangeMethod == '积分+加钱购'">+{{item.moneyRatio}}加钱比例</span> </div>
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
<div class="input-box">
|
||||
<div>积分合计:</div>
|
||||
<div>{{allPoints}}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="allAmout">
|
||||
<div>总价合计:</div>
|
||||
<div>¥{{allAmout}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -428,6 +464,7 @@ import {
|
||||
import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/user";
|
||||
import {getUserGrade} from "@/api/cashier/usergrade";
|
||||
import {queryStaffs, staffInfo} from "@/api/cashier/staff";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "Integral",
|
||||
@ -558,6 +595,9 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
// })
|
||||
// }
|
||||
|
||||
console.log("111",data.markPurchases)
|
||||
console.log("222",data.remainingInventory)
|
||||
console.log("333",data)
|
||||
|
||||
|
||||
if (data.markPurchases) {
|
||||
@ -567,6 +607,10 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
}
|
||||
data.markPurchases = data.markPurchases+1
|
||||
}else {
|
||||
if (data.remainingInventory == 0) {
|
||||
this.$message.error('库存不足');
|
||||
return
|
||||
}
|
||||
this.$set(data, "markPurchases", 1);
|
||||
}
|
||||
this.markPurchasesAll++
|
||||
@ -968,6 +1012,8 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
},15000)
|
||||
|
||||
}
|
||||
this.printLocally()
|
||||
|
||||
// this.paymentType = ''
|
||||
},
|
||||
// 清楚数据
|
||||
@ -993,6 +1039,90 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
this.dialogVisiblej = false
|
||||
this.authCode = '';
|
||||
},
|
||||
async printLocally(data) {
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
// var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
var fromHtml = ''
|
||||
|
||||
fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
dialogVisiblej(newValue) {
|
||||
|
@ -1248,7 +1248,7 @@
|
||||
import {addHangBill} from "@/api/cashier/hangbill";
|
||||
import {addCreditUnit, listCreditUnit} from "@/api/cashier/creditunit";
|
||||
import {cashierOrderByOrderNo} from "@/api/cashier/cashierorder";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {getLodop,connectFlag} from "@/api/LodopFuncs";
|
||||
import {giftCardExchange} from "@/api/cashier/giftCard/giftcard";
|
||||
import BigNumber from "bignumber.js";
|
||||
import {
|
||||
@ -2183,11 +2183,16 @@
|
||||
this.isPay = true
|
||||
|
||||
},
|
||||
async printLocally() {
|
||||
printLocally() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
try {
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -2255,24 +2260,33 @@
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
var fromHtml = bodyStyle + this.$refs.report.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
}catch (e){
|
||||
console.log(e,'打印机报错')
|
||||
}
|
||||
|
||||
},
|
||||
async printLocally1() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
console.log(LODOP)
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -2340,103 +2354,108 @@
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report1.innerHTML
|
||||
var fromHtml = bodyStyle + this.$refs.report1.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
|
||||
},
|
||||
async printLocally2() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.input-box1{
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
.input-box1{
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report2.innerHTML
|
||||
.box-ge{
|
||||
border-bottom: 1px solid #000000 ;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.box-title{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.input-hui{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.input-hui-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 15px 0px;
|
||||
background: #b2b2b2;
|
||||
box-sizing: border-box;
|
||||
padding: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.input-box-frou{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin: 5px 0px;
|
||||
div{
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report2.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
},
|
||||
clear(){
|
||||
// this.autofocus = false
|
||||
@ -3854,24 +3873,15 @@
|
||||
let isPaySuccess = false;
|
||||
|
||||
await addLJGoods(_this.map).then( response => {
|
||||
console.log('3867386738673867')
|
||||
_this.orderNo = response.data.orderNo;
|
||||
if (response.data.oilOrder!=null){
|
||||
if (response.data.oilOrder.orderStatus == "paid"){
|
||||
|
||||
_this.isPaySuccess = true;
|
||||
isPaySuccess = true
|
||||
_this.isPay = true;
|
||||
_this.seekZero = 0
|
||||
_this.loading = false;
|
||||
_this.amount = 0
|
||||
// for (let i =0;i<_this.oilPreferentialData.length;i++){
|
||||
// _this.oilPreferentialData[i].oilPreferential.storeId = response.data.oilOrder.storeId
|
||||
// _this.oilPreferentialData[i].oilPreferential.orderAmount = response.data.oilOrder.orderAmount
|
||||
// _this.oilPreferentialData[i].oilPreferential.userId = response.data.oilOrder.userId
|
||||
// _this.oilPreferentialData[i].oilPreferential.oilId = response.data.oilOrder.oils
|
||||
// _this.oilPreferentialData[i].oilPreferential.mtUserLevel = _this.member.gradeId
|
||||
// _this.oilPreferentialData[i].oilPreferential.cardFavorableId = _this.cardFavorableId
|
||||
// usePaymentActive(_this.oilPreferentialData[i].oilPreferential).then(res => {})
|
||||
// }
|
||||
_this.printLocally()
|
||||
_this.resetting1()
|
||||
return;
|
||||
@ -3882,8 +3892,6 @@
|
||||
_this.isPaySuccess = true;
|
||||
isPaySuccess = true
|
||||
_this.isPay = true;
|
||||
_this.seekZero = 0
|
||||
_this.amount = 0
|
||||
_this.loading = false;
|
||||
_this.printLocally()
|
||||
_this.resetting1()
|
||||
|
@ -236,8 +236,8 @@ export default {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f6f8f9;
|
||||
padding-top: 0px;
|
||||
padding: 0px
|
||||
padding-top: 10px;
|
||||
padding: 10px
|
||||
}
|
||||
.box {
|
||||
padding: 10px;
|
||||
|
@ -185,9 +185,57 @@
|
||||
</div>
|
||||
<div class="app-left-title">蓝鲸油站收银 </div>
|
||||
</div>
|
||||
<div class="app-left-box" v-for="(item,index) in tabarr" :class="{'bule': leftindex == index }" :key="index" @click="gocomponents(index,item.path)">
|
||||
<i :class="item.icon" style="font-size: 18px" ></i> <div style="cursor: pointer;margin-left: 10px">{{item.name}}</div>
|
||||
<div class="app-left-box" v-for="(item,index) in tabarr" v-if="item.name !== '积分'" :class="{'bule': leftindex == item.index1}" :key="index" @click="gocomponents(index,item.path)">
|
||||
|
||||
<!-- <template v-if="item.name === '积分'">-->
|
||||
<!-- <i :class="item.icon" style="font-size: 18px" ></i> <div style="cursor: pointer;margin-left: 10px">{{item.name}}</div>-->
|
||||
<!-- <template v-if="isClick">-->
|
||||
<!-- <br/>-->
|
||||
<!-- <div style="cursor: pointer;margin-left: 10px">积分商城</div>-->
|
||||
<!-- <br/>-->
|
||||
<!-- <div style="cursor: pointer;margin-left: 10px">积分订单</div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </template>-->
|
||||
<i :class="item.icon" style="font-size: 18px" ></i> <div style="cursor: pointer;margin-left: 10px">{{item.name}}</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="app-left-box2" v-for="(item,index) in tabarr" v-if="item.name === '积分'" :key="index">
|
||||
<div class="app-left-box" @click="isClickMethod()" :class="{'bule': leftindex == item.index1 }">
|
||||
<i :class="item.icon" style="font-size: 18px" ></i> <div style="cursor: pointer;margin-left: 10px">{{item.name}}</div>
|
||||
|
||||
</div>
|
||||
<!-- <transition name="el-zoom-in-top">-->
|
||||
<el-collapse-transition>
|
||||
|
||||
<div v-if="isClick">
|
||||
<div class="app-left-box" @click="gocomponents(5,'/Integral')">
|
||||
<div style="cursor: pointer;margin-left: 10px">积分商城</div>
|
||||
</div>
|
||||
<div class="app-left-box" @click="gocomponents(5,'/IntegralOrder')">
|
||||
<div style="cursor: pointer;margin-left: 10px">积分订单</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-collapse-transition>
|
||||
<!-- </transition>-->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <el-collapse>-->
|
||||
<!-- <el-collapse-item title="v3.8.7 - 2023-12-08" title-class="no-border">-->
|
||||
<!-- <ol>-->
|
||||
<!-- <li>操作日志记录部门名称</li>-->
|
||||
<!-- <li>全局数据存储用户编号</li>-->
|
||||
<!-- <li>新增编程式判断资源访问权限</li>-->
|
||||
<!-- </ol>-->
|
||||
<!-- </el-collapse-item>-->
|
||||
<!-- </el-collapse>-->
|
||||
|
||||
|
||||
<div class="app-left-box" @click="logout">
|
||||
<div style="cursor: pointer;margin-left: 10px">退出登录</div>
|
||||
</div>
|
||||
@ -260,17 +308,23 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isClick:false,
|
||||
activeName: 'second',
|
||||
tabarr:[
|
||||
{name:'收银台',icon:'el-icon-s-platform',path:'/homeindex'},
|
||||
{name:'收银台',icon:'el-icon-s-platform',path:'/homeindex' ,index1:0},
|
||||
// {name:'充值',icon: 'el-icon-s-finance',path:'/Recharge'},
|
||||
{name:'订单',icon: 'el-icon-s-order',path:'/Order'},
|
||||
{name:'会员',icon: 'el-icon-s-custom',path:'/Vip'},
|
||||
{name:'核销',icon: 'el-icon-s-check',path:'/WriteOff'},
|
||||
{name:'挂账管理',icon:'el-icon-s-claim',path:'/credit'},
|
||||
{name:'积分',icon:'el-icon-s-data',path:'/Integral'},
|
||||
{name:'交班',icon: 'el-icon-s-flag',path:'/Handover'},
|
||||
{name:'订单',icon: 'el-icon-s-order',path:'/Order',index1:1},
|
||||
{name:'会员',icon: 'el-icon-s-custom',path:'/Vip',index1:2},
|
||||
{name:'核销',icon: 'el-icon-s-check',path:'/WriteOff',index1:3},
|
||||
{name:'挂账管理',icon:'el-icon-s-claim',path:'/credit',index1:4},
|
||||
{name:'积分',icon:'el-icon-s-data',path:'/Integral',index1:5},
|
||||
{name:'交班',icon: 'el-icon-s-flag',path:'/Handover',index1:6},
|
||||
],
|
||||
tabarr2:[
|
||||
{name:'积分',icon:'el-icon-s-data',path:'/Integral'},
|
||||
{name:'订单记录',icon:'el-icon-s-data',path:'/Integral'},
|
||||
],
|
||||
|
||||
leftindex:0,
|
||||
oilList:[
|
||||
{color:'#e5f0ff'},
|
||||
@ -411,6 +465,10 @@ export default {
|
||||
// this.getCartList();
|
||||
},
|
||||
methods: {
|
||||
isClickMethod() {
|
||||
this.leftindex = 5
|
||||
this.isClick = !this.isClick
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value);
|
||||
},
|
||||
@ -875,6 +933,11 @@ export default {
|
||||
font-weight: 700;
|
||||
color: #5393ff !important;
|
||||
}
|
||||
|
||||
//.bule1{
|
||||
// font-weight: 700;
|
||||
// color: #81b0ff !important;
|
||||
//}
|
||||
.app-left{
|
||||
width: 180px;
|
||||
height: 100vh;
|
||||
@ -1354,4 +1417,21 @@ export default {
|
||||
::v-deep .el-tabs--border-card > .el-tabs__content {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.no-border .el-collapse-item__header {
|
||||
border-bottom: none;
|
||||
}
|
||||
.el-menu {
|
||||
border-right: solid 0px #ffffff;
|
||||
list-style-type: none; /* 隐藏列表项的默认符号 */
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
.el-submenu .el-menu-item {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
padding: 0 39px;
|
||||
min-width: 0px;
|
||||
}
|
||||
</style>
|
||||
|
@ -325,7 +325,8 @@
|
||||
width="25%"
|
||||
:visible.sync="dialogRefund">
|
||||
<div style="text-align: center;font-weight: bold">
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.payAmount }}</span>
|
||||
<!-- ¥<span style="font-size: 35px">{{ cashierOrder.payAmount }}</span>-->
|
||||
¥<span style="font-size: 35px">{{ cashierOrder.goodsPayAmount + cashierOrder.oilPayAmount }}</span>
|
||||
</div>
|
||||
<div class="tk">退款金额</div>
|
||||
<div class="tk">退款单号:{{ cashierOrder.orderNo }}</div>
|
||||
@ -333,20 +334,20 @@
|
||||
<span>退款内容:</span>
|
||||
<br>
|
||||
<span>商品:</span>
|
||||
<el-checkbox v-model="isGoods">¥{{cashierOrder.goodsPayAmount}}</el-checkbox>
|
||||
<el-checkbox v-model="isGoods" @click="calculateRefunds()">¥{{cashierOrder.goodsPayAmount}}</el-checkbox>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<span>油品:</span>
|
||||
<template >
|
||||
<el-checkbox v-if="oilInfo.length > 0" v-model="isOil">
|
||||
<el-checkbox v-if="oilInfo.length > 0" v-model="isOil" @click="calculateRefunds()">
|
||||
|
||||
<span v-if="oilInfo[0].payAmount && oilInfo[0].payAmount!='0.00'"> ¥{{cashierOrder.oilPayAmount}}</span>
|
||||
<span v-if="oilInfo[0].balanceAmount>0">储值卡:{{oilInfo[0].balanceAmount}} </span>
|
||||
<span v-if="oilInfo[0].oilCardAmount>0">屯油卡:{{ oilInfo[0].oilCardAmount}} </span>
|
||||
</el-checkbox>
|
||||
<el-checkbox v-if="oilInfo.length > 0 && oilInfo[0].couponId" v-model="isOilVouchers">优惠卷</el-checkbox>
|
||||
<el-checkbox v-if="isOil && oilInfo.length > 0 && oilInfo[0].couponId" v-model="isOilVouchers">优惠卷</el-checkbox>
|
||||
|
||||
<!-- <el-checkbox v-if="oilInfo.length > 0 && oilInfo[0].balanceAmount>0" v-model="isOilCard">储值卡:{{oilInfo[0].balanceAmount}}</el-checkbox>-->
|
||||
<!-- <el-checkbox v-if="oilInfo.length > 0 && oilInfo[0].oilCardAmount>0" v-model="isOilFuel">屯油卡:{{ oilInfo[0].oilCardAmount }}</el-checkbox>-->
|
||||
@ -427,6 +428,70 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="reportSuccess2" ref="report2" class="box-center" v-show="false">
|
||||
<div class="box-title">订单退款</div>
|
||||
<div class="box-ge">
|
||||
<div v-if="isOil" v-for="item in oilInfo" :key="item.id">
|
||||
<div class="input-box">
|
||||
<div>{{ getName(oilNameList,item.oils) }}/{{ getName1(oilGunList,item.oilGunNum) }}</div>
|
||||
<div>¥{{ item.orderAmount }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>加油升数</div>
|
||||
<div>{{ item.oilNum }}L</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="isOil">
|
||||
<div v-if="oilInfo[0].balanceAmount>0" class="input-box">
|
||||
<div>储值卡</div>
|
||||
<div>{{oilInfo[0].balanceAmount}}</div>
|
||||
</div>
|
||||
<div v-if="oilInfo[0].oilCardAmount>0" class="input-box">
|
||||
<div>屯油卡</div>
|
||||
<div>{{ oilInfo[0].oilCardAmount}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="isGoods" v-for="item in goodsInfo" :key="item.id">
|
||||
<div class="input-box">
|
||||
<div>商品名称:</div>
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>商品数量:</div>
|
||||
<div>{{ item.num }}{{ item.unit }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-if="!cashierOrder.userId">
|
||||
<div>商品单价:</div>
|
||||
<div>¥{{ item.retailPrice }}</div>
|
||||
</div>
|
||||
<div class="input-box" v-else>
|
||||
<div>商品单价:</div>
|
||||
<div>¥{{ item.memberPrice }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="cashierOrder.payType == 'CASH'">现金</div>
|
||||
<div v-else-if="cashierOrder.payType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="cashierOrder.payType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</div>
|
||||
<div v-else>小程序码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>合计:</div>
|
||||
<div>¥{{ cashierOrder.amount }}</div>
|
||||
</div>
|
||||
|
||||
<div class="input-box">
|
||||
<div>实退款:</div>
|
||||
<div>¥{{ calculateRefundsV }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -443,7 +508,7 @@ import {getOilNameList} from "@/api/cashier/oilnumgun";
|
||||
import {getOrderGoods} from "@/api/cashier/goodsorder";
|
||||
import {exportExcelCashierApi} from "@/api/order/exportExcel";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
import {getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
import {formatDate} from "@/utils";
|
||||
import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue";
|
||||
@ -453,6 +518,7 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
components: {ScanPayCodeDialog},
|
||||
data(){
|
||||
return{
|
||||
calculateRefundsV:0,
|
||||
// 退款备注
|
||||
refundRemark:"",
|
||||
radio1:"油号选错",
|
||||
@ -563,7 +629,11 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
return name;
|
||||
},
|
||||
|
||||
async printLocally() {
|
||||
async printLocally(data) {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
@ -630,7 +700,14 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
// var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
var fromHtml = ''
|
||||
if (data == 'report') {
|
||||
fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||
}else {
|
||||
fromHtml = bodyStyle+this.$refs.report2.innerHTML
|
||||
|
||||
}
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
@ -655,7 +732,7 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
})
|
||||
await this.getOilList(this.cashierOrder.orderNo)
|
||||
await this.getGoodsLists(this.cashierOrder.goodsOrderId)
|
||||
this.printLocally()
|
||||
this.printLocally('report')
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 退款
|
||||
@ -699,10 +776,34 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
// });
|
||||
},
|
||||
|
||||
// 计算退款总价
|
||||
calculateRefunds() {
|
||||
let refundAmt = 0
|
||||
if (this.isGoods) {
|
||||
refundAmt += this.cashierOrder.goodsPayAmount
|
||||
}
|
||||
if (this.isOil && this.cashierOrder.oilPayAmount > 0) {
|
||||
refundAmt += this.cashierOrder.oilPayAmount
|
||||
}
|
||||
|
||||
this.calculateRefundsV = refundAmt;
|
||||
},
|
||||
|
||||
async refundConfirmed() {
|
||||
this.calculateRefunds();
|
||||
if(!this.isOil && !this.isGoods) {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '请选择退款项'
|
||||
});
|
||||
return
|
||||
}
|
||||
this.dialogRefund = false;
|
||||
this.loading = true;
|
||||
console.log("cashierOrder",this.cashierOrder)
|
||||
|
||||
|
||||
|
||||
// 计算退款总价
|
||||
let refundAmt = 0
|
||||
if (this.isGoods) {
|
||||
@ -730,10 +831,14 @@ import ScanPayCodeDialog from "@/views/cashier/components/scanPayCodeDialog.vue"
|
||||
refundAmt: refundAmt
|
||||
}
|
||||
await refundApi(map).then(res=>{
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
if(res.code == 200) {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '退款成功'
|
||||
});
|
||||
this.printLocally()
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
this.loading = false;
|
||||
|
@ -301,7 +301,7 @@ import {getDicts} from "@/api/dict/data";
|
||||
import { exportExcelGoodsOrderApi } from "@/api/order/exportExcel";
|
||||
import {cashierOrder} from "@/api/cashier/cashierorder";
|
||||
import {refundApi, getOrderInfoApi} from "@/api/cashier/refund";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -399,6 +399,9 @@ export default {
|
||||
},
|
||||
|
||||
async printLocally() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
|
@ -349,7 +349,7 @@
|
||||
import {cashierOrder} from "@/api/cashier/cashierorder";
|
||||
import {getOrderInfoApi, refundApi} from "@/api/cashier/refund";
|
||||
import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
import {getInfoByIdApi} from "@/api/cashier/cardfavorablerecord";
|
||||
|
||||
export default {
|
||||
@ -429,6 +429,9 @@
|
||||
},
|
||||
methods:{
|
||||
async printLocally() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
|
@ -260,7 +260,7 @@ import {listOilOrder, oilOrderInfo} from "@/api/cashier/oilorder";
|
||||
import {getOilNameList} from "@/api/cashier/oilnumgun";
|
||||
import {getOilNumberGun} from "@/api/cashier/oilGuns";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -390,6 +390,9 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
},
|
||||
|
||||
async printLocally() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
|
@ -281,7 +281,7 @@ import {getDicts} from "@/api/dict/data";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
import {exportExcelVipApi} from "@/api/order/exportExcel";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -379,6 +379,9 @@ export default {
|
||||
},
|
||||
|
||||
async printLocally() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
|
@ -927,7 +927,7 @@ import {getUserGradeInfo} from "@/api/cashier/usergrade";
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {getSysConfig} from "@/api/cashier/user/sysconfig";
|
||||
import {giftCardExchange} from "@/api/cashier/giftCard/giftcard";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
import {connectFlag, getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -1630,10 +1630,14 @@ export default {
|
||||
},
|
||||
|
||||
async printLocally1() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -1701,24 +1705,29 @@ export default {
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report1.innerHTML
|
||||
var fromHtml = bodyStyle + this.$refs.report1.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
|
||||
},
|
||||
async printLocally2() {
|
||||
if (!connectFlag){
|
||||
return
|
||||
}
|
||||
//初始化打印函数
|
||||
let LODOP = getLodop(); // 初始化打印
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
if (LODOP) {
|
||||
LODOP.PRINT_INIT();
|
||||
var bodyStyle = `<style>
|
||||
.input-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -1786,17 +1795,18 @@ export default {
|
||||
}
|
||||
</style>
|
||||
`
|
||||
var fromHtml = bodyStyle+this.$refs.report2.innerHTML
|
||||
var fromHtml = bodyStyle + this.$refs.report2.innerHTML
|
||||
|
||||
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
|
||||
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||
// let preview = LODOP.PREVIEW();
|
||||
// console.log("preview",preview);
|
||||
LODOP.PRINT();
|
||||
}
|
||||
|
||||
},
|
||||
async collection() {
|
||||
|
Loading…
Reference in New Issue
Block a user