Commit 11b767b5 by zhuzhequan

入库单bug修复

parent 14e24c4f
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
> >
删除 删除
</el-button> </el-button>
<el-button type="success" @click="handleExport"> 导出 </el-button> <el-button type="success" @click="handleExport"> 导出</el-button>
<el-button type="primary" @click="printProductTag"> <el-button type="primary" @click="printProductTag">
打印商品SKU标签 打印商品SKU标签
</el-button> </el-button>
...@@ -609,7 +609,7 @@ ...@@ -609,7 +609,7 @@
></el-input> ></el-input>
<el-popover placement="top-start" width="1000" trigger="click"> <el-popover placement="top-start" width="1000" trigger="click">
<div v-if="skuData.length > 0" style="height: 50vh"> <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 <ElTableColumn
show-overflow-tooltip show-overflow-tooltip
width="60" width="60"
...@@ -670,8 +670,10 @@ ...@@ -670,8 +670,10 @@
> >
<template #default="{ row }"> <template #default="{ row }">
<el-icon :size="32" color="#67C23A" class="cursor-pointer" <el-icon :size="32" color="#67C23A" class="cursor-pointer"
><CirclePlusFilled @click="skudblclick(row)" >
/></el-icon> <CirclePlusFilled @click="skudblclick(row)"
/>
</el-icon>
</template> </template>
</ElTableColumn> </ElTableColumn>
</ElTable> </ElTable>
...@@ -742,7 +744,7 @@ ...@@ -742,7 +744,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label=""> <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-item>
</el-form> </el-form>
<template #footer> <template #footer>
...@@ -979,6 +981,7 @@ const pickerOptions = { ...@@ -979,6 +981,7 @@ const pickerOptions = {
}, },
], ],
} }
function getStartTime() { function getStartTime() {
const date = new Date() const date = new Date()
const year = date.getFullYear() const year = date.getFullYear()
...@@ -986,6 +989,7 @@ function getStartTime() { ...@@ -986,6 +989,7 @@ function getStartTime() {
const day = date.getDate() const day = date.getDate()
return `${year}-${month}-${day} 00:00:00` return `${year}-${month}-${day} 00:00:00`
} }
const selectSku = ref('') const selectSku = ref('')
const treeData = ref<InterWarehouseTree[]>() const treeData = ref<InterWarehouseTree[]>()
const [searchForm, resetSearchForm] = useValue<warehouseSearchForm>({}) const [searchForm, resetSearchForm] = useValue<warehouseSearchForm>({})
...@@ -1075,6 +1079,7 @@ const printProductTag = async () => { ...@@ -1075,6 +1079,7 @@ const printProductTag = async () => {
console.error(e) console.error(e)
} }
} }
async function handlePrintProductTag() { async function handlePrintProductTag() {
const flag = printData.value.every( const flag = printData.value.every(
(el: InterWarehousePage) => el.number && el.number != '0', (el: InterWarehousePage) => el.number && el.number != '0',
...@@ -1104,6 +1109,7 @@ async function handlePrintProductTag() { ...@@ -1104,6 +1109,7 @@ async function handlePrintProductTag() {
showPrintDialog.value = false showPrintDialog.value = false
window.open(filePath + res.message, '_blank') window.open(filePath + res.message, '_blank')
} }
const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => { const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => {
if (!editForm.value.warehouseId) { if (!editForm.value.warehouseId) {
ElMessage.error('请选择仓库') ElMessage.error('请选择仓库')
...@@ -1129,11 +1135,14 @@ const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => { ...@@ -1129,11 +1135,14 @@ const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => {
return [] return []
} }
} }
interface InterImportData { interface InterImportData {
warehouseSku: string warehouseSku: string
remark?: string | null remark?: string | null
[key: string]: unknown [key: string]: unknown
} }
// 前端导入Excel // 前端导入Excel
const excelFieldMap: Record<string, keyof InterProductList> = { const excelFieldMap: Record<string, keyof InterProductList> = {
// SKU图片: 'skuImage', // SKU图片: 'skuImage',
...@@ -1149,7 +1158,7 @@ const excelFieldMap: Record<string, keyof InterProductList> = { ...@@ -1149,7 +1158,7 @@ const excelFieldMap: Record<string, keyof InterProductList> = {
const handleLocalImport = async ({ const handleLocalImport = async ({
path, path,
data, data,
}: { }: {
path: string path: string
data: InterImportData[] data: InterImportData[]
}) => { }) => {
...@@ -1537,6 +1546,12 @@ const addOtherCurrency = async () => { ...@@ -1537,6 +1546,12 @@ const addOtherCurrency = async () => {
upSection() 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 addSection = async () => {
const params = { ...editForm.value } const params = { ...editForm.value }
params.productList = otherPurchaseData.value params.productList = otherPurchaseData.value
...@@ -1599,9 +1614,10 @@ const upSection = async () => { ...@@ -1599,9 +1614,10 @@ const upSection = async () => {
} }
} }
const addPurchaseVisible = ref(false) const addPurchaseVisible = ref(false)
const purchaseTextarea = ref(null) const purchaseTextarea = ref('')
const addPurchase = async () => { const addPurchase = async () => {
addPurchaseVisible.value = true addPurchaseVisible.value = true
purchaseTextarea.value = ''
} }
const submitPurchase = async () => { const submitPurchase = async () => {
if (!purchaseTextarea.value) { if (!purchaseTextarea.value) {
...@@ -1736,20 +1752,24 @@ onMounted(() => { ...@@ -1736,20 +1752,24 @@ onMounted(() => {
width: 500px; width: 500px;
text-align: center; text-align: center;
} }
.cursor-pointer { .cursor-pointer {
cursor: pointer; cursor: pointer;
} }
.header-filter-form { .header-filter-form {
:deep(.el-form-item) { :deep(.el-form-item) {
margin-right: 14px; margin-right: 14px;
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.product-dialog-footer { .product-dialog-footer {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin: 8px 0; margin: 8px 0;
} }
$border: solid 1px #ddd; $border: solid 1px #ddd;
.send-order-list { .send-order-list {
...@@ -1797,10 +1817,12 @@ $border: solid 1px #ddd; ...@@ -1797,10 +1817,12 @@ $border: solid 1px #ddd;
.left { .left {
width: 160px; width: 160px;
:deep(.el-tree-node__content) { :deep(.el-tree-node__content) {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
:deep(.el-tree-node__label) { :deep(.el-tree-node__label) {
font-size: 13px; font-size: 13px;
cursor: pointer; cursor: pointer;
...@@ -1892,6 +1914,7 @@ $border: solid 1px #ddd; ...@@ -1892,6 +1914,7 @@ $border: solid 1px #ddd;
height: 5px; height: 5px;
background: #eff3f6; background: #eff3f6;
} }
.btn-list { .btn-list {
margin-bottom: 10px; margin-bottom: 10px;
} }
...@@ -1923,6 +1946,7 @@ $border: solid 1px #ddd; ...@@ -1923,6 +1946,7 @@ $border: solid 1px #ddd;
} }
} }
} }
.delivery-note-page { .delivery-note-page {
:deep(#top) { :deep(#top) {
height: 100%; 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