Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
ljlong_2630 8 months ago
parent
commit
410c3d8ad7
  1. 4
      src/api/qms/aql/index.ts
  2. 38
      src/views/mes/orderDay/components/orderDetail.vue
  3. 28
      src/views/mes/orderDay/components/processSearch.data.ts
  4. 238
      src/views/mes/orderDay/components/schedule.vue
  5. 22
      src/views/mes/orderDay/index.vue
  6. 86
      src/views/mes/orderDay/orderDay.data.ts
  7. 49
      src/views/mes/processroute/components/configDialog.vue
  8. 12
      src/views/mes/processroute/processroute.data.ts
  9. 15
      src/views/qms/aql/aql.data.ts
  10. 170
      src/views/qms/basicDataManage/inspectionScheme/addForm.vue
  11. 50
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
  12. 40
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
  13. 36
      src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts
  14. 8
      src/views/qms/inspection/inspectionRequest/index.vue
  15. 109
      src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts
  16. 76
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  17. 438
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  18. 74
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  19. 264
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

4
src/api/qms/aql/index.ts

@ -101,3 +101,7 @@ export const exportAql = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/qms/aql/get-import-template' }) return request.download({ url: '/qms/aql/get-import-template' })
} }
export const getSamplingScheme = async () => {
return await request.get({ url: `/qms/sampling-scheme/get-available-list`})
}

38
src/views/mes/orderDay/components/orderDetail.vue

@ -25,8 +25,8 @@
/> />
</ContentWrap> </ContentWrap>
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card" @tab-click="handleClick" style="margin-top: 5px;height: min-height:240px;">
<el-tab-pane label="工艺路线信息" name="processRouteInfo"> <el-tab-pane label="工艺信息" name="processInfo">
<div class="mt-20px"> <div class="mt-20px">
<el-space :size="10" spacer="|"> <el-space :size="10" spacer="|">
<span>名称<el-tag v-if="processRouteInfoSchema.processrouteInfo!=null">{{ processRouteInfoSchema.processrouteInfo.processName}} </el-tag></span> <span>名称<el-tag v-if="processRouteInfoSchema.processrouteInfo!=null">{{ processRouteInfoSchema.processrouteInfo.processName}} </el-tag></span>
@ -44,7 +44,6 @@
> >
<el-table-column prop="nodeSort" label="序号" align="center"/> <el-table-column prop="nodeSort" label="序号" align="center"/>
<el-table-column prop="preCode" label="前置工序" align="center"> <el-table-column prop="preCode" label="前置工序" align="center">
<template #default="scope"> <template #default="scope">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-tag <el-tag
@ -88,35 +87,6 @@
<el-table-column prop="version" label="版本" align="center" /> <el-table-column prop="version" label="版本" align="center" />
</el-table> </div </el-table> </div
></el-tab-pane> ></el-tab-pane>
<el-tab-pane label="班组人员信息" name="workTeamInfo"
><div class="mt-20px">
<el-table
ref="tableRoute"
:data="workTeamInfoSchema"
style="width: 100%"
>
<el-table-column prop="id" label="ID" align="center" />
<el-table-column prop="userName" label="人员工号" align="center" />
<el-table-column prop="nickeName" label="显示名称" align="center" />
<el-table-column prop="workGroup" label="所属班组" align="center" />
<el-table-column prop="lineCode" label="所属产线" align="center" />
<el-table-column prop="abliity" label="技能岗位" align="center" />
</el-table> </div
></el-tab-pane>
<el-tab-pane label="设备信息" name="deviceInfo"
><div class="mt-20px">
<el-table
ref="tableRoute"
:data="deviceInfoSchema"
style="width: 100%"
>
<el-table-column prop="productItemCode" label="设备编码" align="center" />
<el-table-column prop="componentItemCode" label="设备名称" align="center" />
<el-table-column prop="componentUom" label="所属车间" align="center" />
<el-table-column prop="componentQty" label="所属产线" align="center"/>
<el-table-column prop="status" label="设备状态" align="center" />
</el-table> </div
></el-tab-pane>
</el-tabs> </el-tabs>
</el-drawer> </el-drawer>
</div> </div>
@ -146,13 +116,11 @@ const detailData = ref(props.allSchemas)
componentUom:'----', componentUom:'----',
componentQty:'----', componentQty:'----',
version:'----'}]) version:'----'}])
const workTeamInfoSchema = ref( [] )
const deviceInfoSchema = ref([])
const processRouteInfoSchema = ref({ const processRouteInfoSchema = ref({
processrouteInfo: { processrouteCode: '', processName: '', routeVersion: '' }, processrouteInfo: { processrouteCode: '', processName: '', routeVersion: '' },
processrouteNodeDetailList: [] processrouteNodeDetailList: []
}) })
const isShowDrawer = ref(false) const isShowDrawer = ref(false)
const detailLoading = ref(false) const detailLoading = ref(false)
const nodeColumns = ref([ const nodeColumns = ref([

28
src/views/mes/orderDay/components/processSearch.data.ts

@ -0,0 +1,28 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
export const ProcessSearch = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '类型',
field: 'type',
dictType: DICT_TYPE.PROCESS_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
},
]))

238
src/views/mes/orderDay/components/schedule.vue

