366 行
16 KiB
HTML
可执行文件
366 行
16 KiB
HTML
可执行文件
<!--[1.9.20]-->
|
|
<style>
|
|
#cashierShiftApp .el-col-4 {
|
|
padding-left: 6px;
|
|
padding-right: 6px;
|
|
margin: 10px 0;
|
|
}
|
|
</style>
|
|
|
|
<div id="cashierShiftApp">
|
|
<div>
|
|
<el-date-picker size="small" v-model="dataTime" type="daterange" range-separator="至" start-placeholder="开始日期"
|
|
end-placeholder="结束日期">
|
|
</el-date-picker>
|
|
<el-button @click="search" size="small" type="primary">搜索</el-button>
|
|
<el-button v-if="operate.cashierExport" @click="exportInfo" size="small">导出交班信息</el-button>
|
|
</div>
|
|
|
|
<el-row :gutter="12">
|
|
<el-col :span="4">
|
|
<el-card shadow="always" :body-style="{ padding: '0px' }">
|
|
<div slot="header">
|
|
<span style="color: #999;">现金</span>
|
|
</div>
|
|
<div style="padding: 14px;">
|
|
<div class="bottom clearfix">
|
|
<span class="time">{{cashierInfoTotal.rmbpay}}</span>
|
|
<span class="time">(元)</span>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-card shadow="always" :body-style="{ padding: '0px' }">
|
|
<div slot="header">
|
|
<span style="color: #999;">微信金额</span>
|
|
</div>
|
|
<div style="padding: 14px;">
|
|
<div class="bottom clearfix">
|
|
<span class="time">{{cashierInfoTotal.wxpay}}</span>
|
|
<span class="time">(元)</span>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-card shadow="always" :body-style="{ padding: '0px' }">
|
|
<div slot="header">
|
|
<span style="color: #999;">支付宝金额</span>
|
|
</div>
|
|
<div style="padding: 14px;">
|
|
<div class="bottom clearfix">
|
|
<span class="time">{{cashierInfoTotal.alipay}}</span>
|
|
<span class="time">(元)</span>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-card shadow="always" :body-style="{ padding: '0px' }">
|
|
<div slot="header">
|
|
<span style="color: #999;">其他支付</span>
|
|
</div>
|
|
<div style="padding: 14px;">
|
|
<div class="bottom clearfix">
|
|
<span class="time">{{cashierInfoTotal.other_pay}}</span>
|
|
<span class="time">(元)</span>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-col>
|
|
<el-col :span="4" v-if="moral_education_coin">
|
|
<el-card shadow="always" :body-style="{ padding: '0px' }">
|
|
<div slot="header">
|
|
<span style="color: #999;">德育币</span>
|
|
</div>
|
|
<div style="padding: 14px;">
|
|
<div class="bottom clearfix">
|
|
<span class="time">{{cashierInfoTotal.mec_money}}</span>
|
|
<span class="time">(元)</span>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-card shadow="always" :body-style="{ padding: '0px' }">
|
|
<div slot="header">
|
|
<span style="color: #999;">现金充值</span>
|
|
</div>
|
|
<div style="padding: 14px;">
|
|
<div class="bottom clearfix">
|
|
<span class="time">{{cashierInfoTotal.recharge_cash}}</span>
|
|
<span class="time">(元)</span>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-card shadow="always" :body-style="{ padding: '0px' }">
|
|
<div slot="header">
|
|
<span style="color: #999;">微信充值</span>
|
|
</div>
|
|
<div style="padding: 14px;">
|
|
<div class="bottom clearfix">
|
|
<span class="time">{{cashierInfoTotal.recharge_wx}}</span>
|
|
<span class="time">(元)</span>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-card shadow="always" :body-style="{ padding: '0px' }">
|
|
<div slot="header">
|
|
<span style="color: #999;">支付宝充值</span>
|
|
</div>
|
|
<div style="padding: 14px;">
|
|
<div class="bottom clearfix">
|
|
<span class="time">{{cashierInfoTotal.recharge_zfb}}</span>
|
|
<span class="time">(元)</span>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-col>
|
|
<template v-if="isOpenCredit">
|
|
<el-col :span="4">
|
|
<el-card shadow="always" :body-style="{ padding: '0px' }">
|
|
<div slot="header">
|
|
<span style="color: #999;">赊账金额</span>
|
|
</div>
|
|
<div style="padding: 14px;">
|
|
<div class="bottom clearfix">
|
|
<span class="time">{{cashierInfoTotal.credit_arrea_money}}</span>
|
|
<span class="time">(元)</span>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-card shadow="always" :body-style="{ padding: '0px' }">
|
|
<div slot="header">
|
|
<span style="color: #999;">赊账还款金额</span>
|
|
</div>
|
|
<div style="padding: 14px;">
|
|
<div class="bottom clearfix">
|
|
<span class="time">{{cashierInfoTotal.credit_repay_money}}</span>
|
|
<span class="time">(元)</span>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-col>
|
|
</template>
|
|
</el-row>
|
|
|
|
<el-table :data="shiftRecordList" size="small" style="width: calc(100% - 20px)"
|
|
border :header-cell-style="{background:'#F5F7FA',color:'#606266'}">
|
|
<el-table-column align="center" show-overflow-tooltip type="index" label="序号" width="50">
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="name" label="姓名" min-width="80px">
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="jobnum" label="工号" min-width="60px">
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip label="时间" min-width="180px">
|
|
<template slot-scope="scope">
|
|
<div style="text-align: left">
|
|
<div><span>上班:</span><span>{{scope.row.start_time}}</span></div>
|
|
<div><span>交班:</span><span>{{scope.row.end_time}}</span></div>
|
|
<div><span>间隔:</span><span>{{scope.row.jg_time}}</span></div>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="cash_box" label="钱箱金额(元)" min-width="150px">
|
|
<template slot-scope="scope">
|
|
<p>初始金额:{{scope.row.cash_box_start}}</p>
|
|
<p>交班金额:{{scope.row.cash_box}}</p>
|
|
<el-button type="text" size="mini" @click="showRecord(scope.row.id)">修改记录</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="wxpay" label="微信金额(元)" min-width="90px">
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="alipay" label="支付宝金额(元)" min-width="110px">
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="rmbpay" label="现金(元)" min-width="70px">
|
|
</el-table-column>
|
|
<el-table-column v-if="moral_education_coin" align="center" show-overflow-tooltip prop="mec_money" label="德育币(元)" min-width="70px">
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="other_pay" label="其他支付(元)" min-width="90px">
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="recharge_cash" label="现金充值(元)" min-width="90px">
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="recharge_wx" label="微信充值(元)" min-width="90px">
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="recharge_zfb" label="支付宝充值(元)" min-width="110px">
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="recharge" label="充值总金额(元)" min-width="110px">
|
|
</el-table-column>
|
|
<template v-if="isOpenCredit">
|
|
<el-table-column align="center" show-overflow-tooltip prop="credit_arrea_money" label="赊账金额"
|
|
min-width="70px">
|
|
</el-table-column>
|
|
<el-table-column align="center" show-overflow-tooltip prop="credit_repay_money" label="赊账还款金额"
|
|
min-width="100px">
|
|
</el-table-column>
|
|
</template>
|
|
</el-table>
|
|
<el-pagination @current-change="handleCurrentChange"
|
|
:current-page="page"
|
|
:page-count="10"
|
|
layout="total, prev, pager, next, jumper" :total="total">
|
|
</el-pagination>
|
|
|
|
<el-dialog title="钱箱修改记录" :visible.sync="showCashBoxDialog" :append-to-body="true" width="600px">
|
|
<p>班次:{{recordTime}}</p>
|
|
<el-select v-model="recordForm.type" size="small"
|
|
style="margin: 10px 0"
|
|
placeholder="选择操作类型" clearable>
|
|
<el-option label="增加" :value="1"></el-option>
|
|
<el-option label="减少" :value="2"></el-option>
|
|
</el-select>
|
|
<el-table :data="cashBoxRecordList" size="small" style="width: calc(100% - 20px)"
|
|
border :header-cell-style="{background:'#F5F7FA',color:'#606266'}">
|
|
<el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
|
|
<el-table-column align="center" prop="type_name" label="修改方式" min-width="70"></el-table-column>
|
|
<el-table-column align="center" prop="edit_money" label="修改金额" min-width="70"></el-table-column>
|
|
<el-table-column align="center" prop="add_time" label="修改时间" show-overflow-tooltip
|
|
width="140"></el-table-column>
|
|
<el-table-column align="center" prop="remark" label="备注" show-overflow-tooltip
|
|
min-width="140"></el-table-column>
|
|
</el-table>
|
|
<el-pagination @current-change="getCashBoxRecord"
|
|
:page-count="recordForm.limit"
|
|
:current-page.sync="page"
|
|
layout="total, prev, pager, next, jumper"
|
|
:total="cashBoxTotal">
|
|
</el-pagination>
|
|
</el-dialog>
|
|
</div>
|
|
|
|
<script>
|
|
var cashierShiftApp = new Vue({
|
|
el: '#cashierShiftApp',
|
|
data() {
|
|
return {
|
|
isOpenCredit: false,
|
|
isShowAllOtherPay: false,
|
|
recordForm: {
|
|
id: '',
|
|
page: 1,
|
|
limit: 10,
|
|
type: '',
|
|
},
|
|
recordTime: '',
|
|
cashBoxTotal: 0,
|
|
showCashBoxDialog: false,
|
|
dataId: '',
|
|
dataTime: '',
|
|
cashierInfoTotal: {},
|
|
total: 0,
|
|
page: 1,
|
|
shiftRecordList: [],
|
|
cashBoxRecordList: [],
|
|
operate: {},
|
|
moral_education_coin: false,
|
|
}
|
|
},
|
|
created() {
|
|
this.dataId = MenuApp.getQueryVariable('id');
|
|
this.getCashierShift()
|
|
this.getCashierShiftTotal()
|
|
let auth_list = {
|
|
cashierExport: '/index.php/Retail/Cashier/cashierExport',
|
|
};
|
|
$.ajax({
|
|
url: '/index.php/Retail/Component/checkOperateAuth',
|
|
type: 'post',
|
|
data: {
|
|
auth_list: JSON.stringify(auth_list),
|
|
},
|
|
success: (res) => {
|
|
this.operate = res.data;
|
|
}
|
|
})
|
|
$.ajax({
|
|
url: '/index.php/Retail/Mgoods/getPlatformType',
|
|
type: "post",
|
|
data: {},
|
|
success: (res) => {
|
|
this.moral_education_coin = res.moral_education_coin;
|
|
}
|
|
})
|
|
},
|
|
methods: {
|
|
//显示钱箱修改记录
|
|
showRecord(id) {
|
|
this.recordForm = {
|
|
id: id,
|
|
page: 1,
|
|
limit: 10,
|
|
type: '',
|
|
};
|
|
this.showCashBoxDialog = true;
|
|
this.getCashBoxRecord();
|
|
},
|
|
getCashBoxRecord() {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: '/index.php/Retail/Cashier/getCashEditRecord',
|
|
data: this.recordForm,
|
|
success: (res) => {
|
|
if (res.status == 1) {
|
|
this.cashBoxRecordList = res.data.list;
|
|
this.cashBoxTotal = res.data.count;
|
|
this.recordTime = res.data.time;
|
|
} else {
|
|
this.$message.error(res.msg ? res.msg : '请求发生错误');
|
|
}
|
|
}
|
|
})
|
|
},
|
|
getCashierShift() {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: '/index.php/Retail/Cashier/shiftingdetailinfo',
|
|
data: {
|
|
id: this.dataId,
|
|
page: this.page,
|
|
limit: 10,
|
|
},
|
|
success: (res) => {
|
|
this.shiftRecordList = res.data
|
|
this.total = Number(res.count)
|
|
this.isOpenCredit = res.isOpenCredit
|
|
}
|
|
})
|
|
},
|
|
getCashierShiftTotal() {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: '/index.php/Retail/Cashier/cashierSearch',
|
|
data: {
|
|
id: this.dataId
|
|
},
|
|
success: (res) => {
|
|
if (res.status === 1) {
|
|
this.cashierInfoTotal = res.cashierInfo
|
|
}
|
|
}
|
|
})
|
|
},
|
|
handleCurrentChange(val) {
|
|
this.page = val
|
|
this.getCashierShift()
|
|
},
|
|
search() {
|
|
this.getCashierShiftTotal();
|
|
this.getCashierShift();
|
|
},
|
|
exportInfo() {
|
|
window.location.href = "/index.php/Retail/Cashier/cashierExport?id=" + this.dataId +
|
|
'&date01=' + this.dataTime;
|
|
},
|
|
showAllOtherPay() {
|
|
this.isShowAllOtherPay = true
|
|
}
|
|
}
|
|
})
|
|
</script> |