Commit 11b767b5 by zhuzhequan

入库单bug修复

parent 14e24c4f
......@@ -117,7 +117,7 @@
>
删除
</el-button>
<el-button type="success" @click="handleExport"> 导出 </el-button>
<el-button type="success" @click="handleExport"> 导出</el-button>
<el-button type="primary" @click="printProductTag">
打印商品SKU标签
</el-button>
......@@ -267,7 +267,7 @@
>
<template #default="{ row }">
<ElButton type="primary" link @click="addDialog(2, row)"
>编辑
>编辑
</ElButton>
</template>
</ElTableColumn>
......@@ -414,8 +414,8 @@
{{ item.createdTime }}&emsp;&emsp;
</span>
<span style="display: inline-block">{{
item.description
}}</span>
item.description
}}</span>
</li>
</ul>
</el-tab-pane>
......@@ -609,7 +609,7 @@
></el-input>
<el-popover placement="top-start" width="1000" trigger="click">
<div v-if="skuData.length > 0" style="height: 50vh">
<ElTable size="small" :data="skuData" height="100%" border>
<ElTable size="small" :data="filterSkuData" height="100%" border>
<ElTableColumn
show-overflow-tooltip
width="60"
......@@ -670,8 +670,10 @@
>
<template #default="{ row }">
<el-icon :size="32" color="#67C23A" class="cursor-pointer"
><CirclePlusFilled @click="skudblclick(row)"
/></el-icon>
>
<CirclePlusFilled @click="skudblclick(row)"
/>
</el-icon>
</template>
</ElTableColumn>
</ElTable>
......@@ -742,7 +744,7 @@
</el-radio-group>
</el-form-item>
<el-form-item label="">
<el-checkbox v-model="exportForm.delivery"> 包含详情 </el-checkbox>
<el-checkbox v-model="exportForm.delivery"> 包含详情</el-checkbox>
</el-form-item>
</el-form>
<template #footer>
......@@ -979,6 +981,7 @@ const pickerOptions = {
},
],
}
function getStartTime() {
const date = new Date()
const year = date.getFullYear()
......@@ -986,6 +989,7 @@ function getStartTime() {
const day = date.getDate()
return `${year}-${month}-${day} 00:00:00`
}
const selectSku = ref('')
const treeData = ref<InterWarehouseTree[]>()
const [searchForm, resetSearchForm] = useValue<warehouseSearchForm>({})
......@@ -1075,6 +1079,7 @@ const printProductTag = async () => {
console.error(e)
}
}
async function handlePrintProductTag() {
const flag = printData.value.every(
(el: InterWarehousePage) => el.number && el.number != '0',
......@@ -1084,12 +1089,12 @@ async function handlePrintProductTag() {
}
const list = printData.value.map(
({
skuName = '',
warehouseSku = '',
supplierItemNo = '',
number = '',
locationName = '',
}) => ({
skuName = '',
warehouseSku = '',
supplierItemNo = '',
number = '',
locationName = '',
}) => ({
skuName,
warehouseSku,
supplierItemNo,
......@@ -1104,6 +1109,7 @@ async function handlePrintProductTag() {
showPrintDialog.value = false
window.open(filePath + res.message, '_blank')
}
const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => {
if (!editForm.value.warehouseId) {
ElMessage.error('请选择仓库')
......@@ -1129,11 +1135,14 @@ const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => {
return []
}
}
interface InterImportData {
warehouseSku: string
remark?: string | null
[key: string]: unknown
}
// 前端导入Excel
const excelFieldMap: Record<string, keyof InterProductList> = {
// SKU图片: 'skuImage',
......@@ -1147,9 +1156,9 @@ const excelFieldMap: Record<string, keyof InterProductList> = {
}
const handleLocalImport = async ({
path,
data,
}: {
path,
data,
}: {
path: string
data: InterImportData[]
}) => {
......@@ -1168,8 +1177,8 @@ const handleLocalImport = async ({
typeof value === 'string'
? value
: value === null || value === undefined
? null
: String(value)
? null
: String(value)
} else if (field === 'buyStored') {
// 确保 value 是一个有效的数字或数字字符串,否则设置为 null
if (
......@@ -1537,6 +1546,12 @@ const addOtherCurrency = async () => {
upSection()
}
}
const filterSkuData = computed(() => {
const skuList = otherPurchaseData.value.map(el => el.warehouseSku)
console.log(skuList,skuData.value)
return skuData.value.filter(el => !skuList.includes(el.sku))
})
const addSection = async () => {
const params = { ...editForm.value }
params.productList = otherPurchaseData.value
......@@ -1599,9 +1614,10 @@ const upSection = async () => {
}
}
const addPurchaseVisible = ref(false)
const purchaseTextarea = ref(null)
const purchaseTextarea = ref('')
const addPurchase = async () => {
addPurchaseVisible.value = true
purchaseTextarea.value = ''
}
const submitPurchase = async () => {
if (!purchaseTextarea.value) {
......@@ -1736,20 +1752,24 @@ onMounted(() => {
width: 500px;
text-align: center;
}
.cursor-pointer {
cursor: pointer;
}
.header-filter-form {
:deep(.el-form-item) {
margin-right: 14px;
margin-bottom: 10px;
}
}
.product-dialog-footer {
display: flex;
justify-content: space-between;
margin: 8px 0;
}
$border: solid 1px #ddd;
.send-order-list {
......@@ -1797,10 +1817,12 @@ $border: solid 1px #ddd;
.left {
width: 160px;
:deep(.el-tree-node__content) {
height: 30px;
line-height: 30px;
}
:deep(.el-tree-node__label) {
font-size: 13px;
cursor: pointer;
......@@ -1892,6 +1914,7 @@ $border: solid 1px #ddd;
height: 5px;
background: #eff3f6;
}
.btn-list {
margin-bottom: 10px;
}
......@@ -1923,6 +1946,7 @@ $border: solid 1px #ddd;
}
}
}
.delivery-note-page {
:deep(#top) {
height: 100%;
......
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