Browse Source

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

hella_online_20240816
ljlong_2630 3 months ago
parent
commit
0c0f7d93f2
  1. 13
      src/api/wms/bomDismantle/index.ts
  2. 92
      src/views/qms/inspectionQ3/index.vue
  3. 180
      src/views/qms/inspectionQ3/inspectionQ3.data.ts
  4. 356
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  5. 282
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  6. 92
      src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts
  7. 92
      src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts
  8. 92
      src/views/wms/productionManage/productscrap/productscrapJobMain/productscrapJobMain.data.ts
  9. 92
      src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts
  10. 5
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  11. 92
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
  12. 40
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts
  13. 23
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue

13
src/api/wms/bomDismantle/index.ts

@ -16,8 +16,17 @@ export const getProductscrapBomDismantlePage = async (params) => {
}
export const getProductscrapBomRecordPage = async (params) => {
return await request.get({ url: `/wms/productscrap-request-main/bomRecordPage`, params })
export const getProductscrapBomRecordPage = async (params1) => {
console.log('getProductscrapBomRecordPage',params1)
let params = {...params1}
if(params.isRecord){
delete params.isRecord
return await request.get({ url: `/wms/productscrap-request-main/bomRecordPage`, params })
}else{
delete params.isRecord
return await request.get({ url: `/wms/productscrap-request-main/bomPage`, params })
}
}

92
src/views/qms/inspectionQ3/index.vue

@ -71,13 +71,6 @@
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@inputNumberChange="inputNumberChange"
:sumFormDataByTableCustom="
(formRef, formModel, tableData) => {
tableData.forEach((item) => {
item.qty = item.countQty * item.packQty
})
}
"
>
<!-- <template #default="{row}">
<el-input-number disabled v-model="row.qty"></el-input-number>
@ -146,43 +139,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if (type == 'tableForm') {
//
if (formField == 'itemCode') {
// val.forEach(item=>{
// })
const index1 = 0
setTableFormsValues(val, index1)
// row['uom'] = val[0]['uom']
// console.log(formRef.formModel.qty)
// // let res = await ProductionlineitemApi.selectItemCodeToProductionLineCode(val[0].code)
// ProductionlineitemApi.selectItemCodeToProductionLineCode(val[0].code).then((res) => {
// console.log(res)
// if (res?.length > 0) {
// formRef.formModel.defectLocation = res[0].productionLineCode
// InspectionQ3Detail.allSchemas.formSchema.forEach(item=>{
// if (item.field == 'defectLocation') {
// item.componentProps.options = res
// }
// })
// }
// })
// const params = {
// by: "ASC",
// filters: [{column: "itemCode", action: "==", value: val[0].code}],
// pageNo: 1,
// pageSize: 500,
// sort: ""
// }
// params.isSearch = true
// StdcostpriceApi.getStdcostpricePage(params).then((res) => {
// if (res.list?.length > 0) {
// priceObj.value = res.list[0]
// formRef.setValues({
// amount: (parseFloat(formRef.formModel.qty) * parseFloat(priceObj.value.price)).toFixed(6)
// })
// }
// })
}
if (formField == 'costCode') {
console.log(11111)
@ -211,7 +169,6 @@ const setTableFormsValues = async (val, index1) => {
const newRow = JSON.parse(JSON.stringify({ ...tableForm, ...val[index1] }))
newRow['itemCode'] = val[index1]['itemCode']
newRow['uom'] = val[index1]['uom']
newRow['qty'] = 0
newRow.defectLocation = val[index1]['productionLineCode']
await ProductionlineitemApi.selectItemCodeToProductionLineCode(val[index1].itemCode).then(
(res) => {
@ -236,7 +193,9 @@ const setTableFormsValues = async (val, index1) => {
newRow['amount']=(parseFloat(newRow['qty']) * parseFloat(priceObj.value.price)).toFixed(6)
}
})
newRow['qty'] = 0
tableData.value.push(newRow)
console.log( tableData.value)
index1++
setTableFormsValues(val, index1)
}
@ -248,7 +207,7 @@ const inputNumberChange = (field, index, row, val) => {
}
formRef.value.formRef.formModel.summaryAmount =0
tableData.value.forEach(item=>{
formRef.value.formRef.formModel.summaryAmount += parseFloat(item.amount)
formRef.value.formRef.formModel.summaryAmount += parseFloat(item.amount)
})
}
//
@ -340,10 +299,10 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') {
//
handleDelete(row.id)
handleDelete(row.masterId)
} else if (val == 'finish') {
//
handleFinish(row.id)
handleFinish(row.masterId)
}
}
@ -359,6 +318,7 @@ const handleFinish = async (id: number) => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: any) => {
tableData.value = []
formRef.value.open(type, row)
if (type == 'create') {
nextTick(() => {
@ -450,31 +410,25 @@ const submitForm = async (formType, submitData) => {
}
data.responUser = userStore.getUser.nickname
data.subList = tableData.value //
if (tableData.value.find((item) => item.qty <= 0)) {
message.warning('数量必须大于0')
formRef.value.formLoading = false
return
}
// 线
// if (tableData.value.length > 0) {
// let productionLineCode = tableData.value[0].productionLineCode
// let workStationCode = tableData.value[0].workStationCode
// for(var i=0;i<tableData.value.length;i++) {
// if(productionLineCode !== tableData.value[i].productionLineCode){
// message.warning('线')
// formRef.value.formLoading = false
// return;
// }
// if(workStationCode !== tableData.value[i].workStationCode){
// message.warning('')
// formRef.value.formLoading = false
// return;
// }
// }
// }
formRef.value.formLoading = true
try {
if (formType === 'create') {
if(data.subList.length == 0){
message.warning("请添加子列表数据")
return;
}
let flag = false;
console.log(1111)
data.subList.forEach((item) => {
if(item.qty == 0){
message.warning("数量不能为0")
flag = true;
return;
}
})
if(flag){
return
}
formRef.value.formLoading = true
await InspectionQ3MainApi.createInspectionQ3Main(data)
message.success(t('common.createSuccess'))
} else {

180
src/views/qms/inspectionQ3/inspectionQ3.data.ts

@ -157,130 +157,6 @@ export const InspectionQ3Main = useCrudSchemas(
}
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isSearch: false,
isForm: false
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
isSearch: false,
isForm: false
},
{
label: '单价',
field: 'price',
sort: 'custom',
isSearch: false,
isForm: false
},
{
label: '金额',
field: 'amount',
sort: 'custom',
isTable: true,
isForm: false,
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
}
},
{
label: '成本中心代码',
field: 'costCode',
sort: 'custom',
isSearch: false,
isTable: true,
isForm: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '缺陷编码',
field: 'defectCode',
sort: 'custom',
dictType: DICT_TYPE.QMS_Q3_CODE,
dictClass: 'string',
isSearch: false,
isForm: false,
isTable: true,
table: {
width: 180
},
tableForm: {
type: 'Select'
}
},
{
label: '缺陷位置',
field: 'defectLocation',
sort: 'custom',
isSearch: false,
isForm: false
},
{
label: '缺陷类型',
field: 'defectType',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'Select'
}
},
{
label: '问题原因',
field: 'problemReason',
sort: 'custom',
isSearch: false,
isForm: false
},
{
label: '描述',
field: 'desc',
@ -391,7 +267,7 @@ export const InspectionQ3Detail = useCrudSchemas(
label: '物料号',
field: 'itemCode',
sort: 'custom',
isTable: false,
isTable: true,
isDetail: true,
isSearch: false,
table: {
@ -460,7 +336,7 @@ export const InspectionQ3Detail = useCrudSchemas(
field: 'qty',
sort: 'custom',
isSearch: false,
isTable: false,
isTable: true,
tableForm: {
type: 'InputNumber',
@ -475,7 +351,7 @@ export const InspectionQ3Detail = useCrudSchemas(
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: false,
isTable: true,
tableForm: {
type: 'Select',
disabled: true
@ -490,7 +366,7 @@ export const InspectionQ3Detail = useCrudSchemas(
label: '单价',
field: 'price',
sort: 'custom',
isTable: false,
isTable: true,
isSearch: false,
tableForm: {
disabled: true
@ -506,7 +382,7 @@ export const InspectionQ3Detail = useCrudSchemas(
field: 'amount',
sort: 'custom',
isSearch: false,
isTable: false,
isTable: true,
isForm: false,
tableForm: {
disabled: true
@ -522,7 +398,7 @@ export const InspectionQ3Detail = useCrudSchemas(
field: 'costCode',
sort: 'custom',
isSearch: false,
isTable: false,
isTable: true,
isForm: true,
tableForm: {
isInpuFocusShow: true,
@ -557,7 +433,7 @@ export const InspectionQ3Detail = useCrudSchemas(
dictType: DICT_TYPE.QMS_Q3_CODE,
dictClass: 'string',
isSearch: true,
isTable: false,
isTable: true,
tableForm: {
type: 'Select'
}
@ -568,7 +444,7 @@ export const InspectionQ3Detail = useCrudSchemas(
sort: 'custom',
dictClass: 'string',
isSearch: false,
isTable: false,
isTable: true,
form: {
component: 'Select',
componentProps: {
@ -591,7 +467,7 @@ export const InspectionQ3Detail = useCrudSchemas(
field: 'defectType',
sort: 'custom',
isSearch: false,
isTable: false,
isTable: true,
form: {
component: 'Select'
}
@ -602,31 +478,35 @@ export const InspectionQ3Detail = useCrudSchemas(
hiddenInMain: true,
sort: 'custom',
isSearch: false,
isTable: false,
isTable: true,
form: {
component: 'Select'
}
},
{
label: '操作',
field: 'action',
hiddenInMain: true,
isDetail: false,
isForm: false,
table: {
width: 200,
fixed: 'right'
},
isTableForm: false
}
// {
// label: '操作',
// field: 'action',
// hiddenInMain: true,
// isDetail: false,
// isForm: false,
// table: {
// width: 200,
// fixed: 'right'
// },
// isTableForm: false
// }
])
)
//表单校验
export const InspectionQ3DetailRules = reactive({
itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }],
packingNumber: [{ required: true, message: '请输入包装号', trigger: 'blur' }],
batch: [{ required: true, message: '请输入批次', trigger: 'blur' }],
inventoryStatus: [{ required: true, message: '请选择库存状态', trigger: 'change' }],
toLocationCode: [{ required: true, message: '请输入到库位代码', trigger: 'blur' }]
qty: [{ required: true, message: '请输入数量', trigger: 'change' }],
price: [{ required: true, message: '请选择单价', trigger: 'change' }],
amount: [{ required: true, message: '请选择金额', trigger: 'change' }],
costCode: [{ required: true, message: '请选择成本中心编码', trigger: 'change' }],
defectLocation: [{ required: true, message: '请选择缺陷位置', trigger: 'change' }],
defectType: [{ required: true, message: '请选择缺陷类型', trigger: 'change' }],
problemReason: [{ required: true, message: '请输入问题原因', trigger: 'change' }],
defectCode: [{ required: true, message: '请选择缺陷编码', trigger: 'change' }]
})

356
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -1,23 +1,31 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...ScrapRequestMain.allSchemas.searchSchema,...ScrapRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="[
...ScrapRequestMain.allSchemas.searchSchema,
...ScrapRequestDetail.allSchemas.searchSchema
]"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ScrapRequestMain.allSchemas"
:detailAllSchemas="ScrapRequestDetail.allSchemas"
/>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ScrapRequestMain.allSchemas"
:detailAllSchemas="ScrapRequestDetail.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -28,13 +36,16 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
<template #action="{ row, $index }">
<ButtonBase
:Butttondata="butttondata(row, $index)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -61,6 +72,7 @@
@inputNumberChange="inputNumberChange"
@submitForm="submitForm"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
@clearSearchInput="clearSearchInput"
/>
<!-- 详情 -->
@ -82,14 +94,26 @@
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/scrap-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
<ImportForm
ref="importFormRef"
url="/wms/scrap-request-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { ScrapRequestMain,ScrapRequestMainRules,ScrapRequestDetail,ScrapRequestDetailRules } from './scrapRequestMain.data'
import {
ScrapRequestMain,
ScrapRequestMainRules,
ScrapRequestDetail,
ScrapRequestDetailRules
} from './scrapRequestMain.data'
import * as ScrapRequestMainApi from '@/api/wms/scrapRequestMain'
import * as ScrapRequestDetailApi from '@/api/wms/scrapRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -105,8 +129,10 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...ScrapRequestMain.allSchemas.tableColumns,...ScrapRequestDetail.allSchemas.tableMainColumns])
const tableColumns = ref([
...ScrapRequestMain.allSchemas.tableColumns,
...ScrapRequestDetail.allSchemas.tableMainColumns
])
//
const updataTableColumns = (val) => {
@ -114,7 +140,7 @@ const updataTableColumns = (val) => {
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
@ -129,21 +155,28 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// tableData.value.push(newRow)
// })
//
if(formField == 'packingNumber'){
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['packingNumber']==item['packingNumber']))
if(val.length==0) return
let param = {'itemCodes':val.map(item=>item.itemCode).join(',') as string}
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => {
val.forEach(item=>{
const itemCode = res.find(item1=>item1['itemCode']==item['itemCode'])
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
if (formField == 'packingNumber') {
val = val.filter(
(item) =>
!tableData.value.find(
(item1) =>
item1['itemCode'] == item['itemCode'] &&
item1['packingNumber'] == item['packingNumber']
)
)
if (val.length == 0) return
let param = { itemCodes: val.map((item) => item.itemCode).join(',') as string }
StdcostpriceApi.queryStdcostpriceByItemCode(param).then((res) => {
val.forEach((item) => {
const itemCode = res.find((item1) => item1['itemCode'] == item['itemCode'])
const newRow = JSON.parse(JSON.stringify({ ...tableFormKeys, ...item }))
newRow[formField] = item[searchField]
newRow['packingNumber'] = item['packingNumber']
newRow['batch'] = item['batch']
newRow['fromLocationCode'] = item['locationCode']
newRow['itemCode'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['singlePrice'] = itemCode?itemCode['price']:''
newRow['singlePrice'] = itemCode ? itemCode['price'] : ''
tableData.value.push(newRow)
})
// row['singlePrice'] = res.price
@ -151,16 +184,71 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else {
row[formField] = val[0][searchField]
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
if (formField == 'q1Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q2Number' || item.field == 'q3Number') {
item.componentProps.enterSearch = false
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
}
if (formField == 'q2Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q1Number' || item.field == 'q3Number') {
item.componentProps.enterSearch = false
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
}
if (formField == 'q3Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q1Number' || item.field == 'q2Number') {
item.componentProps.enterSearch = false
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
}
}
})
}
const clearSearchInput = (field) => {
if (field == 'q1Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q2Number' || item.field == 'q3Number') {
item.componentProps.enterSearch = true
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
})
}
if (field == 'q2Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q1Number' || item.field == 'q3Number') {
item.componentProps.enterSearch = true
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
})
}
if (field == 'q3Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q1Number' || item.field == 'q1Number') {
item.componentProps.enterSearch = true
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
})
}
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
@ -170,9 +258,9 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['itemCode'] = val[0]['itemCode']
setV['uom'] = val[0]['uom']
//
let param = {'itemCodes':val[0]['itemCode'] as string}
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => {
if(res&&res.length>0){
let param = { itemCodes: val[0]['itemCode'] as string }
StdcostpriceApi.queryStdcostpriceByItemCode(param).then((res) => {
if (res && res.length > 0) {
setV['singlePrice'] = res[0].price
}
})
@ -182,7 +270,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: ScrapRequestDetailApi.getScrapRequestDetailPage //
@ -193,12 +281,12 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:scrap-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:scrap-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:scrap-request-main:export'}), //
defaultButtons.defaultAddBtn({ hasPermi: 'wms:scrap-request-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:scrap-request-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:scrap-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -211,28 +299,34 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
} else if (val == 'refresh') {
//
if (tableObject.params.filters && tableObject.params.filters.length > 0) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row,val) => {
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
@ -241,45 +335,76 @@ const isShowMainButton = (row,val) => {
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
const butttondata = (row, $index) => {
const findIndex = row['masterId']
? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
: -1
if (findIndex > -1 && findIndex < $index) {
return []
}
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:scrap-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:scrap-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:scrap-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:scrap-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:scrap-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:scrap-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:scrap-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:scrap-request-main:delete'}), //
]
return [
defaultButtons.mainListCloseBtn({
hide: isShowMainButton(row, ['1', '2', '3', '4', '6']),
hasPermi: 'wms:scrap-request-main:close'
}), //
defaultButtons.mainListReAddBtn({
hide: isShowMainButton(row, ['5']),
hasPermi: 'wms:scrap-request-main:reAdd'
}), //
defaultButtons.mainListSubmitBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:scrap-request-main:submit'
}), //
defaultButtons.mainListTurnDownBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'wms:scrap-request-main:refused'
}), //
defaultButtons.mainListApproveBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'wms:scrap-request-main:agree'
}), //
defaultButtons.mainListHandleBtn({
hide: isShowMainButton(row, ['3']),
hasPermi: 'wms:scrap-request-main:handle'
}), //
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:scrap-request-main:update'
}) //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:scrap-request-main:delete'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
if (val == 'mainClose') {
//
console.log('列表-操作按钮事件-关闭')
handleClose(row.masterId)
} else if (val == 'mainReAdd') { //
} else if (val == 'mainReAdd') {
//
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.masterId)
} else if (val == 'mainSubmit') { //
} else if (val == 'mainSubmit') {
//
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.masterId)
} else if (val == 'mainTurnDown') { //
} else if (val == 'mainTurnDown') {
//
console.log('列表-操作按钮事件-驳回')
handleRefused(row.masterId)
} else if (val == 'mainApprove') { //
} else if (val == 'mainApprove') {
//
console.log('列表-操作按钮事件-审批通过')
handleAgree(row.masterId)
} else if (val == 'mainHandle') { //
} else if (val == 'mainHandle') {
//
handleHandle(row.masterId)
} else if (val == 'edit') { //
} else if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.masterId)
}
}
@ -292,7 +417,7 @@ const handleClose = async (id: number) => {
await ScrapRequestMainApi.closeScrapRequestMain(id)
message.success(t('common.closeSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} catch {}
}
@ -304,7 +429,7 @@ const handleReAdd = async (id: number) => {
await ScrapRequestMainApi.reAddScrapRequestMain(id)
message.success(t('common.reAddSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} catch {}
}
@ -316,7 +441,7 @@ const handleSubmit = async (id: number) => {
await ScrapRequestMainApi.submitScrapRequestMain(id)
message.success(t('common.submitSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} catch {}
}
@ -328,7 +453,7 @@ const handleRefused = async (id: number) => {
await ScrapRequestMainApi.refusedScrapRequestMain(id)
message.success(t('common.refusedSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} catch {}
}
@ -340,7 +465,7 @@ const handleAgree = async (id: number) => {
await ScrapRequestMainApi.agreeScrapRequestMain(id)
message.success(t('common.agreeSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} catch {}
}
@ -352,13 +477,20 @@ const handleHandle = async (id: number) => {
await ScrapRequestMainApi.handleScrapRequestMain(id)
message.success(t('common.handleSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} catch {}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
const openForm = async (type: string, row?: number) => {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q1Number' || item.field == 'q2Number' || item.field == 'q3Number') {
item.componentProps.enterSearch = true
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
})
tableData.value = [] //
formRef.value.open(type, row)
}
@ -368,9 +500,11 @@ const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
const departmentCode = wsCache
.get(CACHE_KEY.DEPT)
.find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,'requestScrapMain')
detailRef.value.openDetail(row, titleName, titleValue, 'requestScrapMain')
}
/** 删除按钮操作 */
@ -384,7 +518,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false
message.success(t('common.delSuccess'))
//
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} catch {}
}
@ -406,10 +540,10 @@ const handleExport = async () => {
}
/**
* tableForm方法
*/
* tableForm方法
*/
const tableFormKeys = {}
ScrapRequestDetail.allSchemas.tableFormColumns.forEach(item => {
ScrapRequestDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
@ -421,36 +555,36 @@ const handleAddTable = () => {
//
const handleDeleteTable = (item, index) => {
let itemIndex = tableData.value.indexOf(item)
if(itemIndex>-1){
if (itemIndex > -1) {
tableData.value.splice(itemIndex, 1)
}
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
tableData.value = tableData.value.filter((item) => !selection.includes(item))
}
//
const submitForm = async (formType, submitData) => {
let data = {...submitData}
if(data.masterId){
let data = { ...submitData }
if (data.masterId) {
data.id = data.masterId
}
data.subList = tableData.value //
try {
if (formType === 'create') {
console.log("【报废出库子列表】",data.subList)
if(data.subList.length == 0){
message.warning("请添加子列表数据")
return;
console.log('【报废出库子列表】', data.subList)
if (data.subList.length == 0) {
message.warning('请添加子列表数据')
return
}
let flag = false;
let flag = false
data.subList.forEach((item) => {
if(item.qty == 0){
message.warning("数量不能为0")
flag = true;
return;
}
if (item.qty == 0) {
message.warning('数量不能为0')
flag = true
return
}
})
if(flag){
if (flag) {
return
}
formRef.value.formLoading = true
@ -465,8 +599,8 @@ const submitForm = async (formType, submitData) => {
//
if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
} else {
buttonBaseClick('refresh', null)
}
} finally {
formRef.value.formLoading = false
@ -475,14 +609,14 @@ const submitForm = async (formType, submitData) => {
// /
const detailValidate = (data) => {
let tag = false;
if(data.qty <= 0){
let tag = false
if (data.qty <= 0) {
message.warning('数量必须大于0')
tag = false;
return tag;
}else {
tag = true;
return tag;
tag = false
return tag
} else {
tag = true
return tag
}
}
@ -525,14 +659,16 @@ const tableFormSelectOnBlur = (field, val, row, index) => {
}
const inputNumberChange = (field, index, row, val) => {
if(field == 'qty' || field == 'singlePrice'){
if (field == 'qty' || field == 'singlePrice') {
row.amount = row.qty * row.singlePrice
}
}
const qtyOnChange = (field,val) =>{
if(field == 'qty' || field == 'singlePrice'){
detailRef.value.formRef.formRef.formModel.amount = detailRef.value.formRef.formRef.formModel.qty * detailRef.value.formRef.formRef.formModel.singlePrice
const qtyOnChange = (field, val) => {
if (field == 'qty' || field == 'singlePrice') {
detailRef.value.formRef.formRef.formModel.amount =
detailRef.value.formRef.formRef.formModel.qty *
detailRef.value.formRef.formRef.formModel.singlePrice
}
}

282
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -8,14 +8,14 @@ import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import * as WarehouseApi from '@/api/wms/warehouse'
// import * as InspectionQ1Api from '@/api/qms/inspectionQ1'
// import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data'
import * as InspectionQ1Api from '@/api/qms/inspectionQ1'
import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data'
// import * as InspectionQ2Api from '@/api/qms/inspectionQ2'
// import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data'
import * as InspectionQ2Api from '@/api/qms/inspectionQ2'
import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data'
// import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
// import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
const { t } = useI18n() // 国际化
@ -53,141 +53,141 @@ export const ScrapRequestMain = useCrudSchemas(
isForm: false,
isSearch: true
},
// {
// label: 'Q1通知单号',
// field: 'q1Number',
// sort: 'custom',
// isSearch: false,
// isDetail: true,
// table: {
// width: 150
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true,
// // multiple: true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择Q1通知单号', // 输入框占位文本
// searchField: 'number', // 查询弹窗赋值字段
// searchTitle: 'Q1通知单号', // 查询弹窗标题
// searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
// searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },
// {
// key: 'status',
// value: '0',
// isMainValue: false
// }
// ],
// verificationParams: [
// {
// key: 'number',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true
// }
// ] // 失去焦点校验参数
// }
// }
// },
// {
// label: 'Q2通知单号',
// field: 'q2Number',
// sort: 'custom',
// isSearch: false,
// isDetail: true,
// table: {
// width: 150
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true,
// // multiple: true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本
// searchField: 'number', // 查询弹窗赋值字段
// searchTitle: 'Q2通知单号', // 查询弹窗标题
// searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类
// searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },
// {
// key: 'status',
// value: '0',
// isMainValue: false
// }
// ],
// verificationParams: [
// {
// key: 'number',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true
// }
// ] // 失去焦点校验参数
// }
// }
// },
// {
// label: 'Q3通知单号',
// field: 'q3Number',
// sort: 'custom',
// isSearch: false,
// isDetail: true,
// table: {
// width: 150
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true,
// // multiple: true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
// searchField: 'number', // 查询弹窗赋值字段
// searchTitle: 'Q3通知单号', // 查询弹窗标题
// searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
// searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },
// {
// key: 'status',
// value: '0',
// isMainValue: false
// }
// ],
// verificationParams: [
// {
// key: 'number',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true
// }
// ] // 失去焦点校验参数
// }
// }
// },
{
label: 'Q1通知单号',
field: 'q1Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q1通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q1通知单号', // 查询弹窗标题
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: 'Q2通知单号',
field: 'q2Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q2通知单号', // 查询弹窗标题
searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '状态',
field: 'status',

92
src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts

@ -1,8 +1,8 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
// import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
// import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
/**
* @returns {Array} 退
@ -28,50 +28,50 @@ export const ProductionscrapRecordMain = useCrudSchemas(
},
isSearch: true
},
// {
// label: 'Q3通知单号',
// field: 'q3Number',
// sort: 'custom',
// isSearch: false,
// isDetail: true,
// table: {
// width: 150
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true, // multiple: true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
// searchField: 'number', // 查询弹窗赋值字段
// searchTitle: 'Q3通知单号', // 查询弹窗标题
// searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
// searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },
// {
// key: 'status',
// value: '0',
// isMainValue: false
// }
// ],
// verificationParams: [
// {
// key: 'number',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true
// }
// ] // 失去焦点校验参数
// }
// }
// },
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true, // multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '车间代码',
field: 'workshopCode',

92
src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts

@ -23,8 +23,8 @@ import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplie
import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table'
// import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
// import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
// import * as LocationApi from '@/api/wms/location'
// import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
@ -63,50 +63,50 @@ export const ProductionscrapRequestMain = useCrudSchemas(
isForm: false,
isSearch: true
},
// {
// label: 'Q3通知单号',
// field: 'q3Number',
// sort: 'custom',
// isSearch: false,
// isDetail: true,
// table: {
// width: 150
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true, // multiple: true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
// searchField: 'number', // 查询弹窗赋值字段
// searchTitle: 'Q3通知单号', // 查询弹窗标题
// searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
// searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },
// {
// key: 'status',
// value: '0',
// isMainValue: false
// }
// ],
// verificationParams: [
// {
// key: 'number',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true
// }
// ] // 失去焦点校验参数
// }
// }
// },
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true, // multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '状态',
field: 'status',

92
src/views/wms/productionManage/productscrap/productscrapJobMain/productscrapJobMain.data.ts

@ -1,8 +1,8 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
// import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
/**
* @returns {Array}
@ -28,50 +28,50 @@ export const ProductscrapJobMain = useCrudSchemas(
},
isSearch: true
},
// {
// label: 'Q3通知单号',
// field: 'q3Number',
// sort: 'custom',
// isSearch: false,
// isDetail: true,
// table: {
// width: 150
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true, // multiple: true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
// searchField: 'number', // 查询弹窗赋值字段
// searchTitle: 'Q3通知单号', // 查询弹窗标题
// searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
// searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },
// {
// key: 'status',
// value: '0',
// isMainValue: false
// }
// ],
// verificationParams: [
// {
// key: 'number',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true
// }
// ] // 失去焦点校验参数
// }
// }
// },
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true, // multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',

92
src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts

@ -1,8 +1,8 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
// import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
// import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
/**
* @returns {Array}
@ -28,50 +28,50 @@ export const ProductscrapRecordMain = useCrudSchemas(
},
isSearch: true
},
// {
// label: 'Q3通知单号',
// field: 'q3Number',
// sort: 'custom',
// isSearch: false,
// isDetail: true,
// table: {
// width: 150
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true, // multiple: true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
// searchField: 'number', // 查询弹窗赋值字段
// searchTitle: 'Q3通知单号', // 查询弹窗标题
// searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
// searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },
// {
// key: 'status',
// value: '0',
// isMainValue: false
// }
// ],
// verificationParams: [
// {
// key: 'number',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true
// }
// ] // 失去焦点校验参数
// }
// }
// },
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true, // multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '状态',
field: 'status',

5
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -169,6 +169,7 @@ const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useT
getListApi: BomDismantleApi.getProductscrapBomRecordPage
})
const { getList:getDetailListBom } = detatableMethodsBom
detatableDataBom.params.isRecord = false
/** bom 列表 表单 按钮 */
const ButttondataBom = ref([
defaultButtons.formSaveBtn(null), //
@ -255,6 +256,7 @@ const buttonOperationClick = async (row, label, index,isSave = false)=> {
detatableDataBom.params.bomVersion = row.bomVersion
detailQty.value = row.qty
bomModelVisible.value = true
detatableDataBom.params.isRecord = false
await getDetailListBom()
console.log(row.fromLocationCode);
detatableDataBom.tableList.forEach(async (item) => {
@ -347,10 +349,11 @@ const tableFormButton = async (val , row) => {
detatableDataBom.params = {
itemCode: row.itemCode,
bomVersion: row.bomVersion,
masterId: row.masterId
masterId: row.id
}
rowId.value = row.masterId
detailQty.value = row.qty
detatableDataBom.params.isRecord = true
await getDetailListBom()
//
isShowFooterButtton.value = false

92
src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

@ -21,8 +21,8 @@ import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/produ
import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data'
import * as BomApi from '@/api/wms/bom'
// import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
// import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
const { t } = useI18n() // 国际化
@ -60,50 +60,50 @@ export const ProductscrapRequestMain = useCrudSchemas(
isForm: false,
isSearch: true
},
// {
// label: 'Q3通知单号',
// field: 'q3Number',
// sort: 'custom',
// isSearch: false,
// isDetail: true,
// table: {
// width: 150
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true, // multiple: true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
// searchField: 'number', // 查询弹窗赋值字段
// searchTitle: 'Q3通知单号', // 查询弹窗标题
// searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
// searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// },
// {
// key: 'status',
// value: '0',
// isMainValue: false
// }
// ],
// verificationParams: [
// {
// key: 'number',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true
// }
// ] // 失去焦点校验参数
// }
// }
// },
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true, // multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: InspectionQ3Main.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getInspectionQ3MainPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '状态',
field: 'status',

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

@ -40,7 +40,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '备注',
field: 'remark',
field: 'mainRemark',
sort: 'custom',
table: {
width: 180
@ -648,6 +648,44 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
sortTableDefault:10,
isSearch: true
},
{
label: '是否已发送检验申请',
field: 'inspectRequestFlag',
dictType: DICT_TYPE.TRUE_FALSE,
sort: 'custom',
table: {
width: 150
},
isTable:false,
isTableForm:false,
isForm:false,
form: {
value: 'ALL',
componentProps: {
disabled: true
}
},
isSearch: true,
},
{
label: '是否已生成上架申请',
field: 'putawayRequestFlag',
dictType: DICT_TYPE.TRUE_FALSE,
sort: 'custom',
table: {
width: 150
},
isTable:false,
isTableForm:false,
isForm:false,
form: {
value: 'ALL',
componentProps: {
disabled: true
}
},
isSearch: true,
},
{
label: '物料名称',
field: 'itemName',

23
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue

@ -281,12 +281,6 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
}
})
}
}else if(formField=='hahaha'){
//
setV['poNumber'] = val[0]['poNumber']
setV['poLine'] = val[0]['poLine']
setV['receiptNumber'] = val[0]['receiptNumber']
setV['asnNumber'] = val[0]['asnNumber']
}
formRef.setValues(setV)
@ -628,11 +622,18 @@ const chooseReceiptList = ()=>{
}
//
const searchTableSuccess1 = (formField, searchField, selections, type, row) => {
console.log('searchTableSuccess1',formField, searchField, selections, type, row)
formRef.value.formRef.setValues({
poNumber:111
})
const searchTableSuccess1 = (formField, searchField, val, type, row) => {
console.log('searchTableSuccess1',formField, searchField, val, type, row)
if(formField=='hahaha'){
//
const setV = {}
setV['poNumber'] = val[0]['poNumber']
setV['poLine'] = val[0]['poLine']
setV['receiptNumber'] = val[0]['receiptNumber']
setV['asnNumber'] = val[0]['asnNumber']
formRef.value.formRef.setValues(setV)
}
}
//
const handleDeleteTable = (item, index, formRef) => {

Loading…
Cancel
Save