-
{{ label }}
+
{{ label }}
@@ -29,6 +29,14 @@ const props = defineProps({
type: Boolean,
default: true,
},
+ textLabel: {
+ type: Boolean,
+ default: false,
+ },
+ showLabel: {
+ type: Boolean,
+ default: true,
+ },
})
\ No newline at end of file
diff --git a/src/views/operation/invoiceIssue/detail/index.vue b/src/views/operation/invoiceIssue/detail/index.vue
index cb0cbc98..adf9de55 100644
--- a/src/views/operation/invoiceIssue/detail/index.vue
+++ b/src/views/operation/invoiceIssue/detail/index.vue
@@ -78,7 +78,7 @@
-
+
{{ form.currency }}
@@ -222,16 +222,60 @@
{{ taxUnitPriceTotal }}
-
-
-
- {{ form.note }}
-
-
-
-
-
+
+
备注
+
+
+
+
+ {{ form.customerAddressTel }}
+
+
+
+ {{ item.addressTel }}
+
+
+
+
+
+
+
+ {{ form.customerBankName }}
+
+
+
+ {{ item.bankName }}
+
+
+
+
+
+ {{ form.customerAccount }}
+
+
+
+ {{ item.account }}
+
+
+
+
+
+
+ {{ form.note }}
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
@@ -296,7 +351,8 @@
-
+
@@ -324,7 +380,7 @@ import { DownOutlined } from '@ant-design/icons-vue'
import {
GetInvoiceCodeList, GetUserListAll, DeleteInvoiceDetail,
GeneralInvoiceSave, GeneralInvoiceGet, FreeInvoiceSave,
- GeneralInvoiceGetList, GeneralInvoiceInitiate
+ GeneralInvoiceGetList, GeneralInvoiceInitiate, GetClientBankList
} from '../api'
import { useMessage } from '/@/hooks/web/useMessage'
import { useRoute, useRouter } from 'vue-router'
@@ -375,28 +431,10 @@ const detailForm = [
},
{
label: '系统客户',
- field: 'autualCustomerName1',
- component: 'ApiSelect',
- dynamicDisabled: false,
+ field: 'customerName',
+ component: 'Input',
+ dynamicDisabled: true,
colProps: { span: 12 },
- componentProps: () => {
- return {
- api: () => {
- return new Promise((resolve) => {
- GetControllerClientList().then((res) => {
- resolve(res)
- })
- })
- },
- immediate: false,
- labelField: 'shortName',
- valueField: 'shortName',
- resultField: 'data',
- filterOption: (input: string, option: any) => {
- return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
- }
- },
},
{
label: '代开客户',
@@ -463,16 +501,30 @@ const detailForm = [
span: 24,
},
},
+ {
+ field: 'cellPhoneNOFlag',
+ component: 'Input',
+ show: false,
+ colProps: { span: 24 },
+ },
+ {
+ field: 'emailFlag',
+ show: false,
+ component: 'Input',
+ colProps: { span: 24 },
+ },
{
field: 'email',
label: '邮箱',
- component: 'InputNumber',
+ component: 'Input',
+ slot: 'email',
colProps: { span: 24 },
},
{
field: 'cellPhoneNO',
label: '手机',
- component: 'InputNumber',
+ component: 'Input',
+ slot: 'cellPhoneNO',
colProps: { span: 24 },
},
{
@@ -583,6 +635,22 @@ const applyInvoiceRef = ref(null) as any
function open() {
applyInvoiceRef.value.init()
}
+function handleSelectAccount(val) {
+ accountList.value.forEach(item => {
+ if (item.bankName == val) {
+ form.value.customerAddressTel = ''
+ invoiceHeadersList.value = item.invoiceHeaders
+ }
+ })
+}
+function handleSelectAccount1(val) {
+ accountList.value.forEach(item => {
+ if (item.account == val) {
+ form.value.customerAddressTel = ''
+ invoiceHeadersList.value = item.invoiceHeaders
+ }
+ })
+}
function handleIssue() {
const data = {
ids: [route.query.id]
@@ -611,9 +679,7 @@ const form = ref({
const currencyList = ref([]) as any
const customerList = ref([]) as any
onMounted(() => {
- GetFeeCurrencySelectList().then(res => {
- currencyList.value = res.data
- })
+
GetClientListByCode().then(res => {
customerList.value = res.data
})
@@ -639,16 +705,37 @@ function handleSave() {
},
invoiceDetails: list.value,
}
+ data.invoice.pushModeValues = []
+ if (data.invoice.emailFlag) {
+ data.invoice.pushModeValues.push(1)
+ }
+ if (data.invoice.cellPhoneNOFlag) {
+ data.invoice.pushModeValues.push(2)
+ }
loading.value = true
- GeneralInvoiceSave(data).then(res => {
- if (res.succeeded) {
- getDetail()
- createMessage.success('保存成功')
- }
- loading.value = false
- }).catch(() => {
- loading.value = false
- })
+ if (route.query.type == 'apply') {
+ GeneralInvoiceSave(data).then(res => {
+ if (res.succeeded) {
+ getDetail()
+ createMessage.success('保存成功')
+ }
+ loading.value = false
+ }).catch(() => {
+ loading.value = false
+ })
+ }
+ if (route.query.type == 'free') {
+ FreeInvoiceSave(data).then(res => {
+ if (res.succeeded) {
+ getDetail()
+ createMessage.success('保存成功')
+ }
+ loading.value = false
+ }).catch(() => {
+ loading.value = false
+ })
+ }
+
}
function getDetail() {
loading.value = true
@@ -662,6 +749,22 @@ function getDetail() {
} else {
res.data.isSettledName = '否'
}
+ if (res.data.invoiceNO) {
+ res.data.status = '已开票'
+ } else {
+ res.data.status = '未开票'
+ }
+ res.data.emailFlag = false
+ res.data.cellPhoneNOFlag = false
+ res.data.pushModeValues.forEach(item => {
+ if (item == 1) {
+ res.data.emailFlag = true
+ }
+ if (item == 2) {
+ res.data.cellPhoneNOFlag = true
+ }
+ })
+ getCustomerInfo(res.data.customerId)
setTableData(res.data.applications)
setFieldsValue(res.data)
}
@@ -676,7 +779,7 @@ function openFile() {
}
const router = useRouter()
const go = useGo()
-function updateListFreeLeft(val){
+function updateListFreeLeft(val) {
const data = {
invoice: {
...form.value,
@@ -699,7 +802,7 @@ function updateListFreeLeft(val){
}
}
loading.value = false
- }).catch(()=>{
+ }).catch(() => {
loading.value = false
})
}
@@ -727,7 +830,7 @@ function handleUpdate(val) {
}
}
loading.value = false
- }).catch(()=>{
+ }).catch(() => {
loading.value = false
})
}
@@ -760,7 +863,7 @@ function updateListFree(val) {
}
}
loading.value = false
- }).catch(()=>{
+ }).catch(() => {
loading.value = false
})
}
@@ -899,6 +1002,38 @@ function handleSearchUser(val) {
UserList.value = res.data
})
}
+const invoiceHeadersList = ref([]) as any
+const accountList = ref([]) as any
+function getCustomerInfo(id) {
+ const queryStr = [
+ {
+ FieldName: 'ClientId',
+ FieldValue: id,
+ ConditionalType: '0',
+ },
+ ]
+ const data = {
+ pageCondition: {
+ pageIndex: 1,
+ pageSize: 20,
+ sortConditions: [],
+ },
+ queryCondition: JSON.stringify(queryStr),
+ }
+ accountList.value = []
+ GetClientBankList(data).then((res) => {
+ if (form.value.customerAccount) {
+ res.data.forEach((item) => {
+ if (item.account == form.value.customerAccount) {
+ invoiceHeadersList.value = item.invoiceHeaders
+ }
+ if (item.currency == 'RMB') {
+ accountList.value.push(item)
+ }
+ })
+ }
+ })
+}
function onClick({ key }) {
form.value.categoryCode = key
CategoryData.forEach((item) => {
@@ -937,7 +1072,6 @@ const allCheck = ref(false)
// 部分勾选
const someCheck = ref(false)
import { feeUnitDict } from '/@/hooks/dict/index'
-import { t } from 'vxe-table'
const unitDict = ref([]) as any
// 定义表格所有列
const columns = [
@@ -1236,6 +1370,16 @@ watchEffect(() => {
}
}
+.label {
+ margin-right: 5px;
+ font-weight: 400;
+ color: rgba(158, 83, 9, 1);
+ flex-shrink: 1;
+ display: inline-block;
+ font-size: 12px;
+ min-width: 27px;
+}
+
.SvgImg {
width: 16px;
cursor: pointer;