From 06c4e59fa35c1b9e74da9cf3d081e78c13d17e20 Mon Sep 17 00:00:00 2001
From: yangyang
Date: 星期一, 14 七月 2025 06:36:36 +0800
Subject: [PATCH] no message

---
 zy-asrs-admin/src/views/loc/locDetl/index.vue |  131 ++++++++++++++++++++++++++++++++-----------
 1 files changed, 96 insertions(+), 35 deletions(-)

diff --git a/zy-asrs-admin/src/views/loc/locDetl/index.vue b/zy-asrs-admin/src/views/loc/locDetl/index.vue
index 2b2d2fd..99a27c4 100644
--- a/zy-asrs-admin/src/views/loc/locDetl/index.vue
+++ b/zy-asrs-admin/src/views/loc/locDetl/index.vue
@@ -8,7 +8,6 @@
 import { formatMessage } from '@/utils/localeUtils.js';
 import useTableSearch from '@/utils/tableUtils.jsx';
 const context = getCurrentInstance()?.appContext.config.globalProperties;
-
 const router = useRouter();
 
 const TABLE_KEY = 'table-locDetl';
@@ -21,9 +20,9 @@
   orderNo: null,
   batch: null,
   tagId: null,
+  orderType: null,
 })
 const editChild = ref(null)
-
 const state = reactive({
   selectedRowKeys: [],
   loading: false,
@@ -70,6 +69,13 @@
     ...getColumnSearchProps('locNo'),
   },
   {
+    title: formatMessage('db.man_loc_detl.loc_type', '搴撲綅绫诲瀷'),
+    dataIndex: 'type$',
+    width: 140,
+    ellipsis: true,
+    ...getColumnSearchProps('type$'),
+  },
+  {
     title: formatMessage('db.man_loc_detl.matnr', '鍟嗗搧缂栧彿'),
     dataIndex: 'matnr',
     width: 140,
@@ -98,11 +104,32 @@
     ...getColumnSearchProps('model'),
   },
   {
-    title: formatMessage('db.man_loc_detl.model', '鍝佺被'),
+    title: formatMessage('db.man_loc_detl.matnr', '鍝佺被'),
     dataIndex: 'tagId$',
     width: 140,
     ellipsis: true,
     ...getColumnSearchProps('tagId$'),
+  },
+  {
+    title: formatMessage('db.man_loc_detl.maktx', '棰滆壊'),
+    dataIndex: 'color',
+    width: 140,
+    ellipsis: true,
+    ...getColumnSearchProps('color'),
+  },
+  {
+    title: formatMessage('db.man_loc_detl.model', '鍝佺墝'),
+    dataIndex: 'brand',
+    width: 140,
+    ellipsis: true,
+    ...getColumnSearchProps('brand'),
+  },
+  {
+    title: formatMessage('db.man_loc_detl.model', '浜у湴'),
+    dataIndex: 'origin',
+    width: 140,
+    ellipsis: true,
+    ...getColumnSearchProps('origin'),
   },
   {
     title: formatMessage('db.man_loc_detl.dewell', '鍏ュ簱鏃堕棿'),
@@ -132,13 +159,13 @@
     ellipsis: true,
     ...getColumnSearchProps('anfme'),
   },
-  {
-    title: formatMessage('db.man_loc_detl.freeze', '鏄惁鍐荤粨'),
-    dataIndex: 'freeze$',
-    width: 140,
-    ellipsis: true,
-    ...getColumnSearchProps('freeze$'),
-  },
+  // {
+  //   title: formatMessage('db.man_loc_detl.freeze', '鏄惁鍐荤粨'),
+  //   dataIndex: 'freeze$',
+  //   width: 140,
+  //   ellipsis: true,
+  //   ...getColumnSearchProps('freeze$'),
+  // },
   {
     title: formatMessage('db.man_loc_detl.status', '鐘舵��'),
     dataIndex: 'status$',
@@ -146,20 +173,6 @@
     ellipsis: true,
     ...getColumnSearchProps('status$'),
   },
-  // {
-  //   title: formatMessage('db.man_loc_detl.create_time', '娣诲姞鏃堕棿'),
-  //   dataIndex: 'createTime$',
-  //   width: 140,
-  //   ellipsis: true,
-  //   ...getColumnSearchProps('createTime$'),
-  // },
-  // {
-  //   title: formatMessage('db.man_loc_detl.create_by', '娣诲姞浜哄憳'),
-  //   dataIndex: 'createBy$',
-  //   width: 140,
-  //   ellipsis: true,
-  //   ...getColumnSearchProps('createBy$'),
-  // },
   {
     title: formatMessage('db.man_loc_detl.update_time', '淇敼鏃堕棿'),
     dataIndex: 'updateTime$',
@@ -180,6 +193,14 @@
     width: 140,
     ellipsis: true,
     ...getColumnSearchProps('memo'),
+  },
+  {
+    title: formatMessage('common.operation', '鎿嶄綔'),
+    name: 'oper',
+    dataIndex: 'oper',
+    key: 'oper',
+    width: 140,
+    fixed: 'right',
   },
 ];
 
