发票开出

szh-new
sunzehua 2 months ago
parent 8e6e180932
commit 30b1ee066e

@ -26,20 +26,9 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 },
},
{
field: 'etD_START',
label: 'ETD开始',
component: 'DatePicker',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: {
allowClear: true,
}
},
{
field: 'etD_END',
label: 'ETD结束',
component: 'DatePicker',
field: 'ETD',
label: 'ETD',
component: 'RangePicker',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },

@ -155,12 +155,12 @@ export const columns: BasicColumn[] = [
},
{
title: '申请单号',
dataIndex: 'applicationNO',
dataIndex: 'applicationNO2',
width: 100,
},
{
title: '发票申请单号',
dataIndex: 'applicationNO',
dataIndex: 'applicationNO1',
width: 100,
},
{
@ -375,8 +375,8 @@ export const detailForm: FormSchema[] = [
})
},
immediate: false,
labelField: 'account',
valueField: 'account',
labelField: 'bankName',
valueField: 'bankName',
resultField: 'data',
onChange: (e, obj) => {
if (obj) {
@ -738,10 +738,10 @@ export const invoiceSearchFormSchema: FormSchema[] = [
return {
api: GetClientListByCode,
labelField: 'pinYinCode',
valueField: 'shortName',
valueField: 'id',
showName: 'shortName',
resultField: 'data',
immediate: false
immediate: true
}
}
},

@ -37,10 +37,10 @@
</span>
</a-tooltip>
</div>
<div style="color: #17a6a3" class="right-b lock" v-if="route.query.id">
<div style="color: #17a6a3" class="right-b lock" v-if="route.query.id && form.isLocked">
<span class="iconfont icon-locksuo"></span>锁定
</div>
<div style="color: #7a8798" class="right-b lock" v-if="!route.query.id">
<div style="color: #7a8798" class="right-b lock" v-if="!route.query.id || !form.isLocked">
<span class="iconfont icon-a-jiesuo1_jiesuo"></span>未锁定
</div>
<div class="type">
@ -116,7 +116,7 @@
</template>
<script lang="ts" setup>
import { ref, onMounted, defineComponent, nextTick, watchEffect, watch } from 'vue'
import { InvoiceSettlementSave, InvoiceSettlementGet, GetClientBankList } from '../api'
import { InvoiceSettlementSave, InvoiceSettlementGet, PaymentSettlementGetList,InvoiceSettlementGetInvoiceDetails } from '../api'
import { useMessage } from '/@/hooks/web/useMessage'
import invoiceTable from './invoiceTable.vue'
import invoiceFile from '../../../operation/invoiceIssue/detail/invoiceFile.vue'
@ -144,7 +144,7 @@ const [registerFormMark, { getFieldsValue: getFieldsValueMark, setFieldsValue: s
schemas: markForm,
showActionButtonGroup: false,
})
const [registerTable, { setTableData }] = useTable({
const [registerTable, { setTableData,setSelectedRowKeys }] = useTable({
columns: invoiceColum,
useSearchForm: false,
showIndexColumn: false,
@ -176,9 +176,65 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
canResize: true,
immediate: false,
})
function ClickLast(type) {
const data = {
"queryCondition": "[]",
"pageCondition": {
"pageIndex": 1,
"pageSize": 100,
"sortConditions": []
}
}
let indexQuery = 0
let list = []
PaymentSettlementGetList(data).then(res => {
list = res.data.list
res.data.list.forEach((item, index) => {
if (item.id == route.query.id) {
indexQuery = index
}
})
console.log(indexQuery, list)
if (type == 'next') {
if (indexQuery == 0) {
createMessage.warning('已经是第一条了')
} else {
go("/invoiceIssueDetail?id=" + list[indexQuery - 1].id + '&type=' + route.query.type)
}
}
if (type == 'last') {
if (indexQuery == list.length - 1) {
createMessage.warning('已经是最后一条了')
} else {
go("/invoiceIssueDetail?id=" + list[indexQuery + 1].id + '&type=' + route.query.type)
}
}
})
}
function addDetailed(){
if (route.query.type == 'invoice') {
invoiceTableRef.value.customerIdP = form.value.customerId
invoiceTableRef.value.init()
}
}
function handleClick(record){
setSelectedRowKeys([record.id])
const data = {
ids: [record.id],
businessType: record.businessType,
}
loading.value = true
InvoiceSettlementGetInvoiceDetails(data).then(res => {
if (res.succeeded) {
setTableData1(res.data)
}
loading.value = false
})
}
const invoiceTableRef = ref('')
onMounted(() => {
if (route.query.type == 'invoice' && !route.query.id) {
invoiceTableRef.value.customerIdP = ''
invoiceTableRef.value.init()
}
if (route.query.type == 'invoice' && route.query.id) {
@ -207,7 +263,7 @@ function updateList(arr, currency) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}`)
go(`/feeSettlementDetail?id=${res.data.id}&type=${route.query.type}`)
}, 50)
} else {
getDetail()
@ -236,7 +292,7 @@ function handleSave() {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}`)
go(`/feeSettlementDetail?id=${res.data.id}&type=${route.query.type}`)
}, 50)
} else {
getDetail()
@ -255,31 +311,12 @@ function getDetail() {
res.data.currencyAmount = res.data.currency + '/' + res.data.amount
setFieldsValueMark(res.data)
setFieldsValue(res.data)
setTableData(res.data.details)
setTableData(res.data.settlementDetails)
}
loading.value = false
})
}
const bankList = ref([])
function getBankInfo(id) {
const queryStr = [
{
FieldName: 'ClientId',
FieldValue: id,
ConditionalType: '0',
},
]
const data = {
pageCondition: {
pageIndex: 1,
pageSize: 20,
sortConditions: [],
},
queryCondition: JSON.stringify(queryStr),
}
bankList.value = []
GetClientBankList(data).then((res) => { })
}
</script>
<style lang="less" scoped>

