Browse Source

Merge remote-tracking branch 'origin/hella_online_20240803' into hella_online_20240803

hella_online_20240816
gaojs 3 months ago
parent
commit
5c66695614
  1. 46
      src/api/wms/mesRawMaterialConsumptionInfo/index.ts
  2. 4
      src/api/wms/purchasereturnRequestDetail/index.ts
  3. 46
      src/api/wms/rawMaterialConsumptionInfo/index.ts
  4. 8
      src/components/BasicForm/src/BasicForm.vue
  5. 2
      src/components/TableFormCountPlan/src/TableFormCountPlan.vue
  6. 48
      src/views/qms/inspectionQ3/index.vue
  7. 38
      src/views/qms/inspectionQ3/inspectionQ3.data.ts
  8. 164
      src/views/wms/countManage/count/countJobMain/index.vue
  9. 44
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  10. 89
      src/views/wms/countManage/count/countPlanMain/index.vue
  11. 282
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  12. 92
      src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts
  13. 92
      src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts
  14. 112
      src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue
  15. 190
      src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/mesRawMaterialConsumptionInfo.data.ts
  16. 111
      src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue
  17. 260
      src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/rawMaterialConsumptionInfo.data.ts
  18. 92
      src/views/wms/productionManage/productscrap/productscrapJobMain/productscrapJobMain.data.ts
  19. 92
      src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts
  20. 92
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
  21. 325
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
  22. 451
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts

46
src/api/wms/mesRawMaterialConsumptionInfo/index.ts

@ -0,0 +1,46 @@
import request from '@/config/axios'
export const AssemblyFinishedMaterialConsumptionMesRespVO = {
finishPackingNumber: '',
finishBatch: '',
finishItemCode: '',
finishCreateTime: new Date(),
id: 0,
processCode: '',
bomVersion: '',
packingNumber: '',
batch: '',
inventoryStatus: '',
fromLocationCode: '',
fromLocationGroupCode: '',
fromAreaCode: '',
itemName: '',
itemDesc1: '',
itemDesc2: '',
projectCode: '',
qty: '',
uom: '',
number: '',
itemCode: '',
remark: '',
createTime: new Date(),
creator: '',
code: '',
interfaceType: '',
jobDetailId: ''
};
// 查询QAD项目信息列表
export const getMesRawMaterialConsumptionInfoPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productreceipt-detailb/getAssemblyMaterialUsageMesSenior', data })
} else {
return await request.get({ url: `/wms/productreceipt-detailb/getAssemblyMaterialUsageMes`, params })
}
}

4
src/api/wms/purchasereturnRequestDetail/index.ts

@ -45,6 +45,10 @@ export const getPurchasereturnSupplierByCode = async (params) => {
export const getPurchasereturnPurchasereceiptRecordByItemCode = async (params) => {
return await request.get({ url: `/wms/purchasereceipt-record-detail/queryPurchasereceiptRecordByItemCode`, params })
}
// 选完退货库位 渲染子列表数据
export const getBalancePurchaseReceiptReturn = async (params) => {
return await request.get({ url: `/wms/balance/queryBalancePurchaseReceiptReturn`, params })
}
// 查询采购退货申请子列表
export const getPurchasereturnRequestDetailPageSpare = async (params) => {

46
src/api/wms/rawMaterialConsumptionInfo/index.ts

@ -0,0 +1,46 @@
import request from '@/config/axios'
export const AssemblyFinishedMaterialConsumptionRespVO = {
finishPackingNumber: '',
finishBatch: '',
finishItemCode: '',
finishCreateTime: new Date(),
id: 0,
processCode: '',
bomVersion: '',
packingNumber: '',
batch: '',
inventoryStatus: '',
fromLocationCode: '',
fromLocationGroupCode: '',
fromAreaCode: '',
itemName: '',
itemDesc1: '',
itemDesc2: '',
projectCode: '',
qty: '',
uom: '',
number: '',
itemCode: '',
remark: '',
createTime: new Date(),
creator: '',
code: '',
interfaceType: '',
jobDetailId: ''
};
// 查询QAD项目信息列表
export const getRawMaterialConsumptionInfoPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/backflush-record-detailb/getAssemblyMaterialUsageSenior', data })
} else {
return await request.get({ url: `/wms/backflush-record-detailb/getAssemblyMaterialUsage`, params })
}
}

8
src/components/BasicForm/src/BasicForm.vue

