liupopo 2 years ago
parent
commit
114941944e
  1. 16
      supervise-customer-ui/src/api/customer/csmcash.js
  2. 540
      supervise-customer-ui/src/views/daydataupload/cash/cashedit.vue
  3. 182
      supervise-customer-ui/src/views/daydataupload/cash/index.vue
  4. 2
      warehousing-system/project_web/src/components/Home.vue
  5. 2
      yxt-portal-ui/src/views/Home/Home.vue
  6. 5
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashDifferentMapper.java
  7. 3
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashDifferentService.java
  8. 8
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashGdMapper.java
  9. 8
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashGdService.java
  10. 5
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashIncomeMapper.java
  11. 3
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashIncomeService.java
  12. 8
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashLogMapper.java
  13. 41
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashLogService.java
  14. 25
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashRest.java

16
supervise-customer-ui/src/api/customer/csmcash.js

@ -16,5 +16,21 @@ export default {
return request({
url: '/supervise/v1/gdinstoragelog/fetchDetailsBySid/' + sid
})
},
// 通过sid清除临时数据
clearLog: function(params) {
return request({
baseURL: '/api',
url: '/customer/csmcash/clearLog',
params: params
})
},
// 通过sid清除原记录,使用新记录
coverLog: function(params) {
return request({
baseURL: '/api',
url: '/customer/csmcash/coverLog',
params: params
})
}
}

540
supervise-customer-ui/src/views/daydataupload/cash/cashedit.vue

