Browse Source

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

master_hella_20240701
gaojs 3 months ago
parent
commit
e807d6ff09
  1. 5
      src/api/wms/supplierinvoiceRequestMain/index.ts
  2. 9
      src/components/BasicForm/src/BasicForm.vue
  3. 83
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  4. 3
      src/views/wms/countManage/count/countPlanMain/index.vue
  5. 2
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  6. 4
      src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts
  7. 23
      src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts
  8. 23
      src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts
  9. 23
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts
  10. 23
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts
  11. 31
      src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts
  12. 8
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts
  13. 4
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts
  14. 8
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts
  15. 4
      src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts
  16. 4
      src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts
  17. 4
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
  18. 4
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  19. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  20. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  21. 26
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue
  22. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts
  23. 46
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  24. 2
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue
  25. 43
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

5
src/api/wms/supplierinvoiceRequestMain/index.ts

@ -147,3 +147,8 @@ export const getLoginUserRoleList = async () => {
}
// 编辑的时候计算主表系统税额
export const getTaxAmount = async ({id,taxRate}) => {
return await request.get({ url: `/wms/supplierinvoice-request-main/computeById?id=${id}&taxRate=${taxRate}`})
}

9
src/components/BasicForm/src/BasicForm.vue

@ -500,9 +500,13 @@ let originFormModel = {}
const updateOriginFormModel = (data)=>{
originFormModel = JSON.parse(JSON.stringify(data))
}
const sumFormDataHandle1 = ()=>{
emit('sumFormDataHandle',formRef,unref(formRef)?.formModel,props.tableData,formType.value,originFormModel,updateOriginFormModel)
}
watch(()=>unref(formRef)?.formModel,async () => {
if(props?.sumFormDataByForm&&unref(formRef)?.formModel){
props?.sumFormDataByForm(formRef,unref(formRef)?.formModel,props.tableData,formType.value,originFormModel,updateOriginFormModel)
props?.sumFormDataByForm(formRef,unref(formRef)?.formModel,props.tableData,formType.value,originFormModel,updateOriginFormModel,sumFormDataHandle1)
}
},{
deep:true
@ -678,7 +682,8 @@ const emit = defineEmits([
'formFormDateChange',
'footButtonClick',
'clearSearchInput',
'clearInput'
'clearInput',
'sumFormDataHandle'
])
//
const formSelectChange = (field, val, row) => {

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

@ -43,10 +43,13 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
form: {
value:'MANUAL',
},
isSearch: true
},
{
label: '执行周期',
label: '',//执行周期
field: 'crontab',
sort: 'custom',
table: {
@ -83,45 +86,45 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
// {
// label: '物料忽略名单',
// field: 'ignoreListOfItem',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// multiple:true,//是否可以多选
// searchListPlaceholder: '请选择物料忽略名单', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '物料信息', // 查询弹窗标题
// searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
// searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法
// }
// }
// },
// {
// label: '库位忽略名单',
// field: 'ignoreListOfLocation',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// multiple:true,//是否可以多选
// searchListPlaceholder: '请选择库位忽略名单', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '库位信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage // 查询弹窗所需分页方法
//
// }
// }
// },
{
label: '物料忽略名单',
field: 'ignoreListOfItem',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
multiple:true,//是否可以多选
searchListPlaceholder: '请选择物料忽略名单', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法
}
}
},
{
label: '库位忽略名单',
field: 'ignoreListOfLocation',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
multiple:true,//是否可以多选
searchListPlaceholder: '请选择库位忽略名单', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage // 查询弹窗所需分页方法
}
}
},
// {
// label: '盘点范围列表',
// field: 'scopeList',

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

