Commit 7a71a973 authored by 吴春's avatar 吴春

提交上传工资单制动生成财务单据

parent d7832d10
......@@ -579,7 +579,100 @@
input[type="number"] {
-moz-appearance: textfield;
}
.page_fnDm .upload-demo {
text-align: center;
padding-bottom: 30px;
}
.page_fnDm .fillShow,
.isShow {
display: block !important;
}
.page_fnDm .btmAddStore::-webkit-scrollbar {
width: 4px;
height: 8px;
}
.page_fnDm .btmAddStore::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
border-radius: 4px;
background: #ededed;
}
.page_fnDm .btmAddStore::-webkit-scrollbar-thumb {
border-radius: 4px;
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
background: #c9c9c9;
}
.page_fnDm .el-pagination {
border: none !important;
}
.page_fnDm .btmAddStore {
border-top: 1px solid #d1d1d1;
display: none;
overflow-x: auto;
width: 86%;
overflow-y: auto;
position: fixed;
background: #f9f9f9;
bottom: 0;
}
.page_fnDm .btmTitle {
padding: 0 10px;
margin: 20px 0 20px 40px;
border-left: 3px solid #e95252;
font-size: 14px;
color: #000000;
}
.page_fnDm .impoTable {
width: 100%;
min-width: 1400px;
border-collapse: collapse;
}
.page_fnDm .impoTable td {
text-align: center;
font-size: 12px;
color: #333;
background-color: #e0f4ff;
border: 1px solid #dcdfe6;
height: 34px;
}
.page_fnDm .impoTable th {
background-color: #cbe9fa;
text-align: center;
color: #387ea5;
height: 34px;
font-size: 12px;
}
.page_fnDm .impotBtn {
border-top: none;
}
/deep/ .financiaUpload .el-upload-dragger{
width: 100px !important;
height:37px !important;
}
.page_fnDm ._show_img_box {
position: fixed;
background: rgba(0, 0, 0, .6);
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 999;
text-align: center;
overflow: auto;
}
.page_fnDm Receipt_box {
padding: 15px;
color: #c94052;
width: 830px;
position: relative;
}
</style>
<template>
......@@ -618,9 +711,8 @@
<button class="hollowFixedBtn" @click="BOSSBtn2 = !BOSSBtn2, checkList = [], getPageList(1), BOSSBtn = false"
v-if="msg.Conditon === 3">{{BOSSBtn2 ? '关闭一键转交' : '一键转交'}}</button>
<button class="hollowFixedBtn" v-if="msg.Conditon === 3 && BOSSBtn2" @click="BOSSBtnClick(2)">转交</button>
<button class="hollowFixedBtn" v-if="msg.Conditon === 1&&ActionMenuCode.indexOf('batchAddWages')!=-1 " @click="outerVisible=true">工资单</button>
</li>
</ul>
<div class="Myquery-box">
<ul class="clearfix">
......@@ -1367,9 +1459,95 @@
</button>
</div>
</el-dialog>
<div class="btmAddStore" :class="{'fillShow':fillShow}">
<div class="btmTitle">导入工资单信息</div>
<div style="height:250px;overflow-y: auto;">
<table class="impoTable" style="border-spacing: 0px 1px;" v-loading="tabLoading">
<thead>
<tr>
<th width="300">费用说明</th>
<th width="180">所属公司</th>
<th width="150">金额</th>
<th width="100">类别</th>
<th >凭证上传</th>
<th width="150">备注</th>
</tr>
<tr v-for="(item,index) in importData" >
<td >
<span>{{item.CostDescribe}}</span>
</td>
<td >
<span>{{item.BrandName}}</span>
</td>
<td >
<span>{{item.Money}}</span>
</td>
<td>{{item.CostType}}</td>
<td >
<div class="_addUpload_box clearfix">
<template v-for="(file,fIndex) in item.vorcherInos">
<div v-if="file.Type==3" style="width:30px; float:left;">
<div class="iconfont ">
<el-image
style="height:16px;"
:src="file.Url?file.Url:file.Content"
:preview-src-list="[file.Url?file.Url:file.Content]">
</el-image>
<!-- <img :src="file.Url?file.Url:file.Content" @click="showUpLoadFile(file,index)" style="height:16px;"> -->
</div>
<span class="iconfont icon-guanbi1" style="font-size:12px;" @click="deleteInvoiceUploadFile(fIndex,index)"></span>
</div>
<div v-if="file.Type==1" style="width:30px; float:left;">
<div class="iconfont "
:class="file.Content.substring(file.Content.lastIndexOf('.')+1,file.Content.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
@click="showUpLoadFile(file)">
</div>
<span class="iconfont icon-guanbi1" style="font-size:12px;" @click="deleteInvoiceUploadFile(fIndex,index)"></span>
</div>
<div v-if="file.Type==2" style="width:30px; float:left;">
<div class="iconfont icon-excel" @click="showUpLoadFile(file,index)">
</div>
<span class="iconfont icon-guanbi1" style="font-size:12px;" @click="deleteInvoiceUploadFile(fIndex,index)"></span>
</div>
</template>
<div class="_pic_upload financiaUpload" @click="importDataIndex=index">
<el-upload drag :http-request="uploadFileInvoiceBtn" :multiple="true" :show-file-list="false" action="">
<i class="el-icon-plus avatar-uploader-icon"></i>
<div class="el-upload__text" >点击上传</div>
</el-upload>
</div>
</div>
</td>
<td >
<span>{{item.Notes}}</span>
</td>
</tr>
</thead>
</table>
</div>
<div class="btmBtn impotBtn">
<input type="button" class="normalBtn" @click="importInfo" :value="$t('ground.qrdr')" />
<input type="button" class="hollowFixedBtn" @click="hideFill" :value="$t('pub.cancelBtn')" />
</div>
</div>
<el-dialog custom-class='w700' title="导入营销数据" :visible.sync="outerVisible" center>
<el-upload drag class="upload-demo" :action="importFileUrl2" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<i class="el-icon-upload"></i>
<div class="el-upload__text">{{$t("tips.tuodongwenjian")}}<em>{{$t('tips.dianjishanhcuan')}}</em></div>
<div slot="tip" class="el-upload__tip">{{$t("ground.znscexcel")}}</div>
</el-upload>
</el-dialog>
<editExchangeRate v-if="costmodeHL" :hlData="trabeListHL" @success="resetPageIndex(),
getPageList(),
costmodeHL=false" @cancel="costmodeHL=false"></editExchangeRate>
<!-- 修改汇率
<el-dialog title="修改汇率" width="400px"
:visible.sync="costmodeHL" center >
......@@ -1410,6 +1588,16 @@
return {
yfcdLoading: false,
isTerminate: -1,
outerVisible: false,
importData:"",
importDataIndex:0,
picObj: [],
picIsShow:false,
initialIndex: 0,
fillShow:false,
tabLoading:false,
importFileUrl2: this.domainManager().UploadFileUrl +
"?cmd=dmc_post_LocalFileUpload&fileType=1&fileLimit=1&RB_Group_id=2&Type=18",
hbMsg: {
FrIDList: [],
Type: 1
......@@ -1697,6 +1885,121 @@
this.czgetList();
},
methods: {
uploadFileInvoiceBtn(file) { //上传
if (file.file.size > 1024 * 1024 * 10) {
this.$message.warning(this.$t('tips.wjdxbncgsz'))
return
}
// 1 文档 2 数据 3 图片
let typeArr = [{
stringArr: 'GIF|JPG|JPEG|PNG|BMP',
type: 3
},
{
stringArr: 'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF',
type: 1
},
]
let ft = file.file.name.substring(file.file.name.lastIndexOf('.') + 1, file.file.name.length).toUpperCase();
let fileTypeNumber = 2;
let typeOk = false;
typeArr.forEach(x => {
if (x.stringArr.indexOf(ft) != '-1') {
fileTypeNumber = x.type;
typeOk = true;
}
})
if (!typeOk) return this.$message.error(this.$t('tips.qscWEfile'));
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => {
let fileSize = file.file.size < 1024 ? file.file.size : (file.file.size / 1024).toFixed(0);
this.importData[this.importDataIndex].vorcherInos.push({
Content: x.data.FilePath,
ID: 0,
Type: fileTypeNumber,
Url: this.domainManager().ViittoFileUrl + x.data.FilePath,
})
console.log("this.importData[this.importDataIndex]",this.importData[this.importDataIndex]);
this.$message.success(this.$t('tips.scchenggong'))
}, 1);
},
showUpLoadFile(i,index) { // 预览上传文件
if (i.Type == 3) {
this.picObj.push(i.Url);
this.picIsShow = true;
} else {
if (i.Content.substring(i.Content.lastIndexOf('.') + 1, i.Content.length).toUpperCase() == 'PDF') {
this.previewPDF(i.Url)
} else {
window.open("https://view.officeapps.live.com/op/view.aspx?src=" + i.Url)
}
}
},
deleteInvoiceUploadFile(i,index) { // 删除上传文件
let obj=this.importData[index];
if (obj.vorcherInos) {
obj.vorcherInos.splice(i, 1)
}
// this.saveMsgInvoice.splice(i, 1);
},
hideFill() {
this.fillShow = false;
},
//导入数据
importInfo() {
this.importInfoAndExport();
},
//导入数据
importInfoAndExport() {
var that = this;
this.Confirm('是否导入此数据?', function () {
that.tabLoading = true;
let qMsg = {
msg: that.importData,
uid: that.getLocalStorage().EmployeeId
};
let fileName = "自动生成财务单据" + that.$commonUtils.getCurrentDate() + ".xls";
that.apipost(
"Financial_post_BatchAddWages",
qMsg,
res => {
if (res.data.resultCode == 1) {
that.tabLoading = false;
that.fillShow = false;
that.Success(res.data.message);
that.getPageList();
} else {
that.Error(res.data.message);
}
},
err => {}
);
});
},
beforeAvatarUpload(file) {
return;
const isJPG = file.type === "application/x-msdownload";
if (!isJPG) {
this.$message.error("上传文件只能是 excel 格式!");
}
return isJPG && isLt2M;
},
//上传
handleAvatarSuccess(res, file) {
if (res.resultCode == 1) {
this.Success(res.message);
this.outerVisible = false;
this.fillShow = true;
this.importData = res.data;
}
else{
this.$message.error(res.message);
}
},
getRate(value) {
return this.moneyFormatB(value)
},
......
......@@ -596,17 +596,17 @@
<el-form label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item label="应收总金额" prop="">
<el-form-item label="申请改价金额" prop="" >
<el-input
type="number"
type="number" placeholder="最终的应收总金额"
v-model="changePriceMsg.Money"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="改价原因" prop="">
<el-form-item label="改价原因" prop="" >
<el-input
type="textarea"
type="textarea" placeholder="填写改价原因,不是价格哟"
v-model="changePriceMsg.ApplyForReason"
autosize
></el-input>
......
......@@ -811,18 +811,17 @@
this.DatelistBM = [new Date(this.msg.StartTime),new Date()]
}else{
var now = new Date();
var month = now.getMonth();//js获取到的是月份是 0-11 所以要加1
var month = now.getMonth()+1;//js获取到的是月份是 0-11 所以要加1
var year = now.getFullYear();
var nextMonthFirstDay = new Date([year,month + 1,1].join('-')).getTime();
var nextMonthFirstDay = new Date([year,month ,1].join('-')).getTime();
var oneDay = 1000 * 24 * 60 * 60;
var monthLast = new Date(nextMonthFirstDay - oneDay).getDate()
if(!this.$route.query.DepartSTime&&!this.$route.query.DepartSTime){
this.msg.DepartSTime = '2023-04-01';//[year,month,1].join('-')
this.msg.DepartSTime = '2023-04-01';
this.msg.DepartETime = [year,month,monthLast].join('-');
this.msg2.DepartSTime = '2023-04-01';//[year,month,1].join('-')
this.msg2.DepartSTime = '2023-04-01';
this.msg2.DepartETime = [year,month,monthLast].join('-');
// this.msg.DepartSTime = this.getBeforeDate(200, new Date())
// this.msg.DepartETime = this.getBeforeDate(0, new Date())
}
this.DatelistUse = [this.msg.DepartSTime,this.msg.DepartETime]
this.msg.Q_IsCollect = '2'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment