src/views/eam/modules/equipmentNew/EquipmentModal.vue
@@ -79,6 +79,8 @@
              ></a-input>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="6">
            <a-form-model-item
              label="规格"
@@ -120,6 +122,8 @@
              ></j-image-upload>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-divider
            orientation="center"
            style="font-size: large;font-style: italic;color: #66aeed;"
@@ -179,6 +183,42 @@
          </a-col>
          <a-col :span="6">
            <a-form-model-item
              label="车间"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="factoryModelId"
            >
              <j-dict-select-tag
                allow-clear
                :disabled="formDisabled"
                placeholder="请选择资车间"
                :triggerChange="true"
                dictCode="mom_base_factory_model,name,id,del_flag!='1'"
                v-model="model.factoryModelId"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="6">
            <a-form-model-item
              label="产线"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="workCenterId"
            >
              <j-dict-select-tag
                allow-clear
                :disabled="formDisabled"
                placeholder="请选择产线"
                :triggerChange="true"
                dictCode="mom_base_work_center,name,id,del_flag!='1'"
                v-model="model.workCenterId"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item
              label="资产制造商"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
@@ -194,27 +234,12 @@
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-divider
            orientation="center"
            style="font-size: large;font-style: italic;color: #66aeed;"
          >状态及标识</a-divider>
          <a-col :span="6">
            <a-form-model-item
              label="关键设备标识"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="specificEquipment"
            >
              <j-dict-select-tag
                allow-clear
                placeholder="请选择关键设备标识"
                :disabled="formDisabled"
                :triggerChange="true"
                dictCode="specific_equipment"
                v-model="model.specificEquipment"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item
              label="设备状态"
@@ -249,6 +274,51 @@
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item
              label="资产状态"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="propertyStatus"
            >
              <j-dict-select-tag
                allow-clear
                :disabled="formDisabled"
                placeholder="请输入资产状态"
                :triggerChange="true"
                dictCode="property_status"
                v-model="model.propertyStatus"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row v-if="model.propertyStatus=='warranty'">
          <a-divider
            orientation="center"
            style="font-size: large;font-style: italic;color: #66aeed;"
          >质保日期</a-divider>
          <a-col :span="6">
            <a-form-model-item
              label="质保开始日期"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="warrantyStart"
            >
            <j-date  :disabled="formDisabled" style="width: 100%;" placeholder="请选择开始日期" class="query-group-cust" v-model="model.warrantyStart"></j-date>
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item
              label="质保结束日期"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="warrantyEnd"
            >
            <j-date  :disabled="formDisabled" style="width: 100%;" placeholder="请选择结束日期" class="query-group-cust" v-model="model.warrantyEnd"></j-date>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-divider
            orientation="center"
            style="font-size: large;font-style: italic;color: #66aeed;"
@@ -282,6 +352,7 @@
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item
              label="验收日期"
@@ -311,6 +382,8 @@
              ></a-input>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="6">
            <a-form-model-item
              label="工区"
@@ -339,6 +412,7 @@
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item
              label="重量计量单位"
@@ -367,6 +441,8 @@
              ></a-input>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="6">
            <a-form-model-item
              label="功能位置"
@@ -395,6 +471,7 @@
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
            <a-form-model-item
              label="资产来源国家"
@@ -479,6 +556,8 @@
              ></a-input>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="6">
            <a-form-model-item
              label="系统"
@@ -540,6 +619,8 @@
            orientation="center"
            style="font-size: large;font-style: italic;color: #66aeed;"
          >ABC标识</a-divider>
        </a-row>
        <a-row>
          <a-col :span="6">
            <a-form-model-item
              label="平均使用率"
@@ -612,6 +693,8 @@
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="6">
            <a-form-model-item
              label="故障频率"
@@ -661,10 +744,30 @@
                placeholder="请选择ABC标识"
                :triggerChange="true"
                dictCode="ABC-standard-result"
                @change="changeNeedSpecific"
                v-model="model.equipmentImportanceId"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="6" v-if="needSpecific">
            <a-form-model-item
              label="关键设备标识"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="specificEquipment"
            >
              <j-dict-select-tag
                allow-clear
                placeholder="请选择关键设备标识"
                :disabled="formDisabled"
                :triggerChange="true"
                dictCode="specific_equipment"
                v-model="model.specificEquipment"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-divider
            orientation="center"
            style="font-size: large;font-style: italic;color: #66aeed;"
@@ -847,6 +950,21 @@
        technologyStatus:[
        { required: true, message: '请选择设备状态!' },
        ],
        workCenterId:[
        { required: true, message: '请选择设备产线!' },
        ],
        factoryModelId:[
        { required: true, message: '请选择设备车间!' },
        ],
        warrantyStart:[
        { required: true, message: '请选择开始日期!' },
        ],
        warrantyEnd:[
        { required: true, message: '请选择结束日期!' },
        ],
        propertyStatus:[
        { required: true, message: '请选择资产状态!' },
        ],
      },
      url: {
        add: "/eam/equipment/add",
@@ -854,6 +972,7 @@
        loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
      },
      treeData: [],
      needSpecific:false,
    }
  },
@@ -864,6 +983,7 @@
  },
  methods: {
    add() {
      this
      this.edit(this.modelDefault);
    },
    edit(record) {
@@ -1044,6 +1164,25 @@
      }
      this.model = Object.assign({}, this.model);
    },
    changeNeedSpecific(val){
       if(val=='A'){
          this.needSpecific=true;
       }else{
        let that = this;
        this.$confirm({
            title: '提示',
            content: '非A类设备,是否要添加关键设备标识!',
            okText: '确认',
            cancelText: '取消',
            onOk() {
              that.needSpecific = true;
            },
            onCancel(){
              that.needSpecific = false;
            }
        })
       }
    }
  },
  computed: {