10.8禅道问题修复

szh-new
lijingjia 2 months ago
parent ab19019748
commit 4bc2bc8d71

@ -97,6 +97,7 @@
minRows: 4,
maxRows: 4,
},
disTrans: true
},
},
]

@ -317,8 +317,6 @@
}
//
const save = () => {
let flag = false
const arr = []
for (let i = 0; i < props.data.length; i++) {
if (!props.data[i].feeName && props.data[i].feeStatus == 1) {
createMessage.warning(`费用名称不能为空!`)

@ -52,7 +52,7 @@
<script lang="ts" setup>
import { BasicTable, useTable } from '/@/components/Table'
import { onMounted, ref, defineProps, watch } from 'vue'
import { onMounted, ref, defineProps, watch, defineExpose } from 'vue'
import emitter from '/@/utils/Bus'
import { FeeStatistics } from './api'
import { currencyColumns, costomerColumns } from './columns'
@ -115,6 +115,9 @@
showIndexColumn: true,
canResize: false
})
defineExpose({
init
})
</script>
<style lang="scss">

@ -96,7 +96,7 @@
default: '300'
}
})
const emits = defineEmits(['broInsert'])
const emits = defineEmits(['broInsert', 'refreshStatic'])
//
const feeDict = ref([])
//
@ -737,6 +737,8 @@
.then((res) => {
loading.value = false
init()
//
emits('refreshStatic')
createMessage.success(res.message)
})
.catch(() => {

@ -29,9 +29,10 @@
:id="details.id"
:details="details"
@broInsert="broPay"
@refreshStatic="refreshStatic"
></FeeTable>
</div>
<FeeStatistic :id="data.id" />
<FeeStatistic ref="fees" :id="data.id" />
</div>
</template>
<script lang="ts" setup>
@ -66,10 +67,14 @@
const broPay = (v) => {
broPayData.value = v
}
const fees = ref(null)
//
const refreshStatic = () => {
fees.value.init(data.value.id)
}
watch(
() => props.details,
(val) => {
console.log(val)
data.value = val
},
{ immediate: true, deep: true }

@ -12,7 +12,7 @@
<slot name="formHeader"></slot>
<template v-for="schema in getSchema" :key="schema.field">
<FormItem
v-show="(schema.isEdit == 2 || schema.component == 'Divider' || schema.component == 'InputTextArea') && schema.show !== false"
v-if="schema.isEdit != 1 || schema.component == 'Divider' || schema.component == 'InputTextArea'"
:is-advanced="fieldsIsAdvancedMap[schema.field]"
:table-action="tableAction"
:form-action-type="formActionType"
@ -27,7 +27,7 @@
</template>
</FormItem>
<!-- 只读 -->
<a-col :span="schema?.colProps?.span || 24" v-show="schema.show !== false && schema.isEdit == 1 && schema.component != 'Divider' && schema.component != 'InputTextArea'">
<a-col :span="schema?.colProps?.span || 24" v-if="schema.show !== false && schema.isEdit == 1 && schema.component != 'Divider' && schema.component != 'InputTextArea'">
<div class="ds-form-onlyread">
<span class="label">{{ schema.label }}</span> {{ formModel[schema.field] || '-' }}
<span v-if="!schema.dynamicDisabled" class="iconfont icon-bianji1" @click="editFormItem(schema)"></span>
@ -125,23 +125,17 @@
...rowProps,
}
})
const getBindValue = computed(
() => ({ ...attrs, ...props, ...unref(getProps) } as Recordable),
)
// isEdit
let editFlag = false
const getSchema = computed((): FormSchema[] => {
const schemas: FormSchema[] = unref(schemaRef) || (unref(getProps).schemas as any)
const isReadonly = unref(propsRef).readonly
for (const schema of schemas) {
if (!editFlag) {
// item 1(2)
if (isReadonly) {
schema['isEdit'] = 1
} else {
schema['isEdit'] = 2
}
}
// item
if (isReadonly && !schema.isEdit) schema['isEdit'] = 1
const { defaultValue, component, isHandleDateDefaultValue = true } = schema
// handle date type
if (isHandleDateDefaultValue && defaultValue && dateItemType.includes(component)) {
@ -156,9 +150,6 @@
}
}
}
if (schemas.length) {
editFlag = true
}
if (unref(getProps).showAdvancedButton) {
return cloneDeep(
schemas.filter((schema) => schema.component !== 'Divider') as FormSchema[],

@ -114,6 +114,7 @@ export function useForm(props?: Props): UseFormReturnType {
validate: async (nameList?: NamePath[]): Promise<Recordable> => {
const form = await getForm()
console.log(form.validate(nameList))
return form.validate(nameList)
},

@ -54,7 +54,8 @@
required: true,
colProps: { span: 24 },
componentProps: {
rows: 4
rows: 4,
disTrans: true
}
}
]

@ -54,7 +54,8 @@
required: true,
colProps: { span: 24 },
componentProps: {
rows: 4
rows: 4,
disTrans: true
}
}
]

