Mr.Shi
2023-09-05 3878c57a2bd710295931303ea85439a596838dfd
minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue
@@ -3,7 +3,6 @@
      <view class="order-message">
         <view class="content_list_item_top">
            <view class="content_list_item_top_left">
               <!--<text>入库单号:</text>-->
               <text>{{ data.code }}</text>
            </view>
            <view class="content_list_item_top_right">
@@ -16,7 +15,7 @@
            <view class="content_list_item_content_item">
               <view class="content_list_item_content_item_label">单据类型:</view>
               <view class="content_list_item_content_item_nr" v-if="data.billType">
                  {{ orderTyepToStr(data.billType) }}
                  {{ seeText(data.billType) }}
               </view>
            </view>
            <view class="content_list_item_content_item">
@@ -79,7 +78,8 @@
               </view>
               <view class="content_list_item_content_item">
                  <text class="content_list_item_content_item_label">入库货位:</text>
                  <text class="content_list_item_content_item_nr">{{ item.locationName ? item.locationName : '-' }}</text>
                  <text
                     class="content_list_item_content_item_nr">{{ item.locationName ? item.locationName : '-' }}</text>
               </view>
            </view>
         </view>
@@ -96,9 +96,15 @@
   import {
      orderTyepToStr
   } from '@/util/constData.js'
   import {
      getBoundDetail,
      cancelBound
   } from '@/util/api/materialStorage'
   export default {
      data() {
         return {
            id: null,
            types: [{
                  name: '全部',
                  id: '',
@@ -130,13 +136,46 @@
                  isActive: false
               },
            ],
            data: {},
            data: {
               code: "",
               createName: "",
               planDate: "",
               dealDate: "",
               status: 0,
               originType: 0,
               originCode: "",
               updateName: "",
               updateMobile: "",
               updateTime: "",
               warehouseName: "",
               warehouseCode: "",
               outPlandate: "",
               inPlandate: "",
               woutboundDetailsWait: [],
               woutboundDetailsOut: []
            },
            materailArray: []
         };
      },
      onLoad(option) {
         this.id = option.id
         getBoundDetail({
            id: option.id
         })
         .then(res => {
            this.data = res.data
            if (this.data.status === 1) {
               this.materailArray.push(...this.data.woutboundDetailsOut)
            } else {
               this.materailArray.push(...this.data.woutboundDetailsWait)
            }
         })
      },
      methods: {
         seeText(id) {
            return orderTyepToStr(id)
         },
         tyepToStr(type) {
            //  <!-- 1、车间领料;2、车间备料;3、其他;4、完工入库 -->
            for (const item of this.types) {
               if (parseInt(item.id) === this.type) {
                  return item.name
@@ -146,6 +185,28 @@
         },
         submit() {
         },
         cancel() {
            cancelBound({
               id: this.id
            })
            .then(res => {
               uni.showToast({
                  title: '取消成功',
                  icon: 'success',
                  duration: 2000
               });
               uni.navigateBack({
                  delta: 1
               });
            })
            .catch(err => {
               uni.showToast({
                  title: err.message,
                  icon: 'error',
                  duration: 2000
               });
            })
         }
      }
   }