sunzehua 3 months ago
commit d57ef7c165

@ -40,11 +40,8 @@
ref, ref,
watch, watch,
watchEffect, watchEffect,
computed,
unref,
defineComponent, defineComponent,
onMounted, onMounted,
reactive,
nextTick, nextTick,
provide, provide,
} from 'vue' } from 'vue'
@ -62,6 +59,8 @@
// //
import { GetClientListByCode } from '/@/api/common' import { GetClientListByCode } from '/@/api/common'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
//
import { getDictOption } from '/@/utils/dictUtil'
const { createMessage } = useMessage() const { createMessage } = useMessage()
defineComponent({ defineComponent({
HotTable, HotTable,
@ -100,12 +99,22 @@
const feeDict = ref([]) const feeDict = ref([])
// //
const unitDict = ref([]) const unitDict = ref([])
getDictOption('fee_unit').then(res => {
let b = []
if (props.details.ctnInfo && props.details.ctnInfo.length) {
const a = props.details.ctnInfo.filter(item => {
return item.ctn
})
b = a.map(item => {
return { label: item.ctn, value: item.ctn, name: item.ctnCode }
})
}
unitDict.value = [...b, ...res]
})
// //
const currencyDict = ref([]) const currencyDict = ref([])
// //
const companyDict = ref([]) const companyDict = ref([])
//
import { getDictOption } from '/@/utils/dictUtil'
// //
const hotTb = ref(null) const hotTb = ref(null)
// loading // loading
@ -237,13 +246,6 @@
return item.value + '-' + item.name return item.value + '-' + item.name
}) })
process(dict) process(dict)
} else {
const results = await feeUnitDict()
unitDict.value = results
const dict = results.map((item) => {
return item.value + '-' + item.name
})
process(dict)
} }
}, },
}, },
@ -468,29 +470,63 @@
// //
if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') { if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') {
let dict = {} let dict = {}
changes.forEach((res) => { if (changes.length == 1) {
// //
if (res[1] === 'feeName') { if (changes[0][1] === 'feeName') {
// ()
// //
const item = feeDict.value.filter((item) => { const item = feeDict.value.filter((item) => {
return changes[0][3].includes(item.name) return changes[0][3].includes(item.name)
}) })
if (item) dict = item[0] if (item) dict = item[0]
list.value[res[0]]['feeName'] = changes[0][3].split('-')[1] list.value[changes[0][0]]['feeName'] = changes[0][3].split('-')[1]
list.value[res[0]]['feeEnName'] = dict['enName'] list.value[changes[0][0]]['feeEnName'] = dict['enName']
list.value[res[0]]['currency'] = dict['defaultCurrency'] list.value[changes[0][0]]['currency'] = dict['defaultCurrency']
list.value[res[0]]['unitText'] = dict['defaultUnitName'] list.value[changes[0][0]]['customerTypeText'] = dict['defaultDebitName']
list.value[res[0]]['unit'] = dict['defaultUnit'] list.value[changes[0][0]]['customerType'] = dict['defaultDebit']
list.value[res[0]]['customerTypeText'] = dict['defaultDebitName'] list.value[changes[0][0]]['isOpen'] = dict['isOpen']
list.value[res[0]]['customerType'] = dict['defaultDebit'] list.value[changes[0][0]]['isAdvancedPay'] = dict['isAdvancedPay']
list.value[res[0]]['isOpen'] = dict['isOpen'] list.value[changes[0][0]]['isInvoice'] = dict['isInvoice']
list.value[res[0]]['isAdvancedPay'] = dict['isAdvancedPay'] list.value[changes[0][0]]['feeFrt'] = dict['feeFrt']
list.value[res[0]]['isInvoice'] = dict['isInvoice'] list.value[changes[0][0]]['feeCode'] = dict['code']
list.value[res[0]]['feeFrt'] = dict['feeFrt'] list.value[changes[0][0]]['taxRate'] = dict['taxRate']
list.value[res[0]]['feeCode'] = dict['code'] //
list.value[res[0]]['taxRate'] = dict['taxRate'] if (dict.defaultUnit == 'XX') {
if (props?.details?.ctnInfo && props?.details?.ctnInfo?.length) {
list.value[changes[0][0]]['unitText'] = props.details.ctnInfo[0].ctn
list.value[changes[0][0]]['unit'] = props.details.ctnInfo[0].ctnCode
list.value[changes[0][0]]['quantity'] = props.details.ctnInfo[0].ctnNum
}
} else {
list.value[changes[0][0]]['unitText'] = dict['defaultUnitName']
list.value[changes[0][0]]['unit'] = dict['defaultUnit']
//
const uItem = unitDict.value.filter((item) => {
return list.value[changes[0][0]]['unitText'].includes(item.name)
})
if (uItem) dict = uItem[0]
if (dict && dict?.value) {
GetUnitSelectInfo({ code: dict?.value, businessId: props.id, businessType: props.type }).then(res => {
list.value[changes[0][0]]['quantity'] = res.data.quantity
})
}
}
//
getDictOption('djy_cust_prop').then((res) => {
const item = res.filter((item) => {
return list.value[changes[0][0]]['customerTypeText'].includes(item.name)
})
if (item) dict = item[0]
if (dict.value) {
//
GetClientSelectInfoByCode({ code: dict?.value, businessId: props.id, businessType: props.type }).then(res => {
list.value[changes[0][0]]['customerCode'] = res.data.clientId
list.value[changes[0][0]]['customerName'] = res.data.clientName
})
}
})
} }
}) }
// //
if (changes[0][1] === 'feeEnName') { if (changes[0][1] === 'feeEnName') {
} }
@ -513,11 +549,12 @@
list.value[changes[0][0]]['customerType'] = dict?.value list.value[changes[0][0]]['customerType'] = dict?.value
list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[1] list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[1]
// //
console.log(props.details) if (dict && dict.value) {
GetClientSelectInfoByCode({ code: dict?.value, businessId: props.id, businessType: props.type }).then(res => { GetClientSelectInfoByCode({ code: dict?.value, businessId: props.id, businessType: props.type }).then(res => {
list.value[changes[0][0]]['customerCode'] = res.data.clientId list.value[changes[0][0]]['customerCode'] = res.data.clientId
list.value[changes[0][0]]['customerName'] = res.data.clientName list.value[changes[0][0]]['customerName'] = res.data.clientName
}) })
}
}) })
} }
// //
@ -700,7 +737,7 @@
}) })
} }
// //
const selectInsert = (v) => { const selectInsert = async (v) => {
const selectData = JSON.parse(JSON.stringify(list.value)) const selectData = JSON.parse(JSON.stringify(list.value))
// //
if (v === 1) { if (v === 1) {
@ -720,6 +757,36 @@
const res = selectData.filter((item) => { const res = selectData.filter((item) => {
return item.selected return item.selected
}) })
//
const feeList = feeDict.value.length ? feeDict.value : (await GetFeeCodeSelectList())?.data
res.forEach(data => {
const item = feeList.filter((item) => {
return item.name == data.feeName
})
//
if (item && item.length) {
//
if (data.customerTypeText == item[0].defaultCreditName) {
data.customerTypeText = item[0].defaultDebitName
data.customerType = item[0].defaultDebit
}
//
if (data.customerTypeText == item[0].defaultDebitName) {
data.customerTypeText = item[0].defaultCreditName
data.customerType = item[0].defaultCredit
}
//
if (data && data.customerType) {
GetClientSelectInfoByCode({ code: data.customerType, businessId: props.id, businessType: props.type }).then(res => {
data.customerCode = res.data.clientId
data.customerName = res.data.clientName
})
} else {
data.customerCode = ''
data.customerName = ''
}
}
})
emits('broInsert', res) emits('broInsert', res)
} else { } else {
// //
@ -734,7 +801,6 @@
item.feeType = 1 item.feeType = 1
} }
}) })
console.log(selectData)
emits('broInsert', selectData) emits('broInsert', selectData)
} }
} }

