liujt 1 месяц назад
Родитель
Сommit
14be647621

+ 79 - 0
src/api/warehouseManagement/index.js

@@ -650,6 +650,85 @@ export default {
       return res.data.data;
     }
     return Promise.reject(new Error(res.data.message));
+  },
+  //获取解锁列表
+  inboundLockPage: async (data) => {
+    const res = await request.get(
+      '/wms/lockOrder/v1/inbound-lock-page',
+      {
+        params: data
+      }
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 解锁提交
+  submitUnlock: async (data) => {
+    const res = await request.post('/bpm/inventoryUnlockApprove/submit', data);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  //解锁保存
+  saveUnlock: async (data) => {
+    const res = await request.post(
+      '/wms/inventoryUnlockApprove/save',
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  //解锁修改
+  updateUnlock: async (data) => {
+    const res = await request.put(
+      '/wms/inventoryUnlockApprove/update',
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  //解锁列表
+  getUnlockList: async (data) => {
+    const res = await request.get(
+      '/wms/inventoryUnlockApprove/page',
+      {
+        params: data
+      }
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  //解锁详情
+  getUnlockDetails: async (id) => {
+    const res = await request.get(
+      `/wms/inventoryUnlockApprove/getById/${id}`
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  
+  //解锁删除
+  deleteUnlock: async (data) => {
+    const res = await request.delete(
+      `/wms/inventoryUnlockApprove/delete`, {
+        data
+      }
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
   }
 };
 

+ 20 - 2
src/views/warehouseManagement/stockLedger/components/item-list.vue

@@ -71,6 +71,14 @@
             :params="params"
             v-if="selectedDime == 2"
           ></exportButton>
+
+          <el-button
+            v-if="selectedDime == 2"
+            type="primary"
+            size="small"
+            @click="handleUnlock"
+            >库存解锁</el-button
+          >
         </div>
 
         <!-- <el-button
@@ -227,6 +235,7 @@
       fileName="库存导入模板"
       @success="reload"
     />
+    <unlockModal ref="unlockModalRef"></unlockModal>
   </div>
 </template>
 
@@ -258,6 +267,7 @@
   import { parameterGetByCode } from '@/api/sys/index.js';
   import exportButton from '@/components/upload/exportButton.vue';
   import printQRCode from '@/views/warehouseManagement/stockManagement/components/printQRCode.vue';
+  import unlockModal from '@/views/warehouseManagement/unlockApplication/components/unlockModal.vue'
 
   export default {
     mixins: [tabMixins],
@@ -268,7 +278,8 @@
       importDialog,
       exportButton,
       printQRCode,
-      ItemListed
+      ItemListed,
+      unlockModal
     },
     props: {
       // 机构id
@@ -326,7 +337,7 @@
         const version = this.columnsVersion;
         // selectedDime 1物品维度 2批次维度 3包装维度 4物料维度
         let arr = [
-          this.selectedDime == 3
+          this.selectedDime == 3 || this.selectedDime == 2
             ? {
                 width: 45,
                 type: 'selection',
@@ -705,6 +716,13 @@
       }
     },
     methods: {
+      handleUnlock() {
+        console.log('this.checkRadioData', this.checkRadioData);
+        if (this.checkRadioData?.length != 1) {
+          return this.$message.warning('请选择一条数据进行解锁!');
+        }
+        this.$refs.unlockModalRef.open('add',this.checkRadioData[0]);
+      },
 
       openUploadDetail(row, type) {
         this.$refs.itemListedRef.open(row, type, 'detail', this.selectedDime);

+ 273 - 0
src/views/warehouseManagement/stockLedger/components/unlockModal.vue

@@ -0,0 +1,273 @@
+<template>
+  <ele-modal
+    :title="title"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="75%"
+    :maxable="true"
+  >
+    <el-card shadow="never">
+      <el-descriptions>
+          <el-descriptions-item label="创建时间">{{ formData.createTime }}</el-descriptions-item>
+          <!-- <el-descriptions-item label="创建人">{{ formData.createUser }}</el-descriptions-item> -->
+          <el-descriptions-item label="物品编码">{{ formData.productCode }}</el-descriptions-item>
+          <el-descriptions-item label="名称">{{ formData.productName }}</el-descriptions-item>
+          <el-descriptions-item label="批次号">{{ formData.batchNo }}</el-descriptions-item>
+          <!-- <el-descriptions-item label="规格">{{ formData.spec }}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="型号">{{ formData.model }}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="牌号">{{ formData.certificateNumber }}</el-descriptions-item> -->
+      </el-descriptions>
+      <div style="margin-top: 12px">
+        <ele-pro-table
+          ref="eleTable"
+          :columns="tableColumns"
+          :datasource="tableData"
+          height="calc(100vh - 405px)"
+          full-height="calc(100vh - 116px)"
+          tool-class="ele-toolbar-form"
+          :pageSize="20"
+          @selection-change="handleSelectionChange"
+          :initLoad="false"
+          :needPage="false"
+        >
+          <template v-slot:unionQuantity="{ row }">
+            <el-input
+              v-model="row.unionQuantity"
+              placeholder="请输入"
+              :disabled="readonlyMode"
+              @input="(value) => inputNum(value, row)"
+            ></el-input>
+          </template>
+        </ele-pro-table>
+      </div>
+    </el-card>
+    <div class="btns" v-if="title != '详情'">
+      <el-button :loading="loading" type="primary" size="small" @click="handleSave(0)"
+        >保存</el-button
+      >
+      <el-button :loading="loading" type="primary" size="small" @click="handleSave(1)"
+        >提交</el-button
+      >
+      <el-button size="small" @click="handleClose">取消</el-button>
+    </div>
+  </ele-modal>
+</template>
+<script>
+  import storageApi from '@/api/warehouseManagement';
+  export default {
+    props: {},
+    data() {
+      return {
+        visible: false,
+        title: '',
+        formData: {
+    
+        },
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center'
+          },
+          {
+            columnKey: 'index',
+            type: 'index',
+            width: 50,
+            align: 'center',
+            label: '序号',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'quantity',
+            label: '锁定数量',
+            showOverflowTooltip: true,
+            width: 130,
+            align: 'center'
+          },
+          {
+            prop: 'unionQuantity',
+            label: '解锁数量',
+            slot: 'unionQuantity',
+            // sortable: 'custom',
+            showOverflowTooltip: true,
+            width: 130,
+            align: 'center'
+          },
+          {
+            prop: 'sourceOrderNo',
+            label: '关联单据编码',
+            align: 'center'
+          },
+          {
+            prop: 'sourceType',
+            label: '关联单据类型',
+            align: 'center',
+            formatter: (row) => {
+              return this.LockOrderSourceTypeEnum[row.sourceType] || '-';
+            }
+          },
+          {
+            prop: 'createTime',
+            label: '锁定时间',
+            align: 'center'
+          },
+        ],
+        rules: {
+          sourceType: [
+            { required: true, message: '请选择申请类型', trigger: 'change' }
+          ]
+        },
+        loading: false,
+        selectionList: [],
+        ids: [],
+        detailJnVOList: [],
+        tableData: [],
+        LockOrderSourceTypeEnum: {
+          0: '无定义',
+          1: '销售发货单',
+          2: '领料出库单',
+          3: '调拨出库单',
+          4: '销售订单'
+        }
+      };
+    },
+    computed: {
+      readonlyMode() {
+        return this.title === '详情';
+      },
+      tableColumns() {
+        return this.title === '详情'
+          ? this.columns.filter((c) => c.type !== 'selection')
+          : this.columns;
+      }
+    },
+
+    methods: {
+      reload(where) {
+        this.$nextTick(() => {
+          if (this.$refs.eleTable && this.$refs.eleTable.reload)
+            this.$refs.eleTable.reload({ page: 1, where: where });
+        });
+      },
+
+      async open(type, row) {
+        this.visible = true;
+        this.formData = {
+          ...row,
+          productName: this.formData.categoryName,
+          productId: this.formData.categoryId,
+          productCode: this.formData.categoryCode,
+        };
+        this.title = '解锁';
+        const res = await storageApi.inboundLockPage({
+          pageNum: -1,
+          systemBatchNo: row.systemBatchNo
+        });
+        console.log(res, 'res');
+        this.tableData = res.list || [];
+        // await this.reload();
+      },
+      inputNum(value, row) {
+        const num = value.replace(/[^\d.]/g, '');
+        const oldValue = row.quantity;
+
+        if (num > oldValue) {
+          this.$set(row, 'unionQuantity', oldValue);
+        } else {
+          this.$set(row, 'unionQuantity', num);
+        }
+      },
+      handleSelectionChange(selection) {
+        console.log(selection, '勾选');
+        // if (this.title === '新增' && selection.length > 1) {
+        //   const last = selection[selection.length - 1];
+        //   this.selectionList = [last];
+        //   this.$nextTick(() => {
+        //     if (this.$refs.eleTable && this.$refs.eleTable.setSelectedRowKeys) {
+        //       this.$refs.eleTable.setSelectedRowKeys([last.outInDetailId]);
+        //     }
+        //   });
+        //   return;
+        // }
+        this.selectionList = selection;
+      },
+      handleClose() {
+        this.visible = false;
+      },
+      handleSave(status) {
+            if (this.selectionList.length == 0)
+              return this.$message.warning('请选择解锁数据');
+
+            let isValid = true;
+            this.selectionList.forEach((item) => {
+              if (!item.unionQuantity?.trim()) {
+                isValid = false;
+              }
+            });
+            if (!isValid) {
+              this.$message.error('请填写解锁数量');
+              return;
+            }
+
+            let postData = {
+              ...this.formData,
+              // productName: this.formData.categoryName,
+              // productId: this.formData.categoryId,
+              // productCode: this.formData.categoryCode,
+              details: this.selectionList
+            };
+            this.loading = true;
+            storageApi
+              .inboundLockApprove(postData)
+              .then(async (res) => {
+                console.log(res, 'res');
+                // if (res == 0) {
+                  try {
+                    
+                    this.$emit('success');
+                    if(status == 1) {
+
+                    } else {
+                      this.$message.success('保存成功');
+                      this.loading = false;
+                      this.visible = false;
+                    }
+                  } catch (error) {
+                    this.visible = false;
+                    console.log('失败', error);
+                  }
+                // }
+              })
+              .catch((err) => {
+                console.log('申请失败', err);
+                this.loading = false;
+                this.visible = false;
+              });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .btns {
+    text-align: center;
+    padding: 10px 0;
+  }
+
+  .el-form-item__error {
+    color: red;
+    font-size: 12px;
+    line-height: 1;
+    padding-top: 4px;
+    position: relative;
+  }
+
+  .is-error .el-input__inner {
+    border-color: red;
+  }
+</style>

+ 27 - 15
src/views/warehouseManagement/stockManagement/components/printStockEnterHt.vue

@@ -61,7 +61,8 @@
               <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 8%;">实收数量</th>
               <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 9%;">计量单位2</th>
               <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 9%;">实收数量2</th>
-              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 10%;">批次号</th>
+              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 9%;">批次号</th>
+              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 8%;">税率</th>
             </tr>
           </thead>
           <tbody>
@@ -75,6 +76,7 @@
               <td style="border: 1px solid #000; padding: 4px; text-align: center;">{{ row?.packingUnit || '' }}</td>
               <td style="border: 1px solid #000; padding: 4px; text-align: center;">{{ row?.packingQuantity || '' }}</td>
               <td style="border: 1px solid #000; padding: 4px; text-align: center;">{{ row?.batchNo || '' }}</td>
+              <td style="border: 1px solid #000; padding: 4px; text-align: center;">{{ row?.taxRate ? row?.taxRate + '%' : '' }}</td>
               
             </tr>
             
@@ -89,6 +91,7 @@
               <td style="border: 1px solid #000; padding: 4px; text-align: center;"></td>
               <td style="border: 1px solid #000; padding: 4px; text-align: center;"></td>
               <td style="border: 1px solid #000; padding: 4px; text-align: center;"></td>
+              <td style="border: 1px solid #000; padding: 4px; text-align: center;"></td>
             </tr>
           </tbody>
         </table>
@@ -105,15 +108,16 @@
           <thead>
             <tr>
               <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 5%;">编号</th>
-              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 20%;">名称</th>
-              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 20%;">型号规格</th>
+              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 19%;">名称</th>
+              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 19%;">型号规格</th>
               <th v-if="rowItem.bizType == 6" style="border: 1px solid #000; padding: 4px; text-align: center; width: 12%;">客户</th>
               <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 8%;">颜色</th>
               <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 8%;">单位</th>
               <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 8%;">入库数量</th>
-              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 10%;">批次号</th>
+              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 9%;">批次号</th>
               <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 8%;">单价</th>
-              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 10%;">金额</th>
+              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 8%;">金额</th>
+              <th style="border: 1px solid #000; padding: 4px; text-align: center; width: 8%;">税率</th>
             </tr>
           </thead>
           <tbody>
@@ -128,6 +132,7 @@
               <td style="border: 1px solid #000; padding: 4px; text-align: center;">{{ row?.batchNo || '' }}</td>
               <td style="border: 1px solid #000; padding: 4px; text-align: center;"></td>
               <td style="border: 1px solid #000; padding: 4px; text-align: center;"></td>
+              <td style="border: 1px solid #000; padding: 4px; text-align: center;">{{ row?.taxRate ? row?.taxRate + '%' : '' }}</td>
             </tr>
             
             <!-- 合计行 -->
@@ -141,6 +146,7 @@
               <td style="border: 1px solid #000; padding: 4px; text-align: center;"></td>
               <td style="border: 1px solid #000; padding: 4px; text-align: center;"></td>
               <td style="border: 1px solid #000; padding: 4px; text-align: center;"></td>
+              <td style="border: 1px solid #000; padding: 4px; text-align: center;"></td>
             </tr>
           </tbody>
         </table>
@@ -290,9 +296,9 @@
           const title = isBizType1 ? '产成品入库单' : `${this.groupName || ''}入库单`;
 
           if (isBizType1) {
-            // === bizType == 1:9列,实收数量/实收数量2 ===
-            const totalCols = 9;
-            const colWidths = [55, 100, 100, 70, 70, 70, 70, 70, 70];
+            // === bizType == 1:10列 ===
+            const totalCols = 10;
+            const colWidths = [55, 100, 100, 70, 70, 70, 70, 70, 70, 70];
             const colGroup = colWidths.map((w) => `<col width="${w}" style="width:${w}pt;" />`).join('');
 
             const rows = list.map(
@@ -307,6 +313,7 @@
                 <td align="center" valign="middle" style="${td}">${item.packingUnit || ''}</td>
                 <td align="center" valign="middle" style="${td}">${item.packingQuantity || ''}</td>
                 <td align="center" valign="middle" style="${td}">${item.batchNo || ''}</td>
+                <td align="center" valign="middle" style="${td}">${item.taxRate ? item.taxRate + '%' : ''}</td>
               </tr>`
             ).join('');
 
@@ -331,6 +338,7 @@
                 <td align="center" valign="middle" style="${th}">计量单位2</td>
                 <td align="center" valign="middle" style="${th}">实收数量2</td>
                 <td align="center" valign="middle" style="${th}">批次号</td>
+                <td align="center" valign="middle" style="${th}">税率</td>
               </tr>
               ${rows}
               <tr height="26" style="height:26pt;">
@@ -342,19 +350,20 @@
                 <td align="center" valign="middle" style="${td}"></td>
                 <td align="center" valign="middle" style="${td}"></td>
                 <td align="center" valign="middle" style="${td}"></td>
+                <td align="center" valign="middle" style="${td}"></td>
               </tr>
               <tr height="28" style="height:28pt;">
-                <td colspan="4" align="left" valign="middle" style="${labelLeft}">制单人:${rowItem.extInfo?.createUserName || ''}</td>
+                <td colspan="5" align="left" valign="middle" style="${labelLeft}">制单人:${rowItem.extInfo?.createUserName || ''}</td>
                 <td colspan="5" align="left" valign="middle" style="${labelLeft}">审核人:${rowItem.verifyName || ''}</td>
               </tr>
             </table>
             <br style="mso-special-character:line-break;page-break-before:always" />`;
           } else {
-            // === bizType != 1:9-10列,含客户列(bizType6) ===
-            const totalCols = isBizType6 ? 10 : 9;
+            // === bizType != 1:10-11列,含客户列(bizType6) ===
+            const totalCols = isBizType6 ? 11 : 10;
             const colWidths = isBizType6
-              ? [55, 80, 100, 100, 70, 70, 70, 80, 70, 80]
-              : [55, 100, 130, 70, 70, 70, 80, 70, 80];
+              ? [55, 80, 100, 100, 70, 70, 70, 80, 70, 70, 80]
+              : [55, 100, 130, 70, 70, 70, 80, 70, 70, 80];
             const colGroup = colWidths.map((w) => `<col width="${w}" style="width:${w}pt;" />`).join('');
 
             const customerTh = isBizType6
@@ -374,6 +383,7 @@
                 <td align="center" valign="middle" style="${td}">${item.batchNo || ''}</td>
                 <td align="center" valign="middle" style="${td}"></td>
                 <td align="center" valign="middle" style="${td}"></td>
+                <td align="center" valign="middle" style="${td}">${item.taxRate ? item.taxRate + '%' : ''}</td>
               </tr>`
             ).join('');
 
@@ -389,7 +399,7 @@
                 <td colspan="${totalCols}" align="center" valign="middle" style="${border}padding:6px;text-align:center;font-family:'宋体';font-size:22pt;font-weight:bold;">${title}</td>
               </tr>
               <tr height="26" style="height:26pt;">
-                <td colspan="${isBizType6 ? 4 : 4}" align="left" valign="middle" style="${labelLeft}">供应商名称:${supplierValue}</td>
+                <td colspan="${isBizType6 ? 5 : 5}" align="left" valign="middle" style="${labelLeft}">供应商名称:${supplierValue}</td>
                 <td align="left" valign="middle" style="${labelLeft}">日期:${rowItem.storageTime || ''}</td>
                 <td colspan="${isBizType6 ? 5 : 4}" align="left" valign="middle" style="${labelLeft}">编号:${rowItem.bizNo || ''}</td>
               </tr>
@@ -404,6 +414,7 @@
                 <td align="center" valign="middle" style="${th}">批次号</td>
                 <td align="center" valign="middle" style="${th}">单价</td>
                 <td align="center" valign="middle" style="${th}">金额</td>
+                <td align="center" valign="middle" style="${th}">税率</td>
               </tr>
               ${rows}
               <tr height="26" style="height:26pt;">
@@ -415,12 +426,13 @@
                 <td align="center" valign="middle" style="${td}"></td>
                 <td align="center" valign="middle" style="${td}"></td>
                 <td align="center" valign="middle" style="${td}"></td>
+                <td align="center" valign="middle" style="${td}"></td>
               </tr>
               <tr height="28" style="height:28pt;">
                 <td align="left" valign="middle" style="${labelLeft}">主管:${rowItem.verifyName || ''}</td>
                 <td align="left" valign="middle" style="${labelLeft}">仓库:${warehouseName}</td>
                 <td align="left" valign="middle" style="${labelLeft}">记账:${rowItem.extInfo?.createUserName || ''}</td>
-                <td colspan="${isBizType6 ? 7 : 6}" align="left" valign="middle" style="${labelLeft}">经手人:${rowItem.fromUser || ''}</td>
+                <td colspan="${isBizType6 ? 8 : 7}" align="left" valign="middle" style="${labelLeft}">经手人:${rowItem.fromUser || ''}</td>
               </tr>
             </table>
             <br style="mso-special-character:line-break;page-break-before:always" />`;

+ 439 - 0
src/views/warehouseManagement/unlockApplication/components/edit.vue

@@ -0,0 +1,439 @@
+<template>
+  <ele-modal
+    :title="title"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="75%"
+    :maxable="true"
+  >
+    <el-card shadow="never">
+      <el-descriptions>
+          <el-descriptions-item label="创建时间">{{ formData.createTime }}</el-descriptions-item>
+          <!-- <el-descriptions-item label="创建人">{{ formData.createUser }}</el-descriptions-item> -->
+          <el-descriptions-item label="物品编码">{{ formData.productCode }}</el-descriptions-item>
+          <el-descriptions-item label="名称">{{ formData.productName }}</el-descriptions-item>
+          <el-descriptions-item label="批次号">{{ formData.batchNo }}</el-descriptions-item>
+          <!-- <el-descriptions-item label="规格">{{ formData.spec }}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="型号">{{ formData.model }}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="牌号">{{ formData.certificateNumber }}</el-descriptions-item> -->
+      </el-descriptions>
+      <div style="margin-top: 12px">
+        <ele-pro-table
+          ref="eleTable"
+          row-key="outInDetailId"
+          :columns="tableColumns"
+          :datasource="datasource"
+          height="calc(100vh - 405px)"
+          full-height="calc(100vh - 116px)"
+          tool-class="ele-toolbar-form"
+          :pageSize="20"
+          @selection-change="handleSelectionChange"
+          :initLoad="false"
+          @done="onDone"
+        >
+          <template v-slot:measureQuantity="{ row }">
+            <el-input
+              v-model="row.measureQuantity"
+              placeholder="请输入"
+              :disabled="readonlyMode"
+              @input="(value) => inputNum(value, row)"
+            ></el-input>
+          </template>
+          <template v-slot:purpose="{ row }">
+            <el-input
+              v-model="row.purpose"
+              placeholder="请输入"
+              :disabled="readonlyMode"
+            ></el-input>
+          </template>
+          <template v-slot:certificateNumber="{ row, $index }">
+            <div>
+              <el-input
+                v-model="row.certificateNumber"
+                placeholder="请输入"
+                :disabled="readonlyMode"
+                @blur="validateCertificate(row, $index)"
+                :class="{ 'is-error': row.certificateError }"
+              ></el-input>
+              <div v-if="row.certificateError" class="el-form-item__error">
+                {{ row.certificateError }}
+              </div>
+            </div>
+          </template>
+        </ele-pro-table>
+      </div>
+    </el-card>
+    <div class="btns" v-if="title != '详情'">
+      <el-button type="primary" size="small" @click="handleSave"
+        >确认</el-button
+      >
+      <el-button size="small" @click="handleClose">取消</el-button>
+    </div>
+  </ele-modal>
+</template>
+<script>
+  import storageApi from '@/api/warehouseManagement';
+  import { getCode } from '@/api/codeManagement/index.js';
+  import { re } from 'mathjs';
+  export default {
+    props: {},
+    data() {
+      return {
+        visible: false,
+        title: '',
+        formData: {
+          code: '',
+          sourceType: '',
+          remark: ''
+        },
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center'
+          },
+          {
+            columnKey: 'index',
+            type: 'index',
+            width: 50,
+            align: 'center',
+            label: '序号',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center',
+            width: 100
+          },
+          {
+            prop: 'categoryCode',
+            label: '物品编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 100
+          },
+          {
+            slot: 'categoryName',
+            prop: 'categoryName',
+            label: '物品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 160
+          },
+          {
+            prop: 'inventoryCycle',
+            label: '存货周期(天)',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'brandNum',
+            label: '牌号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'categoryModel',
+            label: '型号',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'supplierName',
+            label: '供应商',
+            showOverflowTooltip: true,
+            width: 130,
+            align: 'center'
+          },
+          {
+            prop: 'level',
+            label: '级别',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'certificateNumber',
+            slot: 'certificateNumber',
+            label: '合格证号',
+            showOverflowTooltip: true,
+            width: 160
+          },
+          {
+            prop: 'originalMeasureQuantity',
+            label: '库存数量',
+            sortable: 'custom',
+            showOverflowTooltip: true,
+            width: 130,
+            align: 'center'
+          },
+          {
+            prop: 'measureQuantity',
+            slot: 'measureQuantity',
+            label: '计量数量',
+            sortable: 'custom',
+            showOverflowTooltip: true,
+            width: 130,
+            align: 'center'
+          },
+          {
+            prop: 'measureUnit',
+            label: '计量单位',
+            align: 'center'
+          },
+          {
+            prop: 'weight',
+            label: '重量',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'weightUnit',
+            label: '重量单位',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'purpose',
+            slot: 'purpose',
+            label: '用途',
+            showOverflowTooltip: true,
+            width: 130
+          }
+        ],
+        rules: {
+          sourceType: [
+            { required: true, message: '请选择申请类型', trigger: 'change' }
+          ]
+        },
+        loading: false,
+        selectionList: [],
+        ids: [],
+        detailJnVOList: []
+      };
+    },
+    computed: {
+      readonlyMode() {
+        return this.title === '详情';
+      },
+      tableColumns() {
+        return this.title === '详情'
+          ? this.columns.filter((c) => c.type !== 'selection')
+          : this.columns;
+      }
+    },
+
+    methods: {
+      async datasource({ page, where, limit }) {
+        if (this.readonlyMode) {
+          return (this.detailJnVOList || []).map((item) => ({
+            ...item,
+            originalMeasureQuantity:
+              item.originalMeasureQuantity ?? item.measureQuantity,
+            certificateError: ''
+          }));
+        }
+        const res = await storageApi.getBatchList({ ...where, page, limit });
+
+        const data = res.list.map((item) => {
+          item.originalMeasureQuantity = item.measureQuantity;
+          item.certificateError = '';
+          item.outInDetailId = item.id;
+          delete item.id;
+
+          return {
+            ...item
+          };
+        });
+        return data;
+      },
+      reload(where) {
+        this.$nextTick(() => {
+          if (this.$refs.eleTable && this.$refs.eleTable.reload)
+            this.$refs.eleTable.reload({ page: 1, where: where });
+        });
+      },
+      onDone() {
+        this.$nextTick(() => {
+          this.$refs.eleTable.setSelectedRowKeys(this.ids);
+        });
+
+        if (this.detailJnVOList.length > 0) {
+          let list = this.$refs.eleTable.getData();
+
+          for (let i = 0; i < list.length; i++) {
+            for (let j = 0; j < this.detailJnVOList.length; j++) {
+              if (
+                list[i].outInDetailId == this.detailJnVOList[j].outInDetailId
+              ) {
+                this.$set(
+                  list[i],
+                  'certificateNumber',
+                  this.detailJnVOList[j].certificateNumber
+                );
+                this.$set(
+                  list[i],
+                  'measureQuantity',
+                  this.detailJnVOList[j].measureQuantity
+                );
+                this.$set(list[i], 'purpose', this.detailJnVOList[j].purpose);
+              }
+            }
+          }
+        }
+      },
+      resetData() {
+        this.formData = {
+          code: '',
+          sourceType: '',
+          remark: ''
+        };
+        this.detailJnVOList = [];
+      },
+      validateCertificate(row, index) {
+        let list = this.$refs.eleTable.getData();
+        if (!row.certificateNumber || row.certificateNumber.trim() === '') {
+          this.$set(list[index], 'certificateError', '证书号不能为空');
+        } else {
+          this.$set(list[index], 'certificateError', '');
+        }
+      },
+      async open(type, row) {
+        this.resetData();
+        this.visible = true;
+        this.title =
+          type == 'add' ? '新增' : type == 'detail' ? '详情' : '编辑';
+
+        if (type == 'add') {
+          const code = await getCode('Storage_application');
+          this.formData.code = code;
+        } else if (row?.id) {
+          await this.getDraftDetail(row.id);
+        }
+        await this.reload();
+      },
+      async getDraftDetail(id) {
+        const res = await storageApi.getUnlockDetails(id);
+        if (res) {
+          console.log(res, '详情');
+          this.$set(this, 'formData', res);
+
+          this.tab
+
+          this.ids =
+            res.detailJnVOList?.map((item) => item.outInDetailId) || [];
+          this.detailJnVOList = res.detailJnVOList || [];
+        }
+      },
+      inputNum(value, row) {
+        const num = value.replace(/[^\d.]/g, '');
+        const oldValue = row.originalMeasureQuantity;
+
+        if (num > oldValue) {
+          this.$set(row, 'measureQuantity', oldValue);
+        } else {
+          this.$set(row, 'measureQuantity', num);
+        }
+      },
+      handleSelectionChange(selection) {
+        console.log(selection, '勾选');
+        if (this.title === '新增' && selection.length > 1) {
+          const last = selection[selection.length - 1];
+          this.selectionList = [last];
+          this.$nextTick(() => {
+            if (this.$refs.eleTable && this.$refs.eleTable.setSelectedRowKeys) {
+              this.$refs.eleTable.setSelectedRowKeys([last.outInDetailId]);
+            }
+          });
+          return;
+        }
+        this.selectionList = selection;
+      },
+      handleClose() {
+        this.visible = false;
+        this.resetData();
+      },
+      handleSave() {
+        this.$refs.formName.validate(async (valid) => {
+          if (valid) {
+            if (this.selectionList.length == 0)
+              return this.$message.warning('请选择入库物品');
+
+            let isValid = true;
+            this.selectionList.forEach((item) => {
+              if (!item.certificateNumber?.trim()) {
+                isValid = false;
+                this.$set(item, 'certificateError', '证书号不能为空');
+              }
+            });
+            if (!isValid) {
+              this.$message.error('请填写所有必填项');
+              return;
+            }
+
+            let postData = {
+              type: 1,
+              code: this.formData.code,
+              sourceType: this.formData.sourceType,
+              detailJnAddPOList: this.selectionList,
+              id: this.title == '编辑' ? this.formData.id : null
+            };
+            this.loading = true;
+            storageApi
+              .saveStoragejn(postData)
+              .then(async (res) => {
+                if (res == 0) {
+                  try {
+                    this.$message.success('保存成功');
+                    this.loading = false;
+                    this.visible = false;
+                    this.$emit('success');
+                  } catch (error) {
+                    this.visible = false;
+                    console.log('失败', error);
+                  }
+                }
+              })
+              .catch((err) => {
+                console.log('申请失败', err);
+                this.loading = false;
+                this.visible = false;
+              });
+          } else {
+            return false;
+          }
+        });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .btns {
+    text-align: center;
+    padding: 10px 0;
+  }
+
+  .el-form-item__error {
+    color: red;
+    font-size: 12px;
+    line-height: 1;
+    padding-top: 4px;
+    position: relative;
+  }
+
+  .is-error .el-input__inner {
+    border-color: red;
+  }
+</style>

+ 98 - 0
src/views/warehouseManagement/unlockApplication/components/search.vue

@@ -0,0 +1,98 @@
+<!-- 搜索表单 -->
+6
+<template>
+  <el-form label-width="77px" class="ele-form-search" @keyup.enter.native="search" @submit.native.prevent>
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 8 } : { span: 4 }">
+        <el-form-item label="申请时间:">
+          <el-date-picker style="width: 100%;" size="small" v-model="where.time" type="daterange" range-separator="至"
+            start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"></el-date-picker>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 8 } : { span: 4 }">
+        <el-form-item label="申请单号:">
+          <el-input clearable v-model="where.sourceBizNo" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 8 } : { span: 4 }">
+        <el-form-item label="申请类型:">
+          <el-select style="width: 100%" filterable placeholder="请选择" v-model="where.bizType" clearable>
+            <el-option v-for="item in sceneState" :key="item.code" :value="item.code + ''"
+              :label="item.label"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 8 } : { span: 4 }">
+        <el-form-item label="物品编码:">
+          <el-input clearable v-model="where.categoryCode" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 8 } : { span: 4 }">
+        <el-form-item label="物品名称:">
+          <el-input clearable v-model="where.categoryName" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 8 } : { span: 4 }">
+        <el-form-item label="状态:">
+          <el-select filterable size="small" class="w100" v-model="where.status" placeholder="请选择" clearable>
+            <el-option v-for="item in auditStatus" :key="item.code" :value="item.code" :label="item.label"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col style="display: flex; justify-content: flex-end"
+        v-bind="styleResponsive ? { lg: 12, md: 6 } : { span: 12 }">
+        <div class="ele-form-actions">
+          <el-button type="primary" icon="el-icon-search" class="ele-btn-icon" @click="search">
+            查询
+          </el-button>
+          <el-button @click="reset">重置</el-button>
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+import {
+  sceneState,
+  auditStatus
+} from '@/utils/dict/index';
+export default {
+  data() {
+    // 默认表单数据
+    const defaultWhere = {
+      categoryCode: '',
+      categoryName: '',
+      sourceBizNo: '',
+      startTime: '',
+      endTime: '',
+      status: '',
+      time: []
+    };
+    return {
+      defaultWhere,
+      // 表单数据
+      where: { ...defaultWhere },
+      sceneState,
+      auditStatus
+    };
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  methods: {
+    /* 搜索 */
+    search() {
+      this.$emit('search', this.where);
+    },
+    /*  重置 */
+    reset() {
+      this.where = { ...this.defaultWhere };
+      this.search();
+    }
+  }
+};
+</script>

+ 300 - 0
src/views/warehouseManagement/unlockApplication/components/unlockModal.vue

@@ -0,0 +1,300 @@
+<template>
+  <ele-modal
+    :title="title"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="75%"
+    :maxable="true"
+  >
+    <el-card shadow="never">
+      <el-descriptions>
+          <el-descriptions-item label="创建时间">{{ formData.createTime }}</el-descriptions-item>
+          <!-- <el-descriptions-item label="创建人">{{ formData.createUser }}</el-descriptions-item> -->
+          <el-descriptions-item label="物品编码">{{ formData.productCode }}</el-descriptions-item>
+          <el-descriptions-item label="名称">{{ formData.productName }}</el-descriptions-item>
+          <el-descriptions-item label="批次号">{{ formData.batchNo }}</el-descriptions-item>
+          <!-- <el-descriptions-item label="规格">{{ formData.spec }}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="型号">{{ formData.model }}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="牌号">{{ formData.certificateNumber }}</el-descriptions-item> -->
+      </el-descriptions>
+      <div style="margin-top: 12px">
+        <ele-pro-table
+          ref="eleTable"
+          :columns="tableColumns"
+          :datasource="formData.details || []"
+          height="calc(100vh - 405px)"
+          full-height="calc(100vh - 116px)"
+          tool-class="ele-toolbar-form"
+          :pageSize="20"
+          @selection-change="handleSelectionChange"
+          :initLoad="false"
+          :needPage="false"
+        >
+          <template v-slot:unionQuantity="{ row }">
+            <el-input
+              v-model="row.unionQuantity"
+              placeholder="请输入"
+              :disabled="readonlyMode"
+              @input="(value) => inputNum(value, row)"
+            ></el-input>
+          </template>
+        </ele-pro-table>
+      </div>
+    </el-card>
+    <div class="btns" v-if="title != '详情'">
+      <el-button :loading="loading" type="primary" size="small" @click="handleSave(0)"
+        >保存</el-button
+      >
+      <el-button :loading="loading" type="primary" size="small" @click="handleSave(1)"
+        >提交</el-button
+      >
+      <el-button size="small" @click="handleClose">取消</el-button>
+    </div>
+  </ele-modal>
+</template>
+<script>
+  import storageApi from '@/api/warehouseManagement';
+  export default {
+    props: {},
+    data() {
+      return {
+        visible: false,
+        title: '',
+        formData: {},
+        modalType: '',
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center'
+          },
+          {
+            columnKey: 'index',
+            type: 'index',
+            width: 50,
+            align: 'center',
+            label: '序号',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'quantity',
+            label: '锁定数量',
+            showOverflowTooltip: true,
+            width: 130,
+            align: 'center'
+          },
+          {
+            prop: 'unionQuantity',
+            label: '解锁数量',
+            slot: 'unionQuantity',
+            // sortable: 'custom',
+            showOverflowTooltip: true,
+            width: 130,
+            align: 'center'
+          },
+          {
+            prop: 'sourceOrderNo',
+            label: '关联单据编码',
+            align: 'center'
+          },
+          {
+            prop: 'sourceType',
+            label: '关联单据类型',
+            align: 'center',
+            formatter: (row) => {
+              return this.LockOrderSourceTypeEnum[row.sourceType] || '-';
+            }
+          },
+          {
+            prop: 'orderDate',
+            label: '锁定时间',
+            align: 'center'
+          },
+        ],
+        rules: {
+          sourceType: [
+            { required: true, message: '请选择申请类型', trigger: 'change' }
+          ]
+        },
+        loading: false,
+        selectionList: [],
+        ids: [],
+        detailJnVOList: [],
+        tableData: [],
+        businessId: '',
+        LockOrderSourceTypeEnum: {
+          0: '无定义',
+          1: '销售发货单',
+          2: '领料出库单',
+          3: '调拨出库单',
+          4: '销售订单'
+        }
+      };
+    },
+    computed: {
+      readonlyMode() {
+        return this.title === '详情';
+      },
+      tableColumns() {
+        return this.title === '详情'
+          ? this.columns.filter((c) => c.type !== 'selection')
+          : this.columns;
+      }
+    },
+
+    methods: {
+      reload(where) {
+        this.$nextTick(() => {
+          if (this.$refs.eleTable && this.$refs.eleTable.reload)
+            this.$refs.eleTable.reload({ page: 1, where: where });
+        });
+      },
+
+      async open(type, row) {
+        this.visible = true;
+        this.title = '解锁';
+        console.log(type, row, 'row');
+        this.modalType = type;
+        if(type === 'add') {
+          const res = await storageApi.inboundLockPage({
+            pageNum: -1,
+            systemBatchNo: row.systemBatchNo
+          });
+          console.log(res, 'res');
+          this.tableData = res.list || [];
+          this.formData = {
+            ...row,
+            productName: row.categoryName,
+            productId: row.categoryId,
+            productCode: row.categoryCode,
+            details: res.list || []
+          };
+
+          console.log(this.formData, 'formData');
+        } else {
+          await this.getDraftDetail(row.id);
+        }
+        
+        
+        // await this.reload();
+      },
+      async getDraftDetail(id) {
+        const res = await storageApi.getUnlockDetails(id);
+        if (res) {
+          console.log(res, '详情');
+          this.$set(this, 'formData', res);
+          this.businessId = res.id;
+         this.formData = {
+          ...res
+         }
+         this.selectionList = res.details || [];
+        }
+      },
+      inputNum(value, row) {
+        const num = value.replace(/[^\d.]/g, '');
+        const oldValue = row.quantity;
+
+        if (num > oldValue) {
+          this.$set(row, 'unionQuantity', oldValue);
+        } else {
+          this.$set(row, 'unionQuantity', num);
+        }
+      },
+      handleSelectionChange(selection) {
+        console.log(selection, '勾选');
+        // if (this.title === '新增' && selection.length > 1) {
+        //   const last = selection[selection.length - 1];
+        //   this.selectionList = [last];
+        //   this.$nextTick(() => {
+        //     if (this.$refs.eleTable && this.$refs.eleTable.setSelectedRowKeys) {
+        //       this.$refs.eleTable.setSelectedRowKeys([last.outInDetailId]);
+        //     }
+        //   });
+        //   return;
+        // }
+        this.selectionList = selection;
+      },
+      handleClose() {
+        this.visible = false;
+      },
+      handleSave(status) {
+        if (this.selectionList.length == 0)
+          return this.$message.warning('请选择解锁数据');
+
+        let isValid = true;
+        this.selectionList.forEach((item) => {
+          if (!item.unionQuantity) {
+            isValid = false;
+          }
+        });
+        if (!isValid) {
+          this.$message.error('请填写解锁数量');
+          return;
+        }
+
+        let postData = {
+          ...this.formData,
+          // productName: this.formData.categoryName,
+          // productId: this.formData.categoryId,
+          // productCode: this.formData.categoryCode,
+          details: this.selectionList
+        };
+        this.loading = true;
+        const api = this.modalType === 'add' ? storageApi.saveUnlock : storageApi.updateUnlock;
+        api(postData)
+          .then(async (res) => {
+            console.log(res, 'res');
+            // if (res == 0) {
+              try {
+                if(status == 1) {
+
+                  storageApi.submitUnlock({ businessId: this.modalType === 'add' ? res : this.businessId })
+                  this.$message.success('提交成功');
+                  this.loading = false;
+                  this.visible = false;
+                  this.$emit('success');
+                } else {
+                  this.$message.success('保存成功');
+                  this.loading = false;
+                  this.visible = false;
+                  this.$emit('success');
+                }
+              } catch (error) {
+                // this.visible = false;
+                console.log('失败', error);
+              }
+            // }
+          })
+          .catch((err) => {
+            console.log('申请失败', err);
+            this.loading = false;
+            this.visible = false;
+          });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .btns {
+    text-align: center;
+    padding: 10px 0;
+  }
+
+  .el-form-item__error {
+    color: red;
+    font-size: 12px;
+    line-height: 1;
+    padding-top: 4px;
+    position: relative;
+  }
+
+  .is-error .el-input__inner {
+    border-color: red;
+  }
+</style>

+ 202 - 0
src/views/warehouseManagement/unlockApplication/index.vue

@@ -0,0 +1,202 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never">
+      <search ref="search" @search="reload"></search>
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        :pageSize="20"
+        :pageSizes="[20, 30, 40, 50, 100]"
+      >
+        <!-- 表头工具栏 -->
+        <template v-slot:toolbar>
+          <!-- <el-button
+            icon="el-icon-plus"
+            type="primary"
+            @click="handleMethod('add', {})"
+            >新建</el-button
+          > -->
+        </template>
+
+        <template v-slot:unlockNo="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="handleMethod('detail', row)"
+          >
+            {{ row.unlockNo }}
+          </el-link>
+        </template>
+
+        <template v-slot:verifyStatus="{ row }">
+          <span :class="status[row.verifyStatus]?.class">
+            {{ status[row.verifyStatus]?.label }}
+          </span>
+        </template>
+
+        <!-- 操作列 -->
+        <template v-slot:action="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="handleMethod('edit', row)"
+            v-if="row.verifyStatus == 0 || row.verifyStatus == 3"
+          >
+            修改
+          </el-link>
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="handleSubmit(row)"
+            v-if="row.verifyStatus == 0 || row.verifyStatus == 3"
+          >
+            提交
+          </el-link>
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="handleDelete(row)"
+            v-if="row.verifyStatus == 0 || row.verifyStatus == 3"
+          >
+            删除
+          </el-link>
+        </template>
+      </ele-pro-table>
+    </el-card>
+    <unlockModal ref="unlockModalRefs" @success="reload"></unlockModal>
+  </div>
+</template>
+<script>
+  import search from './components/search.vue';
+  import storageApi from '@/api/warehouseManagement';
+  import unlockModal from './components/unlockModal.vue';
+
+  export default {
+    components: {
+      search,
+      unlockModal
+    },
+    data() {
+      return {
+        status: [
+          { label: '未审核', class: 'ele-text-info' },
+          { label: '审核中', class: 'ele-text-primary' },
+          { label: '审核通过', class: 'ele-text-success' },
+          { label: '驳回', class: 'ele-text-danger' }
+        ],
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'unlockNo',
+            slot: 'unlockNo',
+            label: '解锁编号',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'productCode',
+            label: '物品编码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'productName',
+            label: '名称',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            label: '批次号',
+            prop: 'batchNo',
+            align: 'center',
+          },
+          {
+            label: '仓库名称',
+            prop: 'warehouseName',
+            align: 'center'
+          },
+          {
+            prop: 'verifyName',
+            label: '审核人',
+            align: 'center'
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            slot: 'verifyStatus',
+            label: '审核状态',
+            align: 'center',
+            prop: 'v'
+          },
+          {
+            slot: 'action',
+            label: '操作',
+            align: 'center',
+            fixed: 'right',
+            width: 160
+          }
+        ]
+      };
+    },
+    created() {},
+    methods: {
+      datasource({ page, where, limit }) {
+        if (where.time?.length) {
+          where.startTime = where.time[0];
+          where.endTime = where.time[1];
+        }
+        delete where.time;
+        return storageApi.getUnlockList({
+          ...where,
+          pageNum: page,
+          size: limit
+        });
+      },
+
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where });
+      },
+      handleMethod(type, row) {
+        this.$refs.unlockModalRefs.open(type, row);
+      },
+      async handleSubmit(row) {
+        // this.$confirm('确定要提交该条数据吗?', '提示').then(() => {
+          const res = storageApi.submitUnlock({ businessId: row.id });
+          if (res) {
+            this.$message.success('操作成功!');
+            setTimeout(() => {
+              this.reload();
+            }, 1000);
+          }
+        // });
+      },
+      handleDelete(row) {
+        this.$confirm('确定要删除该条数据吗?', '提示').then(() => {
+          const res = storageApi.deleteUnlock([row.id]);
+          if (res) {
+            this.$message.success('操作成功!');
+            setTimeout(() => {
+              this.reload();
+            }, 1000);
+          }
+        });
+      }
+    }
+  };
+</script>