diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 8b0acf8e9..101d2fb3d 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -150,6 +150,7 @@ @@ -359,6 +360,11 @@ const props = defineProps({ required: false, default: [] }, + hiddenFilterBtnFields:{ + type: Array, + required: false, + default: [] + }, // 失去焦点之后是否进行校验, isJiaoyan: { type: Boolean, diff --git a/src/views/qms/inspectionQ2/index.vue b/src/views/qms/inspectionQ2/index.vue index a624b9859..c80929aae 100644 --- a/src/views/qms/inspectionQ2/index.vue +++ b/src/views/qms/inspectionQ2/index.vue @@ -57,6 +57,7 @@ }) } " + :hiddenFilterBtnFields="['purchaseReceiptNumber']" :rules="Q2Rules" :formAllSchemas="Q2.allSchemas" :apiUpdate="Q2Api.updateQ2" @@ -158,6 +159,14 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { if (formField == 'lightItemCode') { setV['lightItemCode'] = val[0].code setV['lightItemName'] = val[0].name + + setV['standardCostPrice'] = '' + setV['lightQty'] = 0 + setV['claimAmount'] = '' + setV['otherClaimAmount'] = 0 + setV['summaryAmount'] = 0 + setV['disbursementAmount'] = 0 + setV['remainingAmount'] = 0  const params2 = {         by: 'ASC',         filters: [{ column: 'itemCode', action: '==', value: val[0].code }], @@ -194,14 +203,6 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { setV['SupplierCode'] = '' setV['SupplierName'] = '' setV['itemName'] = '' - setV['standardCostPrice'] = '' - setV['lightQty'] = 0 - setV['claimAmount'] = '' - setV['otherclaimAmount'] = 0 - setV['summaryAmount'] = 0 - setV['disbursementAmount'] = 0 - setV['remainingAmount'] = 0 - setV['purchaseReceiptNumber'] = '' setV['uom'] = val[0].supplierUom Q2Api.getEmail().then((res) => { @@ -247,24 +248,6 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { }) } }) - - // const params2 = { - // by: 'ASC', - // filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode }], - // pageNo: 1, - // pageSize: 500, - // sort: '' - // } - // params2.isSearch = true - // StdcostpriceApi.getStdcostpricePage(params2).then((res) => { - // if (res.list?.length > 0) { - // priceObj.value = res.list[0] - // formRef.setValues({ - // standardCostPrice: priceObj.value.price - // }) - // } - // }) - setV[formField] = val[0][searchField] formRef.setValues(setV) } @@ -272,6 +255,8 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { } const onChange = (field, e) => { + console.log('onChange',field) + console.log(basicFormRef.value.formRef.formModel) if (field == 'lightQty') { basicFormRef.value.formRef.formModel.claimAmount = ( parseFloat(basicFormRef.value.formRef.formModel.lightQty) * @@ -280,7 +265,7 @@ const onChange = (field, e) => { ).toFixed(6) basicFormRef.value.formRef.formModel.summaryAmount = ( parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + - parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherClaimAmount||0) ).toFixed(6) basicFormRef.value.formRef.formModel.remainingAmount = ( parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) - @@ -295,17 +280,17 @@ const onChange = (field, e) => { ).toFixed(6) basicFormRef.value.formRef.formModel.summaryAmount = ( parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + - parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherClaimAmount) ).toFixed(6) basicFormRef.value.formRef.formModel.remainingAmount = ( parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) - parseFloat(basicFormRef.value.formRef.formModel.disbursementAmount) ).toFixed(6) } - if (field == 'otherclaimAmount') { + if (field == 'otherClaimAmount') { basicFormRef.value.formRef.formModel.summaryAmount = ( parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + - parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherClaimAmount) ).toFixed(6) basicFormRef.value.formRef.formModel.remainingAmount = ( parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) - @@ -315,7 +300,7 @@ const onChange = (field, e) => { if (field == 'claimAmount') { basicFormRef.value.formRef.formModel.summaryAmount = ( parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + - parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherClaimAmount) ).toFixed(6) basicFormRef.value.formRef.formModel.remainingAmount = ( parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) - @@ -332,6 +317,7 @@ const onChange = (field, e) => { if (field == 'supplierCode') { basicFormRef.value.formRef.formModel.supplierName = '' + basicFormRef.value.formRef.formModel.purchaseReceiptNumber = '' const paramsCustomer = { by: 'ASC', filters: [ @@ -466,7 +452,8 @@ const openForm = (type: string, row?: any) => { } }) } - + + basicFormRef.value.open(type, row) if(!row || !row.claimAmount){ nextTick(() => { basicFormRef.value.formRef.setValues({ @@ -502,7 +489,6 @@ const openForm = (type: string, row?: any) => { ) uploadFile['componentProps']['modelValue'] = row.filePathListView } - basicFormRef.value.open(type, row) } // form表单提交 @@ -521,6 +507,10 @@ const formsSuccess = async (formType, data) => { message.error('整灯数量不能为0') return } + if (!data.standardCostPrice) { + message.error('标准成本价格不能为0或空') + return + } if (data.activeTime == 0) data.activeTime = null if (data.expireTime == 0) data.expireTime = null diff --git a/src/views/qms/inspectionQ2/inspectionQ2.data.ts b/src/views/qms/inspectionQ2/inspectionQ2.data.ts index 408786daf..3ef1e9b44 100644 --- a/src/views/qms/inspectionQ2/inspectionQ2.data.ts +++ b/src/views/qms/inspectionQ2/inspectionQ2.data.ts @@ -25,7 +25,7 @@ export const Q2Rules = reactive({ supplierCode: [{ required: true, message: '请选择供应商代码', trigger: 'change' }], purchaseReceiptNumber: [ { required: true, message: '请选择采购收货单号', trigger: 'change' }, - { max: 50, message: '不得超过50个字符', trigger: 'blur' } + { max: 255, message: '不得超过255个字符', trigger: 'blur' } ], claimTime: [{ required: true, message: '请选择索赔日期', trigger: 'change' }], lightItemCode: [{ required: true, message: '请选择整灯物料代码', trigger: 'change' }], @@ -390,7 +390,7 @@ export const Q2 = useCrudSchemas( }, { label: '其他索赔金额', - field: 'otherclaimAmount', + field: 'otherClaimAmount', sort: 'custom', isSearch: false, isTable: true, @@ -470,7 +470,6 @@ export const Q2 = useCrudSchemas( // labelMessage: '信息提示说明!!!', componentProps: { enterSearch: true, - multiple: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本 searchField: 'number', // 查询弹窗赋值字段 @@ -596,11 +595,25 @@ export const Q2 = useCrudSchemas( } } }, + { label: '索赔单附件', - field: 'claimAddress', + field: 'claimAddressName', sort: 'custom', + isSearch: false, + isForm: false, isTable: true, + isDetail: false, + table: { + width: 150 + } + }, + + { + label: '索赔单附件', + field: 'claimAddress', + sort: 'custom', + isTable: false, table: { width: 150 }, diff --git a/src/views/qms/inspectionQ3/inspectionQ3.data.ts b/src/views/qms/inspectionQ3/inspectionQ3.data.ts index 3a3bea419..0f1e65eaf 100644 --- a/src/views/qms/inspectionQ3/inspectionQ3.data.ts +++ b/src/views/qms/inspectionQ3/inspectionQ3.data.ts @@ -126,7 +126,6 @@ export const InspectionQ3Main = useCrudSchemas( // labelMessage: '信息提示说明!!!', componentProps: { enterSearch: true, - multiple: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本 searchField: 'number', // 查询弹窗赋值字段 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue index 5e738580e..91a117d47 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue @@ -117,7 +117,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } const { tableObject, tableMethods } = useTable({ - getListApi: 'ProductionreturnJobMain'==routeName.value?ProductionreturnJobDetailApi.getProductionreturnJobDetailPageStore:ProductionreturnJobDetailApi.getProductionreturnJobDetailPageHold // 分页接口 + // getListApi: 'ProductionreturnJobMain'==routeName.value?ProductionreturnJobDetailApi.getProductionreturnJobDetailPageStore:ProductionreturnJobDetailApi.getProductionreturnJobDetailPageHold // 分页接口 + getListApi: ProductionreturnJobDetailApi.getProductionreturnJobDetailPage // 分页接口 + }) @@ -275,16 +277,17 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - if('ProductionreturnJobMain'==routeName.value){ - //生产退料任务导出 - const data = await ProductionreturnJobMainApi.exportProductionreturnJobMainStore(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - }else{ - // 隔离退料任务导出 - const data = await ProductionreturnJobMainApi.exportProductionreturnJobMainHold(tableObject.params) - download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) - } - + // if('ProductionreturnJobMain'==routeName.value){ + // //生产退料任务导出 + // const data = await ProductionreturnJobMainApi.exportProductionreturnJobMainStore(tableObject.params) + // download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) + // }else{ + // // 隔离退料任务导出 + // const data = await ProductionreturnJobMainApi.exportProductionreturnJobMainHold(tableObject.params) + // download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) + // } + const data = await ProductionreturnJobMainApi.exportProductionreturnJobMain(tableObject.params) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue index 7421e62e3..177693c90 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue @@ -203,7 +203,7 @@ const butttondata = (row,$index) => { // defaultButtons.mainInspectRequestBtn({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainInspectRequestBtn({hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainListPointBtn(null), // 标签打印 - defaultButtons.mainListRecoveryBtn({hide:row.recoveryRequestFlag == "TRUE" }), // 制品回收 //recoveryRequestFlag==TRUE不展示 + // defaultButtons.mainListRecoveryBtn({hide:row.recoveryRequestFlag == "TRUE" }), // 制品回收 //recoveryRequestFlag==TRUE不展示 ] } diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue index d365756c9..a090fc761 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue @@ -240,7 +240,7 @@ const butttondata = (row,$index) => { defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainPutawayRequestCpBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// 生成采购上架申请 defaultButtons.mainListPointBtn(null), // 标签打印 - defaultButtons.mainListRecoveryBtn({hide:row.recoveryRequestFlag == "TRUE" }), // 制品回收 //recoveryRequestFlag==TRUE不展示 + // defaultButtons.mainListRecoveryBtn({hide:row.recoveryRequestFlag == "TRUE" }), // 制品回收 //recoveryRequestFlag==TRUE不展示 ] } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue index a7e9b2013..249d3082a 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue @@ -183,14 +183,14 @@ const isShowSourceTypeButton = (row) => { const butttondata = (row,$index) => { const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 if(findIndex>-1&&findIndex<$index){ - return [defaultButtons.mainListPrintInspectionBtn(null)] + return [defaultButtons.mainListPrintInspectionBtn({hide:routeName.value.includes('SCP')})] } return [ defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// 生成采购上架申请 //defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), // 查看质检报告 defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // 查看质检报告 - defaultButtons.mainListPrintInspectionBtn(null), + defaultButtons.mainListPrintInspectionBtn({hide:routeName.value.includes('SCP')}) ] } diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue index 0a32f2981..5b99c542c 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue @@ -465,7 +465,10 @@ const butttondata = (row, $index) => { defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchasereturn-request-main:update' - }) // 编辑 + }),// 编辑 + defaultButtons.mainListDocumentPrintBtn({ + hide: isShowMainButton(row, ['8']) + })// 打印标签 // { // label: '生成标签', // name: 'ssbq', @@ -511,12 +514,23 @@ const buttonTableClick = async (val, row) => { genLabelId.value = row.masterId await getDetailList() formLabelRef.value.open('create', row, null, 'createLabel') //创建标签页面 createLabel 标题 - } else if (val == 'point') { + } + else if (val == 'documentPrint') { + // 单据打印 + handleDocumentPrint(row.number,row.itemCode) + }else if (val == 'point') { // 标签打印 labelPrint(row) } } +// 单据打印 +const BASE_URL2 = getJmreportBaseUrl() +const documentSrc = ref(BASE_URL2 + '/jmreport/view/920874172025987072?token=' + getAccessToken()) +const handleDocumentPrint = async (number,itemCode) => { + window.open(documentSrc.value + '&requestNumber=' + number +'&itemCode=' + itemCode) +} + /** 添加/修改操作 */ const formRef = ref() const openForm = async (type: string, row?: Object) => {