huminmin
5 天以前 d6bcd2806fcf3a2f8da602152f2423f7f86226d7
增加生产报工-投入产出页面
已添加2个文件
已修改1个文件
242 ■■■■ 文件已修改
src/views/productionManagement/productionReporting/Input.vue 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/Output.vue 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/index.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/Input.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,92 @@
<template>
  <div>
    <el-dialog
        v-model="isShow"
        title="投入"
        @close="closeModal"
    >
      <PIMTable
          rowKey="id"
          :column="tableColumn"
          :tableData="data"
          :page="page"
          :tableLoading="tableLoading"
          @pagination="pagination"
      ></PIMTable>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="closeModal">关闭</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
import {ref, computed, onMounted} from "vue";
const props = defineProps({
  visible: {
    type: Boolean,
    required: true,
  },
});
const emit = defineEmits(['update:visible', 'completed']);
const page = reactive({
  current: 1,
  size: 100,
  total: 0
});
const pagination = (obj) => {
  page.current = obj.page;
  page.size = obj.limit;
  fetchData();
};
const tableLoading = ref(false);
const tableColumn = [
  {
    label: '报工单号',
    prop: 'productNo',
  },
  {
    label: '产品型号',
    prop: 'productModelName',
  },
  {
    label: '投入数量',
    prop: 'quantity',
  },
]
const isShow = computed({
  get() {
    return props.visible;
  },
  set(val) {
    emit('update:visible', val);
  },
});
const data = ref([])
const closeModal = () => {
  isShow.value = false;
};
const fetchData = () => {
};
defineExpose({
  closeModal,
  isShow,
});
onMounted(() => {
  fetchData()
})
</script>
src/views/productionManagement/productionReporting/Output.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,92 @@
<template>
  <div>
    <el-dialog
        v-model="isShow"
        title="产出"
        @close="closeModal"
    >
      <PIMTable
          rowKey="id"
          :column="tableColumn"
          :tableData="data"
          :page="page"
          :tableLoading="tableLoading"
          @pagination="pagination"
      ></PIMTable>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="closeModal">关闭</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
import {ref, computed, onMounted} from "vue";
const props = defineProps({
  visible: {
    type: Boolean,
    required: true,
  },
});
const emit = defineEmits(['update:visible', 'completed']);
const page = reactive({
  current: 1,
  size: 100,
  total: 0
});
const pagination = (obj) => {
  page.current = obj.page;
  page.size = obj.limit;
  fetchData();
};
const tableLoading = ref(false);
const tableColumn = [
  {
    label: '报工单号',
    prop: 'productNo',
  },
  {
    label: '产品型号',
    prop: 'productModelName',
  },
  {
    label: '产出数量',
    prop: 'quantity',
  },
]
const isShow = computed({
  get() {
    return props.visible;
  },
  set(val) {
    emit('update:visible', val);
  },
});
const data = ref([])
const closeModal = () => {
  isShow.value = false;
};
const fetchData = () => {
};
defineExpose({
  closeModal,
  isShow,
});
onMounted(() => {
  fetchData()
})
</script>
src/views/productionManagement/productionReporting/index.vue
@@ -127,15 +127,21 @@
            </PIMTable>
        </div>
        <form-dia ref="formDia" @close="handleQuery"></form-dia>
    <input-modal
        v-if="isShowInput"
        v-model:visible="isShowInput"
    />
    <output-modal
        v-if="isShowOutput"
        v-model:visible="isShowOutput"
    />
    </div>
</template>
<script setup>
import {onMounted, ref} from "vue";
import FormDia from "@/views/productionManagement/productionReporting/components/formDia.vue";
import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js";
import {ElMessageBox} from "element-plus";
import dayjs from "dayjs";
import {
    productionReportUpdate,
    workListPageById
@@ -144,6 +150,8 @@
  productionProductMainListPage,
} from "@/api/productionManagement/production_product_main.js";
import {userListNoPageByTenantId} from "@/api/system/user.js";
import InputModal from "@/views/productionManagement/productionReporting/Input.vue";
import OutputModal from "@/views/productionManagement/productionReporting/Output.vue";
const data = reactive({
    searchForm: {
@@ -236,9 +244,17 @@
    width: 200,
    operation: [
      {
        name: "查看",
        name: "查看投入",
        type: "text",
        clickFun: (row) => {
          showInput(row)
        }
      },
      {
        name: "查看产出",
        type: "text",
        clickFun: (row) => {
          showOutput(row)
        }
      },
    ]
@@ -376,30 +392,18 @@
    })
};
// åˆ é™¤
const handleDelete = () => {
    let ids = [];
    if (selectedRows.value.length > 0) {
        ids = selectedRows.value.map((item) => item.id);
    } else {
        proxy.$modal.msgWarning("请选择数据");
        return;
    }
    ElMessageBox.confirm("选中的内容将被删除,是否确认删除?", "导出", {
        confirmButtonText: "确认",
        cancelButtonText: "取消",
        type: "warning",
    })
        .then(() => {
            staffJoinDel(ids).then((res) => {
                proxy.$modal.msgSuccess("删除成功");
                getList();
            });
        })
        .catch(() => {
            proxy.$modal.msg("已取消");
        });
};
// æ‰“开投入模态框
const isShowInput = ref(false);
const showInput = (row) => {
    isShowInput.value = true;
}
// æ‰“开产出模态框
const isShowOutput = ref(false);
const showOutput = (row) => {
    isShowOutput.value = true;
}
// å¯¼å‡º
const handleOut = () => {
    ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", {