cuijian
2 天以前 a80d418d5d985af44565058c56c061b2b4c4fa43
src/views/tms/modules/baseTools/ParaBladeModal.vue
@@ -68,6 +68,7 @@
                    :placeholder="disableSubmit ? '' : '请输入中文名称'"
                    v-model="model.chineseName"
                    :disabled="disableSubmit"
                    @change="(e) => chineseNameChange(e.target.value)"
                  />
                </a-form-model-item>
              </a-col>
@@ -90,6 +91,7 @@
                    :placeholder="disableSubmit ? '' : '请输入型号/图号'"
                    v-model="model.toolModel"
                    :disabled="disableSubmit"
                    @change="(e) => toolModelChange(e.target.value)"
                  />
                </a-form-model-item>
              </a-col>
@@ -131,17 +133,6 @@
              </a-col>
            </a-row>
          </a-col>
          <a-col :span="8">
            <a-form-model-item prop="accuracyClass" label="精度等级">
              <j-dict-select-tag
                type="list"
                v-model="model.accuracyClass"
                :triggerChange="true"
                dictCode="accuracy_class"
                :placeholder="disableSubmit ? '' : '请选择精度等级'"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-row>
@@ -162,7 +153,7 @@
          <a-col :span="8">
            <a-form-model-item prop="applicationType" label="工具类型">
              <j-dict-select-tag
                dict-code="equipment_category"
                dict-code="application_type"
                :placeholder="disableSubmit ? '' : '请选择工具类型'"
                v-model="model.applicationType"
                :disabled="disableSubmit"
@@ -204,15 +195,6 @@
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item prop="storageLocation" label="存储位置">
              <a-input
                :placeholder="disableSubmit ? '' : '请输入存储位置'"
                v-model="model.storageLocation"
                :disabled="disableSubmit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item prop="lowerInventory" label="最低库存">
              <a-input
                :placeholder="disableSubmit ? '' : '请输入最低库存'"
@@ -230,9 +212,6 @@
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item prop="auxiliaryUnitFlag" label="是否有计量辅单位">
              <a-radio-group
@@ -245,6 +224,9 @@
              </a-radio-group>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item prop="mainUnit" label="计量主单位">
              <a-input
@@ -263,9 +245,6 @@
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item prop="supplierId" label="厂家">
              <a-input
@@ -275,6 +254,9 @@
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item prop="price" label="单价">
              <a-input
@@ -297,12 +279,51 @@
        <a-row :gutter="24">
          <a-col :span="6">
            <a-form-model-item label="刀片形状" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeShape">
            <a-form-model-item label="工具简称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shortCalled">
              <a-input
                v-model="model.bladeShape"
                :placeholder="disableSubmit ? '' : '请输入刀片形状'"
                v-model="model.shortCalled"
                :placeholder="disableSubmit ? '' : '请输入工具简称'"
                :disabled="disableSubmit"
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item
              label="集团公司编码"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="groupCompanyCode"
            >
              <a-input
                v-model="model.groupCompanyCode"
                :placeholder="disableSubmit ? '' : '请输入集团公司编码'"
                :disabled="disableSubmit"
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item
              label="集团公司标记"
              :labelCol="{ span: 4 }"
              :wrapperCol="{ span: 20 }"
              prop="groupCompanySign"
            >
              <a-input v-model="model.groupCompanySign" :disabled="true"></a-input>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="6">
            <a-form-model-item label="刀片形状" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeShape">
              <j-dict-select-tag
                type="list"
                v-model="model.bladeShape"
                :triggerChange="true"
                dictCode="blade_shape"
                placeholder="请选择刀片形状"
                :disabled="disableSubmit"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
@@ -311,6 +332,7 @@
                v-model="model.bladeLength"
                :placeholder="disableSubmit ? '' : '请输入刀片长度'"
                :disabled="disableSubmit"
                @change="(e) => bladeLengthChange(e.target.value)"
              ></a-input>
            </a-form-model-item>
          </a-col>
@@ -320,6 +342,7 @@
                v-model="model.cuttingEdgeCount"
                :placeholder="disableSubmit ? '' : '请输入切削刃数'"
                :disabled="disableSubmit"
                @change="(e) => cuttingEdgeCountChange(e.target.value)"
              ></a-input>
            </a-form-model-item>
          </a-col>
