4月4日
This commit is contained in:
parent
a237a8bdb0
commit
29a3f7701c
BIN
dist.tar.gz
BIN
dist.tar.gz
Binary file not shown.
@ -29,18 +29,18 @@ export function getReceivingDetail(data: any): Promise<any> {
|
||||
}
|
||||
|
||||
// 未使用
|
||||
export function getReceivingProduct(data: any): Promise<any> {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storage.receiving.getReceivingProduct',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// export function getReceivingProduct(data: any): Promise<any> {
|
||||
// return request({
|
||||
// url: '/system',
|
||||
// method: 'post',
|
||||
// params: {
|
||||
// method: 'storage.receiving.getReceivingProduct',
|
||||
// v,
|
||||
// timestamp: new Date().getTime()
|
||||
// },
|
||||
// data: data
|
||||
// })
|
||||
// }
|
||||
|
||||
export function batchCancelReceiving(data: any): Promise<any> {
|
||||
return request({
|
||||
@ -55,18 +55,18 @@ export function batchCancelReceiving(data: any): Promise<any> {
|
||||
})
|
||||
}
|
||||
|
||||
export function exportReceiving(data: any): Promise<any> {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storage.receiving.exportReceiving',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// export function exportReceiving(data: any): Promise<any> {
|
||||
// return request({
|
||||
// url: '/system',
|
||||
// method: 'post',
|
||||
// params: {
|
||||
// method: 'storage.receiving.exportReceiving',
|
||||
// v,
|
||||
// timestamp: new Date().getTime()
|
||||
// },
|
||||
// data: data
|
||||
// })
|
||||
// }
|
||||
|
||||
// 发送打印任务
|
||||
// data: { stationId, printerName, templateId, businessType, businessId, printData }
|
||||
@ -228,4 +228,18 @@ export function completeReceiving(data: any): Promise<any> {
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 绑定货主到收货单(入参示例: { receiving_id, store_id })
|
||||
export function bindReceivingStore(data: any): Promise<any> {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storage.receiving.bindStore',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@ -83,64 +83,3 @@ export function getStoreRoles(data:any) {
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
/** 查询仓货签约列表 */
|
||||
export function storeWarehouseList(data: {
|
||||
counterparty_id?: number
|
||||
auth_status?: number
|
||||
use_status?: number
|
||||
keyword?: string
|
||||
page?: number
|
||||
page_size?: number
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storeWarehouse.store.list',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
/** 发起/预览/确认签约 */
|
||||
export function storeWarehouseSign(data: {
|
||||
temp_code?: string
|
||||
action?: 'preview' | 'confirm'
|
||||
counterparty_id?: number
|
||||
remask?: string
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storeWarehouse.store.sign',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
/** 修改签约关系使用状态 */
|
||||
export function storeWarehouseUnbind(data: {
|
||||
id?: number
|
||||
counterparty_id?: number
|
||||
use_status?: number
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storeWarehouse.store.unbind',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
151
src/api/storeWarehouse.ts
Normal file
151
src/api/storeWarehouse.ts
Normal file
@ -0,0 +1,151 @@
|
||||
import request from '@/utils/request'
|
||||
const v = "1.0";
|
||||
|
||||
/** 查询仓货签约列表 */
|
||||
export function storeWarehouseList(data: {
|
||||
counterparty_id?: number
|
||||
auth_status?: number
|
||||
use_status?: number
|
||||
keyword?: string
|
||||
page?: number
|
||||
page_size?: number
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storeWarehouse.store.list',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
/** 发起/预览/确认签约 */
|
||||
export function storeWarehouseSign(data: {
|
||||
temp_code?: string
|
||||
action?: 'preview' | 'confirm'
|
||||
counterparty_id?: number
|
||||
remask?: string
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storeWarehouse.store.sign',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
/** 修改签约关系使用状态 */
|
||||
export function storeWarehouseUnbind(data: {
|
||||
id?: number
|
||||
counterparty_id?: number
|
||||
use_status?: number
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storeWarehouse.store.unbind',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
/** 修改签约备注 */
|
||||
export function storeWarehouseRename(data: {
|
||||
id?: number
|
||||
counterparty_id?: number
|
||||
remask: string
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storeWarehouse.store.rename',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
/** 查询签约关系下的奇门接口配置列表 */
|
||||
export function storeWarehouseListQimenConfig(data: {
|
||||
id?: number
|
||||
counterparty_id?: number
|
||||
interface_type_id?: number
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storeWarehouse.store.listQimenConfig',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
/** 保存奇门接口配置(新增或更新) */
|
||||
export function storeWarehouseSaveQimenConfig(data: {
|
||||
id?: number
|
||||
counterparty_id?: number
|
||||
interface_type_id?: number
|
||||
app_name?: string
|
||||
qimen_app_key: string
|
||||
qimen_customer_id: string
|
||||
qimen_warehouse_code: string
|
||||
api_version?: string
|
||||
sign_method?: string
|
||||
rate_limit?: number
|
||||
timeout_seconds?: number
|
||||
contact_person?: string
|
||||
contact_phone?: string
|
||||
email?: string
|
||||
is_enabled?: number
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storeWarehouse.store.saveQimenConfig',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
/** 删除签约关系上的奇门接口配置 */
|
||||
export function storeWarehouseDeleteQimenConfig(data: {
|
||||
id?: number
|
||||
counterparty_id?: number
|
||||
interface_type_id?: number
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'storeWarehouse.store.deleteQimenConfig',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
@ -659,7 +659,26 @@ function handleReset() {
|
||||
|
||||
function handleSubmit() {
|
||||
submitting.value = true
|
||||
buildAndEmitCustomCondition()
|
||||
|
||||
// 对于自定义筛选,先构建当前条件但不依赖 buildAndEmitCustomCondition 的内部 emit
|
||||
if (activeTab.value === 'custom') {
|
||||
const currentConditions = buildConditionsObject()
|
||||
if (currentConditions && Object.keys(currentConditions).length > 0) {
|
||||
activeCondition.value = currentConditions
|
||||
emit('condition-change', activeCondition.value)
|
||||
} else {
|
||||
// 没有任何自定义条件时,明确发出空条件,父组件应按无筛选(即 loadList)处理
|
||||
activeCondition.value = null
|
||||
emit('condition-change', {})
|
||||
}
|
||||
} else if (activeTab.value === 'preset') {
|
||||
// 预设直接发送当前选中的预设条件(可能为 null)
|
||||
emit('condition-change', activeCondition.value)
|
||||
} else {
|
||||
// 兜底:仍然调用构建并可能触发自动提交逻辑
|
||||
buildAndEmitCustomCondition()
|
||||
}
|
||||
|
||||
emit('submit', activeCondition.value)
|
||||
setTimeout(() => {
|
||||
submitting.value = false
|
||||
|
||||
@ -125,7 +125,7 @@ const fetchPdaInfo = async () => {
|
||||
try {
|
||||
loadingPda.value = true
|
||||
pdaError.value = false
|
||||
const response = await axios.get('/dl-api/pda/latest.json')
|
||||
const response = await axios.get('http://dl.wms.gztbyc.com/pda/latest.json')
|
||||
if (response.data) {
|
||||
pdaData.value = response.data
|
||||
}
|
||||
@ -141,7 +141,7 @@ const fetchPrintServerInfo = async () => {
|
||||
try {
|
||||
loadingPrint.value = true
|
||||
printError.value = false
|
||||
const response = await axios.get('/dl-api/printServer/latest.json')
|
||||
const response = await axios.get('http://dl.wms.gztbyc.com/printServer/latest.json')
|
||||
if (response.data) {
|
||||
printData.value = response.data
|
||||
}
|
||||
|
||||
@ -305,6 +305,15 @@ const props = defineProps({
|
||||
stores: {
|
||||
type: Array as () => any[],
|
||||
default: () => []
|
||||
},
|
||||
// 接受父级传入的初始货主信息(用于在收货明细中添加商品时锁定货主)
|
||||
initialStore: {
|
||||
type: Object as () => any,
|
||||
default: null
|
||||
},
|
||||
storeDisabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
@ -327,6 +336,15 @@ const newProhibitedLevel = ref(1)
|
||||
|
||||
const formData = reactive(JSON.parse(JSON.stringify(stockDefaultFormData)))
|
||||
|
||||
// 若父组件传入初始货主,则使用并锁定
|
||||
watch(() => props.initialStore, (val) => {
|
||||
if (val) {
|
||||
formData.store_id = val.id || val.store_id || val.storeId
|
||||
}
|
||||
}, { immediate: true })
|
||||
|
||||
defineExpose({ formData })
|
||||
|
||||
const originalData = reactive({})
|
||||
|
||||
// Validators
|
||||
|
||||
@ -317,7 +317,7 @@ const loadData = async () => {
|
||||
const params = buildStockQuery(currentConditions.value)
|
||||
|
||||
// 调试用:前端打印查看转换结果,确认 operator/value/type 是否符合预期
|
||||
console.log('Query Params:', JSON.stringify(params, null, 2))
|
||||
// console.log('Query Params:', JSON.stringify(params, null, 2))
|
||||
|
||||
const res = await stockApi.stockWarehouse(pagination, params)
|
||||
if (res && res.data) {
|
||||
|
||||
@ -10,7 +10,27 @@
|
||||
:label="field.label"
|
||||
:prop="field.prop"
|
||||
>
|
||||
<template v-if="field.type === 'select'">
|
||||
<!-- 特殊处理:货主行,显示下拉并在右侧增加绑定按钮 -->
|
||||
<template v-if="field.prop === 'store_name'">
|
||||
<div style="display:flex; gap:8px; align-items:center;">
|
||||
<el-select
|
||||
v-model="form.store_id"
|
||||
:placeholder="'请选择' + field.label"
|
||||
style="flex:1"
|
||||
:disabled="field.disabled || storeBound"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in (availableFields.find(f => f.value === 'store_id')?.options || [])"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button size="small" type="primary" @click="handleBindStore">货主绑定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="field.type === 'select'">
|
||||
<el-select
|
||||
v-model="(form as any)[field.prop]"
|
||||
:placeholder="'请选择' + field.label"
|
||||
@ -74,7 +94,8 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch, computed } from 'vue'
|
||||
import { availableFields, detailpanel } from '../receiving-config'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import * as receivingApi from '@/api/storage/receiving'
|
||||
import { Picture, Check, Refresh } from '@element-plus/icons-vue'
|
||||
|
||||
const props = defineProps<{
|
||||
@ -85,6 +106,7 @@ const props = defineProps<{
|
||||
const form = ref({
|
||||
receiving_number: '',
|
||||
store_name: '',
|
||||
store_id: '',
|
||||
detail_status: '',
|
||||
creator_name: '',
|
||||
delivery_method: '',
|
||||
@ -114,6 +136,9 @@ const handleSave = async () => {
|
||||
const handleReset = () => {
|
||||
if (props.row) {
|
||||
form.value = { ...props.row }
|
||||
// normalize store id/name
|
||||
form.value.store_id = props.row.store?.id || props.row.store_id || ''
|
||||
form.value.store_name = props.row.store?.store_remask || props.row.store_name || form.value.store_name
|
||||
}
|
||||
ElMessage.info('表单已重置')
|
||||
}
|
||||
@ -133,6 +158,73 @@ const imagesArr = computed(() => {
|
||||
}).filter((s: string) => !!s)
|
||||
})
|
||||
|
||||
// 绑定状态:绑定后不可更改
|
||||
const storeBound = ref(false)
|
||||
|
||||
// 触发绑定流程
|
||||
const handleBindStore = async () => {
|
||||
const storeId = form.value.store_id
|
||||
const receivingId = props.id || props.row?.id
|
||||
if (!storeId) {
|
||||
ElMessage.warning('请先选择货主')
|
||||
return
|
||||
}
|
||||
if (!receivingId) {
|
||||
ElMessage.warning('缺少收货单ID,无法绑定')
|
||||
return
|
||||
}
|
||||
|
||||
const status = props.row?.status
|
||||
const hasStore = !!(props.row && (props.row.store || props.row.store_id))
|
||||
// 拒绝条件:取消状态始终拒绝;收货中/已完成且已有货主也拒绝
|
||||
if (status === 'cancelled') {
|
||||
ElMessage.error('取消状态的收货单无法绑定货主')
|
||||
return
|
||||
}
|
||||
if ((status === 'receiving' || status === 'completed') && hasStore) {
|
||||
ElMessage.error('当前状态下已有货主,无法绑定')
|
||||
return
|
||||
}
|
||||
|
||||
// 询问确认
|
||||
try {
|
||||
await ElMessageBox.confirm(`将货主绑定为:${getStoreLabel(storeId)}?绑定后不可更改。是否继续?`, '确认绑定', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
|
||||
// 调用后端接口
|
||||
const payload = { receiving_id: receivingId, store_id: storeId }
|
||||
const res: any = await receivingApi.bindReceivingStore(payload)
|
||||
if (res && (res.code === 200 || res.flag === 'success')) {
|
||||
ElMessage.success(res.message || '绑定成功')
|
||||
storeBound.value = true
|
||||
// update local form and optionally props.row
|
||||
form.value.store_name = getStoreLabel(storeId)
|
||||
if (props.row) {
|
||||
props.row.store = props.row.store || {}
|
||||
props.row.store.id = storeId
|
||||
props.row.store.store_remask = form.value.store_name
|
||||
props.row.store_id = storeId
|
||||
}
|
||||
} else {
|
||||
ElMessage.error((res && res.message) || '绑定失败')
|
||||
}
|
||||
} catch (e: any) {
|
||||
// 取消或错误
|
||||
if (e === 'cancel') return
|
||||
console.error('bind store error', e)
|
||||
ElMessage.error('绑定过程中出错')
|
||||
}
|
||||
}
|
||||
|
||||
const getStoreLabel = (id: any) => {
|
||||
const opts = (availableFields.find(f => f.value === 'store_id') || {}).options || []
|
||||
const found = opts.find((o: any) => o.value === id)
|
||||
return found ? found.label : String(id)
|
||||
}
|
||||
|
||||
const handlePreview = (src: string) => {
|
||||
dialogImageUrl.value = src
|
||||
previewVisible.value = true
|
||||
@ -142,6 +234,10 @@ const handlePreview = (src: string) => {
|
||||
watch(() => props.row, (newRow) => {
|
||||
if (newRow) {
|
||||
form.value = { ...newRow }
|
||||
form.value.store_id = newRow.store?.id || newRow.store_id || ''
|
||||
form.value.store_name = newRow.store?.store_remask || newRow.store_name || form.value.store_name
|
||||
// 如果后端或数据表明已经绑定,设置 storeBound(保守:如果 row.bound === true)
|
||||
storeBound.value = !!(newRow.bound === true)
|
||||
}
|
||||
}, { immediate: true })
|
||||
|
||||
|
||||
@ -30,13 +30,26 @@
|
||||
@row-contextmenu="handleContextMenu"
|
||||
>
|
||||
<template #column-images="{ row }">
|
||||
<div class="image-slot">
|
||||
<div class="image-slot" style="display: flex; gap: 4px; flex-wrap: wrap;">
|
||||
<template v-if="row.images && row.images.length > 0">
|
||||
<el-image
|
||||
v-for="(img, index) in row.images"
|
||||
:key="img.id || index"
|
||||
style="width: 40px; height: 40px"
|
||||
:src="img.url"
|
||||
:preview-src-list="row.images.map((i: any) => i.url)"
|
||||
:initial-index="index"
|
||||
fit="cover"
|
||||
preview-teleported
|
||||
/>
|
||||
</template>
|
||||
<el-image
|
||||
v-if="row.images || row.image"
|
||||
v-else-if="row.image"
|
||||
style="width: 40px; height: 40px"
|
||||
:src="row.images || row.image"
|
||||
:preview-src-list="[row.images || row.image]"
|
||||
:src="row.image"
|
||||
:preview-src-list="[row.image]"
|
||||
fit="cover"
|
||||
preview-teleported
|
||||
/>
|
||||
<span v-else>--</span>
|
||||
</div>
|
||||
@ -71,11 +84,19 @@
|
||||
>
|
||||
快速关联
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="small"
|
||||
style="margin-left:8px"
|
||||
@click.stop="openAddDrawer(row)"
|
||||
>添加商品</el-button>
|
||||
</template>
|
||||
</UpperTable>
|
||||
</div>
|
||||
|
||||
<!-- 快速关联弹窗 -->
|
||||
<div v-if="quickLinkVisible" class="modal-backdrop" @click.stop></div>
|
||||
<div v-if="quickLinkVisible" class="product-window quick-link-window" :class="{ 'is-fullscreen': isQuickFullscreen }" :style="quickLinkStyle">
|
||||
<div class="window-header" @mousedown="startQuickDrag">
|
||||
<span class="window-title">快速关联 - {{ currentRow?.item_name || currentRow?.product_name }}</span>
|
||||
@ -89,24 +110,69 @@
|
||||
<el-alert title="请选择需要关联的系统商品" type="info" :closable="false" show-icon style="margin-bottom: 15px;" />
|
||||
<!-- 这里可以放置商品搜索和选择列表 -->
|
||||
<div class="search-section">
|
||||
<el-input v-model="quickSearchQuery" placeholder="输入商品名称或条码搜索" class="search-input">
|
||||
<template #append>
|
||||
<el-button :icon="Search">搜索</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="system-product-list">
|
||||
<!-- 占位,实际开发中会是一个表格 -->
|
||||
<el-empty description="暂无系统商品数据,请搜索或关联" />
|
||||
<el-form label-position="left" label-width="60px" class="search-form">
|
||||
<el-form-item label="货主">
|
||||
<el-input :value="quickLinkStore?.name || quickLinkStore?.store_remask || quickLinkStore?.store_name" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="quickSearchQuery" placeholder="输入商品名称或条码搜索" class="search-input">
|
||||
<template #append>
|
||||
<el-button :icon="Search" @click="() => performQuickSearch(1)">搜索</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="system-product-list" style="display:flex; flex-direction:column;">
|
||||
<el-table
|
||||
:data="quickSearchResults"
|
||||
v-loading="quickSearchLoading"
|
||||
highlight-current-row
|
||||
stripe
|
||||
size="small"
|
||||
:row-key="(row: { id: any }) => row.id"
|
||||
@current-change="onSystemProductChange"
|
||||
@row-click="onSystemProductChange"
|
||||
:height="360"
|
||||
style="width:100%"
|
||||
:row-class-name="tableRowClassName"
|
||||
>
|
||||
<el-table-column prop="id" label="ID" width="80" />
|
||||
<el-table-column prop="item_name" label="名称" show-overflow-tooltip />
|
||||
<el-table-column prop="barcodes" label="条码" width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="store_name" label="货主" width="150" show-overflow-tooltip />
|
||||
<template #empty>
|
||||
<div style="padding:24px; text-align:center; color:#909399;">暂无系统商品数据,请搜索或关联</div>
|
||||
</template>
|
||||
</el-table>
|
||||
|
||||
<div class="pagination-container" style="padding:8px; text-align:right;">
|
||||
<el-pagination
|
||||
background
|
||||
small
|
||||
:current-page="quickResultPagination.page"
|
||||
:page-size="quickResultPagination.pageSize"
|
||||
:total="quickResultPagination.total"
|
||||
@current-change="performQuickSearch"
|
||||
@size-change="onQuickPageSizeChange"
|
||||
layout="prev, pager, next, sizes, total"
|
||||
:page-sizes="[10,20,50,100]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="window-body-bottom">
|
||||
<el-button size="small" @click="quickLinkVisible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="confirmQuickLink" disabled>完成关联</el-button>
|
||||
<el-button size="small" type="primary" @click="confirmQuickLink" :disabled="!selectedSystemProduct">完成关联</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 添加商品抽屉(复用 stock add.vue) -->
|
||||
<el-drawer v-model="addDrawerVisible" title="添加商品" :append-to-body="true" size="800px">
|
||||
<AddProduct ref="addCompRef" :initialStore="addDrawerStore" :storeDisabled="true" />
|
||||
</el-drawer>
|
||||
|
||||
<!-- 右键菜单 -->
|
||||
<div v-if="menuVisible" :style="{ top: menuTop + 'px', left: menuLeft + 'px' }" class="context-menu">
|
||||
<div class="menu-item" @click="handleProductDetail">货品详情</div>
|
||||
@ -163,12 +229,15 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted, computed, reactive, watch } from 'vue'
|
||||
import { ref, onMounted, onUnmounted, computed, reactive, watch, nextTick } from 'vue'
|
||||
import { productdetail, productquick, productsnapshop, windowtopbar, formatProductStorageStatus } from '../receiving-config'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { FullScreen, Close, CopyDocument, Search } from '@element-plus/icons-vue'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
import AddProduct from '@/views/stock/stock/component/add.vue'
|
||||
import * as receivingApi from '@/api/storage/receiving'
|
||||
import * as stockApi from '@/api/stock'
|
||||
import { buildStockQuery } from '@/utils/stockQueryBuilder'
|
||||
|
||||
import basic from '../window/basic.vue'
|
||||
import log from '../window/log.vue'
|
||||
@ -178,7 +247,8 @@ const props = defineProps<{
|
||||
id?: string | number,
|
||||
productData?: any[],
|
||||
loading?: boolean,
|
||||
productTotal?: number
|
||||
productTotal?: number,
|
||||
row?: any
|
||||
}>()
|
||||
|
||||
// 模拟数据
|
||||
@ -431,6 +501,17 @@ const quickPosition = ref({ x: 250, y: 150 })
|
||||
const isQuickDragging = ref(false)
|
||||
const quickDragOffset = ref({ x: 0, y: 0 })
|
||||
const quickSearchQuery = ref('')
|
||||
const quickLinkStore = ref<any>(null)
|
||||
// 快速关联搜索结果状态
|
||||
const quickSearchResults = ref<any[]>([])
|
||||
const quickSearchLoading = ref(false)
|
||||
const quickResultPagination = reactive({ page: 1, pageSize: 10, total: 0 })
|
||||
const selectedSystemProduct = ref<any>(null)
|
||||
|
||||
// 添加商品抽屉
|
||||
const addDrawerVisible = ref(false)
|
||||
const addDrawerStore = ref<any>(null)
|
||||
const addCompRef = ref<any>(null)
|
||||
|
||||
const windowStyle = computed(() => {
|
||||
if (isFullscreen.value) return {}
|
||||
@ -448,6 +529,20 @@ const quickLinkStyle = computed(() => {
|
||||
}
|
||||
})
|
||||
|
||||
const openAddDrawer = (row: any) => {
|
||||
// row here is product row, but store info comes from parent receiving row (props.row)
|
||||
addDrawerStore.value = props.row?.store || { id: props.row?.store_id, name: props.row?.store_name }
|
||||
addDrawerVisible.value = true
|
||||
// allow child to initialize with store after mount
|
||||
nextTick(() => {
|
||||
if (addCompRef.value && addDrawerStore.value) {
|
||||
try {
|
||||
addCompRef.value.formData && (addCompRef.value.formData.store_id = addDrawerStore.value.id || addDrawerStore.value.store_id || addDrawerStore.value.storeId)
|
||||
} catch (e) {}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
multipleSelection.value = val
|
||||
}
|
||||
@ -481,11 +576,81 @@ const handleQuickLink = (row: any) => {
|
||||
quickPosition.value = { x: 300, y: 150 }
|
||||
isQuickFullscreen.value = false
|
||||
quickSearchQuery.value = row.product_name || row.item_name || ''
|
||||
// 优先使用商品行中可能包含的收货单货主(例如 row.receiving.store),
|
||||
// 否则使用父组件传入的收货单(props.row)信息作为回退
|
||||
const storeFromDetail = row?.receiving?.store || row?.store || (row && (row.store_id || row.store_name) ? { id: row.store_id, name: row.store_name } : null)
|
||||
const storeFromParent = props.row?.store || (props.row && (props.row.store_id || props.row.store_name) ? { id: props.row.store_id, name: props.row.store_name } : null)
|
||||
quickLinkStore.value = storeFromDetail || storeFromParent || null
|
||||
// 打开弹窗后立即搜索一次(如果有关键字或货主)
|
||||
performQuickSearch(1)
|
||||
}
|
||||
|
||||
const onSystemProductChange = (row: any) => {
|
||||
selectedSystemProduct.value = row
|
||||
}
|
||||
|
||||
const tableRowClassName = (row: any) => {
|
||||
return 'clickable-row'
|
||||
}
|
||||
|
||||
const onQuickPageSizeChange = (size: number) => {
|
||||
quickResultPagination.pageSize = size
|
||||
performQuickSearch(1)
|
||||
}
|
||||
|
||||
const performQuickSearch = async (page = 1) => {
|
||||
quickSearchLoading.value = true
|
||||
try {
|
||||
const paginationParam = { page, pageSize: quickResultPagination.pageSize }
|
||||
// 构造符合后端期望的 where,对关键字智能判断使用条码或名称模糊匹配
|
||||
const params: any = {}
|
||||
if (quickLinkStore.value && (quickLinkStore.value.id || quickLinkStore.value.store_id)) {
|
||||
params.store_id = quickLinkStore.value.id || quickLinkStore.value.store_id
|
||||
}
|
||||
if (quickSearchQuery.value) {
|
||||
const q = String(quickSearchQuery.value).trim()
|
||||
// 如果看起来像条码(全数字且长度>=6),优先按条码搜索,否则按名称模糊搜索
|
||||
if (/^\d{6,}$/.test(q)) {
|
||||
params.barcodes = { operator: 'like', value: q }
|
||||
} else {
|
||||
params.item_name = { operator: 'like', value: q }
|
||||
}
|
||||
}
|
||||
const where = buildStockQuery(params)
|
||||
const res: any = await stockApi.stockWarehouse(paginationParam, where)
|
||||
if (res && res.data) {
|
||||
quickSearchResults.value = res.data.list || []
|
||||
quickResultPagination.total = res.data.pagination?.total || res.data.total || quickSearchResults.value.length
|
||||
quickResultPagination.page = page
|
||||
} else {
|
||||
quickSearchResults.value = []
|
||||
quickResultPagination.total = 0
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('快速关联搜索失败', e)
|
||||
ElMessage.error('搜索失败')
|
||||
quickSearchResults.value = []
|
||||
quickResultPagination.total = 0
|
||||
} finally {
|
||||
quickSearchLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const confirmQuickLink = () => {
|
||||
ElMessage.success('关联成功')
|
||||
quickLinkVisible.value = false
|
||||
if (!selectedSystemProduct.value) {
|
||||
ElMessage.warning('请先选择一个系统商品')
|
||||
return
|
||||
}
|
||||
try {
|
||||
// 将选择的系统商品信息写回当前行(仅本地映射,真实业务可能需要调用接口)
|
||||
currentRow.value.system_product_id = selectedSystemProduct.value.id
|
||||
currentRow.value.system_product = selectedSystemProduct.value
|
||||
ElMessage.success('关联成功')
|
||||
quickLinkVisible.value = false
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
ElMessage.error('关联失败')
|
||||
}
|
||||
}
|
||||
|
||||
const toggleFullscreen = () => {
|
||||
@ -629,6 +794,22 @@ onUnmounted(() => {
|
||||
z-index: 3000;
|
||||
}
|
||||
|
||||
/* 遮罩层:阻止快速关联弹窗打开时对下层页面的交互 */
|
||||
.modal-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0,0,0,0.18);
|
||||
z-index: 2400;
|
||||
}
|
||||
|
||||
/* 确保快速关联弹窗高于遮罩层 */
|
||||
.product-window.quick-link-window {
|
||||
z-index: 2500;
|
||||
}
|
||||
|
||||
.window-header {
|
||||
padding: 8px 12px;
|
||||
background: #f5f7fa;
|
||||
@ -731,8 +912,11 @@ onUnmounted(() => {
|
||||
border-radius: 4px;
|
||||
background-color: #fafafa;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.clickable-row {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.context-menu {
|
||||
|
||||
85
src/views/store/component/detail.vue
Normal file
85
src/views/store/component/detail.vue
Normal file
@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="panel-header">
|
||||
<span>签约单详情:{{ row.id }}</span>
|
||||
<div class="header-ops">
|
||||
<el-button size="small" type="primary" @click="$emit('view-detail', row)">更多详情</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<el-descriptions :column="3" border size="small">
|
||||
<template v-for="item in detailPanel" :key="item.prop">
|
||||
<el-descriptions-item :label="item.label" :span="item.span || 1">
|
||||
<template v-if="item.prop === 'current_subject_role'">
|
||||
<el-tag size="small" :type="row.current_subject_role === 'warehouse' ? 'primary' : 'warning'">
|
||||
{{ row.current_subject_role === 'warehouse' ? '仓库方' : '货主方' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
<template v-else-if="item.prop === 'auth_status'">
|
||||
<el-tag size="small" :type="getAuthStatusType(row.auth_status)">
|
||||
{{ getAuthStatusLabel(row.auth_status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
<template v-else-if="item.prop === 'auth_period'">
|
||||
{{ formatDate(row.auth_start) || '—' }} 至 {{ formatDate(row.auth_end) || '—' }}
|
||||
<span v-if="row.remaining_days !== undefined"> ({{ row.remaining_days }}天)</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="item.prop === 'qimen_config'">
|
||||
<template v-if="row.qimen_config">
|
||||
<template v-if="Array.isArray(row.qimen_config) && row.qimen_config.length">
|
||||
<div v-for="cfg in row.qimen_config" :key="cfg.interface_type_id" class="qimen-summary">
|
||||
<span>{{ cfg.app_name }}({{ cfg.interface_name }})</span>
|
||||
<span class="qimen-info">AppKey: {{ cfg.qimen_app_key }},客户ID: {{ cfg.qimen_customer_id }},仓库编码: {{ cfg.qimen_warehouse_code }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="typeof row.qimen_config === 'object'">
|
||||
<div class="qimen-summary">
|
||||
<span>{{ row.qimen_config.app_name }}({{ row.qimen_config.interface_name }})</span>
|
||||
<span class="qimen-info">AppKey: {{ row.qimen_config.qimen_app_key }},客户ID: {{ row.qimen_config.qimen_customer_id }},仓库编码: {{ row.qimen_config.qimen_warehouse_code }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<span v-else style="color:#aaa">未配置</span>
|
||||
</template>
|
||||
<span v-else style="color:#aaa">未配置</span>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
{{ (row[item.prop] !== undefined && row[item.prop] !== null && row[item.prop] !== '') ? row[item.prop] : '—' }}
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { detailPanel } from '../store-config'
|
||||
const props = defineProps({
|
||||
row: { type: Object, required: true },
|
||||
getAuthStatusType: { type: Function, required: true },
|
||||
getAuthStatusLabel: { type: Function, required: true },
|
||||
formatDate: { type: Function, required: true }
|
||||
})
|
||||
const emit = defineEmits(['view-detail'])
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.panel-header {
|
||||
padding: 10px 16px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
.panel-body {
|
||||
flex: 1;
|
||||
padding: 16px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
@ -48,8 +48,8 @@
|
||||
@page-size-change="handleSizeChange"
|
||||
>
|
||||
<template #column-counterparty_name="{ row }">
|
||||
<span>{{ row.store_remask }}</span>
|
||||
<span v-if="row.store_remask && row.store_remask !== row.store_name" class="real-name">({{ row.store_name }})</span>
|
||||
<span>{{ row.remask || row.counterparty_name }}</span>
|
||||
<span v-if="row.remask && row.remask !== row.counterparty_name" class="real-name">({{ row.counterparty_name }})</span>
|
||||
</template>
|
||||
<template #column-current_subject_role="{ row }">
|
||||
<el-tag size="small" :type="row.current_subject_role === 'warehouse' ? 'primary' : 'warning'" effect="light">
|
||||
@ -76,17 +76,34 @@
|
||||
{{ row.remaining_days > 0 ? row.remaining_days + '天' : '—' }}
|
||||
</span>
|
||||
</template>
|
||||
<template #column-qimen_config="{ row }">
|
||||
<el-tag
|
||||
v-if="row.qimen_config"
|
||||
size="small"
|
||||
type="success"
|
||||
effect="plain"
|
||||
@click.stop="openQimenDialog(row)"
|
||||
style="cursor:pointer"
|
||||
>已配置</el-tag>
|
||||
<el-tag v-else size="small" type="info" effect="plain">未配置</el-tag>
|
||||
</template>
|
||||
<template #column-apply_time="{ row }">
|
||||
{{ formatDate(row.apply_time) }}
|
||||
</template>
|
||||
<template #column-actions="{ row }">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
link
|
||||
@click.stop="handleRename(row)"
|
||||
>修改备注</el-button>
|
||||
<el-button
|
||||
v-if="row.use_status === 1"
|
||||
size="small"
|
||||
type="danger"
|
||||
link
|
||||
@click.stop="handleUnbind(row, 0)"
|
||||
>解约</el-button>
|
||||
>禁用</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
size="small"
|
||||
@ -94,39 +111,25 @@
|
||||
link
|
||||
@click.stop="handleUnbind(row, 1)"
|
||||
>启用</el-button>
|
||||
<el-button
|
||||
v-if="row.current_subject_role === 'warehouse'"
|
||||
size="small"
|
||||
type="warning"
|
||||
link
|
||||
@click.stop="openQimenDialog(row)"
|
||||
>奇门配置</el-button>
|
||||
</template>
|
||||
</upper-table>
|
||||
</div>
|
||||
|
||||
<div class="detail-panel" v-if="selectedRow">
|
||||
<div class="panel-header">
|
||||
<span>签约单详情:{{ selectedRow.id }}</span>
|
||||
<div class="header-ops">
|
||||
<el-button size="small" type="primary" @click="handleViewDetail(selectedRow)">更多详情</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<el-descriptions :column="3" border size="small">
|
||||
<el-descriptions-item label="签约ID">{{ selectedRow.id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="当前角色">
|
||||
<el-tag size="small" :type="selectedRow.current_subject_role === 'warehouse' ? 'primary' : 'warning'">
|
||||
{{ selectedRow.current_subject_role === 'warehouse' ? '仓库方' : '货主方' }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="签约状态">
|
||||
<el-tag size="small" :type="getAuthStatusType(selectedRow.auth_status)">
|
||||
{{ selectedRow.auth_status_label }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="货主">{{ selectedRow.store_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ selectedRow.remask || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ formatDate(selectedRow.apply_time) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="授权有效期" :span="2">
|
||||
{{ formatDate(selectedRow.auth_start) }} 至 {{ formatDate(selectedRow.auth_end) }} ({{ selectedRow.remaining_days }}天)
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见">{{ selectedRow.review_comment || '—' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<Detail
|
||||
:row="selectedRow"
|
||||
:getAuthStatusType="getAuthStatusType"
|
||||
:getAuthStatusLabel="getAuthStatusLabel"
|
||||
:formatDate="formatDate"
|
||||
@view-detail="handleViewDetail"
|
||||
/>
|
||||
</div>
|
||||
<div class="detail-panel empty" v-else>
|
||||
<el-empty description="请选择数据查看详情" :image-size="60" />
|
||||
@ -240,7 +243,7 @@
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="货主名称">{{ detailDialog.row.store_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="货主备注">{{ detailDialog.row.store_remask || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="货主备注">{{ detailDialog.row.remask || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="仓库名称">{{ detailDialog.row.warehouse_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="仓库备注">{{ detailDialog.row.warehouse_remask || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="签约状态">
|
||||
@ -267,9 +270,186 @@
|
||||
<el-descriptions-item label="审核时间">{{ formatDate(detailDialog.row.review_time) || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="打印次数">{{ detailDialog.row.print_quantity }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ detailDialog.row.remask || '—' }}</el-descriptions-item>
|
||||
<!-- 奇门接口配置 -->
|
||||
<el-descriptions-item label="奇门配置" :span="2">
|
||||
<!-- 支持数组和单对象两种后端返回格式 -->
|
||||
<template v-if="detailDialog.row.qimen_config && Array.isArray(detailDialog.row.qimen_config) && detailDialog.row.qimen_config.length">
|
||||
<div v-for="(cfg, idx) in detailDialog.row.qimen_config" :key="cfg.id || idx" style="margin-bottom:8px">
|
||||
<div class="qimen-summary">
|
||||
<strong>{{ cfg.app_name }}</strong>
|
||||
<el-tag size="small" :type="cfg.is_enabled ? 'success' : 'info'" style="margin-left:6px">
|
||||
{{ cfg.is_enabled ? '启用' : '停用' }}
|
||||
</el-tag>
|
||||
<span style="margin-left:8px;color:#999">{{ cfg.interface_name || cfg.interface_category || cfg.interface_code }}</span>
|
||||
</div>
|
||||
<div class="qimen-info">
|
||||
<span>AppKey:{{ cfg.qimen_app_key }}</span>
|
||||
<span style="margin-left:12px">客户ID:{{ cfg.qimen_customer_id }}</span>
|
||||
<span style="margin-left:12px">仓库编码:{{ cfg.qimen_warehouse_code }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="detailDialog.row.qimen_config && typeof detailDialog.row.qimen_config === 'object'">
|
||||
<div class="qimen-summary">
|
||||
<strong>{{ detailDialog.row.qimen_config.app_name }}</strong>
|
||||
<el-tag size="small" :type="detailDialog.row.qimen_config.is_enabled ? 'success' : 'info'" style="margin-left:6px">
|
||||
{{ detailDialog.row.qimen_config.is_enabled ? '启用' : '停用' }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<div class="qimen-info">
|
||||
<span>AppKey:{{ detailDialog.row.qimen_config.qimen_app_key }}</span>
|
||||
<span style="margin-left:12px">客户ID:{{ detailDialog.row.qimen_config.qimen_customer_id }}</span>
|
||||
<span style="margin-left:12px">仓库编码:{{ detailDialog.row.qimen_config.qimen_warehouse_code }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<span v-else style="color:#aaa">未配置</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template #footer>
|
||||
<el-button size="small" @click="detailDialog.visible = false">关闭</el-button>
|
||||
<el-button
|
||||
v-if="detailDialog.row?.current_subject_role === 'warehouse'"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="() => { detailDialog.visible = false; openQimenDialog(detailDialog.row) }"
|
||||
>管理奇门配置</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 奇门接口配置管理弹窗 -->
|
||||
<el-dialog
|
||||
v-model="qimenDialog.visible"
|
||||
:title="`奇门接口配置 — ${qimenDialog.contractRow?.remask || qimenDialog.contractRow?.counterparty_name || ''}`"
|
||||
width="820px"
|
||||
align-center
|
||||
:close-on-click-modal="false"
|
||||
@close="resetQimenDialog"
|
||||
>
|
||||
<div v-if="!qimenDialog.formVisible">
|
||||
<div style="display:flex;justify-content:flex-end;margin-bottom:10px">
|
||||
<el-button size="small" type="primary" @click="openQimenForm(null)">
|
||||
<el-icon><Plus /></el-icon> 新增配置
|
||||
</el-button>
|
||||
<el-button size="small" @click="loadQimenConfigs" style="margin-left:8px">
|
||||
<el-icon><Refresh /></el-icon> 刷新
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="qimenDialog.list" v-loading="qimenDialog.loading" size="small" border>
|
||||
<el-table-column prop="app_name" label="应用名称" min-width="130" />
|
||||
<el-table-column prop="interface_name" label="接口类型" width="120" />
|
||||
<el-table-column prop="qimen_app_key" label="AppKey" width="120" />
|
||||
<el-table-column prop="qimen_customer_id" label="客户ID" width="130" />
|
||||
<el-table-column prop="qimen_warehouse_code" label="仓库编码" width="110" />
|
||||
<el-table-column label="状态" width="70" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag size="small" :type="row.is_enabled ? 'success' : 'info'">
|
||||
{{ row.is_enabled ? '启用' : '停用' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button size="small" type="primary" link @click="openQimenForm(row)">编辑</el-button>
|
||||
<el-button size="small" type="danger" link @click="handleDeleteQimenConfig(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #empty>
|
||||
<el-empty description="暂无奇门配置" :image-size="50" />
|
||||
</template>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<!-- 保存表单 -->
|
||||
<div v-else>
|
||||
<el-page-header @back="qimenDialog.formVisible = false" style="margin-bottom:16px">
|
||||
<template #content>{{ qimenDialog.editingConfig ? '编辑配置' : '新增配置' }}</template>
|
||||
</el-page-header>
|
||||
<el-form :model="qimenForm" label-width="110px" size="small" class="qimen-form">
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="奇门AppKey" required>
|
||||
<el-input v-model="qimenForm.qimen_app_key" placeholder="请输入奇门对方AppKey" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户ID" required>
|
||||
<el-input v-model="qimenForm.qimen_customer_id" placeholder="奇门客户ID/货主编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库编码" required>
|
||||
<el-input v-model="qimenForm.qimen_warehouse_code" placeholder="奇门仓库编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="应用名称">
|
||||
<el-input v-model="qimenForm.app_name" placeholder="不填则自动生成" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="API版本">
|
||||
<el-input v-model="qimenForm.api_version" placeholder="默认1.0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="签名方式">
|
||||
<el-select v-model="qimenForm.sign_method" style="width:100%">
|
||||
<el-option label="md5" value="md5" />
|
||||
<el-option label="hmac" value="hmac" />
|
||||
<el-option label="sha256" value="sha256" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="限流(次/分)">
|
||||
<el-input-number v-model="qimenForm.rate_limit" :min="1" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="超时(秒)">
|
||||
<el-input-number v-model="qimenForm.timeout_seconds" :min="1" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人">
|
||||
<el-input v-model="qimenForm.contact_person" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话">
|
||||
<el-input v-model="qimenForm.contact_phone" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱">
|
||||
<el-input v-model="qimenForm.email" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否启用">
|
||||
<el-switch
|
||||
v-model="qimenForm.is_enabled"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-text="启用"
|
||||
inactive-text="停用"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<template v-if="!qimenDialog.formVisible">
|
||||
<el-button size="small" @click="qimenDialog.visible = false">关闭</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button size="small" @click="qimenDialog.formVisible = false">返回</el-button>
|
||||
<el-button size="small" type="primary" :loading="qimenDialog.formLoading" @click="submitQimenForm">
|
||||
{{ qimenDialog.editingConfig ? '保存修改' : '确认新增' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -279,10 +459,11 @@
|
||||
import { ref, reactive, onMounted, computed } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { Search, Plus, Refresh } from '@element-plus/icons-vue'
|
||||
import { storeWarehouseList, storeWarehouseSign, storeWarehouseUnbind } from '@/api/store'
|
||||
import { storeWarehouseList, storeWarehouseSign, storeWarehouseUnbind, storeWarehouseRename, storeWarehouseListQimenConfig, storeWarehouseSaveQimenConfig, storeWarehouseDeleteQimenConfig } from '@/api/storeWarehouse'
|
||||
import ScanBox from '@/components/ScanBox/index.vue'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
import { columns as defaultColumns, availableFields as defaultAvailableFields, presetTree as defaultPresetTree } from './store-config'
|
||||
import Detail from './component/detail.vue'
|
||||
import { columns as defaultColumns, availableFields as defaultAvailableFields, presetTree as defaultPresetTree, signDialogDefault, signFormDefault, qimenFormDefault } from './store-config'
|
||||
|
||||
// ─── 列表 ───────────────────────────────────────────────────────────────────
|
||||
const loading = ref(false)
|
||||
@ -291,7 +472,7 @@ const selectedRow = ref<any>(null)
|
||||
const tableRef = ref<any>(null)
|
||||
const scanBox = ref<any>(null)
|
||||
|
||||
const pagination = reactive({ page: 1, page_size: 20, total: 0 })
|
||||
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
|
||||
const queryForm = reactive<{
|
||||
keyword: string
|
||||
auth_status: number | undefined
|
||||
@ -306,8 +487,8 @@ async function loadList() {
|
||||
loading.value = true
|
||||
try {
|
||||
const params: any = {
|
||||
page: pagination.page,
|
||||
page_size: pagination.page_size,
|
||||
page: pagination.currentPage,
|
||||
page_size: pagination.pageSize,
|
||||
...currentCondition.value
|
||||
}
|
||||
if (queryForm.keyword) params.keyword = queryForm.keyword
|
||||
@ -344,12 +525,12 @@ function handleConditionChange(condition: any) {
|
||||
}
|
||||
|
||||
currentCondition.value = where
|
||||
pagination.page = 1
|
||||
pagination.currentPage = 1
|
||||
loadList()
|
||||
}
|
||||
|
||||
function handleSearch() {
|
||||
pagination.page = 1
|
||||
pagination.currentPage = 1
|
||||
loadList()
|
||||
}
|
||||
|
||||
@ -357,18 +538,18 @@ function handleReset() {
|
||||
queryForm.keyword = ''
|
||||
currentCondition.value = {}
|
||||
if (scanBox.value?.reset) scanBox.value.reset()
|
||||
pagination.page = 1
|
||||
pagination.currentPage = 1
|
||||
loadList()
|
||||
}
|
||||
|
||||
function handlePageChange(page: number) {
|
||||
pagination.page = page
|
||||
pagination.currentPage = page
|
||||
loadList()
|
||||
}
|
||||
|
||||
function handleSizeChange(size: number) {
|
||||
pagination.page_size = size
|
||||
pagination.page = 1
|
||||
pagination.pageSize = size
|
||||
pagination.currentPage = 1
|
||||
loadList()
|
||||
}
|
||||
|
||||
@ -422,18 +603,35 @@ async function handleUnbind(row: any, targetStatus: number) {
|
||||
}
|
||||
}
|
||||
|
||||
// ─── 发起签约 ────────────────────────────────────────────────────────────────
|
||||
const signDialog = reactive({
|
||||
visible: false,
|
||||
title: '发起签约',
|
||||
step: 1, // 1=填写信息, 2=临时码/预览/确认
|
||||
loading: false,
|
||||
mode: '', // initiate / preview / confirm
|
||||
tempCode: '',
|
||||
contract: null as any
|
||||
})
|
||||
async function handleRename(row: any) {
|
||||
try {
|
||||
const { value } = await ElMessageBox.prompt('请输入新的备注名称', '修改备注', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputValue: row.remask || row.counterparty_name,
|
||||
})
|
||||
const res = await storeWarehouseRename({
|
||||
id: row.id,
|
||||
counterparty_id: row.counterparty_id,
|
||||
remask: value
|
||||
}) as any
|
||||
if (res?.flag === 'success' || res?.code === 200) {
|
||||
ElMessage.success('修改备注成功')
|
||||
loadList()
|
||||
if (selectedRow.value && selectedRow.value.id === row.id) {
|
||||
selectedRow.value.remask = value
|
||||
}
|
||||
} else {
|
||||
ElMessage.error(res?.message || '修改备注失败')
|
||||
}
|
||||
} catch {
|
||||
// cancelled
|
||||
}
|
||||
}
|
||||
|
||||
const signForm = reactive({ counterparty_id: undefined as number | undefined, remask: '' })
|
||||
// ─── 发起签约 ────────────────────────────────────────────────────────────────
|
||||
const signDialog = reactive({ ...signDialogDefault })
|
||||
const signForm = reactive({ ...signFormDefault })
|
||||
|
||||
function openSignDialog() {
|
||||
resetSignDialog()
|
||||
@ -441,14 +639,8 @@ function openSignDialog() {
|
||||
}
|
||||
|
||||
function resetSignDialog() {
|
||||
signDialog.step = 1
|
||||
signDialog.title = '发起签约'
|
||||
signDialog.loading = false
|
||||
signDialog.mode = ''
|
||||
signDialog.tempCode = ''
|
||||
signDialog.contract = null
|
||||
signForm.counterparty_id = undefined
|
||||
signForm.remask = ''
|
||||
Object.assign(signDialog, signDialogDefault)
|
||||
Object.assign(signForm, signFormDefault)
|
||||
}
|
||||
|
||||
async function doInitiateSign() {
|
||||
@ -528,6 +720,131 @@ function handleViewDetail(row: any) {
|
||||
detailDialog.visible = true
|
||||
}
|
||||
|
||||
// ─── 奇门接口配置管理 ─────────────────────────────────────────────────────────
|
||||
const qimenDialog = reactive({
|
||||
visible: false,
|
||||
loading: false,
|
||||
contractRow: null as any,
|
||||
list: [] as any[],
|
||||
total: 0,
|
||||
contract: null as any,
|
||||
formVisible: false,
|
||||
formLoading: false,
|
||||
editingConfig: null as any
|
||||
})
|
||||
|
||||
const qimenForm = reactive({ ...qimenFormDefault })
|
||||
|
||||
function openQimenDialog(row: any) {
|
||||
qimenDialog.contractRow = row
|
||||
qimenDialog.formVisible = false
|
||||
qimenDialog.editingConfig = null
|
||||
qimenDialog.list = []
|
||||
qimenDialog.visible = true
|
||||
loadQimenConfigs()
|
||||
}
|
||||
|
||||
function resetQimenDialog() {
|
||||
qimenDialog.contractRow = null
|
||||
qimenDialog.formVisible = false
|
||||
qimenDialog.editingConfig = null
|
||||
qimenDialog.list = []
|
||||
}
|
||||
|
||||
async function loadQimenConfigs() {
|
||||
if (!qimenDialog.contractRow) return
|
||||
qimenDialog.loading = true
|
||||
try {
|
||||
const res = await storeWarehouseListQimenConfig({
|
||||
id: qimenDialog.contractRow.id,
|
||||
counterparty_id: qimenDialog.contractRow.counterparty_id
|
||||
}) as any
|
||||
if (res?.data) {
|
||||
qimenDialog.list = res.data.list || []
|
||||
qimenDialog.total = res.data.total || 0
|
||||
qimenDialog.contract = res.data.contract || null
|
||||
}
|
||||
} catch {
|
||||
ElMessage.error('加载奇门配置失败')
|
||||
} finally {
|
||||
qimenDialog.loading = false
|
||||
}
|
||||
}
|
||||
|
||||
function openQimenForm(config: any) {
|
||||
qimenDialog.editingConfig = config
|
||||
if (config) {
|
||||
Object.assign(qimenForm, qimenFormDefault, config)
|
||||
// 兼容rate_limit/timeout_seconds/is_enabled为0的情况
|
||||
if (config.rate_limit !== undefined) qimenForm.rate_limit = config.rate_limit
|
||||
if (config.timeout_seconds !== undefined) qimenForm.timeout_seconds = config.timeout_seconds
|
||||
if (config.is_enabled !== undefined) qimenForm.is_enabled = config.is_enabled
|
||||
} else {
|
||||
Object.assign(qimenForm, qimenFormDefault)
|
||||
}
|
||||
qimenDialog.formVisible = true
|
||||
}
|
||||
|
||||
async function submitQimenForm() {
|
||||
if (!qimenForm.qimen_app_key || !qimenForm.qimen_customer_id || !qimenForm.qimen_warehouse_code) {
|
||||
ElMessage.warning('请填写奇门AppKey、客户ID和仓库编码')
|
||||
return
|
||||
}
|
||||
qimenDialog.formLoading = true
|
||||
try {
|
||||
const payload: any = {
|
||||
id: qimenDialog.contractRow?.id,
|
||||
counterparty_id: qimenDialog.contractRow?.counterparty_id,
|
||||
...qimenForm
|
||||
}
|
||||
if (qimenDialog.editingConfig?.interface_type_id) {
|
||||
payload.interface_type_id = qimenDialog.editingConfig.interface_type_id
|
||||
}
|
||||
const res = await storeWarehouseSaveQimenConfig(payload) as any
|
||||
if (res?.flag === 'success' || res?.code === 200) {
|
||||
const action = res.data?.action === 'create' ? '新增' : '更新'
|
||||
ElMessage.success(`奇门配置${action}成功`)
|
||||
qimenDialog.formVisible = false
|
||||
await loadQimenConfigs()
|
||||
loadList()
|
||||
} else {
|
||||
ElMessage.error(res?.message || '保存奇门配置失败')
|
||||
}
|
||||
} catch {
|
||||
ElMessage.error('保存奇门配置失败')
|
||||
} finally {
|
||||
qimenDialog.formLoading = false
|
||||
}
|
||||
}
|
||||
|
||||
async function handleDeleteQimenConfig(config: any) {
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确认要删除奇门配置「${config.app_name}」吗?删除后签约关系将无奇门配置。`,
|
||||
'删除奇门配置',
|
||||
{ type: 'warning', confirmButtonText: '确认删除', cancelButtonText: '取消' }
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
try {
|
||||
const res = await storeWarehouseDeleteQimenConfig({
|
||||
id: qimenDialog.contractRow?.id,
|
||||
counterparty_id: qimenDialog.contractRow?.counterparty_id,
|
||||
interface_type_id: config.interface_type_id
|
||||
}) as any
|
||||
if (res?.flag === 'success' || res?.code === 200) {
|
||||
ElMessage.success('删除成功')
|
||||
await loadQimenConfigs()
|
||||
loadList()
|
||||
} else {
|
||||
ElMessage.error(res?.message || '删除失败')
|
||||
}
|
||||
} catch {
|
||||
ElMessage.error('删除失败')
|
||||
}
|
||||
}
|
||||
|
||||
// ─── 初始化 ───────────────────────────────────────────────────────────────────
|
||||
onMounted(loadList)
|
||||
</script>
|
||||
@ -620,4 +937,21 @@ onMounted(loadList)
|
||||
margin-top: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.qimen-summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.qimen-info {
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.qimen-form {
|
||||
.el-input-number {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,3 +1,35 @@
|
||||
// 签约弹窗默认配置
|
||||
export const signDialogDefault = {
|
||||
visible: false,
|
||||
title: '发起签约',
|
||||
step: 1, // 1=填写信息, 2=临时码/预览/确认
|
||||
loading: false,
|
||||
mode: '', // initiate / preview / confirm
|
||||
tempCode: '',
|
||||
contract: null as any
|
||||
}
|
||||
|
||||
// 签约表单默认配置
|
||||
export const signFormDefault = {
|
||||
counterparty_id: undefined as number | undefined,
|
||||
remask: ''
|
||||
}
|
||||
|
||||
// 奇门表单默认配置
|
||||
export const qimenFormDefault = {
|
||||
app_name: '',
|
||||
qimen_app_key: '',
|
||||
qimen_customer_id: '',
|
||||
qimen_warehouse_code: '',
|
||||
api_version: '1.0',
|
||||
sign_method: 'md5',
|
||||
rate_limit: 1000,
|
||||
timeout_seconds: 30,
|
||||
contact_person: '',
|
||||
contact_phone: '',
|
||||
email: '',
|
||||
is_enabled: 1 as number
|
||||
}
|
||||
export const columns = [
|
||||
{ prop: 'counterparty_name', label: '对方主体', minWidth: 140 },
|
||||
{ prop: 'current_subject_role', label: '当前角色', width: 90, align: 'center' },
|
||||
@ -5,12 +37,13 @@ export const columns = [
|
||||
{ prop: 'use_status', label: '使用状态', width: 90, align: 'center' },
|
||||
{ prop: 'is_auth_valid', label: '授权有效', width: 90, align: 'center' },
|
||||
{ prop: 'remaining_days', label: '剩余天数', width: 90, align: 'center' },
|
||||
{ prop: 'qimen_config', label: '奇门配置', width: 100, align: 'center' },
|
||||
{ prop: 'apply_time', label: '申请时间', width: 160, align: 'center' },
|
||||
{ prop: 'actions', label: '操作', width: 120, align: 'center', fixed: 'right' }
|
||||
{ prop: 'actions', label: '操作', width: 200, align: 'center', fixed: 'right' }
|
||||
]
|
||||
|
||||
export const availableFields = [
|
||||
{ label: '对方主体', value: 'counterparty_id', type: 'number' },
|
||||
// { label: '对方主体', value: 'counterparty_id', type: 'input' },
|
||||
{
|
||||
label: '签约状态',
|
||||
value: 'auth_status',
|
||||
@ -35,6 +68,19 @@ export const availableFields = [
|
||||
|
||||
export const presetTree: any[] = []
|
||||
|
||||
// 详情面板字段配置
|
||||
export const detailPanel = [
|
||||
{ prop: 'id', label: '签约ID' },
|
||||
{ prop: 'current_subject_role', label: '当前角色' },
|
||||
{ prop: 'auth_status', label: '签约状态' },
|
||||
{ prop: 'store_name', label: '货主' },
|
||||
{ prop: 'remask', label: '备注' },
|
||||
{ prop: 'apply_time', label: '申请时间' },
|
||||
{ prop: 'auth_period', label: '授权有效期', span: 2 },
|
||||
{ prop: 'review_comment', label: '审核意见' },
|
||||
{ prop: 'qimen_config', label: '奇门配置', span: 2 }
|
||||
]
|
||||
|
||||
export default {
|
||||
columns,
|
||||
availableFields,
|
||||
|
||||
@ -95,6 +95,19 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="图标" prop="meta_icon" v-if="tempCreate.type === 'pda_pages'">
|
||||
<el-select v-model="tempCreate.meta_icon" placeholder="请选择图标" filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in iconList" :key="item" :label="item" :value="item">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<svg-icon :icon-class="item" />
|
||||
<span>{{ item }}</span>
|
||||
</div>
|
||||
</el-option>
|
||||
<template #prefix v-if="tempCreate.meta_icon">
|
||||
<svg-icon :icon-class="tempCreate.meta_icon" />
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="权限路径" prop="path">
|
||||
<el-input v-model="tempCreate.path" placeholder="必填,如:setting.account.list" />
|
||||
</el-form-item>
|
||||
@ -143,6 +156,19 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="图标" prop="meta_icon" v-if="tempUpdate.type === 'pda_pages'">
|
||||
<el-select v-model="tempUpdate.meta_icon" placeholder="请选择图标" filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in iconList" :key="item" :label="item" :value="item">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<svg-icon :icon-class="item" />
|
||||
<span>{{ item }}</span>
|
||||
</div>
|
||||
</el-option>
|
||||
<template #prefix v-if="tempUpdate.meta_icon">
|
||||
<svg-icon :icon-class="tempUpdate.meta_icon" />
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="权限路径" prop="path">
|
||||
<el-input v-model="tempUpdate.path" />
|
||||
</el-form-item>
|
||||
@ -176,6 +202,7 @@
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { permissionList, permissionAdd, permissionUpdate, permissionDelete } from '@/api/setting/permission'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||
import {
|
||||
permissionRules,
|
||||
defaultCreateTemp,
|
||||
@ -343,6 +370,25 @@ const submitLoading = ref(false)
|
||||
const createFormRef = ref()
|
||||
const updateFormRef = ref()
|
||||
|
||||
const iconList = [
|
||||
'dashboard',
|
||||
'example',
|
||||
'eye-open',
|
||||
'eye',
|
||||
'form',
|
||||
'link',
|
||||
'nested',
|
||||
'password',
|
||||
'table',
|
||||
'tree',
|
||||
'user',
|
||||
'shopping-cart',
|
||||
'skill',
|
||||
'star',
|
||||
'user',
|
||||
'zip'
|
||||
]
|
||||
|
||||
const tempCreate = reactive({ ...defaultCreateTemp })
|
||||
|
||||
const tempUpdate = reactive({ ...defaultUpdateTemp })
|
||||
@ -378,6 +424,7 @@ const handleUpdate = (row: any) => {
|
||||
type: row.type || 'web_pages',
|
||||
path: row.path || '',
|
||||
name: row.name || '',
|
||||
meta_icon: row.meta_icon || '',
|
||||
sort: row.sort || 0,
|
||||
status: row.status
|
||||
})
|
||||
@ -400,6 +447,7 @@ const createData = async () => {
|
||||
component: tempCreate.component,
|
||||
parent_id: tempCreate.parent_id || 0,
|
||||
meta_title: tempCreate.meta_title,
|
||||
meta_icon: tempCreate.type === 'pda_pages' ? tempCreate.meta_icon : '',
|
||||
sort: tempCreate.sort
|
||||
}
|
||||
await permissionAdd(payload)
|
||||
@ -428,6 +476,7 @@ const updateData = async () => {
|
||||
name: tempUpdate.name,
|
||||
component: tempUpdate.component,
|
||||
parent_id: tempUpdate.parent_id || 0,
|
||||
meta_icon: tempUpdate.type === 'pda_pages' ? tempUpdate.meta_icon : '',
|
||||
sort: tempUpdate.sort,
|
||||
status: tempUpdate.status
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ export const defaultCreateTemp = {
|
||||
path: '',
|
||||
meta_title: '',
|
||||
name: '',
|
||||
meta_icon: '',
|
||||
sort: 0
|
||||
}
|
||||
|
||||
@ -20,6 +21,7 @@ export const defaultUpdateTemp = {
|
||||
component: '',
|
||||
path: '',
|
||||
name: '',
|
||||
meta_icon: '',
|
||||
sort: 0,
|
||||
status: 1
|
||||
}
|
||||
|
||||
986
src/需求文档.txt
986
src/需求文档.txt
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user