+
@@ -167,8 +167,8 @@ import { emit } from 'process'
function updateList(val, type) {
emits('updateListSave', val, type)
}
-function addLeft(val,data,exchang,type) {
- emits('addLeftSave', val,data,exchang,type)
+function addLeft(val, data, exchang, type) {
+ emits('addLeftSave', val, data, exchang, type)
}
const dsFile = ref('')
const route = useRoute()
@@ -191,6 +191,7 @@ const row = {
quantity: 1,
unit: '',
specification: '',
+ applicationId: route.query.id ? route.query.id : 0,
}
// 表格绑定数据
const list = ref([]) as any
@@ -200,6 +201,7 @@ const allCheck = ref(false)
// 部分勾选
const someCheck = ref(false)
const unitDict = ref([]) as any
+const feeDataList = ref([])
// 定义表格所有列
const columns = [
{
@@ -219,6 +221,7 @@ const columns = [
source: async (query, process) => {
const res = feeDict.value.length ? feeDict.value : (await GetInvoiceCodeList())?.data
if (!feeDict.value.length) feeDict.value = res
+ feeDataList.value = res
const dict = res.map((res) => {
return res.displayName
})
@@ -300,8 +303,7 @@ const columns = [
]
// 表格配置项
const settings = {
- width: '100%',
- heigth: 300,
+ height: '300',
autoWrapRow: true,
autoWrapCol: true,
// 每行的高度
@@ -375,6 +377,25 @@ const settings = {
(list.value[index].amount || 0) - (list.value[index].noTaxAmount || 0),
).toFixed(2)
}
+ if (changes[0][1] === 'name') {
+ feeDataList.value.forEach(item => {
+ if (item.displayName == list.value[index].name) {
+ list.value[index].taxRate = item.taxRate
+ // 不含税单价
+ list.value[index].unitPrice = Number(
+ (list.value[index].taxUnitPrice || 0) / ((list.value[index].taxRate || 0) / 100 + 1),
+ ).toFixed(2)
+ // 不含税金额
+ list.value[index].noTaxAmount = Number(
+ (list.value[index].unitPrice || 0) * (list.value[index].quantity || 0),
+ ).toFixed(2)
+ // 税额
+ list.value[index].taxAmount = Number(
+ (list.value[index].amount || 0) - (list.value[index].noTaxAmount || 0),
+ ).toFixed(2)
+ }
+ })
+ }
}
},
}
@@ -666,3 +687,20 @@ defineExpose({ list, dataSource, init, changeCust, open })
margin-bottom: 2px;
}
+
diff --git a/src/views/operation/invoiceIssue/detail/index.vue b/src/views/operation/invoiceIssue/detail/index.vue
index adf9de55..5b1d7e3e 100644
--- a/src/views/operation/invoiceIssue/detail/index.vue
+++ b/src/views/operation/invoiceIssue/detail/index.vue
@@ -783,7 +783,8 @@ function updateListFreeLeft(val) {
const data = {
invoice: {
...form.value,
- ...getFieldsValue()
+ ...getFieldsValue(),
+ invoiceDetails:list.value
},
bizList: val,
}
@@ -810,9 +811,9 @@ function handleUpdate(val) {
const data = {
invoice: {
...form.value,
- ...getFieldsValue()
+ ...getFieldsValue(),
+ invoiceDetails:list.value
},
- invoiceDetails: list.value,
applications: val,
}
loading.value = true
@@ -844,7 +845,8 @@ function updateListFree(val) {
const data = {
invoice: {
...form.value,
- ...getFieldsValue()
+ ...getFieldsValue(),
+ invoiceDetails:list.value
},
details: val,
}
@@ -1469,6 +1471,11 @@ watchEffect(() => {
width: 39%;
margin-left: 1%;
}
+.line {
+ font-size: 12px;
+ border-bottom: 1px solid rgba(158, 83, 9, 1);
+ padding: 5px 0;
+}
\ No newline at end of file