feat(produce): 完善统计、菜单与扫码搜索
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
if (!$schema->hasTable('sys_menu')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$icons = [
|
||||
'article' => 'ant-design:read-outlined',
|
||||
'article:index' => 'ant-design:file-text-outlined',
|
||||
'article:category:index' => 'ant-design:folder-open-outlined',
|
||||
'article:tag:index' => 'ant-design:tags-outlined',
|
||||
'article:recycle:index' => 'ant-design:delete-outlined',
|
||||
];
|
||||
foreach ($icons as $code => $icon) {
|
||||
$schema->getConnection()->table('sys_menu')->where('app', 'article')->where('code', $code)->update([
|
||||
'icon' => $icon,
|
||||
'updated_at' => time(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
}
|
||||
};
|
||||
@@ -11,7 +11,7 @@ return [
|
||||
'code' => 'article',
|
||||
'app' => 'article',
|
||||
'path' => '/article',
|
||||
'icon' => 'plugin',
|
||||
'icon' => 'ant-design:read-outlined',
|
||||
'children' => [
|
||||
[
|
||||
'name' => '内容中心',
|
||||
@@ -19,6 +19,7 @@ return [
|
||||
'app' => 'article',
|
||||
'path' => '/article/index',
|
||||
'component' => '/article/content/index',
|
||||
'icon' => 'ant-design:file-text-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '内容分类',
|
||||
@@ -26,6 +27,7 @@ return [
|
||||
'app' => 'article',
|
||||
'path' => '/article/category',
|
||||
'component' => '/article/category/index',
|
||||
'icon' => 'ant-design:folder-open-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '标签管理',
|
||||
@@ -33,6 +35,7 @@ return [
|
||||
'app' => 'article',
|
||||
'path' => '/article/tag',
|
||||
'component' => '/article/tag/index',
|
||||
'icon' => 'ant-design:tags-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '内容回收站',
|
||||
@@ -40,6 +43,7 @@ return [
|
||||
'app' => 'article',
|
||||
'path' => '/article/recycle',
|
||||
'component' => '/article/recycle/index',
|
||||
'icon' => 'ant-design:delete-outlined',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
@@ -41,14 +41,13 @@ class ScanDataDao extends BaseDao
|
||||
{
|
||||
$query = $this->query();
|
||||
|
||||
if (($where['keyword'] ?? '') !== '') {
|
||||
$query->where(function (Builder $builder) use ($where) {
|
||||
$keyword = '%' . $where['keyword'] . '%';
|
||||
$builder->where('order_no', 'like', $keyword)
|
||||
->orWhere('user_code', 'like', $keyword)
|
||||
->orWhere('operator', 'like', $keyword)
|
||||
->orWhere('remark', 'like', $keyword);
|
||||
});
|
||||
foreach (['order_no', 'user_code', 'operator', 'remark'] as $field) {
|
||||
$value = trim((string) ($where['LIKE_' . $field] ?? ''));
|
||||
if ($value === '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$query->where($field, 'like', '%' . $value . '%');
|
||||
}
|
||||
|
||||
if (($where['process_id'] ?? '') !== '') {
|
||||
|
||||
@@ -5,11 +5,18 @@ declare(strict_types=1);
|
||||
namespace plugin\produce\app\service\admin;
|
||||
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use plugin\produce\app\model\ExceptionRecord;
|
||||
use plugin\produce\app\model\Process;
|
||||
use plugin\produce\app\model\ProcessStep;
|
||||
use plugin\produce\app\model\ProductRecord;
|
||||
use plugin\produce\app\model\ProduceConfig;
|
||||
use plugin\produce\app\model\RepairRecord;
|
||||
use plugin\produce\app\model\ScanData;
|
||||
|
||||
class WorkStatisticsService
|
||||
{
|
||||
private ?array $repairFlow = null;
|
||||
|
||||
public function monthly(array $params): array
|
||||
{
|
||||
$month = $this->normalizeMonth($params['month'] ?? null);
|
||||
@@ -44,9 +51,70 @@ class WorkStatisticsService
|
||||
$rows = array_merge($rows, $this->queryProductRecord($params, $start, $end, $periodExpression)->get()->all());
|
||||
}
|
||||
|
||||
if ($dataType === 'all' || $dataType === 'exception') {
|
||||
$rows = array_merge($rows, $this->queryExceptionRecord($params, $start, $end, $periodExpression)->get()->all());
|
||||
}
|
||||
|
||||
if ($dataType === 'all' || $dataType === 'repair') {
|
||||
$rows = array_merge($rows, $this->queryRepairRecord($params, $start, $end, $periodExpression)->get()->all());
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
private function queryExceptionRecord(array $params, int $start, int $end, callable $periodExpression): Builder
|
||||
{
|
||||
$model = new ExceptionRecord();
|
||||
$connection = $model->getConnection();
|
||||
$table = $model->getTable();
|
||||
$processTable = 'produce_process';
|
||||
$stepTable = 'produce_process_step';
|
||||
$query = $connection->table($table)
|
||||
->leftJoin($processTable, $processTable . '.id', '=', $table . '.process_id')
|
||||
->leftJoin($stepTable, $stepTable . '.id', '=', $table . '.step_id')
|
||||
->whereBetween($table . '.reported_at', [$start, $end])
|
||||
->whereNull($table . '.deleted_at');
|
||||
|
||||
$this->applyStatisticsFilters($query, $params, $table, $processTable, $stepTable, 'reporter');
|
||||
return $query->select([$table . '.user_code', $table . '.reporter as operator'])
|
||||
->selectRaw($periodExpression($connection->getTablePrefix() . $table . '.reported_at') . ' as period')
|
||||
->selectRaw($connection->getTablePrefix() . $processTable . '.process_name as process_name')
|
||||
->selectRaw($connection->getTablePrefix() . $stepTable . '.step_name as step_name')
|
||||
->selectRaw('COUNT(*) as amount')
|
||||
->groupBy('user_code', 'operator', 'process_name', 'step_name', 'period');
|
||||
}
|
||||
|
||||
private function queryRepairRecord(array $params, int $start, int $end, callable $periodExpression): Builder
|
||||
{
|
||||
$model = new RepairRecord();
|
||||
$exceptionModel = new ExceptionRecord();
|
||||
$connection = $model->getConnection();
|
||||
$table = $model->getTable();
|
||||
$exceptionTable = $exceptionModel->getTable();
|
||||
$flow = $this->getRepairFlow();
|
||||
$query = $connection->table($table)
|
||||
->leftJoin($exceptionTable, $exceptionTable . '.id', '=', $table . '.exception_id')
|
||||
->whereBetween($table . '.repaired_at', [$start, $end])
|
||||
->whereNull($table . '.deleted_at');
|
||||
|
||||
if (!$this->matchesRepairFlow($params, $flow)) {
|
||||
$query->whereRaw('1 = 0');
|
||||
}
|
||||
if (($params['user_code'] ?? '') !== '') {
|
||||
$query->where($exceptionTable . '.user_code', 'like', '%' . $params['user_code'] . '%');
|
||||
}
|
||||
if (($params['operator'] ?? '') !== '') {
|
||||
$query->where($table . '.operator', 'like', '%' . $params['operator'] . '%');
|
||||
}
|
||||
|
||||
return $query->select([$exceptionTable . '.user_code', $table . '.operator'])
|
||||
->selectRaw($periodExpression($connection->getTablePrefix() . $table . '.repaired_at') . ' as period')
|
||||
->selectRaw('? as process_name', [$flow['process_name']])
|
||||
->selectRaw('? as step_name', [$flow['step_name']])
|
||||
->selectRaw('COUNT(*) as amount')
|
||||
->groupBy('user_code', 'operator', 'process_name', 'step_name', 'period');
|
||||
}
|
||||
|
||||
private function queryScanData(array $params, int $start, int $end, callable $periodExpression): Builder
|
||||
{
|
||||
$scanDataModel = new ScanData();
|
||||
@@ -61,7 +129,7 @@ class WorkStatisticsService
|
||||
->whereBetween($scanDataTable . '.scan_time', [$start, $end])
|
||||
->whereNull($scanDataTable . '.deleted_at');
|
||||
|
||||
foreach (['process_id', 'step_id', 'scan_result'] as $field) {
|
||||
foreach (['process_id', 'step_id'] as $field) {
|
||||
if (($params[$field] ?? '') !== '') {
|
||||
$query->where($scanDataTable . '.' . $field, $params[$field]);
|
||||
}
|
||||
@@ -139,6 +207,65 @@ class WorkStatisticsService
|
||||
->orderBy('step_name');
|
||||
}
|
||||
|
||||
private function applyStatisticsFilters(Builder $query, array $params, string $table, string $processTable, string $stepTable, string $operatorField): void
|
||||
{
|
||||
foreach (['process_id', 'step_id', 'scan_result'] as $field) {
|
||||
if (($params[$field] ?? '') !== '') {
|
||||
$query->where($table . '.' . $field, $params[$field]);
|
||||
}
|
||||
}
|
||||
if (($params['user_code'] ?? '') !== '') {
|
||||
$query->where($table . '.user_code', 'like', '%' . $params['user_code'] . '%');
|
||||
}
|
||||
if (($params['operator'] ?? '') !== '') {
|
||||
$query->where($table . '.' . $operatorField, 'like', '%' . $params['operator'] . '%');
|
||||
}
|
||||
foreach (['process_name' => $processTable . '.process_name', 'step_name' => $stepTable . '.step_name'] as $field => $column) {
|
||||
if (($params[$field] ?? '') !== '') {
|
||||
$query->where($column, 'like', '%' . $params[$field] . '%');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function matchesRepairFlow(array $params, array $flow): bool
|
||||
{
|
||||
if (($params['process_id'] ?? '') !== '' && (string) $params['process_id'] !== (string) $flow['process_id']) {
|
||||
return false;
|
||||
}
|
||||
if (($params['step_id'] ?? '') !== '' && (string) $params['step_id'] !== (string) $flow['step_id']) {
|
||||
return false;
|
||||
}
|
||||
if (($params['process_name'] ?? '') !== '' && !str_contains($flow['process_name'], (string) $params['process_name'])) {
|
||||
return false;
|
||||
}
|
||||
return ($params['step_name'] ?? '') === '' || str_contains($flow['step_name'], (string) $params['step_name']);
|
||||
}
|
||||
|
||||
private function getRepairFlow(): array
|
||||
{
|
||||
if ($this->repairFlow !== null) {
|
||||
return $this->repairFlow;
|
||||
}
|
||||
$configs = ProduceConfig::query()
|
||||
->whereIn('group_code', ['basic_setting', 'repair_flow'])
|
||||
->whereIn('code', ['repair_process_id', 'repair_step_id'])
|
||||
->get(['group_code', 'code', 'content'])
|
||||
->groupBy('group_code');
|
||||
$basic = $configs->get('basic_setting', collect())->pluck('content', 'code');
|
||||
$flow = $configs->get('repair_flow', collect())->pluck('content', 'code');
|
||||
$processId = (int) (($basic['repair_process_id'] ?? '') ?: ($flow['repair_process_id'] ?? 0));
|
||||
$stepId = (int) (($basic['repair_step_id'] ?? '') ?: ($flow['repair_step_id'] ?? 0));
|
||||
$process = $processId > 0 ? Process::query()->withTrashed()->find($processId) : null;
|
||||
$step = $stepId > 0 ? ProcessStep::query()->withTrashed()->find($stepId) : null;
|
||||
|
||||
return $this->repairFlow = [
|
||||
'process_id' => $processId,
|
||||
'step_id' => $stepId,
|
||||
'process_name' => (string) ($process?->process_name ?? '维修'),
|
||||
'step_name' => (string) ($step?->step_name ?? '维修'),
|
||||
];
|
||||
}
|
||||
|
||||
private function formatRows(iterable $rows, int $periodCount, callable $periodLabel): array
|
||||
{
|
||||
$grouped = [];
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
if (!$schema->hasTable('sys_menu')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$icons = [
|
||||
'produce' => 'ant-design:dashboard-outlined',
|
||||
'produce:material-category:index' => 'ant-design:tags-outlined',
|
||||
'produce:material:index' => 'ant-design:database-outlined',
|
||||
'produce:config:index' => 'ant-design:setting-outlined',
|
||||
'produce:process:index' => 'ant-design:apartment-outlined',
|
||||
'produce:process-step:index' => 'ant-design:ordered-list-outlined',
|
||||
'produce:step-status:index' => 'ant-design:flag-outlined',
|
||||
'produce:step-relation:index' => 'ant-design:share-alt-outlined',
|
||||
'produce:status-transition:index' => 'ant-design:swap-outlined',
|
||||
'produce:product-record:index' => 'ant-design:desktop-outlined',
|
||||
'produce:scan-data:index' => 'ant-design:qrcode-outlined',
|
||||
'produce:transition-log:index' => 'ant-design:swap-right-outlined',
|
||||
'produce:exception:index' => 'ant-design:warning-outlined',
|
||||
'produce:exception-data:list' => 'ant-design:exception-outlined',
|
||||
'produce:exception-setting:list' => 'ant-design:setting-outlined',
|
||||
'produce:exception-analysis:read' => 'ant-design:pie-chart-outlined',
|
||||
'produce:repair:index' => 'ant-design:tool-outlined',
|
||||
'produce:repair-record:list' => 'ant-design:tool-outlined',
|
||||
'produce:repair-setting:list' => 'ant-design:setting-outlined',
|
||||
'produce:hardware-fault-description:list' => 'ant-design:bug-outlined',
|
||||
'produce:statistics:index' => 'ant-design:bar-chart-outlined',
|
||||
'produce:statistics:monthly' => 'ant-design:calendar-outlined',
|
||||
'produce:statistics:daily' => 'ant-design:clock-circle-outlined',
|
||||
];
|
||||
foreach ($icons as $code => $icon) {
|
||||
$schema->getConnection()->table('sys_menu')->where('app', 'produce')->where('code', $code)->update([
|
||||
'icon' => $icon,
|
||||
'updated_at' => time(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
}
|
||||
};
|
||||
@@ -11,7 +11,7 @@ return [
|
||||
'code' => 'produce',
|
||||
'app' => 'produce',
|
||||
'path' => '/produce',
|
||||
'icon' => 'plugin',
|
||||
'icon' => 'ant-design:dashboard-outlined',
|
||||
'children' => [
|
||||
[
|
||||
'name' => '物料分类',
|
||||
@@ -19,6 +19,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/material-category',
|
||||
'component' => '/produce/material-category/index',
|
||||
'icon' => 'ant-design:tags-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '物料库',
|
||||
@@ -26,6 +27,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/material',
|
||||
'component' => '/produce/material/index',
|
||||
'icon' => 'ant-design:database-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '生产配置',
|
||||
@@ -33,6 +35,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/config',
|
||||
'component' => '/produce/config/index',
|
||||
'icon' => 'ant-design:setting-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '工序管理',
|
||||
@@ -40,6 +43,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/process',
|
||||
'component' => '/produce/process/index',
|
||||
'icon' => 'ant-design:apartment-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '工序步骤',
|
||||
@@ -47,6 +51,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/process-step',
|
||||
'component' => '/produce/process-step/index',
|
||||
'icon' => 'ant-design:ordered-list-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '步骤状态',
|
||||
@@ -54,6 +59,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/step-status',
|
||||
'component' => '/produce/step-status/index',
|
||||
'icon' => 'ant-design:flag-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '步骤关系',
|
||||
@@ -61,6 +67,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/step-relation',
|
||||
'component' => '/produce/step-relation/index',
|
||||
'icon' => 'ant-design:share-alt-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '状态转换',
|
||||
@@ -68,6 +75,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/status-transition',
|
||||
'component' => '/produce/status-transition/index',
|
||||
'icon' => 'ant-design:swap-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '整机数据',
|
||||
@@ -75,6 +83,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/product-record',
|
||||
'component' => '/produce/product-record/index',
|
||||
'icon' => 'ant-design:desktop-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '扫码数据',
|
||||
@@ -82,6 +91,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/scan-data',
|
||||
'component' => '/produce/scan-data/index',
|
||||
'icon' => 'ant-design:qrcode-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '转换日志',
|
||||
@@ -89,13 +99,14 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/transition-log',
|
||||
'component' => '/produce/transition-log/index',
|
||||
'icon' => 'ant-design:swap-right-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '异常管理',
|
||||
'code' => 'produce:exception:index',
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/exception',
|
||||
'icon' => 'warning',
|
||||
'icon' => 'ant-design:warning-outlined',
|
||||
'children' => [
|
||||
[
|
||||
'name' => '异常数据',
|
||||
@@ -103,6 +114,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/exception-data',
|
||||
'component' => '/produce/exception/data/index',
|
||||
'icon' => 'ant-design:exception-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '异常设置',
|
||||
@@ -110,6 +122,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/exception-setting',
|
||||
'component' => '/produce/exception/setting/index',
|
||||
'icon' => 'ant-design:setting-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '数据分析',
|
||||
@@ -117,6 +130,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/exception-analysis',
|
||||
'component' => '/produce/exception/analysis/index',
|
||||
'icon' => 'ant-design:pie-chart-outlined',
|
||||
],
|
||||
],
|
||||
],
|
||||
@@ -125,7 +139,7 @@ return [
|
||||
'code' => 'produce:repair:index',
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/repair',
|
||||
'icon' => 'tools',
|
||||
'icon' => 'ant-design:tool-outlined',
|
||||
'children' => [
|
||||
[
|
||||
'name' => '维修数据',
|
||||
@@ -133,6 +147,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/repair/repair-data',
|
||||
'component' => '/produce/repair/repair-data/index',
|
||||
'icon' => 'ant-design:tool-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '维修设置',
|
||||
@@ -140,6 +155,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/repair/repair-setting',
|
||||
'component' => '/produce/repair/repair-setting/index',
|
||||
'icon' => 'ant-design:setting-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '硬件故障描述',
|
||||
@@ -147,6 +163,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/repair/hardware-fault-description',
|
||||
'component' => '/produce/repair/hardware-fault-description/index',
|
||||
'icon' => 'ant-design:bug-outlined',
|
||||
],
|
||||
],
|
||||
],
|
||||
@@ -155,7 +172,7 @@ return [
|
||||
'code' => 'produce:statistics:index',
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/statistics',
|
||||
'icon' => 'bar-chart-2',
|
||||
'icon' => 'ant-design:bar-chart-outlined',
|
||||
'children' => [
|
||||
[
|
||||
'name' => '月工作统计',
|
||||
@@ -163,6 +180,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/statistics/monthly',
|
||||
'component' => '/produce/statistics/monthly/index',
|
||||
'icon' => 'ant-design:calendar-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '日工作统计',
|
||||
@@ -170,6 +188,7 @@ return [
|
||||
'app' => 'produce',
|
||||
'path' => '/produce/statistics/daily',
|
||||
'component' => '/produce/statistics/daily/index',
|
||||
'icon' => 'ant-design:clock-circle-outlined',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
@@ -18,5 +18,52 @@ const [BasicCrud] = useCrud({
|
||||
<style scoped>
|
||||
.produce-scan-data-page {
|
||||
height: 100%;
|
||||
padding: 16px;
|
||||
box-sizing: border-box;
|
||||
background: var(--el-bg-color-page);
|
||||
}
|
||||
|
||||
.produce-scan-data-page :deep(.art-search-bar) {
|
||||
padding: 14px 16px;
|
||||
background: var(--el-bg-color);
|
||||
border: 1px solid var(--el-border-color-light);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.produce-scan-data-page :deep(.art-search-bar .el-form-item) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.produce-scan-data-page :deep(.art-search-bar .el-row) {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.produce-scan-data-page :deep(.art-search-bar .el-col:not(.action-column)) {
|
||||
flex: 0 0 var(--search-item-width);
|
||||
min-width: 0;
|
||||
max-width: var(--search-item-width);
|
||||
}
|
||||
|
||||
.produce-scan-data-page :deep(.art-search-bar .action-column) {
|
||||
flex: 0 0 auto;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.produce-scan-data-page :deep(.art-search-bar .el-input),
|
||||
.produce-scan-data-page :deep(.art-search-bar .el-select),
|
||||
.produce-scan-data-page :deep(.art-search-bar .el-date-editor) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.produce-scan-data-page :deep(.art-table-card) {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.produce-scan-data-page :deep(.art-search-bar .el-col:not(.action-column)) {
|
||||
flex-basis: 100%;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
+46
-13
@@ -22,21 +22,49 @@ export const crudSchema = (): CrudSchema => {
|
||||
viewAuth: 'produce:scan-data:read',
|
||||
rowKey: 'id',
|
||||
searchFormSchema: {
|
||||
labelWidth: '100px',
|
||||
labelWidth: 0,
|
||||
gutter: 0,
|
||||
span: 6,
|
||||
isExpand: true,
|
||||
showExpandButton: false,
|
||||
schema: [
|
||||
{
|
||||
prop: 'keyword',
|
||||
label: '关键字',
|
||||
prop: 'LIKE_order_no',
|
||||
label: '',
|
||||
searchWidth: '170px',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
clearable: true,
|
||||
placeholder: '请输入订单号/用户编码/操作人员/备注',
|
||||
placeholder: '请输入订单号',
|
||||
},
|
||||
colSpan: 6,
|
||||
},
|
||||
{
|
||||
prop: 'LIKE_user_code',
|
||||
label: '',
|
||||
searchWidth: '160px',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
clearable: true,
|
||||
placeholder: '请输入用户编码',
|
||||
},
|
||||
colSpan: 6,
|
||||
},
|
||||
{
|
||||
prop: 'LIKE_operator',
|
||||
label: '',
|
||||
searchWidth: '180px',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
clearable: true,
|
||||
placeholder: '请输入操作人员',
|
||||
},
|
||||
colSpan: 6,
|
||||
},
|
||||
{
|
||||
prop: 'process_id',
|
||||
label: '工序名称',
|
||||
label: '',
|
||||
searchWidth: '160px',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: '/produce/process',
|
||||
@@ -49,7 +77,8 @@ export const crudSchema = (): CrudSchema => {
|
||||
},
|
||||
{
|
||||
prop: 'step_id',
|
||||
label: '步骤名称',
|
||||
label: '',
|
||||
searchWidth: '160px',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: '/produce/process-step',
|
||||
@@ -62,7 +91,8 @@ export const crudSchema = (): CrudSchema => {
|
||||
},
|
||||
{
|
||||
prop: 'status_id',
|
||||
label: '步骤状态',
|
||||
label: '',
|
||||
searchWidth: '160px',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: '/produce/step-status',
|
||||
@@ -74,18 +104,20 @@ export const crudSchema = (): CrudSchema => {
|
||||
colSpan: 6,
|
||||
},
|
||||
{
|
||||
prop: 'LIKE_operator',
|
||||
label: '操作人员',
|
||||
prop: 'LIKE_remark',
|
||||
label: '',
|
||||
searchWidth: '160px',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
clearable: true,
|
||||
placeholder: '请输入操作人员',
|
||||
placeholder: '请输入备注',
|
||||
},
|
||||
colSpan: 6,
|
||||
},
|
||||
{
|
||||
prop: 'scan_result',
|
||||
label: '扫码结果',
|
||||
label: '',
|
||||
searchWidth: '170px',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
clearable: true,
|
||||
@@ -99,7 +131,8 @@ export const crudSchema = (): CrudSchema => {
|
||||
},
|
||||
{
|
||||
prop: 'scan_time_range',
|
||||
label: '扫码时间',
|
||||
label: '',
|
||||
searchWidth: '280px',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
type: 'daterange',
|
||||
@@ -108,7 +141,7 @@ export const crudSchema = (): CrudSchema => {
|
||||
startPlaceholder: '开始日期',
|
||||
endPlaceholder: '结束日期',
|
||||
},
|
||||
colSpan: 12,
|
||||
colSpan: 6,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
+2
@@ -12,6 +12,8 @@
|
||||
<el-option label="全部数据" value="all" />
|
||||
<el-option label="订单数据" value="order" />
|
||||
<el-option label="整机数据" value="machine" />
|
||||
<el-option label="异常提报" value="exception" />
|
||||
<el-option label="维修记录" value="repair" />
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="filters.user_code"
|
||||
|
||||
+2
@@ -12,6 +12,8 @@
|
||||
<el-option label="全部数据" value="all" />
|
||||
<el-option label="订单数据" value="order" />
|
||||
<el-option label="整机数据" value="machine" />
|
||||
<el-option label="异常提报" value="exception" />
|
||||
<el-option label="维修记录" value="repair" />
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="filters.user_code"
|
||||
|
||||
Reference in New Issue
Block a user