xuxueyang
2024-09-24 056997b07e61fc99d5c311d0c5489b9de48fd9bc
sub_pages/partner/delivery/delivery-supplier-detail-list.vue
@@ -7,8 +7,9 @@
               stationId: '',
               stationName: '',
               statusStr: '',
               status: '',
               status: 'ARRIVED,PENDING',
               warehouseLocationCode: '',
               date: null
            },
            show_select_station: false,
            show_select_status: false,
@@ -45,12 +46,24 @@
               }
            ],
            target_levels: [],
            tabs: [{
                  name: '待质检',
                  status: 'ARRIVED,PENDING',
               },
               {
                  name: '已质检',
                  status: 'CHECKED',
               },
            ],
            flg: '0',
            ids: [],
         }
      },
      onLoad(options) {
         this.query.supplierId = options.supplierId || ''
         this.query.stationId = options.stationId || ''
         if (options.warehouseLocationCode) {
            console.log('options', options)
            this.query.warehouseLocationCode = options.warehouseLocationCode || ''
         }
@@ -59,22 +72,25 @@
         if (options.range == 'today') {
            this.listApi += '/today'
         }
         if (options.date) {
            this.query.date = options.date
         }
         this.getList()
         this.$http.request('get', '/api/code/value', {
            params: {
               type: 'DELIVERY_ORDER_STATUS'
            }
         }).then(res => {
            var data = res.data || []
            this.status_columns = [data || []]
            this.status_columns[0].unshift({
               label: '全部',
               value: ''
            })
            console.log('status_columns', this.status_columns)
         })
         // this.$http.request('get', '/api/code/value', {
         //    params: {
         //       type: 'DELIVERY_ORDER_STATUS'
         //    }
         // }).then(res => {
         //    var data = res.data || []
         //    this.status_columns = [data || []]
         //    this.status_columns[0].unshift({
         //       label: '全部',
         //       value: ''
         //    })
         //    console.log('status_columns', this.status_columns)
         // })
         this.$http.request('get', '/api/code/value', {
            params: {
               type: 'FLOWER_LEVEL'
@@ -94,7 +110,13 @@
         uni.stopPullDownRefresh()
      },
      methods: {
         changeItem(item) {
            if (this.ids.indexOf(item.orderNo) >= 0) {
               this.ids.splice(this.ids.indexOf(item.orderNo), 1)
            } else {
               this.ids.push(item.orderNo)
            }
         },
         callTel(tel) {
            if (tel) {
               uni.makePhoneCall({
@@ -124,7 +146,9 @@
         },
         printDeliveryOrder(item) {
            // this.$message.showToast('敬请期待')
            this.$storage.setItem('cache_delivery_order_print', JSON.stringify(item))
            var arr = []
            arr.push(item)
            this.$storage.setItem('cache_delivery_order_print', JSON.stringify(arr))
            uni.navigateTo({
               url: '/sub_pages/supplier/print/print-list'
            })
@@ -298,7 +322,33 @@
            }
         },
         changeTab(flg) {
            this.flg = '' + flg
            this.query.status = this.tabs[flg].status
            this.ids = []
            this.refreshList()
         },
         selectAllOrder() {
            if (this.ids.length > 0) {
               // this.$message.showToast('敬请期待')
               var arr = []
               for (var item of this.list) {
                  if (this.ids.indexOf(item.orderNo) >= 0) {
                     for (var each of item.items) {
                        arr.push(each)
                     }
                  }
               }
               if (arr.length > 0) {
                  // console.log('cache_delivery_order_print', arr)
                  this.$storage.setItem('cache_delivery_order_print', JSON.stringify(arr))
                  uni.navigateTo({
                     url: '/sub_pages/supplier/print/print-list'
                  })
               }
            }
         }
      }
   }
</script>
@@ -306,37 +356,52 @@
   <!-- 列表页面 -->
   <view class="page-delivery">
      <view class="p15" style="min-height: calc(100vh - 260rpx);">
         <view class="search-container m-t-12 flex" v-if="!query.supplierId">
            <view class="flex1 input">
         <top-tabs :tabs="tabs" :flg="flg" @change="changeTab" type="coupon">
         </top-tabs>
         <view class="search-container m-t-15 flex" v-if="!query.supplierId">
            <view class="flex1 input m-r-5">
               <u-input placeholder="请输入供应商名称" v-model="query.supplierName">
                  <template slot="suffix">
                     <uni-icons color="#20613D" type="search" size="24" @tap="buttonSearchFlow"></uni-icons>
                  </template>
               </u-input>
            </view>
         </view>
         <view class="search-container m-t-12 flex">
            <view class="flex1 input">
            <view class="flex1 input m-l-5">
               <u-input placeholder="请输入货位号" v-model="query.warehouseLocationCode">
                  <template slot="suffix">
                     <uni-icons color="#20613D" type="search" size="24" @tap="buttonSearchFlow"></uni-icons>
                  </template>
               </u-input>
            </view>
            <view class="component-filter-container p10 bg-white m-l-10">
               <view class="flex1" @click="show_select_status=true">
         </view>
         <view class="search-container m-t-12 flex" v-if="list&&list.length>0">
            <view class="component-filter-container p10  m-l-10 flex flex1" style="text-align: right;">
               <!--    <view class="flex1" @click="show_select_status=true">
                  配送单状态:{{ query.statusStr || '全部' }}
                  <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
               </view> -->
               <view class="flex1 m-l-a m-r-10" @click="selectAllOrder" style="text-align: right;">
                  点击打印全部(已选{{ids.length}}个)
                  <!-- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> -->
               </view>
            </view>
         </view>
         <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
         <!--          <view v-if="list&&list.length>0">
            <view class="m-t-12">
               <radio :checked="checkall" @click="selectAll"></radio>
               全选
            </view>
         </view> -->
         <view v-for="(item,index) in list" :key="index" class="m-b-24">
            <view class="delivery-item bg-white br-4 p10">
               <view class="title flex">
                  <radio class="m-r-10" :checked="ids.indexOf(item.orderNo)>=0" @click="changeItem(item)">
                  </radio>
                  <view>供应商:{{ item.supplierName }}</view>
                  <view class="w-fit m-l-a m-r-0 text-right" v-if="item.supplierTel"
                     @click="callTel(item.supplierTel)">{{ item.supplierTel }}</view>
@@ -376,6 +441,12 @@
               <view class="line-gray"></view>
               <view class="m-t-12 flex" v-if="item.arriveRemarks">
                  <view>备注:</view>
                  <view class="text-left m-l-10 m-r-0 flex1">
                     {{item.arriveRemarks}}
                  </view>
               </view>
               <view class="m-t-12 flex" v-if="item.arriveImageList&&item.arriveImageList.length>0">
                  <view class="m-t-12 m-r-10 " v-for="(timg,vv) of item.arriveImageList" :key="vv">
                     <image class="arrive-img" :src="timg" @click.stop="previewImg(timg)">
@@ -502,7 +573,7 @@
               </view>
               <view class="form-item" v-if="form.status==='reduce'">
                  <view class="form-item-label require">
                     扣款金额
                     每扎扣款
                  </view>
                  <view class="form-item-value">
                     <input v-model="form.deductAmount" placeholder="请输入扣款金额" type="digit"