huminmin
5 天以前 b665f6f67837fb608e0055dd2ea9ad05c5c5fb34
增加生产报工-投入产出接口
已添加2个文件
已重命名1个文件
已修改3个文件
65 ■■■■■ 文件已修改
src/api/productionManagement/productionProductInput.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/productionManagement/productionProductMain.js 补丁 | 查看 | 原始文档 | blame | 历史
src/api/productionManagement/productionProductOutput.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/Input.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/Output.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/productionManagement/productionProductInput.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
// ç”Ÿäº§æŠ•入页面接口
import request from "@/utils/request";
// åˆ†é¡µæŸ¥è¯¢
export function productionProductInputListPage(query) {
    return request({
        url: "/productionProductInput/listPage",
        method: "get",
        params: query,
    });
}
src/api/productionManagement/productionProductMain.js
src/api/productionManagement/productionProductOutput.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
// ç”Ÿäº§äº§å‡ºé¡µé¢æŽ¥å£
import request from "@/utils/request";
// åˆ†é¡µæŸ¥è¯¢
export function productionProductOutputListPage(query) {
    return request({
        url: "/productionProductOutput/listPage",
        method: "get",
        params: query,
    });
}
src/views/productionManagement/productionReporting/Input.vue
@@ -24,10 +24,15 @@
<script setup>
import {ref, computed, onMounted} from "vue";
import { productionProductInputListPage } from "@/api/productionManagement/productionProductInput";
const props = defineProps({
  visible: {
    type: Boolean,
    required: true,
  },
  productionProductMainId: {
    type: Number,
    required: true,
  },
});
@@ -55,7 +60,7 @@
  },
  {
    label: '产品型号',
    prop: 'productModelName',
    prop: 'model',
  },
  {
    label: '投入数量',
@@ -79,6 +84,16 @@
};
const fetchData = () => {
  tableLoading.value = true;
  const params = { productMainId: props.productionProductMainId, ...page };
  productionProductInputListPage(params).then(res => {
    tableLoading.value = false;
    data.value = res.data.records;
    page.total = res.data.total;
  }).catch(err => {
    tableLoading.value = false;
  })
};
defineExpose({
src/views/productionManagement/productionReporting/Output.vue
@@ -24,10 +24,15 @@
<script setup>
import {ref, computed, onMounted} from "vue";
import { productionProductOutputListPage } from "@/api/productionManagement/productionProductOutput.js";
const props = defineProps({
  visible: {
    type: Boolean,
    required: true,
  },
  productionProductMainId: {
    type: Number,
    required: true,
  },
});
@@ -55,10 +60,10 @@
  },
  {
    label: '产品型号',
    prop: 'productModelName',
    prop: 'model',
  },
  {
    label: '产出数量',
    label: '投入数量',
    prop: 'quantity',
  },
]
@@ -79,6 +84,16 @@
};
const fetchData = () => {
  tableLoading.value = true;
  const params = { productMainId: props.productionProductMainId, ...page };
  productionProductOutputListPage(params).then(res => {
    tableLoading.value = false;
    data.value = res.data.records;
    page.total = res.data.total;
  }).catch(err => {
    tableLoading.value = false;
  })
};
defineExpose({
src/views/productionManagement/productionReporting/index.vue
@@ -130,10 +130,12 @@
    <input-modal
        v-if="isShowInput"
        v-model:visible="isShowInput"
        :production-product-main-id="isShowingId"
    />
    <output-modal
        v-if="isShowOutput"
        v-model:visible="isShowOutput"
        :production-product-main-id="isShowingId"
    />
    </div>
</template>
@@ -148,7 +150,7 @@
} from "@/api/productionManagement/productionReporting.js";
import {
  productionProductMainListPage,
} from "@/api/productionManagement/production_product_main.js";
} from "@/api/productionManagement/productionProductMain.js";
import {userListNoPageByTenantId} from "@/api/system/user.js";
import InputModal from "@/views/productionManagement/productionReporting/Input.vue";
import OutputModal from "@/views/productionManagement/productionReporting/Output.vue";
@@ -394,14 +396,17 @@
// æ‰“开投入模态框
const isShowInput = ref(false);
const isShowingId = ref(0)
const showInput = (row) => {
    isShowInput.value = true;
  isShowingId.value = row.id
}
// æ‰“开产出模态框
const isShowOutput = ref(false);
const showOutput = (row) => {
    isShowOutput.value = true;
  isShowingId.value = row.id
}
// å¯¼å‡º