Compare commits
No commits in common. "9831026c5af65463094feb979ec2bd0c097ad327" and "c946f120049999054a703188ffc0be992f080639" have entirely different histories.
9831026c5a
...
c946f12004
@ -1,10 +1,3 @@
|
|||||||
/*
|
|
||||||
* @Author: zwq
|
|
||||||
* @Date: 2023-07-26 09:56:38
|
|
||||||
* @LastEditors: zwq
|
|
||||||
* @LastEditTime: 2023-08-04 13:59:23
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 创建工厂产线
|
// 创建工厂产线
|
||||||
@ -22,13 +15,7 @@ export function getCode() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获得产线status
|
|
||||||
export function getStatus(ids) {
|
|
||||||
return request({
|
|
||||||
url: '/base/equipment-status-realtime/lineStatus?ids=' + ids,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 更新工厂产线
|
// 更新工厂产线
|
||||||
export function updateProductionLine(data) {
|
export function updateProductionLine(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -114,6 +114,17 @@ export default {
|
|||||||
placeholder: '工厂名称',
|
placeholder: '工厂名称',
|
||||||
param: 'name',
|
param: 'name',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '创建时间',
|
||||||
|
dateType: 'daterange',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
|
rangeSeparator: '-',
|
||||||
|
startPlaceholder: '开始时间',
|
||||||
|
endPlaceholder: '结束时间',
|
||||||
|
param: 'createTime',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
btnName: '搜索',
|
btnName: '搜索',
|
||||||
@ -162,6 +173,7 @@ export default {
|
|||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 10;
|
||||||
this.listQuery.name = val.name;
|
this.listQuery.name = val.name;
|
||||||
this.listQuery.code = val.code;
|
this.listQuery.code = val.code;
|
||||||
|
this.listQuery.createTime = val.createTime;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'reset':
|
case 'reset':
|
||||||
|
@ -318,9 +318,9 @@ export default {
|
|||||||
if (raw.type === 'delete') {
|
if (raw.type === 'delete') {
|
||||||
this.$confirm(
|
this.$confirm(
|
||||||
`确定对${
|
`确定对${
|
||||||
raw.data.name
|
val.data.name
|
||||||
? '[名称=' + raw.data.name + ']'
|
? '[名称=' + val.data.name + ']'
|
||||||
: '[序号=' + raw.data._pageIndex + ']'
|
: '[序号=' + val.data._pageIndex + ']'
|
||||||
}进行删除操作?`,
|
}进行删除操作?`,
|
||||||
'提示',
|
'提示',
|
||||||
{
|
{
|
||||||
@ -330,7 +330,7 @@ export default {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
deleteProductAttr(raw.data.id).then(({ data }) => {
|
deleteProductAttr(val.data.id).then(({ data }) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '操作成功',
|
message: '操作成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick" />
|
||||||
<base-table
|
<base-table
|
||||||
v-loading="dataListLoading"
|
v-loading="dataListLoading"
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:page="listQuery.pageNo"
|
:page="listQuery.pageNo"
|
||||||
:limit="listQuery.pageSize"
|
:limit="listQuery.pageSize"
|
||||||
@ -40,14 +40,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import AddOrUpdate from './add-or-updata';
|
import AddOrUpdate from './add-or-updata';
|
||||||
import basicPage from '../../mixins/basic-page';
|
import basicPage from '../../mixins/basic-page';
|
||||||
import codeFilter from '../../mixins/code-filter';
|
|
||||||
import { parseTime } from '../../mixins/code-filter';
|
import { parseTime } from '../../mixins/code-filter';
|
||||||
import {
|
import {
|
||||||
deleteProductionLine,
|
deleteProductionLine,
|
||||||
getProductionLinePage,
|
getProductionLinePage,
|
||||||
exportProductionLineExcel,
|
exportProductionLineExcel
|
||||||
getStatus,
|
} from "@/api/core/base/productionLine";
|
||||||
} from '@/api/core/base/productionLine';
|
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
@ -65,17 +63,6 @@ const tableProps = [
|
|||||||
label: '工厂',
|
label: '工厂',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
prop: 'externalCode',
|
|
||||||
label: '额外编码',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'status',
|
|
||||||
label: '当前状态',
|
|
||||||
align: 'center',
|
|
||||||
filter: codeFilter('lineStatus'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: 'description',
|
prop: 'description',
|
||||||
label: '描述',
|
label: '描述',
|
||||||
@ -111,13 +98,13 @@ export default {
|
|||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi(`base:production-line:delete`)
|
this.$auth.hasPermi(`base:production-line:delete`)
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
btnName: '删除',
|
btnName: '删除',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
].filter((v) => v),
|
].filter((v)=>v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
@ -144,9 +131,7 @@ export default {
|
|||||||
type: 'separate',
|
type: 'separate',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:production-line:create')
|
type: this.$auth.hasPermi('base:production-line:create') ? 'button' : '',
|
||||||
? 'button'
|
|
||||||
: '',
|
|
||||||
btnName: '新增',
|
btnName: '新增',
|
||||||
name: 'add',
|
name: 'add',
|
||||||
color: 'success',
|
color: 'success',
|
||||||
@ -169,28 +154,6 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取数据列表
|
|
||||||
getDataList() {
|
|
||||||
this.dataListLoading = true;
|
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
|
||||||
this.total = response.data.total;
|
|
||||||
this.getStatus(response.data.list);
|
|
||||||
this.dataListLoading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getStatus(list) {
|
|
||||||
const ids = list.map((i) => {
|
|
||||||
return i.id;
|
|
||||||
});
|
|
||||||
getStatus(ids).then((response) => {
|
|
||||||
response.forEach((a) => {
|
|
||||||
list.forEach((b) => {
|
|
||||||
if (b.id === a.id) b.status = a.status;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.tableData = list;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
|
@ -8,10 +8,45 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const table = {
|
const table = {
|
||||||
lineStatus: {
|
eightDisciplineType: {
|
||||||
1: '生产中',
|
1: '客诉问题',
|
||||||
2: '停止',
|
2: '重大质量问题',
|
||||||
3: '未知',
|
0: '重复发生问题',
|
||||||
|
},
|
||||||
|
examineStatus: {
|
||||||
|
1: '需要审批',
|
||||||
|
0: '不需要审批',
|
||||||
|
},
|
||||||
|
gradeFinish: {
|
||||||
|
1: '已打分',
|
||||||
|
0: '未打分',
|
||||||
|
},
|
||||||
|
step: {
|
||||||
|
0: 'D0',
|
||||||
|
1: 'D1',
|
||||||
|
2: 'D2',
|
||||||
|
3: 'D3',
|
||||||
|
4: 'D4',
|
||||||
|
5: 'D5',
|
||||||
|
6: 'D6',
|
||||||
|
7: 'D7',
|
||||||
|
8: 'D8',
|
||||||
|
},
|
||||||
|
containmentLocaleName:
|
||||||
|
{
|
||||||
|
1: "装配线",
|
||||||
|
2: "生产线",
|
||||||
|
3: "实验室",
|
||||||
|
4: "成品在途",
|
||||||
|
5: "第三方中间商",
|
||||||
|
},
|
||||||
|
developCountermeasuresName:
|
||||||
|
{
|
||||||
|
1: "让步接收",
|
||||||
|
2: "分选返工",
|
||||||
|
3: "隔离",
|
||||||
|
4: "退换货",
|
||||||
|
5: "通知供应商",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user