Browse Source

BUG修改

master_hella_20240701
parent
commit
86ae09084a
  1. 6
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  2. 13
      src/views/qms/inspectionJob/addForm.vue
  3. 24
      src/views/qms/inspectionJob/index.vue

6
src/api/qms/inspectionJob/inspectionJobMain/index.ts

@ -51,12 +51,14 @@ export const abandonInspectionJobMain = async (id) => {
export const closeInspectionJobMain = async (id) => { export const closeInspectionJobMain = async (id) => {
return await request.put({ url: `/qms/inspection-job-main/close?id=` + id }) return await request.put({ url: `/qms/inspection-job-main/close?id=` + id })
} }
// 发布检验任务
export const releaseInspectionJobMain = async (id) => {
return await request.put({ url: `/qms/inspection-job-main/release?id=` + id })
}
// 导出检验申请 Excel // 导出检验申请 Excel
export const exportInspectionJobMain = async (params) => { export const exportInspectionJobMain = async (params) => {
return await request.download({ url: `/qms/inspection-job-main/export-excel`, params }) return await request.download({ url: `/qms/inspection-job-main/export-excel`, params })
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/qms/inspection-job-main/get-import-template' }) return request.download({ url: '/qms/inspection-job-main/get-import-template' })

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

@ -369,7 +369,7 @@
// //
allSamplePieceSize.value += parseFloat((parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) * parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)).toFixed(2)) allSamplePieceSize.value += parseFloat((parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) * parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)).toFixed(2))
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
if(!item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList){ if (!item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) {
// //
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) { if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
@ -427,7 +427,7 @@
*/ */
for (let i = 0; i < data.value.packageList.length; i++) { for (let i = 0; i < data.value.packageList.length; i++) {
if(data.value.packageList[i].sampleAmount==null){ if (data.value.packageList[i].sampleAmount == null) {
if (allSamplePieceSize.value > data.value.packageList[i].amount) { if (allSamplePieceSize.value > data.value.packageList[i].amount) {
data.value.packageList[i].sampleAmount = 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)) allSamplePieceSize.value = parseFloat((allSamplePieceSize.value - data.value.packageList[i].amount).toFixed(2))
@ -604,14 +604,11 @@
let numberList = []// let numberList = []//
let parseFloatList = []// let parseFloatList = []//
data.value.subList.forEach((item, index) => { data.value.subList.forEach((item, index) => {
console.log("woxianlai")
console.log(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList)
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) {
arrBol.push( arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => { (cur, key) => {
return cur.qualifiedQuantity==='' || cur.unqualifiedQuantity==='' return cur.qualifiedQuantity === '' || cur.unqualifiedQuantity === ''
} }
) )
) )
@ -657,8 +654,6 @@
) )
} }
}) })
console.log("wolaile")
console.log(arrBol)
let isEmpty1 = arrBol.some(item => item == true) let isEmpty1 = arrBol.some(item => item == true)
let isEmptyNumberList = numberList.some(item => item == true) let isEmptyNumberList = numberList.some(item => item == true)
let isParseFloat = parseFloatList.some(item => item == true) let isParseFloat = parseFloatList.some(item => item == true)
@ -732,7 +727,7 @@
arrBol.push( arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => { (cur, key) => {
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity return cur.qualifiedQuantity === '' || cur.unqualifiedQuantity === ''
} }
) )
) )

24
src/views/qms/inspectionJob/index.vue

@ -160,6 +160,15 @@
} }
} }
//
const isShowMainButton2 = (row, val) => {
if (val.indexOf(row.isStaging) > -1) {
return false
} else {
return true
}
}
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
@ -167,6 +176,7 @@
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:execute'}), // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:execute'}), //
defaultButtons.mainListOrderPubBtn({hide:isShowMainButton2(row,['TRUE']),hasPermi:'qms:inspection-job-main:execute'}), //
defaultButtons.mainListPackageBtn(null), // defaultButtons.mainListPackageBtn(null), //
] ]
} }
@ -185,6 +195,8 @@ const list = ref([])
handleAbandon(row.id) handleAbandon(row.id)
} else if (val == 'mainJobClo') { // } else if (val == 'mainJobClo') { //
handleClose(row.id) handleClose(row.id)
} else if (val == 'mainOrderPub') { //
handleRelease(row.id)
} else if (val == 'mainJobAcc') { // } else if (val == 'mainJobAcc') { //
handleAccept(row.id) handleAccept(row.id)
} }
@ -220,6 +232,18 @@ const list = ref([])
await getList() await getList()
} catch { } } catch { }
} }
/** 发布按钮操作 */
const handleRelease = async (id : number) => {
try {
//
await message.confirm('确认发布吗?')
//
await InspectionJobMainApi.releaseInspectionJobMain(id)
message.success('发布成功!')
//
await getList()
} catch { }
}
// //
const handleAccept = async (id : number) => { const handleAccept = async (id : number) => {
try { try {

Loading…
Cancel
Save