zss
2023-12-11 c880739ec4cd5ede33b31eb98ad5f7628ea288e5
src/views/plan/manufacturingorder/productorder-form.vue
@@ -8,7 +8,7 @@
      </div>
      <div class="btn-group header-right" v-if="editable">
        <el-button :disabled="isSubmit" v-thinclick="`dataFormSubmit`"
          >保存</el-button
          type="primary">保存</el-button
        >
      </div>
    </div>
@@ -89,6 +89,7 @@
            <el-col :span="3">
              <el-form-item label="完成数量" prop="qtyFinished">
                <el-input-number
                  style= "width: 90%"
                  v-model="dataForm.qtyFinished"
                  placeholder=""
                  :controls="false"
@@ -107,7 +108,7 @@
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="6">
            <!-- <el-col :span="6">
              <el-form-item label="外护颜色" prop="outerColor">
                <el-input
                  readonly
@@ -124,11 +125,8 @@
                  placeholder=""
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="10">
            <el-col :span="6">
            </el-col> -->
             <el-col :span="6">
              <el-form-item label="备注" prop="remark">
                <el-input v-model="dataForm.remark" placeholder=""></el-input>
              </el-form-item>
@@ -151,44 +149,43 @@
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-col
                :span="8"
                v-if="permissions.plan_manufacturingorder_bom_sure"
              >
                <el-form-item label="BOM确认">
                  <el-switch v-model="dataForm.bomConfirmStatus"> </el-switch>
                </el-form-item>
              </el-col>
              <el-col
                :span="8"
                v-if="permissions.plan_manufacturingorder_process_sure"
              >
                <el-form-item label="工艺确认">
                  <el-switch v-model="dataForm.processConfirmStatus">
                  </el-switch>
                </el-form-item>
              </el-col>
              <el-col
                :span="8"
                v-if="permissions.plan_manufacturingorder_test_sure"
              >
                <el-form-item label="检测标准确认">
                  <el-switch v-model="dataForm.standardConfirmStatus">
                  </el-switch>
                </el-form-item>
              </el-col>
          </el-row>
            <!-- <el-col
              :span="2"
              v-if="permissions.plan_manufacturingorder_bom_sure"
            >
              <el-form-item label="BOM确认" label-width="110px">
                <el-switch v-model="dataForm.bomConfirmStatus"> </el-switch>
              </el-form-item>
            </el-col>
            <el-col :span="4">
            <el-col
              :span="2"
              v-if="permissions.plan_manufacturingorder_process_sure"
            >
              <el-form-item label="工艺确认" label-width="110px">
                <el-switch v-model="dataForm.processConfirmStatus">
                </el-switch>
              </el-form-item>
            </el-col>
            <el-col
              :span="2"
              v-if="permissions.plan_manufacturingorder_test_sure"
            >
              <el-form-item label="检测标准确认" label-width="140px">
                <el-switch v-model="dataForm.standardConfirmStatus">
                </el-switch>
              </el-form-item>
            </el-col> -->
            <!-- <el-col :span="2">
              <el-form-item
                label="IFS车间订单接收时报告工序"
                prop="isReportOperation"
                label-width="200px"
                label-width="250px"
              >
                <el-switch v-model="dataForm.isReportOperation" disabled>
                </el-switch>
              </el-form-item>
            </el-col>
            </el-col> -->
            <!-- <el-col :span="2">
              <el-form-item label="BOM确认">
                <el-switch >
@@ -207,7 +204,7 @@
                </el-switch>
              </el-form-item>
            </el-col> -->
          </el-row>
        </div>
        <div class="productorder-detail">
          <el-card class="productorder-list">
@@ -229,15 +226,7 @@
                            <el-option
                              v-for="item in dataForm.routingList"
                              :key="item.id"
                              :label="
                                item.routingNo +
                                  '-' +
                                  item.bomTypeDb +
                                  '-' +
                                  item.alternativeNo +
                                  '-' +
                                  item.alternativeDesc
                              "
                              :label="item.routingNo "
                              :value="item.id"
                            >
                            </el-option>
@@ -595,8 +584,19 @@
              <el-tab-pane label="产品结构" id="ta1" key="ta1" name="ta1">
                <el-row>
                  <el-col :span="11">
                    <el-form-item label="完整BOM">
                  <el-col :span="2" style="text-align: center">
                    <el-button
                      type="text"
                      size="small"
                      icon="el-icon-circle-plus-outline"
                      style="color:#f56c6c;"
                      :disabled="!dataForm.id"
                      @click="addStruct()"
                      >添加元素
                    </el-button>
                  </el-col>
                  <el-col :offset="11" :span="11">
                    <!-- <el-form-item label="完整BOM">
                      <el-select
                        @change="bomSelectChanged"
                        disabled
@@ -622,18 +622,7 @@
                        >
                        </el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :offset="11" :span="2" style="text-align: center">
                    <el-button
                      type="text"
                      size="small"
                      icon="el-icon-circle-plus-outline"
                      style="color:#f56c6c;"
                      :disabled="!dataForm.id"
                      @click="addStruct()"
                      >添加元素
                    </el-button>
                    </el-form-item> -->
                  </el-col>
                </el-row>
                <el-row>
@@ -644,7 +633,7 @@
                    style="width: 100%"
                    height="400px"
                  >
                    <el-table-column type="selection" width="40" fixed="left" />
                    <!-- <el-table-column type="selection" width="40" fixed="left" /> -->
                    <el-table-column
                      type="index"
                      width="50"
@@ -662,7 +651,7 @@
                    />
                    <el-table-column
                      prop="partName"
                      width=""
                      width="200"
                      header-align="center"
                      align="left"
                      label="零件"
@@ -1227,7 +1216,6 @@
    this.getBomTypeDbOptions()
    this.getManufactureAttrs('manufacture_attr_type')
    this.getSysParam(sysParam.IS_REPORT_OPERATION)
    // console.log(this.components);
  },
  watch: {
    'dataForm.partId'(newValue, oldValue) {
@@ -1242,9 +1230,6 @@
      }
    },
    components(newVal,oldVal){
      console.log("新",newVal);
      console.log("老",oldVal);
      console.log(this.components);
    },
    currentRouting(newValue, oldValue) {
      if (newValue && newValue.id) {
@@ -1295,7 +1280,6 @@
      if (newValue && newValue.id) {
        // 查询产品结构对应的组件
        getBom(newValue.id).then((response) => {
          console.log("查",this.components);
          // this.components = [response.data.data.tree]
        })
      }
@@ -2099,7 +2083,6 @@
    },
    // 新增工序
    addOperation(operation) {
      console.log('operation', operation)
    },
    insertOperation(operation) {},
    structSelectionChange(val) {
@@ -2107,17 +2090,17 @@
    },
    // 打开bom节点
    addStruct() {
      if (this.structSelection.length <= 0) {
        this.$message.error('请选择需要添加元素的节点')
      } else {
        if (this.structSelection.length === 1) {
          this.selectedStruct = this.structSelection[0]
          this.moId = this.dataForm.id
          this.showStructForm = true
        } else {
          this.$message.error('只能为单个节点添加元素')
        }
      }
      this.selectedStruct = this.structSelection[0]
      this.moId = this.dataForm.id
      this.showStructForm = true
      // if (this.structSelection.length <= 0) {
      //   this.$message.error('请选择需要添加元素的节点')
      // } else {
      //   if (this.structSelection.length === 1) {
      //   } else {
      //     this.$message.error('只能为单个节点添加元素')
      //   }
      // }
    },
    refreshBom(node) {
      if (this.selectedStruct.children != null) {