diff --git a/src/views/materialManagement/productionMaterial/MmInventory.vue b/src/views/materialManagement/productionMaterial/MmInventory.vue
index 5868d9e..dc3e73e 100644
--- a/src/views/materialManagement/productionMaterial/MmInventory.vue
+++ b/src/views/materialManagement/productionMaterial/MmInventory.vue
@@ -14,6 +14,9 @@
{{ item.materialName }}
+
+
+
@@ -56,8 +59,10 @@
border
header-cell-class-name="el-table-header-cell"
highlight-current-row
- @sort-change="sortChange">
+ @sort-change="sortChange"
+ :default-sort="{ prop: 'createdTime', order: 'descending' }">
+
@@ -68,7 +73,6 @@
-
@@ -161,7 +165,7 @@
-
+
@@ -290,7 +294,7 @@
-
+
@@ -358,11 +362,11 @@ import {
updateMmInventory,
getMmInventory,
getMaterialOption,
- getTransactionOption,
createInboundReceipt,
getLocationOption,
createOutboundReceipt
} from '@/api/materialManagement/productionMaterial/mminventory.js'
+import { listMmTransactionType } from '@/api/materialManagement/productionMaterial/mmtransactiontype.js'
import { warehouseOptions } from '@/utils/warehouse.js'
const { proxy } = getCurrentInstance()
const ids = ref([])
@@ -390,7 +394,7 @@ const columns = ref([
{ visible: false, align: 'center', type: '', prop: 'unit', label: '计量单位', showOverflowTooltip: true },
{ visible: false, align: 'center', type: '', prop: 'productionDate', label: '生产日期', showOverflowTooltip: true },
{ visible: false, align: 'center', type: '', prop: 'expiryDate', label: '有效期至', showOverflowTooltip: true },
- { visible: false, align: 'center', type: '', prop: 'lastUpdatedTime', label: '最后更新时间', showOverflowTooltip: true },
+ { visible: true, align: 'center', type: '', prop: 'lastUpdatedTime', label: '最后更新时间', showOverflowTooltip: true },
{ visible: false, align: 'center', type: '', prop: 'createdTime', label: '创建时间', showOverflowTooltip: true }
//{ visible: false, prop: 'actions', label: '操作', type: 'slot', width: '160' }
])
@@ -466,7 +470,7 @@ const state = reactive({
options: {},
transactionOptions: {},
locationOptions: [],
- inOrOut: 0
+ inOrOut: '入库'
})
const { form, rules, rulesOut, options, transactionOptions, locationOptions, single, multiple, inOrOut } = toRefs(state)
@@ -504,7 +508,8 @@ function handleStorage() {
openStorage.value = true
title.value = '填写入库单信息'
opertype.value = 1
- inOrOut.value = 0
+ inOrOut.value = '入库'
+ getTypeOfWarehousingList()
}
// 出库操作
function handleOutStorage() {
@@ -512,7 +517,8 @@ function handleOutStorage() {
openOutStorage.value = true
title.value = '填写出库单信息'
opertype.value = 1
- inOrOut.value = 1
+ inOrOut.value = '出库'
+ getTypeOfWarehousingList()
}
// 修改按钮操作
function handleUpdate(row) {
@@ -545,7 +551,7 @@ function submitFormStorage() {
})
} else {
createInboundReceipt(form.value).then((res) => {
- proxy.$modal.msgSuccess(inOrOut.value === 0 ? '入库成功' : '出库成功')
+ proxy.$modal.msgSuccess(inOrOut.value === '入库' ? '入库成功' : '出库成功')
openStorage.value = false
getList()
})
@@ -610,10 +616,10 @@ function getMaterialCodeList() {
// 获取出入库类型列表
function getTypeOfWarehousingList() {
try {
- getTransactionOption('typeOfWarehousing').then((res) => {
+ listMmTransactionType({ transactionDirection: inOrOut.value, status: '启用' }).then((res) => {
const { code, data } = res
if (code == 200) {
- state.transactionOptions = data
+ state.transactionOptions = data.result
}
})
} catch (error) {
@@ -650,6 +656,5 @@ function handleLocationChange(val) {
handleQuery()
getMaterialCodeList()
-getTypeOfWarehousingList()
getLocationOptionList()
diff --git a/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue b/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue
index 4a2e1d3..1a4a0b5 100644
--- a/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue
+++ b/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue
@@ -9,6 +9,11 @@
+
+
+
+
+
@@ -59,12 +64,8 @@
+
-
-
-
-
-
@@ -158,9 +159,9 @@
+ :key="item.id"
+ :label="item.typeCode"
+ :value="item.typeName">
@@ -212,6 +213,7 @@ import {
updateMmRecordOutbound,
getMmRecordOutbound
} from '@/api/materialManagement/productionMaterial/mmrecordoutbound.js'
+import { listMmTransactionType } from '@/api/materialManagement/productionMaterial/mmtransactiontype.js'
import dateOptions from '@/utils/dateOptions.js'
const { proxy } = getCurrentInstance()
const ids = ref([])
@@ -405,5 +407,20 @@ function handleDelete(row) {
})
}
+// 获取出库类型列表
+function getTypeOfWarehousingList() {
+ try {
+ listMmTransactionType({ transactionDirection: '出库', status: '启用' }).then((res) => {
+ const { code, data } = res
+ if (code == 200) {
+ state.options.transactionTypeOptions = data.result
+ }
+ })
+ } catch (error) {
+ proxy.$modal.msgError(error.message)
+ }
+}
+
handleQuery()
+getTypeOfWarehousingList()