PDA报工页面增加投料功能,扫描二维码取消获取产出记录列表,放开取消报工页面,编写取消报工逻辑,联调取消报工接口
已修改6个文件
577 ■■■■■ 文件已修改
common/http.api.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/product/cancelReport/index.vue 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/product/report/components/saveForm.vue 157 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/product/report/index.vue 194 ●●●●● 补丁 | 查看 | 原始文档 | 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
@@ -2,48 +2,22 @@
  <!-- 取消报工 -->
  <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-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-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-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"
          >
                <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>
@@ -53,7 +27,7 @@
                  <view class="_label-name">批号:</view>
                </view>
                <view class="_content">
                  {{ item.moNo }}
                                    {{ item.outBatchNo }}
                </view>
              </view>
              <view class="row-list">
@@ -85,15 +59,8 @@
        </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"
    >
        <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">
@@ -102,7 +69,7 @@
                <text class="item-one">批号</text>
              </view>
              <view class="packing-registration-param-item-right">
                <text class="item-one">{{ detailedList.moNo }}</text>
                                <text class="item-one">{{ detailedList.outBatchNo }}</text>
              </view>
            </view>
            <view class="packing-registration-param-item param-extra">
@@ -159,41 +126,47 @@
      },
      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();
        }
      }
    });
  },
        // 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;
            //工单
            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() {
@@ -206,6 +179,7 @@
    },
    setNo(val) {
      this.form.moNo = val.moNo;
                this.form.id = val.id;
    },
    // 回显扫码的信息-报工单
    saveForm(val) {
@@ -228,6 +202,56 @@
      }
      this.detailedList = val;
      this.showModal = true;
            },
            // 工单回显
            workNo(val) {
        this.id = val.id;
        this.getBGList();
                this.form.optaskNo = val.optaskNo;
      },
      getBGList() {
        this.$u.api.workReporting
                .getProductMainV1({
                    current: 1,
                    size: -1,
                    id:this.id,
                })
          .then((res) => {
          console.log('res',res)
                    this.list = res.data.productOutputList;
                });
      },
            // 取消报工
            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("取消报工成功");
                    });
    },
  },
};
@@ -306,6 +330,7 @@
    }
  }
}
    .popup-content {
        width: 720rpx;
        height: 400rpx;
@@ -314,6 +339,7 @@
        z-index: 10;
        /* 确保内容在蒙版之上 */
    }
.page {
  box-sizing: border-box;
}
@@ -346,6 +372,7 @@
.u-form-item {
  padding: 0;
}
.wrap .finishProductIn-locno-scroll-list {
  height: calc(100vh - var(--window-top) - var(--window-bottom) - 242rpx);
  width: 100%;
pages/product/report/components/saveForm.vue
@@ -1,4 +1,5 @@
<template>
  <view>
  <u-modal
    v-model="show"
    ref="uModal"
@@ -10,7 +11,14 @@
    :loading="loading"
  >
    <view class="packing-registration-param">
      <scroll-view scroll-y="true" style="height: 100%;transform: translateZ(0);-webkit-font-smoothing: antialiased;">
        <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">
@@ -22,10 +30,25 @@
          </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" />
                <u-input
                  class="item-one item-two"
                  v-model="form.overallLength"
                />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
@@ -89,7 +112,11 @@
              <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 />
                <u-input
                  class="item-one item-two"
                  v-model="form.name"
                  disabled
                />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
@@ -97,7 +124,10 @@
              <text class="item-one">成品外径测量值</text>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input class="item-one item-two" v-model="form.outerDiameter" />
                <u-input
                  class="item-one item-two"
                  v-model="form.outerDiameter"
                />
            </view>
          </view>
          <view class="packing-registration-param-item param-extra">
@@ -139,6 +169,49 @@
      </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">
              <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>
            </view>
            <view class="packing-registration-param-item-right">
              <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>
            </view>
            <view class="packing-registration-param-item-right">
              <u-input
                class="item-one item-two"
                v-model="detailedList.suppliedQuantity"
              />
            </view>
          </view>
        </view>
      </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,13 +1,7 @@
<template>
  <!-- 报工 -->
  <div class="page">
    <u-form
      :model="form"
      ref="uForm"
      :label-width="200"
      :rules="rules"
      :error-type="['toast']"
    >
        <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>
@@ -15,27 +9,13 @@
        </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-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-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-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 />
@@ -46,12 +26,7 @@
      <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-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">
@@ -76,7 +51,8 @@
        </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-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>
@@ -88,24 +64,16 @@
        </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-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)"
          >
                <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>
@@ -141,30 +109,13 @@
    </view>
    <!-- 填写报工单 -->
    <modalBg ref="modalBg" :confirm="confirm">
      <u-field
        v-model="form.taskNo"
        label="报工单号"
        placeholder="请输入"
        :border-bottom="false"
        style="font-size:small"
      >
            <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"
    >
        <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">
