schangxiang@126.com
2025-03-10 8706d6948d9a922d8e5adce27f49790ad4ac1d71
LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/packList/component/openAllprop.vue
@@ -273,20 +273,14 @@
               <el-form :model="detailForm">
                  <el-row>
                     <el-col :span="6">
                        <el-form-item label="包装号">
                           <el-input v-model="detailForm.packageCode" clearable placeholder="请输入包装号" />
                        <el-form-item label="部件名称">
                           <el-input v-model="detailForm.detailName" clearable placeholder="请输入部件名称" />
                        </el-form-item>
                     </el-col>
                     <el-col :span="4">
                        <el-form-item label-width="20px">
                           <el-button type="primary" icon="el-icon-search" @click="getDetail">查询</el-button>
                           <!-- <el-button type="primary" icon="ele-Printer" @click="getPrint">打印</el-button> -->
                           <!-- :disabled="checkRows.length == 0" -->
                           <el-button type="primary" style="margin-left: 5px" icon="ele-Printer" @click="handleHtmlPrint">
                           打印
                        </el-button>
                           <!-- <el-button type="primary" style="margin-left: 5px" icon="ele-Printer" @click="handleHtmlPrint"> 打印 </el-button> -->
                        </el-form-item>
                     </el-col>
                  </el-row>
