|
@@ -42,7 +42,7 @@ export default {
|
|
|
pageSize: 10,
|
|
|
keyword: "",
|
|
|
type: "",
|
|
|
- afterSalesStatus: "",
|
|
|
+ status: "",
|
|
|
},
|
|
|
selectConfig: [
|
|
|
{
|
|
@@ -52,7 +52,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "状态",
|
|
|
- prop: "afterSalesStatus",
|
|
|
+ prop: "status",
|
|
|
data: [],
|
|
|
},
|
|
|
],
|
|
@@ -63,11 +63,17 @@ export default {
|
|
|
open: false,
|
|
|
form: {
|
|
|
id: "",
|
|
|
- type: "",
|
|
|
- remark: "",
|
|
|
+ customerId: "",
|
|
|
+ countryId: "",
|
|
|
+ provinceId: "",
|
|
|
+ cityId: "",
|
|
|
+ detailedAddress: "",
|
|
|
+ cause: "",
|
|
|
+ afterSalesDetailsList: [],
|
|
|
},
|
|
|
isAdd: false,
|
|
|
openOne: false,
|
|
|
+ recordsList: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -102,14 +108,14 @@ export default {
|
|
|
methods: {
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- API.afterSalesList(this.queryParams).then(
|
|
|
+ API.afterSalesListV2(this.queryParams).then(
|
|
|
(res) => {
|
|
|
this.tableList = res.data.data.records;
|
|
|
this.total = res.data.data.total;
|
|
|
this.loading = false;
|
|
|
},
|
|
|
(err) => {
|
|
|
- console.log("afterSalesList: " + err);
|
|
|
+ console.log("afterSalesListV2: " + err);
|
|
|
this.loading = false;
|
|
|
}
|
|
|
);
|
|
@@ -122,9 +128,13 @@ export default {
|
|
|
this.isAdd = true;
|
|
|
this.form = {
|
|
|
id: "",
|
|
|
- type: "",
|
|
|
- remark: "",
|
|
|
- productList: [],
|
|
|
+ customerId: "",
|
|
|
+ countryId: "",
|
|
|
+ provinceId: "",
|
|
|
+ cityId: "",
|
|
|
+ detailedAddress: "",
|
|
|
+ cause: "",
|
|
|
+ afterSalesDetailsList: [],
|
|
|
};
|
|
|
this.open = true;
|
|
|
},
|
|
@@ -135,20 +145,15 @@ export default {
|
|
|
this.titleText = "跟进";
|
|
|
this.isAdd = false;
|
|
|
this.form = {
|
|
|
- customerInfoId: row.customerInfoId,
|
|
|
- id: row.code,
|
|
|
- type: String(row.type),
|
|
|
- remarkOne: row.remark,
|
|
|
- orderInfoId: row.id,
|
|
|
+ afterSalesInfoId: row.id,
|
|
|
afterSalesStatus: "",
|
|
|
remark: "",
|
|
|
};
|
|
|
-
|
|
|
this.open = true;
|
|
|
},
|
|
|
handleSubmit() {
|
|
|
if (this.isAdd) {
|
|
|
- API.afterSalesAdd(this.form).then(
|
|
|
+ API.afterSalesAddV2(this.form).then(
|
|
|
() => {
|
|
|
this.msgSuccess("添加成功");
|
|
|
this.$refs.addAfterSales.loading = false;
|
|
@@ -156,16 +161,12 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
(err) => {
|
|
|
- console.log("afterSalesAdd: " + err);
|
|
|
+ console.log("afterSalesAddV2: " + err);
|
|
|
this.$refs.addAfterSales.loading = false;
|
|
|
}
|
|
|
);
|
|
|
} else {
|
|
|
- delete this.form.customerInfoId;
|
|
|
- delete this.form.remarkOne;
|
|
|
- delete this.form.id;
|
|
|
- delete this.form.type;
|
|
|
- API.afterSalesFollow(this.form).then(
|
|
|
+ API.afterSalesFollowV2(this.form).then(
|
|
|
() => {
|
|
|
this.msgSuccess("操作成功");
|
|
|
this.$refs.addAfterSales.loading = false;
|
|
@@ -173,7 +174,7 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
(err) => {
|
|
|
- console.log("afterSalesFollow: " + err);
|
|
|
+ console.log("afterSalesFollowV2: " + err);
|
|
|
this.$refs.addAfterSales.loading = false;
|
|
|
}
|
|
|
);
|
|
@@ -187,8 +188,16 @@ export default {
|
|
|
</div>
|
|
|
);
|
|
|
},
|
|
|
- lookRecords() {
|
|
|
- this.openOne = true;
|
|
|
+ lookRecords(row) {
|
|
|
+ this.msgSuccess("数据请求中,请稍后!");
|
|
|
+ API.followRecords({ id: row.id }).then((res) => {
|
|
|
+ this.recordsList = res.data.data;
|
|
|
+ if (this.recordsList.length > 0) {
|
|
|
+ this.openOne = true;
|
|
|
+ } else {
|
|
|
+ this.msgInfo("未有跟进记录!");
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -228,7 +237,7 @@ export default {
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
<el-table-column label="客户名称" align="left" prop="customerName" />
|
|
|
- <el-table-column label="售货原因" align="left" prop="" />
|
|
|
+ <el-table-column label="售货原因" align="left" prop="cause" />
|
|
|
<!-- <el-table-column
|
|
|
label="订单金额"
|
|
|
align="left"
|
|
@@ -257,9 +266,7 @@ export default {
|
|
|
<el-table-column
|
|
|
label="状态"
|
|
|
align="left"
|
|
|
- :formatter="
|
|
|
- (row) => dictDataEcho(row.afterSalesStatus, afterSalesStatusList)
|
|
|
- "
|
|
|
+ :formatter="(row) => dictDataEcho(row.status, afterSalesStatusList)"
|
|
|
/>
|
|
|
<!-- <el-table-column
|
|
|
label="订单状态"
|
|
@@ -272,7 +279,10 @@ export default {
|
|
|
<el-button type="text" @click="lookRecords(scope.row)"
|
|
|
>跟进记录
|
|
|
</el-button>
|
|
|
- <el-button type="text" @click="handleFollow(scope.row)"
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="scope.row.status !== 6"
|
|
|
+ @click="handleFollow(scope.row)"
|
|
|
>跟进
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -313,12 +323,12 @@ export default {
|
|
|
width="30%"
|
|
|
top="100px"
|
|
|
>
|
|
|
- <div v-for="item in 3" :key="item" class="record-item">
|
|
|
+ <div v-for="item in recordsList" :key="item.id" class="record-item">
|
|
|
<div class="head">
|
|
|
- <span class="time"> 跟进时间:{{}} </span>
|
|
|
- <span class="name"> 张三 </span>
|
|
|
+ <span class="time"> 跟进时间:{{ item.createTime }} </span>
|
|
|
+ <span class="name"> {{ item.purchaseName }} </span>
|
|
|
</div>
|
|
|
- <div class="body">跟进记录</div>
|
|
|
+ <div class="body">{{ item.remark }}</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -348,7 +358,7 @@ export default {
|
|
|
display: flex;
|
|
|
span {
|
|
|
font-size: 12px;
|
|
|
- color: #c3bdbd;
|
|
|
+ color: #8f8b8b;
|
|
|
}
|
|
|
.time {
|
|
|
flex: 1;
|