Commit eceda477 by linjinhong

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

parents 78f6fdc3 b8304794
...@@ -210,14 +210,13 @@ const menu: MenuItem[] = [ ...@@ -210,14 +210,13 @@ const menu: MenuItem[] = [
id: 6, id: 6,
label: '客户管理', label: '客户管理',
}, },
{
index: '/setting/settingIndex',
id: 8,
label: '工厂设置',
},
], ],
}, },
{
index: '/setting/settingIndex',
id: 7,
label: '设置',
},
// { // {
// index: '', // index: '',
// id: 3, // id: 3,
......
...@@ -41,6 +41,7 @@ export interface SearchForm { ...@@ -41,6 +41,7 @@ export interface SearchForm {
trackRegisterSelect?: string | number trackRegisterSelect?: string | number
sizeType?: number | null sizeType?: number | null
tagsId?: string tagsId?: string
size?: string
tagsIdArr?: (number | null)[] tagsIdArr?: (number | null)[]
replaceShipment?: number | null replaceShipment?: number | null
} }
......
...@@ -79,6 +79,10 @@ export default defineComponent({ ...@@ -79,6 +79,10 @@ export default defineComponent({
type: Boolean, type: Boolean,
default: false, default: false,
}, },
valueKey: {
type: String,
default: 'id',
},
}, },
emits: ['update:modelValue'], emits: ['update:modelValue'],
setup(props, { emit }) { setup(props, { emit }) {
...@@ -94,9 +98,17 @@ export default defineComponent({ ...@@ -94,9 +98,17 @@ export default defineComponent({
() => props.modelValue, () => props.modelValue,
(newVal) => { (newVal) => {
if (props.isRadio) { if (props.isRadio) {
selectedRadioList.value = newVal as string | number allWayLists.value = props.companyList.flatMap(
(company) => company.wayList,
) as IwayList[]
console.log('waysName', waysName.value) if (props.valueKey === 'id') {
selectedRadioList.value = newVal as string | number
} else {
selectedRadioList.value =
allWayLists.value.find((el: IwayList) => newVal === el.name)
?.id || ''
}
} else { } else {
selectedList.value = newVal as (string | number)[] selectedList.value = newVal as (string | number)[]
} }
...@@ -114,9 +126,7 @@ export default defineComponent({ ...@@ -114,9 +126,7 @@ export default defineComponent({
() => selectedRadioList.value, () => selectedRadioList.value,
], ],
(newVal) => { (newVal) => {
// console.log(90, newVal)
if (props.isRadio) { if (props.isRadio) {
emit('update:modelValue', newVal[2])
companyList.value = newVal[1] as ICompanyList[] companyList.value = newVal[1] as ICompanyList[]
allWayLists.value = props.companyList.flatMap( allWayLists.value = props.companyList.flatMap(
(company) => company.wayList, (company) => company.wayList,
...@@ -125,6 +135,11 @@ export default defineComponent({ ...@@ -125,6 +135,11 @@ export default defineComponent({
waysName.value = waysName.value =
allWayLists.value.find((el: IwayList) => newVal[2] === el.id) allWayLists.value.find((el: IwayList) => newVal[2] === el.id)
?.name || '' ?.name || ''
if (props.valueKey === 'id') {
emit('update:modelValue', newVal[2])
} else {
emit('update:modelValue', waysName.value)
}
} else { } else {
emit('update:modelValue', newVal[0]) emit('update:modelValue', newVal[0])
allList.value = newVal[1] as IAllList[] allList.value = newVal[1] as IAllList[]
......
...@@ -56,8 +56,7 @@ const searchConfig = ref<ISeachFormConfig[]>([ ...@@ -56,8 +56,7 @@ const searchConfig = ref<ISeachFormConfig[]>([
{ {
prop: 'code', prop: 'code',
type: 'input', type: 'input',
label: '邮编', label: '邮编',
attrs: { attrs: {
clearable: true, clearable: true,
placeholder: '请输入邮编', placeholder: '请输入邮编',
...@@ -73,6 +72,14 @@ const searchConfig = ref<ISeachFormConfig[]>([ ...@@ -73,6 +72,14 @@ const searchConfig = ref<ISeachFormConfig[]>([
hasUnit: true, hasUnit: true,
suffix: 'g', suffix: 'g',
}, },
},{
prop: 'orderNumber',
type: 'input',
label: '订单号',
attrs: {
clearable: true,
placeholder: '请输入订单号',
},
}, },
]) ])
......
...@@ -198,7 +198,6 @@ watch( ...@@ -198,7 +198,6 @@ watch(
) => { ) => {
// 检查旧值项是否符合条件 // 检查旧值项是否符合条件
if ( if (
Array.isArray(oldItem.showPlatform) &&
oldItem.showPlatform.length === 1 && oldItem.showPlatform.length === 1 &&
oldItem.showPlatform[0] === 'TIKTOK' && oldItem.showPlatform[0] === 'TIKTOK' &&
oldItem.logisticsName oldItem.logisticsName
...@@ -469,6 +468,7 @@ const formConfig = computed<IFormConfig[]>(() => [ ...@@ -469,6 +468,7 @@ const formConfig = computed<IFormConfig[]>(() => [
v-model={item.logisticsName as string | number} v-model={item.logisticsName as string | number}
isRadio={true} isRadio={true}
companyList={tiktokCarriers.value as ICompanyList[]} companyList={tiktokCarriers.value as ICompanyList[]}
valueKey="name"
></LogisticsWaySelect> ></LogisticsWaySelect>
</el-form-item> </el-form-item>
) : ( ) : (
...@@ -574,16 +574,7 @@ const tableConfig = ref<TableColumn[]>([ ...@@ -574,16 +574,7 @@ const tableConfig = ref<TableColumn[]>([
</span> </span>
<span> <span>
<span>{'物流名称:'}</span> <span>{'物流名称:'}</span>
{el.platform === 'TIKTOK' ? ( <span class="logistics-name">{el.logisticsName}</span>
<span class="logistics-name">
{tiktokCarriers.value
?.flatMap((company) => company.wayList)
?.find((item) => el.logisticsName === item.id)?.name ||
el.logisticsName}
</span>
) : (
<span class="logistics-name">{el.logisticsName}</span>
)}
</span> </span>
</div> </div>
)), )),
...@@ -896,8 +887,6 @@ async function getAllList() { ...@@ -896,8 +887,6 @@ async function getAllList() {
if (index == 0) { if (index == 0) {
warehouseList.value = item.value.data || [] warehouseList.value = item.value.data || []
} else if (index == 1) { } else if (index == 1) {
console.log(758, item.value.data)
ruleNameList.value = (item.value.data as never[]) || [] ruleNameList.value = (item.value.data as never[]) || []
} else if (index == 2) { } else if (index == 2) {
platformList.value = (item.value.data as never[]) || [] platformList.value = (item.value.data as never[]) || []
...@@ -910,8 +899,6 @@ async function getAllList() { ...@@ -910,8 +899,6 @@ async function getAllList() {
} }
}, },
) )
console.log(545, res)
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }
...@@ -943,7 +930,6 @@ async function getTiktokCarriers() { ...@@ -943,7 +930,6 @@ async function getTiktokCarriers() {
}) })
}) })
tiktokCarriers.value = result tiktokCarriers.value = result
console.log(893, tiktokCarriers.value)
} }
/** /**
......
...@@ -72,10 +72,10 @@ ...@@ -72,10 +72,10 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input <el-input
ref="testingInput" ref="testingInputRef"
v-model="barcode" v-model="barcode"
style="width: 400px" style="width: 400px"
placeholder="'请输入生产单号/ 主SKU'" placeholder="请输入生产单号/ 主SKU"
@keyup.enter="barcodeInput" @keyup.enter="barcodeInput"
></el-input> ></el-input>
</el-form-item> </el-form-item>
...@@ -484,11 +484,14 @@ async function barcodeInput() { ...@@ -484,11 +484,14 @@ async function barcodeInput() {
barcode.value = '' barcode.value = ''
isLock.value = true isLock.value = true
console.log('noObj', noObj.value)
/* 如果存在未提交数据,先提交再拉新包裹 */ /* 如果存在未提交数据,先提交再拉新包裹 */
const keys = Object.keys(noObj.value) const keys = Object.keys(noObj.value)
if (keys.length) { if (keys.length) {
const pending = noObj.value[+keys[0]] const pending = noObj.value[+keys[0]]
console.log('pending', pending)
await submitInspection(pending, async () => { await submitInspection(pending, async () => {
await inputActive() await inputActive()
await getPackingData(code) await getPackingData(code)
...@@ -498,6 +501,7 @@ async function barcodeInput() { ...@@ -498,6 +501,7 @@ async function barcodeInput() {
await inputActive() await inputActive()
await getPackingData(code) await getPackingData(code)
} }
isLock.value = false
} }
async function submitInspection(objs?: OrderData, callback?: () => void) { async function submitInspection(objs?: OrderData, callback?: () => void) {
const result = objs ? objs : testingData.value const result = objs ? objs : testingData.value
...@@ -586,15 +590,15 @@ async function printFile(data: OrderData) { ...@@ -586,15 +590,15 @@ async function printFile(data: OrderData) {
} }
function printOrderOne(item: OrderData): Promise<void> { function printOrderOne(item: OrderData): Promise<void> {
return new Promise((resolve) => { return new Promise((resolve) => {
/* 已有文件路径 / 数据 → 直接打印 */ // /* 已有文件路径 / 数据 → 直接打印 */
if (item.filePath || item.fileData) { // if (item.filePath || item.fileData) {
props.printOrder(item, (v) => { // props.printOrder(item, (v) => {
// item.printStatus = v // // item.printStatus = v
console.log('printOrder', v) // console.log('printOrder', v)
resolve() // resolve()
}) // })
return // return
} // }
/* 无文件 → 先拉取再打印 */ /* 无文件 → 先拉取再打印 */
const loading = ElLoading.service({ background: 'rgba(0,0,0,.3)' }) const loading = ElLoading.service({ background: 'rgba(0,0,0,.3)' })
......
...@@ -353,6 +353,23 @@ ...@@ -353,6 +353,23 @@
></ElOption> ></ElOption>
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<ElFormItem label="尺码筛选">
<ElSelect
v-model="searchForm.size"
placeholder="请选择"
clearable
filterable
:teleported="false"
style="width: 150px"
>
<ElOption
v-for="(item, index) in sizes"
:key="index"
:value="item"
:label="item"
></ElOption>
</ElSelect>
</ElFormItem>
</ElForm> </ElForm>
<template #reference> <template #reference>
<el-button type="warning" @click="searchVisible = !searchVisible"> <el-button type="warning" @click="searchVisible = !searchVisible">
...@@ -3010,6 +3027,7 @@ const sourceList = [ ...@@ -3010,6 +3027,7 @@ const sourceList = [
id: 'third-party', id: 'third-party',
}, },
] ]
const sizes = ['FS', 'XS', 'S', 'M', 'L', 'XL', 'XXL', '3XL', '4XL', '5XL']
const tabsNav = ref<Tab[]>() const tabsNav = ref<Tab[]>()
const isAuto = ref(true) const isAuto = ref(true)
const countryList = ref([]) const countryList = ref([])
......
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