@ -54,7 +54,6 @@
:formAllSchemas="CountPlanMain.allSchemas"
:tableAllSchemas="CountPlanDetail.allSchemas"
:tableFormRules="CountPlanDetailRules"
:CountPlanMain1FormAllSchemas="CountPlanMain1.allSchemas"
:tableData="tableData"
:apiUpdate="CountPlanMainApi.updateCountPlanMain"
:apiCreate="CountPlanMainApi.createCountPlanMain"
@ -113,7 +112,7 @@ import {
CountPlanMainRules,
CountPlanDetail,
CountPlanDetailRules,
CountPlanMain1
// CountPlanMain1
} from './countPlanMain.data'
import * as CountPlanMainApi from '@/api/wms/countPlanMain'
import * as CountPlanDetailApi from '@/api/wms/countPlanDetail'

2
src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts

@ -745,7 +745,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
isSearch: false,
isTable:false,
sortSearchDefault:6,
sortTableDefault:1100,

4
src/views/wms/productionManage/productdismantle/productdismantleRecordMain/productdismantleRecordMain.data.ts

@ -190,7 +190,7 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive<CrudSchema[]>(
label: '创建者',
field: 'creator',
sort: 'custom',
isTable: true,
isTable: false,
table: {
width: 150
},
@ -206,7 +206,7 @@ export const ProductdismantleRecordMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
isTable: true,
isTable: false,
form: {
component: 'DatePicker',
componentProps: {

23
src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts

@ -204,17 +204,17 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '物料代码',
field: 'detailItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
isTable: false,
isForm: false
},
// {
// label: '物料代码',
// field: 'detailItemCode',
// sort: 'custom',
// isSearch: true,
// table: {
// width: 150
// },
// isTable: false,
// isForm: false
// },
{
label: '计划数量',
field: 'detailPlanQty',
@ -610,6 +610,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},

23
src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts

@ -195,17 +195,17 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '物料代码',
field: 'detailItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
isTable: false,
isForm: false
},
// {
// label: '物料代码',
// field: 'detailItemCode',
// sort: 'custom',
// isSearch: true,
// table: {
// width: 150
// },
// isTable: false,
// isForm: false
// },
{
label: '计划数量',
field: 'detailPlanQty',
@ -601,6 +601,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},

23
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts

@ -195,17 +195,17 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '物料代码',
field: 'detailItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
isTable: false,
isForm: false
},
// {
// label: '物料代码',
// field: 'detailItemCode',
// sort: 'custom',
// isSearch: true,
// table: {
// width: 150
// },
// isTable: false,
// isForm: false
// },
{
label: '计划数量',
field: 'detailPlanQty',
@ -601,6 +601,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},

23
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts

@ -196,17 +196,17 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '物料代码',
field: 'detailItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
isTable: false,
isForm: false
},
// {
// label: '物料代码',
// field: 'detailItemCode',
// sort: 'custom',
// isSearch: true,
// table: {
// width: 150
// },
// isTable: false,
// isForm: false
// },
{
label: '计划数量',
field: 'detailPlanQty',
@ -602,6 +602,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},

31
src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const QadProductionPlanMainRules = reactive({
@ -71,6 +72,36 @@ export const QadProductionPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
component: 'SelectV2'
},
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
// {
// label: '备注',
// field: 'remark',

8
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts

@ -229,7 +229,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: true,
isTable: false,
},
{
label: '创建时间',
@ -238,7 +238,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 180
@ -671,7 +671,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
isTable: false,
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
@ -688,7 +688,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isTable: false,
isTable: true,
},
// {
// label: '任务明细ID',

4
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts

@ -676,7 +676,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
isTable: false,
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
@ -693,7 +693,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isTable: false,
isTable: true,
},
// {
// label: '任务明细ID',

8
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptscrapRecordMain.data.ts

@ -217,7 +217,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: true,
isTable: false,
},
{
label: '创建时间',
@ -230,7 +230,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: true,
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
@ -665,7 +665,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
isTable: false,
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
@ -682,7 +682,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isTable: false,
isTable: true,
},
// {

4
src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts

