Merge remote-tracking branch 'origin/material-ui' into material-ui
This commit is contained in:
		
						commit
						4f3eff18c7
					
				| 
						 | 
				
			
			@ -139,7 +139,7 @@
 | 
			
		|||
                  :options="uniteList" :normalizer="normalizer"
 | 
			
		||||
                  :show-count="true"  style="width: 100%;" :disable-branch-nodes="true"
 | 
			
		||||
                  noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
 | 
			
		||||
                  placeholder="请选择租赁单位"
 | 
			
		||||
                  placeholder="请选择租赁单位" @select="unitSelect"
 | 
			
		||||
              />
 | 
			
		||||
              <!-- <el-cascader
 | 
			
		||||
                v-model="unitId"
 | 
			
		||||
| 
						 | 
				
			
			@ -193,7 +193,7 @@
 | 
			
		|||
              ></el-cascader> -->
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
 | 
			
		||||
          
 | 
			
		||||
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-form-item label="联系电话" prop="phone">
 | 
			
		||||
| 
						 | 
				
			
			@ -219,6 +219,18 @@
 | 
			
		|||
              />
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-form-item label="开始日期" prop="planStartTime">
 | 
			
		||||
              <el-date-picker
 | 
			
		||||
                style="width: 100%"
 | 
			
		||||
                v-model="form.planStartTime"
 | 
			
		||||
                value-format="yyyy-MM-dd"
 | 
			
		||||
                type="date"
 | 
			
		||||
                placeholder="请选择开始日期"
 | 
			
		||||
                :disabled="isEdits"
 | 
			
		||||
              ></el-date-picker>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col> 
 | 
			
		||||
 | 
			
		||||
<!--          <el-col :span="12">
 | 
			
		||||
            <el-form-item label="租赁期限(天)" prop="leaseDay">
 | 
			
		||||
| 
						 | 
				
			
			@ -233,22 +245,16 @@
 | 
			
		|||
              />
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>-->
 | 
			
		||||
        </el-row>
 | 
			
		||||
 | 
			
		||||
        </el-row> 
 | 
			
		||||
        <el-row>
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-form-item label="开始日期" prop="planStartTime">
 | 
			
		||||
              <el-date-picker
 | 
			
		||||
                style="width: 100%"
 | 
			
		||||
                v-model="form.planStartTime"
 | 
			
		||||
                value-format="yyyy-MM-dd"
 | 
			
		||||
                type="date"
 | 
			
		||||
                placeholder="请选择开始日期"
 | 
			
		||||
                :disabled="isEdits"
 | 
			
		||||
              ></el-date-picker>
 | 
			
		||||
            <el-form-item label="租赁单位类型">
 | 
			
		||||
              <el-select style="width: 100%;" v-model="form.protocol" placeholder="请选择租赁单位类型" clearable :disabled="isEdits">
 | 
			
		||||
                <el-option label="内部单位" value="1"></el-option>
 | 
			
		||||
                <el-option label="外部单位" value="2"></el-option>
 | 
			
		||||
              </el-select>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
 | 
			
		||||
          </el-col> 
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-form-item label="备注" prop="remark">
 | 
			
		||||
              <el-input
 | 
			
		||||
| 
						 | 
				
			
			@ -260,19 +266,7 @@
 | 
			
		|||
              />
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
 | 
			
		||||
        <el-row>
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-form-item label="租赁单位类型">
 | 
			
		||||
              <el-select style="width: 100%;" v-model="form.protocol" placeholder="请选择租赁单位类型" clearable :disabled="isEdits">
 | 
			
		||||
                <el-option label="内部单位" value="1"></el-option>
 | 
			
		||||
                <el-option label="外部单位" value="2"></el-option>
 | 
			
		||||
              </el-select>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
 | 
			
		||||
        </el-row>  
 | 
			
		||||
        <el-form-item label="营业执照">
 | 
			
		||||
          <el-upload
 | 
			
		||||
            class="upload-demo"
 | 
			
		||||
