|
|
@ -148,9 +148,49 @@ |
|
|
|
<el-dialog :visible.sync="dialogUrlVisible" :append-to-body="true"> |
|
|
|
<img width="100%" :src="dialogUrl" alt=""> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog :visible.sync="dialogVisible" width="50%" center :show-close="false"> |
|
|
|
<el-dialog :visible.sync="dialogVisible" width="60%" center :show-close="false"> |
|
|
|
<el-form ref="form_obj" :rules="rules" :model="formobj" class="formadd"> |
|
|
|
<el-row style="border-top: 1px solid #e0e3eb"> |
|
|
|
<el-col :span="4"> |
|
|
|
<span><span class="icon">*</span>收款单位名称</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop="receiveCompany"> |
|
|
|
<el-select v-model="formobj.receiveCompany" placeholder="请选择" @change="changerRceiveCompany" clearable> |
|
|
|
<el-option v-for="item in receiveCompany_list" :key="item.sid" :label="item.name" :value="item.name"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<span><span class="icon">*</span>收款银行账号</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop="receiveBankAccount"> |
|
|
|
<el-select v-model="formobj.receiveBankAccount" placeholder="请选择" @change="changeReceiveBankAccount" clearable> |
|
|
|
<el-option v-for="item in receiveBankAccount_list" :key="item.receiveBankAccount" :label="item.receiveBankAccount" :value="item.receiveBankAccount"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4"> |
|
|
|
<span>收款账户开户行</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
<span>{{ formobj.receiveBank }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<span><span class="icon">*</span>付款金额</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop="cost"> |
|
|
|
<el-input v-model="formobj.cost" clearable placeholder="" class="addinputw" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4"> |
|
|
|
<span><span class="icon">*</span>付款方式</span> |
|
|
|
</el-col> |
|
|
@ -225,12 +265,12 @@ import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import upload from '@/components/uploadFile/upload' |
|
|
|
import { typeValues, selectAccountByUseOrgSid } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import { typeValues, selectAccountByUseOrgSid, getDetailsList, getPathSidByUserSid, getBankList } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import req from '@/api/anruifinmanagement/chunafukuan/cashier' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'cashier', |
|
|
|
name: 'Cashier', |
|
|
|
components: { |
|
|
|
Pagination, |
|
|
|
pageye, |
|
|
@ -302,6 +342,8 @@ export default { |
|
|
|
costType_list: [], |
|
|
|
costTitle_list: [], |
|
|
|
payWay_list: [], |
|
|
|
receiveCompany_list: [], |
|
|
|
receiveBankAccount_list: [], |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
listQuery: { |
|
|
@ -327,13 +369,21 @@ export default { |
|
|
|
payWayKey: '', |
|
|
|
payWayValue: '', |
|
|
|
sids: [], |
|
|
|
userSid: '' |
|
|
|
userSid: '', |
|
|
|
receiveCompany: '', // 供应商名称 |
|
|
|
receiveBank: '', // 收款银行名称 |
|
|
|
receiveBankAccount: '', // 收款银行账号 |
|
|
|
payCode: '', // 供应商编码 |
|
|
|
cost: '' |
|
|
|
}, |
|
|
|
imgList: [], |
|
|
|
rules: { |
|
|
|
payWayValue: [{ required: true, message: '请选择付款方式', trigger: 'change' }], |
|
|
|
payDate: [{ required: true, message: '请选择付款日期', trigger: 'blur' }], |
|
|
|
payBankAccount: [{ required: true, message: '请选择付款账号', trigger: 'change' }] |
|
|
|
payBankAccount: [{ required: true, message: '请选择付款账号', trigger: 'change' }], |
|
|
|
receiveCompany: [{ required: true, message: '收款单位不能为空', trigger: 'change' }], |
|
|
|
receiveBankAccount: [{ required: true, message: '收款银行账号不能为空', trigger: 'change' }], |
|
|
|
cost: [{ required: true, message: '付款金额不能为空', trigger: 'blur' }] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -394,6 +444,15 @@ export default { |
|
|
|
this.payBankAccount_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
getDetailsList({ orgSid: res.data }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.receiveCompany_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
changePayBankAccount(value) { |
|
|
@ -414,7 +473,10 @@ export default { |
|
|
|
const bb = [] |
|
|
|
row.forEach(element => { |
|
|
|
aa.push(element.sid) |
|
|
|
bb.push(element.state) |
|
|
|
bb.push({ |
|
|
|
state: element.state, |
|
|
|
receiveBankAccount: element.receiveBankAccount |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
this.nodeState_list = bb |
|
|
@ -475,6 +537,19 @@ export default { |
|
|
|
}) |
|
|
|
this.formobj.payWayKey = bb.key |
|
|
|
}, |
|
|
|
changerRceiveCompany(value) { |
|
|
|
const choose = this.receiveCompany_list.filter((item) => item.name === value) |
|
|
|
this.formobj.payCode = choose[0].payCode |
|
|
|
getBankList({ sid: choose[0].sid }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.receiveBankAccount_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeReceiveBankAccount(value) { |
|
|
|
const choose = this.receiveBankAccount_list.filter((item) => item.receiveBankAccount === value) |
|
|
|
this.formobj.receiveBank = choose[0].receiveBank |
|
|
|
}, |
|
|
|
handleGetCheck(row) { |
|
|
|
this.dialogImgVisible = true |
|
|
|
this.url_list = row.payFiles |
|
|
@ -533,6 +608,10 @@ export default { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['form_obj'].clearValidate() |
|
|
|
}) |
|
|
|
this.formobj.receiveCompany = row.receiveCompany |
|
|
|
this.formobj.receiveBankAccount = row.receiveBankAccount |
|
|
|
this.formobj.receiveBank = row.receiveBank |
|
|
|
this.formobj.payCode = row.payCode |
|
|
|
const aa = [] |
|
|
|
aa.push(row.sid) |
|
|
|
this.sids = aa |
|
|
@ -542,12 +621,17 @@ export default { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择至少一条以上记录进行批量处理' }) |
|
|
|
return |
|
|
|
} else { |
|
|
|
console.log(this.nodeState_list) |
|
|
|
if (this.nodeState_list.length > 0) { |
|
|
|
for (var i = 0; i < this.nodeState_list.length; i++) { |
|
|
|
if (this.nodeState_list[i] !== '未支付') { |
|
|
|
if (this.nodeState_list[i].state !== '未支付') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '因选择的记录中包含已支付的,操作失败' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.nodeState_list[i].receiveBankAccount !== this.nodeState_list[this.nodeState_list.length - 1].receiveBankAccount) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '因选择的记录中存在收款账号不一致的,操作失败' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['form_obj'].clearValidate() |
|
|
@ -604,7 +688,7 @@ export default { |
|
|
|
} |
|
|
|
if (this.nodeState_list.length > 0) { |
|
|
|
for (var i = 0; i < this.nodeState_list.length; i++) { |
|
|
|
if (this.nodeState_list[i] !== '未支付') { |
|
|
|
if (this.nodeState_list[i].state !== '未支付') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '因选择的记录中包含已支付的,操作失败' }) |
|
|
|
return |
|
|
|
} |
|
|
@ -645,7 +729,12 @@ export default { |
|
|
|
payWayKey: '', |
|
|
|
payWayValue: '', |
|
|
|
sids: [], |
|
|
|
userSid: '' |
|
|
|
userSid: '', |
|
|
|
receiveCompany: '', // 供应商名称 |
|
|
|
receiveBank: '', // 收款银行名称 |
|
|
|
receiveBankAccount: '', // 收款银行账号 |
|
|
|
payCode: '', // 供应商编码 |
|
|
|
cost: '' |
|
|
|
} |
|
|
|
this.diploma_list = [] |
|
|
|
this.$refs['form_obj'].resetFields() |
|
|
|