@ -78,7 +78,7 @@
<el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail == 'InputString'" />
</template>
</Form>
<div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'">
<div class="table" v-if="(isBusiness && formType == 'create' && fromeWhere != 'countPlan')||(isBusiness && formType == 'update' && updateTypeEdiltSubList && fromeWhere != 'countPlan')">
<TableForm
ref="tableFormRef"
class="w-[100%]"
@ -261,6 +261,12 @@ const props = defineProps({
required: false,
default: ''
},
//
updateTypeEdiltSubList: {
type: String,
required: false,
default: false
},
//
countScopeType: {
type: Array,

2
src/components/TableFormCountPlan/src/TableFormCountPlan.vue

@ -61,7 +61,7 @@
row.type == 'CUSTOMER' ||
row.type == 'ITEM_CODE' ||
row.type == 'WAREHOUSE_CODE' ||
row.type == 'AREABASIC_CODE' ||
row.type == 'AREA_CODE' ||
row.type == 'LOCATIONGROUP_CODE' ||
row.type == 'LOCATION_CODE'
"

48
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)
})
}
//
@ -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(() => {

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

@ -288,18 +288,6 @@ export const InspectionQ3Detail = useCrudSchemas(
isMainValue: false
}
],
isShowTableFormSearch: true, //tableForm下方是否出现输入框
isRepeat: true, //tableForm下方输入框是否可以重复添加该条数据
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
@ -482,19 +470,19 @@ export const InspectionQ3Detail = useCrudSchemas(
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
// }
])
)
@ -507,6 +495,6 @@ export const InspectionQ3DetailRules = reactive({
costCode: [{ required: true, message: '请选择成本中心编码', trigger: 'change' }],
defectLocation: [{ required: true, message: '请选择缺陷位置', trigger: 'change' }],
defectType: [{ required: true, message: '请选择缺陷类型', trigger: 'change' }],
problemReason: [{ required: true, message: '请选择问题原因', trigger: 'change' }],
problemReason: [{ required: true, message: '请输入问题原因', trigger: 'change' }],
defectCode: [{ required: true, message: '请选择缺陷编码', trigger: 'change' }]
})

164
src/views/wms/countManage/count/countJobMain/index.vue

