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

@ -23,7 +23,7 @@
</template>
<!-- 尾部插槽常用于合计 -->
<template #footer="data">
<slot name="footer" ></slot>
<slot name="footer"></slot>
</template>
<!-- <template #[`header-${column.dataIndex}`] v-for="(column, index) in columns" :key="index">-->
<!-- <HeaderCell :column="column" />-->

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

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

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

@ -1,3 +1,8 @@
<!--
* @Desc:
* @Author: lijj
* @Date: 2024-07-26 19:41:41
-->
<template>
<BasicModal
v-bind="$attrs"
@ -6,148 +11,33 @@
width="90%"
@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
ref="YardEdit"
:business-id="businessId"
:select-id="selectId"
@success="handleSuccess"
/>
</a-col>
</a-row>
<OpBusinessYardEdit
ref="YardEdit"
:business-id="businessId"
@success="handleSuccess"
/>
<template #footer>
<span></span>
<el-button @click="closeModal"></el-button>
<el-button type="primary" @click="save"></el-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { columns } from './OpBusinessYardColumns'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicTable, useTable } from '/@/components/Table'
import { GetOpBusinessYardList, BatchDelOpBusinessYard } from './LetterApi'
import OpBusinessYardEdit from './OpBusinessYardEdit.vue'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
// Emits
const emit = defineEmits(['success', 'register'])
const businessId = ref()
const selectId = ref()
const [registerModal] = useModalInner((data) => {
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 [registerModal, { closeModal }] = useModalInner((data) => {
businessId.value = data.info
})
//
const YardEdit = ref(null)
//
const onRowClick = (record) => {
YardEdit.value.setFieldsValue({
...record,
})
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()
//
const save = async () => {
await YardEdit.value.handleSave()
closeModal()
}
</script>

@ -6,19 +6,13 @@
<template>
<div class="MainBox">
<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">
<BasicForm @register="registerForm" />
</div>
<div class="ds-card mt15">
<h4>入货通知详细信息</h4>
<BasicForm @register="registerForm1" />
</div>
</div>
</a-spin>
</div>
</template>
@ -31,30 +25,32 @@
import { propTypes } from '/@/utils/propTypes'
const props = defineProps({
businessId: {
type: String
type: Object
},
selectId: propTypes.string,
})
watch(
() => props.selectId,
() => props.businessId,
async (nVal) => {
if (nVal) {
console.log(nVal)
const res: API.DataResult = await GetOpBusinessYardInfo({ id: nVal })
if (res.succeeded) {
await setFieldsValue({
...res.data,
const res: API.DataResult = await GetOpBusinessYardInfo({ id: nVal.id })
if (res.data == null) {
setFieldsValue1({
...nVal,
businessId: nVal.id,
id: 0
})
} else {
setFieldsValue1({
...res.data,
...res.data
})
setFieldsValue({
...res.data
})
}
} else {
resetFields()
resetFields1()
}
},
{ deep: true }
)
// Emits
const emit = defineEmits(['success', 'register'])
@ -71,26 +67,14 @@
})
const loading = ref(false)
async function handleSave() {
let ApiData: any = {
}
const values = await validate()
const values1 = await validate1()
Object.keys(values).forEach((item) => {
if (item == 'businessId' && !values.businessId) {
ApiData.businessId = props.businessId
} else {
ApiData[item] = values[item]
}
})
Object.keys(values1).forEach((item) => {
if (item == 'businessId' && !values1.businessId) {
ApiData.businessId = props.businessId
} else {
ApiData[item] = values1[item]
}
})
const postData = {
...values,
...values1
}
loading.value = true
const res: API.DataResult = await EditOpBusinessYard(ApiData)
const res: API.DataResult = await EditOpBusinessYard(postData)
loading.value = false
if (res.succeeded) {
createMessage.success(res.message)
@ -99,7 +83,8 @@
}
defineExpose({
setFieldsValue,
setFieldsValue1
setFieldsValue1,
handleSave
})
</script>
<style lang="less" scoped>

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

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

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

Loading…
Cancel
Save