军泰伟业
1.仓储物流需要加上库位,库位暂时分为外购、自制、委外三种类型
2.生产订单加上库存数量,方便实时查看
3.产品发货后,若部分产品退回,可修改订单发货数量(减去退回的产品数量),若订单产品全部退回,可对发货的订单进行取消撤回操作
| | |
| | | :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | <span class="search_title ml10">质检状态:</span> |
| | | <el-select v-model="searchForm.type" |
| | | style="width: 240px" |
| | | placeholder="请选择" |
| | | clearable> |
| | | <el-option label="合格" :value="0" /> |
| | | <el-option label="不合格" :value="1" /> |
| | | </el-select> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >搜索</el-button |
| | | > |
| | | <el-button @click="handleReset">重置</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button @click="handleOut">导出</el-button> |
| | |
| | | prop="stockOutNum" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column label="质检状态" |
| | | prop="type" |
| | | show-overflow-tooltip |
| | | width="100"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.type == 0 ? 'success' : 'danger'" size="small"> |
| | | {{ scope.row.type == 0 ? '合格' : '不合格' }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="出库人" |
| | | prop="createBy" |
| | |
| | | |
| | | <script setup> |
| | | import pagination from "@/components/PIMTable/Pagination.vue"; |
| | | import { ref } from "vue"; |
| | | import { ref, watch } from "vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { getCurrentDate } from "@/utils/index.js"; |
| | |
| | | |
| | | const props = defineProps({ |
| | | type: { |
| | | type: String, |
| | | type: Number, |
| | | required: true, |
| | | default: '0' |
| | | default: 1 |
| | | } |
| | | }) |
| | | |
| | |
| | | supplierName: "", |
| | | timeStr: "", |
| | | recordType: "", |
| | | type: "", |
| | | } |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | |
| | | /** 重置按钮操作 */ |
| | | const handleReset = () => { |
| | | searchForm.value.supplierName = ""; |
| | | searchForm.value.timeStr = ""; |
| | | searchForm.value.recordType = ""; |
| | | searchForm.value.type = ""; |
| | | handleQuery(); |
| | | }; |
| | | const paginationChange = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | getStockOutPage({ ...searchForm.value, ...page, type: props.type }) |
| | | const params = { ...searchForm.value, ...page, productType: props.type }; |
| | | if (searchForm.value.type !== "") { |
| | | params.type = searchForm.value.type; |
| | | } |
| | | getStockOutPage(params) |
| | | .then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records; |
| | |
| | | |
| | | // 获取来源类型选项 |
| | | const fetchStockRecordTypeOptions = () => { |
| | | if (props.type === '0') { |
| | | if (props.type === 1 || props.type === 2) { |
| | | findAllQualifiedStockOutRecordTypeOptions() |
| | | .then(res => { |
| | | stockRecordTypeOptions.value = res.data; |
| | | }) |
| | | return |
| | | } |
| | | } else { |
| | | findAllUnQualifiedStockOutRecordTypeOptions() |
| | | .then(res => { |
| | | stockRecordTypeOptions.value = res.data; |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // 表格选择数据 |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/stockOutRecord/exportStockOutRecord", {type: props.type}, props.type === '0' ? "合格出库台账.xlsx" : "不合格出库台账.xlsx"); |
| | | const fileNameMap = { |
| | | 1: '自制出库台账.xlsx', |
| | | 2: '外购出库台账.xlsx', |
| | | 3: '委外出库台账.xlsx' |
| | | }; |
| | | proxy.download("/stockOutRecord/exportStockOutRecord", {productType: props.type}, fileNameMap[props.type] || '出库台账.xlsx'); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | |
| | | getList(); |
| | | fetchStockRecordTypeOptions(); |
| | | }); |
| | | |
| | | watch(() => props.type, () => { |
| | | page.current = 1; |
| | | getList(); |
| | | fetchStockRecordTypeOptions(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | |
| | | <script setup> |
| | | import Record from "@/views/inventoryManagement/dispatchLog/Record.vue"; |
| | | const activeTab = ref('qualified') |
| | | const type = ref(0) |
| | | import { computed, ref } from "vue"; |
| | | |
| | | const activeTab = ref('selfMade') |
| | | const type = ref(1) |
| | | const tabs = computed(() => { |
| | | return [ |
| | | { |
| | | label: '合格出库', |
| | | name: 'qualified', |
| | | type: '0' |
| | | label: '自制', |
| | | name: 'selfMade', |
| | | type: 1 |
| | | }, |
| | | { |
| | | label: '不合格出库', |
| | | name: 'unqualified', |
| | | type: '1' |
| | | label: '外购', |
| | | name: 'purchase', |
| | | type: 2 |
| | | }, |
| | | { |
| | | label: '委外', |
| | | name: 'outsourcing', |
| | | type: 3 |
| | | } |
| | | ] |
| | | }) |
| | | |
| | | const handleTabChange = (tabName) => { |
| | | activeTab.value = tabName; |
| | | type.value = tabName === 'qualified' ? 0 : 1 |
| | | const tab = tabs.value.find(t => t.name === tabName); |
| | | type.value = tab ? tab.type : 1; |
| | | } |
| | | </script> |
| | |
| | | :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | <span class="search_title ml10">质检状态:</span> |
| | | <el-select v-model="searchForm.type" |
| | | style="width: 240px" |
| | | placeholder="请选择" |
| | | clearable> |
| | | <el-option label="合格" :value="0" /> |
| | | <el-option label="不合格" :value="1" /> |
| | | </el-select> |
| | | <el-button type="primary" |
| | | @click="handleQuery" |
| | | style="margin-left: 10px">搜索 |
| | | </el-button> |
| | | <el-button @click="handleReset">重置</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button @click="handleOut">导出</el-button> |
| | |
| | | <el-table-column label="入库数量" |
| | | prop="stockInNum" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="质检状态" |
| | | prop="type" |
| | | show-overflow-tooltip |
| | | width="100"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.type == 0 ? 'success' : 'danger'" size="small"> |
| | | {{ scope.row.type == 0 ? '合格' : '不合格' }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="库位" |
| | | prop="locationName" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="入库人" |
| | | prop="createBy" |
| | | show-overflow-tooltip/> |
| | |
| | | toRefs, |
| | | onMounted, |
| | | getCurrentInstance, |
| | | watch, |
| | | } from "vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import { |
| | |
| | | |
| | | const props = defineProps({ |
| | | type: { |
| | | type: String, |
| | | type: Number, |
| | | required: true, |
| | | default: '0' |
| | | default: 1 |
| | | } |
| | | }) |
| | | |
| | |
| | | productName: "", |
| | | timeStr: "", |
| | | recordType: "", |
| | | type: "", |
| | | }, |
| | | }); |
| | | const {searchForm} = toRefs(data); |
| | | |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | |
| | | /** 重置按钮操作 */ |
| | | const handleReset = () => { |
| | | searchForm.value.productName = ""; |
| | | searchForm.value.timeStr = ""; |
| | | searchForm.value.recordType = ""; |
| | | searchForm.value.type = ""; |
| | | handleQuery(); |
| | | }; |
| | | |
| | | const getRecordType = (recordType) => { |
| | |
| | | |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | const params = {...page, type: props.type}; |
| | | const params = {...page, productType: props.type}; |
| | | params.timeStr = searchForm.value.timeStr; |
| | | params.productName = searchForm.value.productName; |
| | | params.recordType = searchForm.value.recordType; |
| | | if (searchForm.value.type !== "") { |
| | | params.type = searchForm.value.type; |
| | | } |
| | | getStockInRecordListPage(params) |
| | | .then(res => { |
| | | tableData.value = res.data.records; |
| | |
| | | |
| | | // 获取来源类型选项 |
| | | const fetchStockRecordTypeOptions = () => { |
| | | if (props.type === '0') { |
| | | if (props.type === 1 || props.type === 2) { |
| | | findAllQualifiedStockInRecordTypeOptions() |
| | | .then(res => { |
| | | stockRecordTypeOptions.value = res.data; |
| | | }) |
| | | return |
| | | } |
| | | } else { |
| | | findAllUnQualifiedStockInRecordTypeOptions() |
| | | .then(res => { |
| | | stockRecordTypeOptions.value = res.data; |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // 表格选择数据 |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | // 根据不同的 tab 类型调用不同的导出接口 |
| | | proxy.download("/stockInRecord/exportStockInRecord", {type: props.type}, props.type === '0' ? "合格入库.xlsx" : "不合格入库.xlsx"); |
| | | const fileNameMap = { |
| | | 1: '自制入库.xlsx', |
| | | 2: '外购入库.xlsx', |
| | | 3: '委外入库.xlsx' |
| | | }; |
| | | proxy.download("/stockInRecord/exportStockInRecord", {productType: props.type}, fileNameMap[props.type] || '入库.xlsx'); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | |
| | | getList(); |
| | | fetchStockRecordTypeOptions(); |
| | | }); |
| | | |
| | | watch(() => props.type, () => { |
| | | page.current = 1; |
| | | getList(); |
| | | fetchStockRecordTypeOptions(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"></style> |
| | |
| | | <script setup> |
| | | import Record from "@/views/inventoryManagement/receiptManagement/Record.vue"; |
| | | |
| | | const activeTab = ref('qualified') |
| | | const type = ref(0) |
| | | const activeTab = ref('selfMade') |
| | | const type = ref(1) |
| | | const tabs = ref([ |
| | | { |
| | | label: '合格入库', |
| | | name: 'qualified', |
| | | type: '0' |
| | | label: '自制', |
| | | name: 'selfMade', |
| | | type: 1 |
| | | }, |
| | | { |
| | | label: '不合格入库', |
| | | name: 'unqualified', |
| | | type: '1' |
| | | label: '外购', |
| | | name: 'purchase', |
| | | type: 2 |
| | | }, |
| | | { |
| | | label: '委外', |
| | | name: 'outsourcing', |
| | | type: 3 |
| | | } |
| | | ]) |
| | | |
| | | const handleTabChange = (tabName) => { |
| | | activeTab.value = tabName; |
| | | type.value = tabName === 'qualified' ? 0 : 1 |
| | | const tab = tabs.value.find(t => t.name === tabName); |
| | | type.value = tab ? tab.type : 1; |
| | | } |
| | | </script> |
| | |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10">质检状态:</span> |
| | | <el-select v-model="searchForm.type" |
| | | style="width: 240px" |
| | | placeholder="请选择"> |
| | | <el-option label="合格" :value="0" /> |
| | | <el-option label="不合格" :value="1" /> |
| | | </el-select> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button> |
| | | <el-button @click="handleReset">重置</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" @click="isShowNewModal = true">新增库存</el-button> |
| | |
| | | <el-table-column label="规格型号" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="unit" show-overflow-tooltip /> |
| | | <el-table-column label="库存数量" prop="qualitity" show-overflow-tooltip /> |
| | | <el-table-column label="质检状态" |
| | | show-overflow-tooltip |
| | | width="100"> |
| | | <template #default="scope"> |
| | | <el-tag :type="searchForm.type == 0 ? 'success' : 'danger'" size="small"> |
| | | {{ searchForm.type == 0 ? '合格' : '不合格' }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="冻结数量" prop="lockedQuantity" show-overflow-tooltip /> |
| | | <el-table-column label="库存预警数量" prop="warnNum" show-overflow-tooltip /> |
| | | <el-table-column label="备注" prop="remark" show-overflow-tooltip /> |
| | |
| | | </div> |
| | | <new-stock-inventory v-if="isShowNewModal" |
| | | v-model:visible="isShowNewModal" |
| | | type="qualified" |
| | | :type="searchForm.type === 0 ? 'qualified' : 'unqualified'" |
| | | @completed="handleQuery" /> |
| | | |
| | | <subtract-stock-inventory v-if="isShowSubtractModal" |
| | | v-model:visible="isShowSubtractModal" |
| | | :record="record" |
| | | type="qualified" |
| | | :type="searchForm.type === 0 ? 'qualified' : 'unqualified'" |
| | | @completed="handleQuery" /> |
| | | <!-- 导入库存--> |
| | | <import-stock-inventory v-if="isShowImportModal" |
| | | v-model:visible="isShowImportModal" |
| | | type="qualified" |
| | | :type="searchForm.type === 0 ? 'qualified' : 'unqualified'" |
| | | @uploadSuccess="handleQuery" /> |
| | | <!-- 冻结/解冻库存--> |
| | | <frozen-and-thaw-stock-inventory v-if="isShowFrozenAndThawModal" |
| | | v-model:visible="isShowFrozenAndThawModal" |
| | | :record="record" |
| | | :operation-type="operationType" |
| | | type="qualified" |
| | | :type="searchForm.type === 0 ? 'qualified' : 'unqualified'" |
| | | @completed="handleQuery" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import pagination from '@/components/PIMTable/Pagination.vue' |
| | | import { ref, reactive, toRefs, onMounted, getCurrentInstance } from 'vue' |
| | | import { ref, reactive, toRefs, onMounted, getCurrentInstance, watch, computed } from 'vue' |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import { getStockInventoryListPage } from "@/api/inventoryManagement/stockInventory.js"; |
| | | import { getStockUninventoryListPage } from "@/api/inventoryManagement/stockUninventory.js"; |
| | | const NewStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/New.vue")); |
| | | const SubtractStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/Subtract.vue")); |
| | | const ImportStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/Import.vue")); |
| | | const FrozenAndThawStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/FrozenAndThaw.vue")); |
| | | const { proxy } = getCurrentInstance() |
| | | |
| | | const props = defineProps({ |
| | | type: { |
| | | type: Number, |
| | | required: true, |
| | | default: 1 |
| | | } |
| | | }) |
| | | |
| | | const tableData = ref([]) |
| | | const selectedRows = ref([]) |
| | | const record = ref({}) |
| | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | productName: '', |
| | | type: 0, |
| | | } |
| | | }) |
| | | const { searchForm } = toRefs(data) |
| | | |
| | | const qualityType = computed(() => { |
| | | return searchForm.value.type === 0 ? 'qualified' : 'unqualified'; |
| | | }) |
| | | |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | | const handleQuery = () => { |
| | | page.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | /** 重置按钮操作 */ |
| | | const handleReset = () => { |
| | | searchForm.value.productName = ''; |
| | | searchForm.value.type = 0; |
| | | handleQuery(); |
| | | } |
| | | const paginationChange = (obj) => { |
| | | page.current = obj.page; |
| | |
| | | } |
| | | const getList = () => { |
| | | tableLoading.value = true |
| | | getStockInventoryListPage({ ...searchForm.value, ...page }).then(res => { |
| | | const params = { ...searchForm.value, ...page, productType: props.type }; |
| | | params.type = searchForm.value.type; |
| | | |
| | | const apiCall = searchForm.value.type === 0 ? getStockInventoryListPage : getStockUninventoryListPage; |
| | | const exportApi = searchForm.value.type === 0 ? "/stockInventory/exportStockInventory" : "/stockUninventory/exportStockUninventory"; |
| | | |
| | | apiCall(params).then(res => { |
| | | tableLoading.value = false |
| | | tableData.value = res.data.records |
| | | total.value = res.data.total |
| | |
| | | type: 'warning', |
| | | } |
| | | ).then(() => { |
| | | proxy.download("/stockInventory/exportStockInventory", {}, '合格库存信息.xlsx') |
| | | const fileNameMap = { |
| | | 1: '自制库存信息.xlsx', |
| | | 2: '外购库存信息.xlsx', |
| | | 3: '委外库存信息.xlsx' |
| | | }; |
| | | const exportApi = searchForm.value.type === 0 ? "/stockInventory/exportStockInventory" : "/stockUninventory/exportStockUninventory"; |
| | | proxy.download(exportApi, {productType: props.type}, fileNameMap[props.type] || '库存信息.xlsx') |
| | | }).catch(() => { |
| | | proxy.$modal.msg("已取消") |
| | | }) |
| | |
| | | onMounted(() => { |
| | | getList() |
| | | }) |
| | | |
| | | watch(() => props.type, () => { |
| | | page.current = 1 |
| | | getList() |
| | | }) |
| | | |
| | | watch(() => searchForm.value.type, () => { |
| | | page.current = 1 |
| | | getList() |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10">质检状态:</span> |
| | | <el-select v-model="searchForm.type" |
| | | style="width: 240px" |
| | | placeholder="请选择" |
| | | clearable> |
| | | <el-option label="合格" :value="0" /> |
| | | <el-option label="不合格" :value="1" /> |
| | | </el-select> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button> |
| | | <el-button @click="handleReset">重置</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" @click="isShowNewModal = true">新增库存</el-button> |
| | |
| | | <el-table-column label="规格型号" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="unit" show-overflow-tooltip /> |
| | | <el-table-column label="库存数量" prop="qualitity" show-overflow-tooltip /> |
| | | <el-table-column label="质检状态" |
| | | prop="type" |
| | | show-overflow-tooltip |
| | | width="100"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.type == 0 ? 'success' : 'danger'" size="small"> |
| | | {{ scope.row.type == 0 ? '合格' : '不合格' }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="冻结数量" prop="lockedQuantity" show-overflow-tooltip /> |
| | | <el-table-column label="备注" prop="remark" show-overflow-tooltip /> |
| | | <el-table-column label="最近更新时间" prop="updateTime" show-overflow-tooltip /> |
| | |
| | | |
| | | <script setup> |
| | | import pagination from '@/components/PIMTable/Pagination.vue' |
| | | import { ref, reactive, toRefs, onMounted, getCurrentInstance } from 'vue' |
| | | import { ref, reactive, toRefs, onMounted, getCurrentInstance, watch } from 'vue' |
| | | import { ElMessageBox } from "element-plus"; |
| | | import { getStockUninventoryListPage } from "@/api/inventoryManagement/stockUninventory.js"; |
| | | const NewStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/New.vue")); |
| | |
| | | const FrozenAndThawStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/FrozenAndThaw.vue")); |
| | | |
| | | const { proxy } = getCurrentInstance() |
| | | |
| | | const props = defineProps({ |
| | | type: { |
| | | type: Number, |
| | | required: true, |
| | | default: 3 |
| | | } |
| | | }) |
| | | |
| | | const tableData = ref([]) |
| | | const selectedRows = ref([]) |
| | | const record = ref({}) |
| | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | productName: '', |
| | | type: '', |
| | | } |
| | | }) |
| | | const { searchForm } = toRefs(data) |
| | |
| | | page.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | /** 重置按钮操作 */ |
| | | const handleReset = () => { |
| | | searchForm.value.productName = ''; |
| | | searchForm.value.type = ''; |
| | | handleQuery(); |
| | | } |
| | | const paginationChange = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | |
| | | } |
| | | const getList = () => { |
| | | tableLoading.value = true |
| | | getStockUninventoryListPage({ ...searchForm.value, ...page }).then(res => { |
| | | const params = { ...searchForm.value, ...page, productType: props.type }; |
| | | if (searchForm.value.type !== "") { |
| | | params.type = searchForm.value.type; |
| | | } |
| | | getStockUninventoryListPage(params).then(res => { |
| | | tableLoading.value = false |
| | | tableData.value = res.data.records |
| | | total.value = res.data.total |
| | |
| | | type: 'warning', |
| | | } |
| | | ).then(() => { |
| | | proxy.download("/stockUninventory/exportStockUninventory", {}, '不合格库存信息.xlsx') |
| | | const fileNameMap = { |
| | | 1: '自制库存信息.xlsx', |
| | | 2: '外购库存信息.xlsx', |
| | | 3: '委外库存信息.xlsx' |
| | | }; |
| | | proxy.download("/stockUninventory/exportStockUninventory", {productType: props.type}, fileNameMap[props.type] || '库存信息.xlsx') |
| | | }).catch(() => { |
| | | proxy.$modal.msg("已取消") |
| | | }) |
| | |
| | | onMounted(() => { |
| | | getList() |
| | | }) |
| | | |
| | | watch(() => props.type, () => { |
| | | page.current = 1 |
| | | getList() |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | :label="tab.label" |
| | | :name="tab.name" |
| | | :key="tab.name"> |
| | | <component :is="tab.name === 'qualified' ? QualifiedRecord : UnqualifiedRecord" /> |
| | | <component :is="tab.component" :type="tab.type" v-if="activeTab === tab.name" /> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import QualifiedRecord from "@/views/inventoryManagement/stockManagement/Qualified.vue"; |
| | | import UnqualifiedRecord from "@/views/inventoryManagement/stockManagement/Unqualified.vue"; |
| | | import { markRaw } from 'vue'; |
| | | import StockRecord from "@/views/inventoryManagement/stockManagement/Qualified.vue"; |
| | | |
| | | const activeTab = ref('qualified') |
| | | const activeTab = ref('selfMade') |
| | | const tabs = ref([ |
| | | { |
| | | label: '合格库存', |
| | | name: 'qualified' |
| | | label: '自制', |
| | | name: 'selfMade', |
| | | type: 1, |
| | | component: markRaw(StockRecord) |
| | | }, |
| | | { |
| | | label: '不合格库存', |
| | | name: 'unqualified' |
| | | label: '外购', |
| | | name: 'purchase', |
| | | type: 2, |
| | | component: markRaw(StockRecord) |
| | | }, |
| | | { |
| | | label: '委外', |
| | | name: 'outsourcing', |
| | | type: 3, |
| | | component: markRaw(StockRecord) |
| | | } |
| | | ]) |
| | | |
| | |
| | | prop: "completeQuantity", |
| | | }, |
| | | { |
| | | label: "库存数量", |
| | | prop: "inventoryQuantity", |
| | | }, |
| | | { |
| | | dataType: "slot", |
| | | label: "完成进度", |
| | | prop: "completionStatus", |
| | |
| | | } |
| | | const payload = { |
| | | shippingInfoId: currentShippingOrder.value.id, |
| | | salesLedgerId: currentShippingOrder.value.salesLedgerId, |
| | | salesLedgerProductId: currentShippingOrder.value.salesLedgerProductId, |
| | | shippingTotal: currentShippingOrder.value.shippingTotal, |
| | | shippingNum: shippingForm.value.shippingNum, |
| | | type: shippingForm.value.type, |
| | |
| | | '审核中': '审核中', |
| | | '审核拒绝': '审核拒绝', |
| | | '审核通过': '审核通过', |
| | | '已发货': '已发货' |
| | | '已发货': '已发货', |
| | | '已撤销': '已撤销' |
| | | }; |
| | | return statusTextMap[statusStr] || '待发货'; |
| | | }; |
| | |
| | | '待审核': 'info', |
| | | '审核中': 'warning', |
| | | '审核拒绝': 'danger', |
| | | '已撤销': 'danger', |
| | | '审核通过': 'success', |
| | | '已发货': 'success' |
| | | }; |
| | |
| | | |
| | | /** |
| | | * 判断是否可以发货 |
| | | * 只有在产品状态是充足,发货状态是待发货和审核拒绝的时候才可以发货 |
| | | * 只有在产品状态是充足,发货状态是待发货、审核拒绝和已撤销的时候才可以发货 |
| | | * @param row 行数据 |
| | | */ |
| | | const canShip = (row) => { |
| | |
| | | return false; |
| | | } |
| | | |
| | | // 发货状态必须是"待发货"或"审核拒绝" |
| | | // 发货状态必须是"待发货"、"审核拒绝"或"已撤销" |
| | | const statusStr = shippingStatus ? String(shippingStatus).trim() : ''; |
| | | return statusStr === '待发货' || statusStr === '审核拒绝'; |
| | | return statusStr === '待发货' || statusStr === '审核拒绝' || statusStr === '已撤销'; |
| | | }; |
| | | |
| | | /** |