Commit c2b3c106 by zhuzhequan

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/views/order/podUs/index.vue
parents ade30966 e963395d
......@@ -42,6 +42,7 @@
v-model="editForm"
:config="formConfig"
form-item-width="100%"
labelWidth="125"
>
</CustomizeForm>
......@@ -205,6 +206,7 @@ const formConfig = computed<IFormConfig[]>(() => [
},
],
},
{
prop: 'companyId',
type: 'select',
......@@ -223,6 +225,9 @@ const formConfig = computed<IFormConfig[]>(() => [
if (value.code === 'UINUIN') {
editFormRef.value?.refashConfig(['uinuinWarehouseId'])
editFormRef.value?.clearValidate()
} else if (value.code === 'YW') {
editFormRef.value?.refashConfig(['companyWarehouseCode'])
editFormRef.value?.clearValidate()
} else {
editFormRef.value?.refashConfig([])
editFormRef.value?.clearValidate()
......@@ -233,7 +238,7 @@ const formConfig = computed<IFormConfig[]>(() => [
rules: [
{
required: true,
message: '请选择仓库名称',
message: '请选择物流公司',
},
],
},
......@@ -255,28 +260,29 @@ const formConfig = computed<IFormConfig[]>(() => [
},
],
},
// {
// prop: 'ruleId',
// type: 'select',
// label: '申报规则',
// fixed: 'last',
// attrs: {
// placeholder: '请选择申报规则',
// label: 'name',
// value: 'id',
// options: [...(ruleNameList.value || [])],
// onChange: (value: { name: string; id: string | number }) => {
// editForm.value.ruleRef.ruleId = value.id
// editForm.value.ruleRef.ruleName = value.name
// },
// },
// rules: [
// {
// required: true,
// message: '请选择申报规则',
// },
// ],
// },
{
prop: 'companyWarehouseCode',
type: 'select',
label: '物流仓库编码',
isIncludeProp: true,
attrs: {
placeholder: '请选择物流仓库编码',
options: [
{ label: 'LAX01', value: 'LAX01' },
{ label: 'NJC01', value: 'NJC01' },
{ label: 'ORD01', value: 'ORD01' },
{ label: 'MIA01', value: 'MIA01' },
{ label: 'DFW01', value: 'DFW01' },
],
},
rules: [
{
required: true,
message: '请选择物流仓库编码',
},
],
},
{
prop: 'serviceCode',
type: 'input',
......@@ -599,11 +605,13 @@ async function editWay(item: LogisticsMethod) {
console.log(493, editForm.value)
dialogVisible.value = true
if (item.uinuinWarehouseId) {
nextTick(() => {
if (item.uinuinWarehouseId) {
editFormRef.value?.refashConfig(['uinuinWarehouseId'])
})
} else if (item.companyWarehouseCode) {
editFormRef.value?.refashConfig(['companyWarehouseCode'])
}
})
} catch (e) {
console.log(e)
}
......
......@@ -263,7 +263,7 @@ async function getList(data?: {
editParams.value = {
zoneName: row.zoneName,
logistics: key,
codePrefix: e || '',
codePrefix: formatString(e) || '',
logisticsId: row[key].logisticsId,
}
}}
......@@ -315,7 +315,7 @@ function setCellStyle() {
const [cell, primaryCell] = ['.tableCell', '.primaryCell'].map((selector) =>
document.querySelectorAll(selector),
)
const getAncestor = (element: Element, level = 2) => {
const getAncestor = (element: Element, level = 3) => {
let current = element
while (level-- > 0 && current) {
current = current.parentElement as Element
......@@ -434,6 +434,18 @@ async function editClosed() {
editParams.value = {}
}
}
function formatString(input: string) {
// 1. 替换所有中文逗号为英文逗号
// 2. 移除所有空格
// 3. 将连续逗号替换为单个逗号
// 4. 去除首尾可能的逗号
return input
.replace(/,/g, ',') // 中文逗号转英文逗号
.replace(/\s+/g, '') // 移除所有空格
.replace(/,+/g, ',') // 连续逗号替换为单个逗号
.replace(/^,|,$/g, '') // 去除首尾逗号
}
</script>
<style lang="scss" scoped>
......@@ -451,4 +463,37 @@ async function editClosed() {
.dialog-footer {
text-align: center;
}
:deep() {
// .vxe-cell {
// padding: 15px 10px !important;
// }
.col--edit::after {
content: '双击修改';
display: none;
position: absolute;
top: 0;
z-index: 99;
left: 50%;
transform: translate(-50%);
// width: 85px;
// height: 20px;
font-size: 10px;
line-height: 1;
border-radius: 5px;
padding: 2px 5px;
opacity: 0.5;
background-color: black;
text-align: center; /* 使文本居中 */
color: white; /* 文本颜色 */
}
.col--edit:hover::after {
display: block;
}
.col--active:hover::after {
content: '单击其他单元格确认';
white-space: nowrap;
}
}
</style>
......@@ -13,6 +13,7 @@ export interface LogisticsMethod {
ruleId?: string | number
ruleList?: ruleRefObj[]
uinuinWarehouseId?: number | string | null
companyWarehouseCode?: number | string | null
}
export interface LogisticsMethodList {
......
......@@ -679,7 +679,8 @@
status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT' ||
status === 'CREATE_LOGISTICS' ? '数量:'
status === 'CREATE_LOGISTICS'
? '数量:'
: '已生产数量:'
}}</span>
<span class="goods-item-info-item-value">
......@@ -1196,13 +1197,16 @@
<div class="total">
<span
>已选择
<span style="color: red">{{ selection.length || cardSelection.length }}</span> 条数据</span
<span style="color: red">{{
selection.length || cardSelection.length
}}</span>
条数据</span
>
</div>
<ElPagination
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[50,100, 200, 300, 400, 500]"
:page-sizes="[50, 100, 200, 300, 400, 500]"
background
layout="total, sizes, prev, pager, next, jumper"
:total="total"
......@@ -1213,15 +1217,19 @@
<div class="pageSize">
<span
>自定义条数
<span><el-input
<span
><el-input
v-model="pageSize"
type="number"
style="width: 100px;" clearable
@blur="inputBlur"></el-input></span> /</span
style="width: 100px"
clearable
@blur="inputBlur"
></el-input
></span>
/</span
>
</div>
</div>
</div>
</div>
<RightClickMenu
......@@ -1656,7 +1664,7 @@ import platformJson from '../../../json/platform.json'
declare global {
interface Window {
ActiveXObject: {
new(type: string): XMLHttpRequest
new (type: string): XMLHttpRequest
}
VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] }
......@@ -2219,7 +2227,10 @@ const downloadTif = async (type: string) => {
cardSelection.value.map((el) => el.id),
type,
)
const url = type === 'tiff' ? `https://ps.jomalls.com/tiff/` + res.message : filePath + res.message
const url =
type === 'tiff'
? `https://ps.jomalls.com/tiff/` + res.message
: filePath + res.message
if (type === 'tiff') {
window.open(url, '_blank')
tifDownloadLoading.value = false
......@@ -2765,7 +2776,7 @@ const getOrderByIdApi = async (type: string) => {
return
}
let loading
const operation = operationMap[type]
if (operation) {
try {
......@@ -2777,7 +2788,7 @@ const getOrderByIdApi = async (type: string) => {
const ids = selection.value.map((el) => el.id)
const loading = ElLoading.service({
loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
......@@ -2801,10 +2812,11 @@ const getOrderByIdApi = async (type: string) => {
} else {
ElMessage.error(res.message)
}
loading.close()
} catch (e) {
resultInfo.value = []
console.error(e)
} finally {
loading && loading.close()
}
} else {
ElMessage.warning('未知操作类型')
......@@ -2997,9 +3009,23 @@ const toBePicking = async () => {
try {
const res = await toBePickingApi(selection.value.map((item) => item.id))
if (res.code !== 200) return
ElMessage.success('操作成功')
resultInfo.value =
(res.data as {
id: string | number
status: boolean
factoryOrderNumber?: string
message: string
}[]) || []
if (
Array.isArray(res.data) &&
(res.data as { status: boolean }[]).some((item) => !item.status)
) {
resultRefs.value?.showDialog()
} else {
search()
loadTabData()
}
ElMessage.success('操作成功')
} catch (e) {
console.error(e)
} finally {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment