| | |
| | | <el-button type="primary" |
| | | plain |
| | | @click="handleImport">导入</el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | </el-space> |
| | | <el-space v-else-if="activeStatusTab === 'reviewed'" |
| | | wrap |
| | |
| | | <el-button type="primary" |
| | | @click="handleBulkDelivery" |
| | | :disabled="isBatchButtonDisabled('delivery')">发货</el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-date-picker v-model="processRouteExportDateRange" |
| | | type="datetimerange" |
| | | range-separator="至" |
| | |
| | | <el-button type="primary" |
| | | @click="handleBulkDelivery" |
| | | :disabled="isBatchButtonDisabled('delivery')">发货</el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | </el-space> |
| | | <el-space v-else-if="activeStatusTab === 'delivered'" |
| | | wrap |
| | |
| | | <el-button type="primary" |
| | | @click="handleReverseAudit" |
| | | :disabled="isBatchButtonDisabled('reverseAudit')">反审</el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | </el-space> |
| | | <el-space v-else-if="activeStatusTab === 'completed'" |
| | | wrap |
| | | class="sales-ledger-toolbar-group"> |
| | | <el-button @click="handleOut" |
| | | :disabled="isBatchButtonDisabled('export')">导出</el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="primary" |
| | | plain |
| | | @click="handlePrintCommand('salesOrder')" |
| | |
| | | plain |
| | | @click="handlePrintLabel" |
| | | :disabled="isBatchButtonDisabled('print')">打印标签</el-button> |
| | | </el-space> |
| | | <el-space v-else-if="activeStatusTab === 'all'" |
| | | wrap |
| | | class="sales-ledger-toolbar-group"> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | </el-space> |
| | | <el-space wrap class="sales-ledger-toolbar-group sales-ledger-toolbar-group--muted"> |
| | | <el-dropdown @command="handleHistoryImportCommand"> |
| | |
| | | }); |
| | | |
| | | const getPinnedProductPrefill = async () => { |
| | | if (!pinnedProductTemplate.value) return {}; |
| | | await getProductOptions(); |
| | | if (!pinnedProductTemplate.value) { |
| | | const models = await modelList({}); |
| | | modelOptions.value = models || []; |
| | | return {}; |
| | | } |
| | | if (pinnedProductTemplate.value.__productCategoryId) { |
| | | const models = await modelList({ |
| | | id: pinnedProductTemplate.value.__productCategoryId, |
| | | }); |
| | | modelOptions.value = models || []; |
| | | } else { |
| | | const models = await modelList({}); |
| | | modelOptions.value = models || []; |
| | | } |
| | | return { ...pinnedProductTemplate.value }; |
| | |
| | | shipped: "销售发货历史数据导入模板-已发货.xlsx", |
| | | }; |
| | | const currentImportCommand = ref("default"); |
| | | const activeStatusTab = ref("pendingReview"); |
| | | const activeStatusTab = ref("all"); |
| | | const salesLedgerStatusTabs = [ |
| | | { key: "all", label: "全部" }, |
| | | { key: "pendingReview", label: "未审核" }, |
| | | { key: "reviewed", label: "已审核" }, |
| | | { key: "reverseReviewed", label: "反审核" }, |
| | |
| | | activeStatusTab.value = tabKey; |
| | | resetStatusFilters(); |
| | | switch (tabKey) { |
| | | case "all": |
| | | break; |
| | | case "pendingReview": |
| | | searchForm.reviewStatus = 0; |
| | | break; |
| | |
| | | }; |
| | | // 获取tree子数据 |
| | | const getModels = value => { |
| | | // 产品大类变化时,重置规格型号与厚度,避免旧值残留 |
| | | productForm.value.productModelId = null; |
| | | productForm.value.specificationModel = ""; |
| | | productForm.value.thickness = null; |
| | | |
| | | if (!value) { |
| | | productForm.value.productCategory = ""; |
| | | modelOptions.value = []; |
| | | modelList({}).then(res => { |
| | | modelOptions.value = res || []; |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | productForm.value.productCategory = findNodeById(productOptions.value, value); |
| | | modelList({ id: value }).then(res => { |
| | | modelOptions.value = res || []; |
| | | const currentModelId = productForm.value.productModelId; |
| | | if (currentModelId) { |
| | | const isValid = modelOptions.value.some(item => item.id === currentModelId); |
| | | if (!isValid) { |
| | | productForm.value.productModelId = null; |
| | | productForm.value.specificationModel = ""; |
| | | productForm.value.thickness = null; |
| | | } |
| | | } else { |
| | | productForm.value.productModelId = null; |
| | | productForm.value.specificationModel = ""; |
| | | productForm.value.thickness = null; |
| | | } |
| | | }); |
| | | }; |
| | | const getProductModel = value => { |
| | |
| | | modelThickness === "" |
| | | ? null |
| | | : Number(modelThickness); |
| | | |
| | | const categoryId = selectedModel?.productId; |
| | | if (categoryId && productForm.value.__productCategoryId !== categoryId) { |
| | | productForm.value.__productCategoryId = categoryId; |
| | | productForm.value.productCategory = findNodeById(productOptions.value, categoryId); |
| | | } |
| | | } else { |
| | | productForm.value.specificationModel = null; |
| | | productForm.value.thickness = null; |