|
|
@@ -4,7 +4,8 @@
|
|
|
<templateTable :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig" :data="tableData"
|
|
|
@findPage="findPage" @handleSearchList="handleSearchList" :pagination="pageData">
|
|
|
<template slot="data">
|
|
|
- <yearMonthYay ref="yearMonthYay" @getYearData="getYearData" @getMonthData="getMonthData" @getDayData="getDayData"></yearMonthYay>
|
|
|
+ <yearMonthYay ref="yearMonthYay" @getYearData="getYearData" @getMonthData="getMonthData" @getDayData="getDayData">
|
|
|
+ </yearMonthYay>
|
|
|
</template>
|
|
|
</templateTable>
|
|
|
<el-dialog title="开票" :visible.sync="dialogVisible" width="40%" @close="closdialogVisible">
|
|
|
@@ -13,16 +14,12 @@
|
|
|
<el-col :span="11">
|
|
|
<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">
|
|
|
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="10" v-if="InvoicingData.invoicingMethod=='1'">
|
|
|
+ <el-col :span="10" v-if="InvoicingData.invoicingMethod == '1'">
|
|
|
<el-form-item label="开票号" prop="contractId">
|
|
|
<el-input v-model="InvoicingData.contractId"></el-input>
|
|
|
</el-form-item>
|
|
|
@@ -39,97 +36,55 @@
|
|
|
</el-col> -->
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <el-table
|
|
|
- show-summary
|
|
|
- :data="multipleSelection"
|
|
|
- border
|
|
|
- style="width: 100%">
|
|
|
- <el-table-column
|
|
|
- prop="monthNumber"
|
|
|
- label="月份">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="allTotalOtherFeevalue"
|
|
|
- label="总金额">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="invoicCommissionFeevalue"
|
|
|
- label="已开票">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="noInvoicCommissionFeevalue"
|
|
|
- label="未开票">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="settlementAmount"
|
|
|
- label="开票金额">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.settlementAmount"></el-input>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ <el-table show-summary :data="multipleSelection" border style="width: 100%">
|
|
|
+ <el-table-column prop="monthNumber" label="月份">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="allTotalOtherFeevalue" label="总金额">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="invoicCommissionFeevalue" label="已开票">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="noInvoicCommissionFeevalue" label="未开票">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="settlementAmount" label="开票金额">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.settlementAmount"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button size="small" @click="dialogVisible = false;multipleSelection=[]">取 消</el-button>
|
|
|
+ <el-button size="small" @click="dialogVisible = false; multipleSelection = []">取 消</el-button>
|
|
|
<el-button size="small" type="primary" @click="submit('InvoicingData')">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<el-dialog title="开票" :visible.sync="myDialogVisible" width="40%" @close="myClosdialogVisible">
|
|
|
- 年度: <el-date-picker
|
|
|
- size="small"
|
|
|
- v-model="yeartsStart"
|
|
|
- :picker-options="startDatePicker"
|
|
|
- value-format="yyyy"
|
|
|
- type="year"
|
|
|
- style="width:150px"
|
|
|
- placeholder="开始年份"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
- ~
|
|
|
- <el-date-picker
|
|
|
- size="small"
|
|
|
- v-model="yeartsEnd"
|
|
|
- value-format="yyyy"
|
|
|
- style="width:150px"
|
|
|
- :picker-options="endDatePicker"
|
|
|
- type="year"
|
|
|
- placeholder="结束年份"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
- <el-button type="primary" size="small" style="margin-left: 30px" @click="handleQuery()" >查询</el-button>
|
|
|
- <el-button type="primary" size="small" style="margin-left: 20px;margin-bottom: 30px;" @click="handleMerge()" :disabled="multipleSelection.length==0">合并开票</el-button>
|
|
|
- <el-table
|
|
|
- :data="tableDataYear"
|
|
|
- border
|
|
|
- ref="multipleTable"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- style="width: 100%">
|
|
|
- <el-table-column
|
|
|
- type="selection"
|
|
|
- width="55">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="monthNumber"
|
|
|
- label="月份">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="allTotalOtherFeevalue"
|
|
|
- label="总金额">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="invoicCommissionFeevalue"
|
|
|
- label="已开票">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="noInvoicCommissionFeevalue"
|
|
|
- label="未开票">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button @click="handleMonth(scope.row)" type="primary" size="small">当月开票</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ 年度: <el-date-picker size="small" v-model="yeartsStart" :picker-options="startDatePicker" value-format="yyyy"
|
|
|
+ type="year" style="width:150px" placeholder="开始年份">
|
|
|
+ </el-date-picker>
|
|
|
+ ~
|
|
|
+ <el-date-picker size="small" v-model="yeartsEnd" value-format="yyyy" style="width:150px"
|
|
|
+ :picker-options="endDatePicker" type="year" placeholder="结束年份">
|
|
|
+ </el-date-picker>
|
|
|
+ <el-button type="primary" size="small" style="margin-left: 30px" @click="handleQuery()">查询</el-button>
|
|
|
+ <el-button type="primary" size="small" style="margin-left: 20px;margin-bottom: 30px;" @click="handleMerge()"
|
|
|
+ :disabled="multipleSelection.length == 0">合并开票</el-button>
|
|
|
+ <el-table :data="tableDataYear" border ref="multipleTable" @selection-change="handleSelectionChange"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-table-column type="selection" width="55">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="monthNumber" label="月份">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="allTotalOtherFeevalue" label="总金额">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="invoicCommissionFeevalue" label="已开票">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="noInvoicCommissionFeevalue" label="未开票">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="handleMonth(scope.row)" type="primary" size="small">当月开票</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button size="small" @click="myDialogVisible = false">取 消</el-button>
|
|
|
</span>
|
|
|
@@ -143,7 +98,7 @@ import yearMonthYay from '../../PlatformSettlement/yearMonthYay.vue'
|
|
|
|
|
|
export default {
|
|
|
name: "baosi",
|
|
|
- components: { templateTable,yearMonthYay },
|
|
|
+ components: { templateTable, yearMonthYay },
|
|
|
created() {
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -153,40 +108,40 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- myDialogVisible:false,
|
|
|
- yeartsStart:'',
|
|
|
- tableDataYear:[],
|
|
|
- multipleSelection:[],
|
|
|
- yeartsEnd:'',
|
|
|
+ myDialogVisible: false,
|
|
|
+ yeartsStart: '',
|
|
|
+ tableDataYear: [],
|
|
|
+ multipleSelection: [],
|
|
|
+ yeartsEnd: '',
|
|
|
startDatePicker: this.beginDate(),
|
|
|
- endDatePicker: this.processDate(),
|
|
|
- isSingle:'1',
|
|
|
+ endDatePicker: this.processDate(),
|
|
|
+ isSingle: '1',
|
|
|
year: '',
|
|
|
searchData: {},
|
|
|
- options:[{
|
|
|
+ options: [{
|
|
|
label: "保司开票",
|
|
|
value: "0",
|
|
|
- },{
|
|
|
+ }, {
|
|
|
label: "掌柜开票",
|
|
|
value: "1",
|
|
|
}],
|
|
|
formList: [
|
|
|
- {
|
|
|
- label: "保险公司",
|
|
|
- prop: "companyName",
|
|
|
- type: "company",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "合作公司名称",
|
|
|
- prop: "partnerCompaniesName",
|
|
|
- type: "input",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "年月日",
|
|
|
- name: "data",
|
|
|
- type: "slot",
|
|
|
- },
|
|
|
- ],
|
|
|
+ {
|
|
|
+ label: "保险公司",
|
|
|
+ prop: "companyName",
|
|
|
+ type: "company",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "合作公司名称",
|
|
|
+ prop: "partnerCompaniesName",
|
|
|
+ type: "input",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "年月日",
|
|
|
+ name: "data",
|
|
|
+ type: "slot",
|
|
|
+ },
|
|
|
+ ],
|
|
|
tableConfig: {
|
|
|
columns: [
|
|
|
{
|
|
|
@@ -209,7 +164,7 @@ export default {
|
|
|
label: "未开票跟单费",
|
|
|
type: "text"
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
],
|
|
|
loading: true,
|
|
|
isPaginationShow: true,
|
|
|
@@ -218,8 +173,8 @@ export default {
|
|
|
{
|
|
|
type: 'primary',
|
|
|
label: '开票',
|
|
|
- hide:(row)=>{
|
|
|
- if(row.otherFeevalue-row.invoicCommissionFeevalue>0){
|
|
|
+ hide: (row) => {
|
|
|
+ if (row.otherFeevalue - row.invoicCommissionFeevalue > 0) {
|
|
|
return true
|
|
|
}
|
|
|
},
|
|
|
@@ -230,9 +185,9 @@ export default {
|
|
|
tableData: [],
|
|
|
formData: {},
|
|
|
InvoicingData: {
|
|
|
- invoicingMethod:'0'
|
|
|
+ invoicingMethod: '0'
|
|
|
},
|
|
|
- formDataList:{},
|
|
|
+ formDataList: {},
|
|
|
dialogVisible: false,
|
|
|
pageData: {
|
|
|
pageNum: 1,
|
|
|
@@ -240,18 +195,18 @@ export default {
|
|
|
agreementType: 2,
|
|
|
isNotCar: '0',
|
|
|
isNotDocumentary: '1'
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
rules: {
|
|
|
contractId: [
|
|
|
- { required: true, message: '请输入开票号', trigger: 'blur' },
|
|
|
- ],
|
|
|
- settlementAmount: [
|
|
|
- { required: true, message: '请输入开票金额', trigger: 'blur' },
|
|
|
- ],
|
|
|
- invoicingMethod: [
|
|
|
- { required: true, message: '请输入开票方式', trigger: 'blur' },
|
|
|
- ],
|
|
|
+ { required: true, message: '请输入开票号', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ settlementAmount: [
|
|
|
+ { required: true, message: '请输入开票金额', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ invoicingMethod: [
|
|
|
+ { required: true, message: '请输入开票方式', trigger: 'blur' },
|
|
|
+ ],
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
@@ -260,21 +215,21 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
handleSelectionChange(val) {
|
|
|
- this.multipleSelection = val;
|
|
|
- },
|
|
|
- handleMerge(){
|
|
|
- this.dialogVisible =true
|
|
|
- this.isSingle='2'
|
|
|
- this.InvoicingData={
|
|
|
- invoicingMethod:'0'
|
|
|
+ this.multipleSelection = val;
|
|
|
+ },
|
|
|
+ handleMerge() {
|
|
|
+ this.dialogVisible = true
|
|
|
+ this.isSingle = '2'
|
|
|
+ this.InvoicingData = {
|
|
|
+ invoicingMethod: '0'
|
|
|
}
|
|
|
},
|
|
|
- handleMonth(row){
|
|
|
+ handleMonth(row) {
|
|
|
this.multipleSelection = [row];
|
|
|
- this.dialogVisible =true
|
|
|
- this.isSingle='1'
|
|
|
- this.InvoicingData={
|
|
|
- invoicingMethod:'0'
|
|
|
+ this.dialogVisible = true
|
|
|
+ this.isSingle = '1'
|
|
|
+ this.InvoicingData = {
|
|
|
+ invoicingMethod: '0'
|
|
|
}
|
|
|
},
|
|
|
beginDate() {
|
|
|
@@ -298,14 +253,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- getYearData(val){
|
|
|
- this.formData.year=val
|
|
|
+ getYearData(val) {
|
|
|
+ this.formData.year = val
|
|
|
},
|
|
|
- getMonthData(val){
|
|
|
- this.formData.month=val
|
|
|
+ getMonthData(val) {
|
|
|
+ this.formData.month = val
|
|
|
},
|
|
|
- getDayData(val){
|
|
|
- this.formData.day=val
|
|
|
+ getDayData(val) {
|
|
|
+ this.formData.day = val
|
|
|
},
|
|
|
// 查询
|
|
|
handleSearchList(data) {
|
|
|
@@ -315,47 +270,47 @@ export default {
|
|
|
findPage(data) {
|
|
|
this.tableConfig.loading = true;
|
|
|
this.$api.task
|
|
|
- .allOtherAmount({...this.pageData,...data,...this.formData})
|
|
|
+ .allOtherAmount({ ...this.pageData, ...data, ...this.formData })
|
|
|
.then(res => {
|
|
|
- if (res.code==200) {
|
|
|
- this.tableData = res.data?res.data:[]
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.tableData = res.data ? res.data : []
|
|
|
this.tableConfig.loading = false;
|
|
|
}
|
|
|
else {
|
|
|
- this.$message.error(res.msg)
|
|
|
- }
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
closdialogVisible() {
|
|
|
this.dialogVisible = false;
|
|
|
- this.multipleSelection=[]
|
|
|
+ this.multipleSelection = []
|
|
|
this.$refs.multipleTable.clearSelection();
|
|
|
|
|
|
},
|
|
|
myClosdialogVisible() {
|
|
|
this.myDialogVisible = false;
|
|
|
},
|
|
|
- handleQuery(){
|
|
|
+ handleQuery() {
|
|
|
this.otherTimeDetail(this.formDataList)
|
|
|
},
|
|
|
// 开票
|
|
|
openBalanceFun(row) {
|
|
|
- this.myDialogVisible=true
|
|
|
+ this.myDialogVisible = true
|
|
|
this.otherTimeDetail(row)
|
|
|
- this.formDataList=row
|
|
|
+ this.formDataList = row
|
|
|
},
|
|
|
- otherTimeDetail(row){
|
|
|
- let data={
|
|
|
- partnerCompaniesId:row.partnerCompaniesId,
|
|
|
- agreementType:2,
|
|
|
- isNotCar:0,
|
|
|
- isNotDocumentary:1,
|
|
|
- yeartsStart:this.yeartsStart,
|
|
|
- yeartsEnd:this.yeartsEnd,
|
|
|
+ otherTimeDetail(row) {
|
|
|
+ let data = {
|
|
|
+ partnerCompaniesId: row.partnerCompaniesId,
|
|
|
+ agreementType: 2,
|
|
|
+ isNotCar: 0,
|
|
|
+ isNotDocumentary: 1,
|
|
|
+ yeartsStart: this.yeartsStart,
|
|
|
+ yeartsEnd: this.yeartsEnd,
|
|
|
}
|
|
|
this.$api.task.otherTimeDetail(data).then(res => {
|
|
|
- if (res.code == "200") {
|
|
|
- this.tableDataYear=res.data
|
|
|
+ if (res.code == "200") {
|
|
|
+ this.tableDataYear = res.data
|
|
|
}
|
|
|
else {
|
|
|
this.$message.error(res.msg)
|
|
|
@@ -365,25 +320,43 @@ export default {
|
|
|
submit(formData) {
|
|
|
this.$refs[formData].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- let data={
|
|
|
- ...this.formDataList,...this.InvoicingData,isNotCar:0,handlingFeesStatus:'1',
|
|
|
- yeartsStart:this.yeartsStart,
|
|
|
- yeartsEnd:this.yeartsEnd,
|
|
|
- multipleSelection:this.multipleSelection
|
|
|
+ let data = {
|
|
|
+ ...this.formDataList, ...this.InvoicingData, isNotCar: 0, handlingFeesStatus: '1',
|
|
|
+ yeartsStart: this.yeartsStart,
|
|
|
+ yeartsEnd: this.yeartsEnd,
|
|
|
+ multipleSelection: this.multipleSelection
|
|
|
+ }
|
|
|
+ if (this.isSingle == '2') {
|
|
|
+ this.$api.task.singleInvoic(data).then(res => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg || '操作成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.otherTimeDetail(this.formDataList)
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$api.task.batchInvoic(data).then(res => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg || '操作成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.otherTimeDetail(this.formDataList)
|
|
|
}
|
|
|
- this.$api.task.batchInvoic(data).then(res => {
|
|
|
- if (res.code == "200") {
|
|
|
- this.$message({
|
|
|
- message: res.msg ||'操作成功',
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- this.dialogVisible = false
|
|
|
- this.otherTimeDetail(this.formDataList)
|
|
|
- }
|
|
|
- else {
|
|
|
- this.$message.error(res.msg)
|
|
|
- }
|
|
|
- });
|
|
|
+ else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
|
@@ -397,7 +370,7 @@ export default {
|
|
|
this.pageData.pageNum = val;
|
|
|
this.findPage();
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|