Browse Source

更改出入库任务

qinhb 11 months ago
parent
commit
4c5955e904

+ 42 - 1
src/views/storage/alarm/index.vue

@@ -27,6 +27,14 @@
         >
         >
       </template>
       </template>
     </avue-crud>
     </avue-crud>
+    <el-dialog
+        v-model="dialog1.visible"
+        :title="dialog1.title"
+        width="950px"
+        @close="dialog1.visible = false"
+    >
+      <choice-item-page @materialInfo="materialInfo"/>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 <script setup>
 <script setup>
@@ -50,7 +58,16 @@ const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
 const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
 const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
 const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
 const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
-
+const dialog1 = reactive({
+  title: "物料选择",
+  visible: false,
+});
+const materialInfo = (value) => {
+  form.value.code = value.materialCode
+  form.value.name = value.materialName
+  form.value.unit = value.unitDictValue
+  dialog1.visible = false
+}
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 
 
 // 设置表格列或者其他自定义的option
 // 设置表格列或者其他自定义的option
@@ -81,6 +98,8 @@ option.value = Object.assign(option.value, {
     {
     {
       label: "物料编码",
       label: "物料编码",
       prop: "code",
       prop: "code",
+      width: 150,
+      overHidden: true,
       search: true,
       search: true,
       rules: [
       rules: [
         {
         {
@@ -89,11 +108,19 @@ option.value = Object.assign(option.value, {
           trigger: "trigger",
           trigger: "trigger",
         },
         },
       ],
       ],
+      click: ({ value, column }) => {
+        if(column.boxType){
+          dialog1.visible = true
+        }
+      },
     },
     },
     {
     {
       label: "物料名称",
       label: "物料名称",
       prop: "name",
       prop: "name",
       search: true,
       search: true,
+      width: 150,
+      overHidden: true,
+      disabled: true,
       rules: [
       rules: [
         {
         {
           required: true,
           required: true,
@@ -133,6 +160,7 @@ option.value = Object.assign(option.value, {
     {
     {
       label: "单位",
       label: "单位",
       prop: "unit",
       prop: "unit",
+      disabled: true,
     },
     },
     {
     {
       label: "状态",
       label: "状态",
@@ -155,6 +183,19 @@ option.value = Object.assign(option.value, {
       ],
       ],
     },
     },
     {
     {
+      label: "提示内容",
+      prop: "msg",
+      width: 200,
+      overHidden: true,
+      rules: [
+        {
+          required: true,
+          message: "提示内容不能为空",
+          trigger: "trigger",
+        },
+      ],
+    },
+    {
       label: "创建时间",
       label: "创建时间",
       prop: "created",
       prop: "created",
       width: 180,
       width: 180,

+ 0 - 124
src/views/storage/returnTask/index.vue

@@ -1,124 +0,0 @@
-<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 { 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());
-const test = () => {
-  isShowTable.value = true;
-  tableType.value = tableType.value == 1 ? 2 : 1;
-};
-
-// 传入一个url,后面不带/
-const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
-  useCrud({
-    src: "/api/v1/wms/task",
-  });
-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对象
-// 设置表格列或者其他自定义的option
-option.value = Object.assign(option.value, {
-  delBtn: false,
-  selection: false,
-  viewBtn: false,
-  editBtn: false,
-  menu: false,
-  addBtn: false,
-  column: [
-    {
-      label: "退料单号",
-      prop: "taskNo",
-      search: true,
-      width:150,
-      overHidden: true
-    },
-    {
-      label: "计划单号",
-      prop: "planNo",
-      search: true,
-    },
-    {
-      label: "物料编号",
-      width: 130,
-      overHidden: true,
-      prop: "materialNo",
-    },
-    {
-      label: "物料名称",
-      width:150,
-      overHidden: true,
-      prop: "materialName",
-    },
-    {
-      label: "批次号",
-      prop: "batchCode",
-      width:150,
-      overHidden: true
-    },
-    {
-      label: "退料总数量",
-      prop: "num",
-    },
-    {
-      label: "已退料数量",
-      prop: "completedNum",
-    },
-    {
-      label: "待退料数量",
-      prop: "unDoNum",
-    },
-    {
-      label: "单位",
-      prop: "unit",
-    },
-    {
-      label: "关联出库单",
-      prop: "relOutOrderNo",
-    },
-    {
-      label: "状态",
-      prop: "state",
-      type: "select",
-      search: true,
-      dicUrl:
-          dictDataUtil.request_url +
-          dictDataUtil.TYPE_CODE.warehouse_task_state,
-      props: {
-        label: "dictLabel",
-        value: "dictValue",
-      }
-    },
-  ],
-});
-
-onMounted(() => {
-  // console.log("crudRef", crudRef)
-  search.value.type = '3'
-  dataList();
-});
-</script>

+ 12 - 10
src/views/storage/stock/index.vue

@@ -186,14 +186,16 @@ option.value = Object.assign(option.value, {
       prop: "num",
       prop: "num",
       type: 'number',
       type: 'number',
       min: 0,
       min: 0,
-      max: 99999
-      /*rules: [
-        {
-          required: true,
-          message: "数量不能为空",
-          trigger: "trigger",
-        },
-      ],*/
+      max: 99999,
+      width: 150,
+      overHidden: true,
+      formatter:(val,value,label)=>{
+        if(val.warningMsg){
+          return val.num+"("+val.warningMsg+")"
+        }else{
+          return val.num
+        }
+      }
     },
     },
     {
     {
       label: "单位",
       label: "单位",
@@ -202,7 +204,7 @@ option.value = Object.assign(option.value, {
   ],
   ],
 });
 });
 const rowStyle = ({row,column,rowIndex}) =>{
 const rowStyle = ({row,column,rowIndex}) =>{
-  if(row.warning){
+  if(row.warningMsg){
     return {
     return {
       backgroundColor:'#f3d2d2',
       backgroundColor:'#f3d2d2',
       color:'#6c6a6a'
       color:'#6c6a6a'
@@ -211,7 +213,7 @@ const rowStyle = ({row,column,rowIndex}) =>{
 }
 }
 const cellStyle = ({row,column,rowIndex,columnIndex})=>{
 const cellStyle = ({row,column,rowIndex,columnIndex})=>{
   if(columnIndex === 10){
   if(columnIndex === 10){
-    if(row.warning){
+    if(row.warningMsg){
       return {
       return {
         color:'red',
         color:'red',
         fontWeight:'bold',
         fontWeight:'bold',

+ 13 - 6
src/views/storage/inTask/index.vue

@@ -51,7 +51,7 @@ option.value = Object.assign(option.value, {
   addBtn: false,
   addBtn: false,
   column: [
   column: [
     {
     {
-      label: "入库单号",
+      label: "任务单号",
       prop: "taskNo",
       prop: "taskNo",
       search: true,
       search: true,
       width:150,
       width:150,
@@ -63,6 +63,13 @@ option.value = Object.assign(option.value, {
       search: true,
       search: true,
     },
     },
     {
     {
+      label: "类型",
+      prop: "type",
+      type: "select",
+      search: true,
+      dicData:[{label: "入库",value: "1"},{label: "出库",value: "2"},{label: "退料",value: "3"}],
+    },
+    {
       label: "物料编号",
       label: "物料编号",
       width: 130,
       width: 130,
       overHidden: true,
       overHidden: true,
@@ -81,15 +88,15 @@ option.value = Object.assign(option.value, {
       overHidden: true
       overHidden: true
     },
     },
     {
     {
-      label: "入库总数量",
+      label: "总数量",
       prop: "num",
       prop: "num",
     },
     },
     {
     {
-      label: "已入库数量",
+      label: "已操作数量",
       prop: "completedNum",
       prop: "completedNum",
     },
     },
     {
     {
-      label: "待入库数量",
+      label: "待操作数量",
       prop: "unDoNum",
       prop: "unDoNum",
     },
     },
     {
     {
@@ -97,7 +104,7 @@ option.value = Object.assign(option.value, {
       prop: "unit",
       prop: "unit",
     },
     },
     {
     {
-      label: "入库仓库",
+      label: "仓库",
       prop: "houseType",
       prop: "houseType",
       type: "select",
       type: "select",
       search: true,
       search: true,
@@ -127,7 +134,7 @@ option.value = Object.assign(option.value, {
 
 
 onMounted(() => {
 onMounted(() => {
   // console.log("crudRef", crudRef)
   // console.log("crudRef", crudRef)
-  search.value.type = '1'
+  //search.value.type = '1'
   dataList();
   dataList();
 });
 });
 </script>
 </script>

+ 52 - 28
src/views/storage/outTask/index.vue

@@ -34,7 +34,7 @@ const test = () => {
 // 传入一个url,后面不带/
 // 传入一个url,后面不带/
 const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
 const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
   useCrud({
   useCrud({
-    src: "/api/v1/wms/task",
+    src: "/api/v1/wmsOrder",
   });
   });
 const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
 const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
@@ -63,51 +63,64 @@ option.value = Object.assign(option.value, {
       search: true,
       search: true,
     },
     },
     {
     {
+      label: "类型",
+      prop: "type",
+      type: "select",
+      search: true,
+      dicData:[{label: "入库",value: "1"},{label: "出库",value: "2"},{label: "退料",value: "3"}],
+    },
+    {
+      label: "载具编号",
+      width: 130,
+      overHidden: true,
+      prop: "vehicleCode",
+    },
+    {
       label: "物料编号",
       label: "物料编号",
       width: 130,
       width: 130,
+      search: true,
       overHidden: true,
       overHidden: true,
       prop: "materialNo",
       prop: "materialNo",
     },
     },
     {
     {
       label: "物料名称",
       label: "物料名称",
-      width:150,
+      width:130,
+      search: true,
       overHidden: true,
       overHidden: true,
       prop: "materialName",
       prop: "materialName",
     },
     },
     {
     {
-      label: "批次号",
-      prop: "batchCode",
-      width:150,
-      overHidden: true
-    },
-    {
-      label: "出库总数量",
-      prop: "num",
+      label: "物料型号",
+      width:130,
+      overHidden: true,
+      prop: "spec",
     },
     },
     {
     {
-      label: "已出库数量",
-      prop: "completedNum",
+      label: "单位",
+      overHidden: true,
+      prop: "unit",
     },
     },
     {
     {
-      label: "待出库数量",
-      prop: "unDoNum",
+      label: "库位",
+      overHidden: true,
+      prop: "locationNo",
     },
     },
     {
     {
-      label: "单位",
-      prop: "unit",
+      label: "二维码",
+      prop: "batchCode",
+      width:150,
+      overHidden: true,
+      formatter:(val,value,label)=>{
+        if(val.seqNo){
+          return val.seqNo;
+        }else{
+          return val.batchCode
+        }
+      }
     },
     },
     {
     {
-      label: "出库类型",
-      prop: "outType",
-      type: "select",
-      search: true,
-      dicUrl:
-          dictDataUtil.request_url +
-          dictDataUtil.TYPE_CODE.warehouse_out_task_type,
-      props: {
-        label: "dictLabel",
-        value: "dictValue",
-      }
+      label: "数量",
+      prop: "num",
     },
     },
     {
     {
       label: "状态",
       label: "状态",
@@ -122,12 +135,23 @@ option.value = Object.assign(option.value, {
         value: "dictValue",
         value: "dictValue",
       }
       }
     },
     },
+    {
+      label: "操作时间",
+      prop: "created",
+      width: 180,
+      display: false
+    },
+    {
+      label: "操作人",
+      prop: "creator",
+      display: false
+    },
   ],
   ],
 });
 });
 
 
 onMounted(() => {
 onMounted(() => {
   // console.log("crudRef", crudRef)
   // console.log("crudRef", crudRef)
-  search.value.type = '2'
+  //search.value.type = '2'
   dataList();
   dataList();
 });
 });
 </script>
 </script>