PDA报工页面增加投料功能,扫描二维码取消获取产出记录列表,放开取消报工页面,编写取消报工逻辑,联调取消报工接口
已修改6个文件
2389 ■■■■ 文件已修改
common/http.api.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/product/cancelReport/index.vue 845 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/product/report/components/saveForm.vue 381 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/product/report/index.vue 1112 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/sys/home/index.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/http.api.js
@@ -507,6 +507,7 @@
        cancelReporting: {
            // 取消报工确认
            cancelDTAOfWorkApplication: (params = {}) => vm.$u.get('/mes/product/cancelDTAOfWorkApplication', params),
            selInputPartInfoPDA: (params = {}) => vm.$u.get('/mes/stock/selInputPartInfoPDA',params),
        },
        // 车间订单下发
        WorkshopOrderIssued: {
pages.json
@@ -792,16 +792,16 @@
        "navigationBarBackgroundColor": "#3281FF"
      }
    },
    // // 取消报工
    // {
    //   "path": "pages/product/cancelReport/index",
    //   "style": {
    //     "navigationStyle": "custom",
    //     "navigationBarTitleText": "",
    //     // "navigationBarBackgroundColor": "#3281FF"
    //     "enablePullDownRefresh": false
    //   }
    // },
    // 取消报工
    {
      "path": "pages/product/cancelReport/index",
      "style": {
        "navigationStyle": "custom",
        "navigationBarTitleText": "",
        // "navigationBarBackgroundColor": "#3281FF"
        "enablePullDownRefresh": false
      }
    },
    // 接收(铜杆)
    {
      "path": "pages/product/receive/index",
pages/product/cancelReport/index.vue
@@ -1,311 +1,336 @@
<template>
  <!-- 取消报工 -->
  <view class="page">
    <view class="packing-registration-bg" />
    <u-navbar
      title="取消报工"
      :background="background"
      :border-bottom="false"
      :title-bold="true"
      title-color="#000"
      back-icon-color="#000"
    />
    <u-form
      :model="form"
      ref="uForm"
      :label-width="280"
      :rules="rules"
      :error-type="['toast']"
      class="uForm"
    >
      <u-form-item label="订单号" :border-bottom="false" prop="moNo">
        <u-input
          v-model="form.moNo"
          type="select"
          placeholder="点击选择"
          @click="openList"
        />
      </u-form-item>
      <u-form-item
        label="取消报工记录:"
        :border-bottom="false"
        prop="value12"
      ></u-form-item>
    </u-form>
    <view class="wrap">
      <scroll-view class="finishProductIn-locno-scroll-list" scroll-y="true">
        <u-cell-group
          class="finishProductIn-locno-scroll-list-group"
          :border="false"
        >
          <view
            class="content"
            v-for="(item, index) in list"
            :key="item.moNo"
            :index="index"
          >
            <view class="content-header">
              <view class="content-header-title">{{ index + 1 }}</view>
            </view>
            <view class="content-body">
              <view class="row-list">
                <view class="_label">
                  <view class="_label-name">批号:</view>
                </view>
                <view class="_content">
                  {{ item.moNo }}
                </view>
              </view>
              <view class="row-list">
                <view class="_label">
                  <view class="_label-name">零件号:</view>
                </view>
                <view class="_content">
                  {{ item.partNo }}
                </view>
              </view>
              <view class="row-list">
                <view class="_label">
                  <view class="_label-name">零件描述:</view>
                </view>
                <view class="_content">
                  {{ item.partName }}
                </view>
              </view>
              <view class="row-list">
                <view class="_label">
                  <view class="_label-name">取消接收数量:</view>
                </view>
                <view class="_content">
                  {{ item.qtyRequired }}
                </view>
              </view>
            </view>
          </view>
        </u-cell-group>
      </scroll-view>
    </view>
    <u-modal
      width="720rpx"
      v-model="showModal"
      title=""
      :show-cancel-button="true"
      :show-confirm-button="true"
      @confirm="confirm"
      @cancel="cancel"
    >
      <view class="popup-content">
        <view class="packing-registration-param">
          <view class="packing-registration-param-view">
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">批号</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one">{{ detailedList.moNo }}</text>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">零件号</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one">{{ detailedList.partNo }}</text>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">零件描述</text>
              </view>
              <view class="packing-registration-param-item-right">
                <span class="item-one">{{
    <!-- 取消报工 -->
    <view class="page">
        <view class="packing-registration-bg" />
        <u-navbar title="取消报工" :background="background" :border-bottom="false" :title-bold="true" title-color="#000"
            back-icon-color="#000" />
        <u-form :model="form" ref="uForm" :label-width="280" :rules="rules" :error-type="['toast']" class="uForm">
            <u-form-item label="订单号" :border-bottom="false" prop="moNo">
                <u-input v-model="form.moNo" type="select" placeholder="点击选择" @click="openList" />
            </u-form-item>
            <u-form-item label="工单" :border-bottom="false" prop="optaskNo">
                <u-input v-model="form.optaskNo" type="select" placeholder="点击选择" @click="seachWork" />
            </u-form-item>
            <u-form-item label="取消报工记录:" :border-bottom="false" prop="value12"></u-form-item>
        </u-form>
        <view class="wrap">
            <scroll-view class="finishProductIn-locno-scroll-list" scroll-y="true">
                <u-cell-group class="finishProductIn-locno-scroll-list-group" :border="false">
                    <view class="content" v-for="(item, index) in list" :key="item.moNo" :index="index"
                        @click="cancelReport(item,index)">
                        <view class="content-header">
                            <view class="content-header-title">{{ index + 1 }}</view>
                        </view>
                        <view class="content-body">
                            <view class="row-list">
                                <view class="_label">
                                    <view class="_label-name">批号:</view>
                                </view>
                                <view class="_content">
                                    {{ item.outBatchNo }}
                                </view>
                            </view>
                            <view class="row-list">
                                <view class="_label">
                                    <view class="_label-name">零件号:</view>
                                </view>
                                <view class="_content">
                                    {{ item.partNo }}
                                </view>
                            </view>
                            <view class="row-list">
                                <view class="_label">
                                    <view class="_label-name">零件描述:</view>
                                </view>
                                <view class="_content">
                                    {{ item.partName }}
                                </view>
                            </view>
                            <view class="row-list">
                                <view class="_label">
                                    <view class="_label-name">取消接收数量:</view>
                                </view>
                                <view class="_content">
                                    {{ item.qtyRequired }}
                                </view>
                            </view>
                        </view>
                    </view>
                </u-cell-group>
            </scroll-view>
        </view>
        <u-modal width="720rpx" v-model="showModal" title="" :show-cancel-button="true" :show-confirm-button="true"
            @confirm="confirmModle" @cancel="cancel">
            <view class="popup-content">
                <view class="packing-registration-param">
                    <view class="packing-registration-param-view">
                        <view class="packing-registration-param-item param-extra">
                            <view class="packing-registration-param-item-left">
                                <text class="item-one">批号</text>
                            </view>
                            <view class="packing-registration-param-item-right">
                                <text class="item-one">{{ detailedList.outBatchNo }}</text>
                            </view>
                        </view>
                        <view class="packing-registration-param-item param-extra">
                            <view class="packing-registration-param-item-left">
                                <text class="item-one">零件号</text>
                            </view>
                            <view class="packing-registration-param-item-right">
                                <text class="item-one">{{ detailedList.partNo }}</text>
                            </view>
                        </view>
                        <view class="packing-registration-param-item param-extra">
                            <view class="packing-registration-param-item-left">
                                <text class="item-one">零件描述</text>
                            </view>
                            <view class="packing-registration-param-item-right">
                                <span class="item-one">{{
                  detailedList.partName
                }}</span>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">取消接收数量</text>
              </view>
              <view class="packing-registration-param-item-right">
                <span class="item-one">{{
                            </view>
                        </view>
                        <view class="packing-registration-param-item param-extra">
                            <view class="packing-registration-param-item-left">
                                <text class="item-one">取消接收数量</text>
                            </view>
                            <view class="packing-registration-param-item-right">
                                <span class="item-one">{{
                  detailedList.netWeight
                }}</span>
              </view>
            </view>
          </view>
        </view>
      </view>
    </u-modal>
    <scan></scan>
  </view>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </u-modal>
        <scan></scan>
    </view>
</template>
<script>
import content_bg from "@/static/custom/packing/backBg.png";
import scan from "@/components/scan/scan.vue";
    import content_bg from "@/static/custom/packing/backBg.png";
    import scan from "@/components/scan/scan.vue";
export default {
  components: {
    scan,
  },
  data() {
    return {
      background: {
        backgroundImage: `url(${content_bg})`,
        backgroundAttachment: "fixed",
        backgroundSize: "100% auto",
        backgroundRepeat: "no-repeat",
    export default {
        components: {
            scan,
        },
        data() {
            return {
                background: {
                    backgroundImage: `url(${content_bg})`,
                    backgroundAttachment: "fixed",
                    backgroundSize: "100% auto",
                    backgroundRepeat: "no-repeat",
                },
                form: {
                    moNo: "",
                    optaskNo: "",
                    id: "",
                },
                detailedList: {},
                list: [],
                rules: {},
        showModal: false,
        id: "",
            };
        },
        onReady() {},
        // onShow() {
        //   let that = this;
        //   uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器
        //   uni.$on("scan", function (data) {
        //     console.log("onscan");
        //     //扫码成功后的回调,你可以写自己的逻辑代码在这里
        //     console.log("页面扫码结果:", data.code);
        //     if (data.code) {
        //       let codeInfo = JSON.parse(data.code);
        //         console.log('222')
        //       if (codeInfo.moNo) {
        //         console.log('1111')
        //         // 扫描报工单二维码
        //         that.saveForm(codeInfo);
        //     // that.$forceUpdate();
        //       }
        //     }
        //   });
        // },
        methods: {
            //工单
            seachWork() {
                if (this.form.moNo == "") {
                    this.$u.toast("请选择订单号");
                    return;
                }
                // 使用uni.navigateTo方法跳转,并通过queryParams传递参数
                uni.navigateTo({
                    url: "/pages/product/WorkshopOrderIssued/WorkOrderList?id=" +
                        encodeURIComponent(JSON.stringify(this.form.id)),
                });
            },
            cancel() {
                this.showModal = false; // 关闭弹窗
            },
            openList() {
                uni.navigateTo({
                    url: "/pages/product/report/orderList",
                });
            },
            setNo(val) {
                this.form.moNo = val.moNo;
                this.form.id = val.id;
            },
            // 回显扫码的信息-报工单
            saveForm(val) {
                console.log('1111@@@@@@1', this.form)
                if (this.form.moNo == '') {
                    uni.showToast({
                        icon: "none",
                        title: "请先选择订单号!",
                        duration: 2 * 1000,
                    });
                    return;
                }
                if (this.form.moNo != val.moNo) {
                    uni.showToast({
                        icon: "none",
                        title: "扫描的二维码与该订单不一致",
                        duration: 2 * 1000,
                    });
                    return;
                }
                this.detailedList = val;
                this.showModal = true;
            },
            // 工单回显
            workNo(val) {
        this.id = val.id;
        this.getBGList();
                this.form.optaskNo = val.optaskNo;
      },
      form: {
        moNo: "",
      getBGList() {
        this.$u.api.workReporting
                .getProductMainV1({
                    current: 1,
                    size: -1,
                    id:this.id,
                })
          .then((res) => {
          console.log('res',res)
                    this.list = res.data.productOutputList;
                });
      },
      detailedList: {},
      list: [],
      rules: {},
      showModal: false,
    };
  },
  onReady() {},
  onShow() {
    let that = this;
    uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器
    uni.$on("scan", function (data) {
      console.log("onscan");
      //扫码成功后的回调,你可以写自己的逻辑代码在这里
      console.log("页面扫码结果:", data.code);
      if (data.code) {
        let codeInfo = JSON.parse(data.code);
          console.log('222')
        if (codeInfo.moNo) {
          console.log('1111')
          // 扫描报工单二维码
          that.saveForm(codeInfo);
        // that.$forceUpdate();
        }
      }
    });
  },
  methods: {
    // 点击确认后获取取消报工记录
    confirm() {
      // 处理确认逻辑
      this.$u.api.cancelReporting.cancelDTAOfWorkApplication({outBatchNo:this.detailedList.outBatchNo}).then((res) => {
        console.log("res", res);
        this.list = res.data.records;
        this.showModal = false;
      });
    },
    cancel() {
      this.showModal = false; // 关闭弹窗
    },
    openList() {
      uni.navigateTo({
        url: "/pages/product/report/orderList",
      });
    },
    setNo(val) {
      this.form.moNo = val.moNo;
    },
    // 回显扫码的信息-报工单
    saveForm(val) {
      console.log('1111@@@@@@1',this.form)
      if (this.form.moNo == '') {
        uni.showToast({
          icon: "none",
          title: "请先选择订单号!",
          duration: 2 * 1000,
        });
        return;
      }
      if (this.form.moNo != val.moNo) {
        uni.showToast({
          icon: "none",
          title: "扫描的二维码与该订单不一致",
          duration: 2 * 1000,
        });
        return;
      }
      this.detailedList = val;
      this.showModal = true;
    },
  },
};
            // 取消报工
            cancelReport(item, index) {
                let that = this;
                uni.showModal({
                    title: "提示",
                    content: "是否确认取消批次" + item.outBatchNo + "的报工",
                    success: function(res) {
                        if (res.confirm) {
                            that.detailedList = item;
                            that.showModal = true;
                        } else if (res.cancel) {
                            return;
                        }
                    },
                });
            },
            confirmModle() {
                console.log("点击确认后获取取消报工记录");
                // 处理确认逻辑
                this.$u.api.cancelReporting
                    .cancelDTAOfWorkApplication({
                        outBatchNo: this.detailedList.outBatchNo,
                        outputId: this.detailedList.id
                    })
                    .then((res) => {
                        console.log("res", res);
                        this.getBGList();
                        this.showModal = false;
                        // this.getHandelList();
                        this.$u.toast("取消报工成功");
                    });
            },
        },
    };
</script>
<style lang="scss" scoped>
.packing-registration-param {
  padding: 40rpx 30rpx 10rpx 30rpx;
  height: 350px;
  overflow: hidden;
    .packing-registration-param {
        padding: 40rpx 30rpx 10rpx 30rpx;
        height: 350px;
        overflow: hidden;
  .packing-registration-param-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 30rpx;
        .packing-registration-param-title {
            display: flex;
            flex-direction: row;
            align-items: center;
            margin-bottom: 30rpx;
    .title-label {
      margin-left: 14rpx;
      font-size: 34rpx;
      font-weight: bold;
      color: #283e65;
    }
  }
            .title-label {
                margin-left: 14rpx;
                font-size: 34rpx;
                font-weight: bold;
                color: #283e65;
            }
        }
  .packing-registration-param-view {
    height: 177rpx;
    background-color: #fff;
    border-radius: 10rpx;
    padding: 0rpx 23rpx;
    margin-bottom: 30rpx;
        .packing-registration-param-view {
            height: 177rpx;
            background-color: #fff;
            border-radius: 10rpx;
            padding: 0rpx 23rpx;
            margin-bottom: 30rpx;
    .packing-registration-param-item {
      height: 90rpx;
      border: 1px solid #adc8e4;
      line-height: 90rpx;
      display: flex;
      justify-content: space-between;
      border: none;
            .packing-registration-param-item {
                height: 90rpx;
                border: 1px solid #adc8e4;
                line-height: 90rpx;
                display: flex;
                justify-content: space-between;
                border: none;
      .packing-registration-param-item-left {
        .item-one {
          word-break: break-all;
          font-size: 30rpx;
          color: #666666;
        }
      }
                .packing-registration-param-item-left {
                    .item-one {
                        word-break: break-all;
                        font-size: 30rpx;
                        color: #666666;
                    }
                }
      .packing-registration-param-item-right {
        display: flex;
        justify-content: space-between;
                .packing-registration-param-item-right {
                    display: flex;
                    justify-content: space-between;
        .item-one {
          font-size: 30rpx;
          color: #060505;
          margin-right: 6rpx;
          word-break: break-all;
        }
                    .item-one {
                        font-size: 30rpx;
                        color: #060505;
                        margin-right: 6rpx;
                        word-break: break-all;
                    }
        .item-two {
          font-size: 15rpx;
          color: #a6b4cc;
          margin-right: 6rpx;
        }
                    .item-two {
                        font-size: 15rpx;
                        color: #a6b4cc;
                        margin-right: 6rpx;
                    }
        .item-three {
          font-size: 30rpx;
          color: #214ded;
          margin-right: 6rpx;
        }
      }
    }
                    .item-three {
                        font-size: 30rpx;
                        color: #214ded;
                        margin-right: 6rpx;
                    }
                }
            }
    .param-extra {
      border-bottom: 1px solid #ededed;
    }
  }
}
            .param-extra {
                border-bottom: 1px solid #ededed;
            }
        }
    }
    .popup-content {
        width: 720rpx;
        height: 400rpx;
@@ -314,148 +339,150 @@
        z-index: 10;
        /* 确保内容在蒙版之上 */
    }
.page {
  box-sizing: border-box;
}
.packing-registration-bg {
  background-color: #f6f9ff;
  background-image: url("~@/static/custom/packing/backBg.png");
  padding: 0 20rpx;
  background-attachment: fixed;
  background-size: 100% auto;
  background-repeat: no-repeat;
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: -1;
}
    .page {
        box-sizing: border-box;
    }
.uForm {
  background: #fff;
  margin: 40rpx 30rpx;
  padding: 20rpx 30rpx;
  border-radius: 16rpx;
}
    .packing-registration-bg {
        background-color: #f6f9ff;
        background-image: url("~@/static/custom/packing/backBg.png");
        padding: 0 20rpx;
        background-attachment: fixed;
        background-size: 100% auto;
        background-repeat: no-repeat;
        position: fixed;
        top: 0;
        bottom: 0;
        width: 100%;
        z-index: -1;
    }
::v-deep .u-input__input {
  text-align: right !important;
}
    .uForm {
        background: #fff;
        margin: 40rpx 30rpx;
        padding: 20rpx 30rpx;
        border-radius: 16rpx;
    }
.u-form-item {
  padding: 0;
}
.wrap .finishProductIn-locno-scroll-list {
  height: calc(100vh - var(--window-top) - var(--window-bottom) - 242rpx);
  width: 100%;
}
    ::v-deep .u-input__input {
        text-align: right !important;
    }
.finishProductIn-locno-scroll-list-group {
  ::v-deep .u-cell-item-box {
    background-color: rgba(250, 252, 255, 0.36) !important;
    padding: 0rpx 30rpx;
  }
    .u-form-item {
        padding: 0;
    }
  .content {
    font-size: 12px;
    background-color: #ffffff;
    box-sizing: border-box;
    border-radius: 10rpx;
    margin: 0rpx 0rpx 16rpx;
    padding: 20rpx 8rpx;
    box-shadow: none;
    display: flex;
    align-items: center;
    .wrap .finishProductIn-locno-scroll-list {
        height: calc(100vh - var(--window-top) - var(--window-bottom) - 242rpx);
        width: 100%;
    }
    white-space: normal;
    .finishProductIn-locno-scroll-list-group {
        ::v-deep .u-cell-item-box {
            background-color: rgba(250, 252, 255, 0.36) !important;
            padding: 0rpx 30rpx;
        }
    .content-header {
      width: 40rpx;
      height: 90rpx;
      display: flex;
      align-items: center;
      overflow-wrap: break-word;
        .content {
            font-size: 12px;
            background-color: #ffffff;
            box-sizing: border-box;
            border-radius: 10rpx;
            margin: 0rpx 0rpx 16rpx;
            padding: 20rpx 8rpx;
            box-shadow: none;
            display: flex;
            align-items: center;
      .content-header-icon {
        background-image: url("~@/static/custom/moveWareHouse/header_icon.png");
        background-size: 100% auto;
        background-repeat: no-repeat;
        height: 28rpx;
        width: 28rpx;
      }
            white-space: normal;
      .content-header-title {
        width: 40rpx;
        // margin-left: 11rpx;
        font-size: 26rpx;
        color: #333333;
      }
    }
            .content-header {
                width: 40rpx;
                height: 90rpx;
                display: flex;
                align-items: center;
                overflow-wrap: break-word;
    .content-body {
      flex: 1;
      background: #f5f9ff;
      border-radius: 10rpx;
      padding: 0rpx 23rpx;
                .content-header-icon {
                    background-image: url("~@/static/custom/moveWareHouse/header_icon.png");
                    background-size: 100% auto;
                    background-repeat: no-repeat;
                    height: 28rpx;
                    width: 28rpx;
                }
      .row-list {
        height: 60rpx;
        display: flex;
        flex-direction: row;
        padding: 0px;
        align-items: center;
      }
                .content-header-title {
                    width: 40rpx;
                    // margin-left: 11rpx;
                    font-size: 26rpx;
                    color: #333333;
                }
            }
      .row-list ._label {
        display: flex;
        flex: 0.8;
        color: #909399;
        align-items: center;
            .content-body {
                flex: 1;
                background: #f5f9ff;
                border-radius: 10rpx;
                padding: 0rpx 23rpx;
        ._label-icon-1 {
          background-image: url("~@/static/custom/moveWareHouse/label-icon-1.png");
          background-size: 100% auto;
          background-repeat: no-repeat;
          height: 26rpx;
          width: 26rpx;
        }
                .row-list {
                    height: 60rpx;
                    display: flex;
                    flex-direction: row;
                    padding: 0px;
                    align-items: center;
                }
        ._label-icon-2 {
          background-image: url("~@/static/custom/moveWareHouse/label-icon-2.png");
          background-size: 100% auto;
          background-repeat: no-repeat;
          height: 26rpx;
          width: 26rpx;
        }
                .row-list ._label {
                    display: flex;
                    flex: 0.8;
                    color: #909399;
                    align-items: center;
        ._label-icon-3 {
          background-image: url("~@/static/custom/moveWareHouse/label-icon-3.png");
          background-size: 100% auto;
          background-repeat: no-repeat;
          height: 26rpx;
          width: 26rpx;
        }
                    ._label-icon-1 {
                        background-image: url("~@/static/custom/moveWareHouse/label-icon-1.png");
                        background-size: 100% auto;
                        background-repeat: no-repeat;
                        height: 26rpx;
                        width: 26rpx;
                    }
        ._label-name {
          margin-left: 11rpx;
          font-size: 26rpx;
          font-weight: 500;
          color: #666666;
        }
      }
                    ._label-icon-2 {
                        background-image: url("~@/static/custom/moveWareHouse/label-icon-2.png");
                        background-size: 100% auto;
                        background-repeat: no-repeat;
                        height: 26rpx;
                        width: 26rpx;
                    }
      .row-list ._content {
        flex: 1.5;
        text-align: right;
        color: #909399;
        font-size: 24rpx;
      }
                    ._label-icon-3 {
                        background-image: url("~@/static/custom/moveWareHouse/label-icon-3.png");
                        background-size: 100% auto;
                        background-repeat: no-repeat;
                        height: 26rpx;
                        width: 26rpx;
                    }
      .row-list .s1 {
        color: #d35651;
      }
    }
  }
}
                    ._label-name {
                        margin-left: 11rpx;
                        font-size: 26rpx;
                        font-weight: 500;
                        color: #666666;
                    }
                }
                .row-list ._content {
                    flex: 1.5;
                    text-align: right;
                    color: #909399;
                    font-size: 24rpx;
                }
                .row-list .s1 {
                    color: #d35651;
                }
            }
        }
    }
</style>
pages/product/report/components/saveForm.vue
@@ -1,144 +1,217 @@
<template>
  <u-modal
    v-model="show"
    ref="uModal"
    title=""
    :show-cancel-button="true"
    @confirm="confirm"
    @cancel="cancel"
    :async-close="true"
    :loading="loading"
  >
    <view class="packing-registration-param">
      <scroll-view scroll-y="true" style="height: 100%;transform: translateZ(0);-webkit-font-smoothing: antialiased;">
  <view>
    <u-modal
      v-model="show"
      ref="uModal"
      title=""
      :show-cancel-button="true"
      @confirm="confirm"
      @cancel="cancel"
      :async-close="true"
      :loading="loading"
    >
      <view class="packing-registration-param">
        <scroll-view
          scroll-y="true"
          style="
            height: 100%;
            transform: translateZ(0);
            -webkit-font-smoothing: antialiased;
          "
        >
          <view class="packing-registration-param-view">
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">批号</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input class="item-one item-two" v-model="form.outBatchNo" />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">投料批次</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input
                  class="item-one item-two"
                  v-model="form.ifsBatchNoArr"
                  disabled
                />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">长度</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input
                  class="item-one item-two"
                  v-model="form.overallLength"
                />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">库位</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input
                  class="item-one item-two"
                  v-model="form.proposedLocation"
                  disabled
                />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">盘号</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input class="item-one item-two" v-model="form.reelNumber" />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">盘重</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input class="item-one item-two" v-model="form.reelWeight" />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">毛重</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input class="item-one item-two" v-model="form.grossWeight" />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">净重</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input
                  class="item-one item-two"
                  v-model="form.netWeight"
                  disabled
                />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">废料</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input class="item-one item-two" v-model="form.waste" />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">工序</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input
                  class="item-one item-two"
                  v-model="form.name"
                  disabled
                />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">成品外径测量值</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input
                  class="item-one item-two"
                  v-model="form.outerDiameter"
                />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">退火电压</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input class="item-one item-two" v-model="form.voltage" />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">转速</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input class="item-one item-two" v-model="form.speed" />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">外部气压</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input class="item-one item-two" v-model="form.pressure" />
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one item-two">生产速度</text>
              </view>
              <view class="packing-registration-param-item-right">
                <u-input
                  class="item-one item-two"
                  v-model="form.productionSpeed"
                />
              </view>
            </view>
          </view>
        </scroll-view>
      </view>
    </u-modal>
    <u-modal
      v-model="showModal"
      title=""
      :show-cancel-button="true"
      :show-confirm-button="true"
      @confirm="confirmTl"
      @cancel="cancelTl"
    >
      <view class="packing-registration-param">
        <view class="packing-registration-param-view">
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">批号</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.outBatchNo" />
              <text class="item-one item-two">{{
                detailedList.ifsBatchNo
              }}</text>
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">长度</text>
              <text class="item-one">零件描述</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.overallLength" />
              <text class="item-one item-two">{{ detailedList.partName }}</text>
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">库位</text>
              <text class="item-one">数量</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input
                class="item-one item-two"
                v-model="form.proposedLocation"
                disabled
              />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">盘号</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.reelNumber" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">盘重</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.reelWeight" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">毛重</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.grossWeight" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">净重</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input
                class="item-one item-two"
                v-model="form.netWeight"
                disabled
              />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">废料</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.waste" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">工序</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.name" disabled />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">成品外径测量值</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.outerDiameter" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">退火电压</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.voltage" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">转速</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.speed" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one">外部气压</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.pressure" />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
            <view class="packing-registration-param-item-left">
              <text class="item-one item-two">生产速度</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input
                class="item-one item-two"
                v-model="form.productionSpeed"
                v-model="detailedList.suppliedQuantity"
              />
            </view>
          </view>
        </view>
      </scroll-view>
    </view>
  </u-modal>
      </view>
    </u-modal>
  </view>
</template>
<script>
@@ -150,15 +223,19 @@
      default: () => ({}),
    },
    dutyId: {
      type: String,
      type: Number,
      required: true,
      default: '',
      default: "",
    },
  },
  data() {
    return {
      showModal: false,
      detailedList: {},
      show: false,
      form: {},
      ifsBatchNo: [],
      productInputList: [],
      loading: false,
    };
  },
@@ -221,6 +298,11 @@
        this.$refs.uModal.clearLoading(); // 清除加载状态
        return;
      }
      if (this.form.productInputList.length == 0) {
        this.$u.toast("投料批次不能为空,请扫码投料");
        this.$refs.uModal.clearLoading(); // 清除加载状态
        return;
      }
      this.operationTaskList.operationTaskId = this.operationTaskList.id;
      this.form.operationTaskId = this.operationTaskList.id;
      this.form.status = this.operationTaskList.status;
@@ -235,7 +317,7 @@
      this.$u.api.workReporting
        .submitPDA(this.operationTaskList)
        .then((res) => {
          this.$emit("update");
          this.$emit("update",this.operationTaskList);
          this.$refs.uModal.cancel();
        })
        .finally(() => {
@@ -246,11 +328,72 @@
    cancel() {
      this.show = false;
      this.form = {};
      this.ifsBatchNo = [];
      this.productInputList = [];
    },
    cancelTl() {
      this.showModal = false;
      this.detailedList = {};
    },
    updateArray(arr, newObj) {
    // 查找数组中是否有相同的 id
    let index = arr.findIndex(item => item.ifsBatchNo === newObj.ifsBatchNo);
    if (index !== -1) {
        // 如果找到相同 id 的对象,替换原有对象
        arr[index] = newObj;
    } else {
        // 如果没有找到相同 id 的对象,直接推入新对象
        arr.push(newObj);
    }
    return arr;
},
    confirmTl() {
      let ifsBatchNoArr = [];
      let updatedArrayList = this.updateArray(this.productInputList, this.detailedList);
      console.log("updatedArrayList", updatedArrayList);
      // this.productInputList.push(updatedArrayList);
      this.$set(this.form, "productInputList", this.productInputList);
      this.productInputList.forEach((item) => {
        ifsBatchNoArr.push(item.ifsBatchNo)
      })
      console.log("ifsBatchNoArr", ifsBatchNoArr);
      // this.ifsBatchNo.push(ifsBatchNoArr);
      this.$set(this.form, "ifsBatchNoArr", ifsBatchNoArr);
      console.log("this.form", this.form);
      this.showModal = false;
      this.detailedList = {};
    },
    open(val) {
      this.show = true;
      this.form = val.data;
    },
    // 回显扫码的信息-报工单
    saveForm(val) {
      this.$u.api.cancelReporting
        .selInputPartInfoPDA({
          outBatchNo: val.BN,
          partNo: val.PN,
          moOn: this.operationTaskList.moOn,
        })
        .then((res) => {
          const list = {
            suppliedQuantity: res.data.suppliedQuantity,
            ifsBatchNo: res.data.ifsBatchNo,
            partNo: res.data.partNo,
            partName: res.data.partName,
            locationNo: res.data.locationNo,
            ifsLineItemNo: res.data.ifsLineItemNo,
            serialNo: res.data.serialNo,
            engChgLevel: res.data.engChgLevel,
            ifsWdr: res.data.waivDevRejNo,
            activitySeq: res.data.activitySeq,
          };
          this.detailedList = list;
          this.showModal = true;
        });
    },
  },
};
</script>
pages/product/report/index.vue
@@ -1,424 +1,365 @@
<template>
  <!-- 报工 -->
  <div class="page">
    <u-form
      :model="form"
      ref="uForm"
      :label-width="200"
      :rules="rules"
      :error-type="['toast']"
    >
      <u-form-item label="车间" :border-bottom="false" prop="work" style="font-size:small">
        <u-radio-group v-model="form.work" :disabled="subdisabled">
          <u-radio name="dt"><span style="font-size:small">导体</span></u-radio>
          <u-radio name="tg"><span style="fongt-size:small">铜杆</span></u-radio>
        </u-radio-group>
      </u-form-item>
      <u-form-item label="报工单号" :border-bottom="false" prop="taskNo" style="font-size:small">
        <u-input
          v-model="form.taskNo"
          type="select"
          placeholder="请扫描报工单号"
          @click="open"
        />
      </u-form-item>
      <u-form-item label="工序" :border-bottom="false" prop="name" style="font-size:small">
        <u-input
          v-model="form.name"
          type="select"
          placeholder="请扫描报工单号"
        />
      </u-form-item>
      <u-form-item label="订单号" :border-bottom="false" prop="moOn" style="font-size:small">
        <u-input
          v-model="form.moOn"
          type="select"
          placeholder="点击选择"
          @click="openList"
        />
      </u-form-item>
      <u-form-item label="零件号" :border-bottom="false" prop="partNo" style="font-size:small">
        <u-input v-model="form.partNo" placeholder="" disabled />
      </u-form-item>
      <u-form-item label="零件描述" :border-bottom="false" prop="partName" style="font-size:small">
        <u-input v-model="form.partName" placeholder="" disabled />
      </u-form-item>
      <u-form-item label="批量大小" :border-bottom="false" prop="qtyRequired" style="font-size:small">
        <u-input v-model="form.qtyRequired" placeholder="" disabled />
      </u-form-item>
      <u-form-item
        label="剩余数量"
        :border-bottom="false"
        prop="Jianqtyfinished"
        style="font-size:small"
      >
        <u-input v-model="form.Jianqtyfinished" placeholder="" disabled />
      </u-form-item>
      <u-form-item label="库位" :border-bottom="false" prop="proposedLocation" style="font-size:small">
        <u-input v-model="form.proposedLocation" placeholder="" disabled />
      </u-form-item>
      <u-form-item label="报工类型" label-width="90px" prop="productType" style="font-size:small">
        <u-radio-group v-model="form.productType" :disabled="subdisabled">
          <u-radio name="dep"><span style="font-size:small">下机报工</span></u-radio>
          <u-radio name="ndep"><span style="font-size:small">未下机报工</span></u-radio>
        </u-radio-group>
      </u-form-item>
      <u-form-item label="接收零件" label-width="90px" prop="receive" style="font-size:small">
        <u-radio-group v-model="form.receive" :disabled="subdisabled">
          <u-radio name="mo"><span style="font-size:small">车间订单</span></u-radio>
          <u-radio name="part"><span style="font-size:small">替代零件</span></u-radio>
        </u-radio-group>
      </u-form-item>
      <u-form-item label="物料" label-width="90px" prop="materialCost" style="font-size:small">
        <u-radio-group v-model="form.materialCost" :disabled="true">
          <u-radio name="倒冲"><span style="font-size:small">倒冲</span></u-radio>
          <u-radio name="投料"><span style="font-size:small">投料</span></u-radio>
        </u-radio-group>
      </u-form-item>
      <u-form-item label="简化物料检查" label-width="90px" prop="simplifyMaterials" style="font-size:small">
        <u-radio-group v-model="form.simplifyMaterials" :disabled="subdisabled || simplifyDisabled" @change="radioChange">
          <u-radio name="true"><span style="font-size:small">是</span></u-radio>
          <u-radio name="false"><span style="font-size:small">否</span></u-radio>
        </u-radio-group>
      </u-form-item>
      <u-form-item label="报工方式" label-width="90px" prop="status"  style="font-size:small">
        <u-radio-group v-model="form.status" :disabled="subdisabled" @change="handleReportTypeChange">
          <u-radio name="false"><span style="font-size:small">按班组报工</span></u-radio>
          <u-radio name="true"><span style="font-size:small">按人员报工</span></u-radio>
        </u-radio-group>
      </u-form-item>
      <u-form-item label="人员名称" label-width="90px" :border-bottom="false" prop="Persons"  style="font-size:small">
                <u-input v-model="form.Persons" type="select" placeholder="请选择"
                    @click="openselectedPersons" :disabled="!canSelectPerson || subdisabled"/>
    <!-- 报工 -->
    <div class="page">
        <u-form :model="form" ref="uForm" :label-width="200" :rules="rules" :error-type="['toast']">
            <u-form-item label="车间" :border-bottom="false" prop="work" style="font-size:small">
                <u-radio-group v-model="form.work" :disabled="subdisabled">
                    <u-radio name="dt"><span style="font-size:small">导体</span></u-radio>
                    <u-radio name="tg"><span style="fongt-size:small">铜杆</span></u-radio>
                </u-radio-group>
            </u-form-item>
      <u-form-item label="产出列表" :border-bottom="false"  style="font-size:small"></u-form-item>
    </u-form>
    <view class="wrap">
      <scroll-view class="packing-registration-scroll-list" scroll-y="true">
        <u-cell-group
          class="packing-registration-scroll-list-group"
          :border="false"
        >
          <view
            class="content"
            v-for="(item, index) in InventoryReceiptList"
            :key="index"
            :index="index"
            @click="cancelReport(item)"
          >
            <view class="content-header">
              <view class="content-header-title" style="font-size:small">{{ index + 1 }}</view>
            </view>
            <view class="content-body">
              <view class="row-list">
                <view class="_label">
                  <view class="_label-name">批号:</view>
                </view>
                <view class="_content">
                  {{ item.outBatchNo }}
                </view>
              </view>
              <view class="row-list">
                <view class="_label">
                  <view class="_label-name">数量:</view>
                </view>
                <view class="_content">
                  {{ item.netWeight }}
                </view>
              </view>
              <view class="row-list">
                <view class="_label">
                  <view class="_label-name">库位:</view>
                </view>
                <view class="_content">
                  {{ item.proposedLocation }}
                </view>
              </view>
            </view>
          </view>
        </u-cell-group>
      </scroll-view>
    </view>
    <!-- 填写报工单 -->
    <modalBg ref="modalBg" :confirm="confirm">
      <u-field
        v-model="form.taskNo"
        label="报工单号"
        placeholder="请输入"
        :border-bottom="false"
        style="font-size:small"
      >
      </u-field>
    </modalBg>
    <saveForm
      ref="saveForm"
      :operationTaskList="this.form"
      :dutyId="dutyId"
      @update="handleUpdate"
    />
    <u-modal
      width="720rpx"
      v-model="showModal"
      title=""
      :show-cancel-button="true"
      :show-confirm-button="true"
      @confirm="confirmModle"
      @cancel="cancelModle"
    >
      <view class="popup-content">
        <view class="packing-registration-param">
          <view class="packing-registration-param-view">
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">批号</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one">{{ detailedList.outBatchNo }}</text>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">零件号</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one">{{ detailedList.partNo }}</text>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">零件描述</text>
              </view>
              <view class="packing-registration-param-item-right">
                <span class="item-one">{{ detailedList.partName }}</span>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
              <view class="packing-registration-param-item-left">
                <text class="item-one">取消接收数量</text>
              </view>
              <view class="packing-registration-param-item-right">
                <span class="item-one">{{ detailedList.netWeight }}</span>
              </view>
            </view>
          </view>
        </view>
      </view>
    </u-modal>
    <u-modal v-model="personShowModal" title="" :show-cancel-button="true" :show-confirm-button="true"
            @confirm="confirmSelection" @cancel="cancelSelection">
            <u-form-item label="报工单号" :border-bottom="false" prop="taskNo" style="font-size:small">
                <u-input v-model="form.taskNo" type="select" placeholder="请扫描报工单号" @click="open" />
            </u-form-item>
            <u-form-item label="工序" :border-bottom="false" prop="name" style="font-size:small">
                <u-input v-model="form.name" type="select" placeholder="请扫描报工单号" />
            </u-form-item>
            <u-form-item label="订单号" :border-bottom="false" prop="moOn" style="font-size:small">
                <u-input v-model="form.moOn" type="select" placeholder="点击选择" @click="openList" />
            </u-form-item>
            <u-form-item label="零件号" :border-bottom="false" prop="partNo" style="font-size:small">
                <u-input v-model="form.partNo" placeholder="" disabled />
            </u-form-item>
            <u-form-item label="零件描述" :border-bottom="false" prop="partName" style="font-size:small">
                <u-input v-model="form.partName" placeholder="" disabled />
            </u-form-item>
            <u-form-item label="批量大小" :border-bottom="false" prop="qtyRequired" style="font-size:small">
                <u-input v-model="form.qtyRequired" placeholder="" disabled />
            </u-form-item>
            <u-form-item label="剩余数量" :border-bottom="false" prop="Jianqtyfinished" style="font-size:small">
                <u-input v-model="form.Jianqtyfinished" placeholder="" disabled />
            </u-form-item>
            <u-form-item label="库位" :border-bottom="false" prop="proposedLocation" style="font-size:small">
                <u-input v-model="form.proposedLocation" placeholder="" disabled />
            </u-form-item>
            <u-form-item label="报工类型" label-width="90px" prop="productType" style="font-size:small">
                <u-radio-group v-model="form.productType" :disabled="subdisabled">
                    <u-radio name="dep"><span style="font-size:small">下机报工</span></u-radio>
                    <u-radio name="ndep"><span style="font-size:small">未下机报工</span></u-radio>
                </u-radio-group>
            </u-form-item>
            <u-form-item label="接收零件" label-width="90px" prop="receive" style="font-size:small">
                <u-radio-group v-model="form.receive" :disabled="subdisabled">
                    <u-radio name="mo"><span style="font-size:small">车间订单</span></u-radio>
                    <u-radio name="part"><span style="font-size:small">替代零件</span></u-radio>
                </u-radio-group>
            </u-form-item>
            <u-form-item label="物料" label-width="90px" prop="materialCost" style="font-size:small">
                <u-radio-group v-model="form.materialCost" :disabled="true">
                    <u-radio name="倒冲"><span style="font-size:small">倒冲</span></u-radio>
                    <u-radio name="投料"><span style="font-size:small">投料</span></u-radio>
                </u-radio-group>
            </u-form-item>
            <u-form-item label="简化物料检查" label-width="90px" prop="simplifyMaterials" style="font-size:small">
                <u-radio-group v-model="form.simplifyMaterials" :disabled="subdisabled || simplifyDisabled"
                    @change="radioChange">
                    <u-radio name="true"><span style="font-size:small">是</span></u-radio>
                    <u-radio name="false"><span style="font-size:small">否</span></u-radio>
                </u-radio-group>
            </u-form-item>
            <u-form-item label="报工方式" label-width="90px" prop="status" style="font-size:small">
                <u-radio-group v-model="form.status" :disabled="subdisabled" @change="handleReportTypeChange">
                    <u-radio name="false"><span style="font-size:small">按班组报工</span></u-radio>
                    <u-radio name="true"><span style="font-size:small">按人员报工</span></u-radio>
                </u-radio-group>
            </u-form-item>
            <u-form-item label="人员名称" label-width="90px" :border-bottom="false" prop="Persons" style="font-size:small">
                <u-input v-model="form.Persons" type="select" placeholder="请选择" @click="openselectedPersons"
                    :disabled="!canSelectPerson || subdisabled" />
            </u-form-item>
            <u-form-item label="产出列表" :border-bottom="false" style="font-size:small"></u-form-item>
        </u-form>
        <view class="wrap">
            <scroll-view class="packing-registration-scroll-list" scroll-y="true">
                <u-cell-group class="packing-registration-scroll-list-group" :border="false">
                    <view class="content" v-for="(item, index) in InventoryReceiptList" :key="index" :index="index"
                        @click="cancelReport(item,index)">
                        <view class="content-header">
                            <view class="content-header-title" style="font-size:small">{{ index + 1 }}</view>
                        </view>
                        <view class="content-body">
                            <view class="row-list">
                                <view class="_label">
                                    <view class="_label-name">批号:</view>
                                </view>
                                <view class="_content">
                                    {{ item.outBatchNo }}
                                </view>
                            </view>
                            <view class="row-list">
                                <view class="_label">
                                    <view class="_label-name">数量:</view>
                                </view>
                                <view class="_content">
                                    {{ item.netWeight }}
                                </view>
                            </view>
                            <view class="row-list">
                                <view class="_label">
                                    <view class="_label-name">库位:</view>
                                </view>
                                <view class="_content">
                                    {{ item.proposedLocation }}
                                </view>
                            </view>
                        </view>
                    </view>
                </u-cell-group>
            </scroll-view>
        </view>
        <!-- 填写报工单 -->
        <modalBg ref="modalBg" :confirm="confirm">
            <u-field v-model="form.taskNo" label="报工单号" placeholder="请输入" :border-bottom="false"
                style="font-size:small">
            </u-field>
        </modalBg>
        <saveForm ref="saveForm" :operationTaskList="this.form" :dutyId="dutyId" @update="handleUpdate" />
        <u-modal width="720rpx" v-model="showModal" title="" :show-cancel-button="true" :show-confirm-button="true"
            @confirm="confirmModle" @cancel="cancelModle">
            <view class="popup-content">
      <scroll-view scroll-y="true" style="height: 100%; transform: translateZ(0); -webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;">
                <view class="popup-header">
                    <checkbox-group @change="checkboxChange">
                        <label class="checkbox-item" v-for="(item, index) in selectedPersons" :key="index">
                            <checkbox :value="item.staffId" :checked="item.checked" />
                            <text class="label">{{ item.staffName }}</text>
                        </label>
                    </checkbox-group>
                <view class="packing-registration-param">
                    <view class="packing-registration-param-view">
                        <view class="packing-registration-param-item param-extra">
                            <view class="packing-registration-param-item-left">
                                <text class="item-one">批号</text>
                            </view>
                            <view class="packing-registration-param-item-right">
                                <text class="item-one">{{ detailedList.outBatchNo }}</text>
                            </view>
                        </view>
                        <view class="packing-registration-param-item param-extra">
                            <view class="packing-registration-param-item-left">
                                <text class="item-one">零件号</text>
                            </view>
                            <view class="packing-registration-param-item-right">
                                <text class="item-one">{{ detailedList.partNo }}</text>
                            </view>
                        </view>
                        <view class="packing-registration-param-item param-extra">
                            <view class="packing-registration-param-item-left">
                                <text class="item-one">零件描述</text>
                            </view>
                            <view class="packing-registration-param-item-right">
                                <span class="item-one">{{ detailedList.partName }}</span>
                            </view>
                        </view>
                        <view class="packing-registration-param-item param-extra">
                            <view class="packing-registration-param-item-left">
                                <text class="item-one">取消接收数量</text>
                            </view>
                            <view class="packing-registration-param-item-right">
                                <span class="item-one">{{ detailedList.netWeight }}</span>
                            </view>
                        </view>
                    </view>
                </view>
      </scroll-view>
            </view>
        </u-modal>
    <scan></scan>
  </div>
        <u-modal v-model="personShowModal" title="" :show-cancel-button="true" :show-confirm-button="true"
            @confirm="confirmSelection" @cancel="cancelSelection">
            <view class="popup-content">
                <scroll-view scroll-y="true"
                    style="height: 100%; transform: translateZ(0); -webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;">
                    <view class="popup-header">
                        <checkbox-group @change="checkboxChange">
                            <label class="checkbox-item" v-for="(item, index) in selectedPersons" :key="index">
                                <checkbox :value="item.staffId" :checked="item.checked" />
                                <text class="label">{{ item.staffName }}</text>
                            </label>
                        </checkbox-group>
                    </view>
                </scroll-view>
            </view>
        </u-modal>
        <scan></scan>
    </div>
</template>
<script>
import modalBg from "@/components/modal/modal-bg.vue";
import saveForm from "./components/saveForm.vue";
import scan from "@/components/scan/scan.vue";
export default {
  components: {
    modalBg,
    saveForm,
    scan,
  },
  data() {
    return {
        simplifyDisabled:false,
      // checkboxList: [
      //   {
      //     name: "工序的自动报告",
      //     value: false,
      //     disabled: false,
      //   },
      //   {
      //     name: "简化物料检查",
      //     value: false,
      //     disabled: false,
      //   },
      // ],
      InventoryReceiptList: [],
        selectedPersons: [],
      form: {
        workstationId: "",
        work: "",
        taskNo: "",
        name: "",
        moOn: "",
        partNo: "",
        partName: "",
        qtyRequired: "",
        Jianqtyfinished: "",
        proposedLocation: "",
        productType: "dep",
        receive: "mo",
        materialCost: "",
        // autoReport: false,
        simplifyMaterials: 'false',
        status: 'false',
        Persons: '',
        productStaffIds: [],
        productStaffs:[]
      },
      personList: [],
      canSelectPerson: false,
      rules: {
        work: [
          {
            required: true,
            message: "请选择车间",
            trigger: ["change"],
          },
        ],
        taskNo: [
          {
            required: true,
            message: "请选择报工单号",
            trigger: ["change", "blur"],
          },
        ],
        name: [
          {
            required: true,
            message: "请选择工序",
            trigger: ["change", "blur"],
          },
        ],
        moOn: [
          {
            required: true,
            message: "请选择订单号",
            trigger: ["change", "blur"],
          },
        ],
        productType: [
          {
            required: true,
            message: "请选择报工类型",
            trigger: ["change"],
          },
        ],
        receive: [
          {
            required: true,
            message: "请选择接收零件类型",
            trigger: ["change"],
          },
        ],
        status: [
          {
            required: true,
            message: "请选择报工方式",
            trigger: ["change"],
          },
        ],
        Persons: [
          {
            required: true,
            message: "请选择人员",
            trigger: ["change"],
          },
        ],
      },
      showSave: false,
      operationTaskId: "",
      subdisabled: false,
      codeInfoId: "",
      detailedList: {},
      showModal: false,
      personShowModal: false,
            checkboxList: [],
    };
  },
  // 点击提交按钮的事件处理函数
  onNavigationBarButtonTap() {
    this.$refs.uForm.validate((valid) => {
      if (valid) {
        uni.showLoading({
          mask: true,
          title: "加载中",
        });
        // 处理提交逻辑
        this.$u.api.workReporting
          .operationTask({
            id: this.form.id,
          })
          .then((res) => {
            res.data.name = this.form.name;
            this.$refs.saveForm.open(res);
            uni.hideLoading();
          });
      } else {
        // 可以获取具体的错误信息
        const errors = this.$refs.uForm.getError();
      }
    });
  },
  onReady() {
    this.$refs.uForm.setRules(this.rules);
  },
  onShow() {
    let that = this;
    uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器
    uni.$on("scan", function (data) {
      //扫码成功后的回调,你可以写自己的逻辑代码在这里
      if (data.code) {
        let codeInfo = JSON.parse(data.code);
        if (codeInfo.moOn) {
           that.codeInfoId = codeInfo.id;
          // 扫描报工单二维码
          that.saveForm(codeInfo);
          that.getHandelList();
        }
        if (codeInfo.BN) {
          // 扫描报工单二维码
          that.CopperReportingWork(codeInfo);
        }
      }
    });
  },
  watch: {
    "form.taskNo": function (newVal, oldVal) {
      this.subdisabled = false;
    },
    'form.status'(newVal) {
      this.selectedPersons = this.selectedPersons.map(item => ({
        ...item,
        checked: newVal === 'false'
      }));
    }
  },
  methods: {
    // 处理报工方式变更
    handleReportTypeChange() {
      // 切换报工方式时清空人员名称
      this.form.Persons = '';
      this.form.productStaffs = [];
      this.form.productStaffIds = [];
    },
    // 人员名称
                openselectedPersons() {
    import modalBg from "@/components/modal/modal-bg.vue";
    import saveForm from "./components/saveForm.vue";
    import scan from "@/components/scan/scan.vue";
    export default {
        components: {
            modalBg,
            saveForm,
            scan,
        },
        data() {
            return {
                simplifyDisabled: false,
                // checkboxList: [
                //   {
                //     name: "工序的自动报告",
                //     value: false,
                //     disabled: false,
                //   },
                //   {
                //     name: "简化物料检查",
                //     value: false,
                //     disabled: false,
                //   },
                // ],
                InventoryReceiptList: [],
                selectedPersons: [],
                form: {
                    workstationId: "",
                    work: "",
                    taskNo: "",
                    name: "",
                    moOn: "",
                    partNo: "",
                    partName: "",
                    qtyRequired: "",
                    Jianqtyfinished: "",
                    proposedLocation: "",
                    productType: "dep",
                    receive: "mo",
                    materialCost: "",
                    // autoReport: false,
                    simplifyMaterials: 'false',
                    status: 'false',
                    Persons: '',
                    productStaffIds: [],
                    productStaffs: []
                },
                personList: [],
                canSelectPerson: false,
                rules: {
                    work: [{
                        required: true,
                        message: "请选择车间",
                        trigger: ["change"],
                    }, ],
                    taskNo: [{
                        required: true,
                        message: "请选择报工单号",
                        trigger: ["change", "blur"],
                    }, ],
                    name: [{
                        required: true,
                        message: "请选择工序",
                        trigger: ["change", "blur"],
                    }, ],
                    moOn: [{
                        required: true,
                        message: "请选择订单号",
                        trigger: ["change", "blur"],
                    }, ],
                    productType: [{
                        required: true,
                        message: "请选择报工类型",
                        trigger: ["change"],
                    }, ],
                    receive: [{
                        required: true,
                        message: "请选择接收零件类型",
                        trigger: ["change"],
                    }, ],
                    status: [{
                        required: true,
                        message: "请选择报工方式",
                        trigger: ["change"],
                    }, ],
                    Persons: [{
                        required: true,
                        message: "请选择人员",
                        trigger: ["change"],
                    }, ],
                },
                showSave: false,
                operationTaskId: "",
                subdisabled: false,
                codeInfoId: "",
                detailedList: {},
                showModal: false,
                personShowModal: false,
                checkboxList: [],
                index: 0,
            };
        },
        // 点击提交按钮的事件处理函数
        onNavigationBarButtonTap() {
            this.$refs.uForm.validate((valid) => {
                if (valid) {
                    uni.showLoading({
                        mask: true,
                        title: "加载中",
                    });
                    // 处理提交逻辑
                    this.$u.api.workReporting
                        .operationTask({
                            id: this.form.id,
                        })
                        .then((res) => {
                            res.data.name = this.form.name;
                            this.$refs.saveForm.open(res);
                            uni.hideLoading();
                        });
                } else {
                    // 可以获取具体的错误信息
                    const errors = this.$refs.uForm.getError();
                }
            });
        },
        onReady() {
            this.$refs.uForm.setRules(this.rules);
        },
        onShow() {
            let that = this;
            uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器
            uni.$on("scan", function(data) {
                //扫码成功后的回调,你可以写自己的逻辑代码在这里
                if (data.code) {
                    let codeInfo = JSON.parse(data.code);
                    if (codeInfo.moOn) {
                        that.codeInfoId = codeInfo.id;
                        // 扫描报工单二维码
                        that.saveForm(codeInfo);
                        // that.getHandelList();
                    }
                    if (codeInfo.ES) {
                        // 扫描报工单二维码
                        that.CopperReportingWork(codeInfo);
                    }
                    if (codeInfo.BN) {
                        // 扫描报工单二维码
                        that.$refs.saveForm.saveForm(codeInfo);
                    }
                }
            });
        },
        watch: {
            "form.taskNo": function(newVal, oldVal) {
                this.subdisabled = false;
            },
            'form.status'(newVal) {
                this.selectedPersons = this.selectedPersons.map(item => ({
                    ...item,
                    checked: newVal === 'false'
                }));
            }
        },
        methods: {
            // 处理报工方式变更
            handleReportTypeChange() {
                // 切换报工方式时清空人员名称
                this.form.Persons = '';
                this.form.productStaffs = [];
                this.form.productStaffIds = [];
            },
            // 人员名称
            openselectedPersons() {
                this.personShowModal = true;
    },
                  // 复选框变化事件
    checkboxChange(e) {
      console.log('e',e)
            },
            // 复选框变化事件
            checkboxChange(e) {
                console.log('e', e)
                const values = e.target.value || [];
                if (this.form.status === 'true') {
                    // 单选模式,只允许选择一个人
                    const previouslySelected = this.selectedPersons.find(item => item.checked);
                    const newlySelected = values.length > 0 ? values[values.length - 1] : null;
                    const newlySelected = values.length > 0 ? values[values.length - 1] : null;
                    if (previouslySelected && newlySelected && previouslySelected.staffId !== newlySelected) {
                        // 已有选中项且选择了新的项,提示只能选择一个人
                        this.$u.toast('按人员报工时只能选择一位人员');
@@ -426,15 +367,15 @@
                        this.selectedPersons = this.selectedPersons.map(item => ({
                            ...item,
                            checked: item.staffId === previouslySelected.staffId
            }));
                        }));
                    } else {
                        // 首次选择或取消选择
                        this.selectedPersons = this.selectedPersons.map(item => ({
                            ...item,
                            checked: newlySelected ? item.staffId === newlySelected : false
            }));
                        }));
                    }
                } else {
                    // 多选模式
@@ -443,10 +384,10 @@
                        checked: values.includes(item.staffId)
                    }));
                }
    },
                  // 确认选择
            },
            // 确认选择
            confirmSelection() {
        const selected = this.selectedPersons.filter(item => item.checked);
                const selected = this.selectedPersons.filter(item => item.checked);
                // 根据报工方式设置人员名称
                if (this.form.status === 'true' && selected.length > 0) {
                    this.form.Persons = selected[0].staffName;
@@ -455,173 +396,188 @@
                }
                this.form.productStaffs = selected.map(item => item.staffNo);
                this.form.productStaffIds = selected.map(item => item.staffId);
    },
      cancelSelection(){},
    // 铜杆报工
    CopperReportingWork(val) {
      const copperList = {};
      copperList.outBatchNo = val.BN
      copperList.partNo = val.PN
      copperList.weighingClerk = val.WC
      copperList.executiveStandard = val.ES
      copperList.netWeight = val.NW
      copperList.specificationType = val.ST
      copperList.grossWeight = val.TR
      copperList.operationTaskId = this.form.id
      copperList.status = this.form.status;
      copperList.Persons = this.form.Persons;
      copperList.productStaffIds = this.form.productStaffIds;
      copperList.productStaffs = this.form.productStaffs;
      this.form.productOutputList = [];
      this.form.operationTaskId = this.form.id;
      this.form.productOutputList.push(copperList);
      console.log('this.form',this.form)
      this.$u.api.workReporting.submitPDA(this.form).then((res) => {
        this.subdisabled = true;
        this.getHandelList();
        this.$u.toast("报工成功");
      });
    },
    // 点击确认后获取取消报工记录
    radioChange() {
      // 处理单选框变化事件
    },
    // 获取人员列表
    getPersonList(dutyId) {
      console.log('111111')
      try {
        this.$u.api.workReporting.getPersonByDutyRecordId({ id: dutyId }).then((res) => {
        this.selectedPersons = res.data.map(item => ({
          ...item,
          checked: this.form.status === 'false'
        }));
      })
      .catch(err => {
        console.log(err)
      })
      } catch (err) {
        console.log(err)
      }
            },
            cancelSelection() {},
            // 铜杆报工
            CopperReportingWork(val) {
                this.$refs.uForm.validate((valid) => {
                    if (valid) {
                        const copperList = {};
                        copperList.outBatchNo = val.BN
                        copperList.partNo = val.PN
                        copperList.weighingClerk = val.WC
                        copperList.executiveStandard = val.ES
                        copperList.netWeight = val.NW
                        copperList.specificationType = val.ST
                        copperList.grossWeight = val.TR
                        copperList.operationTaskId = this.form.id
                        copperList.status = this.form.status;
                        copperList.Persons = this.form.Persons;
                        copperList.productStaffIds = this.form.productStaffIds;
                        copperList.productStaffs = this.form.productStaffs;
                        this.form.productOutputList = [];
            this.form.operationTaskId = this.form.id;
            this.form.dutyRecordId = this.dutyId;
                        this.form.productOutputList.push(copperList);
                        console.log('this.form', this.form)
                        this.$u.api.workReporting.submitPDA(this.form).then((res) => {
                            this.subdisabled = true;
                            this.InventoryReceiptList.unshift(this.form);
                            // this.getHandelList();
                            this.$u.toast("报工成功");
                        });
                    } else {
                        // 可以获取具体的错误信息
                        const errors = this.$refs.uForm.getError();
                    }
                });
            },
            // 点击确认后获取取消报工记录
            radioChange() {
                // 处理单选框变化事件
            },
            // 获取人员列表
            getPersonList(dutyId) {
                console.log('111111', dutyId)
                try {
                    this.$u.api.workReporting.getPersonByDutyRecordId({
                            id: dutyId
                        }).then((res) => {
    },
                            this.selectedPersons = res.data.map(item => ({
                                ...item,
                                checked: this.form.status === 'false'
                            }));
                        })
                        .catch(err => {
                            console.log(err)
                        })
                } catch (err) {
                    console.log(err)
    confirmModle() {
      console.log("点击确认后获取取消报工记录");
      // 处理确认逻辑
      this.$u.api.cancelReporting
        .cancelDTAOfWorkApplication({
          outBatchNo: this.detailedList.outBatchNo,
          outputId: this.detailedList.id
        })
        .then((res) => {
          console.log("res", res);
          this.showModal = false;
          this.getHandelList();
          this.$u.toast("取消报工成功");
        });
    },
    cancelModle() {
      this.showModal = false; // 关闭弹窗
    },
    // 取消报工
    cancelReport(item) {
      let that = this;
      uni.showModal({
        title: "提示",
        content: "是否确认取消批次" + item.outBatchNo + "的报工",
        success: function (res) {
          if (res.confirm) {
            that.detailedList = item;
            that.showModal = true;
          } else if (res.cancel) {
            return;
          }
        },
      });
    },
    getHandelList() {
      this.$u.api.workReporting
        .getProductMainV1({
          current: 1,
          size: -1,
          id: this.codeInfoId,
        })
        .then((res) => {
          this.InventoryReceiptList = res.data.productOutputList;
        });
    },
    // 多选处理
    // changeCheckbox(val) {
      // if (val.name === "工序的自动报告") {
      //   this.form.autoReport = val.value;
      // }
      // if (val.name === "简化物料检查") {
      //   this.form.simplifyMaterials = val.value;
      // }
    // },
    handleUpdate() {
      this.subdisabled = true;
      this.getHandelList();
    },
    // 打开弹框--后面还需要监听扫码枪扫码结果,赋值给报工单号字段,然后打开弹框选择订单号等操作
    open() {
      this.$refs.modalBg.open();
    },
    // 弹框保存
    confirm() {},
    // 选择订单号
    openList() {
      if (this.form.taskNo === "") {
        uni.showToast({
          title: "请先扫描或输入报工单号",
          icon: "none",
        });
        return;
      }
      uni.navigateTo({
        url: "/pages/product/report/orderList",
      });
    },
    // 存订单号
    setNo(val) {
      this.form.moOn = val.moNo;
    },
    // 回显扫码的信息-报工单
    saveForm(val) {
      this.form = {
        id: val.id,
        workstationId: val.workstationId,
        work: val.work,
        taskNo: val.taskNo,
        name: val.name,
        moOn: val.moOn,
        partNo: val.partNo,
        partName: val.partName,
        qtyRequired: val.qtyRequired,
        Jianqtyfinished: val.qtyRequired - val.qtyFinished,
        proposedLocation: val.proposedLocation,
        productType: "dep",
        receive: "mo",
        materialCost: val.materialCost,
        // autoReport: false,
        simplifyMaterials: 'false',
        status: 'false',
        Persons:'',
      };
      if (this.form.materialCost == "倒冲") {
        this.simplifyDisabled = true;
      }
      // 如果有dutyNo,获取人员列表
      if (val.dutyId) {
        this.dutyId = val.dutyId;
        this.getPersonList(val.dutyId);
      }
    },
  },
};
                }
            },
            confirmModle() {
                console.log("点击确认后获取取消报工记录");
                // 处理确认逻辑
                this.$u.api.cancelReporting
                    .cancelDTAOfWorkApplication({
                        outBatchNo: this.detailedList.outBatchNo,
                        outputId: this.detailedList.id
                    })
                    .then((res) => {
                        console.log("res", res);
                        this.detailedList.splice(this.index, 1)
                        this.showModal = false;
                        // this.getHandelList();
                        this.$u.toast("取消报工成功");
                    });
            },
            cancelModle() {
                this.showModal = false; // 关闭弹窗
            },
            // 取消报工
            cancelReport(item,index) {
                let that = this;
                that.index = index;
                uni.showModal({
                    title: "提示",
                    content: "是否确认取消批次" + item.outBatchNo + "的报工",
                    success: function(res) {
                        if (res.confirm) {
                            that.detailedList = item;
                            that.showModal = true;
                        } else if (res.cancel) {
                            return;
                        }
                    },
                });
            },
            // getHandelList() {
            //     this.$u.api.workReporting
            //         .getProductMainV1({
            //             current: 1,
            //             size: -1,
            //             id: this.codeInfoId,
            //         })
            //         .then((res) => {
            //             this.InventoryReceiptList = res.data.productOutputList;
            //         });
            // },
            // 多选处理
            // changeCheckbox(val) {
            // if (val.name === "工序的自动报告") {
            //   this.form.autoReport = val.value;
            // }
            // if (val.name === "简化物料检查") {
            //   this.form.simplifyMaterials = val.value;
            // }
            // },
            handleUpdate(val) {
                this.subdisabled = true;
                // this.getHandelList();
                this.InventoryReceiptList.unshift(val);
            },
            // 打开弹框--后面还需要监听扫码枪扫码结果,赋值给报工单号字段,然后打开弹框选择订单号等操作
            open() {
                this.$refs.modalBg.open();
            },
            // 弹框保存
            confirm() {},
            // 选择订单号
            openList() {
                if (this.form.taskNo === "") {
                    uni.showToast({
                        title: "请先扫描或输入报工单号",
                        icon: "none",
                    });
                    return;
                }
                uni.navigateTo({
                    url: "/pages/product/report/orderList",
                });
            },
            // 存订单号
            setNo(val) {
                this.form.moOn = val.moNo;
            },
            // 回显扫码的信息-报工单
            saveForm(val) {
                this.form = {
                    id: val.id,
                    workstationId: val.workstationId,
                    work: val.work,
                    taskNo: val.taskNo,
                    name: val.name,
                    moOn: val.moOn,
                    partNo: val.partNo,
                    partName: val.partName,
                    qtyRequired: val.qtyRequired,
                    Jianqtyfinished: val.qtyRequired - val.qtyFinished,
                    proposedLocation: val.proposedLocation,
                    productType: "dep",
                    receive: "mo",
                    materialCost: val.materialCost,
                    // autoReport: false,
                    simplifyMaterials: 'false',
                    status: 'false',
                    Persons: '',
                };
                if (this.form.materialCost == "倒冲") {
                    this.simplifyDisabled = true;
                }
                // 如果有dutyNo,获取人员列表
                if (val.dutyId) {
                    this.dutyId = val.dutyId;
                    this.getPersonList(val.dutyId);
                }
            },
        },
    };
