From 236566b02c46f11f684e942b38ec43c310421fa3 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 17 三月 2026 13:06:27 +0800
Subject: [PATCH] 军泰伟业 1.仓储物流需要加上库位,库位暂时分为外购、自制、委外三种类型 2.生产订单加上库存数量,方便实时查看 3.产品发货后,若部分产品退回,可修改订单发货数量(减去退回的产品数量),若订单产品全部退回,可对发货的订单进行取消撤回操作
---
src/views/inventoryManagement/dispatchLog/Record.vue | 62 ++++++++-
src/views/salesManagement/deliveryLedger/index.vue | 2
src/views/inventoryManagement/receiptManagement/index.vue | 24 ++-
src/views/productionManagement/productionOrder/index.vue | 4
src/views/inventoryManagement/stockManagement/index.vue | 26 +++-
src/views/inventoryManagement/stockManagement/Qualified.vue | 75 +++++++++++-
src/views/salesManagement/salesLedger/index.vue | 10 +
src/views/inventoryManagement/stockManagement/Unqualified.vue | 56 ++++++++
src/views/inventoryManagement/dispatchLog/index.vue | 26 ++-
src/views/inventoryManagement/receiptManagement/Record.vue | 69 +++++++++-
10 files changed, 294 insertions(+), 60 deletions(-)
diff --git a/src/views/inventoryManagement/dispatchLog/Record.vue b/src/views/inventoryManagement/dispatchLog/Record.vue
index 1637226..2e0a7ca 100644
--- a/src/views/inventoryManagement/dispatchLog/Record.vue
+++ b/src/views/inventoryManagement/dispatchLog/Record.vue
@@ -22,9 +22,18 @@
: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>
@@ -76,6 +85,16 @@
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"
@@ -103,7 +122,7 @@
<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";
@@ -130,9 +149,9 @@
const props = defineProps({
type: {
- type: String,
+ type: Number,
required: true,
- default: '0'
+ default: 1
}
})
@@ -146,6 +165,7 @@
supplierName: "",
timeStr: "",
recordType: "",
+ type: "",
}
});
const { searchForm } = toRefs(data);
@@ -156,6 +176,15 @@
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;
@@ -163,7 +192,11 @@
};
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;
@@ -183,17 +216,17 @@
// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
const fetchStockRecordTypeOptions = () => {
- if (props.type === '0') {
+ if (props.type === 1 || props.type === 2) {
findAllQualifiedStockOutRecordTypeOptions()
.then(res => {
stockRecordTypeOptions.value = res.data;
})
- return
- }
- findAllUnQualifiedStockOutRecordTypeOptions()
+ } else {
+ findAllUnQualifiedStockOutRecordTypeOptions()
.then(res => {
stockRecordTypeOptions.value = res.data;
})
+ }
}
// 琛ㄦ牸閫夋嫨鏁版嵁
@@ -212,7 +245,12 @@
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("宸插彇娑�");
@@ -537,6 +575,12 @@
getList();
fetchStockRecordTypeOptions();
});
+
+watch(() => props.type, () => {
+ page.current = 1;
+ getList();
+ fetchStockRecordTypeOptions();
+});
</script>
<style scoped lang="scss">
diff --git a/src/views/inventoryManagement/dispatchLog/index.vue b/src/views/inventoryManagement/dispatchLog/index.vue
index 88d9984..2f70131 100644
--- a/src/views/inventoryManagement/dispatchLog/index.vue
+++ b/src/views/inventoryManagement/dispatchLog/index.vue
@@ -14,25 +14,33 @@
<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>
diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index 3f90edf..0b67f42 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -25,10 +25,19 @@
: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>
@@ -73,6 +82,19 @@
<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/>
@@ -102,6 +124,7 @@
toRefs,
onMounted,
getCurrentInstance,
+ watch,
} from "vue";
import {ElMessageBox} from "element-plus";
import {
@@ -116,9 +139,9 @@
const props = defineProps({
type: {
- type: String,
+ type: Number,
required: true,
- default: '0'
+ default: 1
}
})
@@ -138,14 +161,25 @@
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) => {
@@ -160,10 +194,13 @@
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;
@@ -175,17 +212,17 @@
// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
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;
+ })
}
- findAllUnQualifiedStockInRecordTypeOptions()
- .then(res => {
- stockRecordTypeOptions.value = res.data;
- })
}
// 琛ㄦ牸閫夋嫨鏁版嵁
@@ -203,8 +240,12 @@
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("宸插彇娑�");
@@ -243,6 +284,12 @@
getList();
fetchStockRecordTypeOptions();
});
+
+watch(() => props.type, () => {
+ page.current = 1;
+ getList();
+ fetchStockRecordTypeOptions();
+});
</script>
<style scoped lang="scss"></style>
diff --git a/src/views/inventoryManagement/receiptManagement/index.vue b/src/views/inventoryManagement/receiptManagement/index.vue
index 8ca110f..879e3c3 100644
--- a/src/views/inventoryManagement/receiptManagement/index.vue
+++ b/src/views/inventoryManagement/receiptManagement/index.vue
@@ -14,23 +14,29 @@
<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>
diff --git a/src/views/inventoryManagement/stockManagement/Qualified.vue b/src/views/inventoryManagement/stockManagement/Qualified.vue
index 8b15db1..6270262 100644
--- a/src/views/inventoryManagement/stockManagement/Qualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -7,7 +7,15 @@
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>
@@ -27,6 +35,15 @@
<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 />
@@ -44,39 +61,49 @@
</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" />
<!-- 鍐荤粨/瑙e喕搴撳瓨-->
<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({})
@@ -99,15 +126,27 @@
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;
@@ -116,7 +155,13 @@
}
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
@@ -186,7 +231,13 @@
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("宸插彇娑�")
})
@@ -195,6 +246,16 @@
onMounted(() => {
getList()
})
+
+watch(() => props.type, () => {
+ page.current = 1
+ getList()
+})
+
+watch(() => searchForm.value.type, () => {
+ page.current = 1
+ getList()
+})
</script>
<style scoped lang="scss">
diff --git a/src/views/inventoryManagement/stockManagement/Unqualified.vue b/src/views/inventoryManagement/stockManagement/Unqualified.vue
index 9b5652d..9f81143 100644
--- a/src/views/inventoryManagement/stockManagement/Unqualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Unqualified.vue
@@ -7,7 +7,16 @@
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>
@@ -24,6 +33,16 @@
<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 />
@@ -60,7 +79,7 @@
<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"));
@@ -68,6 +87,15 @@
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({})
@@ -88,6 +116,7 @@
const data = reactive({
searchForm: {
productName: '',
+ type: '',
}
})
const { searchForm } = toRefs(data)
@@ -98,6 +127,13 @@
page.current = 1
getList()
}
+
+/** 閲嶇疆鎸夐挳鎿嶄綔 */
+const handleReset = () => {
+ searchForm.value.productName = '';
+ searchForm.value.type = '';
+ handleQuery();
+}
const paginationChange = (obj) => {
page.current = obj.page;
page.size = obj.limit;
@@ -105,7 +141,11 @@
}
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
@@ -164,7 +204,12 @@
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("宸插彇娑�")
})
@@ -173,6 +218,11 @@
onMounted(() => {
getList()
})
+
+watch(() => props.type, () => {
+ page.current = 1
+ getList()
+})
</script>
<style scoped lang="scss">
diff --git a/src/views/inventoryManagement/stockManagement/index.vue b/src/views/inventoryManagement/stockManagement/index.vue
index 347de38..417f6c2 100644
--- a/src/views/inventoryManagement/stockManagement/index.vue
+++ b/src/views/inventoryManagement/stockManagement/index.vue
@@ -5,25 +5,35 @@
: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)
}
])
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index d181d51..494c646 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -163,6 +163,10 @@
prop: "completeQuantity",
},
{
+ label: "搴撳瓨鏁伴噺",
+ prop: "inventoryQuantity",
+ },
+ {
dataType: "slot",
label: "瀹屾垚杩涘害",
prop: "completionStatus",
diff --git a/src/views/salesManagement/deliveryLedger/index.vue b/src/views/salesManagement/deliveryLedger/index.vue
index 3038a84..748480c 100644
--- a/src/views/salesManagement/deliveryLedger/index.vue
+++ b/src/views/salesManagement/deliveryLedger/index.vue
@@ -529,6 +529,8 @@
}
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,
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index e7de3ac..fcc9cf4 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -1985,7 +1985,8 @@
'瀹℃牳涓�': '瀹℃牳涓�',
'瀹℃牳鎷掔粷': '瀹℃牳鎷掔粷',
'瀹℃牳閫氳繃': '瀹℃牳閫氳繃',
- '宸插彂璐�': '宸插彂璐�'
+ '宸插彂璐�': '宸插彂璐�',
+ '宸叉挙閿�': '宸叉挙閿�'
};
return statusTextMap[statusStr] || '寰呭彂璐�';
};
@@ -2015,6 +2016,7 @@
'寰呭鏍�': 'info',
'瀹℃牳涓�': 'warning',
'瀹℃牳鎷掔粷': 'danger',
+ '宸叉挙閿�': 'danger',
'瀹℃牳閫氳繃': 'success',
'宸插彂璐�': 'success'
};
@@ -2023,7 +2025,7 @@
/**
* 鍒ゆ柇鏄惁鍙互鍙戣揣
- * 鍙湁鍦ㄤ骇鍝佺姸鎬佹槸鍏呰冻锛屽彂璐х姸鎬佹槸寰呭彂璐у拰瀹℃牳鎷掔粷鐨勬椂鍊欐墠鍙互鍙戣揣
+ * 鍙湁鍦ㄤ骇鍝佺姸鎬佹槸鍏呰冻锛屽彂璐х姸鎬佹槸寰呭彂璐с�佸鏍告嫆缁濆拰宸叉挙閿�鐨勬椂鍊欐墠鍙互鍙戣揣
* @param row 琛屾暟鎹�
*/
const canShip = (row) => {
@@ -2040,9 +2042,9 @@
return false;
}
- // 鍙戣揣鐘舵�佸繀椤绘槸"寰呭彂璐�"鎴�"瀹℃牳鎷掔粷"
+ // 鍙戣揣鐘舵�佸繀椤绘槸"寰呭彂璐�"銆�"瀹℃牳鎷掔粷"鎴�"宸叉挙閿�"
const statusStr = shippingStatus ? String(shippingStatus).trim() : '';
- return statusStr === '寰呭彂璐�' || statusStr === '瀹℃牳鎷掔粷';
+ return statusStr === '寰呭彂璐�' || statusStr === '瀹℃牳鎷掔粷' || statusStr === '宸叉挙閿�';
};
/**
--
Gitblit v1.9.3