Merge branch 'projects/mes-test' into projects/mes-zhp
This commit is contained in:
commit
00f54f3de6
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-10-21 11:50:46
|
||||
* @LastEditTime: 2023-11-15 17:19:19
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-12-27 15:20:14
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
@ -161,3 +161,20 @@ export function createConCoreWOr(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新分配产量
|
||||
export function updateBatch(data) {
|
||||
return request({
|
||||
url: '/base/core-order-con-work-order/updateBatch',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 更新订单表与工单关联表 多对多
|
||||
export function updateConCoreWOr(data) {
|
||||
return request({
|
||||
url: '/base/core-order-con-work-order/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -8,7 +8,13 @@ export function createGroupRule(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 作废排班规则
|
||||
export function disableGroupRule(id) {
|
||||
return request({
|
||||
url: '/base/group-scheduling-rule/disable?id=' + id,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
// 更新排班规则基础信息
|
||||
export function updateGroupRule(data) {
|
||||
return request({
|
||||
|
@ -1,8 +1,16 @@
|
||||
import request from '@/utils/request'
|
||||
// 获得产品列表
|
||||
// 获得物料列表(包括产品)
|
||||
export function getProductAll() {
|
||||
return request({
|
||||
url: '/base/core-product-material/listAll',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 获得产品列表
|
||||
export function getProductList() {
|
||||
return request({
|
||||
url: '/base/core-product-material/listAllProduct',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,13 @@ export function getItemPageData(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getByEquId(id) {
|
||||
return request({
|
||||
url: '/base/equipment-maintain-program/getByEquId?id=' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function getItemData(id) {
|
||||
return request({
|
||||
url: 'base/equipment-maintain-program/get?id=' + id,
|
||||
|
@ -38,15 +38,8 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="发货负责人" prop="deliveryPersonId">
|
||||
<el-select v-model="form.deliveryPersonId" placeholder="请选择" style="width: 100%;" filterable>
|
||||
<el-option
|
||||
v-for="item in personList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-form-item label="发货负责人" prop="deliveryPerson">
|
||||
<el-input v-model="form.deliveryPerson"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
@ -75,7 +68,6 @@
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { getWorkerList } from '@/api/base/worker'
|
||||
import { deliveryLogCreate, deliveryLogUpdate, getDeliveryLog, listOrderList } from '@/api/base/delivery'
|
||||
export default {
|
||||
name: 'AddOrUpdate',
|
||||
@ -87,7 +79,7 @@ export default {
|
||||
name: '',
|
||||
code: '',
|
||||
deliveryTime: null,
|
||||
deliveryPersonId: '',
|
||||
deliveryPerson: '',
|
||||
principal: '',
|
||||
principalCall: '',
|
||||
principalCost: 0.00,
|
||||
@ -100,7 +92,6 @@ export default {
|
||||
code: [{ required: true, message: "发货单号不能为空", trigger: "blur" }]
|
||||
},
|
||||
orderList: [],
|
||||
personList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -118,9 +109,6 @@ export default {
|
||||
listOrderList().then(res => {
|
||||
this.orderList = res.data || []
|
||||
})
|
||||
getWorkerList().then(res => {
|
||||
this.personList = res.data || []
|
||||
})
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs['addOrUpdate'].validate((valid) => {
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-07-31 09:48:36
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-11-18 09:51:03
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -393,9 +393,12 @@ export default {
|
||||
// }
|
||||
this.$axios({
|
||||
url:
|
||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||
`/base/equipment-check-order/confirm`,
|
||||
method: 'put',
|
||||
data: [this.dataForm.id],
|
||||
data: {
|
||||
ids: [this.dataForm.id],
|
||||
confirmBy: this.$store.getters.nickname,
|
||||
},
|
||||
}).then(res =>{
|
||||
if (res.code == 0) {
|
||||
this.visible = false;
|
||||
|
@ -42,9 +42,7 @@
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import {
|
||||
exportCheckOrderExcel,
|
||||
} from '@/api/equipment/base/maintain/record';
|
||||
import { exportCheckOrderExcel } from '@/api/equipment/base/maintain/record';
|
||||
import WaitingListTable from './WaitingListTable.vue';
|
||||
|
||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
@ -76,16 +74,14 @@ export default {
|
||||
name: 'Confirm',
|
||||
components: {
|
||||
WaitingListTable,
|
||||
AddOrUpdate
|
||||
AddOrUpdate,
|
||||
},
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
addOrUpdateVisible: false,
|
||||
recordDetailVisible: false,
|
||||
searchBarKeys: [
|
||||
'name'
|
||||
],
|
||||
searchBarKeys: ['name'],
|
||||
tobeConfirmedIdList: [],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
@ -101,19 +97,24 @@ export default {
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: (this.$auth.hasPermiAnd([
|
||||
type:
|
||||
this.$auth.hasPermiAnd([
|
||||
'equipment:check-record:create',
|
||||
'base:core-worker:query',
|
||||
'base:core-production-line:query',
|
||||
'base:core-department:query'
|
||||
]) || this.$auth.hasPermi('equipment:check-record:update') || this.$auth.hasPermi('equipment:check-record:export')) ? 'separate' : '',
|
||||
'base:core-department:query',
|
||||
]) ||
|
||||
this.$auth.hasPermi('equipment:check-record:update') ||
|
||||
this.$auth.hasPermi('equipment:check-record:export')
|
||||
? 'separate'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermiAnd([
|
||||
'equipment:check-record:create',
|
||||
'base:core-worker:query',
|
||||
'base:core-production-line:query',
|
||||
'base:core-department:query'
|
||||
'base:core-department:query',
|
||||
])
|
||||
? 'button'
|
||||
: '',
|
||||
@ -211,11 +212,14 @@ export default {
|
||||
// }
|
||||
return this.$axios({
|
||||
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
||||
url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||
url: `/base/equipment-check-order/confirm`,
|
||||
method: 'put',
|
||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
data: {
|
||||
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
(item) => item.id
|
||||
),
|
||||
confirmBy: this.$store.getters.nickname,
|
||||
},
|
||||
});
|
||||
})
|
||||
.then((res) => {
|
||||
@ -239,11 +243,14 @@ export default {
|
||||
// }
|
||||
return this.$axios({
|
||||
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
||||
url: `/base/equipment-check-order/confirm2?confirmPerson=${this.$store.getters.nickname}`,
|
||||
url: `/base/equipment-check-order/confirm2`,
|
||||
method: 'put',
|
||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
data: {
|
||||
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
(item) => item.id
|
||||
),
|
||||
confirmBy: this.$store.getters.nickname,
|
||||
},
|
||||
});
|
||||
})
|
||||
.then((res) => {
|
||||
@ -311,7 +318,7 @@ export default {
|
||||
},
|
||||
|
||||
handleSearchBarChange({ param, value }) {
|
||||
console.log('122', param)
|
||||
console.log('122', param);
|
||||
// if ('specialType' === param) {
|
||||
// if (!value) {
|
||||
// this.setSearchBarEquipmentList(this.allSpecialEquipments);
|
||||
@ -327,7 +334,7 @@ export default {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
this.recv({
|
||||
...this.queryParams
|
||||
...this.queryParams,
|
||||
}).then((response) => {
|
||||
this.list = response.data.list;
|
||||
this.total = response.data.total;
|
||||
@ -462,10 +469,12 @@ export default {
|
||||
// checkPersonParam = `&checkPerson=${row.checkPerson}`
|
||||
// }
|
||||
return this.$axios({
|
||||
url:
|
||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||
url: `/base/equipment-check-order/confirm`,
|
||||
method: 'put',
|
||||
data: [row.id],
|
||||
data: {
|
||||
ids: [row.id],
|
||||
confirmBy: this.$store.getters.nickname,
|
||||
},
|
||||
});
|
||||
})
|
||||
.then((res) => {
|
||||
@ -501,9 +510,7 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal
|
||||
.confirm(
|
||||
'是否确认删除巡检单名称为"' + row.name + '"的数据项?'
|
||||
)
|
||||
.confirm('是否确认删除巡检单名称为"' + row.name + '"的数据项?')
|
||||
.then(() => {
|
||||
return this.$axios({
|
||||
url: '/base/equipment-check-order/delete?id=' + row.id,
|
||||
|
@ -392,10 +392,12 @@ export default {
|
||||
console.log('111', confirm)
|
||||
this.$axios({
|
||||
url:
|
||||
'/base/equipment-maintain-log/confirm?confirmPerson=' +
|
||||
this.$store.getters.userId,
|
||||
'/base/equipment-maintain-log/confirm',
|
||||
method: 'put',
|
||||
data: [this.form.id],
|
||||
data: {
|
||||
ids: [this.form.id],
|
||||
confirmBy: this.$store.getters.nickname,
|
||||
},
|
||||
}).then(res =>{
|
||||
if (res.code == 0) {
|
||||
this.visible = false;
|
||||
|
@ -287,9 +287,12 @@ export default {
|
||||
return this.$axios({
|
||||
url: '/base/equipment-maintain-log/confirm',
|
||||
method: 'put',
|
||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
data:{
|
||||
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
(item) => item.id
|
||||
),
|
||||
confirmBy: this.$store.getters.nickname,
|
||||
},
|
||||
});
|
||||
// if (res.code == 0) {
|
||||
// this.$message.success('确认成功');
|
||||
@ -313,9 +316,12 @@ export default {
|
||||
return this.$axios({
|
||||
url: '/base/equipment-maintain-log/confirm2',
|
||||
method: 'put',
|
||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
data: {
|
||||
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
(item) => item.id
|
||||
),
|
||||
confirmBy: this.$store.getters.nickname,
|
||||
},
|
||||
});
|
||||
// if (res.code == 0) {
|
||||
// this.$message.success('确认成功');
|
||||
@ -547,7 +553,10 @@ export default {
|
||||
return this.$axios({
|
||||
url: '/base/equipment-maintain-log/confirm',
|
||||
method: 'put',
|
||||
data: [row.id],
|
||||
data: {
|
||||
ids: [row.id],
|
||||
confirmBy: this.$store.getters.nickname,
|
||||
},
|
||||
});
|
||||
// if (res.code == 0) {
|
||||
// this.$message.success('确认成功');
|
||||
|
@ -37,7 +37,7 @@
|
||||
<script>
|
||||
import { createPlanDet, updatePlanDet, getPlanDet } from '@/api/equipment/base/maintain/planconfig';
|
||||
import { getEquipmentPage } from '@/api/base/equipment'
|
||||
import { getItemPageData } from '@/api/equipment/base/maintain/items';
|
||||
import { getByEquId } from '@/api/equipment/base/maintain/items';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@ -94,20 +94,14 @@ export default {
|
||||
});
|
||||
},
|
||||
async handleChange(val) {
|
||||
console.log(val);
|
||||
let equipmentTypeId = undefined
|
||||
this.eqList.forEach((ele) => {
|
||||
if (ele.id == val) {
|
||||
equipmentTypeId = ele.equipmentTypeId
|
||||
}
|
||||
})
|
||||
const { code, data } = await getItemPageData({
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
equipmentTypeId: equipmentTypeId,
|
||||
})
|
||||
this.programList = data.list
|
||||
console.log(data);
|
||||
// let equipmentTypeId = undefined
|
||||
// this.eqList.forEach((ele) => {
|
||||
// if (ele.id == val) {
|
||||
// equipmentTypeId = ele.equipmentTypeId
|
||||
// }
|
||||
// })
|
||||
const { code, data } = await getByEquId(val)
|
||||
this.programList = data
|
||||
},
|
||||
handleDecChange(val) {
|
||||
let maintenanceDes = undefined
|
||||
|
@ -70,6 +70,12 @@ import { getList,} from "@/api/base/qualityScrapType";
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
|
||||
props: {
|
||||
mainId: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
@ -96,7 +102,7 @@ export default {
|
||||
id: undefined,
|
||||
program: undefined,
|
||||
resultType: undefined,
|
||||
equipmentTypeId: undefined,
|
||||
mainId:this.mainId,
|
||||
minValue: undefined,
|
||||
maxValue: undefined,
|
||||
maintainResult:undefined,
|
||||
@ -117,7 +123,6 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.getDict()
|
||||
console.log('我看看', this.dataForm)
|
||||
},
|
||||
methods: {
|
||||
handleClear() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-24 11:19:43
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-07-19 14:47:02
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-12-13 15:50:49
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@ -28,10 +28,8 @@ export default {
|
||||
activated() {
|
||||
},
|
||||
methods: {
|
||||
init(obj) {
|
||||
console.log(obj);
|
||||
this.dataForm.id = obj.id || "";
|
||||
this.dataForm.equipmentTypeId = obj.equipmentTypeId || "";
|
||||
init(id) {
|
||||
this.dataForm.id = id || "";
|
||||
this.visible = true;
|
||||
if (this.urlOptions.getOption) {
|
||||
this.getArr()
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2024-07-19 09:49:22
|
||||
* @LastEditTime: 2024-07-22 09:17:31
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-12-13 15:52:24
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@ -88,12 +88,8 @@ export default {
|
||||
if (val.type === "edit") {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = "编辑"
|
||||
let obj = {
|
||||
id: val.data.id,
|
||||
equipmentTypeId:val.data.equipmentTypeId
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(obj);
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === "delete") {
|
||||
this.deleteHandle(val.data.id, val.data.program, val.data._pageIndex)
|
||||
|
@ -186,7 +186,7 @@ export default {
|
||||
handleDetail(row) {
|
||||
this.showDetailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.showDetail.init(row.equipmentTypeId)
|
||||
this.$refs.showDetail.init(row.id)
|
||||
})
|
||||
// alert('跳转到 保养记录')
|
||||
// console.log(row)
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-07-12 13:28:21
|
||||
* @LastEditTime: 2024-07-23 14:00:38
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-12-13 16:03:29
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -22,7 +22,7 @@
|
||||
</el-drawer>
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel" width="30%">
|
||||
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
|
||||
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit" :main-id="queryParams.mainId"></add-or-update>
|
||||
</base-dialog>
|
||||
</div>
|
||||
|
||||
@ -74,7 +74,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
equipmentTypeId:null,
|
||||
mainId:null,
|
||||
},
|
||||
tableProps,
|
||||
basePath: 'base/equipment-maintain-program',
|
||||
@ -105,21 +105,18 @@ export default {
|
||||
},
|
||||
getDataList(id) {
|
||||
this.dataListLoading = true;
|
||||
this.queryParams.equipmentTypeId = id
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
this.queryParams.mainId = id
|
||||
this.urlOptions.getDataListURL(this.queryParams).then(response => {
|
||||
this.tableData = response.data.list;
|
||||
this.listQuery.total = response.data.total;
|
||||
this.queryParams.total = response.data.total;
|
||||
this.dataListLoading = false
|
||||
});
|
||||
},
|
||||
handleAdd() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = '新增'
|
||||
let obj = {
|
||||
equipmentTypeId: this.queryParams.equipmentTypeId
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(obj)
|
||||
this.$refs.addOrUpdate.init()
|
||||
});
|
||||
},
|
||||
init(id) {
|
||||
|
@ -189,7 +189,7 @@ export default {
|
||||
input: true,
|
||||
label: '工艺编码',
|
||||
prop: 'code',
|
||||
// url: '/base/core-equipment/getCode',
|
||||
url: '/extend/process-flow/getCode',
|
||||
},
|
||||
],
|
||||
[
|
||||
|
@ -76,10 +76,10 @@ const tableProps = [
|
||||
label: '班次状态',
|
||||
subcomponent: StatusBtn,
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
// {
|
||||
// prop: 'remark',
|
||||
// label: '备注',
|
||||
// },
|
||||
];
|
||||
export default {
|
||||
name: 'GroupClass',
|
||||
|
@ -82,7 +82,7 @@
|
||||
</div>
|
||||
<!-- 班次班组 -->
|
||||
<!-- class有两个样式,一个是类似class1,还有个是选中红框显示 -->
|
||||
<el-row
|
||||
<!-- <el-row
|
||||
:gutter="2"
|
||||
:class="
|
||||
'class' +
|
||||
@ -92,6 +92,14 @@
|
||||
: '')
|
||||
"
|
||||
v-for="(item, index) in list[Number(data.day.split('-')[2])]"
|
||||
:key="index"> -->
|
||||
<el-row
|
||||
:gutter="2"
|
||||
:class="
|
||||
'class' +
|
||||
(index + 1)
|
||||
"
|
||||
v-for="(item, index) in list[Number(data.day.split('-')[2])]"
|
||||
:key="index">
|
||||
<el-col :span="12">
|
||||
<div class="selectDiv">
|
||||
@ -141,6 +149,9 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-else style='font-size: 20px;font-weight: 500;text-align: right;'>
|
||||
{{ Number(data.day.split('-')[2]) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-calendar>
|
||||
</div>
|
||||
|
@ -211,6 +211,9 @@ export default {
|
||||
this.$modal.msgSuccess('操作成功');
|
||||
this.$emit('successSubmit');
|
||||
});
|
||||
}else{
|
||||
this.$modal.msgSuccess('操作成功');
|
||||
this.$emit('successSubmit');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -226,6 +229,9 @@ export default {
|
||||
this.$modal.msgSuccess('操作成功');
|
||||
this.$emit('successSubmit');
|
||||
});
|
||||
}else{
|
||||
this.$modal.msgSuccess('操作成功');
|
||||
this.$emit('successSubmit');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -176,7 +176,7 @@ export default {
|
||||
if (res.code === 0 && res.data.list && res.data.list.length > 0) {
|
||||
res.data.list.forEach(item => {
|
||||
if(item.isProduction){
|
||||
item.str = item.strList?item.strList.join(','):'-'
|
||||
item.str = item.strList?item.strList.join(','):'-'
|
||||
}
|
||||
});
|
||||
this.list = res.data.list;
|
||||
|
@ -44,6 +44,7 @@ import {
|
||||
deleteGroupRule,
|
||||
updateGroupRule,
|
||||
getGroupRule,
|
||||
disableGroupRule
|
||||
} from '@/api/base/groupSchedulingRule';
|
||||
import schedulingRuleConfigAdd from './components/schedulingRuleConfigAdd.vue';
|
||||
import { formatDate } from '@/utils';
|
||||
@ -231,15 +232,10 @@ export default {
|
||||
'是否确认作废序号为"' + row.planName + '"的数据项?'
|
||||
,'提示')
|
||||
.then(() => {
|
||||
getGroupRule(row.id).then((response) => {
|
||||
let datas = response.data;
|
||||
datas.list = datas.sequenceList;
|
||||
datas.enabled = 0;
|
||||
updateGroupRule(datas).then(() => {
|
||||
disableGroupRule(row.id).then((response) => {
|
||||
_this.getList();
|
||||
_this.$modal.msgSuccess('操作成功');
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
|
@ -18,7 +18,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="80"
|
||||
label="操作"
|
||||
label="生产情况"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
@ -122,8 +122,8 @@ export default {
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi('base:team-production:detail')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '详情'
|
||||
type: 'prodDetail',
|
||||
btnName: '查看'
|
||||
}
|
||||
: undefined
|
||||
].filter((v) => v),
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-08-14 15:24:11
|
||||
* @LastEditTime: 2024-12-12 09:54:25
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -83,7 +83,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="showTime">
|
||||
<el-form-item label="生产单位用时" prop="processTime">
|
||||
<el-form-item label="生产单位用时(s)" prop="processTime">
|
||||
<el-input
|
||||
v-model.number="dataForm.processTime"
|
||||
type="number"
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2024-07-01 14:54:06
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-08-21 11:19:51
|
||||
* @LastEditTime: 2024-12-16 10:03:30
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -346,6 +346,7 @@ export default {
|
||||
this.listQuery.typeId = data.id || undefined;
|
||||
this.listQuery.product = data.product;
|
||||
this.$refs.searchBarForm.formInline.type = data.name || undefined;
|
||||
this.getDataList()
|
||||
},
|
||||
// 新增节点
|
||||
append(data) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-10-14 09:26:53
|
||||
* @LastEditTime: 2024-12-12 16:13:11
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -41,18 +41,19 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料批次" prop="materialDateId">
|
||||
<el-form-item label="物料批次" prop="materialDate">
|
||||
<el-select
|
||||
v-model="dataForm.materialDateId"
|
||||
v-model="dataForm.materialDate"
|
||||
clearable
|
||||
filterable
|
||||
allow-create
|
||||
placeholder="请选择物料批次"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="dict in materialDateList"
|
||||
:key="dict.id"
|
||||
:label="dict.code"
|
||||
:value="dict.id" />
|
||||
:value="dict.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -164,7 +165,7 @@ export default {
|
||||
id: undefined,
|
||||
materialId: undefined,
|
||||
materialCode: undefined,
|
||||
materialDateId: undefined,
|
||||
materialDate: undefined,
|
||||
equipmentId: undefined,
|
||||
userName: undefined,
|
||||
userNames: [],
|
||||
@ -208,15 +209,17 @@ export default {
|
||||
methods: {
|
||||
async getDictData() {
|
||||
const materRes = await getMaterialTree(); //
|
||||
let typeId = materRes.data.find(item=>item.product === 0).id
|
||||
let typeId = materRes.data.find((item) => item.product === 0).id;
|
||||
const listQuery = {
|
||||
typeId:typeId
|
||||
}
|
||||
typeId: typeId,
|
||||
};
|
||||
const materData = await getMaterialList(listQuery);
|
||||
this.materialList = [];
|
||||
this.materialList = materData.data;
|
||||
if (!this.dataForm.id) {
|
||||
const dateRes = await getMaterDateList();
|
||||
this.materialDateList = dateRes.data;
|
||||
}
|
||||
const eqRes = await getEqListAll();
|
||||
this.eqList = eqRes.data;
|
||||
const workerRes = await listSimpleUsers();
|
||||
@ -257,7 +260,7 @@ export default {
|
||||
this.dataForm.id = response.data.id;
|
||||
this.dataForm.materialCode = response.data.materialCode;
|
||||
this.dataForm.materialId = response.data.materialId;
|
||||
this.dataForm.materialDateId = response.data.materialDateId;
|
||||
this.dataForm.materialDate = response.data.materialDateName;
|
||||
this.dataForm.equipmentId = response.data.equipmentId;
|
||||
this.dataForm.useTime = response.data.useTime;
|
||||
// this.dataForm.userName = response.data.userName
|
||||
@ -265,6 +268,11 @@ export default {
|
||||
this.dataForm.source = response.data.source;
|
||||
this.dataForm.remark = response.data.remark;
|
||||
this.dataForm.userNames = response.data.userName.split(',');
|
||||
getMaterDateList({ materialId: this.dataForm.materialId }).then(
|
||||
(res) => {
|
||||
this.materialDateList = res.data;
|
||||
}
|
||||
);
|
||||
});
|
||||
} else {
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="工单模式">
|
||||
<el-radio-group v-model="isBind">
|
||||
<el-radio-group v-model="isBind" @input='toggleWay'>
|
||||
<el-radio :label="true">绑定工单</el-radio>
|
||||
<el-radio :label="false">新增工单</el-radio>
|
||||
</el-radio-group>
|
||||
@ -48,16 +48,19 @@
|
||||
<el-option
|
||||
v-for="item in productList"
|
||||
:key="item.id"
|
||||
:label="item.name + ' | ' + item.specifications"
|
||||
:value="item.id">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">
|
||||
{{ item.specifications }}
|
||||
</span>
|
||||
</el-option>
|
||||
:label="item.name"
|
||||
:value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="产品规格" prop="specifications">
|
||||
<el-input
|
||||
v-model="form.specifications"
|
||||
placeholder="请输入产品规格"
|
||||
disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="计划开始时间">
|
||||
<el-date-picker
|
||||
@ -100,33 +103,6 @@
|
||||
style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="关联工艺" prop="processFlowId">
|
||||
<el-select
|
||||
v-model="form.processFlowId"
|
||||
placeholder="请选择"
|
||||
disabled
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in processFlowList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
||||
<el-select
|
||||
v-model="form.materialMethod"
|
||||
placeholder="请选择"
|
||||
style="width: 100%"
|
||||
disabled>
|
||||
<el-option label="产品基础BOM" :value="1"></el-option>
|
||||
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="优先级" prop="priority">
|
||||
<el-select
|
||||
@ -158,15 +134,14 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="关联产线" prop="productLineId">
|
||||
<el-form-item label="负责部门" prop="deptId">
|
||||
<el-select
|
||||
v-model="form.productLineId"
|
||||
placeholder="请选择"
|
||||
multiple
|
||||
v-model="form.deptId"
|
||||
placeholder="请选择关联产线"
|
||||
style="width: 100%"
|
||||
:disabled="isBind">
|
||||
<el-option
|
||||
v-for="item in productLineList"
|
||||
v-for="item in deptList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
@ -178,37 +153,123 @@
|
||||
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="负责部门" prop="deptId">
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<span class="add-type">物料计算方式</span>
|
||||
<el-radio-group
|
||||
v-model="form.materialMethod"
|
||||
:disabled="isBind"
|
||||
@change="materialMethodChange">
|
||||
<el-radio :label="1">产品基础BOM</el-radio>
|
||||
<el-radio :label="2">工艺扩展BOM</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="form.materialMethod === 1">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<span style="margin: 8px 0;" class="add-type">关联产线</span>
|
||||
<el-button style="margin-left: 20px" type="text" @click="addBind" :disabled="isBind">
|
||||
新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row
|
||||
:gutter="20"
|
||||
v-for="(item, index) in form.productLineIds"
|
||||
:key="index + 'line'"
|
||||
style="margin-bottom: 8px">
|
||||
<el-col :span="8">
|
||||
<el-select
|
||||
v-model="form.deptId"
|
||||
placeholder="请选择关联产线"
|
||||
v-model="item.lineId"
|
||||
placeholder="请选择产线"
|
||||
:disabled="isBind"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in deptList"
|
||||
v-for="item in productLineList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
||||
<el-col :span="8">
|
||||
<el-tooltip effect="dark" content="该产线分配生产数量" placement="top-end">
|
||||
<el-input-number
|
||||
v-model="form.planAssignmentQuantity"
|
||||
style="width: 100%"
|
||||
v-model="item.num"
|
||||
placeholder="请输入数量"
|
||||
:step="1"
|
||||
:min="0"
|
||||
:max="9999999999999"
|
||||
style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
:disabled="isBind"
|
||||
step-strictly />
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<span style="margin: 8px 0; display: inline-block">
|
||||
关联产线及工艺
|
||||
</span>
|
||||
<el-button style="margin-left: 20px" type="text" @click="addBind" :disabled="isBind">
|
||||
新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row
|
||||
:gutter="20"
|
||||
v-for="(item, index) in form.productLineIds"
|
||||
:key="index + 'process'"
|
||||
style="margin-bottom: 8px">
|
||||
<el-col :span="8">
|
||||
<el-select
|
||||
v-model="item.lineId"
|
||||
placeholder="请选择产线"
|
||||
style="width: 100%"
|
||||
:disabled="isBind"
|
||||
@change="processLineIdChange">
|
||||
<el-option
|
||||
v-for="item in productLineList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-select
|
||||
v-model="item.processId"
|
||||
placeholder="请选择工艺"
|
||||
filterable
|
||||
:disabled="isBind"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in processFlowList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-tooltip effect="dark" content="该产线分配生产数量" placement="top-end">
|
||||
<el-input-number
|
||||
style="width: 100%"
|
||||
v-model="item.num"
|
||||
:step="1"
|
||||
:min="0"
|
||||
:disabled="isBind"
|
||||
step-strictly />
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { getProductAll } from '@/api/base/product';
|
||||
import { getProductList } from '@/api/base/product';
|
||||
import {
|
||||
getProcessFlowList,
|
||||
getWorkOrderCode,
|
||||
getProcessFlowPage,
|
||||
orderIssue,
|
||||
workOrderList,
|
||||
getWorkOrderById,
|
||||
@ -216,13 +277,13 @@ import {
|
||||
import { getLineAll } from '@/api/base/productionLine';
|
||||
import { listDept } from '@/api/system/dept';
|
||||
import moment from 'moment';
|
||||
import { getCode } from '@/api/base/coreWorkOrder';
|
||||
export default {
|
||||
name: 'AddWorkOrder',
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
workOrderId: '',
|
||||
orderId: '',
|
||||
name: '',
|
||||
code: '',
|
||||
planProductId: '',
|
||||
@ -231,10 +292,9 @@ export default {
|
||||
planAssignQuantity: 0,
|
||||
deptId: undefined,
|
||||
planQuantity: 0,
|
||||
processFlowId: '',
|
||||
materialMethod: 1,
|
||||
priority: '',
|
||||
productLineId: [],
|
||||
productLineIds: [{ lineId: null, processId: null, num: null }],
|
||||
type: '',
|
||||
workers: '',
|
||||
planAssignmentQuantity: '',
|
||||
@ -253,9 +313,6 @@ export default {
|
||||
planQuantity: [
|
||||
{ required: true, message: '计划生产数量不能为空', trigger: 'blur' },
|
||||
],
|
||||
productLineId: [
|
||||
{ required: true, message: '产线不能为空', trigger: 'change' },
|
||||
],
|
||||
planAssignmentQuantity: [
|
||||
{
|
||||
required: true,
|
||||
@ -263,63 +320,81 @@ export default {
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
deptId:[
|
||||
{ required: true, message: '负责部门不能为空', trigger: 'change' },
|
||||
],
|
||||
},
|
||||
productList: [],
|
||||
processFlowList: [],
|
||||
productLineList: [],
|
||||
workOrderTypeList: [
|
||||
{ id: 1, name: '标准工单' },
|
||||
{ id: 2, name: '特殊工单' },
|
||||
{ id: 1, name: '普通' },
|
||||
{ id: 2, name: '特殊' },
|
||||
],
|
||||
planStartTime: '',
|
||||
planFinishTime: '',
|
||||
isBind: false,
|
||||
isBind: true,
|
||||
workOrderList: [],
|
||||
orderData: {},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 工艺变更
|
||||
materialMethodChange(val) {
|
||||
console.log(val);
|
||||
this.processFlowList = [];
|
||||
this.form.productLineIds = [];
|
||||
const obj = { lineId: null, processId: null, num: null };
|
||||
this.form.productLineIds.push(obj);
|
||||
},
|
||||
// 产线工艺关联
|
||||
processLineIdChange(val) {
|
||||
const params = {
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
lineId: val,
|
||||
};
|
||||
// 工艺
|
||||
getProcessFlowPage(params).then((res) => {
|
||||
this.processFlowList = res.data.list || [];
|
||||
console.log(this.processFlowList);
|
||||
});
|
||||
},
|
||||
init(data, param) {
|
||||
this.isBind = true;
|
||||
this.orderData = data;
|
||||
this.form.orderId = data.id;
|
||||
this.getList();
|
||||
},
|
||||
changeAdd() {
|
||||
if (this.isBind) {
|
||||
this.isBind = false;
|
||||
getWorkOrderCode().then((res) => {
|
||||
this.form.code = res.data || '';
|
||||
});
|
||||
this.form.orderId = null;
|
||||
toggleWay(val) {
|
||||
console.log(val);
|
||||
this.formClear()
|
||||
if (!val) {
|
||||
// 获取工单编码
|
||||
getCode().then((res) => {
|
||||
this.form.code = res.data;
|
||||
this.form.planProductId = this.orderData.planProductId;
|
||||
this.form.processFlowId = this.orderData.processFlowId;
|
||||
this.form.materialMethod = this.orderData.materialMethod;
|
||||
this.form.name = '';
|
||||
this.selectProduct(this.form.planProductId)
|
||||
})
|
||||
}else{
|
||||
this.isBind = true;
|
||||
this.form.orderId = this.orderData.id;
|
||||
this.form.planProductId = null;
|
||||
this.form.processFlowId = null;
|
||||
this.form.materialMethod = null;
|
||||
this.form.code = null;
|
||||
this.form.code = '';
|
||||
this.form.planProductId = '';
|
||||
}
|
||||
this.form.materialMethod = 1;
|
||||
this.form.productLineIds = [];
|
||||
},
|
||||
getList() {
|
||||
listDept().then((res) => {
|
||||
this.deptList = res.data || [];
|
||||
});
|
||||
// 产品
|
||||
getProductAll().then((res) => {
|
||||
getProductList().then((res) => {
|
||||
this.productList = res.data || [];
|
||||
});
|
||||
// 产线
|
||||
getLineAll().then((res) => {
|
||||
this.productLineList = res.data || [];
|
||||
});
|
||||
// 工艺
|
||||
getProcessFlowList().then((res) => {
|
||||
this.processFlowList = res.data || [];
|
||||
});
|
||||
// 工单list
|
||||
workOrderList({
|
||||
status: 1,
|
||||
@ -327,6 +402,18 @@ export default {
|
||||
this.workOrderList = res.data || [];
|
||||
});
|
||||
},
|
||||
// 选产品带出规格
|
||||
selectProduct(val) {
|
||||
if (val) {
|
||||
this.productList.map((item) => {
|
||||
if (val === item.id) {
|
||||
this.form.specifications = item.specifications;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.form.specifications = '';
|
||||
}
|
||||
},
|
||||
addWorkOrderSubmit() {
|
||||
this.$refs['addWorkOrder'].validate((valid) => {
|
||||
if (valid) {
|
||||
@ -334,8 +421,7 @@ export default {
|
||||
//绑定工单
|
||||
orderIssue({
|
||||
workOrderId: this.form.workOrderId,
|
||||
orderId: this.form.orderId,
|
||||
planAssignmentQuantity: this.form.planAssignmentQuantity,
|
||||
orderId: this.orderData.id,
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$modal.msgSuccess('操作成功');
|
||||
@ -344,24 +430,19 @@ export default {
|
||||
});
|
||||
} else {
|
||||
// 新增工单
|
||||
let _this = this;
|
||||
_this.form.planStartTime = _this.planStartTime
|
||||
? new Date(_this.planStartTime).valueOf()
|
||||
this.form.planStartTime = this.planStartTime
|
||||
? new Date(this.planStartTime).valueOf()
|
||||
: '';
|
||||
_this.form.planFinishTime = _this.planFinishTime
|
||||
? new Date(_this.planFinishTime).valueOf()
|
||||
this.form.planFinishTime = this.planFinishTime
|
||||
? new Date(this.planFinishTime).valueOf()
|
||||
: '';
|
||||
orderIssue({ ..._this.form }).then((res) => {
|
||||
orderIssue({
|
||||
...this.form,
|
||||
orderId: this.orderData.id,
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
_this.$modal.msgSuccess('操作成功');
|
||||
let name = this.form.name;
|
||||
_this.$emit('addWorkOrderSubmit');
|
||||
// 询问是否添加预使用主原料
|
||||
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
||||
// _this.$router.push({
|
||||
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
||||
// })
|
||||
// })
|
||||
this.$modal.msgSuccess('操作成功');
|
||||
this.$emit('addWorkOrderSubmit');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -379,39 +460,52 @@ export default {
|
||||
this.planStartTime = '';
|
||||
this.form.planFinishTime = '';
|
||||
this.form.planStartTime = '';
|
||||
this.isBind = false;
|
||||
},
|
||||
// 绑定工单,选择工单时获取工单信息
|
||||
getWorkOrderMsg() {
|
||||
if (this.form.workOrderId) {
|
||||
getWorkOrderById({ id: this.form.workOrderId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.form.code = res.data.code;
|
||||
this.form.planProductId = res.data.planProductId;
|
||||
this.form = res.data;
|
||||
this.form.workOrderId = res.data.id;
|
||||
this.planStartTime = res.data.planStartTime
|
||||
? moment
|
||||
.unix(res.data.planStartTime)
|
||||
? moment(res.data.planStartTime)
|
||||
.format('YYYY-MM-DD HH:mm:ss')
|
||||
: null;
|
||||
this.planFinishTime = res.data.planFinishTime
|
||||
? moment
|
||||
.unix(res.data.planFinishTime)
|
||||
? moment(res.data.planFinishTime)
|
||||
.format('YYYY-MM-DD HH:mm:ss')
|
||||
: null;
|
||||
this.form.planAssignQuantity = res.data.planAssignQuantity;
|
||||
this.form.planQuantity = res.data.planQuantity;
|
||||
this.form.processFlowId = res.data.processFlowId;
|
||||
this.form.materialMethod = res.data.materialMethod;
|
||||
this.form.priority = res.data.priority
|
||||
? res.data.priority + ''
|
||||
: '';
|
||||
this.form.productLineId = res.data.productLineIds;
|
||||
this.form.type = res.data.type;
|
||||
this.form.workers = res.data.workers;
|
||||
// 根据产线获取工艺
|
||||
if (this.form.materialMethod === 2) {
|
||||
this.form.productLineIds.forEach((item) => {
|
||||
if (item.lineId) {
|
||||
this.processLineIdChange(item.lineId);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
addBind() {
|
||||
const obj = { lineId: null, processId: null, num: null };
|
||||
this.form.productLineIds.push(obj);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.add-type {
|
||||
margin: 0 20px 15px 0;
|
||||
display: inline-block;
|
||||
}
|
||||
.add-type::before {
|
||||
content: '*';
|
||||
color: #ff4949;
|
||||
margin-right: 4px;
|
||||
}
|
||||
</style>
|
||||
|
@ -19,6 +19,12 @@
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="产品名称" prop="planProductId">
|
||||
<el-select @change="getSpec" v-model="form.planProductId" placeholder="请选择" style="width: 100%;" filterable>
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name"
|
||||
:value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="产品名称" prop="planProductId">
|
||||
<el-select @change="getSpec" v-model="form.planProductId" placeholder="请选择" style="width: 100%;" filterable>
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name+' | '+(item.specifications || '')"
|
||||
:value="item.id">
|
||||
@ -26,7 +32,7 @@
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specifications }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
@ -79,7 +85,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { getOrderCode, getOrderById, getProcessFlowList, orderUpdate, orderCreate } from '@/api/base/orderManage'
|
||||
import { getProductAll } from '@/api/base/product'
|
||||
import { getProductList } from '@/api/base/product'
|
||||
import { getCustomerList } from '@/api/base/customer'
|
||||
export default {
|
||||
name: 'OrderAdd',
|
||||
@ -160,7 +166,7 @@ export default {
|
||||
},
|
||||
getList() {
|
||||
// 产品
|
||||
getProductAll().then(res => {
|
||||
getProductList().then(res => {
|
||||
this.productList = res.data || []
|
||||
})
|
||||
// 客户
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2024-09-26 14:08:58
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-11-06 09:52:59
|
||||
* @LastEditTime: 2024-11-13 15:23:25
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -69,7 +69,7 @@ const tableProps = [
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'specifications',
|
||||
prop: 'productSpec',
|
||||
label: '产品规格',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
@ -92,7 +92,7 @@ const tableProps = [
|
||||
subcomponent: selectTime,
|
||||
},
|
||||
{
|
||||
prop: 'customerId',
|
||||
prop: 'customerName',
|
||||
label: '客户',
|
||||
showOverflowtooltip: true,
|
||||
// subcomponent: selectMember,
|
||||
|
@ -69,7 +69,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="workOrderNum" label="工单数量" width="140">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="handleRoute" type="text">
|
||||
<el-button @click="handleRoute(scope.row)" type="text">
|
||||
{{ scope.row.workOrderNum }}
|
||||
</el-button>
|
||||
</template>
|
||||
@ -117,14 +117,14 @@
|
||||
<el-button
|
||||
type="text"
|
||||
:disabled="
|
||||
!(scope.row.status === 1 && scope.row.triggerOrigin === 1)
|
||||
!(scope.row.status === 1)
|
||||
"
|
||||
@click="handleClick({ data: scope.row, type: 'edit' })"
|
||||
v-hasPermi="['base:order-manage:edit']">
|
||||
<span
|
||||
class="iconfont icon-edit"
|
||||
:class="
|
||||
!(scope.row.status === 1 && scope.row.triggerOrigin === 1)
|
||||
!(scope.row.status === 1)
|
||||
? ''
|
||||
: 'primary-color'
|
||||
" />
|
||||
@ -193,7 +193,6 @@
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
import {
|
||||
getOrderPage,
|
||||
orderDelete,
|
||||
orderAssignmentList,
|
||||
orderFinish,
|
||||
orderVoid,
|
||||
@ -380,7 +379,6 @@ export default {
|
||||
}
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
switch (val.type) {
|
||||
case 'edit':
|
||||
this.addOrEditTitle = '编辑';
|
||||
@ -389,21 +387,11 @@ export default {
|
||||
this.$refs.orderAdd.init(val.data.id);
|
||||
});
|
||||
break;
|
||||
case 'delete':
|
||||
this.handleDelete(val.data);
|
||||
break;
|
||||
case 'detail':
|
||||
this.$router.push({
|
||||
path: 'order-detail-data?orderId=' + val.data.id,
|
||||
});
|
||||
break;
|
||||
case 'add':
|
||||
this.workIssueTitle = '新增工单';
|
||||
this.addWorkOrdervisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addWorkOrder.init(val.data, 'add');
|
||||
});
|
||||
break;
|
||||
case 'void':
|
||||
orderVoid({ id: val.data.id }).then((res) => {
|
||||
console.log(res);
|
||||
@ -437,19 +425,6 @@ export default {
|
||||
default:
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
handleDelete(val) {
|
||||
this.$modal
|
||||
.confirm('是否确认删除"' + val.name + '"的数据项?')
|
||||
.then(function () {
|
||||
return orderDelete({ id: val.id });
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess('操作成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 完成
|
||||
handleComplete(val) {
|
||||
this.$modal
|
||||
@ -499,13 +474,13 @@ export default {
|
||||
this.splitWorkOrderCancel();
|
||||
this.getList();
|
||||
},
|
||||
async handleRoute() {
|
||||
async handleRoute(row) {
|
||||
const res = await orderAssignmentList({
|
||||
orderIdList: [this.injectData.id],
|
||||
orderIdList: [row.id],
|
||||
});
|
||||
console.log(res.data);
|
||||
let arr = [];
|
||||
res.data[this.injectData.id].forEach((ele) => {
|
||||
res.data[row.id].forEach((ele) => {
|
||||
arr.push(ele.workOrderId);
|
||||
});
|
||||
let woIdString = arr.join(',');
|
||||
|
@ -9,7 +9,7 @@
|
||||
type="primary"
|
||||
plain
|
||||
size="small"
|
||||
style="float: right; margin-top: -10px"
|
||||
style="float: right; margin-top: -25px"
|
||||
@click="returnOrderManage">
|
||||
<svg-icon icon-class="return" />
|
||||
返回
|
||||
@ -421,6 +421,19 @@ export default {
|
||||
.box1 {
|
||||
height: 215px;
|
||||
padding: 16px 16px 0 16px;
|
||||
.boxTitle {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.blueTitle {
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 18px;
|
||||
background-color: #0b58ff;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top:4px;
|
||||
}
|
||||
.blodTip {
|
||||
height: 16px;
|
||||
font-size: 14px;
|
||||
|
@ -81,7 +81,7 @@ export default {
|
||||
this.chartList[i].workOrder.map(item => {
|
||||
colorList.push(item.color)
|
||||
})
|
||||
let percentage = (this.chartList[i].sunNum/this.chartList[i].num*100).toFixed(0)
|
||||
let percentage = (this.chartList[i].sunNum/this.chartList[i].num*100).toFixed(2)
|
||||
var option = {
|
||||
color: colorList,
|
||||
series: [
|
||||
|
@ -249,14 +249,14 @@ export default {
|
||||
let sunNum = 0
|
||||
for (let i = 0; i < tempArr[key].length; i++) {
|
||||
let subObj = {}
|
||||
subObj.value = tempArr[key][i].actualAssignmentQuantity
|
||||
subObj.value = tempArr[key][i].actualAssignmentQuantity || 0
|
||||
subObj.name = tempArr[key][i].woName
|
||||
if (i < 5) {
|
||||
subObj.color = color[i]
|
||||
} else {
|
||||
subObj.color = color[i%5]
|
||||
}
|
||||
sunNum+=tempArr[key][i].actualAssignmentQuantity
|
||||
sunNum+=(tempArr[key][i].actualAssignmentQuantity || 0)
|
||||
tempArr3.push(subObj)
|
||||
}
|
||||
tempArr3.push({
|
||||
@ -268,6 +268,7 @@ export default {
|
||||
obj.workOrder = tempArr3
|
||||
tempArr2.push(obj)
|
||||
}
|
||||
console.log(tempArr2)
|
||||
this.chartList = tempArr2
|
||||
if (this.activeName === 'barChart' && this.chartList.length > 0) {
|
||||
this.$nextTick(() => {
|
||||
|
@ -40,7 +40,7 @@ $pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
|
||||
$mgr: 8px;
|
||||
@each $size, $height in $pxls {
|
||||
.#{$size}-title {
|
||||
font-size: 18px;
|
||||
font-size: $height;
|
||||
line-height: $height;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
|
@ -43,7 +43,8 @@
|
||||
<el-form-item label="产品规格" prop="specifications">
|
||||
<el-input
|
||||
v-model="dataForm.specifications"
|
||||
placeholder="请输入产品规格" />
|
||||
placeholder="请输入产品规格"
|
||||
disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -149,11 +150,6 @@
|
||||
<el-radio :label="1">产品基础BOM</el-radio>
|
||||
<el-radio :label="2">工艺扩展BOM</el-radio>
|
||||
</el-radio-group>
|
||||
<!-- <el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;"
|
||||
@change="materialMethodChange">
|
||||
<el-option key="1" label="产品基础BOM" :value="1" />
|
||||
<el-option key="2" label="工艺扩展BOM" :value="2" />
|
||||
</el-select> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="dataForm.materialMethod === 1">
|
||||
@ -183,6 +179,7 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-tooltip effect="dark" content="该产线分配生产数量" placement="top-end">
|
||||
<el-input-number
|
||||
style="width: 100%"
|
||||
v-model="item.num"
|
||||
@ -190,6 +187,7 @@
|
||||
:step="1"
|
||||
:min="0"
|
||||
step-strictly />
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -236,26 +234,21 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-tooltip effect="dark" content="该产线分配生产数量" placement="top-end">
|
||||
<el-input-number
|
||||
style="width: 100%"
|
||||
v-model="item.num"
|
||||
:step="1"
|
||||
:min="0"
|
||||
step-strictly />
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<!-- <el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { getProductAll } from '@/api/base/product';
|
||||
import { getProductList } from '@/api/base/product';
|
||||
import { getProcessFlowPage, workOrderList } from '@/api/base/orderManage';
|
||||
import {
|
||||
createCoreWO,
|
||||
@ -323,9 +316,6 @@ export default {
|
||||
{ id: 1, name: '普通' },
|
||||
{ id: 2, name: '特殊' },
|
||||
],
|
||||
planStartTime: '',
|
||||
planFinishTime: '',
|
||||
isBind: false,
|
||||
workOrderList: [],
|
||||
};
|
||||
},
|
||||
@ -340,10 +330,6 @@ export default {
|
||||
this.dataForm.productLineIds = [];
|
||||
const obj = { lineId: null, processId: null, num: null };
|
||||
this.dataForm.productLineIds.push(obj);
|
||||
// if (val === 2 && !this.dataForm.processFlowId) {
|
||||
// this.dataForm.materialMethod = 1;
|
||||
// this.$modal.msgError('请先选择关联工艺');
|
||||
// }
|
||||
},
|
||||
// 产线工艺关联
|
||||
processLineIdChange(val) {
|
||||
@ -355,6 +341,7 @@ export default {
|
||||
// 工艺
|
||||
getProcessFlowPage(params).then((res) => {
|
||||
this.processFlowList = res.data.list || [];
|
||||
console.log(this.processFlowList);
|
||||
});
|
||||
},
|
||||
init(id) {
|
||||
@ -365,15 +352,26 @@ export default {
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
this.planStartTime = '';
|
||||
this.planFinishTime = '';
|
||||
this.dataForm.planStartTime = '';
|
||||
this.dataForm.planFinishTime = '';
|
||||
this.dataForm.productLineIds = [{ lineId: null, processId: null, num: null }];
|
||||
if (this.dataForm.id) {
|
||||
getCoreWO(id).then((response) => {
|
||||
this.dataForm = response.data;
|
||||
this.dataForm.planStartTime = response.data.planStartTime ? response.data.planStartTime : '';
|
||||
this.dataForm.planFinishTime = response.data.planFinishTime ? response.data.planFinishTime : '';
|
||||
if (this.dataForm.priority !== undefined) {
|
||||
this.dataForm.priority = String(this.dataForm.priority);
|
||||
}
|
||||
this.dataForm.priority;
|
||||
// 根据产线获取工艺
|
||||
if (this.dataForm.materialMethod === 2) {
|
||||
this.dataForm.productLineIds.forEach((item) => {
|
||||
if (item.lineId) {
|
||||
this.processLineIdChange(item.lineId);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
@ -418,22 +416,8 @@ export default {
|
||||
this.urlOptions.createURL(this.dataForm).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.visible = false;
|
||||
this.$confirm('是否添加预使用主原料信息?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
console.log('121', this.dataForm.name);
|
||||
this.$emit('refreshDataList', {
|
||||
id: response.data,
|
||||
name: this.dataForm.name,
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -447,7 +431,7 @@ export default {
|
||||
},
|
||||
getDict() {
|
||||
// 产品
|
||||
getProductAll().then((res) => {
|
||||
getProductList().then((res) => {
|
||||
this.productList = res.data || [];
|
||||
});
|
||||
// 产线
|
||||
|
311
src/views/produce/workOrder/allocation copy.vue
Normal file
311
src/views/produce/workOrder/allocation copy.vue
Normal file
@ -0,0 +1,311 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-07-19 18:59:13
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
size="55%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ '分配产量' }}
|
||||
</small-title>
|
||||
<div class="content">
|
||||
<div class='formContainer'>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12"><span class='label'>工单名称:</span><span class='text'>{{ dataForm.name }}</span></el-col>
|
||||
<el-col :span="12"><span class='label'>工单编码:</span><span class='text'>{{ dataForm.code }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12"><span class='label'>产品名称:</span><span class='text'>{{ dataForm.productName }}</span></el-col>
|
||||
<el-col :span="12"><span class='label'>产品规格:</span><span class='text'>{{ dataForm.specifications }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12"><span class='label'>实际生产数量:</span><span class='text'>{{ dataForm.actualQuantity }}</span></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="attr-list">
|
||||
<!-- <el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button> -->
|
||||
<el-table
|
||||
border
|
||||
:data="tableData"
|
||||
:header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266'
|
||||
}"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width='50' align="center" />
|
||||
<el-table-column prop="orderName" label="订单名称" />
|
||||
<el-table-column prop="orderCode" label="订单编码" />
|
||||
<el-table-column prop="priority" label="优先级" />
|
||||
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width='50' align="center" fixed='right'>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
|
||||
<!-- <el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑">
|
||||
<el-button
|
||||
type="text"
|
||||
:style="{color:'#0B58FF'}"
|
||||
size="mini"
|
||||
@click="edit(scope.row)"
|
||||
>
|
||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="edit" />
|
||||
</el-button>
|
||||
</el-tooltip> -->
|
||||
|
||||
<!-- <el-tooltip placement="top" content="删除">
|
||||
<el-button
|
||||
type="text"
|
||||
:style="{color:'#FF5454'}"
|
||||
size="mini"
|
||||
@click="deleteDetail(scope.row)"
|
||||
>
|
||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="table_delete" />
|
||||
</el-button>
|
||||
</el-tooltip> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-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 class="drawer-body__footer">
|
||||
<el-button style="" type="primary" @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>
|
||||
</div>
|
||||
|
||||
<!-- <attr-add
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
:material-id="dataForm.id"
|
||||
@refreshDataList="getList" /> -->
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../core/mixins/basic-add';
|
||||
import { getConOrderList, createConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
|
||||
import SmallTitle from './SmallTitle';
|
||||
// import { parseTime } from '../../core/mixins/code-filter';
|
||||
// import attrAdd from './attr-add';
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
components: { SmallTitle },
|
||||
data() {
|
||||
return {
|
||||
addOrUpdateVisible: false,
|
||||
urlOptions: {
|
||||
infoURL: getCoreWO,
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
},
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
code: undefined,
|
||||
productId: '',
|
||||
remark: undefined,
|
||||
},
|
||||
productList: [],
|
||||
materialAttrList: [],
|
||||
materialList: [],
|
||||
tableData: [],
|
||||
visible: false,
|
||||
isdetail: false,
|
||||
idAttrShow: false
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
initData() {
|
||||
// this.materialAttrList.splice(0);
|
||||
this.listQuery.total = 0;
|
||||
},
|
||||
edit(row) {
|
||||
row.isEdit = true
|
||||
},
|
||||
saveData(row) {
|
||||
if (row.actualAssignmentQuantity) {
|
||||
if (row.id) {
|
||||
// updateMaterialPBDet({
|
||||
// ...row
|
||||
// }).then((response) => {
|
||||
// this.$modal.msgSuccess('修改成功');
|
||||
// // this.visible = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// return;
|
||||
}
|
||||
// 添加的提交
|
||||
createConCoreWOr({
|
||||
...row,
|
||||
workOrderId: this.dataForm.id
|
||||
}).then((response) => {
|
||||
this.$modal.msgSuccess('分配成功');
|
||||
// this.visible = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
this.$message.warning('请填写实际分配数量');
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
// 获取产品Bom详细列表
|
||||
getConOrderList({
|
||||
...this.listQuery,
|
||||
workOrderId: this.dataForm.id
|
||||
}).then((response) => {
|
||||
this.tableData = response.data.map(item => {
|
||||
item.isEdit = false
|
||||
return item
|
||||
});
|
||||
this.listQuery.total = response.data.total;
|
||||
});
|
||||
},
|
||||
// 构造一行
|
||||
// addRow() {
|
||||
// const row = {
|
||||
// bomId: this.dataForm.id,
|
||||
// materialId: '',
|
||||
// num: 0,
|
||||
// materialCode: undefined,
|
||||
// unit: undefined,
|
||||
// remark: '',
|
||||
// isEdit: true
|
||||
// }
|
||||
// this.tableData.push(row)
|
||||
// },
|
||||
init(id, isdetail) {
|
||||
this.initData();
|
||||
this.isdetail = isdetail || false;
|
||||
this.dataForm.id = id || undefined;
|
||||
this.visible = true;
|
||||
// if (id) {
|
||||
// this.idAttrShow = true
|
||||
// } else {
|
||||
// this.idAttrShow = false
|
||||
// }
|
||||
|
||||
this.$nextTick(() => {
|
||||
// this.$refs['dataForm'].resetFields();
|
||||
|
||||
if (this.dataForm.id) {
|
||||
// 获取工单详情
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
this.dataForm = response.data;
|
||||
});
|
||||
// 获取工单订单明细
|
||||
this.getList();
|
||||
} else {}
|
||||
});
|
||||
},
|
||||
goback() {
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
// this.initData();
|
||||
},
|
||||
goEdit() {
|
||||
this.isdetail = false;
|
||||
},
|
||||
// 新增 / 修改
|
||||
addNew(id) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</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: 30vh;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
padding-right: 10px; /* 调整滚动条样式 */
|
||||
}
|
||||
|
||||
.drawer >>> .el-form {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 18px;
|
||||
}
|
||||
.formContainer {
|
||||
.label {
|
||||
display: inline-block;
|
||||
padding: 5px 0px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.text {
|
||||
display: inline-block;
|
||||
padding: 5px 0px;
|
||||
font-size: 14px;
|
||||
color:rgba(102, 102, 102, 0.75);
|
||||
}
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
@ -16,98 +16,58 @@
|
||||
{{ '分配产量' }}
|
||||
</small-title>
|
||||
<div class="content">
|
||||
<div class="formContent">
|
||||
<div class='formContainer'>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">工单名称:{{ dataForm.name }}</el-col>
|
||||
<el-col :span="12">工单编码:{{ dataForm.code }}</el-col>
|
||||
<el-col :span="12"><span class='label'>工单名称:</span><span class='text'>{{ dataForm.name }}</span></el-col>
|
||||
<el-col :span="12"><span class='label'>工单编码:</span><span class='text'>{{ dataForm.code }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">产品名称:{{ dataForm.productName }}</el-col>
|
||||
<el-col :span="12">产品规格:{{ dataForm.specifications }}</el-col>
|
||||
<el-col :span="12"><span class='label'>产品名称:</span><span class='text'>{{ dataForm.productName }}</span></el-col>
|
||||
<el-col :span="12"><span class='label'>产品规格:</span><span class='text'>{{ dataForm.specifications }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">实际生产数量:{{ dataForm.expectedTime }}</el-col>
|
||||
<el-col :span="12"><span class='label'>实际生产数量:</span><span class='text'>{{ dataForm.actualQuantity }}</span></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="attr-list">
|
||||
<!-- <el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button> -->
|
||||
<el-table
|
||||
border
|
||||
:data="tableData"
|
||||
:header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266'
|
||||
}"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" label="序号" />
|
||||
<el-table-column type="index" label="序号" width='50' align="center" />
|
||||
<el-table-column prop="orderName" label="订单名称" />
|
||||
<el-table-column prop="orderCode" label="订单编码" />
|
||||
<el-table-column prop="priority" label="优先级" />
|
||||
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
||||
<el-table-column prop="priority" label="优先级">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
|
||||
{{scope.row.priority == 1 ? '低' : scope.row.priority == 2 ? '正常' : scope.row.priority == 3 ? '高' : ''}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" />
|
||||
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
|
||||
<!-- <el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑">
|
||||
<el-button
|
||||
type="text"
|
||||
:style="{color:'#0B58FF'}"
|
||||
size="mini"
|
||||
@click="edit(scope.row)"
|
||||
>
|
||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="edit" />
|
||||
</el-button>
|
||||
</el-tooltip> -->
|
||||
|
||||
<!-- <el-tooltip placement="top" content="删除">
|
||||
<el-button
|
||||
type="text"
|
||||
:style="{color:'#FF5454'}"
|
||||
size="mini"
|
||||
@click="deleteDetail(scope.row)"
|
||||
>
|
||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="table_delete" />
|
||||
</el-button>
|
||||
</el-tooltip> -->
|
||||
<el-input-number :disabled='isSaved' v-model="scope.row.actualAssignmentQuantity" style='width: 100%;' controls-position="right" :min="0" :max="dataForm.actualQuantity"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-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 class="drawer-body__footer">
|
||||
<el-button style="" type="primary" @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> -->
|
||||
<el-button plain type="primary" @click="goback()">关闭</el-button>
|
||||
<el-button type="primary" @click="saveData()" :disabled='isSaved'>保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <attr-add
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
:material-id="dataForm.id"
|
||||
@refreshDataList="getList" /> -->
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../core/mixins/basic-add';
|
||||
import { getConOrderList, createConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
|
||||
import { getConOrderList, updateBatch, getCoreWO } from '@/api/base/coreWorkOrder';
|
||||
import SmallTitle from './SmallTitle';
|
||||
// import { parseTime } from '../../core/mixins/code-filter';
|
||||
// import attrAdd from './attr-add';
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
@ -118,100 +78,51 @@ export default {
|
||||
urlOptions: {
|
||||
infoURL: getCoreWO,
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
},
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
code: undefined,
|
||||
productId: '',
|
||||
remark: undefined,
|
||||
},
|
||||
productList: [],
|
||||
materialAttrList: [],
|
||||
materialList: [],
|
||||
tableData: [],
|
||||
visible: false,
|
||||
isdetail: false,
|
||||
idAttrShow: false
|
||||
isSaved:false
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
initData() {
|
||||
// this.materialAttrList.splice(0);
|
||||
this.listQuery.total = 0;
|
||||
},
|
||||
edit(row) {
|
||||
row.isEdit = true
|
||||
},
|
||||
saveData(row) {
|
||||
if (row.actualAssignmentQuantity) {
|
||||
if (row.id) {
|
||||
// updateMaterialPBDet({
|
||||
// ...row
|
||||
// }).then((response) => {
|
||||
// this.$modal.msgSuccess('修改成功');
|
||||
// // this.visible = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// return;
|
||||
saveData() {
|
||||
console.log(this.tableData)
|
||||
let sunNum = 0
|
||||
this.tableData.forEach(row => {
|
||||
sunNum+=(row.actualAssignmentQuantity || 0)
|
||||
})
|
||||
if (sunNum > this.dataForm.actualQuantity) {
|
||||
this.$message.warning('各订单实际分配数量之和不能大于实际生产数量');
|
||||
return
|
||||
}
|
||||
// 添加的提交
|
||||
createConCoreWOr({
|
||||
...row,
|
||||
workOrderId: this.dataForm.id
|
||||
}).then((response) => {
|
||||
updateBatch(this.tableData).then((response) => {
|
||||
this.$modal.msgSuccess('分配成功');
|
||||
// this.visible = false;
|
||||
this.getList();
|
||||
this.isSaved = true;
|
||||
});
|
||||
} else {
|
||||
this.$message.warning('请填写实际分配数量');
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
// 获取产品Bom详细列表
|
||||
getConOrderList({
|
||||
...this.listQuery,
|
||||
workOrderId: this.dataForm.id
|
||||
}).then((response) => {
|
||||
this.tableData = response.data.map(item => {
|
||||
item.isEdit = false
|
||||
item.actualAssignmentQuantity = item.actualAssignmentQuantity || 0
|
||||
item.workOrderId = this.dataForm.id
|
||||
return item
|
||||
});
|
||||
this.listQuery.total = response.data.total;
|
||||
});
|
||||
},
|
||||
// 构造一行
|
||||
// addRow() {
|
||||
// const row = {
|
||||
// bomId: this.dataForm.id,
|
||||
// materialId: '',
|
||||
// num: 0,
|
||||
// materialCode: undefined,
|
||||
// unit: undefined,
|
||||
// remark: '',
|
||||
// isEdit: true
|
||||
// }
|
||||
// this.tableData.push(row)
|
||||
// },
|
||||
init(id, isdetail) {
|
||||
this.initData();
|
||||
this.isdetail = isdetail || false;
|
||||
init(id) {
|
||||
this.dataForm.id = id || undefined;
|
||||
this.visible = true;
|
||||
// if (id) {
|
||||
// this.idAttrShow = true
|
||||
// } else {
|
||||
// this.idAttrShow = false
|
||||
// }
|
||||
|
||||
this.isSaved = false;
|
||||
this.$nextTick(() => {
|
||||
// this.$refs['dataForm'].resetFields();
|
||||
|
||||
if (this.dataForm.id) {
|
||||
// 获取工单详情
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
@ -225,17 +136,6 @@ export default {
|
||||
goback() {
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
// this.initData();
|
||||
},
|
||||
goEdit() {
|
||||
this.isdetail = false;
|
||||
},
|
||||
// 新增 / 修改
|
||||
addNew(id) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -279,8 +179,7 @@ export default {
|
||||
padding-right: 10px; /* 调整滚动条样式 */
|
||||
}
|
||||
|
||||
.drawer >>> .el-form,
|
||||
.drawer >>> .attr-list {
|
||||
.drawer >>> .el-form {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
@ -289,10 +188,19 @@ export default {
|
||||
justify-content: flex-end;
|
||||
padding: 18px;
|
||||
}
|
||||
.formContent {
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
.formContainer {
|
||||
.label {
|
||||
display: inline-block;
|
||||
padding: 5px 0px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.text {
|
||||
display: inline-block;
|
||||
padding: 5px 0px;
|
||||
font-size: 14px;
|
||||
color:rgba(102, 102, 102, 0.75);
|
||||
}
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,84 +2,157 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-10-15 16:16:22
|
||||
* @LastEditTime: 2024-12-27 15:34:28
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<!-- <el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
size="50%"> -->
|
||||
|
||||
<div class="status-timegraph-container" style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
|
||||
<el-row v-show="workOrderButton.length !== 0" class="" style="
|
||||
margin-bottom: 4px;
|
||||
border-radius: 8px;
|
||||
">
|
||||
<workOrderNav :id-list="workOrderButton" @getWorkOrderId="getId">
|
||||
</workOrderNav>
|
||||
<div
|
||||
class="status-timegraph-container"
|
||||
style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
|
||||
<el-row
|
||||
v-show="workOrderButton.length !== 0"
|
||||
class=""
|
||||
style="margin-bottom: 4px; border-radius: 8px">
|
||||
<workOrderNav
|
||||
:id-list="workOrderButton"
|
||||
@getWorkOrderId="getId"></workOrderNav>
|
||||
</el-row>
|
||||
<el-row class="" style="
|
||||
<el-row
|
||||
class=""
|
||||
style="
|
||||
height: 1px;
|
||||
flex: .3;
|
||||
flex: 0.3;
|
||||
margin-bottom: 12px;
|
||||
background: #fff;
|
||||
padding: 16px 16px px;
|
||||
padding: 16px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
">
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>工单编码:{{ dataForm.code }}</h1>
|
||||
<h1 class="orderTitle">工单编码:{{ dataForm.code }}</h1>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
style="position: absolute; right: 16px; top: 5px"
|
||||
v-show="workOrderButton.length === 0"
|
||||
@click="goWorkOrderList()">
|
||||
<svg-icon icon-class="return" />
|
||||
返回
|
||||
</el-button>
|
||||
</div>
|
||||
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||
基本信息
|
||||
</small-title>
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">工单名称:{{ dataForm.name }}</el-col>
|
||||
<el-col :span="8">工单来源:{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}}
|
||||
<el-col :span="4">
|
||||
<p class="title">工单名称</p>
|
||||
<p class="text">{{ dataForm.name }}</p>
|
||||
</el-col>
|
||||
<el-col :span="8">所属订单:
|
||||
<span v-for="(item, index) in orderList" :key="index" style="margin-right: 10px">{{ item.orderName
|
||||
}}</span>
|
||||
<el-col :span="4">
|
||||
<p class="title">工单来源</p>
|
||||
<p class="text">
|
||||
{{
|
||||
dataForm.triggerOrigin === 1
|
||||
? 'MES-手动'
|
||||
: dataForm.triggerOrigin === 2
|
||||
? 'MES-订单下发'
|
||||
: dataForm.triggerOrigin === 3
|
||||
? 'ERP'
|
||||
: ''
|
||||
}}
|
||||
</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">产品名称:{{ dataForm.productName }}</el-col>
|
||||
<el-col :span="8">规 格:{{ dataForm.specifications }}</el-col>
|
||||
<el-col :span="8">计划生产数量:{{ dataForm.planQuantity }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">预计用时(小时):{{ dataForm.remainingTime }}</el-col>
|
||||
<el-col :span="8">计划投入数量:{{ dataForm.planAssignQuantity }}</el-col>
|
||||
<el-col :span="8">优先级:{{ fitlerP(dataForm.priority) }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">负责人:{{ dataForm.workers }}</el-col>
|
||||
<el-col :span="8">关联产线:
|
||||
<span v-for="(item, index) in dataForm.productLineNames" :key="index" style="margin-right: 10px">{{ item
|
||||
}}</span>
|
||||
<el-col :span="4">
|
||||
<p class="title">所属订单</p>
|
||||
<p
|
||||
class="text"
|
||||
style="
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
"
|
||||
:title="orderList.map((item) => item.orderName).join(', ')">
|
||||
{{ orderList.map((item) => item.orderName).join(', ') }}
|
||||
</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">产品名称</p>
|
||||
<p class="text">{{ dataForm.productName }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">规 格</p>
|
||||
<p class="text">{{ dataForm.specifications }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">计划生产数量</p>
|
||||
<p class="text">{{ dataForm.planQuantity }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">预计用时(小时)</p>
|
||||
<p class="text">{{ dataForm.remainingTime }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">计划投入数量</p>
|
||||
<p class="text">{{ dataForm.planAssignQuantity }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">优先级</p>
|
||||
<p class="text">{{ fitlerP(dataForm.priority) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">负责人</p>
|
||||
<p class="text">{{ dataForm.workers }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">关联产线</p>
|
||||
<p class="text">
|
||||
<span
|
||||
v-for="(item, index) in dataForm.productLineIds"
|
||||
:key="index"
|
||||
style="margin-right: 10px">
|
||||
{{ item.lineName }}
|
||||
</span>
|
||||
</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">物料计算方式</p>
|
||||
<p class="text">
|
||||
{{
|
||||
dataForm.materialMethod === 1
|
||||
? '产品基础'
|
||||
: dataForm.materialMethod === 2
|
||||
? '工艺扩展'
|
||||
: ''
|
||||
}}
|
||||
</p>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<p class="title">关联工艺</p>
|
||||
<p class="text">
|
||||
<span
|
||||
v-for="(item, index) in dataForm.productLineIds"
|
||||
:key="index"
|
||||
style="margin-right: 10px">
|
||||
{{ item.processFlowName }}
|
||||
</span>
|
||||
</p>
|
||||
</el-col>
|
||||
<el-col :span="8">物料计算方式:{{ dataForm.materialMethod === 1 ? '产品基础' : dataForm.materialMethod === 2 ? '工艺扩展'
|
||||
:
|
||||
'' }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">关联工艺:{{ dataForm.processFlowName }}</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row class="" style="
|
||||
<el-row
|
||||
class=""
|
||||
style="
|
||||
height: 1px;
|
||||
flex: 1;
|
||||
margin-bottom: 12px;
|
||||
padding: 16px;
|
||||
background: #fff;
|
||||
padding: 16px 16px 32px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -88,51 +161,108 @@
|
||||
<el-tab-pane label="生产信息" name="produce">
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">工单创建时间:{{ parseTime(dataForm.createTime) }}</el-col>
|
||||
<el-col :span="8">计划开始时间:{{ parseTime(dataForm.planStartTime) }}</el-col>
|
||||
<el-col :span="8">计划完成时间:{{ parseTime(dataForm.planFinishTime) }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">预计结束时间:{{ parseTime(dataForm.computeFinishTime) }}</el-col>
|
||||
<el-col :span="8">实际开始时间:{{ parseTime(dataForm.startProduceTime) }}</el-col>
|
||||
<el-col :span="8">实际完成时间:{{ parseTime(dataForm.finishProduceTime) }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">工单状态:{{ fitlerS(dataForm.status) }}</el-col>
|
||||
<el-col :span="8">实际投入数量:{{ dataForm.assignQuantity }}</el-col>
|
||||
<el-col :span="8">实际生产数量:{{ dataForm.actualQuantity }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">废片数量:{{ dataForm.nokQuantity }}</el-col>
|
||||
<el-col :span="8">检测瑕疵数:{{ }}</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">工单创建时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.createTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">计划开始时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.planStartTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">计划完成时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.planFinishTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">预计结束时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.expectedFinishTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">实际开始时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.startProduceTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">实际完成时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.finishProduceTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">工单状态</p>
|
||||
<p class="text">{{ fitlerS(dataForm.status) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">实际投入数量</p>
|
||||
<p class="text">{{ dataForm.assignQuantity }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">实际生产数量</p>
|
||||
<p class="text">{{ dataForm.actualQuantity }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">废片数量</p>
|
||||
<p class="text">{{ dataForm.nokQuantity }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">检测瑕疵数</p>
|
||||
<p class="text">{{ dataForm.unpassCheckNum }}</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="订单信息" name="order">
|
||||
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize" :table-data="orderList">
|
||||
<method-btn v-if="!isdetail" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||
<base-table
|
||||
:max-height="tableH"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="orderList">
|
||||
<method-btn
|
||||
v-if="!isdetail"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="预计用料信息" name="material">
|
||||
<base-table :max-height="tableH" :table-props="tableProps1" :page="listQuery1.pageNo"
|
||||
:limit="listQuery1.pageSize" :table-data="materialList" />
|
||||
<el-tab-pane label="预计用料" name="material">
|
||||
<base-table
|
||||
:max-height="tableH"
|
||||
:table-props="tableProps1"
|
||||
:page="listQuery1.pageNo"
|
||||
:limit="listQuery1.pageSize"
|
||||
:table-data="materialList" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="质量信息" name="quality">
|
||||
<base-table :max-height="tableH" :table-props="tablePropsQuality" :table-data="qualityList" :page="1"
|
||||
<span style="font-size: 14px;">该工单未通过检测数合计:{{ allSumScrap }}</span>
|
||||
<base-table
|
||||
:max-height="tableH"
|
||||
:table-props="tablePropsQuality"
|
||||
:table-data="qualityList"
|
||||
:page="1"
|
||||
:limit="10" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="能源信息" name="energy">
|
||||
<div class="toggleTabBox">
|
||||
<div :class="{ active: activeModule === 'dataList' }" @click="toggleTab('dataList')">数据列表</div>
|
||||
<div :class="{ active: activeModule === 'barChart' }" @click="toggleTab('barChart')">柱状图</div>
|
||||
<div
|
||||
:class="{ active: activeModule === 'dataList' }"
|
||||
@click="toggleTab('dataList')">
|
||||
数据列表
|
||||
</div>
|
||||
<div
|
||||
:class="{ active: activeModule === 'barChart' }"
|
||||
@click="toggleTab('barChart')">
|
||||
柱状图
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div v-show="activeModule === 'dataList'">
|
||||
<!-- 表格 -->
|
||||
<base-table :max-height="tableH" :table-props="tablePropsEnergy" :page="listQueryEnergy.pageNo"
|
||||
:limit="listQueryEnergy.pageSize" :table-data="energyList" />
|
||||
<base-table
|
||||
:max-height="tableH"
|
||||
:table-props="tablePropsEnergy"
|
||||
:page="listQueryEnergy.pageNo"
|
||||
:limit="listQueryEnergy.pageSize"
|
||||
:table-data="energyList" />
|
||||
</div>
|
||||
<!-- 图形 -->
|
||||
<div v-show="activeModule === 'barChart'">
|
||||
@ -141,7 +271,6 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</el-row>
|
||||
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
@ -157,19 +286,23 @@
|
||||
|
||||
<script>
|
||||
// import basicAdd from '../../core/mixins/basic-add';
|
||||
import { getCoreWO, getMaterialBomPage, getConOrderList, getCoreWOListById,getMaterialCostWorkOrder } from "@/api/base/coreWorkOrder";
|
||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||
import { getOrderEnergyData } from "@/api/monitoring/orderEnergy";
|
||||
// import { orderList } from "@/api/base/orderManage";
|
||||
import {
|
||||
getStatisticalDataPage,
|
||||
} from '@/api/monitoring/statisticalData';
|
||||
import { getProcessFlowList } from '@/api/base/orderManage'
|
||||
getCoreWO,
|
||||
getMaterialBomPage,
|
||||
getConOrderList,
|
||||
getCoreWOListById,
|
||||
getMaterialCostWorkOrder,
|
||||
} from '@/api/base/coreWorkOrder';
|
||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||
import { getOrderEnergyData } from '@/api/monitoring/orderEnergy';
|
||||
// import { orderList } from "@/api/base/orderManage";
|
||||
import { getStatisticalDataPage } from '@/api/monitoring/statisticalData';
|
||||
import { getProcessFlowList } from '@/api/base/orderManage';
|
||||
import SmallTitle from './SmallTitle';
|
||||
import { publicFormatter } from "@/utils/dict";
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
import workOrderNav from './workOrderNav.vue'
|
||||
import BarChart from "./barChart"
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
import workOrderNav from './workOrderNav.vue';
|
||||
import BarChart from './barChart';
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
@ -189,11 +322,6 @@ const tableProps = [
|
||||
prop: 'orderCode',
|
||||
label: '订单编码',
|
||||
},
|
||||
{
|
||||
prop: 'priority',
|
||||
label: '优先级',
|
||||
filter: (val) => ['', '低', '正常', '高'][val]
|
||||
},
|
||||
{
|
||||
prop: 'planAssignmentQuantity',
|
||||
label: '计划分配数量',
|
||||
@ -201,28 +329,28 @@ const tableProps = [
|
||||
{
|
||||
prop: 'actualAssignmentQuantity',
|
||||
label: '实际分配数量',
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
const tableProps1 = [
|
||||
{
|
||||
prop: 'materialName',
|
||||
label: '物料名称'
|
||||
label: '物料名称',
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
label: '单位',
|
||||
filter: publicFormatter('unit_dict')
|
||||
filter: publicFormatter('unit_dict'),
|
||||
},
|
||||
{
|
||||
prop: 'remainingNum',
|
||||
label: '剩余生产预计消耗'
|
||||
label: '剩余生产预计消耗',
|
||||
},
|
||||
];
|
||||
const tablePropsEnergy = [
|
||||
{
|
||||
prop: 'objName',
|
||||
label: '对象名称'
|
||||
label: '对象名称',
|
||||
},
|
||||
{
|
||||
prop: 'objCode',
|
||||
@ -241,11 +369,11 @@ const tablePropsEnergy = [
|
||||
},
|
||||
{
|
||||
prop: 'endNum',
|
||||
label: '工单结束值/当前值'
|
||||
label: '工单结束值/当前值',
|
||||
},
|
||||
{
|
||||
prop: 'useNum',
|
||||
label: '使用量'
|
||||
label: '使用量',
|
||||
},
|
||||
];
|
||||
export default {
|
||||
@ -254,16 +382,16 @@ export default {
|
||||
computed: {
|
||||
tablePropsQuality() {
|
||||
return [
|
||||
{
|
||||
// width: 128,
|
||||
prop: 'workOrderName',
|
||||
label: '工单名称',
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
prop: 'productionName',
|
||||
label: '产品',
|
||||
},
|
||||
// {
|
||||
// // width: 128,
|
||||
// prop: 'workOrderName',
|
||||
// label: '工单名称',
|
||||
// },
|
||||
// {
|
||||
// // width: 128,
|
||||
// prop: 'productionName',
|
||||
// label: '产品',
|
||||
// },
|
||||
{
|
||||
// width: 160,
|
||||
prop: 'inspectionContent',
|
||||
@ -273,7 +401,7 @@ export default {
|
||||
{
|
||||
// width: 128,
|
||||
prop: 'sumScrap',
|
||||
label: '未检测总数',
|
||||
label: '未通过检测总数',
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
@ -316,8 +444,9 @@ export default {
|
||||
workOrderId: undefined,
|
||||
addOrUpdateVisible: false,
|
||||
urlOptions: {
|
||||
infoURL: getCoreWO
|
||||
infoURL: getCoreWO,
|
||||
},
|
||||
allSumScrap: 0,
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
@ -345,41 +474,47 @@ export default {
|
||||
visible: false,
|
||||
isdetail: false,
|
||||
workOrderButton: [],
|
||||
processFlowList: []
|
||||
processFlowList: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
workOrderId(newValue, oldValue) {
|
||||
this.activeName = 'produce'
|
||||
this.init(newValue)
|
||||
this.dataForm.id = newValue
|
||||
}
|
||||
this.activeName = 'produce';
|
||||
this.init(newValue);
|
||||
this.dataForm.id = newValue;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
this.getDict();
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.woIdString && this.$route.query.woIdString !== 'undefined') {
|
||||
const idList = this.$route.query.woIdString.split(',')
|
||||
if (
|
||||
this.$route.query.woIdString &&
|
||||
this.$route.query.woIdString !== 'undefined'
|
||||
) {
|
||||
const idList = this.$route.query.woIdString.split(',');
|
||||
console.log(idList);
|
||||
|
||||
getCoreWOListById(idList).then(res => {
|
||||
this.workOrderButton = res.data.map(work => {
|
||||
getCoreWOListById(idList).then((res) => {
|
||||
this.workOrderButton = res.data.map((work) => {
|
||||
return {
|
||||
id: work.id,
|
||||
name: work.name
|
||||
}
|
||||
})
|
||||
// console.log(this.workOrderButton);
|
||||
this.init(this.workOrderButton[0].id, true)
|
||||
})
|
||||
name: work.name,
|
||||
};
|
||||
});
|
||||
console.log('this.workOrderButton======', this.workOrderButton);
|
||||
this.init(this.workOrderButton[0].id, true);
|
||||
});
|
||||
} else {
|
||||
this.init(this.$route.query.id, true)
|
||||
this.init(this.$route.query.id, true);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goWorkOrderList() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
getId(val) {
|
||||
this.workOrderId = val
|
||||
this.workOrderId = val;
|
||||
},
|
||||
async switchTab(val) {
|
||||
if (this.activeName === 'order') {
|
||||
@ -400,26 +535,27 @@ export default {
|
||||
getOrderEnergyData({
|
||||
workOrderId: this.dataForm.id,
|
||||
}).then((response) => {
|
||||
this.energyList = response.data
|
||||
this.chartData = response.data
|
||||
this.energyList = response.data;
|
||||
this.chartData = response.data;
|
||||
// this.listQuery.total = response.data.total;
|
||||
});
|
||||
} else if (this.activeName === 'quality') {
|
||||
this.allSumScrap = 0
|
||||
const {
|
||||
data: { data, otherList, otherMap, nameData },
|
||||
} = await getStatisticalDataPage({
|
||||
workOrderIdList:[this.dataForm,id]
|
||||
})
|
||||
workOrderId:this.dataForm.id
|
||||
});
|
||||
// console.log(this.queryParams);
|
||||
this.dynamicProps = this.filterNameData(nameData)
|
||||
this.dynamicProps = this.filterNameData(nameData);
|
||||
this.qualityList = this.filterData(data);
|
||||
}
|
||||
},
|
||||
getDict() {
|
||||
// 工艺
|
||||
getProcessFlowList().then(res => {
|
||||
this.processFlowList = res.data || []
|
||||
})
|
||||
getProcessFlowList().then((res) => {
|
||||
this.processFlowList = res.data || [];
|
||||
});
|
||||
},
|
||||
filterNameData(nameData) {
|
||||
const ndSet = new Set();
|
||||
@ -440,12 +576,14 @@ export default {
|
||||
innerData.map((d) => {
|
||||
keyValuePairs[d.dynamicName] = d.dynamicValue;
|
||||
});
|
||||
this.allSumScrap +=item.sumScrap
|
||||
return {
|
||||
inspectionContent: item.inspectionContent,
|
||||
...keyValuePairs,
|
||||
sumInput: item.sumInput,
|
||||
sumScrap: item.sumScrap,
|
||||
productionName: item.productionName,
|
||||
workOrderId: item.workOrderId,
|
||||
workOrderName: item.workOrderName,
|
||||
scrapRatio: item.scrapRatio,
|
||||
};
|
||||
});
|
||||
@ -453,26 +591,26 @@ export default {
|
||||
fitlerP(val) {
|
||||
if (val) {
|
||||
if (val === 1) {
|
||||
return '低'
|
||||
return '低';
|
||||
} else if (val === 2) {
|
||||
return '正常'
|
||||
return '正常';
|
||||
} else {
|
||||
return '高'
|
||||
return '高';
|
||||
}
|
||||
}
|
||||
},
|
||||
fitlerS(val) {
|
||||
if (val) {
|
||||
if (val === 1) {
|
||||
return '等待'
|
||||
return '等待';
|
||||
} else if (val === 2) {
|
||||
return '激活'
|
||||
return '激活';
|
||||
} else if (val === 3) {
|
||||
return '暂停'
|
||||
return '暂停';
|
||||
} else if (val === 4) {
|
||||
return '完成'
|
||||
return '完成';
|
||||
} else {
|
||||
return '作废'
|
||||
return '作废';
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -513,11 +651,11 @@ export default {
|
||||
}
|
||||
},
|
||||
toggleTab(val) {
|
||||
this.activeModule = val
|
||||
this.activeModule = val;
|
||||
if (this.activeModule === 'barChart') {
|
||||
this.$nextTick((res) => {
|
||||
this.$refs.orderEnergyChart.getChart()
|
||||
})
|
||||
this.$refs.orderEnergyChart.getChart();
|
||||
});
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
@ -532,11 +670,12 @@ export default {
|
||||
// });
|
||||
// }
|
||||
// 获取订单相关信息
|
||||
// orderList({
|
||||
// workOrderId: this.dataForm.id
|
||||
// }).then((response) => {
|
||||
// this.orderArray = response.data;
|
||||
// });
|
||||
getConOrderList({
|
||||
workOrderId: this.dataForm.id,
|
||||
}).then((response) => {
|
||||
this.orderList = response.data;
|
||||
// this.listQuery.total = response.data.total;
|
||||
});
|
||||
},
|
||||
init(id, isdetail) {
|
||||
this.initData();
|
||||
@ -545,25 +684,27 @@ export default {
|
||||
this.visible = true;
|
||||
|
||||
this.$nextTick(() => {
|
||||
|
||||
if (this.dataForm.id) {
|
||||
// 获取工单详情
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
this.dataForm = response.data
|
||||
this.urlOptions.infoURL(id).then((response) => {
|
||||
this.dataForm = response.data;
|
||||
// 工艺名称
|
||||
if (this.dataForm.processFlowId) {
|
||||
this.processFlowList.filter(item => {
|
||||
if (item.id === this.dataForm.processFlowId) {
|
||||
this.dataForm.processFlowName = item.name
|
||||
if (this.dataForm.productLineIds.length>0) {
|
||||
console.log(this.processFlowList)
|
||||
this.dataForm.productLineIds.forEach(item=>{
|
||||
this.processFlowList.filter(item1 => {
|
||||
if (item1.id === item.processId) {
|
||||
item.processFlowName = item1.name
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
// 获取订单列表和用料列表
|
||||
// this.getList();
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
this.getCode()
|
||||
this.getCode();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -577,64 +718,27 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" 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: 10px 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;
|
||||
.orderTitle {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.formContent {
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
.title {
|
||||
font-weight: 600;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
margin: 0px;
|
||||
}
|
||||
.text {
|
||||
height: 20px;
|
||||
color: rgba(102, 102, 102, 0.75);
|
||||
margin: 10px 0px;
|
||||
}
|
||||
}
|
||||
.action_btn {
|
||||
float: right;
|
||||
@ -663,7 +767,7 @@ export default {
|
||||
|
||||
.active {
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
border-bottom-color: #0B58FF;
|
||||
border-bottom-color: #0b58ff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -130,17 +130,7 @@ export default {
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 4
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -315,7 +305,14 @@ export default {
|
||||
{
|
||||
prop: 'status',
|
||||
label: '工单状态',
|
||||
filter: (val) => ['', '等待', '激活', '暂停', '完成', '', '', '', '', '作废'][val]
|
||||
filter: (val) => ['', '等待', '激活', '暂停', '完成', '作废', '终止', '', '', ''][val]
|
||||
},
|
||||
{
|
||||
prop: 'startProduceTime',
|
||||
label: '实际开始时间',
|
||||
filter: parseTime,
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'planFinishTime',
|
||||
@ -362,20 +359,20 @@ export default {
|
||||
})
|
||||
},
|
||||
refreshWorkOrder(val) {
|
||||
console.log(val)
|
||||
if (val) {
|
||||
// 预使用原料信息
|
||||
console.log('预使用原料信息')
|
||||
this.handleCancel()
|
||||
this.getDataList()
|
||||
this.materialVisible = true;
|
||||
this.addOrEditTitle = "预使用主原料信息";
|
||||
this.$nextTick(() => {
|
||||
this.$refs.material.init(val, true);
|
||||
});
|
||||
} else {
|
||||
// if (val) {
|
||||
// // 预使用原料信息
|
||||
// console.log('预使用原料信息')
|
||||
// this.handleCancel()
|
||||
// this.getDataList()
|
||||
// this.materialVisible = true;
|
||||
// this.addOrEditTitle = "预使用主原料信息";
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.material.init(val, true);
|
||||
// });
|
||||
// } else {
|
||||
// this.successSubmit()
|
||||
// }
|
||||
this.successSubmit()
|
||||
}
|
||||
},
|
||||
closeDetail() {
|
||||
this.detailVisible = false
|
||||
@ -417,7 +414,7 @@ export default {
|
||||
opration = '暂停'
|
||||
}
|
||||
if (val.type === 'nullify') {
|
||||
param.status = 9
|
||||
param.status = 5
|
||||
opration = '报废'
|
||||
}
|
||||
if (val.type === 'finish') {
|
||||
@ -475,7 +472,6 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.name = val.name ? val.name : undefined;
|
||||
this.listQuery.status = val.status ? val.status : undefined;
|
||||
this.listQuery.startProduceTime = val.time ? val.time : undefined
|
||||
@ -484,7 +480,6 @@ export default {
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
|
@ -1,23 +1,20 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-09-09 15:39:08
|
||||
* @LastEditTime: 2024-09-11 10:25:54
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-11-18 16:43:54
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div class="button-nav">
|
||||
<!-- <div class="text-carousel"> -->
|
||||
<el-button style="flex: .1" type="text" @click="prevText" icon="el-icon-caret-left"></el-button>
|
||||
<button @click="handleChange(item.id)" v-for="(item,index) in idList" :key="item.id"
|
||||
<el-button class='btn' style="flex: .1" type="text" @click="prevText" icon="el-icon-caret-left"></el-button>
|
||||
<button class='tap-btn' @click="handleChange(item.id)" v-for="(item,index) in idList" :key="item.id"
|
||||
:class="[item.id === currentMenu ? 'active' : '']">{{ item.name }}
|
||||
</button>
|
||||
<el-button style="flex: .1" type="text" @click="nextText" icon="el-icon-caret-right"></el-button>
|
||||
<button style="flex: .2;display: inline-block;" @click="goback()">
|
||||
<svg-icon style="width: 20px; height: 20px" :icon-class=" 'back' " />
|
||||
<span>返回</span>
|
||||
</button>
|
||||
<el-button class='btn' style="flex: .1" type="text" @click="nextText" icon="el-icon-caret-right"></el-button>
|
||||
<el-button type="primary" plain style="flex: .2;margin-left: 0px;" @click="goback()"><svg-icon icon-class="return" />返回</el-button>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
@ -84,16 +81,19 @@ export default {
|
||||
<style scoped lang="scss">
|
||||
.button-nav {
|
||||
width: 100%;
|
||||
padding: 12px 0;
|
||||
padding-bottom:5px;
|
||||
display: flex;
|
||||
// justify-content: space-around;
|
||||
gap: 12px;
|
||||
|
||||
* {
|
||||
user-select: none;
|
||||
}
|
||||
.btn {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
button {
|
||||
.tap-btn {
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
appearance: none;
|
||||
outline: none;
|
||||
@ -102,7 +102,7 @@ export default {
|
||||
border-radius: 8px;
|
||||
border-bottom-left-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
padding: 20px;
|
||||
height: 40px;
|
||||
color: #888;
|
||||
letter-spacing: 2px;
|
||||
flex: 1;
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
@ -51,11 +50,9 @@ import codeFilter from '@/mixins/code-filter';
|
||||
import {
|
||||
deleteWarehouseArea,
|
||||
getWarehouseAreaPage,
|
||||
getWarehouseAreaListAll
|
||||
} from "@/api/warehouse/warehouse-area-setup";
|
||||
import {
|
||||
getWarehouseList
|
||||
} from "@/api/warehouse/warehouse-setup";
|
||||
getWarehouseAreaListAll,
|
||||
} from '@/api/warehouse/warehouse-area-setup';
|
||||
import { getWarehouseList } from '@/api/warehouse/warehouse-setup';
|
||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||
|
||||
const tableProps = [
|
||||
@ -129,7 +126,9 @@ export default {
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('warehouse:warehouse-area-setup:create') ? 'button' : '',
|
||||
type: this.$auth.hasPermi('warehouse:warehouse-area-setup:create')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
@ -180,6 +179,22 @@ export default {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
getWarehouseAreaListAll().then((response) => { //刷新搜索框库区
|
||||
this.formConfig[1].selectOptions = response.data;
|
||||
});
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
if (response.hasOwnProperty('data')) {
|
||||
this.tableData = response.data.list;
|
||||
this.listQuery.total = response.data.total;
|
||||
} else {
|
||||
this.tableData = []
|
||||
}
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 13:52:10
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-08-21 10:26:21
|
||||
* @LastEditTime: 2024-12-16 16:30:12
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -204,13 +204,17 @@ export default {
|
||||
},
|
||||
created() {
|
||||
getWarehouseList().then((response) => {
|
||||
this.warehouseArr = response.data;
|
||||
this.warehouseArr = response.data.filter((item) =>
|
||||
item.type === 1
|
||||
);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getAreaList() {
|
||||
getWarehouseAreaList(this.dataForm.warehouseId).then((response) => {
|
||||
this.areaArr = response.data;
|
||||
this.dataForm.areaId = null
|
||||
this.dataForm.areaType = null
|
||||
if (this.areaArr.length === 0) {
|
||||
this.$message('该仓库下暂无库区');
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2024-08-02 16:26:58
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-08-08 16:38:53
|
||||
* @LastEditTime: 2024-12-19 14:15:06
|
||||
* @Description:,
|
||||
-->
|
||||
<template>
|
||||
@ -103,7 +103,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
getUserProfile().then((response) => {
|
||||
this.dataForm.operator = response.data.username;
|
||||
this.dataForm.operator = response.data.nickname;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
@ -67,6 +67,14 @@ const tableProps = [
|
||||
prop: 'warehouseName',
|
||||
label: '仓库名称',
|
||||
},
|
||||
{
|
||||
prop: 'areaName',
|
||||
label: '库区名称',
|
||||
},
|
||||
{
|
||||
prop: 'areaType',
|
||||
label: '库区类型',
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '库位名称',
|
||||
@ -95,6 +103,10 @@ const tableProps = [
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'goodsName',
|
||||
label: '物品名称',
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
|
@ -18,7 +18,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="90"
|
||||
label="库位详情"
|
||||
label="详情"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
@ -70,10 +70,12 @@ const tableProps = [
|
||||
{
|
||||
prop: 'oldCode',
|
||||
label: '源库位编码',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'palletCode',
|
||||
label: '移动托盘编码',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'goodName',
|
||||
|
Loading…
Reference in New Issue
Block a user