@ -659,7 +659,7 @@ export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
isTable:true,
hiddenInMain:true,
},
{
@ -673,7 +673,7 @@ export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable:false,
isTable:true,
hiddenInMain:true,
form: {
component: 'DatePicker',

4
src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts

@ -568,7 +568,7 @@ export const ProductredressRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isTable:false,
isTable:true,
hiddenInMain: true,
},
{
@ -592,7 +592,7 @@ export const ProductredressRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
}
},
isForm: false,
isTable:false,
isTable:true,
hiddenInMain: true,
},
{

4
src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

@ -575,7 +575,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
isTableForm: false,
isForm: false,
isTable:false,
isTable:true,
hiddenInMain:true
},
{
@ -589,7 +589,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 180
},
isTable:false,
isTable:true,
hiddenInMain:true,
form: {
component: 'DatePicker',

4
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

@ -809,7 +809,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
width: 180
},
hiddenInMain: true,
isTable: false,
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
@ -830,7 +830,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
hiddenInMain: true,
isTable: false,
isTable: true,
isTableForm: false,
isForm: false
},

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -173,7 +173,7 @@ const butttondata = (row,$index) => {
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({}), //
defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), //
]
}

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -729,9 +729,11 @@ const submitForm = async (formType, submitData) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
data.orderTypeM='1';
await PurchasereceiptRequestMainApi.createPurchasereceiptRequestMain(data)
message.success(t('common.createSuccess'))
} else {
data.orderTypeM='1';
await PurchasereceiptRequestMainApi.updatePurchasereceiptRequestMain(data)
message.success(t('common.updateSuccess'))
}

26
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue

@ -353,20 +353,20 @@ const butttondata = (row,$index) => {
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:agree'}), //
// defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), //
{
label: '生成标签',
name: 'ssbq',
hide: isASNShowMainButton(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true //
},
defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','8']) }), //
// {
// label: '',
// name: 'ssbq',
// hide: isASNShowMainButton(row, ['3']),
// type: 'primary',
// icon: '',
// color: '',
// hasPermi: '',
// link: true //
// },
// defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','8']) }), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
defaultButtons.mainListPlanCheckQualityReportBtn({}), //
// defaultButtons.mainListPlanCheckQualityReportBtn({}), //
]
}
@ -729,9 +729,11 @@ const submitForm = async (formType, submitData) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
data.orderTypeM='2';
await PurchasereceiptRequestMainApi.createPurchasereceiptRequestMain(data)
message.success(t('common.createSuccess'))
} else {
data.orderTypeM='2';
await PurchasereceiptRequestMainApi.updatePurchasereceiptRequestMain(data)
message.success(t('common.updateSuccess'))
}

4
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/purchasereceiptRequestMain.data.ts

@ -535,6 +535,7 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled:true
}
}
},
@ -589,9 +590,6 @@ export const PurchasereceiptRequestMainRules = reactive({
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],

46
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -1279,29 +1279,29 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm:false,
isForm:false
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
hiddenInMain: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
isForm:false,
isTableForm:false,
form: {
componentProps:{
disabled:true
}
},
},
// {
// label: '接口类型',
// field: 'interfaceType',
// dictType: DICT_TYPE.INTERFACE_TYPE,
// dictClass: 'string',
// isSearch: true,
// isTable: true,
// hiddenInMain: true,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// disabled:true
// },
// isForm:false,
// isTableForm:false,
// form: {
// componentProps:{
// disabled:true
// }
// },
// },
{
label: '备注',
field: 'remark',

2
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue

@ -590,9 +590,11 @@ const submitForm = async (formType, submitData) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
data.orderTypeM='1';
await PurchasereceiptRequestMainApi.createPurchasereceiptRequestMainSpare(data)
message.success(t('common.createSuccess'))
} else {
data.orderTypeM='1';
await PurchasereceiptRequestMainApi.updatePurchasereceiptRequestMain(data)
message.success(t('common.updateSuccess'))
}