@@ -299,34 +293,96 @@
                  <!-- <el-table-column prop="poId" label="PO单ID" show-overflow-tooltip="" /> -->
                  <!-- <el-table-column prop="poNo" label="PO单号" show-overflow-tooltip="" /> -->
                  <el-table-column prop="placeCode" label="库位编码"  show-overflow-tooltip="" />
         <el-table-column prop="inTime" label="进入时间" width="80" :formatter="formatDate_T_Date"  show-overflow-tooltip="" />
        <el-table-column prop="upi" label="部件条码"  show-overflow-tooltip="" />
        <el-table-column prop="detailName" label="部件名称"  show-overflow-tooltip="" />
        <el-table-column prop="planNo" label="批次"  show-overflow-tooltip="" />
                  <el-table-column prop="placeCode" label="库位编码" show-overflow-tooltip="" />
                  <el-table-column prop="inTime" label="进入时间" width="80" :formatter="formatDate_T_Date" show-overflow-tooltip="" />
                  <el-table-column prop="upi" label="部件条码" width="160"  show-overflow-tooltip="" />
                  <el-table-column prop="detailName" label="部件名称" show-overflow-tooltip="" />
                  <el-table-column prop="planNo" label="批次" show-overflow-tooltip="" />
                  <el-table-column prop="orderId" label="订单号" show-overflow-tooltip="" />
                  <el-table-column prop="packageCode" label="包装号" show-overflow-tooltip="" />
                  <el-table-column prop="length" label="长" show-overflow-tooltip="" />
                  <el-table-column prop="width" label="宽" show-overflow-tooltip="" />
                  <el-table-column prop="thk" label="厚" show-overflow-tooltip="" />
                  <el-table-column prop="stockStatus" label="库存状态" show-overflow-tooltip="">
                     <template #default="scope">
                        <el-tag>{{ getEnumDesc(scope.row.stockStatus, getEnumStockStatusData_Index) }}</el-tag>
                     </template>
                  </el-table-column>
                  <el-table-column prop="stockStatusName" label="库存状态名称" show-overflow-tooltip="" />
                  <el-table-column prop="operReason" label="操作原因" show-overflow-tooltip="" />
                  <el-table-column prop="operUser" label="操作人" show-overflow-tooltip="" />
                  <el-table-column prop="operTime" label="操作时间" width="80" :formatter="formatDate_T_Date" show-overflow-tooltip="" />
                  <el-table-column prop="lockStatus" label="锁定状态" show-overflow-tooltip="">
                     <template #default="scope">
                        <el-tag>{{ getEnumDesc(scope.row.lockStatus, getEnumLockStatusData_Index) }}</el-tag>
                     </template>
                  </el-table-column>
                  <el-table-column prop="lockReason" label="锁定原因" show-overflow-tooltip="" />
                  <el-table-column prop="lockUser" label="锁定人" show-overflow-tooltip="" />
                  <el-table-column prop="lockTime" label="锁定时间" width="80" :formatter="formatDate_T_Date" show-overflow-tooltip="" />
                  <el-table-column prop="remarks" label="备注" show-overflow-tooltip="" />
                  <el-table-column prop="createTime" label="创建时间" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" />
                  <el-table-column prop="updateTime" label="修改时间" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" />
                  <el-table-column prop="createUserName" label="创建人" show-overflow-tooltip="" />
                  <el-table-column prop="updateUserName" label="修改人" show-overflow-tooltip="" />
               </el-table>
               <Pagination :total="detailCount" v-model:page="detailForm.Page" v-model:limit="detailForm.PageSize" @pagination="getDetail" style="margin-top: 20px; text-align: center"></Pagination>
               <div></div>
            </div>
         </div>
         <div class="detailBoxWrap">
            <!-- 详情组件 -->
            <open-details ref="propDetailRef"></open-details>
            <div class="msi-form">
               <el-form :model="detailForm">
                  <el-row>
                     <el-col :span="6">
                        <el-form-item label="包全部板件">
                        </el-form-item>
                     </el-col>
                  </el-row>
               </el-form>
            </div>
            <div class="msi-content">
               <el-table :data="drawerList2" border striped :max-height="480">
                  <el-table-column fixed="left" type="index" label="序号" width="55" align="center" />
                  <el-table-column prop="upi" label="部件条码" width="160"   show-overflow-tooltip="" />
        <el-table-column prop="planNo" label="批次号"  show-overflow-tooltip="" />
        <el-table-column prop="orderId" label="订单号"  show-overflow-tooltip="" />
        <el-table-column prop="packageCode" label="包装号"  show-overflow-tooltip="" />
        <el-table-column prop="info5" label="生产单号"  show-overflow-tooltip="" />
          <el-table-column prop="areaCode" label="所在区域"  show-overflow-tooltip="" >
            <template #default="scope">
              <el-tag>{{ getEnumDesc(scope.row.areaCode, getEnumAreaCodeData_Index)}}</el-tag>
            </template>
          </el-table-column>
          <el-table-column prop="upiStatus" label="板料状态"  show-overflow-tooltip="" >
            <template #default="scope">
              <el-tag>{{ getEnumDesc(scope.row.upiStatus, getEnumUpiStatusData_Index)}}</el-tag>
            </template>
          </el-table-column>
          <el-table-column prop="upiFlag" label="标记"  show-overflow-tooltip="" >
            <template #default="scope">
              <el-tag>{{ getEnumDesc(scope.row.upiFlag, getEnumUpiFlagData_Index)}}</el-tag>
            </template>
          </el-table-column>
        <el-table-column prop="detailName" label="部件名称"  show-overflow-tooltip="" />
        <el-table-column prop="length" label="长"  show-overflow-tooltip="" />
        <el-table-column prop="width" label="宽"  show-overflow-tooltip="" />
        <el-table-column prop="thk" label="厚"  show-overflow-tooltip="" />
          <el-table-column prop="stockStatus" label="库存状态"  show-overflow-tooltip="" >
            <template #default="scope">
              <el-tag>{{ getEnumDesc(scope.row.stockStatus, getEnumStockStatusData_Index)}}</el-tag>
            </template>
          </el-table-column>
        <el-table-column prop="stockStatusName" label="库存状态名称"  show-overflow-tooltip="" />
        <el-table-column prop="operReason" label="操作原因"  show-overflow-tooltip="" />
        <el-table-column prop="operUser" label="操作人"  show-overflow-tooltip="" />
         <el-table-column prop="operTime" label="操作时间" width="80" :formatter="formatDate_T_Date"  show-overflow-tooltip="" />
          <el-table-column prop="lockStatus" label="锁定状态"  show-overflow-tooltip="" >
            <template #default="scope">
              <el-tag>{{ getEnumDesc(scope.row.lockStatus, getEnumLockStatusData_Index)}}</el-tag>
            </template>
          </el-table-column>
        <el-table-column prop="lockReason" label="锁定原因"  show-overflow-tooltip="" />
        <el-table-column prop="lockUser" label="锁定人"  show-overflow-tooltip="" />
         <el-table-column prop="lockTime" label="锁定时间" width="80" :formatter="formatDate_T_Date"  show-overflow-tooltip="" />
        <el-table-column prop="remarks" label="备注"  show-overflow-tooltip="" />
        <el-table-column prop="packageCode" label="包装号"  show-overflow-tooltip="" />
        <el-table-column prop="machineXCenter" label="包装X坐标"  show-overflow-tooltip="" />
        <el-table-column prop="machineYCenter" label="包装Y坐标"  show-overflow-tooltip="" />
        <el-table-column prop="machineZCenter" label="包装Z坐标"  show-overflow-tooltip="" />
        <el-table-column prop="sequence" label="层数"  show-overflow-tooltip="" />
        <el-table-column prop="shelf" label="次序"  show-overflow-tooltip="" />
        <el-table-column prop="info15" label="部件数量"  show-overflow-tooltip="" />
        <el-table-column prop="info16" label="部件尺寸"  show-overflow-tooltip="" />
        <el-table-column prop="info17" label="机械臂是否旋转"  show-overflow-tooltip="" />
        <el-table-column prop="info18" label="材料"  show-overflow-tooltip="" />
        <el-table-column prop="info6" label="第几包"  show-overflow-tooltip="" />
        <el-table-column prop="info4" label="销售合同单号"  show-overflow-tooltip="" />
         <el-table-column prop="createTime" label="创建时间" width="130" :formatter="formatDate_T_Time"  show-overflow-tooltip="" />
         <el-table-column prop="updateTime" label="修改时间" width="130" :formatter="formatDate_T_Time"  show-overflow-tooltip="" />
        <el-table-column prop="createUserName" label="创建人"  show-overflow-tooltip="" />
