From e00905e53ee5d91d9e488ecf5ece3e25b9889436 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 20 一月 2026 16:14:44 +0800
Subject: [PATCH] 湟水峡 1.采购模块不要项目名称 2.加一个有待回款登记的提示 3.回款登记、付款登记改成和销售订单价格关联,并且可以多个一起回款或付款 4.合同管理不要下载合同了,跟合同相关的字段可以去掉了 5.重构生产模块 6.测试流程并修改bug

---
 src/views/inventoryManagement/issueManagement/index.vue |  117 +++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 78 insertions(+), 39 deletions(-)

diff --git a/src/views/inventoryManagement/issueManagement/index.vue b/src/views/inventoryManagement/issueManagement/index.vue
index dec04a5..f5d2ea9 100644
--- a/src/views/inventoryManagement/issueManagement/index.vue
+++ b/src/views/inventoryManagement/issueManagement/index.vue
@@ -5,20 +5,22 @@
         <span class="search_title">渚涘簲鍟嗗悕绉帮細</span>
         <el-input v-model="searchForm.supplierName" style="width: 240px" placeholder="璇疯緭鍏�" @change="handleQuery"
           clearable prefix-icon="Search" />
-        <span class="search_title ml10">鍏ュ簱鏃ユ湡锛�</span>
-        <el-date-picker
-          v-model="searchForm.timeStr"
-          type="date"
-          placeholder="璇烽�夋嫨鏃ユ湡"
-          value-format="YYYY-MM-DD"
-          format="YYYY-MM-DD"
-          clearable
-          @change="handleQuery"
-        />
+				<span class="search_title ml10">鍏ュ簱鏃ユ湡锛�</span>
+				<el-date-picker
+					v-model="searchForm.timeStr"
+					type="date"
+					placeholder="璇烽�夋嫨鏃ユ湡"
+					value-format="YYYY-MM-DD"
+					format="YYYY-MM-DD"
+					clearable
+					@change="handleQuery"
+				/>
         <el-button type="primary" @click="handleQuery" style="margin-left: 10px">鎼滅储</el-button>
       </div>
       <div>
+        <!-- <el-button type="primary" @click="openForm('add')">鏂板鍑哄簱</el-button> -->
         <el-button @click="handleOut">瀵煎嚭</el-button>
+        <!-- <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button> -->
       </div>
     </div>
     <div class="table_list">
@@ -34,6 +36,7 @@
         <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" width="200" show-overflow-tooltip />
         <el-table-column label="鍗曚綅" prop="unit" width="70" show-overflow-tooltip />
         <el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" width="90" show-overflow-tooltip />
+        <el-table-column label="搴撳瓨鏁伴噺" prop="inboundNum0" width="90" show-overflow-tooltip />
         <el-table-column label="鍚◣鍗曚环" prop="taxInclusiveUnitPrice" width="100" show-overflow-tooltip />
         <el-table-column label="鍚◣鎬讳环" prop="taxInclusiveTotalPrice" width="100" show-overflow-tooltip />
         <el-table-column label="绋庣巼(%)" prop="taxRate" width="80" show-overflow-tooltip />
@@ -75,15 +78,17 @@
 
 <script setup>
 import pagination from '@/components/PIMTable/Pagination.vue'
-import { ref, reactive, toRefs, onMounted, getCurrentInstance } from 'vue'
+import { ref } from 'vue'
 import { ElMessageBox } from "element-plus";
 import useUserStore from '@/store/modules/user'
 import { userListNoPageByTenantId } from "@/api/system/user.js";
 import {
-	getStockInPage,
+  getStockInPage
 } from "@/api/inventoryManagement/stockIn.js";
 import {
-  stockOut,
+  getStockManagePage,
+    delStockManage,
+    stockOut,
 } from "@/api/inventoryManagement/stockManage.js";
 
 const userStore = useUserStore()
@@ -97,13 +102,18 @@
   size: 100,
 })
 const total = ref(0)
