master
吴普建 10 months ago
parent e896a44089
commit f551d5ef00

@ -23,6 +23,7 @@ declare namespace planWorkOrder {
specification: string | null; // 产品规格 specification: string | null; // 产品规格
measureId: number | null; measureId: number | null;
measureName: string | null; measureName: string | null;
attr3: string | null;
onlyReadWeight: string | number | null; // 只读数量 onlyReadWeight: string | number | null; // 只读数量
residueWeight: string | number | null; // 剩余数量 residueWeight: string | number | null; // 剩余数量
productId: string | null; productId: string | null;
@ -44,6 +45,7 @@ declare namespace planWorkOrder {
endDate?: string | null; // 交付时间 endDate?: string | null; // 交付时间
status: string | null; // 状态 status: string | null; // 状态
taskStatus?: string | null; // 状态 taskStatus?: string | null; // 状态
workgroupId?: string | null; // 状态
productSpecification: string | null; // 规格 productSpecification: string | null; // 规格
wiredrawingSchedulingWeight: number | null; // 拉丝排产数量 wiredrawingSchedulingWeight: number | null; // 拉丝排产数量
enamellingSchedulingWeight: number | null; // 漆包排产数量 enamellingSchedulingWeight: number | null; // 漆包排产数量

@ -111,16 +111,39 @@
</n-form> </n-form>
</template> </template>
</my-dialog> </my-dialog>
<my-dialog
v-model:show="detail"
sub-text="关闭"
width="800px"
title="工单明细"
:show-cancel="false"
@cancel="closeDetail"
@submit="closeDetail"
>
<template #content>
<div>
<n-data-table
class="w-760px"
:loading="detailLoading"
:columns="columns2"
:data="rowsData2"
></n-data-table>
</div>
</template>
</my-dialog>
</div> </div>
</template> </template>
<script setup lang="tsx"> <script setup lang="tsx">
import {getWorkgroupAll} from "@/service/api/md/workgroup";
defineOptions({ defineOptions({
name: 'DrawingWorkOrder' name: 'DrawingWorkOrder'
}); });
import type { Ref } from 'vue'; import {h, Ref} from 'vue';
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import type { DataTableColumns, FormInst } from 'naive-ui'; import {DataTableColumns, FormInst, NDatePicker, NSelect} from 'naive-ui';
import { useDialog, useMessage } from 'naive-ui'; import { useDialog, useMessage } from 'naive-ui';
import { createRequiredFormRule } from '@/utils'; import { createRequiredFormRule } from '@/utils';
import { getWorkbenchWiredrawingList } from '@/service/api/md/workbench/wiredrawing'; import { getWorkbenchWiredrawingList } from '@/service/api/md/workbench/wiredrawing';
@ -326,6 +349,10 @@ const columns: Ref<DataTableColumns<drawingWorkOrder.tabelList>> = ref([
<n-button size="small" type="error" v-show={row.status === '1'} onClick={() => completeWorkOrder(row.id)}> <n-button size="small" type="error" v-show={row.status === '1'} onClick={() => completeWorkOrder(row.id)}>
工单完工 工单完工
</n-button> </n-button>
<n-button size={'tiny'} type="info" onClick={() => handleView(row)}>
<icon-tdesign-send class="mr-2px text-15px " />
查看明细
</n-button>
</n-space> </n-space>
); );
} }
@ -384,7 +411,12 @@ function submitUpdate() {
} }
}); });
} }
const options = [
{ label: '未开始', value: '0' },
{ label: '排产中', value: '1' },
];
const groupOptions = ref<any[]>([]);
function submitUpdateInit(msg: string) { function submitUpdateInit(msg: string) {
message.success(msg); message.success(msg);
showDialog.value = false; showDialog.value = false;
@ -393,58 +425,74 @@ function submitUpdateInit(msg: string) {
formModelData.value.equipmentList = []; formModelData.value.equipmentList = [];
} }
// function updateEquipmentCode(row: drawingWorkOrder.tabelList, type: number) { const rowsData2 = ref<any>([]);
// actionType.value = type; const detailLoading = ref<boolean>(false);
// machineList.value = []; const detail = ref<boolean>(false);
// showDialog.value = true; const showPasModal = ref<boolean>(false);
// rowDetail.value = JSON.parse(JSON.stringify(row)); function closeDetail() {
// const equipmentList = rowDetail.value.equipmentId.split(','); detail.value = false;
// formModelData.value.equipmentList = []; }
// equipmentList.forEach(item => { function handleView(row: any) {
// formModelData.value.equipmentList.push(Number(item)); detail.value = true;
// }); if (row.attr3) {
// if (type === 0) { rowsData2.value = JSON.parse(row.attr3)
// machineListAll.value.forEach(item => { }else{
// machineList.value.push({ rowsData2.value = []
// label: item.label, }
// value: item.value
// });
// });
// } else {
// const equipmentCodeList = rowDetail.value.equipmentCode.split(',');
// equipmentCodeList.forEach((item, index) => {
// machineList.value.push({
// label: item,
// value: Number(equipmentList[index])
// });
// });
// }
// }
// const sleep = row => detailLoading.value = false;
// new Promise(resolve => { }
// const formValue = { const columns2: Ref<DataTableColumns<planWorkOrder.planWorkOrderList>> = ref([
// model: row.model, {
// spec: row.specification, title: '序号',
// quantity: row.discNumber, key: 'index',
// lsDeviceId: null, align: 'center',
// qbDeviceId: row.enamellingEquipmentId, width: 60,
// moldAfterSpec: row.specification, },
// startTime: row.startTime, {
// endTime: row.endTime, title: '工序名称',
// remark: row.remark, key: 'routeName',
// orderDate: formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'), width: 100,
// moldId: null, ellipsis: {
// moldBeforSpec: '' tooltip: true
// // moldAfterSpec: row.specification }
// }; },
// console.log('formValue ==> ', formValue); {
title: '任务状态',
key: 'taskStatus',
width: 130,
render: row => {
return '未开始';
}
},
{
title: '班组信息',
key: 'workgroupId',
width: 180,
render: row => {
let group = groupOptions.value.find(item => item.value == row.workgroupId)
if (group) {
return group.label
}
}
},
{
title: '计划开始日期',
key: 'startDate',
width: 180,
},
{
title: '计划结束日期',
key: 'endDate',
width: 180,
},
{
title: '交付时间',
key: 'payTime',
width: 120
}
]);
// return
// addMoldGaugeList(formValue).then(res => {
// resolve(res);
// });
// });
function sleep2(id: number): any { function sleep2(id: number): any {
return new Promise(resolve => { return new Promise(resolve => {
@ -552,6 +600,17 @@ function getList() {
function init() { function init() {
startLoading(); startLoading();
getWorkgroupAll().then(res => {
if (res.code === 200) {
groupOptions.value = [];
res.data.forEach((item: any) => {
groupOptions.value.push({
label: item.workgroupName,
value: item.id
});
});
}
});
getWiredrawingWorkorder({ ...searchForm.value }).then(res => { getWiredrawingWorkorder({ ...searchForm.value }).then(res => {
if (res.code === 200) { if (res.code === 200) {
searchForm.value.total = res.total; searchForm.value.total = res.total;

@ -331,10 +331,33 @@
</div> </div>
</template> </template>
</my-dialog> </my-dialog>
<my-dialog
v-model:show="detail"
sub-text="关闭"
width="800px"
title="工单明细"
:show-cancel="false"
@cancel="closeDetail"
@submit="closeDetail"
>
<template #content>
<div>
<n-data-table
class="w-760px"
:loading="detailLoading"
:columns="columns2"
:data="rowsData2"
></n-data-table>
</div>
</template>
</my-dialog>
</div> </div>
</template> </template>
<script setup lang="tsx"> <script setup lang="tsx">
import {getWorkgroupAll} from "@/service/api/md/workgroup";
defineOptions({ defineOptions({
name: 'PaintJobOrder' name: 'PaintJobOrder'
}); });
@ -656,6 +679,10 @@ const columns: Ref<DataTableColumns<paintJobOrder.tabelList>> = ref([
> >
作废 作废
</n-button> </n-button>
<n-button size={'tiny'} type="info" onClick={() => handleView(row)}>
<icon-tdesign-send className="mr-2px text-15px "/>
查看明细
</n-button>
</div> </div>
); );
} }
@ -737,6 +764,77 @@ const detailColumns: Ref<DataTableColumns<paintJobOrder.tabelList>> = ref([
} }
]); ]);
const rowsData2 = ref<any>([]);
const detailLoading = ref<boolean>(false);
const detail = ref<boolean>(false);
const showPasModal = ref<boolean>(false);
function closeDetail() {
detail.value = false;
}
const groupOptions = ref<any[]>([]);
function handleView(row: any) {
detail.value = true;
if (row.attr3) {
rowsData2.value = JSON.parse(row.attr3)
}else{
rowsData2.value = []
}
detailLoading.value = false;
}
const columns2: Ref<DataTableColumns<planWorkOrder.planWorkOrderList>> = ref([
{
title: '序号',
key: 'index',
align: 'center',
width: 60,
},
{
title: '工序名称',
key: 'routeName',
width: 100,
ellipsis: {
tooltip: true
}
},
{
title: '任务状态',
key: 'taskStatus',
width: 130,
render: row => {
return '未开始';
}
},
{
title: '班组信息',
key: 'workgroupId',
width: 180,
render: row => {
let group = groupOptions.value.find(item => item.value == row.workgroupId)
if (group) {
return group.label
}
}
},
{
title: '计划开始日期',
key: 'startDate',
width: 180,
},
{
title: '计划结束日期',
key: 'endDate',
width: 180,
},
{
title: '交付时间',
key: 'payTime',
width: 120
}
]);
function completeWorkOrder(id: number) { function completeWorkOrder(id: number) {
const d = dialog.warning({ const d = dialog.warning({
title: '提示', title: '提示',
@ -975,6 +1073,18 @@ function getList() {
function init() { function init() {
startLoading(); startLoading();
getWorkgroupAll().then(res => {
if (res.code === 200) {
groupOptions.value = [];
res.data.forEach((item: any) => {
groupOptions.value.push({
label: item.workgroupName,
value: item.id
});
});
}
});
getEnamellingWorkorderList({ ...searchForm.value }).then(res => { getEnamellingWorkorderList({ ...searchForm.value }).then(res => {
if (res.code === 200) { if (res.code === 200) {
searchForm.value.total = res.total; searchForm.value.total = res.total;

@ -536,14 +536,26 @@ const columns2: Ref<DataTableColumns<planWorkOrder.planWorkOrderList>> = ref([
key: 'startDate', key: 'startDate',
width: 180, width: 180,
render(row, index) { render(row, index) {
return h(NDatePicker, { // return h(NDatePicker, {
value: row.startDate, // value: row.startDate,
type: 'date', // type: 'date',
format: 'yyyy-MM-dd', // format: 'yyyy-MM-dd',
onUpdateValue(v) { // onUpdateValue(v) {
rowsData2.value[index].startDate = v // rowsData2.value[index].startDate = v
// }
// })
return h(
NDatePicker,
{
class:"w_140 in_block",
type:"date",
placeholder:"计划开始日期",
"format":"yyyy-MM-dd",
onUpdateFormattedValue:(e)=>{
rowsData2.value[index].startDate = e
} }
}) }
)
} }
}, },
{ {
@ -551,14 +563,26 @@ const columns2: Ref<DataTableColumns<planWorkOrder.planWorkOrderList>> = ref([
key: 'endDate', key: 'endDate',
width: 180, width: 180,
render(row, index) { render(row, index) {
return h(NDatePicker, { // return h(NDatePicker, {
value: row.endDate, // value: row.endDate,
type: 'date', // type: 'date',
format: 'yyyy-MM-dd', // format: 'yyyy-MM-dd',
onUpdateValue(v) { // onUpdateValue(v) {
rowsData2.value[index].endDate = v // rowsData2.value[index].endDate = v
// }
// })
return h(
NDatePicker,
{
class:"w_140 in_block",
type:"date",
placeholder:"计划结束日期",
"format":"yyyy-MM-dd",
onUpdateFormattedValue:(e)=>{
rowsData2.value[index].endDate = e
} }
}) }
)
} }
}, },
{ {
@ -652,6 +676,7 @@ const formModel = ref<planWorkOrder.FormModel>({
customerName: null, // customerName: null, //
workorderCode: null, // workorderCode: null, //
workorderId: null, workorderId: null,
attr3: null,
model: null, // model: null, //
specification: null, // specification: null, //
measureId: null, measureId: null,
@ -812,6 +837,7 @@ function submitRepetitiom(submitForModel: any, obj: any, func: any) {
// if (!isInteter(obj.value.wireDiscNumber, '线')) return; // if (!isInteter(obj.value.wireDiscNumber, '线')) return;
// if (!isInteter(obj.value.discNumber, '')) return; // if (!isInteter(obj.value.discNumber, '')) return;
isRequestAccomplish.value = false; isRequestAccomplish.value = false;
formModel.value.attr3 = JSON.stringify(rowsData2.value);
console.log('obj.value ==> ', obj.value) console.log('obj.value ==> ', obj.value)
console.log('formModel.value ==> ', formModel.value) console.log('formModel.value ==> ', formModel.value)
const res = await func({ ...obj.value, ...formModel.value }); const res = await func({ ...obj.value, ...formModel.value });

@ -804,16 +804,20 @@ const columns: Ref<DataTableColumns<Procure.rawProcureList.columns>> = ref([
title: '状态', title: '状态',
key: 'status', key: 'status',
width: 80, width: 80,
fixed: 'right',
align: 'center', align: 'center',
render: row => { render: row => {
return <dict-tag options={erp_auxiliary_status.value} value={row.status}></dict-tag>; return <dict-tag options={erp_auxiliary_status.value} value={row.status}></dict-tag>;
} }
}, },
{ {
title: '审核意见', title: '审批人',
key: 'checkedByNick',
width: 150
},
{
title: '审批意见',
key: 'attr2', key: 'attr2',
width: 280 width: 150
}, },
{ {
title: '操作', title: '操作',
@ -839,7 +843,7 @@ const columns: Ref<DataTableColumns<Procure.rawProcureList.columns>> = ref([
<icon-tdesign-send class="mr-2px text-15px " /> <icon-tdesign-send class="mr-2px text-15px " />
下发 下发
</NButton>} </NButton>}
<NButton size={'tiny'} type="info" onClick={() => handleView(row, 'DISTRIBUTE')}> <NButton size={'tiny'} type="info" onClick={() => handleView(row)}>
<icon-tdesign-send class="mr-2px text-15px " /> <icon-tdesign-send class="mr-2px text-15px " />
明细 明细
</NButton> </NButton>

@ -422,7 +422,14 @@ const columns: Ref<DataTableColumns<DataType>> = ref([
{ {
title: '交付时间', title: '交付时间',
align: 'center', align: 'center',
key: 'payTime' key: 'payTime',
width: 150,
},
{
title: '创建时间',
align: 'center',
width: 180,
key: 'createTime'
}, },
{ {
title: '状态', title: '状态',

Loading…
Cancel
Save