驾驶舱&基础信息配置

This commit is contained in:
2026-04-01 15:04:37 +08:00
parent 161d6a1bdf
commit f0ac88af3d
15 changed files with 309 additions and 130 deletions

View File

@@ -10,11 +10,11 @@ VUE_APP_TITLE = 洛玻集团驾驶舱
# VUE_APP_BASE_API = 'http://172.16.33.83:7070' # VUE_APP_BASE_API = 'http://172.16.33.83:7070'
# 杨姗姗 # 杨姗姗
VUE_APP_BASE_API = 'http://172.16.20.218:7070' # VUE_APP_BASE_API = 'http://172.16.20.218:7070'
# 小田 # 小田
# VUE_APP_BASE_API = 'http://172.16.19.232:7070' # VUE_APP_BASE_API = 'http://172.16.19.232:7070'
# 测试 # 测试
# VUE_APP_BASE_API = 'http://192.168.0.35:8080' VUE_APP_BASE_API = 'http://192.168.0.35:8080'
# 闫阳 # 闫阳
# VUE_APP_BASE_API = 'http://172.16.19.131:7070' # VUE_APP_BASE_API = 'http://172.16.19.131:7070'

109
src/api/basicInfoConfig.js Normal file
View File

@@ -0,0 +1,109 @@
import request from "@/utils/request";
// 产品信息
export function getProductConfigPage(data) {
return request({
url: "/lb/product-config/page",
method: "get",
params: data,
});
}
export function getProductConfig(data) {
return request({
url: "/lb/product-config/get",
method: "get",
params: data,
});
}
export function addProductConfig(data) {
return request({
url: "/lb/product-config/create",
method: "post",
data: data,
});
}
export function updateProductConfig(data) {
return request({
url: "/lb/product-config/update",
method: "put",
data: data,
});
}
export function delProductConfig(data) {
return request({
url: "/lb/product-config/delete",
method: "delete",
params: data,
});
}
// 集团重点工作
export function getImportantWorkConfigPage(data) {
return request({
url: "/lb/important-work-config/page",
method: "get",
params: data,
});
}
export function getImportantWorkConfig(data) {
return request({
url: "/lb/important-work-config/get",
method: "get",
params: data,
});
}
export function addImportantWorkConfig(data) {
return request({
url: "/lb/important-work-config/create",
method: "post",
data: data,
});
}
export function updateImportantWorkConfig(data) {
return request({
url: "/lb/important-work-config/update",
method: "put",
data: data,
});
}
export function delImportantWorkConfig(data) {
return request({
url: "/lb/important-work-config/delete",
method: "delete",
params: data,
});
}
// 客户信息配置
export function getCustomerConfigPage(data) {
return request({
url: "/lb/customer-config/page",
method: "get",
params: data,
});
}
export function getCustomerConfig(data) {
return request({
url: "/lb/customer-config/get",
method: "get",
params: data,
});
}
export function addCustomerConfig(data) {
return request({
url: "/lb/customer-config/create",
method: "post",
data: data,
});
}
export function updateCustomerConfig(data) {
return request({
url: "/lb/customer-config/update",
method: "put",
data: data,
});
}
export function delCustomerConfig(data) {
return request({
url: "/lb/customer-config/delete",
method: "delete",
params: data,
});
}

View File