</script>
<style lang="scss">
@import "index.scss";
    @import "index.scss";
</style>
pages/sys/home/index.vue
@@ -32,26 +32,26 @@
                            url: '/pages/product/report/index',
                            icon: 'one'
                        },
                        // {
                        //     name: '取消报工',
                        //     url: '/pages/product/cancelReport/index',
                        //     icon: 'two'
                        // },
                        {
                            name: '取消报工',
                            url: '/pages/product/cancelReport/index',
                            icon: 'two'
                        },
                        // {
                        //     name: '接收(铜杆)',
                        //     url: '/pages/product/receive/index',
                        //     icon: 'three'
                        // },
                        {
                            name: '车间订单下发',
                            url: '/pages/product/WorkshopOrderIssued/index',
                            icon: 'four'
                        },
                        {
                            name: '车间取消下发',
                            url: '/pages/product/WorkshopOrderCancellationIssued/index',
                            icon: 'five'
                        },
                        // {
                        //     name: '车间订单下发',
                        //     url: '/pages/product/WorkshopOrderIssued/index',
                        //     icon: 'four'
                        // },
                        // {
                        //     name: '车间取消下发',
                        //     url: '/pages/product/WorkshopOrderCancellationIssued/index',
                        //     icon: 'five'
                        // },
                    ]
                },
                {