qingyiay
2023-06-29 ceeb19ad302df0ae6146895cac263d7bdc38ac31
称重页面问题修改,样式修改
5个文件已修改
732 ■■■■ 已修改文件
pages/customer-page/customer-index/customer-index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue 624 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabbar-page/index-tabbar/index-tabbar.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/customer-index.vue
@@ -64,7 +64,7 @@
                            </view>
                            <view class="forward"
                                @click.stop="validateClick(index)"
                                v-else>
                                v-if='roleType===4'>
                                <view class="button-image">验质</view>
                            </view>
                        </view>
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -212,8 +212,9 @@
                    clean: ""
                },
                completeOutSaleShow: false,
                overTmWaixiao: null
                overTmWaixiao: null,
                // 判读网络状态,
                normalCode: null
            };
        },
        onShow() {
@@ -259,7 +260,6 @@
            init() {
                this.$reqGet('coalDayPage', { id: this.orderPlanId }).then(res => {
                    if (res.code == 0) {
                        // this.dayRZ = res.data;
                        this.dayRZ = res.data.map(v => {
                            let slicedate = v.taskStatusDes.slice(0, 10);
                            if (slicedate == this.currentDate) {
@@ -349,24 +349,31 @@
            },
            // 日志查询
            coalDayPage() {
                this.interval = setInterval(() => {
                    this.$reqGet('coalDayPage', { id: this.orderPlanId }).then(res => {
                        if (res.code == 0) {
                            // this.dayRZ = res.data;
                            this.dayRZ = res.data.map(v => {
                                let slicedate = v.taskStatusDes.slice(0, 10);
                                if (slicedate == this.currentDate) {
                                    return {
                                        ...v,
                                        taskStatusDes: v.taskStatusDes.slice(10)
                                    };
                                } else {
                                    return { ...v }
                                }
                            });
                        }
                    });
                }, 10000);
                if (this.normalCode) {
                    this.interval = setInterval(() => {
                        this.$reqGet('coalDayPage', { id: this.orderPlanId }).then(res => {
                            if (res.code == 0) {
                                this.normalCode = true;
                                this.dayRZ = res.data.map(v => {
                                    let slicedate = v.taskStatusDes.slice(0, 10);
                                    if (slicedate == this.currentDate) {
                                        return {
                                            ...v,
                                            taskStatusDes: v.taskStatusDes.slice(10)
                                        };
                                    } else {
                                        return { ...v }
                                    }
                                });
                            } else {
                                this.normalCode = false;
                            }
                        });
                    }, 10000);
                } else {
                    clearInterval(this.interval)
                    this.$u.toast('服务器错误,请稍后重试')
                }
            },
            // 展示提煤单详情
            showCaolPickUpBill() {
@@ -703,7 +710,7 @@
        .timeLine {
            height: 40%;
            height: 300rpx;
            min-height: 300rpx;
            margin: vww(20);
            position: relative;
pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue
@@ -1,339 +1,337 @@
<!-- 查看皮毛净明细 -->
<template>
  <view class="main">
    <u-empty mode="data"
             icon="http://cdn.uviewui.com/uview/empty/data.png"
             textSize="30"
             iconSize="1000"
             v-if="showWeigh"></u-empty>
    <view class="main-block"
          v-for="(item,i) in showWeigh"
          :key="i">
      <view class="weigh-item">
        <view class="item">
          <view class="concrete"
                style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/skin.png') no-repeat;background-size: cover;">
            皮
          </view>
          <view class="num">{{ item.skin }}</view>
        </view>
        <view class="item">
          <view class="concrete"
                style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/hair.png') no-repeat;background-size: cover;">
            毛
          </view>
          <view class="num">{{ item.hair }}</view>
        </view>
        <view class="item">
          <view class="concrete"
                style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clean.png') no-repeat;background-size: cover;">
            净
          </view>
          <view class="num">{{ item.clean }}</view>
        </view>
      </view>
      <view class="discount">
        <view class="rate">
          <view class="label-text">
            折扣率
          </view>
          <view v-if='roleType!==1'
                class="count">{{ item.discount }}%
          </view>
          <view v-else
                class="count-input">
            <u--input placeholder="请输入折扣率"
                      border="bottom"
                      clearable
                      v-model="item.discount"
                      @input='v=>discountInputHandle(v,i,item.clean)'></u--input>
          </view>
        </view>
        <view class="weigh">
          <view class="label-text">
            折扣后重量
          </view>
          <view class="count">{{ item.discountWeight }}</view>
        </view>
      </view>
      <view class="level">
        <u-tag :text="item.level||'请选择'"
               plain
               @click="popoverShow(i)"
               v-if='item.level||roleType===1'></u-tag>
        <u-tag :text="item.productName||'请选择'"
               plain
               @click="productNamePopoverShow(i)"
               v-if='item.level||roleType===1'></u-tag>
      </view>
      <view v-if='roleType===1'>
        <u-picker :show="show"
                  :columns="columns"
                  @cancel='cancel'
                  @confirm='confirm'></u-picker>
      </view>
      <view class="">
        <u-action-sheet :actions="actionsList"
                        :show="actionShow"
                        cancelText='取消'
                        :closeOnClickOverlay='true'
                        @close='productNameClose'
                        @select="selectClick"></u-action-sheet>
      </view>
    </view>
    <view class="confirm-button"
          v-if='roleType===1'>
      <u-button type="primary"
                shape="circle"
                text="确认"
                @click="confirmInput"
                :loading="loading"
                loading-text="确认"></u-button>
    </view>
  </view>
    <view class="main">
        <u-empty mode="data"
            icon="http://cdn.uviewui.com/uview/empty/data.png"
            textSize="30"
            iconSize="1000"
            v-if="showWeigh.length===0"></u-empty>
        <view class="main-block"
            v-for="(item,i) in showWeigh"
            :key="i">
            <view class="weigh-item">
                <view class="item">
                    <view class="concrete"
                        style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/skin.png') no-repeat;background-size: cover;">
                        皮
                    </view>
                    <view class="num">{{ item.skin }}</view>
                </view>
                <view class="item">
                    <view class="concrete"
                        style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/hair.png') no-repeat;background-size: cover;">
                        毛
                    </view>
                    <view class="num">{{ item.hair }}</view>
                </view>
                <view class="item">
                    <view class="concrete"
                        style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clean.png') no-repeat;background-size: cover;">
                        净
                    </view>
                    <view class="num">{{ item.clean }}</view>
                </view>
            </view>
            <view class="discount">
                <view class="rate">
                    <view class="label-text">
                        折扣率
                    </view>
                    <view v-if='roleType!==1'
                        class="count">{{ item.discount }}%
                    </view>
                    <view v-else
                        class="count-input">
                        <u--input placeholder="请输入折扣率"
                            border="bottom"
                            clearable
                            v-model="item.discount"
                            @input='v=>discountInputHandle(v,i,item.clean)'></u--input>
                    </view>
                </view>
                <view class="weigh">
                    <view class="label-text">
                        折扣后重量
                    </view>
                    <view class="count">{{ item.discountWeight }}</view>
                </view>
            </view>
            <view class="level">
                <u-tag :text="item.level||'请选择'"
                    plain
                    @click="popoverShow(i)"
                    v-if='item.level||roleType===1'></u-tag>
                <u-tag :text="item.productName||'请选择'"
                    plain
                    @click="productNamePopoverShow(i)"
                    v-if='item.level||roleType===1'></u-tag>
            </view>
            <view v-if='roleType===1'>
                <u-picker :show="show"
                    :columns="columns"
                    @cancel='cancel'
                    @confirm='confirm'></u-picker>
            </view>
            <view class="">
                <u-action-sheet :actions="actionsList"
                    :show="actionShow"
                    cancelText='取消'
                    :closeOnClickOverlay='true'
                    @close='productNameClose'
                    @select="selectClick"></u-action-sheet>
            </view>
        </view>
        <view class="confirm-button"
            v-if='roleType===1'>
            <u-button type="primary"
                shape="circle"
                text="确认"
                @click="confirmInput"
                :loading="loading"
                loading-text="确认"></u-button>
        </view>
    </view>
</template>
<script>
import loginVue from '../../../../login/login.vue';
export default {
  data() {
    return {
      orderPlanId: "",
      index: null,
      coalDetailsData: {},
      showWeigh: [],
      discountrate: "",
      loading: false,
      show: false,
      columns: [
        ['轻质', '中质', '重质']
      ],
      level: '请选择',
      selectIndex: null,
      // 产品列表
      actionsList: [],
      actionShow: false,
      actionIndex: null
    };
  },
  computed: {
    roleType() {
      return uni.getStorageSync('roleType')
    }
  },
  onLoad(params) {
    this.orderPlanId = params.orderPlanId ? params.orderPlanId : ''
    this.index = params.index ? params.index : ''
  },
  onShow() {
    this.roleType === 1 ? this.GetOrderPlan() : this.getTakeCoal()
    this.getJcProductList()
  },
  methods: {
    getTakeCoal() {
      uni.showLoading({
        title: '加载中'
      });
      this.$reqGet('getTakeCoal', {takeCoalId: this.orderPlanId}).then(res => {
        if (res.code == 0) {
          this.coalDetailsData = res.data;
          this.showWeigh = this.coalDetailsData.tmTaskCoalItems ? this.coalDetailsData
              .tmTaskCoalItems : [],
              uni.hideLoading()
        } else {
          this.$u.toast('加载失败')
          uni.hideLoading()
        }
      })
    },
    GetOrderPlan() {
      uni.showLoading({title: '加载中...'});
      this.$reqGet('GetOrderPlan').then(res => {
        if (res.data) {
          this.coalDetailsData = res.data;
          this.showWeigh = this.coalDetailsData[this.index].tmTaskCoalItems ? this.coalDetailsData[
              this.index].tmTaskCoalItems : [],
              uni.hideLoading();
        } else {
          this.$u.toast('加载失败')
          uni.hideLoading()
        }
      });
    },
    getJcProductList() {
      this.$reqGet('getJcProductList').then(res => {
        if (res.code === 0) {
          this.actionsList = res.data.map(v => {
            return {
              ...v,
              name: v.productName
            }
          })
        }
      })
    },
    // 输入折扣率后点击确认
    confirmInput() {
      this.loading = true
      this.$reqPost('updateTmTaskCoalItem', this.showWeigh, 'json').then(
          res => {
            if (res.code == 0) {
              this.loading = false
              this.$u.toast('操作成功')
            } else {
              this.loading = false
              this.$u.toast('操作失败')
            }
          })
    },
    // 选择质量
    popoverShow(i) {
      if (this.roleType === 1) {
        this.show = true
        this.selectIndex = i
      }
    },
    // 选择产品
    productNamePopoverShow(i) {
      if (this.roleType === 1) {
        this.actionShow = true
        this.actionIndex = i
      }
    },
    confirm(e) {
      this.show = false
      this.showWeigh[this.selectIndex].level = e.value[0]
    },
    cancel() {
      this.show = false
    },
    productNameClose() {
      this.actionShow = false
    },
    selectClick(val) {
      console.log(this.showWeigh);
      this.showWeigh[this.actionIndex].productName = val.productName
      this.showWeigh[this.actionIndex].productId = val.id
    },
    // 折扣率输入
    discountInputHandle(value, index, clean) {
      this.showWeigh[index].discountWeight = (Number(value) * clean) / 100
    }
  },
}
    export default {
        data() {
            return {
                orderPlanId: "",
                index: null,
                coalDetailsData: {},
                showWeigh: [],
                discountrate: "",
                loading: false,
                show: false,
                columns: [
                    ['轻质', '中质', '重质']
                ],
                level: '请选择',
                selectIndex: null,
                // 产品列表
                actionsList: [],
                actionShow: false,
                actionIndex: null
            };
        },
        computed: {
            roleType() {
                return uni.getStorageSync('roleType')
            }
        },
        onLoad(params) {
            this.orderPlanId = params.orderPlanId ? params.orderPlanId : ''
            this.index = params.index ? params.index : ''
        },
        onShow() {
            this.roleType === 1 ? this.GetOrderPlan() : this.getTakeCoal()
            this.getJcProductList()
        },
        methods: {
            getTakeCoal() {
                uni.showLoading({
                    title: '加载中'
                });
                this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
                    if (res.code == 0) {
                        this.coalDetailsData = res.data;
                        this.showWeigh = this.coalDetailsData.tmTaskCoalItems ? this.coalDetailsData
                            .tmTaskCoalItems : [],
                            uni.hideLoading()
                    } else {
                        this.$u.toast('加载失败')
                        uni.hideLoading()
                    }
                })
            },
            GetOrderPlan() {
                uni.showLoading({ title: '加载中...' });
                this.$reqGet('GetOrderPlan').then(res => {
                    if (res.data) {
                        this.coalDetailsData = res.data;
                        this.showWeigh = this.coalDetailsData[this.index].tmTaskCoalItems ? this.coalDetailsData[
                                this.index].tmTaskCoalItems : [],
                            uni.hideLoading();
                    } else {
                        this.$u.toast('加载失败')
                        uni.hideLoading()
                    }
                });
            },
            getJcProductList() {
                this.$reqGet('getJcProductList').then(res => {
                    if (res.code === 0) {
                        this.actionsList = res.data.map(v => {
                            return {
                                ...v,
                                name: v.productName
                            }
                        })
                    }
                })
            },
            // 输入折扣率后点击确认
            confirmInput() {
                this.loading = true
                this.$reqPost('updateTmTaskCoalItem', this.showWeigh, 'json').then(
                    res => {
                        if (res.code == 0) {
                            this.loading = false
                            this.$u.toast('操作成功')
                        } else {
                            this.loading = false
                            this.$u.toast('操作失败')
                        }
                    })
            },
            // 选择质量
            popoverShow(i) {
                if (this.roleType === 1) {
                    this.show = true
                    this.selectIndex = i
                }
            },
            // 选择产品
            productNamePopoverShow(i) {
                if (this.roleType === 1) {
                    this.actionShow = true
                    this.actionIndex = i
                }
            },
            confirm(e) {
                this.show = false
                this.showWeigh[this.selectIndex].level = e.value[0]
            },
            cancel() {
                this.show = false
            },
            productNameClose() {
                this.actionShow = false
            },
            selectClick(val) {
                console.log(this.showWeigh);
                this.showWeigh[this.actionIndex].productName = val.productName
                this.showWeigh[this.actionIndex].productId = val.id
            },
            // 折扣率输入
            discountInputHandle(value, index, clean) {
                this.showWeigh[index].discountWeight = (Number(value) * clean) / 100
            }
        },
    }
</script>
<style lang="scss"
       scoped>
@mixin flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
    scoped>
    @mixin flex {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
/deep/ .u-picker {
  height: 600 rpx;
}
    /deep/ .u-picker {
        height: 600rpx;
    }
.main {
  width: 100%;
  height: 100vh;
  background-color: #fff;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
    .main {
        width: 100%;
        height: 100vh;
        background-color: #fff;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
  .main-block {
    width: 690 rpx;
    height: 360 rpx;
    margin: vww(20) auto;
    padding: vww(5);
    background: #ffffff;
    box-shadow: 4 rpx 6 rpx 51 rpx 0 rpx rgba(73, 120, 240, 0.11);
    border-radius: 20 rpx;
    overflow: hidden;
    position: relative;
        .main-block {
            width: 690rpx;
            height: 360rpx;
            margin: vww(20) auto;
            padding: vww(5);
            background: #ffffff;
            box-shadow: 4rpx 6rpx 51rpx 0rpx rgba(73, 120, 240, 0.11);
            border-radius: 20rpx;
            overflow: hidden;
            position: relative;
    .weigh-item {
      width: 100%;
      height: vww(36);
      margin: vww(10);
      @include flex;
      justify-content: space-around;
            .weigh-item {
                width: 100%;
                height: vww(36);
                margin: vww(10);
                @include flex;
                justify-content: space-around;
      .item {
        min-width: vww(50);
        height: vww(45);
        font-size: 21 rpx;
        font-weight: 400;
        color: #ffffff;
        text-align: center;
        line-height: vww(30);
        @include flex;
                .item {
                    min-width: vww(50);
                    height: vww(45);
                    font-size: 21rpx;
                    font-weight: 400;
                    color: #ffffff;
                    text-align: center;
                    line-height: vww(30);
                    @include flex;
        .concrete {
          width: vww(36);
          height: vww(36);
        }
                    .concrete {
                        width: vww(36);
                        height: vww(36);
                    }
        .num {
          font-size: 40 rpx;
          font-weight: 300;
          color: #303030;
        }
      }
    }
                    .num {
                        font-size: 40rpx;
                        font-weight: 300;
                        color: #303030;
                    }
                }
            }
    .discount {
      @include flex;
      justify-content: space-around;
      width: 100%;
      line-height: vww(36);
            .discount {
                @include flex;
                justify-content: space-around;
                width: 100%;
                line-height: vww(36);
      .rate,
      .weigh {
        width: 50%;
        display: flex;
        align-items: center;
        justify-content: space-around;
        flex-direction: column;
                .rate,
                .weigh {
                    width: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: space-around;
                    flex-direction: column;
        .count-input {
          width: 70%;
          border-bottom: 1px solid rgb(218, 219, 222);
                    .count-input {
                        width: 70%;
                        border-bottom: 1px solid rgb(218, 219, 222);
        }
      }
                    }
                }
      .count {
        font-size: 40 rpx;
        color: rgb(242, 70, 79);
      }
                .count {
                    font-size: 40rpx;
                    color: rgb(242, 70, 79);
                }
    }
            }
    .level {
      width: 40%;
      margin-top: 30 rpx;
      margin-left: 80 rpx;
      display: flex;
      justify-content: space-between;
    }
            .level {
                width: 40%;
                margin-top: 30 rpx;
                margin-left: 80 rpx;
                display: flex;
                justify-content: space-between;
            }
  }
        }
  .confirm-button {
    // position: relative;
    // bottom: 10rpx;
    // right: 10rpx;
    width: 100%;
    @include flex;
    justify-content: center;
        .confirm-button {
            // position: relative;
            // bottom: 10rpx;
            // right: 10rpx;
            width: 100%;
            @include flex;
            justify-content: center;
    /deep/ .u-button {
      width: 180 rpx !important;
    }
  }
}
            /deep/ .u-button {
                width: 180 rpx !important;
            }
        }
    }
</style>
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -185,11 +185,11 @@
                :disabled="addAndSubtractCoalDisabled"
                @click="addAndSubtractCoal"
                class="jiajian"
                v-if="outsourcing"></u-button>
                v-if="outBuy"></u-button>
            <u-button type="primary"
                text="继续卸货"
                @click="UnloadingAgainHandle"
                v-if='outBuy'></u-button>
                v-if='canUnload'></u-button>
        </view>
        <!-- <view class="four" v-if="weighList.orderType !== '外购'">如您需要调整装载货品吨数,请点击返回加减吨</view> -->
        <!-- 放空弹窗 -->
@@ -280,8 +280,8 @@
                isfocus2: false,
                // 外购类型
                outBuy: true,
                // 外销类型
                outsourcing: true
                // 继续卸货按钮
                canUnload: false
            };
        },
        watch: {
@@ -373,19 +373,9 @@
                        this.weighData.filedId = res.data.filedId;
                        this.weighData.coalContactHair = res.data.hairTwo ? res.data.hairTwo : 0;
                        this.weighData.coalContactSkin = res.data.skinTwo ? res.data.skinTwo : 0;
                        this.outBuy = this.weighList.orderType == '外购' && this.weighList.hair > 0;
                        this.outsourcing = this.weighList.orderType == '外销' && this.weighList.hair > 0;
                        // if (this.weighList.orderType == '外购') {
                        //     if (this.weighList.hair > 0) {
                        //         this.outBuy = true
                        //         this.outsourcing = false;
                        //     }
                        // } else if (this.weighList.orderType == '外销') {
                        //     if (this.weighList.hair > 0) {
                        //         this.outsourcing = true;
                        //         this.outBuy = false
                        //     }
                        // }
                        this.outBuy = (this.weighList.orderType.indexOf('销') !== -1) && this.showWeigh.hair > 0;
                        // 继续卸货第二次称重就会有,无订单类型限制
                        this.canUnload = this.showWeigh.hair > 0 || this.showWeigh.skin > 0;
                    }
                });
            },
@@ -698,7 +688,7 @@
            width: calc(100% - 60rpx);
            box-sizing: border-box;
            height: 630rpx;
            margin: 0 vww(15) vww(45) vww(15);
            margin: 0 vww(15) vww(25) vww(15);
            background: #ffffff;
            box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
            border-radius: 20rpx;
@@ -740,20 +730,27 @@
        }
        .three {
            margin: 0 auto vww(20);
            flex: 0.7;
            display: flex;
            margin: 0 auto vww(5);
            width: 96%;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            justify-content: center;
            gap: vww(10);
            color: #939393;
            .u-button {
                &:nth-of-type(2) {
                    margin-left: vww(10);
                }
                &:nth-of-type(3) {
                    margin-left: vww(10);
                }
                width: vww(90);
            }
            // .u-button {
            //     &:nth-of-type(2) {
            //         margin-left: vww(10);
            //     }
            //     &:nth-of-type(3) {
            //         margin-left: vww(10);
            //     }
            // }
        }
        .four {
pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -13,7 +13,7 @@
                </view>
            </view>
        </view>
        <customer-index v-if="roleType == 1"
        <customer-index v-if="roleType == 1||roleType == 4"
            ref="customerIndexRef"
            :orderPlanDataStore="orderPlanDataStore"></customer-index>
        <freight-forwarder-index v-if="roleType == 2"