| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |