|
|
|
@ -180,7 +180,7 @@
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="往来单位简写"
|
|
|
|
|
prop="spell"
|
|
|
|
|
prop="pinyinCode"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
@ -188,8 +188,12 @@
|
|
|
|
|
prop="addr"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column label="状态" prop="status"></el-table-column>
|
|
|
|
|
<el-table-column label="类型" prop="type"></el-table-column>
|
|
|
|
|
<!--<el-table-column label="状态" prop="status"></el-table-column>-->
|
|
|
|
|
<el-table-column label="类型" prop="corpType">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ corpTypeMap[scope.row.corpType] }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
@ -256,7 +260,12 @@ export default {
|
|
|
|
|
9: "异常"
|
|
|
|
|
},
|
|
|
|
|
curIndex: "",
|
|
|
|
|
unitquery: {key: "", page: 1, limit: 10},
|
|
|
|
|
unitquery: {
|
|
|
|
|
key: "",
|
|
|
|
|
corpType: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
},
|
|
|
|
|
unitTotal: 0,
|
|
|
|
|
unitlist: [],
|
|
|
|
|
unitUpdateQuery: {
|
|
|
|
@ -288,7 +297,13 @@ export default {
|
|
|
|
|
formLoading: false,
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
formData: formJson,
|
|
|
|
|
deleteLoading: false
|
|
|
|
|
deleteLoading: false,
|
|
|
|
|
currentRowAction: null, //当前单据的单据类型
|
|
|
|
|
corpTypeMap: {
|
|
|
|
|
1: "客户",
|
|
|
|
|
2: "供应商",
|
|
|
|
|
4: "特殊往来"
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
@ -332,19 +347,8 @@ export default {
|
|
|
|
|
this.curIndex = row.id;
|
|
|
|
|
this.dialogTableVisible = true;
|
|
|
|
|
this.curOrderId = row.orderId;
|
|
|
|
|
getCorpType({action: row.action}).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.unitquery = {
|
|
|
|
|
key: "",
|
|
|
|
|
corpType: res.data,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
}
|
|
|
|
|
this.getUnitList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error("查询往来单位错误");
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.currentRowAction = row.action;
|
|
|
|
|
this.getUnitList();
|
|
|
|
|
},
|
|
|
|
|
closeDetailDialog(val) {
|
|
|
|
|
this.codeDetailVisible = false;
|
|
|
|
@ -358,23 +362,30 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
resetUnitQuery() {
|
|
|
|
|
this.unitlist = [];
|
|
|
|
|
this.unitquery = {key: "", page: 1, limit: 20};
|
|
|
|
|
this.getUnitList();
|
|
|
|
|
this.unitquery.key = "";
|
|
|
|
|
this.getUnitList(1);
|
|
|
|
|
},
|
|
|
|
|
getUnitList(page) {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
if (page != null) {
|
|
|
|
|
this.unitquery.page = 1;
|
|
|
|
|
}
|
|
|
|
|
unitListBykey(this.unitquery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.unitlist = response.data.list || [];
|
|
|
|
|
this.unitTotal = response.data.total || 0;
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
getCorpType({action: this.currentRowAction}).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.unitquery.corpType = res.data;
|
|
|
|
|
unitListBykey(this.unitquery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.unitlist = response.data.list || [];
|
|
|
|
|
this.unitTotal = response.data.total || 0;
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error("查询往来单位错误");
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
selectUnit(row) {
|
|
|
|
|