فهرست منبع

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dev

ysy 1 سال پیش
والد
کامیت
08b5d41842

+ 7 - 0
src/api/warehousing/index.js

@@ -11,4 +11,11 @@ export async function getList (data) {
     return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
+}
+export async function updateApprovalStatus (data) {
+  const res = await request.get('/mes/applystorage/updateApprovalStatus/'+data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
 }

+ 2 - 1
src/views/unacceptedProduct/components/edit.vue

@@ -145,6 +145,7 @@ export default {
       console.log(row,'row')
       this.visible = true;
       this.poList = row;
+      this.type=type
       this.title = type == 1 ? '返工返修' : type == 2 ? '报废' : '试销品';
       if (
         !row[0].productName.includes('板材') &&
@@ -201,7 +202,7 @@ export default {
         this.$alert('请选择入库仓库');
         return;
       }
-      this.$emit('success', data);
+      this.$emit('success', {data,type:this.type});
       this.cancel();
     },
     // 封装计算体积方法

+ 7 - 9
src/views/unacceptedProduct/detail.vue

@@ -273,23 +273,21 @@ export default {
       if (!this.disposeType) {
         return;
       }
-      this.dialogVisible = false;
       this.$refs.edit.open(this.all?this.selection:[this.current], this.disposeType);
+      this.dialogVisible = false;
     },
     async save(data) {
-      // console.log(data)
-      // return
-      if (data && data.length > 0) {
-        data.forEach((item) => {
-          item['fid'] = this.current.id;
+      if (data.data && data.data.length > 0) {
+        data.data.forEach((item) => {
+          item['fid'] = item.id||this.current.id;
         });
       }
       let ids =
-        this.disposeType == 1 ? [this.current.id] : data.map((item) => item.id);
+      data.type == 1 ? [this.current.id] : data.data.map((item) => item.id);
       await dispose({
         id: ids,
-        disposeType: Number(this.disposeType),
-        poList: data
+        disposeType: Number(data.type),
+        poList: data.data
       });
       this.dialogVisible = false;
       this.current = null;

+ 1 - 1
src/views/warehousing/components/tgDetails.vue

@@ -35,7 +35,7 @@
       :need-page="false">
 
       <template v-slot:quantity="{ row }">
-        {{ row.quantity }} {{ row.measuringUnit  }}
+        {{ row.quantity }} 
       </template>
 
 

+ 159 - 143
src/views/warehousing/index.vue

@@ -4,12 +4,7 @@
       <search @search="reload" ref="searchRef"> </search>
 
       <!-- 数据表格 -->
-      <ele-pro-table
-        ref="table"
-        :columns="columns"
-        :datasource="datasource"
-        cache-key="workOrderTable"
-      >
+      <ele-pro-table ref="table" :columns="columns" :datasource="datasource">
         <template v-slot:totalCount="{ row }">
           {{ row.totalCount }} {{ row.measuringUnit }}
         </template>
@@ -29,7 +24,12 @@
         </template>
 
         <template v-slot:action="{ row }">
-          <el-link type="primary" :underline="false" @click="storage(row)">
+          <el-link
+            type="primary"
+            v-if="row.approvalStatus == 0 || row.approvalStatus == 3"
+            :underline="false"
+            @click="storage(row)"
+          >
             入库
           </el-link>
           <el-link type="primary" :underline="false" @click="details(row)">
@@ -40,150 +40,166 @@
     </el-card>
 
     <tgDetails ref="tgDetailsRefs"></tgDetails>
-    <storage inboundType="2" ref="storageRefs"></storage>
+    <storage inboundType="2" ref="storageRefs" @success="reload"></storage>
   </div>
 </template>
 
 <script>
-  import { getList } from '@/api/warehousing/index.js';
-
-  import search from './components/search.vue';
-  import tgDetails from './components/tgDetails.vue';
-  import storage from './storageComponents/storage.vue';
-  export default {
-    components: {
-      search,
-      tgDetails,
-      storage
+import { getList } from '@/api/warehousing/index.js';
+
+import search from './components/search.vue';
+import tgDetails from './components/tgDetails.vue';
+import storage from './storageComponents/storage.vue';
+export default {
+  components: {
+    search,
+    tgDetails,
+    storage
+  },
+  data() {
+    return {
+      loading: false,
+
+      statusOpt: [
+        { label: '未提交', value: 0 },
+        { label: '审核中', value: 1 },
+        { label: '审核通过', value: 2 },
+        { label: '审核不通过', value: 3 }
+      ]
+    };
+  },
+  computed: {
+    // 表格列配置
+    columns() {
+      return [
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          prop: 'workOrderCode',
+          label: '工单编码',
+          align: 'center',
+          minWidth: 110
+        },
+        {
+          prop: 'warehouseName',
+          label: '仓库名称	',
+          align: 'center'
+        },
+
+        {
+          prop: 'categoryLevelName',
+          label: '物品分类',
+          align: 'center'
+        },
+        {
+          prop: 'categoryName',
+          label: '名称',
+          align: 'center'
+        },
+        { label: '型号', prop: 'modelType', width: '150' },
+        { label: '规格', prop: 'specification', width: '150' },
+        { label: '牌号', prop: 'brandNum', width: '50' },
+        {
+          slot: 'totalCount',
+          label: '总数量',
+          align: 'center'
+        },
+
+        {
+          slot: 'totalPackage',
+          label: '总包装',
+          align: 'center'
+        },
+
+        {
+          slot: 'totalWeight',
+          label: '总重量',
+          align: 'center'
+        },
+        {
+          prop: 'type',
+          label: '入库类型',
+          align: 'center',
+          formatter: (row, column, cellValue) => {
+            return cellValue==1?'生产入库':""
+          }
+        },
+        {
+          prop: 'approvalUserName',
+          label: '审核人',
+          align: 'center'
+        },
+
+        {
+          prop: 'createTime',
+          label: '创建时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          slot: 'approvalStatus',
+          label: '状态',
+          align: 'center'
+        },
+
+        {
+          columnKey: 'action',
+          label: '操作',
+          width: 120,
+          align: 'center',
+          resizable: false,
+          fixed: 'right',
+          slot: 'action',
+          showOverflowTooltip: true
+        }
+      ];
+    }
+  },
+  created() {},
+  methods: {
+    statusFormatter(status) {
+      const obj = this.statusOpt.find((i) => i.value == status);
+      return obj && obj.label;
     },
-    data() {
-      return {
-        loading: false,
-
-        statusOpt: [
-          { label: '未提交', value: 0 },
-          { label: '审核中', value: 1 },
-          { label: '审核通过', value: 2 },
-          { label: '审核不通过', value: 3 }
-        ]
-      };
+    /* 表格数据源 */
+    datasource({ page, limit, where }) {
+      return getList({
+        pageNum: page,
+        size: limit,
+        ...where
+      });
     },
-    computed: {
-      // 表格列配置
-      columns() {
-        return [
-          {
-            columnKey: 'index',
-            label: '序号',
-            type: 'index',
-            width: 55,
-            align: 'center',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
-          {
-            prop: 'workOrderCode',
-            label: '工单编码',
-            align: 'center',
-            minWidth: 110
-          },
-          {
-            prop: 'warehouseName',
-            label: '仓库名称	',
-            align: 'center'
-          },
-
-          {
-            prop: 'categoryLevelName',
-            label: '物品分类名称',
-            align: 'center'
-          },
-          {
-            prop: 'categoryName',
-            label: '物品名称',
-            align: 'center'
-          },
-          {
-            slot: 'totalCount',
-            label: '总数量',
-            align: 'center'
-          },
-
-          {
-            slot: 'totalPackage',
-            label: '总包装',
-            align: 'center'
-          },
-
-          {
-            slot: 'totalWeight',
-            label: '总重量',
-            align: 'center'
-          },
-
-          {
-            prop: 'approvalUserName',
-            label: '审核人',
-            align: 'center'
-          },
-
-          {
-            prop: 'createTime',
-            label: '创建时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            slot: 'approvalStatus',
-            label: '状态',
-            align: 'center'
-          },
-
-          {
-            columnKey: 'action',
-            label: '操作',
-            width: 120,
-            align: 'center',
-            resizable: false,
-            fixed: 'right',
-            slot: 'action',
-            showOverflowTooltip: true
-          }
-        ];
-      }
+
+    details(row) {
+      this.$refs.tgDetailsRefs.open(row);
     },
-    created() {},
-    methods: {
-      statusFormatter(status) {
-        const obj = this.statusOpt.find((i) => i.value == status);
-        return obj && obj.label;
-      },
-      /* 表格数据源 */
-      datasource({ page, limit, where }) {
-        return getList({
-          pageNum: page,
-          size: limit,
-          ...where
-        });
-      },
-
-      details(row) {
-        this.$refs.tgDetailsRefs.open(row);
-      },
-
-      storage(row) {
-        this.$refs.storageRefs.pickerSuccess(row);
-      },
-
-      /* 刷新表格 */
-      reload(where) {
-        this.$nextTick(() => {
-          this.$refs.table.reload({ page: 1, where });
-        });
-      }
+
+    storage(row) {
+      // let data = JSON.parse(JSON.stringify(row))
+      // data.detailList.forEach(item=>{
+      //   if(data.categoryName.includes('砌块')||data.categoryName.includes('板材')){
+      //     item.packingCount=item.packingCount
+      //   }
+      // })
+      this.$refs.storageRefs.pickerSuccess(row);
+    },
+
+    /* 刷新表格 */
+    reload(where) {
+      this.$nextTick(() => {
+        this.$refs.table.reload({ page: 1, where });
+      });
     }
-  };
+  }
+};
 </script>
 
 <style lang="scss" scoped></style>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 621 - 537
src/views/warehousing/storageComponents/storage.vue


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است