ysy 1 jaar geleden
bovenliggende
commit
979550f880

+ 1 - 1
src/views/byProduct/components/addByProduct.vue

@@ -93,7 +93,7 @@
 <script>
   import { getCode } from '@/api/produce/workOrder';
   import ProductModal from './ProductModal.vue';
-  import produceOrder from './produceOrder.vue';
+  import produceOrder from '@/views/pick/pickApply/components/produceOrder.vue';
   export default {
     components: {
       ProductModal,

+ 0 - 107
src/views/byProduct/components/produceOrder-search.vue

@@ -1,107 +0,0 @@
-<!-- 搜索表单 -->
-<template>
-  <el-form
-    label-width="90px"
-    class="ele-form-search"
-    @keyup.enter.native="search"
-    @submit.native.prevent
-  >
-    <el-row :gutter="15">
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="工序名称:">
-  
-          <el-select size="mini"   @change="search" v-model="where.taskId"  filterable>
-            <el-option
-              v-for="(item, index) in produceTaskList"
-              :key="index"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-      </el-col>
-
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label-width="0px">
-          <el-button
-            size="mini"
-            type="primary"
-            icon="el-icon-search"
-            class="ele-btn-icon"
-            @click="search"
-          >
-            查询
-          </el-button>
-          <el-button
-            size="mini"
-            @click="reset"
-            icon="el-icon-refresh-left"
-            type="primary"
-            >重置</el-button
-          >
-        </el-form-item>
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-
-<script>
-  import { produceTask } from '@/api/InTheSystem/index';
-  export default {
-    props: [],
-    data() {
-      // 默认表单数据
-      const defaultWhere = {
-        taskId: '',
-        code: ''
-      };
-      return {
-        // 表单数据
-        where: { ...defaultWhere },
-
-        produceTaskList: []
-      };
-    },
-    computed: {
-      // 是否开启响应式布局
-      styleResponsive() {
-        return this.$store.state.theme.styleResponsive;
-      }
-    },
-    watch: {},
-    created() {
-      this.getTaskList();
-    },
-    methods: {
-      getTaskList() {
-        produceTask().then((res) => {
-          this.produceTaskList = res.list;
-          this.where.taskId =  res.list[0].id
-
-
-           if(this.where.taskId) {
-            this.$emit('search', this.where);
-           }
-        
-        });
-      },
-
-      /* 搜索 */
-      search() {
-        this.$emit('search', this.where);
-      },
-      /*  重置 */
-      reset() {
-        this.where = { ...this.defaultWhere };
-        this.search();
-      }
-    }
-  };
-</script>
-<style lang="scss" scoped>
-  .ele-form-actions {
-    display: flex;
-    align-items: center;
-    justify-content: flex-end;
-  }
-</style>

+ 0 - 249
src/views/byProduct/components/produceOrder.vue

@@ -1,249 +0,0 @@
-<template>
-  <el-dialog
-    title="工单列表"
-    :visible.sync="visible"
-    :before-close="handleClose"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    width="70%"
-  >
-    <produceOrderSearch @search="reload"></produceOrderSearch>
-    <ele-pro-table
-      ref="table"
-      height="55vh"
-      :columns="columns"
-      width="30%"
-      :initLoad="false"
-      :datasource="datasource"
-      :selection.sync="selection"
-      cache-key="produceOrderZ"
-      highlight-current-row
-    >
-      <template v-slot:code="{ row }">
-        <el-link type="primary" :underline="false">{{ row.code }}</el-link>
-      </template>
-
-      <template v-slot:singleReport="{ row }">
-        <el-tag> {{ row.singleReport == 1 ? '单个报工' : '批量报工' }}</el-tag>
-      </template>
-
-      <template v-slot:formingNum="{ row }">
-        <span> {{ row.formingNum }} {{ row.unit }} </span>
-      </template>
-
-      <template v-slot:formingWeight="{ row }">
-        <span> {{ row.formingNum }} {{ row.weightUnit }} </span>
-      </template>
-    </ele-pro-table>
-
-    <template slot="footer">
-      <el-button size="mini" @click="handleClose">取 消</el-button>
-      <el-button size="mini" type="primary" @click="handleSelect()"
-        >确 定</el-button
-      >
-    </template>
-  </el-dialog>
-</template>
-
-<script>
-  import { pickTaskReportPage } from '@/api/produce/workOrder.js';
-
-  import produceOrderSearch from './produceOrder-search.vue';
-
-
-  export default {
-    components: { produceOrderSearch, 
-
-     },
-
-    data() {
-      return {
-        loading: false,
-        selection: [],
-
-        visible: true,
-        taskId: null
-      };
-    },
-
-    watch: {},
-
-    computed: {
-      columns() {
-        return [
-          {
-            width: 45,
-            type: 'selection',
-            columnKey: 'selection',
-            align: 'center',
-            fixed: true
-          },
-          {
-            columnKey: 'index',
-            label: '序号',
-            type: 'index',
-            width: 55,
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'batchNo',
-            label: '批次号',
-            align: 'center'
-          },
-
-          {
-            prop: 'code',
-            slot: 'code',
-            label: '生产工单号',
-            align: 'center',
-            minWidth: '110'
-          },
-          {
-            prop: '',
-            label: '计划编号',
-            align: 'center'
-          },
-          {
-            prop: '',
-            label: '计划类型',
-            align: 'center'
-          },
-
-          {
-            prop: 'productCode',
-            label: '产品编码',
-            align: 'center'
-          },
-          {
-            prop: 'productName',
-            label: '产品名称',
-            align: 'center'
-          },
-
-          {
-            prop: 'singleReport',
-            slot: 'singleReport',
-            label: '报工类型',
-            align: 'center',
-            width: 100
-          },
-
-          {
-            prop: 'brandNo',
-            label: '牌号',
-            align: 'center'
-          },
-          {
-            prop: 'model',
-            label: '型号',
-            align: 'center'
-          },
-
-          {
-            prop: 'priority',
-            label: '优先级',
-            align: 'center',
-            minWidth: 120
-          },
-
-          {
-            prop: 'formingNum',
-            label: '要求生产数量',
-            align: 'center',
-            slot: 'formingNum',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'formingWeight',
-            label: '要求生产重量',
-            slot: 'formingWeight',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'formedNum',
-            label: '已生产数量',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'formedWeight',
-            label: '已生产重量',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'planStartTime',
-            label: '计划开始时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'planCompleteTime',
-            label: '计划结束时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'startTime',
-            label: '实际开始时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-
-          {
-            prop: 'createTime',
-            label: '创建时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          }
-        ];
-      }
-    },
-
-    methods: {
-      /* 表格数据源 */
-      datasource({ page, limit, where }) {
-        return pickTaskReportPage({
-          pageNum: page,
-          size: limit,
- 
-          ...where
-        });
-      },
-
-      /* 刷新表格 */
-      reload(where) {
-        this.taskId = where.taskId || '';
-        this.$nextTick(() => {
-          this.$refs.table.reload({ page: 1, where });
-        });
-      },
-      handleSelect() {
-        let ids = [];
-        ids = this.selection.map((item) => {
-          return item.id;
-        });
-        if (!this.taskId) {
-          return this.$message.warning('请选择工序');
-        }
-
-        this.$emit('workSelect', ids, this.taskId);
-      },
-
-      handleClose() {
-        this.$emit('close');
-      }
-    }
-  };
-</script>