Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

hella_online_20240829
zhaoxuebing 3 months ago
parent
commit
e387492ca2
  1. 1
      src/views/wms/basicDataManage/documentSetting/switch/index.vue
  2. 11
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  3. 6
      src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
  4. 2
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue
  5. 476
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  6. 2
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

1
src/views/wms/basicDataManage/documentSetting/switch/index.vue

@ -134,7 +134,6 @@ const butttondata = (row, $index)=>{
const hiddenArray = ['CreatePutawayRequestAfterInspectRecordCreated', const hiddenArray = ['CreatePutawayRequestAfterInspectRecordCreated',
'CreateBackflushRecordAfterProductreceiptRecordCreated', 'CreateBackflushRecordAfterProductreceiptRecordCreated',
'CreateProductputawayRequestAfterProductreceiptRecordCreated', 'CreateProductputawayRequestAfterProductreceiptRecordCreated',
'ExecuteProductreceiptJobPredictIsCreatePutawayRequest',
'CreatePurchasePlanAfterDiscretePurchaseOrderPublished', 'CreatePurchasePlanAfterDiscretePurchaseOrderPublished',
'ExemptItemCreatePutawayRequestAfterPurchaseReceiptRecordCreated', 'ExemptItemCreatePutawayRequestAfterPurchaseReceiptRecordCreated',
'CreatePurchaseReceiptRequestAfterSupplierDeliverRecordCreated' 'CreatePurchaseReceiptRequestAfterSupplierDeliverRecordCreated'

11
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -453,17 +453,18 @@ const requestSwitch = ref(false)
const getSwitch = async ()=>{ const getSwitch = async ()=>{
let switch1 = await SwitchApi.getByCode('CreatePrepareToIssuePlanAfterProductionPlanPublished') let switch1 = await SwitchApi.getByCode('CreatePrepareToIssuePlanAfterProductionPlanPublished')
planSwitch.value = switch1=='TRUE' planSwitch.value = switch1=='TRUE'
let switch2 = await SwitchApi.getByCode('CreateProductReciptRequestAfterProductionPlanPublished') //
requestSwitch.value = switch2=='TRUE' // let switch2 = await SwitchApi.getByCode('CreateProductReciptRequestAfterProductionPlanPublished')
console.log('switch1',switch1) // requestSwitch.value = switch2=='TRUE'
console.log('switch2',switch2) requestSwitch.value = true
// console.log('switch1',switch1)
// console.log('switch2',switch2)
} }
// //
const autoCreatePlanRequest = async (row)=>{ const autoCreatePlanRequest = async (row)=>{
// //
try { try {
if(planSwitch.value) { if(planSwitch.value) {
// /generatePreparetoissue?number // /generatePreparetoissue?number
let PreparetoissueRes = await ProductionMainApi.generatePreparetoissue(row.number) let PreparetoissueRes = await ProductionMainApi.generatePreparetoissue(row.number)

6
src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue

@ -331,6 +331,8 @@ const buttonTableClick = async (val, row) => {
console.log(err) console.log(err)
}) })
} else if (val == 'mainPlanSub') { // } else if (val == 'mainPlanSub') { //
//
await getSwitch()
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要提交审批吗?') await message.confirm('确认要提交审批吗?')
tableObject.loading = true tableObject.loading = true
@ -384,6 +386,8 @@ const buttonTableClick = async (val, row) => {
}) })
// //
tableObject.loading = true tableObject.loading = true
//
await getSwitch()
autoCreatePlanRequest(row) autoCreatePlanRequest(row)
} }
}) })
@ -541,6 +545,8 @@ const tableSelectionDelete = (selection) => {
// //
const submitForm = async (formType, submitData) => { const submitForm = async (formType, submitData) => {
//
getSwitch()
let data = {...submitData} let data = {...submitData}
if(data.masterId){ if(data.masterId){
data.id = data.masterId data.id = data.masterId

2
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue

@ -329,7 +329,7 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res) window.open(src.value+'&asn_number='+res)
} else { } else {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/979553753876811776?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res) window.open(src.value+'&asn_number='+res)
} }
}).catch(err => { }).catch(err => {

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

@ -1,7 +1,11 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="searchList" @reset="searchList" /> <Search
:schema="SupplierinvoiceRequestMain.allSchemas.searchSchema"
@search="searchList"
@reset="searchList"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,17 +16,23 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceRequestMain.allSchemas" :allSchemas="SupplierinvoiceRequestMain.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table ref="tableRef" <Table
ref="tableRef"
:selection="true" :selection="true"
:selectionColor="true" :selectionColor="true"
v-clientTable :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" }"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows" @getSelectionRows="getSelectionRows"
> >
@ -32,10 +42,15 @@
</el-button> </el-button>
</template> </template>
<template #differencePrice="{ row }"> <template #differencePrice="{ row }">
<span :class="{'red-text':row.differencePrice!=0}">{{ Number(row.differencePrice).toFixed(5) }}</span> <span :class="{ 'red-text': row.differencePrice != 0 }">{{
Number(row.differencePrice).toFixed(5)
}}</span>
</template> </template>
<template #action="{ row, $index }"> <template #action="{ row, $index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase
:Butttondata="butttondata(row, $index)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -53,10 +68,29 @@
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:tableFormRules="SupplierinvoiceRequestDetailRules" :tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData" :tableData="tableData"
:sumFormDataByForm ="(formRef,formModel,tableData,formType,originFormModel,updateOriginFormModel,sumFormDataHandle1)=>{ :sumFormDataByForm="
const {taxRate=0,amount=0,taxAmount=0,beforeTaxAmount=0,totalTaxAmount=0,discountAmount1=0,beforeTaxDiffAmount=0,taxAmountDiff=0} = formModel (
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 // 2X*2
if(formType=='update'){ // if (formType == 'update') {
//
console.log('taxRate', taxRate) console.log('taxRate', taxRate)
console.log('originFormModel', originFormModel.taxRate) console.log('originFormModel', originFormModel.taxRate)
console.log('taxAmount', taxAmount) console.log('taxAmount', taxAmount)
@ -73,10 +107,22 @@
taxAmountDiff: totalTaxAmount - taxAmount, // - taxAmountDiff: totalTaxAmount - taxAmount, // -
totalTaxDiffAmount: beforeTaxDiffAmount + taxAmountDiff // =+ totalTaxDiffAmount: beforeTaxDiffAmount + taxAmountDiff // =+
}) })
}else if(formType=='create'){ // } else if (formType == 'create') {
//
let taxAmount_ = taxAmount let taxAmount_ = taxAmount
if (taxRate != originFormModel.taxRate) { 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) taxAmount_ = tableData.reduce(
(prev, item) =>
prev +
Number(
Number(
taxRate *
0.01 *
Number(Number(item['singlePrice'] * item['invoicableQuantity']).toFixed(2))
).toFixed(2)
),
0
)
updateOriginFormModel(formModel) updateOriginFormModel(formModel)
} }
formRef.value.setValues({ formRef.value.setValues({
@ -88,19 +134,34 @@
totalTaxDiffAmount: beforeTaxDiffAmount + taxAmountDiff // =+ totalTaxDiffAmount: beforeTaxDiffAmount + taxAmountDiff // =+
}) })
} }
}
}" "
:sumFormDataByTableCustom="
:sumFormDataByTableCustom ="(formRef,formModel,tableData)=>{ (formRef, formModel, tableData) => {
// 1 XX // 1 XX
const { taxRate = 0 } = formModel const { taxRate = 0 } = formModel
const sumObject = { const sumObject = {
amount:tableData.reduce((prev, item) => prev + Number(Number(item['singlePrice']*item['invoicableQuantity']).toFixed(2)),0), amount: tableData.reduce(
taxAmount:tableData.reduce((prev, item) => prev + Number(Number(taxRate*0.01*Number(Number(item['singlePrice']*item['invoicableQuantity']).toFixed(2))).toFixed(2)),0) (prev, item) =>
prev + Number(Number(item['singlePrice'] * item['invoicableQuantity']).toFixed(2)),
0
),
taxAmount: tableData.reduce(
(prev, item) =>
prev +
Number(
Number(
taxRate *
0.01 *
Number(Number(item['singlePrice'] * item['invoicableQuantity']).toFixed(2))
).toFixed(2)
),
0
)
} }
formRef.value.setValues(sumObject) formRef.value.setValues(sumObject)
}" }
"
:apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain" :apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain" :apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain"
:isBusiness="true" :isBusiness="true"
@ -112,10 +173,22 @@
@submitForm="submitForm" @submitForm="submitForm"
@sumFormDataHandle="sumFormDataHandle" @sumFormDataHandle="sumFormDataHandle"
> >
<template #selectionsActionspoLine="{ selections }"> <template #selectionsActionspoLine="{ selections }">
<div style="text-align: left; margin-right: 10px"> <div style="text-align: left; margin-right: 10px">
系统未税金额:{{Number(selections.reduce((prev, item) => prev + Number(Number(Number(Number(item['purchasePrice']).toFixed(5))*item['invoicableQuantity']).toFixed(2)),0)).toFixed(2)}} 系统未税金额:{{
Number(
selections.reduce(
(prev, item) =>
prev +
Number(
Number(
Number(Number(item['purchasePrice']).toFixed(5)) * item['invoicableQuantity']
).toFixed(2)
),
0
)
).toFixed(2)
}}
</div> </div>
</template> </template>
<!-- <template #foorter> <!-- <template #foorter>
@ -124,7 +197,11 @@
</div> </div>
</template> --> </template> -->
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-input :disabled="true" :class="{'is-red': row['singlePrice'] - row['purchasePrice'] > 0}" :modelValue="((row['singlePrice']) - (row['purchasePrice'])).toFixed(5)"/> <el-input
:disabled="true"
:class="{ 'is-red': row['singlePrice'] - row['purchasePrice'] > 0 }"
:modelValue="(row['singlePrice'] - row['purchasePrice']).toFixed(5)"
/>
</template> </template>
</BasicForm> </BasicForm>
@ -158,7 +235,8 @@
hidden: true, hidden: true,
label: t('ts.其他附件') label: t('ts.其他附件')
}" }"
:otherHeadButttonData="[{ :otherHeadButttonData="[
{
label: t('ts.打印明细'), label: t('ts.打印明细'),
name: 'printing', name: 'printing',
hide: false, hide: false,
@ -167,7 +245,8 @@
color: '', color: '',
float: 'left', float: 'left',
hasPermi: '' hasPermi: ''
},{ },
{
label: t('ts.打印全部发货单'), label: t('ts.打印全部发货单'),
name: 'printing-all', name: 'printing-all',
hide: false, hide: false,
@ -176,7 +255,8 @@
color: '', color: '',
float: 'left', float: 'left',
hasPermi: '' hasPermi: ''
},{ },
{
label: t('ts.导出明细'), label: t('ts.导出明细'),
name: 'export-detail', name: 'export-detail',
hide: false, hide: false,
@ -185,8 +265,10 @@
color: '', color: '',
float: 'left', float: 'left',
hasPermi: '' hasPermi: ''
}]" }
:buttondataTable = "[{ ]"
:buttondataTable="[
{
label: t('ts.打印'), label: t('ts.打印'),
name: 'print', name: 'print',
hide: true, hide: true,
@ -196,13 +278,16 @@
float: 'left', float: 'left',
link: true, // link: true, //
hasPermi: '' hasPermi: ''
}]" }
:sumFormDataByForm ="(formRef,formModel)=>{ ]"
:sumFormDataByForm="
(formRef, formModel) => {
const { singlePrice = 0, purchasePrice = 0 } = formModel const { singlePrice = 0, purchasePrice = 0 } = formModel
formRef.value.setValues({ formRef.value.setValues({
differencePrice: Number((Number(singlePrice) - Number(purchasePrice)).toFixed(5)) differencePrice: Number((Number(singlePrice) - Number(purchasePrice)).toFixed(5))
}) })
}" }
"
:isBasic="false" :isBasic="false"
:allSchemas="SupplierinvoiceRequestDetailMain.allSchemas" :allSchemas="SupplierinvoiceRequestDetailMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
@ -238,14 +323,14 @@
:coverIsDisable="true" :coverIsDisable="true"
:mode="2" :mode="2"
/> />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import dayjs from 'dayjs' import dayjs from 'dayjs'
// //
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { SupplierinvoiceRequestMain, import {
SupplierinvoiceRequestMain,
SupplierinvoiceRequestMainRules, SupplierinvoiceRequestMainRules,
SupplierinvoiceRequestDetail, SupplierinvoiceRequestDetail,
SupplierinvoiceRequestDetailRules, SupplierinvoiceRequestDetailRules,
@ -297,8 +382,8 @@ const searchList = (model)=>{
const selectionRows = ref<any>([]) const selectionRows = ref<any>([])
const tableRef = ref() const tableRef = ref()
const getSelectionRows = (currentPage, currentPageSelectionRows) => { const getSelectionRows = (currentPage, currentPageSelectionRows) => {
console.log("getSelectionRows",currentPage,currentPageSelectionRows) console.log('getSelectionRows', currentPage, currentPageSelectionRows)
const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage) const currentRows = selectionRows.value.find((item) => item.currentPage == currentPage)
if (currentRows) { if (currentRows) {
currentRows.selectionRows = currentPageSelectionRows currentRows.selectionRows = currentPageSelectionRows
} else { } else {
@ -312,9 +397,15 @@ const handleMainFefresh = ()=>{
getList() getList()
} }
const searchTableSuccessDetail = async (formField, searchField, val, formRef,searchTableFormModel)=>{ const searchTableSuccessDetail = async (
formField,
searchField,
val,
formRef,
searchTableFormModel
) => {
console.log('详情', formField, searchField, val, formRef, searchTableFormModel) console.log('详情', formField, searchField, val, formRef, searchTableFormModel)
val.forEach(item=>{ val.forEach((item) => {
item.deliveryDate = item['prhRcpDate'] item.deliveryDate = item['prhRcpDate']
item.arrivalQty = item['prhRcvd'] item.arrivalQty = item['prhRcvd']
}) })
@ -342,8 +433,14 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
val.forEach(item=>{ val.forEach((item) => {
if(tableData.value.find(item1=>item1['recvBillNum'] == item['recvBillNum']&&item1['poLine'] == item['poLine'])) return if (
tableData.value.find(
(item1) =>
item1['recvBillNum'] == item['recvBillNum'] && item1['poLine'] == item['poLine']
)
)
return
const newRow = { ...row } const newRow = { ...row }
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
@ -365,14 +462,15 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
newRow['arrivalQty'] = item['prhRcvd'] newRow['arrivalQty'] = item['prhRcvd']
newRow['id'] = item['id'] newRow['id'] = item['id']
newRow['currency'] = item['currency'] newRow['currency'] = item['currency']
} }
tableData.value.push(newRow) tableData.value.push(newRow)
}) })
} else { } else {
// //
if(formField=='supplierCode'&&val[0][searchField]!=searchFormRef.formModel.supplierCode){ if (
formField == 'supplierCode' &&
val[0][searchField] != searchFormRef.formModel.supplierCode
) {
tableData.value = [] tableData.value = []
} }
// //
@ -402,7 +500,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
defaultButtons.mainLisSelectiontPointBtn(null), // defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null) //
// { // {
// label: '', // label: '',
// name: 'zdy', // name: 'zdy',
@ -415,15 +513,20 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') {
//
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') {
//
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') {
//
handleExport() handleExport()
} else if (val=='selection_point'){// } else if (val == 'selection_point') {
//
handleSelectionPoint() handleSelectionPoint()
} else if (val == 'refresh') { // } else if (val == 'refresh') {
//
if (tableObject.params.filters && tableObject.params.filters.length > 0) { if (tableObject.params.filters && tableObject.params.filters.length > 0) {
searchFormClick({ searchFormClick({
filters: tableObject.params.filters filters: tableObject.params.filters
@ -431,8 +534,10 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
} else { } else {
getList() getList()
} }
} else if (val == 'filtrate') { // } else if (val == 'filtrate') {
} else { // //
} else {
//
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
@ -450,7 +555,10 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
const butttondata = (row, $index) => { const butttondata = (row, $index) => {
return [ return [
// defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['9']) ,hasPermi: 'wms:supplierinvoice-request-main:open'}), // // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['9']) ,hasPermi: 'wms:supplierinvoice-request-main:open'}), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1','6']),hasPermi: 'wms:supplierinvoice-request-main:sub' }), // defaultButtons.mainListPlanSubBtn({
hide: isShowMainButton(row, ['1', '6']),
hasPermi: 'wms:supplierinvoice-request-main:sub'
}), //
{ {
label: t('ts.查看明细'), label: t('ts.查看明细'),
name: 'open_detail', name: 'open_detail',
@ -458,8 +566,9 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
icon: '', icon: '',
color: '', color: '',
hasPermi: '', hasPermi: '',
link: true, // link: true //
},{ },
{
label: t('ts.采购通过'), label: t('ts.采购通过'),
name: 'purchase_mainPlanSub', name: 'purchase_mainPlanSub',
hide: !(!isShowMainButton(row, ['2']) && row.currentIsProcurementCreator == true), hide: !(!isShowMainButton(row, ['2']) && row.currentIsProcurementCreator == true),
@ -467,8 +576,9 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
icon: '', icon: '',
color: '', color: '',
hasPermi: 'wms:supplierinvoice-request-main:app', hasPermi: 'wms:supplierinvoice-request-main:app',
link: true, // link: true //
},{ },
{
label: t('ts.采购驳回'), label: t('ts.采购驳回'),
name: 'purchase_mainPlanTur', name: 'purchase_mainPlanTur',
hide: !(!isShowMainButton(row, ['2']) && row.currentIsProcurementCreator == true), hide: !(!isShowMainButton(row, ['2']) && row.currentIsProcurementCreator == true),
@ -494,8 +604,9 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
icon: '', icon: '',
color: '', color: '',
hasPermi: 'wms:supplierinvoice-request-main:financeApp', hasPermi: 'wms:supplierinvoice-request-main:financeApp',
link: true, // link: true //
},{ },
{
label: t('ts.财务驳回'), label: t('ts.财务驳回'),
name: 'finance_mainPlanTur', name: 'finance_mainPlanTur',
hide: isShowMainButton(row, ['4']), hide: isShowMainButton(row, ['4']),
@ -504,7 +615,10 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
link: true, // link: true, //
hasPermi: 'wms:supplierinvoice-request-main:financeRej' hasPermi: 'wms:supplierinvoice-request-main:financeRej'
}, },
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' , hide: isShowMainButton(row, ['1','3','6','7'])}), // defaultButtons.mainListEditBtn({
hasPermi: 'wms:supplierinvoice-request-main:update',
hide: isShowMainButton(row, ['1', '3', '6', '7'])
}), //
// defaultButtons.mainListPurchasePlanCloBtn({ hasPermi: 'wms:supplierinvoice-request-main:close' ,hide: isShowMainButton(row, ['1','3','6','7']) }), // // defaultButtons.mainListPurchasePlanCloBtn({ hasPermi: 'wms:supplierinvoice-request-main:close' ,hide: isShowMainButton(row, ['1','3','6','7']) }), //
{ {
label: t('ts.作废'), label: t('ts.作废'),
@ -536,49 +650,78 @@ const handleImport = () => {
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainPurPlanOpe') { // if (val == 'mainPurPlanOpe') {
//
handleOpe(row.id) handleOpe(row.id)
} else if (val == 'mainPurPlanClo') {// } else if (val == 'mainPurPlanClo') {
//
handleClo(row.id) handleClo(row.id)
} else if (val == 'mainPlanSub') { // } else if (val == 'mainPlanSub') {
//
handleSub(row.id) handleSub(row.id)
} else if (val == 'open_detail') { // } else if (val == 'open_detail') {
//
openDetail(row, '单据号', row.number) openDetail(row, '单据号', row.number)
}else if (val == 'purchase_mainPlanSub') { // } else if (val == 'purchase_mainPlanSub') {
//
// handleApp(row.id) // handleApp(row.id)
if (row.balanceStatementStatus) { if (row.balanceStatementStatus) {
formPurchasePassRef.value.open('update', row, null, '采购审批通过', '采购审批通过') formPurchasePassRef.value.open('update', row, null, '采购审批通过', '采购审批通过')
} else { } else {
submitPurchasePass(row.id) submitPurchasePass(row.id)
} }
} else if (val == 'purchase_mainPlanTur') { // } else if (val == 'purchase_mainPlanTur') {
//
resonSubmit(val, row) resonSubmit(val, row)
// handleTur(row.id) // handleTur(row.id)
} else if (val == 'invoice_sent_out') { // } else if (val == 'invoice_sent_out') {
//
handleInvoiceSentOut(row.id) handleInvoiceSentOut(row.id)
} else if(val == 'finance_mainPlanSub'){ // } else if (val == 'finance_mainPlanSub') {
//
handleFinanceApp(row) handleFinanceApp(row)
} else if(val == 'finance_mainPlanTur'){ // } else if (val == 'finance_mainPlanTur') {
//
resonSubmit(val, row) resonSubmit(val, row)
// handleFinaceTur(row.masterId) // handleFinaceTur(row.masterId)
} else if (val == 'genRecords') { // } else if (val == 'genRecords') {
//
genRecords(row.id) genRecords(row.id)
} else if (val == 'edit') { // } else if (val == 'edit') {
//
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') {
//
handleDelete(row.id) handleDelete(row.id)
} else if( val == 'mian_print'){ // } else if (val == 'mian_print') {
//
handleDocumentPrint(row.id) handleDocumentPrint(row.id)
} else if( val == 'repeal'){ // } else if (val == 'repeal') {
//
handleRepeal(row.id) handleRepeal(row.id)
} }
} }
const procurementCreators = ref([])
SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({
roleCode: 'purchase',
pageSize: 1000,
pageNo: 1,
sort: '',
by: 'ASC'
}).then((res) => {
procurementCreators.value = res.list
})
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm = async (type : string, row ?: number) => { const openForm = async (type: string, row?: any) => {
// : // :
SupplierinvoiceRequestDetail.allSchemas.tableFormColumns = SupplierinvoiceRequestDetail.allSchemas.tableFormColumns.filter(item=>item.field!='contractAmountTotal'&&item.field!='purchaseAmontTotal'&&item.field!='differencePriceTotal') SupplierinvoiceRequestDetail.allSchemas.tableFormColumns =
SupplierinvoiceRequestDetail.allSchemas.tableFormColumns.filter(
(item) =>
item.field != 'contractAmountTotal' &&
item.field != 'purchaseAmontTotal' &&
item.field != 'differencePriceTotal'
)
if (type == 'update') { if (type == 'update') {
// //
@ -594,7 +737,13 @@ const handleImport = () => {
} }
// ---taxRate\beforeTaxAmount\totalTaxAmount\goldenTaxInvoiceNumber\invoiceTime // ---taxRate\beforeTaxAmount\totalTaxAmount\goldenTaxInvoiceNumber\invoiceTime
if(item.field == 'taxRate'||item.field == 'beforeTaxAmount'||item.field == 'totalTaxAmount'||item.field == 'goldenTaxInvoiceNumber'||item.field == 'invoiceTime'){ if (
item.field == 'taxRate' ||
item.field == 'beforeTaxAmount' ||
item.field == 'totalTaxAmount' ||
item.field == 'goldenTaxInvoiceNumber' ||
item.field == 'invoiceTime'
) {
if (row.status == '1' || row.status == '3' || row.status == '6' || row.status == '7') { if (row.status == '1' || row.status == '3' || row.status == '6' || row.status == '7') {
item.componentProps.disabled = false item.componentProps.disabled = false
} else { } else {
@ -625,9 +774,22 @@ const handleImport = () => {
item.componentProps.disabled = false item.componentProps.disabled = false
} }
// \ \ \\\\ // \ \ \\\\
if(item.field == 'taxRate'||item.field == 'procurementCreator'||item.field == 'beforeTaxAmount'||item.field == 'totalTaxAmount'||item.field == 'goldenTaxInvoiceNumber'||item.field == 'invoiceTime'||item.field == 'discountAmount1'){ if (
item.field == 'taxRate' ||
item.field == 'procurementCreator' ||
item.field == 'beforeTaxAmount' ||
item.field == 'totalTaxAmount' ||
item.field == 'goldenTaxInvoiceNumber' ||
item.field == 'invoiceTime' ||
item.field == 'discountAmount1'
) {
item.componentProps.disabled = false item.componentProps.disabled = false
} }
if (item.field == 'procurementCreator') {
item.componentProps.options = procurementCreators.value
}
}) })
} }
if (row && (row.status == '3' || row.status == '7')) { if (row && (row.status == '3' || row.status == '7')) {
@ -635,7 +797,6 @@ const handleImport = () => {
SupplierinvoiceRequestMainRules.totalTaxAmount[0].required = true // SupplierinvoiceRequestMainRules.totalTaxAmount[0].required = true //
SupplierinvoiceRequestMainRules.goldenTaxInvoiceNumber[0].required = true // SupplierinvoiceRequestMainRules.goldenTaxInvoiceNumber[0].required = true //
SupplierinvoiceRequestMainRules.invoiceTime[0].required = true SupplierinvoiceRequestMainRules.invoiceTime[0].required = true
} else { } else {
SupplierinvoiceRequestMainRules.beforeTaxAmount[0].required = false // SupplierinvoiceRequestMainRules.beforeTaxAmount[0].required = false //
SupplierinvoiceRequestMainRules.totalTaxAmount[0].required = false // SupplierinvoiceRequestMainRules.totalTaxAmount[0].required = false //
@ -644,13 +805,18 @@ const handleImport = () => {
} }
if (row && row.procurementCreator) row.procurementCreator = Number(row.procurementCreator) if (row && row.procurementCreator) row.procurementCreator = Number(row.procurementCreator)
// //
SupplierinvoiceRequestMainApi.checkInvoicingCalendar({}).then(res => { SupplierinvoiceRequestMainApi.checkInvoicingCalendar({}).then((res) => {
if (res.flag) { if (res.flag) {
message.alertWarning(res.msg) message.alertWarning(res.msg)
return return
} }
tableData.value = [] // tableData.value = [] //
formRef.value.open(type, row) formRef.value.open(type, row)
nextTick(() => {
formRef.value.formRef.setValues({
procurementCreator:procurementCreators.value[0].id
})
})
}) })
} }
const defaultSupplierCode = ref('') const defaultSupplierCode = ref('')
@ -664,46 +830,53 @@ const handleImport = () => {
console.log('defaultSupplierCode', defaultSupplierCode) console.log('defaultSupplierCode', defaultSupplierCode)
} }
// //
const { wsCache } = useCache() const { wsCache } = useCache()
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const clicKRowId = ref(); const clicKRowId = ref()
const detailAnnexTable = ref( const detailAnnexTable = ref([
[{ {
label: t('ts.合同附件'), label: t('ts.合同附件'),
prop: 'Annex', prop: 'Annex',
tableName: 'contract', tableName: 'contract',
hiddenDelete: false, hiddenDelete: false,
hiddenUpload: false, hiddenUpload: false,
fileSize: 20 fileSize: 20
},{ },
{
label: t('ts.发票附件'), label: t('ts.发票附件'),
prop: 'Annex', prop: 'Annex',
tableName: 'invoice', tableName: 'invoice',
hiddenDelete: false, hiddenDelete: false,
hiddenUpload: false, hiddenUpload: false,
fileSize: 20 fileSize: 20
},
},{ {
label: t('ts.货运单附件'), label: t('ts.货运单附件'),
prop: 'Annex', prop: 'Annex',
tableName: 'waybill', tableName: 'waybill',
fileSize: 20 fileSize: 20
},{ },
{
label: t('ts.其他附件'), label: t('ts.其他附件'),
prop: 'Annex', prop: 'Annex',
tableName: 'invoiceOther', tableName: 'invoiceOther',
fileSize: 20 fileSize: 20
}]) }
])
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name const departmentCode = wsCache
.get(CACHE_KEY.DEPT)
.find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
clicKRowId.value = row.id clicKRowId.value = row.id
// //
if((roleList.value.indexOf('purchase')>-1&&row.status=='2')||(roleList.value.indexOf('supplier_operator')>-1&&(row.status=='1'||row.status=='6'))){ if (
(roleList.value.indexOf('purchase') > -1 && row.status == '2') ||
(roleList.value.indexOf('supplier_operator') > -1 && (row.status == '1' || row.status == '6'))
) {
detailAnnexTable.value[0].hiddenDelete = false detailAnnexTable.value[0].hiddenDelete = false
detailAnnexTable.value[0].hiddenUpload = false detailAnnexTable.value[0].hiddenUpload = false
} else { } else {
@ -711,7 +884,10 @@ const handleImport = () => {
detailAnnexTable.value[0].hiddenUpload = true detailAnnexTable.value[0].hiddenUpload = true
} }
// //
if(roleList.value.indexOf('supplier_operator')>-1&&(row.status=='3'||row.status=='7')){ if (
roleList.value.indexOf('supplier_operator') > -1 &&
(row.status == '3' || row.status == '7')
) {
detailAnnexTable.value[1].hiddenDelete = false detailAnnexTable.value[1].hiddenDelete = false
detailAnnexTable.value[1].hiddenUpload = false detailAnnexTable.value[1].hiddenUpload = false
} else { } else {
@ -719,7 +895,7 @@ const handleImport = () => {
detailAnnexTable.value[1].hiddenUpload = true detailAnnexTable.value[1].hiddenUpload = true
} }
detailRef.value.openDetail(row, titleName, titleValue,"requestSupplierinvoiceMain") detailRef.value.openDetail(row, titleName, titleValue, 'requestSupplierinvoiceMain')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */
@ -734,7 +910,8 @@ const handleImport = () => {
tableObject.loading = false tableObject.loading = false
// //
await getList() await getList()
} catch { }finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -751,7 +928,8 @@ const handleImport = () => {
tableObject.loading = false tableObject.loading = false
// //
await getList() await getList()
} catch { }finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -768,7 +946,8 @@ const handleImport = () => {
tableObject.loading = false tableObject.loading = false
// //
await getList() await getList()
} catch { }finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -785,7 +964,8 @@ const handleImport = () => {
tableObject.loading = false tableObject.loading = false
// //
await getList() await getList()
} catch { }finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -802,7 +982,8 @@ const handleImport = () => {
tableObject.loading = false tableObject.loading = false
// //
await getList() await getList()
} catch { }finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -818,18 +999,21 @@ const handleImport = () => {
await message.confirm(t('ts.是否审批通过所选中数据?')) await message.confirm(t('ts.是否审批通过所选中数据?'))
tableObject.loading = true tableObject.loading = true
// //
await SupplierinvoiceRequestMainApi.appSupplierinvoiceRequestMain(id1,submitData?.balanceStatement) await SupplierinvoiceRequestMainApi.appSupplierinvoiceRequestMain(
id1,
submitData?.balanceStatement
)
message.success(t('ts.审批通过成功!')) message.success(t('ts.审批通过成功!'))
tableObject.loading = false tableObject.loading = false
formPurchasePassRef.value.dialogVisible = false formPurchasePassRef.value.dialogVisible = false
// //
await getList() await getList()
} catch { }finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
/** 审批通过按钮操作 finance_mainPlanSub */ /** 审批通过按钮操作 finance_mainPlanSub */
const formFinanceRef = ref() const formFinanceRef = ref()
const handleFinanceApp = async (row) => { const handleFinanceApp = async (row) => {
@ -844,7 +1028,7 @@ const handleImport = () => {
await SupplierinvoiceRequestMainApi.financeappSupplierinvoiceRequestMain({ await SupplierinvoiceRequestMainApi.financeappSupplierinvoiceRequestMain({
id: data.id, id: data.id,
postingDate: data.postingDate, postingDate: data.postingDate,
voucherNumberRemark:data.voucherNumberRemark, voucherNumberRemark: data.voucherNumberRemark
}) })
formFinanceRef.value.dialogVisible = false formFinanceRef.value.dialogVisible = false
getList() getList()
@ -878,7 +1062,8 @@ const handleImport = () => {
tableObject.loading = false tableObject.loading = false
// //
await getList() await getList()
} catch { }finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -895,13 +1080,13 @@ const handleImport = () => {
tableObject.loading = false tableObject.loading = false
// //
await getList() await getList()
} catch { }finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
const resonSubmit = async (val, row) => { const resonSubmit = async (val, row) => {
ElMessageBox.prompt(t('ts.请输入驳回原因'), t('ts.提示'), { ElMessageBox.prompt(t('ts.请输入驳回原因'), t('ts.提示'), {
confirmButtonText: t('common.ok'), confirmButtonText: t('common.ok'),
cancelButtonText: t('common.cancel'), cancelButtonText: t('common.cancel'),
@ -915,16 +1100,18 @@ const handleImport = () => {
return true return true
} }
} }
}).then(({ value }) => { })
.then(({ value }) => {
//  // 
if (val == 'purchase_mainPlanTur') { // if (val == 'purchase_mainPlanTur') {
//
handleTur(row.id, value) handleTur(row.id, value)
}else if(val == 'finance_mainPlanTur'){ // } else if (val == 'finance_mainPlanTur') {
//
handleFinaceTur(row.id, value) handleFinaceTur(row.id, value)
} }
}) })
.catch(() => { .catch(() => {})
})
} }
/** 驳回按钮操作 */ /** 驳回按钮操作 */
@ -942,7 +1129,8 @@ const handleImport = () => {
tableObject.loading = false tableObject.loading = false
// //
await getList() await getList()
} catch { }finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -959,7 +1147,8 @@ const handleImport = () => {
tableObject.loading = false tableObject.loading = false
// //
await getList() await getList()
} catch { }finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -968,16 +1157,16 @@ const handleImport = () => {
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {
let rows: any = [] let rows: any = []
selectionRows.value.forEach(item=>{ selectionRows.value.forEach((item) => {
rows = [...rows,...item.selectionRows.map(item1=>item1.number)] rows = [...rows, ...item.selectionRows.map((item1) => item1.number)]
}) })
let paramsData = JSON.parse(JSON.stringify(tableObject.params)) let paramsData = JSON.parse(JSON.stringify(tableObject.params))
if (tableObject.params && tableObject.params.isSearch == true) { if (tableObject.params && tableObject.params.isSearch == true) {
paramsData.filters.push({ paramsData.filters.push({
action: "in", action: 'in',
column: "number", column: 'number',
value: rows.join(",") value: rows.join(',')
}) })
} else { } else {
paramsData = { ...paramsData, checkNums: rows } paramsData = { ...paramsData, checkNums: rows }
@ -996,12 +1185,11 @@ const handleImport = () => {
} }
} }
/** /**
* tableForm方法 * tableForm方法
*/ */
const tableFormKeys = {} const tableFormKeys = {}
SupplierinvoiceRequestDetail.allSchemas.tableFormColumns.forEach(item => { SupplierinvoiceRequestDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : '' tableFormKeys[item.field] = item.default ? item.default : ''
}) })
const tableData = ref([]) const tableData = ref([])
@ -1018,13 +1206,23 @@ const handleImport = () => {
} }
} }
const tableSelectionDelete = (selection) => { const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item)) tableData.value = tableData.value.filter((item) => !selection.includes(item))
} }
const sumFormDataHandle = async (formRef1,formModel,tableData,formType,originFormModel,updateOriginFormModel)=>{ const sumFormDataHandle = async (
formRef1,
formModel,
tableData,
formType,
originFormModel,
updateOriginFormModel
) => {
if (formType == 'update') { if (formType == 'update') {
if (formModel && formModel.id && formModel.taxRate && originFormModel) { if (formModel && formModel.id && formModel.taxRate && originFormModel) {
let res = await SupplierinvoiceRequestMainApi.getTaxAmount({id:formModel.id,taxRate:formModel.taxRate}) let res = await SupplierinvoiceRequestMainApi.getTaxAmount({
id: formModel.id,
taxRate: formModel.taxRate
})
console.log('更新taxAmount', res) console.log('更新taxAmount', res)
formRef1.value.setValues({ formRef1.value.setValues({
taxAmount: res taxAmount: res
@ -1036,7 +1234,9 @@ const handleImport = () => {
const submitForm = async (formType, submitData) => { const submitForm = async (formType, submitData) => {
let data = { ...submitData } let data = { ...submitData }
tableData.value.forEach((item) => { tableData.value.forEach((item) => {
item.differencePrice = Number((Number(item?.singlePrice)-Number(item?.purchasePrice)).toFixed(5)) item.differencePrice = Number(
(Number(item?.singlePrice) - Number(item?.purchasePrice)).toFixed(5)
)
}) })
data.subList = tableData.value // data.subList = tableData.value //
console.log('data', data) console.log('data', data)
@ -1044,11 +1244,11 @@ const handleImport = () => {
if (formType === 'create') { if (formType === 'create') {
if (data.subList.length == 0) { if (data.subList.length == 0) {
message.warning(t('ts.请添明细数据')) message.warning(t('ts.请添明细数据'))
return; return
} }
if (data.subList.length > 20000) { if (data.subList.length > 20000) {
message.warning(t('ts.明细数据条数已超过最大数量限制【20000条】')) message.warning(t('ts.明细数据条数已超过最大数量限制【20000条】'))
return; return
} }
formRef.value.formLoading = true formRef.value.formLoading = true
await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data) await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data)
@ -1089,7 +1289,7 @@ const importSuccess = () => {
// -- // --
const detailButtonBaseClick = (val, item) => { const detailButtonBaseClick = (val, item) => {
console.log("点击的按钮",val) console.log('点击的按钮', val)
if (val == 'printing') { if (val == 'printing') {
// //
handleDocumentPrint(clicKRowId.value) handleDocumentPrint(clicKRowId.value)
@ -1097,18 +1297,18 @@ const importSuccess = () => {
// //
handlePrintAll(clicKRowId.value) handlePrintAll(clicKRowId.value)
} else if (val === 'export-detail') { } else if (val === 'export-detail') {
console.log("导出明细:",clicKRowId.value) console.log('导出明细:', clicKRowId.value)
handleDetailExport(clicKRowId.value) handleDetailExport(clicKRowId.value)
} }
} }
const tableFormButton = (val, item) => { const tableFormButton = (val, item) => {
console.log("点击的按钮",val) console.log('点击的按钮', val)
if (val == 'print') { if (val == 'print') {
// //
SupplierinvoiceRequestMainApi.printSupplierRecord(item.asnBillNum).then(res =>{ SupplierinvoiceRequestMainApi.printSupplierRecord(item.asnBillNum).then((res) => {
if (res) { if (res) {
handleSupplierdeliverRecordPrint(res); handleSupplierdeliverRecordPrint(res)
} }
}) })
} }
@ -1136,7 +1336,9 @@ const importSuccess = () => {
const BASE_URL = getJmreportBaseUrl() const BASE_URL = getJmreportBaseUrl()
// //
const documentSupplierdeliverRecordSrc = ref(BASE_URL + '/jmreport/view/932556833517789184?token=' + getAccessToken()) const documentSupplierdeliverRecordSrc = ref(
BASE_URL + '/jmreport/view/932556833517789184?token=' + getAccessToken()
)
const handleSupplierdeliverRecordPrint = async (id) => { const handleSupplierdeliverRecordPrint = async (id) => {
window.open(documentSupplierdeliverRecordSrc.value + '&id=' + id) window.open(documentSupplierdeliverRecordSrc.value + '&id=' + id)
} }
@ -1147,12 +1349,11 @@ const importSuccess = () => {
window.open(documentSrc.value + '&id=' + id) window.open(documentSrc.value + '&id=' + id)
} }
const srcPoint = ref(BASE_URL + '/jmreport/view/972723426543935488?token=' + getAccessToken()) const srcPoint = ref(BASE_URL + '/jmreport/view/972723426543935488?token=' + getAccessToken())
const handleSelectionPoint = async () => { const handleSelectionPoint = async () => {
let rows: any = [] let rows: any = []
selectionRows.value.forEach(item=>{ selectionRows.value.forEach((item) => {
rows = [...rows,...item.selectionRows.map(item1=>item1.id)] rows = [...rows, ...item.selectionRows.map((item1) => item1.id)]
}) })
if (rows.length == 0) { if (rows.length == 0) {
message.warning('至少选择一条数据!') message.warning('至少选择一条数据!')
@ -1162,18 +1363,17 @@ const handleSelectionPoint = async ()=>{
window.open(srcPoint.value + '&ids=' + rows.join(',')) window.open(srcPoint.value + '&ids=' + rows.join(','))
} }
const handlePrintAll = async (masterId) => { const handlePrintAll = async (masterId) => {
// //
SupplierinvoiceRequestMainApi.printSupplierRecordByMasterId(masterId).then(res =>{ SupplierinvoiceRequestMainApi.printSupplierRecordByMasterId(masterId).then((res) => {
if (res && res.length > 0) { if (res && res.length > 0) {
for (let i = 0; i < res.length; i++) { for (let i = 0; i < res.length; i++) {
let id = res[i]; let id = res[i]
handleSupplierdeliverRecordPrint(id); handleSupplierdeliverRecordPrint(id)
} }
} else { } else {
message.warning(t('ts.非SCP订单无法打印')) message.warning(t('ts.非SCP订单无法打印'))
return; return
} }
}) })
} }

2
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -16,6 +16,7 @@ const queryParams = {
pageNo: 1, pageNo: 1,
code: 'PurchaseInvoiceRequest' code: 'PurchaseInvoiceRequest'
} }
console.log(34343)
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData = data?.list[0] || {} const requestsettingData = data?.list[0] || {}
@ -784,7 +785,6 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: { form: {
component: 'Select', component: 'Select',
api: () => procurementCreators.list, api: () => procurementCreators.list,
value:procurementCreators?.list.length>0?procurementCreators.list[0].id:'',
componentProps: { componentProps: {
optionsAlias: { optionsAlias: {
labelField: 'nickname', labelField: 'nickname',

Loading…
Cancel
Save