@ -17,83 +17,78 @@
width="200px" width="200px"
/> />
</ContentWrap> </ContentWrap>
<div style="height: 480px; overflow-y: auto"> <ContentWrap>
<el-tabs type="border-card" :active-name="activeName"> <el-container>
<el-tab-pane label="调整工艺路线" name="process"> <el-aside width="400px">
<el-container> <el-card>
<el-aside> <template #header>
<el-card style="max-width: 480px"> <div class="card-header">
<template #header> <span>工艺路线</span>
<div class="card-header"> <el-button
<span>原有工序</span> type="text"
</div> icon="el-icon-plus"
@click="opensearchTable"
style="float: right; padding: 3px 0"
>添加工序</el-button>
</div>
</template>
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%" @cell-dblclick="userAddNode">
<el-table-column prop="code" label="工序编码" />
<el-table-column prop="name" label="工序名称" />
<el-table-column prop="oper" label="" width="60">
<template #default="scope">
<el-button size="mini" text @click="deleteNode(scope.row)"
>移除</el-button
>
</template>
</el-table-column>
</el-table>
</el-card>
</el-aside>
<el-main style="height: 480px;width: calc(100% - 900px);padding: 0px; margin:0px 20px">
<div ref="graphContainer" ></div
></el-main>
<el-aside width="500px">
<el-tabs v-model="activeName">
<el-tab-pane label="人员配置" name="process">
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%">
<el-table-column prop="name" label="人员">
<template #default="scope">
<el-button size="mini" text @click="userAddNode(scope.row)" style="width: 100%"
>{{ scope.row.name }}[{{ scope.row.code }}]</el-button
>
</template> </template>
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%"> </el-table-column>
<el-table-column prop="name" label="工序名称"> <el-table-column prop="code" label="工序编码" width="180" v-if="false" />
<template #default="scope"> </el-table>
<el-button size="mini" text @click="userAddNode(scope.row)" style="width: 100%" </el-tab-pane>
>{{ scope.row.name }}[{{ scope.row.code }}]</el-button <el-tab-pane label="工作位置配置" name="ddddd">
> <el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%">
</template> <el-table-column prop="name" label="工作位置">
</el-table-column> <template #default="scope">
<el-table-column prop="code" label="工序编码" width="180" v-if="false" /> <el-button size="mini" text @click="userAddNode(scope.row)" style="width: 100%"
</el-table> >{{ scope.row.name }}[{{ scope.row.code }}]</el-button
</el-card> >
</el-aside>
<el-main><div ref="graphContainer"></div></el-main>
<!-- <el-aside
><el-card style="max-width: 480px">
<template #header>
<div class="card-header">
<span>可选工序</span>
</div>
</template> </template>
<p v-for="o in 4" :key="o" class="text item">{{ 'List item ' + o }}</p> </el-table-column>
<template #footer>Footer content</template> <el-table-column prop="code" label="工序编码" width="180" v-if="false" />
</el-card></el-aside </el-table>
> --> </el-tab-pane>
</el-container> </el-tabs>
</el-tab-pane> </el-aside>
<el-tab-pane label="调整临时BOM" name="boms">
<TableForm
ref="tableProcess"
:table-data="tableDataProcess"
:table-fields="tableColumnsProcess"
:loading="loading"
@handleAddTable="handleAddTable(tableDataProcess)"
@handle-delete-table="handleDeleteTable(item, index,tableDataProcess)"
/>
</el-tab-pane>
<el-tab-pane label="调整可用设备" name="device" </el-container>
><TableForm </ContentWrap>
ref="tableProcess"
:table-data="tableDataProcess"
:table-fields="tableColumnsProcess"
:loading="loading"
@handleAddTable="handleAddTable(tableDataProcess)"
@handle-delete-table="handleDeleteTable(item, index,tableDataProcess)"
/></el-tab-pane>
<el-tab-pane label="调整班组人员" name="worker"
><TableForm
ref="tableProcess"
:table-data="tableDataProcess"
:table-fields="tableColumnsProcess"
:loading="loading"
@handleAddTable="handleAddTable(tableDataProcess)"
@handle-delete-table="handleDeleteTable(item, index,tableDataProcess)"
/></el-tab-pane>
</el-tabs>
</div>
<template #footer> <template #footer>
<el-button @click="dialogVisible = false">发布计划</el-button> <el-button @click="dialogVisible = false">发布计划</el-button>
</template> </template>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</Dialog> </Dialog>
<!-- <SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" /> --> <!-- <SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" /> -->
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
defineOptions({ name: 'sechledDetail' })
//import { dateFormatter } from '@/utils/formatTime' //import { dateFormatter } from '@/utils/formatTime'
import { import {
start_node, start_node,
@ -102,6 +97,9 @@ import {
getNewNode getNewNode
} from '@/views/mes/processroute/components/graphbase.data' } from '@/views/mes/processroute/components/graphbase.data'
import * as ProcessrouteApi from '@/api/mes/processroute' import * as ProcessrouteApi from '@/api/mes/processroute'
import {ProcessSearch} from './processSearch.data'
import * as ProcessApi from '@/api/wms/process'
import { SearchTable } from '@/components/SearchTable'
import { Graph } from '@antv/x6' import { Graph } from '@antv/x6'
const graphContainer = ref<HTMLElement | null>(null) const graphContainer = ref<HTMLElement | null>(null)
const graph = ref<Graph>() const graph = ref<Graph>()
@ -109,7 +107,7 @@ const message = useMessage() // 消息弹窗
const { t } = useI18n() // const { t } = useI18n() //
const activeName = ref('process') const activeName = ref('process')
const loading = ref(true) const loading = ref(true)
const processData=ref() const processData = ref([])
const props = defineProps({ const props = defineProps({
// //
isSearchFilterButtonHide: { isSearchFilterButtonHide: {
@ -131,54 +129,6 @@ const props = defineProps({
const detailData = ref(props.allSchemas) const detailData = ref(props.allSchemas)
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
const tableDataProcess = ref([
{
type: '',
value: ''
}
])
const tableColumnsProcess = ref([
{
label: '结束时间',
field: 'endTime',
sort: 'custom',
isReadonly: true,
form: {
component: 'TimePicker',
componentProps: {
type: 'time',
dateFormat: 'HH:mm'
}
}
},
{
label: '生产模式',
field: 'taskMode',
width: '80px',
sort: 'custom',
dictType: 'mes_task_mode',
dictClass: 'string',
form: {
component: 'Select',
value: 'ASSIGN'
}
}
])
//
const handleAddTable = (name:any) => {
message.success('添加成功')
let tableFormKeys = {
type: '',
value: ''
}
name.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index,name) => {
console.log(name)
name.splice(index, 1)
}
routeName.value = route.name routeName.value = route.name
routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail' routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail'
@ -279,15 +229,15 @@ const open = async (type: string, row?: any, titleName?: any) => {
dialogVisible.value = true dialogVisible.value = true
detailData.value = row detailData.value = row
dialogWidth.value = props.basicFormWidth + '%' dialogWidth.value = props.basicFormWidth + '%'
//console.log(props.allSchemas) //
//console.log(row) getProcessroute('001')
if (titleName) { if (titleName) {
dialogTitle.value = t('action.' + titleName) dialogTitle.value = t('action.' + titleName)
} else { } else {
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
} }
nextTick(() => { nextTick(() => {
graph.value = createGraph(graphContainer.value as HTMLElement, false, dialogWidth.value-200, 320) graph.value = createGraph(graphContainer.value as HTMLElement, true, 240, 320)
// graph.value.on('node:click', ({ e, x, y, node, view }) => { // graph.value.on('node:click', ({ e, x, y, node, view }) => {
// nodeClick(e, x, y, node, view) // nodeClick(e, x, y, node, view)
// }) // })
@ -318,6 +268,58 @@ const userAddNode = (row) => {
} }
} }
} }
//线
const getProcessroute = async (code: String) => {
let res = await ProcessrouteApi.getProcesInfo(code)
if (res.code == 200) {
processData.value = res.data
}
}
const searchTableRef = ref()
const opensearchTable = (
) => {
console.log("opensearchTable")
const _searchCondition = {}
const _searchTableTitle = "工序查询"
const _searchTableAllSchemas = ProcessSearch.allSchemas
const _searchTablePage = ProcessApi.getProcessPage
searchTableRef.value.open(
_searchTableTitle,
_searchTableAllSchemas,
_searchTablePage,
undefined,
undefined,
true,
undefined,
undefined,
_searchCondition,
false,
true
)
}
//
// val row
const searchTableSuccess = (formField, searchField, val, type, row) => {
//console.log("searchTableSuccess",val)
if(val.length>0){
val.forEach(item=>{
if(processData.value.find(obj=>obj.code==item.code)==undefined){
processData.value.push({code:item.code,name:item.name})}
})
}
//emit('searchTableSuccess', formField, searchField, val, undefined, type, row)
}
const deleteNode=(row)=>{
processData.value.splice(processData.value.indexOf(row),1)
graph.value.removeNode(row.code)
}
defineOptions({ name: 'sechledDetail' })
defineExpose({ open }) // open defineExpose({ open }) // open
</script> </script>
<style lang="scss"> <style lang="scss">

22
src/views/mes/orderDay/index.vue

@ -56,6 +56,7 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
:isSearchFilterButtonHide="true" :isSearchFilterButtonHide="true"
@onChange="valueChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -80,6 +81,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import orderDetail from './components/orderDetail.vue' import orderDetail from './components/orderDetail.vue'
import scheduleDetail from './components/schedule.vue' import scheduleDetail from './components/schedule.vue'
import { disabledTimeListsProps } from 'node_modules/element-plus/es/components/time-picker/src/props/shared'
defineOptions({ name: 'MesOrderDay' }) defineOptions({ name: 'MesOrderDay' })
const message = useMessage() // const message = useMessage() //
@ -137,6 +139,20 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
}) })
}
const valueChange=(filed,cur)=>{
if(filed=='noAutoFlag'){
OrderDay.allSchemas.formSchema.forEach(item => {
if (item.field == 'planNoDay') {
item.componentProps.disabled = cur==='ENABLE'?true:false
//console.log("item",OrderDayRules)
OrderDayRules.planNoDay[0].required = cur==='ENABLE'?false:true
//item.componentProps.required = cur==='ENABLE'?false:true
}
})
}
} }
// //
@ -193,13 +209,13 @@ const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row,['1']),hasPermi:'mes:orderDay:update'}), // defaultButtons.mainListEditBtn({ hide: isShowMainButton(row,['1']),hasPermi:'mes:orderDay:update'}), //
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row,['1']),hasPermi:'mes:orderDay:delete'}), // defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row,['1']),hasPermi:'mes:orderDay:delete'}), //
defaultButtons.mainListHandleBtn({label: '发布', defaultButtons.mainListHandleBtn({label: '排产',
name: 'publish', name: 'publish',
hide: isShowMainButton(row,['1']), hide: isShowMainButton(row,['1']),
type: 'warning', type: 'warning',
icon: '', icon: '',
color: '', color: '',
hasPermi: ''}), // hasPermi: 'mes:orderDay:update'}), //
// defaultButtons.mainListHandleBtn({label: '', // defaultButtons.mainListHandleBtn({label: '',
// name: 'publish', // name: 'publish',
// hide: isShowMainButton(row,['2']), // hide: isShowMainButton(row,['2']),
@ -224,7 +240,7 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if(val=='schedule'){ // } else if(val=='publish'){ //
openScheduledDetail( '发布计划', row,row.planNoDay) openScheduledDetail( '发布计划', row,row.planNoDay)
} }
} }

