From 15c87776929e5c5aa763d090135902e05a1f4241 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 20 Nov 2024 08:51:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?YT-1092=E6=96=B0=E5=A2=9E=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=9A=84=E9=87=87=E8=B4=AD=E7=B4=A2=E8=B5=94=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E5=BA=94=E8=AF=A5=E6=98=AF=E5=8F=AF=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=9A=84=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierManage/purchaseClaim/purchaseClaimRequest/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue index e4fb200fc..57c23b3dc 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue @@ -78,6 +78,8 @@ :apiUpdate="PurchaseClaimRequestDetailApi.updatePurchaseClaimRequestDetail" :apiPage="PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailPage" :apiDelete="PurchaseClaimRequestDetailApi.deletePurchaseClaimRequestDetail" + :detailButtonIsShowDelete="false" + :detailButtonIsShowAdd="false" /> Date: Wed, 20 Nov 2024 08:55:04 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=99=E7=AD=96=E7=95=A5=20=E5=92=8C=20?= =?UTF-8?q?=E5=8F=91=E8=B4=A7=E7=AD=96=E7=95=A5=EF=BC=8C=E8=A7=84=E5=88=99?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E9=87=8C=E7=9A=84=E7=89=A9=E6=96=99=E8=A6=81?= =?UTF-8?q?=E6=94=B9=E6=88=90=E6=94=BE=E5=A4=A7=E9=95=9C=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../strategy/deliverStrategy/AddForm.vue | 40 +++++++++++++---- .../strategy/downShelfStrategy/AddForm.vue | 43 +++++++++++++++---- 2 files changed, 66 insertions(+), 17 deletions(-) diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue index 7c56b4b18..d942b9216 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue @@ -167,14 +167,13 @@ v-else-if="item.ParamCode == 'Project'" :disabled="formData.priority==0&&formType=='update'" /> - + + + @@ -483,6 +482,8 @@ import * as TransactiontypeApi from '@/api/wms/transactiontype' import { Transactiontype } from '@/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data' import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' import * as ProductionlineApi from '@/api/wms/productionline' +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic} from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Customer, CustomerRules } from '@/views/wms/basicDataManage/customerManage/customer/customer.data' import * as CustomerApi from '@/api/wms/customer' @@ -853,6 +854,21 @@ const blurCustomerList = async ()=>{ } } } + +//物料 +const searchItemCode = ()=>{ + searchTableRef.value.open( + '请选择物料', + Itembasic.allSchemas, + ItembasicApi.getItembasicPage, + 'ItemCode', + 'code', + true, + undefined, + undefined, + undefined + ) +} // 生产线 const searchTransactionType = ()=>{ searchTableRef.value.open( @@ -960,6 +976,14 @@ const searchTableSuccess = (formField, searchField, val, type, row) => { } return } + if(formField=='ItemCode'){ + // 条件规则--物料 + let itemCode = formData.value.condition.find(item=>item['ParamCode']=='ItemCode') + if(itemCode){ + itemCode.Value = val.map(item=>(item['code'])).join(',') + } + return + } // let searchTableTitle = warehouseType.value == 'WarehouseCode'?'请选择仓库':warehouseType.value == 'AreaCode'?'请选择库区':warehouseType.value == 'LocationGroupCode'?'请选择库位组':warehouseType.value == 'LocationCode'?'请选择库位':'' console.log('searchTableSuccess',formField, searchField, val, type, row) console.log(val.map(item=>(item['code'])).join(',')) diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue index 088d6d02e..2cf69dc8d 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue @@ -215,14 +215,13 @@ v-else-if="item.ParamCode == 'Project'" :disabled="formData.priority==0&&formType=='update'" /> - + + + @@ -680,7 +679,8 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import * as TransactiontypeApi from '@/api/wms/transactiontype' import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' import * as ProductionlineApi from '@/api/wms/productionline' - +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic} from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -1009,6 +1009,23 @@ const blurWarehouse = async ()=>{ }) } + + +//物料 +const searchItemCode = ()=>{ + searchTableRef.value.open( + '请选择物料', + Itembasic.allSchemas, + ItembasicApi.getItembasicPage, + 'ItemCode', + 'code', + true, + undefined, + undefined, + undefined + ) +} + //事务类型 const searchTransactionType = ()=>{ searchTableRef.value.open( @@ -1108,6 +1125,14 @@ const searchTableSuccess = (formField, searchField, val, type, row) => { } return } + if(formField=='ItemCode'){ + // 条件规则--物料 + let itemCode = formData.value.condition.find(item=>item['ParamCode']=='ItemCode') + if(itemCode){ + itemCode.Value = val.map(item=>(item['code'])).join(',') + } + return + } // let searchTableTitle = warehouseType.value == 'WarehouseCode'?'请选择仓库':warehouseType.value == 'AreaCode'?'请选择库区':warehouseType.value == 'LocationGroupCode'?'请选择库位组':warehouseType.value == 'LocationCode'?'请选择库位':'' console.log('searchTableSuccess',formField, searchField, val, type, row) console.log(val.map(item=>(item['code'])).join(',')) From 485efcda90a969e4d92e2f09c7c04eb0a776b857 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Wed, 20 Nov 2024 09:46:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=94=80=E5=94=AE=E5=BC=80=E7=A5=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/customerSaleInvoiceDetail/index.ts | 7 +++- .../CustomerSaleInvoiceBasicForm.vue | 8 +++- .../customerSaleInvoiceRequestMain.data.ts | 22 +++++++++- .../customerSaleInvoiceRequestMain/index.vue | 42 ++++++++++++++++++- 4 files changed, 74 insertions(+), 5 deletions(-) diff --git a/src/api/wms/customerSaleInvoiceDetail/index.ts b/src/api/wms/customerSaleInvoiceDetail/index.ts index af4c750bd..48acdabac 100644 --- a/src/api/wms/customerSaleInvoiceDetail/index.ts +++ b/src/api/wms/customerSaleInvoiceDetail/index.ts @@ -61,7 +61,12 @@ export const deleteCustomerSaleInvoiceDetail = async (id: number) => { // 导出客户销售开票子信息表(WMS) Excel export const exportCustomerSaleInvoiceDetail = async (params) => { - return await request.download({ url: `/wms/customer-sale-invoice-detail/export-excel`, params }) + if (params.isSearch) { + const data = { ...params } + return await request.downloadPost({ url: `/wms/customer-sale-invoice-detail/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/customer-sale-invoice-detail/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue index d16bb0b12..1b5c63917 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue @@ -91,6 +91,9 @@ const inputNumberChange = (field, index, row, val) => { // 模具分摊单价 默认从模具分摊对账单带出,未税金额修改后重新计算,等于未税金额/数量-销售单价 row['allocationPrice'] = row['beforeTaxAmount']/row['qty'] - row['price'] + + // 税额:taxAmount 未税价格*税率/100,四舍五入保留2位小数 + row['taxAmount'] = (row['beforeTaxAmount'] * formRef.value.formRef.formModel['taxRate'])/100 //含税金额 } @@ -205,12 +208,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => item['sumPrice'] = item['price'] + item['allocationPrice'] // 未税金额 默认等于数量*合计单价,可修改,必填,最多可输入2位小数 item['beforeTaxAmount'] = item['sumPrice']*item['qty'] - // 含税金额 未税价格+税额,四舍五入保留2位小数 - item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] //含税金额 // 税额:taxAmount 未税价格*税率/100,四舍五入保留2位小数 item['taxAmount'] = (item['beforeTaxAmount'] * formRef.formModel['taxRate'])/100 //含税金额 + // 含税金额 未税价格+税额,四舍五入保留2位小数 + item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] //含税金额 + }) diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts index a286401fc..cbaa842c8 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts @@ -53,7 +53,14 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ dictClass: 'string', table:{ width:120 - } + }, + search:{ + component:'Select', + componentProps: { + multiple:true, + } + + }, }, { label: '客户对账单', @@ -200,6 +207,9 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, form: { component: 'DatePicker', componentProps: { @@ -232,6 +242,16 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive([ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } }, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x', + } + }, isForm: false, table:{ width:180 diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/index.vue index 5b5e64477..f89ebbd09 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/index.vue @@ -56,6 +56,8 @@ :detailButtonIsShowAddStatusArray="['0']" :detailButtonIsShowDelete="false" :detailButtonIsShowAdd="false" + :otherHeadButttonData = "[defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-request-main:export` })]" + @buttonBaseClick="detailButtonBaseClick" @searchTableSuccessDetail="searchTableSuccessDetail" /> @@ -75,6 +77,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as AreabasicApi from '@/api/wms/areabasic' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import { status } from 'nprogress' const { loadStart, loadDone } = usePageLoading() // 销售开票申请 defineOptions({ name: 'customerSaleInvoiceMain' }) @@ -102,7 +105,28 @@ const updataTableColumns = (val) => { tableColumns.value = val } +// 点击子表按钮事件 +const detailButtonBaseClick = async (val, item,tableObject) => { + if (val == 'export') { + // 子表导出 + console.log('子表导出',val, tableObject) + try { + // 导出的二次确认 + await message.exportConfirm() + // 发起导出 + loadStart() + const excelTitle = ref(route.meta.title) + const data = await CustomerSaleInvoiceDetailApi.exportCustomerSaleInvoiceDetail(tableObject.params) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) + } catch { + + } finally { + loadDone() + } + + } +} // 查询页面返回——详情 const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { nextTick(() => { @@ -276,6 +300,22 @@ const searchFormClick = (searchData) => { } const seachRef = ref() const onSearchChange = (field, value)=>{ + console.log('onSearchChange',field,value) + if(field=='status'){ + // 状态 + if(value.length>0){ + if(value[value.length-1]==''){ + //全选 + seachRef.value.setFormValues({ + status:[''] + }) + }else{ + seachRef.value.setFormValues({ + status:value.filter(item=>item!='') + }) + } + } + } if(field=='customerCode'){ if(value.length>0){ if(value[value.length-1]=='ALL'){ @@ -293,7 +333,7 @@ const onSearchChange = (field, value)=>{ } const searchClick = async (data)=>{ console.log('查询',data) - setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL')}) + setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL'),status:data.status.filter(item=>item!='')}) } /** 初始化 **/ onMounted(async () => {