Merge branch 'ljj_dev' into dev

szh-new
lijingjia 3 months ago
commit a5b093f368

@ -187,7 +187,7 @@
} }
function handleChange(_, ...args) { function handleChange(_, ...args) {
// emit('change', _, ...args) emit('change', _, ...args)
emitData.value = args emitData.value = args
} }
const getPopupContainer = triggerNode => { const getPopupContainer = triggerNode => {

@ -151,7 +151,8 @@
? rulesMessageJoinLabel ? rulesMessageJoinLabel
: globalRulesMessageJoinLabel : globalRulesMessageJoinLabel
const defaultMsg = createPlaceholderMessage(component) + `${joinLabel ? label : ''}` const defaultMsg = createPlaceholderMessage(component) + `${joinLabel ? label : ''}`
async function validator(rule: any, value: any) {
function validator(rule: any, value: any) {
const msg = rule.message || defaultMsg const msg = rule.message || defaultMsg
if (value === undefined || isNull(value)) { if (value === undefined || isNull(value)) {
// //
@ -186,12 +187,12 @@
*/ */
if (getRequired) { if (getRequired) {
if (!rules || rules.length === 0) { if (!rules || rules.length === 0) {
// rules = [{ required: getRequired, validator }] rules = [{ required: getRequired, validator }]
} else { } else {
const requiredIndex: number = rules.findIndex((rule) => Reflect.has(rule, 'required')) const requiredIndex: number = rules.findIndex((rule) => Reflect.has(rule, 'required'))
if (requiredIndex === -1) { if (requiredIndex === -1) {
// rules.push({ required: getRequired, validator }) rules.push({ required: getRequired, validator })
} }
} }
} }

@ -1,3 +1,8 @@
/*
* @Desc:
* @Author: lijj
* @Date: 2024-05-13 09:06:51
*/
import type { UnwrapRef, Ref, WritableComputedRef, DeepReadonly } from 'vue' import type { UnwrapRef, Ref, WritableComputedRef, DeepReadonly } from 'vue'
import { import {
reactive, reactive,
@ -50,9 +55,9 @@ export function useRuleFormItem<T extends Recordable>(
if (isEqual(value, defaultState.value)) return if (isEqual(value, defaultState.value)) return
innerState.value = value as T[keyof T] innerState.value = value as T[keyof T]
nextTick(() => { // nextTick(() => {
emit?.(changeEvent, value, ...(toRaw(unref(emitData)) || [])) // emit?.(changeEvent, value, ...(toRaw(unref(emitData)) || []))
}) // })
}, },
}) })

@ -5,6 +5,7 @@
--> -->
<template> <template>
<a-spin :spinning="logLoading"> <a-spin :spinning="logLoading">
<h4 v-if="logList.length"></h4>
<a-timeline style="margin-left: 89px; margin-top: 20px;"> <a-timeline style="margin-left: 89px; margin-top: 20px;">
<a-timeline-item v-for="item in logList" :key="item.id"> <a-timeline-item v-for="item in logList" :key="item.id">
<div style="position: relative;"> <div style="position: relative;">

@ -90,7 +90,7 @@
loading.value = true loading.value = true
BringInBookingSlotToOrder({ seaExportId: props.id, slots }).then(res => { BringInBookingSlotToOrder({ seaExportId: props.id, slots }).then(res => {
// createMessage.success(res.data) // createMessage.success(res.data)
emit('createTask', 'WAIT_SPACE_RELEASE') // emit('createTask', 'WAIT_SPACE_RELEASE')
visible.value = false visible.value = false
loading.value = false loading.value = false
}).catch(() => { }).catch(() => {

@ -242,6 +242,7 @@ export const basicInfoFormSchema: FormSchema[] = [
resultField: 'data', resultField: 'data',
immediate: false, immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {
console.log(obj)
if (e && obj) { if (e && obj) {
formModel.carrierId = obj.id formModel.carrierId = obj.id
} }
@ -631,9 +632,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
field: 'etd', field: 'etd',
label: '开船日期', label: '开船日期',
component: 'DatePicker', component: 'DatePicker',
required: false, rules: [{ required: true, message: '请选择开船日期' }],
dynamicDisabled: false, dynamicDisabled: false,
// defaultValue: '', defaultValue: undefined,
colProps: { span: 5 }, colProps: { span: 5 },
componentProps: { componentProps: {
allowClear: true, allowClear: true,
@ -644,9 +645,8 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
field: 'closingDate', field: 'closingDate',
label: '截港时间', label: '截港时间',
component: 'DatePicker', component: 'DatePicker',
required: false,
dynamicDisabled: false, dynamicDisabled: false,
// defaultValue: '', defaultValue: null,
colProps: { span: 5 }, colProps: { span: 5 },
componentProps: { componentProps: {
showTime: true, showTime: true,
@ -658,9 +658,8 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
field: 'closeDocDate', field: 'closeDocDate',
label: '截单时间', label: '截单时间',
component: 'DatePicker', component: 'DatePicker',
required: false,
dynamicDisabled: false, dynamicDisabled: false,
// defaultValue: '', defaultValue: null,
colProps: { span: 5 }, colProps: { span: 5 },
componentProps: { componentProps: {
showTime: true, showTime: true,
@ -910,7 +909,6 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
valueField: 'ediCode', valueField: 'ediCode',
immediate: false, immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {
console.log(obj)
if (e && obj) { if (e && obj) {
formModel.transPortId = obj.id formModel.transPortId = obj.id
formModel.transPort = obj.portName formModel.transPort = obj.portName

@ -92,7 +92,7 @@
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { Divider } from 'ant-design-vue'; import { Divider } from 'ant-design-vue';
// //
// import { updateFormItem } from '/@/hooks/web/common' import { updateFormItem } from '/@/hooks/web/common'
const route = useRoute() const route = useRoute()
// //
const source = ref(route.query.source || 'edit') const source = ref(route.query.source || 'edit')
@ -119,8 +119,7 @@
showActionButtonGroup: false, showActionButtonGroup: false,
size: 'small', size: 'small',
}) })
console.log(basicInfoFormSchema) updateFormItem(updateSchema, 10)
// updateFormItem(updateSchema, 10)
setTimeout(() => { setTimeout(() => {
console.log(basicInfoFormSchema) console.log(basicInfoFormSchema)
}, 100) }, 100)

@ -87,7 +87,6 @@
cargoInfoFormSchema3, cargoInfoFormSchema3,
cargoInfoFormSchema4, cargoInfoFormSchema4,
} from './baseInfo' } from './baseInfo'
console.log(cargoInfoFormSchema2)
import { ref, watch, onMounted, computed } from 'vue' import { ref, watch, onMounted, computed } from 'vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { getDictOption } from '/@/utils/dictUtil' import { getDictOption } from '/@/utils/dictUtil'

@ -58,19 +58,16 @@
</span> </span>
</div> </div>
</a-spin> </a-spin>
<div class="line"></div> <div class="line" v-show="booGoodsStatusItem.length"></div>
<a-spin :spinning="spinning" :delay="delayTime"> <a-spin :spinning="spinning" :delay="delayTime">
<div style="min-height: 60px; overflow: hidden;"> <div style="min-height: 60px; overflow: hidden;" v-show="booGoodsStatusItem.length">
<div <div
v-for="(serive, sindex) in booGoodsStatusItem" v-for="(serive, sindex) in booGoodsStatusItem"
class="goods-status" class="goods-status"
:class="{ isBr: changeGoods && serive.isBr }" :class="{ isBr: changeGoods && serive.isBr }"
:key="`${serive.configId}_${sindex}`" :key="`${serive.configId}_${sindex}`"
> >
<span v-if="(sindex - 3) % 4 != 0" style="position: absolute; right: 8px; color: #257AFA;">···</span> <span v-if="(sindex - 3) % 4 != 0" style="position: absolute; right: -5px; color: #257AFA;">···</span>
<div class="edit-box" @click.stop="FnOpenEdit(serive)">
<Icon icon="ant-design:edit-outlined" />
</div>
<a-tooltip> <a-tooltip>
<template v-if="(serive.actDate || serive.actRemark) && !serive.isBr" #title> <template v-if="(serive.actDate || serive.actRemark) && !serive.isBr" #title>
<p v-if="serive.actDate">{{ serive.actDate }}</p> <p v-if="serive.actDate">{{ serive.actDate }}</p>
@ -105,6 +102,7 @@
<div v-else class="round" @click="saveGoodsStatus(serive)"></div> <div v-else class="round" @click="saveGoodsStatus(serive)"></div>
<div class="showName" :class="{ 'show-name-active': serive.isYield }"> <div class="showName" :class="{ 'show-name-active': serive.isYield }">
{{ serive.showName }} {{ serive.showName }}
<span @click.stop="FnOpenEdit(serive)" class="edit-box iconfont icon-bianji1"></span>
</div> </div>
</div> </div>
</div> </div>
@ -289,7 +287,6 @@
</a-card> --> </a-card> -->
<div class="card" style="padding-bottom: 15px;"> <div class="card" style="padding-bottom: 15px;">
<Divider type="horizontal" /> <Divider type="horizontal" />
<h4>日志</h4>
<!-- 日志组件 --> <!-- 日志组件 -->
<DsJournal :id="id" /> <DsJournal :id="id" />
</div> </div>
@ -1269,10 +1266,13 @@
} }
.goods-status { .goods-status {
display: inline-block; display: inline-block;
width: 25%; width: 20%;
height: 70px; height: 70px;
position: relative; position: relative;
float: left; float: left;
.goods-content {
text-align: center;
}
} }
.no-data { .no-data {
img { img {
@ -1281,33 +1281,35 @@
} }
} }
.is-yield { .is-yield {
width: 46px; width: 22px;
height: 26px; height: 22px;
background: #257AFA; background: #17A6A3;
text-align: center; text-align: center;
color: #ffffff; color: #ffffff;
border-radius: 15px; border-radius: 15px;
line-height: 26px; line-height: 22px;
margin: 0 auto;
span { span {
font-size: 18px!important; font-size: 18px!important;
margin-right: 0; margin-right: 0;
} }
} }
.showName { .showName {
margin-top: 5px!important;
font-size: 12px!important; font-size: 12px!important;
color: #7A8798; color: #7A8798;
width: 48px; width: 48px;
text-align: center; text-align: center;
margin: 0 auto;
line-height: 14px;
} }
.show-name-active { .show-name-active {
font-weight: 600; font-weight: 600;
} }
.edit-box { .edit-box {
display: none; display: none;
position: absolute;
right: 4px;
bottom: 23px;
color: #257AFA; color: #257AFA;
cursor: pointer;
} }
.goods-status:hover { .goods-status:hover {
.edit-box { .edit-box {
@ -1315,10 +1317,11 @@
} }
} }
.round { .round {
width: 46px; width: 22px;
height: 26px; height: 22px;
border-radius: 15px; border-radius: 15px;
border: 2px solid #E8EBED; border: 2px solid #E8EBED;
margin: 0 auto;
} }
.isBr { .isBr {
display: none; display: none;

@ -15,8 +15,8 @@ enum Api {
info = '/mainApi/PrintTemplate/GetSysPrintModuleInfo', info = '/mainApi/PrintTemplate/GetSysPrintModuleInfo',
delete = '/mainApi/ClientParam/BatchDelClientParam', delete = '/mainApi/ClientParam/BatchDelClientParam',
GetTenantParamDataSelectList = '/mainApi/ClientParam/GetTenantParamDataSelectList', GetTenantParamDataSelectList = '/mainApi/ClientParam/GetTenantParamDataSelectList',
GetOpenSqlPrintInfo = '/printApi/OpenPrint/GetOpenSqlPrintInfo' GetOpenSqlPrintInfo = '/printApi/OpenPrint/GetOpenSqlPrintInfo',
DownLoadSqlPrintFile = '/printApi/OpenPrint/DownLoadSqlPrintFile'
} }
// 模版列表 (Auth) // 模版列表 (Auth)
export function GetSysPrintTemplateList(data) { export function GetSysPrintTemplateList(data) {
@ -69,7 +69,7 @@ export function GetSysPrintTemplateInfo(params) {
}) })
} }
// 删除 (Auth) // sql打印模版
export function GetOpenSqlPrintInfo(data: PageRequest) { export function GetOpenSqlPrintInfo(data: PageRequest) {
return request<DataResult>({ return request<DataResult>({
url: Api.GetOpenSqlPrintInfo, url: Api.GetOpenSqlPrintInfo,
@ -86,7 +86,7 @@ export function GetTenantParamDataSelectList(query) {
}) })
} }
// sql打印模版 // 删除 (Auth)
export function BatchDelClientParam(data: PageRequest) { export function BatchDelClientParam(data: PageRequest) {
return request<DataResult>({ return request<DataResult>({
url: Api.delete, url: Api.delete,
@ -94,3 +94,12 @@ export function BatchDelClientParam(data: PageRequest) {
data data
}) })
} }
// 下载打印源文件
export function DownLoadSqlPrintFile(data: PageRequest) {
return request<DataResult>({
url: Api.DownLoadSqlPrintFile,
method: 'post',
data
})
}

@ -253,7 +253,17 @@ export const temFormSchema: FormSchema[] = [
label: ' ', label: ' ',
slot: 'sqlModel', slot: 'sqlModel',
component: 'Input', component: 'Input',
colProps: { span: 12 }, colProps: { span: 6 },
show: ({ values }) => {
return values.isUseDataSource && values.id
}
},
{
field: 'downModel',
label: ' ',
slot: 'downModel',
component: 'Input',
colProps: { span: 6 },
show: ({ values }) => { show: ({ values }) => {
return values.isUseDataSource && values.id return values.isUseDataSource && values.id
} }

@ -15,6 +15,9 @@
<template #sqlModel="{ model }"> <template #sqlModel="{ model }">
<a-button key="submit" type="primary" :loading="loading" @click="sqlPrint(model)">sql</a-button> <a-button key="submit" type="primary" :loading="loading" @click="sqlPrint(model)">sql</a-button>
</template> </template>
<template #downModel="{ model }">
<a-button key="submit" type="primary" :loading="loading" @click="sqlDownLoad(model)">sql</a-button>
</template>
</BasicForm> </BasicForm>
<!--右下角按钮--> <!--右下角按钮-->
<template #footer> <template #footer>
@ -57,7 +60,7 @@
// //
import { temFormSchema } from '../columns' import { temFormSchema } from '../columns'
// //
import { EditSysPrintTemplate, GetSysPrintTemplateInfo, GetOpenSqlPrintInfo } from '../api' import { EditSysPrintTemplate, GetSysPrintTemplateInfo, GetOpenSqlPrintInfo, DownLoadSqlPrintFile } from '../api'
// //
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
// Emits // Emits
@ -93,10 +96,26 @@
} }
setModalProps({ loading: false }) setModalProps({ loading: false })
}) })
//
const sqlDownLoad = (model) => {
const userStore = useUserStore()
if (!model.inParamColumn) {
return createMessage.warning('请先填写入口参数!')
}
const postData = {
"tenantId": userStore.getUserInfo.tenantId,
"templateId": model.id,
"paramJsonStr": model.inParamColumn,
"printType": "1"
}
DownLoadSqlPrintFile(postData).then(res => {
if (res.succeeded) {
console.log(res)
}
})
}
// sql // sql
const sqlPrint = (model) => { const sqlPrint = (model) => {
console.log(model)
const userStore = useUserStore() const userStore = useUserStore()
if (!model.inParamColumn) { if (!model.inParamColumn) {
return createMessage.warning('请先填写入口参数!') return createMessage.warning('请先填写入口参数!')
@ -109,6 +128,7 @@
} }
GetOpenSqlPrintInfo(postData).then(res => { GetOpenSqlPrintInfo(postData).then(res => {
if (res.succeeded) { if (res.succeeded) {
window.open(`http://118.190.144.189:3008/printtempfile/${res.data}`)
return createMessage.success('打印成功!') return createMessage.success('打印成功!')
} }
}) })

Loading…
Cancel
Save