heshaofeng
2025-11-29 415931fc8e37495b1be97b975bc409c5b279ce6f
提交
已添加4个文件
已修改6个文件
783 ■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/extension/check/extend/StockSelect.vue 347 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/extension/check/recheckOrder.js 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/router/viewGird.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/check/ReCheckOrder.vue 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/check/checkOrder.vue 176 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Check/ReCheckOrderController.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/check/extend/StockSelect.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,347 @@
<template>
  <div>
    <vol-box
      v-model="showDetialBox"
      :lazy="true"
      width="60%"
      :padding="15"
      title="指定库存"
    >
      <div class="box-head">
        <el-alert :closable="false" style="width: 100%">
          <el-row>
            <el-col :span="16">
              <span class="less-style">物料名称: {{ row.materielName }} </span>
              <el-divider direction="vertical"></el-divider>
              <span class="less-style">物料编号: {{ row.materielCode }} </span>
              <el-divider direction="vertical"></el-divider>
              <span class="less-style">需求数量: {{ row.qty }} </span>
              <el-divider direction="vertical"></el-divider>
              <span :class="selectionClass">已选数量: {{ selectionSum }} </span>
            </el-col>
            <el-col :span="8">
              <el-link
                type="primary"
                size="small"
                style="float: right; height: 20px; margin-right: 10px"
                @click="getData"
                >刷新</el-link
              >
              <el-link
                type="primary"
                size="small"
                style="float: right; height: 20px; margin-right: 10px"
                @click="openOutboundDialog"
                >直接出库</el-link
              >
            </el-col>
          </el-row>
        </el-alert>
      </div>
      <div class="box-table" style="margin-top: 1%">
        <el-table
          ref="singleTable"
          :data="tableData"
          style="width: 100%; height: 100%"
          highlight-current-row
          @row-click="handleRowClick"
          height="500px"
          @selection-change="handleSelectionChange"
        >
          <el-table-column type="selection" width="55"> </el-table-column>
          <el-table-column
            label="序号"
            type="index"
            fixed="left"
            width="55"
            align="center"
          ></el-table-column>
          <el-table-column
            v-for="(item, index) in tableColumns.filter((x) => !x.hidden)"
            :key="index"
            :prop="item.prop"
            :label="item.title"
            :width="item.width"
            align="center"
          >
            <template #default="scoped" v-if="item.type == 'icon'">
              <el-tooltip
                class="item"
                effect="dark"
                :content="item.title"
                placement="bottom"
                ><el-button
                  type="text"
                  @click="tableButtonClick(scoped.row, item)"
                  ><i :class="item.icon" style="font-size: 22px"></i></el-button
              ></el-tooltip>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <template #footer>
        <el-button type="danger" size="small" @click="showDetialBox = false"
          >关闭</el-button
        >
      </template>
    </vol-box>
    <!-- å‡ºåº“站台选择弹窗(静态模板实现) -->
    <el-dialog
      v-model="showOutboundDialog"
      title="出库操作 - é€‰æ‹©å‡ºåº“站台"
      width="500px"
      :append-to-body="true"
    >
      <el-form
        :model="outboundForm"
        :rules="outboundRules"
        ref="outboundFormRef"
        label-width="100px"
        style="padding: 0 20px"
      >
        <el-form-item label="出库站台" prop="selectedPlatform" style="margin-bottom: 24px">
          <el-select
            v-model="outboundForm.selectedPlatform"
            placeholder="请选择出库站台(3-12)"
            style="width: 100%; height: 40px"
          >
            <el-option
              v-for="platform in platformOptions"
              :key="platform.value"
              :label="platform.label"
              :value="platform.value"
            ></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <template #footer>
        <el-button @click="showOutboundDialog = false" style="margin-right: 8px">取消</el-button>
        <el-button type="primary" @click="confirmOutbound">确定出库</el-button>
      </template>
    </el-dialog>
  </div>
