diff --git a/src/views/biz/orderItem/index.vue b/src/views/biz/orderItem/index.vue index 4680b1c..f4cff9b 100644 --- a/src/views/biz/orderItem/index.vue +++ b/src/views/biz/orderItem/index.vue @@ -117,15 +117,46 @@ --> - - - + + + + + + + - + + + @@ -498,25 +529,25 @@ const columns = [ }, { align:'center', - minWidth: 150, + minWidth: 180, title: '开始时间', key: 'beginTime' }, { align:'center', - minWidth: 150, + minWidth: 180, title: '结束时间', key: 'endTime' }, { align:'center', - minWidth: 150, + minWidth: 180, title: '实际开始时间', key: 'actualStartTime' }, { align:'center', - minWidth: 150, + minWidth: 180, title: '实际结束时间', key: 'actualEndTime' }, @@ -540,7 +571,7 @@ const columns = [ }, { align:'center', - minWidth: 150, + minWidth: 180, title: '派工时间', key: 'assingWorkTime' }, @@ -662,10 +693,11 @@ function handleCheck(keys: Array) { //根据生产令号查询工序 let planList = ref([]) function gongxu(){ - if(formData.productionCode){ + if(formData.code){ planList.value.splice(0) orderItemApi.preCreation({ //productionCode:formData.productionCode + code:formData.code, projectCode:formData.projectCode }).then((rps:any) => { planList.value = rps.planList?rps.planList:[] @@ -691,9 +723,75 @@ function handleAdd() { Object.assign(formData, defaultFormData) modalVisible.value = true + xmhand() planList.value.splice(0) } +//查询项目 +let xmlist = ref([]) +let xmloading = ref(false) + + +function xmhand() { + xmloading.value = true + orderItemApi.xmoptions({ + // page: 1, + // pageSize: 100, + // username: v, + }).then((rps:any) =>{ + if(rps && rps.length > 0){ + xmlist.value = rps.map((n:any) => { + return { + label:n.label, + value:n.value+'' + } + }) + } + xmloading.value = false + }).catch(() => { + xmloading.value = false + }) +} + +let wllist = ref([]) +function xmselupdate(v:any,opt:any) { + // console.log(v,'sle') + // console.log(opt,'opt') + planList.value.splice(0) + wllist.value.splice(0) + formData.code = '' + formData.projectName = opt.label + if(v){ + wlhand(opt.value) + } +} + +//根据项目查询物料 + +let wlloading = ref(false) +function wlhand(v:any) { + wlloading.value = true + orderItemApi.wloptions({ + projectId:v + // page: 1, + // pageSize: 100, + // username: v + }).then((rps:any) =>{ + if(rps && rps.length > 0){ + wllist.value = rps.map((n:any) => { + return { + label:n.label, + value:n.value+'' + } + }) + } + console.log(yglist.value,'12') + wlloading.value = false + }).catch(() => { + wlloading.value = false + }) +} + // 编辑 function handleEdit(row: OrderItem) { modalTitle.value = '编辑生产订单' diff --git a/src/views/biz/orderProcessPlan/index.vue b/src/views/biz/orderProcessPlan/index.vue index 183ab26..1ecef80 100644 --- a/src/views/biz/orderProcessPlan/index.vue +++ b/src/views/biz/orderProcessPlan/index.vue @@ -463,7 +463,7 @@ const columns = [ // { type: 'selection' }, { align:'center', - minWidth: 150, + minWidth: 240, title: '工序名称', key: 'name' }, diff --git a/src/views/biz/orderProject/components/GanttSchedule.vue b/src/views/biz/orderProject/components/GanttSchedule.vue index 692b1f5..33ea752 100644 --- a/src/views/biz/orderProject/components/GanttSchedule.vue +++ b/src/views/biz/orderProject/components/GanttSchedule.vue @@ -114,6 +114,33 @@ function initGantt() { { name: "end_date", label: "计划结束", align: "center", width: 130 }, ] + //?? + gantt.config.layout = { + css: "gantt_container", + cols: [ + { + width: 300, + minWidth: 200, + maxWidth: 600, + rows: [ + { view: "grid", scrollX: "gridScroll", scrollable: true, + scrollY: "scrollVer" + }, + { view: "scrollbar", id: "gridScroll", group: "horizontal" } /*!*/ + ] + }, + { resizer: true, width: 1 }, + { + rows: [ + { view: "timeline", scrollX: "scrollHor", scrollY: "scrollVer" }, + { view: "scrollbar", id: "scrollHor", group: "horizontal" } /*!*/ + ] + }, + { view: "scrollbar", id: "scrollVer" } + ] +} + //?? + // 行为配置 gantt.config.drag_progress = false // 禁用进度拖拽 gantt.config.drag_links = false // 禁用连线拖拽(视需求而定) @@ -166,7 +193,7 @@ function renderGanttData() { if (maxDate <= minDate) maxDate = new Date(minDate.getTime() + 86400000) tasks.push({ id: moId, - text: mo.productionOrderNo || mo.billNo || '未知单号', + text: mo.materialCode || '', //mo.productionOrderNo || mo.billNo || '未知单号', ?? materialCode: mo.materialCode || '', name: mo.materialName || '产品', start_date: formatGanttDate(minDate), @@ -174,6 +201,7 @@ function renderGanttData() { open: false, // 树形默认关闭 type: gantt.config.types.project, _type: 'mo', + progress:0.6, //?? _raw: mo }) @@ -189,7 +217,7 @@ function renderGanttData() { tasks.push({ id: routeId, - text: route.operNumber != null ? String(route.operNumber) : String(index + 1), + text:mo.materialCode || '', //route.operNumber != null ? String(route.operNumber) : String(index + 1), ?? materialCode: '', name: route.processProperty || '工序', color: processColors[index % processColors.length], @@ -197,6 +225,7 @@ function renderGanttData() { end_date: formatGanttDate(rEnd), parent: moId, _type: 'route', + progress:0.6, //?? _raw: route }) }) diff --git a/src/views/production/dispatchwork/index.vue b/src/views/production/dispatchwork/index.vue index 282b497..2aea1f0 100644 --- a/src/views/production/dispatchwork/index.vue +++ b/src/views/production/dispatchwork/index.vue @@ -476,7 +476,7 @@ const columns = [ align:'center', title: '暂停/改派时间', key: 'pauseTime', - minWidth: 150 + minWidth: 180 }, { align:'center',