Mr.Shi
2023-09-06 0256141ad70be0d254fd9958e8d28867db1d7531
minipro_standard/pages_adjust/pages/newOutbound/newOutbound.vue
@@ -20,13 +20,8 @@
         <view class="rework_qd_title">
            <view class="rework_qd_title_left">
               <view class="x"></view>
               <!-- ${list.length} -->
               <text>{{`出库物料清单`}}</text>
            </view>
            <!-- <view class="rework_qd_title_right" @click="openMs">
               <image src="@/static/gongdan_ic_shoudong@2x.png" mode="widthFix" />
               <text>增加出库</text>
            </view> -->
         </view>
         <van-swipe-cell v-for="(item, index) in list" :key="index">
            <view class="rework_qd_item">
@@ -60,7 +55,12 @@
      <!-- 选择仓库 -->
      <Warehouse :show="warehouseShow" @close="close" @value="getValue" />
      <!-- 选择物料 -->
      <SelectMultipleMaterial ref="SelectMultipleMaterial" />
      <SelectMultipleMaterial
      ref="SelectMultipleMaterial"
      :selected="list.map(item => item.id) || []"
      :warehouseId="form.warehouseId.toString()"
      :warehouseQualityType="form.warehouseQualityType"
      @value="getValue1" />
      <!-- 单据类型 -->
      <u-picker :show="typeShow" :columns="columns" @cancel="typeShow = false" @confirm="onConfirm1" keyName="name"></u-picker>
   </view>
@@ -68,7 +68,8 @@
<script>
   import Warehouse from '../../components/Warehouse.vue'
   import SelectMultipleMaterial from '@/components/SelectMultipleMaterial.vue'
   import SelectMultipleMaterial from '../../components/multipleMaterial.vue'
   import { createForStandard } from '@/util/api/WorkOrderAPI'
   export default {
      components: { Warehouse, SelectMultipleMaterial },
      data() {
@@ -76,6 +77,7 @@
            form: {
               warehouseName: '',
               warehouseId: '',
               warehouseQualityType: '',
               type: '',
               typeName: ''
            },
@@ -92,6 +94,13 @@
         };
      },
      methods: {
         // 选择物料
         getValue1(item) {
            item.forEach((row) => {
               row.total = JSON.parse(JSON.stringify(row.num))
            })
            this.list = [...item, ...this.list]
         },
         changeNum(obj) {
            if (obj.num < 0) {
               obj.num = ''
@@ -105,7 +114,8 @@
         // 选择仓库回调
         getValue(item) {
            this.form.warehouseName = item.name
            this.form.warehouseId = item.id || 1
            this.form.warehouseId = item.id
            this.form.warehouseQualityType = item.tmodel.label
            this.list = []
            this.warehouseShow = false
         },
@@ -162,7 +172,7 @@
               woutBoundDetailBeans: this.list
            }).then(res => {
               if (res.code === 200) {
                  uni.showToast({ title: '出库成功', icon: 'none', duration: 2000 });
                  uni.showToast({ title: '出库成功', icon: 'success', duration: 2000 });
                  setTimeout(() => {
                     uni.navigateBack({ delta: 1 });
                  }, 2000)