86
src/views/mes/orderDay/orderDay.data.ts

@ -4,13 +4,13 @@ import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as WorkshopApi from '@/api/wms/workshop' import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import { on } from '@/utils/domUtils'
// 表单校验 // 表单校验
export const OrderDayRules = reactive({ export const OrderDayRules = reactive({
planNoDay: [ // planNoDay: [
{ required: true, message: '请输入一个日计划编号', trigger: 'blur' } // { required: false, message: '请输入一个日计划编号', trigger: 'blur' }
], // ],
planNoMonth: [ planNoMonth: [
{ required: true, message: '请输入一个月计划编号', trigger: 'blur' } { required: true, message: '请输入一个月计划编号', trigger: 'blur' }
], ],
@ -38,6 +38,9 @@ export const OrderDayRules = reactive({
taskMode: [ taskMode: [
{ required: true, message: '请选择一个生产方式', trigger: 'blur' } { required: true, message: '请选择一个生产方式', trigger: 'blur' }
], ],
processrouteCode: [
{ required: true, message: '请选择一个工艺路线!', trigger: 'blur' }
],
}) })
export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
@ -53,7 +56,34 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
field: 'planNoDay', field: 'planNoDay',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
required: true, required: false,
form: {
component: 'Input',
componentProps: {
disabled: true
}
},
},
{
label: '',
field: 'noAutoFlag',
sort: 'custom',
isForm: true,
isTable: false,
isDetail:false,
isSearch: false,
width: '60px',
dictType: DICT_TYPE.ITEM_STATUS,
dictClass: 'string',
form: {
component: 'Switch',
value: 'ENABLE',
componentProps: {
inactiveValue: 'DISABLE',
activeValue: 'ENABLE'
}
},
}, },
{ {
label: '月计划单号', label: '月计划单号',
@ -102,7 +132,7 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
key: 'type', key: 'type',
action: 'in', // 查询拼接条件 action: 'in', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 isSearch: true, // 使用自定义拼接条件
value: 'FG,SEMI',//,SEMI] value: 'CCP,BCP',//,SEMI]
isMainValue: false isMainValue: false
}, },
@ -169,7 +199,7 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '临时工艺', label: '允许临时工艺',
field: 'tempProcessroute', field: 'tempProcessroute',
sort: 'custom', sort: 'custom',
width: '80px', width: '80px',
@ -185,32 +215,30 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: 'BOM编码', label: 'BOM版本',
field: 'standardBom', field: 'standardBom',
sort: 'custom', sort: 'custom',
form: { form: {
component:'Select', component: 'InputNumber',
componentProps: { value: 1
options: [{lablel:'bom',value:'bom'}] },
}
}
},
{
label: '替代BOM',
field: 'tempBom',
sort: 'custom',
width: '80px',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
}
}
}, },
// {
// label: '替代BOM',
// field: 'tempBom',
// sort: 'custom',
// width: '80px',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE',
// }
// }
// },
{ {
label: '工单模式', label: '工单模式',
field: 'workMode', field: 'workMode',

49
src/views/mes/processroute/components/configDialog.vue

@ -24,7 +24,7 @@
</div> </div>
</template> </template>
<el-row :gutter="10" style="height: calc(100vh - 300px)"> <el-row :gutter="10" style="height: 65%">
<el-col :span="6"> <el-col :span="6">
<el-input v-model="processListParmas.name" placeholder="工序名称"> <el-input v-model="processListParmas.name" placeholder="工序名称">
<template #append> <template #append>
@ -32,10 +32,10 @@
</template> </template>
</el-input> </el-input>
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%"> <el-table :data="processData" ref="tableProcess" style="width: 100%; height: 90%">
<el-table-column prop="name" label="工序名称"> <el-table-column prop="name" label="工序名称">
<template #default="scope"> <template #default="scope">
<el-button size="mini" text @click="userAddNode(scope.row)" style="width: 100%" <el-button size="mini" text @click="userAddNode(scope.row)" style="width: 90%"
>{{ scope.row.name }}[{{ scope.row.code }}]</el-button >{{ scope.row.name }}[{{ scope.row.code }}]</el-button
> >
</template> </template>
@ -43,7 +43,7 @@
<el-table-column prop="code" label="工序编码" width="180" v-if="false" /> <el-table-column prop="code" label="工序编码" width="180" v-if="false" />
</el-table> </el-table>
</el-col> </el-col>
<el-col :span="12"><div ref="graphContainer"></div> <el-col :span="12"><div ref="graphContainer" style="width: 90%; height: 90%"></div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -71,9 +71,11 @@
<el-card class="footer-card"> <el-card class="footer-card">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
<span>产品信息</span> <span>工艺路线基本信息</span>
</div> </div>
</template> </template>
<p >工艺路线名称<span v-if="productData!=null">{{ productData.name }}</span></p>
<p >工艺路线编码<span v-if="productData!=null">{{ productData.name }}</span></p>
<p >产品名称<span v-if="productData!=null">{{ productData.name }}</span></p> <p >产品名称<span v-if="productData!=null">{{ productData.name }}</span></p>
<p>产品编码<span v-if="productData!=null">{{ productData.code }}</span></p> <p>产品编码<span v-if="productData!=null">{{ productData.code }}</span></p>
<p>产品描述<span v-if="productData!=null">{{ productData.desc1 }}</span></p> <p>产品描述<span v-if="productData!=null">{{ productData.desc1 }}</span></p>
@ -83,20 +85,28 @@
><el-card class="footer-card"> ><el-card class="footer-card">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
<span>设备信息</span> <span>物料信息</span>
</div> </div>
</template> </template>
<p v-for="item in deviceList" :key="item" class="text item">{{ item.name }}</p> <el-table :data="materialData" ref="tableMaterial" style="width: 100%; height: 80%">
<el-table-column prop="name" label="物料名称"/>
=
<el-table-column prop="code" label="物料编码"/>
<el-table-column prop="desc1" label="是否替代"/>
</el-table>
</el-card></el-col </el-card></el-col
> >
<el-col :span="6" <el-col :span="6"
><el-card class="footer-card"> ><el-card class="footer-card">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
<span>人员信息</span> <span>模具信息</span>
</div> </div>
</template> </template>
<p v-for="item in workerList" :key="item" class="text item">{{ item.name }}</p> <el-table :data="mouldData" ref="tableMould" style="width: 100%; height: 80%">
<el-table-column prop="name" label="模具名称"/>
<el-table-column prop="code" label="模具编码"/>
</el-table>
</el-card></el-col </el-card></el-col
> >
<el-col :span="6" <el-col :span="6"
@ -106,8 +116,10 @@
<span>工位信息</span> <span>工位信息</span>
</div> </div>
</template> </template>
<p>工位编码{{ workStationData.name }}</p> <el-table :data="workstationData" ref="tableWorkstation" style="width: 100%; height: 80%">
<p>工位名称{{ workStationData.code }}</p> <el-table-column prop="name" label="工位名称"/>
<el-table-column prop="code" label="工位编码"/>
</el-table>
</el-card></el-col </el-card></el-col
> >
</el-row> </el-row>
@ -142,13 +154,9 @@ const tableProcess = ref()
// const workshopCodeOptions = ref([{ code: '', name: '1' }]) // const workshopCodeOptions = ref([{ code: '', name: '1' }])
// const productionLineCodeOptions = ref([{ code: '', name: '线' }]) // const productionLineCodeOptions = ref([{ code: '', name: '线' }])
const productData = ref({ name: '', code: '', desc1: '--' }) // const productData = ref({ name: '', code: '', desc1: '--' }) //
const deviceList = ref([ const materialData=ref()
{ name: '设备', code: '0000' }, const mouldData = ref()
{ name: '设备', code: '0000' } const workstationData = ref() //
]) //
const workerList = ref([{ name: '--' }, { name: '--' }]) //
const workStationData = ref({ name: '工位', code: '' }) //
// //
const annexData = reactive({ const annexData = reactive({
annexList: [] annexList: []
@ -158,6 +166,7 @@ const remarksData = reactive({
remarksList: [], remarksList: [],
data: {} data: {}
}) })
const routeVersion=ref()
// //
const graph = ref<Graph>() const graph = ref<Graph>()
const openDetail = async (rowData: any) => { const openDetail = async (rowData: any) => {
@ -165,6 +174,7 @@ const openDetail = async (rowData: any) => {
titleNameRef.value = rowData.value.processrouteCode titleNameRef.value = rowData.value.processrouteCode
titleValueRef.value = rowData.value.processName titleValueRef.value = rowData.value.processName
processRouteId.value = rowData.value.id processRouteId.value = rowData.value.id
routeVersion.value=rowData.value.routeVersion
remarksData.data = { remarksData.data = {
tableId: rowData.value.id, tableId: rowData.value.id,
tableName: rowData.value.processrouteCode tableName: rowData.value.processrouteCode
@ -173,7 +183,7 @@ const openDetail = async (rowData: any) => {
let graphJson = JSON.parse(rowData.value.graphJson) let graphJson = JSON.parse(rowData.value.graphJson)
isShowDrawer.value = true isShowDrawer.value = true
nextTick(() => { nextTick(() => {
graph.value = createGraph(graphContainer.value as HTMLElement,true,800,600) graph.value = createGraph(graphContainer.value as HTMLElement,true,640,480)
graph.value.on('node:click', ({ e, x, y, node, view }) => { graph.value.on('node:click', ({ e, x, y, node, view }) => {
nodeClick(e, x, y, node, view) nodeClick(e, x, y, node, view)
}) })
@ -300,6 +310,7 @@ const saveResult = async () => {
} }
let gdata = { let gdata = {
processrouteCode: titleNameRef.value, processrouteCode: titleNameRef.value,
routeVersion:routeVersion.value,
graphJson: graph.value.toJSON(), graphJson: graph.value.toJSON(),
processrouteId: processRouteId.value processrouteId: processRouteId.value
} }

12
src/views/mes/processroute/processroute.data.ts

@ -93,12 +93,12 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '版本号', // label: '版本号',
field: 'routeVersion', // field: 'routeVersion',
sort: 'custom', // sort: 'custom',
isSearch: true, // isSearch: true,
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

15
src/views/qms/aql/aql.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import {getSamplingScheme} from "@/api/qms/aql";
// 表单校验 // 表单校验
export const AqlRules = reactive({ export const AqlRules = reactive({
@ -9,7 +10,7 @@ export const AqlRules = reactive({
sampleSize: [required], sampleSize: [required],
// available: [required], // available: [required],
}) })
const samplingSchemeList = await getSamplingScheme()
export const Aql = useCrudSchemas(reactive<CrudSchema[]>([ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: 'id', label: 'id',
@ -23,6 +24,16 @@ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
component: 'Select',
componentProps: {
options: samplingSchemeList,
optionsAlias: {
labelField: 'description',
valueField: 'code'
},
}
},
table: { table: {
width: 175, width: 175,
fixed: 'left' fixed: 'left'
@ -36,7 +47,7 @@ export const Aql = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true, isSearch: true,
form: { form: {
component: 'SelectV2' component: 'Select'
}, },
table: { table: {
width: 130 width: 130

170
src/views/qms/basicDataManage/inspectionScheme/addForm.vue

@ -436,7 +436,7 @@
<el-select <el-select
v-model="item.inspectionCharacteristicsBaseVO.featureType" v-model="item.inspectionCharacteristicsBaseVO.featureType"
placeholder="请选择特征类型" placeholder="请选择特征类型"
@change="changeFeatureType" @change="changeFeatureType($event,item)"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" :disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
> >
<el-option <el-option
@ -450,111 +450,106 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item <el-form-item
label="是否设定上限" label="计量单位"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" prop="inspectionCharacteristicsBaseVO.quantifyUom"
> >
<el-switch <el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" v-model="item.inspectionCharacteristicsBaseVO.quantifyUom"
@change="changeIsCapping"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" :disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item <el-form-item
label="上限值" label="小数位"
prop="inspectionCharacteristicsBaseVO.quantifyCapping" prop="inspectionCharacteristicsBaseVO.quantifyDecimal"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
> >
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" :disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item <el-form-item
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit" label="是否设定上限"
label="是否设定下限" prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
> >
<el-switch <el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping"
@change="changeLowlimit" @change="changeIsCapping($event,item)"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" :disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item <el-form-item
label="下限值" prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit" label="是否设定下限"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
> >
<el-input <el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
@change="changeLowlimit($event,item)"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" :disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item <el-form-item
prop="inspectionCharacteristicsBaseVO.quantifyIsTarget" prop="inspectionCharacteristicsBaseVO.quantifyIsTarget"
label="是否设定目标值" label="是否设定目标值"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
> >
<el-switch <el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget"
@change="changeIsTarget" @change="changeIsTarget($event,item)"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" :disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO. quantifyIsCapping">
<el-form-item <el-form-item
label="目标值" label="上限值"
prop="inspectionCharacteristicsBaseVO.quantifyTarget" prop="inspectionCharacteristicsBaseVO.quantifyCapping"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
> >
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" :disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit">
<el-form-item <el-form-item
label="计量单位" label="下限值"
prop="inspectionCharacteristicsBaseVO.quantifyUom" prop="inspectionCharacteristicsBaseVO.quantifyLowlimit"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
> >
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" :disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO. quantifyIsTarget">
<el-form-item <el-form-item
label="小数位" label="目标值"
prop="inspectionCharacteristicsBaseVO.quantifyDecimal" prop="inspectionCharacteristicsBaseVO.quantifyTarget"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
> >
<el-input <el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" :disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1">
<el-form-item <el-form-item
label="选择集" label="选择集"
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyCode" prop="inspectionCharacteristicsBaseVO.quantifyQuantifyCode"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 1"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
@ -751,7 +746,7 @@ const rules = ref({
{ required: true, message: '请输入目标值', trigger: 'blur' } { required: true, message: '请输入目标值', trigger: 'blur' }
], ],
'inspectionCharacteristicsBaseVO.quantifyCapping': [ 'inspectionCharacteristicsBaseVO.quantifyCapping': [
{ required: true, message: '请输入上限值', trigger: 'blur' } { required: true, message: '请输入上限值', trigger: ['blur','change'] }
], ],
'inspectionCharacteristicsBaseVO.quantifyLowlimit': [ 'inspectionCharacteristicsBaseVO.quantifyLowlimit': [
{ required: true, message: '请输入下限值', trigger: 'blur' } { required: true, message: '请输入下限值', trigger: 'blur' }
@ -785,26 +780,24 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
list = await InspectionProcessPageApi.getListByTempleteCode(row.programmeTemplateCode) list = await InspectionProcessPageApi.getListByTempleteCode(row.programmeTemplateCode)
} }
list.forEach((item, index) => { rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
editableTabsValue.value = index + 1 rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
item.name = index + 1 rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
// list.forEach((item, index) => {
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { editableTabsValue.value = index+1
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true item.name = index + 1
} else { // rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false //
} if (item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO.quantifyIsCapping) {
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true }
} else { if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
} }
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
} else { }
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false })
}
})
data.value.process = list data.value.process = list
} else { } else {
data.value = { data.value = {
@ -978,13 +971,21 @@ if (props.footButttondata) {
] ]
} }
// //
const changeFeatureType = (e) => { const changeFeatureType = (e,item) => {
item.inspectionCharacteristicsBaseVO.quantifyIsCapping = false
item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit = false
item.inspectionCharacteristicsBaseVO.quantifyIsTarget = false
item.inspectionCharacteristicsBaseVO.quantifyCapping = ''
item.inspectionCharacteristicsBaseVO.quantifyLowlimit = ''
item.inspectionCharacteristicsBaseVO.quantifyTarget= ''
item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode= ''
item.inspectionCharacteristicsBaseVO.quantifyQuantifyName= ''
console.log(e) console.log(e)
// if (e) { if (e) {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true
// } else { } else {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false
// } }
} }
const searchTableRef = ref() const searchTableRef = ref()
const opensearchTable = ( const opensearchTable = (
@ -1090,25 +1091,24 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
} }
if (formField == 'programmeTemplateCode') { if (formField == 'programmeTemplateCode') {
let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code) let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code)
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
list.forEach((item, index) => { list.forEach((item, index) => {
editableTabsValue.value = index + 1 editableTabsValue.value = index+1
item.name = index + 1 item.name = index + 1
// rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
// //
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { if (item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO.quantifyIsCapping) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
} }
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
} }
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
} }
}) })
data.value.process = list data.value.process = list
@ -1123,15 +1123,18 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) // emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row)
} }
// //
const changeIsCapping = (e) => { const changeIsCapping = (e,item) => {
item.inspectionCharacteristicsBaseVO.quantifyCapping = ''
if (e) { if (e) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
} else { } else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
} }
} }
// //
const changeLowlimit = (e) => { const changeLowlimit = (e,item) => {
item.inspectionCharacteristicsBaseVO.quantifyLowlimit = ''
if (e) { if (e) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
} else { } else {
@ -1139,7 +1142,8 @@ const changeLowlimit = (e) => {
} }
} }
// //
const changeIsTarget = (e) => { const changeIsTarget = (e,item) => {
item.inspectionCharacteristicsBaseVO.quantifyTarget = ''
if (e) { if (e) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
} else { } else {

50
src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

@ -257,7 +257,7 @@
<el-select <el-select
v-model="item.inspectionCharacteristicsBaseVO.featureType" v-model="item.inspectionCharacteristicsBaseVO.featureType"
placeholder="请选择特征类型" placeholder="请选择特征类型"
@change="changeFeatureType" @change="changeFeatureType($event,item)"
> >
<el-option <el-option
v-for="dict in getStrDictOptions( v-for="dict in getStrDictOptions(
@ -293,7 +293,7 @@
label="是否设定上限" label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
> >
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" @change="changeIsCapping"/> <el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" @change="changeIsCapping($event,item)"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -302,7 +302,7 @@
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit" prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
label="是否设定下限" label="是否设定下限"
> >
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" @change="changeLowlimit"/> <el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" @change="changeLowlimit($event,item)"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -313,7 +313,7 @@
label="是否设定目标值" label="是否设定目标值"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
> >
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" @change="changeIsTarget" /> <el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" @change="changeIsTarget($event,item)" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -737,11 +737,16 @@ const submitForm = async () => {
return return
} }
// ,, // ,,
console.log(data.value.process)
const arr1 = data.value.process.filter( const arr1 = data.value.process.filter(
(item) => (item) =>
((item.inspectionCharacteristicsBaseVO.quantifyIsCapping && (String(item.inspectionCharacteristicsBaseVO.quantifyCapping).split('.')[1].length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))|| // {
(item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && (String(item.inspectionCharacteristicsBaseVO.quantifyLowlimit).split('.')[1].length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))|| // console.log(String(item.inspectionCharacteristicsBaseVO.quantifyCapping).split('.')[1]?.length)
(item.inspectionCharacteristicsBaseVO.quantifyIsTarget && (String(item.inspectionCharacteristicsBaseVO.quantifyTarget).split('.')[1].length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))) && // console.log(Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal))
// }
((item.inspectionCharacteristicsBaseVO.quantifyIsCapping && (String(item.inspectionCharacteristicsBaseVO.quantifyCapping).split('.')[1]?.length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))||
(item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && (String(item.inspectionCharacteristicsBaseVO.quantifyLowlimit).split('.')[1]?.length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))||
(item.inspectionCharacteristicsBaseVO.quantifyIsTarget && (String(item.inspectionCharacteristicsBaseVO.quantifyTarget).split('.')[1]?.length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))) &&
item.inspectionCharacteristicsBaseVO.featureType == 0 item.inspectionCharacteristicsBaseVO.featureType == 0
) )
if (arr1 && arr1.length > 0) { if (arr1 && arr1.length > 0) {
@ -761,6 +766,7 @@ const submitForm = async () => {
// //
(item.inspectionCharacteristicsBaseVO.quantifyIsCapping && item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && item.inspectionCharacteristicsBaseVO.quantifyIsTarget && ((item.inspectionCharacteristicsBaseVO.quantifyCapping <=item.inspectionCharacteristicsBaseVO.quantifyLowlimit)||(item.inspectionCharacteristicsBaseVO.quantifyCapping <=item.inspectionCharacteristicsBaseVO.quantifyTarget)||(item.inspectionCharacteristicsBaseVO.quantifyLowlimit >= item.inspectionCharacteristicsBaseVO.quantifyTarget))) (item.inspectionCharacteristicsBaseVO.quantifyIsCapping && item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && item.inspectionCharacteristicsBaseVO.quantifyIsTarget && ((item.inspectionCharacteristicsBaseVO.quantifyCapping <=item.inspectionCharacteristicsBaseVO.quantifyLowlimit)||(item.inspectionCharacteristicsBaseVO.quantifyCapping <=item.inspectionCharacteristicsBaseVO.quantifyTarget)||(item.inspectionCharacteristicsBaseVO.quantifyLowlimit >= item.inspectionCharacteristicsBaseVO.quantifyTarget)))
) )
console.log(99,arr2)
if (arr2 && arr2.length > 0) { if (arr2 && arr2.length > 0) {
const str = arr2.map((item) => item.description).join(',') const str = arr2.map((item) => item.description).join(',')
message.error(`${str}上限值应大目标值大于下限值`) message.error(`${str}上限值应大目标值大于下限值`)
@ -788,13 +794,21 @@ if (props.footButttondata) {
] ]
} }
// //
const changeFeatureType = (e) => { const changeFeatureType = (e,item) => {
item.inspectionCharacteristicsBaseVO.quantifyIsCapping = false
item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit = false
item.inspectionCharacteristicsBaseVO.quantifyIsTarget = false
item.inspectionCharacteristicsBaseVO.quantifyCapping = ''
item.inspectionCharacteristicsBaseVO.quantifyLowlimit = ''
item.inspectionCharacteristicsBaseVO.quantifyTarget= ''
item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode= ''
item.inspectionCharacteristicsBaseVO.quantifyQuantifyName= ''
console.log(e) console.log(e)
// if (e) { if (e) {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true
// } else { } else {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false
// } }
} }
const searchTableRef = ref() const searchTableRef = ref()
const opensearchTable = ( const opensearchTable = (
@ -894,15 +908,18 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
} }
// //
const changeIsCapping = (e) => { const changeIsCapping = (e,item) => {
item.inspectionCharacteristicsBaseVO.quantifyCapping = ''
if (e) { if (e) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
} else { } else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
} }
} }
// //
const changeLowlimit = (e) => { const changeLowlimit = (e,item) => {
item.inspectionCharacteristicsBaseVO.quantifyLowlimit = ''
if (e) { if (e) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
} else { } else {
@ -910,7 +927,8 @@ const changeLowlimit = (e) => {
} }
} }
// //
const changeIsTarget = (e) => { const changeIsTarget = (e,item) => {
item.inspectionCharacteristicsBaseVO.quantifyTarget = ''
if (e) { if (e) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
} else { } else {

40
src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts

@ -372,26 +372,26 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
// } // }
// } // }
// }, // },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE', // activeValue: 'TRUE',
disabled:true // disabled:true
} // }
} // }
}, // },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

36
src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts

@ -10,7 +10,7 @@ const { t } = useI18n() // 国际化
*/ */
export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '记录编', label: '记录编',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
@ -344,17 +344,17 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
} }
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
sort: 'custom', // sort: 'custom',
isSearch: false, // isSearch: false,
isForm:false, // isForm:false,
table: { // table: {
width: 150 // width: 150
} // }
}, // },
{ {
label: '使用决策', label: '使用决策',
field: 'useDecision', field: 'useDecision',
@ -509,12 +509,12 @@ export const InspectionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
sort: 'custom', // sort: 'custom',
isSearch: false, // isSearch: false,
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

8
src/views/qms/inspection/inspectionRequest/index.vue

@ -43,14 +43,14 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionMain, InspectionMainRules } from './inspectionMain.data' import { InspectionMain, InspectionMainRules,InspectionRequestPackage } from './inspectionMain.data'
import * as InspectionMainApi from '@/api/qms/inspectionRequest' import * as InspectionMainApi from '@/api/qms/inspectionRequest'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import listTable from '@/components/listTable/src/listTable.vue' import listTable from '@/components/listTable/src/listTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data' // import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
defineOptions({ name: 'InspectionMain' }) defineOptions({ name: 'InspectionMain' })
@ -85,7 +85,7 @@
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn(null), // // defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:inspectionMain:import' }), // defaultButtons.defaultImportBtn({ hasPermi: 'wms:inspectionMain:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:inspectionMain:export' }), // defaultButtons.defaultExportBtn({ hasPermi: 'wms:inspectionMain:export' }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
@ -157,7 +157,7 @@ const listTableRef = ref()
openForm('update', row) openForm('update', row)
}else if (val == 'mainPackage') { // }else if (val == 'mainPackage') { //
const list = await InspectionMainApi.getInspectionRequestPackageList(row.id) const list = await InspectionMainApi.getInspectionRequestPackageList(row.id)
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list) listTableRef.value.openPackage(row,'包装信息',InspectionRequestPackage.allSchemas.tableColumns,list)
} }
} }

