|
@@ -18,7 +18,7 @@
|
|
:disabled-date="disabledBeforeToday"
|
|
:disabled-date="disabledBeforeToday"
|
|
@change="dateChange"
|
|
@change="dateChange"
|
|
/>
|
|
/>
|
|
- <el-input placeholder="请输入客户名称" v-model="searchVal" style="width: 400px; margin-left: auto" @input="handleSearch" clearable>
|
|
+ <el-input placeholder="请输入客户名称" v-model.trim="searchVal" style="width: 400px; margin-left: auto" @input="handleSearch" clearable>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
</el-input>
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
@@ -45,26 +45,33 @@
|
|
>
|
|
>
|
|
</el-cascader>
|
|
</el-cascader>
|
|
<el-select v-model="filterObj.status" placeholder="派点状态" style="width: 230px; margin-right: 20px" clearable @change="changeFilter">
|
|
<el-select v-model="filterObj.status" placeholder="派点状态" style="width: 230px; margin-right: 20px" clearable @change="changeFilter">
|
|
- <el-option v-for="item in typeArr" :key="item" :label="item.name" :value="item.name"> </el-option>
|
|
+ <el-option v-for="item in typeArrStatus" :key="item" :label="item.label" :value="item.value"> </el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
- <allocation-lable :tableList="tableList" />
|
|
+ <allocation-lable :tableList="tableList" @isPreviewHistoryDetail="isPreviewHistoryDetail" @allocationDetailList="allocationDetailList" @allocationDetail="allocationDetail" />
|
|
|
|
+ <el-col :span="24" class="toolbar">
|
|
|
|
+ <m-page :total="total" :page_no="page_no" :pageSize="10" @handleCurrentChange="handleCurrentChange" />
|
|
|
|
+ </el-col>
|
|
</el-card>
|
|
</el-card>
|
|
- <allocation-number :allocationVisible.sync="allocationVisible" />
|
|
+ <allocation-number :allocationVisible.sync="allocationVisible" :allocationForm.sync="allocationForm" />
|
|
- <allocation-detail />
|
|
+ <allocation-detail @allocationDetailList="allocationDetailList" :allocationDetailVisible.sync="allocationDetailVisible" :allocationDetailForm.sync="allocationDetailForm" />
|
|
|
|
+ <rai-history-contract :isPreview.sync="isPreview" :dealList.sync="dealList" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { dataMainInterface, customInterence } from "@/api/api.js";
|
|
+import { dataMainInterface, customInterence, contractInterface } from "@/api/api.js";
|
|
import AllocationLable from "./components/allocationLable.vue";
|
|
import AllocationLable from "./components/allocationLable.vue";
|
|
import AllocationNumber from "./components/allocationNumber.vue";
|
|
import AllocationNumber from "./components/allocationNumber.vue";
|
|
import AllocationDetail from "./components/allocationDetail.vue";
|
|
import AllocationDetail from "./components/allocationDetail.vue";
|
|
|
|
+import mPage from "@/components/mPage.vue";
|
|
|
|
+import RaiHistoryContract from "./components/raiHistoryContract.vue";
|
|
|
|
+
|
|
var moment = require("moment");
|
|
var moment = require("moment");
|
|
moment().format();
|
|
moment().format();
|
|
export default {
|
|
export default {
|
|
name: "",
|
|
name: "",
|
|
- components: { AllocationLable, AllocationNumber, AllocationDetail },
|
|
+ components: { AllocationLable, AllocationNumber, AllocationDetail, mPage, RaiHistoryContract },
|
|
props: {},
|
|
props: {},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -75,6 +82,8 @@ export default {
|
|
type: "",
|
|
type: "",
|
|
sale: "",
|
|
sale: "",
|
|
area: "",
|
|
area: "",
|
|
|
|
+ status: "",
|
|
|
|
+ contractType: "",
|
|
},
|
|
},
|
|
monthLabel: [
|
|
monthLabel: [
|
|
{
|
|
{
|
|
@@ -90,14 +99,24 @@ export default {
|
|
searchVal: "",
|
|
searchVal: "",
|
|
typeArr: [
|
|
typeArr: [
|
|
{
|
|
{
|
|
- value: "非标合同",
|
|
+ value: "非标",
|
|
label: "非标合同",
|
|
label: "非标合同",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- value: "非标合同",
|
|
+ value: "标准",
|
|
label: "标准合同",
|
|
label: "标准合同",
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ typeArrStatus: [
|
|
|
|
+ {
|
|
|
|
+ value: "0",
|
|
|
|
+ label: "未派点",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value: "1",
|
|
|
|
+ label: "已派点",
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
salesArr: [], //销售列表
|
|
salesArr: [], //销售列表
|
|
contractTypeArr: [
|
|
contractTypeArr: [
|
|
{
|
|
{
|
|
@@ -122,6 +141,14 @@ export default {
|
|
}, //销售级联配置
|
|
}, //销售级联配置
|
|
tableList: [],
|
|
tableList: [],
|
|
allocationVisible: false, // 派点
|
|
allocationVisible: false, // 派点
|
|
|
|
+ allocationForm: {}, // 派点
|
|
|
|
+ allocationDetailVisible: false, // 派点详情
|
|
|
|
+ allocationDetailForm: {}, // 派点详情
|
|
|
|
+ page_no: 1,
|
|
|
|
+ total: 0, //条数
|
|
|
|
+ PageSize: 10, //每页显示几条
|
|
|
|
+ isPreview: false,
|
|
|
|
+ dealList: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -136,15 +163,15 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
let obj = {
|
|
let obj = {
|
|
- PageSize: this.pageSize,
|
|
+ IsExport: true,
|
|
|
|
+ FormalType: this.filterObj.type,
|
|
|
|
+ ContractType: this.filterObj.contractType,
|
|
|
|
+ PageSize: this.PageSize,
|
|
CurrentIndex: this.page_no,
|
|
CurrentIndex: this.page_no,
|
|
- CompanyType: this.filterObj.type,
|
|
|
|
- AdminId: salesArr.join(","),
|
|
|
|
- RegionType: this.filterObj.area,
|
|
|
|
- EndDate: this.end_date,
|
|
|
|
- StartDate: this.start_date,
|
|
|
|
Keyword: this.searchVal,
|
|
Keyword: this.searchVal,
|
|
- IsExport: true,
|
|
+ AdminId: salesArr.join(","),
|
|
|
|
+ IsAllocation: this.filterObj.status,
|
|
|
|
+ EndDate: this.filterObj.date,
|
|
};
|
|
};
|
|
for (let key in obj) {
|
|
for (let key in obj) {
|
|
paramStr = `${paramStr}&${key}=${obj[key]}`;
|
|
paramStr = `${paramStr}&${key}=${obj[key]}`;
|
|
@@ -158,9 +185,6 @@ export default {
|
|
this.getSale();
|
|
this.getSale();
|
|
/* 默认选中近1个月 */
|
|
/* 默认选中近1个月 */
|
|
this.filterDate(this.filterObj.month === "近1个月" ? 1 : this.filterObj.month === "近2个月" ? 2 : this.filterObj.month === "近3个月" ? 3 : 0);
|
|
this.filterDate(this.filterObj.month === "近1个月" ? 1 : this.filterObj.month === "近2个月" ? 2 : this.filterObj.month === "近3个月" ? 3 : 0);
|
|
- this.$nextTick(() => {
|
|
|
|
- this.tableList = [{ ContractCode: "HZEQ20230904002", CompanyName: "xxxx", CompanyId: 16 }];
|
|
|
|
- });
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
/* 切换月份 */
|
|
/* 切换月份 */
|
|
@@ -191,7 +215,55 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- getTableData() {},
|
|
+ async getTableData() {
|
|
|
|
+ let salesArr = [];
|
|
|
|
+ if (this.filterObj.sale.length) {
|
|
|
|
+ salesArr = this.filterObj.sale.map((item) => {
|
|
|
|
+ return item[item.length - 1];
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ const res = await contractInterface.getAllocationContract({
|
|
|
|
+ FormalType: this.filterObj.type,
|
|
|
|
+ ContractType: this.filterObj.contractType,
|
|
|
|
+ PageSize: this.PageSize,
|
|
|
|
+ CurrentIndex: this.page_no,
|
|
|
|
+ Keyword: this.searchVal,
|
|
|
|
+ AdminId: salesArr.join(","),
|
|
|
|
+ IsAllocation: this.filterObj.status,
|
|
|
|
+ EndDate: this.filterObj.date,
|
|
|
|
+ });
|
|
|
|
+ if (res.Ret === 200) {
|
|
|
|
+ this.tableList = res.Data.List;
|
|
|
|
+ this.total = res.Data.Paging.Totals;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ changeFilter() {
|
|
|
|
+ this.page_no = 1;
|
|
|
|
+ this.getTableData();
|
|
|
|
+ },
|
|
|
|
+ handleSearch() {
|
|
|
|
+ this.getTableData();
|
|
|
|
+ },
|
|
|
|
+ //分页
|
|
|
|
+ handleCurrentChange(page) {
|
|
|
|
+ this.page_no = page;
|
|
|
|
+ this.getTableData();
|
|
|
|
+ },
|
|
|
|
+ // 非标准预览
|
|
|
|
+ isPreviewHistoryDetail(res) {
|
|
|
|
+ this.isPreview = true;
|
|
|
|
+ this.dealList = res.Data.List;
|
|
|
|
+ },
|
|
|
|
+ // 派点
|
|
|
|
+ allocationDetailList(item) {
|
|
|
|
+ this.allocationForm = item;
|
|
|
|
+ this.allocationVisible = true;
|
|
|
|
+ },
|
|
|
|
+ // 派点详情
|
|
|
|
+ allocationDetail(item) {
|
|
|
|
+ this.allocationDetailVisible = true;
|
|
|
|
+ this.allocationDetailForm = item;
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|