@ -210,7 +210,6 @@ export function BookingTruckGetYardData(parameter) {
* 获取场站数据
*/
export function TaskManageTruckGetYardData(param) {
console.log(param)
const url = '/TaskManageTruck/GetYardData?ids=' + param[0] + '&ids=' + param[1]
return request({
url,

@ -67,7 +67,6 @@ const sourceDetailId = ref([])
// 箱型 字段转换 改按需的时候不要动
const CtnMapArr: any = []
getDictOption('seaexport_ctn_map').then((res) => {
console.log(res)
res.forEach((item) => {
CtnMapArr.push({
title: item.value,
@ -1234,7 +1233,6 @@ export const BatchModificationFormSchema: FormSchema[] = [
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
console.log(obj)
if (e) {
formModel.cnName = obj.label
} else {

@ -216,7 +216,7 @@ export const formSchema1: FormSchema[] = [
field: 'agent',
label: '国外代理',
component: 'ApiSelect',
required: false,
required: true,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 24 },
@ -967,7 +967,8 @@ export const formSchema5: FormSchema[] = [
label: '分提单号',
field: 'hblno',
component: 'Input',
defaultValue: '',
required: true,
defaultValue: null,
colProps: { span: 12 }
}
]

@ -352,6 +352,9 @@
postData.queryCondition = JSON.stringify(condition)
GetSeaExportBillManageList(postData).then(res => {
list.value = res.data
if (res?.data?.length) {
setFormValue(res.data[0])
}
}).catch(() => {
})
@ -664,7 +667,8 @@
formData.marks = ''
setFieldsValue1({
...props.details,
id: null
id: null,
agentContent: props.details.consigneeContent
})
setFieldsValue2({
...props.details
@ -673,7 +677,9 @@
...props.details
})
setFieldsValue4({
...props.details
...props.details,
mblFrt: null,
mblFrtCode: null
})
//
@ -709,7 +715,6 @@
item.bsno = ''
})
ctnInfo.value = props.details.ctnInfo
console.log(ctnInfo.value)
}
}
//

@ -299,7 +299,6 @@
loading.value = true
EditShippingBillPartCtn({ partList: list.value, businessId: props.id }).then(res => {
loading.value = false
console.log(res)
})
}
//

@ -312,7 +312,6 @@
const { data } = res
if (data && data.id) {
const content = JSON.parse(data.content).columns
console.log(content)
//
const status = route.query.status
if (status == 'WAIT_BILL_CONFIRM') {
@ -334,7 +333,6 @@
})
}
}
console.log(content)
//
OtherInfo.value.updateSchema(content)
RefbasicInfo.value.updateSchema(content)
@ -513,6 +511,7 @@
ediInfo: ediFrom,
ctnInfo
}
if (id.value) postData['id'] = id.value
//
loading.value = true
BookingOrderSave(postData)
@ -535,7 +534,7 @@
go(`/BookingDetail?id=${res.data}&source=edit`)
}, 50)
}
init()
if (route.query.source != 'copy') init()
}
})
.catch(() => {

@ -282,7 +282,6 @@ export const formSchema: FormSchema[] = [
},
onChange: (e, obj) => {
if (obj) {
console.log(obj)
formModel.truckName = obj.label
formModel.truckCode = obj.codeName
} else {
@ -848,7 +847,6 @@ export const formSchema: FormSchema[] = [
},
onChange: (e, obj) => {
if (obj) {
console.log(obj)
formModel.dispatcherName = obj.userName
} else {
formModel.dispatcherName = ''

@ -184,7 +184,6 @@
const data = getFieldsValue()
loading.value = true
BatchDelOpBusinessYard({ ids: [data.id] }).then(res => {
console.log(res)
createMessage.success('删除成功!')
resetFields()
init(details)

@ -53,7 +53,7 @@
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] =
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue }] =
useForm({
labelWidth: 100,
schemas: personFormSchema,
@ -71,9 +71,11 @@
updateFormField(updateSchema)
rowId.value = data.record.id
const res: API.DataResult = await GetBusinessOrderContactInfo({ id: unref(rowId) })
console.log(res)
if (res.succeeded) {
setFieldsValue({
...res.data,
id: res.data.id
})
}
} else {
@ -111,6 +113,9 @@
const values = await validate()
if (!values.mobile && !values.tel) return createMessage.warning('请填写电话或者手机!')
values['businessId'] = id.value
if (getFieldsValue().id) {
values['id'] = getFieldsValue().id
}
loading.value = true
setModalProps({ confirmLoading: true, loading: true })
const res: API.DataResult = await EditBusinessOrderContact(values)

@ -1882,7 +1882,7 @@ export const cargoInfoFormSchema2: FormSchema[] = [
formModel.hsCode = obj.hsCode
}
}
if (!v && !obj.id) {
if (!v && !obj?.id) {
formModel.goodsId = null
formModel.hsCode = null
}
@ -2079,7 +2079,7 @@ export const cargoInfoFormSchema3: FormSchema[] = [
},
},
{
label: '联系人',
label: '危险品联系人',
field: 'dangerAttn',
component: 'Input',
required: false,
@ -2941,7 +2941,6 @@ export const personFormSchema: FormSchema[] = [
mobile: item.mobile,
}
})
console.log(personList.value)
})
}
},

@ -182,6 +182,8 @@
}
//
const toggleIssuingWay = (v) => {
//
emitter.emit('setBillType', v)
if (v == 'zd') {
formData.issuingWay = 'fd'
} else {

@ -385,7 +385,6 @@
watch(
() => props.details,
(nval) => {
console.log(nval)
if (Object.keys(nval).length) {
setFieldsValue1({ marks: nval.marks, description: nval.description })
setFieldsValue2(nval)
@ -407,7 +406,6 @@
const source = ref(route.query.source || 'edit')
onMounted(() => {
const nval = props.details
console.log(nval)
if (nval.id) {
setFieldsValue1({ marks: nval.marks, description: nval.description })
setFieldsValue2(nval)
@ -418,7 +416,6 @@
})
//
const ctnChange = (v, item) => {
console.log(item)
let data = {}
ctnOptions.value.forEach(row => {
if (row.ctnName == v) {

@ -1401,7 +1401,6 @@
}).then((res) => {
Rdata.value = res.data
Bx.value = x.value + width.value
console.log(Bx)
By.value = y.value + height.value
CvBoxType.value = true
})

@ -124,6 +124,12 @@
() => props.details,
(v) => {
setFieldsValue(v)
if (v.issuingWay == 'fd') {
updateSchema({
field: 'agent',
required: true
})
}
}
)
onMounted(() => {
@ -142,10 +148,25 @@
...v
})
})
//
emitter.on('setBillType', (v) => {
if (v == 'zd') {
updateSchema({
field: 'agent',
required: true
})
} else {
updateSchema({
field: 'agent',
required: false
})
}
})
})
onUnmounted(() => {
emitter.off('setSeaLane')
emitter.off('customerBack')
emitter.off('setBillType')
})
// edi
const linkageForm = (item) => {

@ -60,9 +60,6 @@
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await SeaExportBatchEdit({ ...values, ids: ids.value })
if (res.succeeded) {
createMessage.success(res.message)

Loading…
Cancel
Save