|
@@ -1,189 +1,14 @@
|
|
|
<template>
|
|
|
- <div class="app-container">
|
|
|
- <!-- 筛选条件 -->
|
|
|
- <div>
|
|
|
- <Collapse :screen-form="searchForm">
|
|
|
- <template #right_btn>
|
|
|
- <el-button size="mini" @click="clearFn">清空</el-button>
|
|
|
- <el-button size="mini" type="primary" @click="searchFn">搜索</el-button>
|
|
|
- </template>
|
|
|
- <template #search>
|
|
|
- <el-form ref="searchForm" :model="searchForm" label-width="100px" size="mini" label-position="left">
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="经销商名称" prop="customerName">
|
|
|
- <el-input v-model="searchForm.customerName" placeholder="请输入经销商名称"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- </template>
|
|
|
- </Collapse>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="btn-group clearfix">
|
|
|
- <div class="fl">
|
|
|
- <el-button
|
|
|
- v-if="$checkBtnRole('add', $route.meta.roles)"
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
- @click="addFn"
|
|
|
- class="add-right"
|
|
|
- icon="el-icon-plus"
|
|
|
- >新增</el-button
|
|
|
- >
|
|
|
- <el-popconfirm
|
|
|
- v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
|
- @onConfirm="deleFn"
|
|
|
- title="这是一段内容确定删除吗?"
|
|
|
- >
|
|
|
- <el-button
|
|
|
- :disabled="ids.length < 1"
|
|
|
- type="danger"
|
|
|
- size="mini"
|
|
|
- class="textColor"
|
|
|
- icon="el-icon-minus"
|
|
|
- slot="reference"
|
|
|
- >批量删除</el-button
|
|
|
- >
|
|
|
- </el-popconfirm>
|
|
|
- </div>
|
|
|
- <div class="fr">
|
|
|
- <el-button type="primary" size="mini" @click="downLoadFns">导出</el-button>
|
|
|
- <el-button type="primary" size="mini" @click="downLoadFn">下载模板</el-button>
|
|
|
- <el-upload
|
|
|
- class="import-btn"
|
|
|
- action=""
|
|
|
- :http-request="handleImport"
|
|
|
- :file-list="importFileList"
|
|
|
- :show-file-list="false"
|
|
|
- >
|
|
|
- <el-button type="primary" size="mini">导入</el-button>
|
|
|
- </el-upload>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="mymain-container">
|
|
|
- <!-- 列表 -->
|
|
|
- <div class="table">
|
|
|
- <el-table
|
|
|
- v-loading="listLoading"
|
|
|
- :data="dataList"
|
|
|
- @select="hanleSelect"
|
|
|
- @select-all="hanleSelect"
|
|
|
- element-loading-text="Loading"
|
|
|
- border
|
|
|
- fit
|
|
|
- highlight-current-row
|
|
|
- stripe
|
|
|
- >
|
|
|
- <el-table-column type="selection" align="center" min-width="51"></el-table-column>
|
|
|
- <el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="110" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <CopyButton :copyText="scope.row.customerNumber" />
|
|
|
- <span>{{ scope.row.customerNumber }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="left" label="经销商名称" prop="customerName" min-width="260" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <CopyButton :copyText="scope.row.customerName" />
|
|
|
- <span>{{ scope.row.customerName }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="left" label="金蝶部门编号" prop="k3OrgNumber" min-width="200" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <CopyButton :copyText="scope.row.k3OrgNumber" />
|
|
|
- <span>{{ scope.row.k3OrgNumber }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="left" label="金蝶部门名称" prop="k3OrgName" min-width="200" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="钱包名称"
|
|
|
- prop="customerWalletName"
|
|
|
- min-width="200"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="业务员"
|
|
|
- prop="serviceName"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="创建人"
|
|
|
- prop="createBy"
|
|
|
- min-width="180"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="创建时间"
|
|
|
- prop="createTime"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="更新人"
|
|
|
- prop="updateBy"
|
|
|
- min-width="180"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="更新时间"
|
|
|
- prop="updateTime"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- label="操作"
|
|
|
- prop="caozuo"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- fixed="right"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- class="textColor"
|
|
|
- v-if="$checkBtnRole('edit', $route.meta.roles)"
|
|
|
- @click="editFn(scope.row.id)"
|
|
|
- >编辑</el-button
|
|
|
- >
|
|
|
- <el-popconfirm
|
|
|
- @onConfirm="deleFn(scope.row.id)"
|
|
|
- v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
|
- title="这是一段内容确定删除吗?"
|
|
|
- >
|
|
|
- <el-button type="text" class="textColor" slot="reference">删除</el-button>
|
|
|
- </el-popconfirm>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- <!-- 分页 -->
|
|
|
- <div class="fr">
|
|
|
- <el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-sizes="[10, 20, 30, 50]"
|
|
|
- :page-size="pageSize"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="listTotal"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 弹窗 -->
|
|
|
+ <template-page
|
|
|
+ ref="pageRef"
|
|
|
+ :getList="getList"
|
|
|
+ :optionsEvensGroup="optionsEvensGroup"
|
|
|
+ :exportList="exportList"
|
|
|
+ :operation="operation()"
|
|
|
+ :tableEvents="tableEvents"
|
|
|
+ :tableAttributes="tableAttributes"
|
|
|
+ :columnParsing="columnParsing"
|
|
|
+ >
|
|
|
<el-dialog :title="title" :visible.sync="dialogForm" width="30%" :show-close="false" :close-on-click-modal="false">
|
|
|
<el-form ref="addForm" :model="addForm" :rules="rules" label-width="100px" label-position="right">
|
|
|
<el-form-item label="经销商名称" prop="customerId">
|
|
@@ -199,12 +24,8 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="经销商编码" prop="customerNumber">
|
|
|
<el-input disabled v-model="addForm.customerNumber"></el-input>
|
|
|
- <!-- <template slot-scope="scope">
|
|
|
- {{ scope.row }}
|
|
|
- </template> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="金蝶部门编号" prop="k3OrgNumber">
|
|
|
- <!-- <el-input v-model="addForm.k3OrgNumber"></el-input>-->
|
|
|
<el-select class="selectStyle" v-model="addForm.k3OrgNumber" placeholder="请选择" filterable>
|
|
|
<el-option
|
|
|
v-for="item in k3DepartmentList"
|
|
@@ -236,57 +57,6 @@
|
|
|
clearable
|
|
|
></el-cascader>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="一级区域" prop="oneParentId">
|
|
|
- <el-select
|
|
|
- class="selectStyle"
|
|
|
- v-model="addForm.oneParentId"
|
|
|
- placeholder="请选择"
|
|
|
- filterable
|
|
|
- @change="changeOneFn"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in oneList"
|
|
|
- :key="item.adminWebsitId"
|
|
|
- :label="item.name"
|
|
|
- :value="item.adminWebsitId"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="二级区域" prop="">
|
|
|
- <el-select
|
|
|
- filterable
|
|
|
- class="selectStyle"
|
|
|
- v-model="addForm.twoParentId"
|
|
|
- placeholder="请选择"
|
|
|
- @change="changeTwoFn"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in twoList"
|
|
|
- :key="item.adminWebsitId"
|
|
|
- :label="item.name"
|
|
|
- :value="item.adminWebsitId"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="三级区域" prop=""
|
|
|
- ><el-select
|
|
|
- class="selectStyle"
|
|
|
- v-model="addForm.threeParentId"
|
|
|
- placeholder="请选择"
|
|
|
- filterable
|
|
|
- @change="changeThreeFn"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in threeList"
|
|
|
- :key="item.adminWebsitId"
|
|
|
- :label="item.name"
|
|
|
- :value="item.adminWebsitId"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item> -->
|
|
|
<el-form-item label="对应业务员" prop="serviceId">
|
|
|
<el-select class="selectStyle" v-model="addForm.serviceId" placeholder="请选择" filterable>
|
|
|
<el-option v-for="(item, i) in userList" :key="i" :label="item.nickName" :value="item.adminUserId">
|
|
@@ -299,12 +69,17 @@
|
|
|
<el-button type="primary" @click="addDataListFn">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- </div>
|
|
|
+ </template-page>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import TemplatePage from '@/components/template/template-page-1.vue'
|
|
|
+import import_mixin from '@/components/template/import_mixin.js'
|
|
|
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
|
|
|
+import Popu from '@/components/template/popu.vue'
|
|
|
import {
|
|
|
- getDealerStockList,
|
|
|
+ getDealerStockListV2,
|
|
|
+ exportDealerStockListV2,
|
|
|
getDealerStockAdd,
|
|
|
deleDealerStockList,
|
|
|
getDictionaries,
|
|
@@ -314,36 +89,94 @@ import {
|
|
|
getCustomerPtDetail,
|
|
|
getCustomerPtUpdate,
|
|
|
getWalletCustomerList,
|
|
|
- getK3DepartmentList
|
|
|
+ getK3DepartmentList,
|
|
|
+ downloadCustomerPtV2,
|
|
|
+ importCustomerPtV2
|
|
|
} from '@/api/basic_data/dealer'
|
|
|
import { getDealerList } from '@/api/basic_data/dealer'
|
|
|
import { getDepartmentList } from '@/api/setting'
|
|
|
-import { downloadFiles, handleImport } from '@/utils/util'
|
|
|
-
|
|
|
export default {
|
|
|
+ components: { TemplatePage, Popu },
|
|
|
+ mixins: [import_mixin, add_callback_mixin],
|
|
|
data() {
|
|
|
return {
|
|
|
+ visible: false,
|
|
|
+ // 事件组合
|
|
|
+ optionsEvensGroup: [
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '新增',
|
|
|
+ click: this.addOn(() => {
|
|
|
+ this.addFn()
|
|
|
+ }),
|
|
|
+ isRole: this.$checkBtnRole('add', this.$route.meta.roles)
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '批量删除',
|
|
|
+ click: async () => {
|
|
|
+ if (this.recordSelected.length === 0) {
|
|
|
+ this.$message.error('请选择需要删除的数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let dis = this.recordSelected.map(v => {
|
|
|
+ return v.id
|
|
|
+ })
|
|
|
+ let params = {ids:dis.toString()}
|
|
|
+ await deleDealerStockList(params)
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
+ this.$message.success('批量删除成功')
|
|
|
+ },
|
|
|
+ isRole: this.$checkBtnRole('del', this.$route.meta.roles)
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '导入',
|
|
|
+ render: this.importButton(importCustomerPtV2)
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '导入模版',
|
|
|
+ click: () => {
|
|
|
+ downloadCustomerPtV2({}, `${this.$route.meta.title}`)
|
|
|
+ .then(res => {
|
|
|
+ this.$message({
|
|
|
+ message: '下载成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$message.error('下载失败')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ // 表格属性
|
|
|
+ tableAttributes: {
|
|
|
+ // 启用勾选列
|
|
|
+ selectColumn: true
|
|
|
+ }, // 关闭新增弹窗
|
|
|
+ // 表格事件
|
|
|
+ tableEvents: {
|
|
|
+ 'selection-change': this.selectionChange
|
|
|
+ },
|
|
|
+ recordSelected: [],
|
|
|
props: {
|
|
|
checkStrictly: true,
|
|
|
value: 'adminWebsitId',
|
|
|
label: 'name'
|
|
|
-
|
|
|
- // expandTrigger: "hover",
|
|
|
- // lazy: true,
|
|
|
- // lazyLoad(node, resolve) {
|
|
|
- // console.log(node);
|
|
|
- // const { value } = node;
|
|
|
- // setTimeout(async () => {
|
|
|
- // let res = await getAdminWebsitByparent({
|
|
|
- // parentId: value,
|
|
|
- // });
|
|
|
- // let aaa = res.data.map((v) => {
|
|
|
- // return { value: v.adminWebsitId, label: v.name };
|
|
|
- // });
|
|
|
-
|
|
|
- // resolve(aaa);
|
|
|
- // }, 0);
|
|
|
- // },
|
|
|
},
|
|
|
options: [],
|
|
|
importFileList: [],
|
|
@@ -356,9 +189,6 @@ export default {
|
|
|
customerNumber: '',
|
|
|
k3OrgNumber: '',
|
|
|
region: [],
|
|
|
- // oneParentId: "",
|
|
|
- // twoParentId: "",
|
|
|
- // threeParentId: "",
|
|
|
serviceId: '',
|
|
|
customerWalletId: ''
|
|
|
},
|
|
@@ -367,15 +197,6 @@ export default {
|
|
|
customerId: [{ required: true, message: '请选择经销商名称', trigger: 'change' }],
|
|
|
customerWalletId: [{ required: true, message: '请选择经销商钱包', trigger: 'change' }],
|
|
|
region: [{ required: true, message: '请选择区域', trigger: 'change' }],
|
|
|
- // oneParentId: [
|
|
|
- // { required: true, message: "请选择一级区域", trigger: "blur" },
|
|
|
- // ],
|
|
|
- // twoParentId: [
|
|
|
- // { required: true, message: "请选择二级区域", trigger: "blur" },
|
|
|
- // ],
|
|
|
- // threeParentId: [
|
|
|
- // { required: true, message: "请选择三级区域", trigger: "blur" },
|
|
|
- // ],
|
|
|
serviceId: [{ required: true, message: '请选择业务员', trigger: 'change' }]
|
|
|
},
|
|
|
|
|
@@ -390,27 +211,13 @@ export default {
|
|
|
dataList: [], // 列表数据
|
|
|
listLoading: false, // 列表加载loading
|
|
|
dealerList: [],
|
|
|
- // selectList: [],
|
|
|
walletList: [], //产品大类列表
|
|
|
- // oneList: [], //一级区域数据
|
|
|
- // twoList: [], //二级区域数据
|
|
|
- // threeList: [], //三级区域数据
|
|
|
userList: [], //业务员
|
|
|
ids: [],
|
|
|
rowID: null, //编辑ID
|
|
|
k3DepartmentList: []
|
|
|
}
|
|
|
},
|
|
|
- async created() {
|
|
|
- this.getTree()
|
|
|
- // this.getAdminWebsit(1);
|
|
|
- this.getList()
|
|
|
- this.getK3DepartmentList()
|
|
|
- this.getDealerDataList({ pageNum: 1, pageSize: -1 })
|
|
|
- this.getUserList(1)
|
|
|
- // this.getSelectList({ sysDictEnum: "PRODUCT_TYPE" });
|
|
|
- },
|
|
|
- computed: {},
|
|
|
watch: {
|
|
|
'addForm.region': function (newValue) {
|
|
|
// console.log(newValue, 888);
|
|
@@ -431,32 +238,60 @@ export default {
|
|
|
this.walletList = res2.data
|
|
|
}
|
|
|
}
|
|
|
- // "addForm.oneParentId": async function (newValue) {
|
|
|
- // if (newValue) {
|
|
|
- // let res = await getAdminWebsitByparent({
|
|
|
- // parentId: newValue,
|
|
|
- // // mainId: this.mainId,
|
|
|
- // });
|
|
|
- // this.twoList = res.data;
|
|
|
- // }
|
|
|
- // },
|
|
|
- // "addForm.twoParentId": async function (newValue) {
|
|
|
- // if (newValue) {
|
|
|
- // let res = await getAdminWebsitByparent({
|
|
|
- // parentId: newValue,
|
|
|
- // // mainId: this.mainId,
|
|
|
- // });
|
|
|
- // this.getUserList(newValue);
|
|
|
- // this.threeList = res.data;
|
|
|
- // }
|
|
|
- // },
|
|
|
- // "addForm.threeParentId": async function (newValue) {
|
|
|
- // if (newValue) {
|
|
|
- // this.getUserList(newValue);
|
|
|
- // }
|
|
|
- // },
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ this.getTree()
|
|
|
+ this.getK3DepartmentList()
|
|
|
+ this.getDealerDataList({ pageNum: 1, pageSize: -1 })
|
|
|
+ this.getUserList(1)
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 列表请求函数
|
|
|
+ getList(...p) {
|
|
|
+ this.recordSelected = []
|
|
|
+ return getDealerStockListV2(...p)
|
|
|
+ },
|
|
|
+ // 列表导出函数
|
|
|
+ exportList: exportDealerStockListV2,
|
|
|
+ // 表格列解析渲染数据更改
|
|
|
+ columnParsing(item, defaultData) {
|
|
|
+ return defaultData
|
|
|
+ },
|
|
|
+ // 监听勾选变化
|
|
|
+ selectionChange(data) {
|
|
|
+ this.recordSelected = data
|
|
|
+ },
|
|
|
+ operation() {
|
|
|
+ return (h, { row, index, column }) => {
|
|
|
+ return (
|
|
|
+ <div class="operation-btns">
|
|
|
+ {this.$checkBtnRole('edit', this.$route.meta.roles) ? (
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ onClick={() => {
|
|
|
+ this.editFn(row.id)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 编辑
|
|
|
+ </el-button>
|
|
|
+ ) : null}
|
|
|
+ {this.$checkBtnRole('del', this.$route.meta.roles) ? (
|
|
|
+ <el-popconfirm onONConfirm={() => this.deleFn(row.id)} title="这是一段内容确定删除吗?">
|
|
|
+ <el-button style="font-size:12px" type="text" class="textColor" slot="reference">
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ </el-popconfirm>
|
|
|
+ ) : null}
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleClose() {
|
|
|
+ this.addOff(() => {
|
|
|
+ this.visible = false
|
|
|
+ })()
|
|
|
+ },
|
|
|
// 导入
|
|
|
async handleImport(param) {
|
|
|
const file = param.file
|
|
@@ -466,7 +301,7 @@ export default {
|
|
|
this.importFileList = []
|
|
|
if (result.code == 200) {
|
|
|
this.$message.success('导入成功')
|
|
|
- await this.getList()
|
|
|
+ await this.$refs.pageRef.refreshList()
|
|
|
} else {
|
|
|
this.$message.error(result.message)
|
|
|
}
|
|
@@ -484,39 +319,16 @@ export default {
|
|
|
downLoadFns() {
|
|
|
downloadFiles('customer/pt/export')
|
|
|
},
|
|
|
- // //改变产品大类
|
|
|
- // changeSelectFn(value) {
|
|
|
- // // const res = this.categoryList.filter((v) => v.productCategoryId == value);
|
|
|
- // // console.log(res);
|
|
|
- // // this.mainId = res[0].productCategoryNumber;
|
|
|
- // },
|
|
|
//编辑
|
|
|
async changeFn(v) {
|
|
|
this.addForm.customerWalletId = ''
|
|
|
},
|
|
|
- // async changeOneFn(v) {
|
|
|
- // this.addForm.twoParentId = "";
|
|
|
- // this.addForm.threeParentId = "";
|
|
|
- // this.addForm.serviceId = "";
|
|
|
- // },
|
|
|
- // async changeTwoFn(v) {
|
|
|
- // this.addForm.threeParentId = "";
|
|
|
- // this.addForm.serviceId = "";
|
|
|
- // },
|
|
|
- // async changeThreeFn(v) {
|
|
|
- // this.addForm.serviceId = "";
|
|
|
- // },
|
|
|
async editFn(id) {
|
|
|
this.title = '经销商业务关系管理 '
|
|
|
this.rowID = id
|
|
|
let res = await getCustomerPtDetail({ id })
|
|
|
- // console.log(res);
|
|
|
-
|
|
|
this.addForm.customerId = res.data.customerId
|
|
|
this.addForm.customerWalletId = res.data.customerWalletId
|
|
|
- // this.addForm.oneParentId = res.data.adminWebsitId1;
|
|
|
- // this.addForm.twoParentId = res.data.adminWebsitId2;
|
|
|
- // this.addForm.threeParentId = res.data.adminWebsitId3;
|
|
|
this.addForm.region = [res.data.adminWebsitId1, res.data.adminWebsitId2, res.data.adminWebsitId3]
|
|
|
this.addForm.serviceId = res.data.serviceId
|
|
|
this.addForm.k3OrgNumber = res.data.k3OrgNumber
|
|
@@ -543,29 +355,7 @@ export default {
|
|
|
this.options = res.data[0].children
|
|
|
})
|
|
|
},
|
|
|
- // //根据父级查询部门
|
|
|
- // async getAdminWebsit(data) {
|
|
|
- // let res = await getAdminWebsitByparent({
|
|
|
- // parentId: data,
|
|
|
- // // mainId: this.mainId,
|
|
|
- // });
|
|
|
- // let arr = res.data.map((v) => {
|
|
|
- // return {
|
|
|
- // value: v.adminWebsitId,
|
|
|
- // label: v.name,
|
|
|
- // };
|
|
|
- // });
|
|
|
|
|
|
- // // this.options = arr;
|
|
|
-
|
|
|
- // this.oneList = res.data;
|
|
|
- // },
|
|
|
- // //获取产品类别数据
|
|
|
- // async getCategoryList() {
|
|
|
- // let res = await getProductCategoryList();
|
|
|
- // console.log(res);
|
|
|
- // this.categoryList = res.data;
|
|
|
- // },
|
|
|
// 筛选部分数据或者单个
|
|
|
hanleSelect(selection) {
|
|
|
// this.ids = selection.map((k) => {
|
|
@@ -593,7 +383,7 @@ export default {
|
|
|
await deleDealerStockList({ ids: res })
|
|
|
}
|
|
|
|
|
|
- this.getList()
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
|
|
|
this.$message.success('删除成功')
|
|
|
this.ids = []
|
|
@@ -612,8 +402,6 @@ export default {
|
|
|
let data3 = this.userList.filter(v => {
|
|
|
return v.adminUserId == this.addForm.serviceId
|
|
|
})
|
|
|
- // console.log(data3);
|
|
|
- // console.log(data2, 22222);
|
|
|
|
|
|
let value = {
|
|
|
customerId: this.addForm.customerId,
|
|
@@ -644,19 +432,12 @@ export default {
|
|
|
this.addForm.customerWalletId = ''
|
|
|
this.addForm.region = []
|
|
|
this.addForm.k3OrgNumber = ''
|
|
|
-
|
|
|
- // this.addForm.oneParentId = "";
|
|
|
- // this.addForm.twoParentId = "";
|
|
|
- // this.addForm.threeParentId = "";
|
|
|
this.addForm.serviceId = ''
|
|
|
- // this.userList = [];
|
|
|
- // this.twoList = [];
|
|
|
- // this.threeList = [];
|
|
|
this.walletList = []
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs['addForm'].clearValidate()
|
|
|
})
|
|
|
- this.getList()
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
this.dialogForm = false
|
|
|
},
|
|
|
//取消
|
|
@@ -689,37 +470,6 @@ export default {
|
|
|
async getDealerDataList(data) {
|
|
|
const res = await getDealerList(data)
|
|
|
this.dealerList = res.data.records
|
|
|
- },
|
|
|
- // 更改每页数量
|
|
|
- handleSizeChange(val) {
|
|
|
- this.pageSize = val
|
|
|
- this.currentPage = 1
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- // 更改当前页
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.currentPage = val
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- //搜索功能
|
|
|
- searchFn() {
|
|
|
- this.currentPage = 1
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- //重置
|
|
|
- clearFn() {
|
|
|
- this.$refs.searchForm.resetFields()
|
|
|
- },
|
|
|
- //获取列表数据
|
|
|
- async getList() {
|
|
|
- let params = {
|
|
|
- customerName: this.searchForm.customerName,
|
|
|
- pageNum: this.currentPage,
|
|
|
- pageSize: this.pageSize
|
|
|
- }
|
|
|
- const res = await getDealerStockList(params)
|
|
|
- this.dataList = res.data.records
|
|
|
- this.listTotal = res.data.total
|
|
|
}
|
|
|
}
|
|
|
}
|