| | |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function listByWorkShop(query) { |
| | | return request({ |
| | | url: '/aps/standardProcess/listByWorkShop', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | |
| | | viewAssociatedRequirements:"查看关联需求", |
| | | setMode:"设置模式", |
| | | CustomizePlannedCompletionDate:"自定义计划完工日", |
| | | tipsBugSheetMetal:"将生成的钣金需求的计划开工日和计划完工日赋值给工单", |
| | | tipsBugSheetMetal:"将自定义的日期赋值给工单的计划完工日", |
| | | tipsBugSheetMetal2:"将自定义的日期赋值给工单的计划完工日", |
| | | metalWeldWork:"焊缝工单数据", |
| | | parseUpload:"已成功上传和解析", |
| | | weld:"焊缝" |
| | |
| | | setMode:"Set Mode", |
| | | CustomizePlannedCompletionDate:"Customize the planned completion date", |
| | | tipsBugSheetMetal:"Assign the planned start date and planned completion date of the generated sheet metal requirements to the work order", |
| | | tipsBugSheetMetal2:"Assign custom dates to the planned completion date of the work order", |
| | | weld:"weld seam", |
| | | }, |
| | | options: { |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="18" style="text-align: right"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="适用工厂" prop="plant"> |
| | | <el-select |
| | | style="width: 140px" |
| | | clearable |
| | | v-model="queryParams.plant" |
| | | placeholder="适用工厂" |
| | | > |
| | | <el-option |
| | | v-for="item in aps_factory" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right"> |
| | | <el-form-item class="column-with-margin"> |
| | | <el-button type="primary" icon="Search" @click="handleQuery" |
| | | >查询</el-button |
| | |
| | | </HxlhTable> |
| | | |
| | | <!-- 添加或修改日历管理对话框 --> |
| | | <el-dialog :title="title" v-model="open" width="500px" append-to-body> |
| | | <el-dialog :title="title" v-model="open" width="80%" append-to-body> |
| | | <el-form |
| | | ref="calendarRef" |
| | | :model="form" |
| | |
| | | <el-input v-model="form.description" placeholder="请输入描述" /> |
| | | </el-form-item> |
| | | <el-form-item label="日历类型" prop="type"> |
| | | <el-radio-group v-model="form.type" @change="handleSwitchType"> |
| | | <!-- <el-radio-group v-model="form.type" @change="handleSwitchType"> |
| | | <el-radio :label="'1'">周工作</el-radio> |
| | | <el-radio :label="'2'">节假日</el-radio> |
| | | </el-radio-group> |
| | | </el-radio-group> --> |
| | | <el-tag type="primary">周工作</el-tag> |
| | | </el-form-item> |
| | | <el-form-item label="生效时间" prop="effectiveDate"> |
| | | <el-date-picker |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-form-item |
| | | <!-- <el-form-item |
| | | label="适用工厂" |
| | | prop="applicableFactory" |
| | | class="factory_use_item" |
| | | > --> |
| | | <div class="select_factory">适用工厂/车间/工序</div> |
| | | <!-- <el-row :gutter="20" class="select_factory"> --> |
| | | <div |
| | | class="select_factory" |
| | | v-for="(item, index) in applicableSettingList" |
| | | :key="index" |
| | | > |
| | | <!-- <el-col :span="7"> --> |
| | | <el-select |
| | | class="select_content" |
| | | clearable |
| | | v-model="form.applicableFactory" |
| | | v-model="item.factory" |
| | | style="width: 160px" |
| | | placeholder="请输入适用工厂" |
| | | @change="changePlant($event)" |
| | | > |
| | | <el-option |
| | | v-for="plant in plantList" |
| | | :key="plant.id" |
| | | :label="plant.plantName" |
| | | :value="plant.plantCode" |
| | | v-for="plant in aps_factory" |
| | | :key="plant.value" |
| | | :label="plant.label" |
| | | :value="plant.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="适用车间" |
| | | prop="applicableWorkshop" |
| | | class="factory_use_item" |
| | | > |
| | | <!-- </el-col> |
| | | <el-col :span="7"> --> |
| | | <el-select |
| | | class="select_content" |
| | | clearable |
| | | v-model="form.applicableWorkshop" |
| | | v-model="item.workshop" |
| | | style="width: 160px" |
| | | placeholder="请输入适用车间" |
| | | @change="changeWorkshop($event)" |
| | | > |
| | | <el-option |
| | | v-for="shop in shopList" |
| | |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="适用工序" |
| | | prop="applicableProcess" |
| | | class="factory_use_item" |
| | | > |
| | | <!-- </el-col> |
| | | <el-col :span="7"> --> |
| | | <el-select |
| | | class="select_content" |
| | | clearable |
| | | v-model="form.applicableProcess" |
| | | v-model="item.process" |
| | | style="width: 160px" |
| | | placeholder="请输入适用工序" |
| | | > |
| | |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <!-- </el-col> |
| | | <el-col :span="3"> --> |
| | | <el-button |
| | | class="select_content" |
| | | type="primary" |
| | | :icon="Plus" |
| | | @click="handleAddFactory(item)" |
| | | circle |
| | | size="small" |
| | | /> |
| | | <!-- </el-col> --> |
| | | </div> |
| | | <!-- </el-row> --> |
| | | <!-- </el-form-item> --> |
| | | <!-- <el-form-item |
| | | label="适用车间" |
| | | prop="applicableWorkshop" |
| | | class="factory_use_item" |
| | | > |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="适用工序" |
| | | prop="applicableProcess" |
| | | class="factory_use_item" |
| | | > |
| | | </el-form-item> --> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | |
| | | </template> |
| | | |
| | | <script setup name="Calendar"> |
| | | import { Plus } from "@element-plus/icons-vue"; |
| | | import HxlhTable from "@/components/HxlhTable"; |
| | | import { |
| | | listCalendar, |
| | |
| | | updateCalendar, |
| | | } from "@/api/basicData/calendar"; |
| | | import axios from "axios"; |
| | | import { listAll_plant } from "@/api/basicData/plant"; |
| | | import { listAll_plant, listByWorkShop } from "@/api/basicData/plant"; |
| | | import { listAll_shop, listAps_shop } from "@/api/basicData/shop"; |
| | | import { selectProcessNameList } from "@/api/basicData/processRoute.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const { aps_factory } = proxy.useDict("aps_factory"); |
| | | const tableRef = ref(); |
| | | const calendarList = ref([]); |
| | | const open = ref(false); |
| | |
| | | const data = reactive({ |
| | | form: { |
| | | type: "1", |
| | | applicable: [ |
| | | { |
| | | factory: "", |
| | | workshop: "", |
| | | process: "", |
| | | }, |
| | | ], |
| | | }, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | description: null, |
| | | plant: null, |
| | | type: null, |
| | | effectiveDate: null, |
| | | expiringDate: null, |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | type: [ |
| | | { |
| | | required: true, |
| | | message: "请选择日历类型", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | // type: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择日历类型", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | effectiveDate: [ |
| | | { |
| | | required: true, |
| | |
| | | }, |
| | | ]); |
| | | const typeRadioNumber = ref(1); |
| | | const applicableSettingList = ref([ |
| | | { factory: "", workshop: "", process: "" }, |
| | | ]); |
| | | const weekDaysSettingList = ref([ |
| | | { |
| | | day: "Monday", |
| | |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null, |
| | | applicable: [ |
| | | { |
| | | factory: "", |
| | | workshop: "", |
| | | process: "", |
| | | }, |
| | | ], |
| | | }; |
| | | proxy.resetForm("calendarRef"); |
| | | } |
| | |
| | | async function handleAdd() { |
| | | reset(); |
| | | open.value = true; |
| | | form.value = { |
| | | applicable: [ |
| | | { |
| | | factory: "", |
| | | workshop: "", |
| | | process: "", |
| | | }, |
| | | ], |
| | | }; |
| | | title.value = "添加日历管理"; |
| | | } |
| | | /** 选择工厂后事件 加载车间 和 工序 **/ |
| | | function changePlant(plant) { |
| | | console.log(plant); |
| | | listAps_shop({ plantCode: plant }).then((response) => { |
| | | shopList.value = response.rows; |
| | | }); |
| | | selectProcessNameList({ orgCode: plant }).then((response) => { |
| | | processList.value = response.rows; |
| | | // selectProcessNameList({ orgCode: plant }).then((response) => { |
| | | // processList.value = response.rows; |
| | | // }); |
| | | } |
| | | function changeWorkshop(workShop) { |
| | | listByWorkShop({ workShop: "气柜" }).then((res) => { |
| | | console.log(res, "workShop"); |
| | | processList.value = res.rows; |
| | | }); |
| | | } |
| | | function handleAddFactory(row) { |
| | | applicableSettingList.value.push(row); |
| | | } |
| | | /** 修改按钮操作 */ |
| | | function handleUpdate(row) { |
| | |
| | | proxy.$refs["calendarRef"].validate((valid) => { |
| | | if (valid) { |
| | | if (form.value.id != null) { |
| | | if (form.value.type === "1") { |
| | | updateCalendar({ |
| | | ...form.value, |
| | | content: { |
| | | weekdays: weekDaysSettingList.value, |
| | | }, |
| | | applicableWorkshop: form.value.applicableWorkshop, |
| | | applicableProcess: form.value.applicableProcess, |
| | | }).then((response) => { |
| | | proxy.$modal.msgSuccess("修改成功"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | } else if (form.value.type === "2") { |
| | | updateCalendar({ |
| | | ...form.value, |
| | | content: { |
| | | holidays: holidays.value, |
| | | }, |
| | | applicableWorkshop: form.value.applicableWorkshop, |
| | | applicableProcess: form.value.applicableProcess, |
| | | }).then((response) => { |
| | | proxy.$modal.msgSuccess("修改成功"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | } |
| | | // if (form.value.type === "1") { |
| | | // updateCalendar({ |
| | | // ...form.value, |
| | | // content: { |
| | | // weekdays: weekDaysSettingList.value, |
| | | // }, |
| | | // applicableWorkshop: form.value.applicableWorkshop, |
| | | // applicableProcess: form.value.applicableProcess, |
| | | // }).then((response) => { |
| | | // proxy.$modal.msgSuccess("修改成功"); |
| | | // open.value = false; |
| | | // getList(); |
| | | // }); |
| | | // } else if (form.value.type === "2") { |
| | | updateCalendar({ |
| | | ...form.value, |
| | | content: { |
| | | holidays: holidays.value, |
| | | }, |
| | | applicableWorkshop: form.value.applicableWorkshop, |
| | | applicableProcess: form.value.applicableProcess, |
| | | }).then((response) => { |
| | | proxy.$modal.msgSuccess("修改成功"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | // } |
| | | } else { |
| | | if (form.value.type === "1") { |
| | | addCalendar({ |
| | | ...form.value, |
| | | content: { |
| | | weekdays: weekDaysSettingList.value, |
| | | }, |
| | | }).then((response) => { |
| | | proxy.$modal.msgSuccess("新增成功"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | } else if (form.value.type === "2") { |
| | | addCalendar({ |
| | | ...form.value, |
| | | content: { |
| | | holidays: holidays.value, |
| | | }, |
| | | }).then((response) => { |
| | | proxy.$modal.msgSuccess("新增成功"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | } |
| | | // if (form.value.type === "1") { |
| | | // addCalendar({ |
| | | // ...form.value, |
| | | // content: { |
| | | // weekdays: weekDaysSettingList.value, |
| | | // }, |
| | | // }).then((response) => { |
| | | // proxy.$modal.msgSuccess("新增成功"); |
| | | // open.value = false; |
| | | // getList(); |
| | | // }); |
| | | // } else if (form.value.type === "2") { |
| | | addCalendar({ |
| | | ...form.value, |
| | | content: { |
| | | weekdays: weekDaysSettingList.value, |
| | | }, |
| | | holidays: holidays.value, |
| | | applicable: applicableSettingList.value, |
| | | //}, |
| | | }).then((response) => { |
| | | proxy.$modal.msgSuccess("新增成功"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | // } |
| | | } |
| | | } |
| | | }); |
| | |
| | | .factory_use_item { |
| | | margin-top: 10px; |
| | | } |
| | | .select_factory { |
| | | margin-left: 34px; |
| | | font-weight: 800; |
| | | font-size: 14px; |
| | | color: #606266; |
| | | } |
| | | .select_content { |
| | | margin-right: 10px; |
| | | margin-top: 20px; |
| | | // &:nth-child(1) { |
| | | // margin-left:34px; |
| | | // } |
| | | } |
| | | .mart5 { |
| | | margin-top: 5px; |
| | | } |
| | |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | icon="Refresh" |
| | | :disabled="multiple" |
| | | @click="handleBatchUpdatePlanDate" |
| | | v-hasPermi="['ApsPlatOrderPlanManager:requirement:list']" |
| | |
| | | <el-radio :label="1">{{ |
| | | $t("plan.btns.batchUpdateOrderDate") |
| | | }}</el-radio> |
| | | <el-radio :label="2">{{ |
| | | <!-- <el-radio :label="2">{{ |
| | | $t("plan.title.CustomizePlannedCompletionDate") |
| | | }}</el-radio> |
| | | }}</el-radio> --> |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="red_color">{{ $t("plan.title.tipsBugSheetMetal") }}</div> |
| | | <div class="red_color" v-if="radio === 1">{{ $t("plan.title.tipsBugSheetMetal") }}</div> |
| | | <div class="red_color" v-if="radio === 2">{{ $t("plan.title.tipsBugSheetMetal2") }}</div> |
| | | <div class="mode_box" v-if="radio === 2"> |
| | | <span>{{ $t("plan.title.CustomizePlannedCompletionDate") }}</span> |
| | | <!-- <el-date-picker |
| | |
| | | width: 200, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("basic.table.processRouteID"), |
| | | field: "processRouteId", |
| | | width: 200, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.processRouteWorkingHours"), |
| | | field: "processRouteHours", |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | // { |
| | | // title: t("basic.table.processRouteID"), |
| | | // field: "processRouteId", |
| | | // width: 200, |
| | | // align: "center", |
| | | // }, |
| | | // { |
| | | // title: t("plan.table.processRouteWorkingHours"), |
| | | // field: "processRouteHours", |
| | | // width: 100, |
| | | // align: "center", |
| | | // }, |
| | | { |
| | | title: t("plan.table.demandQuantity"), |
| | | field: "requireAmount", |