szh-new
lijingjia 3 months ago
parent 0a7777496c
commit f5154b03b4

@ -23,17 +23,15 @@
/* fade-slide */ /* fade-slide */
.fade-slide-leave-active, .fade-slide-leave-active,
.fade-slide-enter-active { .fade-slide-enter-active {
transition: all 0.3s; transition: all 0.1s;
} }
.fade-slide-enter-from { .fade-slide-enter-from {
opacity: 0; opacity: 0;
transform: translateX(-30px);
} }
.fade-slide-leave-to { .fade-slide-leave-to {
opacity: 0; opacity: 0;
transform: translateX(30px);
} }
// /////////////////////////////////////////////// // ///////////////////////////////////////////////

@ -70,7 +70,7 @@ export function EditOpBusinessYard(parameter) {
// 详情 (Auth) // 详情 (Auth)
export function GetOpBusinessYardInfo(parameter) { export function GetOpBusinessYardInfo(parameter) {
return request({ return request({
url: '/opApi/OpBusinessYard/GetOpBusinessYardInfo', url: '/opApi/OpBusinessYard/GetBusinessYardByKeyId',
method: 'get', method: 'get',
params: parameter, params: parameter,
}) })

@ -2,6 +2,7 @@ import { BasicColumn, FormSchema } from '/@/components/Table'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
import Space from '/@/views/operation/seaexport/components/Space.vue' import Space from '/@/views/operation/seaexport/components/Space.vue'
import { useComponentRegister } from '/@/components/Form' import { useComponentRegister } from '/@/components/Form'
import { GetVouchingClerkList } from '/@/views/operation/seaexport/api/BookingLedger'
useComponentRegister('Space', Space) useComponentRegister('Space', Space)
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
import { getOptions } from '/@/hooks/dict' import { getOptions } from '/@/hooks/dict'
@ -209,6 +210,18 @@ export const columns: BasicColumn[] = [
] ]
export const formSchema1: FormSchema[] = [ export const formSchema1: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
label: '',
field: 'businessId',
component: 'Input',
show: false,
},
{ {
label: '提箱小票地址', label: '提箱小票地址',
field: 'pickReceiptUrl', field: 'pickReceiptUrl',
@ -230,37 +243,38 @@ export const formSchema1: FormSchema[] = [
}, },
// 单证Id // 单证Id
{ {
label: '单证人员名称', label: '单证',
field: 'doc', field: 'docName',
component: 'ApiSelect', component: 'ApiSelect',
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: () => { api: GetVouchingClerkList,
return new Promise((resolve) => { labelField: 'pinYinCode',
const data = optionsStore.getOptionsByCode('GetVouchingClerkList') valueField: 'userName',
resolve({ data }) showName: 'userName',
}) immediate: false,
},
labelField: 'userName',
valueField: 'id',
resultField: 'data', resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => { onChange: (e, obj) => {
console.log(obj) if (e && obj) {
if (obj) { formModel.doc = obj.id
formModel.docName = obj.label }
} else { if (!e && !obj) {
formModel.docName = '' formModel.doc = null
}
} }
},
} }
}, },
}, },
{
field: 'doc',
label: '',
component: 'Input',
show: false
},
{ {
label: '单证电话', label: '单证电话',
field: 'docTel', field: 'docTel',
@ -292,7 +306,7 @@ export const formSchema1: FormSchema[] = [
label: '主提单号', label: '主提单号',
field: 'mblno', field: 'mblno',
component: 'Input', component: 'Input',
defaultValue: '', required: true,
colProps: { colProps: {
span: 6, span: 6,
}, },
@ -632,13 +646,6 @@ export const formSchema1: FormSchema[] = [
] ]
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{
label: '主键Id',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{ {
label: '业务Id', label: '业务Id',
field: 'businessId', field: 'businessId',

@ -1,3 +1,8 @@
<!--
* @Desc:
* @Author: lijj
* @Date: 2024-07-26 19:41:41
-->
<template> <template>
<BasicModal <BasicModal
v-bind="$attrs" v-bind="$attrs"
@ -6,148 +11,33 @@
width="90%" width="90%"
@register="registerModal" @register="registerModal"
> >
<a-row :gutter="16">
<a-col :span="6">
<BasicTable @register="registerOpBusinessYardTable" @row-click="onRowClick">
<template #tableTitle>
<div class="buttonGroup">
<a-button type="link" @click="FnClickAdd" class="pl0">
<span class="iconfont icon-new_document"></span>
新建
</a-button>
<a-popconfirm
title="确定要删除所选数据?"
ok-text="确定"
cancel-text="取消"
@confirm="FnClickDel"
>
<a-button type="link">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
</div>
</template>
</BasicTable>
</a-col>
<a-col :span="18" class="OPCol">
<OpBusinessYardEdit <OpBusinessYardEdit
ref="YardEdit" ref="YardEdit"
:business-id="businessId" :business-id="businessId"
:select-id="selectId"
@success="handleSuccess" @success="handleSuccess"
/> />
</a-col>
</a-row>
<template #footer> <template #footer>
<span></span> <el-button @click="closeModal"></el-button>
<el-button type="primary" @click="save"></el-button>
</template> </template>
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { ref } from 'vue'
import { columns } from './OpBusinessYardColumns'
import { BasicModal, useModalInner } from '/@/components/Modal' import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicTable, useTable } from '/@/components/Table'
import { GetOpBusinessYardList, BatchDelOpBusinessYard } from './LetterApi'
import OpBusinessYardEdit from './OpBusinessYardEdit.vue' import OpBusinessYardEdit from './OpBusinessYardEdit.vue'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
// Emits // Emits
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register'])
const businessId = ref() const businessId = ref()
const selectId = ref() const [registerModal, { closeModal }] = useModalInner((data) => {
const [registerModal] = useModalInner((data) => { businessId.value = data.info
businessId.value = data.id
})
const [
registerOpBusinessYardTable,
{ reload, setSelectedRowKeys, clearSelectedRowKeys, getSelectRows },
] = useTable({
api: async (p) => {
const res: API.DataResult = await GetOpBusinessYardList(p)
setSelectedRowKeys([res.data[0].id])
selectId.value = res.data[0].id
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
resizeHeightOffset: 200,
beforeFetch: () => {
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: 1,
pageSize: 99999,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
condition.push({
FieldName: 'businessId',
FieldValue: businessId.value,
ConditionalType: 1,
})
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
rowKey: 'id',
columns,
isTreeTable: false,
pagination: false,
striped: true,
showTableSetting: false,
bordered: true,
showIndexColumn: false,
autoCreateKey: false,
indexColumnProps: {
fixed: 'left',
},
canResize: true,
rowSelection: {
type: 'radio',
onSelect: (e) => {
selectId.value = e.id
},
},
}) })
// //
const YardEdit = ref(null) const YardEdit = ref(null)
// //
const onRowClick = (record) => { const save = async () => {
YardEdit.value.setFieldsValue({ await YardEdit.value.handleSave()
...record, closeModal()
})
YardEdit.value.setFieldsValue1({
...record
})
}
//
function FnClickDel() {
if (getSelectRows().length) {
let Apidata: any = {
ids: [],
}
getSelectRows().forEach((item) => {
Apidata.ids.push(item.id)
})
BatchDelOpBusinessYard(Apidata).then((res) => {
if (res.succeeded) {
notification.success({ message: '删除成功', duration: 3 })
handleSuccess()
}
})
} else {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
}
}
function FnClickAdd() {
clearSelectedRowKeys()
selectId.value = ''
}
async function handleSuccess() {
await reload()
} }
</script> </script>

@ -6,12 +6,6 @@
<template> <template>
<div class="MainBox"> <div class="MainBox">
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<div class="buttonGroup">
<a-button v-repeat type="link" @click="handleSave" class="pl0">
<span class="iconfont icon-baocun"></span>
保存
</a-button>
</div>
<div class="ds-card"> <div class="ds-card">
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
</div> </div>
@ -31,30 +25,32 @@
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
const props = defineProps({ const props = defineProps({
businessId: { businessId: {
type: String type: Object
}, },
selectId: propTypes.string, selectId: propTypes.string,
}) })
watch( watch(
() => props.selectId, () => props.businessId,
async (nVal) => { async (nVal) => {
if (nVal) { if (nVal) {
console.log(nVal) const res: API.DataResult = await GetOpBusinessYardInfo({ id: nVal.id })
if (res.data == null) {
const res: API.DataResult = await GetOpBusinessYardInfo({ id: nVal }) setFieldsValue1({
if (res.succeeded) { ...nVal,
await setFieldsValue({ businessId: nVal.id,
...res.data, id: 0
}) })
} else {
setFieldsValue1({ setFieldsValue1({
...res.data, ...res.data
})
setFieldsValue({
...res.data
}) })
} }
} else {
resetFields()
resetFields1()
} }
}, },
{ deep: true }
) )
// Emits // Emits
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register'])
@ -71,26 +67,14 @@
}) })
const loading = ref(false) const loading = ref(false)
async function handleSave() { async function handleSave() {
let ApiData: any = {
}
const values = await validate() const values = await validate()
const values1 = await validate1() const values1 = await validate1()
Object.keys(values).forEach((item) => { const postData = {
if (item == 'businessId' && !values.businessId) { ...values,
ApiData.businessId = props.businessId ...values1
} else {
ApiData[item] = values[item]
}
})
Object.keys(values1).forEach((item) => {
if (item == 'businessId' && !values1.businessId) {
ApiData.businessId = props.businessId
} else {
ApiData[item] = values1[item]
} }
})
loading.value = true loading.value = true
const res: API.DataResult = await EditOpBusinessYard(ApiData) const res: API.DataResult = await EditOpBusinessYard(postData)
loading.value = false loading.value = false
if (res.succeeded) { if (res.succeeded) {
createMessage.success(res.message) createMessage.success(res.message)
@ -99,7 +83,8 @@
} }
defineExpose({ defineExpose({
setFieldsValue, setFieldsValue,
setFieldsValue1 setFieldsValue1,
handleSave
}) })
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

@ -54,7 +54,7 @@
v-model:value="item.ctnId" v-model:value="item.ctnId"
show-search show-search
placeholder="请选择" placeholder="请选择"
style="width: 72px" style="width: 66px"
:fieldNames="{ :fieldNames="{
label: 'ctnName', label: 'ctnName',
value: 'id' value: 'id'
@ -64,10 +64,22 @@
@change="ctnChange($event, item)" @change="ctnChange($event, item)"
> >
</a-select> </a-select>
<div style="width: 30px"></div> <div class="ctn-price-box">
<span>箱量</span>
<a-input-number v-model:value="item.ctnNum" size="small" :min="0" :max="999999999" placeholder="箱量" />
</div>
<div class="ctn-price-box">
<span>报价</span>
<a-input-number v-model:value="item.quotePrice" size="small" :min="0" :max="999999999" placeholder="报价" /> <a-input-number v-model:value="item.quotePrice" size="small" :min="0" :max="999999999" placeholder="报价" />
</div>
<div class="ctn-price-box">
<span>指导价</span>
<a-input-number v-model:value="item.guidePrice" size="small" :min="0" :max="999999999" placeholder="指导价" /> <a-input-number v-model:value="item.guidePrice" size="small" :min="0" :max="999999999" placeholder="指导价" />
</div>
<div class="ctn-price-box">
<span>底价</span>
<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>
<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({})" class="iconfont icon-zengjiatianjiajiajian"></span>
</div> </div>
@ -667,13 +679,22 @@
width: 32%; width: 32%;
display: flex; display: flex;
.ant-select-selector { .ant-select-selector {
width: 80px!important; width: 66px!important;
background: #F5F9FC!important; background: #F5F9FC!important;
border: none!important; border: none!important;
outline: none; outline: none;
.ant-select-selection-item {
padding-right: 0;
} }
.ant-input-number { }
.ctn-price-box {
margin-left: 4px; margin-left: 4px;
position: relative;
span {
position: absolute;
top: -20px;
font-size: 12px;
}
} }
.iconfont { .iconfont {
line-height: 26px; line-height: 26px;

@ -66,8 +66,8 @@
保函 保函
</a-button> </a-button>
</div> </div>
<!-- 场站入货 --> <!-- 放舱(场站入货) -->
<OpBusinessYardDetails :businessId="details.id" @register="OYregisterModal" /> <OpBusinessYardDetails :businessId="details" @register="OYregisterModal" />
<!-- 派车信息 --> <!-- 派车信息 -->
<OpBusinessTruckDetails :businessId="details.id" @register="OTregisterModal" /> <OpBusinessTruckDetails :businessId="details.id" @register="OTregisterModal" />
<!-- <a-card <!-- <a-card
@ -1592,7 +1592,7 @@
OYopenModal(true, { OYopenModal(true, {
isParent: false, isParent: false,
isUpdate: false, isUpdate: false,
id: props.details.id, info: props.details
}) })
} }
const [OTregisterModal, { openModal: OTopenModal }] = useModal() const [OTregisterModal, { openModal: OTopenModal }] = useModal()
@ -1600,7 +1600,7 @@
OTopenModal(true, { OTopenModal(true, {
isParent: false, isParent: false,
isUpdate: false, isUpdate: false,
id: props.details.id, info: props.details
}) })
} }
// ========== OCR ========== // ========== OCR ==========

@ -99,6 +99,7 @@ export function BatchDelClientParam(data: PageRequest) {
export function DownLoadSqlPrintFile(data: PageRequest) { export function DownLoadSqlPrintFile(data: PageRequest) {
return request<DataResult>({ return request<DataResult>({
url: Api.DownLoadSqlPrintFile, url: Api.DownLoadSqlPrintFile,
    responseType: 'arraybuffer',
method: 'post', method: 'post',
data data
}) })

Loading…
Cancel
Save