</template>
<script>
import VolBox from "@/components/basic/VolBox.vue";
import { ElMessage } from "element-plus";
export default {
  components: { VolBox },
  data() {
    return {
      row: null,
      showDetialBox: false,
      tableData: [],
      tableColumns: [
        { prop: "materielCode", title: "物料编号", type: "string", width: 150 },
        { prop: "barcode", title: "物料条码", type: "string", width: 150 },
        { prop: "palletCode", title: "托盘编号", type: "string", width: 150 },
        { prop: "locationCode", title: "货位编号", type: "string", width: 180 },
        { prop: "useableQuantity", title: "可用数量", type: "string" },
      ],
      selection: [],
      selectionSum: 0,
      selectionClass: "less-style",
      originalQuantity: 0,
      // å‡ºåº“弹窗相关数据
      showOutboundDialog: false,
      outboundForm: { selectedPlatform: "" }, // è¡¨å•绑定数据
      outboundRules: {
        selectedPlatform: [
          { required: true, message: "请选择出库站台", trigger: "change" },
        ],
      },
      platformOptions: [
        { label: "站台2", value: "2-1" },
        { label: "站台3", value: "3-1" },
      ],
    };
  },
  methods: {
    open(row) {
      this.row = row;
      this.showDetialBox = true;
      this.getData();
      console.log(row.id)
      this.updateSelectionClass(); // åˆå§‹åŒ–已选数量样式
    },
    lockStock() {
      this.http
        .post(
          "api/OutboundOrderDetail/LockOutboundStock?id=" + this.row.id,
          this.selection,
          "数据处理中"
        )
        .then((x) => {
          if (!x.status) return ElMessage.error(x.message);
          ElMessage.success("操作成功");
          this.showDetialBox = false;
          this.$emit("parentCall", ($vue) => {
            $vue.getData();
          });
        });
    },
    // æ‰“开出库弹窗
    openOutboundDialog() {
      if (this.selection.length === 0) {
        return ElMessage.error("请选择单据明细");
      }
      // é‡ç½®è¡¨å•避免残留值
      this.outboundForm.selectedPlatform = "";
      this.showOutboundDialog = true;
    },
    // ç¡®è®¤å‡ºåº“操作
    confirmOutbound() {
      this.$refs.outboundFormRef.validate((valid) => {
        if (!valid) return;
     if (this.selection.length <= 0) {
        return this.$message.error("请勾选");
      }
      let url = this.pkcx
        ? "api/Task/GenerateOutboundTask?orderDetailId="
        : "api/Task/GenerateOutboundTask?orderDetailId=";
      this.http
        .post(url + this.row.id, this.selection, "数据处理中")
        .then((x) => {
          if (!x.status) return this.$message.error(x.message);
          this.$message.success("操作成功");
          this.showDetialBox = false;
          this.$emit("parentCall", ($vue) => {
            $vue.getData();
          });
        });
      });
    },
    // å›ºå®šæŸ¥è¯¢ç«‹åº“库存
    getData() {
      const url = "api/StockInfo/GetStockSelectViews?materielCode=";
      this.http
        .post(
          url + this.row.materielCode + "&orderId=" + this.row.id,
          null,
          "查询中"
        )
        .then((x) => {
          this.tableData = x;
          // åˆ·æ–°åŽæ¸…空之前的选择和计数
          this.clearSelection();
          this.selectionSum = 0;
          this.originalQuantity = 0;
          this.updateSelectionClass();
        });
    },
    revokeAssign() {
      this.http
        .post(
          "api/OutboundOrderDetail/RevokeLockOutboundStock?id=" + this.row.id,
          null,
          "数据处理中"
        )
        .then((x) => {
          if (!x.status) return ElMessage.error(x.message);
          ElMessage.success("操作成功");
          this.showDetialBox = false;
          this.$emit("parentCall", ($vue) => {
            $vue.getData();
          });
        });
    },
    handleSelectionChange(val) {
      this.selection = val;
      // è®¡ç®—已选数量(转数字避免字符串拼接)
      this.selectionSum = val.reduce(
        (acc, curr) => acc + Number(curr.useableQuantity || 0),
        0
      ) + this.originalQuantity;
      this.updateSelectionClass();
    },
    // æ›´æ–°å·²é€‰æ•°é‡æ ·å¼
    updateSelectionClass() {
      if (!this.row) return;
      if (this.selectionSum === this.row.orderQuantity) {
        this.selectionClass = "equle-style";
      } else if (this.selectionSum < this.row.orderQuantity) {
        this.selectionClass = "less-style";
      } else {
        this.selectionClass = "more-style";
      }
    },
    toggleSelection(rows) {
      rows ? rows.forEach((row) => this.$refs.singleTable.toggleRowSelection(row)) : this.clearSelection();
    },
    clearSelection() {
      if (this.$refs.singleTable) {
        this.$refs.singleTable.clearSelection();
      }
    },
    handleRowClick(row) {
      this.$refs.singleTable.toggleRowSelection(row);
    },
    // å›¾æ ‡æŒ‰é’®ç‚¹å‡»å ä½æ–¹æ³•(可根据需求扩展)
    tableButtonClick(row, item) {
      console.log("图标按钮点击:", item.title, row);
    },
  },
};
</script>
<style scoped>
.less-style {
  color: black;
}
.equle-style {
  color: green;
}
.more-style {
  color: red;
}
</style>
<style>
.text-button:hover {
  background-color: #f0f9eb !important;
}
.el-table .warning-row {
  background: oldlace;
}
.box-table .el-table tbody tr:hover > td {
  background-color: #d8e0d4 !important;
}
.box-table .el-table tbody tr.current-row > td {
  background-color: #f0f9eb !important;
}
.el-table .success-row {
  background: #f0f9eb;
}
.box-table .el-table {
  border: 1px solid #ebeef5;
}
.box-head .el-alert__content {
  width: 100%;
}
</style>
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/check/recheckOrder.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,84 @@
/*****************************************************************************************
**  Author:jxx 2022
**  QQ:283591387
**完整文档见:http://v2.volcore.xyz/document/api ã€ä»£ç ç”Ÿæˆé¡µé¢ViewGrid】
**常用示例见:http://v2.volcore.xyz/document/vueDev
**后台操作见:http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import gridBody from './extend/StockSelect.vue'
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: gridBody,
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
  },
  tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
  buttons: { view: [], box: [], detail: [] }, //扩展的按钮
  methods: {
     //下面这些方法可以保留也可以删除
    onInit() {  //框架初始化配置前,
        this.columns.push({
        field: '操作',
        title: '操作',
        width: 90,
        fixed: 'right',
        align: 'center',
        formatter: (row) => {
          return (
            '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">指定库存</i>'
          );
        },
        click: (row) => {
          const table = this.$refs.table.$refs.table;
          if (table) {
            table.clearSelection();
            table.toggleRowSelection(row, true);
          }
          this.$refs.gridBody.open(row);
        }
      });
    },
    onInited() {
      //框架初始化配置后
      //如果要配置明细表,在此方法操作
      //this.detailOptions.columns.forEach(column=>{ });
    },
    searchBefore(param) {
      //界面查询前,可以给param.wheres添加查询参数
      //返回false,则不会执行查询
      return true;
    },
    searchAfter(result) {
      //查询后,result返回的查询数据,可以在显示到表格前处理表格的值
      return true;
    },
    addBefore(formData) {
      //新建保存前formData为对象,包括明细表,可以给给表单设置值,自己输出看formData的值
      return true;
    },
    updateBefore(formData) {
      //编辑保存前formData为对象,包括明细表、删除行的Id
      return true;
    },
    rowClick({ row, column, event }) {
      //查询界面点击行事件
      // this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
    },
    modelOpenAfter(row) {
      //点击编辑、新建按钮弹出框后,可以在此处写逻辑,如,从后台获取数据
      //(1)判断是编辑还是新建操作: this.currentAction=='Add';
      //(2)给弹出框设置默认值
      //(3)this.editFormFields.字段='xxx';
      //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值
      //看不懂就把输出看:console.log(this.editFormOptions)
    }
  }
};
export default extension;
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue
@@ -213,6 +213,7 @@
          title: "指定库存",
          type: "icon",
          width: 90,
          hidden:true,
          icon: "el-icon-s-grid",
        },
        {
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/router/viewGird.js
@@ -212,6 +212,11 @@
    path: '/allocateOrder',
    name: 'Dt_AllocateOrder',
    component: () => import('@/views/inbound/Dt_AllocateOrder.vue')
  },
  {
    path: '/reCheckOrder',
    name: 'Dt_ReCheckOrder',
    component: () => import('@/views/check/ReCheckOrder.vue')
  }
]
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/check/ReCheckOrder.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,115 @@
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/widesea_wcs/order/Dt_CheckOrder.js此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/check/recheckOrder.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'id',
            footer: "Foots",
            cnName: '重检单',
            name: 'Dt_ReCheckOrder',
            url: "/ReCheckOrder/",
            sortName: "id"
        });
        const editFormFields = ref({
            OrderNo: "",
            MaterielCode: "",
            BatchNo: "",
            WarehouseCode: "",
            Unit: "",
            FactoryArea: "",
            Result: 0,
            InspectionNumber: 0,
            Qty: 0,
            SignSeq: 0
        });
        const editFormOptions = ref([
            [
                { title: "复检单号", field: "OrderNo", type: "input", require: true },
                { title: "物料编号", field: "MaterielCode", type: "input", require: true },
                { title: "批次号", field: "BatchNo", type: "input", require: true },
                { title: "仓库编码", field: "WarehouseCode", type: "input", require: true }
            ],
            [
                { title: "单位", field: "Unit", type: "input", require: true },
                { title: "厂区", field: "FactoryArea", type: "input", require: true },
                { title: "检验结果", field: "Result", type: "select", require: true,dataKey: "inOrderType",data: []},
                { title: "检验次数", field: "InspectionNumber", type: "number", require: true, min: 1 }
            ],
            [
                { title: "数量", field: "Qty", type: "number", require: true, min: 0 },
                { title: "签字顺序", field: "SignSeq", type: "number", require: true, min: 1 }
            ]
        ]);
        const searchFormFields = ref({
            OrderNo: "",
            MaterielCode: "",
            BatchNo: "",
            WarehouseCode: "",
            FactoryArea: "",
            Result: ""
        });
        const searchFormOptions = ref([
            [
                { title: "复检单号", field: "OrderNo", type: "like" },
                { title: "物料编号", field: "MaterielCode", type: "like" },
                { title: "批次号", field: "BatchNo", type: "like" },
                { title: "仓库编码", field: "WarehouseCode", type: "like" }
            ],
            [
                { title: "厂区", field: "FactoryArea", type: "like" },
                { title: "检验结果", field: "Result", type: "select",dataKey: "inOrderType", data: []}
            ]
        ]);
        const columns = ref([
            { field: 'id', title: '主键', type: 'int', width: 150, hidden: true, readonly: true, require: true, align: 'left' },
            { field: 'orderNo', title: '复检单号', type: 'string', width: 160, require: true, align: 'left', sort: true },
            { field: 'materielCode', title: '物料编号', type: 'string', width: 160, require: true, align: 'left' },
            { field: 'batchNo', title: '批次号', type: 'string', width: 160, require: true, align: 'left' },
            { field: 'warehouseCode', title: '仓库编码', type: 'string', width: 160, require: true, align: 'left' },
            { field: 'unit', title: '单位', type: 'string', width: 100, require: true, align: 'left' },
            { field: 'factoryArea', title: '厂区', type: 'string', width: 120, require: true, align: 'left' },
            { field: 'result', title: '检验结果', type: 'int', width: 110, require: true, align: 'left',bind: { key: "inOrderType", data: [] },},
            { field: 'inspectionNumber', title: '检验次数', type: 'int', width: 110, require: true, align: 'left' },
            { field: 'qty', title: '数量', type: 'float', width: 110, require: true, align: 'left' },
            { field: 'signSeq', title: '签字顺序', type: 'int', width: 110, require: true, align: 'left' },
            { field: 'creater', title: '创建者', type: 'string', width: 110, require: true, align: 'left' },
            { field: 'createDate', title: '创建时间', type: 'datetime', width: 150, require: true, align: 'left', sort: true },
            { field: 'modifier', title: '修改人', type: 'string', width: 100, align: 'left' },
            { field: 'modifyDate', title: '修改日期', type: 'datetime', width: 150, align: 'left', sort: true },
        ]);
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns
        };
    },
});
</script>
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/check/checkOrder.vue
@@ -5,98 +5,92 @@
 *业务请在@/extension/widesea_wcs/order/Dt_CheckOrder.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/check/checkOrder.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'checkOrderId',
                footer: "Foots",
                cnName: '检验单',
                name: 'checkOrder',
                url: "/CheckOrder/",
                sortName: "checkOrderId"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({
                checkOrderNo:"",
                receiveOrderNo:"",
                checkOrderStatus:"",
                auditStatus:""
            });
            const searchFormOptions = ref([
                [
                    {title:"检验单号", field:"checkOrderNo",type:"like"},
                    {title:"收货单号", field:"receiveOrderNo",type:"like"},
                    {title:"质检单状态", field:"checkOrderStatus",type:"select",dataKey:"",data:[]},
                    {title:"审批状态", field:"auditStatus",type:"select",dataKey:"",data:[]},
                ],
                [
                    {title:"收货单明细行号", field:"receiveDetailRowNo",type:"like"},
                    {title:"物料编号", field:"materielCode",type:"like"},
                    {title:"检验结果", field:"result",type:"like"},
                ]
            ]);
            const columns = ref([{field:'checkOrderId',title:'主键',type:'int',width:150,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'checkOrderNo',title:'检验单号',type:'string',width:160,require:true,align:'left',sort:true},
                       {field:'receiveOrderNo',title:'收货单号',type:'string',width:160,require:true,align:'left'},
                       {field:'checkOrderStatus',title:'质检单状态',type:'int',width:110,require:true,align:'left'},
                       {field:'auditStatus',title:'审批状态',type:'int',width:110,require:true,align:'left'},
                       {field:'receiveDetailRowNo',title:'收货单明细行号',type:'int',width:110,require:true,align:'left'},
                       {field:'materielCode',title:'物料编号',type:'string',width:110,require:true,align:'left'},
                       {field:'qualifiedQuantity',title:'合格数量',type:'float',width:110,align:'left'},
                       {field:'defectedQuantity',title:'特采数量',type:'float',width:110,align:'left'},
                       {field:'returnQuantity',title:'退货数量',type:'float',width:110,align:'left'},
                       {field:'scrappedQuantity',title:'报废数量',type:'float',width:110,align:'left'},
                       {field:'receivedQuantity',title:'检验总数',type:'float',width:110,require:true,align:'left'},
                       {field:'result',title:'检验结果',type:'string',width:110,align:'left'},
                       {field:'defectedNote',title:'特采说明',type:'string',width:110,align:'left'},
                       {field:'checkUserName',title:'检验人',type:'string',width:110,align:'left'},
                       {field:'creater',title:'创建者',type:'string',width:110,require:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:150,require:true,align:'left',sort:true},
                       {field:'modifier',title:'修改人',type:'string',width:100,align:'left'},
                       {field:'modifyDate',title:'修改日期',type:'datetime',width:150,align:'left',sort:true}]);
            const detail = ref({
                cnName: "检验结果",
                table: "CheckOrderResult",
                columns: [
                    {field:'id',title:'主键',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                    {field:'checkOrderId',title:'检验单主键',type:'int',width:110,require:true,align:'left',sort:true},
                    {field:'defectCode',title:'缺陷代码',type:'string',width:110,require:true,align:'left'},
                    {field:'result',title:'检验结果',type:'string',width:110,require:true,align:'left'},
                    {field:'quantity',title:'数量',type:'float',width:110,require:true,align:'left'},
                    {field:'note',title:'备注',type:'string',width:220,align:'left'},
                    {field:'creater',title:'创建者',type:'string',width:110,require:true,align:'left'},
                    {field:'createDate',title:'创建时间',type:'datetime',width:150,require:true,align:'left',sort:true},
                    {field:'modifier',title:'修改人',type:'string',width:100,align:'left'},
                    {field:'modifyDate',title:'修改日期',type:'datetime',width:150,align:'left',sort:true}
                ],
                sortName: "id",
                key: "id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
import extend from "@/extension/check/checkOrder.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'checkOrderId',
            footer: "Foots",
            cnName: '检验单',
            name: 'checkOrder',
            url: "/CheckOrder/",
            sortName: "checkOrderId"
        });
        const editFormFields = ref({});
        const editFormOptions = ref([]);
        const searchFormFields = ref({
            checkOrderNo: "",
            receiveOrderNo: "",
            checkOrderStatus: "",
            auditStatus: ""
        });
        const searchFormOptions = ref([
            [
                { title: "检验单号", field: "checkOrderNo", type: "like" },
                { title: "收货单号", field: "receiveOrderNo", type: "like" },
                { title: "质检单状态", field: "checkOrderStatus", type: "select", dataKey: "", data: [] },
                { title: "审批状态", field: "auditStatus", type: "select", dataKey: "", data: [] },
            ],
            [
                { title: "收货单明细行号", field: "receiveDetailRowNo", type: "like" },
                { title: "物料编号", field: "materielCode", type: "like" },
                { title: "检验结果", field: "result", type: "like" },
            ]
        ]);
        const columns = ref([{ field: 'checkOrderId', title: '主键', type: 'int', width: 150, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'checkOrderNo', title: '检验单号', type: 'string', width: 160, require: true, align: 'left', sort: true },
        { field: 'receiveOrderNo', title: '收货单号', type: 'string', width: 160, require: true, align: 'left' },
        { field: 'checkOrderStatus', title: '质检单状态', type: 'int', width: 110, require: true, align: 'left' },
        { field: 'auditStatus', title: '审批状态', type: 'int', width: 110, require: true, align: 'left' },
        { field: 'receiveDetailRowNo', title: '收货单明细行号', type: 'int', width: 110, require: true, align: 'left' },
        { field: 'materielCode', title: '物料编号', type: 'string', width: 110, require: true, align: 'left' },
        { field: 'qualifiedQuantity', title: '合格数量', type: 'float', width: 110, align: 'left' },
        { field: 'defectedQuantity', title: '特采数量', type: 'float', width: 110, align: 'left' },
        { field: 'returnQuantity', title: '退货数量', type: 'float', width: 110, align: 'left' },
        { field: 'scrappedQuantity', title: '报废数量', type: 'float', width: 110, align: 'left' },
        { field: 'receivedQuantity', title: '检验总数', type: 'float', width: 110, require: true, align: 'left' },
        { field: 'result', title: '检验结果', type: 'string', width: 110, align: 'left' },
        { field: 'defectedNote', title: '特采说明', type: 'string', width: 110, align: 'left' },
        { field: 'checkUserName', title: '检验人', type: 'string', width: 110, align: 'left' },
        { field: 'creater', title: '创建者', type: 'string', width: 110, require: true, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 150, require: true, align: 'left', sort: true },
        { field: 'modifier', title: '修改人', type: 'string', width: 100, align: 'left' },
        { field: 'modifyDate', title: '修改日期', type: 'datetime', width: 150, align: 'left', sort: true }]);
        const detail = ref({
            cnName: "检验结果",
            table: "CheckOrderResult",
            columns: [
                { field: 'id', title: '主键', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
                { field: 'checkOrderId', title: '检验单主键', type: 'int', width: 110, require: true, align: 'left', sort: true },
                { field: 'defectCode', title: '缺陷代码', type: 'string', width: 110, require: true, align: 'left' },
                { field: 'result', title: '检验结果', type: 'string', width: 110, require: true, align: 'left' },
                { field: 'quantity', title: '数量', type: 'float', width: 110, require: true, align: 'left' },
                { field: 'note', title: '备注', type: 'string', width: 220, align: 'left' },
                { field: 'creater', title: '创建者', type: 'string', width: 110, require: true, align: 'left' },
                { field: 'createDate', title: '创建时间', type: 'datetime', width: 150, require: true, align: 'left', sort: true },
                { field: 'modifier', title: '修改人', type: 'string', width: 100, align: 'left' },
                { field: 'modifyDate', title: '修改日期', type: 'datetime', width: 150, align: 'left', sort: true }
            ],
            sortName: "id",
            key: "id"
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs
@@ -98,7 +98,7 @@
                if (!stockInfos.Any())
                {
                    throw new Exception($"物料[{item.MaterielCode}]批次[{item.BatchNo}]未找到可分配库存");
                    throw new Exception($"物料[{item.MaterielCode}]批次[{item.BatchNo}]供应商[{item.SupplyCode}]未找到可分配库存");
                }
                // åˆ†é…åº“存(按先进先出)
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs
@@ -765,19 +765,19 @@
                if (currentLockInfo.PickedQty < context.PickingRecord.PickQuantity)
                    return ValidationResult<bool>.Error($"锁定信息已拣选数量({currentLockInfo.PickedQty})小于取消数量({context.PickingRecord.PickQuantity})");
                // éªŒè¯åº“存数据
                var currentStockDetail = await _stockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>()
                    .FirstAsync(x => x.Barcode == context.PickingRecord.Barcode && x.StockId == context.PickingRecord.StockId);
                ////// éªŒè¯åº“存数据
                ////var currentStockDetail = await _stockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>()
                ////    .FirstAsync(x => x.Barcode == context.PickingRecord.Barcode && x.StockId == context.PickingRecord.StockId);
                if (currentStockDetail == null)
                    return ValidationResult<bool>.Error($"未找到对应的库存明细记录");
                ////if (currentStockDetail == null)
                ////    return ValidationResult<bool>.Error($"未找到对应的库存明细记录");
                if (currentStockDetail.Status == StockStatusEmun.入库确认.ObjToInt() ||
                    currentStockDetail.Status == StockStatusEmun.入库完成.ObjToInt())
                    return ValidationResult<bool>.Error($"条码{context.PickingRecord.Barcode}已经回库,无法取消分拣");
                ////if (currentStockDetail.Status == StockStatusEmun.入库确认.ObjToInt() ||
                ////    currentStockDetail.Status == StockStatusEmun.入库完成.ObjToInt())
                ////    return ValidationResult<bool>.Error($"条码{context.PickingRecord.Barcode}已经回库,无法取消分拣");
                // éªŒè¯çŠ¶æ€æµè½¬çš„åˆæ³•æ€§
                if (!await CanCancelPicking(currentLockInfo, currentStockDetail))
                if (!await CanCancelPicking(currentLockInfo, null))
                    return ValidationResult<bool>.Error($"当前状态不允许取消分拣");
                return ValidationResult<bool>.Success(true);
@@ -795,9 +795,9 @@
            if (lockInfo.Status != (int)OutLockStockStatusEnum.拣选完成)
                return false;
            // åº“存状态检查
            if (stockDetail.Status == StockStatusEmun.出库完成.ObjToInt())
                return false;
            ////// åº“存状态检查
            ////if (stockDetail.Status == StockStatusEmun.出库完成.ObjToInt())
            ////    return false;
            // å¦‚果是拆包记录,还需要检查父锁定信息状态
            if (lockInfo.IsSplitted == 1 && lockInfo.ParentLockId.HasValue)
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -311,9 +311,9 @@
                // æ‰§è¡ŒæŸ¥è¯¢å¹¶æŒ‰å…ˆè¿›å…ˆå‡ºæŽ’序
                var stocks = stockQuery.ToList()
                    .Where(x => x.Details.Any(d =>
                        d.MaterielCode == materielCode &&
                        d.BatchNo == orderDetail.BatchNo &&
                        d.SupplyCode == orderDetail.SupplyCode &&
                        d.MaterielCode == materielCode &&
                        string.IsNullOrEmpty(orderDetail.BatchNo)?true: d.BatchNo == orderDetail.BatchNo&&
                        string.IsNullOrEmpty(orderDetail.BatchNo)?true:d.SupplyCode == orderDetail.SupplyCode &&
                        d.StockQuantity > d.OutboundQuantity
                    ))
                    .OrderBy(x => x.CreateDate)
@@ -323,8 +323,8 @@
                {
                    var relevantDetails = stock.Details
                        .Where(d => d.MaterielCode == materielCode &&
                                   d.BatchNo == orderDetail.BatchNo &&
                                   d.SupplyCode == orderDetail.SupplyCode &&
                                   string.IsNullOrEmpty(orderDetail.BatchNo) ? true : d.BatchNo == orderDetail.BatchNo &&
                                   string.IsNullOrEmpty(orderDetail.BatchNo) ? true : d.SupplyCode == orderDetail.SupplyCode &&
                                   d.StockQuantity > d.OutboundQuantity)
                        .ToList();
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Check/ReCheckOrderController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_ICheckService;
using WIDESEA_Model.Models.Check;
namespace WIDESEA_WMSServer.Controllers.Check
{
    /// <summary>
    /// é‡æ£€å•
    /// </summary>
    [Route("api/ReCheckOrder")]
    [ApiController]
    public class ReCheckOrderController : ApiBaseController<IReCheckOrderService, Dt_ReCheckOrder>
    {
        public ReCheckOrderController(IReCheckOrderService service) : base(service)
        {
        }
    }
}