Browse Source

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

master_hella_20240701
gaojs 6 months ago
parent
commit
0c255774b6
  1. 10
      src/api/wms/purchasereturnRecordMain/index.ts
  2. 95
      src/views/mes/workScheduling/components/report.vue
  3. 54
      src/views/qms/inspectionJob/addForm.vue
  4. 10
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue

10
src/api/wms/purchasereturnRecordMain/index.ts

@ -75,6 +75,16 @@ export const exportPurchasereturnRecordMain = async (params) => {
}
}
// 导出采购退货记录主 Excel
export const exportPurchasereturnRecordMainSCP = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchasereturn-record-main/export-excel-senior-SCP`, data })
} else {
return await request.download({url: `/wms/purchasereturn-record-main/export-excel-SCP`, params})
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchasereturn-record-main/get-import-template' })

95
src/views/mes/workScheduling/components/report.vue

@ -7,33 +7,33 @@
width="600px"
>
<template #title>{{ dialogTitle }} </template>
<el-form ref="formRef">
<el-form-item label="工序" v-model="processCode">
<el-input v-model="processCode" disabled />
<el-form :model="form">
<el-form-item label="工序">
<el-input v-model="form.processCode" disabled />
</el-form-item>
<el-form-item label="选择人员">
<el-select v-model="personSelected" multiple>
<el-select v-model="form.personSelected" multiple>
<el-option v-for="item in personOption" :key="item.workerCode" :label="item.workerName" :value="item.workerCode" />
</el-select>
</el-form-item>
<el-form-item label="报工数量">
<el-input-number v-model="reportCount" @change="handleCount" :key="count"></el-input-number>
<el-input-number v-model="form.reportCount" @change="handleCount" :key="count"></el-input-number>
</el-form-item>
<el-form-item label="工时">
<el-input-number v-model="workTerm"></el-input-number>
<el-input-number v-model="form.workTerm"></el-input-number>
</el-form-item>
<el-form-item label="是否已质检">
<el-switch v-model="checkFlag" active-value="true"> </el-switch>
<el-switch v-model="form.checkFlag" active-value="true"> </el-switch>
</el-form-item>
<el-form-item label="合格数量" @change="handleCount" :key="qcount">
<el-input-number
v-model="qualified"
:disabled="!checkFlag"
v-model="form.qualified"
:disabled="!form.checkFlag"
@change="handleCount"
></el-input-number>
</el-form-item>
<el-form-item label="不合格数量">
<el-input-number disabled v-model="unqualified"></el-input-number>
<el-input-number disabled v-model="form.unqualified"></el-input-number>
</el-form-item>
</el-form>
@ -54,24 +54,32 @@ const dialogVisible = ref(false)
const dialogTitle = ref()
const formLoading = ref(false)
const personOption=ref([])
const processCode = ref()
const personSelected = ref()
const checkFlag = ref(false)
const unqualified = ref()
const reportCount = ref()
const qualified = ref()
const workTerm = ref()
const saveFlag=ref(false)
const planDayCode=ref()
const formRef=ref()
const form = reactive({
processCode:"",
reportCount:0,
workTerm:0,
checkFlag:"FALSE",
personSelected:[],
qualified:0,
unqualified:0
})
const openDetail = async (row: any, titleName: any,code:string) => {
rowData.value = row
//console.log('row-68',row)
dialogVisible.value = true
dialogTitle.value = titleName
processCode.value=row.nodeCode
form.processCode=row.nodeCode
form.personSelected=[]
form.reportCount=0,
form.workTerm=0,
form.checkFlag="FALSE",
form.personSelected=[],
form.qualified=0,
form.unqualified=0
planDayCode.value=code
getCurrentWorkerList(processCode.value)
getCurrentWorkerList(row.nodeCode)
}
@ -85,54 +93,55 @@ const getCurrentWorkerList = async (val) => {
personOption.value = await workschedulingApi.getCurrentWorkerList(params)
}
const count = ref(0)
const qcount = ref(1)
//
const handleCount = (val) => {
if (reportCount.value> rowData.value.planCount) {
const handleCount = () => {
if (form.reportCount> rowData.value.planCount) {
message.alert('报工数量不能超出计划数量!计划数【'+rowData.value.planCount+'】')
reportCount.value =rowData.value.planCount
form.reportCount =rowData.value.planCount
//tableData.value[index].reportCount =rowData.value.planCount
count.value++
//count.value++
return
}
//message.alert(row.checkFlag==true?'1':'2')
if (checkFlag.value) {
if (reportCount.value < qualified.value) {
if (form.checkFlag) {
if (form.reportCount < form.qualified) {
message.alert('合格数不能超出报工数!')
qualified.value=reportCount.value
qcount.value++
form.qualified=form.reportCount
//qcount.value++
return
}
if (qualified.value == undefined || qualified.value == 0) {
qualified.val = reportCount.value
qcount.value++
if (form.qualified == undefined || form.qualified == 0) {
form.qualified= form.reportCount
//qcount.value++
}
unqualified.value= reportCount.value- qualified.value
form.unqualified= form.reportCount- form.qualified
}
}
//
const saveReport = async() => {
let listSub=[{}]
personSelected.value.forEach((item) => {
let listSub=[];
form.personSelected.forEach((item) => {
let data={
reportCount: formRef.value.reportCount,
workTerm: formRef.value.workTerm,
reportPerson: formRef.value.item,
qualified: formRef.value.qualified,
unqualified: formRef.value.unqualified
reportCount: form.reportCount,
workTerm: form.workTerm,
checkFlag: form.checkFlag,
reportPerson: item,
qualified: form.qualified,
unqualified: form.unqualified
}
listSub.push(data)
})
let data = {
reportDate: dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'),
schedulingCode: rowData.value.schedulingCode,
processCode: processCode.value,
processCode: form.processCode,
list: listSub
}
console.log("report-saveReport-137",data)
saveFlag.value = true
try {
await workschedulingApi.reportWorkByProcess(data)

54
src/views/qms/inspectionJob/addForm.vue

@ -370,30 +370,35 @@
//
allSamplePieceSize.value += parseFloat((parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) * parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)).toFixed(2))
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
for (let i = 0; i < parseInt(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty); i++) {
if(!item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList){
//
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
for (let i = 0; i < parseInt(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty); i++) {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue: '', //
qualitativeCode: '', //
defectLevel: '', //
qualifiedQuantity: '', //
unqualifiedQuantity: '' //
})
}
} else {
//
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue: '', //
qualitativeCode: '', //
defectLevel: '', //
qualifiedQuantity: '', //
unqualifiedQuantity: '' //
})
}
} else {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue: '', //
qualitativeCode: '', //
defectLevel: '', //
qualifiedQuantity: '', //
unqualifiedQuantity: '' //
}
)
}
)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
@ -424,13 +429,15 @@
*/
for (let i = 0; i < data.value.packageList.length; i++) {
if (allSamplePieceSize.value > data.value.packageList[i].amount) {
data.value.packageList[i].sampleAmount = data.value.packageList[i].amount
allSamplePieceSize.value = parseFloat((allSamplePieceSize.value - data.value.packageList[i].amount).toFixed(2))
} else {
data.value.packageList[i].sampleAmount = allSamplePieceSize.value
allSamplePieceSize.value = 0
// return;
if(data.value.packageList[i].sampleAmount==null){
if (allSamplePieceSize.value > data.value.packageList[i].amount) {
data.value.packageList[i].sampleAmount = data.value.packageList[i].amount
allSamplePieceSize.value = parseFloat((allSamplePieceSize.value - data.value.packageList[i].amount).toFixed(2))
} else {
data.value.packageList[i].sampleAmount = allSamplePieceSize.value
allSamplePieceSize.value = 0
// return;
}
}
}
// data.value.packageList.forEach(item=>{
@ -802,6 +809,7 @@
return;
}
await InspectionJobMainApi.stagingInspectionJobMain(data.value);
message.success("暂存成功")
} catch {
console.log(111)
}

10
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue

@ -167,8 +167,14 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMain(tableObject.params)
download.excel(data, `${t('ts.采购退货记录主')}.xlsx`)
if(routeName.value.includes('SCP')){
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSCP(tableObject.params)
download.excel(data, `${t('ts.采购退货记录主')}.xlsx`)
}else{
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMain(tableObject.params)
download.excel(data, `${t('ts.采购退货记录主')}.xlsx`)
}
} catch {
} finally {
exportLoading.value = false

Loading…
Cancel
Save