wxw
2024-09-26 70cdea5f6e57d1ebc29c25ef60f311fadca6ab21
Web/src/views/wcs/wcsTask/index.vue
@@ -84,25 +84,26 @@
            <el-table-column prop="startLocate" label="起始位置" show-overflow-tooltip="" />
            <el-table-column prop="endLocate" label="结束位置" show-overflow-tooltip="" />
            <el-table-column prop="palletNo" label="托盘号" show-overflow-tooltip="" />
            <el-table-column prop="completeQty" label="拆垛箱数" show-overflow-tooltip="" />
            <el-table-column prop="qty" label="拆垛箱数" show-overflow-tooltip="" />
            <el-table-column prop="palletQty" label="整跺箱数" show-overflow-tooltip="" />
            <el-table-column prop="lotNo" label="批次号" show-overflow-tooltip="" />
            <el-table-column prop="skuNo" label="物料编码" show-overflow-tooltip="" />
            <el-table-column prop="skuName" label="物料名称" show-overflow-tooltip="" />
            <el-table-column prop="unstackingMode" width="100" label="拆垛方式" show-overflow-tooltip="">
            <el-table-column prop="unstackingMode" width="100" label="拆垛方式" show-overflow-tooltip="">
              <template #default="scope">
                <span v-if="scope.row.unstackingMode">
                  <el-tag :type="dv('UnstackingModeEnum', scope.row.unstackingMode)?.tagType"> {{ dv('UnstackingModeEnum',
                  scope.row.unstackingMode)?.name }}</el-tag>
                </span>
                  <el-tag :type="dv('UnstackingModeEnum', scope.row.unstackingMode)?.tagType"> {{
                    dv('UnstackingModeEnum',
                      scope.row.unstackingMode)?.name }}</el-tag>
                </span>
              </template>
            </el-table-column>
            <el-table-column prop="isBind" width="85" label="是否绑定" show-overflow-tooltip="">
            <el-table-column prop="isBind" width="85" label="是否绑定" show-overflow-tooltip="">
              <template #default="scope">
                <span v-if="scope.row.isBind!=null">
                <span v-if="scope.row.isBind != null">
                  <el-tag :type="dv('IsBindEnum', scope.row.isBind)?.tagType"> {{ dv('IsBindEnum',
                  scope.row.isBind)?.name }}</el-tag>
                </span>
                    scope.row.isBind)?.name }}</el-tag>
                </span>
              </template>
            </el-table-column>
            <el-table-column prop="stationNum" label="拆垛工位号" show-overflow-tooltip="" />
@@ -113,7 +114,7 @@
                <ModifyRecord :data="scope.row" />
              </template>
            </el-table-column> -->
            <el-table-column prop="操作" label="操作" width="130" align="center" fixed="right" show-overflow-tooltip=""
            <el-table-column prop="操作" label="操作" width="150" align="center" fixed="right" show-overflow-tooltip=""
              v-if="auth('wcsTask:complete') || auth('wcsTask:cancell')">
              <template #default="scope">
                <template v-if="scope.row.status <= 1">
@@ -121,6 +122,10 @@
                    v-auth="'wcsTask:complete'"> 完成 </el-button>
                  <el-button icon="ele-Close" size="small" text="" type="primary" @click="cancellTask(scope.row)"
                    v-auth="'wcsTask:cancell'"> 取消 </el-button>
                </template>
                <template v-if="scope.row.status == 2 && scope.row.origin == 'WMS'">
                  <el-button icon="ele-Upload" size="small" text="" type="primary" @click="uploadTask(scope.row)"
                    v-auth="'wcsTask:cancell'"> 上传 </el-button>
                </template>
              </template>
            </el-table-column>
@@ -190,7 +195,7 @@
import printDialog from '/@/views/system/print/component/hiprint/preview.vue'
import editDialog from '/@/views/wcs/wcsTask/component/editDialog.vue'
import { pageWcsTask, finshWcsTask } from '/@/api/wcs/wcsTask';
import { pageWcsTask, finshWcsTask, uploadWcsTask } from '/@/api/wcs/wcsTask';
import { pageWcsMonitorTask } from '/@/api/wcs/wcsTaskMonitor';
import { signalR } from './signalR';
@@ -319,6 +324,23 @@
    .catch(() => { });
}
//上传任务
const uploadTask = async (row: any) => {
  ElMessageBox.confirm(`确定要上传任务吗?`, "提示", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
    type: "warning",
  })
    .then(async () => {
      var param = Object.assign(row);
      await uploadWcsTask(param);
      handleQuery();
      handleQuery2();
      ElMessage.success("上传任务成功");
    })
    .catch(() => { });
}
// 点击表格
const handleClick = (row, column, cell, event) => {
  if (column.property === '操作') {