|
|
@@ -24,6 +24,7 @@
|
|
|
<el-button type="primary" size="mini" icon="el-icon-search" @click="handleSearch">获取账单</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
+ <el-button type="primary" size="mini" @click="invoiceDialog" v-if="entityList && entityList.length > 0">修改发票信息</el-button>
|
|
|
<el-button type="primary" size="mini" style="margin-right: 15px" @click="printBtn">打印</el-button>
|
|
|
<el-button type="primary" plain title="查看详情" size="mini" v-if="entityList && entityList.length > 0" :loading="sureLoading" @click="BillSureClickConfirm">确认交费单</el-button>
|
|
|
</el-form-item>
|
|
|
@@ -34,13 +35,14 @@
|
|
|
<el-row>
|
|
|
<el-col :span="6" class="table-cell-title">单位名称</el-col>
|
|
|
<el-col :span="6" class="table-cell-title">税号</el-col>
|
|
|
- <el-col :span="12" class="table-cell-title">注册地址</el-col>
|
|
|
+ <el-col :span="12" class="table-cell-title">开票地址</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<el-row>
|
|
|
<el-col :span="6" class="table-cell" :title="formDataSup.SupplierName">{{this.formDataSup.SupplierName}}</el-col>
|
|
|
<el-col :span="6" class="table-cell">{{this.formDataSup.CommercialNo}}</el-col>
|
|
|
- <el-col :span="12" class="table-cell">{{this.formDataSup.AllAddress}} {{this.formDataSup.Address}}</el-col>
|
|
|
+ <el-col :span="12" class="table-cell" v-if="this.formDataSup.InvoiceAddress === ''">{{this.formDataSup.AllAddress}} {{this.formDataSup.Address}}</el-col>
|
|
|
+ <el-col :span="12" class="table-cell" v-else>{{this.formDataSup.InvoiceAddress}}</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="6" class="table-cell-title">开户银行</el-col>
|
|
|
@@ -111,6 +113,52 @@
|
|
|
</el-table>
|
|
|
</el-card>
|
|
|
|
|
|
+ <el-dialog title="修改发票信息" :visible.sync="updateVisible">
|
|
|
+ <el-form label-width="100px" ref="updateFormData" :rules="rules" :model="formDataSupCopy" size="small">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="单位名称" label-width="100px" style="width: 100%" prop="SupplierName">
|
|
|
+ <el-input v-model="formDataSupCopy.SupplierName" readonly></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="税号" label-width="100px" style="width: 100%" prop="CommercialNo">
|
|
|
+ <el-input v-model="formDataSupCopy.CommercialNo" readonly></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="开票地址" label-width="100px" style="width: 100%" prop="InvoiceAddress">
|
|
|
+ <el-input v-model="formDataSupCopy.InvoiceAddress"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="开户银行" label-width="100px" style="width: 100%" prop="DepositBank">
|
|
|
+ <el-input v-model="formDataSupCopy.DepositBank"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="银行账号" label-width="100px" style="width: 100%" prop="BankAccount">
|
|
|
+ <el-input v-model="formDataSupCopy.BankAccount"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="财务电话" label-width="100px" style="width: 100%" prop="CompanyTel">
|
|
|
+ <el-input v-model="formDataSupCopy.CompanyTel"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="电子邮箱" label-width="100px" style="width: 100%" prop="EMail">
|
|
|
+ <el-input v-model="formDataSupCopy.EMail"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="margin-top: -25px">
|
|
|
+ <el-button size="mini" @click="updateVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="updateInvoice">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<el-dialog
|
|
|
title="打印内容"
|
|
|
:visible.sync="dialogVisible"
|
|
|
@@ -134,7 +182,8 @@
|
|
|
<div class="table-cell-title2">地址、财务电话:</div>
|
|
|
</el-col>
|
|
|
<el-col :span="16">
|
|
|
- <div class="table-cell2">{{this.formDataSup.AllAddress}} {{this.formDataSup.Address}} {{this.formDataSup.CompanyTel}}</div>
|
|
|
+ <div class="table-cell2" v-if="this.formDataSup.InvoiceAddress === ''">{{this.formDataSup.AllAddress}} {{this.formDataSup.Address}} {{this.formDataSup.CompanyTel}}</div>
|
|
|
+ <div class="table-cell2" v-else>{{this.formDataSup.InvoiceAddress}} {{this.formDataSup.CompanyTel}}</div>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<div class="table-cell-title2">开户行及账号:</div>
|
|
|
@@ -164,6 +213,7 @@
|
|
|
mapGetters
|
|
|
} from 'vuex'
|
|
|
import api from '@/api/oilsupplier/paymentinfo'
|
|
|
+ import supplierApi from '@/api/oilsupplier/supplier'
|
|
|
|
|
|
export default {
|
|
|
computed: {
|
|
|
@@ -174,9 +224,48 @@
|
|
|
name: 'paymentinfoEdit',
|
|
|
|
|
|
data () {
|
|
|
+ var checkEmail = (rule, value, callback) => {
|
|
|
+ if (value) {
|
|
|
+ let re = /^([a-zA-Z0-9]+[_|-|.|-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|-|.|-]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/
|
|
|
+ if (!re.test(value)) {
|
|
|
+ callback(new Error('请输入正确的邮箱地址'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var checkBankAccount = (rule, value, callback) => {
|
|
|
+ if (value === '') {
|
|
|
+ callback(new Error('请输入银行账号'))
|
|
|
+ } else {
|
|
|
+ if (value.length < 9) {
|
|
|
+ callback(new Error('请填写正确位数的银行账号'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
dialogVisible: false,
|
|
|
+ updateVisible: false,
|
|
|
serviceId: '',
|
|
|
+ rules: {
|
|
|
+ SupplierName: [{required: true, message: '公司名称不能为空', trigger: 'blur'}],
|
|
|
+ CommercialNo: [{required: true, message: '税号不能为空', trigger: 'blur'}],
|
|
|
+ InvoiceAddress: [{required: true, message: '地址不能为空', trigger: 'blur'}],
|
|
|
+ CompanyTel: [{required: true, message: '财务电话不能为空', trigger: 'blur'}],
|
|
|
+ EMail: [
|
|
|
+ {required: true, message: '电子邮箱不能为空', trigger: 'blur'},
|
|
|
+ {required: true, validator: checkEmail, trigger: 'change'}
|
|
|
+ ],
|
|
|
+ DepositBank: [{required: true, message: '开户行不能为空', trigger: 'blur'}],
|
|
|
+ BankAccount: [
|
|
|
+ {required: true, message: '银行账号不能为空', trigger: 'blur'},
|
|
|
+ {required: true, validator: checkBankAccount, trigger: 'change'}
|
|
|
+ ]
|
|
|
+ },
|
|
|
entityList: [],
|
|
|
entityList2: [],
|
|
|
amount1: 0,
|
|
|
@@ -196,6 +285,16 @@
|
|
|
formDataSup: {},
|
|
|
searchForm: {
|
|
|
commercialNo: ''
|
|
|
+ },
|
|
|
+ formDataSupCopy: {
|
|
|
+ SupplierName: '',
|
|
|
+ Id: '',
|
|
|
+ CommercialNo: '',
|
|
|
+ InvoiceAddress: '',
|
|
|
+ DepositBank: '',
|
|
|
+ BankAccount: '',
|
|
|
+ CompanyTel: '',
|
|
|
+ EMail: '',
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -207,6 +306,42 @@
|
|
|
handleSearch () {
|
|
|
this.initDatas()
|
|
|
},
|
|
|
+ invoiceDialog () {
|
|
|
+ this.updateVisible = true
|
|
|
+ this.formDataSupCopy.SupplierName = this.formDataSup.SupplierName
|
|
|
+ this.formDataSupCopy.Id = this.formDataSup.Id
|
|
|
+ this.formDataSupCopy.CommercialNo = this.formDataSup.CommercialNo
|
|
|
+ this.formDataSupCopy.InvoiceAddress = this.formDataSup.InvoiceAddress === '' ? this.formDataSup.AllAddress + this.formDataSup.Address : this.formDataSup.InvoiceAddress
|
|
|
+ this.formDataSupCopy.DepositBank = this.formDataSup.DepositBank
|
|
|
+ this.formDataSupCopy.BankAccount = this.formDataSup.BankAccount
|
|
|
+ this.formDataSupCopy.CompanyTel = this.formDataSup.CompanyTel
|
|
|
+ this.formDataSupCopy.EMail = this.formDataSup.EMail
|
|
|
+ },
|
|
|
+ updateInvoice () {
|
|
|
+ console.log('修改发票信息')
|
|
|
+ this.$refs["updateFormData"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ supplierApi.updateInvoiceInfo(this.formDataSupCopy, this.$axios).then(res => {
|
|
|
+ this.initDatas()
|
|
|
+ this.updateVisible = false
|
|
|
+ let type = 'success'
|
|
|
+ if (res.data.code === -1) {
|
|
|
+ type = 'warning'
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ duration: 10000,
|
|
|
+ type: type,
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
NoChange (val) {
|
|
|
let obj = {}
|
|
|
obj = this.NoOptions.find((item) => {
|