From 93ceebf32acec9b4e52b6155408ba92ae151ecd0 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期六, 08 二月 2025 17:27:40 +0800
Subject: [PATCH] ll

---
 admin/src/views/stock/components/OutEdit.vue |   41 +++++++++++++++++++++++++++++------------
 1 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/admin/src/views/stock/components/OutEdit.vue b/admin/src/views/stock/components/OutEdit.vue
index 6b6f47b..e0ec1ad 100644
--- a/admin/src/views/stock/components/OutEdit.vue
+++ b/admin/src/views/stock/components/OutEdit.vue
@@ -17,12 +17,19 @@
             <el-option v-for="op in StoreTypeOps" :key="op.id" :label="op.name" :value="op.id"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item class="w3" label="澶勭悊浜�" prop="name">
-          <el-input v-model="param.createUserName" :disabled="true" v-trim />
+        <el-form-item class="w3" label="棰嗙敤浜�" prop="outUserId">
+          <el-select v-model="param.outUserId" filterable placeholder="璇烽�夋嫨">
+            <el-option v-for="item in userList" :key="item.id" :label="item.realname" :value="item.id">
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item class="w6" label="澶囨敞" prop="remark">
           <el-input v-model="param.remark" placeholder="璇疯緭鍏�" v-trim />
         </el-form-item>
+        <el-form-item class="w3" label="澶勭悊浜�" prop="name">
+          <el-input v-model="param.createUserName" :disabled="true" v-trim />
+        </el-form-item>
+
       </div>
     </el-form>
     <!--  -->
@@ -39,8 +46,9 @@
       <el-table-column prop="unitName" label="鍗曚綅" show-overflow-tooltip min-width="70px"></el-table-column>
       <el-table-column prop="dealUserName" label="鍑哄簱鏁伴噺" min-width="90px">
         <template v-slot="{ row }">
-          <el-input oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" v-model="row.stock"
-            class="w100"></el-input>
+          <el-input
+            oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')"
+            v-model="row.stock" class="w100"></el-input>
         </template>
       </el-table-column>
       <el-table-column prop="maxStock" label="搴撳瓨鏁伴噺" show-overflow-tooltip min-width="80px"></el-table-column>
@@ -60,6 +68,7 @@
 import AssetSel from './AssetSel'
 import { fetchList as getStoreList } from '@/api/ywWarehouse'
 import { ywOutinboundCreate } from '@/api/store/index'
+import { getUserList } from '@/api/system/user'
 import { StoreTypeOps, rules } from './config'
 import { Message } from 'element-ui'
 import dayjs from 'dayjs'
@@ -82,6 +91,7 @@
       rules,
       storeList: [],
       list: [],
+      userList: [],
       StoreTypeOps: StoreTypeOps.filter(i => i.type == 1 && i.id != 10),
 
       dataList: [],
@@ -95,12 +105,12 @@
       this.$refs['form'].validate((valid) => {
         if (valid) {
           const { param, list } = this
-          if(list.length == 0) return Message.warning('璇峰厛閫夋嫨鐗╂枡淇℃伅')
+          if (list.length == 0) return Message.warning('璇峰厛閫夋嫨鐗╂枡淇℃伅')
           let count = 0 // 鍑哄簱鏁伴噺蹇呭~
           list.forEach(item => {
-            if(!item.stock) count ++
+            if (!item.stock) count++
           })
-          if(count > 0) return Message.warning('璇疯緭鍏ユ纭殑鍑哄簱鏁伴噺')
+          if (count > 0) return Message.warning('璇疯緭鍏ユ纭殑鍑哄簱鏁伴噺')
           this.isLoading = true
           ywOutinboundCreate({
             ...param,
@@ -116,19 +126,26 @@
         }
       })
     },
+    getUser() {
+      getUserList({})
+        .then(res => {
+          this.userList = res
+        })
+    },
     changeStore() {
       this.list = []
     },
     initData() {
       this.$set(this.param, 'doneDate', dayjs().format('YYYY-MM-DD'))
-      getStoreList({ capacity: 9999, page: 1, model: {status: 0} }).then(res => {
+      getStoreList({ capacity: 9999, page: 1, model: { status: 0 } }).then(res => {
         this.storeList = res.records || []
       })
+      this.getUser()
     },
     changeSel(val) {
       const list = val
       list.forEach(item => {
-        if(this.list.indexOf(item.id) === -1){
+        if (this.list.indexOf(item.id) === -1) {
           item.materialId = item.id
           item.stock = null
           item.createDate = null
@@ -142,15 +159,15 @@
 
     },
     handleOpenMaterial() {
-      if(!this.param.warehouseId) return Message.warning('璇峰厛閫夋嫨鍑哄簱浠撳簱')
+      if (!this.param.warehouseId) return Message.warning('璇峰厛閫夋嫨鍑哄簱浠撳簱')
       this.isShowSel = true
       this.$nextTick(() => {
         this.$refs.AssetSelRef.isShowModal = true
         this.$refs.AssetSelRef.isOut = true
         this.$refs.AssetSelRef.warehouseId = this.param.warehouseId
         this.$refs.AssetSelRef.getList()
-        console.log('-----');
-        
+        console.log('-----')
+
       })
     },
     close() {

--
Gitblit v1.9.3