diff --git a/.gitignore b/.gitignore
index 308820b..2f3d0f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,5 @@ selenium-debug.log
package-lock.json
yarn.lock
/deploy.js
+.trae/
+.trae/
diff --git a/src/views/materialManagement/productionMaterial/MmInventory.vue b/src/views/materialManagement/productionMaterial/MmInventory.vue
index 97e295b..128a03e 100644
--- a/src/views/materialManagement/productionMaterial/MmInventory.vue
+++ b/src/views/materialManagement/productionMaterial/MmInventory.vue
@@ -10,9 +10,13 @@
-
- {{ item.materialCode }}
- {{ item.materialName }}
+
+ {{ item.type || '' }} {{ item.materialCode }} {{ item.materialName }} [{{ item.supplierName || '' }}]
@@ -75,8 +79,10 @@
@sort-change="sortChange"
:default-sort="{ prop: 'createdTime', order: 'descending' }">
-
+
+
+
@@ -128,10 +134,21 @@
-
-
- {{ item.materialCode }}
- {{ item.materialName }}
+
+
+ {{ item.type || '' }} {{ item.materialCode }} {{ item.materialName }} [{{ item.supplierName || '' }}]
@@ -154,9 +171,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
-
+
{{ item.locationCode }}
{{ item.locationName }}
@@ -195,6 +224,12 @@
+
+
+
+
+
+
@@ -237,7 +272,7 @@
{{ $t('btn.cancel') }}
- {{ $t('btn.submit') }}
+ {{ $t('btn.submit') }}
@@ -258,10 +293,21 @@
-
-
- {{ item.materialCode }}
- {{ item.materialName }}
+
+
+ {{ item.type || '' }} {{ item.materialCode }} {{ item.materialName }} [{{ item.supplierName || '' }}]
@@ -280,9 +326,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
-
+
{{ item.locationCode }}
{{ item.locationName }}
@@ -299,7 +357,7 @@
-
+
@@ -333,6 +391,12 @@
+
+
+
+
+
+
@@ -375,7 +439,7 @@
{{ $t('btn.cancel') }}
- {{ $t('btn.submit') }}
+ {{ $t('btn.submit') }}
@@ -412,6 +476,98 @@
{{ $t('btn.submit') }}
+
+
+
+
+
+
+
+
+
+ {{ item.type || '' }} {{ item.materialCode }} {{ item.materialName }} [{{ item.supplierName || '' }}]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.locationCode }}
+ {{ item.locationName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('btn.cancel') }}
+ {{ $t('btn.submit') }}
+
+
@@ -530,6 +686,7 @@ const title = ref('')
const opertype = ref(0)
const openStorage = ref(false)
const openOutStorage = ref(false)
+const openUpdate = ref(false)
const state = reactive({
single: true,
multiple: true,
@@ -539,6 +696,7 @@ const state = reactive({
transactionType: [{ required: true, message: '入库类型不能为空', trigger: 'blur' }],
quantity: [{ required: true, message: '入库数量不能为空', trigger: 'blur' }],
warehouseCode: [{ required: true, message: '仓库编码不能为空', trigger: 'blur' }],
+ locationCode: [{ required: true, message: '库位编码不能为空', trigger: 'blur' }],
// inboundNo: [{ required: true, message: '入库单号不能为空', trigger: 'blur' }],
batchNo: [{ required: true, message: '批次号不能为空', trigger: 'blur' }]
},
@@ -547,21 +705,30 @@ const state = reactive({
transactionType: [{ required: true, message: '入库类型不能为空', trigger: 'blur' }],
quantity: [{ required: true, message: '入库数量不能为空', trigger: 'blur' }],
warehouseCode: [{ required: true, message: '仓库编码不能为空', trigger: 'blur' }],
+ locationCode: [{ required: true, message: '库位编码不能为空', trigger: 'blur' }],
// outboundNo: [{ required: true, message: '出库单号不能为空', trigger: 'blur' }],
batchNo: [{ required: true, message: '批次号不能为空', trigger: 'blur' }]
},
+ rulesUpdate: {
+ materialCode: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }],
+ warehouseCode: [{ required: true, message: '仓库编码不能为空', trigger: 'blur' }],
+ locationCode: [{ required: true, message: '库位编码不能为空', trigger: 'blur' }],
+ batchNo: [{ required: true, message: '批次号不能为空', trigger: 'blur' }],
+ currentQty: [{ required: true, message: '库存数量不能为空', trigger: 'blur' }]
+ },
options: {},
transactionOptions: {},
locationOptions: [],
inOrOut: '入库'
})
-const { form, rules, rulesOut, options, transactionOptions, locationOptions, single, multiple, inOrOut } = toRefs(state)
+const { form, rules, rulesOut, rulesUpdate, options, transactionOptions, locationOptions, single, multiple, inOrOut } = toRefs(state)
// 关闭dialog
function cancel() {
openStorage.value = false
openOutStorage.value = false
+ openUpdate.value = false
reset()
}
@@ -570,11 +737,15 @@ function reset() {
form.value = {
id: null,
materialCode: null,
+ materialName: null,
+ supplierCode: null,
+ supplierName: null,
warehouseCode: null,
warehouseName: null,
locationCode: null,
locationName: null,
batchNo: null,
+ stoveCode: null,
currentQty: null,
unit: null,
productionDate: null,
@@ -612,7 +783,7 @@ function handleUpdate(row) {
getMmInventory(id).then((res) => {
const { code, data } = res
if (code == 200) {
- openOutStorage.value = true
+ openUpdate.value = true
title.value = '修改库存'
opertype.value = 2
@@ -624,42 +795,38 @@ function handleUpdate(row) {
}
// 添加&修改 表单提交
-function submitFormStorage() {
+function submitInboundForm() {
proxy.$refs['formRef'].validate((valid) => {
if (valid) {
- if (form.value.id != undefined && opertype.value === 2) {
- reateInboundReceipt(form.value).then((res) => {
- proxy.$modal.msgSuccess('修改成功')
- openStorage.value = false
- getList()
- })
- } else {
- createInboundReceipt(form.value).then((res) => {
- proxy.$modal.msgSuccess(inOrOut.value === '入库' ? '入库成功' : '出库成功')
- openStorage.value = false
- getList()
- })
- }
+ createInboundReceipt(form.value).then((res) => {
+ proxy.$modal.msgSuccess('入库成功')
+ openStorage.value = false
+ getList()
+ })
}
})
}
-function submitFormOutStorage() {
+function submitOutboundForm() {
proxy.$refs['formRef'].validate((valid) => {
if (valid) {
- if (form.value.id != undefined && opertype.value === 2) {
- reateInboundReceipt(form.value).then((res) => {
- proxy.$modal.msgSuccess('修改成功')
- openOutStorage.value = false
- getList()
- })
- } else {
- createOutboundReceipt(form.value).then((res) => {
- proxy.$modal.msgSuccess('新增成功')
- openOutStorage.value = false
- getList()
- })
- }
+ createOutboundReceipt(form.value).then((res) => {
+ proxy.$modal.msgSuccess('出库成功')
+ openOutStorage.value = false
+ getList()
+ })
+ }
+ })
+}
+
+function submitUpdateForm() {
+ proxy.$refs['formRef'].validate((valid) => {
+ if (valid) {
+ updateMmInventory(form.value).then((res) => {
+ proxy.$modal.msgSuccess('修改成功')
+ openUpdate.value = false
+ getList()
+ })
}
})
}
@@ -729,6 +896,9 @@ function getLocationOptionList() {
function handleMaterialChange(val) {
form.value.materialCode = val.materialCode
form.value.materialName = val.materialName
+ form.value.type = val.type || ''
+ form.value.supplierCode = val.supplierCode || ''
+ form.value.supplierName = val.supplierName || ''
}
// 库位编码选择器改变事件
diff --git a/src/views/materialManagement/productionMaterial/MmRecordInbound.vue b/src/views/materialManagement/productionMaterial/MmRecordInbound.vue
index f1bf79f..666649e 100644
--- a/src/views/materialManagement/productionMaterial/MmRecordInbound.vue
+++ b/src/views/materialManagement/productionMaterial/MmRecordInbound.vue
@@ -49,7 +49,7 @@
-
+
@@ -81,6 +81,9 @@
+
+
+
@@ -88,9 +91,8 @@
-
-
-
+
+
diff --git a/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue b/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue
index e44b41f..a8a6f25 100644
--- a/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue
+++ b/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue
@@ -46,7 +46,7 @@
-
+
@@ -89,7 +89,7 @@
-
+
@@ -314,18 +314,18 @@ const defaultTime = ref([new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23,
/*** 用户导入参数 */
const upload = reactive({
- // 是否显示弹出层(用户导入)
- open: false,
- // 弹出层标题(用户导入)
- title: '',
- // 是否禁用上传
- isUploading: false,
- // 是否更新已经存在的用户数据
- updateSupport: 0,
- // 设置上传的请求头部
- headers: { Authorization: 'Bearer ' + getToken() },
- // 上传的地址
- url: import.meta.env.VITE_APP_BASE_API + '/system/user/importData'
+ // 是否显示弹出层(用户导入)
+ open: false,
+ // 弹出层标题(用户导入)
+ title: '',
+ // 是否禁用上传
+ isUploading: false,
+ // 是否更新已经存在的用户数据
+ updateSupport: 0,
+ // 设置上传的请求头部
+ headers: { Authorization: 'Bearer ' + getToken() },
+ // 上传的地址
+ url: import.meta.env.VITE_APP_BASE_API + '/system/user/importData'
})
var dictParams = []