| 
						 | 
				
			
			@ -484,33 +478,23 @@ export default {
 | 
			
		|||
    return {
 | 
			
		||||
      uploadKey: Date.now(),
 | 
			
		||||
      // 遮罩层
 | 
			
		||||
      loading: false,
 | 
			
		||||
 | 
			
		||||
      loadingTwo: false,
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      loading: false, 
 | 
			
		||||
      loadingTwo: false, 
 | 
			
		||||
      // 是否显示项目部Id
 | 
			
		||||
      showName: false,
 | 
			
		||||
 | 
			
		||||
      showName: false, 
 | 
			
		||||
      // 是否显示施工预警信息
 | 
			
		||||
      showWarn: false,
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      showWarn: false, 
 | 
			
		||||
      // 非单个禁用
 | 
			
		||||
      single: true,
 | 
			
		||||
      // 非多个禁用
 | 
			
		||||
      multiple: true,
 | 
			
		||||
 | 
			
		||||
      multiple: true, 
 | 
			
		||||
      // 日期范围
 | 
			
		||||
      dateRange: [],
 | 
			
		||||
 | 
			
		||||
      dateRange: [], 
 | 
			
		||||
      // 显示搜索条件
 | 
			
		||||
      showSearch: true,
 | 
			
		||||
      showHouse: false,
 | 
			
		||||
      showSee: false,
 | 
			
		||||
      showAllImg: false,
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      showAllImg: false, 
 | 
			
		||||
      // 总条数
 | 
			
		||||
      total: 0,
 | 
			
		||||
      totalTwo: 0,
 | 
			
		||||
| 
						 | 
				
			
			@ -530,8 +514,7 @@ export default {
 | 
			
		|||
      maForm: {
 | 
			
		||||
        unitId: undefined,
 | 
			
		||||
        projectId: undefined
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      }, 
 | 
			
		||||
      // 工程数据
 | 
			
		||||
      projectList: [],
 | 
			
		||||
      // 施工记录表格数据
 | 
			
		||||
| 
						 | 
				
			
			@ -566,7 +549,8 @@ export default {
 | 
			
		|||
      form: {
 | 
			
		||||
        unitId:null,
 | 
			
		||||
        projectId:null,
 | 
			
		||||
      },
 | 
			
		||||
        protocol:'1'
 | 
			
		||||
      }, 
 | 
			
		||||
      // 表单校验
 | 
			
		||||
      rules: {
 | 
			
		||||
        unitId: [
 | 
			
		||||
| 
						 | 
				
			
			@ -583,7 +567,13 @@ export default {
 | 
			
		|||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
 | 
			
		||||
        contractCode: [
 | 
			
		||||
          {
 | 
			
		||||
            required: false,//是否分包商(是:合同编号必填)
 | 
			
		||||
            message: '请填写合同编号',
 | 
			
		||||
            trigger: 'change'
 | 
			
		||||
          }
 | 
			
		||||
        ],
 | 
			
		||||
        authPerson: [
 | 
			
		||||
          {
 | 
			
		||||
            required: true,
 | 
			
		||||
| 
						 | 
				
			
			@ -807,7 +797,14 @@ export default {
 | 
			
		|||
        this.projectList = response.data;
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    unitSelect(e){
 | 
			
		||||
      console.log(e)
 | 
			
		||||
      if(e.typeKey=='fbs'){ 
 | 
			
		||||
        this.rules['contractCode'][0].required=true; 
 | 
			
		||||
      }else{ 
 | 
			
		||||
        this.rules['contractCode'][0].required=false;
 | 
			
		||||
      } 
 | 
			
		||||
    },
 | 
			
		||||
    uniteChange(val) {
 | 
			
		||||
      if (val && val.length > 0) {
 | 
			
		||||
        this.maForm.unitId = this.unitId[this.unitId.length - 1];
 | 
			
		||||
| 
						 | 
				
			
			@ -964,7 +961,16 @@ export default {
 | 
			
		|||
 | 
			
		||||
    // 表单重置
 | 
			
		||||
    reset() {
 | 
			
		||||
      this.form = {};
 | 
			
		||||
      this.form = {
 | 
			
		||||
        unitId:null,
 | 
			
		||||
        projectId:null,
 | 
			
		||||
        authPerson:"",
 | 
			
		||||
        phone:'',
 | 
			
		||||
        contractCode:'',
 | 
			
		||||
        planStartTime:'',
 | 
			
		||||
        protocol:"1",
 | 
			
		||||
        remark:'',
 | 
			
		||||
      };
 | 
			
		||||
      this.unitId = null;
 | 
			
		||||
      this.projectId = null;
 | 
			
		||||
      this.maForm = {
 | 
			
		||||
| 
						 | 
				
			
			@ -1006,15 +1012,14 @@ export default {
 | 
			
		|||
              await this.editAgreementTemp(this.form);
 | 
			
		||||
              await this.deleteFile();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
          } else {
 | 
			
		||||
            console.log(1)
 | 
			
		||||
            if (this.businessLicenseListTemp.length != 0) {
 | 
			
		||||
              console.log(2)
 | 
			
		||||
              // console.log(2)
 | 
			
		||||
              await this.getImaUpload(),
 | 
			
		||||
                await this.addAgreementTemp(this.form);
 | 
			
		||||
            } else {
 | 
			
		||||
              console.log(3)
 | 
			
		||||
              // console.log(3)
 | 
			
		||||
              await this.addAgreementTemp(this.form);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -176,13 +176,7 @@
 | 
			
		|||
                        v-model.number="scope.row.purchaseNum"
 | 
			
		||||
                        controls-position="right" type="number"
 | 
			
		||||
                        style="width: 100%" :disabled="scope.row.status!=1&&scope.row.status!=12"
 | 
			
		||||
                        :min="0"
 | 
			
		||||
                        @input="
 | 
			
		||||
                            v =>
 | 
			
		||||
                                scope.row.unitValue == 1
 | 
			
		||||
                                    ? (scope.row.purchaseNum = Number(v.replace(/[^\d.]/g, '')))
 | 
			
		||||
                                    : (scope.row.purchaseNum = Number(v.replace(/[^\d]/g, '')))
 | 
			
		||||
                        "
 | 
			
		||||
                        :min="0" @input="v =>scope.row.unitValue == 1? (scope.row.purchaseNum = Number(v.replace(/[^\d.]/g, ''))): (scope.row.purchaseNum = Number(v.replace(/[^\d]/g, '')))"
 | 
			
		||||
                    ></el-input>
 | 
			
		||||
                </template>
 | 
			
		||||
            </el-table-column>
 | 
			
		||||
| 
						 | 
				
			
			@ -623,8 +617,7 @@ export default {
 | 
			
		|||
        },
 | 
			
		||||
        // 处理类型数据
 | 
			
		||||
        processTypeData(data) {
 | 
			
		||||
            const result = []
 | 
			
		||||
 | 
			
		||||
            const result = [] 
 | 
			
		||||
            const traverse = (node, parents = []) => {
 | 
			
		||||
                const path = [...parents, node.typeName]
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -638,7 +631,8 @@ export default {
 | 
			
		|||
                        maTypeName: parents[parents.length - 1] || '',
 | 
			
		||||
                        specificationType: node.typeName,
 | 
			
		||||
                        unitName: node.unitName,
 | 
			
		||||
                        unitValue: node.unitValue
 | 
			
		||||
                        unitValue: node.unitValue,
 | 
			
		||||
                        rentPrice: node.rentPrice,
 | 
			
		||||
                    })
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -664,8 +658,7 @@ export default {
 | 
			
		|||
        },
 | 
			
		||||
        // 选择变化处理
 | 
			
		||||
        handleTypeChange(val) {
 | 
			
		||||
            if (!val || val.length === 0) return
 | 
			
		||||
 | 
			
		||||
            if (!val || val.length === 0) return 
 | 
			
		||||
            // 获取新选中的项
 | 
			
		||||
            const lastSelected = val[val.length - 1]
 | 
			
		||||
            const typeData = this.flattenTypeOptions.find(item => item.typeId === lastSelected)
 | 
			
		||||
| 
						 | 
				
			
			@ -681,10 +674,25 @@ export default {
 | 
			
		|||
                    this.$message.error('所选物资规格类型暂时无库存,无法申请!')
 | 
			
		||||
                    this.tempDeviceType = this.tempDeviceType.filter(id => id !== lastSelected)
 | 
			
		||||
                } else {
 | 
			
		||||
                    console.log(typeData,"typeData")
 | 
			
		||||
                    if(typeData.rentPrice>0){//判断是否有租赁价格:有禁用;无修改;
 | 
			
		||||
                        typeData.rentPriceDisabled=true
 | 
			
		||||
                    }else{
 | 
			
		||||
                        typeData.rentPriceDisabled=false
 | 
			
		||||
                    }
 | 
			
		||||
                    // 将新项添加到数组开头,实现倒序
 | 
			
		||||
                    this.equipmentList.unshift({
 | 
			
		||||
                        ...typeData,
 | 
			
		||||
                        preNum: 0
 | 
			
		||||
                        preNum: 0,
 | 
			
		||||
                        createTime: null,
 | 
			
		||||
                        productionTime: this.maForm.productionTime,
 | 
			
		||||
                        purchaseTaxPrice: 0,
 | 
			
		||||
                        purchaseTaxPrice: 0,
 | 
			
		||||
                        purchaseNum : 1,
 | 
			
		||||
                        fixCode: '0',
 | 
			
		||||
                        status:1,
 | 
			
		||||
                        bmFileInfos:[]
 | 
			
		||||
                        
 | 
			
		||||
                    })
 | 
			
		||||
                    this.deviceType.push(lastSelected)
 | 
			
		||||
                    this.$message({
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue