From 24e7868d80a850bbbda953a73e2598675dc228f6 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期四, 27 十一月 2025 13:49:02 +0800
Subject: [PATCH] PDA增加投料菜单
---
pages.json | 23 ++
pages/product/feeding/index.vue | 412 +++++++++++++++++++++++++++++++++++++++++++++++++++
pages/sys/home/index.vue | 5
common/http.api.js | 6
4 files changed, 438 insertions(+), 8 deletions(-)
diff --git a/common/http.api.js b/common/http.api.js
index d457f29..4359fce 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -581,7 +581,11 @@
// 棰嗘枡纭
materialRequisition: (params = {}) => vm.$u.get('/mes/jdat_wagonBalance/materialRequisition', params),
},
-
+ feedingRecord: {
+ // 鑾峰彇鎶曟枡璁板綍
+ getFeedingRecord: (params = {}) => vm.$u.post('/mes/product/pdaProductInput', params),
+ deleteProductInput: (params = {}) => vm.$u.delete('/mes/product/deleteProductInput/' + params.id),
+ }
};
}
diff --git a/pages.json b/pages.json
index 593e4f6..836be8c 100644
--- a/pages.json
+++ b/pages.json
@@ -514,7 +514,7 @@
}
},
// 棰嗘枡
- {
+ {
"path": "pages/storeManagement/MaterialRequisition/index",
"style": {
"navigationStyle": "custom",
@@ -524,7 +524,7 @@
}
},
// 鍙栨秷棰嗘枡
- {
+ {
"path": "pages/storeManagement/CancelMaterialRequisition/index",
"style": {
"navigationStyle": "custom",
@@ -534,7 +534,7 @@
}
},
// 瀵间綋澶囪揣鐩樼偣
- {
+ {
"path": "pages/wareHouse/InventoryCheckConductiveMterials/index",
"style": {
"navigationStyle": "custom",
@@ -792,7 +792,7 @@
"navigationBarBackgroundColor": "#3281FF"
}
},
- // 鎶曟枡鍒楄〃
+ // 鎶曟枡鍒楄〃
{
"path": "pages/product/report/seachPersonnelNo",
"style": {
@@ -831,7 +831,7 @@
"enablePullDownRefresh": false
}
},
- // 杞﹂棿璁㈠崟鐗╂枡
+ // 杞﹂棿璁㈠崟鐗╂枡
{
"path": "pages/product/WorkshopOrderIssued/comp",
"style": {
@@ -841,7 +841,7 @@
}
},
// 宸ュ崟鍒楄〃
- {
+ {
"path": "pages/product/WorkshopOrderIssued/WorkOrderList",
"style": {
"navigationStyle": "custom",
@@ -876,6 +876,15 @@
"navigationBarTitleText": "宸ュ崟鍒楄〃",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#DAE6FB"
+ }
+ },
+ // 鎶曟枡
+ {
+ "path": "pages/product/feeding/index",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
}
},
{
@@ -968,4 +977,4 @@
}
]
}
-}
+}
\ No newline at end of file
diff --git a/pages/product/feeding/index.vue b/pages/product/feeding/index.vue
new file mode 100644
index 0000000..fa2ef64
--- /dev/null
+++ b/pages/product/feeding/index.vue
@@ -0,0 +1,412 @@
+<template>
+ <view class="page">
+ <view class="movewarehouse-index-bg" />
+ <u-navbar
+ title="鎶曟枡"
+ :background="background"
+ :border-bottom="false"
+ :title-bold="true"
+ title-color="#000"
+ back-icon-color="#000"
+ />
+ <view class="packing-registration-param">
+ <view class="packing-registration-param-view">
+ <view class="packing-registration-param-item param-extra">
+ <view class="packing-registration-param-item-left">
+ <text class="item-one">鎵规鍙凤細</text>
+ </view>
+ <view class="packing-registration-param-item-right">
+ <text class="item-one item-two">{{
+ registerInfo.outBatchNo == ""
+ ? "璇锋壂鎻忔壒娆″彿"
+ : registerInfo.outBatchNo
+ }}</text>
+ </view>
+ </view>
+ <view class="packing-registration-param-item param-extra">
+ <view class="packing-registration-param-item-left">
+ <text class="item-one">{{
+ `鎶曟枡璁板綍(${hasScanSnList.length}鏉�)锛歚
+ }}</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="wrap">
+ <scroll-view class="packing-registration-scroll-list" scroll-y="true">
+ <u-cell-group
+ class="packing-registration-scroll-list-group"
+ :border="false"
+ >
+ <view
+ class="content"
+ v-for="(item, index) in hasScanSnList"
+ :key="index"
+ :index="index"
+ @click="cancelReport(item, index)"
+ >
+ <view class="content-header">
+ <view class="content-header-title">{{
+ hasScanSnList.length - index
+ }}</view>
+ </view>
+ <view class="content-body">
+ <view class="row-list">
+ <view class="_label">
+ <view class="_label-name">鎵规鍙凤細</view>
+ </view>
+ <view class="_content">
+ {{ item.ifsBatchNo }}
+ </view>
+ </view>
+ <view class="row-list">
+ <view class="_label">
+ <view class="_label-name">闆朵欢鍙凤細</view>
+ </view>
+ <view class="_content">
+ {{ item.partBatchNo }}
+ </view>
+ </view>
+ <view class="row-list">
+ <view class="_label">
+ <view class="_label-name">闆朵欢鎻忚堪锛�</view>
+ </view>
+ <view class="_content">
+ {{ item.partName }}
+ </view>
+ </view>
+ </view>
+ </view>
+ </u-cell-group>
+ </scroll-view>
+ </view>
+ <u-modal
+ v-model="showModal"
+ title=""
+ :show-cancel-button="true"
+ :show-confirm-button="true"
+ @confirm="confirm"
+ @cancel="cancel"
+ >
+ <view class="popup-content">
+ <view class="packing-registration-param">
+ <view class="packing-registration-param-view">
+ <view class="packing-registration-param-item param-extra">
+ <view class="packing-registration-param-item-left">
+ <text class="item-one">鎵瑰彿</text>
+ </view>
+ <view class="packing-registration-param-item-right">
+ <text class="item-one item-two">{{
+ detailedList.ifsBatchNo
+ }}</text>
+ </view>
+ </view>
+ <view class="packing-registration-param-item param-extra">
+ <view class="packing-registration-param-item-left">
+ <text class="item-one">闆朵欢鍙�</text>
+ </view>
+ <view class="packing-registration-param-item-right">
+ <text class="item-one item-two">{{
+ detailedList.partBatchNo
+ }}</text>
+ </view>
+ </view>
+ <view class="packing-registration-param-item param-extra">
+ <view class="packing-registration-param-item-left">
+ <text class="item-one">闆朵欢鎻忚堪</text>
+ </view>
+ <view class="packing-registration-param-item-right">
+ <text class="item-one item-two">{{
+ detailedList.partName
+ }}</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ </u-modal>
+ <scan></scan>
+ </view>
+</template>
+<script>
+import scan from "@/components/scan/scan.vue";
+import content_bg from "@/static/custom/moveWareHouse/locNoBg.png";
+export default {
+ components: {
+ scan,
+ },
+
+ data() {
+ return {
+ background: {
+ backgroundImage: `url(${content_bg})`,
+ backgroundAttachment: "fixed",
+ backgroundSize: "100% auto",
+ backgroundRepeat: "no-repeat",
+ },
+ registerInfo: {
+ outBatchNo: "",
+ },
+ showModal: false, // 鎺у埗寮圭獥鏄剧ず闅愯棌鐨勫彉閲�
+ hasScanSnList: [],
+ detailedList: {},
+ id: "",
+ };
+ },
+ onLoad() {},
+ onShow() {
+ let that = this;
+ uni.$off("scan"); // 姣忔杩涙潵鍏� 绉婚櫎鍏ㄥ眬鑷畾涔変簨浠剁洃鍚櫒
+ uni.$on("scan", function (data) {
+ if (data.code) {
+ let codeInfo = JSON.parse(data.code);
+ if (codeInfo.O) {
+ that.saveForm(codeInfo);
+ } else {
+ if (!that.registerInfo.outBatchNo) {
+ that.$u.toast("璇峰厛鎵弿鎶曟枡浜岀淮鐮�");
+ return;
+ }
+ that.saveModalForm(codeInfo);
+ }
+ }
+ });
+ },
+ methods: {
+ cancelReport(item, index) {
+ let that = this;
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "鏄惁纭鍙栨秷鎵规" + item.ifsBatchNo + "鐨勬姤宸�",
+ success: function (res) {
+ that.$u.api.feedingRecord
+ .deleteProductInput({
+ id: item.id,
+ })
+ .then((res) => {
+ that.hasScanSnList.splice(index, 1);
+ console.log("res", res);
+ that.$u.toast("鍙栨秷鎶ュ伐鎴愬姛");
+ });
+ },
+ });
+ },
+ confirm() {
+ // 澶勭悊纭閫昏緫
+ this.$u.api.feedingRecord
+ .getFeedingRecord({
+ ...this.detailedList,
+ productMainId: this.id,
+ })
+ .then((res) => {
+ this.hasScanSnList.unshift(res.data);
+ this.$u.toast("鎶曟枡鎴愬姛");
+ });
+ },
+ cancel() {
+ this.showModal = false; // 鍏抽棴寮圭獥
+ },
+ // 鍥炴樉鎵爜鐨勪俊鎭�
+ saveForm(val) {
+ this.registerInfo.outBatchNo = val.O;
+ this.id = val.I;
+ },
+ saveModalForm(val) {
+ let that = this;
+ that.detailedList = {
+ partBatchNo: val.PN,
+ ifsBatchNo: val.BN,
+ partName: val.ST,
+ inputQuantity: val.NW,
+ };
+ that.showModal = true;
+ },
+ },
+};
+</script>
+<style lang="scss" scoped>
+.person-btn-view {
+ display: flex;
+ justify-content: space-between;
+ margin-top: 300rpx;
+}
+
+.popup-content {
+ width: 600rpx;
+ height: 500rpx;
+ background-color: #fff;
+ border-radius: 8px;
+ z-index: 10;
+ /* 纭繚鍐呭鍦ㄨ挋鐗堜箣涓� */
+}
+
+.movewarehouse-index-bg {
+ background-color: #f6f9ff;
+ background-image: url("~@/static/custom/moveWareHouse/locNoBg.png");
+ // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0));
+ padding: 0 20rpx;
+ background-attachment: fixed;
+ background-size: 100% auto;
+ background-repeat: no-repeat;
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ width: 100%;
+ z-index: -1;
+}
+
+.packing-registration-param {
+ padding: 40rpx 30rpx 10rpx 30rpx;
+
+ .packing-registration-param-title {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ margin-bottom: 30rpx;
+
+ .title-label {
+ margin-left: 14rpx;
+ font-size: 34rpx;
+ font-weight: bold;
+ color: #283e65;
+ }
+ }
+
+ .packing-registration-param-view {
+ height: 177rpx;
+ background-color: #fff;
+ border-radius: 10rpx;
+ padding: 0rpx 23rpx;
+ margin-bottom: 30rpx;
+
+ .packing-registration-param-item {
+ height: 90rpx;
+ border: 1px solid #adc8e4;
+ line-height: 90rpx;
+ display: flex;
+ justify-content: space-between;
+ border: none;
+
+ .packing-registration-param-item-left {
+ .item-one {
+ font-size: small;
+ color: #1b1a1a;
+ }
+ }
+
+ .packing-registration-param-item-right {
+ display: flex;
+ justify-content: space-between;
+
+ .item-one {
+ font-size: 30rpx;
+ color: #333333;
+ margin-right: 6rpx;
+ }
+
+ .item-two {
+ font-size: small;
+ color: #a6b4cc;
+ margin-right: 6rpx;
+ }
+
+ .item-three {
+ font-size: 30rpx;
+ color: #214ded;
+ margin-right: 6rpx;
+ }
+ }
+ }
+
+ .param-extra {
+ border-bottom: 1px solid #ededed;
+ }
+ }
+}
+
+.wrap .packing-registration-scroll-list {
+ height: calc(100vh - var(--window-top) - var(--window-bottom) - 360rpx);
+ width: 100%;
+}
+
+.packing-registration-scroll-list-group {
+ ::v-deep .u-cell-item-box {
+ background-color: rgba(250, 252, 255, 0.36) !important;
+ padding: 0rpx 30rpx;
+ }
+
+ .content {
+ font-size: 12px;
+ background-color: #ffffff;
+ box-sizing: border-box;
+ border-radius: 10rpx;
+ margin: 0rpx 0rpx 16rpx;
+ padding: 20rpx 8rpx;
+ box-shadow: none;
+ display: flex;
+ align-items: center;
+
+ .content-header {
+ width: 40rpx;
+ height: 90rpx;
+ display: flex;
+ align-items: center;
+
+ .content-header-icon {
+ background-image: url("~@/static/custom/moveWareHouse/header_icon.png");
+ background-size: 100% auto;
+ background-repeat: no-repeat;
+ height: 28rpx;
+ width: 28rpx;
+ }
+
+ .content-header-title {
+ margin-left: 11rpx;
+ font-size: 26rpx;
+ font-weight: bold;
+ color: #626369;
+ }
+ }
+
+ .content-body {
+ flex: 1;
+ background-color: #ffffff;
+ border-radius: 10rpx;
+ padding: 0rpx 23rpx;
+
+ .row-list {
+ height: 60rpx;
+ display: flex;
+ flex-direction: row;
+ padding: 0px;
+ align-items: center;
+ }
+
+ .row-list ._label {
+ display: flex;
+ flex: 0.8;
+ color: #909399;
+ align-items: center;
+
+ ._label-name {
+ margin-left: 11rpx;
+ font-size: small;
+ font-weight: 500;
+ color: #1c1b1b;
+ }
+ }
+
+ .row-list ._content {
+ flex: 1.5;
+ text-align: right;
+ color: #909399;
+ font-size: small;
+ }
+
+ .row-list .s1 {
+ color: #d35651;
+ }
+ }
+ }
+}
+</style>
\ No newline at end of file
diff --git a/pages/sys/home/index.vue b/pages/sys/home/index.vue
index 1f33f17..57cab40 100644
--- a/pages/sys/home/index.vue
+++ b/pages/sys/home/index.vue
@@ -52,6 +52,11 @@
url: '/pages/product/WorkshopOrderCancellationIssued/index',
icon: 'five'
},
+ {
+ name: '鎶曟枡',
+ url: '/pages/product/feeding/index',
+ icon: 'ten'
+ },
]
},
{
--
Gitblit v1.9.3