@ -0,0 +1,540 @@
<template>
<div>
<!-- 标题按钮部分开始 -->
<div class="tab-header webtop">
<!-- 标题 -->
<div>补充完善回款数据</div>
<!-- start 添加修改按钮 -->
<div>
<!-- <el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> -->
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="listconadd">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>卡片名称</span>
<el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
</div>
<div v-for="o in 4" :key="o" class="text item">
{{ '列表内容 ' + o }}
</div>
</el-card>
<div class="stepsLay">
<!-- 步骤条 -->
<el-steps :active="active" simple class="stepsLay_top">
<el-step title="填写供应商信息" icon="el-icon-edit-outline" />
<el-step title="上传营业执照" icon="el-icon-upload" />
<el-step title="上传合同" icon="el-icon-picture" />
<el-step title="关联第二代码" icon="el-icon-circle-plus" />
</el-steps>
<!-- 填写供应商信息-->
<el-card v-show="active===0" class="box-card">
<div class="item">
<span class="item_text">供应商名称</span>
<el-input v-model="formobj.name" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">供应商编码</span>
<el-input v-model="formobj.codeUnified" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">联系人</span>
<el-input v-model="formobj.contacts" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">电话</span>
<el-input v-model="formobj.telephone" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">单位地址</span>
<el-input v-model="formobj.address" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">法人代表</span>
<el-input v-model="formobj.legalRepresentative" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">开户行</span>
<el-input v-model="formobj.bankName" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">银行账户</span>
<el-input v-model="formobj.bankAccount" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">银行账号</span>
<el-input v-model="formobj.bankAccountNumber" placeholder="" class="item_input" clearable />
</div>
<div class="item" style="margin-bottom: 20px;">
<span class="item_text">营业执照号</span>
<el-input v-model="formobj.businessLicenseNo" placeholder="" class="item_input" clearable />
</div>
</el-card>
<!-- 上传营业执照 -->
<el-card v-show="active===1" class="box-card">
<div style="display: flex;margin-top: 20px;margin-bottom: 20px;">
<span style="display: flex;font-size:18px;margin-left: 20px;">营业执照</span>
<div style="display: flex; flex-direction: row;">
<img
src="https://ts1.cn.mm.bing.net/th/id/R-C.ff9d35a24ab8939a9cf51706cc0a3386?rik=CdofqeWtaZ6lHw&riu=http%3a%2f%2fimg95.699pic.com%2fdesgin_photo%2f40064%2f1304_list.jpg&ehk=7Fgvp%2b0uNJ93xDAUhg0EbJc%2fNpU1jZbYy9EKwWFzSgg%3d&risl=&pid=ImgRaw&r=0"
style="margin-left: 30px; width: 148px;height: 148px;"
>
<upload
ref="uploadImg"
v-model="imgList"
style="margin-left: 80px;"
:limit="3"
bucket="map"
:upload-data="{ type: '0001' }"
@change="backData"
/>
</div>
</div>
</el-card>
<!-- 上传合同 -->
<el-card v-show="active===2" class="box-card">
<div class="item">
<span class="item_text">合同编号</span>
<el-input v-model="formobj.contractInfo.contractNo" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">合同有效期</span>
<el-date-picker
v-model="formobj.contractInfo.contractValidity"
class="item_input"
type="date"
clearable
value-format="yyyy-MM-dd"
placeholder="选择日期"
clearable
/>
</div>
<div class="item">
<span class="item_text">签署人</span>
<el-input v-model="formobj.contractInfo.signatory" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">合同金额</span>
<el-input
v-model="formobj.contractInfo.contractPrice"
placeholder=""
class="item_input"
clearable
@keydown.native="formatNum"
@keyup.native="formatNum"
/>
</div>
<div class="item">
<span class="item_text">经办人</span>
<el-input v-model="formobj.contractInfo.handledBy" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">签署组织</span>
<el-input v-model="formobj.contractInfo.signingOrganization" placeholder="" class="item_input" clearable />
</div>
<div class="item" style="margin-top: 80px; margin-bottom: 80px;">
<span class="item_text">合同附件</span>
<div class="item_input" style="display: flex; flex-direction: row;">
<img
src="https://ts1.cn.mm.bing.net/th/id/R-C.de25aa371b777f0a779a1d2be719510c?rik=XHbzQqTmVDdirg&riu=http%3a%2f%2fimgs.ppt118.com%2fword%2fotherdoc%2f2018%2f10%2f12%2f0b5445a1-3.png_w800&ehk=F78OU5oXSPtPsbT7OzG%2bgHFdOl%2flolfxSH0zLTFUJHQ%3d&risl=&pid=ImgRaw&r=0"
style="width: 148px;height: 148px;"
>
<upload
ref="uploadImg2"
v-model="imgList2"
style="margin-left: 50px;"
:limit="3"
bucket="map"
:upload-data="{ type: '0001' }"
@change="backData2"
/>
</div>
</div>
</el-card>
<!-- 关联第二代码 -->
<el-card v-show="active===3" class="box-card">
<!-- <div class="item4">
<div class="item4_left">
<span>关联第二代码</span>
<div style="display: flex; flex-direction: column;align-items: center;margin-top: 10px;">
<el-input v-model="inputText" placeholder="" class="item4_left_input" clearable />
<span class="item4_left_text">添加</span>
</div>
</div>
<div>
<div v-for="(item,index) in formobj.codeIndex" :key="index" class="item4_right" style="margin-top: 10px;">
<span class="item4_right_list_text">{{item}}</span>
<span class="item4_right_list_delect">删除</span>
</div>
</div>
</div> -->
<div class="item">
<span class="item_text">供应商名称</span>
<span class="item_input">{{ formobj.name }}</span>
</div>
<div class="item">
<span class="item_text">供应商编码</span>
<span class="item_input">{{ formobj.codeUnified }}</span>
</div>
<div class="item" style="height: auto; align-items: start;">
<span class="item_text">第二代码</span>
<div style=" flex: 4.4; display: flex;flex-direction: column; margin-left: 10px;">
<div v-for="(item,index) in formobj.codeIndex" :key="index" class="item_right">
<span class="item_right_list_text">{{ item }}</span>
<span class="item_right_list_delect" @click="showDelectDialog(index)">删除</span>
</div>
<div style="display: flex; flex-direction: row;align-items: center;margin-top: 10px;">
<el-input v-model="inputText" placeholder="" type="number" class="item_left_input" clearable />
<span class="item_left_text" @click="add">添加</span>
</div>
</div>
</div>
</el-card>
<!-- 底部按钮 -->
<div>
<el-button v-if="active==1||active==2||active==3" class="deployBtn" @click="prev">上一步</el-button>
<el-button v-if="active==0||active==1||active==2" class="deployBtn" @click="next">下一步</el-button>
<el-button v-if="active==3" class="deployBtn" @click="submit">提交</el-button>
</div>
<!-- 删除提示框 -->
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
<span>是否确认要删除此管理代码</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="delect()"> </el-button>
</span>
</el-dialog>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/supervise/supplierbankinfo'
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao'
export default {
components: {
upload
},
data() {
return {
dialogVisible: false,
itemIndex: 0,
active: 0,
inputText: '',
submitdisabled: false,
imgList: [],
imgList2: [],
formobj: {
name: '',
codeUnified: '',
contacts: '',
telephone: '',
address: '',
bankName: '',
bankAccount: '',
bankAccountNumber: '',
legalRepresentative: '',
businessLicenseNo: '',
businessLicenseFiles: [],
contractInfo: {
contractNo: '1',
contractValidity: '',
signatory: '',
contractPrice: '',
handledBy: '',
signingOrganization: '',
contractFiles: []
},
codeIndex: []
}
}
},
created() {},
methods: {
formatNum(e) {
e.target.value = e.target.value.replace(/[^\d.]/g, '') // ."-"
e.target.value = e.target.value.replace(/^00/, '0') // 0
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
// 0102
console.log(e.target.value)
e.target.value = parseFloat(e.target.value)
}
},
handleReturn(isreload) {
this.active = 0
this.imgList = []
this.imgList2 = []
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
name: '',
codeUnified: '',
contacts: '',
telephone: '',
address: '',
bankName: '',
bankAccount: '',
bankAccountNumber: '',
legalRepresentative: '',
businessLicenseNo: '',
businessLicenseFiles: [],
contractInfo: {
contractNo: '',
contractValidity: '',
signatory: '',
contractPrice: '',
handledBy: '',
signingOrganization: '',
contractFiles: []
},
codeIndex: []
}
this.$emit('doback')
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
this.dialogVisible = false
})
.catch(_ => {})
},
showAdd(row) {
},
showEdit(row) {
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
console.log('data211111111111112222222222>>>', resp.data)
this.formobj = resp.data
console.log('codeIndex>>>', this.formobj.codeIndex)
if (this.formobj.businessLicenseFiles.length > 0) {
for (var i = 0; i < this.formobj.businessLicenseFiles.length; i++) {
this.imgList.push({
name: '',
url: this.formobj.businessLicenseFiles[i]
})
}
}
if (this.formobj.contractInfo.contractFiles.length > 0) {
for (var j = 0; j < this.formobj.contractInfo.contractFiles.length; j++) {
this.imgList2.push({
name: '',
url: this.formobj.contractInfo.contractFiles[j]
})
}
}
}
})
.catch(e => {
this.formobj = row
})
},
prev() {
--this.active
if (this.active < 0) { this.active = 0 }
},
next() {
// ++this.active;
if (this.active++ > 3) { this.active = 0 }
},
showDelectDialog(index) {
this.dialogVisible = true
this.itemIndex = index
},
delect() {
this.dialogVisible = false
// //1
this.formobj.codeIndex.splice(this.itemIndex, 1)
},
add() {
this.formobj.codeIndex.push(
this.inputText
)
this.inputText = ''
console.log('codeIndex>>>', this.formobj.codeIndex)
},
submit() {
console.log('data>>>', this.formobj)
req.saveOrUpdate(this.formobj)
.then(resp => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
},
backData(value) {
console.log(value, 999)
const aa = []
if (value.length > 0 && value != null && value != undefined) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].url)
}
}
this.formobj.businessLicenseFiles = aa
},
backData2(value) {
console.log(value, 999)
const aa = []
if (value.length > 0 && value != null && value != undefined) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].url)
}
}
this.formobj.contractInfo.contractFiles = aa
}
}
}
</script>
<style lang="scss">
// .avatar-uploader .el-upload {
// width: 300px;
// height: 300px;
// margin-left: 220px;
// border: 2px dashed #409EFF;
// border-radius: 6px;
// justify-content: center;
// align-items: center;
// }
// .avatar-uploader .el-upload:hover {
// border-color: #409EFF;
// }
// .avatar-uploader-icon {
// font-size: 58px;
// color: #8c939d;
// width: 300px;
// height: 300px;
// line-height: 300px;
// text-align: center;
// }
// .avatar {
// width: 178px;
// height: 178px;
// display: block;
// }
body {
font-size: 14px;
}
.stepsLay {
margin-top: 50px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-bottom: 50px;
.stepsLay_top {
width: 75%;
}
.box-card {
min-width: 75%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.item_right {
flex: 1;
justify-items: center;
.item_right_list_text {
font-size: 16px;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
}
}
.deployBtn {
background-color: #018AD2;
margin-top: 20px;
color: #fff;
padding-left: 20px;
padding-right: 20px;
font-size: 14px;
}
}
</style>

182
supervise-customer-ui/src/views/daydataupload/cash/index.vue

@ -1,80 +1,75 @@
<template>
<div class="app-container">
<button-bar ref="btnbar" view-title="每日回款核对记录" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form :inline="true" :model="queryParams" class="tab-header">
<el-form-item label="数据日期">
<el-date-picker v-model="queryParams.params.dataDateStart" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择数据开始日期" />
<span style="padding: 0 8px"></span>
<el-date-picker v-model="queryParams.params.dataDateEnd" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择数据结束日期" />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="每日回款核对记录" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form :inline="true" :model="queryParams" class="tab-header">
<el-form-item label="数据日期">
<el-date-picker v-model="queryParams.params.dataDateStart" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择数据开始日期" />
<span style="padding: 0 8px"></span>
<el-date-picker v-model="queryParams.params.dataDateEnd" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择数据结束日期" />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</div>
</div>
</div>
</div>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit" />
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="dataDate" label="数据日期" align="center" width="120" />
<el-table-column prop="createTime" label="导入时间" align="center" width="160" />
<el-table-column prop="salesAmountYesterday" label="昨日销售总计金额(元)" align="center" width="180" />
<el-table-column prop="cashedAmountToday" label="今日应回款金额(元)" align="center" width="180" />
<el-table-column prop="cashedAmountTodayReal" label="今日实际回款金额(元)" align="center" width="180" />
<el-table-column prop="cashedAmountDifferent" label="回款差额金额(元)" align="center" width="180" />
<el-table-column label="操作" wid align="center">
<template slot-scope="scope">
<div v-if="scope.row.state==1"><el-tag type="info">正在导入数据库...</el-tag><el-button
type="text"
icon="el-icon-refresh"
style="margin-left: 5px;"
@click="loadList()"
>刷新</el-button></div>
<div v-else-if="scope.row.state==2"><el-tag type="warning">正在创建报表...</el-tag><el-button
type="text"
icon="el-icon-refresh"
style="margin-left: 5px;"
@click="loadList()"
>刷新</el-button></div>
<div v-else-if="scope.row.state==3"><el-tag type="success">正在生成Excel...</el-tag><el-button
type="text"
icon="el-icon-refresh"
style="margin-left: 5px;"
@click="loadList()"
>刷新</el-button></div>
<el-button v-else-if="scope.row.state==4&&scope.row.fileUrl.length>1" type="text" @click="toDownload(scope.row)">下载库存日报表</el-button>
<div v-else>没有报表文件</div>
</template>
</el-table-column>
</el-table>
</div>
<!-- End 项目列表 -->
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<pagination
v-show="dataList.length > 0"
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
class="pagination"
@pagination="loadList"
/>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit" />
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="dataDate" label="数据日期" align="center" width="120" />
<el-table-column prop="createTime" label="导入时间" align="center" width="160" />
<el-table-column prop="salesAmountYesterday" label="昨日销售总计金额(元)" align="center" width="180" />
<el-table-column prop="cashedAmountToday" label="今日应回款金额(元)" align="center" width="180" />
<el-table-column prop="cashedAmountTodayReal" label="今日实际回款金额(元)" align="center" width="180" />
<el-table-column prop="cashedAmountDifferent" label="回款差额金额(元)" align="center" width="180" />
<el-table-column label="操作" wid align="center">
<template slot-scope="scope">
<div v-if="scope.row.status==1"><el-button type="primary" icon="el-icon-edit" size="small" @click="toEdit(scope.row)">填写回款信息</el-button></div>
<div v-else-if="scope.row.status==2"><el-button type="primary" icon="el-icon-edit" size="small" @click="toEdit(scope.row)">完善回款信息</el-button></div>
<div v-else-if="scope.row.state==3"><el-tag type="success">正在生成Excel...</el-tag><el-button
type="text"
icon="el-icon-refresh"
style="margin-left: 5px;"
@click="loadList()"
>刷新</el-button></div>
<el-button v-else-if="scope.row.state==4&&scope.row.fileUrl.length>1" type="text" @click="toDownload(scope.row)">下载库存日报表</el-button>
<div v-else>没有报表文件</div>
</template>
</el-table-column>
</el-table>
</div>
<!-- End 项目列表 -->
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<pagination
v-show="dataList.length > 0"
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
class="pagination"
@pagination="loadList"
/>
</div>
</div>
</div>
<el-dialog title="上传《汇融银行_按日汇总对账报表.xlsx》" :visible.sync="dialogVisible" width="60%" :before-close="dialogClose">
<cashedit v-show="viewState == 3" ref="divinfo" @doback="resetState" />
<el-dialog title="上传《汇融银行_按日汇总对账报表.xlsx》" :close-on-click-modal="false" :visible.sync="dialogVisible" width="60%" :before-close="dialogClose">
<el-card class="box-card">
<div>
<el-upload
@ -101,8 +96,8 @@
<el-card v-show="showSelectButton" class="box-card">
<div style="color: red;margin-bottom: 15px;">是否覆盖之前的数据如果选择覆盖相关回款数据将被重置</div>
<div>
<el-button size="small" type="primary" @click="doDownloadHz">不覆盖关闭</el-button>
<el-button size="small" type="primary" @click="doDownloadHzYc">覆盖并重置数据</el-button>
<el-button size="small" type="primary" @click="dialogClose">不覆盖关闭</el-button>
<el-button size="small" type="warning" @click="coverLog">覆盖并重置数据</el-button>
</div>
</el-card>
</div>
@ -117,12 +112,15 @@
import pageye from '@/components/pagination/pageye'
import req from '@/api/customer/csmcash'
import cashedit from './cashedit'
export default {
name: 'DaydatauploadCash',
components: {
ButtonBar,
Pagination,
pageye
pageye,
cashedit
},
data() {
return {
@ -236,6 +234,7 @@
this.fileList = []
this.showSelectButton = false
this.currentLogSid = ''
this.uploadResultMesssage = ''
this.dialogVisible = false
},
submitUpload() {
@ -271,7 +270,6 @@
_this.uploadResultMesssage = '没有进行数据导入,异常信息为:' + resp.msg
} else if (resp.code === 'cash_5002') {
_this.uploadResultMesssage = resp.msg
_this.showSelectButton = true
_this.currentLogSid = resp.data.sid
} else {
@ -281,23 +279,37 @@
},
clearLog() {
if (this.currentLogSid) {
req.clearLog(this.currentLogSid).then(res => {
this.queryParams.total = res.data.total
this.dataList = res.data.records
req.clearLog({
logsid: this.currentLogSid
}).then(res => {
console.log('临时数据已经清除:', this.currentLogSid)
this.currentLogSid = ''
}).catch(e => {
console.log('CsmCashLog-loadList-ee:', e)
console.log('CsmCashLog-clearLog-ee:', e)
})
}
},
coverLog(logsid) {
if (logsid) {
req.clearLog(logsid).then(res => {
this.queryParams.total = res.data.total
this.dataList = res.data.records
coverLog() {
if (this.currentLogSid) {
req.coverLog({
logsid: this.currentLogSid
}).then(res => {
this.loadList()
this.showSelectButton = false
this.currentLogSid = ''
this.dialogVisible = false
this.uploadResultMesssage = ''
}).catch(e => {
console.log('CsmCashLog-loadList-ee:', e)
console.log('CsmCashLog-coverLog-ee:', e)
})
}
},
toEdit(row) {
this.viewState = 3
// this.$refs['divadd'].showEdit(row)
},
resetState() {
this.viewState = 1
}
}
}

2
warehousing-system/project_web/src/components/Home.vue

@ -46,7 +46,7 @@
class="text-center"
>平台首页</a
>
<a href="javascript:void(0);" class="text-center">仓库集控</a>
<a href="javascript:void(0);" class="text-center">云仓管理</a>
</div>
<el-menu
background-color="#0294d7"

2
yxt-portal-ui/src/views/Home/Home.vue

@ -258,7 +258,7 @@
},
{
imgUrl: require('@/assets/home/bbicon.png'),
title: '仓库集控'
title: '云仓管理'
},
{
imgUrl: require('@/assets/home/bIcon11.png'),

5
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashDifferentMapper.java

@ -1,8 +1,13 @@
package com.yxt.supervise.customer.biz.csmcash;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface CsmCashDifferentMapper extends BaseMapper<CsmCashDifferent> {
@Delete("delete from csm_cash_different where dataDate=#{dataDate} ")
void clearByDay(@Param("dataDate") String dataDate);
}

3
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashDifferentService.java

@ -5,4 +5,7 @@ import org.springframework.stereotype.Service;
@Service
public class CsmCashDifferentService extends ServiceImpl<CsmCashDifferentMapper, CsmCashDifferent> {
public void clearByDay(String dataDate) {
baseMapper.clearByDay(dataDate);
}
}

8
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashGdMapper.java

@ -1,8 +1,16 @@
package com.yxt.supervise.customer.biz.csmcash;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface CsmCashGdMapper extends BaseMapper<CsmCashGd> {
@Delete("delete from csm_cash_gd where logsid=#{logsid} ")
void clearByLogSid(@Param("logsid") String logsid);
@Delete("delete from csm_cash_gd where dataDate=#{dataDate} and logsid<>#{logsid} ")
void clearByDayNotNew(@Param("dataDate") String dataDate, @Param("logsid") String logsid);
}

8
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashGdService.java

@ -23,4 +23,12 @@ public class CsmCashGdService extends ServiceImpl<CsmCashGdMapper, CsmCashGd> {
qw.eq("logsid", logsid);
return baseMapper.selectList(qw);
}
public void clearByLogSid(String logsid) {
baseMapper.clearByLogSid(logsid);
}
public void clearByDayNotMe(String dataDate, String logsid) {
baseMapper.clearByDayNotNew(dataDate,logsid);
}
}

5
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashIncomeMapper.java

@ -1,8 +1,13 @@
package com.yxt.supervise.customer.biz.csmcash;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface CsmCashIncomeMapper extends BaseMapper<CsmCashIncome> {
@Delete("delete from csm_cash_income where dataDate=#{dataDate} ")
void clearByDay(@Param("dataDate") String dataDate);
}

3
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashIncomeService.java

@ -5,4 +5,7 @@ import org.springframework.stereotype.Service;
@Service
public class CsmCashIncomeService extends ServiceImpl<CsmCashIncomeMapper, CsmCashIncome> {
public void clearByDay(String dataDate) {
baseMapper.clearByDay(dataDate);
}
}

8
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashLogMapper.java

@ -1,8 +1,16 @@
package com.yxt.supervise.customer.biz.csmcash;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface CsmCashLogMapper extends BaseMapper<CsmCashLog> {
@Delete("delete from csm_cash_log where isEnable=0 and sid=#{sid} ")
void clearBySid(@Param("sid") String logsid);
@Delete("delete from csm_cash_log where dataDate=#{dataDate} and sid<>#{sid} ")
void clearByDayNotMe(@Param("dataDate") String dataDate,@Param("sid") String logsid);
}

41
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashLogService.java

@ -13,8 +13,6 @@ import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.FileUploadResult;
import com.yxt.common.core.result.ResultBean;
import com.yxt.supervise.customer.CodeMsgEnum;
import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLog;
import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLogQuery;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -31,6 +29,12 @@ public class CsmCashLogService extends ServiceImpl<CsmCashLogMapper, CsmCashLog>
private FileUploadComponent fileUploadComponent;
@Autowired
private CsmCashGdService csmCashGdService;
@Autowired
private CsmCashSalesService csmCashSalesService;
@Autowired
private CsmCashIncomeService csmCashIncomeService;
@Autowired
private CsmCashDifferentService csmCashDifferentService;
public List<CsmCashLog> listByDataDate(String dataDate) {
QueryWrapper<CsmCashLog> qw = new QueryWrapper<>();
@ -126,4 +130,37 @@ public class CsmCashLogService extends ServiceImpl<CsmCashLogMapper, CsmCashLog>
IPage<CsmCashLog> page = baseMapper.selectPage(iPage, qw);
return page;
}
public void clearLog(String logsid) {
CsmCashLog ccl = fetchBySid(logsid);
if (0 == ccl.getIsEnable()) {
csmCashGdService.clearByLogSid(logsid);
baseMapper.clearBySid(logsid);
}
}
public CsmCashLog fetchBySid(String logsid) {
QueryWrapper<CsmCashLog> qw = new QueryWrapper<>();
qw.eq("sid", logsid);
return baseMapper.selectOne(qw);
}
public CsmCashLog coverLog(String logsid) {
CsmCashLog ccl = fetchBySid(logsid);
if (ccl == null)
return null;
String dataDate = ccl.getDataDate();
csmCashGdService.clearByDayNotMe(dataDate, logsid);
csmCashGdService.initCashByLog(ccl);
csmCashIncomeService.clearByDay(dataDate);
csmCashDifferentService.clearByDay(dataDate);
baseMapper.clearByDayNotMe(dataDate, logsid);
ccl.setIsEnable(1);
baseMapper.updateById(ccl);
return ccl;
}
}

25
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/csmcash/CsmCashRest.java

@ -3,7 +3,9 @@ package com.yxt.supervise.customer.biz.csmcash;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLog;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -29,4 +31,27 @@ public class CsmCashRest {
rb = csmCashLogService.uploadAnd2Db(file);
return rb;
}
@GetMapping("/clearLog")
public ResultBean clearLog(@RequestParam("logsid") String logsid) {
ResultBean rb = ResultBean.fireFail();
if (StringUtils.isBlank(logsid)) {
return rb.setMsg("上传日志SID不可为空");
}
csmCashLogService.clearLog(logsid);
return rb.success();
}
@GetMapping("/coverLog")
public ResultBean<CsmCashLog> coverLog(@RequestParam("logsid") String logsid) {
ResultBean rb = ResultBean.fireFail();
if (StringUtils.isBlank(logsid)) {
return rb.setMsg("上传日志SID不可为空");
}
CsmCashLog ccl = csmCashLogService.coverLog(logsid);
if (ccl == null)
return rb.setMsg("获取日志信息异常");
return rb.success().setData(ccl);
}
}

Loading…
Cancel
Save