驾驶舱&基础信息配置
This commit is contained in:
4
.env.dev
4
.env.dev
@@ -10,11 +10,11 @@ VUE_APP_TITLE = 洛玻集团驾驶舱
|
||||
# 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://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'
|
||||
|
||||
|
||||
109
src/api/basicInfoConfig.js
Normal file
109
src/api/basicInfoConfig.js
Normal 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,
|
||||
});
|
||||
}
|
||||
@@ -83,7 +83,10 @@ export const DICT_TYPE = {
|
||||
PROMOTION_CONDITION_TYPE: 'promotion_condition_type', // 营销的条件类型枚举
|
||||
|
||||
// ========== 模块 ==========
|
||||
LB_DW: 'lb_dw'
|
||||
LB_DW: 'lb_dw',
|
||||
PROCESS:'process',
|
||||
IMPORTANT_WORK_METHOD:'important_work_method'
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,10 +12,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属基地" prop="daySpan">
|
||||
<el-select v-model="form.daySpan" placeholder="请选择" style="width: 100%;">
|
||||
<el-option label="否" :value= '0' ></el-option>
|
||||
<el-option label="是" :value= '1' ></el-option>
|
||||
<el-form-item label="所属基地" prop="factoryList">
|
||||
<el-select v-model="form.factoryList" placeholder="请选择" style="width: 100%;" multiple>
|
||||
<el-option v-for='item in facList' :key='item.value' :label="item.name" :value= 'item.value' ></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -23,7 +22,7 @@
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
// import { getGroupClasses, updateGroupClasses, createGroupClasses, getCode } from '@/api/base/groupClasses'
|
||||
import { addCustomerConfig, updateCustomerConfig, getCustomerConfig } from '@/api/basicInfoConfig'
|
||||
export default {
|
||||
name: 'CustomerInfoAdd',
|
||||
data() {
|
||||
@@ -32,14 +31,24 @@ export default {
|
||||
id: '',
|
||||
name: '',
|
||||
code: '',
|
||||
daySpan:'',
|
||||
factoryList:'',
|
||||
},
|
||||
isEdit: false, //是否是编辑
|
||||
rules: {
|
||||
name: [{ 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: {
|
||||
@@ -47,11 +56,11 @@ export default {
|
||||
if (id) {
|
||||
this.isEdit = true
|
||||
this.form.id = id
|
||||
// getGroupClasses(id).then((res) => {
|
||||
// if (res.code === 0) {
|
||||
// this.form = res.data
|
||||
// }
|
||||
// })
|
||||
getCustomerConfig({id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.form = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
submitForm() {
|
||||
@@ -59,14 +68,14 @@ export default {
|
||||
if (valid) {
|
||||
if (this.isEdit) {
|
||||
//编辑
|
||||
updateGroupClasses({ ...this.form }).then((res) => {
|
||||
updateCustomerConfig({ ...this.form }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.$emit('successSubmit')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
createGroupClasses({ ...this.form }).then((res) => {
|
||||
addCustomerConfig({ ...this.form }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.$emit('successSubmit')
|
||||
|
||||
@@ -2,22 +2,21 @@
|
||||
<el-form ref="form" :rules="rules" label-width="120px" :model="form">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="重点工作" prop="name">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
<el-form-item label="重点工作" prop="importantWork">
|
||||
<el-input v-model="form.importantWork"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单位" prop="daySpan">
|
||||
<el-select v-model="form.daySpan" placeholder="请选择" style="width: 100%;">
|
||||
<el-option label="个" :value= '0' ></el-option>
|
||||
<el-option label="件" :value= '1' ></el-option>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-select v-model="form.unit" placeholder="请选择" style="width: 100%;">
|
||||
<el-option v-for='item in unitList' :key='item.value' :label="item.label" :value= 'item.value' ></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属年份" prop="daySpan1">
|
||||
<el-form-item label="所属年份" prop="time">
|
||||
<el-date-picker
|
||||
v-model="value3"
|
||||
v-model="form.time"
|
||||
type="year"
|
||||
placeholder="选择年"
|
||||
style="width: 100%;">
|
||||
@@ -25,10 +24,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="累计值计算方式" prop="daySpan2">
|
||||
<el-select v-model="form.daySpan" placeholder="请选择" style="width: 100%;">
|
||||
<el-option label="月" :value= '0' ></el-option>
|
||||
<el-option label="日" :value= '1' ></el-option>
|
||||
<el-form-item label="累计值计算方式" prop="calculateMethod">
|
||||
<el-select v-model="form.calculateMethod" placeholder="请选择" style="width: 100%;">
|
||||
<el-option v-for='item in calculateMethodList' :key='item.value' :label="item.label" :value= 'item.value' ></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -36,24 +34,29 @@
|
||||
</el-form>
|
||||
</template>
|
||||
<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 {
|
||||
name: 'groupKeyAdd',
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
id: '',
|
||||
name: '',
|
||||
code: '',
|
||||
daySpan:'',
|
||||
importantWork: '',
|
||||
unit: '',
|
||||
time:'',
|
||||
calculateMethod:''
|
||||
},
|
||||
isEdit: false, //是否是编辑
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入重点工作', trigger: 'blur' }],
|
||||
daySpan: [{ required: true, message: '请选择单位', trigger: 'change' }],
|
||||
daySpan1: [{ required: true, message: '请选择所属年份', trigger: 'change' }],
|
||||
daySpan2: [{ required: true, message: '请选择累计值计算方式', trigger: 'change' }],
|
||||
}
|
||||
importantWork: [{ required: true, message: '请输入重点工作', trigger: 'blur' }],
|
||||
unit: [{ required: true, message: '请选择单位', trigger: 'change' }],
|
||||
time: [{ required: true, message: '请选择所属年份', trigger: 'change' }],
|
||||
calculateMethod: [{ required: true, message: '请选择累计值计算方式', trigger: 'change' }],
|
||||
},
|
||||
unitList:getDictDatas('lb_dw'),
|
||||
calculateMethodList:getDictDatas('important_work_method')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -61,26 +64,27 @@ export default {
|
||||
if (id) {
|
||||
this.isEdit = true
|
||||
this.form.id = id
|
||||
// getGroupClasses(id).then((res) => {
|
||||
// if (res.code === 0) {
|
||||
// this.form = res.data
|
||||
// }
|
||||
// })
|
||||
getImportantWorkConfig({id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.form = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.time = moment(this.form.time).endOf('year').endOf('month').endOf('day').unix() * 1000
|
||||
if (this.isEdit) {
|
||||
//编辑
|
||||
updateGroupClasses({ ...this.form }).then((res) => {
|
||||
updateImportantWorkConfig({ ...this.form }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.$emit('successSubmit')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
createGroupClasses({ ...this.form }).then((res) => {
|
||||
addImportantWorkConfig({ ...this.form }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.$emit('successSubmit')
|
||||
|
||||
@@ -2,20 +2,19 @@
|
||||
<el-form ref="form" :rules="rules" label-width="110px" :model="form">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="产品名称" prop="name">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
<el-form-item label="产品名称" prop="product">
|
||||
<el-input v-model="form.product"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="规格" prop="code">
|
||||
<el-input v-model="form.code"></el-input>
|
||||
<el-form-item label="规格" prop="spec">
|
||||
<el-input v-model="form.spec"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工艺" prop="daySpan">
|
||||
<el-select v-model="form.daySpan" placeholder="请选择" style="width: 100%;">
|
||||
<el-option label="否" :value= '0' ></el-option>
|
||||
<el-option label="是" :value= '1' ></el-option>
|
||||
<el-form-item label="工艺" prop="process">
|
||||
<el-select v-model="form.process" placeholder="请选择" style="width: 100%;">
|
||||
<el-option v-for='item in processList' :key='item.value' :label="item.label" :value= 'item.value' ></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -23,23 +22,23 @@
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
// import { getGroupClasses, updateGroupClasses, createGroupClasses, getCode } from '@/api/base/groupClasses'
|
||||
import { addProductConfig, updateProductConfig, getProductConfig } from '@/api/basicInfoConfig'
|
||||
import {getDictDatas } from '@/utils/dict'
|
||||
export default {
|
||||
name: 'ProductInfoAdd',
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
id: '',
|
||||
name: '',
|
||||
code: '',
|
||||
daySpan:'',
|
||||
product: '',
|
||||
spec: '',
|
||||
process:'',
|
||||
},
|
||||
isEdit: false, //是否是编辑
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入产品名称', trigger: 'blur' }],
|
||||
code: [{ required: true, message: '请输入产品规格', trigger: 'blur' }],
|
||||
daySpan: [{ required: true, message: '请选择工艺', trigger: 'change' }],
|
||||
}
|
||||
product: [{ required: true, message: '请输入产品名称', trigger: 'blur' }]
|
||||
},
|
||||
processList:getDictDatas('process')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -47,11 +46,13 @@ export default {
|
||||
if (id) {
|
||||
this.isEdit = true
|
||||
this.form.id = id
|
||||
// getGroupClasses(id).then((res) => {
|
||||
// if (res.code === 0) {
|
||||
// this.form = res.data
|
||||
// }
|
||||
// })
|
||||
getProductConfig({id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.form = res.data
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.form.id = ''
|
||||
}
|
||||
},
|
||||
submitForm() {
|
||||
@@ -59,14 +60,14 @@ export default {
|
||||
if (valid) {
|
||||
if (this.isEdit) {
|
||||
//编辑
|
||||
updateGroupClasses({ ...this.form }).then((res) => {
|
||||
updateProductConfig({ ...this.form }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.$emit('successSubmit')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
createGroupClasses({ ...this.form }).then((res) => {
|
||||
addProductConfig({ ...this.form }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.$emit('successSubmit')
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
<script>
|
||||
import CustomerInfoAdd from './components/customerInfoAdd.vue';
|
||||
import { getCustomerConfigPage,delCustomerConfig } from '@/api/basicInfoConfig';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
@@ -32,8 +33,9 @@ const tableProps = [
|
||||
label: '客户编码'
|
||||
},
|
||||
{
|
||||
prop: 'jd',
|
||||
label: '所属基地'
|
||||
prop: 'factoryNameList',
|
||||
label: '所属基地',
|
||||
filter: (val) => val ? val.join(',') :'-'
|
||||
},
|
||||
];
|
||||
export default {
|
||||
@@ -46,13 +48,13 @@ export default {
|
||||
type: 'input',
|
||||
label: '客户名称',
|
||||
placeholder: '客户名称',
|
||||
param: 'cName'
|
||||
param: 'name'
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '客户编码',
|
||||
placeholder: '客户编码',
|
||||
param: 'ccode'
|
||||
param: 'code'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@@ -72,11 +74,13 @@ export default {
|
||||
}
|
||||
],
|
||||
listQuery:{
|
||||
name:'',
|
||||
code:'',
|
||||
pageSize:20,
|
||||
pageNo:1
|
||||
},
|
||||
total:2,
|
||||
tableData:[{name:'111',id:1}],
|
||||
total:0,
|
||||
tableData:[],
|
||||
tableProps,
|
||||
tableBtn:[
|
||||
{
|
||||
@@ -92,13 +96,18 @@ export default {
|
||||
centervisible: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getDataList();
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.name = val.name
|
||||
this.listQuery.code = val.code
|
||||
this.listQuery.pageNo = 1;
|
||||
this.getList();
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
@@ -110,7 +119,15 @@ export default {
|
||||
}
|
||||
},
|
||||
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) {
|
||||
switch (val.type) {
|
||||
@@ -135,14 +152,15 @@ export default {
|
||||
},
|
||||
successSubmit() {
|
||||
this.handleCancel();
|
||||
this.getList();
|
||||
this.getDataList();
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('确定删除客户"' + row.name + '吗?').then(function() {
|
||||
deleteModel(row.id).then(response => {
|
||||
that.getList();
|
||||
that.$modal.msgSuccess("删除成功");
|
||||
let _this = this;
|
||||
_this.$modal.confirm('确定删除客户"' + row.name + '吗?').then(function() {
|
||||
delCustomerConfig({id:row.id}).then(response => {
|
||||
_this.$modal.msgSuccess("删除成功");
|
||||
_this.getDataList();
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
@@ -22,22 +22,28 @@
|
||||
|
||||
<script>
|
||||
import GroupKeyAdd from './components/groupKeyAdd.vue';
|
||||
import { getImportantWorkConfigPage,delImportantWorkConfig } from '@/api/basicInfoConfig';
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
import moment from 'moment';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
prop: 'importantWork',
|
||||
label: '重点工作'
|
||||
},
|
||||
{
|
||||
prop: 'code1',
|
||||
label: '单位'
|
||||
prop: 'unit',
|
||||
label: '单位',
|
||||
filter: publicFormatter('lb_dw')
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '所属年份'
|
||||
prop: 'time',
|
||||
label: '所属年份',
|
||||
filter: (val) => val ? moment(val).format('YYYY') : '-'
|
||||
},
|
||||
{
|
||||
prop: 'jd',
|
||||
label: '累计值计算方式'
|
||||
prop: 'calculateMethod',
|
||||
label: '累计值计算方式',
|
||||
filter: publicFormatter('important_work_method')
|
||||
},
|
||||
];
|
||||
export default {
|
||||
@@ -50,7 +56,7 @@ export default {
|
||||
type: 'input',
|
||||
label: '重点工作',
|
||||
placeholder: '重点工作',
|
||||
param: 'cName'
|
||||
param: 'importantWork'
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
@@ -59,7 +65,7 @@ export default {
|
||||
format: 'yyyy',
|
||||
valueFormat: 'yyyy',
|
||||
placeholder: '所属年份',
|
||||
param: 'searchTime1',
|
||||
param: 'time',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
@@ -80,11 +86,13 @@ export default {
|
||||
}
|
||||
],
|
||||
listQuery:{
|
||||
importantWork:'',
|
||||
time:'',
|
||||
pageSize:20,
|
||||
pageNo:1
|
||||
},
|
||||
total:2,
|
||||
tableData:[{name:'111'}],
|
||||
total:0,
|
||||
tableData:[],
|
||||
tableProps,
|
||||
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: {
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
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.getList();
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
@@ -119,7 +133,15 @@ export default {
|
||||
}
|
||||
},
|
||||
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) {
|
||||
switch (val.type) {
|
||||
@@ -144,14 +166,16 @@ export default {
|
||||
},
|
||||
successSubmit() {
|
||||
this.handleCancel();
|
||||
this.getList();
|
||||
this.getDataList();
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('确定删除重点工作"' + row.name + '吗?').then(function() {
|
||||
deleteModel(row.id).then(response => {
|
||||
that.getList();
|
||||
that.$modal.msgSuccess("删除成功");
|
||||
let _this = this;
|
||||
_this.$modal.confirm('确定删除重点工作"' + row.importantWork + '吗?').then(function() {
|
||||
delImportantWorkConfig({id:row.id}).then(response => {
|
||||
_this.$modal.msgSuccess("删除成功");
|
||||
_this.getDataList();
|
||||
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
@@ -22,17 +22,20 @@
|
||||
|
||||
<script>
|
||||
import ProductInfoAdd from './components/productInfoAdd.vue';
|
||||
import { getProductConfigPage,delProductConfig } from '@/api/basicInfoConfig';
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
prop: 'product',
|
||||
label: '产品名称'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '工艺'
|
||||
prop: 'process',
|
||||
label: '工艺',
|
||||
filter: publicFormatter('process')
|
||||
},
|
||||
{
|
||||
prop: 'jd',
|
||||
prop: 'spec',
|
||||
label: '规格'
|
||||
},
|
||||
];
|
||||
@@ -46,7 +49,7 @@ export default {
|
||||
type: 'input',
|
||||
label: '产品名称',
|
||||
placeholder: '产品名称',
|
||||
param: 'cName'
|
||||
param: 'product'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@@ -66,11 +69,12 @@ export default {
|
||||
}
|
||||
],
|
||||
listQuery:{
|
||||
product:'',
|
||||
pageSize:20,
|
||||
pageNo:1
|
||||
},
|
||||
total:2,
|
||||
tableData:[{name:'111'}],
|
||||
total:0,
|
||||
tableData:[],
|
||||
tableProps,
|
||||
tableBtn:[
|
||||
{
|
||||
@@ -87,13 +91,16 @@ export default {
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getDataList();
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.product = val.product;
|
||||
this.listQuery.pageNo = 1;
|
||||
this.getList();
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
@@ -105,7 +112,17 @@ export default {
|
||||
}
|
||||
},
|
||||
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) {
|
||||
switch (val.type) {
|
||||
@@ -130,14 +147,15 @@ export default {
|
||||
},
|
||||
successSubmit() {
|
||||
this.handleCancel();
|
||||
this.getList();
|
||||
this.getDataList();
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('确定删除产品"' + row.name + '吗?').then(function() {
|
||||
deleteModel(row.id).then(response => {
|
||||
that.getList();
|
||||
that.$modal.msgSuccess("删除成功");
|
||||
let _this = this;
|
||||
_this.$modal.confirm('确定删除产品"' + row.product + '吗?').then(function() {
|
||||
delProductConfig({id:row.id}).then(response => {
|
||||
_this.getDataList();
|
||||
_this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export default {
|
||||
completed: 1 // 销量超额达标
|
||||
},
|
||||
{
|
||||
name: "双镀面板",
|
||||
name: "双镀销量",
|
||||
targetValue: 0,
|
||||
value: 0,
|
||||
proportion: 0,
|
||||
@@ -113,7 +113,7 @@ export default {
|
||||
"单价": "unitPrice",
|
||||
"净价": "netPrice",
|
||||
"销量": "sales",
|
||||
"双镀面板": "panel",
|
||||
"双镀销量": "panel",
|
||||
"溢价产品销量": "premiumProduct"
|
||||
};
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ export default {
|
||||
itemStyle: { color: 'rgba(39, 96, 255, 1)' }
|
||||
},
|
||||
{
|
||||
value: 735, name: '双镀面板',
|
||||
value: 735, name: '双镀销量',
|
||||
label: {
|
||||
normal: {
|
||||
align: 'left',
|
||||
|
||||
@@ -77,7 +77,7 @@ export default {
|
||||
{ key: 'unitPrice', unit: '单价·元/㎡', path: '/unitPriceAnalysis/unitPriceAnalysis' },
|
||||
{ key: 'netPrice', unit: '净价·元/㎡', path: '/netPriceAnalysis/netPriceAnalysis' },
|
||||
{ key: 'sales', unit: '销量·万㎡', path: '/salesVolumeAnalysis/salesVolumeAnalysis' },
|
||||
{ key: 'panel', unit: '双镀面板·万㎡', path: '/salesVolumeAnalysis/salesVolumeAnalysis' }
|
||||
{ key: 'panel', unit: '双镀销量·万㎡', path: '/salesVolumeAnalysis/salesVolumeAnalysis' }
|
||||
];
|
||||
|
||||
// 遍历映射关系,转换数据
|
||||
|
||||
@@ -30,14 +30,7 @@ export default {
|
||||
props: ["name", "size", "icon",'itemList'],
|
||||
data() {
|
||||
return {
|
||||
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 }
|
||||
],
|
||||
itemList: [],
|
||||
// 拖拽相关状态
|
||||
isDragging: false, // 是否正在拖拽
|
||||
startX: 0, // 拖拽开始时的鼠标X坐标
|
||||
|
||||
@@ -53,7 +53,7 @@ export default {
|
||||
{ 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 }
|
||||
{ unit: "双镀销量·万㎡", targetValue: 15, currentValue: 13.8, progress: 92 }
|
||||
],
|
||||
// 拖拽相关状态
|
||||
isDragging: false, // 是否正在拖拽
|
||||
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
progress: 80
|
||||
},
|
||||
{
|
||||
unit: "双镀面板·万㎡",
|
||||
unit: "双镀销量·万㎡",
|
||||
targetValue: 15,
|
||||
currentValue: 13.8,
|
||||
progress: 92
|
||||
|
||||
Reference in New Issue
Block a user