Browse Source

修改国家页面(未完成)

master
Claude Lee 2 months ago
parent
commit
39e44ec220
  1. 4
      src/api/dhc/area.js
  2. 34
      src/views/dhc/country/index.vue

4
src/api/dhc/area.js

@ -44,10 +44,10 @@ export function delArea(areaId) {
} }
// 查询区域信息 // 查询区域信息
export function queryArealist(data) { export function queryArealist(query) {
return request({ return request({
url: '/dhc/area/queryArealist', url: '/dhc/area/queryArealist',
method: 'post', method: 'get',
params: query params: query
}) })
} }

34
src/views/dhc/country/index.vue

@ -17,6 +17,16 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="产品线" prop="productLineCode">
<el-select v-model="queryParams.productLineCode" placeholder="产品线" clearable>
<el-option
v-for="line in dict.type.product_line"
:key="line.value"
:label="line.label"
:value="line.value"
/>
</el-select>
</el-form-item>
<el-form-item label="销售大区" prop="areaIdLarge"> <el-form-item label="销售大区" prop="areaIdLarge">
<el-select v-model="queryParams.areaIdLarge" placeholder="销售大区" clearable> <el-select v-model="queryParams.areaIdLarge" placeholder="销售大区" clearable>
<el-option <el-option
@ -93,6 +103,11 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="国家编码" align="center" prop="countryCode" /> <el-table-column label="国家编码" align="center" prop="countryCode" />
<el-table-column label="国家名称" align="center" prop="countryName" /> <el-table-column label="国家名称" align="center" prop="countryName" />
<el-table-column label="产品线" align="center">
<template slot-scope="scope">
<DictTag />
</template>
</el-table-column>
<el-table-column label="销售大区" align="center" prop="areaNameLarge" /> <el-table-column label="销售大区" align="center" prop="areaNameLarge" />
<el-table-column label="销售小区" align="center" prop="areaNameSmall" /> <el-table-column label="销售小区" align="center" prop="areaNameSmall" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -132,6 +147,17 @@
<el-form-item label="国家名称" prop="countryName"> <el-form-item label="国家名称" prop="countryName">
<el-input v-model="form.countryName" placeholder="请输入国家名称" maxlength="64"/> <el-input v-model="form.countryName" placeholder="请输入国家名称" maxlength="64"/>
</el-form-item> </el-form-item>
<el-form-item label="产品线" prop="productLineCode">
<el-select v-model="form.productLineCode" placeholder="产品线"
@change="getAreaList">
<el-option
v-for="line in dict.type.product_line"
:key="line.value"
:label="line.label"
:value="line.value"
/>
</el-select>
</el-form-item>
<el-form-item label="销售大区" prop="areaIdLarge"> <el-form-item label="销售大区" prop="areaIdLarge">
<el-select v-model="form.areaIdLarge" placeholder="销售大区"> <el-select v-model="form.areaIdLarge" placeholder="销售大区">
<el-option <el-option
@ -140,7 +166,7 @@
:label="area.areaId" :label="area.areaId"
:value="area.areaName" :value="area.areaName"
></el-option> ></el-option>
</el-select>> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="销售小区" prop="areaIdSmall"> <el-form-item label="销售小区" prop="areaIdSmall">
<el-select v-model="form.areaIdSmall" placeholder="销售小区"> <el-select v-model="form.areaIdSmall" placeholder="销售小区">
@ -166,6 +192,7 @@ import { listCountry, getCountry, delCountry, addCountry, updateCountry } from "
import { queryArealist } from "@/api/dhc/area"; import { queryArealist } from "@/api/dhc/area";
export default { export default {
name: "Country", name: "Country",
dicts: ['product_line'],
data() { data() {
return { return {
// //
@ -211,6 +238,9 @@ export default {
countryName: [ countryName: [
{ required: true, message: "国家名称不能为空", trigger: "blur" } { required: true, message: "国家名称不能为空", trigger: "blur" }
], ],
productLineCode: [
{ required: true, message: "产品线不能为空", trigger: "blur" }
],
areaIdLarge: [ areaIdLarge: [
{ required: true, message: "销售大区不能为空", trigger: "blur" } { required: true, message: "销售大区不能为空", trigger: "blur" }
], ],
@ -236,7 +266,7 @@ export default {
/** 查询区域信息 */ /** 查询区域信息 */
getAreaList() { getAreaList() {
this.loading = true; this.loading = true;
let params = {areaType: '', areaLevel:''}; let params = {productLineCode: this.form.productLineCode, areaType: 'sale_area'};
queryArealist(params).then(response => { queryArealist(params).then(response => {
this.areaLargeList = response.data; this.areaLargeList = response.data;
}); });

Loading…
Cancel
Save