Merge pull request 'zhp' (#21) from zhp into test

Reviewed-on: #21
Bu işleme şunda yer alıyor:
高天泽 2023-09-11 16:11:04 +08:00
işleme d1c93cbf46
5 değiştirilmiş dosya ile 479 ekleme ve 1 silme

Dosyayı Görüntüle

@ -1,3 +1,10 @@
/*
* @Author: zhp
* @Date: 2023-08-28 14:29:51
* @LastEditTime: 2023-08-31 14:33:46
* @LastEditors: zhp
* @Description:
*/
import request from '@/utils/request'
// 创建产线工段

Dosyayı Görüntüle

@ -0,0 +1,159 @@
<!--
* @Author: zhp
* @Date: 2023-09-11 14:21:21
* @LastEditTime: 2023-09-11 14:26:04
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData" />
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
</div>
</template>
<script>
import basicPage from '../../mixins/basic-page';
import { parseTime } from '../../mixins/code-filter';
import { getLineBindProductLogPage } from '@/api/core/base/lineBindProductLog';
import { getProductionLinePage } from '@/api/core/base/productionLine';
import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
const tableProps = [
{
prop: 'productionLineName',
label: '产线名称',
align: 'center',
},
{
prop: '',
label: '工段名称',
align: 'center',
},
{
prop: '',
label: '进片数量/片',
align: 'center',
},
{
prop: '',
label: '出片数量/片',
align: 'center',
},
{
prop: '',
label: '损耗数量/片',
align: 'center',
},
{
prop: '',
label: '损耗面积/m²',
align: 'center',
},
{
prop: '',
label: '损耗比例/%',
align: 'center',
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getLineBindProductLogPage,
},
tableProps,
tableData: [],
optionArrUrl: [getProductionLinePage, getWorkshopSectionPage],
formConfig: [
{
type: 'select',
label: '产线',
selectOptions: [],
param: 'productionLineId',
defaultSelect: '',
filterable: true,
},
{
type: 'datePicker',
label: '时间',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'createTime',
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
{
type: 'button',
btnName: '导出',
name: 'export',
},
],
};
},
components: {
},
created() {
this.getArr();
},
methods: {
getArr() {
const params = {
page: 1,
limit: 500,
};
this.optionArrUrl.forEach((item, index) => {
item(params).then((response) => {
this.formConfig[index].selectOptions = response.data.list;
});
});
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.productionLineId = val.productionLineId;
this.listQuery.productId = val.productId;
this.listQuery.createTime = val.createTime;
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
default:
console.log(val);
}
},
},
};
</script>

Dosyayı Görüntüle

@ -0,0 +1,152 @@
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData" />
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
</div>
</template>
<script>
import basicPage from '../../mixins/basic-page';
import { parseTime } from '../../mixins/code-filter';
import { getLineBindProductLogPage } from '@/api/core/base/lineBindProductLog';
import { getProductionLinePage } from '@/api/core/base/productionLine';
import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
const tableProps = [
{
prop: 'productionLineName',
label: '产线',
align: 'center',
},
{
prop: '',
label: '合计',
align: 'center',
},
{
prop: '',
label: '进片数量/片',
align: 'center',
},
{
prop: '',
label: '出片数量/片',
align: 'center',
},
{
prop: '',
label: '损耗数量/片',
align: 'center',
},
{
prop: '',
label: '损耗面积/m²',
align: 'center',
},
{
prop: '',
label: '损耗比例/%',
align: 'center',
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getLineBindProductLogPage,
},
tableProps,
tableData: [],
optionArrUrl: [getProductionLinePage, getWorkshopSectionPage],
formConfig: [
{
type: 'select',
label: '产线',
selectOptions: [],
param: 'productionLineId',
defaultSelect: '',
filterable: true,
},
{
type: 'datePicker',
label: '时间',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'createTime',
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
{
type: 'button',
btnName: '导出',
name: 'export',
},
],
};
},
components: {
},
created() {
this.getArr();
},
methods: {
getArr() {
const params = {
page: 1,
limit: 500,
};
this.optionArrUrl.forEach((item, index) => {
item(params).then((response) => {
this.formConfig[index].selectOptions = response.data.list;
});
});
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.productionLineId = val.productionLineId;
this.listQuery.productId = val.productId;
this.listQuery.createTime = val.createTime;
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
default:
console.log(val);
}
},
},
};
</script>

Dosyayı Görüntüle

@ -195,7 +195,7 @@ export default {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.pageSize = 10;.7
this.listQuery.name = val.name;
this.getDataList();
break;

Dosyayı Görüntüle

@ -0,0 +1,160 @@
<template>
<div class="app-container">
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData" />
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
</div>
</template>
<script>
import basicPage from '../../mixins/basic-page';
import { parseTime } from '../../mixins/code-filter';
import { getLineBindProductLogPage } from '@/api/core/base/lineBindProductLog';
import { getProductionLinePage } from '@/api/core/base/productionLine';
import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
const tableProps = [
{
prop: 'productionLineName',
label: '产线名称',
align: 'center',
},
{
prop: '',
label: '工段名称',
align: 'center',
},
{
prop: '',
label: '进片数量/片',
align: 'center',
},
{
prop: '',
label: '出片数量/片',
align: 'center',
},
{
prop: '',
label: '损耗数量/片',
align: 'center',
},
{
prop: '',
label: '损耗面积/m²',
align: 'center',
},
{
prop: '',
label: '损耗比例/%',
align: 'center',
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: getLineBindProductLogPage,
},
tableProps,
tableData: [],
optionArrUrl: [getProductionLinePage, getWorkshopSectionPage],
formConfig: [
{
type: 'select',
label: '产线',
selectOptions: [],
param: 'productionLineId',
defaultSelect: '',
filterable: true,
},
{
type: 'select',
label: '工段',
selectOptions: [],
param: 'productId',
defaultSelect: '',
filterable: true,
},
{
type: 'datePicker',
label: '时间',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'createTime',
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
{
type: 'button',
btnName: '导出',
name: 'export',
},
],
};
},
components: {
},
created() {
this.getArr();
},
methods: {
getArr() {
const params = {
page: 1,
limit: 500,
};
this.optionArrUrl.forEach((item, index) => {
item(params).then((response) => {
this.formConfig[index].selectOptions = response.data.list;
});
});
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.productionLineId = val.productionLineId;
this.listQuery.productId = val.productId;
this.listQuery.createTime = val.createTime;
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
default:
console.log(val);
}
},
},
};
</script>