| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-row :gutter="20"> <el-col> |
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="计划开工日" style="width: 100%;"> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" :label-width="locale==='zh'?'90px':'180px'" label-position="left"> |
| | | <!-- <el-row :gutter="20"> |
| | | <el-col :span="6"> --> |
| | | <el-form-item :label="$t('page.query.daterangePlanStartDay')"> |
| | | <el-date-picker |
| | | style="width: 240px;" |
| | | v-model="daterangePlanStartDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :start-placeholder="$t('page.placeholder.startDate')" |
| | | :end-placeholder="$t('page.placeholder.endDate')" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="计划完工日" style="width: 100%;"> |
| | | <!-- </el-col> |
| | | <el-col :span="6"> --> |
| | | <el-form-item :label="$t('page.query.daterangePlanEndDay')"> |
| | | <el-date-picker |
| | | style="width: 240px;" |
| | | v-model="daterangePlanEndDay" |
| | | value-format="YYYY-MM-DD" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :start-placeholder="$t('page.placeholder.startDate')" |
| | | :end-placeholder="$t('page.placeholder.endDate')" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="单据号" prop="documentNumber" style="width: 100%;"> |
| | | <!-- </el-col> |
| | | <el-col :span="6"> --> |
| | | <el-form-item :label="$t('page.query.documentNumber')" prop="documentNumber" > |
| | | <el-input |
| | | style="width: 240px;" |
| | | v-model="queryParams.documentNumber" |
| | | placeholder="请输入单据号" |
| | | :placeholder="$t('page.placeholder.documentNumber')" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="客户名称" prop="customer" style="width: 100%;"> |
| | | <!-- </el-col> |
| | | <el-col :span="6"> --> |
| | | <el-form-item :label="$t('page.query.customer')" prop="customer"> |
| | | <el-input |
| | | style="width: 240px;" |
| | | v-model="queryParams.customer" |
| | | placeholder="请输入客户名称" |
| | | :placeholder="$t('page.placeholder.customer')" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" style="text-align: right;"> |
| | | <!-- </el-col> |
| | | <el-col :span="24" style="text-align: right;"> --> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">重置</el-button> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">{{$t("page.common.query")}}</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">{{$t("page.common.reset")}}</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- </el-col> --> |
| | | <!-- </el-row> --> |
| | | </el-form> |
| | | </el-col> </el-row> |
| | | </el-row> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >批量修改计划开工日</el-button> |
| | | >{{$t("page.btns.batchPlanStartDay")}}</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >批量修改计划完工日</el-button> |
| | | >{{$t("page.btns.batchPlanEndDay")}}</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['apsPlatePlan:import']" |
| | | >导入</el-button> |
| | | >{{$t("page.common.import")}}</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['apsPlatePlan:export']" |
| | | >导出</el-button> |
| | | >{{$t("page.common.export")}}</el-button> |
| | | </el-col> |
| | | <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | |
| | | import { ref } from "vue"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | import { useI18n } from "vue-i18n"; //要在js中使用国际化 |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const { t, locale } = useI18n(); |
| | | const { aps_is_suspended, aps_document_status, aps_account, aps_business_type } = proxy.useDict('aps_is_suspended', 'aps_document_status', 'aps_account', 'aps_business_type'); |
| | | |
| | | const exampleList = ref([]); |
| | | const planList = ref([]); |
| | | const loading = ref(true); |
| | |
| | | // 上传的地址 |
| | | url: import.meta.env.VITE_APP_BASE_API + "/aps/apsPlatePlan/importData" |
| | | }); |
| | | const data = reactive({ |
| | | form: {}, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | customer: null, |
| | | documentNumber: null |
| | | }, |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主键id不能为空", trigger: "blur" } |
| | | ], |
| | | } |
| | | }); |
| | | |
| | | const { queryParams } = toRefs(data); |
| | | const exampleColumns = ref([]); |
| | | const columns = ref([]); |
| | | const subGridOptions = ref({ |
| | | border: true, |
| | | showOverflow: true, |
| | | columns: [] |
| | | }) |
| | | |
| | | watch(locale, (newLocale) => { |
| | | // 重新获取翻译文本 |
| | | // 表格配置 |
| | | const exampleColumns = ref([ |
| | | { type: 'seq', title: '序号', width: 60 }, |
| | | exampleColumns.value = [ |
| | | { type: 'seq', title: t('page.table.seq'), width: 60 }, |
| | | { |
| | | title: '主计划员', |
| | | title: t('page.table.masterPlanner'), |
| | | field: 'masterPlanner', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '周日', |
| | | title: t('page.table.weekDay'), |
| | | field: 'weekDay', |
| | | width: 100, |
| | | formatter: (({ cellValue, row, column }) => { |
| | |
| | | }) |
| | | }, |
| | | { |
| | | title: '周度', |
| | | title: t('page.table.weekCycle'), |
| | | field: 'weekCycle', |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: '主件料号', |
| | | title: t('page.table.mainPartNumber'), |
| | | field: 'mainPartNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '主件图号', |
| | | title: t('page.table.mainPartDrawingNumber'), |
| | | field: 'mainPartDrawingNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '客户名称', |
| | | title: t('page.table.customer'), |
| | | field: 'customer', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: '业务类型', |
| | | title: t('page.table.businessType'), |
| | | field: 'businessType', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '单据号', |
| | | title: t('page.table.documentNumber'), |
| | | field: 'documentNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '需求分类', |
| | | title: t('page.table.requirementType'), |
| | | field: 'requirementType', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '单据状态', |
| | | title: t('page.table.documentStatus'), |
| | | field: 'documentStatus', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '料号', |
| | | title: t('page.table.itemNumber'), |
| | | field: 'itemNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '图号', |
| | | title: t('page.table.drawingNo'), |
| | | field: 'drawingNo', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '版本号', |
| | | title: t('page.table.versionNumber'), |
| | | field: 'versionNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '生产数量', |
| | | title: t('page.table.productionQuantity'), |
| | | field: 'productionQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '良品数量', |
| | | title: t('page.table.goodProductsQuantity'), |
| | | field: 'goodProductsQuantity', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '工序号', |
| | | title: t('page.table.processNumber'), |
| | | field: 'processNumber', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '工作中心', |
| | | title: t('page.table.factoryCenter'), |
| | | field: 'workCenter', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '所属部门', |
| | | title: t('page.table.dependencyDepartment'), |
| | | field: 'department', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计划开工日', |
| | | title: t('page.table.planStartDay'), |
| | | field: 'planStartDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '计划完工日', |
| | | title: t('page.table.planEndDayDate'), |
| | | field: 'planEndDay', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '备料料号', |
| | | title: t('page.table.standbyNumber'), |
| | | field: 'standbyNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '备料名称', |
| | | title: t('page.table.standbyName'), |
| | | field: 'standbyName', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: '备料库存', |
| | | title: t('page.table.standbyStock'), |
| | | field: 'standbyStock', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '下道工序所属部门', |
| | | title: t('page.table.departmentToNextProcessBelongs'), |
| | | field: 'nextProcessDeparment', |
| | | width: 180, |
| | | }, |
| | | { |
| | | title: '是否挂起', |
| | | title: t('page.table.isSuspended'), |
| | | field: 'isSuspended', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '外协标识', |
| | | title: t('page.table.isOutsourcing'), |
| | | field: 'isOutsourcing', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '账套', |
| | | title: t('page.table.account'), |
| | | field: 'account', |
| | | width: 100, |
| | | }, |
| | |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]); |
| | | |
| | | ]; |
| | | // 表格配置 |
| | | const columns = ref([ |
| | | columns.value = [ |
| | | { field: 'expand', type: 'expand', width: 60, align: 'center', slots: { content: 'expandContent' } }, |
| | | { type: 'checkbox', width: 60, align:"center"}, |
| | | { type: 'seq', title: '序号', width: 60 }, |
| | | { type: 'seq', title: t('page.table.seq'), width: 60 }, |
| | | // { |
| | | // title: '主计划员', |
| | | // field: 'masterPlanner', |
| | |
| | | // width: 80, |
| | | // }, |
| | | { |
| | | title: '主件料号', |
| | | title: t('page.table.mainPartNumber'), |
| | | field: 'mainPartNumber', |
| | | width: 150, |
| | | }, |
| | |
| | | // width: 200, |
| | | // }, |
| | | { |
| | | title: '业务类型', |
| | | title: t('page.table.businessType'), |
| | | field: 'businessType', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '单据号', |
| | | title: t('page.table.documentNumber'), |
| | | field: 'documentNumber', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '需求分类', |
| | | title: t('page.table.requirementType'), |
| | | field: 'requirementType', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '单据状态', |
| | | title: t('page.table.documentStatus'), |
| | | field: 'documentStatus', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '料号', |
| | | title: t('page.table.itemNumber'), |
| | | field: 'itemNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '图号', |
| | | title: t('page.table.drawingNo'), |
| | | field: 'drawingNo', |
| | | width: 100, |
| | | }, |
| | |
| | | // width: 100, |
| | | // }, |
| | | { |
| | | title: '生产数量', |
| | | title: t('page.table.productionQuantity'), |
| | | field: 'productionQuantity', |
| | | width: 100, |
| | | }, |
| | |
| | | // width: 100, |
| | | // }, |
| | | { |
| | | title: '工序号', |
| | | title: t('page.table.processNumber'), |
| | | field: 'processNumber', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '工作中心', |
| | | title: t('page.table.factoryCenter'), |
| | | field: 'workCenter', |
| | | width: 180, |
| | | }, |
| | |
| | | // width: 100, |
| | | // }, |
| | | { |
| | | title: '计划完工日', |
| | | title: t('page.table.planEndDayDate'), |
| | | field: 'planEndDay', |
| | | width: 100, |
| | | }, |
| | |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]); |
| | | |
| | | |
| | | const data = reactive({ |
| | | form: {}, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | customer: null, |
| | | documentNumber: null |
| | | ]; |
| | | subGridOptions.value.columns = [ |
| | | { |
| | | title: t('page.table.itemNumber'), |
| | | field: 'itemNo', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主键id不能为空", trigger: "blur" } |
| | | ], |
| | | { |
| | | title: t('page.table.workOrderNo'), |
| | | field: 'workOrderNo', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: t('page.table.processNumber'), |
| | | field: 'processNumber', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: t('page.table.processName'), |
| | | field: 'processName', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: t('page.table.startDateOfProcessPlan'), |
| | | field: 'processPlanStartDay', |
| | | width: 200, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: t('page.table.endDateOfProcessPlan'), |
| | | field: 'processPlanEndDay', |
| | | width: 200, |
| | | align:"center", |
| | | }, |
| | | // { |
| | | // title: '未开工数量', |
| | | // field: 'notStartWorkCount', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: '已完成数量', |
| | | // field: 'completedCount', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: '废弃数量', |
| | | // field: 'discardCount', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | { |
| | | title: t('page.table.standardTime'), |
| | | field: 'standardTime', |
| | | width: 90, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: t('page.table.processOrder'), |
| | | field: 'processOrder', |
| | | width: 90, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: t('page.table.integrationDay'), |
| | | field: 'integrationDay', |
| | | width: 160, |
| | | align:"center", |
| | | } |
| | | }); |
| | | |
| | | const { queryParams } = toRefs(data); |
| | | ] |
| | | getList(); |
| | | },{immediate:true, deep:true}) |
| | | /** 查询钣金计划临时管理列表 */ |
| | | function getExampleList() { |
| | | loading.value = true; |
| | |
| | | } |
| | | /*定义下拉二级表*/ |
| | | |
| | | const subGridOptions = reactive({ |
| | | border: true, |
| | | showOverflow: true, |
| | | columns: [ |
| | | { |
| | | title: '料号', |
| | | field: 'itemNo', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工单号', |
| | | field: 'workOrderNo', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序序号', |
| | | field: 'processNumber', |
| | | width: 100, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序名称', |
| | | field: 'processName', |
| | | width: 150, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序计划开始日期', |
| | | field: 'processPlanStartDay', |
| | | width: 200, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序计划结束日期', |
| | | field: 'processPlanEndDay', |
| | | width: 200, |
| | | align:"center", |
| | | }, |
| | | // const subGridOptions = ref({ |
| | | // border: true, |
| | | // showOverflow: true, |
| | | // columns: [ |
| | | // { |
| | | // title: '未开工数量', |
| | | // field: 'notStartWorkCount', |
| | | // title: t('page.table.itemNumber'), |
| | | // field: 'itemNo', |
| | | // width: 150, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: t('page.table.workOrderNo'), |
| | | // field: 'workOrderNo', |
| | | // width: 150, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: t('page.table.processNumber'), |
| | | // field: 'processNumber', |
| | | // width: 100, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: t('page.table.processName'), |
| | | // field: 'processName', |
| | | // width: 150, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: t('page.table.startDateOfProcessPlan'), |
| | | // field: 'processPlanStartDay', |
| | | // width: 200, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: '工序计划结束日期', |
| | | // field: 'processPlanEndDay', |
| | | // width: 200, |
| | | // align:"center", |
| | | // }, |
| | | // // { |
| | | // // title: '未开工数量', |
| | | // // field: 'notStartWorkCount', |
| | | // // width: 90, |
| | | // // align:"center", |
| | | // // }, |
| | | // // { |
| | | // // title: '已完成数量', |
| | | // // field: 'completedCount', |
| | | // // width: 90, |
| | | // // align:"center", |
| | | // // }, |
| | | // // { |
| | | // // title: '废弃数量', |
| | | // // field: 'discardCount', |
| | | // // width: 90, |
| | | // // align:"center", |
| | | // // }, |
| | | // { |
| | | // title: '标准工时', |
| | | // field: 'standardTime', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: '已完成数量', |
| | | // field: 'completedCount', |
| | | // title: '工序排序', |
| | | // field: 'processOrder', |
| | | // width: 90, |
| | | // align:"center", |
| | | // }, |
| | | // { |
| | | // title: '废弃数量', |
| | | // field: 'discardCount', |
| | | // width: 90, |
| | | // title: '集成日期', |
| | | // field: 'integrationDay', |
| | | // width: 160, |
| | | // align:"center", |
| | | // }, |
| | | { |
| | | title: '标准工时', |
| | | field: 'standardTime', |
| | | width: 90, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '工序排序', |
| | | field: 'processOrder', |
| | | width: 90, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '集成日期', |
| | | field: 'integrationDay', |
| | | width: 160, |
| | | align:"center", |
| | | } |
| | | ] |
| | | }) |
| | | // } |
| | | // ] |
| | | // }) |
| | | |
| | | const expandConfig = ref({ |
| | | lazy: true, |
| | | loadMethod ({ row }) { |