109
src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts

@ -163,9 +163,27 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
} }
}, },
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{ {
label: '物料编码', label: '物料编码',
field: 'materialCode', field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: { table: {
@ -317,16 +335,16 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
} }
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
sort: 'custom', // sort: 'custom',
isSearch: false, // isSearch: false,
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
table: { // table: {
width: 150 // width: 150
} // }
}, // },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
@ -337,3 +355,72 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
])) ]))
/**
* @returns {Array}
*/
export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
tableForm:{
disabled:true
},
table:{
width:150
}
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
},
table:{
width:150
}
},
]))

76
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -42,6 +42,8 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
@success="getList" @success="getList"
:isOpenSearchTable="true"
:indexTableColumn="1"
:rules="PurchasereceiptRequestMainRules" :rules="PurchasereceiptRequestMainRules"
:formAllSchemas="PurchasereceiptRequestMain.allSchemas" :formAllSchemas="PurchasereceiptRequestMain.allSchemas"
:tableAllSchemas="PurchasereceiptRequestDetail.allSchemas" :tableAllSchemas="PurchasereceiptRequestDetail.allSchemas"
@ -56,7 +58,6 @@
@submitForm="submitForm" @submitForm="submitForm"
@formFormDateChange="formFormDateChange" @formFormDateChange="formFormDateChange"
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
ref="detailRef" ref="detailRef"
@ -124,14 +125,18 @@ import {
PurchasereceiptRequestDetail, PurchasereceiptRequestDetail,
PurchasereceiptRequestDetailRules, PurchasereceiptRequestDetailRules,
PurchasereceiptRequestDetailLabel, PurchasereceiptRequestDetailLabel,
PurchasereceiptRequestDetailPackingNumber PurchasereceiptRequestDetailPackingNumber,
} from './purchasereceiptRequestMain.data' } from './purchasereceiptRequestMain.data'
import { PurchaseDetail } from '../../supplierdeliver/purchaseMain/purchaseMain.data'
import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain' import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain'
import * as PurchasereceiptRequestDetailApi from '@/api/wms/purchasereceiptRequestDetail' import * as PurchasereceiptRequestDetailApi from '@/api/wms/purchasereceiptRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as SupplieritemApi from '@/api/wms/supplieritem' import * as SupplieritemApi from '@/api/wms/supplieritem'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
// //
defineOptions({ name: 'PurchasereceiptRequestMain' }) defineOptions({ name: 'PurchasereceiptRequestMain' })
@ -166,17 +171,23 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else if(formField == 'poNumber') { } else if(formField == 'poNumber') {
row['poNumber'] = val[0]['number'] row['poNumber'] = val[0]['number']
} else if(formField == 'poLine'){ } else if(formField == 'poLine'){
row['poLine'] = val[0]['lineNumber'] //--
row['itemCode'] = val[0]['itemCode'] val.forEach(item=>{
row['uom'] = val[0]['uom'] if(tableData.value.find(item1=>item1['id'] == item['id'])) return
let supplierCode = formRef.formModel.supplierCode; const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))
let itemCode = val[0]['itemCode'] newRow['poLine'] = item['lineNumber']
let queryData = { newRow['itemCode'] = item['itemCode']
supplierCode:supplierCode, newRow['uom'] = item['uom']
itemCode:itemCode newRow['poNumber'] = item['number']
} let supplierCode = formRef.formModel.supplierCode;
SupplieritemApi.getDefaultLocationCode(queryData as SupplieritemApi.SupplieritemVO).then(res =>{ let queryData = {
row['defaultToLocationCode'] = res supplierCode:supplierCode,
itemCode: item['itemCode']
}
SupplieritemApi.getDefaultLocationCode(queryData as SupplieritemApi.SupplieritemVO).then(res =>{
newRow['defaultToLocationCode'] = res
tableData.value.push(newRow)
})
}) })
}else if (formField == 'packQty'){ }else if (formField == 'packQty'){
row['packQty'] = val[0]['packQty'] row['packQty'] = val[0]['packQty']
@ -186,6 +197,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const setV = {} const setV = {}
if(formField == 'supplierCode'){ if(formField == 'supplierCode'){
setV['supplierCode'] = val[0]['code'] setV['supplierCode'] = val[0]['code']
}else if(formField == 'ppNumber') {
//----
setV['supplierCode'] = val[0]['supplierCode']
setV['poNumber'] = val[0]['number']
const newRow = val[0]
newRow['poNumber'] = val[0]['number']
//
getSearchTableData(val[0]['number'],val[0]['supplierCode'])
// tableData.value = [newRow]
// formRef.handleAddTable()
} }
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
@ -351,6 +372,35 @@ const labelPrint = async (row) => {
} }
const getSearchTableData = async (number,supplierCode)=>{
const {tableObject ,tableMethods} = useTable({
defaultParams:{number},
getListApi: PurchaseDetailApi.getPurchaseDetailPage //
})
//
const { getList:getList1 } = tableMethods
await getList1()
const tableColumns = PurchaseDetail.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
tableData.value = []
tableObject.tableList.forEach(row=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))
newRow['poLine'] = row['lineNumber']
newRow['itemCode'] = row['itemCode']
newRow['uom'] = row['uom']
newRow['poNumber'] =row['number']
let queryData = {
supplierCode,
itemCode:row['itemCode']
}
SupplieritemApi.getDefaultLocationCode(queryData as SupplieritemApi.SupplieritemVO).then(res =>{
newRow['defaultToLocationCode'] = res
tableData.value.push(newRow)
})
})
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm =async (type: string, row?: number) => {

438
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -50,24 +50,24 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isSearch: true, isSearch: true,
}, },
{ {
label: '供应商代码', label: '采购订单',
field: 'supplierCode', field: 'ppNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 180
}, },
isSearch: true,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 searchListPlaceholder: '请选择采购订单', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'number', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题 searchTitle: '采购订单信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 searchAllSchemas: PurchaseMain.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法 searchPage: PurchaseMainApi.getPurchaseMainPage, // 查询弹窗所需分页方法
} }
} },
isForm: true,
}, },
{ {
label: '发货单号', label: '发货单号',
@ -79,42 +79,63 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isForm: true, isForm: true,
}, },
{ {
label: '要货计划单号', label: '供应商代码',
field: 'ppNumber', field: 'supplierCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 180 width: 150
}, },
isSearch: true,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 disabled: true,
searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本 isSearchList: false, // 开启查询弹窗
searchField: 'number', // 查询弹窗赋值字段 searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchTitle: '要货计划信息', // 查询弹窗标题 searchField: 'code', // 查询弹窗赋值字段
searchAllSchemas: PurchasePlanMain.allSchemas, // 查询弹窗所需类 searchTitle: '供应商信息', // 查询弹窗标题
searchPage: PurchasePlanMainApi.getPurchasePlanMainPage, // 查询弹窗所需分页方法 searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchCondition: [ searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
},
{
key: 'status',
value: 4,
isMainValue: false
},
{
key: 'available',
value: "TRUE",
isMainValue: false
}]
} }
}, }
isForm: true,
}, },
// {
// label: '要货计划单号',
// field: 'ppNumber',
// sort: 'custom',
// table: {
// width: 180
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本
// searchField: 'number', // 查询弹窗赋值字段
// searchTitle: '要货计划信息', // 查询弹窗标题
// searchAllSchemas: PurchasePlanMain.allSchemas, // 查询弹窗所需类
// searchPage: PurchasePlanMainApi.getPurchasePlanMainPage, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'supplierCode',
// value: 'supplierCode',
// message: '请填写供应商代码!',
// isMainValue: true
// },
// {
// key: 'status',
// value: 4,
// isMainValue: false
// },
// {
// key: 'available',
// value: "TRUE",
// isMainValue: false
// }]
// }
// },
// isForm: true,
// },
{ {
label: '承运商', label: '承运商',
field: 'carrierCode', field: 'carrierCode',
@ -141,22 +162,22 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
}, },
{ // {
label: '数据来源', // label: '数据来源',
field: 'sourceType', // field: 'sourceType',
dictType: DICT_TYPE.PURCHASERECEIPT_SOURCE_TYPE, // dictType: DICT_TYPE.PURCHASERECEIPT_SOURCE_TYPE,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
value: 'ASN_ExternalReceipt', // value: 'ASN_ExternalReceipt',
componentProps: { // componentProps: {
disabled: true // disabled: true
} // }
}, // },
isSearch: false, // isSearch: false,
}, // },
{ {
label: '从仓库代码', label: '从仓库代码',
field: 'fromWarehouseCode', field: 'fromWarehouseCode',
@ -303,50 +324,50 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}, },
isForm: false, isForm: false,
}, },
{ // {
label: '截止时间', // label: '截止时间',
field: 'dueTime', // field: 'dueTime',
formatter: dateFormatter, // formatter: dateFormatter,
detail: { // detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' // dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, // },
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 180 // width: 180
}, // },
form: { // form: {
component: 'DatePicker', // component: 'DatePicker',
componentProps: { // componentProps: {
style: {width:'100%'}, // style: {width:'100%'},
type: 'datetime', // type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', // dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', // valueFormat: 'x',
} // }
}, // },
}, // },
{ // {
label: '部门', // label: '部门',
field: 'departmentCode', // field: 'departmentCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { // formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userDeptArray.find((account) => account.id == cellValue)?.name // return userDeptArray.find((account) => account.id == cellValue)?.name
}, // },
form: { // form: {
value: userDept.id, // value: userDept.id,
component: 'Select', // component: 'Select',
api: () => userDeptArray, // api: () => userDeptArray,
componentProps: { // componentProps: {
disabled: true, // disabled: true,
optionsAlias: { // optionsAlias: {
labelField: 'name', // labelField: 'name',
valueField: 'id' // valueField: 'id'
} // }
} // }
} // }
}, // },
{ {
label: '状态', label: '状态',
field: 'status', field: 'status',
@ -476,6 +497,9 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
//表单校验 //表单校验
export const PurchasereceiptRequestMainRules = reactive({ export const PurchasereceiptRequestMainRules = reactive({
ppNumber: [
{ required: true, message: '请输入采购订单', trigger: 'blur' }
],
supplierCode: [ supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' } { required: true, message: '请输入供应商代码', trigger: 'blur' }
], ],
@ -583,6 +607,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
} }
}, },
tableForm:{ tableForm:{
multiple:true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择订单行', // 输入框占位文本 searchListPlaceholder: '请选择订单行', // 输入框占位文本
searchField: 'lineNumber', // 查询弹窗赋值字段 searchField: 'lineNumber', // 查询弹窗赋值字段
@ -653,9 +678,49 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
// {
// label: '数量',
// field: 'qty',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'InputNumber',
// componentProps: {
// min: 1,
// precision: 6
// },
// },
// tableForm: {
// type: 'InputNumber',
// min: 1,
// precision: 6
// }
// },
{
label: '订单数量',
field: 'orderQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
},
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{ {
label: '数量', label: '收货数量',
field: 'qty', field: 'receivedQty',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -689,14 +754,76 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
} }
}, },
{ {
label: '从库位代码', label: '包装规格',
field: 'fromLocationCode', field: 'packUnit',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true
}
},
tableForm:{
disabled:true
},
isTableForm: true,
isForm: true
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isTableForm: false, form: {
isForm: false componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
isTableForm: true,
isForm: true
}, },
{ {
label: '默认到库位代码', label: '默认到库位代码',
@ -774,16 +901,16 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
disabled: true disabled: true
} }
}, },
{ // {
label: '替代批次', // label: '替代批次',
field: 'altBatch', // field: 'altBatch',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTableForm: false, // isTableForm: false,
isForm: false // isForm: false
}, // },
{ {
label: '到货日期', label: '到货日期',
field: 'arriveDate', field: 'arriveDate',
@ -836,6 +963,17 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
valueFormat: 'x', valueFormat: 'x',
}, },
}, },
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{ {
label: '库存状态', label: '库存状态',
field: 'inventoryStatus', field: 'inventoryStatus',
@ -852,78 +990,8 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
type: 'Select' type: 'Select'
} }
}, },
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
isTableForm: true,
isForm: true
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true
}
},
tableForm:{
disabled:true
},
isTableForm: true,
isForm: true
},
{ {
label: '供应商计量数量', label: '供应商计量数量',
field: 'supplierPackQty', field: 'supplierPackQty',

74
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -28,6 +28,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" <BasicForm ref="formRef" @success="getList"
:isOpenSearchTable="true"
:indexTableColumn="1"
:rules="PurchasePlanMainRules" :rules="PurchasePlanMainRules"
:formAllSchemas="PurchasePlanMain.allSchemas" :formAllSchemas="PurchasePlanMain.allSchemas"
:tableAllSchemas="PurchasePlanDetail.allSchemas" :tableAllSchemas="PurchasePlanDetail.allSchemas"
@ -72,6 +74,7 @@
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { PurchaseDetail } from '../purchaseMain/purchaseMain.data'
// //
defineOptions({ name: 'PurchasePlanMain' }) defineOptions({ name: 'PurchasePlanMain' })
@ -91,28 +94,39 @@
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
console.log('searchTableSuccess', formField, searchField, val, formRef, type, row)
nextTick(async () => { nextTick(async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] val.forEach(item=>{
row['itemCode'] = val[0]['code'] if(tableData.value.find(item1=>item1['id'] == item['id'])) return
row['poNumber'] = val[0]['number'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))
row['poLine'] = val[0]['lineNumber']
if (formField == 'poLine') { newRow[formField] = item[searchField]
row['itemCode'] = val[0]['itemCode'] newRow['itemCode'] = item['code']
row['uom'] = val[0]['uom'] newRow['poNumber'] = item['number']
row['orderQty'] = val[0]['orderQty'] newRow['poLine'] = item['lineNumber']
row['planQty'] = val[0]['orderQty']-val[0]['plannedQty'] if (formField == 'poLine') {
row['available'] = val[0]['available'] //--
} newRow['itemCode'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['orderQty'] = item['orderQty']
newRow['planQty'] = item['orderQty']-item['plannedQty']
newRow['available'] = item['available']
}
tableData.value.push(newRow)
})
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
setV['itemCode'] = val[0]['code'] setV['itemCode'] = val[0]['code']
setV['poNumber'] = val[0]['number'] setV['poNumber'] = val[0]['number']
setV['poLine'] = val[0]['lineNumber'] setV['poLine'] = val[0]['lineNumber']
if(formField == 'supplierCode'){ if(formField == 'supplierCode'){
setV['supplierCode'] = val[0]['code'] setV['supplierCode'] = val[0]['code']
setV['contacts'] = val[0]['contacts']
setV['phone'] = val[0]['phone']
await PurchasePlanMainApi.queryPurchasePlan(val[0]['code']).then(res => { await PurchasePlanMainApi.queryPurchasePlan(val[0]['code']).then(res => {
let beginTime = res.beginTime let beginTime = res.beginTime
var ms = beginTime.substring(0, 2) var ms = beginTime.substring(0, 2)
@ -123,6 +137,7 @@
var me = endTime.substring(3) var me = endTime.substring(3)
setV['endTime'] = new Date(2024, 1, 1, Number(ms), Number(me)) setV['endTime'] = new Date(2024, 1, 1, Number(ms), Number(me))
}) })
tableData.value = []
} }
if (formField == 'poLine') { if (formField == 'poLine') {
setV['itemCode'] = val[0]['itemCode'] setV['itemCode'] = val[0]['itemCode']
@ -132,9 +147,46 @@
setV['available'] = val[0]['available'] setV['available'] = val[0]['available']
} }
formRef.setValues(setV) formRef.setValues(setV)
console.log('formModel',formRef.formModel)
if(formField == 'poNumber') {
//----
//
getSearchTableData(val[0]['number'],formField,searchField)
}
} }
}) })
} }
const getSearchTableData = async (number,formField,searchField)=>{
const {tableObject ,tableMethods} = useTable({
defaultParams:{number},
getListApi: PurchaseDetailApi.getPurchaseDetailPagePoNumber //
})
//
const { getList:getList1 } = tableMethods
await getList1()
const tableColumns = PurchaseDetail.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
tableData.value = []
tableObject.tableList.forEach(row=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))
//
newRow[formField] = row[searchField]
newRow['itemCode'] = row['itemCode']
newRow['poNumber'] = row['number']
newRow['poLine'] = row['lineNumber']
if (formField == 'poLine') {
newRow['itemCode'] = row['itemCode']
newRow['uom'] = row['uom']
newRow['orderQty'] = row['orderQty']
newRow['planQty'] = row['orderQty']-row['plannedQty']
newRow['available'] = row['available']
}
tableData.value.push(newRow)
})
}
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => { nextTick(async () => {

264
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -49,17 +49,17 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '订单', label: '采购订单',
field: 'poNumber', field: 'poNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择订单', searchListPlaceholder: '请选择采购订单',
searchField: 'number', searchField: 'number',
searchTitle: '采购订单信息', searchTitle: '采购订单信息',
searchAllSchemas: PurchaseMain.allSchemas, searchAllSchemas: PurchaseMain.allSchemas,
@ -81,6 +81,30 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '收货人',
field: 'contacts',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '联系电话',
field: 'phone',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{ {
label: '送达日期', label: '送达日期',
field: 'deliveryDate', field: 'deliveryDate',
@ -190,65 +214,65 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ // {
label: '自动发布', // label: '自动发布',
field: 'autoPublish', // field: 'autoPublish',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: "TRUE", // value: "TRUE",
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ // {
label: '自动接收', // label: '自动接收',
field: 'autoAccept', // field: 'autoAccept',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: "TRUE", // value: "TRUE",
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE', // activeValue: 'TRUE',
disabled: true // disabled: true
} // }
}, // },
isSearch: true, // isSearch: true,
}, // },
{ {
label: '创建者', label: '创建者',
field: 'creator', field: 'creator',
@ -339,6 +363,9 @@ export const PurchasePlanMainRules = reactive({
available: [ available: [
{ required: true, message: '请选择是否可用', trigger: 'change' } { required: true, message: '请选择是否可用', trigger: 'change' }
], ],
supplierCode: [
{ required: true, message: '请选择供应商代码', trigger: 'change' }
],
poNumber: [ poNumber: [
{ required: true, message: '请选择采购订单号', trigger: 'change' } { required: true, message: '请选择采购订单号', trigger: 'change' }
], ],
@ -377,62 +404,62 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
// { {
// label: '订单号', label: '订单号',
// field: 'poNumber', field: 'poNumber',
// sort: 'custom', sort: 'custom',
// table: { table: {
// width: 180 width: 180
// }, },
// tableForm: { tableForm: {
// isInpuFocusShow: true, isInpuFocusShow: true,
// searchListPlaceholder: '请选择订单号', searchListPlaceholder: '请选择订单号',
// searchField: 'number', searchField: 'number',
// searchTitle: '采购订单信息', searchTitle: '采购订单信息',
// searchAllSchemas: PurchaseMain.allSchemas, searchAllSchemas: PurchaseMain.allSchemas,
// searchPage: PurchaseMainApi.getPurchaseMainPage, searchPage: PurchaseMainApi.getPurchaseMainPage,
// searchCondition: [{ searchCondition: [{
// key: 'available', key: 'available',
// value: 'TRUE', value: 'TRUE',
// isMainValue: false isMainValue: false
// }, { }, {
// key: 'supplierCode', key: 'supplierCode',
// value: 'supplierCode', value: 'supplierCode',
// message: '请填写供应商代码!', message: '请填写供应商代码!',
// isMainValue: true isMainValue: true
// }, { }, {
// key: 'status', key: 'status',
// value: 2, value: 2,
// isMainValue: false isMainValue: false
// } }
// ] ]
// }, },
// form: { form: {
// // labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
// componentProps: { componentProps: {
// isSearchList: true, isSearchList: true,
// searchListPlaceholder: '请选择订单号', searchListPlaceholder: '请选择订单号',
// searchField: 'number', searchField: 'number',
// searchTitle: '采购订单信息', searchTitle: '采购订单信息',
// searchAllSchemas: PurchaseMain.allSchemas, searchAllSchemas: PurchaseMain.allSchemas,
// searchPage: PurchaseMainApi.getPurchaseMainPage, searchPage: PurchaseMainApi.getPurchaseMainPage,
// searchCondition: [{ searchCondition: [{
// key: 'available', key: 'available',
// value: 'TRUE', value: 'TRUE',
// isMainValue: false isMainValue: false
// },{ },{
// key: 'supplierCode', key: 'supplierCode',
// value: 'supplierCode', value: 'supplierCode',
// message: '请填写供应商代码!', message: '请填写供应商代码!',
// isMainValue: true isMainValue: true
// },{ },{
// key: 'status', key: 'status',
// value: 2, value: 2,
// isMainValue: false isMainValue: false
// }] }]
// } }
// } }
// }, },
{ {
label: '订单行', label: '订单行',
field: 'poLine', field: 'poLine',
@ -462,6 +489,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
tableForm: { tableForm: {
multiple:true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择订单行', searchListPlaceholder: '请选择订单行',
searchField: 'lineNumber', searchField: 'lineNumber',

Loading…
Cancel
Save