@@ -336,6 +392,7 @@
               <div></div>
            </div>
         </div>
      </el-drawer>
@@ -360,10 +417,8 @@
      <printDialogTestStudent ref="printDialogRefTestStudent" :title="printTestStudentTitle" @reloadTable="handleQueryTestStudent" />
            <!-- 打印 -->
            <print-table-ckd ref="printTableRef"></print-table-ckd>
      <!-- 打印 -->
      <print-table-ckd ref="printTableRef"></print-table-ckd>
   </div>
</template>
<script lang="ts" setup>
@@ -385,6 +440,7 @@
import OpenDetails from '/@/components/openDetails/openDetails.vue';
import { pageBaseCustomer } from '/@/api/main/WmsBase/baseCustomer';
import { listWmsOrderPurchaseDetails, pageWmsOrderPurchaseDetails } from '/@/api/main/WmsOrder/wmsOrderPurchaseDetails';
import { pageMes_BatchOrderUPI_New, deleteMes_BatchOrderUPI_New,importExcelMes_BatchOrderUPI_New,downloadExcelTemplateMes_BatchOrderUPI_New } from '/@/api/main/WmsOrder/mes_BatchOrderUPI_New';
import { formatDate, formatDate_T_Date, formatDate_T_Time, defaultTimeRange } from '/@/utils/formatTime';
import printTableCkd from '/@/components/printTableCkd.vue';
import commonFunction from '/@/utils/commonFunction';
@@ -406,6 +462,10 @@
const getEnumPoDetailStatusData_Index = ref<any>([]);
const getEnumOrderTypeData_Index = ref<any>([]);
const getEnumAreaCodeData_Index = ref<any>([]);
  const getEnumUpiStatusData_Index = ref<any>([]);
  const getEnumUpiFlagData_Index = ref<any>([]);