@ -20,7 +20,7 @@
<a-select size="small" v-model:value="currency" style="width: 150px;margin-left: 15px"
placeholder="请选择结算币别">
<a-select-option v-for="item in currencyList" :key="item.codeName" :value="item.codeName">
{{ item.description }}
{{ item.codeName }}
</a-select-option>
</a-select>
</div>
@ -124,7 +124,7 @@ const [registerTable, { reload, getForm, getSelectRows, setSelectedRowKeys, getD
showIndexColumn: false,
canResize: false,
showTableSetting: false,
id:'4',
id: '4',
immediate: false
})
const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee, setTableData }] = useTable({
@ -140,7 +140,7 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
width: 60,
},
showTableSetting: true,
id:'3',
id: '3',
canResize: false,
immediate: false,
})
@ -180,13 +180,19 @@ function addInfos() {
throw new Error('customerId值不一致');
}
}
if (customerIdP.value) {
if (arr[0].customerId != customerIdP.value) {
createMessage.error('请选择同一开票单位')
return false
}
}
let freeList = [] as any
arr.forEach(item => {
freeList.push({
id: item.id,
businessType: item.businessType,
customerId: item.customerId,
customerName:item.customerName
customerName: item.customerName
})
})
currenciesData.value = []
@ -224,7 +230,7 @@ function addInfos() {
});
});
return Promise.all(promises).then(() => {
exchangeFlag.value = true
exchangeFlag.value = true
});
}
if (cuArr.length == 0) {
@ -261,6 +267,13 @@ function onSelectChange(selectedRowKeys) {
const openFlag = ref(false)
function init() {
openFlag.value = true
setTimeout(() => {
if (customerIdP.value) {
getForm().setFieldsValue({
customerId: customerIdP.value
})
}
}, 200)
}
const currency = ref('')
const currencyList = ref([]) as any
@ -269,7 +282,8 @@ onMounted(() => {
currencyList.value = res.data
})
})
defineExpose({ init })
const customerIdP = ref('')
defineExpose({ init, customerIdP })
</script>
<style lang="less" scoped>

@ -874,9 +874,9 @@
})
},
beforeFetch: (p) => {
if (taskType.value) {
p['task_TYPE'] = taskType.value
}
// if (taskType.value) {
// p['task_TYPE'] = taskType.value
// }
const data = {} as any
const queryData = JSON.parse(formatParams(p).queryCondition)
data.pageCondition = formatParams(p).pageCondition

Loading…
Cancel
Save