|
|
@@ -12,6 +12,7 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</template> -->
|
|
|
+
|
|
|
<template slot="保司机构">
|
|
|
<el-cascader v-model="pageData.partnerCompaniesIdList" size="small" :show-all-levels="false" ize="small"
|
|
|
:options="ztreeNodes" :props="optionProps" clearable filterable></el-cascader>
|
|
|
@@ -70,10 +71,10 @@
|
|
|
<el-button size="small" type="primary" @click="onSubmit">保存</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <el-dialog :visible.sync="dialogVisibleBatch" width="35%" :before-close="handleCloseBatch">
|
|
|
- <el-form :model="InvoicingData" :rules="rules" ref="InvoicingData" size="small" label-width="90px">
|
|
|
+ <el-dialog :visible.sync="dialogVisibleBatch" width="45%" :before-close="handleCloseBatch">
|
|
|
+ <el-form :model="InvoicingData" :rules="rules" ref="InvoicingData" size="small" label-width="100px">
|
|
|
<el-row>
|
|
|
- <el-col :span="10">
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="开票方式:" prop="invoicingMethod">
|
|
|
<el-select v-model="InvoicingData.invoicingMethod" placeholder="请选择">
|
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
@@ -81,50 +82,27 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="税点:" prop="taxPoints">
|
|
|
<el-input v-model="InvoicingData.taxPoints"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="10" v-if="InvoicingData.invoicingMethod == '1'">
|
|
|
+ <el-col :span="8" v-if="InvoicingData.invoicingMethod == '1'">
|
|
|
<el-form-item label="开票号:" prop="invoicId">
|
|
|
<el-input v-model="InvoicingData.invoicId"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="总手续费:">
|
|
|
- <span> {{ batchData.totalAmount }}</span>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="附加原因:">
|
|
|
- <span> {{ batchData.reason }}</span>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="" label-width="20px">
|
|
|
- <el-upload style="margin-top:20px" action="#" class="upload-demo" :limit="1" :auto-upload="false"
|
|
|
- :on-change="drivingupload" ref="upload3" :file-list="fileList">
|
|
|
- <el-button size="small" type="primary">点击上传</el-button>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <!-- <p >开票号 :<el-input style="width: 200px;" v-model="invoicId" placeholder="请输入开票号"></el-input></p> -->
|
|
|
-
|
|
|
- <el-table v-if="batchData.resultList" border height="250" :data="batchData.resultList" style="width: 100%">
|
|
|
- <el-table-column prop="licenseno" label="车牌号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="policyno" label="交强保单号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="商业保单号" prop="syPolicyno">
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ <templateTable ref="templateTable1" :tableConfig="tableConfigbatch" :data="batchData" @findPage="findPagegbatch"
|
|
|
+ :pagination="pageDataPro" @getList="getListgbatch" @selectionChange="selectionChange" @selectAll="selectAll">
|
|
|
+ <template slot="uploadUrl" slot-scope="scope">
|
|
|
+ <span @click="uploadUrlClick(scope.row.uploadUrl)">{{ scope.row.uploadUrl }}</span>
|
|
|
+ </template>
|
|
|
+ </templateTable>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button size="small" @click="dialogVisibleBatch = false">取 消</el-button>
|
|
|
- <el-button size="small" type="primary" @click="handleSumbit()">确 定</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="handleSumbit('InvoicingData')">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<el-dialog title="新增" :visible.sync="dialogVisibleAdd" width="55%" :before-close="handleCloseadd">
|
|
|
@@ -228,6 +206,14 @@
|
|
|
<el-button size="small" type="primary" @click="onSubmitAdd">保存</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog :visible.sync="dialogVisibleprogress" width="25%" >
|
|
|
+ <el-upload style="margin-bottom:10px" action="#" class="upload-demo" :limit="1" :auto-upload="false"
|
|
|
+ :on-change="drivingupload" :on-progress="handleProgress" ref="upload3" :file-list="fileList">
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ <el-progress :percentage="progressPercent" :text-inside="true" :stroke-width="16" status="exception"> </el-progress>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -247,6 +233,9 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ fileList:[],
|
|
|
+ progressPercent:0,
|
|
|
+ dialogVisibleprogress:false,
|
|
|
InsInsuranceKindoptions: [],
|
|
|
ztreeNodes: [],
|
|
|
optionProps: {
|
|
|
@@ -277,11 +266,11 @@ export default {
|
|
|
label: "掌柜开票",
|
|
|
value: "1",
|
|
|
}],
|
|
|
- fileList: [],
|
|
|
+ selectionList: [],
|
|
|
formDataList: {},
|
|
|
dialogVisible: false,
|
|
|
formDataId: '',
|
|
|
- batchData: {},
|
|
|
+ batchData: [],
|
|
|
moneyList: {},
|
|
|
searchData: {},
|
|
|
formList: [
|
|
|
@@ -540,19 +529,60 @@ export default {
|
|
|
// }
|
|
|
]
|
|
|
},
|
|
|
+ tableConfigbatch: {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: "id",
|
|
|
+ label: "任务id",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "createdAt",
|
|
|
+ label: "开始时间",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "completedAt",
|
|
|
+ label: "完成时间",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "status",
|
|
|
+ label: "状态",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "totalAmount",
|
|
|
+ label: "开票金额",
|
|
|
+ type: "text"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "uploadUrl",
|
|
|
+ label: "导出路径",
|
|
|
+ type: "slot"
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ loading: true,
|
|
|
+ isCheckBox: true,
|
|
|
+ isPaginationShow: true,
|
|
|
+ },
|
|
|
btnGroup: [
|
|
|
{
|
|
|
name: '新增',
|
|
|
click: (row, index) => { return this.newAdd() },
|
|
|
},
|
|
|
{
|
|
|
- name: '批量开票',
|
|
|
+ name: '任务列表',
|
|
|
click: (row, index) => { return this.balanceFunPro() },
|
|
|
},
|
|
|
{
|
|
|
name: '模板下载',
|
|
|
click: (row, index) => { return this.templateDownload() },
|
|
|
},
|
|
|
+ {
|
|
|
+ name: '导入',
|
|
|
+ click: (row, index) => { return this.handImport() },
|
|
|
+ },
|
|
|
{
|
|
|
name: '导出',
|
|
|
click: (row, index) => { return this.handExport() },
|
|
|
@@ -574,14 +604,14 @@ export default {
|
|
|
},
|
|
|
formData: {},
|
|
|
rules: {
|
|
|
- voucherNumber: [
|
|
|
- { required: true, message: '请输入凭证号', trigger: 'blur' },
|
|
|
+ invoicingMethod: [
|
|
|
+ { required: true, message: '请选择开票方式', trigger: 'chang' },
|
|
|
],
|
|
|
- contractId: [
|
|
|
- { required: true, message: '请输入合同号', trigger: 'blur' },
|
|
|
+ taxPoints: [
|
|
|
+ { required: true, message: '请输入税点', trigger: 'blur' },
|
|
|
],
|
|
|
- contractFileId: [
|
|
|
- { required: true, message: '请上传合同', trigger: 'blur' },
|
|
|
+ invoicId: [
|
|
|
+ { required: true, message: '请输入开票号', trigger: 'blur' },
|
|
|
],
|
|
|
},
|
|
|
dockingPersonOption: []
|
|
|
@@ -620,8 +650,8 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
- //下拉数据匹配
|
|
|
- selectDataMatching(files, name, data) {
|
|
|
+ //下拉数据匹配
|
|
|
+ selectDataMatching(files, name, data) {
|
|
|
files.forEach(filed => {
|
|
|
if (filed.prop == name) {
|
|
|
filed.options = data;
|
|
|
@@ -671,8 +701,8 @@ export default {
|
|
|
let data = {
|
|
|
isNotCar: 0,
|
|
|
isNotDocumentary: 0,
|
|
|
- companyName:this.formDataAdd.companyId? this.InsCompanyList.find(val => val.id == this.formDataAdd.companyId).name:'',
|
|
|
- partnerCompaniesName:this.formDataAdd.partnerCompaniesId? this.InsCompanyList.find(val => val.id == this.formDataAdd.partnerCompaniesId).name:'',
|
|
|
+ companyName: this.formDataAdd.companyId ? this.InsCompanyList.find(val => val.id == this.formDataAdd.companyId).name : '',
|
|
|
+ partnerCompaniesName: this.formDataAdd.partnerCompaniesId ? this.InsCompanyList.find(val => val.id == this.formDataAdd.partnerCompaniesId).name : '',
|
|
|
}
|
|
|
this.$api.task.fncplyFeeInsert({ ...this.formDataAdd, ...data })
|
|
|
.then(res => {
|
|
|
@@ -689,48 +719,65 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ handImport(){
|
|
|
+ this.fileList=[]
|
|
|
+ this.dialogVisibleprogress=true
|
|
|
+ this.progressPercent = 0
|
|
|
+ },
|
|
|
+ handleProgress(event) {
|
|
|
+ if (this.progressPercent < 99) {
|
|
|
+ this.progressPercent = parseInt(event.percent)
|
|
|
+ }
|
|
|
+ },
|
|
|
drivingupload(file, fileList) {
|
|
|
- this.fileList = []
|
|
|
+ this.progressPercent = 0
|
|
|
const params = new FormData(); // 声明formData数据类型
|
|
|
params.append("multipartFile", file.raw);
|
|
|
params.append("type", "image");
|
|
|
params.append("isNotCar", "0");
|
|
|
this.$api.task.bxImportData(params).then(res => {
|
|
|
if (res.code == "200") {
|
|
|
- this.batchData = res.data
|
|
|
- this.fileList = fileList
|
|
|
+ this.fileList=fileList
|
|
|
+ this.progressPercent =100
|
|
|
}
|
|
|
else {
|
|
|
- this.fileList = []
|
|
|
+ this.fileList=[]
|
|
|
+ this.progressPercent =0
|
|
|
this.$message.error(res.msg)
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- handleSumbit() {
|
|
|
- let data = {
|
|
|
- ...this.InvoicingData,
|
|
|
- totalAmount: this.batchData.totalAmount,
|
|
|
- agreementId: this.batchData.agreementId,
|
|
|
- partnerCompaniesId: this.batchData.partnerCompaniesId,
|
|
|
- companyId: this.batchData.companyId,
|
|
|
- isNotCar: '0',
|
|
|
- ids: this.batchData.ids,
|
|
|
+ handleSumbit(formName) {
|
|
|
|
|
|
- }
|
|
|
- this.$api.task.batchInvoicing(data)
|
|
|
- .then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: '批量开票成功' || res.msg,
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- this.findPage()
|
|
|
- this.dialogVisibleBatch = false
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if(!this.selectionList[0].uploadUrl){
|
|
|
+ this.$message.error('请选择有导出路径的数据!')
|
|
|
+ return false
|
|
|
}
|
|
|
- else {
|
|
|
- this.$message.error(res.msg)
|
|
|
+ let data = {
|
|
|
+ ...this.InvoicingData,
|
|
|
+ isNotCar: '0',
|
|
|
+ selectIds: this.selectionList.map(e => e.id),
|
|
|
}
|
|
|
- });
|
|
|
+ this.$api.task.batchInvoicing(data)
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功' || res.msg,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.findPage()
|
|
|
+ this.dialogVisibleBatch = false
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
handleCloseBatch() {
|
|
|
this.dialogVisibleBatch = false
|
|
|
@@ -802,8 +849,7 @@ export default {
|
|
|
getList(data) {
|
|
|
this.findPage(data)
|
|
|
},
|
|
|
- // 结算
|
|
|
- balanceFun(row) {
|
|
|
+ handExport(){
|
|
|
|
|
|
},
|
|
|
tablePageChange(val) {
|
|
|
@@ -817,6 +863,14 @@ export default {
|
|
|
handExport() {
|
|
|
this.assembly('bxHandlingExcel', 1)
|
|
|
},
|
|
|
+ uploadUrlClick(e) {
|
|
|
+ let url = process.env.BASE_URL +e; // 3.创建一个临时的url指向blob对象
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.href = url;
|
|
|
+ a.download = "导出文件.xlsx";
|
|
|
+ a.click();
|
|
|
+ window.URL.revokeObjectURL(url);
|
|
|
+ },
|
|
|
assembly(api, type) {
|
|
|
if (this.$refs.templateTable.searchDataClone) {
|
|
|
let signDateStart = ''
|
|
|
@@ -854,18 +908,42 @@ export default {
|
|
|
},
|
|
|
balanceFunPro() {
|
|
|
// this.assembly('batchInvoicing',2)
|
|
|
- this.fileList = []
|
|
|
- this.batchData = {}
|
|
|
+ this.batchData = []
|
|
|
this.InvoicingData = {}
|
|
|
- // this.$api.task.importAsyncQuery(this.pageDataPro)
|
|
|
- // .then(res => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // }
|
|
|
- // else {
|
|
|
- // this.$message.error(res.msg)
|
|
|
- // }
|
|
|
- // });
|
|
|
this.dialogVisibleBatch = true
|
|
|
+ this.findPagegbatch()
|
|
|
+ },
|
|
|
+ selectAll (selection,ref){
|
|
|
+ ref.clearSelection()
|
|
|
+ return
|
|
|
+ },
|
|
|
+ selectionChange(val,ref) {
|
|
|
+ if(val.length > 1){
|
|
|
+ const del_row = val.shift()
|
|
|
+ ref.toggleRowSelection(del_row,false) //设置这一行取消选中
|
|
|
+ }
|
|
|
+ this.selectionList = val;
|
|
|
+ },
|
|
|
+ findPagegbatch() {
|
|
|
+ this.tableConfigbatch.loading = true
|
|
|
+ this.$api.task.importAsyncQuery({...this.pageDataPro,handStatus:0})
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.tableConfigbatch.loading = false
|
|
|
+ this.batchData = res.data.content
|
|
|
+ this.pageDataPro.pageNum = res.data.pageNum;
|
|
|
+ this.pageDataPro.pageSize = res.data.pageSize;
|
|
|
+ this.pageDataPro.totalSize = res.data.totalSize;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.tableConfigbatch.loading = false
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getListgbatch(data) {
|
|
|
+ this.pageDataPro = data
|
|
|
+ this.findPagegbatch()
|
|
|
},
|
|
|
templateDownload() {
|
|
|
let a = document.createElement('a')
|