@@ -236,9 +257,43 @@
 }
 
 const handleEdit = (item) => {
-  editChild.value.open = true;
-  editChild.value.formData = item == null ? editChild.value.initFormData : JSON.parse(JSON.stringify(item));
-  editChild.value.isSave = item == null;
+  let content = "鏄惁纭鐢熸垚-->鍑哄簱浠诲姟锛侊紒"
+  let type = 2
+  if (item?.locNo.indexOf("B") >= 0 || item?.locNo.indexOf("C") >= 0) {
+    content = "鏄惁纭鐢熸垚-->鎷h揣鍗曪紒锛�"
+    type = 1
+  }
+  Modal.confirm({
+    title: formatMessage('page.delete', '鍑哄簱'),
+    content: formatMessage('page.delete.confirm', content),
+    maskClosable: true,
+    onOk: async () => {
+      const hide = message.loading(formatMessage('common.loading', '璇锋眰涓�'));
+      try {
+        let params = {
+          outType: type,
+          locDetls: [item]
+        }
+        post('/api/out/locs/stock', params).then(resp => {
+          let result = resp.data;
+          if (result.code === 200) {
+            console.log(result);
+            message.success(result.msg);
+          } else {
+            message.error(result.msg);
+          }
+          getPage()
+          hide()
+        })
+      } catch (error) {
+        message.error(formatMessage('common.fail', '璇锋眰澶辫触'));
+      }
+    },
+  });
+
+  // editChild.value.open = true;
+  // editChild.value.formData = item == null ? editChild.value.initFormData : JSON.parse(JSON.stringify(item));
+  // editChild.value.isSave = item == null;
 }
 
 const handleDel = (rows) => {
@@ -279,6 +334,7 @@
 
 const onSearch = () => {
   // console.log('search');
+  currentPage = 1;
   getPage()
 }
 
@@ -316,12 +372,17 @@
           style="width: 140px;margin-right: 10px;" />
         <a-input v-model:value="searchParam.batch" :placeholder="formatMessage('page.locDetl.batch.input', '璇疯緭鍏ユ壒鍙�')"
           style="width: 140px;margin-right: 10px;" />
-        <a-select v-model:value="searchParam.tagId" :placeholder="formatMessage('page.locDetl.orderNo.input', '璇烽�夋嫨鍝佺被')" :options="[
-          { label: '榛樿鍒嗙被', value: 10 },{ label: '鏈烘补', value: 11 }, { label: '鍙橀�熺娌�', value: 17 }, { label: '鐏姳濉�', value: 18 },
-          { label: '鍏绘姢鍝�', value: 25 },{ label: '娌规紗鑰楁潗', value: 26 }, { label: '鐞冨ご鎽嗚噦', value: 27 }, { label: '鐮傜焊绫�', value: 31 },
-          { label: '鑿滅摐甯�', value: 32 }, { label: '閬斀绫�', value: 33 }, { label: '鎶涘厜绫�', value: 34 }, { label: '闄ゅ皹绫�', value: 35 },
-          { label: '婕忔枟绫�', value: 36 }, { label: '闃叉姢绫�', value: 37 }, { label: '鐑ゆ埧淇濆吇绫�', value: 38 }, { label: '璋冩紗缃�', value: 39 },
-          { label: '鍠锋灙', value: 40 }, { label: '璐规柉鎵樼郴鍒�', value: 41 },]" style="width: 140px;margin-right: 10px;">
+        <a-select v-model:value="searchParam.orderType" :placeholder="formatMessage('page.locDetl.orderNo.input', '浠撳簱绫诲瀷')"
+          :options="[
+           { label: '鍏ㄩ儴', value: null },  { label: '绔嬪簱', value: 1 }, { label: '骞冲簱', value: 2 }]" style="width: 140px;margin-right: 10px;">
+        </a-select>
+        <a-select v-model:value="searchParam.tagId" :placeholder="formatMessage('page.locDetl.orderNo.input', '璇烽�夋嫨鍝佺被')"
+          :options="[
+            { label: '榛樿鍒嗙被', value: 10 }, { label: '鏈烘补', value: 11 }, { label: '鍙橀�熺娌�', value: 17 }, { label: '鐏姳濉�', value: 18 },
+            { label: '鍏绘姢鍝�', value: 25 }, { label: '娌规紗鑰楁潗', value: 26 }, { label: '鐞冨ご鎽嗚噦', value: 27 }, { label: '鐮傜焊绫�', value: 31 },
+            { label: '鑿滅摐甯�', value: 32 }, { label: '閬斀绫�', value: 33 }, { label: '鎶涘厜绫�', value: 34 }, { label: '闄ゅ皹绫�', value: 35 },
+            { label: '婕忔枟绫�', value: 36 }, { label: '闃叉姢绫�', value: 37 }, { label: '鐑ゆ埧淇濆吇绫�', value: 38 }, { label: '璋冩紗缃�', value: 39 },
+            { label: '鍠锋灙', value: 40 }, { label: '璐规柉鎵樼郴鍒�', value: 41 },]" style="width: 140px;margin-right: 10px;">
         </a-select>
         <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '璇疯緭鍏�')"
           style="width: 200px;" @search="onSearch" />
@@ -339,9 +400,9 @@
       <template #bodyCell="{ column, text, record }">
         <template v-if="column.dataIndex === 'oper'">
           <div style="display: flex;justify-content: space-evenly;">
-            <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '缂栬緫') }}</a-button>
-            <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '鍒犻櫎')
+            <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '鎵嬪姩鍑哄簱')
             }}</a-button>
+            <!-- <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '鍒犻櫎')}}</a-button> -->
           </div>
         </template>
       </template>

--
Gitblit v1.9.1