@@ -337,11 +360,14 @@
        <a-row :gutter="24">
          <a-col :span="6">
            <a-form-model-item label="夹固型式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clampingType">
              <a-input
             <j-dict-select-tag
                type="list"
                v-model="model.clampingType"
                :placeholder="disableSubmit ? '' : '请输入夹固型式'"
                :triggerChange="true"
                dictCode="clamping_type"
                placeholder="请选择夹固型式"
                :disabled="disableSubmit"
              ></a-input>
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
@@ -350,16 +376,20 @@
                v-model="model.noseAngleR"
                :placeholder="disableSubmit ? '' : '请输入刀尖R'"
                :disabled="disableSubmit"
                @change="(e) => noseAngleRChange(e.target.value)"
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item label="刀片材料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial">
              <a-input
              <j-dict-select-tag
                type="list"
                v-model="model.toolMaterial"
                :placeholder="disableSubmit ? '' : '请输入刀片材料'"
                :triggerChange="true"
                dictCode="tool_material"
                placeholder="请选择刀片材料"
                :disabled="disableSubmit"
              ></a-input>
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
@@ -402,8 +432,8 @@
          <a-col :span="6">
            <a-form-model-item
              label="附加技术条件说明"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              :labelCol="{ span: 12 }"
              :wrapperCol="{ span: 12 }"
              prop="conditionsInfo"
            >
              <a-input
@@ -435,11 +465,14 @@
          </a-col>
          <a-col :span="6">
            <a-form-model-item label="制式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="types">
              <a-input
              <j-dict-select-tag
                type="list"
                v-model="model.types"
                :placeholder="disableSubmit ? '' : '请输入制式'"
                :triggerChange="true"
                dictCode="types"
                placeholder="请选择制式"
                :disabled="disableSubmit"
              ></a-input>
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
@@ -464,11 +497,14 @@
        <a-row>
          <a-col :span="6">
            <a-form-model-item label="切削方向" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuttingDirection">
              <a-input
              <j-dict-select-tag
                type="list"
                v-model="model.cuttingDirection"
                :placeholder="disableSubmit ? '' : '请输入切削方向'"
                :triggerChange="true"
                dictCode="cutting_direction"
                placeholder="请选择切削方向"
                :disabled="disableSubmit"
              ></a-input>
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
@@ -491,22 +527,28 @@
          </a-col>
          <a-col :span="6">
            <a-form-model-item label="内外螺纹" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inOutThread">
              <a-input
              <j-dict-select-tag
                type="list"
                v-model="model.inOutThread"
                :placeholder="disableSubmit ? '' : '请输入内外螺纹'"
                :triggerChange="true"
                dictCode="in_out_thread"
                placeholder="请选择内外螺纹"
                :disabled="disableSubmit"
              ></a-input>
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="6">
            <a-form-model-item label="螺纹标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threadStandard">
              <a-input
             <j-dict-select-tag
                type="list"
                v-model="model.threadStandard"
                :placeholder="disableSubmit ? '' : '请输入螺纹标准'"
                :triggerChange="true"
                dictCode="tool_thread_standard"
                placeholder="请选择螺纹标准"
                :disabled="disableSubmit"
              ></a-input>
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
@@ -530,8 +572,8 @@
          <a-col :span="6">
            <a-form-model-item
              label="最小加工内螺纹公称直径"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              :labelCol="{ span: 15 }"
              :wrapperCol="{ span: 9 }"
              prop="minInternalThread"
            >
              <a-input
@@ -612,12 +654,20 @@
        toolMaterial: [{ required: true, message: '请输入刀片材料' }],
        paintcoatFlag: [{ required: true, message: '请选择是否涂层' }],
        technicalConditions: [{ required: true, message: '请输入附加技术条件' }],
        shortCalled: [{ required: true, message: '请输入工具简称' }],
      },
      url: {
        add: '/tms/baseTools/add',
        edit: '/tms/baseTools/edit',
        queryParaByToolCode: '/tms/baseTools/queryByToolCode',
      },
      locationCodeOptions: [],
      chineseNameChange1: '',
      toolModelChange1: '',
      bladeShapeChange1: '',
      bladeLengthChange1: '',
      cuttingEdgeCountChange1: '',
      noseAngleRChange1: '',
    }
  },
  created() {
@@ -637,8 +687,8 @@
      this.editable = false
      //初始化默认值
      this.model = {
        positionCode: ''
      };
        positionCode: '',
      }
      this.model.classifyId = nodeSelected.key
      this.model.classifyNum = nodeSelected.entity.classifyId
      this.model.classifyName = nodeSelected.entity.typeName
