| | |
| | | break |
| | | } |
| | | |
| | | case 'setType': { |
| | | alert('我接收到子组件传送的排版状态') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //工序 |
| | | const value = ref('切割') |
| | | const processVal = ref('切割') |
| | | |
| | | |
| | | //排产状态 |
| | |
| | | }, |
| | | ] |
| | | |
| | | function padLeftZero(str) { |
| | | return ('00' + str).substr(str.length) |
| | | } |
| | | |
| | | //定义表单值 |
| | | const form = reactive({ |
| | | date1: '', |
| | |
| | | }) |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | order: { |
| | |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let selectProcesses = processVal.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | |
| | | const getWorkOrder = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let selectProcesses = processVal.value |
| | | let selectState = stateValue.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | |
| | | if (selectProcesses == '') { |
| | | selectProcesses = null |
| | | } |
| | | // if (inputVal == null && selectState == 1) { |
| | | // //根据时间查询未排产数据 |
| | | // request.post(`/productionScheduling/selectLastScheduling/${startTime}/${endTime}/${selectProcesses}/${inputVal}`, filterData.value).then((res) => { |
| | | // |
| | | // if (res.code == 200) { |
| | | // pageTotal.value = res.data.total |
| | | // xGrid.value.loadData(res.data.data) |
| | | // gridOptions.loading = false |
| | | // //禁用删除、审核按钮 |
| | | // gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | // gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | // //启用保存 |
| | | // gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // } |
| | | // }) |
| | | // } else if (inputVal != null && selectState == 1) { |
| | | //根据工序查询未排产数据 |
| | | request.post(`/productionScheduling/selectScheduling/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | xGrid.value.loadData(res.data.data) |
| | | console.log(res.data.data) |
| | | gridOptions.loading = false |
| | | //禁用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | //启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | if (selectState==1){ |
| | | //禁用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | //启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | }else{ |
| | | //禁用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | //启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | // } else if (inputVal == null && selectState == 2) { |
| | | // //根据时间查询已排产数据 |
| | | // request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | // if (res.code == 200) { |
| | | // pageTotal.value = res.data.total |
| | | // xGrid.value.loadData(res.data.data) |
| | | // gridOptions.loading = false |
| | | // //启用删除、审核按钮 |
| | | // gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | // gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | // //禁用保存 |
| | | // gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // } |
| | | // }) |
| | | // } else if (inputVal != null && selectState == 2) { |
| | | // //根据订单号查询已排产数据 |
| | | // request.post(`/productionScheduling/selectSchedulingNot/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | // if (res.code == 200) { |
| | | // pageTotal.value = res.data.total |
| | | // xGrid.value.loadData(res.data.data) |
| | | // gridOptions.loading = false |
| | | // //启用删除、审核按钮 |
| | | // gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | // gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | // //禁用保存 |
| | | // gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | |
| | | } |
| | |
| | | //获取选中时间 |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let selectProcesses = processVal.value |
| | | let selectState = stateValue.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | |
| | | if (selectProcesses == '') { |
| | | selectProcesses = null |
| | | } |
| | | |
| | | request.post(`/productionScheduling/selectScheduling/1/${total.pageSize}/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total * 1 |
| | |
| | | pageNum.value = 1 |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //禁用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | //启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | |
| | | }, |
| | | //表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {type: 'expand',fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | { |
| | | field: 'scheduled_start_time', |
| | | width: 120, |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}}, |
| | | field: 'scheduledStartTime', |
| | | width: 130, |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'date'},}, |
| | | title: t('processCard.scheduledStartTime') |
| | | }, |
| | | { |
| | | field: 'plan_end_time', |
| | | width: 120, |
| | | field: 'planEndTime', |
| | | width: 130, |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}}, |
| | | title: t('processCard.planEndTime') |
| | | }, |
| | |
| | | title: t('order.orderId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | width: 100, |
| | | width: 110, |
| | | }, |
| | | { |
| | | field: 'order.customerName', |
| | |
| | | title: t('order.OrderNum'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | width: 70, |
| | | width: 100, |
| | | }, |
| | | { |
| | | field: 'technologyNumber', |
| | | title: t('processCard.technologyNumber'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | width: 70, |
| | | width: 100, |
| | | }, |
| | | { |
| | | field: 'orderGlassDetail.childWidth', |
| | |
| | | title: t('order.height'), |
| | | width: 60, |
| | | }, |
| | | {field: 'orderDetail.quantity', title: t('processCard.orderQuantity'), width: 70}, |
| | | {field: 'orderDetail.quantity', title: t('processCard.orderQuantity'), width: 90}, |
| | | {field: 'orderGlassDetail.area', title: t('processCard.orderArea'), width: 90}, |
| | | { |
| | | field: 'schedulingQuantity', |
| | |
| | | title: t('processCard.productionSchedulingQuantity'), |
| | | sortable: true |
| | | }, |
| | | {field: 'pendingProductionQuantity', title: t('processCard.quantityToScheduled'), width: 120}, |
| | | {field: 'pendingProductionArea', title: t('processCard.areaToScheduled'), width: 120}, |
| | | {field: 'productionScheduledQuantity', title: t('processCard.plannedProductionQuantity'), width: 120}, |
| | | {field: 'productionScheduledArea', title: t('processCard.plannedProductionArea'), width: 120}, |
| | | {field: 'reviewStatus', title: t('processCard.reviewedState'), width: 140}, |
| | | {field: 'reviewer', title: t('processCard.reviewed'), width: 140}, |
| | | {field: 'orderGlassDetail.glassChild', title: t('order.product'), width: 140}, |
| | | {field: 'pendingProductionQuantity', title: t('processCard.quantityToScheduled'), width: 100}, |
| | | {field: 'pendingProductionArea', title: t('processCard.areaToScheduled'), width: 100}, |
| | | {field: 'productionScheduledQuantity', title: t('processCard.plannedProductionQuantity'), width: 100}, |
| | | {field: 'productionScheduledArea', title: t('processCard.plannedProductionArea'), width: 100}, |
| | | {field: 'reviewStatus', title: t('processCard.reviewedState'), width: 80}, |
| | | {field: 'reviewer', title: t('processCard.reviewed'), width: 80}, |
| | | {field: 'orderDetail.productName', title: t('order.product'), width: 140}, |
| | | {field: 'orderDetail.shape', title: t('order.shape'), width: 80}, |
| | | {field: 'notes', title: t('processCard.notes'), editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120}, |
| | | {field: 'schedulingId', title: t('processCard.schedulingId'), width: 120}, |
| | |
| | | return; |
| | | } |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | let start = selectRecords[i].scheduled_start_time |
| | | let end = selectRecords[i].plan_end_time |
| | | let number = selectRecords[i].scheduling_quantity |
| | | let start = selectRecords[i].scheduledStartTime |
| | | let end = selectRecords[i].planEndTime |
| | | let number = selectRecords[i].schedulingQuantity |
| | | //计划开始、结束时间,排产数量不能为空 |
| | | if (start == null || end == null || number == null) { |
| | | ElMessage.warning(t('processCard.saveCorrespondingValues')) |
| | | return; |
| | | } |
| | | } |
| | | let selectProcesses = value.value |
| | | let selectProcesses = processVal.value |
| | | if (selectProcesses == null || selectProcesses == "") { |
| | | ElMessage.warning(t('processCard.selectProductionSchedulingProcess')) |
| | | return; |
| | |
| | | switch (menu.code) { |
| | | case 'copyChecked' : { |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "scheduled_start_time" || result.cell === "plan_end_time") { |
| | | if (result.cell === "scheduledStartTime" || result.cell === "planEndTime" || result.cell === "schedulingQuantity"){ |
| | | if (result) { |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const val = dataList[result.start][result.cell] |
| | |
| | | } |
| | | case 'copyAll' : { |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "scheduled_start_time" || result.cell === "plan_end_time") { |
| | | if (result.cell === "scheduledStartTime" || result.cell === "planEndTime"|| result.cell === "schedulingQuantity") { |
| | | if (result) { |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const val = dataList[result.start][result.cell] |
| | |
| | | } |
| | | case 'clearChecked' : { |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "scheduled_start_time" || result.cell === "plan_end_time") { |
| | | if (result.cell === "scheduledStartTime" || result.cell === "planEndTime"|| result.cell === "schedulingQuantity") { |
| | | if (result) { |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | dataList.forEach((item, index) => { |
| | |
| | | |
| | | <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 110px"></el-input> |
| | | |
| | | <el-select v-model="value" clearable default-value="default_city" style="width: 120px"> |
| | | <el-select v-model="processVal" clearable default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | <div ref="cellArea" class="vxe-table--cell-area"> |
| | | <span class="vxe-table--cell-main-area"></span> |
| | | |
| | | <span class="vxe-table--cell-active-area"></span> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |