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 = () => {
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>
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="工艺路线信息" name="processRouteInfo">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick" style="margin-top: 5px;height: min-height:240px;">
<el-tab-pane label="工艺信息" name="processInfo">
<div class="mt-20px">
<el-space :size="10" spacer="|">
<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="preCode" label="前置工序" align="center">
<template #default="scope">
<div style="display: flex; align-items: center">
<el-tag
@ -88,35 +87,6 @@
<el-table-column prop="version" label="版本" align="center" />
</el-table> </div
></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-drawer>
</div>
@ -146,13 +116,11 @@ const detailData = ref(props.allSchemas)
componentUom:'----',
componentQty:'----',
version:'----'}])
const workTeamInfoSchema = ref( [] )
const deviceInfoSchema = ref([])
const processRouteInfoSchema = ref({
processrouteInfo: { processrouteCode: '', processName: '', routeVersion: '' },
processrouteNodeDetailList: []
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
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"
/>
</ContentWrap>
<div style="height: 480px; overflow-y: auto">
<el-tabs type="border-card" :active-name="activeName">
<el-tab-pane label="调整工艺路线" name="process">
<el-container>
<el-aside>
<el-card style="max-width: 480px">
<template #header>
<div class="card-header">
<span>原有工序</span>
</div>
<ContentWrap>
<el-container>
<el-aside width="400px">
<el-card>
<template #header>
<div class="card-header">
<span>工艺路线</span>
<el-button
type="text"
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>
<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>
</el-table-column>
<el-table-column prop="code" label="工序编码" width="180" v-if="false" />
</el-table>
</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>
</el-table-column>
<el-table-column prop="code" label="工序编码" width="180" v-if="false" />
</el-table>
</el-tab-pane>
<el-tab-pane label="工作位置配置" name="ddddd">
<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>
<p v-for="o in 4" :key="o" class="text item">{{ 'List item ' + o }}</p>
<template #footer>Footer content</template>
</el-card></el-aside
> -->
</el-container>
</el-tab-pane>
<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-table-column>
<el-table-column prop="code" label="工序编码" width="180" v-if="false" />
</el-table>
</el-tab-pane>
</el-tabs>
</el-aside>
<el-tab-pane label="调整可用设备" name="device"
><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="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>
</el-container>
</ContentWrap>
<template #footer>
<el-button @click="dialogVisible = false">发布计划</el-button>
</template>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</Dialog>
<!-- <SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" /> -->
</template>
<script lang="ts" setup>
defineOptions({ name: 'sechledDetail' })
//import { dateFormatter } from '@/utils/formatTime'
import {
start_node,
@ -102,6 +97,9 @@ import {
getNewNode
} from '@/views/mes/processroute/components/graphbase.data'
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'
const graphContainer = ref<HTMLElement | null>(null)
const graph = ref<Graph>()
@ -109,7 +107,7 @@ const message = useMessage() // 消息弹窗
const { t } = useI18n() //
const activeName = ref('process')
const loading = ref(true)
const processData=ref()
const processData = ref([])
const props = defineProps({
//
isSearchFilterButtonHide: {
@ -131,54 +129,6 @@ const props = defineProps({
const detailData = ref(props.allSchemas)
const route = useRoute() //
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 = 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
detailData.value = row
dialogWidth.value = props.basicFormWidth + '%'
//console.log(props.allSchemas)
//console.log(row)
//
getProcessroute('001')
if (titleName) {
dialogTitle.value = t('action.' + titleName)
} else {
dialogTitle.value = t('action.' + type)
}
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 }) => {
// 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
</script>
<style lang="scss">

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

@ -56,6 +56,7 @@
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
: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 orderDetail from './components/orderDetail.vue'
import scheduleDetail from './components/schedule.vue'
import { disabledTimeListsProps } from 'node_modules/element-plus/es/components/time-picker/src/props/shared'
defineOptions({ name: 'MesOrderDay' })
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 [
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row,['1']),hasPermi:'mes:orderDay:update'}), //
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row,['1']),hasPermi:'mes:orderDay:delete'}), //
defaultButtons.mainListHandleBtn({label: '发布',
defaultButtons.mainListHandleBtn({label: '排产',
name: 'publish',
hide: isShowMainButton(row,['1']),
type: 'warning',
icon: '',
color: '',
hasPermi: ''}), //
hasPermi: 'mes:orderDay:update'}), //
// defaultButtons.mainListHandleBtn({label: '',
// name: 'publish',
// hide: isShowMainButton(row,['2']),
@ -224,7 +240,7 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if(val=='schedule'){ //
} else if(val=='publish'){ //
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 * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import { on } from '@/utils/domUtils'
// 表单校验
export const OrderDayRules = reactive({
planNoDay: [
{ required: true, message: '请输入一个日计划编号', trigger: 'blur' }
],
// planNoDay: [
// { required: false, message: '请输入一个日计划编号', trigger: 'blur' }
// ],
planNoMonth: [
{ required: true, message: '请输入一个月计划编号', trigger: 'blur' }
],
@ -38,6 +38,9 @@ export const OrderDayRules = reactive({
taskMode: [
{ required: true, message: '请选择一个生产方式', trigger: 'blur' }
],
processrouteCode: [
{ required: true, message: '请选择一个工艺路线!', trigger: 'blur' }
],
})
export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
@ -53,7 +56,34 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
field: 'planNoDay',
sort: 'custom',
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: '月计划单号',
@ -102,7 +132,7 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
key: 'type',
action: 'in', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
value: 'FG,SEMI',//,SEMI]
value: 'CCP,BCP',//,SEMI]
isMainValue: false
},
@ -169,7 +199,7 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '临时工艺',
label: '允许临时工艺',
field: 'tempProcessroute',
sort: 'custom',
width: '80px',
@ -185,32 +215,30 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: 'BOM编码',
label: 'BOM版本',
field: 'standardBom',
sort: 'custom',
form: {
component:'Select',
componentProps: {
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',
}
}
component: 'InputNumber',
value: 1
},
},
// {
// 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: '工单模式',
field: 'workMode',

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

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

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

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

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

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

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

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

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

@ -257,7 +257,7 @@
<el-select
v-model="item.inspectionCharacteristicsBaseVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
@change="changeFeatureType($event,item)"
>
<el-option
v-for="dict in getStrDictOptions(
@ -293,7 +293,7 @@
label="是否设定上限"
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-col>
@ -302,7 +302,7 @@
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
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-col>
@ -313,7 +313,7 @@
label="是否设定目标值"
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-col>
@ -737,11 +737,16 @@ const submitForm = async () => {
return
}
// ,,
console.log(data.value.process)
const arr1 = data.value.process.filter(
(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)))||
(item.inspectionCharacteristicsBaseVO.quantifyIsTarget && (String(item.inspectionCharacteristicsBaseVO.quantifyTarget).split('.')[1].length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))) &&
// {
// console.log(String(item.inspectionCharacteristicsBaseVO.quantifyCapping).split('.')[1]?.length)
// 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
)
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)))
)
console.log(99,arr2)
if (arr2 && arr2.length > 0) {
const str = arr2.map((item) => item.description).join(',')
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)
// if (e) {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true
// } else {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false
// }
if (e) {
rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false
}
}
const searchTableRef = ref()
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) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
}
}
//
const changeLowlimit = (e) => {
const changeLowlimit = (e,item) => {
item.inspectionCharacteristicsBaseVO.quantifyLowlimit = ''
if (e) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
} else {
@ -910,7 +927,8 @@ const changeLowlimit = (e) => {
}
}
//
const changeIsTarget = (e) => {
const changeIsTarget = (e,item) => {
item.inspectionCharacteristicsBaseVO.quantifyTarget = ''
if (e) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
} else {

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

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

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

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

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

@ -43,14 +43,14 @@
<script setup lang="ts">
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 defaultButtons from '@/utils/disposition/defaultButtons'
import listTable from '@/components/listTable/src/listTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
// import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
defineOptions({ name: 'InspectionMain' })
@ -85,7 +85,7 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:inspectionMain:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:inspectionMain:export' }), //
defaultButtons.defaultFreshBtn(null), //
@ -157,7 +157,7 @@ const listTableRef = ref()
openForm('update', row)
}else if (val == 'mainPackage') { //
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
}
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{
label: '物料编码',
field: 'materialCode',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
@ -317,16 +335,16 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.TRUE_FALSE,
table: {
width: 150
}
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// isSearch: false,
// dictType: DICT_TYPE.TRUE_FALSE,
// table: {
// width: 150
// }
// },
{
label: '操作',
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
ref="formRef"
@success="getList"
:isOpenSearchTable="true"
:indexTableColumn="1"
:rules="PurchasereceiptRequestMainRules"
:formAllSchemas="PurchasereceiptRequestMain.allSchemas"
:tableAllSchemas="PurchasereceiptRequestDetail.allSchemas"
@ -56,7 +58,6 @@
@submitForm="submitForm"
@formFormDateChange="formFormDateChange"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
@ -124,14 +125,18 @@ import {
PurchasereceiptRequestDetail,
PurchasereceiptRequestDetailRules,
PurchasereceiptRequestDetailLabel,
PurchasereceiptRequestDetailPackingNumber
PurchasereceiptRequestDetailPackingNumber,
} from './purchasereceiptRequestMain.data'
import { PurchaseDetail } from '../../supplierdeliver/purchaseMain/purchaseMain.data'
import * as PurchasereceiptRequestMainApi from '@/api/wms/purchasereceiptRequestMain'
import * as PurchasereceiptRequestDetailApi from '@/api/wms/purchasereceiptRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate } from '@/utils/formatTime'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { getAccessToken } from '@/utils/auth'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
//
defineOptions({ name: 'PurchasereceiptRequestMain' })
@ -166,17 +171,23 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else if(formField == 'poNumber') {
row['poNumber'] = val[0]['number']
} else if(formField == 'poLine'){
row['poLine'] = val[0]['lineNumber']
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
let supplierCode = formRef.formModel.supplierCode;
let itemCode = val[0]['itemCode']
let queryData = {
supplierCode:supplierCode,
itemCode:itemCode
}
SupplieritemApi.getDefaultLocationCode(queryData as SupplieritemApi.SupplieritemVO).then(res =>{
row['defaultToLocationCode'] = res
//--
val.forEach(item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))
newRow['poLine'] = item['lineNumber']
newRow['itemCode'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['poNumber'] = item['number']
let supplierCode = formRef.formModel.supplierCode;
let queryData = {
supplierCode:supplierCode,
itemCode: item['itemCode']
}
SupplieritemApi.getDefaultLocationCode(queryData as SupplieritemApi.SupplieritemVO).then(res =>{
newRow['defaultToLocationCode'] = res
tableData.value.push(newRow)
})
})
}else if (formField == 'packQty'){
row['packQty'] = val[0]['packQty']
@ -186,6 +197,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const setV = {}
if(formField == 'supplierCode'){
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]
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 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,
},
{
label: '供应商代码',
field: 'supplierCode',
label: '采购订单',
field: 'ppNumber',
sort: 'custom',
table: {
width: 150
width: 180
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
searchListPlaceholder: '请选择采购订单', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '采购订单信息', // 查询弹窗标题
searchAllSchemas: PurchaseMain.allSchemas, // 查询弹窗所需类
searchPage: PurchaseMainApi.getPurchaseMainPage, // 查询弹窗所需分页方法
}
}
},
isForm: true,
},
{
label: '发货单号',
@ -79,42 +79,63 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isForm: true,
},
{
label: '要货计划单号',
field: 'ppNumber',
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 180
width: 150
},
isSearch: true,
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
}]
disabled: true,
isSearchList: false, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
}
},
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: '承运商',
field: 'carrierCode',
@ -141,22 +162,22 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '数据来源',
field: 'sourceType',
dictType: DICT_TYPE.PURCHASERECEIPT_SOURCE_TYPE,
sort: 'custom',
table: {
width: 150
},
form: {
value: 'ASN_ExternalReceipt',
componentProps: {
disabled: true
}
},
isSearch: false,
},
// {
// label: '数据来源',
// field: 'sourceType',
// dictType: DICT_TYPE.PURCHASERECEIPT_SOURCE_TYPE,
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// value: 'ASN_ExternalReceipt',
// componentProps: {
// disabled: true
// }
// },
// isSearch: false,
// },
{
label: '从仓库代码',
field: 'fromWarehouseCode',
@ -303,50 +324,50 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
},
isForm: false,
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userDeptArray.find((account) => account.id == cellValue)?.name
},
form: {
value: userDept.id,
component: 'Select',
api: () => userDeptArray,
componentProps: {
disabled: true,
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
}
}
},
// {
// label: '截止时间',
// field: 'dueTime',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// sort: 'custom',
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width:'100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// },
// {
// label: '部门',
// field: 'departmentCode',
// sort: 'custom',
// table: {
// width: 150
// },
// formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
// return userDeptArray.find((account) => account.id == cellValue)?.name
// },
// form: {
// value: userDept.id,
// component: 'Select',
// api: () => userDeptArray,
// componentProps: {
// disabled: true,
// optionsAlias: {
// labelField: 'name',
// valueField: 'id'
// }
// }
// }
// },
{
label: '状态',
field: 'status',
@ -476,6 +497,9 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
//表单校验
export const PurchasereceiptRequestMainRules = reactive({
ppNumber: [
{ required: true, message: '请输入采购订单', trigger: 'blur' }
],
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
@ -583,6 +607,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
}
},
tableForm:{
multiple:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单行', // 输入框占位文本
searchField: 'lineNumber', // 查询弹窗赋值字段
@ -653,9 +678,49 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
isTableForm: 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: '数量',
field: 'qty',
label: '收货数量',
field: 'receivedQty',
sort: 'custom',
table: {
width: 150
@ -689,14 +754,76 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
label: '包装规格',
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',
table: {
width: 150
},
isTableForm: false,
isForm: false
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: '默认到库位代码',
@ -774,16 +901,16 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
disabled: true
}
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
// {
// label: '替代批次',
// field: 'altBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false
// },
{
label: '到货日期',
field: 'arriveDate',
@ -836,6 +963,17 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
valueFormat: 'x',
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '库存状态',
field: 'inventoryStatus',
@ -852,78 +990,8 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
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: '供应商计量数量',
field: 'supplierPackQty',

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

@ -28,6 +28,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList"
:isOpenSearchTable="true"
:indexTableColumn="1"
:rules="PurchasePlanMainRules"
:formAllSchemas="PurchasePlanMain.allSchemas"
:tableAllSchemas="PurchasePlanDetail.allSchemas"
@ -72,6 +74,7 @@
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { PurchaseDetail } from '../purchaseMain/purchaseMain.data'
//
defineOptions({ name: 'PurchasePlanMain' })
@ -91,28 +94,39 @@
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
console.log('searchTableSuccess', formField, searchField, val, formRef, type, row)
nextTick(async () => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['itemCode'] = val[0]['code']
row['poNumber'] = val[0]['number']
row['poLine'] = val[0]['lineNumber']
if (formField == 'poLine') {
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
row['orderQty'] = val[0]['orderQty']
row['planQty'] = val[0]['orderQty']-val[0]['plannedQty']
row['available'] = val[0]['available']
}
val.forEach(item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))
newRow[formField] = item[searchField]
newRow['itemCode'] = item['code']
newRow['poNumber'] = item['number']
newRow['poLine'] = item['lineNumber']
if (formField == 'poLine') {
//--
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 {
const setV = {}
setV[formField] = val[0][searchField]
setV['itemCode'] = val[0]['code']
setV['poNumber'] = val[0]['number']
setV['poLine'] = val[0]['lineNumber']
if(formField == 'supplierCode'){
setV['supplierCode'] = val[0]['code']
setV['contacts'] = val[0]['contacts']
setV['phone'] = val[0]['phone']
await PurchasePlanMainApi.queryPurchasePlan(val[0]['code']).then(res => {
let beginTime = res.beginTime
var ms = beginTime.substring(0, 2)
@ -123,6 +137,7 @@
var me = endTime.substring(3)
setV['endTime'] = new Date(2024, 1, 1, Number(ms), Number(me))
})
tableData.value = []
}
if (formField == 'poLine') {
setV['itemCode'] = val[0]['itemCode']
@ -132,9 +147,46 @@
setV['available'] = val[0]['available']
}
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) => {
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',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单',
searchListPlaceholder: '请选择采购订单',
searchField: 'number',
searchTitle: '采购订单信息',
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: '送达日期',
field: 'deliveryDate',
@ -190,65 +214,65 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '自动发布',
field: 'autoPublish',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: "TRUE",
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '自动接收',
field: 'autoAccept',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: "TRUE",
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
},
isSearch: true,
},
// {
// label: '自动发布',
// field: 'autoPublish',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'Switch',
// value: "TRUE",
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
// {
// label: '自动接收',
// field: 'autoAccept',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'Switch',
// value: "TRUE",
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE',
// disabled: true
// }
// },
// isSearch: true,
// },
{
label: '创建者',
field: 'creator',
@ -339,6 +363,9 @@ export const PurchasePlanMainRules = reactive({
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
supplierCode: [
{ required: true, message: '请选择供应商代码', trigger: 'change' }
],
poNumber: [
{ required: true, message: '请选择采购订单号', trigger: 'change' }
],
@ -377,62 +404,62 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
// {
// label: '订单号',
// field: 'poNumber',
// sort: 'custom',
// table: {
// width: 180
// },
// tableForm: {
// isInpuFocusShow: true,
// searchListPlaceholder: '请选择订单号',
// searchField: 'number',
// searchTitle: '采购订单信息',
// searchAllSchemas: PurchaseMain.allSchemas,
// searchPage: PurchaseMainApi.getPurchaseMainPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }, {
// key: 'supplierCode',
// value: 'supplierCode',
// message: '请填写供应商代码!',
// isMainValue: true
// }, {
// key: 'status',
// value: 2,
// isMainValue: false
// }
// ]
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择订单号',
// searchField: 'number',
// searchTitle: '采购订单信息',
// searchAllSchemas: PurchaseMain.allSchemas,
// searchPage: PurchaseMainApi.getPurchaseMainPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },{
// key: 'supplierCode',
// value: 'supplierCode',
// message: '请填写供应商代码!',
// isMainValue: true
// },{
// key: 'status',
// value: 2,
// isMainValue: false
// }]
// }
// }
// },
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 180
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '采购订单信息',
searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}, {
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
}, {
key: 'status',
value: 2,
isMainValue: false
}
]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '采购订单信息',
searchAllSchemas: PurchaseMain.allSchemas,
searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
},{
key: 'status',
value: 2,
isMainValue: false
}]
}
}
},
{
label: '订单行',
field: 'poLine',
@ -462,6 +489,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
tableForm: {
multiple:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单行',
searchField: 'lineNumber',

Loading…
Cancel
Save