Browse Source

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

master_hella_20240701
liuchen864 6 months ago
parent
commit
6859e8555b
  1. 80
      src/views/mes/orderDay/components/schedule.vue
  2. 146
      src/views/mes/processroute/components/configDialog.vue
  3. 6
      src/views/mes/processroute/components/graphbase.data.ts
  4. 295
      src/views/mes/workScheduling/components/Detail.vue
  5. 8
      src/views/mes/workScheduling/index.vue
  6. 18
      src/views/mes/workScheduling/workScheduling.data.ts
  7. 264
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  8. 20
      src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts
  9. 37
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
  10. 1
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts
  11. 40
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  12. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  13. 3
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  14. 16
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  15. 3
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts

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

@ -53,7 +53,7 @@
<div ref="graphContainer"></div
></el-main>
<el-aside width="640px">
<el-tag>工序编码{{currentNode.id}} -工序名称:{{currentNode.attrs.title.text }}</el-tag>
<el-tag>工序编码{{currentNode.id}} -工序名称:{{currentNode.name }}</el-tag>
<el-tabs v-model="activeName" >
<el-tab-pane label="工序工位" name="workstation">
<el-table :data="workstationData" ref="tableWorkstations" style="width: 100%; height: 80%">
@ -70,7 +70,7 @@
</el-tab-pane>
<el-tab-pane label="工序物料" name="materials">
<el-table :data="materialsData" ref="tableMaterials" style="width: 100%; height: 80%">
<el-table :data="showMaterialsData" ref="tableMaterials" style="width: 100%; height: 80%">
<el-table-column prop="repMaterialCode" label="物料编码" />
<el-table-column prop="repMaterialCounts" label="物料数量" />
<el-table-column prop="repMaterialModel" label="物料单位" />
@ -89,6 +89,17 @@
</template>
</el-table-column>
</el-table>
<el-pagination
small
hide-on-single-page="true"
layout="prev, pager, next"
:total="page.total"
:page-size="page.size"
:current-page="page.current"
@current-change="handleCurrentChangeM"
@prev-click="handlePrevClickM"
@next-click="handleNextClickM"
/>
</el-tab-pane>
<el-tab-pane label="工序人员" name="workers">
<el-button type="primary" @click="opensearchTableUser">添加人员</el-button>
@ -262,13 +273,15 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') //
const graphJson =ref()
const currentNode = ref({
attrs:{
title:{
text:''
}
},
name:'',
id:''
})
const showMaterialsData=ref() //
const page=ref({
total:0,
current:1,
size:5
})
/*班组数据*/
const teamData = ref([])
/*班组弹窗搜索条件*/
@ -314,12 +327,15 @@ const searchTeamList = () => {
}
/** 打开弹窗 */
const open = async (type: string, row?: any, titleName?: any) => {
currentNode.value.attrs.title.text=''
currentNode.value.name=''
currentNode.value.id=''
//
workerData.value = []
equipmentData.value = []
materialsData.value = []
showMaterialsData.value=[]
page.value.total = 0
page.value.current = 1
workstationData.value = []
getOptions()
dialogVisible.value = true
@ -377,14 +393,27 @@ const getProcessBom=async (code:any) => {
queryParams.processCode=code
let res = await orderDayconfigApi.getOrderDayBomByOrder(queryParams)
materialsData.value=res
if(materialsData.value.length>0){
page.value.total = materialsData.value.length
page.value.current = 1
showMaterialsData.value=materialsData.value.slice(0,page.value.size)
}
}
// const currentStartNode = ref({
// id:''
// })
//线
const getProcessroute = async () => {
let res = await orderDayconfigApi.getConfigProcessRoute(queryParams)
//console.log('ddddd',res)
graphJson.value=JSON.parse(res.newGraphData)
graph.value?.fromJSON(graphJson.value.cells)
//
//currentStartNode.value = graphJson.value.cells[0]
currentNode.value = graphJson.value.cells[0]
//
nodeClick('','','',currentNode.value,'')
}
//
const getConfigProcessRouteNode= async () => {
@ -407,12 +436,15 @@ const getConfigProcessEquipment= async (code:any) => {
equipmentData.value = await orderDayconfigApi.getConfigProcessEquipment(queryParams)
}
const nodeClick = (e, x, y, node, view) => {
//console.log(node.id)
getProcessBom(node.id)
getConfigProcessWorkstation(node.id)
getConfigProcessWorker(node.id)
getConfigProcessEquipment(node.id)
processCode.value = node.id
currentNode.value=node
currentNode.value.id=node.id
//console.log(node)
currentNode.value.name=node.attrs.title.text
}
const searchTableRef = ref()
@ -481,14 +513,14 @@ const doPublishPlan= ()=>{
}
let res = OrderDayApi.publishPlan(data)
res.then(()=>{
message.success("计划发布成功")
}).catch(()=>{
//console.log("---doPublishPlan-- 458--",res.msg)
message.error("计划发布失败!")
})
}
//
@ -654,7 +686,7 @@ const opensearchTableEquipment = async (
/*设备保存接口*/
const saveEquipment = async () =>{
await orderDayconfigApi.saveEquipment(equipmentData.value)
console.log(equipmentData.value)
//console.log(equipmentData.value)
message.success("设备配置成功!")
}
@ -678,7 +710,25 @@ const saveUser = async () =>{
const getTeamList = async (params:any) => {
return TeamApi.getTeamPage(params)
}
const handleCurrentChangeM=(value: number)=>{
let index=(value-1)*page.value.size
page.value.current=value
showMaterialsData.value=materialsData.value.slice(index,index+page.value.size)
}
const handlePrevClickM=(value: number)=>{
page.value.current=value-1
if(page.value.current==0) {
page.value.current=1
}
}
const handleNextClickM=(value: number)=>{
page.value.current=value+1
if(page.value.current>page.value.total/page.value.size) {
page.value.current=page.value.total/page.value.size -1
}
}
defineOptions({ name: 'SechledDetail' })
defineExpose({ open }) // open
//

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

@ -12,8 +12,8 @@
<div class="font-size-18px">
<el-row :gutter="10">
<el-col :span="22">
{{ titleValueRef }}
<el-tag type="info">[{{ titleNameRef }}]</el-tag>
{{ titleNameRef }}
<el-tag type="primary">[{{ titleValueRef }}]</el-tag>
</el-col>
<el-col :span="2">
<el-button size="primary" @click="saveResult()" style="width: 100%">
@ -37,7 +37,7 @@
>添加工序</el-button>
</div>
</template>
<el-table :data="processData" ref="tableProcess" style="width: 100%; height: 80%;border: 1px;" @cell-dblclick="userAddNode">
<el-table :data="showProcessNodeData" ref="tableProcess" style="width: 100%; height: 80%;border: 1px;" @cell-dblclick="userAddNode">
<el-table-column prop="code" label="工序编码" />
<el-table-column prop="name" label="工序名称" />
<el-table-column prop="oper" label="操作" width="60">
@ -48,6 +48,17 @@
</template>
</el-table-column>
</el-table>
<el-pagination
small
hide-on-single-page="true"
layout="prev, pager, next"
:total="page.total"
:page-size="page.size"
:current-page="page.current"
@current-change="handleCurrentChange"
@prev-click="handlePrevClick"
@next-click="handleNextClick"
/>
</el-card>
</el-col>
<el-col :span="12"><div ref="graphContainer" style="width: 90%; height: 90%"></div>
@ -81,8 +92,9 @@
<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 >{{titleNameRef}}</span></p>
<p >工艺路线编码<span >{{titleValueRef}}</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>
@ -92,23 +104,34 @@
><el-card class="footer-card">
<template #header>
<div class="card-header">
<span>物料信息</span>
<span>物料信息</span><el-tag type="primary">[{{ currentNode.name }}]</el-tag>
</div>
</template>
<el-table :data="materialData" ref="tableMaterial" style="width: 100%; height: 80%;overflow-y: auto;">
<el-table :data="showMaterialsData" ref="tableMaterial" style="width: 100%; height: 80%;overflow-y: auto;">
<!-- <el-table-column prop="name" label="物料名称"/> -->
<el-table-column prop="componentItemCode" label="物料编码"/>
<el-table-column prop="version" label="版本号"/>
<el-table-column prop="componentQty" label="物料数量"/>
</el-table>
<el-pagination
small
hide-on-single-page="true"
layout="prev, pager, next"
:total="pageM.total"
:page-size="pageM.size"
:current-page="pageM.current"
@current-change="handleCurrentChangeM"
@prev-click="handlePrevClickM"
@next-click="handleNextClickM"
/>
</el-card></el-col
>
<el-col :span="6"
><el-card class="footer-card">
<template #header>
<div class="card-header">
<span>模具信息</span>
<span>模具信息</span><el-tag type="primary">[{{ currentNode.name }}]</el-tag>
</div>
</template>
<el-table :data="mouldData" ref="tableMould" style="width: 100%; height: 80%;overflow-y: auto;">
@ -121,7 +144,7 @@
><el-card class="footer-card">
<template #header>
<div class="card-header">
<span>工位信息</span>
<span>工位信息</span><el-tag type="primary">[{{ currentNode.name }}]</el-tag>
</div>
</template>
<el-table :data="workStationList" ref="tableWorkstation" style="width: 100%; height: 80%;overflow-y: auto;">
@ -154,6 +177,7 @@ const message = useMessage() // 消息弹窗
//const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
const currentNode=ref({code:'',name:''})
routeName.value = route.name
routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'ProcessRouteConfig'
//const updateKey = ref(0)
@ -165,6 +189,22 @@ const tableProcess = ref()
const productData = ref({ name: '', code: '', desc1: '--' }) //
const materialData=ref()
const mouldData = ref()
const page=ref({
total:0,
current:1,
size:5
})
const pageM=ref({
total:0,
current:1,
size:5
})
const showProcessNodeData=ref() //
const showMaterialsData=ref() //
const productCode=ref()
//
const graph = ref<Graph>()
const rowData = ref()
const workStationList = ref() //
//
const annexData = reactive({
@ -203,23 +243,25 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
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})}
processData.value.push({code:item.code,name:item.name})
page.value.total=processData.value.length
showProcessNodeData.value=processData.value.slice((page.value.current-1)*page.value.size,page.value.size)
}
})
}
}
const deleteNode=(row)=>{
processData.value.splice(processData.value.indexOf(row),1)
page.value.total=processData.value.length
page.value.current=1
graph.value.removeNode(row.code)
}
const productCode=ref()
//
const graph = ref<Graph>()
const rowData = ref()
const openDetail = (row: any) => {
rowData.value = row
console.log('rowData',rowData.value)
titleNameRef.value = rowData.value.processrouteCode
titleValueRef.value = rowData.value.processName
titleNameRef.value = rowData.value.processName
titleValueRef.value =rowData.value.processrouteCode
processRouteId.value = rowData.value.id
productCode.value=rowData.value.productCode
routeVersion.value=rowData.value.routeVersion
@ -264,7 +306,7 @@ const getProcessInfo = async (id: any) => {
/** 获取产品信息 */
const getItembasicInfo = async (code: String) => {
const res = await ProcessrouteApi.getProductInfo(code)
console.log('productData',res)
//console.log('productData',res)
productData.value = res
}
/** 获取物料列表 */
@ -302,28 +344,37 @@ const getProcessList = async (code) => {
//console.log('code',code)
const res = await ProcessrouteApi.getProcessrouteNodeList(code)
processData.value = res
showProcessNodeData.value=processData.value.slice((page.value.current-1)*page.value.size,page.value.size)
//return res
}
//
const nodeClick = (e, x, y, node, view) => {
currentNode.value.code=node.id
currentNode.value.name=node.attrs.title.text
Promise.all([
getProcessInfo(node.id),
getProcessBomList(productCode.value,node.id),
getPatternPage(node.id),
getWorkstationPage(node.id)
]).then(([processIndoList,basicBom, patternPage,workstationInfoList]) => {
]).then(([processInfoList,basicBom, patternPage,workstationInfoList]) => {
//
//message.info(JSON.stringify(processIndoList))
console.log('basicBom',basicBom)
//console.log('basicBom',basicBom)
//
materialData.value = basicBom
pageM.value.total=materialData.value.length
pageM.value.current=1
showMaterialsData.value=materialData.value.slice((pageM.value.current-1)*pageM.value.size,pageM.value.size)
//
mouldData.value = patternPage.list
//
workStationList.value = workstationInfoList.list
}).catch(error => {
console.error("Error:", error);
//console.error("Error:", error);
materialData.value = []
showMaterialsData.value=[]
pageM.value.total=materialData.value.length
pageM.value.current=1
mouldData.value = []
workStationList.value = []
});
@ -362,6 +413,7 @@ const userAddNode = (row) => {
// ]
})
}
nodeClick(undefined,undefined, undefined, node_template, graph.value)
}
}
//-------
@ -382,7 +434,7 @@ const saveResult = async () => {
return
}
let gdata = {
processrouteCode: titleNameRef.value,
processrouteCode: titleValueRef.value,
routeVersion:routeVersion.value,
graphJson: graph.value.toJSON(),
processrouteId: processRouteId.value
@ -442,6 +494,58 @@ const deleteAnnexSuccess = async () => {
getFileList()
getChangeRecordList()
}
const handleCurrentChange=(value: number)=>{
let index=(value-1)*page.value.size
page.value.current=value
//console.log('index',index)
showProcessNodeData.value=processData.value.slice(index,index+page.value.size)
//console.log('processData.value-472',processData.value)
//console.log('showProcessNodeData.value-472',showProcessNodeData.value)
}
const handlePrevClick=(value: number)=>{
page.value.current=value-1
if(page.value.current==0) {
page.value.current=1
}
// let index=(value-1)*page.value.size
// showProcessNodeData.value=processData.value.slice(index,page.value.size)
// console.log('showProcessNodeData.value-472',showProcessNodeData.value)
}
const handleNextClick=(value: number)=>{
page.value.current=value+1
if(page.value.current>page.value.total/page.value.size) {
page.value.current=page.value.total/page.value.size -1
}
// let index=(value+1)*page.value.size
// showProcessNodeData.value=processData.value.slice(index,page.value.size)
// console.log('showProcessNodeData.value-472',showProcessNodeData.value)
}
const handleCurrentChangeM=(value: number)=>{
let index=(value-1)*pageM.value.size
pageM.value.current=value
//console.log('index',index)
showMaterialsData.value=materialData.value.slice(index,index+pageM.value.size)
}
const handlePrevClickM=(value: number)=>{
pageM.value.current=value-1
if(pageM.value.current==0) {
pageM.value.current=1
}
// let index=(value-1)*page.value.size
// showProcessNodeData.value=processData.value.slice(index,page.value.size)
// console.log('showProcessNodeData.value-472',showProcessNodeData.value)
}
const handleNextClickM=(value: number)=>{
pageM.value.current=value+1
if(pageM.value.current>pageM.value.total/page.value.size) {
pageM.value.current=page.value.total/pageM.value.size -1
}
// let index=(value+1)*page.value.size
// showProcessNodeData.value=processData.value.slice(index,page.value.size)
// console.log('showProcessNodeData.value-472',showProcessNodeData.value)
}
//
onUnmounted?.(() => {})
const emit = defineEmits(['close'])

6
src/views/mes/processroute/components/graphbase.data.ts

@ -138,7 +138,7 @@ export const start_node = ref({
id: 'startNode',
label: '开始',
x: 50,
y: 200,
y: 100,
attrs: {
body: {
rx: 20,
@ -151,8 +151,8 @@ export const start_node = ref({
//结束节点的定义
export const end_node = ref({
id: 'endNode',
x: 200,
y: 200,
x: 400,
y: 100,
label: '结束',
attrs: {
body: {

295
src/views/mes/workScheduling/components/Detail.vue

@ -28,7 +28,16 @@
<Tabs ref="tabRef" :tabsList="tabsList" :current="current" @change="change" />
<div class="flex">
<!-- 详情 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!=annexAliasLabel&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'&&!annexTableData.some(item=>item.label==tabsList[current].label)"> <!-- 列表头部 -->
<ContentWrap
class="w-[100%]"
v-show="
tabsList[current].label != annexAliasLabel &&
tabsList[current].label != '备注' &&
tabsList[current].label != '变更记录' &&
!annexTableData.some((item) => item.label == tabsList[current].label)
"
>
<!-- 列表头部 -->
<TableHead
v-if="!isBasic"
:HeadButttondata="HeadButttondata"
@ -71,8 +80,15 @@
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
>
<template #photos="{ row }">
<div v-for="(item,index) in row.photos.split(',')" :key="index" style="color:#409eff ; cursor: pointer;" @click="openImage(item)">{{ item }}</div> </template>
<template #photos="{ row }">
<div
v-for="(item, index) in row.photos.split(',')"
:key="index"
style="color: #409eff; cursor: pointer"
@click="openImage(item)"
>{{ item }}</div
>
</template>
<template #action="{ row }">
<ButtonBase
:Butttondata="buttondata"
@ -97,21 +113,31 @@
</DetailTable>
</ContentWrap>
<!-- other附件组件:如质检明细 -->
<div v-for="(annexItem ,index) in annexTableData" :key="index" v-show="annexItem.label==tabsList[current].label" class="w-[100%]" :style="{height:annexItem.hasSubDetail?'100%':remarkHeight+'px'}">
<ContentWrap class="w-[100%]">
<ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem"
@handleAnnexSuccess="updateAnnexTableHandle"
@deleteAnnexSuccess="updateAnnexTableHandle"
:upData="{...remarksData.data,tableName:annexItem.tableName}"
/>
<div
v-for="(annexItem, index) in annexTableData"
:key="index"
v-show="annexItem.label == tabsList[current].label"
class="w-[100%]"
:style="{ height: annexItem.hasSubDetail ? '100%' : remarkHeight + 'px' }"
>
<ContentWrap class="w-[100%]">
<ElScrollbar
ref="scrollbar"
:style="{ height: annexItem.hasSubDetail ? '100%' : remarkHeight - 40 + 'px' }"
>
<Annex
v-show="tabsList[current].label == annexItem.label"
:annexData="annexItem"
@handleAnnexSuccess="updateAnnexTableHandle"
@deleteAnnexSuccess="updateAnnexTableHandle"
:upData="{ ...remarksData.data, tableName: annexItem.tableName }"
/>
</ElScrollbar>
</ContentWrap>
</ContentWrap>
<ContentWrap class="w-[100%]" v-if="annexItem.subDetailTableData">
<Table
<Table
v-if="!isBasic && fromeWhere != 'countPlan'"
:align="annexItem.align?annexItem.align:'center'"
:align="annexItem.align ? annexItem.align : 'center'"
:columns="annexItem.subDetailTableData.tableColumns"
:data="annexItem.subDetailTableData.tableList"
:loading="annexItem.subDetailTableData.loading"
@ -119,30 +145,44 @@
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
/>
</ContentWrap>
</ContentWrap>
</div>
<!-- 附件/备注/变更记录 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAliasLabel||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}">
<ContentWrap
class="w-[100%]"
v-show="
tabsList[current].label == annexAliasLabel ||
tabsList[current].label == '备注' ||
tabsList[current].label == '变更记录'
"
:style="{ height: remarkHeight + 'px' }"
>
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexAliasLabel"
:annexData="annexData"
@handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data"
:key="count"
/>
<ElScrollbar ref="scrollbar" :style="{ height: remarkHeight - 40 + 'px' }">
<Annex
v-show="tabsList[current].label == annexAliasLabel"
:annexData="annexData"
@handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data"
:key="count"
/>
<!-- 备注组件 -->
<Remarks v-show="tabsList[current].label=='备注'"
<Remarks
v-show="tabsList[current].label == '备注'"
:remarksData="remarksData"
class="mt-20px"
@remarksSubmitScuess="remarksSubmitScuess"
:key="count"
/>
<!-- 变更记录组件 -->
<ChangeRecord v-show="tabsList[current].label=='变更记录'" :changeRecordData="changeRecordData" class="mt-20px" :key="count"/>
</ElScrollbar>
<ChangeRecord
v-show="tabsList[current].label == '变更记录'"
:changeRecordData="changeRecordData"
class="mt-20px"
:key="count"
/>
</ElScrollbar>
</ContentWrap>
</div>
</el-drawer>
@ -173,7 +213,6 @@
</template>
<script lang="ts" setup>
import Annex from '@/components/Annex/src/Annex.vue'
import Remarks from '@/components/Remarks/src/Remarks.vue'
import ChangeRecord from '@/components/ChangeRecord/src/ChangeRecord.vue'
@ -185,7 +224,7 @@ import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
import { SearchTable } from '@/components/SearchTable'
import {defaultFreshBtn} from "@/utils/disposition/defaultButtons";
import { defaultFreshBtn } from '@/utils/disposition/defaultButtons'
defineOptions({ name: 'Detail' })
@ -209,7 +248,7 @@ const props = defineProps({
annexTable: {
type: Array,
required: false,
default: ()=>[]
default: () => []
},
//tab
annexAliasLabel: {
@ -305,7 +344,7 @@ const props = defineProps({
buttondataTable: {
type: Array,
required: false,
default: ()=>{
default: () => {
return []
}
},
@ -322,38 +361,38 @@ const props = defineProps({
default: null
},
//
detailButtonIsShowFilter:{
detailButtonIsShowFilter: {
type: Boolean,
required: false,
default: true
},
//
detailButtonIsShowAdd:{
detailButtonIsShowAdd: {
type: Boolean,
required: false,
default: true
default: false
},
//
detailButtonIsShowEdit:{
detailButtonIsShowEdit: {
type: Boolean,
required: false,
default: true
default: false
},
//
detailButtonIsShowDelete:{
detailButtonIsShowDelete: {
type: Boolean,
required: false,
default: true
default: false
},
//
isOpenSearchTable:{
isOpenSearchTable: {
type: Boolean,
required: false,
default: false
},
//
otherHeadButttonData:{
type:Array,
otherHeadButttonData: {
type: Array,
required: false,
default: () => []
}
@ -381,39 +420,43 @@ if (props.isBasic == true) {
}
}
const otherList = [...props.annexTable,{
label:props.annexAliasLabel,
prop:'Annex'
},{
label:'备注',
prop:'Remarks'
},{
label:'变更记录',
prop:'ChangeRecord'
}]
tabsList.value = [...tabsList?.value,...otherList]
if (!tabsList.value || tabsList.value && tabsList.value.length == otherList.length) {
const otherList = [
...props.annexTable,
{
label: props.annexAliasLabel,
prop: 'Annex'
},
{
label: '备注',
prop: 'Remarks'
},
{
label: '变更记录',
prop: 'ChangeRecord'
}
]
tabsList.value = [...tabsList?.value, ...otherList]
if (!tabsList.value || (tabsList.value && tabsList.value.length == otherList.length)) {
tabsList.value.unshift({
label: '明细',
prop: 'Detail'
label: '明细',
prop: 'Detail'
})
}
// Tabs
// Tabs
const tabRef = ref()
//
const scrollbar = ref()
const scrollbar = ref()
//
const remarkHeight = computed(() => {
const remarkHeight = computed(() => {
const tab = unref(tabRef)
const tabTop = tab?.$el.getBoundingClientRect().top
const tabHeight = tab?.$el.getBoundingClientRect().height
const height = window.innerHeight - (tabTop) - (tabHeight) - 60
const height = window.innerHeight - tabTop - tabHeight - 60
return height
})
//
const annexData = reactive({
annexList: []
@ -442,31 +485,31 @@ const getFileList = async () => {
}
}
//
const getAnnexFileList = async (row:id) => {
const getAnnexFileList = async (row: id) => {
props.annexTable?.forEach(async (item) => {
let requstData = {...remarksData.data,tableName: item?.tableName}
let requstData = { ...remarksData.data, tableName: item?.tableName }
const annexList = await FileApi.getFileList(requstData)
const annexData = annexTableData.value.find(annex=>annex.label === item.label)
if(annexData){
const annexData = annexTableData.value.find((annex) => annex.label === item.label)
if (annexData) {
annexData.annexList = annexList
}else{
} else {
annexTableData.value.push({
align:item.align,
align: item.align,
label: item.label,
tableName: item?.tableName || '',
annexList,
hasSubDetail:item.hasSubDetail||false,
subDetailTableData:item.subDetailTableData
hasSubDetail: item.hasSubDetail || false,
subDetailTableData: item.subDetailTableData
})
if(item?.subDetailTableData){
const { tableObject:subTableObject, tableMethods:subTableMethods } = useTable({
if (item?.subDetailTableData) {
const { tableObject: subTableObject, tableMethods: subTableMethods } = useTable({
getListApi: item.subDetailTableData.getSubList //
})
const {getList:getSubList} = subTableMethods
subTableObject.params= {}
item.subDetailTableData.queryParams.forEach(queryItem => {
const { getList: getSubList } = subTableMethods
subTableObject.params = {}
item.subDetailTableData.queryParams.forEach((queryItem) => {
subTableObject.params[queryItem.queryField] = row[queryItem.rowField]
});
})
await getSubList()
item.subDetailTableData.tableList = subTableObject.tableList
annexItem.subDetailTableData.tableList
@ -485,7 +528,7 @@ const deleteAnnexSuccess = async () => {
getChangeRecordList()
}
/** 追加的附件 */
const updateAnnexTableHandle = () => {
const updateAnnexTableHandle = () => {
getAnnexFileList(detailData.value)
getChangeRecordList()
}
@ -495,11 +538,10 @@ const current = ref(0)
const change = (item, index) => {
current.value = index
emit('changeTabs', item)
if(otherList.find(other=>other.label==item.label)){
if (otherList.find((other) => other.label == item.label)) {
// // --
scrollbar.value.scrollTo({ top: 0});
scrollbar.value.scrollTo({ top: 0 })
}
}
//
@ -532,8 +574,11 @@ const initModel = (schema: FormSchema[], formModel: Recordable) => {
const searchTableRef = ref()
//
const searchTableFormModel = ref<Recordable>({})
if(props.isOpenSearchTable){
searchTableFormModel.value = initModel(props.detailAllSchemas.formSchema, unref(searchTableFormModel))
if (props.isOpenSearchTable) {
searchTableFormModel.value = initModel(
props.detailAllSchemas.formSchema,
unref(searchTableFormModel)
)
}
const searchTableFormType = ref('') // create - update -
@ -541,7 +586,7 @@ const searchTableFormType = ref('') // 表单的类型:create - 新增;updat
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const count =ref(0)
const count = ref(0)
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
@ -576,9 +621,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
let detailButtonAdd: any = []
if (props.detailButtonIsShowFilter) {
//
detailButtonFilter = [
defaultButtons.defaultFilterBtn(null)
]
detailButtonFilter = [defaultButtons.defaultFilterBtn(null)]
}
if (props.detailButtonIsShowAdd) {
//
@ -588,10 +631,8 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
})
]
}
let detailButtonRefresh = [
defaultButtons.defaultFreshBtn(null)
]
HeadButttondata.value = [...detailButtonFilter,...detailButtonAdd,...detailButtonRefresh]
let detailButtonRefresh = [defaultButtons.defaultFreshBtn(null)]
HeadButttondata.value = [...detailButtonFilter, ...detailButtonAdd, ...detailButtonRefresh]
//
if (routeName.value.indexOf('Job') > -1) {
@ -599,7 +640,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
defaultButtons.defaultFilterBtn(null) //
]
}
HeadButttondata.value = [...HeadButttondata.value,...props.otherHeadButttonData]
HeadButttondata.value = [...HeadButttondata.value, ...props.otherHeadButttonData]
let detailButtonEdit: any = []
let detailButtonDelete: any = []
if (props.detailButtonIsShowEdit) {
@ -618,8 +659,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
})
]
}
buttondata.value = [...detailButtonEdit,...detailButtonDelete,...props.buttondataTable]
buttondata.value = [...detailButtonEdit, ...detailButtonDelete, ...props.buttondataTable]
} finally {
detailLoading.value = false
}
@ -675,7 +715,7 @@ const { getList } = tableMethodsRef.value
const buttonBaseClick = (val, item) => {
if (val == 'add') {
//
if(props.isOpenSearchTable){
if (props.isOpenSearchTable) {
searchTableFormType.value = 'create'
//
searchTableFormModel.value = Object.assign(unref(searchTableFormModel), {
@ -684,15 +724,17 @@ const buttonBaseClick = (val, item) => {
})
const item = props.detailAllSchemas.formSchema[0]
opensearchTable(
item.field, item?.componentProps?.searchField,
item?.componentProps?.searchTitle,
item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchPage,
item?.componentProps?.searchCondition,
item?.componentProps?.multiple,
undefined,undefined
item.field,
item?.componentProps?.searchField,
item?.componentProps?.searchTitle,
item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchPage,
item?.componentProps?.searchCondition,
item?.componentProps?.multiple,
undefined,
undefined
)
}else{
} else {
openForm('create')
}
} else if (val == 'import') {
@ -709,7 +751,7 @@ const buttonBaseClick = (val, item) => {
} else {
//
console.log('其他按钮', item)
emit('buttonBaseClick',val, item)
emit('buttonBaseClick', val, item)
}
}
@ -729,13 +771,13 @@ const opensearchTable = (
//
if (searchCondition && searchCondition.length > 0) {
//
for (var i=0; i< searchCondition.length; i++ ) {
for (var i = 0; i < searchCondition.length; i++) {
// row
if (searchCondition[i].isMainValue) {
_searchCondition[searchCondition[i].key] = detailData
? detailData.value[searchCondition[i].value]
: ''
}else{
} else {
_searchCondition[searchCondition[i].key] = searchCondition[i].value
}
}
@ -762,29 +804,31 @@ const opensearchTable = (
const buttonTableClick = async (val, row) => {
if (val == 'edit') {
//
if(props.isOpenSearchTable){
if (props.isOpenSearchTable) {
searchTableFormType.value = 'update'
if (row?.id || row?.masterId) {
searchTableFormModel.value = Object.assign(unref(searchTableFormModel), row)
}
const item = props.detailAllSchemas.formSchema[0]
opensearchTable(
item.field, item?.componentProps?.searchField,
item?.componentProps?.searchTitle,
item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchPage,
item?.componentProps?.searchCondition,
item?.componentProps?.multiple,
undefined,undefined
item.field,
item?.componentProps?.searchField,
item?.componentProps?.searchTitle,
item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchPage,
item?.componentProps?.searchCondition,
item?.componentProps?.multiple,
undefined,
undefined
)
}else{
} else {
openForm('update', row)
}
} else if (val == 'delete') {
//
handleDelete(row.id)
} else {
emit('tableFormButton',val, row)
emit('tableFormButton', val, row)
}
}
/** 添加/修改操作 */
@ -815,10 +859,9 @@ const submitForm = async (formType, data) => {
}
}
const searchTableSuccess1 = (formField, searchField, val, formRef) => {
searchTableFormModel.value[formField] = val.map(item=>item[searchField]).join(',')
submitForm(searchTableFormType.value,searchTableFormModel.value)
searchTableFormModel.value[formField] = val.map((item) => item[searchField]).join(',')
submitForm(searchTableFormType.value, searchTableFormModel.value)
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
//
@ -885,7 +928,7 @@ const selectChangeDetail = (field, val) => {
emit('selectChangeDetail', field, val)
}
//
const openImage=(item)=>{
const openImage = (item) => {
emit('openImage', item)
}
/**
@ -893,22 +936,22 @@ const openImage=(item)=>{
* @param field 当前操作字段
* @param cur 改变后值
*/
const detailBasicFormOnChange = (field, cur) => {
const detailBasicFormOnChange = (field, cur) => {
emit('detailBasicFormOnChange', field, cur)
}
/**
* 监听失焦事件
* @param field 当前操作字段
* @param e
* @param e
*/
const onBlur = (field, e) => {
const onBlur = (field, e) => {
emit('onBlur', field, e)
}
//
const formFormDateChange = (field, val,row, index) => {
emit('formFormDateChange', field, val,row, index)
const formFormDateChange = (field, val, row, index) => {
emit('formFormDateChange', field, val, row, index)
}
//
watch(
@ -920,7 +963,7 @@ watch(
tableObject.params.schedulingCode = masterParmas.value.schedulingCode
detailAllSchemasRef.value = props.detailAllSchemas
if (props.tableObjectExtend) {
props.tableObjectExtend.forEach(item => {
props.tableObjectExtend.forEach((item) => {
tableObject.params[item.key] = item.value
})
}

8
src/views/mes/workScheduling/index.vue

@ -60,9 +60,9 @@
:apiCreate="WorkSchedulingDetailApi.createWorkSchedulingDetail"
:apiUpdate="WorkSchedulingDetailApi.updateWorkSchedulingDetail"
:apiDelete="WorkSchedulingDetailApi.deleteWorkSchedulingDetail"
:detailButtonIsShowAdd="true"
:detailButtonIsShowEdit="true"
:detailButtonIsShowDelete="true"
:detailButtonIsShowAdd="false"
:detailButtonIsShowEdit="false"
:detailButtonIsShowDelete="false"
@handleMainFefresh="handleMainFefresh"
@searchTableSuccessDetail="searchTableSuccessDetail"
:key="count"
@ -184,7 +184,7 @@ const buttonTableClick = async (val, row) => {
}else if (val == 'pause') { //
changeBillStatus(row,"3")
}else if (val == 'resume') { //
changeBillStatus(row,"0")
changeBillStatus(row,"1")
}
}

18
src/views/mes/workScheduling/workScheduling.data.ts

@ -380,13 +380,13 @@ export const WorkSchedulingDetail = useCrudSchemas(reactive<CrudSchema[]>([
isForm:false,
isDetail:false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))

264
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -52,6 +52,18 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
isSearch: true
},
{
label: '状态',
field: 'status',
sort: 'custom',
table: {
width: 150
},
dictType: DICT_TYPE.PLAN_STATUS,
dictClass: 'string',
isSearch: true,
isForm:false,
},
{
label: '客户代码',
field: 'customerCode',
@ -63,6 +75,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -77,6 +90,51 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '客户月台',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: true,
// tableForm:{
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择客户月台代码',
// searchField: 'code',
// searchTitle: '客户月台基础信息',
// searchAllSchemas: Customerdock.allSchemas,
// searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// },{
// key: 'customerCode',
// value: 'customerCode',
// isMainValue: true
// }]
// },
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择客户月台代码',
searchField: 'code',
searchTitle: '客户月台基础信息',
searchAllSchemas: Customerdock.allSchemas,
searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
}
},
},
{
label: '发货类型',
field: 'deliverType',
@ -116,16 +174,9 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '创建时间',
field: 'createTime',
@ -137,6 +188,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
@ -154,6 +206,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isForm: false,
},
{
@ -167,6 +220,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
@ -187,6 +241,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
@ -196,25 +251,13 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '状态',
field: 'status',
sort: 'custom',
table: {
width: 150
},
dictType: DICT_TYPE.PLAN_STATUS,
dictClass: 'string',
isSearch: true,
isForm:false,
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 150
@ -229,12 +272,21 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '自动提交',
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
isForm: false,
sort: 'custom',
table: {
@ -255,7 +307,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
isForm: false,
sort: 'custom',
table: {
@ -276,7 +328,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
isForm: false,
sort: 'custom',
table: {
@ -299,6 +351,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isForm: false,
},
{
@ -312,6 +365,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
@ -413,6 +467,35 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
// }
// }
// },
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150
},
isTable:false,
isTableForm: false,
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择客户代码',
searchField: 'code',
searchTitle: '客户信息',
searchAllSchemas: Customer.allSchemas,
searchPage: CustomerApi.getCustomerPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择客户代码',
searchField: 'code',
searchTitle: '客户信息',
searchAllSchemas: Customer.allSchemas,
searchPage: CustomerApi.getCustomerPage
}
}
},
{
label: '客户月台',
field: 'customerDockCode',
@ -420,6 +503,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户月台代码',
@ -456,30 +540,6 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '项目',
field: 'project',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料代码',
field: 'itemCode',
@ -488,6 +548,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
@ -524,6 +585,55 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '计划数量',
field: 'planQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
type: 'Select'
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm: false,
table: {
width: 150
},
},
{
label: '到库位代码',
field: 'toLocationCode',
@ -570,6 +680,34 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '项目',
field: 'project',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isTableForm: false,
isForm: false,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
isTable: false,
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '备注',
field: 'remark',
@ -577,6 +715,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
},
{
label: '创建时间',
@ -589,6 +728,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
@ -607,6 +747,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTableForm: false,
isForm: false,
},
@ -617,6 +758,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
form: {
component: 'InputNumber',
componentProps: {
@ -630,26 +772,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
type: 'Select'
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '最后更新时间',
field: 'updateTime',
@ -661,6 +784,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
@ -679,6 +803,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTableForm: false,
isForm: false,
},
@ -687,7 +812,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 150
@ -712,6 +837,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150,
fixed: 'right'
},
hiddenInMain: true,
isTableForm:false,
}
]))

20
src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts

@ -1,6 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as getBusinessTypeApi from '@/api/wms/businesstype/index'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
@ -14,8 +15,15 @@ const queryParams = {
pageSize:10,
pageNo:1,
code:'ProductPutawayRequest'
}
const businessTypeQueryParams = {
pageSize:10,
pageNo:1,
code:'ProductPutaway'
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams)
const businessTypeData =businessTypeValue?.list[0]||{}
const requestsettingData =data?.list[0]||{}
// 获取当前操作人的部门
@ -454,7 +462,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法
searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
}]
},
form: {
// labelMessage: '信息提示说明!!!',
@ -464,7 +476,11 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法
searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
}]
}
}
},

37
src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

@ -3,7 +3,14 @@ import { dateFormatter } from '@/utils/formatTime'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as getBusinessTypeApi from '@/api/wms/businesstype/index'
const businessTypeQueryParams = {
pageSize:10,
pageNo:1,
code:'Productredress'
}
const businessTypeValue = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams)
const businessTypeData =businessTypeValue?.list[0]||{}
// 表单校验
export const ProductredressRequestMainRules = reactive({
autoCommit: [required],
@ -316,13 +323,14 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法
searchCondition:[
{
key: 'inventoryStatus',
value: 'OK',
isMainValue: false
},{
 searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法
        searchCondition: [{
          key: 'businessType',
          value: businessTypeData.code,
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
        },{
key: 'packingNumber', // 查询列表中字段
value: '', // 指查询具体值
action: 'isNotStr', // 查询拼接条件
@ -338,12 +346,13 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法
searchCondition:[
{
key: 'inventoryStatus',
value: 'OK',
isMainValue: false
searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
},{
key: 'packingNumber', // 查询列表中字段
value: '', // 指查询具体值

1
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

@ -1028,7 +1028,6 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150

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

@ -418,42 +418,24 @@ const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAcces
//
const searchTableRef = ref()
const labelPrint = async (row) => {
console.log("------------",row);
tableObject.loading = true
const subTableDFata = await PackageApi.getLabel(row.masterId)
tableObject.loading = false
const tableObject1 = {
//
currentPage: 1,
//
exportLoading: false,
//
loading: false,
//
pageSize: subTableDFata.length,
params:null,
//
sort: {
order: '', //
prop: '' //
},
//
total: subTableDFata.length,
//
tableList: subTableDFata,
currentRow:null
}
console.log("标签打印",subTableDFata,tableObject1,SupplierdeliverRequestPackage.allSchemas)
const defaultParams = {'moduleName':'supplier','recordNumber':row.number}
const {tableObject:tableObjectPrint ,tableMethods} = useTable({
defaultParams,
getListApi: PackageApi.getLabelDetailPage //
})
//
const { getList:getListPrint } = tableMethods
getListPrint()
tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
searchTableRef.value.openData("标签信息",tableObject1,{tableColumns},true)
// window.open(src.value + '&asn_number=' + row.asnNumber)
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
}
// ---
const searchTableSuccess1 = async (formField, searchField, val, formRef, type, row) => {
console.log('批量打印',val)

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

@ -802,7 +802,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
},
{
label: '收货数量',
field: 'receivedQty',
field: 'qty',
sort: 'custom',
table: {
width: 150

3
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -209,7 +209,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if (res) tableData.value = res
tableData.value.forEach((item) => {
item.batch = item.toBatch
item.packingNumber = item.toPackingNumber
item.packingNumber = ''
item.containerNumber = item.toContainerNumber
item.receiptQty = item.qty
item.toLocationGroupCode = null

16
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -96,6 +96,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择采购收货记录单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
@ -689,6 +690,16 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isTableForm: true
},
{
label: '替代批次',
field: 'altBatch',
@ -762,6 +773,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
},
tableForm:{
disabled:true,
type:'InputNumber',
min:0,
precision: 6
@ -782,6 +794,8 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
disabled:false
}
},
isTable: false,
isTableForm: false,
isForm:false,
tableForm:{
type:'InputNumber',
@ -791,7 +805,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
},
{
label: '数量',
label: '退货数量',
field: 'qty',
sort: 'custom',
table: {

3
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts

@ -1301,6 +1301,9 @@ export const PurchasereceiptRequestDetailRules = reactive({
itemCode: [
{ required: true, message: '请输入物料代码', trigger: 'change' }
],
defaultToLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'blur' }
],
})

Loading…
Cancel
Save