| | |
| | | # 配合后端服务 |
| | | # VITE_APP_LOCAL = 'int' |
| | | # VITE_APP_LOCAL = 'zhl' |
| | | VITE_APP_LOCAL = 'lhj' |
| | | VITE_APP_LOCAL = 'hjy' |
| | |
| | | <div class="grey_bg"> |
| | | <div |
| | | class="flex_holidays_set" |
| | | v-for="(item, index) in formHolidays" |
| | | v-for="(item, index) in formHolidays.holidays" |
| | | :key="index" |
| | | > |
| | | <div class="dis_error_wrap"> |
| | |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div class="error_text">请输入节假日描述</div> |
| | | <div class="error_text" v-if="item.describe == ''"> |
| | | 请输入节假日描述 |
| | | </div> |
| | | </div> |
| | | <div class="dis_error_wrap"> |
| | | <div class="flex_item"> |
| | |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="error_text">请输入开始时间</div> |
| | | <div class="error_text" v-if="item.startdate == ''"> |
| | | 请输入开始时间 |
| | | </div> |
| | | </div> |
| | | <div class="dis_error_wrap"> |
| | | <div class="flex_item"> |
| | |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="error_text">请输入结束时间</div> |
| | | <div class="error_text" v-if="item.enddate == ''"> |
| | | 请输入结束时间 |
| | | </div> |
| | | </div> |
| | | <div class="dis_error_wrap"> |
| | | <div class="flex_item"> |
| | |
| | | // }; |
| | | // 提交节假日 |
| | | function handleSaveHolidaysForm() { |
| | | console.log(holidaysRef.value, "表单dom"); |
| | | const hasValidDates = formHolidays.value.holidays.some( |
| | | (item) => item.enddate && item.startdate && item.describe |
| | | ); |
| | | console.log(hasValidDates, "hasValidDates"); |
| | | // holidaysRef.value.validate((valid) => { |
| | | // console.log(valid,"valid") |
| | | // if (valid) { |
| | | // proxy.$modal.msgSuccess('submit!'); |
| | | // } else { |
| | | // proxy.$modal.msgSuccess('Form is not valid.'); |
| | | // return false; |
| | | // if (!valid) { |
| | | // proxy.$modal.msgSuccess("必填项不能为空"); |
| | | // } |
| | | // }) |
| | | holidaysRef.value.validate((valid) => { |
| | | if (!valid) { |
| | | proxy.$modal.msgSuccess("必填项不能为空"); |
| | | } |
| | | if (valid) { |
| | | updateCalendar({ |
| | | id: form.value.id, |
| | | holidays: formHolidays.value.holidays.map((item) => { |
| | | return { |
| | | startdate: moment(item.startdate).format("YYYY-MM-DD"), |
| | | enddate: moment(item.enddate).format("YYYY-MM-DD"), |
| | | describe: item.describe, |
| | | }; |
| | | }), |
| | | }).then((response) => { |
| | | proxy.$modal.msgSuccess("新增成功"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | } |
| | | }); |
| | | //if (valid) { |
| | | if (!hasValidDates) { |
| | | updateCalendar({ |
| | | id: form.value.id, |
| | | holidays: formHolidays.value.holidays.map((item) => { |
| | | return { |
| | | startdate: moment(item.startdate).format("YYYY-MM-DD"), |
| | | enddate: moment(item.enddate).format("YYYY-MM-DD"), |
| | | describe: item.describe, |
| | | }; |
| | | }), |
| | | }).then((response) => { |
| | | proxy.$modal.msgSuccess("新增成功"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | } |
| | | // }); |
| | | } |
| | | /** 提交按钮 */ |
| | | function submitForm() { |
| | |
| | | { |
| | | title: t("plan.table.mainPartNumber"), |
| | | field: "mainPartNumber", |
| | | width: 150, |
| | | width: 160 |
| | | }, |
| | | // { |
| | | // title: '主件图号', |
| | |
| | | { |
| | | title: t('plan.table.customer'), |
| | | field: 'customer', |
| | | width: 200, |
| | | width: 160 |
| | | }, |
| | | { |
| | | title: t("plan.table.businessType"), |
| | | field: "businessType", |
| | | width: 100, |
| | | width: "auto", |
| | | }, |
| | | { |
| | | title: t("plan.table.documentNumber"), |
| | | field: "documentNumber", |
| | | width: 140, |
| | | width: "auto", |
| | | }, |
| | | { |
| | | title: t("plan.table.requirementType"), |
| | | field: "requirementType", |
| | | width: 100, |
| | | width: "auto", |
| | | }, |
| | | { |
| | | title: t("plan.table.documentStatus"), |
| | | field: "documentStatus", |
| | | width: 100, |
| | | width: "auto", |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemNumber", |
| | | width: 100, |
| | | width: "auto", |
| | | }, |
| | | { |
| | | title: t("plan.table.drawingNo"), |
| | | field: "drawingNo", |
| | | width: 100, |
| | | width: 200, |
| | | }, |
| | | // { |
| | | // title: '版本号', |
| | |
| | | { |
| | | title: t("plan.table.productionQuantity"), |
| | | field: "productionQuantity", |
| | | width: 100, |
| | | width: "auto", |
| | | }, |
| | | // { |
| | | // title: '良品数量', |
| | |
| | | { |
| | | title: t("plan.table.processNumber"), |
| | | field: "processNumber", |
| | | width: 100, |
| | | width: "auto", |
| | | }, |
| | | { |
| | | title: t("plan.table.factoryCenter"), |
| | | field: "workCenter", |
| | | width: 180, |
| | | width: "auto", |
| | | }, |
| | | // { |
| | | // title: '所属部门', |
| | |
| | | { |
| | | title: t("plan.table.planEndDayDate"), |
| | | field: "planEndDay", |
| | | width: 100, |
| | | width: 160, |
| | | }, |
| | | // { |
| | | // title: '备料料号', |
| | |
| | | { |
| | | title: t('plan.table.account'), |
| | | field: 'account', |
| | | width: 100, |
| | | width: "auto", |
| | | // formatter: ({ cellValue, row, column }) => { |
| | | // if (cellValue) { |
| | | // console.log(cellValue,aps_account.value,"llll") |
| | |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | | <style> |
| | | .vxe-cell{ |
| | | padding:0 20px; |
| | | } |
| | | </style> |
| | |
| | | { |
| | | title: t("plan.table.mainPartCustomer"), |
| | | field: "customer", |
| | | width: "auto", |
| | | width: "200", |
| | | fixed: "left", |
| | | }, |
| | | { |
| | | title: t("plan.table.mainPartNumber"), |
| | | field: "mainPartNumber", |
| | | width: "auto", |
| | | width: "120", |
| | | fixed: "left", |
| | | }, |
| | | { |
| | |
| | | { |
| | | title: t("plan.table.documentNumber"), |
| | | field: "documentNumber", |
| | | width: "auto", |
| | | width: "180", |
| | | fixed: "left", |
| | | }, |
| | | { |
| | |
| | | { |
| | | title: t("plan.table.workCenter"), |
| | | field: "workCenter", |
| | | width: "auto", |
| | | width: "180", |
| | | }, |
| | | { |
| | | title: t("plan.table.department"), |
| | |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemNumber", |
| | | width: "auto", |
| | | type: "html", |
| | | }, |
| | | { |
| | |
| | | { |
| | | title: t("plan.table.workorderCreationTime"), |
| | | field: "orderCreateTime", |
| | | width: "auto", |
| | | width: "160", |
| | | }, |
| | | { |
| | | title: t("plan.table.workOrderReviewTime"), |
| | | field: "approveOn", |
| | | width: "auto", |
| | | width: "160", |
| | | }, |
| | | { |
| | | title: t("plan.table.workOrderStartTime"), |
| | |
| | | { |
| | | title: t("plan.table.workOrderNo"), |
| | | field: "workOrderNo", |
| | | width: "auto", |
| | | width: "180" |
| | | }, |
| | | { |
| | | title: t("plan.table.processName"), |
| | |
| | | @changePageNo="changePageNo" |
| | | @changePageSize="changePageSize" |
| | | @on-checkbox="handleCheckboxChange" |
| | | class="auto-height-grid" |
| | | > |
| | | </HxlhTable> |
| | | </div> |
| | |
| | | { |
| | | title: t("plan.table.workOrderNo"), |
| | | field: "documentNumber", |
| | | width: 150, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemNumber", |
| | | width: 200, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.productionQuantity"), |
| | | field: "productionQuantity", |
| | | width: 200, |
| | | width: "80", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.mismatchedProductionQuantity"), |
| | | field: "unmatchedQuantity", |
| | | width: 200, |
| | | width: "auto", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.applicableFactories"), |
| | | field: "plant", |
| | | width: 200, |
| | | width: "100", |
| | | align: "center", |
| | | formatter: ({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | |
| | | { |
| | | title: t("plan.table.productionBase"), |
| | | field: "productionBase", |
| | | width: 200, |
| | | width: "100", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.planStartDay"), |
| | | field: "planStartDay", |
| | | width: 200, |
| | | width: "120", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.planEndDayDate"), |
| | | field: "planEndDay", |
| | | width: 200, |
| | | width: "120", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.workorderCreationTime"), |
| | | field: "orderCreateTime", |
| | | width: 200, |
| | | width: "150", |
| | | align: "center", |
| | | }, |
| | | ]; |
| | |
| | | { |
| | | title: t("plan.table.requireID"), |
| | | field: "id", |
| | | width: 150, |
| | | width: "180", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.requireTraceID"), |
| | | field: "requireTrackId", |
| | | width: 200, |
| | | width: "180", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "bomLineCode", |
| | | width: 200, |
| | | width: "auto", |
| | | align: "center", |
| | | }, |
| | | // { |
| | |
| | | { |
| | | title: t("plan.table.unmatchedDemandQuantity"), |
| | | field: "unmatchedDemandAmount", |
| | | width: 200, |
| | | width: "auto", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.planStartDay"), |
| | | field: "startDate", |
| | | width: 200, |
| | | width: 162, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.planEndDayDate"), |
| | | field: "completeDate", |
| | | width: 200, |
| | | width: 162, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.requirementDate"), |
| | | field: "demandDate", |
| | | width: 200, |
| | | width: 162, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.applicableFactories"), |
| | | field: "orgCode", |
| | | width: 200, |
| | | width: "auto", |
| | | align: "center", |
| | | formatter: ({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | |
| | | { |
| | | title: t("plan.table.productionBase"), |
| | | field: "productionBase", |
| | | width: 200, |
| | | width: "auto", |
| | | align: "center", |
| | | }, |
| | | ]; |