43
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -53,18 +53,32 @@
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData"
:sumFormDataByForm ="(formRef,formModel,tableData,formType,originFormModel,updateOriginFormModel)=>{
:sumFormDataByForm ="(formRef,formModel,tableData,formType,originFormModel,updateOriginFormModel,sumFormDataHandle1)=>{
const {taxRate=0,amount=0,taxAmount=0,beforeTaxAmount=0,totalTaxAmount=0,discountAmount1=0,beforeTaxDiffAmount=0,taxAmountDiff=0} = formModel
// 2X*2
let taxAmount_ = 0.00
if(formType=='update'){ //
taxAmount_ = taxAmount
console.log('taxRate',taxRate)
console.log('originFormModel',originFormModel.taxRate)
console.log('taxAmount',taxAmount)
if(taxRate!=originFormModel.taxRate){
if(originFormModel){
sumFormDataHandle1()
}
updateOriginFormModel(formModel)
}
formRef.value.setValues({
afterTaxAmount:amount+taxAmount, // 3+
adTaxAmount:beforeTaxAmount+totalTaxAmount, //6+
beforeTaxDiffAmount:beforeTaxAmount-amount-discountAmount1,//--
taxAmountDiff:totalTaxAmount-taxAmount,// -
totalTaxDiffAmount:beforeTaxDiffAmount+taxAmountDiff // =+
})
}else if(formType=='create'){ //
let taxAmount_ = taxAmount
if(taxRate!=originFormModel.taxRate){
taxAmount_ = tableData.reduce((prev, item) => prev + Number(Number(taxRate*0.01*Number(Number(item['singlePrice']*item['invoicableQuantity']).toFixed(2))).toFixed(2)),0)
updateOriginFormModel(formModel)
}
}
formRef.value.setValues({
taxAmount:taxAmount_,
afterTaxAmount:amount+taxAmount, // 3+
@ -73,6 +87,8 @@
taxAmountDiff:totalTaxAmount-taxAmount,// -
totalTaxDiffAmount:beforeTaxDiffAmount+taxAmountDiff // =+
})
}
}"
:sumFormDataByTableCustom ="(formRef,formModel,tableData)=>{
@ -92,6 +108,7 @@
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@sumFormDataHandle="sumFormDataHandle"
>
<!-- <template #foorter>
<div style="text-align: left">
@ -185,6 +202,7 @@
@tableFormButton="tableFormButton"
:mainSubmitCreateApi="true"
@searchTableSuccessDetail="searchTableSuccessDetail"
@handleMainFefresh="handleMainFefresh"
>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
@ -204,6 +222,7 @@
</template>
<script setup lang="ts">
import dayjs from 'dayjs'
//
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
@ -267,6 +286,9 @@ const getSelectionRows = (currentPage,currentPageSelectionRows) => {
})
}
}
const handleMainFefresh = ()=>{
getList()
}
const searchTableSuccessDetail = async (formField, searchField, val, formRef,searchTableFormModel)=>{
console.log('详情',formField, searchField, val, formRef,searchTableFormModel)
@ -279,6 +301,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
subList:val
})
detailRef.value.updateList()
getList()
}
// const basicFormFooter = computed(()=>{
@ -754,6 +777,7 @@ const handleImport = () => {
/** 审批通过按钮操作 finance_mainPlanSub */
const formFinanceRef = ref()
const handleFinanceApp = async (row) => {
row.postingDate = dayjs().valueOf()
formFinanceRef.value.open('update', row,null,'财务通过','财务通过')
}
@ -941,6 +965,17 @@ const handleImport = () => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
const sumFormDataHandle = async (formRef1,formModel,tableData,formType,originFormModel,updateOriginFormModel)=>{
if(formType=='update'){
if(formModel&&formModel.id&&formModel.taxRate&&originFormModel){
let res = await SupplierinvoiceRequestMainApi.getTaxAmount({id:formModel.id,taxRate:formModel.taxRate})
console.log('更新taxAmount',res)
formRef1.value.setValues({
taxAmount:res
})
}
}
}
//
const submitForm = async (formType, submitData) => {
let data = {...submitData}

Loading…
Cancel
Save