小小儁爺
2026-01-05 dbae85a492c7cee07f1115757615df910583ad8a
pages/zlgl/wgjy.vue
@@ -40,28 +40,28 @@
      <!-- 折叠面板 -->
      <!-- <u-collapse @change="change" @close="close" @open="open"> -->
      <!-- @change="collapseChange" -->
      <u-collapse style="max-height: 590px;overflow: auto;">
      <u-collapse style="max-height: 62vh;overflow: auto;">
         <!-- :value='parseFloat(item.ordergoodqty)+"/"+parseFloat(item.orderqty)' -->
         <scroll-view scroll-y :style="{height: 590 + 'px'}" @scrolltolower="loadMore">
            <u-collapse-item style="position: relative;" :title="item.ordercode" :name='item.ordercode'
               v-if='item.children.length!==0' :value='parseFloat(item.ordergoodqty)+"/"+parseFloat(item.orderqty)'
               :label="item.children.length===0?'未派发':''" :disabled='item.children.length===0'
               v-for="item in collapseArr" :key="item.ordercode">
         <!-- <scroll-view scroll-y :style="{height: 590 + 'px'}" @scrolltolower="loadMore"> -->
         <u-collapse-item style="position: relative;" :title="item.ordercode" :name='item.ordercode'
            v-if='item.children.length!==0' :value='parseFloat(item.ordergoodqty)+"/"+parseFloat(item.orderqty)'
            :label="item.children.length===0?'未派发':''" :disabled='item.children.length===0'
            v-for="item in collapseArr" :key="item.ordercode">
               <view style="position: absolute;left: 30rpx;top:34px;font-size: 24rpx;color: #999;">
                  {{item.partname}} {{item.partspec}}
               </view>
            <view style="position: absolute;left: 30rpx;top:34px;font-size: 24rpx;color: #999;">
               {{item.partname}} {{item.partspec}}
            </view>
               <!-- <view style="position: absolute;width: 26%;left: 44%;top:16px;"> -->
               <view style="position: absolute;width: 120px;left: 44%;top:16px;color:#0659ff"
                  @click="progressClick(item.ordercode)">
                  <!-- {{item.partname}}{{item.partspec}} -->
                  <u-line-progress :percentage="parseFloat((item.ordergoodqty*100/item.orderqty).toFixed(2))"
                     inactiveColor="#d1d6f5" height="10" activeColor="#0659ff"></u-line-progress>
               </view>
            <!-- <view style="position: absolute;width: 26%;left: 44%;top:16px;"> -->
            <view style="position: absolute;width: 120px;left: 44%;top:16px;color:#0659ff"
               @click="progressClick(item.ordercode)">
               <!-- {{item.partname}}{{item.partspec}} -->
               <u-line-progress :percentage="parseFloat((item.ordergoodqty*100/item.orderqty).toFixed(2))"
                  inactiveColor="#d1d6f5" height="10" activeColor="#0659ff"></u-line-progress>
            </view>
               <!--          <view style="position: absolute;width: 100px;right: 33px;  top:13px; ">
            <!--          <view style="position: absolute;width: 100px;right: 33px;  top:13px; ">
               <view class="" style="display: flex;justify-content: flex-end;">
                  <view style="color: #0659ff;">
                     {{parseFloat(item.ordergoodqty)}}
