|
@@ -136,7 +136,10 @@
|
|
|
{required: true, message:'电话不能为空', trigger:'blur'},{required: true, message:'电话不能为空', trigger:'change'}
|
|
|
]">
|
|
|
<el-input v-model="inputForm.telPhone" :readonly="commonJS.isNotEmpty(inputForm.billingId)" placeholder="请填写电话">
|
|
|
- <el-button slot="append" icon="el-icon-search" @click="openBillingChoose()"></el-button>
|
|
|
+ <template #append>
|
|
|
+ <el-button icon="el-icon-search" @click="openBillingChoose()"></el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -301,7 +304,7 @@
|
|
|
<el-date-picker
|
|
|
v-model="inputForm.billingDate"
|
|
|
type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
placeholder="选择开票时间"
|
|
|
style="width:100%"
|
|
|
:disabled="status !== 'audit'"
|
|
@@ -317,7 +320,7 @@
|
|
|
<el-date-picker
|
|
|
v-model="inputForm.billingDate"
|
|
|
type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
placeholder="选择开票时间"
|
|
|
style="width:100%"
|
|
|
:disabled="status !== 'audit'"
|
|
@@ -333,7 +336,7 @@
|
|
|
<el-date-picker
|
|
|
v-model="inputForm.collectDate"
|
|
|
type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
placeholder="选择领票时间"
|
|
|
style="width:100%"
|
|
|
:disabled="status !== 'audit'"
|
|
@@ -477,12 +480,12 @@
|
|
|
:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
|
|
|
>
|
|
|
<vxe-table-column field="code" title="发票代码" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
+ <template #edit="scope">
|
|
|
<el-input v-model="scope.row.code" placeholder="请填写发票代码"/>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="number" title="发票号" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
+ <template #edit="scope">
|
|
|
<el-input
|
|
|
oninput ="value=value.replace(/\D|^/g,'')"
|
|
|
placeholder="请填写发票号"
|
|
@@ -494,7 +497,7 @@
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="account" title="开票金额(元)" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
+ <template #edit="scope">
|
|
|
<el-input-number
|
|
|
@blur="checkAccount(scope.row,scope.$rowIndex)"
|
|
|
v-model="scope.row.account"
|
|
@@ -510,7 +513,7 @@
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="rate" title="税率(%)" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
+ <template #edit="scope">
|
|
|
<el-input-number
|
|
|
@blur="checkRate(scope.row, scope.$rowIndex)"
|
|
|
v-model="scope.row.rate"
|
|
@@ -526,17 +529,17 @@
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="amount" title="金额" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
+ <template #edit="scope">
|
|
|
<el-input :readonly="true" v-model="scope.row.amount" placeholder="请填写金额"/>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="tax" title="税额" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
+ <template #edit="scope">
|
|
|
<el-input :readonly="true" v-model="scope.row.tax" placeholder="请填写税额"/>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="allAmount" title="累计登记金额" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
+ <template #edit="scope">
|
|
|
<el-input-number
|
|
|
v-model="scope.row.allAmount"
|
|
|
controls-position="right"
|
|
@@ -836,8 +839,8 @@
|
|
|
if (!this.commonJS.isEmpty(this.inputForm.billingWorkplaceRealId)) {
|
|
|
this.bankList = []
|
|
|
workClientService.queryById(this.inputForm.billingWorkplaceRealId).then((data) => {
|
|
|
- if (this.commonJS.isNotEmpty(data.data.cwWorkClientBillingDTOList)) {
|
|
|
- data.data.cwWorkClientBillingDTOList.forEach(i => {
|
|
|
+ if (this.commonJS.isNotEmpty(data.cwWorkClientBillingDTOList)) {
|
|
|
+ data.cwWorkClientBillingDTOList.forEach(i => {
|
|
|
i.ourBank = i.accountHolder
|
|
|
this.bankList.push(i)
|
|
|
})
|
|
@@ -948,6 +951,7 @@
|
|
|
},
|
|
|
// 表单提交
|
|
|
async doSubmit (status, callback) {
|
|
|
+ console.log('this.inputForm.financeInvoiceDetailDTOList', this.inputForm.financeInvoiceDetailDTOList)
|
|
|
this.loading = true
|
|
|
if (await this.$refs.uploadComponent.checkProgress()) {
|
|
|
this.loading = false
|
|
@@ -1142,7 +1146,9 @@
|
|
|
if (type === 'detail') {
|
|
|
this.$refs.detailTable.insert().then((data) => {
|
|
|
this.inputForm.financeInvoiceDetailDTOList.push(data)
|
|
|
+ this.detailKey = Math.random()
|
|
|
})
|
|
|
+ console.log('this.inputForm.financeInvoiceDetailDTOList', this.inputForm.financeInvoiceDetailDTOList)
|
|
|
}
|
|
|
if (type === 'receivables') {
|
|
|
this.$refs.receivablesTable.insert().then((data) => {
|
|
@@ -1383,7 +1389,7 @@
|
|
|
this.loading = true
|
|
|
financeInvoiceService.exportTemplate().then((res) => {
|
|
|
// 将二进制流文件写入excel表,以下为重要步骤
|
|
|
- this.$utils.downloadExcel(res.data, '发票明细导入模板')
|
|
|
+ this.$utils.downloadExcel(res, '发票明细导入模板')
|
|
|
this.loading = false
|
|
|
}).catch(function (err) {
|
|
|
this.loading = false
|
|
@@ -1398,6 +1404,7 @@
|
|
|
this.getAmount(item)
|
|
|
this.getTax(item)
|
|
|
this.inputForm.financeInvoiceDetailDTOList.push(item)
|
|
|
+ this.detailKey = Math.random()
|
|
|
})
|
|
|
}
|
|
|
this.$message.success('导入完成')
|
|
@@ -1407,12 +1414,12 @@
|
|
|
formBody.append('file', file.raw)
|
|
|
this.loading = true
|
|
|
financeInvoiceService.importDetail(formBody).then(async (result) => {
|
|
|
- if (this.commonJS.isEmpty(result.data)) {
|
|
|
+ if (this.commonJS.isEmpty(result)) {
|
|
|
this.importVisible = false
|
|
|
this.loading = false
|
|
|
throw new Error()
|
|
|
}
|
|
|
- for await (let item of result.data) {
|
|
|
+ for await (let item of result) {
|
|
|
this.inputForm.financeInvoiceDetailDTOList.forEach(detail => {
|
|
|
if (item.number === detail.number) {
|
|
|
this.$message.error('上传的文件中存在与页面重复的发票号,请重新填写后上传')
|
|
@@ -1422,7 +1429,7 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- await this.detailPush(result.data)
|
|
|
+ await this.detailPush(result)
|
|
|
this.importVisible = false
|
|
|
this.loading = false
|
|
|
}).catch(() => {
|
|
@@ -1442,12 +1449,12 @@
|
|
|
formBody.append('file', file.raw)
|
|
|
this.loading = true
|
|
|
financeInvoiceService.importDetail(formBody).then(async result => {
|
|
|
- if (this.commonJS.isEmpty(result.data)) {
|
|
|
+ if (this.commonJS.isEmpty(result)) {
|
|
|
this.importVisible = false
|
|
|
this.loading = false
|
|
|
throw new Error()
|
|
|
}
|
|
|
- for await (let item of result.data) {
|
|
|
+ for await (let item of result) {
|
|
|
await this.inputForm.financeInvoiceDetailDTOList.forEach(detail => {
|
|
|
if (item.number === detail.number) {
|
|
|
this.$message.error('上传的文件中存在与页面重复的发票号,请重新填写后上传')
|
|
@@ -1457,7 +1464,7 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- this.detailPushCode(result.data)
|
|
|
+ this.detailPushCode(result)
|
|
|
this.importVisible = false
|
|
|
this.loading = false
|
|
|
}).catch(() => {
|
|
@@ -1473,6 +1480,7 @@
|
|
|
this.getAmount(item)
|
|
|
this.getTax(item)
|
|
|
this.inputForm.financeInvoiceDetailDTOList.push(item)
|
|
|
+ this.detailKey = Math.random()
|
|
|
}
|
|
|
}
|
|
|
})
|