@@ -648,12 +698,33 @@
    edit(record) {
      this.editable = true
      this.model = Object.assign({}, record)
      this.chineseNameChange1 = record.chineseName
      this.toolModelChange1 = '-' + record.toolModel
      this.bladeShapeChange1 = '-' + record.bladeShape
      this.bladeLengthChange1 = '-' + record.bladeLength
      this.cuttingEdgeCountChange1 = '-' + record.cuttingEdgeCount
      this.noseAngleRChange1 = '-' + record.noseAngleR
      //通过id查询管理参数和参数数据
      // getAction(this.url.queryParaByToolCode, {
      //   toolCode: record.toolCodeId,
      //   paraTypeFlag: record.paraTypeFlag,
      // }).then((res) => {
      //   if (res.success) {
      //     this.model = Object.assign({}, res.result)
      //   }
      // })
      this.visible = true
    },
    close() {
      this.$emit('close')
      this.visible = false
      this.$refs.form.clearValidate()
      ;(this.chineseNameChange1 = ''),
        (this.toolModelChange1 = ''),
        (this.bladeShapeChange1 = ''),
        (this.bladeLengthChange1 = ''),
        (this.cuttingEdgeCountChange1 = ''),
        (this.noseAngleRChange1 = '')
    },
    positionCodeSearch() {
      let positionCode = []
@@ -727,6 +798,66 @@
        }
      })
    },
    chineseNameChange(chineseNameChange) {
      this.chineseNameChange1 = chineseNameChange
      this.model.groupCompanySign =
        this.chineseNameChange1 +
        this.toolModelChange1 +
        this.bladeShapeChange1 +
        this.bladeLengthChange1 +
        this.cuttingEdgeCountChange1 +
        this.noseAngleRChange1
    },
    toolModelChange(toolModelChange) {
      this.toolModelChange1 = toolModelChange == '' ? '' : '-' + toolModelChange
      this.model.groupCompanySign =
        this.chineseNameChange1 +
        this.toolModelChange1 +
        this.bladeShapeChange1 +
        this.bladeLengthChange1 +
        this.cuttingEdgeCountChange1 +
        this.noseAngleRChange1
    },
    bladeShapeChange(bladeShapeChange) {
      this.bladeShapeChange1 = bladeShapeChange == '' ? '' : '-' + bladeShapeChange
      this.model.groupCompanySign =
        this.chineseNameChange1 +
        this.toolModelChange1 +
        this.bladeShapeChange1 +
        this.bladeLengthChange1 +
        this.cuttingEdgeCountChange1 +
        this.noseAngleRChange1
    },
    bladeLengthChange(bladeLengthChange) {
      this.bladeLengthChange1 = bladeLengthChange == '' ? '' : '-' + bladeLengthChange
      this.model.groupCompanySign =
        this.chineseNameChange1 +
        this.toolModelChange1 +
        this.bladeShapeChange1 +
        this.bladeLengthChange1 +
        this.cuttingEdgeCountChange1 +
        this.noseAngleRChange1
    },
    cuttingEdgeCountChange(cuttingEdgeCountChange) {
      this.cuttingEdgeCountChange1 = cuttingEdgeCountChange == '' ? '' : '-' + cuttingEdgeCountChange
      this.model.groupCompanySign =
        this.chineseNameChange1 +
        this.toolModelChange1 +
        this.bladeShapeChange1 +
        this.bladeLengthChange1 +
        this.cuttingEdgeCountChange1 +
        this.noseAngleRChange1
    },
    noseAngleRChange(noseAngleRChange) {
      this.noseAngleRChange1 = noseAngleRChange == '' ? '' : '-' + noseAngleRChange
      this.model.groupCompanySign =
        this.chineseNameChange1 +
        this.toolModelChange1 +
        this.bladeShapeChange1 +
        this.bladeLengthChange1 +
        this.cuttingEdgeCountChange1 +
        this.noseAngleRChange1
    },
  },
}
</script>