@@ -207,7 +158,8 @@
    <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;">
                <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">
@@ -274,62 +226,46 @@
      personList: [],
      canSelectPerson: false,
      rules: {
        work: [
          {
                    work: [{
            required: true,
            message: "请选择车间",
            trigger: ["change"],
          },
        ],
        taskNo: [
          {
                    }, ],
                    taskNo: [{
            required: true,
            message: "请选择报工单号",
            trigger: ["change", "blur"],
          },
        ],
        name: [
          {
                    }, ],
                    name: [{
            required: true,
            message: "请选择工序",
            trigger: ["change", "blur"],
          },
        ],
        moOn: [
          {
                    }, ],
                    moOn: [{
            required: true,
            message: "请选择订单号",
            trigger: ["change", "blur"],
          },
        ],
        productType: [
          {
                    }, ],
                    productType: [{
            required: true,
            message: "请选择报工类型",
            trigger: ["change"],
          },
        ],
        receive: [
          {
                    }, ],
                    receive: [{
            required: true,
            message: "请选择接收零件类型",
            trigger: ["change"],
          },
        ],
        status: [
          {
                    }, ],
                    status: [{
            required: true,
            message: "请选择报工方式",
            trigger: ["change"],
          },
        ],
        Persons: [
          {
                    }, ],
                    Persons: [{
            required: true,
            message: "请选择人员",
            trigger: ["change"],
          },
        ],
                    }, ],
      },
      showSave: false,
      operationTaskId: "",
@@ -339,6 +275,7 @@
      showModal: false,
      personShowModal: false,
            checkboxList: [],
                index: 0,
    };
  },
  // 点击提交按钮的事件处理函数
@@ -379,11 +316,15 @@
           that.codeInfoId = codeInfo.id;
          // 扫描报工单二维码
          that.saveForm(codeInfo);
          that.getHandelList();
                        // that.getHandelList();
                    }
                    if (codeInfo.ES) {
                        // 扫描报工单二维码
                        that.CopperReportingWork(codeInfo);
        }
        if (codeInfo.BN) {
          // 扫描报工单二维码
          that.CopperReportingWork(codeInfo);
                        that.$refs.saveForm.saveForm(codeInfo);
        }
      }
    });
@@ -459,6 +400,8 @@
      cancelSelection(){},
    // 铜杆报工
    CopperReportingWork(val) {
                this.$refs.uForm.validate((valid) => {
                    if (valid) {
      const copperList = {};
      copperList.outBatchNo = val.BN
      copperList.partNo = val.PN
@@ -474,12 +417,19 @@
      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.getHandelList();
                            this.InventoryReceiptList.unshift(this.form);
                            // this.getHandelList();
        this.$u.toast("报工成功");
                        });
                    } else {
                        // 可以获取具体的错误信息
                        const errors = this.$refs.uForm.getError();
                    }
      });
    },
    // 点击确认后获取取消报工记录
@@ -488,9 +438,12 @@
    },
    // 获取人员列表
    getPersonList(dutyId) {
      console.log('111111')
                console.log('111111', dutyId)
      try {
        this.$u.api.workReporting.getPersonByDutyRecordId({ id: dutyId }).then((res) => {
                    this.$u.api.workReporting.getPersonByDutyRecordId({
                            id: dutyId
                        }).then((res) => {
        this.selectedPersons = res.data.map(item => ({
          ...item,
          checked: this.form.status === 'false'
@@ -516,8 +469,9 @@
        })
        .then((res) => {
          console.log("res", res);
                        this.detailedList.splice(this.index, 1)
          this.showModal = false;
          this.getHandelList();
                        // this.getHandelList();
          this.$u.toast("取消报工成功");
        });
    },
@@ -525,8 +479,9 @@
      this.showModal = false; // 关闭弹窗
    },
    // 取消报工
    cancelReport(item) {
            cancelReport(item,index) {
      let that = this;
                that.index = index;
      uni.showModal({
        title: "提示",
        content: "是否确认取消批次" + item.outBatchNo + "的报工",
@@ -540,17 +495,17 @@
        },
      });
    },
    getHandelList() {
      this.$u.api.workReporting
        .getProductMainV1({
          current: 1,
          size: -1,
          id: this.codeInfoId,
        })
        .then((res) => {
          this.InventoryReceiptList = res.data.productOutputList;
        });
    },
            // 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 === "工序的自动报告") {
@@ -560,9 +515,10 @@
      //   this.form.simplifyMaterials = val.value;
      // }
    // },
    handleUpdate() {
            handleUpdate(val) {
      this.subdisabled = true;
      this.getHandelList();
                // this.getHandelList();
                this.InventoryReceiptList.unshift(val);
    },
    // 打开弹框--后面还需要监听扫码枪扫码结果,赋值给报工单号字段,然后打开弹框选择订单号等操作
    open() {
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'
                        // },
                    ]
                },
                {