|
|
@@ -5,9 +5,12 @@
|
|
|
<el-input v-model="queryParams.refundTitle" placeholder="请输入回款标题" clearable style="width: 250px"
|
|
|
@keyup.enter.native="handleQuery" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="客户名称" prop="customerName">
|
|
|
- <el-input v-model="queryParams.customerName" placeholder="请输入客户名称" clearable style="width: 250px"
|
|
|
- @keyup.enter.native="handleQuery" />
|
|
|
+ <el-form-item label="客户名称" prop="customerId">
|
|
|
+ <el-select v-model="queryParams.customerId" placeholder="请选择客户名称" style="width: 250px">
|
|
|
+ <el-option v-for="item in customerList" :key="item.id" :label="item.customerName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="合同名称" prop="contractName">
|
|
|
<el-input v-model="queryParams.contractName" placeholder="请输入合同名称" clearable style="width: 250px"
|
|
|
@@ -44,7 +47,7 @@
|
|
|
<el-table-column label="回款标题" align="center" prop="refundTitle" min-width="150" />
|
|
|
<!-- <el-table-column label="回款编号" align="center" prop="refundInfoUuid" min-width="100" /> -->
|
|
|
<el-table-column label="客户名称" align="center" prop="customerName" min-width="100" />
|
|
|
- <el-table-column label="合同名称" align="center" prop="contactNumber" min-width="100" />
|
|
|
+ <el-table-column label="合同名称" align="center" prop="contractName" min-width="100" />
|
|
|
<el-table-column label="回款日期" align="center" prop="refundDate" min-width="100" />
|
|
|
<el-table-column label="回款金额" align="center" prop="refundMoney" min-width="100" />
|
|
|
<el-table-column label="创建人" align="center" prop="creatorName" min-width="80" />
|
|
|
@@ -78,18 +81,18 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="客户名称" prop="customerId">
|
|
|
- <el-select v-model="form.customerId" placeholder="请选择" style="width: 100%;">
|
|
|
- <el-option v-for="item in this.getDictDatas(DICT_TYPE.SYSTEM_USER_TYPE)" :key="item.value"
|
|
|
- :label="item.label" :value="item.value">
|
|
|
+ <el-select v-model="form.customerId" placeholder="请选择" style="width: 100%;" @change="getListSimpleCustomerContract()">
|
|
|
+ <el-option v-for="item in customerList" :key="item.id" :label="item.customerName"
|
|
|
+ :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="合同名称" prop="contractId">
|
|
|
- <el-select v-model="form.contractId" placeholder="请选择" style="width: 100%;">
|
|
|
- <el-option v-for="item in this.getDictDatas(DICT_TYPE.SYSTEM_USER_TYPE)" :key="item.value"
|
|
|
- :label="item.label" :value="item.value">
|
|
|
+ <el-select v-model="form.contractId" placeholder="请选择" style="width: 100%;" @change="handleChange">
|
|
|
+ <el-option v-for="item in customerContractList" :key="item.id"
|
|
|
+ :label="item.customerContractName" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
@@ -245,6 +248,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { listSimpleCustomer } from "@/api/crm/customer";
|
|
|
+ import { listSimpleCustomerContract } from "@/api/finance/contract/customer";
|
|
|
import { listSimplePosts } from "@/api/system/post";
|
|
|
import { listRefundInfo, getRefundInfo, delRefundInfo, addRefundInfo, updateRefundInfo, exportRefundInfo } from "@/api/finance/cash/refundInfo";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
@@ -258,6 +263,8 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ customerList: [],
|
|
|
+ customerContractList: [],
|
|
|
files: [],
|
|
|
// 设置上传的请求头部
|
|
|
headers: getBaseHeader(),
|
|
|
@@ -286,7 +293,7 @@
|
|
|
pageNo: 1,
|
|
|
pageSize: 10,
|
|
|
refundTitle: undefined,
|
|
|
- customerName: undefined,
|
|
|
+ customerId: undefined,
|
|
|
contractName: undefined,
|
|
|
creatorName: undefined,
|
|
|
refundDate: [],
|
|
|
@@ -321,8 +328,32 @@
|
|
|
created() {
|
|
|
this.getList();
|
|
|
this.getListDept();
|
|
|
+ this.getListSimpleCustomer();
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleChange(val){
|
|
|
+ this.customerContractList.map(item => {
|
|
|
+ if(item.id === val){
|
|
|
+ this.form.contractCode = item.customerContractCode;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getListSimpleCustomerContract(val) {
|
|
|
+ let customerId = undefined
|
|
|
+ if(val){
|
|
|
+ customerId = val
|
|
|
+ }else{
|
|
|
+ customerId = this.form.customerId
|
|
|
+ }
|
|
|
+ listSimpleCustomerContract({ customerId: customerId }).then(response => {
|
|
|
+ this.customerContractList = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getListSimpleCustomer() {
|
|
|
+ listSimpleCustomer({ isOpen: 0 }).then(response => {
|
|
|
+ this.customerList = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
handleRemove(file, fileList) {
|
|
|
console.log(file, fileList);
|
|
|
let fileIds = [];
|
|
|
@@ -444,6 +475,7 @@
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
const id = row.id;
|
|
|
+ this.getListSimpleCustomerContract(row.customerId);
|
|
|
getRefundInfo(id).then(response => {
|
|
|
let files = response.data.fileList;
|
|
|
if (files) {
|