@@ -74,57 +74,61 @@
 -->
               <view v-if="radiovalue==='生产工单'" style="margin:0 0  5px">
                  <view class="flex_column">
                     <view style="display:flex">
                        <view class="titleFont" style="font-size: 14px;">产品编码:</view>
                        <view class="contentFont" style="font-size: 14px;">{{item.partcode}}</view>
            <view v-if="radiovalue==='生产工单'" style="margin:0 0  5px">
               <view class="flex_column">
                  <view style="display:flex">
                     <view class="titleFont" style="font-size: 14px;">产品编码:</view>
                     <view class="contentFont" style="font-size: 14px;">{{item.partcode}}</view>
                  </view>
                  <view style="display:flex">
                     <view class="titleFont" style="font-size: 14px;">产品名称:</view>
                     <view class="contentFont" style="font-size: 14px;">{{item.partname}}</view>
                  </view>
                  <view style="display:flex">
                     <view class="titleFont" style="font-size: 14px;">产品规格:</view>
                     <view class="contentFont" style="font-size: 14px;">{{item.partspec?item.partspec:'/'}}
                     </view>
                     <view style="display:flex">
                        <view class="titleFont" style="font-size: 14px;">产品名称:</view>
                        <view class="contentFont" style="font-size: 14px;">{{item.partname}}</view>
                     </view>
                     <view style="display:flex">
                        <view class="titleFont" style="font-size: 14px;">产品规格:</view>
                        <view class="contentFont" style="font-size: 14px;">{{item.partspec?item.partspec:'/'}}
                  </view>
               </view>
            </view>
            <!-- {{item.children}} -->
            <!-- <u--text class="u-collapse-content"> -->
            <u-steps :current="-1" inactiveColor='#0659FF' direction="column">
               <view v-for="(it,ind) in item.children" :key="item.ordercode+it.name+ind"
                  @click="gotoPage(item.ordercode,it.code)" style="display: flex;align-items: center;">
                  <!-- <u-steps-item :title="it.code+'/'+it.name+it.spec"></u-steps-item> -->
                  <u-steps-item :title="it.code+'/'+it.name"></u-steps-item>
                  <view class="" style="width: 100px;">
                     <u-line-progress :percentage="parseFloat((it.goodqty*100/it.planqty).toFixed(2))"
                        inactiveColor="#d1d6f5" height="10" activeColor="#0659ff"></u-line-progress>
                  </view>
                  <view style="width: 30%;text-align: right;">
                     <view class="" style="display: flex;justify-content: flex-end;">
                        <view style="color: #0659ff;">
                           {{parseFloat(it.goodqty)}}
                        </view>
                        <view>
                           /{{ parseFloat(it.planqty)}}
                        </view>
                     </view>
                  </view>
               </view>
               <!-- {{item.children}} -->
               <!-- <u--text class="u-collapse-content"> -->
               <u-steps :current="-1" inactiveColor='#0659FF' direction="column">
                  <view v-for="(it,ind) in item.children" :key="item.ordercode+it.name+ind"
                     @click="gotoPage(item.ordercode,it.code)" style="display: flex;align-items: center;">
                     <!-- <u-steps-item :title="it.code+'/'+it.name+it.spec"></u-steps-item> -->
                     <u-steps-item :title="it.code+'/'+it.name"></u-steps-item>
                     <view class="" style="width: 100px;">
                        <u-line-progress :percentage="parseFloat((it.goodqty*100/it.planqty).toFixed(2))"
                           inactiveColor="#d1d6f5" height="10" activeColor="#0659ff"></u-line-progress>
                     </view>
                     <view style="width: 30%;text-align: right;">
                        <view class="" style="display: flex;justify-content: flex-end;">
                           <view style="color: #0659ff;">
                              {{parseFloat(it.goodqty)}}
                           </view>
                           <view>
                              /{{ parseFloat(it.planqty)}}
                           </view>
                        </view>
                     </view>
                  </view>
               </u-steps>
               <!-- </u--text> -->
            </u-steps>
            <!-- </u--text> -->
            </u-collapse-item>
         </scroll-view>
         </u-collapse-item>
         <!--    </scroll-view> -->
      </u-collapse>
      <view class="uni-pagination-box">
         <uni-pagination show-icon :page-size="pageSize" :current="currentpage" :total="total"
            @change="pageChange" />
      </view>
      <!-- 弹出层 -->
      <!-- closeIconPos='top-left' closeOnClickOverlay  closeable='true' -->
@@ -295,7 +299,10 @@
               // },
            ], //已选中的产品标签
            order: '', //单号
            placeholder2: '生产订单'
            placeholder2: '生产订单',
            total: 10,
            currentpage: 1, //第几页
            pageSize: 10, //每页显示多少条
         }
      },
@@ -304,7 +311,7 @@
         let that = this
         uni.startPullDownRefresh({
            success() {
               that.getProductOrderSearch()
               that.getProductOrderSearch(that.currentpage)
               uni.showToast({
                  title: "下拉刷新",
                  icon: 'none'
@@ -321,11 +328,16 @@
      mounted() {
         this.init()
         this.getProductOrderSearch()
         this.getProductOrderSearch(1)
      },
      methods: {
         init() {
            uni.stopPullDownRefresh();
         },
         // 页数改变时  分页触发
         pageChange(e) {
            this.currentpage = e.current
            this.getProductOrderSearch(e.current)
         },
         gotoPage(p1, p2) {
            let orderstep = null
@@ -354,7 +366,7 @@
         },
         // 接口获取
         async getProductOrderSearch() {
         async getProductOrderSearch(current) {
            let ordertype = '' // SO:销售订单  MO:生产订单  PO:生产工单
            switch (this.radiovalue) {
               case '生产工单':
@@ -383,15 +395,16 @@
               ordercode: this.order,
               Ratetime: '',
               // Ratetime: this.calendarRange,
               page: current,
               rows: this.pageSize,
               prop: 'lm_date',
               sortorder: 'desc'
            }
            const {
               data: res
            } = await ProductOrderSearch(data)
            this.collapseArr = res
            this.collapseArrAll = res
            this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
            const res = await ProductOrderSearch(data)
            this.total = res.count
            this.collapseArr = res.data
            this.collapseArrAll = res.data
            this.alertTitle = this.alertTitle.split('/')[0] + this.total + this.alertTitle.split('/')[
               1]
         },
@@ -405,22 +418,20 @@
               return p.ordercode.indexOf(val) !== -1
            })
            switch (this.radiovalue) {
               case '生产工单':
                  this.alertTitle = '工单数量(共/个)'
                  this.alertTitle = '工单数量(共' + this.total + '个)'
                  break
               case '生产订单':
                  this.alertTitle = '工单数量(共/个)'
                  // this.alertTitle = '生产订单数量(共/个)'
                  this.alertTitle = '工单数量(共' + this.total + '个)'
                  break
               case '销售订单':
                  this.alertTitle = '工单数量(共/个)'
                  // this.alertTitle = '销售订单数量(共/个)'
                  this.alertTitle = '工单数量(共' + this.total + '个)'
                  break
            }
            this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
               1]
            // this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
            //    1]
         },
@@ -491,7 +502,7 @@
         // 弹出层收起
         popupClose() {
            this.getProductOrderSearch()
            this.getProductOrderSearch(1)
            this.popupShow = false
         },
@@ -669,4 +680,15 @@
   ::v-deep .u-cell__body {
      padding-bottom: 40rpx;
   }
   .uni-pagination-box {
      height: 4vh;
      margin: 1vh 0;
      display: flex;
      align-items: center;
      justify-content: center;
      // background-color: #fff;
   }
</style>