cuijian
8 小时以前 135b5b2e497514dc4456e33b0db0fe5e7fa4e62f
src/views/tms/modules/baseTools/ParaThreadingToolModal.vue
@@ -59,7 +59,7 @@
                  <a-col :span="24">
                    <a-form-model-item prop="chineseName"
                                      label="中文名称">
                      <a-input :placeholder="disableSubmit?'':'请输入中文名称'" v-model="model.chineseName" :disabled="disableSubmit"/>
                      <a-input :placeholder="disableSubmit?'':'请输入中文名称'" v-model="model.chineseName" :disabled="disableSubmit" @change="e => chineseNameChange(e.target.value)"/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
@@ -75,7 +75,7 @@
                  <a-col :span="24">
                    <a-form-model-item prop="toolModel"
                                      label="型号/图号">
                      <a-input :placeholder="disableSubmit?'':'请输入型号/图号'" v-model="model.toolModel" :disabled="disableSubmit" />
                      <a-input :placeholder="disableSubmit?'':'请输入型号/图号'" v-model="model.toolModel" :disabled="disableSubmit" @change="e => toolModelChange(e.target.value)"/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
@@ -123,7 +123,7 @@
           <a-col :span="8">
                <a-form-model-item prop="applicationType"
                                   label="工具类型">
                  <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'请选择工具类型'"
                  <j-dict-select-tag dict-code="application_type" :placeholder="disableSubmit?'':'请选择工具类型'"
                                     v-model="model.applicationType" :disabled="disableSubmit" />
                </a-form-model-item>
              </a-col>
@@ -156,11 +156,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?'':'请输入最低库存'" v-model="model.lowerInventory" :disabled="disableSubmit"/>
            </a-form-model-item>
@@ -170,9 +165,6 @@
              <a-input :placeholder="disableSubmit?'':'请输入最高库存'" v-model="model.highestInventory" :disabled="disableSubmit"/>
            </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 v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'请选择是否有计量辅单位'" :disabled="disableSubmit">
@@ -181,6 +173,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 :placeholder="disableSubmit?'':'请输入计量主单位'" v-model="model.mainUnit" :disabled="disableSubmit"/>
@@ -191,14 +186,14 @@
              <a-input :placeholder="disableSubmit?'':'请输入计量辅单位'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/>
            </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 :placeholder="disableSubmit?'':'请输入厂家'" v-model="model.supplierId" :disabled="disableSubmit"/>
            </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 :placeholder="disableSubmit?'':'请输入单价'" v-model="model.price" :disabled="disableSubmit"/>
@@ -216,13 +211,41 @@
        <a-row :gutter="24">
          <a-col :span="6">
            <a-form-model-item label="工具简称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shortCalled">
              <a-input
                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="threadCode">
              <a-input v-model="model.threadCode" :placeholder="disableSubmit?'':'请输入螺纹代号'"  :disabled="disableSubmit"></a-input>
              <a-input v-model="model.threadCode" :placeholder="disableSubmit?'':'请输入螺纹代号'"  :disabled="disableSubmit" @change="e => threadCodeChange(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="pitch">
              <a-input v-model="model.pitch" :placeholder="disableSubmit?'':'请输入螺距'"  :disabled="disableSubmit"></a-input>
              <a-input v-model="model.pitch" :placeholder="disableSubmit?'':'请输入螺距'"  :disabled="disableSubmit" @change="e => pitchChange(e.target.value)"></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
@@ -231,7 +254,7 @@
            </a-form-model-item>
          </a-col>
           <a-col :span="6">
            <a-form-model-item label="螺纹公差带代号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tolerancezoneLevel">
            <a-form-model-item label="螺纹公差带代号" :labelCol="{span:12}" :wrapperCol="{span:12}" prop="tolerancezoneLevel">
              <a-input v-model="model.tolerancezoneLevel" :placeholder="disableSubmit?'':'请输入螺纹公差带代号'"  :disabled="disableSubmit"></a-input>
            </a-form-model-item>
          </a-col>
@@ -283,13 +306,13 @@
              <a-input v-model="model.technicalConditions" :placeholder="disableSubmit?'':'请输入附加技术条件'" :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="conditionsInfo">
            <a-form-model-item label="附加技术条件说明" :labelCol="{span:12}" :wrapperCol="{span:12}" prop="conditionsInfo">
              <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'请输入附加技术条件说明'" :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="brand">
              <a-input v-model="model.brand" :placeholder="disableSubmit?'':'请输入品牌'" :disabled="disableSubmit" ></a-input>
@@ -305,13 +328,13 @@
              <a-input v-model="model.coolingMethod" :placeholder="disableSubmit?'':'请输入冷却方式'" :disabled="disableSubmit" ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
        </a-row>
        <a-row>
           <a-col :span="6">
            <a-form-model-item label="螺纹标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threadStandard">
              <a-input v-model="model.threadStandard" :placeholder="disableSubmit?'':'请输入螺纹标准'" :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="fluteSoltType">
              <a-input v-model="model.fluteSoltType" :placeholder="disableSubmit?'':'请输入排屑槽型'" :disabled="disableSubmit" ></a-input>
@@ -327,13 +350,13 @@
              <a-input v-model="model.guidingSize" :placeholder="disableSubmit?'':'请输入导向尺寸'" :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="connectionAperture">
              <a-input v-model="model.connectionAperture" :placeholder="disableSubmit?'':'请输入连接孔径'" :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="connectingKeyway">
              <a-input v-model="model.connectingKeyway" :placeholder="disableSubmit?'':'请输入连接键槽'" :disabled="disableSubmit" ></a-input>
@@ -446,7 +469,11 @@
        add: '/tms/baseTools/add',
        edit: '/tms/baseTools/edit',
      },
      locationCodeOptions:[]
      locationCodeOptions:[],
      chineseNameChange1:'',
      toolModelChange1:'',
      threadCodeChange1:'',
      pitchChange1:'',
    }
  },
  created() {
@@ -466,7 +493,7 @@
      this.editable = false;
      //初始化默认值
     this.model = {
        positionCode: ''
        positionCode: ''
      };
      this.model.classifyId = nodeSelected.key
      this.model.classifyNum = nodeSelected.entity.classifyId
@@ -483,6 +510,10 @@
      this.$emit('close')
      this.visible = false
      this.$refs.form.clearValidate()
      this.chineseNameChange1 = '',
      this.toolModelChange1 = '',
      this.threadCodeChange1 = '',
      this.pitchChange1 = ''
    },
    positionCodeSearch() {
      let positionCode = []
@@ -556,6 +587,22 @@
        }
      })
    },
    chineseNameChange(chineseNameChange){
      this.chineseNameChange1 = chineseNameChange
      this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.threadCodeChange1+this.pitchChange1
    },
    toolModelChange(toolModelChange){
      this.toolModelChange1 = toolModelChange == '' ? '' : '-'+toolModelChange
      this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.threadCodeChange1+this.pitchChange1
    },
    threadCodeChange(threadCodeChange){
      this.threadCodeChange1 = threadCodeChange == '' ? '' : '-'+threadCodeChange
      this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.threadCodeChange1+this.pitchChange1
    },
    pitchChange(pitchChange){
      this.pitchChange1 = pitchChange == '' ? '' : '-'+pitchChange
      this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.threadCodeChange1+this.pitchChange1
    }
  }
}
</script>