|
|
@ -3,8 +3,8 @@
|
|
|
|
<a-modal width="1600px" @cancel="open = false" :visible="open" title="添加发票申请明细" :footer="null">
|
|
|
|
<a-modal width="1600px" @cancel="open = false" :visible="open" title="添加发票申请明细" :footer="null">
|
|
|
|
<div style="padding-bottom:5px ;">
|
|
|
|
<div style="padding-bottom:5px ;">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<BasicTable class="ds-table" :row-selection="{ onChange: onSelectChange }"
|
|
|
|
<BasicTable class="ds-table" @selection-change="onSelectChange" :rowClassName="rowClassName"
|
|
|
|
:rowClassName="rowClassName" @row-click="handleClick" @register="registerTable" @row-dbClick="(e) => {
|
|
|
|
@row-click="handleClick" @register="registerTable" @row-dbClick="(e) => {
|
|
|
|
GoDetailed(true, e)
|
|
|
|
GoDetailed(true, e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
">
|
|
|
|
">
|
|
|
@ -41,13 +41,6 @@
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div class="bold">申请开票明细</div>
|
|
|
|
<div class="bold">申请开票明细</div>
|
|
|
|
<div style="display: flex;">
|
|
|
|
<div style="display: flex;">
|
|
|
|
<div class="apply" :class="{ active: form.isRMB }">
|
|
|
|
|
|
|
|
<a-checkbox @change="handleChangeApply1"
|
|
|
|
|
|
|
|
:disabled="route.query.id ? true : false"
|
|
|
|
|
|
|
|
v-model:checked="form.isRMB">折算人民币申请</a-checkbox>
|
|
|
|
|
|
|
|
<span class="rmb" v-if="totalRmb != 0">{{ totalRmb }} RMB</span>
|
|
|
|
|
|
|
|
<span></span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="apply" :class="{ active: form.isYB }">
|
|
|
|
<div class="apply" :class="{ active: form.isYB }">
|
|
|
|
<a-checkbox :disabled="route.query.id ? true : false"
|
|
|
|
<a-checkbox :disabled="route.query.id ? true : false"
|
|
|
|
v-model:checked="form.isYB" @change="handleChangeApply">
|
|
|
|
v-model:checked="form.isYB" @change="handleChangeApply">
|
|
|
@ -58,6 +51,13 @@
|
|
|
|
item.currency }}</span>
|
|
|
|
item.currency }}</span>
|
|
|
|
</a-checkbox>
|
|
|
|
</a-checkbox>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="apply" :class="{ active: form.isRMB }">
|
|
|
|
|
|
|
|
<a-checkbox @change="handleChangeApply1"
|
|
|
|
|
|
|
|
:disabled="route.query.id ? true : false"
|
|
|
|
|
|
|
|
v-model:checked="form.isRMB">折算人民币申请</a-checkbox>
|
|
|
|
|
|
|
|
<span class="rmb" v-if="totalRmb != 0">{{ totalRmb }} RMB</span>
|
|
|
|
|
|
|
|
<span></span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<span class="bold">发票申请明细</span>
|
|
|
|
<span class="bold">发票申请明细</span>
|
|
|
@ -103,18 +103,16 @@
|
|
|
|
<span class="bold" style="margin-right: 10px;width:66px;display: inline-block">1{{ item.currencyTo
|
|
|
|
<span class="bold" style="margin-right: 10px;width:66px;display: inline-block">1{{ item.currencyTo
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
=</span>
|
|
|
|
=</span>
|
|
|
|
<a-input-number addon-after="RMB" :precision="4" size="small" :controls="false"
|
|
|
|
<a-input-number @change="changeRmb(1,index)" addon-after="RMB" :precision="4" size="small" :controls="false"
|
|
|
|
v-model:value="item.reverseRate" />
|
|
|
|
v-model:value="item.reverseRate" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<span class="bold" style="margin-right: 10px;width:66px;display: inline-block">1RMB =</span>
|
|
|
|
<span class="bold" style="margin-right: 10px;width:66px;display: inline-block">1RMB =</span>
|
|
|
|
<a-input-number :addon-after="item.currencyTo" :precision="4" size="small" :controls="false"
|
|
|
|
<a-input-number @change="changeRmb(2,index)" :addon-after="item.currencyTo" :precision="4" size="small" :controls="false"
|
|
|
|
v-model:value="item.rate" />
|
|
|
|
v-model:value="item.rate" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</a-modal>
|
|
|
|
</a-modal>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -231,6 +229,9 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge
|
|
|
|
labelWidth: 120,
|
|
|
|
labelWidth: 120,
|
|
|
|
schemas: detailSearchFormSchema,
|
|
|
|
schemas: detailSearchFormSchema,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
rowSelection: {//多选框
|
|
|
|
|
|
|
|
type: 'checkbox',
|
|
|
|
|
|
|
|
},
|
|
|
|
useSearchForm: true,
|
|
|
|
useSearchForm: true,
|
|
|
|
showIndexColumn: false,
|
|
|
|
showIndexColumn: false,
|
|
|
|
maxHeight: 450,
|
|
|
|
maxHeight: 450,
|
|
|
@ -267,14 +268,22 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
|
|
|
|
const exchangeFlag = ref(false)
|
|
|
|
const exchangeFlag = ref(false)
|
|
|
|
const loading = ref(false)
|
|
|
|
const loading = ref(false)
|
|
|
|
const form = ref({
|
|
|
|
const form = ref({
|
|
|
|
isYB: false,
|
|
|
|
isYB: true,
|
|
|
|
isRMB: true
|
|
|
|
isRMB: false
|
|
|
|
}) as any
|
|
|
|
}) as any
|
|
|
|
function handleChangeApply(e) {
|
|
|
|
function handleChangeApply(e) {
|
|
|
|
form.value.isRMB = !e.target.checked
|
|
|
|
form.value.isRMB = !e.target.checked
|
|
|
|
totalRmb.value = 0
|
|
|
|
totalRmb.value = 0
|
|
|
|
onSelectAmount()
|
|
|
|
onSelectAmount()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function changeRmb(type,index){
|
|
|
|
|
|
|
|
if(type==1){
|
|
|
|
|
|
|
|
exchangeData.value[index].rate = (1/exchangeData.value[index].reverseRate).toFixed(4)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(type==2){
|
|
|
|
|
|
|
|
exchangeData.value[index].reverseRate = (1/exchangeData.value[index].rate).toFixed(4)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
const exchangeData = ref({}) as any
|
|
|
|
const exchangeData = ref({}) as any
|
|
|
|
// 转换汇率 如果选择的费用明细里有外币 并且选择了人民币结算就弹出汇率
|
|
|
|
// 转换汇率 如果选择的费用明细里有外币 并且选择了人民币结算就弹出汇率
|
|
|
|
function handleChangeApply1(e) {
|
|
|
|
function handleChangeApply1(e) {
|
|
|
@ -393,9 +402,11 @@ function handleSureExhange() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const activeRow = ref(null)
|
|
|
|
const activeRow = ref(null)
|
|
|
|
//
|
|
|
|
//
|
|
|
|
function handleClick(record, index) {
|
|
|
|
function handleClick(record, index,type) {
|
|
|
|
setSelectedRowKeys([index])
|
|
|
|
if(type!='select'){
|
|
|
|
activeRow.value = index
|
|
|
|
setSelectedRowKeys([index])
|
|
|
|
|
|
|
|
activeRow.value = index
|
|
|
|
|
|
|
|
}
|
|
|
|
const queryDataStr = JSON.parse(queryData.value.queryCondition)
|
|
|
|
const queryDataStr = JSON.parse(queryData.value.queryCondition)
|
|
|
|
const arr = [] as any
|
|
|
|
const arr = [] as any
|
|
|
|
queryDataStr.forEach(item => {
|
|
|
|
queryDataStr.forEach(item => {
|
|
|
@ -443,7 +454,11 @@ function rowClassName(record, index) {
|
|
|
|
function init(data) {
|
|
|
|
function init(data) {
|
|
|
|
open.value = true
|
|
|
|
open.value = true
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
setProps({
|
|
|
|
|
|
|
|
rowSelection: {
|
|
|
|
|
|
|
|
onChange: onSelectAmount
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
})
|
|
|
|
setPropsFee({
|
|
|
|
setPropsFee({
|
|
|
|
rowSelection: {
|
|
|
|
rowSelection: {
|
|
|
|
onChange: onSelectAmount
|
|
|
|
onChange: onSelectAmount
|
|
|
@ -462,33 +477,21 @@ function init(data) {
|
|
|
|
form.value.isYB = true
|
|
|
|
form.value.isYB = true
|
|
|
|
form.value.isRMB = false
|
|
|
|
form.value.isRMB = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
watch(
|
|
|
|
|
|
|
|
() => getSelectRows(),
|
|
|
|
|
|
|
|
(data) => {
|
|
|
|
|
|
|
|
console.log(data)
|
|
|
|
|
|
|
|
onSelectChange(data)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{ immediate: false, deep: true }
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}, 500)
|
|
|
|
}, 500)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const rmbTotal = ref(0)
|
|
|
|
const rmbTotal = ref(0)
|
|
|
|
const usdTotal = ref(0)
|
|
|
|
const usdTotal = ref(0)
|
|
|
|
const otherTotal = ref(0)
|
|
|
|
const otherTotal = ref(0)
|
|
|
|
function onSelectChange(selectedRowKeys) {
|
|
|
|
function onSelectChange({ keys, rows }) {
|
|
|
|
const list = getRawDataSource()
|
|
|
|
|
|
|
|
rmbTotal.value = 0
|
|
|
|
rmbTotal.value = 0
|
|
|
|
usdTotal.value = 0
|
|
|
|
usdTotal.value = 0
|
|
|
|
otherTotal.value = 0
|
|
|
|
otherTotal.value = 0
|
|
|
|
list.forEach(item => {
|
|
|
|
rows.forEach(item => {
|
|
|
|
selectedRowKeys.forEach(ite => {
|
|
|
|
rmbTotal.value += Number(item.unBilledRMB)
|
|
|
|
if (item.id == ite.id) {
|
|
|
|
usdTotal.value += Number(item.unBilledUSD)
|
|
|
|
rmbTotal.value += Number(item.unBilledRMB)
|
|
|
|
otherTotal.value += Number(item.unBilledOther)
|
|
|
|
usdTotal.value += Number(item.unBilledUSD)
|
|
|
|
|
|
|
|
otherTotal.value += Number(item.unBilledOther)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
handleClick(rows[rows.length-1],rows.length,'select')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const emits = defineEmits(['updateList', 'addLeft'])
|
|
|
|
const emits = defineEmits(['updateList', 'addLeft'])
|
|
|
|
// 添加费用明细
|
|
|
|
// 添加费用明细
|
|
|
|