@ -11,6 +11,10 @@ import { getDictOption } from '/@/utils/dictUtil'
import { GetFeeCurrencySelectList } from '/@/api/common' import { GetFeeCurrencySelectList } from '/@/api/common'
// 引入计费标准字典 // 引入计费标准字典
import { feeUnitDict } from '/@/hooks/dict/index' import { feeUnitDict } from '/@/hooks/dict/index'
const unitDict = ref([])
getDictOption('fee_unit').then(res => {
unitDict.value = res
})
// 客户类别下拉框数据 // 客户类别下拉框数据
const customTypeDict = ref([]) const customTypeDict = ref([])
// 付费方式字典 // 付费方式字典
@ -214,14 +218,17 @@ export const formSchema: FormSchema[] = [
field: 'defaultUnit', field: 'defaultUnit',
label: '默认计费标准', label: '默认计费标准',
defaultValue: '', defaultValue: '',
component: 'ApiSelect', component: 'Select',
colProps: { span: 8 }, colProps: { span: 8 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: feeUnitDict, options: unitDict,
labelField: 'name', allowClear: true,
valueField: 'value', showSearch: true,
resultField: 'data', filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
getPopupContainer: () => document.body,
onChange: (v, obj) => { onChange: (v, obj) => {
formModel.defaultUnitName = obj?.label || '' formModel.defaultUnitName = obj?.label || ''
} }
@ -252,6 +259,7 @@ export const formSchema: FormSchema[] = [
labelField: 'label', labelField: 'label',
valueField: 'value', valueField: 'value',
resultField: 'data', resultField: 'data',
getPopupContainer: () => document.body,
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },

@ -640,11 +640,12 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
{ {
field: 'etd', field: 'etd',
label: '开船日期', label: '开船日期',
labelSlot: 'etd',
component: 'DatePicker', component: 'DatePicker',
rules: [{ required: true, message: '请选择开船日期' }], rules: [{ required: true, message: '请选择开船日期' }],
dynamicDisabled: false, dynamicDisabled: false,
defaultValue: undefined, defaultValue: undefined,
colProps: { span: 5 }, colProps: { className: 'edt-picker ant-col ant-col-5' },
componentProps: { componentProps: {
allowClear: true, allowClear: true,
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
@ -680,10 +681,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
field: 'atd', field: 'atd',
label: '计费日(PRICEDATE)', label: '计费日(PRICEDATE)',
component: 'DatePicker', component: 'DatePicker',
labelSlot: 'atd',
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
// defaultValue: '', // defaultValue: '',
colProps: { span: 5 }, colProps: { className: 'atd-picker ant-col ant-col-5' },
componentProps: { componentProps: {
allowClear: true, allowClear: true,
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
@ -1995,7 +1997,7 @@ export const cargoInfoFormSchema4: FormSchema[] = [
slot: 'ctnPriceInfo', slot: 'ctnPriceInfo',
component: 'Input', component: 'Input',
required: false, required: false,
defaultValue: [{}], defaultValue: [{ guidePrice: 0, floorPrice: 0 }],
colProps: { span: 24 }, colProps: { span: 24 },
}, },
{ {

@ -74,7 +74,7 @@
<a-input-number v-model:value="item.floorPrice" size="small" :min="0" :max="999999999" placeholder="底价" /> <a-input-number v-model:value="item.floorPrice" size="small" :min="0" :max="999999999" placeholder="底价" />
</div> </div>
<span v-show="model.ctnPriceInfo.length > 1" @click="deleteCtnPrice(model.ctnPriceInfo, index, item)" class="iconfont icon-del"></span> <span v-show="model.ctnPriceInfo.length > 1" @click="deleteCtnPrice(model.ctnPriceInfo, index, item)" class="iconfont icon-del"></span>
<span v-show="model.ctnPriceInfo.length != 3" @click="model.ctnPriceInfo.push({})" class="iconfont icon-zengjiatianjiajiajian"></span> <span v-show="model.ctnPriceInfo.length != 3" @click="model.ctnPriceInfo.push({ guidePrice: 0, floorPrice: 0 })" class="iconfont icon-zengjiatianjiajiajian"></span>
</div> </div>
</div> </div>
</a-form-item-rest> </a-form-item-rest>

@ -72,7 +72,16 @@
<div style="position: relative;"> <div style="position: relative;">
<h4>运输信息</h4> <h4>运输信息</h4>
</div> </div>
<BasicForm class="auto" @register="registerFormR" @linkageForm="linkageForm" /> <BasicForm class="auto" @register="registerFormR" @linkageForm="linkageForm">
<!-- 开船日期 -->
<template #etd="{ model }">
<span class="week-day">{{ getWeekday(model.etd) }}</span>
</template>
<!-- 计费日 -->
<template #atd="{ model }">
<span class="week-day">{{ getWeekday(model.atd) }}</span>
</template>
</BasicForm>
</div> </div>
</div> </div>
</template> </template>
@ -121,6 +130,14 @@
console.log(notifyPartyList.value) console.log(notifyPartyList.value)
}) })
} }
//
const getWeekday = (dateStr) => {
if (!dateStr) return
const weekDays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
const date = new Date(dateStr)
const weekday = date.getDay()
return weekDays[weekday]
}
// //
const openContactModal = () => { const openContactModal = () => {
twoFlag.value = true twoFlag.value = true
@ -295,6 +312,28 @@
height: 102px; height: 102px;
} }
} }
.edt-picker {
.ant-form-item-label {
overflow: visible;
}
.week-day {
position: relative;
top: 23.5px;
left: 12px;
z-index: 10;
}
}
.atd-picker {
.ant-form-item-label {
overflow: visible;
}
.week-day {
position: relative;
top: 23.5px;
left: -28px;
z-index: 10;
}
}
.ant-divider-horizontal { .ant-divider-horizontal {
margin: 8px 0 8px!important; margin: 8px 0 8px!important;
background: #E8EBED; background: #E8EBED;

@ -81,11 +81,11 @@
/> />
<span class="s-txt" :class="{ 's-active': model.isDispatcher }">{{ model.isDispatcher ? '是' : '否'}}</span> <span class="s-txt" :class="{ 's-active': model.isDispatcher }">{{ model.isDispatcher ? '是' : '否'}}</span>
</template> </template>
<template #isLimitClient="{ model }"> <template #isUseSystem="{ model }">
<a-switch <a-switch
v-model:checked="model.isLimitClient" v-model:checked="model.isUseSystem"
/> />
<span class="s-txt" :class="{ 's-active': model.isLimitClient }">{{ model.isLimitClient ? '是' : '否'}}</span> <span class="s-txt" :class="{ 's-active': model.isUseSystem }">{{ model.isUseSystem ? '是' : '否'}}</span>
</template> </template>
<template #signatureUrl> <template #signatureUrl>
<DsFile :maxCount="1" ref="dsFile" :id="rowId" :show="false" height="300"> <DsFile :maxCount="1" ref="dsFile" :id="rowId" :show="false" height="300">

@ -65,6 +65,16 @@ export const columns: BasicColumn[] = [
return text return text
}, },
}, },
{
title: '默认机构',
dataIndex: 'defaultOrgName',
width: 140,
},
{
title: '默认部门',
dataIndex: 'deptName',
width: 140,
},
{ {
title: '手机号', title: '手机号',
dataIndex: 'phone', dataIndex: 'phone',
@ -115,6 +125,38 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input', component: 'Input',
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{
field: 'defaultOrgId',
label: '默认机构',
component: 'Select',
colProps: { span: 4 },
componentProps: () => {
return {
options: orgIds.value,
resultField: 'data',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
},
{
field: 'deptId',
label: '默认部门',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: () => {
return {
api: getDeptList,
params: { orgId: null },
labelField: 'orgName',
valueField: 'id',
resultField: 'data',
immediate: false
}
},
},
] ]
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ {
@ -325,8 +367,8 @@ export const formSchema: FormSchema[] = [
colProps: { span: 6 }, colProps: { span: 6 },
}, },
{ {
field: 'isLimitClient', field: 'isUseSystem',
slot: 'isLimitClient', slot: 'isUseSystem',
label: '是否允许使用本系统', label: '是否允许使用本系统',
component: 'Switch', component: 'Switch',
colProps: { span: 6 }, colProps: { span: 6 },

@ -77,13 +77,14 @@
showTableSetting: true, showTableSetting: true,
bordered: true, bordered: true,
showIndexColumn: true, showIndexColumn: true,
canResize: false, canResize: true,
resizeHeightOffset: 15,
actionColumn: { actionColumn: {
width: 80, width: 80,
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
fixed: 'right', fixed: 'right'
}, }
}) })
function handleCreate() { function handleCreate() {

Loading…
Cancel
Save