@@ -83,7 +83,10 @@ export const DICT_TYPE = {
PROMOTION_CONDITION_TYPE: 'promotion_condition_type', // 营销的条件类型枚举 PROMOTION_CONDITION_TYPE: 'promotion_condition_type', // 营销的条件类型枚举
// ========== 模块 ========== // ========== 模块 ==========
LB_DW: 'lb_dw' LB_DW: 'lb_dw',
PROCESS:'process',
IMPORTANT_WORK_METHOD:'important_work_method'
} }
/** /**

View File

@@ -12,10 +12,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="所属基地" prop="daySpan"> <el-form-item label="所属基地" prop="factoryList">
<el-select v-model="form.daySpan" placeholder="请选择" style="width: 100%;"> <el-select v-model="form.factoryList" placeholder="请选择" style="width: 100%;" multiple>
<el-option label="" :value= '0' ></el-option> <el-option v-for='item in facList' :key='item.value' :label="item.name" :value= 'item.value' ></el-option>
<el-option label="是" :value= '1' ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -23,7 +22,7 @@
</el-form> </el-form>
</template> </template>
<script> <script>
// import { getGroupClasses, updateGroupClasses, createGroupClasses, getCode } from '@/api/base/groupClasses' import { addCustomerConfig, updateCustomerConfig, getCustomerConfig } from '@/api/basicInfoConfig'
export default { export default {
name: 'CustomerInfoAdd', name: 'CustomerInfoAdd',
data() { data() {
@@ -32,14 +31,24 @@ export default {
id: '', id: '',
name: '', name: '',
code: '', code: '',
daySpan:'', factoryList:'',
}, },
isEdit: false, //是否是编辑 isEdit: false, //是否是编辑
rules: { rules: {
name: [{ required: true, message: '请输入客户名称', trigger: 'blur' }], name: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
code: [{ required: true, message: '请输入客户编码', trigger: 'blur' }], code: [{ required: true, message: '请输入客户编码', trigger: 'blur' }],
daySpan: [{ required: true, message: '请选择所属基地', trigger: 'change' }], factoryList: [{ required: true, message: '请选择所属基地', trigger: 'change' }],
} },
facList:[
{name:'宜兴',value:7},
{name:'漳州',value:8},
{name:'自贡',value:3},
{name:'桐城',value:2},
{name:'洛阳',value:9},
{name:'合肥',value:5},
{name:'宿迁',value:6},
{name:'秦皇岛',value:10}
]
} }
}, },
methods: { methods: {
@@ -47,11 +56,11 @@ export default {
if (id) { if (id) {
this.isEdit = true this.isEdit = true
this.form.id = id this.form.id = id
// getGroupClasses(id).then((res) => { getCustomerConfig({id}).then((res) => {
// if (res.code === 0) { if (res.code === 0) {
// this.form = res.data this.form = res.data
// } }
// }) })
} }
}, },
submitForm() { submitForm() {
@@ -59,14 +68,14 @@ export default {
if (valid) { if (valid) {
if (this.isEdit) { if (this.isEdit) {
//编辑 //编辑
updateGroupClasses({ ...this.form }).then((res) => { updateCustomerConfig({ ...this.form }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess("操作成功");
this.$emit('successSubmit') this.$emit('successSubmit')
} }
}) })
} else { } else {
createGroupClasses({ ...this.form }).then((res) => { addCustomerConfig({ ...this.form }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess("操作成功");
this.$emit('successSubmit') this.$emit('successSubmit')

View File

@@ -2,22 +2,21 @@
<el-form ref="form" :rules="rules" label-width="120px" :model="form"> <el-form ref="form" :rules="rules" label-width="120px" :model="form">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="重点工作" prop="name"> <el-form-item label="重点工作" prop="importantWork">
<el-input v-model="form.name"></el-input> <el-input v-model="form.importantWork"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="单位" prop="daySpan"> <el-form-item label="单位" prop="unit">
<el-select v-model="form.daySpan" placeholder="请选择" style="width: 100%;"> <el-select v-model="form.unit" placeholder="请选择" style="width: 100%;">
<el-option label="" :value= '0' ></el-option> <el-option v-for='item in unitList' :key='item.value' :label="item.label" :value= 'item.value' ></el-option>
<el-option label="件" :value= '1' ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="所属年份" prop="daySpan1"> <el-form-item label="所属年份" prop="time">
<el-date-picker <el-date-picker
v-model="value3" v-model="form.time"
type="year" type="year"
placeholder="选择年" placeholder="选择年"
style="width: 100%;"> style="width: 100%;">
@@ -25,10 +24,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="累计值计算方式" prop="daySpan2"> <el-form-item label="累计值计算方式" prop="calculateMethod">
<el-select v-model="form.daySpan" placeholder="请选择" style="width: 100%;"> <el-select v-model="form.calculateMethod" placeholder="请选择" style="width: 100%;">
<el-option label="" :value= '0' ></el-option> <el-option v-for='item in calculateMethodList' :key='item.value' :label="item.label" :value= 'item.value' ></el-option>
<el-option label="日" :value= '1' ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -36,24 +34,29 @@
</el-form> </el-form>
</template> </template>
<script> <script>
// import { getGroupClasses, updateGroupClasses, createGroupClasses, getCode } from '@/api/base/groupClasses' import { addImportantWorkConfig, updateImportantWorkConfig, getImportantWorkConfig } from '@/api/basicInfoConfig'
import {getDictDatas } from '@/utils/dict'
import moment from 'moment';
export default { export default {
name: 'groupKeyAdd', name: 'groupKeyAdd',
data() { data() {
return { return {
form: { form: {
id: '', id: '',
name: '', importantWork: '',
code: '', unit: '',
daySpan:'', time:'',
calculateMethod:''
}, },
isEdit: false, //是否是编辑 isEdit: false, //是否是编辑
rules: { rules: {
name: [{ required: true, message: '请输入重点工作', trigger: 'blur' }], importantWork: [{ required: true, message: '请输入重点工作', trigger: 'blur' }],
daySpan: [{ required: true, message: '请选择单位', trigger: 'change' }], unit: [{ required: true, message: '请选择单位', trigger: 'change' }],
daySpan1: [{ required: true, message: '请选择所属年份', trigger: 'change' }], time: [{ required: true, message: '请选择所属年份', trigger: 'change' }],
daySpan2: [{ required: true, message: '请选择累计值计算方式', trigger: 'change' }], calculateMethod: [{ required: true, message: '请选择累计值计算方式', trigger: 'change' }],
} },
unitList:getDictDatas('lb_dw'),
calculateMethodList:getDictDatas('important_work_method')
} }
}, },
methods: { methods: {
@@ -61,26 +64,27 @@ export default {
if (id) { if (id) {
this.isEdit = true this.isEdit = true
this.form.id = id this.form.id = id
// getGroupClasses(id).then((res) => { getImportantWorkConfig({id}).then((res) => {
// if (res.code === 0) { if (res.code === 0) {
// this.form = res.data this.form = res.data
// } }
// }) })
} }
}, },
submitForm() { submitForm() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.form.time = moment(this.form.time).endOf('year').endOf('month').endOf('day').unix() * 1000
if (this.isEdit) { if (this.isEdit) {
//编辑 //编辑
updateGroupClasses({ ...this.form }).then((res) => { updateImportantWorkConfig({ ...this.form }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess("操作成功");
this.$emit('successSubmit') this.$emit('successSubmit')
} }
}) })
} else { } else {
createGroupClasses({ ...this.form }).then((res) => { addImportantWorkConfig({ ...this.form }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess("操作成功");
this.$emit('successSubmit') this.$emit('successSubmit')

View File

@@ -2,20 +2,19 @@
<el-form ref="form" :rules="rules" label-width="110px" :model="form"> <el-form ref="form" :rules="rules" label-width="110px" :model="form">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="产品名称" prop="name"> <el-form-item label="产品名称" prop="product">
<el-input v-model="form.name"></el-input> <el-input v-model="form.product"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="规格" prop="code"> <el-form-item label="规格" prop="spec">
<el-input v-model="form.code"></el-input> <el-input v-model="form.spec"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="工艺" prop="daySpan"> <el-form-item label="工艺" prop="process">
<el-select v-model="form.daySpan" placeholder="请选择" style="width: 100%;"> <el-select v-model="form.process" placeholder="请选择" style="width: 100%;">
<el-option label="" :value= '0' ></el-option> <el-option v-for='item in processList' :key='item.value' :label="item.label" :value= 'item.value' ></el-option>
<el-option label="是" :value= '1' ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -23,23 +22,23 @@
</el-form> </el-form>
</template> </template>
<script> <script>
// import { getGroupClasses, updateGroupClasses, createGroupClasses, getCode } from '@/api/base/groupClasses' import { addProductConfig, updateProductConfig, getProductConfig } from '@/api/basicInfoConfig'
import {getDictDatas } from '@/utils/dict'
export default { export default {
name: 'ProductInfoAdd', name: 'ProductInfoAdd',
data() { data() {
return { return {
form: { form: {
id: '', id: '',
name: '', product: '',
code: '', spec: '',
daySpan:'', process:'',
}, },
isEdit: false, //是否是编辑 isEdit: false, //是否是编辑
rules: { rules: {
name: [{ required: true, message: '请输入产品名称', trigger: 'blur' }], product: [{ required: true, message: '请输入产品名称', trigger: 'blur' }]
code: [{ required: true, message: '请输入产品规格', trigger: 'blur' }], },
daySpan: [{ required: true, message: '请选择工艺', trigger: 'change' }], processList:getDictDatas('process')
}
} }
}, },
methods: { methods: {
@@ -47,11 +46,13 @@ export default {
if (id) { if (id) {
this.isEdit = true this.isEdit = true
this.form.id = id this.form.id = id
// getGroupClasses(id).then((res) => { getProductConfig({id}).then((res) => {
// if (res.code === 0) { if (res.code === 0) {
// this.form = res.data this.form = res.data
// } }
// }) })
}else{
this.form.id = ''
} }
}, },
submitForm() { submitForm() {
@@ -59,14 +60,14 @@ export default {
if (valid) { if (valid) {
if (this.isEdit) { if (this.isEdit) {
//编辑 //编辑
updateGroupClasses({ ...this.form }).then((res) => { updateProductConfig({ ...this.form }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess("操作成功");
this.$emit('successSubmit') this.$emit('successSubmit')
} }
}) })
} else { } else {
createGroupClasses({ ...this.form }).then((res) => { addProductConfig({ ...this.form }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess("操作成功");
this.$emit('successSubmit') this.$emit('successSubmit')

View File

@@ -22,6 +22,7 @@
<script> <script>
import CustomerInfoAdd from './components/customerInfoAdd.vue'; import CustomerInfoAdd from './components/customerInfoAdd.vue';
import { getCustomerConfigPage,delCustomerConfig } from '@/api/basicInfoConfig';
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: 'name',
@@ -32,8 +33,9 @@ const tableProps = [
label: '客户编码' label: '客户编码'
}, },
{ {
prop: 'jd', prop: 'factoryNameList',
label: '所属基地' label: '所属基地',
filter: (val) => val ? val.join(',') :'-'
}, },
]; ];
export default { export default {
@@ -46,13 +48,13 @@ export default {
type: 'input', type: 'input',
label: '客户名称', label: '客户名称',
placeholder: '客户名称', placeholder: '客户名称',
param: 'cName' param: 'name'
}, },
{ {
type: 'input', type: 'input',
label: '客户编码', label: '客户编码',
placeholder: '客户编码', placeholder: '客户编码',
param: 'ccode' param: 'code'
}, },
{ {
type: 'button', type: 'button',
@@ -72,11 +74,13 @@ export default {
} }
], ],
listQuery:{ listQuery:{
name:'',
code:'',
pageSize:20, pageSize:20,
pageNo:1 pageNo:1
}, },
total:2, total:0,
tableData:[{name:'111',id:1}], tableData:[],
tableProps, tableProps,
tableBtn:[ tableBtn:[
{ {
@@ -92,13 +96,18 @@ export default {
centervisible: false, centervisible: false,
} }
}, },
mounted() {
this.getDataList();
},
methods: { methods: {
buttonClick(val) { buttonClick(val) {
console.log(val) console.log(val)
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.name = val.name
this.listQuery.code = val.code
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.getList(); this.getDataList();
break; break;
case 'add': case 'add':
this.addOrEditTitle = '新增'; this.addOrEditTitle = '新增';
@@ -110,7 +119,15 @@ export default {
} }
}, },
getDataList() { getDataList() {
getCustomerConfigPage({...this.listQuery}).then(res => {
if (res.code === 0) {
this.tableData = res.data.list;
this.total = res.data.total;
}else{
this.tableData = [];
this.total = 0;
}
})
}, },
handleClick(val) { handleClick(val) {
switch (val.type) { switch (val.type) {
@@ -135,14 +152,15 @@ export default {
}, },
successSubmit() { successSubmit() {
this.handleCancel(); this.handleCancel();
this.getList(); this.getDataList();
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$modal.confirm('确定删除客户"' + row.name + '吗?').then(function() { let _this = this;
deleteModel(row.id).then(response => { _this.$modal.confirm('确定删除客户"' + row.name + '吗?').then(function() {
that.getList(); delCustomerConfig({id:row.id}).then(response => {
that.$modal.msgSuccess("删除成功"); _this.$modal.msgSuccess("删除成功");
_this.getDataList();
}) })
}).catch(() => {}); }).catch(() => {});
} }

View File

@@ -22,22 +22,28 @@
<script> <script>
import GroupKeyAdd from './components/groupKeyAdd.vue'; import GroupKeyAdd from './components/groupKeyAdd.vue';
import { getImportantWorkConfigPage,delImportantWorkConfig } from '@/api/basicInfoConfig';
import { publicFormatter } from '@/utils/dict';
import moment from 'moment';
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: 'importantWork',
label: '重点工作' label: '重点工作'
}, },
{ {
prop: 'code1', prop: 'unit',
label: '单位' label: '单位',
filter: publicFormatter('lb_dw')
}, },
{ {
prop: 'code', prop: 'time',
label: '所属年份' label: '所属年份',
filter: (val) => val ? moment(val).format('YYYY') : '-'
}, },
{ {
prop: 'jd', prop: 'calculateMethod',
label: '累计值计算方式' label: '累计值计算方式',
filter: publicFormatter('important_work_method')
}, },
]; ];
export default { export default {
@@ -50,7 +56,7 @@ export default {
type: 'input', type: 'input',
label: '重点工作', label: '重点工作',
placeholder: '重点工作', placeholder: '重点工作',
param: 'cName' param: 'importantWork'
}, },
{ {
type: 'datePicker', type: 'datePicker',
@@ -59,7 +65,7 @@ export default {
format: 'yyyy', format: 'yyyy',
valueFormat: 'yyyy', valueFormat: 'yyyy',
placeholder: '所属年份', placeholder: '所属年份',
param: 'searchTime1', param: 'time',
width: 150 width: 150
}, },
{ {
@@ -80,11 +86,13 @@ export default {
} }
], ],
listQuery:{ listQuery:{
importantWork:'',
time:'',
pageSize:20, pageSize:20,
pageNo:1 pageNo:1
}, },
total:2, total:0,
tableData:[{name:'111'}], tableData:[],
tableProps, tableProps,
tableBtn:[ tableBtn:[
{ {
@@ -101,13 +109,19 @@ export default {
} }
}, },
mounted() {
this.$refs.searchBarForm.formInline.time = moment().endOf('year').endOf('month').endOf('day').format('YYYY-MM-DD HH:mm:ss')
this.listQuery.time = moment().endOf('year').endOf('month').endOf('day').format('YYYY-MM-DD HH:mm:ss')
this.getDataList();
},
methods: { methods: {
buttonClick(val) { buttonClick(val) {
console.log(val)
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.importantWork = val.importantWork;
this.listQuery.time = val.time ? moment(val.time).endOf('year').endOf('month').endOf('day').format('YYYY-MM-DD HH:mm:ss') : '';
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.getList(); this.getDataList();
break; break;
case 'add': case 'add':
this.addOrEditTitle = '新增'; this.addOrEditTitle = '新增';
@@ -119,7 +133,15 @@ export default {
} }
}, },
getDataList() { getDataList() {
getImportantWorkConfigPage({...this.listQuery}).then(res => {
if (res.code === 0) {
this.tableData = res.data.list;
this.total = res.data.total;
}else{
this.tableData = [];
this.total = 0;
}
})
}, },
handleClick(val) { handleClick(val) {
switch (val.type) { switch (val.type) {
@@ -144,14 +166,16 @@ export default {
}, },
successSubmit() { successSubmit() {
this.handleCancel(); this.handleCancel();
this.getList(); this.getDataList();
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$modal.confirm('确定删除重点工作"' + row.name + '吗?').then(function() { let _this = this;
deleteModel(row.id).then(response => { _this.$modal.confirm('确定删除重点工作"' + row.importantWork + '吗?').then(function() {
that.getList(); delImportantWorkConfig({id:row.id}).then(response => {
that.$modal.msgSuccess("删除成功"); _this.$modal.msgSuccess("删除成功");
_this.getDataList();
}) })
}).catch(() => {}); }).catch(() => {});
} }

View File

@@ -22,17 +22,20 @@
<script> <script>
import ProductInfoAdd from './components/productInfoAdd.vue'; import ProductInfoAdd from './components/productInfoAdd.vue';
import { getProductConfigPage,delProductConfig } from '@/api/basicInfoConfig';
import { publicFormatter } from '@/utils/dict';
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: 'product',
label: '产品名称' label: '产品名称'
}, },
{ {
prop: 'code', prop: 'process',
label: '工艺' label: '工艺',
filter: publicFormatter('process')
}, },
{ {
prop: 'jd', prop: 'spec',
label: '规格' label: '规格'
}, },
]; ];
@@ -46,7 +49,7 @@ export default {
type: 'input', type: 'input',
label: '产品名称', label: '产品名称',
placeholder: '产品名称', placeholder: '产品名称',
param: 'cName' param: 'product'
}, },
{ {
type: 'button', type: 'button',
@@ -66,11 +69,12 @@ export default {
} }
], ],
listQuery:{ listQuery:{
product:'',
pageSize:20, pageSize:20,
pageNo:1 pageNo:1
}, },
total:2, total:0,
tableData:[{name:'111'}], tableData:[],
tableProps, tableProps,
tableBtn:[ tableBtn:[
{ {
@@ -87,13 +91,16 @@ export default {
} }
}, },
mounted() {
this.getDataList();
},
methods: { methods: {
buttonClick(val) { buttonClick(val) {
console.log(val)
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.product = val.product;
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.getList(); this.getDataList();
break; break;
case 'add': case 'add':
this.addOrEditTitle = '新增'; this.addOrEditTitle = '新增';
@@ -105,7 +112,17 @@ export default {
} }
}, },
getDataList() { getDataList() {
getProductConfigPage({
...this.listQuery
}).then(res => {
if (res.code === 0) {
this.tableData = res.data.list;
this.total = res.data.total;
}else{
this.tableData = [];
this.total = 0;
}
})
}, },
handleClick(val) { handleClick(val) {
switch (val.type) { switch (val.type) {
@@ -130,14 +147,15 @@ export default {
}, },
successSubmit() { successSubmit() {
this.handleCancel(); this.handleCancel();
this.getList(); this.getDataList();
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$modal.confirm('确定删除产品"' + row.name + '吗?').then(function() { let _this = this;
deleteModel(row.id).then(response => { _this.$modal.confirm('确定删除产品"' + row.product + '吗?').then(function() {
that.getList(); delProductConfig({id:row.id}).then(response => {
that.$modal.msgSuccess("删除成功"); _this.getDataList();
_this.$modal.msgSuccess("删除成功");
}) })
}).catch(() => {}); }).catch(() => {});
} }

View File

@@ -77,7 +77,7 @@ export default {
completed: 1 // 销量超额达标 completed: 1 // 销量超额达标
}, },
{ {
name: "双镀面板", name: "双镀销量",
targetValue: 0, targetValue: 0,
value: 0, value: 0,
proportion: 0, proportion: 0,
@@ -113,7 +113,7 @@ export default {
"单价": "unitPrice", "单价": "unitPrice",
"净价": "netPrice", "净价": "netPrice",
"销量": "sales", "销量": "sales",
"双镀面板": "panel", "双镀销量": "panel",
"溢价产品销量": "premiumProduct" "溢价产品销量": "premiumProduct"
}; };

View File

@@ -154,7 +154,7 @@ export default {
itemStyle: { color: 'rgba(39, 96, 255, 1)' } itemStyle: { color: 'rgba(39, 96, 255, 1)' }
}, },
{ {
value: 735, name: '双镀面板', value: 735, name: '双镀销量',
label: { label: {
normal: { normal: {
align: 'left', align: 'left',

View File

@@ -77,7 +77,7 @@ export default {
{ key: 'unitPrice', unit: '单价·元/㎡', path: '/unitPriceAnalysis/unitPriceAnalysis' }, { key: 'unitPrice', unit: '单价·元/㎡', path: '/unitPriceAnalysis/unitPriceAnalysis' },
{ key: 'netPrice', unit: '净价·元/㎡', path: '/netPriceAnalysis/netPriceAnalysis' }, { key: 'netPrice', unit: '净价·元/㎡', path: '/netPriceAnalysis/netPriceAnalysis' },
{ key: 'sales', unit: '销量·万㎡', path: '/salesVolumeAnalysis/salesVolumeAnalysis' }, { key: 'sales', unit: '销量·万㎡', path: '/salesVolumeAnalysis/salesVolumeAnalysis' },
{ key: 'panel', unit: '双镀面板·万㎡', path: '/salesVolumeAnalysis/salesVolumeAnalysis' } { key: 'panel', unit: '双镀销量·万㎡', path: '/salesVolumeAnalysis/salesVolumeAnalysis' }
]; ];
// 遍历映射关系,转换数据 // 遍历映射关系,转换数据

View File

@@ -30,14 +30,7 @@ export default {
props: ["name", "size", "icon",'itemList'], props: ["name", "size", "icon",'itemList'],
data() { data() {
return { return {
itemList: [ itemList: [],
// { unit: "营业收入·万元", targetValue: 16, currentValue: 14.5, progress: 90 },
// { unit: "经营性利润·万元", targetValue: 16, currentValue: 15.2, progress: 85 },
// { unit: "利润总额·万元", targetValue: 16, currentValue: 15.2, progress: 85 },
// { unit: "毛利率·%", targetValue: 16, currentValue: 15.2, progress: 85 },
// { unit: "销量·万㎡", targetValue: 20, currentValue: 16, progress: 80 },
// { unit: "双镀面板·万㎡", targetValue: 15, currentValue: 13.8, progress: 92 }
],
// 拖拽相关状态 // 拖拽相关状态
isDragging: false, // 是否正在拖拽 isDragging: false, // 是否正在拖拽
startX: 0, // 拖拽开始时的鼠标X坐标 startX: 0, // 拖拽开始时的鼠标X坐标

View File

@@ -53,7 +53,7 @@ export default {
{ unit: "利润总额·万元", targetValue: 16, currentValue: 15.2, progress: 85 }, { unit: "利润总额·万元", targetValue: 16, currentValue: 15.2, progress: 85 },
{ unit: "毛利率·%", targetValue: 16, currentValue: 15.2, progress: 85 }, { unit: "毛利率·%", targetValue: 16, currentValue: 15.2, progress: 85 },
{ unit: "销量·万㎡", targetValue: 20, currentValue: 16, progress: 80 }, { unit: "销量·万㎡", targetValue: 20, currentValue: 16, progress: 80 },
{ unit: "双镀面板·万㎡", targetValue: 15, currentValue: 13.8, progress: 92 } { unit: "双镀销量·万㎡", targetValue: 15, currentValue: 13.8, progress: 92 }
], ],
// 拖拽相关状态 // 拖拽相关状态
isDragging: false, // 是否正在拖拽 isDragging: false, // 是否正在拖拽

View File

@@ -56,7 +56,7 @@ export default {
progress: 80 progress: 80
}, },
{ {
unit: "双镀面板·万㎡", unit: "双镀销量·万㎡",
targetValue: 15, targetValue: 15,
currentValue: 13.8, currentValue: 13.8,
progress: 92 progress: 92