zth
sunzehua 2 weeks ago
parent d16461897c
commit a045a6c1ec

@ -464,7 +464,7 @@ const bottomForm = [
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ {
field: 'applyDate', field: 'createTime',
label: '申请日期', label: '申请日期',
component: 'DatePicker', component: 'DatePicker',
colProps: { span: 4 }, colProps: { span: 4 },
@ -637,7 +637,7 @@ const bottomFormEdit = [
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ {
field: 'applyDate', field: 'createTime',
label: '申请日期', label: '申请日期',
component: 'DEdit', component: 'DEdit',
colProps: { span: 4 }, colProps: { span: 4 },

@ -258,7 +258,6 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge
}, },
useSearchForm: true, useSearchForm: true,
showIndexColumn: false, showIndexColumn: false,
maxHeight: '600',
pagination: true, pagination: true,
rowKey: 'cindex', rowKey: 'cindex',
id: '11', id: '11',
@ -276,7 +275,6 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
columns: applyColumsDetail, columns: applyColumsDetail,
useSearchForm: false, useSearchForm: false,
showIndexColumn: false, showIndexColumn: false,
maxHeight: '600',
pagination: false, pagination: false,
dataSource: dataSource.value, dataSource: dataSource.value,
striped: true, striped: true,
@ -316,7 +314,6 @@ const [registerTableFree, { getForm: getFormFree, setSelectedRowKeys: setSelecte
}, },
useSearchForm: true, useSearchForm: true,
showIndexColumn: false, showIndexColumn: false,
maxHeight: '600',
rowKey: 'cindex', rowKey: 'cindex',
id: '33', id: '33',
showTableSetting: true, showTableSetting: true,
@ -336,7 +333,6 @@ const [registerTableFreeDetail, { getSelectRows: getSelectRowsFeeDetail, setProp
columns: columnsFreeDetail, columns: columnsFreeDetail,
useSearchForm: false, useSearchForm: false,
showIndexColumn: false, showIndexColumn: false,
maxHeight: '600',
pagination: false, pagination: false,
dataSource: freeDetailList.value, dataSource: freeDetailList.value,
striped: true, striped: true,
@ -654,6 +650,7 @@ function handleClickFree(record, index) {
loading.value = false loading.value = false
}) })
} }
const customerIdPName = ref('')
function init(data) { function init(data) {
if (route.query.type == 'apply') { if (route.query.type == 'apply') {
open.value = true open.value = true
@ -665,12 +662,16 @@ function init(data) {
if (customerIdP.value) { if (customerIdP.value) {
if (route.query.type == 'free') { if (route.query.type == 'free') {
getFormFree().setFieldsValue({ getFormFree().setFieldsValue({
customerId: customerIdP.value customerId: customerIdP.value,
customerName: customerIdPName.value
}) })
} else { } else {
console.log(customerIdP.value, customerIdPName.value)
getForm().setFieldsValue({ getForm().setFieldsValue({
customerId: customerIdP.value customerId: customerIdP.value,
customerName: customerIdPName.value
}) })
} }
} }
watch( watch(
@ -752,18 +753,20 @@ function addDetailed(type) {
amountUSD: item.amountUSD, amountUSD: item.amountUSD,
applicationId: item.id, applicationId: item.id,
currency: ite, currency: ite,
exchangeRate: 0 exchangeRate: 1
}) })
}) })
} }
if (type == 'rmb') { if (type == 'rmb') {
arr.forEach(ite => { arr.forEach(ite => {
if (ite == 'RMB') {
applications.value.push({ applications.value.push({
amountRMB: item.amountRMB, amountRMB: item.amountRMB,
applicationId: item.id, applicationId: item.id,
currency: ite, currency: ite,
exchangeRate: 0 exchangeRate: 1
}) })
}
}) })
} }
if (type == 'usd') { if (type == 'usd') {
@ -772,13 +775,14 @@ function addDetailed(type) {
amountUSD: item.amountUSD, amountUSD: item.amountUSD,
applicationId: item.id, applicationId: item.id,
currency: ite, currency: ite,
exchangeRate: 0 exchangeRate: 1
}) })
}) })
} }
} }
}) })
if (type != 'rmb') {
const currencySet = new Set(); const currencySet = new Set();
const arr = [] as any const arr = [] as any
applications.value.forEach(item => { applications.value.forEach(item => {
@ -822,11 +826,17 @@ function addDetailed(type) {
open.value = false open.value = false
exchangeFlag.value = false exchangeFlag.value = false
} }
} else {
emits('updateList', applications.value)
open.value = false
exchangeFlag.value = false
}
} }
const customerIdP = ref('') const customerIdP = ref('')
defineExpose({ init, customerIdP }) defineExpose({ init, customerIdP, customerIdPName })
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.total { .total {

@ -734,8 +734,9 @@ onMounted(() => {
} }
}) })
function handleInto() { function handleInto() {
applyInvoiceRef.value.init()
applyInvoiceRef.value.customerIdP = form.value.customerId applyInvoiceRef.value.customerIdP = form.value.customerId
applyInvoiceRef.value.customerIdPName = form.value.customerName
applyInvoiceRef.value.init()
} }
function handleSave() { function handleSave() {
const data = { const data = {
@ -858,8 +859,9 @@ function updateListFreeLeft(val,arrQuery) {
if (!route.query.id) { if (!route.query.id) {
const { fullPath } = route // const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router) tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => { setTimeout(() => {
go(`/invoiceIssueDetail?id=${res.data.id}&type=${route.query.type}`) go(`/invoiceIssueDetail?id=${res.data.id}&type=${type}`)
}, 50) }, 50)
} else { } else {
getDetail() getDetail()
@ -905,8 +907,9 @@ function handleUpdate(val) {
if (!route.query.id) { if (!route.query.id) {
const { fullPath } = route // const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router) tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => { setTimeout(() => {
go(`/invoiceIssueDetail?id=${res.data.id}&type=${route.query.type}`) go(`/invoiceIssueDetail?id=${res.data.id}&type=${type}`)
}, 50) }, 50)
} else { } else {
getDetail() getDetail()
@ -940,8 +943,9 @@ function updateListFree(val) {
if (!route.query.id) { if (!route.query.id) {
const { fullPath } = route // const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router) tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => { setTimeout(() => {
go(`/invoiceIssueDetail?id=${res.data.id}&type=${route.query.type}`) go(`/invoiceIssueDetail?id=${res.data.id}&type=${type}`)
}, 50) }, 50)
} else { } else {
getDetail() getDetail()
@ -1178,7 +1182,7 @@ const columns = [
const res = feeDict.value.length ? feeDict.value : (await GetInvoiceCodeList())?.data const res = feeDict.value.length ? feeDict.value : (await GetInvoiceCodeList())?.data
if (!feeDict.value.length) feeDict.value = res if (!feeDict.value.length) feeDict.value = res
const dict = res.map((res) => { const dict = res.map((res) => {
return res.displayName return res.name
}) })
process(dict) process(dict)
}, },

Loading…
Cancel
Save