Compare commits
10 Commits
projects/s
...
projects/s
| Author | SHA1 | Date | |
|---|---|---|---|
| 8226b45a03 | |||
| dde04cf93f | |||
| 63a67e58de | |||
| 48e9f70625 | |||
| f5f250cb16 | |||
| b6241fe7c4 | |||
| 94edd04a08 | |||
| b926559a7d | |||
| b2984ed4cf | |||
| be86cbd9b3 |
4
.env.dev
4
.env.dev
@@ -12,7 +12,9 @@ ENV = 'development'
|
||||
VUE_APP_TITLE = 智能监控分析系统
|
||||
|
||||
# 芋道管理系统/开发环境
|
||||
VUE_APP_BASE_API = 'http://172.16.32.76:48080'
|
||||
|
||||
VUE_APP_BASE_API = 'http://192.168.0.31:48080'
|
||||
# VUE_APP_BASE_API = 'http://172.16.32.76:48080'
|
||||
# VUE_APP_BASE_API = 'http://line.kszny.picaiba.com'
|
||||
|
||||
# 路由懒加载
|
||||
|
||||
72
src/api/areavisual/overview.js
Normal file
72
src/api/areavisual/overview.js
Normal file
@@ -0,0 +1,72 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取区域列表
|
||||
export function getAreaList(params) {
|
||||
return request({
|
||||
url: '/wms/region/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取区域空满数量
|
||||
export function postAllAreaInfo(data) {
|
||||
return request({
|
||||
url: '/wms/region/lsit/count',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取指定库区库位信息
|
||||
export function postAreaInfo(data) {
|
||||
return request({
|
||||
url: '/wms/line-edge-library/list/region',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取区域总览
|
||||
export function postAllAreaOverview(data) {
|
||||
return request({
|
||||
url: '/wms/line-edge-library/line/count',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除能源实时数据库plc相关
|
||||
export function deleteEnergyPlc(id) {
|
||||
return request({
|
||||
url: '/base/energy-plc/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取关联表编码
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/base/energy-plc/getCode',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得能源实时数据库plc相关分页
|
||||
export function getEnergyPlcPage(data) {
|
||||
return request({
|
||||
url: '/base/energy-plc/page',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 导出能源实时数据库plc相关 Excel
|
||||
export function exportEnergyPlcExcel(query) {
|
||||
return request({
|
||||
url: '/base/energy-plc/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
63
src/api/areavisual/record.js
Normal file
63
src/api/areavisual/record.js
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取出入库历史任务分页
|
||||
export function getRecordPage(params) {
|
||||
return request({
|
||||
url: '/wms/job-main-task-history/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取巷道列表
|
||||
export function getLaneList(params) {
|
||||
return request({
|
||||
url: '/wms/lane/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 更新能源实时数据库plc相关
|
||||
export function updateEnergyPlc(data) {
|
||||
return request({
|
||||
url: '/base/energy-plc/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除能源实时数据库plc相关
|
||||
export function deleteEnergyPlc(id) {
|
||||
return request({
|
||||
url: '/base/energy-plc/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取关联表编码
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/base/energy-plc/getCode',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得能源实时数据库plc相关分页
|
||||
export function getEnergyPlcPage(data) {
|
||||
return request({
|
||||
url: '/base/energy-plc/page',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 导出能源实时数据库plc相关 Excel
|
||||
export function exportEnergyPlcExcel(query) {
|
||||
return request({
|
||||
url: '/base/energy-plc/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
154
src/api/ssdl/product&recipe.js
Normal file
154
src/api/ssdl/product&recipe.js
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2025-11-17 09:25:12
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-28 09:29:14
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
// 获得原料分页
|
||||
export function getProductPage(query) {
|
||||
return request({
|
||||
url: '/wms/material/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获得原料
|
||||
export function getProduct(id) {
|
||||
return request({
|
||||
url: '/wms/material/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 删除原料
|
||||
export function deleteProduct(id) {
|
||||
return request({
|
||||
url: '/wms/material/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 更新
|
||||
export function updateProduct(data) {
|
||||
return request({
|
||||
url: '/wms/material/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 创建
|
||||
export function createProduct(data) {
|
||||
return request({
|
||||
url: '/wms/material/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获得工艺分页
|
||||
export function getProcessPage(query) {
|
||||
return request({
|
||||
url: '/wms/process/page/group/by',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获得工艺点击展开表格
|
||||
export function getProcessDetailPage(query) {
|
||||
return request({
|
||||
url: '/wms/process/page/group/by/detail',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 删除工艺
|
||||
export function deleteProcess(id) {
|
||||
return request({
|
||||
url: '/wms/process/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 批量删除工艺
|
||||
export function deleteProcessList(ids) {
|
||||
return request({
|
||||
url: '/wms/process/delete-list?ids=' + ids,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 更新
|
||||
export function updateProcess(data) {
|
||||
return request({
|
||||
url: '/wms/process/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 创建
|
||||
export function createProcess(data) {
|
||||
return request({
|
||||
url: '/wms/process/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 获得工艺
|
||||
export function getProcess(id) {
|
||||
return request({
|
||||
url: '/wms/process/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 工艺设备原料分页
|
||||
export function getProcessMaterialPage(query) {
|
||||
return request({
|
||||
url: '/wms/process-equipment-material/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 删除工艺设备原料
|
||||
export function deleteProcessMaterial(id) {
|
||||
return request({
|
||||
url: '/wms/process-equipment-material/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 更新
|
||||
export function updateProcessMaterial(data) {
|
||||
return request({
|
||||
url: '/wms/process-equipment-material/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 创建
|
||||
export function createProcessMaterial(data) {
|
||||
return request({
|
||||
url: '/wms/process-equipment-material/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 获得工艺
|
||||
export function getProcessMaterial(id) {
|
||||
return request({
|
||||
url: '/wms/process-equipment-material/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得设备分页
|
||||
export function getEquipmentPage(query) {
|
||||
return request({
|
||||
url: '/wms/equipment/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
60
src/api/ssdl/taskList.js
Normal file
60
src/api/ssdl/taskList.js
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2025-11-17 09:25:12
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-18 15:42:19
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
// 获得任务分页
|
||||
export function getTaskPage(query) {
|
||||
return request({
|
||||
url: '/wms/job-main-task/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获得任务
|
||||
export function getTask(id) {
|
||||
return request({
|
||||
url: '/wms/job-main-task/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得任务日志分页
|
||||
export function getTaskLogPage(query) {
|
||||
return request({
|
||||
url: '/wms/job-main-task-log/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 更新
|
||||
export function updateTask(data) {
|
||||
return request({
|
||||
url: '/wms/job-main-task/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据区域id获取该区域下的库位信息
|
||||
export function getRegion(id) {
|
||||
return request({
|
||||
url: '/wms/line-edge-library/get-by-region-id?regionId=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 创建
|
||||
export function createPCTask(data) {
|
||||
return request({
|
||||
url: '/wms/job-main-task/pc-create-task',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-24 11:19:43
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-04-02 09:33:29
|
||||
* @LastEditTime: 2025-11-28 09:35:03
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@@ -16,7 +16,7 @@ export default {
|
||||
},
|
||||
tableData: [], //table数据
|
||||
listQuery: { //分页
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
},
|
||||
@@ -69,7 +69,7 @@ export default {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === "delete") {
|
||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
|
||||
} else {
|
||||
this.otherMethods(val)
|
||||
}
|
||||
|
||||
125
src/views/areavisual/overview/components/ringChart.vue
Normal file
125
src/views/areavisual/overview/components/ringChart.vue
Normal file
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div
|
||||
:class="className"
|
||||
:style="{ height: height, width: width, marginLeft: '10px' }" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
require('echarts/theme/macarons'); // echarts theme
|
||||
import resize from '@/utils/chartMixins/resize';
|
||||
|
||||
const animationDuration = 1000;
|
||||
export default {
|
||||
mixins: [resize],
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart',
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%',
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px',
|
||||
},
|
||||
ringData: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
targetId: '',
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return;
|
||||
}
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(this.$el, 'macarons');
|
||||
const _this = this;
|
||||
this.chart.setOption({
|
||||
title: {
|
||||
text: this.title
|
||||
? '{space|}{tip|}{space|}{value|' + this.title + '}'
|
||||
: '',
|
||||
textStyle: {
|
||||
rich: {
|
||||
tip: {
|
||||
width: 6,
|
||||
height: 6,
|
||||
borderRadius: 50,
|
||||
backgroundColor: '#288AFF',
|
||||
},
|
||||
space: {
|
||||
width: 8,
|
||||
},
|
||||
value: {
|
||||
fontSize: 14,
|
||||
color: 'black',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
color: ['#33B36B', '#3A8DFF', '#F59A23'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999',
|
||||
},
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
data: ['当前满位', '当前空位', '在途'],
|
||||
},
|
||||
grid: {
|
||||
containLabel: true,
|
||||
},
|
||||
series: [
|
||||
{
|
||||
// name: '投入',
|
||||
type: 'pie',
|
||||
radius: '50%',
|
||||
data: [
|
||||
{
|
||||
name: '当前满位',
|
||||
value: this.ringData.occupiedQuantity
|
||||
},
|
||||
{
|
||||
name: '当前空位',
|
||||
value: this.ringData.idleQuantity
|
||||
},
|
||||
{
|
||||
name: '在途',
|
||||
value: this.ringData.transitQuantity
|
||||
},
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
262
src/views/areavisual/overview/index.vue
Normal file
262
src/views/areavisual/overview/index.vue
Normal file
@@ -0,0 +1,262 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row class="overview-container">
|
||||
<el-col :span="4" class="overview-container-left">
|
||||
<el-row style="font-size: 18px; font-weight: bold; line-height: 36px">库区选择</el-row>
|
||||
<el-input
|
||||
v-model="areaSearchForm.regionName"
|
||||
placeholder="库区名称"
|
||||
@blur="getArea"
|
||||
clearable
|
||||
/>
|
||||
<el-tree
|
||||
:data="areaList"
|
||||
:node-key="'id'"
|
||||
:props="{label: 'regionName'}"
|
||||
@node-click="nodeClick"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="16" v-if="changeType === 0" class="overview-container-main">
|
||||
<el-row>
|
||||
<el-col :span="8" class="allarea-box" v-for="item in allAreaList" :key="item.id">
|
||||
<div class="areainfo-box">
|
||||
<div class="areainfo-box-header">
|
||||
{{ item.regionName }}
|
||||
</div>
|
||||
<div class="areainfo-box-line">
|
||||
<div class="areainfo-box-line-item" :style="{width: `${(item.occupiedQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#33B36B'}"></div>
|
||||
<div class="areainfo-box-line-item" :style="{width: `${(item.idleQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#3A8DFF'}"></div>
|
||||
<div class="areainfo-box-line-item" :style="{width: `${(item.transitQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#F59A23'}"></div>
|
||||
</div>
|
||||
<el-row class="areainfo-box-info">
|
||||
<el-col class="areainfo-box-info-item" :span="6">
|
||||
<p class="areainfo-box-info-item-count">{{item.totalInventory}}</p>
|
||||
<p class="areainfo-box-info-item-title">库位总数</p>
|
||||
</el-col>
|
||||
<el-col class="areainfo-box-info-item" :span="6">
|
||||
<p class="areainfo-box-info-item-count" style="color: #33B36B">{{item.occupiedQuantity}}</p>
|
||||
<p class="areainfo-box-info-item-title">占</p>
|
||||
</el-col>
|
||||
<el-col class="areainfo-box-info-item" :span="6">
|
||||
<p class="areainfo-box-info-item-count" style="color: #3A8DFF">{{item.idleQuantity}}</p>
|
||||
<p class="areainfo-box-info-item-title">空</p>
|
||||
</el-col>
|
||||
<el-col class="areainfo-box-info-item" :span="6">
|
||||
<p class="areainfo-box-info-item-count" style="color: #F59A23">{{item.transitQuantity}}</p>
|
||||
<p class="areainfo-box-info-item-title">在途</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="4" v-if="changeType === 0" class="overview-container-right">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClickRight">
|
||||
<el-tab-pane label="概览" name="first">
|
||||
<el-row class="overview-container-right-alloverview">
|
||||
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.totalInventory}}</p>
|
||||
<p class="overview-container-right-alloverview-item-title">库位总数</p>
|
||||
</el-col>
|
||||
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.occupiedQuantity}}</p>
|
||||
<p class="overview-container-right-alloverview-item-title">当前满位</p>
|
||||
</el-col>
|
||||
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.idleQuantity}}</p>
|
||||
<p class="overview-container-right-alloverview-item-title">当前空位</p>
|
||||
</el-col>
|
||||
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.transitQuantity}}</p>
|
||||
<p class="overview-container-right-alloverview-item-title">在途</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<ringChart :ring-data="allAreaInfo" ref="ringChart" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="在途任务" name="second">在途任务</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
<el-col :span="20" v-if="changeType === 1" class="overview-container-main"></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import basicPage from '@/mixins/basic-page';
|
||||
import ringChart from './components/ringChart.vue';
|
||||
import { getAreaList, postAllAreaInfo, postAllAreaOverview, postAreaInfo } from '@/api/areavisual/overview';
|
||||
|
||||
export default {
|
||||
name: 'overview',
|
||||
// mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
areaList: [
|
||||
{
|
||||
id: 0,
|
||||
regionName: "全部库区"
|
||||
}
|
||||
],
|
||||
areaSearchForm: {
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
regionName: ''
|
||||
},
|
||||
changeType: 0,
|
||||
allAreaList: [],
|
||||
allAreaInfo: {
|
||||
totalInventory: 0,
|
||||
occupiedQuantity: 0,
|
||||
idleQuantity: 0,
|
||||
transitQuantity: 0
|
||||
},
|
||||
areaInfo: [],
|
||||
activeName: 'first'
|
||||
};
|
||||
},
|
||||
components: {
|
||||
ringChart
|
||||
},
|
||||
async created() {
|
||||
this.getArea()
|
||||
this.getAllAreaInfo()
|
||||
this.getAllAreaOverview()
|
||||
},
|
||||
watch: {
|
||||
activeName: (val) => {
|
||||
if (val === 'first') {
|
||||
this.getAllAreaOverview()
|
||||
} else if (val === 'second') {
|
||||
this.getNowTaskList()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取库区列表
|
||||
async getArea() {
|
||||
const res = await getAreaList(this.areaSearchForm)
|
||||
if (res.code === 0 && res.data) {
|
||||
this.areaList = [
|
||||
{
|
||||
id: 0,
|
||||
regionName: "全部库区"
|
||||
}
|
||||
],
|
||||
this.areaList.push(...(res.data.list))
|
||||
}
|
||||
},
|
||||
// 库区选择
|
||||
nodeClick(data, node, components) {
|
||||
if (data.id === 0) {
|
||||
this.changeType = 0
|
||||
this.activeName = 'first'
|
||||
this.getAllAreaInfo()
|
||||
} else {
|
||||
this.changeType = 1
|
||||
this.getAreaInfo(data.id)
|
||||
}
|
||||
},
|
||||
// 获取全部库区概览信息
|
||||
async getAllAreaInfo() {
|
||||
const res = await postAllAreaInfo([])
|
||||
console.log(res)
|
||||
if (res.code === 0 && res.data) {
|
||||
this.allAreaList = res.data
|
||||
}
|
||||
},
|
||||
// 获取库区概览
|
||||
async getAllAreaOverview() {
|
||||
const res = await postAllAreaOverview([])
|
||||
console.log(res)
|
||||
if (res.code === 0 && res.data) {
|
||||
this.allAreaInfo = res.data
|
||||
this.$refs.ringChart.initChart();
|
||||
}
|
||||
},
|
||||
// 获取在途任务
|
||||
async getNowTaskList() {},
|
||||
// 获取单库区信息
|
||||
async getAreaInfo (id) {
|
||||
const res = await postAreaInfo({id})
|
||||
console.log(res)
|
||||
if (res.code === 0 && res.data) {
|
||||
this.areaInfo = res.data
|
||||
}
|
||||
},
|
||||
// 全部库区右侧分页点击
|
||||
handleClickRight (tab, event) {
|
||||
console.log(tab, event)
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.overview-container {
|
||||
max-height: calc(100vh - 120px - 8px);
|
||||
overflow: scroll;
|
||||
.overview-container-left {
|
||||
padding-right: 12px;
|
||||
}
|
||||
.overview-container-main {
|
||||
.allarea-box {
|
||||
padding: 10px;
|
||||
.areainfo-box {
|
||||
border: 1px solid #bbb;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
.areainfo-box-header {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
white-space: nowrap; /* 禁止换行 */
|
||||
overflow: hidden; /* 隐藏溢出内容 */
|
||||
text-overflow: ellipsis; /* 溢出部分显示省略号 */
|
||||
}
|
||||
.areainfo-box-line {
|
||||
width: 100%;
|
||||
.areainfo-box-line-item {
|
||||
height: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.areainfo-box-info {
|
||||
.areainfo-box-info-item {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
.areainfo-box-info-item-count {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.overview-container-right {
|
||||
.overview-container-right-alloverview {
|
||||
.overview-container-right-alloverview-item {
|
||||
text-align: center;
|
||||
.overview-container-right-alloverview-item-count {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
.el-tree-node__content {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.el-tree-node__label {
|
||||
display: block;
|
||||
width: calc(100% - 24px);
|
||||
text-align: center;
|
||||
white-space: nowrap; /* 禁止换行 */
|
||||
overflow: hidden; /* 隐藏溢出内容 */
|
||||
text-overflow: ellipsis; /* 溢出部分显示省略号 */
|
||||
}
|
||||
</style>
|
||||
519
src/views/areavisual/record/components/RecordDrawer.vue
Normal file
519
src/views/areavisual/record/components/RecordDrawer.vue
Normal file
@@ -0,0 +1,519 @@
|
||||
<!--
|
||||
filename: EquipmentDrawer.vue
|
||||
author: liubin
|
||||
date: 2023-08-22 14:38:56
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
custom-class="mes-drawer"
|
||||
size="60%"
|
||||
@closed="$emit('destroy')">
|
||||
<SmallTitle slot="title">
|
||||
{{
|
||||
mode.includes('detail')
|
||||
? '详情'
|
||||
: mode.includes('edit')
|
||||
? '编辑'
|
||||
: '新增'
|
||||
}}
|
||||
</SmallTitle>
|
||||
|
||||
<div class="drawer-body flex">
|
||||
<div class="drawer-body__content">
|
||||
<section v-for="(section, index) in sections" :key="section.key">
|
||||
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
|
||||
|
||||
<div
|
||||
class="form-part"
|
||||
v-if="section.key == 'base'"
|
||||
style="margin-bottom: 32px">
|
||||
<el-skeleton v-if="!showForm" animated />
|
||||
<!-- <EquipmentInfoForm
|
||||
key="drawer-dialog-form"
|
||||
v-if="showForm"
|
||||
:disabled="mode.includes('detail')"
|
||||
:sync-filelist="syncFileListFlag"
|
||||
v-model="form" /> -->
|
||||
</div>
|
||||
|
||||
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
|
||||
<base-table
|
||||
v-loading="attrListLoading"
|
||||
:table-props="section.props"
|
||||
:page="attrQuery?.params.pageNo || 1"
|
||||
:limit="attrQuery?.params.pageSize || 10"
|
||||
:table-data="list"
|
||||
:add-button-show="mode.includes('detail') ? null : '添加属性'"
|
||||
@emitButtonClick="handleAddAttr"
|
||||
@emitFun="handleEmitFun">
|
||||
<method-btn
|
||||
v-if="section.tableBtn"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="attrQuery.params.pageNo"
|
||||
:limit.sync="attrQuery.params.pageSize"
|
||||
@pagination="getAttrList" />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="drawer-body__footer">
|
||||
<el-button style="" @click="handleCancel">取消</el-button>
|
||||
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-else type="primary" @click="handleConfirm">确定</el-button>
|
||||
<!-- sections的第二项必须是 属性列表 -->
|
||||
<!-- <el-button
|
||||
v-if="sections[1].allowAdd"
|
||||
type="primary"
|
||||
@click="handleAddAttr">
|
||||
添加属性
|
||||
</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
const SmallTitle = {
|
||||
name: 'SmallTitle',
|
||||
props: ['size'],
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {},
|
||||
render: function (h) {
|
||||
return h(
|
||||
'span',
|
||||
{
|
||||
class: 'small-title',
|
||||
style: {
|
||||
fontSize: '18px',
|
||||
lineHeight:
|
||||
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||
fontWeight: 500,
|
||||
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||
},
|
||||
},
|
||||
this.$slots.default
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
components: { SmallTitle },
|
||||
props: ['sections', 'mode', 'dataId'], // dataId 作为一个通用的存放id的字段
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
showForm: false,
|
||||
btnLoading: false,
|
||||
total: 0,
|
||||
form: {},
|
||||
list: [],
|
||||
attrTitle: '',
|
||||
attrForm: {
|
||||
id: null,
|
||||
equipmentId: null,
|
||||
name: '',
|
||||
value: '',
|
||||
},
|
||||
attrFormVisible: false,
|
||||
attrRows: [
|
||||
[
|
||||
{
|
||||
input: true,
|
||||
label: '属性名称',
|
||||
prop: 'name',
|
||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
input: true,
|
||||
label: '属性值',
|
||||
prop: 'value',
|
||||
},
|
||||
],
|
||||
],
|
||||
attrQuery: {
|
||||
params: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
}, // 属性列表的请求
|
||||
infoQuery: null, // 基本信息的请求
|
||||
attrFormSubmitting: false,
|
||||
attrListLoading: false,
|
||||
syncFileListFlag: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
formRows() {
|
||||
return this.sections[0].rows.map((row) => {
|
||||
return row.map((col) => {
|
||||
if (col.key == 'eq-pics') {
|
||||
// 重置图片的位置
|
||||
return {
|
||||
...col,
|
||||
bind: {
|
||||
...col.bind,
|
||||
},
|
||||
style: {
|
||||
left: 0,
|
||||
right: 'unset',
|
||||
},
|
||||
};
|
||||
}
|
||||
return {
|
||||
...col,
|
||||
bind: {
|
||||
...col.bind,
|
||||
// 详情 模式下,禁用各种输入
|
||||
disabled: this.mode == 'detail',
|
||||
},
|
||||
};
|
||||
});
|
||||
});
|
||||
},
|
||||
tableBtn() {
|
||||
return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
for (const section of this.sections) {
|
||||
// 请求具体信息
|
||||
if ('url' in section) {
|
||||
const query = {
|
||||
url: section.url,
|
||||
method: section.method || 'get',
|
||||
params: section.queryParams || null,
|
||||
data: section.data || null,
|
||||
};
|
||||
this.$axios(query).then(({ data }) => {
|
||||
if (section.key == 'base') {
|
||||
this.form = data;
|
||||
// this.form = {
|
||||
// code: 'gj',
|
||||
// name: '下片机',
|
||||
// enName: 'unload',
|
||||
// abbr: '',
|
||||
// equipmentTypeId: 21084,
|
||||
// remark: '备注',
|
||||
// id: '1712367395052384257',
|
||||
// createTime: 1697095176000,
|
||||
// enterTime: 0,
|
||||
// productionTime: 0,
|
||||
// files: [
|
||||
// {
|
||||
// fileName: '测试.xlsx',
|
||||
// fileUrl: 'https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0108%2F0f0c6f30j00r5cle9000sc000hs00gtc.jpg&thumbnail=660x2147483647&quality=80&type=jpg',
|
||||
// fileType: 1
|
||||
// },
|
||||
// {
|
||||
// fileName: '测试2.xlsx',
|
||||
// fileUrl: 'https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0415%2F2cd23619j00racb96000kc000hs00hsc.jpg&thumbnail=660x2147483647&quality=80&type=jpg',
|
||||
// fileType: 1
|
||||
// },
|
||||
// {
|
||||
// fileName: '测试3.xlsx',
|
||||
// fileUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F1fea91a0-d088-409e-b145-e0e61254b28b%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700031689&t=2e0fe7d1de7f54adff3007efe133d67c',
|
||||
// fileType: 1
|
||||
// },
|
||||
// {
|
||||
// fileName: '测试4.xlsx',
|
||||
// fileUrl: 'https://pics5.baidu.com/feed/b7003af33a87e950cdfb4b4546eed044faf2b40d.jpeg?token=1d7484cfe4b014dd201f8c8725cab945',
|
||||
// fileType: 2
|
||||
// },
|
||||
// {
|
||||
// fileName: '测试5.xlsx',
|
||||
// fileUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Fe3500876-9c46-4b70-8d37-4799520cdd13%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700031689&t=4abc1df930e62730e5361a7d3765e0f2',
|
||||
// fileType: 2
|
||||
// },
|
||||
// ],
|
||||
// tvalue: 0,
|
||||
// processingTime: 0,
|
||||
// manufacturer: '',
|
||||
// spec: '',
|
||||
// description: '描述',
|
||||
// };
|
||||
this.showForm = true;
|
||||
this.infoQuery = query;
|
||||
} else if (section.key == 'attrs') {
|
||||
this.attrQuery = query;
|
||||
this.list = data.list;
|
||||
this.total = data.total;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTableBtnClick({ type, data }) {
|
||||
switch (type) {
|
||||
case 'edit':
|
||||
this.handleEditAttr(data.id);
|
||||
break;
|
||||
case 'delete':
|
||||
this.handleDeleteAttr(data.id);
|
||||
break;
|
||||
}
|
||||
},
|
||||
async handleConfirm() {
|
||||
this.btnLoading = true;
|
||||
this.syncFileListFlag = Math.random();
|
||||
|
||||
this.$nextTick(async () => {
|
||||
const { code, data } = await this.$axios({
|
||||
url: this.sections[0].urlUpdate,
|
||||
method: 'put',
|
||||
data: this.form,
|
||||
});
|
||||
if (code == 0) {
|
||||
this.$modal.msgSuccess('更新成功');
|
||||
this.$emit('refreshDataList');
|
||||
}
|
||||
|
||||
this.btnLoading = false;
|
||||
this.handleCancel();
|
||||
});
|
||||
},
|
||||
|
||||
handleEmitFun(val) {
|
||||
console.log('handleEmitFun', val);
|
||||
},
|
||||
|
||||
init() {
|
||||
this.visible = true;
|
||||
},
|
||||
|
||||
async getAttrList() {
|
||||
this.attrListLoading = true;
|
||||
const res = await this.$axios(this.attrQuery);
|
||||
if (res.code == 0) {
|
||||
this.list = res.data.list;
|
||||
this.total = res.data.total;
|
||||
}
|
||||
this.attrListLoading = false;
|
||||
},
|
||||
|
||||
// 保存表单
|
||||
handleSave() {
|
||||
this.$refs['form'][0].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.mode == 'edit';
|
||||
await this.$axios({
|
||||
url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
|
||||
method: isEdit ? 'put' : 'post',
|
||||
data: this.form,
|
||||
});
|
||||
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleCancel() {
|
||||
this.visible = false;
|
||||
},
|
||||
|
||||
// 开启编辑
|
||||
toggleEdit() {
|
||||
this.$emit('update-mode', 'edit');
|
||||
},
|
||||
|
||||
// 新增属性
|
||||
handleAddAttr() {
|
||||
if (!this.dataId) return this.$message.warning('请先创建设备信息');
|
||||
this.attrForm = {
|
||||
id: null,
|
||||
equipmentId: this.dataId,
|
||||
name: '',
|
||||
value: '',
|
||||
};
|
||||
this.attrTitle = '添加设备属性';
|
||||
this.attrFormVisible = true;
|
||||
},
|
||||
|
||||
// 编辑属性
|
||||
async handleEditAttr(attrId) {
|
||||
const res = await this.$axios({
|
||||
url: this.sections[1].urlDetail,
|
||||
method: 'get',
|
||||
params: { id: attrId },
|
||||
});
|
||||
if (res.code == 0) {
|
||||
this.attrForm = res.data;
|
||||
this.attrTitle = '编辑设备属性';
|
||||
this.attrFormVisible = true;
|
||||
}
|
||||
},
|
||||
|
||||
// 删除属性
|
||||
handleDeleteAttr(attrId) {
|
||||
this.$confirm('确定删除该属性?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
const res = await this.$axios({
|
||||
url: this.sections[1].urlDelete,
|
||||
method: 'delete',
|
||||
params: { id: attrId },
|
||||
});
|
||||
if (res.code == 0) {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getAttrList();
|
||||
},
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
|
||||
// 提交属性表
|
||||
submitAttrForm() {
|
||||
this.$refs['attrForm'].validate(async (valid) => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const isEdit = this.attrForm.id != null;
|
||||
this.attrFormSubmitting = true;
|
||||
const res = await this.$axios({
|
||||
url: isEdit
|
||||
? this.sections[1].urlUpdate
|
||||
: this.sections[1].urlCreate,
|
||||
method: isEdit ? 'put' : 'post',
|
||||
data: this.attrForm,
|
||||
});
|
||||
|
||||
if (res.code == 0) {
|
||||
this.closeAttrForm();
|
||||
this.$message({
|
||||
message: `${isEdit ? '更新' : '创建'}成功`,
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getAttrList();
|
||||
},
|
||||
});
|
||||
}
|
||||
this.attrFormSubmitting = false;
|
||||
} catch (err) {
|
||||
this.$message({
|
||||
message: err,
|
||||
type: 'error',
|
||||
duration: 1500,
|
||||
});
|
||||
this.attrFormSubmitting = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
closeAttrForm() {
|
||||
this.attrFormVisible = false;
|
||||
},
|
||||
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
this.$confirm(
|
||||
`确定对${
|
||||
raw.data.name
|
||||
? '[名称=' + raw.data.name + ']'
|
||||
: '[序号=' + raw.data._pageIndex + ']'
|
||||
}进行删除操作?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
deleteProductAttr(raw.data.id).then(({ data }) => {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
this.addNew(raw.data.id);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.drawer >>> .el-drawer {
|
||||
border-radius: 8px 0 0 8px;
|
||||
}
|
||||
|
||||
.drawer >>> .el-drawer__header {
|
||||
margin: 0;
|
||||
padding: 32px 32px 24px;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.small-title::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 4px;
|
||||
height: 22px;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
background-color: #0b58ff;
|
||||
}
|
||||
|
||||
.drawer-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.drawer-body__content {
|
||||
flex: 1;
|
||||
/* background: #eee; */
|
||||
padding: 20px 30px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 18px;
|
||||
}
|
||||
</style>
|
||||
277
src/views/areavisual/record/index.vue
Normal file
277
src/views/areavisual/record/index.vue
Normal file
@@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<SearchBar
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="search-bar"
|
||||
isFold
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-data="list"
|
||||
@emitFun="handleEmitFun">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 设备 详情 - 编辑 -->
|
||||
<RecordDrawer
|
||||
v-if="open"
|
||||
ref="drawer"
|
||||
:mode="editMode"
|
||||
@update-mode="editMode = $event"
|
||||
:data-id="form.id"
|
||||
@refreshDataList="getList"
|
||||
@cancel="cancelEdit"
|
||||
@destroy="cancelEdit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import RecordDrawer from './components/RecordDrawer';
|
||||
import { getRecordPage, getLaneList } from '@/api/areavisual/record';
|
||||
|
||||
export default {
|
||||
name: 'Equipment',
|
||||
components: {
|
||||
RecordDrawer,
|
||||
},
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
searchBarKeys: ['name', 'code'],
|
||||
// this.$auth.hasPermi(`base:equipment:update`)
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: '详情'
|
||||
}
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
{
|
||||
prop: 'recordCode',
|
||||
label: '出/入库单编号',
|
||||
fixed: true,
|
||||
width: 180,
|
||||
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||
// showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
label: '业务类型',
|
||||
filter: (val) => val === 1 ? '出库' : '入库',
|
||||
},
|
||||
{
|
||||
width: 180,
|
||||
prop: 'recordTime',
|
||||
label: '出/入库时间',
|
||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss')
|
||||
},
|
||||
{ prop: 'recordArea', label: '出/入库库区' },
|
||||
{ prop: 'recordLane', label: '出/入库巷道' },
|
||||
{ prop: 'recordRegion', label: '出/入库库位号' },
|
||||
{ prop: 'target', label: '搬运对象' },
|
||||
{ prop: 'productName', label: '产品名称' },
|
||||
{ prop: 'specification', label: '型号规格' },
|
||||
{ prop: 'recordMan', label: '出/入库人' },
|
||||
{ prop: 'remark', label: '备注' }
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '关键字',
|
||||
placeholder: '请输入出/入库编码、产品名称、规格型号、库位号',
|
||||
param: 'query',
|
||||
width: 350
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '业务类型',
|
||||
selectOptions: [
|
||||
{
|
||||
id: '1',
|
||||
name:'出库'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name:'入库'
|
||||
},
|
||||
],
|
||||
placeholder: '请选择业务类型',
|
||||
param: 'type',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '出/入库巷道',
|
||||
selectOptions: [],
|
||||
placeholder: '请选择出/入库巷道',
|
||||
param: 'recordLane',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '来源',
|
||||
selectOptions: [
|
||||
{
|
||||
id: '1',
|
||||
name:'WMS'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name:'MES'
|
||||
},
|
||||
],
|
||||
placeholder: '请选择来源',
|
||||
param: 'source',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '出/入库人',
|
||||
selectOptions: [],
|
||||
placeholder: '请选择出/入库人',
|
||||
param: 'recordMan',
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '出/入库时间',
|
||||
placeholder: '请选择出/入库时间',
|
||||
param: 'recordTime',
|
||||
dateType: 'datetimerange',
|
||||
rangeSeparator: '至'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '载具类型',
|
||||
selectOptions: [
|
||||
{
|
||||
id: '1',
|
||||
name:'AGV'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name:'人工叉车'
|
||||
},
|
||||
],
|
||||
placeholder: '请选择载具类型',
|
||||
param: 'vehicleType',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '重置',
|
||||
name: 'reset',
|
||||
color: 'info',
|
||||
}
|
||||
],
|
||||
editVisible: false,
|
||||
editMode: 'detail', // 'edit', 'detail'
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
query: '',
|
||||
type: '',
|
||||
source: '',
|
||||
recordLane: '',
|
||||
recordMan: '',
|
||||
recordTime: '',
|
||||
vehicleType: ''
|
||||
},
|
||||
form: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getLane()
|
||||
this.getList();
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
getRecordPage(this.queryParams).then((response) => {
|
||||
console.log(response)
|
||||
this.list = response.data.list;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
async getLane() {
|
||||
const res = await getLaneList({
|
||||
pageNo: 1,
|
||||
pageSize: 100
|
||||
})
|
||||
if (res.code === 0 && res.data) {
|
||||
console.log(res.data)
|
||||
this.searchBarFormConfig[2].selectOptions = res.data.list.map(item => {
|
||||
return { id: item.id, name: item.lane }
|
||||
})
|
||||
console.log(this.searchBarFormConfig)
|
||||
}
|
||||
},
|
||||
/** 取消按钮 */
|
||||
cancel() {
|
||||
this.open = false;
|
||||
},
|
||||
// /** 导出按钮操作 */
|
||||
// handleExport() {
|
||||
// // 处理查询参数
|
||||
// let params = { ...this.queryParams };
|
||||
// params.pageNo = undefined;
|
||||
// params.pageSize = undefined;
|
||||
// this.$modal
|
||||
// .confirm('是否确认导出所有设备数据项?')
|
||||
// .then(() => {
|
||||
// this.exportLoading = true;
|
||||
// return exportEquipmentExcel(params);
|
||||
// })
|
||||
// .then((response) => {
|
||||
// this.$download.excel(response, '设备.xls');
|
||||
// this.exportLoading = false;
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
handleTableBtnClick ({data, type}) {
|
||||
switch (type) {
|
||||
case 'detail':
|
||||
this.viewDetail(data.id)
|
||||
}
|
||||
},
|
||||
// 查看详情
|
||||
viewDetail(id) {
|
||||
this.editMode = 'detail';
|
||||
this.open = true;
|
||||
this.form.id = id;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['drawer'].init();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
65
src/views/cost/components/SmallTitle.vue
Normal file
65
src/views/cost/components/SmallTitle.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 15:27:31
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-08-01 16:25:54
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div :class="[className, { 'p-0': noPadding }]">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
size: {
|
||||
// 取值范围: xl lg md sm
|
||||
type: String,
|
||||
default: 'de',
|
||||
validator: function (val) {
|
||||
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
|
||||
},
|
||||
},
|
||||
noPadding: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
className: function () {
|
||||
return `${this.size}-title`;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
|
||||
$mgr: 8px;
|
||||
@each $size, $height in $pxls {
|
||||
.#{$size}-title {
|
||||
font-size: $height;
|
||||
line-height: $height;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 4px;
|
||||
height: $height + 2px;
|
||||
border-radius: 1px;
|
||||
margin-right: $mgr;
|
||||
background-color: #0b58ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.p-0 {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
442
src/views/cost/components/add-or-updata.vue
Normal file
442
src/views/cost/components/add-or-updata.vue
Normal file
@@ -0,0 +1,442 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-13 15:07:24
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-07 15:35:14
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div class="circle-container">
|
||||
<div v-for="(item, index) in dotArr" :key="index" class="circle-wrapper">
|
||||
<div
|
||||
class="circle"
|
||||
:style="{
|
||||
background: stepNum == index + 1 ? '#0B58FF' : '',
|
||||
}">
|
||||
{{ index + 1 }}
|
||||
</div>
|
||||
<div
|
||||
class="circle-text"
|
||||
:style="{
|
||||
color: stepNum == index + 1 ? '#0B58FF' : '',
|
||||
}">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<!-- 圆点后面的虚线 -->
|
||||
<div v-if="index < 2" class="connector" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="stepNum == 1">
|
||||
<div class="topTip">
|
||||
1.可选择库区、巷道,同批次创建任务搬运仅支持同一产品型号。
|
||||
<br />
|
||||
2.须在本页下方填写搬运数量,搬运数量仅支持双数,且数量≤当前可用库存总量。
|
||||
</div>
|
||||
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||
步骤一:选择产品及起点
|
||||
</small-title>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-position="top"
|
||||
label-width="80px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="搬运对象" prop="val1">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="dataForm.val1"
|
||||
placeholder="请选择搬运对象">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="dataForm.val1 == 1">
|
||||
<el-form-item label="产品名称" prop="val1">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="dataForm.val2"
|
||||
placeholder="请选择产品名称">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="dataForm.val1 == 1">
|
||||
<el-form-item label="规格型号" prop="val1">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="dataForm.val2"
|
||||
placeholder="请选择规格型号">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="搬运数量" prop="val4">
|
||||
<el-input
|
||||
v-model="dataForm.val4"
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
||||
<template slot="append">盘</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起点信息" prop="val5">
|
||||
<el-radio-group v-model="dataForm.val5">
|
||||
<el-radio :label="1">按策略自动选择</el-radio>
|
||||
<el-radio :label="2">指定起点</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="dataForm.val5 == 2" class="potBG-div">
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="10">
|
||||
起点库区:
|
||||
<el-select
|
||||
style="width: 200px; margin-left: 10px"
|
||||
v-model="startPot"
|
||||
size="small"
|
||||
placeholder="请选择起点库区">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="13" style="text-align: right; line-height: 36px">
|
||||
<span
|
||||
class="num1-startPot-status"
|
||||
style="background-color: #5ab45a" />
|
||||
可选
|
||||
<span class="num1-startPot-status" />
|
||||
不可选
|
||||
<span
|
||||
class="num1-startPot-status"
|
||||
style="background-color: #e9b100" />
|
||||
已选
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="potTitleBG">
|
||||
<div v-for="item in Object.keys(startPotList)" :key="item">
|
||||
<div class="potTitle">
|
||||
{{ item }}
|
||||
</div>
|
||||
<div class="potList">
|
||||
<div
|
||||
class="pot"
|
||||
v-for="sitem in startPotList[item]"
|
||||
:key="sitem.id"
|
||||
:style="{
|
||||
backgroundColor: potBGcolor[sitem.status],
|
||||
cursor: sitem.status > 0 ? 'pointer' : '',
|
||||
}"
|
||||
@click="sitem.status > 0 && setStartPot(sitem)"
|
||||
:title="sitem.name">
|
||||
{{ sitem.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div style="text-align: right">可用库存总量 <span style="color:#409EFF;font-size:16px">12</span> 盘</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="stepNum == 2">
|
||||
<div class="topTip">
|
||||
1.指定终点库位,下发后会锁定所属巷道仅本批次任务进入。
|
||||
<br />
|
||||
2.指定终点库位选位规则:仅可从巷道最里空对位选位。
|
||||
<br />
|
||||
3.只选择库区或巷道时,该方式下当前终点为候选位置,系统将根据策略与现场实际情况自动确定最终终点库位。
|
||||
</div>
|
||||
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||
步骤二:选择终点
|
||||
</small-title>
|
||||
</div>
|
||||
<div v-if="stepNum == 3">
|
||||
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||
步骤三:预览与下发
|
||||
</small-title>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SmallTitle from './SmallTitle';
|
||||
export default {
|
||||
components: {
|
||||
SmallTitle,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dotArr: [
|
||||
{
|
||||
name: '选择起点',
|
||||
},
|
||||
{
|
||||
name: '选择终点',
|
||||
},
|
||||
{
|
||||
name: '预览下发',
|
||||
},
|
||||
],
|
||||
potBGcolor: ['', '#dafadc', '#f8f0c4'],
|
||||
stepNum: 1, // 当前第几步
|
||||
//第一步参数
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
val1: undefined,
|
||||
val2: undefined,
|
||||
val3: undefined,
|
||||
val4: undefined,
|
||||
val5: 1,
|
||||
},
|
||||
options1: [
|
||||
{
|
||||
label: '产品',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '空盘',
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
dataRule: {},
|
||||
startPot: undefined, //起点库区选择的类型
|
||||
startPotList: {
|
||||
//起点库区List
|
||||
G01: [
|
||||
{
|
||||
id: '001',
|
||||
name: 'L001',
|
||||
status: 1,
|
||||
},
|
||||
{
|
||||
id: '002',
|
||||
name: 'R002',
|
||||
status: 1,
|
||||
},
|
||||
{
|
||||
id: '003',
|
||||
name: 'L003',
|
||||
status: 0,
|
||||
},
|
||||
{
|
||||
id: '004',
|
||||
name: 'R004',
|
||||
status: 0,
|
||||
},
|
||||
],
|
||||
G02: [
|
||||
{
|
||||
id: '005',
|
||||
name: 'L005',
|
||||
},
|
||||
{
|
||||
id: '006',
|
||||
name: 'R006',
|
||||
},
|
||||
{
|
||||
id: '007',
|
||||
name: 'L007',
|
||||
},
|
||||
{
|
||||
id: '008',
|
||||
name: 'R008',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || undefined;
|
||||
this.$nextTick(() => {
|
||||
if (this.dataForm.id) {
|
||||
} else {
|
||||
}
|
||||
});
|
||||
},
|
||||
//上一步
|
||||
upSubmit() {
|
||||
if (this.stepNum == 2) {
|
||||
this.stepNum -= 1;
|
||||
this.$emit('setSN', this.stepNum);
|
||||
} else if (this.stepNum == 3) {
|
||||
this.stepNum -= 1;
|
||||
this.$emit('setSN', this.stepNum);
|
||||
}
|
||||
},
|
||||
//下一步
|
||||
nextSubmit() {
|
||||
if (this.stepNum == 1) {
|
||||
this.stepNum += 1;
|
||||
this.$emit('setSN', this.stepNum);
|
||||
return;
|
||||
}
|
||||
if (this.stepNum == 2) {
|
||||
this.stepNum += 1;
|
||||
this.$emit('setSN', this.stepNum);
|
||||
return;
|
||||
}
|
||||
if (this.stepNum == 3) {
|
||||
this.stepNum = 1;
|
||||
this.$emit('setSN', this.stepNum);
|
||||
return;
|
||||
}
|
||||
},
|
||||
cancelStep() {},
|
||||
|
||||
// 第一步方法
|
||||
setStartPot(data) {
|
||||
data.status = data.status == 1 ? 2 : 1;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.topTip {
|
||||
background-color: #ebebeb;
|
||||
padding: 10px 20px;
|
||||
border-radius: 5px;
|
||||
line-height: 25px;
|
||||
}
|
||||
</style>
|
||||
<!-- //库位点的样式 -->
|
||||
<style scoped>
|
||||
.potBG-div {
|
||||
width: 100%;
|
||||
margin: 10px;
|
||||
border: 1px solid gainsboro;
|
||||
box-shadow: 2px 2px 2px gainsboro, -1px -1px 3px gainsboro;
|
||||
padding: 15px;
|
||||
}
|
||||
.num1-startPot-status {
|
||||
margin-left: 5px;
|
||||
display: inline-block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border: 1px solid gainsboro;
|
||||
}
|
||||
.potTitleBG {
|
||||
margin-top: 10px;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
}
|
||||
.potTitle {
|
||||
width: 82px;
|
||||
background-color: rgb(169, 235, 249);
|
||||
border-radius: 3px;
|
||||
margin-right: 5px;
|
||||
text-align: center;
|
||||
color: #000000;
|
||||
letter-spacing: 1px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.potList {
|
||||
width: 82px;
|
||||
display: grid;
|
||||
grid-template-columns: 40px 40px;
|
||||
gap: 2px;
|
||||
}
|
||||
.pot {
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
border: 1px solid gainsboro;
|
||||
border-radius: 3px;
|
||||
padding: 5px 0;
|
||||
margin-bottom: 5px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- //序号圆点 -->
|
||||
<style scoped>
|
||||
.circle-container {
|
||||
height: 110px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
width: 90%;
|
||||
overflow-x: auto;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.circle-wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.circle {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: 50%;
|
||||
background: #8db1ff;
|
||||
font-weight: 500;
|
||||
font-size: 31px;
|
||||
color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
.circle-text {
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
left: -15px;
|
||||
color: #8db1ff;
|
||||
width: 82px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 下半圆虚线边框 */
|
||||
.circle::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -6px; /* 2px边框 + 2px间隙 */
|
||||
left: -4px;
|
||||
right: -4px;
|
||||
height: 30px; /* 半圆高度 */
|
||||
border-radius: 0 0 60px 60px;
|
||||
border: 1px dashed #0b58ff;
|
||||
border-top: none;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.connector {
|
||||
width: 160px; /* 计算连接线长度 */
|
||||
height: 2px;
|
||||
border-bottom: 1px dashed rgb(11, 88, 255, 1);
|
||||
margin: 0 5px;
|
||||
z-index: 1;
|
||||
}
|
||||
</style>
|
||||
273
src/views/cost/components/detailDrawer.vue
Normal file
273
src/views/cost/components/detailDrawer.vue
Normal file
@@ -0,0 +1,273 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2025-11-07 17:01:51
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-07 22:31:17
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:with-header="false"
|
||||
size="50%"
|
||||
@close="closeD"
|
||||
:show-close="false">
|
||||
<div class="bgDiv1">
|
||||
<el-row :gutter="20" style="margin-bottom: 15px">
|
||||
<el-col :span="8" style="font-size: 20px; font-weight: 600">
|
||||
TSK202510230001
|
||||
</el-col>
|
||||
<el-col :span="8">满盘搬运(自动)</el-col>
|
||||
<el-col :span="8">
|
||||
上次刷新:{{ parseTime(Date.now()) }}
|
||||
<el-button type="text" @click="refresh">刷新</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">任务状态</el-col>
|
||||
<el-col :span="8">优先级</el-col>
|
||||
<el-col :span="8">执行车辆</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-bottom: 15px">
|
||||
<el-col :span="8">
|
||||
<span
|
||||
:style="{ backgroundColor: statusColor[1].color }"
|
||||
class="taskStatus">
|
||||
{{ statusColor[1].label }}
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="8">中</el-col>
|
||||
<el-col :span="8">--</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">执行时长</el-col>
|
||||
<el-col :span="8">创建人</el-col>
|
||||
<el-col :span="8">创建时间</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">--</el-col>
|
||||
<el-col :span="8">系统/张三</el-col>
|
||||
<el-col :span="8">{{ parseTime(Date.now()) }}</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="bgDiv2">
|
||||
<el-steps
|
||||
:active="stepNum"
|
||||
finish-status="success"
|
||||
:process-status="stepStatus"
|
||||
align-center>
|
||||
<el-step title="待下发"></el-step>
|
||||
<el-step title="待执行"></el-step>
|
||||
<el-step title="执行中"></el-step>
|
||||
<el-step title="已完成"></el-step>
|
||||
</el-steps>
|
||||
<div class="abnormal">任务异常:无效路径</div>
|
||||
</div>
|
||||
<div class="bgDiv3">
|
||||
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||
搬运对象
|
||||
</small-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<div class="pan-info">
|
||||
<div class="pan-title">L盘</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="pan-info">
|
||||
<div class="pan-title">R盘</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="bgDiv4">
|
||||
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||
回收信息
|
||||
</small-title>
|
||||
<el-descriptions :column="2" size="medium" border>
|
||||
<el-descriptions-item label="回收方式">他车回收</el-descriptions-item>
|
||||
<el-descriptions-item label="回收任务编号">
|
||||
18100000000
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="回收库位">
|
||||
CK-01-A05-L / R
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="执行车辆">AGV-06</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="bgDiv5">
|
||||
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||
任务明细
|
||||
</small-title>
|
||||
<el-descriptions :column="2" size="medium" border>
|
||||
<el-descriptions-item label="起点库位(L/R)">
|
||||
CK-01-A05-L / R
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终点库位(L/R)">
|
||||
CC-02-B03-L/R (候选 )
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="起点策略">--</el-descriptions-item>
|
||||
<el-descriptions-item label="终点策略">入库策略</el-descriptions-item>
|
||||
<el-descriptions-item label="FMS任务号">--</el-descriptions-item>
|
||||
<el-descriptions-item label="车辆位置">--</el-descriptions-item>
|
||||
<el-descriptions-item label="电量">--</el-descriptions-item>
|
||||
<el-descriptions-item label="是否载货">--</el-descriptions-item>
|
||||
<el-descriptions-item label="创建方式">自动/人工</el-descriptions-item>
|
||||
<el-descriptions-item label="任务来源">
|
||||
PDA/PC/系统
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="关联叫料单">--</el-descriptions-item>
|
||||
<el-descriptions-item label=""></el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="bgDiv6">
|
||||
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||
任务日志
|
||||
</small-title>
|
||||
<el-timeline style="padding: 0">
|
||||
<el-timeline-item
|
||||
v-for="(activity, index) in activities"
|
||||
:key="index"
|
||||
:type="activity.type"
|
||||
:color="activity.color"
|
||||
size="large"
|
||||
hide-timestamp>
|
||||
<span>{{ activity.content }}</span>
|
||||
<span style="float: right">{{ activity.timestamp }}</span>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<div class="drawer-body__footer">
|
||||
<el-button @click="closeD">返 回</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import SmallTitle from './SmallTitle';
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
title: '',
|
||||
statusColor: [
|
||||
//bgDiv1的任务状态
|
||||
{ label: '待下发', color: '#fa8c16' },
|
||||
{ label: '待执行', color: '#1890ff' },
|
||||
{ label: '执行中', color: '#1890ff' },
|
||||
{ label: '已完成', color: '#52c41a' },
|
||||
{ label: '暂停中', color: '#8c8c8c' },
|
||||
{ label: '已终止', color: '#faad14' },
|
||||
{ label: '异常', color: '#ff4d4f' },
|
||||
{ label: '禁用', color: '#d9d9d9' },
|
||||
],
|
||||
//bgDiv2的步骤条
|
||||
stepNum: 2,
|
||||
stepStatus: 'finish',
|
||||
//bgDiv6的时间线
|
||||
|
||||
activities: [
|
||||
{
|
||||
content: 'FMS | 卸货完成,任务完成',
|
||||
timestamp: '2018-04-12 20:46',
|
||||
type: 'primary',
|
||||
},
|
||||
{
|
||||
content: 'FMS | 取货完成',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
},
|
||||
{
|
||||
content: 'FMS | 派车AGV-03,前往起点取货',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
},
|
||||
{
|
||||
content: '张三 | 任务扫码配对完成,进入待下发',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
SmallTitle,
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
init(val) {
|
||||
this.visible = true;
|
||||
},
|
||||
//刷新
|
||||
refresh() {},
|
||||
closeD() {
|
||||
this.visible = false
|
||||
this.$emit('closeDrawer');
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bgDiv1 {
|
||||
background-color: rgba(242, 242, 242, 0.5);
|
||||
padding: 20px;
|
||||
line-height: 25px;
|
||||
font-size: 15px;
|
||||
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||
.taskStatus {
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
padding: 2px 5px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.bgDiv2 {
|
||||
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||
padding: 18px 0;
|
||||
.abnormal {
|
||||
width: 80%;
|
||||
margin: auto;
|
||||
border-radius: 5px;
|
||||
height: 40px;
|
||||
font-size: 22px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
background-color: rgba(217, 0, 27, 0.1);
|
||||
color: rgba(217, 0, 27, 1);
|
||||
border: 1px solid rgba(217, 0, 27, 1);
|
||||
}
|
||||
}
|
||||
.bgDiv3 {
|
||||
padding: 20px 20px 0;
|
||||
.pan-info {
|
||||
height: 350px;
|
||||
border: 1px solid rgba(121, 121, 121, 0.8);
|
||||
border-radius: 5px;
|
||||
.pan-title {
|
||||
background-color: rgba(242, 242, 242, 0.5);
|
||||
height: 35px;
|
||||
font-size: 20px;
|
||||
line-height: 35px;
|
||||
padding: 0 20px;
|
||||
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bgDiv4 {
|
||||
padding: 20px 20px 0;
|
||||
}
|
||||
.bgDiv5 {
|
||||
padding: 20px 20px 0;
|
||||
}
|
||||
.bgDiv6 {
|
||||
padding: 20px 20px 0;
|
||||
}
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 0 18px 10px;
|
||||
}
|
||||
</style>
|
||||
65
src/views/cost/components/stopInStock.vue
Normal file
65
src/views/cost/components/stopInStock.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2025-11-08 17:44:05
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-08 18:13:25
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div>请选择要执行的终止方式,系统会根据选择进行处理</div>
|
||||
<el-radio-group v-model="radio" class="stockRadioDiv">
|
||||
<el-radio :label="1" border style="margin: 10px 0">
|
||||
仅终止,稍后回收
|
||||
<div style="font-weight: 400">
|
||||
任务立即终止,车辆保持暂停,稍后可在任务列表中手动回收
|
||||
</div>
|
||||
</el-radio>
|
||||
<el-radio :label="2" border style="margin: 10px 0">
|
||||
终止,并立即回收
|
||||
<div style="font-weight: 400">
|
||||
任务立即终止立即,选择货物回收方式生成任务或更新卸货点
|
||||
</div>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<div>
|
||||
终止原因:
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
style="margin: 10px 0"
|
||||
placeholder="请输入终止原因"
|
||||
v-model="textarea" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radio: 1,
|
||||
textarea: '',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(val) {},
|
||||
submit() {
|
||||
if(this.textarea){
|
||||
|
||||
}else{
|
||||
this.$message('请输入终止原因');
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.stockRadioDiv >>> .el-radio--medium.is-bordered {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 70px;
|
||||
line-height: 20px;
|
||||
}
|
||||
</style>
|
||||
32
src/views/cost/components/subSpan1.vue
Normal file
32
src/views/cost/components/subSpan1.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-13 16:18:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-06 15:19:24
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
{{
|
||||
(injectData.val2
|
||||
? ['满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][injectData.val2]
|
||||
: '-')
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
created() {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
32
src/views/cost/components/subSpan2.vue
Normal file
32
src/views/cost/components/subSpan2.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-13 16:18:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-06 15:20:43
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
{{
|
||||
(injectData.val3
|
||||
? ['待下发', '待执行', '执行中', '已完成', '暂停中', '已终止', '异常'][injectData.val3]
|
||||
: '-')
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
created() {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
57
src/views/cost/components/subSpan3.vue
Normal file
57
src/views/cost/components/subSpan3.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-13 16:18:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-06 15:37:02
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div
|
||||
style="
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 5px;
|
||||
background-color: #e89b24;
|
||||
color: #fff;
|
||||
text-align:center;
|
||||
line-height:16px
|
||||
">
|
||||
L
|
||||
</div>
|
||||
产品名称+产品规格
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div
|
||||
style="
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 5px;
|
||||
background-color: #6a96ec;
|
||||
color: #fff;
|
||||
text-align:center;
|
||||
line-height:16px
|
||||
">
|
||||
R
|
||||
</div>
|
||||
产品名称+产品规格
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
created() {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
32
src/views/cost/components/subSpan4.vue
Normal file
32
src/views/cost/components/subSpan4.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-13 16:18:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-06 15:19:24
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
{{
|
||||
(injectData.val2
|
||||
? ['满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][injectData.val2]
|
||||
: '-')
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
created() {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
23
src/views/cost/components/typeRule.vue
Normal file
23
src/views/cost/components/typeRule.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-12-05 13:45:59
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-04-15 17:12:03
|
||||
* @Description
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<span>{{ parseTime(injectData.startTime,'{y}年{m}月{d}日') + '-' + (parseTime(injectData.endTime)?parseTime(injectData.endTime,'{y}年{m}月{d}日'):'永久') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: '',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -1,145 +1,5 @@
|
||||
<template>
|
||||
<div class="home-page">
|
||||
<div class="date-tabs">
|
||||
<!-- @tab-click="handleClick" -->
|
||||
<el-tabs v-model="activeName" @tab-click="timedayChange" :stretch="true">
|
||||
<el-tab-pane
|
||||
:label="'\u2002\u2002日\u2002\u2002'"
|
||||
name="日"></el-tab-pane>
|
||||
<el-tab-pane
|
||||
:label="'\u2002\u2002周\u2002\u2002'"
|
||||
name="周"></el-tab-pane>
|
||||
<el-tab-pane
|
||||
:label="'\u2002\u2002月\u2002\u2002'"
|
||||
name="月"></el-tab-pane>
|
||||
<el-tab-pane
|
||||
:label="'\u2002\u2002年\u2002\u2002'"
|
||||
name="年"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="detail">
|
||||
<el-date-picker
|
||||
v-model="timeday"
|
||||
align="right"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
valueFormat="yyyy-MM-dd"
|
||||
:clearable="false"
|
||||
@change="timedayChange"
|
||||
placeholder="选择日期"
|
||||
:picker-options="pickerOptions"></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="main-top" :gutter="16">
|
||||
<el-col :span="24" style="position: relative">
|
||||
<div class="title">
|
||||
<svg-icon icon-class="home-produce" />
|
||||
<span class="title-inner">生产总成本</span>
|
||||
</div>
|
||||
<el-row class="box">
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.priceS }}万元</div>
|
||||
<div class="unit-style">总计成本</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.matPriceS }}万元</div>
|
||||
<div class="unit-style">原料成本</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.energyPriceS }}万元</div>
|
||||
<div class="unit-style">能源成本</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.otherPriceS }}万元</div>
|
||||
<div class="unit-style">其他成本</div>
|
||||
</el-col>
|
||||
<!-- <el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.ratioS }}</div>
|
||||
<div class="unit-style">综合良品率/%</div>
|
||||
</el-col> -->
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.areaPriceS }}元</div>
|
||||
<div class="unit-style">综合每平米成本</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" style="position: relative">
|
||||
<div class="title">
|
||||
<svg-icon icon-class="home-produce" />
|
||||
<span class="title-inner">原片成本</span>
|
||||
</div>
|
||||
<el-row class="box">
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.priceO }}万元</div>
|
||||
<div class="unit-style">原片总成本</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.matPriceO }}万元</div>
|
||||
<div class="unit-style">原料成本</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.energyPriceO }}万元</div>
|
||||
<div class="unit-style">能源成本</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.otherPriceO }}万元</div>
|
||||
<div class="unit-style">其他成本</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.ratioO }}</div>
|
||||
<div class="unit-style">原片良品率/%</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.areaPriceO }}元</div>
|
||||
<div class="unit-style">原片每平米成本</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" style="position: relative">
|
||||
<div class="title">
|
||||
<svg-icon icon-class="home-produce" />
|
||||
<span class="title-inner">深加工成本</span>
|
||||
</div>
|
||||
<el-row class="box">
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.priceD }}万元</div>
|
||||
<div class="unit-style">深加工总成本</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.energyPriceD }}万元</div>
|
||||
<div class="unit-style">能源成本</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.otherPriceD }}万元</div>
|
||||
<div class="unit-style">其他成本</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.ratioD }}</div>
|
||||
<div class="unit-style">深加工良品率/%</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="num-box shadow">
|
||||
<div class="num-style">{{ homeData.areaPriceD }}元</div>
|
||||
<div class="unit-style">深加工每平米成本</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="main-bottom" :gutter="16" v-if="false">
|
||||
<el-col :span="9">
|
||||
<div class="chart-wrapper">
|
||||
<line-chart :chart-data="lineChartData" />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<div class="chart-wrapper">
|
||||
<pie-chart />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="chart-wrapper">
|
||||
<bar-chart />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div
|
||||
class="main-footer"
|
||||
style="
|
||||
@@ -157,267 +17,29 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
import LineChart from '../dashboard/LineChart';
|
||||
import PieChart from '../dashboard/PieChart';
|
||||
import BarChart from '../dashboard/BarChart';
|
||||
import PanelGroup from '../dashboard/PanelGroup';
|
||||
import { getData } from '@/api/cost/allCost';
|
||||
import { getUserProfile } from '@/api/system/user';
|
||||
|
||||
const lineChartData = {
|
||||
newVisitis: {
|
||||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 145],
|
||||
},
|
||||
messages: {
|
||||
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
||||
actualData: [180, 160, 151, 106, 145, 150, 130],
|
||||
},
|
||||
purchases: {
|
||||
expectedData: [80, 100, 121, 104, 105, 90, 100],
|
||||
actualData: [120, 90, 100, 138, 142, 130, 130],
|
||||
},
|
||||
shoppings: {
|
||||
expectedData: [130, 140, 141, 142, 145, 150, 160],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 130],
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
mixins: [tableHeightMixin],
|
||||
components: {
|
||||
LineChart,
|
||||
PieChart,
|
||||
PanelGroup,
|
||||
BarChart,
|
||||
},
|
||||
computed: {
|
||||
gradientBackground() {
|
||||
return {
|
||||
'background-image':
|
||||
'linear-gradient(90deg, #f0f0f0 25%, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0) 50%, #f0f0f0 50%, #f0f0f0 75%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0))',
|
||||
'background-size': '100px 100px', // 调整条纹的大小
|
||||
};
|
||||
},
|
||||
},
|
||||
mixins: [],
|
||||
components: {},
|
||||
computed: {},
|
||||
data() {
|
||||
return {
|
||||
activeName: '日',
|
||||
user: '',
|
||||
lineChartData: lineChartData.newVisitis,
|
||||
homeData: {},
|
||||
timeday: moment(new Date()).subtract(1, 'days').format('YYYY-MM-DD'),
|
||||
startTime:
|
||||
moment(new Date()).subtract(0, 'days').format('YYYY-MM-DD') +
|
||||
' 00:00:00',
|
||||
endTime:
|
||||
moment(new Date()).subtract(-1, 'days').format('YYYY-MM-DD') +
|
||||
' 00:00:00',
|
||||
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() + 3600 * 1000 * 24 > Date.now();
|
||||
},
|
||||
shortcuts: [
|
||||
{
|
||||
text: '今天',
|
||||
onClick(picker) {
|
||||
picker.$emit('pick', new Date());
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '昨天',
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
||||
picker.$emit('pick', date);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '一周前',
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit('pick', date);
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
},
|
||||
beforeDestroy() {
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
let listQuery = {
|
||||
//分页
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
statisticType: ['', '日', '周', '月', '年'].indexOf(this.activeName),
|
||||
startTime: this.timeday + ' 00:00:00',
|
||||
};
|
||||
getData(listQuery).then((response) => {
|
||||
this.homeData = response.data;
|
||||
for (let i in this.homeData) {
|
||||
this.homeData[i] = Number(this.homeData[i]).toFixed(2);
|
||||
}
|
||||
});
|
||||
},
|
||||
timedayChange() {
|
||||
let listQuery = {
|
||||
//分页
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
statisticType: ['', '日', '周', '月', '年'].indexOf(this.activeName),
|
||||
startTime: this.timeday + ' 00:00:00',
|
||||
};
|
||||
getData(listQuery).then((response) => {
|
||||
this.homeData = response.data;
|
||||
for (let i in this.homeData) {
|
||||
this.homeData[i] = Number(this.homeData[i]).toFixed(2);
|
||||
}
|
||||
});
|
||||
},
|
||||
goDetail() {
|
||||
this.$router.push({ path: 'indexDetail' });
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.home-page::before {
|
||||
background-image: url('~@/assets/img/home-bg.png');
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.date-tabs {
|
||||
padding-left: 40px;
|
||||
padding-top: 20px;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
:deep(.date-tabs) {
|
||||
.el-tabs__header {
|
||||
margin-bottom: 8px;
|
||||
display: inline-block;
|
||||
transform: translateY(-12px);
|
||||
}
|
||||
|
||||
.el-tabs__content {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.el-tabs__item {
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
line-height: 36px !important;
|
||||
height: 36px;
|
||||
}
|
||||
.el-tabs__item.is-active {
|
||||
color: #0b58ff;
|
||||
}
|
||||
}
|
||||
.detail {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: 260px;
|
||||
top: 10px;
|
||||
}
|
||||
:deep(.detail) {
|
||||
.el-input__inner {
|
||||
background-color: transparent;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
// .current-date {
|
||||
// color: #fff;
|
||||
// font-size: 18px;
|
||||
// position: absolute;
|
||||
// left: 260px;
|
||||
// top: 14px;
|
||||
// }
|
||||
.current-time {
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
position: absolute;
|
||||
right: 38px;
|
||||
top: 14px;
|
||||
}
|
||||
.main-top {
|
||||
width: 100%;
|
||||
padding: 0 20px 0 40px;
|
||||
.title {
|
||||
position: absolute;
|
||||
left: 34px;
|
||||
top: 20px;
|
||||
width: 180px;
|
||||
font-size: 32px;
|
||||
z-index: 10;
|
||||
.title-inner {
|
||||
position: absolute;
|
||||
left: 42px;
|
||||
top: 5px;
|
||||
font-size: calc(100vw * 20 / 1920);
|
||||
}
|
||||
}
|
||||
.box {
|
||||
background-color: #fff;
|
||||
border-radius: 24px;
|
||||
height: 192px;
|
||||
padding: 40px 24px 32px 24px;
|
||||
margin-bottom: 20px;
|
||||
box-shadow: 0 8px 8px 0 gray;
|
||||
.num-box {
|
||||
height: 120px;
|
||||
padding-top: 26px;
|
||||
text-align: center;
|
||||
.num-style {
|
||||
color: #000;
|
||||
font-size: calc(100vw * 40 / 1920);
|
||||
}
|
||||
.unit-style {
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
font-size: calc(100vw * 18 / 1920);
|
||||
}
|
||||
}
|
||||
.shadow {
|
||||
background: linear-gradient(90deg, #ffffff 80%, #f2f4f9 100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
.main-bottom {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
.chart-wrapper {
|
||||
margin-left: 10px;
|
||||
height: 425px;
|
||||
background: #fff;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 3px 3px 0 gray;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.home-page {
|
||||
.el-progress-bar__inner {
|
||||
background-image: url('~@/assets/img/home-progress-bg.png');
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -284,7 +284,7 @@ export default {
|
||||
mobile: '',
|
||||
mobileCode: '',
|
||||
rememberMe: false,
|
||||
tenantName: '技术中心',
|
||||
tenantName: '芋道源码',
|
||||
},
|
||||
scene: 21,
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-12 15:35:21
|
||||
* @LastEditTime: 2025-11-28 14:38:31
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -14,56 +14,29 @@
|
||||
label-width="80px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品编码" prop="code">
|
||||
<el-form-item label="物料编码" prop="materialCode">
|
||||
<el-input
|
||||
v-model="dataForm.code"
|
||||
v-model="dataForm.materialCode"
|
||||
clearable
|
||||
placeholder="请输入产品编码" />
|
||||
placeholder="请输入物料编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品名称" prop="name">
|
||||
<el-form-item label="物料型号" prop="materialName">
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
v-model="dataForm.materialName"
|
||||
clearable
|
||||
placeholder="请输入产品名称" />
|
||||
placeholder="请输入物料型号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品规格" prop="address">
|
||||
<el-form-item label="物料规格" prop="material">
|
||||
<el-input
|
||||
v-model="dataForm.address"
|
||||
v-model="dataForm.material"
|
||||
clearable
|
||||
placeholder="请输入产品规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品类型" prop="name">
|
||||
<el-select
|
||||
v-model="dataForm.name"
|
||||
disabled
|
||||
:style="{ width: '100%' }"
|
||||
placeholder="请选择产品类型">
|
||||
<el-option
|
||||
v-for="item in typeArr"
|
||||
:key="item.name"
|
||||
:label="item.label"
|
||||
:value="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="enabled">
|
||||
<el-select
|
||||
:style="{ width: '100%' }" v-model="dataForm.enabled" placeholder="请选择启用状态">
|
||||
<el-option
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.INFRA_BOOLEAN_STRING)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
placeholder="请输入物料规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -72,39 +45,33 @@
|
||||
|
||||
<script>
|
||||
import basicAdd from '@/mixins/basic-add';
|
||||
import {
|
||||
createFactory,
|
||||
updateFactory,
|
||||
getFactory,
|
||||
getCode,
|
||||
} from '@/api/core/base/factory';
|
||||
import { createProduct, updateProduct,getProduct } from '@/api/ssdl/product&recipe';
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
isGetCode: true,
|
||||
codeURL: getCode,
|
||||
createURL: createFactory,
|
||||
updateURL: updateFactory,
|
||||
infoURL: getFactory,
|
||||
createURL: createProduct,
|
||||
updateURL: updateProduct,
|
||||
infoURL: getProduct,
|
||||
},
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
code: undefined,
|
||||
name: undefined,
|
||||
address: undefined,
|
||||
enabled:'1',
|
||||
remark: undefined,
|
||||
material: undefined,
|
||||
materialName: undefined,
|
||||
materialCode: undefined,
|
||||
},
|
||||
typeArr: [],
|
||||
dataRule: {
|
||||
code: [
|
||||
{ required: true, message: '产品编码不能为空', trigger: 'blur' },
|
||||
materialCode: [
|
||||
{ required: true, message: '物料编码不能为空', trigger: 'blur' },
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '产品名称不能为空', trigger: 'blur' },
|
||||
materialName: [
|
||||
{ required: true, message: '物料型号不能为空', trigger: 'blur' },
|
||||
],
|
||||
material: [
|
||||
{ required: true, message: '规格不能为空', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -41,48 +41,32 @@
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import basicPage from '@/mixins/basic-page';
|
||||
import changeStatus from './changeStatus.vue';
|
||||
import { parseTime } from '@/filter/code-filter';
|
||||
import {
|
||||
deleteFactory,
|
||||
getFactoryPage,
|
||||
exportFactoryExcel,
|
||||
} from '@/api/core/base/factory';
|
||||
import { deleteProduct, getProductPage } from '@/api/ssdl/product&recipe';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'code',
|
||||
label: '产品编码',
|
||||
prop: 'materialCode',
|
||||
label: '物料编码',
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '产品名称',
|
||||
prop: 'materialName',
|
||||
label: '物料型号',
|
||||
},
|
||||
{
|
||||
prop: 'address',
|
||||
label: '规格型号',
|
||||
prop: 'material',
|
||||
label: '规格',
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '产品分类',
|
||||
},
|
||||
{
|
||||
prop: 'remark1',
|
||||
prop: 'creator',
|
||||
label: '创建人',
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '时间',
|
||||
label: '创建时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'enabled',
|
||||
label: '状态',
|
||||
subcomponent: changeStatus,
|
||||
width: 80,
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
@@ -90,47 +74,33 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getFactoryPage,
|
||||
deleteURL: deleteFactory,
|
||||
exportURL: exportFactoryExcel,
|
||||
getDataListURL: getProductPage,
|
||||
deleteURL: deleteProduct,
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`base:factory:update`)
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:factory:delete`)
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
},
|
||||
].filter((v) => v),
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '分类',
|
||||
selectOptions: [],
|
||||
param: 'val1',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '状态',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '正常' },
|
||||
{ id: 2, name: '停用' },
|
||||
],
|
||||
param: 'val2',
|
||||
type: 'input',
|
||||
label: '型号',
|
||||
placeholder: '型号',
|
||||
param: 'name',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品编码',
|
||||
placeholder: '产品编码',
|
||||
param: 'name',
|
||||
label: '编码',
|
||||
placeholder: '编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@@ -150,7 +120,7 @@ export default {
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:factory:create') ? 'button' : '',
|
||||
type: 'button',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
@@ -177,16 +147,15 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.name = val.name;
|
||||
this.listQuery.val1 = val.val1;
|
||||
this.listQuery.val2 = val.val2;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.materialName = val.name;
|
||||
this.listQuery.materialCode = val.code;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
@@ -204,6 +173,27 @@ export default {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id, name, index,data) {
|
||||
this.$confirm(`是否确认删除${'物料型号为 ' + data.materialName + ' '}的数据项?`, "系统提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
65
src/views/product&recipe/recipe/SmallTitle.vue
Normal file
65
src/views/product&recipe/recipe/SmallTitle.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 15:27:31
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-08-01 16:25:54
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div :class="[className, { 'p-0': noPadding }]">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
size: {
|
||||
// 取值范围: xl lg md sm
|
||||
type: String,
|
||||
default: 'de',
|
||||
validator: function (val) {
|
||||
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
|
||||
},
|
||||
},
|
||||
noPadding: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
className: function () {
|
||||
return `${this.size}-title`;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
|
||||
$mgr: 8px;
|
||||
@each $size, $height in $pxls {
|
||||
.#{$size}-title {
|
||||
font-size: 18px;
|
||||
line-height: $height;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 4px;
|
||||
height: $height + 2px;
|
||||
border-radius: 1px;
|
||||
margin-right: $mgr;
|
||||
background-color: #0b58ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.p-0 {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -1,114 +1,357 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-12 15:35:21
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="80px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品编码" prop="code">
|
||||
<el-input
|
||||
v-model="dataForm.code"
|
||||
clearable
|
||||
placeholder="请输入产品编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品名称" prop="name">
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
clearable
|
||||
placeholder="请输入产品名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品规格" prop="address">
|
||||
<el-input
|
||||
v-model="dataForm.address"
|
||||
clearable
|
||||
placeholder="请输入产品规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品类型" prop="name">
|
||||
<el-select
|
||||
v-model="dataForm.name"
|
||||
disabled
|
||||
:style="{ width: '100%' }"
|
||||
placeholder="请选择产品类型">
|
||||
<el-option
|
||||
v-for="item in typeArr"
|
||||
:key="item.name"
|
||||
:label="item.label"
|
||||
:value="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态" prop="enabled">
|
||||
<el-select
|
||||
:style="{ width: '100%' }" v-model="dataForm.enabled" placeholder="请选择启用状态">
|
||||
<el-option
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.INFRA_BOOLEAN_STRING)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
size="60%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
|
||||
<div class="content">
|
||||
<div class="visual-part">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
label-width="100px"
|
||||
label-position="top"
|
||||
@keyup.enter.native="dataFormSubmit">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="配方规格" prop="processSize">
|
||||
<el-input
|
||||
v-model="dataForm.processSize"
|
||||
clearable
|
||||
:disabled="isdetail"
|
||||
placeholder="请输入配方规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="配方型号" prop="processName">
|
||||
<el-input
|
||||
v-model="dataForm.processName"
|
||||
clearable
|
||||
:disabled="isdetail"
|
||||
placeholder="请输入配方型号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="配方描述" prop="processDesc">
|
||||
<el-input
|
||||
v-model="dataForm.processDesc"
|
||||
clearable
|
||||
:disabled="isdetail"
|
||||
placeholder="请输入配方描述" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true"
|
||||
v-if="dataForm.processName && dataForm.processSize">
|
||||
物料属性列表
|
||||
</small-title>
|
||||
|
||||
<div
|
||||
class="attr-list"
|
||||
v-if="dataForm.processName && dataForm.processSize">
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:add-button-show="
|
||||
productAttributeList.length > 3 || isdetail ? null : '添加属性'
|
||||
"
|
||||
@emitButtonClick="addNew()"
|
||||
:table-data="productAttributeList">
|
||||
<method-btn
|
||||
v-if="!isdetail"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
v-show="listQuery.total > 0"
|
||||
:total="listQuery.total"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page-sizes="[5, 10, 15]"
|
||||
@pagination="getList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="drawer-body__footer">
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-else type="primary" @click="dataFormSubmit()">
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<product-attr-add
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getList" />
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '@/mixins/basic-add';
|
||||
import {
|
||||
createFactory,
|
||||
updateFactory,
|
||||
getFactory,
|
||||
getCode,
|
||||
} from '@/api/core/base/factory';
|
||||
updateProcess,
|
||||
createProcess,
|
||||
getProcess,
|
||||
getProcessDetailPage,
|
||||
deleteProcess,
|
||||
} from '@/api/ssdl/product&recipe';
|
||||
import productAttrAdd from './attr-add';
|
||||
import { parseTime } from '@/filter/code-filter';
|
||||
import SmallTitle from './SmallTitle';
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
},
|
||||
];
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '添加时间',
|
||||
filter: parseTime,
|
||||
},
|
||||
{
|
||||
prop: 'materialName',
|
||||
label: '物料型号',
|
||||
},
|
||||
{
|
||||
prop: 'material',
|
||||
label: '物料规格',
|
||||
},
|
||||
{
|
||||
prop: 'materialNumber',
|
||||
label: '物料数量',
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
components: { productAttrAdd, SmallTitle },
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
isGetCode: true,
|
||||
codeURL: getCode,
|
||||
createURL: createFactory,
|
||||
updateURL: updateFactory,
|
||||
infoURL: getFactory,
|
||||
},
|
||||
visible: false,
|
||||
addOrUpdateVisible: false,
|
||||
tableBtn,
|
||||
tableProps,
|
||||
productAttributeList: [],
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
code: undefined,
|
||||
name: undefined,
|
||||
address: undefined,
|
||||
enabled:'1',
|
||||
remark: undefined,
|
||||
id: null,
|
||||
processName: '', // 配方型号
|
||||
processSize: '', // 配方规格
|
||||
processDesc: '', // 配方描述
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
},
|
||||
typeArr: [],
|
||||
dataRule: {
|
||||
code: [
|
||||
{ required: true, message: '产品编码不能为空', trigger: 'blur' },
|
||||
processSize: [
|
||||
{
|
||||
required: true,
|
||||
message: '配方规格不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '产品名称不能为空', trigger: 'blur' },
|
||||
processName: [
|
||||
{
|
||||
required: true,
|
||||
message: '配方型号不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
isdetail: false,
|
||||
};
|
||||
},
|
||||
methods: {},
|
||||
methods: {
|
||||
initData() {
|
||||
this.productAttributeList.splice(0);
|
||||
this.listQuery.total = 0;
|
||||
},
|
||||
init(id, isdetail) {
|
||||
this.initData();
|
||||
this.isdetail = isdetail || false;
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
|
||||
if (this.dataForm.id) {
|
||||
// 获取物料详情
|
||||
getProcess(id).then((response) => {
|
||||
this.dataForm = response.data;
|
||||
// 获取物料的属性列表
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getList() {
|
||||
// 获取物料的属性列表
|
||||
getProcessDetailPage({
|
||||
processName: this.dataForm.processName,
|
||||
processSize: this.dataForm.processSize,
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
}).then((response) => {
|
||||
this.productAttributeList = response.data;
|
||||
});
|
||||
},
|
||||
handleClick(raw) {
|
||||
if (raw.type === 'delete') {
|
||||
this.$confirm(
|
||||
`确定对${
|
||||
raw.data.name
|
||||
? '[名称=' + raw.data.name + ']'
|
||||
: '[序号=' + raw.data._pageIndex + ']'
|
||||
}进行删除操作?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
deleteProcess(raw.data.id).then(({ data }) => {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
this.addNew(raw.data.id);
|
||||
}
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (
|
||||
!this.productAttributeList ||
|
||||
!(this.productAttributeList.length > 0)
|
||||
) {
|
||||
this.$modal.msg('物料属性不能为空');
|
||||
return;
|
||||
}
|
||||
this.productAttributeList.forEach((item) => {
|
||||
item.processName = this.dataForm.processName;
|
||||
item.processSize = this.dataForm.processSize;
|
||||
item.processDesc = this.dataForm.processDesc;
|
||||
});
|
||||
// 修改的提交
|
||||
updateProcess(this.productAttributeList).then((response) => {
|
||||
this.$modal.msgSuccess('提交成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
return;
|
||||
// 添加的提交
|
||||
createProcess(this.productAttributeList).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
goEdit() {
|
||||
this.isdetail = false;
|
||||
},
|
||||
// 新增 / 修改
|
||||
addNew(id) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id, this.dataForm);
|
||||
});
|
||||
},
|
||||
goback() {
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
this.initData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.drawer >>> .el-drawer {
|
||||
border-radius: 8px 0 0 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer >>> .el-form-item__label {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.drawer >>> .el-drawer__header {
|
||||
margin: 0;
|
||||
padding: 32px 32px 24px;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
}
|
||||
.drawer >>> .el-drawer__body {
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer >>> .content {
|
||||
padding: 30px 24px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* height: 100%; */
|
||||
}
|
||||
|
||||
.drawer >>> .visual-part {
|
||||
flex: 1 auto;
|
||||
max-height: 76vh;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
padding-right: 10px; /* 调整滚动条样式 */
|
||||
}
|
||||
|
||||
.drawer >>> .el-form,
|
||||
.drawer >>> .attr-list {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
184
src/views/product&recipe/recipe/attr-add.vue
Normal file
184
src/views/product&recipe/recipe/attr-add.vue
Normal file
@@ -0,0 +1,184 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
:width="'35%'"
|
||||
:append-to-body="true"
|
||||
:close-on-click-modal="false"
|
||||
class="dialog">
|
||||
<template #title>
|
||||
<slot name="title">
|
||||
<div class="titleStyle">
|
||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||
</div>
|
||||
</slot>
|
||||
</template>
|
||||
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
label-width="100px"
|
||||
@keyup.enter.native="dataFormSubmit()">
|
||||
<!-- <el-form-item label="设备" prop="equipmentId">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="dataForm.equipmentId"
|
||||
@change="setEquipment"
|
||||
placeholder="请选择设备">
|
||||
<el-option
|
||||
v-for="item in equipmentArr"
|
||||
:key="item.id"
|
||||
:label="item.equipmentName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="物料" prop="materialId">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="dataForm.materialId"
|
||||
filterable
|
||||
@change="setMaterial"
|
||||
placeholder="请选择物料">
|
||||
<el-option
|
||||
v-for="item in productArr"
|
||||
:key="item.id"
|
||||
:label="
|
||||
item.materialCode + '-' + item.materialName + '-' + item.material
|
||||
"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="materialNumber">
|
||||
<el-input-number
|
||||
v-model="dataForm.materialNumber"
|
||||
:step="1"
|
||||
step-strictly
|
||||
:min="0"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row style="text-align: right">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getProductPage,
|
||||
createProcess,
|
||||
getProcess,
|
||||
updateProcess,
|
||||
} from '@/api/ssdl/product&recipe';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
processId: '', // 配方id
|
||||
processName: '', // 配方型号
|
||||
processSize: '', // 配方规格
|
||||
processDesc: '', // 配方描述
|
||||
materialId: '',
|
||||
material: '',
|
||||
materialName: '',
|
||||
materialNumber: '',
|
||||
},
|
||||
productArr: [],
|
||||
equipmentArr: [],
|
||||
dataRule: {
|
||||
materialId: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'change' },
|
||||
],
|
||||
materialNumber: [
|
||||
{ required: true, message: '数量不能为空', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id,data) {
|
||||
this.dataForm.id = id || '';
|
||||
this.dataForm.processId = data.id || '';
|
||||
this.dataForm.processName = data.processName || '';
|
||||
this.dataForm.processSize = data.processSize || '';
|
||||
this.dataForm.processDesc = data.processDesc || '';
|
||||
this.visible = true;
|
||||
getProductPage({ pageNo: 1, pageSize: 100 }).then((res) => {
|
||||
this.productArr = res.data.list;
|
||||
});
|
||||
// getEquipmentPage({ pageNo: 1, pageSize: 100 }).then((res) => {
|
||||
// this.equipmentArr = res.data.list;
|
||||
// });
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
getProcess(this.dataForm.id).then((res) => {
|
||||
this.dataForm = res.data;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
setMaterial() {
|
||||
const data = this.productArr.find(
|
||||
(i) => i.id === this.dataForm.materialId
|
||||
);
|
||||
this.dataForm.materialName = data.materialName;
|
||||
this.dataForm.material = data.material;
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
updateProcess([{
|
||||
...this.dataForm,
|
||||
}]).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
createProcess([{
|
||||
...this.dataForm,
|
||||
}]).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog >>> .el-dialog__body {
|
||||
padding: 30px 24px;
|
||||
}
|
||||
.dialog >>> .el-dialog__header {
|
||||
font-size: 16px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-weight: 500;
|
||||
padding: 13px 24px;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
.dialog >>> .el-dialog__header .titleStyle::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 16px;
|
||||
background-color: #0b58ff;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,35 +0,0 @@
|
||||
<template>
|
||||
<el-switch
|
||||
@change="changeStatus"
|
||||
size="small"
|
||||
v-model="list.enabled"
|
||||
:active-value="1"
|
||||
:inactive-value="0"></el-switch>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateGroup } from '@/api/group/groupSetting';
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: this.injectData,
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
changeStatus(val) {
|
||||
const data = { ...this.injectData, enabled: val };
|
||||
updateGroup(data).then((res) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.$emit('emitData');
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -1,154 +1,134 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 14:55:51
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-28 14:34:11
|
||||
* @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"
|
||||
@emitFun="getDataList">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="90"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266',
|
||||
}"
|
||||
border
|
||||
style="width: 100%"
|
||||
ref="dataList">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<product
|
||||
:processName="scope.row.processName"
|
||||
:processSize="scope.row.processSize"></product>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="processName" label="配方型号" />
|
||||
<el-table-column prop="processSize" label="配方规格" />
|
||||
<el-table-column prop="processDesc" label="配方描述" />
|
||||
<el-table-column prop="createTime" label="创建时间" width="150">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleClick({ data: { ...scope.row }, type: 'edit' })">
|
||||
<span class="iconfont icon-edit primary-color"></span>
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleClick({ data: { ...scope.row }, type: 'delete' })">
|
||||
<span class="iconfont icon-delete" style="color: #f56c6c"></span>
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleClick({ data: { ...scope.row }, type: 'detail' })">
|
||||
<span class="iconfont icon-detail primary-color"></span>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width="50%">
|
||||
<add-or-update
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="successSubmit"></add-or-update>
|
||||
</base-dialog>
|
||||
<add-or-update
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import product from './product-mini';
|
||||
import basicPage from '@/mixins/basic-page';
|
||||
import changeStatus from './changeStatus.vue';
|
||||
import { parseTime } from '@/filter/code-filter';
|
||||
import {
|
||||
deleteFactory,
|
||||
getFactoryPage,
|
||||
exportFactoryExcel,
|
||||
} from '@/api/core/base/factory';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'code',
|
||||
label: '产品编码',
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '产品名称',
|
||||
},
|
||||
{
|
||||
prop: 'address',
|
||||
label: '规格型号',
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '产品分类',
|
||||
},
|
||||
{
|
||||
prop: 'remark1',
|
||||
label: '创建人',
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'enabled',
|
||||
label: '状态',
|
||||
subcomponent: changeStatus,
|
||||
width: 80,
|
||||
},
|
||||
];
|
||||
deleteProcessList,
|
||||
getProcessPage,
|
||||
getProcessDetailPage,
|
||||
} from '@/api/ssdl/product&recipe';
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getFactoryPage,
|
||||
deleteURL: deleteFactory,
|
||||
exportURL: exportFactoryExcel,
|
||||
getDataListURL: getProcessPage,
|
||||
deleteURL: deleteProcessList,
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`base:factory:update`)
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:factory:delete`)
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
},
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
},
|
||||
].filter((v) => v),
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '适用框绞线',
|
||||
selectOptions: [],
|
||||
type: 'input',
|
||||
label: '配方型号',
|
||||
placeholder: '配方型号',
|
||||
param: 'val1',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '修改人',
|
||||
selectOptions: [],
|
||||
type: 'input',
|
||||
label: '配方规格',
|
||||
placeholder: '配方规格',
|
||||
param: 'val2',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '状态',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '正常' },
|
||||
{ id: 2, name: '停用' },
|
||||
],
|
||||
param: 'val3',
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '最后修改时间',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'searchTime',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品编码',
|
||||
placeholder: '产品编码',
|
||||
param: 'name',
|
||||
},
|
||||
// {
|
||||
// type: 'input',
|
||||
// label: '物料型号',
|
||||
// placeholder: '物料型号',
|
||||
// param: 'val3',
|
||||
// },
|
||||
// {
|
||||
// type: 'input',
|
||||
// label: '物料编码',
|
||||
// placeholder: '物料编码',
|
||||
// param: 'val4',
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
@@ -167,26 +147,28 @@ export default {
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:factory:create') ? 'button' : '',
|
||||
type: 'button',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true,
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'warning',
|
||||
},
|
||||
// {
|
||||
// type: 'separate',
|
||||
// type: this.$auth.hasPermi('base:product:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:product:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
product,
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
@@ -194,19 +176,17 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.name = val.name;
|
||||
this.listQuery.val1 = val.val1;
|
||||
this.listQuery.val2 = val.val2;
|
||||
this.listQuery.val3 = val.val3;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.processName = val.val1 || null;
|
||||
this.listQuery.processSize = val.val2 || null;
|
||||
// this.listQuery.materialName = val.val3 || null;
|
||||
// this.listQuery.materialCode = val.val4 || null;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
@@ -224,6 +204,55 @@ export default {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '详情';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id, true);
|
||||
});
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id, name, index, data) {
|
||||
this.$confirm(
|
||||
`是否确认删除${'配方型号为 ' + data.processName + ' '}的数据项?`,
|
||||
'系统提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
// 获取物料的属性列表
|
||||
getProcessDetailPage({
|
||||
processName: data.processName,
|
||||
processSize: data.processSize,
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
}).then((response) => {
|
||||
const ids = response.data.map((i) => i.id);
|
||||
this.urlOptions.deleteURL(ids).then(({ data }) => {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.app-container .el-table .el-table__cell {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
}
|
||||
</style>
|
||||
|
||||
85
src/views/product&recipe/recipe/product-mini.vue
Normal file
85
src/views/product&recipe/recipe/product-mini.vue
Normal file
@@ -0,0 +1,85 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-24 14:47:58
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-28 10:06:06
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<!-- <div class="app-container"> -->
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
max-height="200"
|
||||
:page="1"
|
||||
:limit="listQuery.total"
|
||||
:table-data="tableData" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '@/mixins/basic-page';
|
||||
import { parseTime } from '@/filter/code-filter';
|
||||
import { getProcessDetailPage } from '@/api/ssdl/product&recipe';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'materialName',
|
||||
label: '物料型号',
|
||||
},
|
||||
{
|
||||
prop: 'material',
|
||||
label: '物料规格',
|
||||
},
|
||||
{
|
||||
prop: 'materialNumber',
|
||||
label: '物料数量',
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
props: {
|
||||
processSize: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
processName: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getProcessDetailPage,
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
listQuery: {
|
||||
processName: this.processName,
|
||||
processSize: this.processSize,
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
this.tableData = response.data;
|
||||
this.listQuery.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-13 15:07:24
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-07 15:35:14
|
||||
* @LastEditTime: 2025-11-20 14:47:37
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -45,52 +45,48 @@
|
||||
label-width="80px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="搬运对象" prop="val1">
|
||||
<el-form-item label="任务类型" prop="mainTaskType">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="dataForm.val1"
|
||||
placeholder="请选择搬运对象">
|
||||
v-model="dataForm.mainTaskType"
|
||||
placeholder="请选择任务类型">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
v-for="item in options0"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="dataForm.val1 == 1">
|
||||
<el-form-item label="产品名称" prop="val1">
|
||||
<el-col :span="6" v-if="dataForm.mainTaskType !== 2">
|
||||
<el-form-item label="产品名称" prop="productId">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="dataForm.val2"
|
||||
v-model="dataForm.productId"
|
||||
@change="setMaterial"
|
||||
placeholder="请选择产品名称">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
v-for="item in productArr"
|
||||
:key="item.id"
|
||||
:label="item.materialName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="dataForm.val1 == 1">
|
||||
<el-form-item label="规格型号" prop="val1">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="dataForm.val2"
|
||||
placeholder="请选择规格型号">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
<el-col :span="6" v-if="dataForm.mainTaskType !== 2">
|
||||
<el-form-item label="规格型号">
|
||||
<el-input
|
||||
readonly
|
||||
v-model="dataForm.material"
|
||||
placeholder="规格型号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="搬运数量" prop="val4">
|
||||
<el-form-item label="搬运数量" prop="quantity">
|
||||
<el-input
|
||||
v-model="dataForm.val4"
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
||||
v-model="dataForm.quantity"
|
||||
@blur="validateNumber"
|
||||
placeholder="请输入正整数且为双数">
|
||||
<template slot="append">盘</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -101,67 +97,11 @@
|
||||
<el-form-item label="起点信息" prop="val5">
|
||||
<el-radio-group v-model="dataForm.val5">
|
||||
<el-radio :label="1">按策略自动选择</el-radio>
|
||||
<el-radio :label="2">指定起点</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="dataForm.val5 == 2" class="potBG-div">
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="10">
|
||||
起点库区:
|
||||
<el-select
|
||||
style="width: 200px; margin-left: 10px"
|
||||
v-model="startPot"
|
||||
size="small"
|
||||
placeholder="请选择起点库区">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="13" style="text-align: right; line-height: 36px">
|
||||
<span
|
||||
class="num1-startPot-status"
|
||||
style="background-color: #5ab45a" />
|
||||
可选
|
||||
<span class="num1-startPot-status" />
|
||||
不可选
|
||||
<span
|
||||
class="num1-startPot-status"
|
||||
style="background-color: #e9b100" />
|
||||
已选
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="potTitleBG">
|
||||
<div v-for="item in Object.keys(startPotList)" :key="item">
|
||||
<div class="potTitle">
|
||||
{{ item }}
|
||||
</div>
|
||||
<div class="potList">
|
||||
<div
|
||||
class="pot"
|
||||
v-for="sitem in startPotList[item]"
|
||||
:key="sitem.id"
|
||||
:style="{
|
||||
backgroundColor: potBGcolor[sitem.status],
|
||||
cursor: sitem.status > 0 ? 'pointer' : '',
|
||||
}"
|
||||
@click="sitem.status > 0 && setStartPot(sitem)"
|
||||
:title="sitem.name">
|
||||
{{ sitem.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div style="text-align: right">可用库存总量 <span style="color:#409EFF;font-size:16px">12</span> 盘</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="stepNum == 2">
|
||||
<div class="topTip">
|
||||
@@ -174,17 +114,206 @@
|
||||
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||
步骤二:选择终点
|
||||
</small-title>
|
||||
<div class="potBG-div">
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="10">
|
||||
终点库区:
|
||||
<el-select
|
||||
style="width: 300px; margin-left: 10px"
|
||||
v-model="endPot"
|
||||
size="small"
|
||||
@change="getEndPot"
|
||||
placeholder="请选择终点库区">
|
||||
<el-option
|
||||
v-for="item in regionArr"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="13" style="text-align: right; line-height: 36px">
|
||||
<span class="num1-startPot-status free" />
|
||||
空盘
|
||||
<span class="num1-startPot-status full" />
|
||||
满盘
|
||||
<span class="num1-startPot-status unavailable" />
|
||||
不可用
|
||||
<span class="num1-startPot-status locked" />
|
||||
锁定
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="potTitleBG">
|
||||
<div v-for="item in Object.keys(PotList)" :key="item">
|
||||
<div class="potTitle">
|
||||
{{ item }}
|
||||
</div>
|
||||
<div class="potList">
|
||||
<div
|
||||
class="pot"
|
||||
v-for="sitem in PotList[item]"
|
||||
:key="sitem.id"
|
||||
:class="
|
||||
sitem.usableState == 1
|
||||
? sitem.lineEdgeLibraryState == 1
|
||||
? 'full'
|
||||
: 'free'
|
||||
: sitem.usableState == 2
|
||||
? 'unavailable'
|
||||
: 'locked'
|
||||
"
|
||||
@click="
|
||||
sitem.usableState == 1 &&
|
||||
sitem.lineEdgeLibraryState == 0 &&
|
||||
setStartPot(sitem)
|
||||
"
|
||||
:title="sitem.lineEdgeLibraryName">
|
||||
{{ sitem.lineEdgeLibraryCode }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div style="text-align: right">
|
||||
搬运数量
|
||||
<span style="color: #409eff; font-size: 16px">
|
||||
{{ dataForm.quantity }}
|
||||
</span>
|
||||
盘 可用库位
|
||||
<span style="color: #409eff; font-size: 16px">{{ stockNum }}</span>
|
||||
个
|
||||
<span
|
||||
v-if="dataForm.quantity > stockNum"
|
||||
style="color: #e6a23c; font-size: 16px">
|
||||
<i class="el-icon-warning"></i>
|
||||
请注意搬运数量超过可用库位
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="stepNum == 3">
|
||||
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||
步骤三:预览与下发
|
||||
</small-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<div
|
||||
style="
|
||||
margin: 10px 0;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: black;
|
||||
">
|
||||
搬运对象
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
搬运对象:{{ dataForm.mainTaskType !== 2 ? '产品' : '空盘' }}
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="dataForm.mainTaskType !== 2">
|
||||
产品名称:
|
||||
{{ productArr.find((i) => i.id === dataForm.productId).materialName }}
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="dataForm.mainTaskType !== 2">
|
||||
规格型号:
|
||||
{{ productArr.find((i) => i.id === dataForm.productId).material }}
|
||||
</el-col>
|
||||
<el-col :span="6">搬运数量:{{ dataForm.quantity + ' 盘' }}</el-col>
|
||||
<el-col :span="24">
|
||||
<div
|
||||
style="
|
||||
margin: 10px 0;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: black;
|
||||
">
|
||||
起点信息
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="24">按策略自动选择</el-col>
|
||||
</el-row>
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<div
|
||||
style="
|
||||
margin: 10px 0;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: black;
|
||||
">
|
||||
终点信息
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
库区:{{ regionArr.find((i) => i.value === endPot).label }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="potTitleBG">
|
||||
<div v-for="item in Object.keys(PotList)" :key="item">
|
||||
<div class="potTitle">
|
||||
{{ item }}
|
||||
</div>
|
||||
<div class="potList">
|
||||
<div
|
||||
class="pot"
|
||||
v-for="sitem in PotList[item]"
|
||||
:key="sitem.id"
|
||||
:class="
|
||||
sitem.usableState == 1
|
||||
? sitem.lineEdgeLibraryState == 1
|
||||
? 'full'
|
||||
: 'free'
|
||||
: sitem.usableState == 2
|
||||
? 'unavailable'
|
||||
: 'locked'
|
||||
"
|
||||
:title="sitem.lineEdgeLibraryName">
|
||||
{{ sitem.lineEdgeLibraryCode }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<div
|
||||
style="
|
||||
margin: 10px 0;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: black;
|
||||
">
|
||||
任务信息
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
任务类型:{{ options0[dataForm.mainTaskType - 1].label }}
|
||||
</el-col>
|
||||
<el-col :span="8">任务数量:{{ dataForm.quantity / 2 }}</el-col>
|
||||
<el-col :span="8">
|
||||
本批次任务优先级:
|
||||
<el-select
|
||||
size="small"
|
||||
v-model="taskPriority"
|
||||
placeholder="请选择优先级">
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SmallTitle from './SmallTitle';
|
||||
import { getRegion, createPCTask } from '@/api/ssdl/taskList';
|
||||
import { getProductPage } from '@/api/ssdl/product&recipe';
|
||||
export default {
|
||||
components: {
|
||||
SmallTitle,
|
||||
@@ -207,72 +336,123 @@ export default {
|
||||
//第一步参数
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
val1: undefined,
|
||||
val2: undefined,
|
||||
val3: undefined,
|
||||
val4: undefined,
|
||||
mainTaskType: undefined,
|
||||
productId: undefined,
|
||||
materialName: '', // 物料名称
|
||||
materialCode: '', // 物料编码
|
||||
material: undefined,
|
||||
quantity: undefined,
|
||||
val5: 1,
|
||||
},
|
||||
options1: [
|
||||
productArr: [],
|
||||
options0: [
|
||||
{
|
||||
label: '产品',
|
||||
label: '满盘搬运',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '空盘',
|
||||
label: '空盘搬运',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '备货搬运',
|
||||
value: 3,
|
||||
},
|
||||
],
|
||||
dataRule: {},
|
||||
startPot: undefined, //起点库区选择的类型
|
||||
startPotList: {
|
||||
//起点库区List
|
||||
G01: [
|
||||
{
|
||||
id: '001',
|
||||
name: 'L001',
|
||||
status: 1,
|
||||
},
|
||||
{
|
||||
id: '002',
|
||||
name: 'R002',
|
||||
status: 1,
|
||||
},
|
||||
{
|
||||
id: '003',
|
||||
name: 'L003',
|
||||
status: 0,
|
||||
},
|
||||
{
|
||||
id: '004',
|
||||
name: 'R004',
|
||||
status: 0,
|
||||
},
|
||||
options2: [
|
||||
{
|
||||
label: '最高',
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: '较高',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '常规',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '较低',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
label: '最低',
|
||||
value: 4,
|
||||
},
|
||||
],
|
||||
dataRule: {
|
||||
mainTaskType: [
|
||||
{ required: true, message: '任务类型不能为空', trigger: 'change' },
|
||||
],
|
||||
G02: [
|
||||
{
|
||||
id: '005',
|
||||
name: 'L005',
|
||||
},
|
||||
{
|
||||
id: '006',
|
||||
name: 'R006',
|
||||
},
|
||||
{
|
||||
id: '007',
|
||||
name: 'L007',
|
||||
},
|
||||
{
|
||||
id: '008',
|
||||
name: 'R008',
|
||||
},
|
||||
productId: [
|
||||
{ required: true, message: '产品名称不能为空', trigger: 'change' },
|
||||
],
|
||||
quantity: [
|
||||
{ required: true, message: '搬运数量不能为空', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
endPot: 7, //起点库区选择的类型,进来默认第一个
|
||||
PotList: {},
|
||||
//第二步参数
|
||||
regionArr: [
|
||||
{
|
||||
label: '框绞1号线设备1满盘缓存区',
|
||||
value: 7,
|
||||
},
|
||||
{
|
||||
label: '框绞1号线设备2满盘缓存区',
|
||||
value: 8,
|
||||
},
|
||||
{
|
||||
label: '框绞1号线设备3满盘缓存区',
|
||||
value: 9,
|
||||
},
|
||||
{
|
||||
label: '框绞1号线设备4满盘缓存区',
|
||||
value: 10,
|
||||
},
|
||||
{
|
||||
label: '框绞3号线设备1满盘缓存区',
|
||||
value: 11,
|
||||
},
|
||||
{
|
||||
label: '框绞3号线设备2满盘缓存区',
|
||||
value: 12,
|
||||
},
|
||||
{
|
||||
label: '框绞3号线设备3满盘缓存区',
|
||||
value: 13,
|
||||
},
|
||||
{
|
||||
label: '框绞3号线设备4满盘缓存区',
|
||||
value: 14,
|
||||
},
|
||||
{
|
||||
label: '框绞2号线设备1满盘缓存区',
|
||||
value: 15,
|
||||
},
|
||||
{
|
||||
label: '框绞2号线设备2满盘缓存区',
|
||||
value: 16,
|
||||
},
|
||||
{
|
||||
label: '框绞2号线设备3满盘缓存区',
|
||||
value: 17,
|
||||
},
|
||||
],
|
||||
stockNum: 0, //可用库位数
|
||||
taskPriority: 2, //优先级
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || undefined;
|
||||
this.stepNum = 1;
|
||||
this.$emit('setSN', this.stepNum);
|
||||
getProductPage({ pageNo: 1, pageSize: 100 }).then((res) => {
|
||||
this.productArr = res.data.list;
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
if (this.dataForm.id) {
|
||||
} else {
|
||||
@@ -292,11 +472,21 @@ export default {
|
||||
//下一步
|
||||
nextSubmit() {
|
||||
if (this.stepNum == 1) {
|
||||
this.stepNum += 1;
|
||||
this.$emit('setSN', this.stepNum);
|
||||
return;
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
this.stepNum += 1;
|
||||
this.getEndPot();
|
||||
this.$emit('setSN', this.stepNum);
|
||||
return;
|
||||
});
|
||||
}
|
||||
if (this.stepNum == 2) {
|
||||
if (this.dataForm.quantity > this.stockNum) {
|
||||
this.$message('请注意搬运数量超过可用库位');
|
||||
return;
|
||||
}
|
||||
this.stepNum += 1;
|
||||
this.$emit('setSN', this.stepNum);
|
||||
return;
|
||||
@@ -309,10 +499,50 @@ export default {
|
||||
},
|
||||
cancelStep() {},
|
||||
|
||||
// 第一步方法
|
||||
setStartPot(data) {
|
||||
data.status = data.status == 1 ? 2 : 1;
|
||||
validateNumber() {
|
||||
const value = this.dataForm.quantity;
|
||||
|
||||
// 校验正整数且为双数
|
||||
if (!/^[1-9]\d*$/.test(value) || value % 2 !== 0) {
|
||||
this.$message.error('请输入正整数且为双数');
|
||||
this.dataForm.quantity = '';
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
setMaterial() {
|
||||
const data = this.productArr.find((i) => i.id === this.dataForm.productId)
|
||||
this.dataForm.materialName = data.materialName
|
||||
this.dataForm.materialCode = data.materialCode
|
||||
this.dataForm.material = data.material
|
||||
},
|
||||
// 获取终点库区
|
||||
getEndPot() {
|
||||
this.PotList = {};
|
||||
this.stockNum = 0;
|
||||
getRegion(this.endPot).then((res) => {
|
||||
res.data.forEach((item) => {
|
||||
if (item.lineEdgeLibraryState == 0 && item.usableState == 1) {
|
||||
this.stockNum += 1;
|
||||
}
|
||||
});
|
||||
//提取巷道
|
||||
let xiangdaoArr = res.data.map((item) =>
|
||||
item.bindGroupId.substring(0, 5)
|
||||
);
|
||||
//提取去重
|
||||
xiangdaoArr = [...new Set(xiangdaoArr)];
|
||||
//巷道为对象名,巷道内库位赋给巷道
|
||||
xiangdaoArr.forEach((objName) => {
|
||||
const stockArr = res.data.filter((item) => {
|
||||
if (item.bindGroupId.substring(0, 5) == objName) return item;
|
||||
});
|
||||
this.$set(this.PotList, objName, stockArr);
|
||||
});
|
||||
});
|
||||
},
|
||||
setStartPot(data) {},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -347,7 +577,7 @@ export default {
|
||||
display: flex;
|
||||
}
|
||||
.potTitle {
|
||||
width: 82px;
|
||||
width: 190px;
|
||||
background-color: rgb(169, 235, 249);
|
||||
border-radius: 3px;
|
||||
margin-right: 5px;
|
||||
@@ -355,17 +585,19 @@ export default {
|
||||
color: #000000;
|
||||
letter-spacing: 1px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.potList {
|
||||
width: 82px;
|
||||
width: 190px;
|
||||
display: grid;
|
||||
grid-template-columns: 40px 40px;
|
||||
gap: 2px;
|
||||
grid-template-columns: 90px 90px;
|
||||
gap: 8px;
|
||||
}
|
||||
.pot {
|
||||
width: 40px;
|
||||
width: 90px;
|
||||
text-align: center;
|
||||
border: 1px solid gainsboro;
|
||||
color: black;
|
||||
border-radius: 3px;
|
||||
padding: 5px 0;
|
||||
margin-bottom: 5px;
|
||||
@@ -373,6 +605,29 @@ export default {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
/* 空闲状态 */
|
||||
.free {
|
||||
background-color: #edf7ff;
|
||||
border: 1px solid #57a5f4;
|
||||
}
|
||||
|
||||
/* 满位状态 */
|
||||
.full {
|
||||
background-color: #fff1d4;
|
||||
border: 1px solid #f8b881;
|
||||
}
|
||||
|
||||
/* 不可用状态 */
|
||||
.unavailable {
|
||||
background-color: #e9e8e8;
|
||||
border: 1px solid #b4b4b4;
|
||||
}
|
||||
|
||||
/* 锁定状态 */
|
||||
.locked {
|
||||
background-color: #e8d7ff;
|
||||
border: 1px solid #722ed1;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- //序号圆点 -->
|
||||
@@ -433,7 +688,7 @@ export default {
|
||||
}
|
||||
|
||||
.connector {
|
||||
width: 160px; /* 计算连接线长度 */
|
||||
width: 220px; /* 计算连接线长度 */
|
||||
height: 2px;
|
||||
border-bottom: 1px dashed rgb(11, 88, 255, 1);
|
||||
margin: 0 5px;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2025-11-07 17:01:51
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-07 22:31:17
|
||||
* @LastEditTime: 2025-11-17 15:47:16
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -15,11 +15,20 @@
|
||||
<div class="bgDiv1">
|
||||
<el-row :gutter="20" style="margin-bottom: 15px">
|
||||
<el-col :span="8" style="font-size: 20px; font-weight: 600">
|
||||
TSK202510230001
|
||||
{{ infoData.mainTaskCode }}
|
||||
</el-col>
|
||||
<el-col :span="8">满盘搬运(自动)</el-col>
|
||||
<el-col :span="8">
|
||||
上次刷新:{{ parseTime(Date.now()) }}
|
||||
{{
|
||||
['', '满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][
|
||||
infoData.mainTaskType
|
||||
] +
|
||||
'(' +
|
||||
['', '自动', '人工'][infoData.taskAttribute] +
|
||||
')'
|
||||
}}
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
上次刷新:{{ parseTime(nowDate) }}
|
||||
<el-button type="text" @click="refresh">刷新</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -31,23 +40,25 @@
|
||||
<el-row :gutter="20" style="margin-bottom: 15px">
|
||||
<el-col :span="8">
|
||||
<span
|
||||
:style="{ backgroundColor: statusColor[1].color }"
|
||||
:style="{
|
||||
backgroundColor: statusColor[infoData.mainTaskState].color,
|
||||
}"
|
||||
class="taskStatus">
|
||||
{{ statusColor[1].label }}
|
||||
{{ statusColor[infoData.mainTaskState].label }}
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="8">中</el-col>
|
||||
<el-col :span="8">--</el-col>
|
||||
<el-col :span="8">
|
||||
{{ ['最高', '较高', '常规', '较低', '最低'][infoData.taskPriority] }}
|
||||
</el-col>
|
||||
<el-col :span="8">{{ infoData.agv }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">执行时长</el-col>
|
||||
<el-col :span="8">创建人</el-col>
|
||||
<el-col :span="8">创建时间</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">--</el-col>
|
||||
<el-col :span="8">系统/张三</el-col>
|
||||
<el-col :span="8">{{ parseTime(Date.now()) }}</el-col>
|
||||
<el-col :span="8">{{ infoData.creator }}</el-col>
|
||||
<el-col :span="8">{{ parseTime(infoData.createTime) }}</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="bgDiv2">
|
||||
@@ -61,7 +72,9 @@
|
||||
<el-step title="执行中"></el-step>
|
||||
<el-step title="已完成"></el-step>
|
||||
</el-steps>
|
||||
<div class="abnormal">任务异常:无效路径</div>
|
||||
<div class="abnormal" v-if="infoData.mainTaskState == 7">
|
||||
任务异常:无效路径
|
||||
</div>
|
||||
</div>
|
||||
<div class="bgDiv3">
|
||||
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||
@@ -71,16 +84,72 @@
|
||||
<el-col :span="12">
|
||||
<div class="pan-info">
|
||||
<div class="pan-title">L盘</div>
|
||||
<div class="pan-body">
|
||||
<el-row :gutter="15">
|
||||
<el-col :span="12">物料名称</el-col>
|
||||
<el-col :span="12">物料规格</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftMaterialName }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftMaterial }}
|
||||
</el-col>
|
||||
<el-col :span="12">物料编码</el-col>
|
||||
<el-col :span="12">批次</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftMaterialCode }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftBatch }}
|
||||
</el-col>
|
||||
<el-col :span="12">线缆长度</el-col>
|
||||
<el-col :span="12">虚拟盘号</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftCableLength }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftVirtualTrayNumber }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="pan-info">
|
||||
<div class="pan-title">R盘</div>
|
||||
<div class="pan-body">
|
||||
<el-row :gutter="15">
|
||||
<el-col :span="12">物料名称</el-col>
|
||||
<el-col :span="12">物料规格</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightMaterialName }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightMaterial }}
|
||||
</el-col>
|
||||
<el-col :span="12">物料编码</el-col>
|
||||
<el-col :span="12">批次</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightMaterialCode }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightBatch }}
|
||||
</el-col>
|
||||
<el-col :span="12">线缆长度</el-col>
|
||||
<el-col :span="12">虚拟盘号</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightCableLength }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightVirtualTrayNumber }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="bgDiv4">
|
||||
<div class="bgDiv4" v-if="false">
|
||||
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||
回收信息
|
||||
</small-title>
|
||||
@@ -100,95 +169,101 @@
|
||||
任务明细
|
||||
</small-title>
|
||||
<el-descriptions :column="2" size="medium" border>
|
||||
<el-descriptions-item label="起点库位(L/R)">
|
||||
CK-01-A05-L / R
|
||||
<el-descriptions-item label="起点库位( L )(候选)">
|
||||
{{ infoData.leftLibraryStartName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终点库位(L/R)">
|
||||
CC-02-B03-L/R (候选 )
|
||||
<el-descriptions-item label="终点库位( L )(候选)">
|
||||
{{ infoData.leftLibraryEndName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="起点策略">--</el-descriptions-item>
|
||||
<el-descriptions-item label="终点策略">入库策略</el-descriptions-item>
|
||||
<el-descriptions-item label="FMS任务号">--</el-descriptions-item>
|
||||
<el-descriptions-item label="车辆位置">--</el-descriptions-item>
|
||||
<el-descriptions-item label="电量">--</el-descriptions-item>
|
||||
<el-descriptions-item label="是否载货">--</el-descriptions-item>
|
||||
<el-descriptions-item label="创建方式">自动/人工</el-descriptions-item>
|
||||
<el-descriptions-item label="任务来源">
|
||||
PDA/PC/系统
|
||||
<el-descriptions-item label="起点库位( R )(候选)">
|
||||
{{ infoData.rightLibraryStartName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终点库位( R )(候选)">
|
||||
{{ infoData.rightLibraryEndName }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item
|
||||
label="起点库位( L )"
|
||||
:labelStyle="{ background: '#f1ffe9' }">
|
||||
{{ infoData.changeLeftLibraryStartName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="终点库位( L )"
|
||||
:labelStyle="{ background: '#f1ffe9' }">
|
||||
{{ infoData.changeLeftLibraryEndName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="起点库位( R )"
|
||||
:labelStyle="{ background: '#f1ffe9' }">
|
||||
{{ infoData.changeRightLibraryStartName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="终点库位( R )"
|
||||
:labelStyle="{ background: '#f1ffe9' }">
|
||||
{{ infoData.changeRightLibraryEndName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="关联叫料单">--</el-descriptions-item>
|
||||
<el-descriptions-item label=""></el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="bgDiv6">
|
||||
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||
任务日志
|
||||
</small-title>
|
||||
<el-timeline style="padding: 0">
|
||||
<el-timeline-item
|
||||
v-for="(activity, index) in activities"
|
||||
:key="index"
|
||||
:type="activity.type"
|
||||
:color="activity.color"
|
||||
size="large"
|
||||
hide-timestamp>
|
||||
<span>{{ activity.content }}</span>
|
||||
<span style="float: right">{{ activity.timestamp }}</span>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<div class="timelineDiv">
|
||||
<el-timeline style="padding: 0">
|
||||
<el-timeline-item
|
||||
v-for="(activity, index) in activities"
|
||||
:key="index"
|
||||
:type="index == 0 ? 'primary' : ''"
|
||||
:color="activity.color"
|
||||
size="large"
|
||||
hide-timestamp>
|
||||
<span>
|
||||
{{ activity.triggerObject + ' | ' + activity.description }}
|
||||
</span>
|
||||
<span style="float: right">
|
||||
{{ parseTime(activity.createTime) }}
|
||||
</span>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<el-divider></el-divider>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<div class="drawer-body__footer">
|
||||
<el-button @click="closeD">返 回</el-button>
|
||||
</div>
|
||||
<!-- 底部按钮 -->
|
||||
<div class="drawer-body__footer">
|
||||
<el-button @click="closeD">返 回</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import SmallTitle from './SmallTitle';
|
||||
import { getTask, getTaskLogPage } from '@/api/ssdl/taskList';
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
title: '',
|
||||
infoID: '',
|
||||
infoData: '',
|
||||
statusColor: [
|
||||
//bgDiv1的任务状态
|
||||
{ label: '待下发', color: '#fa8c16' },
|
||||
{ label: '待执行', color: '#1890ff' },
|
||||
{ label: '执行中', color: '#1890ff' },
|
||||
{ label: '取货完成', color: '#52c41a' },
|
||||
{ label: '已完成', color: '#52c41a' },
|
||||
{ label: '暂停中', color: '#8c8c8c' },
|
||||
{ label: '已终止', color: '#faad14' },
|
||||
{ label: '异常', color: '#ff4d4f' },
|
||||
{ label: '禁用', color: '#d9d9d9' },
|
||||
],
|
||||
nowDate: Date.now(),
|
||||
//bgDiv2的步骤条
|
||||
stepNum: 2,
|
||||
stepNum: 0,
|
||||
stepStatus: 'finish',
|
||||
//bgDiv6的时间线
|
||||
|
||||
activities: [
|
||||
{
|
||||
content: 'FMS | 卸货完成,任务完成',
|
||||
timestamp: '2018-04-12 20:46',
|
||||
type: 'primary',
|
||||
},
|
||||
{
|
||||
content: 'FMS | 取货完成',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
},
|
||||
{
|
||||
content: 'FMS | 派车AGV-03,前往起点取货',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
},
|
||||
{
|
||||
content: '张三 | 任务扫码配对完成,进入待下发',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
},
|
||||
],
|
||||
activities: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@@ -196,13 +271,37 @@ export default {
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
init(val) {
|
||||
init(id) {
|
||||
this.visible = true;
|
||||
this.infoID = id;
|
||||
this.$nextTick(() => {
|
||||
this.getInfoData();
|
||||
});
|
||||
},
|
||||
getInfoData() {
|
||||
getTask(this.infoID).then(({ data }) => {
|
||||
this.infoData = data;
|
||||
if (data.mainTaskState < 3) {
|
||||
this.stepNum = data.mainTaskState;
|
||||
} else if (data.mainTaskState == 4) {
|
||||
this.stepNum = 3;
|
||||
}
|
||||
getTaskLogPage({
|
||||
mainTaskId: this.infoID,
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
}).then(({ data }) => {
|
||||
this.activities = data.list.sort((a, b) => a.timestamp - b.timestamp);
|
||||
});
|
||||
});
|
||||
},
|
||||
//刷新
|
||||
refresh() {},
|
||||
refresh() {
|
||||
this.nowDate = Date.now();
|
||||
this.getInfoData();
|
||||
},
|
||||
closeD() {
|
||||
this.visible = false
|
||||
this.visible = false;
|
||||
this.$emit('closeDrawer');
|
||||
},
|
||||
},
|
||||
@@ -211,11 +310,10 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bgDiv1 {
|
||||
background-color: rgba(242, 242, 242, 0.5);
|
||||
background-color: #f1f9ff;
|
||||
padding: 20px;
|
||||
line-height: 25px;
|
||||
font-size: 15px;
|
||||
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||
.taskStatus {
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
@@ -224,8 +322,18 @@ export default {
|
||||
}
|
||||
}
|
||||
.bgDiv2 {
|
||||
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||
padding: 18px 0;
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
transparent 0%,
|
||||
#c5c5c5 10%,
|
||||
#c5c5c5 90%,
|
||||
transparent 100%
|
||||
);
|
||||
background-position: bottom;
|
||||
background-size: 100% 1px;
|
||||
background-repeat: no-repeat;
|
||||
padding-bottom: 1px;
|
||||
.abnormal {
|
||||
width: 80%;
|
||||
margin: auto;
|
||||
@@ -242,11 +350,12 @@ export default {
|
||||
.bgDiv3 {
|
||||
padding: 20px 20px 0;
|
||||
.pan-info {
|
||||
height: 350px;
|
||||
height: 200px;
|
||||
border: 1px solid rgba(121, 121, 121, 0.8);
|
||||
border-radius: 5px;
|
||||
.pan-title {
|
||||
background-color: rgba(242, 242, 242, 0.5);
|
||||
background-color: #d8eeff;
|
||||
border-radius: 5px;
|
||||
height: 35px;
|
||||
font-size: 20px;
|
||||
line-height: 35px;
|
||||
@@ -254,6 +363,11 @@ export default {
|
||||
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
.pan-body {
|
||||
padding: 15px;
|
||||
font-size: 16px;
|
||||
color: rgba(121, 121, 121, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
.bgDiv4 {
|
||||
@@ -264,6 +378,11 @@ export default {
|
||||
}
|
||||
.bgDiv6 {
|
||||
padding: 20px 20px 0;
|
||||
.timelineDiv {
|
||||
padding: 5px;
|
||||
height: 400px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-13 16:18:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-06 15:19:24
|
||||
* @LastEditTime: 2025-11-17 09:28:31
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
{{
|
||||
(injectData.val2
|
||||
? ['满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][injectData.val2]
|
||||
(injectData.mainTaskType
|
||||
? ['','满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][injectData.mainTaskType]
|
||||
: '-')
|
||||
}}
|
||||
</span>
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-13 16:18:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-06 15:20:43
|
||||
* @LastEditTime: 2025-11-17 11:11:56
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
{{
|
||||
(injectData.val3
|
||||
? ['待下发', '待执行', '执行中', '已完成', '暂停中', '已终止', '异常'][injectData.val3]
|
||||
(injectData.mainTaskState
|
||||
? ['待下发', '待执行', '执行中', '取货完成','已完成', '暂停中', '终止', '异常'][injectData.mainTaskState]
|
||||
: '-')
|
||||
}}
|
||||
</span>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-13 16:18:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-06 15:37:02
|
||||
* @LastEditTime: 2025-11-17 14:35:35
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -16,11 +16,14 @@
|
||||
background-color: #e89b24;
|
||||
color: #fff;
|
||||
text-align:center;
|
||||
line-height:16px
|
||||
line-height:16px;
|
||||
margin-right:5px
|
||||
">
|
||||
L
|
||||
</div>
|
||||
产品名称+产品规格
|
||||
<span v-if="injectData.prop==='val4'">{{injectData.leftMaterialName+'-'+injectData.leftMaterialCode}}</span>
|
||||
<span v-else-if="injectData.prop==='val5'">{{injectData.leftLibraryStartName}}</span>
|
||||
<span v-else-if="injectData.prop==='val6'">{{injectData.leftLibraryStartName}}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div
|
||||
@@ -31,11 +34,14 @@
|
||||
background-color: #6a96ec;
|
||||
color: #fff;
|
||||
text-align:center;
|
||||
line-height:16px
|
||||
line-height:16px;
|
||||
margin-right:5px
|
||||
">
|
||||
R
|
||||
</div>
|
||||
产品名称+产品规格
|
||||
<span v-if="injectData.prop==='val4'">{{injectData.rightMaterialName+'-'+injectData.rightMaterialCode}}</span>
|
||||
<span v-else-if="injectData.prop==='val5'">{{injectData.rightLibraryStartName}}</span>
|
||||
<span v-else-if="injectData.prop==='val6'">{{injectData.rightLibraryEndName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -51,7 +57,8 @@ export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
created() {},
|
||||
created() {
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -2,15 +2,13 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-13 16:18:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-06 15:19:24
|
||||
* @LastEditTime: 2025-11-17 09:32:07
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
{{
|
||||
(injectData.val2
|
||||
? ['满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][injectData.val2]
|
||||
: '-')
|
||||
injectData.agv
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
82
src/views/taskCenter/taskList/components/subSpan5.vue
Normal file
82
src/views/taskCenter/taskList/components/subSpan5.vue
Normal file
@@ -0,0 +1,82 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2025-11-17 16:17:21
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-17 16:30:28
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-popover placement="top" trigger="click" v-model="visible">
|
||||
优先级
|
||||
<el-select v-model="priority" placeholder="请选择优先级">
|
||||
<el-option
|
||||
v-for="item in priorityArr"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
<div style="text-align: right; margin: 10px 10px 0">
|
||||
<el-button size="mini" type="text" @click="visible = false">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini" @click="changePriority">
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
<el-button slot="reference" type="text">
|
||||
{{ ['最高', '较高', '常规', '较低', '最低'][injectData.taskPriority] }}
|
||||
</el-button>
|
||||
</el-popover>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateTask } from '@/api/ssdl/taskList';
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: this.injectData,
|
||||
visible: false,
|
||||
priorityArr: [
|
||||
{
|
||||
value: 0,
|
||||
label: '最高',
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '较高',
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '常规',
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: '较低',
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '最低',
|
||||
},
|
||||
],
|
||||
priority: '',
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
changePriority() {
|
||||
const data = { ...this.injectData, taskPriority: this.priority };
|
||||
updateTask(data).then((res) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false
|
||||
this.$emit('emitData');
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -4,10 +4,9 @@
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
:isFold="true"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div style="font-size: 14px">
|
||||
自动刷新(5s)
|
||||
自动刷新(10s)
|
||||
<el-switch v-model="autoRefresh"></el-switch>
|
||||
</div>
|
||||
</div>
|
||||
@@ -17,11 +16,12 @@
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:max-height="tableH"
|
||||
:table-data="tableData">
|
||||
:table-data="tableData"
|
||||
@emitFun="getDataList">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="260"
|
||||
:width="100"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
@@ -61,21 +61,12 @@
|
||||
@click="handleCancel">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="stepNum == 3"
|
||||
type="primary"
|
||||
class="btnTextStyle"
|
||||
size="small"
|
||||
plain
|
||||
@click="successSubmit">
|
||||
创建任务
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="btnTextStyle"
|
||||
size="small"
|
||||
@click="handleConfirm">
|
||||
{{ stepNum < 3 ? '下一步' : '创建并下发' }}
|
||||
{{ stepNum < 3 ? '下一步' : '创建任务' }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -106,29 +97,31 @@ import subSpan1 from './components/subSpan1.vue';
|
||||
import subSpan2 from './components/subSpan2.vue';
|
||||
import subSpan3 from './components/subSpan3.vue';
|
||||
import subSpan4 from './components/subSpan4.vue';
|
||||
import subSpan5 from './components/subSpan5.vue';
|
||||
import detailDrawer from './components/detailDrawer.vue';
|
||||
import stopInStock from './components/stopInStock.vue'
|
||||
import stopInStock from './components/stopInStock.vue';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
import { parseTime } from '@/filter/code-filter';
|
||||
import { getTaskPage } from '@/api/ssdl/taskList';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'code',
|
||||
prop: 'mainTaskCode',
|
||||
label: '任务编号',
|
||||
width: 140,
|
||||
},
|
||||
{
|
||||
prop: 'val1',
|
||||
prop: 'taskAttribute',
|
||||
label: '创建方式',
|
||||
filter: (val) => (val ? ['自动', '人工'][val] : '-'),
|
||||
filter: (val) => (val ? ['', '自动', '人工'][val] : '-'),
|
||||
},
|
||||
{
|
||||
prop: 'val2',
|
||||
prop: 'mainTaskType',
|
||||
label: '任务类型',
|
||||
subcomponent: subSpan1,
|
||||
},
|
||||
{
|
||||
prop: 'val3',
|
||||
prop: 'mainTaskState',
|
||||
label: '状态',
|
||||
subcomponent: subSpan2,
|
||||
},
|
||||
@@ -136,19 +129,19 @@ const tableProps = [
|
||||
prop: 'val4',
|
||||
label: '搬运对象(L/R)',
|
||||
subcomponent: subSpan3,
|
||||
width: 160,
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
prop: 'val5',
|
||||
label: '起点(L/R)',
|
||||
subcomponent: subSpan3,
|
||||
width: 160,
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
prop: 'val6',
|
||||
label: '终点(L/R)',
|
||||
subcomponent: subSpan3,
|
||||
width: 160,
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
prop: 'val7',
|
||||
@@ -156,17 +149,16 @@ const tableProps = [
|
||||
subcomponent: subSpan4,
|
||||
},
|
||||
{
|
||||
prop: 'creatTime',
|
||||
prop: 'val8',
|
||||
label: '优先级',
|
||||
subcomponent: subSpan5,
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'Time',
|
||||
label: '执行时长',
|
||||
filter: (val) => parseTime(val, '{HH}:{mm}:{ss}'),
|
||||
width: 100,
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
@@ -179,46 +171,20 @@ export default {
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
},
|
||||
{
|
||||
type: 'issue',
|
||||
btnName: '下发',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'equal',
|
||||
name: 'status',
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'pause',
|
||||
btnName: '暂停',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'status',
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'reassign',
|
||||
btnName: '改派',
|
||||
},
|
||||
{
|
||||
type: 'stop',
|
||||
btnName: '终止',
|
||||
},
|
||||
{
|
||||
type: 'recycle',
|
||||
btnName: '回收',
|
||||
},
|
||||
// {
|
||||
// type: 'stop',
|
||||
// btnName: '终止',
|
||||
// showParam: {
|
||||
// type: '&',
|
||||
// data: [
|
||||
// {
|
||||
// type: 'equal',
|
||||
// name: 'mainTaskState',
|
||||
// value: 2,
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
].filter((v) => v),
|
||||
tableData: [],
|
||||
listQuery: {
|
||||
@@ -238,15 +204,11 @@ export default {
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '备料搬运',
|
||||
name: '空盘搬运',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '临时搬运',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '空盘搬运',
|
||||
name: '备料搬运',
|
||||
},
|
||||
],
|
||||
param: 'val1',
|
||||
@@ -254,23 +216,15 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '业务类型',
|
||||
label: '创建方式',
|
||||
selectOptions: [
|
||||
{
|
||||
id: 1,
|
||||
name: '满盘搬运',
|
||||
name: '自动任务',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '空盘搬运',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '备料搬运',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '临时搬运',
|
||||
name: '人工任务',
|
||||
},
|
||||
],
|
||||
param: 'val2',
|
||||
@@ -281,20 +235,24 @@ export default {
|
||||
label: '状态',
|
||||
selectOptions: [
|
||||
{
|
||||
id: 1,
|
||||
id: 0,
|
||||
name: '待下发',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
id: 1,
|
||||
name: '待执行',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
id: 2,
|
||||
name: '执行中',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '取货完成',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '已完成',
|
||||
name: '完成',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
@@ -302,7 +260,7 @@ export default {
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '已终止',
|
||||
name: '终止',
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
@@ -312,46 +270,10 @@ export default {
|
||||
param: 'val3',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '执行车辆',
|
||||
selectOptions: [],
|
||||
param: 'val4',
|
||||
labelField: 'label',
|
||||
valueField: 'name',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '创建日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'searchTime',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '回收任务',
|
||||
selectOptions: [
|
||||
{
|
||||
id: 1,
|
||||
name: '是',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
name: '否',
|
||||
},
|
||||
],
|
||||
param: 'val5',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '编号',
|
||||
placeholder: '编号',
|
||||
label: '任务编号',
|
||||
placeholder: '任务编号',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
@@ -372,9 +294,7 @@ export default {
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('monitoring:cost-othercost-log:create')
|
||||
? 'button'
|
||||
: '',
|
||||
type: 'button',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
@@ -396,7 +316,7 @@ export default {
|
||||
this.getDataList();
|
||||
this.refreshTimer = setInterval(() => {
|
||||
this.getDataList();
|
||||
}, 5000);
|
||||
}, 10000);
|
||||
} else {
|
||||
// 关闭时清除定时器
|
||||
if (this.refreshTimer) {
|
||||
@@ -415,9 +335,11 @@ export default {
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
detailDrawer,
|
||||
stopInStock,
|
||||
stopInStock,
|
||||
},
|
||||
created() {
|
||||
this.getDataList();
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.autoRefresh = true;
|
||||
},
|
||||
@@ -427,11 +349,10 @@ export default {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 20;
|
||||
this.listQuery.name = val.name || null;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
: null;
|
||||
this.listQuery.mainTaskType = val.val1 || null;
|
||||
this.listQuery.taskAttribute = val.val2 || null;
|
||||
this.listQuery.mainTaskState = val.val3 || null;
|
||||
this.listQuery.mainTaskCode = val.code || null;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
@@ -452,17 +373,12 @@ export default {
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.tableData = [
|
||||
{
|
||||
code: 1,
|
||||
},
|
||||
];
|
||||
// this.dataListLoading = true
|
||||
// this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
// this.tableData = response.data.list;
|
||||
// this.listQuery.total = response.data.total;
|
||||
// this.dataListLoading = false
|
||||
// });
|
||||
this.dataListLoading = true;
|
||||
getTaskPage(this.listQuery).then((response) => {
|
||||
this.tableData = response.data.list;
|
||||
this.listQuery.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
@@ -490,29 +406,32 @@ export default {
|
||||
//tableBtn点击
|
||||
handleClick(val) {
|
||||
if (val.type === 'stop') {
|
||||
if (val.data === '无货') {
|
||||
this.stopFun(val.data);
|
||||
} else {
|
||||
this.stopStockVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.stopStockRef.init();
|
||||
});
|
||||
}
|
||||
this.stopFun(val.data);
|
||||
// if (val.data === '无货') {
|
||||
// this.stopFun(val.data);
|
||||
// } else {
|
||||
// this.stopStockVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.stopStockRef.init();
|
||||
// });
|
||||
// }
|
||||
} else if (val.type === 'detail') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.detailDrawer.init(val.data, 'detail');
|
||||
this.$refs.detailDrawer.init(val.data.id, 'detail');
|
||||
});
|
||||
} else {
|
||||
this.otherMethods(val);
|
||||
}
|
||||
},
|
||||
stopFun(val) {
|
||||
this.$prompt('确认终止空载该任务?此操作不可恢复', '终止任务', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPlaceholder: '请输入终止原因',
|
||||
})
|
||||
this.$prompt(
|
||||
'确认终止该任务?此操作任务立即终止,车辆保持暂停,请人工回收货物,释放车辆!',
|
||||
'终止任务',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPlaceholder: '请输入终止原因',
|
||||
}
|
||||
)
|
||||
.then(({ value }) => {
|
||||
console.log('终止原因' + value);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user