Explorar o código

提交样品整样与小样列表

PC-202503171525\Administrator hai 1 ano
pai
achega
5deaa0a797

+ 11 - 0
src/api/samplemanagement/index.js

@@ -36,3 +36,14 @@ export async function disposeSubmit(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+
+// 列表
+export async function getSampleSmallWhole(data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/qms/qualitysample/getSampleSmallWhole?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 0 - 0
src/views/samplemanagement/components/baseInfo.vue → src/views/sample/samplemanagement/components/baseInfo.vue


+ 1 - 1
src/views/samplemanagement/components/edit.vue → src/views/sample/samplemanagement/components/edit.vue

@@ -63,7 +63,7 @@ export default {
       tableColumns: [
         { label: '编码', prop: 'categoryCode', width: '150', align: 'center', showOverflowTooltip: true, slot: 'categoryCode' },
         { label: '名称', prop: 'categoryName', width: '150', align: 'center', showOverflowTooltip: true },
-        { label: '批次号22222', prop: 'batchNo', align: 'center', showOverflowTooltip: true },
+        { label: '批次号', prop: 'batchNo', align: 'center', showOverflowTooltip: true },
         { label: '发货条码', prop: 'barcodes', align: 'center', showOverflowTooltip: true },
         { label: '包装编码', prop: 'packageNo', align: 'center', showOverflowTooltip: true },
         { label: '包装数量', prop: 'packingQuantity', align: 'center', showOverflowTooltip: true },

+ 0 - 0
src/views/samplemanagement/components/search.vue → src/views/sample/samplemanagement/components/search.vue


+ 1 - 1
src/views/samplemanagement/index.vue → src/views/sample/samplemanagement/index.vue

@@ -82,7 +82,7 @@ export default {
         },
         processingMethod(type, row) {
           this.$router.push({
-            path: '/samplemanagement/components/edit',
+            path: '/sample/samplemanagement/components/edit',
             query: {
               type: type,
               qualityWorkOrderId: row.qualityWorkOrderId || '',

+ 80 - 0
src/views/sample/small/components/search.vue

@@ -0,0 +1,80 @@
+<!-- 搜索表单 -->
+6
+<template>
+  <el-form label-width="77px" class="ele-form-search" @keyup.enter.native="search" @submit.native.prevent>
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 8 } : { span: 4 }">
+        <el-form-item label="编码:">
+          <el-input clearable v-model="where.sampleCode" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 8 } : { span: 4 }">
+        <el-form-item label="物品编码:">
+          <el-input clearable v-model="where.categoryCode" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 8 } : { span: 4 }">
+        <el-form-item label="物品名称:">
+          <el-input clearable v-model="where.categoryName" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 8 } : { span: 4 }">
+        <el-form-item label="样品状态:">
+          <el-select
+            v-model="where.qualityResults"
+            placeholder="请选择"
+            style="width: 100%"
+          >
+            <el-option label="合格" :value="1" />
+            <el-option label="不合格" :value="2" />
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col style="display: flex; justify-content: flex-end"
+        v-bind="styleResponsive ? { lg: 4, md: 6 } : { span: 12 }">
+        <div class="ele-form-actions">
+          <el-button type="primary" icon="el-icon-search" class="ele-btn-icon" @click="search">
+            查询
+          </el-button>
+          <el-button @click="reset">重置</el-button>
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+export default {
+  data() {
+    // 默认表单数据
+    const defaultWhere = {
+      code: '',
+      produceTaskName: '',
+      deptIds: ''
+    };
+    return {
+      defaultWhere,
+      // 表单数据
+      where: { ...defaultWhere }
+    };
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  methods: {
+    /* 搜索 */
+    search() {
+      this.$emit('search', this.where);
+    },
+    /*  重置 */
+    reset() {
+      this.where = { ...this.defaultWhere };
+      this.search();
+    }
+  }
+};
+</script>

+ 94 - 0
src/views/sample/small/index.vue

@@ -0,0 +1,94 @@
+<template>
+    <div class="ele-body">
+        <el-card shadow="never">
+            <search ref="search" @search="reload"></search>
+            <ele-pro-table ref="table" :columns="columns" :datasource="datasource" :pageSize="20"  :pageSizes="[20, 40, 60,80, 100]">
+                <!-- 表头工具栏 -->
+                <template v-slot:toolbar>
+
+                </template>
+
+                <template v-slot:code="{ row }">
+                    <el-link type="primary" :underline="false">
+                        {{ row.code }}
+                    </el-link>
+                </template>
+            </ele-pro-table>
+        </el-card>
+    </div>
+</template>
+<script>
+import search from './components/search.vue';
+
+import { getSampleSmallWhole } from '@/api/samplemanagement';
+
+import dictMixins from '@/mixins/dictMixins';
+
+export default {
+    mixins: [dictMixins],
+    components: {
+      search,
+    },
+    data() {
+        return {
+            columns: [
+              {type: 'index',columnKey: 'index',align: 'center',label: '序号',width: 55,showOverflowTooltip: true},
+              { label: '编码', prop: 'sampleCode', width: '150', align: 'center', showOverflowTooltip: true, slot: 'sampleCode' },
+              { label: '名称', prop: 'categoryName', width: '150', align: 'center', showOverflowTooltip: true },
+              { label: '批次号', prop: 'batchNo', align: 'center', showOverflowTooltip: true },
+              { label: '发货条码', prop: 'barcodes', align: 'center', showOverflowTooltip: true },
+              { label: '包装编码', prop: 'packageNo', align: 'center', showOverflowTooltip: true },
+              { label: '包装数量', prop: 'packingQuantity', align: 'center', showOverflowTooltip: true },
+              { label: '包装单位', prop: 'packingUnit', align: 'center', showOverflowTooltip: true },
+              { label: '计量数量', prop: 'measureQuantity', align: 'center', showOverflowTooltip: true },
+              { label: '计量单位', prop: 'measureUnit', align: 'center', showOverflowTooltip: true },
+              { label: '物料代号', prop: 'materielDesignation', align: 'center', showOverflowTooltip: true },
+              { label: '客户代号', prop: 'clientCode', align: 'center', showOverflowTooltip: true },
+              { label: '刻码', prop: 'engrave', align: 'center', showOverflowTooltip: true },
+              { label: '仓库', prop: 'warehouseName', align: 'center', showOverflowTooltip: true },
+              { label: '货区', prop: 'areaName', align: 'center', showOverflowTooltip: true },
+              { label: '货架', prop: 'goodsShelfName', align: 'center', showOverflowTooltip: true },
+              { label: '货位', prop: 'goodsAllocationName', align: 'center', showOverflowTooltip: true },
+              { label: '生产日期', prop: 'productionDate', align: 'center', showOverflowTooltip: true },
+              { label: '采购日期', prop: 'purchaseDate', align: 'center', showOverflowTooltip: true },
+              { label: '重量', prop: 'weight', align: 'center', showOverflowTooltip: true, fixed: 'right' },
+              { label: '重量单位', prop: 'weightUnit', align: 'center', showOverflowTooltip: true, fixed: 'right' },
+              {
+                label: '处置状态', prop: 'disposalStatus', align: 'center', showOverflowTooltip: true, fixed: 'right', formatter: (row, column, cellValue) => {
+                  return cellValue == 1 ? '返工' : cellValue == 2 ? '返修' : cellValue == 3 ? '报废' : cellValue == 4 ? '降级使用' :
+                    cellValue == 5 ? '让步接收' : cellValue == 6 ? '留样' : cellValue == 7 ? '消耗' : cellValue == 8 ? '回用' : '';
+                }
+              },
+              { label: '处置时间', prop: 'disposeTime', align: 'center', showOverflowTooltip: true, fixed: 'right' },
+              {
+                label: '质检状态', prop: 'qualityStatus', align: 'center', showOverflowTooltip: true, fixed: 'right', formatter: (row, column, cellValue) => {
+                  return cellValue == 0 ? '未检' : cellValue == 1 ? '已检' : cellValue == 2 ? '待检' : '';
+                }
+              },
+              {
+                label: '质检结果', prop: 'qualityResults', align: 'center', showOverflowTooltip: true, fixed: 'right', formatter: (row, column, cellValue) => {
+                  return cellValue == 1 ? '合格' : cellValue == 2 ? '不合格' : '';
+                }
+              },
+            ]
+        };
+    },
+    created() {
+        // this.requestDict('取样类型');
+    },
+    methods: {
+        datasource({ page, where, limit }) {
+          where.conditionType = 2;
+            return getSampleSmallWhole({
+                ...where,
+                pageNum: page,
+                size: limit
+            });
+        },
+
+        reload(where) {
+            this.$refs.table.reload({ page: 1, where });
+        },
+    }
+};
+</script>

+ 80 - 0
src/views/sample/whole/components/search.vue

@@ -0,0 +1,80 @@
+<!-- 搜索表单 -->
+6
+<template>
+  <el-form label-width="77px" class="ele-form-search" @keyup.enter.native="search" @submit.native.prevent>
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 8 } : { span: 4 }">
+        <el-form-item label="编码:">
+          <el-input clearable v-model="where.sampleCode" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 8 } : { span: 4 }">
+        <el-form-item label="物品编码:">
+          <el-input clearable v-model="where.categoryCode" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 8 } : { span: 4 }">
+        <el-form-item label="物品名称:">
+          <el-input clearable v-model="where.categoryName" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 8 } : { span: 4 }">
+        <el-form-item label="质检状态:">
+          <el-select
+            v-model="where.qualityResults"
+            placeholder="请选择"
+            style="width: 100%"
+          >
+            <el-option label="合格" :value="1" />
+            <el-option label="不合格" :value="2" />
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col style="display: flex; justify-content: flex-end"
+        v-bind="styleResponsive ? { lg: 4, md: 6 } : { span: 12 }">
+        <div class="ele-form-actions">
+          <el-button type="primary" icon="el-icon-search" class="ele-btn-icon" @click="search">
+            查询
+          </el-button>
+          <el-button @click="reset">重置</el-button>
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+export default {
+  data() {
+    // 默认表单数据
+    const defaultWhere = {
+      code: '',
+      produceTaskName: '',
+      deptIds: ''
+    };
+    return {
+      defaultWhere,
+      // 表单数据
+      where: { ...defaultWhere }
+    };
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  methods: {
+    /* 搜索 */
+    search() {
+      this.$emit('search', this.where);
+    },
+    /*  重置 */
+    reset() {
+      this.where = { ...this.defaultWhere };
+      this.search();
+    }
+  }
+};
+</script>

+ 95 - 0
src/views/sample/whole/index.vue

@@ -0,0 +1,95 @@
+<template>
+    <div class="ele-body">
+        <el-card shadow="never">
+            <search ref="search" @search="reload"></search>
+            <ele-pro-table ref="table" :columns="columns" :datasource="datasource" :pageSize="20"  :pageSizes="[20, 40, 60,80, 100]">
+                <!-- 表头工具栏 -->
+                <template v-slot:toolbar>
+
+                </template>
+
+                <template v-slot:code="{ row }">
+                    <el-link type="primary" :underline="false">
+                        {{ row.code }}
+                    </el-link>
+                </template>
+            </ele-pro-table>
+        </el-card>
+    </div>
+</template>
+<script>
+import search from './components/search.vue';
+
+import { getSampleSmallWhole } from '@/api/samplemanagement';
+
+import dictMixins from '@/mixins/dictMixins';
+
+export default {
+    mixins: [dictMixins],
+    components: {
+      search,
+    },
+    data() {
+        return {
+            columns: [
+              {type: 'index',columnKey: 'index',align: 'center',label: '序号',width: 55,showOverflowTooltip: true},
+              { label: '样品编码', prop: 'sampleCode', width: '150', align: 'center', showOverflowTooltip: true, slot: 'sampleCode' },
+              { label: '编码', prop: 'categoryCode', width: '150', align: 'center', showOverflowTooltip: true, slot: 'categoryCode' },
+              { label: '名称', prop: 'categoryName', width: '150', align: 'center', showOverflowTooltip: true },
+              { label: '批次号', prop: 'batchNo', align: 'center', showOverflowTooltip: true },
+              { label: '发货条码', prop: 'barcodes', align: 'center', showOverflowTooltip: true },
+              { label: '包装编码', prop: 'packageNo', align: 'center', showOverflowTooltip: true },
+              { label: '包装数量', prop: 'packingQuantity', align: 'center', showOverflowTooltip: true },
+              { label: '包装单位', prop: 'packingUnit', align: 'center', showOverflowTooltip: true },
+              { label: '计量数量', prop: 'measureQuantity', align: 'center', showOverflowTooltip: true },
+              { label: '计量单位', prop: 'measureUnit', align: 'center', showOverflowTooltip: true },
+              { label: '物料代号', prop: 'materielDesignation', align: 'center', showOverflowTooltip: true },
+              { label: '客户代号', prop: 'clientCode', align: 'center', showOverflowTooltip: true },
+              { label: '刻码', prop: 'engrave', align: 'center', showOverflowTooltip: true },
+              { label: '仓库', prop: 'warehouseName', align: 'center', showOverflowTooltip: true },
+              { label: '货区', prop: 'areaName', align: 'center', showOverflowTooltip: true },
+              { label: '货架', prop: 'goodsShelfName', align: 'center', showOverflowTooltip: true },
+              { label: '货位', prop: 'goodsAllocationName', align: 'center', showOverflowTooltip: true },
+              { label: '生产日期', prop: 'productionDate', align: 'center', showOverflowTooltip: true },
+              { label: '采购日期', prop: 'purchaseDate', align: 'center', showOverflowTooltip: true },
+              { label: '重量', prop: 'weight', align: 'center', showOverflowTooltip: true, fixed: 'right' },
+              { label: '重量单位', prop: 'weightUnit', align: 'center', showOverflowTooltip: true, fixed: 'right' },
+              {
+                label: '处置状态', prop: 'disposalStatus', align: 'center', showOverflowTooltip: true, fixed: 'right', formatter: (row, column, cellValue) => {
+                  return cellValue == 1 ? '返工' : cellValue == 2 ? '返修' : cellValue == 3 ? '报废' : cellValue == 4 ? '降级使用' :
+                    cellValue == 5 ? '让步接收' : cellValue == 6 ? '留样' : cellValue == 7 ? '消耗' : cellValue == 8 ? '回用' : '';
+                }
+              },
+              { label: '处置时间', prop: 'disposeTime', align: 'center', showOverflowTooltip: true, fixed: 'right' },
+              {
+                label: '质检状态', prop: 'qualityStatus', align: 'center', showOverflowTooltip: true, fixed: 'right', formatter: (row, column, cellValue) => {
+                  return cellValue == 0 ? '未检' : cellValue == 1 ? '已检' : cellValue == 2 ? '待检' : '';
+                }
+              },
+              {
+                label: '质检结果', prop: 'qualityResults', align: 'center', showOverflowTooltip: true, fixed: 'right', formatter: (row, column, cellValue) => {
+                  return cellValue == 1 ? '合格' : cellValue == 2 ? '不合格' : '';
+                }
+              },
+            ]
+        };
+    },
+    created() {
+        // this.requestDict('取样类型');
+    },
+    methods: {
+        datasource({ page, where, limit }) {
+          where.conditionType = 1;
+            return getSampleSmallWhole({
+                ...where,
+                pageNum: page,
+                size: limit
+            });
+        },
+
+        reload(where) {
+            this.$refs.table.reload({ page: 1, where });
+        },
+    }
+};
+</script>