Merge branch 'zth' into dev

feature-JimuReport-1106-yjl
张同海 1 month ago
commit 7ff7c1b661

@ -100,7 +100,7 @@ enum Api {
// 获取往来单位银行信息下拉
GetClientBank = '/mainApi/ClientCommon/GetClientBank',
// 根据用户列导出Excel文件流 (Auth)
ExportExcelByColumn = '/mainApi/Excel/ExportExcelByColumn',
ExportExcelByColumn = '/mainApi/Excel/ExportExcelStreamByColumn',
}
// 所有往来单位下拉数据
export function GetAllClientList(params) {
@ -543,6 +543,7 @@ export function ExportExcelByColumn(data: LoginParams) {
url: Api.ExportExcelByColumn,
method: 'post',
data,
responseType: 'arraybuffer',
})
}

@ -23,10 +23,10 @@
从账单删除
</a-button>
</a-popconfirm>
<!-- <a-button type="link" class="pl0" @click="derivedExcel">
<a-button type="link" class="pl0" @click="derivedExcel">
<span class="iconfont icon-Excel"></span>
导出Excel
</a-button> -->
</a-button>
</div>
<div style="position: relative">
<input
@ -660,29 +660,6 @@
},
}
function derivedExcel() {
// let ApiData = {
// columnSets: [
// {
// title: '',
// enTitle: 'Name',
// dataIndex: 'USERNAME',
// visible: true,
// },
// {
// title: '',
// enTitle: 'CLASSNAME',
// dataIndex: 'CLASSNAME',
// visible: true,
// },
// {
// title: '',
// enTitle: 'CHENGJI',
// dataIndex: 'CHENGJI',
// visible: true,
// },
// ],
// jsonDataStr: '[{"USERNAME":"","CLASSNAME":"","CHENGJI":"123"}]',
// }
let ApiData: any = {
columnSets: [],
jsonDataStr: [],
@ -715,6 +692,17 @@
ApiData.jsonDataStr = JSON.stringify(ApiData.jsonDataStr)
ExportExcelByColumn(ApiData).then((res) => {
console.log(res)
const xlsUrl = window.URL.createObjectURL(
new Blob([res], {
type: 'application/vnd.ms-excel;charset=utf-8',
}),
)
const fname = getFieldsValue().billno
const link = document.createElement('a')
link.href = xlsUrl
link.setAttribute('download', fname)
document.body.appendChild(link)
link.click()
})
}
function FnClickDel() {

@ -788,7 +788,7 @@
data: 'ctnValue_SellPrice',
type: 'numeric',
format: '0',
readOnly: true,
readOnly: false,
},
{
title: '提箱港口',

@ -42,7 +42,8 @@
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema } from './columns'
import { ApiEdit, ApiGet } from './api'
import { ApiEdit, ApiBulkEdit, ApiGet } from './api'
import { GetUserList } from '/@/api/common'
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
@ -83,11 +84,24 @@
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await ApiEdit(values)
console.log(res)
let res: any = null
if (values.id) {
res = await ApiEdit(values)
} else {
const Usedata = await GetUserList()
let ApiData: any = []
console.log(values)
values.userId.forEach((item, index) => {
let userName = ''
Usedata.data.forEach((e) => {
if (e.value == item) {
userName = e.label
}
})
ApiData[index] = { ...values, userId: item, userName }
})
res = await ApiBulkEdit(ApiData)
}
if (res.succeeded) {
createMessage.success(res.message)
emit('success')

@ -6,6 +6,7 @@ enum Api {
Audit = '/mainApi/ClientStakeholder/Audit',
Get = '/mainApi/ClientStakeholder/Get',
edit = '/mainApi/ClientStakeholder/Edit',
bulkEdit = '/mainApi/ClientStakeholder/BulkEdit',
Del = '/mainApi/ClientStakeholder/Delete',
}
@ -41,6 +42,15 @@ export function ApiEdit(data) {
data,
})
}
// 【批量】创建/更新客户干系人 (Auth)
export function ApiBulkEdit(data) {
return request<DataResult>({
url: Api.bulkEdit,
method: 'post',
data,
})
}
// 删除干系人 (Auth)
export function ApiDel(data) {
return request<DataResult>({

@ -80,7 +80,6 @@ export const formSchema: FormSchema[] = [
field: 'userId',
component: 'ApiSelect',
required: false,
defaultValue: null,
dynamicDisabled: false,
colProps: { span: 24 },
componentProps: ({ formModel }) => {
@ -89,6 +88,9 @@ export const formSchema: FormSchema[] = [
labelField: 'label',
valueField: 'value',
resultField: 'data',
allowClear: true,
mode: formModel.id ? '' : 'multiple',
class: formModel.id ? '' : 'NoLimitHeight',
getPopupContainer: () => document.body,
onChange: (e, obj) => {
if (e && obj) {

@ -194,7 +194,7 @@ export const EditformSchema: FormSchema[] = [
field: 'registeredCapital',
label: '注册资金',
component: 'DEdit',
defaultValue: '',
defaultValue: 0,
colProps: { span: 4 },
componentProps: (e) => {
return {

@ -308,6 +308,7 @@
IsAvailable,
Create,
} from './api'
import { getUser } from '/@/api/system/user'
import { ApiAudit } from '/@/views/baseinfo/infoclientAudit/api'
import { ApiClientStakeholderAudit } from '/@/views/baseinfo/infoclient/ClientStakeholder/api'
@ -407,6 +408,8 @@
ChangeArrclientTag(false)
})
function ChangeArrclientTag(type) {
console.log(type, 11111111111111)
//
const ArrclientTagList = [
'isController',
@ -427,7 +430,7 @@
field: 'ArrclientTag',
component: 'ApiSelect',
colProps: { span: 12 },
defaultValue: ['isController'],
defaultValue: [],
componentProps: () => {
return {
api: () => {
@ -495,7 +498,7 @@
field: 'ArrclientTag',
component: 'ApiSelect',
colProps: { span: 12 },
defaultValue: ['isController'],
defaultValue: [],
componentProps: ({ formModel }) => {
return {
api: () => {
@ -870,10 +873,60 @@
IsAvailableDisabled.value = true
notification.success({ message: '校验成功', duration: 3 })
})
.catch((err) => {
.catch(async (err) => {
const clientRes = await getCodeGoodsTypeInfo({ id: unref(rowId) })
let clientTagData: any = ''
if (clientRes.data.clientTag) {
values.clientTag = {}
let ClientTag = await getDictOption('infoclient-ArrclientTag')
Object.keys(clientRes.data.clientTag).forEach((item, index) => {
ClientTag.forEach((e) => {
if (item == e.value && clientRes.data.clientTag[item]) {
clientTagData = clientTagData == '' ? e.name : `${clientTagData},${e.name}`
}
})
})
}
let SaleData: any = ''
if (clientRes.data.saleId) {
const UserRes = await getUser({ id: clientRes.data.saleId })
SaleData = h('div', { class: 'UserRes' }, [
h(
'span',
{ style: { width: '50%', display: 'inline-block' } },
`销售名称:${UserRes.data.userName ? UserRes.data.userName : '-'} `,
),
h(
'span',
{ style: { width: '50%', display: 'inline-block' } },
` 英文名称:${UserRes.data.userEnName ? UserRes.data.userEnName : '-'}`,
),
h(
'span',
{ style: { width: '50%', display: 'inline-block' } },
`联系方式:${UserRes.data.officePhone ? UserRes.data.officePhone : '-'} `,
),
h(
'span',
{ style: { width: '50%', display: 'inline-block' } },
`QQ${UserRes.data.QQ ? UserRes.data.QQ : '-'}`,
),
h(
'span',
{ style: { width: '50%', display: 'inline-block' } },
`邮箱:${UserRes.data.email ? UserRes.data.email : '-'}`,
),
])
}
Modal.confirm({
title: '客户已存在',
content: '是否申请共享此客户?',
content: h('div', {}, [
h('p', '是否申请共享此客户?'),
h('p', `客户属性:${clientTagData ? clientTagData : '-'}`),
SaleData,
]),
class: 'ds-modal-small',
okText: '申请共享',
cancelText: '取消',
@ -881,7 +934,6 @@
Create({ clientId: err.clientId }).then((res) => {
notification.success({ message: '已发起申请!', duration: 3 })
})
// notification.success({ message: '', duration: 3 })
},
onCancel() {},
})
@ -1047,6 +1099,12 @@
}
</script>
<style lang="less" scoped>
.UserRes {
background: red;
p {
width: 50%;
}
}
.icon-fuzhi11 {
position: absolute;
top: -18px;

@ -645,12 +645,26 @@ export const formSchema: FormSchema[] = [
label: '注册资金',
component: 'InputNumber',
colProps: { span: 4 },
defaultValue: 0,
componentProps: {
min: '0',
step: '0.01',
stringMode: true,
},
},
{
field: 'registrationTime',
label: '注册时间',
component: 'DatePicker',
colProps: { span: 4 },
componentProps: () => {
return {
showTime: true,
allowClear: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
}
},
},
{
field: 'Divider1',

@ -167,9 +167,12 @@
const feeField = ref()
async function handleSave(exit) {
try {
const feeList = feeField.value.validate()
const feeList = JSON.parse(JSON.stringify(feeField.value.validate()))
let type = true
feeList.forEach((item) => {
if (item.exchangeRate == '【根据设置汇率生成】') {
item.exchangeRate = ''
}
if (!item.taxUnitPrice) {
type = false
}

@ -188,7 +188,7 @@
//
let unitDict = []
//
const list = ref([])
const list = ref<any>([])
//
const feeDict = ref([])
//
@ -228,7 +228,11 @@
const loading = ref(false)
//
const addRow = () => {
list.value.push({})
list.value.push({
taxRate: 0,
accTaxRate: 0,
tax: 0,
})
const hot = hotTb.value.hotInstance
nextTick(() => {
hot.selectCell(list.value.length - 1, 1)
@ -347,7 +351,7 @@
},
{
title: '汇率',
width: 120,
width: 140,
data: 'exchangeRate',
type: 'numeric',
},
@ -449,11 +453,24 @@
list.value[res[0]]['unit'] = dict['defaultUnit']
list.value[res[0]]['unitText'] = dict['defaultUnitName']
list.value[res[0]]['currency'] = dict['defaultCurrency']
if (dict['defaultCurrency'] == 'RMB') {
list.value[res[0]]['exchangeRate'] = 1
} else {
list.value[res[0]]['exchangeRate'] = '【根据设置汇率生成】'
}
list.value[res[0]]['taxRate'] = dict['taxRate']
list.value[res[0]]['isInvoice'] = dict['isInvoice']
list.value[res[0]]['isAdvancedPay'] = dict['isAdvancedPay']
}
})
//
if (changes[0][1] === 'currency') {
if (changes[0][3] == 'RMB') {
list.value[changes[0][0]]['exchangeRate'] = 1
} else {
list.value[changes[0][0]]['exchangeRate'] = '【根据设置汇率生成】'
}
}
//
if (changes[0][1] === 'unitText') {
const item = unitDict.value.filter((item) => {

Loading…
Cancel
Save