qinhb 4 mesiacov pred
rodič
commit
d3bf916f17

+ 11 - 0
src/api/storage/index.ts

@@ -69,6 +69,17 @@ export function syncPositionVehicle(
     data: queryParams,
   });
 }
+export function saveWmsOrder(
+    queryParams: object
+): AxiosPromise<any> {
+  return request({
+    url: "/api/v1/wmsOrder/save",
+    method: "post",
+    data: queryParams,
+  });
+}
+
+
 export function queryWarningUser(
     queryParams: object
 ): AxiosPromise<any> {

+ 2 - 17
src/views/plan/requisition/index.vue

@@ -69,7 +69,6 @@
           v-if="dialogType === 1"
           type="primary"
           @click="printPage"
-          size="small"
           >打印</el-button
         >
       </template>
@@ -158,14 +157,8 @@
               border
             >
               <el-table-column label="序号" type="index" width="60" />
-              <el-table-column label="工作令号" prop="workCode">
-                <template v-slot="{ row }">
-                  <el-text v-if="dialogType === 1 || form.state > 0">{{
-                    row.workCode
-                  }}</el-text>
-                  <el-input v-else v-model="row.workCode" />
-                </template>
-              </el-table-column>
+              <el-table-column label="工序编码" prop="workCode"/>
+              <el-table-column label="工序名称" prop="remark"/>
               <el-table-column label="零、部(组)件图号" prop="materialCode" />
               <el-table-column label="名称" prop="materialName" />
               <el-table-column label="数量" align="num">
@@ -185,14 +178,6 @@
                   <el-text>{{ row.receiveNum }}</el-text>
                 </template>
               </el-table-column>
-              <el-table-column label="备注" align="remark">
-                <template v-slot="{ row }">
-                  <el-text v-if="dialogType === 1 || form.state > 0">{{
-                    row.remark
-                  }}</el-text>
-                  <el-input v-else v-model="row.remark" />
-                </template>
-              </el-table-column>
               <el-table-column
                 label="操作"
                 align="remark"

+ 22 - 19
src/views/storage/stock/index.vue

@@ -18,7 +18,7 @@
         :cell-style="cellStyle"
         @selection-change="selectionChange"
     >
-      <template #menu-left="{ size }">
+<!--      <template #menu-left="{ size }">
         <el-button
           :disabled="toDeleteIds.length < 1"
           type="danger"
@@ -27,7 +27,7 @@
           @click="multipleDelete"
           >删除</el-button
         >
-        <el-button
+&lt;!&ndash;        <el-button
             type="primary"
             :size="size"
             @click="syncPosition"
@@ -35,8 +35,8 @@
           <template #icon>
             <svg-icon icon-class="paicheng" />
           </template>
-        </el-button>
-      </template>
+        </el-button>&ndash;&gt;
+      </template>-->
     </avue-crud>
     <el-dialog
         v-model="dialog1.visible"
@@ -95,12 +95,14 @@ const syncPosition = () => {
 };
 // 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
-  delBtn: false,
-  selection: true,
+  delBtn: true,
+  selection: false,
+  addBtn: false,
+  editBtn: true,
   column: [
     {
       label: "仓库编码",
-      prop: "houseType",
+      prop: "houseNo",
       type: "select",
       search: true,
       width: 90,
@@ -122,8 +124,8 @@ option.value = Object.assign(option.value, {
       ],
     },
     {
-      label: "料箱编号",
-      prop: "vehicleCode",
+      label: "货区",
+      prop: "locationNo",
       editDisabled: true,
       rules: [
         {
@@ -134,7 +136,7 @@ option.value = Object.assign(option.value, {
       ],
     },
     {
-      label: "仓库坐标",
+      label: "货位",
       prop: "coordinate",
       editDisabled: true,
       rules: [
@@ -145,7 +147,7 @@ option.value = Object.assign(option.value, {
         },
       ],
     },
-    {
+   /* {
       label: "层数",
       prop: "position",
       rules: [
@@ -155,7 +157,7 @@ option.value = Object.assign(option.value, {
           trigger: "trigger",
         },
       ],
-    },
+    },*/
     {
       label: "批次号",
       width: 120,
@@ -163,26 +165,27 @@ option.value = Object.assign(option.value, {
       prop: "batchCode",
       search: true
     },
-    /*{
+    {
       label: "入库单号",
       prop: "taskNo",
       search: true,
-    },*/
-    {
+    },
+    /*{
       label: "计划单号",
       prop: "planNo",
-      search: true,
-    },
+    },*/
     {
-      label: "流转卡号",
+      label: "物料编码",
       width: 130,
+      search: true,
       overHidden: true,
-      prop: "seqNo",
+      prop: "materialNo",
     },
     {
       label: "物料名称",
       prop: "materialName",
       width: 130,
+      search: true,
       readonly: true,
       overHidden: true,
       click: ({ value, column }) => {

+ 3 - 1
src/views/storage/storage/index.vue

@@ -96,7 +96,7 @@ const selectionChange1 =(row)=>{
 option.value = Object.assign(option.value, {
   delBtn: false,
   selection: true,
-  addBtn: false,
+  addBtn: true,
   column: [
     {
       label: "仓库编码",
@@ -122,6 +122,7 @@ option.value = Object.assign(option.value, {
     {
       label: "货区",
       prop: "area",
+      search: true,
       editDisabled: true,
       rules: [
         {
@@ -160,6 +161,7 @@ option.value = Object.assign(option.value, {
       label: "货位类型",
       prop: "materialType",
       type: "select",
+      search: true,
       dicUrl:
           dictDataUtil.request_url +
           dictDataUtil.TYPE_CODE.storage_location_type,

+ 333 - 0
src/views/storage/wmsOrder/components/add_order_details.vue

@@ -0,0 +1,333 @@
+<template>
+  <div class="mainContentBox">
+    <avue-form
+      ref="formRef"
+      v-model:search="search"
+      v-model="form"
+      :data="data"
+      :option="option2"
+      v-model:page="page"
+      @row-save="createRow"
+      @row-update="updateRow"
+      @row-del="deleteRow"
+      @search-change="searchChange"
+      @size-change="dataList"
+      @current-change="dataList"
+      @selection-change="selectionChange"
+    />
+    <avue-crud
+      ref="crudRef"
+      v-model="form"
+      :data="data"
+      :option="option"
+      v-model:page="page"
+      @row-save="createRow"
+      @row-update="updateRow"
+      @row-del="deleteRow"
+    >
+      <template #menu-left="{ size }">
+        <el-button type="primary" icon="el-icon-plus" circle @click="addSkill"
+      /></template>
+    </avue-crud>
+    <el-dialog
+        v-model="dialog1.visible"
+        :title="dialog1.title"
+        width="950px"
+        @close="dialog1.visible = false"
+    >
+      <choice-item-page @material-info="materialInfo" />
+    </el-dialog>
+    <el-dialog
+        v-model="dialog2.visible"
+        :title="dialog2.title"
+        width="950px"
+        @close="dialog2.visible = false"
+    >
+      <choice_out_materials @material-info="materialInfo" />
+    </el-dialog>
+    <div class="detail-footer">
+      <el-button type="primary" @click="onHandle"> 确定 </el-button>
+      <el-button @click="cancelWindow">取消</el-button>
+    </div>
+  </div>
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import {saveWmsOrder} from "@/api/storage";
+import { useCommonStoreHook, useDictionaryStore } from "@/store";
+import dictDataUtil from "@/common/configs/dictDataUtil";
+const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+// 数据字典相关
+const { dicts } = useDictionaryStore();
+
+const data2 = ref(null);
+// 传入一个url,后面不带/
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+  useCrud({
+    src: "/api/v1/sys/skillScore",
+  });
+const emit = defineEmits(["closeDialog"])
+const cancelWindow = () => {
+  emit("closeDialog", 11)
+};
+
+
+const {
+  dataList,
+  createRow,
+  updateRow,
+  deleteRow,
+  searchChange,
+  dataNoPageList,
+} = Methords; //增删改查
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+const formRef = ref(null)
+const option2 = ref(null);
+const ctableRef = ref(null); //crudRef.value 获取avue-crud对象
+const router = useRouter();
+const dialog1 = reactive({
+  title: "物料选择",
+  visible: false,
+});
+const dialog2 = reactive({
+  title: "出库选择",
+  visible: false,
+});
+onMounted(() => {
+/*  const bom = ref({
+    batchCode: "",
+    $cellEdit: true,
+  });
+  data.value.push(bom.value);*/
+});
+const addSkill = () => {
+  const bom = ref({
+    batchCode: "",
+    $cellEdit: true,
+  });
+  data.value.push(bom.value);
+};
+const props = defineProps({
+  dialog: {
+    type: Object,
+    default: () => {
+      return {};
+    },
+  },
+})
+const materialInfo = (value) => {
+  if(form.value.type === '4'){
+    let item = {unit: value.unit,id: value.id,batchCode: value.batchCode,num: value.num,materialNo: value.materialNo,materialName: value.materialName,spec: value.spec,$cellEdit:
+    true,}
+    data.value[clickIndex.value] = item;
+    dialog2.visible = false;
+  }else{
+    let item = {unit: value.unitDictValue,materialNo: value.materialCode,materialName: value.materialName,spec: value.spec,$cellEdit: true,}
+    data.value[clickIndex.value] = item;
+    dialog1.visible = false;
+  }
+};
+const onHandle = () => {
+  formRef.value.validate((valid) => {
+    if (valid) {
+      if (data.value.length === 0) {
+        ElMessage({
+          message: "没有要保存数据",
+          type: "error",
+        });
+        return false;
+      }
+      if (data.value.length > 0) {
+        for (let i = 0; i < data.value.length; i++) {
+          if (data.value[i].materialNo === undefined || data.value[i].materialNo === null || data.value[i].materialNo === "" ) {
+            ElMessage({message: "第" + (i + 1) + "项没有选择物料",type: "error",});
+            return false;
+          }
+          if ( data.value[i].batchCode === undefined || data.value[i].batchCode === null || data.value[i].batchCode === "" ) {
+            ElMessage({message: "第" + (i + 1) + "项没有输入批号",type: "error",});
+            return false;
+          }
+          if ( data.value[i].num === undefined ||  data.value[i].num === null || data.value[i].num === "" ) {
+            ElMessage({message: "第" + (i + 1) + "项没有输入数量", type: "error",});
+            return false;
+          }
+        }
+      }
+      //进行保存
+      const saveData = {detailsList: data.value,...form.value}
+      saveData.vehicleCode = new Date().getTime();
+      saveWmsOrder(saveData).then((res)=>{
+        ElMessage.success("操作成功")
+        cancelWindow()
+      });
+    }
+  })
+};
+
+// 设置表格列或者其他自定义的option
+option2.value = {
+  selection: true,
+  submitBtn: false,
+  clearAbleBtn: false,
+  emptyBtn: false,
+  column: [
+    {
+      label: "操作类型",
+      prop: "type",
+      width: 60,
+      overHidden: true,
+      type: "select",
+      search: true,
+      change:()=>{
+        data.value = []
+      },
+      rules: [
+        {
+          required: true,
+          message: "操作类型不能为空",
+          trigger: "trigger",
+        },
+      ],
+      dicData:[{label: "原材料入库",value: "1"},{label: "工装入库",value: "2"},{label: "退料",value: "3"},{label: "领料",value: "4"}],
+    },
+    {
+      label: "仓库编码",
+      prop: "houseNo",
+      type: "select",
+      search: true,
+      width: 90,
+      overHidden: true,
+      editDisabled: true,
+      dicUrl:
+          dictDataUtil.request_url +
+          dictDataUtil.TYPE_CODE.warehouse_type,
+      props: {
+        label: "dictLabel",
+        value: "dictValue",
+      },
+      rules: [
+        {
+          required: true,
+          message: "仓库编码不能为空",
+          trigger: "trigger",
+        },
+      ],
+    },
+    {
+      label: "任务单号",
+      width: 130,
+      search: true,
+      overHidden: true,
+      prop: "taskNo",
+      rules: [
+        {
+          required: true,
+          message: "任务单号不能为空",
+          trigger: "trigger",
+        },
+      ],
+    },
+    {
+      label: "货区",
+      width: 110,
+      overHidden: true,
+      prop: "locationNo",
+    },
+    {
+      label: "货位",
+      overHidden: true,
+      prop: "coordinate",
+    }
+  ],
+};
+const clickIndex = ref(0)
+
+// 设置表格列或者其他自定义的option
+option.value = Object.assign(option.value, {
+  selection: false,
+  addBtn: false,
+  viewBtn: false,
+  editBtn: false,
+  saveBtn: false,
+  search: false,
+  cellBtn: true,
+  menuWidth: 100,
+  column: [
+    {
+      label: "物料编码",
+      prop: "materialNo",
+      readonly: true,
+      cell: true,
+      overHidden: true,
+      click: ({ value, column ,index}) => {
+        clickIndex.value = index
+        if(!form.value.type){
+          ElMessage.error("请选择操作类型")
+        }else{
+          if(form.value.type === "4"){
+            dialog2.visible = true
+          }else{
+            dialog1.visible = true
+          }
+        }
+      },
+    },
+    {
+      label: "物料名称",
+      prop: "materialName",
+      readonly: true,
+      overHidden: true,
+    },
+    {
+      label: "物料型号",
+      prop: "spec",
+      readonly: true,
+      overHidden: true,
+    },
+    {
+      label: "批次号",
+      overHidden: true,
+      prop: "batchCode",
+      cell: true,
+    },
+    {
+      label: "数量",
+      prop: "num",
+      type: 'number',
+      cell: true,
+      min: 0,
+      max: 99999,
+    },
+    {
+      label: "单位",
+      prop: "unit",
+      width: 60
+    },
+  ],
+});
+</script>
+<style type="text/css">
+.title-detail {
+  width: 30%;
+  height: 50px;
+  line-height: 50px;
+  margin: 25px 20px 25px 0;
+  float: left;
+}
+.detail {
+  margin: 0 auto;
+  width: 100%;
+}
+.avue-crud {
+  float: left;
+}
+.detail-footer {
+  float: right;
+  margin-top: 15px;
+}
+.el-select__selection {
+  width: 150px;
+}
+</style>

+ 270 - 0
src/views/storage/wmsOrder/components/choice_out_materials.vue

@@ -0,0 +1,270 @@
+<template>
+  <div class="mainContentBox">
+    <avue-crud
+        ref="crudRef"
+        v-model:search="search"
+        v-model="form"
+        :data="data"
+        :option="option"
+        v-model:page="page"
+        @row-click="rowClick"
+        @search-change="searchChange"
+        @search-reset="resetChange"
+        @size-change="dataList"
+        @current-change="dataList"
+        :row-style="rowStyle"
+        :cell-style="cellStyle"
+        @selection-change="selectionChange"
+    >
+      <!--      <template #menu-left="{ size }">
+              <el-button
+                :disabled="toDeleteIds.length < 1"
+                type="danger"
+                icon="el-icon-delete"
+                :size="size"
+                @click="multipleDelete"
+                >删除</el-button
+              >
+      &lt;!&ndash;        <el-button
+                  type="primary"
+                  :size="size"
+                  @click="syncPosition"
+              >立体仓同步
+                <template #icon>
+                  <svg-icon icon-class="paicheng" />
+                </template>
+              </el-button>&ndash;&gt;
+            </template>-->
+    </avue-crud>
+    <el-dialog
+        v-model="dialog1.visible"
+        :title="dialog1.title"
+        width="950px"
+        @close="dialog1.visible = false"
+    >
+      <choice-item-page @materialInfo="materialInfo" :enabled="null"/>
+    </el-dialog>
+    <ExcelUpload ref="uploadRef" @finished="uploadFinished" />
+  </div>
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import { syncPositionVehicle} from "@/api/storage";
+import { useCommonStoreHook } from "@/store";
+import dictDataUtil from "@/common/configs/dictDataUtil";
+const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+const test = () => {
+  isShowTable.value = true;
+  tableType.value = tableType.value == 1 ? 2 : 1;
+};
+const emit = defineEmits(["materialInfo"])
+const rowClick = (row)=>{
+  emit("materialInfo", row)
+}
+// 传入一个url,后面不带/
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+    useCrud({
+      src: "/api/v1/wms/stock",
+    });
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+const dialog1 = reactive({
+  title: "物料选择",
+  visible: false,
+});
+const materialInfo = (value) => {
+  form.value.materialNo = value.materialCode
+  form.value.materialName = value.materialName
+  form.value.materialModel = value.spec
+  form.value.unit = value.unitDictValue
+  dialog1.visible = false
+}
+const syncPosition = () => {
+  ElMessageBox.confirm("当前非同步任务,预计5秒内完成,确定同步库存吗?")
+      .then(() => {
+        syncPositionVehicle({}).then((data) => {
+          ElMessage.success(data.msg);
+        });
+      })
+      .catch(() => {
+        // catch error
+      });
+};
+// 设置表格列或者其他自定义的option
+option.value = Object.assign(option.value, {
+  delBtn: false,
+  selection: false,
+  addBtn: false,
+  editBtn: false,
+  column: [
+    {
+      label: "仓库编码",
+      prop: "houseType",
+      type: "select",
+      search: true,
+      width: 90,
+      overHidden: true,
+      editDisabled: true,
+      dicUrl:
+          dictDataUtil.request_url +
+          dictDataUtil.TYPE_CODE.warehouse_type,
+      props: {
+        label: "dictLabel",
+        value: "dictValue",
+      },
+      rules: [
+        {
+          required: true,
+          message: "仓库编码不能为空",
+          trigger: "trigger",
+        },
+      ],
+    },
+    {
+      label: "货区",
+      prop: "locationNo",
+      editDisabled: true,
+      rules: [
+        {
+          required: true,
+          message: "料箱编号不能为空",
+          trigger: "trigger",
+        },
+      ],
+    },
+    {
+      label: "货位",
+      prop: "coordinate",
+      editDisabled: true,
+      rules: [
+        {
+          required: true,
+          message: "仓库位置不能为空",
+          trigger: "trigger",
+        },
+      ],
+    },
+    /* {
+       label: "层数",
+       prop: "position",
+       rules: [
+         {
+           required: true,
+           message: "层数不能为空",
+           trigger: "trigger",
+         },
+       ],
+     },*/
+    {
+      label: "批次号",
+      width: 120,
+      overHidden: true,
+      prop: "batchCode",
+      search: true
+    },
+    {
+      label: "入库单号",
+      prop: "taskNo",
+      search: true,
+    },
+    /*{
+      label: "计划单号",
+      prop: "planNo",
+    },*/
+    {
+      label: "物料编码",
+      width: 130,
+      search: true,
+      overHidden: true,
+      prop: "materialNo",
+    },
+    {
+      label: "物料名称",
+      prop: "materialName",
+      width: 130,
+      search: true,
+      readonly: true,
+      overHidden: true,
+      click: ({ value, column }) => {
+        if(column.boxType){
+          dialog1.visible = true
+        }
+      },
+      /*rules: [
+        {
+          required: true,
+          message: "物料名称不能为空",
+          trigger: "trigger",
+        },
+      ],*/
+    },
+    {
+      label: "数量",
+      prop: "num",
+      type: 'number',
+      min: 0,
+      max: 99999,
+      width: 150,
+      overHidden: true,
+      formatter:(val,value,label)=>{
+        if(val.warningMsg){
+          return val.num+"("+val.warningMsg+")"
+        }else{
+          return val.num
+        }
+      }
+    },
+    {
+      label: "单位",
+      prop: "unit",
+    },
+  ],
+});
+const rowStyle = ({row,column,rowIndex}) =>{
+  if(row.warningMsg){
+    return {
+      backgroundColor:'#f3d2d2',
+      color:'#6c6a6a'
+    }
+  }
+}
+const cellStyle = ({row,column,rowIndex,columnIndex})=>{
+  if(columnIndex === 10){
+    if(row.warningMsg){
+      return {
+        color:'red',
+        fontWeight:'bold',
+        fontSize:'20'
+      }
+    }else{
+      return {
+        color: '#60fc56',
+        fontWeight:'bold',
+        fontSize:'20'
+      }
+    }
+  }
+}
+onMounted(() => {
+  // console.log("crudRef", crudRef)
+  dataList();
+});
+/**
+ * 上传excel相关
+ */
+const uploadRef = ref(null);
+const uploadFinished = () => {
+  // 上传完成后的刷新操作
+  page.currentPage = 1;
+  dataList();
+};
+const importExcelData = () => {
+  if (uploadRef.value) {
+    uploadRef.value.show("/api/v1/device/import");
+  }
+};
+</script>

+ 109 - 0
src/views/storage/wmsOrder/components/wms_order_details.vue

@@ -0,0 +1,109 @@
+<template>
+  <div class="mainContentBox">
+    <avue-crud
+        ref="crudRef"
+        v-model:search="search"
+        v-model="form"
+        :data="data"
+        :option="option"
+        v-model:page="page"
+        @row-save="createRow"
+        @row-update="updateRow"
+        @row-del="deleteRow"
+        @search-change="searchChange"
+        @search-reset="resetChange"
+        @size-change="dataList"
+        @current-change="dataList"
+    >
+    </avue-crud>
+  </div>
+</template>
+<script setup>
+import {defineProps, ref} from "vue";
+import { useCrud } from "@/hooks/userCrud";
+import { useCommonStoreHook } from "@/store";
+const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+
+const orderId = ref('')
+const props = defineProps({
+  orderId: {
+    type: Number,
+    default: () => {
+      return null;
+    }
+  }
+})
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+watch(
+    () => props.orderId,
+    () => {
+      orderId.value = props.orderId +""
+      form.value.orderId = orderId.value
+      search.value.orderId = orderId.value
+      console.log( search.value,'watch')
+      dataList();
+    }
+);
+
+// 传入一个url,后面不带/
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
+  useCrud({
+    dataListUrl: "/api/v1/wmsOrder/detailsPage",
+  });
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
+
+
+// 设置表格列或者其他自定义的option
+option.value = Object.assign(option.value, {
+  delBtn: false,
+  selection: false,
+  filterBtn: false,
+  columnBtn: false,
+  editBtn: false,
+  addBtn: false,
+  viewBtn: false,
+  menu: false,
+  column: [
+    {
+      label: "批次号",
+      overHidden: true,
+      prop: "batchCode",
+      search: true
+    },
+    {
+      label: "物料编码",
+      prop: "materialNo",
+      search: true,
+      readonly: true,
+      overHidden: true,
+    },
+    {
+      label: "物料名称",
+      prop: "materialName",
+      search: true,
+      readonly: true,
+      overHidden: true,
+    },
+    {
+      label: "数量",
+      prop: "num",
+      type: 'number',
+      min: 0,
+      max: 99999,
+      width: 90,
+    },
+    {
+      label: "单位",
+      prop: "unit",
+    },
+  ],
+});
+
+onMounted(() => {
+  form.value.orderId = props.orderId  +""
+  search.value.orderId = props.orderId  +""
+  dataList();
+});
+</script>

+ 87 - 59
src/views/storage/wmsOrder/index.vue

@@ -15,14 +15,47 @@
         @size-change="dataList"
         @current-change="dataList"
     >
+
+      <template #menu-left="{ size }">
+        <el-button
+            :size="size"
+            icon="el-icon-plus"
+            type="primary"
+            @click="addRow"
+        >新增
+        </el-button>
+      </template>
+      <template #menu="{ size, row, index }">
+        <el-button text @click="showSeqPage(row)" type="primary" :size="size"
+        >明细
+          <template #icon>
+            <svg-icon icon-class="luozhuankahao" />
+          </template>
+        </el-button>
+      </template>
     </avue-crud>
+    <el-dialog
+        v-model="dialog4.visible"
+        :title="dialog4.title"
+        width="950px"
+        @close="dialog4.visible = false"
+    >
+      <wms_order_details :orderId="form.id" />
+    </el-dialog>
+    <el-dialog
+        v-model="dialog.visible"
+        :destroy-on-close="true"
+        :title="dialog.title"
+        width="1200px"
+        @close="dialog.visible = false"
+    >
+      <add_order_details @closeDialog="closeDialog"/>
+    </el-dialog>
   </div>
 </template>
 <script setup>
 import { ref, getCurrentInstance } from "vue";
 import { useCrud } from "@/hooks/userCrud";
-import ButtonPermKeys from "@/common/configs/buttonPermission";
-
 import { useCommonStoreHook } from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
@@ -41,66 +74,80 @@ const { selectionChange, multipleDelete } = Methords; //选中和批量删除事
 const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
 
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+const dialog4 = reactive({
+  title: "任务明细",
+  visible: false,
+});
+
+const dialog = reactive({
+  title: "添加出入库",
+  visible: false,
+});
+const addRow = () => {
+  dialog.visible = true;
+}
+
+const closeDialog =(val) =>{
+  dialog.visible = false
+  dataList()
+}
+
+const showSeqPage = (workOrderCode) => {
+  form.value = workOrderCode;
+  dialog4.visible = true;
+};
 // 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
   delBtn: false,
   selection: false,
   viewBtn: false,
   editBtn: false,
-  menu: false,
+  menu: true,
   addBtn: false,
   column: [
     {
+      label: "仓库编码",
+      prop: "houseNo",
+      type: "select",
+      search: true,
+      width: 90,
+      overHidden: true,
+      editDisabled: true,
+      dicUrl:
+          dictDataUtil.request_url +
+          dictDataUtil.TYPE_CODE.warehouse_type,
+      props: {
+        label: "dictLabel",
+        value: "dictValue",
+      },
+      rules: [
+        {
+          required: true,
+          message: "仓库编码不能为空",
+          trigger: "trigger",
+        },
+      ],
+    },
+    {
       label: "类型",
       prop: "type",
-      width: 60,
       overHidden: true,
       type: "select",
       search: true,
-      dicData:[{label: "入库",value: "1"},{label: "出库",value: "2"},{label: "退料",value: "3"}],
+      dicData:[{label: "原材料入库",value: "1"},{label: "工装入库",value: "2"},{label: "退料",value: "3"},{label: "领料",value: "4"}],
     },
     {
-      label: "载具编号",
+      label: "货区",
       width: 110,
       overHidden: true,
-      prop: "vehicleCode",
+      prop: "locationNo",
     },
     {
-      label: "物料编号",
+      label: "任务单号",
       width: 130,
       search: true,
       overHidden: true,
-      prop: "materialNo",
-    },
-    {
-      label: "物料名称",
-      width:130,
-      search: true,
-      overHidden: true,
-      prop: "materialName",
-    },
-    {
-      label: "物料型号",
-      width:130,
-      overHidden: true,
-      prop: "spec",
-    },
-    {
-      label: "单位",
-      width: 60,
-      overHidden: true,
-      prop: "unit",
-    },
-   /* {
-      label: "任务单号",
       prop: "taskNo",
-      search: true,
-      overHidden: true
-    },*/
-    {
-      label: "单号",
-      prop: "planNo",
-      search: true,
     },
     {
       label: "库位",
@@ -108,25 +155,6 @@ option.value = Object.assign(option.value, {
       prop: "locationNo",
     },
     {
-      label: "二维码",
-      prop: "batchCode",
-      width:150,
-      overHidden: true,
-      formatter:(val,value,label)=>{
-        if(val.seqNo){
-          return val.seqNo;
-        }else{
-          return val.batchCode
-        }
-      }
-    },
-    {
-      label: "数量",
-      prop: "num",
-      width: 60,
-      overHidden: true,
-    },
-    {
       label: "状态",
       prop: "state",
       type: "select",
@@ -141,13 +169,13 @@ option.value = Object.assign(option.value, {
         value: "dictValue",
       }
     },
-    {
+    /*{
       label: "操作日志",
       prop: "message",
       width: 180,
       overHidden: true,
       display: false
-    },
+    },*/
     {
       label: "操作时间",
       prop: "created",