|
|
@ -57,13 +57,14 @@ |
|
|
|
:detailAllSchemas="detailAllSchemas" |
|
|
|
:detailAllSchemasRules="MesOrderMonthSubRules" |
|
|
|
:apiPage="MesOrderMonthApi.getMesOrderMonthSubPage" |
|
|
|
:apiCreate="MesOrderMonthApi.createMesOrderMonthSub" |
|
|
|
:apiUpdate="MesOrderMonthApi.updateMesOrderMonthSub" |
|
|
|
:apiCreate="createMesOrderMonthSub" |
|
|
|
:apiUpdate="updateMesOrderMonthSub" |
|
|
|
:apiDelete="MesOrderMonthApi.deleteMesOrderMonthSub" |
|
|
|
:tabs="TabsList" |
|
|
|
:detailButtonIsShowDelete="true" |
|
|
|
:detailButtonIsShowEdit="true" |
|
|
|
:detailButtonIsShowAdd="true" |
|
|
|
@searchTableSuccessDetail="searchTableSuccess" |
|
|
|
/> |
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" url="/plan/mes-order-month-main/import" |
|
|
@ -81,6 +82,8 @@ import { |
|
|
|
MesOrderMonthSub, |
|
|
|
MesOrderMonthSubRules |
|
|
|
} from "@/views/mes/ordermonthplan/mesOrderMonthSub.data"; |
|
|
|
import * as OrderDayApi from "@/api/mes/orderDay"; |
|
|
|
import {MesOrderMonthSubVO} from "@/api/mes/ordermonthplan"; |
|
|
|
|
|
|
|
defineOptions({ name: 'MesOrderMonthMain' }) |
|
|
|
|
|
|
@ -91,14 +94,6 @@ const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref(MesOrderMonthMain.allSchemas.tableColumns) |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
|
nextTick(() => { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
|
} |
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
|
tableColumns.value = val |
|
|
@ -111,6 +106,7 @@ const { tableObject, tableMethods } = useTable({ |
|
|
|
// 获得表格的各种操作 |
|
|
|
const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({hasPermi: 'mes:ordermonthplan:create'}), // 新增 |
|
|
@ -255,4 +251,40 @@ onMounted(async () => { |
|
|
|
importTemplateData.templateUrl = await MesOrderMonthApi.importTemplate() |
|
|
|
}) |
|
|
|
const detailAllSchemas = ref(MesOrderMonthSub.allSchemas) |
|
|
|
// 查询页面返回 |
|
|
|
let productName |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
|
nextTick(() => { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
formRef.setValues(setV) |
|
|
|
if(formField=='productCode'){ |
|
|
|
//formRef.setValues({standardBom:'bomddd'}) |
|
|
|
// getProcessroutes(val[0][searchField]) |
|
|
|
productName = val[0].name |
|
|
|
getBoms(val[0][searchField]) |
|
|
|
} |
|
|
|
// if(formField=='workroomCode'){ |
|
|
|
// getProductlines(val[0][searchField]) |
|
|
|
// } |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
const bomOptions=ref([]) |
|
|
|
const getBoms = async (code: String) => { |
|
|
|
bomOptions.value = await OrderDayApi.getBoms(code) |
|
|
|
MesOrderMonthSub.allSchemas.formSchema.forEach(item => { |
|
|
|
if (item.field == 'bomCode') { |
|
|
|
item.componentProps.options = bomOptions.value |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
const createMesOrderMonthSub = async (data: MesOrderMonthSubVO) => { |
|
|
|
data.productName = productName |
|
|
|
return await MesOrderMonthApi.createMesOrderMonthSub(data) |
|
|
|
} |
|
|
|
const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => { |
|
|
|
data.productName = productName |
|
|
|
return await MesOrderMonthApi.updateMesOrderMonthSub(data) |
|
|
|
} |
|
|
|
</script> |
|
|
|