@ -1,22 +1,27 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="CountJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="CountJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="CountJobMain.allSchemas"
/>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="CountJobMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -27,13 +32,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>
@ -58,7 +66,7 @@
ref="detailRef"
:isBasic="false"
:allSchemas="CountJobMain.allSchemas"
:detailAllSchemas="CountJobDetail.allSchemas"
:detailAllSchemas="countJobDetailTableColumns"
:detailAllSchemasRules="CountJobDetailRules"
:searchTableParams="searchTableParams"
:apiPage="CountJobDetailApi.getCountJobDetailPage"
@ -76,17 +84,21 @@
:extend="rowMasterIdRef"
:isShowDownloadBtn="true"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { CountJobMain,CountJobMainRules,CountJobDetail,CountJobDetailRules } from './countJobMain.data'
import {
CountJobMain,
CountJobMainRules,
CountJobDetail,
CountJobDetailRules
} from './countJobMain.data'
import * as CountJobMainApi from '@/api/wms/countJobMain'
import * as CountJobDetailApi from '@/api/wms/countJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import * as PackageunitApi from "@/api/wms/packageunit";
import * as PackageunitApi from '@/api/wms/packageunit'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'CountJobMain' })
@ -106,16 +118,16 @@ const updataTableColumns = (val) => {
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
@ -141,7 +153,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: CountJobMainApi.getCountJobMainPage //
@ -152,10 +164,10 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:count-job-main:export'}), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:count-job-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -168,24 +180,28 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'export') { //
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 {
@ -194,15 +210,17 @@ const isShowMainButton = (row,val) => {
}
// -
const butttondata = (row,$index) => {
const butttondata = (row, $index) => {
return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'wms:count-job-main:close'}), //
defaultButtons.mainListJobAccBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListJobCloBtn({
hide: isShowMainButton(row, ['1', '2']),
hasPermi: 'wms:count-job-main:close'
}), //
{
label: '导出',
name: 'exportCountJob',
hide: isShowMainButton(row,['1','2']),
hide: isShowMainButton(row, ['1', '2']),
type: 'primary',
color: '',
link: true, //
@ -211,58 +229,64 @@ const butttondata = (row,$index) => {
{
label: '导入',
name: 'importCountJob',
hide: isShowMainButton(row,['2']),
hide: isShowMainButton(row, ['2']),
type: 'success',
color: '',
link: true, //
hasPermi: '' // wms:count-job-main:importCountJob
},
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobAbaBtn({ hide: isShowMainButton(row, ['2']) }), //
{
label: '完成',
name: 'done',
hide: isShowMainButton(row,['2']),
hide: isShowMainButton(row, ['2']),
type: 'success',
color: '',
link: true, //
hasPermi: '' // wms:count-job-main:importCountJob
},
}
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
if (val == 'mainJobExe') {
//
console.log('列表-操作按钮事件-执行')
} else if (val == 'mainJobAba') { //
} else if (val == 'mainJobAba') {
//
console.log('列表-操作按钮事件-放弃')
tableObject.loading = true
try {
await CountJobMainApi.abandonCountJobMain(row.id)
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} finally {
tableObject.loading = false
}
} else if (val == 'mainJobClo') { //
} else if (val == 'mainJobClo') {
//
handleClose(row.id)
} else if (val == 'mainJobAcc') { //
} else if (val == 'mainJobAcc') {
//
tableObject.loading = true
try {
await CountJobMainApi.acceptCountJobMain(row.id)
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} finally {
tableObject.loading = false
}
console.log('列表-操作按钮事件-承接')
} else if (val == 'exportCountJob'){//
handleExportCountJob(row.id,row.number)
} else if( val == 'importCountJob'){ //
} else if (val == 'exportCountJob') {
//
handleExportCountJob(row.id, row.number)
} else if (val == 'importCountJob') {
//
handleImport(row.id)
} else if( val == 'done'){ //
} else if (val == 'done') {
//
handleDone(row.id)
}
}
/** 关闭按钮操作 */
@ -272,7 +296,7 @@ const handleClose = async (id: number) => {
tableObject.loading = true
await CountJobMainApi.closeCountJobMain(id)
message.success(t('common.closeSuccess'))
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} finally {
tableObject.loading = false
}
@ -283,21 +307,37 @@ const handleDone = async (id: number) => {
await message.confirm('确认完成吗?')
tableObject.loading = true
await CountJobMainApi.doneCountJobMain(id)
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} finally {
tableObject.loading = false
}
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const countJobDetailTableColumns = 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,"jobCountMain")
//
countJobDetailTableColumns.value.tableColumns = []
if (!row.isShow) {
CountJobDetail.allSchemas.tableColumns.forEach((item) => {
if (item.field != 'qty') {
countJobDetailTableColumns.value.tableColumns.push(item)
}
})
} else {
countJobDetailTableColumns.value.tableColumns = JSON.parse(
JSON.stringify(CountJobDetail.allSchemas.tableColumns)
)
}
detailRef.value.openDetail(row, titleName, titleValue, 'jobCountMain')
}
/** 导出按钮操作 */
@ -318,7 +358,7 @@ const handleExport = async () => {
}
/** 单条任务导出 */
const handleExportCountJob = async (id: number,number: string) => {
const handleExportCountJob = async (id: number, number: string) => {
try {
await message.exportConfirm()
exportLoading.value = true
@ -327,7 +367,7 @@ const handleExportCountJob = async (id: number,number: string) => {
// download.excel(data, ''+number+'.xlsx')
download.excel(data, `${excelTitle.value}${number}】【${formatDate(new Date())}】.xlsx`)
} catch {
}finally {
} finally {
exportLoading.value = false
}
}
@ -336,7 +376,7 @@ const handleExportCountJob = async (id: number,number: string) => {
const importFormRef = ref()
const rowMasterIdRef = ref('')
const handleImport = (id: string) => {
rowMasterIdRef.value = id;
rowMasterIdRef.value = id
importFormRef.value.open()
}

44
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -90,6 +90,25 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
// }
// }
// },
{
label: '明盘',
field: 'isOpenCount',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
form: {
component: 'Switch',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
sort: 'custom',
table: {
width: 150
},
},
{
label: '任务拆分方式',
field: 'countSplitType',
@ -102,7 +121,10 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable:true,
isForm: true,
form: {
value: 'locationCode'
value: 'masterId',
componentProps: {
disabled:true
}
}
},
@ -211,25 +233,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '明盘',
field: 'isOpenCount',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
form: {
component: 'Switch',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',

89
src/views/wms/countManage/count/countPlanMain/index.vue

@ -307,7 +307,7 @@ const buttonTableClick = async (val, row) => {
.then(() => {
message.success(t('打开成功'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
})
.catch((err) => {
tableObject.loading = false
@ -321,7 +321,7 @@ const buttonTableClick = async (val, row) => {
.then(() => {
message.success(t('关闭成功'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
})
.catch((err) => {
tableObject.loading = false
@ -334,7 +334,7 @@ const buttonTableClick = async (val, row) => {
await CountPlanMainApi.submit(row.id)
message.success(t('提交审批成功'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} else if (val == 'mainPlanTur') {
//
await message.confirm('确认要驳回吗?')
@ -343,7 +343,7 @@ const buttonTableClick = async (val, row) => {
.then(() => {
message.success(t('驳回成功'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
})
.catch((err) => {
tableObject.loading = false
@ -357,7 +357,7 @@ const buttonTableClick = async (val, row) => {
.then(() => {
message.success(t('审批已通过'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
})
.catch((err) => {
tableObject.loading = false
@ -371,7 +371,7 @@ const buttonTableClick = async (val, row) => {
.then(() => {
message.success(t('发布成功'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
})
.catch((err) => {
tableObject.loading = false
@ -385,7 +385,7 @@ const buttonTableClick = async (val, row) => {
.then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
})
.catch((err) => {
tableObject.loading = false
@ -401,6 +401,22 @@ const buttonTableClick = async (val, row) => {
}
const onChange = (field, value) => {
console.log(field, value)
if (field == 'isOpenCount') {
if (value == 'FALSE') {
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'countSplitType') {
item.componentProps.disabled = true
}
})
formRef.value.formRef.formModel.countSplitType = 'masterId'
} else {
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'countSplitType') {
item.componentProps.disabled = false
}
})
}
}
}
/** 添加/修改操作 */
const formRef = ref()
@ -419,22 +435,29 @@ const openForm = async (type: string, row?: any) => {
// }
// })
if (row.type == 'CYCLE') {
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = false
item.label = '执行周期'
}
})
CountPlanMainRules.crontab[0].required = true
} else {
CountPlanMainRules.crontab[0].required = false
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = true
item.label = ''
}
})
}
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = false
item.label = '执行周期'
}
})
CountPlanMainRules.crontab[0].required = true
} else {
CountPlanMainRules.crontab[0].required = false
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = true
item.label = ''
}
})
}
if (type == 'create') {
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'countSplitType') {
item.componentProps.disabled = true
}
})
}
formRef.value.open(type, row)
// Promise.all([getOwnerAllList(),
@ -458,7 +481,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
// getAreaAllList()
// getLocationgroupAllList()
// getLocationAllList()
detailRef.value.openDetail(row, titleName, titleValue,"planCountMain")
detailRef.value.openDetail(row, titleName, titleValue, 'planCountMain')
}
//
const detailOpenForm = (type, row) => {
@ -473,7 +496,7 @@ const detailOpenForm = (type, row) => {
row.type == 'ITEMS_GROUP' ||
row.type == 'ITEM_CODE' ||
row.type == 'WAREHOUSE_CODE' ||
row.type == 'AREABASIC_CODE' ||
row.type == 'AREA_CODE' ||
row.type == 'LOCATIONGROUP_CODE' ||
row.type == 'LOCATION_CODE'
) {
@ -559,7 +582,7 @@ const detailOpenForm = (type, row) => {
}
})
break
case 'AREABASIC_CODE':
case 'AREA_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
@ -607,7 +630,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false
message.success(t('common.delSuccess'))
//
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} finally {
tableObject.loading = false
}
@ -693,8 +716,8 @@ const submitForm = async (formType, data) => {
//
if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
} else {
buttonBaseClick('refresh', null)
}
} finally {
formRef.value.formLoading = false
@ -801,7 +824,7 @@ const selectChangeDetail = (field, val) => {
val == 'ITEMS_GROUP' ||
val == 'ITEM_CODE' ||
val == 'WAREHOUSE_CODE' ||
val == 'AREABASIC_CODE' ||
val == 'AREA_CODE' ||
val == 'LOCATIONGROUP_CODE' ||
val == 'LOCATION_CODE'
) {
@ -887,7 +910,7 @@ const selectChangeDetail = (field, val) => {
}
})
break
case 'AREABASIC_CODE':
case 'AREA_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isSearchList = true
@ -938,7 +961,7 @@ const tableFormChange = async (field, val, row) => {
row.type == 'ITEMS_GROUP' ||
row.type == 'ITEM_CODE' ||
row.type == 'WAREHOUSE_CODE' ||
row.type == 'AREABASIC_CODE' ||
row.type == 'AREA_CODE' ||
row.type == 'LOCATIONGROUP_CODE' ||
row.type == 'LOCATION_CODE'
) {
@ -1018,7 +1041,7 @@ const tableFormChange = async (field, val, row) => {
searchPage: WarehouseApi.getWarehousePage
}
break
case 'AREABASIC_CODE':
case 'AREA_CODE':
row.searchTable = {
isInpuFocusShow: true,
searchTitle: '库区信息',

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',

112
src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue

@ -0,0 +1,112 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...MesRawMaterialConsumptionInfo.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="MesRawMaterialConsumptionInfo.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as MesRawMaterialConsumptionInfoApi from '@/api/wms/mesRawMaterialConsumptionInfo'
import { getAccessToken } from '@/utils/auth'
import {
MesRawMaterialConsumptionInfo
} from './mesRawMaterialConsumptionInfo.data'
import { getJmreportBaseUrl } from '@/utils/systemParam'
//
defineOptions({ name: 'RawMaterialConsumptionInfo' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...MesRawMaterialConsumptionInfo.allSchemas.tableColumns])
const mesModelVisible = ref(false)
const { tableObject: tableObject, tableMethods: tableMethods } =useTable({
getListApi: MesRawMaterialConsumptionInfoApi.getMesRawMaterialConsumptionInfoPage
})
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultExportBtn({hasPermi:'wms:productreceipt-record-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'export') { //
// handleExport()
} 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 { //
console.log('其他按钮', item)
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

190
src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/mesRawMaterialConsumptionInfo.data.ts

@ -0,0 +1,190 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
export const MesRawMaterialConsumptionInfo = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '成品包装号',
field: 'finishedPackingNumber',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '成品批次',
field: 'finishedBatch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '成品物料代码',
field: 'finishedItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '成品创建时间',
field: 'finishedCreateTime',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '成品创建人',
field: 'finishedCreator',
sort: 'custom',
isTable: true,
table: {
width: 150
},
},
{
label: '唯一码',
field: 'remark',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '客户物料号',
field: 'customerItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '原料包装号',
field: 'packingNumber',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '原料旧包装号',
field: 'oldPackingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '原料批次',
field: 'batch',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '原料主表ID',
field: 'masterId',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料外部零件号',
field: 'outsideItemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料外部生产日期',
field: 'outsideProduceDate',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料外部流水号',
field: 'outsideSerialNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建人',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
sort: 'custom',
table: {
width: 150
},
},
]))

111
src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue

@ -0,0 +1,111 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...RawMaterialConsumptionInfo.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RawMaterialConsumptionInfo.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as RawMaterialConsumptionInfoApi from '@/api/wms/rawMaterialConsumptionInfo'
import { getAccessToken } from '@/utils/auth'
import {
RawMaterialConsumptionInfo
} from './rawMaterialConsumptionInfo.data'
import { getJmreportBaseUrl } from '@/utils/systemParam'
//
defineOptions({ name: 'RawMaterialConsumptionInfo' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...RawMaterialConsumptionInfo.allSchemas.tableColumns])
const mesModelVisible = ref(false)
const { tableObject: tableObject, tableMethods: tableMethods } =useTable({
getListApi: RawMaterialConsumptionInfoApi.getRawMaterialConsumptionInfoPage
})
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultExportBtn({hasPermi:'wms:productreceipt-record-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'export') { //
// handleExport()
} 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 { //
console.log('其他按钮', item)
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

260
src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/rawMaterialConsumptionInfo.data.ts

@ -0,0 +1,260 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
/**
* @returns {Array}
*/
export const RawMaterialConsumptionInfo = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '成品包装号',
field: 'finishedPackingNumber',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '成品批次',
field: 'finishedBatch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '成品物料代码',
field: 'finishedItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '成品创建时间',
field: 'finishedCreateTime',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '成品创建人',
field: 'finishedCreator',
sort: 'custom',
isTable: true,
table: {
width: 150
},
},
{
label: '原料工序代码',
field: 'processCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料BOM版本',
field: 'bomVersion',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '原料库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料从库位组代码',
field: 'fromLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料从库区代码',
field: 'fromAreaCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
},
{
label: '原料物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '原料备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '原料计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原料创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
]))

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',

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',

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

@ -54,18 +54,20 @@
<BasicForm
ref="formRef"
@success="getList"
:rules="PurchasereturnRequestMainRules"
:formAllSchemas="PurchasereturnRequestMain.allSchemas"
:tableAllSchemas="PurchasereturnRequestDetail.allSchemas"
:tableFormRules="PurchasereturnRequestDetailRules"
:rules="PurchasereturnRequestMainRulesNew"
:formAllSchemas="PurchasereturnRequestMainNew.allSchemas"
:tableAllSchemas="PurchasereturnRequestDetailNew.allSchemas"
:tableFormRules="PurchasereturnRequestDetailRulesNew"
:tableData="tableData"
:apiUpdate="PurchasereturnRequestMainApi.updatePurchasereturnRequestMain"
:apiCreate="PurchasereturnRequestMainApi.createPurchasereturnRequestMain"
:isBusiness="true"
:isShowButton="isShowButton"
:isShowButton="false"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
:isShowReduceButtonSelection="false"
:isShowReduceButton="false"
:updateTypeEdiltSubList="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@ -73,7 +75,7 @@
@onChange="onChangeForm"
>
<template #hahaha>
<el-button style="margin-left:90px;width:100%" type="primary" @click="chooseReceiptList">选择收货单明细</el-button>
<el-button style="width:100%" type="primary" @click="chooseReceiptList">选择收货单明细</el-button>
</template>
<template #hehehe>
@ -124,7 +126,7 @@
@searchTableSuccess="searchTableSuccessLabel"
/>
<!-- 标签打印 -->
<SearchTable style="width: 905px" ref="showLabelRef" @searchTableSuccess="showLabelSuccess"/>
<SearchTable style="width: 905px" ref="showLabelRef" @searchTableSuccess="showLabelSuccess" />
<!-- 导入 -->
<ImportForm
ref="importFormRef"
@ -140,15 +142,19 @@
<script setup lang="ts">
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import {
PurchasereturnRequestMainNew,
PurchasereturnRequestMainRulesNew,
PurchasereturnRequestDetailNew,
PurchasereturnRequestDetailRulesNew,
PurchasereturnPurchasereceiptRecordNew
} from './purchasereturnRequestMainNew.data'
import {
PurchasereturnRequestMain,
PurchasereturnRequestMainRules,
PurchasereturnRequestDetail,
PurchasereturnRequestDetailRules,
PurchasereReturnRequestDetailLabel,
PurchasereceiptRecordMain1,
PurchasereturnPurchasereceiptRecord
} from './purchasereturnRequestMain.data'
PurchasereReturnRequestDetailLabel
} from '../purchasereturnRequestMain/purchasereturnRequestMain.data'
import * as PurchasereturnRequestMainApi from '@/api/wms/purchasereturnRequestMain'
import * as PurchasereturnRequestDetailApi from '@/api/wms/purchasereturnRequestDetail'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
@ -160,8 +166,6 @@ import * as BalanceApi from '@/api/wms/balance'
import { async } from '@antv/x6/lib/registry/marker/async'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
// 退
defineOptions({ name: 'PurchasereturnRequestMainNew' })
@ -182,36 +186,27 @@ const isShowButton = ref(true)
const updataTableColumns = (val) => {
tableColumns.value = val
}
const onChangeForm = (field, cur, formRef)=>{
console.log('onChangeForm',field, cur, formRef)
if(field=='supplierCode'){
//
PurchasereturnRequestMain.allSchemas.formSchema.forEach(item=>{
//
if(item.field=='supplierCode'){
let setV = {}
setV['supplierName'] = item.componentProps.options?.find(el=>el.supplierCode==cur+'')['supplierName']
formRef.value.setValues(setV)
}
})
}else if(field == 'locationCode'){
// 退
tableData.value = [{
'batch':'20240908',
'status':'合格',
'inventoryBalance':300,
'qty':1,
'reason':'200',
'remark':'',
}]
}
}
const onEnter = async (field, value) => {
console.log(field, value)
if ('supplierCode' == field) {
//
formRef.value.opensearchTable(
'purchaseReceiptRecordNumber',
'number',
'采购收货记录',
PurchasereceiptRecordMain1.allSchemas,
PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn,
[
{
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
}
]
)
} else if ('purchaseReceiptRecordNumber' == field) {
//
}
}
//
@ -256,7 +251,6 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row
}
})
}
//
const searchTableSuccess = async (formField, searchField, val, formRef, type, row) => {
console.log('searchTableSuccess', formField, searchField, val, formRef, type, row)
@ -275,8 +269,17 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
})
console.log('物料供应商',res)
if(res&&res.length>0){
PurchasereturnRequestMain.allSchemas.formSchema.forEach(item=>{
PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{
if(item.field == 'supplierCode'){
//
setV['supplierCode'] = ''
setV['supplierName'] = ''
setV['hahaha'] = ''
setV['poNumber'] = ''
setV['poLine'] = ''
setV['receiptNumber'] = ''
setV['asnNumber'] = ''
tableData.value = []
item.componentProps.options = res
}
})
@ -291,8 +294,63 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
if (formField == 'poLine' || formField == 'itemCode') {
console.log(val)
setV['poLine'] = val[0]['poLine']
setV['poNumber'] = val[0]['poNumber']
setV['itemCode'] = val[0]['itemCode']
setV['itemName'] = val[0]['itemName']
setV['itemDesc1'] = val[0]['itemDesc1']
setV['itemDesc2'] = val[0]['itemDesc2']
setV['batch'] = val[0]['toBatch']
setV['altBatch'] = val[0]['altBatch']
setV['containerNumber'] = val[0]['toContainerNumber']
setV['receiptQty'] = val[0]['qty']
setV['qty'] = val[0]['qty']
setV['uom'] = val[0]['uom']
setV['supplierQty'] = val[0]['supplierQty']
setV['supplierUom'] = val[0]['supplierUom']
setV['inventoryStatus'] = val[0]['inventoryStatus']
// setV['fromLocationCode'] = val[0]['toLocationCode']
// setV['toLocationCode'] = val[0]['toLocationCode']
setV['fromLocationGroupCode'] = val[0]['locationGroupCode']
setV['toLocationGroupCode'] = null
setV['toWarehouseCode'] = null
setV['toAreaTypes'] = null
setV['fromAreaCode'] = val[0]['areaCode']
setV['toAreaCode'] = val[0]['toAreaCode']
setV['fromQwnerCode'] = val[0]['fromQwnerCode']
setV['toOwnerCode'] = val[0]['toOwnerCode']
setV['arriveDate'] = val[0]['arriveDate']
setV['produceDate'] = val[0]['produceDate']
setV['expireDate'] = val[0]['expireDate']
setV['convertRate'] = val[0]['convertRate']
setV['visualInspectResult'] = val[0]['visualInspectResult']
setV['visualInspectPhotos'] = val[0]['visualInspectPhotos']
setV['failedReason'] = val[0]['failedReason']
setV['singlePrice'] = val[0]['singlePrice']
setV['amount'] = val[0]['amount']
setV['projectCode'] = val[0]['projectCode']
// setV['packingNumber'] = val[0]['packingNumber']
// setV['inventoryBalance'] = val[0]['qty']
if (formField == 'itemCode') {
setV['batch'] = val[0]['toBatch']
setV['containerNumber'] = val[0]['toContainerNumber']
setV['containerNumber'] = val[0]['containerNumber']
setV['containerNumber'] = val[0]['containerNumber']
// setV['fromLocationCode'] = val[0]['fromLocationCode']
// setV['toLocationCode'] = val[0]['toLocationCode']
}
} else if (formField == 'packingNumber'){
setV[formField] = val[0][searchField]
setV['inventoryBalance'] = val[0]['qty']
setV['batch'] = val[0]['batch']
setV['fromLocationCode'] = val[0]['locationCode']
}
else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)
})
}
@ -449,10 +507,37 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {
originTableData.value = [] //
tableData.value = [] //
isShowButton.value = true
if (type == 'create') {
originTableData.value = [] //
tableData.value = [] //
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = true
item.componentProps.isSearchList = true
}
if (item.field == 'asnNumber') {
item.componentProps.disabled = true
item.componentProps.isSearchList = true
}
})
}
if (type == 'update') {
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = true
item.componentProps.isSearchList = false
}
if (item.field == 'asnNumber') {
item.componentProps.disabled = true
item.componentProps.isSearchList = false
}
})
tableData.value = [{
}]
}
formRef.value.open(type, row)
}
@ -590,7 +675,132 @@ const originTableData = ref([])
const searchTableRef = ref()
//
const handleAddTable = () => {
const subTableDFata = originTableData.value.filter(
(item) => !tableData.value.find((item1) => item1.id == item.id)
)
if (subTableDFata.length == 0) {
message.warning('暂无可选择数据!')
return
}
const tableObject = {
//
currentPage: 1,
//
exportLoading: false,
//
loading: false,
//
pageSize: subTableDFata.length,
params: null,
//
sort: {
order: '', //
prop: '' //
},
//
total: subTableDFata.length,
//
tableList: subTableDFata,
currentRow: null
}
const tableColumns = PurchasereturnRequestDetail.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
searchTableRef.value.openData('采购收货记录单号', tableObject, { tableColumns }, true)
// searchTableRef.value.open(
// ('',
// // _searchTableAllSchemas,
// // _searchTablePage, //
// // formField,
// // searchField,
// true,//
// // type,
// // row,
// _searchCondition
// )
// )
// console.log(subTableDFata)
// const {tableObject, tableMethods } = useTable({
// getListApi: getPage.value //
// })
// searchTableRef.value.open(
// ('',
// // _searchTableAllSchemas,
// // _searchTablePage, //
// // formField,
// // searchField,
// true,//
// // type,
// // row,
// _searchCondition
// )
// )
// tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
// let purchaseReceiptRecordNumber = formRef.value.formRef.formModel.purchaseReceiptRecordNumber
// PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => {
// item.tableForm.disabled = true
// if (item.field == 'remark') {
// item.tableForm.disabled = false
// }
// if (item.field == 'reason') {
// item.tableForm.disabled = false
// }
// if (item.field == 'qty') {
// item.tableForm.disabled = false
// }
// if(purchaseReceiptRecordNumber == ''){
// if (item.field == 'itemCode') {
// item.tableForm.isInpuFocusShow = true
// }
// if(item.field == 'poLine'){
// item.tableForm.isInpuFocusShow = false
// }
// }else{
// if (item.field == 'itemCode') {
// item.tableForm.isInpuFocusShow = false
// }
// if(item.field == 'poLine'){
// item.tableForm.isInpuFocusShow = true
// }
// }
// })
}
const onChangeForm = async (field, cur, formRef)=>{
console.log('onChangeForm',field, cur, formRef)
if(field=='supplierCode'){
//
PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{
//
if(item.field=='supplierCode'){
let setV = {}
setV['supplierName'] = item.componentProps.options?.find(el=>el.supplierCode==cur+'')['supplierName']
formRef.value.setValues(setV)
}
})
}else if(field == 'locationCode'){
// 退
let subList = await PurchasereturnRequestDetailApi.getBalancePurchaseReceiptReturn({
itemCode:formRef.value.formModel.itemCode,
fromLocationCode:formRef.value.formModel.locationCode
})
console.log('subList',subList)
if(subList&&subList.length>0){
tableData.value = subList.map(item=>({
'batch':item['batch'],
'status':item['inventoryStatus'],
'inventoryBalance':item['qty'],
'qty':1,
'reason_type':'',
'reason':''
}))
}
}
}
//
const chooseReceiptList = ()=>{
@ -604,7 +814,7 @@ const chooseReceiptList = ()=>{
}
searchTableRef.value.open(
"收货单明细",
PurchasereturnPurchasereceiptRecord.allSchemas,
PurchasereturnPurchasereceiptRecordNew.allSchemas,
PurchasereturnRequestDetailApi.getPurchasereturnPurchasereceiptRecordByItemCode,
"hahaha",
"hahaha",
@ -628,6 +838,7 @@ const searchTableSuccess1 = (formField, searchField, val, type, row) => {
if(formField=='hahaha'){
//
const setV = {}
setV['hahaha'] = val[0]['asnNumber']
setV['poNumber'] = val[0]['poNumber']
setV['poLine'] = val[0]['poLine']
setV['receiptNumber'] = val[0]['receiptNumber']
@ -679,26 +890,14 @@ const submitForm = async (formType, submitData) => {
// message.warning("退")
// return;
// }
if (tableData.value.find((item) => Number(item.qty) > Number(item.inventoryBalance))) {
if (tableData.value.find((item) => item['qty']> item['inventoryBalance'])) {
message.warning('退货数量不能大于库存余额')
return
}
data.subList = tableData.value //
data.subList = tableData.value.filter(item=>item['qty']>0) //
formRef.value.formLoading = true
try {
if (formType === 'create') {
let flag = false
data.subList.forEach((item) => {
if (item.qty == 0) {
message.warning('数量不能为0')
flag = true
return
}
})
if (flag) {
formRef.value.formLoading = false
return
}
data.returnSourceType='1'
await PurchasereturnRequestMainApi.createPurchasereturnRequestMain(data)
message.success(t('common.createSuccess'))

451
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts → src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts

@ -43,120 +43,10 @@ const userDept = userStore.userSelfInfo.dept
userDept.id = userDept.id.toString()
const userDeptArray: any = [userDept]
// 采购收货记录展示列
export const PurchasereceiptRecordMain1 = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
fixed: 'left',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '采购收货记录单号',
field: 'number',
fixed: 'left',
sort: 'custom',
table: {
width: 200
},
isSearch: true
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 180
},
sortTableDefault: 2,
isSearch: true
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
}
},
{
label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面
field: 'fromBatch',
sort: 'custom',
isForm: false,
isTableForm: false,
table: {
width: 150
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
}
},
// {
// label: '包装规格',
// field: 'packUnit',
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '从库位代码',
// field: 'fromLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
//
// },
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
}
}
])
)
/**
* @returns {Array} 退
*/
export const PurchasereturnRequestMain = useCrudSchemas(
export const PurchasereturnRequestMainNew = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '物料代码',
@ -244,7 +134,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(
}
},
{
label: '',
label: ' ',
field: 'hahaha',
table: {
width: 180
@ -338,7 +228,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
@ -431,9 +321,23 @@ export const PurchasereturnRequestMain = useCrudSchemas(
}
])
)
//表单校验
export const PurchasereturnRequestMainRulesNew = reactive({
itemCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
hahaha: [
required
],
locationCode: [
{ required: true, message: '请选择收货单明细', trigger: 'blur' }
]
})
export const PurchasereturnPurchasereceiptRecord = useCrudSchemas(
export const PurchasereturnPurchasereceiptRecordNew = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '收货日期',
@ -461,9 +365,6 @@ export const PurchasereturnPurchasereceiptRecord = useCrudSchemas(
label: '收货单号',
field: 'receiptNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
@ -477,9 +378,6 @@ export const PurchasereturnPurchasereceiptRecord = useCrudSchemas(
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
@ -556,56 +454,12 @@ export const PurchasereturnPurchasereceiptRecord = useCrudSchemas(
])
)
//表单校验
export const PurchasereturnRequestMainRules = reactive({
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
dueTime: [
{ required: true, message: '请选择截止时间', trigger: 'blur' }
],
// purchaseReceiptRecordNumber: [
// { required: true, message: '请输入采购收货记录单号', trigger: 'blur' }
// ],
carrierCode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
vehiclePlateNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
fromWarehouseCode: [
{ required: true, message: '请输入从仓库代码', trigger: 'blur' }
],
fromAreaTypes: [
{ required: true, message: '请选择从库区类型范围', trigger: 'change' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
autoAgree: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' }
],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
})
/**
* @returns {Array} 退
*/
export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
export const PurchasereturnRequestDetailNew = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '批次',
field: 'batch',
@ -689,7 +543,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
{
label: '退货原因',
field: 'reason',
field: 'reason_type',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
// isSearch: true,
@ -709,7 +563,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
{
label: '退货原因描述',
field: 'remark',
field: 'reason',
sort: 'custom',
table: {
width: 150
@ -731,264 +585,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
]))
//表单校验
export const PurchasereturnRequestDetailRules = reactive({
export const PurchasereturnRequestDetailRulesNew = reactive({
})
export const PurchasereReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
isTableForm: true,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
isTableForm: true,
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isTable:false,
isTableForm: false,
isForm: false
},
// {
// label: '器具号',
// field: 'containerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false
// },
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min: 1,
precision: 6
},
},
tableForm: {
disabled:true,
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
}
},
{
label: '从库位代码1',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '生产日期',
field: 'produceDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
disabled:true,
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
tableForm:{
disabled:true,
type:'FormDate',
placeholder: '请选择生产日期',
valueFormat: 'x',
},
},
// {
// label: '替代批次',
// field: 'altBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false
// },
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
tableForm: {
type: 'Select'
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
isTableForm: true,
isForm: true
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true
}
},
tableForm:{
disabled:true
},
isTableForm: true,
isForm: true
},
]))
Loading…
Cancel
Save