|
@@ -286,6 +286,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { mapGetters } from "vuex";
|
|
import {
|
|
import {
|
|
getList,
|
|
getList,
|
|
addDataList,
|
|
addDataList,
|
|
@@ -300,6 +301,9 @@ export default {
|
|
components: {
|
|
components: {
|
|
fileUpload,
|
|
fileUpload,
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapGetters(["customerId", "customerName"]),
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
baseURL: process.env.VUE_APP_BASE_API,
|
|
baseURL: process.env.VUE_APP_BASE_API,
|
|
@@ -386,6 +390,7 @@ export default {
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
await this.getDataList({ pageNum: 1, pageSize: 10 });
|
|
await this.getDataList({ pageNum: 1, pageSize: 10 });
|
|
|
|
+
|
|
// await this.getDealerDataList({ pageNum: 1, pageSize: 10 });
|
|
// await this.getDealerDataList({ pageNum: 1, pageSize: 10 });
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -394,7 +399,7 @@ export default {
|
|
this.showOK = true;
|
|
this.showOK = true;
|
|
this.id = data.id;
|
|
this.id = data.id;
|
|
this.addForm = {
|
|
this.addForm = {
|
|
- customerId: data.customerId,
|
|
|
|
|
|
+ customerName: data.customerName,
|
|
takerName: data.takerName,
|
|
takerName: data.takerName,
|
|
identity: data.identity,
|
|
identity: data.identity,
|
|
phone: data.phone,
|
|
phone: data.phone,
|
|
@@ -424,7 +429,6 @@ export default {
|
|
cancelFn() {
|
|
cancelFn() {
|
|
if (this.addForm.id) {
|
|
if (this.addForm.id) {
|
|
this.addForm = {
|
|
this.addForm = {
|
|
- customerId: "",
|
|
|
|
takerName: "",
|
|
takerName: "",
|
|
identity: "",
|
|
identity: "",
|
|
phone: "",
|
|
phone: "",
|
|
@@ -513,24 +517,23 @@ export default {
|
|
|
|
|
|
await this.$refs.addForm.validate();
|
|
await this.$refs.addForm.validate();
|
|
|
|
|
|
- const res = this.dealerList.filter(
|
|
|
|
- (v) => v.id === this.addForm.customerId
|
|
|
|
- )[0];
|
|
|
|
- console.log(res);
|
|
|
|
|
|
+ // const res = this.dealerList.filter(
|
|
|
|
+ // (v) => v.id === this.addForm.customerId
|
|
|
|
+ // )[0];
|
|
|
|
+ // console.log(res);
|
|
|
|
|
|
if (this.fileList.length == 1) {
|
|
if (this.fileList.length == 1) {
|
|
await addDataList({
|
|
await addDataList({
|
|
...this.addForm,
|
|
...this.addForm,
|
|
- orgNumber: res.useOrgNumber,
|
|
|
|
|
|
|
|
|
|
+ customerId: this.customerId,
|
|
fileName: this.fileList[0].name,
|
|
fileName: this.fileList[0].name,
|
|
fileUrl: this.fileList[0].url,
|
|
fileUrl: this.fileList[0].url,
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
await addDataList({
|
|
await addDataList({
|
|
...this.addForm,
|
|
...this.addForm,
|
|
- // orgNumber: res.useOrgNumber,
|
|
|
|
-
|
|
|
|
|
|
+ customerId: this.customerId,
|
|
fileName: "",
|
|
fileName: "",
|
|
fileUrl: "",
|
|
fileUrl: "",
|
|
});
|
|
});
|
|
@@ -557,7 +560,7 @@ export default {
|
|
},
|
|
},
|
|
addFn() {
|
|
addFn() {
|
|
this.addForm = {
|
|
this.addForm = {
|
|
- customerId: "",
|
|
|
|
|
|
+ customerName: this.customerName,
|
|
takerName: "",
|
|
takerName: "",
|
|
identity: "",
|
|
identity: "",
|
|
phone: "",
|
|
phone: "",
|