10.8禅道问题修复

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save