+const fileList = ref([])
 
 // 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
 const dialogFormVisible = ref(false)
 const data = reactive({
   searchForm: {
     supplierName: '',
-    timeStr: '',
+    inboundQuantity:'',
+    inboundTime:'',
+    nickName: '',
+    userId: '',
+		timeStr: '',
   },
   form: {
     productrecordId: '',
@@ -129,24 +139,35 @@
 }
 const getList = () => {
   tableLoading.value = true
-  const params = { 
-    ...page,
-    supplierName: searchForm.value.supplierName,
-    timeStr: searchForm.value.timeStr
-  }
-  
-  getStockInPage(params).then(res => {
+  getStockInPage({ ...searchForm.value, ...page }).then(res => {
     tableLoading.value = false
     tableData.value = res.data.records
     total.value = res.data.total
+    console.log('res', res.data.records)
   }).catch(() => {
     tableLoading.value = false
   })
 }
 
+const findNodeById = (nodes, productId) => {
+  for (let i = 0; i < nodes.length; i++) {
+    if (nodes[i].value === productId) {
+      return nodes[i].label; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣
+    }
+    if (nodes[i].children && nodes[i].children.length > 0) {
+      const foundNode = findNodeById(nodes[i].children, productId);
+      if (foundNode) {
+        return foundNode.label; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝杩斿洖璇ヨ妭鐐�
+      }
+    }
+  }
+  return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull
+};
 // 琛ㄦ牸閫夋嫨鏁版嵁
 const handleSelectionChange = (selection) => {
+  // 杩囨护鎺夊瓙鏁版嵁
   selectedRows.value = selection.filter(item => item.id);
+  console.log('selection', selectedRows.value)
 }
 const expandedRowKeys = ref([])
 
@@ -154,7 +175,8 @@
 const summarizeMainTable = (param) => {
   return proxy.summarizeTable(param, ['contractAmount', 'taxInclusiveTotalPrice', 'taxExclusiveTotalPrice']);
 };
-const currentRowId = ref(null)
+const currentRowId = ref(null) // 鏂板锛氬瓨鍌ㄥ綋鍓嶆搷浣滅殑琛孖D
+
 const currentRowNum = ref(0)
 const salesLedgerProductId = ref(null);
 
@@ -165,12 +187,14 @@
   currentRowNum.value = row.inboundNum0
   salesLedgerProductId.value = row.salesLedgerProductId
   form.value = {}
+  // 鍒濆鍖栬〃鍗曟暟鎹�
   form.value = {
     productrecordId: '',
-    inboundQuantity: '',
-    inboundTime: getCurrentDate(),
-    nickName: '',
+    inboundQuantity: '', // 鍑哄簱鏁伴噺娓呯┖
+    inboundTime: getCurrentDate(), // 榛樿褰撳墠鏃ユ湡
+    nickName: '', // 榛樿褰撳墠鐢ㄦ埛
   }
+  console.log('form',form.value)
   // 鍔犺浇鐢ㄦ埛鍒楄〃
   try {
     const userLists = await userListNoPageByTenantId()
@@ -189,13 +213,13 @@
   proxy.$refs["formRef"].validate(valid => {
     if (valid && currentRowId.value) {
       const outData = {
-        id: currentRowId.value,
+        id: currentRowId.value, // 鍘熷璁板綍ID
         salesLedgerProductId: salesLedgerProductId.value,
-        quantity: form.value.inboundQuantity,
-        time: form.value.inboundTime,
-        userId: form.value.nickName,
-        type: 1 // 閲囪喘鍑哄簱
+        quantity: form.value.inboundQuantity, // 鍑哄簱鏁伴噺
+        time: form.value.inboundTime, // 鍑哄簱鏃堕棿
+        userId: form.value.nickName // 鎿嶄綔浜�
       }
+      console.log(outData)
 
       stockOut(outData).then(res => {
         proxy.$modal.msgSuccess("鎻愪氦鎴愬姛")
@@ -207,7 +231,6 @@
     }
   })
 }
-
 // 鍏抽棴寮规
 const closeDia = () => {
   proxy.resetForm("formRef")
@@ -229,14 +252,30 @@
     proxy.$modal.msg("宸插彇娑�")
   })
 }
-
-// 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
-function getCurrentDate() {
-  const today = new Date();
-  const year = today.getFullYear();
-  const month = String(today.getMonth() + 1).padStart(2, '0');
-  const day = String(today.getDate()).padStart(2, '0');
-  return `${year}-${month}-${day}`;
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = []
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map(item => item.id);
+  } else {
+    proxy.$modal.msgWarning('璇烽�夋嫨鏁版嵁')
+    return
+  }
+  ElMessageBox.confirm(
+    '閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�',
+    '瀵煎嚭', {
+    confirmButtonText: '纭',
+    cancelButtonText: '鍙栨秷',
+    type: 'warning',
+  }
+  ).then(() => {
+    delStockManage(ids).then(res => {
+      proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛")
+      getList()
+    })
+  }).catch(() => {
+    proxy.$modal.msg("宸插彇娑�")
+  })
 }
 onMounted(() => {
   getList()

--
Gitblit v1.9.3