const props = defineProps({
   titleAuthor: {
      type: Number,
@@ -423,10 +483,8 @@
const hexiao = computed(() => props.hexiao);
const loading = ref(false);
const getEnumStockStatusData_Index = ref<any>([]);
  const getEnumLockStatusData_Index = ref<any>([]);
const getEnumLockStatusData_Index = ref<any>([]);
// 登录用户id
// const LoginUserID = computed(() => store.state.login.userInfo.id || localCache.getCache("LoginUserID"))
@@ -546,8 +604,6 @@
//列表的数据条数
const totalItems = ref<number>(0);
// .inEnumOrderType
//获取PO单列表
@@ -618,8 +674,8 @@
// -------------------获取PO单下物料详情-----------------------------------
//入库单下物料详情请求
const detailForm = ref({
   poId: '',
   materialCode: '',
   packageCode: '',
   detailName: '',
   Page: 1,
   PageSize: 10,
});
@@ -640,16 +696,15 @@
   }
   drawerType.value = 'drawerAll';
   drawerVisible.value = true;
   //当前入库单号id
   detailForm.value.poId = scope.id;
   //入库单
   purchaseNo.value = scope.packageCode;
   IsPack.value = scope.isPack;
   debugger;
   detailForm.value.poId = scope.id;
   detailForm.value.packageCode = scope.packageCode;
   //获取物料列表
   if (detailForm.value.poId == '') {
   if (detailForm.value.packageCode == '') {
      drawerList.value = [];
      drawerList2.value = [];
      detailCount.value = 0;
      return;
   }
@@ -657,14 +712,12 @@
   getDetail();
   //------------------获取物料列表物料明细
   getEnumStockStatusData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('StockStatusEnum')).data.result ?? [];
    getEnumLockStatusData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('LockStatusEnum')).data.result ?? [];
   // getBusinessTypeData_Index.value = await handleSlectDataWmsBusinessType(moveType); //下拉读取业务类型接口 create  by liuwq
   getEnumLockStatusData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('LockStatusEnum')).data.result ?? [];
   // getEnumDockData.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('DockEnum')).data.result ?? [];
   getEnumAreaCodeData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('AreaCodeEnum')).data.result ?? [];
    getEnumUpiStatusData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('UpiStatusEnum')).data.result ?? [];
    getEnumUpiFlagData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('UpiFlagEnum')).data.result ?? [];
   // getEnumPoDetailStatusData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('OrderStatusEnum')).data.result ?? [];
   // getEnumOrderTypeData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('OrderTypeEnum')).data.result ?? [];
   //----------------物料明细
   // 根据状态转中文 保留3位小数
   let scopetrans = JSON.parse(JSON.stringify(scope));
   // scopetrans.totalquantity = Number(scopetrans.totalquantity).toFixed(3);
@@ -679,14 +732,15 @@
//关闭抽屉
const handleDrawerClose = () => {
   detailForm.value = {
      poId: '',
      materialCode: '',
      Page: 1,
      PageSize: 10,
      packageCode: '',
   detailName: '',
   Page: 1,
   PageSize: 10,
   };
   deltailList.value = [];
   detailCount.value = 0;
   drawerList.value = [];
   drawerList2.value = [];
   detailCount.value = 0;
};
@@ -699,6 +753,7 @@
const deltailList = ref<DetailType[]>([]);
//弹出层数据
const drawerList = ref<DetailType[]>([]);
   const drawerList2 = ref<DetailType[]>([]);
//入库单详情列表数据条数
const detailCount = ref(0);
@@ -719,6 +774,12 @@
      detailCount.value = res.data.result?.total;
   }
   loading.value = false;
   debugger
   var res = await pageMes_BatchOrderUPI_New(Object.assign(detailForm.value, detailForm.value));
    if(res.data.type=="success"){
      drawerList2.value = res.data.result?.items ?? [];
    }
};
// ----------------新增、编辑-------------------------------
//窗口类型
@@ -1140,12 +1201,10 @@
   printDialogRefTestStudent.value.showDialog(new hiprint.PrintTemplate({ template: template }), row, template.panels[0].width);
};
// 打印
let itemSubTitle = ref<any[]>([]);
const handleHtmlPrint = () => {
   var title = IsPack.value==true?"齐包清单":"缺包清单";
   var title = IsPack.value == true ? '齐包清单' : '缺包清单';
   proxy.$refs['printTableRef'].printHd(title, itemSubTitle.value, drawerList.value); //deltailList
};