licp
2024-05-31 d49c28b6dc4b4dd363ec699ecc8a1a51983a10f9
对接原始工时接口
已修改5个文件
134 ■■■■ 文件已修改
src/assets/api/controller.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/fiberoptic-config.vue 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b3-work-time-management/work-time-statistics.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tool/value-table.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -29,7 +29,8 @@
    auxiliaryOutputWorkingHours,
    auxiliaryWorkingHoursDay,
    auxiliaryCorrectionHours,
    insBushing
    insBushing,
    auxiliaryOriginalHours,
  }
}
@@ -334,3 +335,7 @@
const insBushing = {
  selectBushingBySampleId: "/insBushing/selectBushingBySampleId", //通过样品id获取样品下光纤配置内容
}
const auxiliaryOriginalHours = {
  selectAuxiliaryOriginalHours: "/auxiliaryOriginalHours/selectAuxiliaryOriginalHours", //查询原始工时
}
src/components/do/b1-ins-order/add.vue
@@ -541,7 +541,7 @@
        </el-row>
      </span>
    </el-dialog>
    <fiberOpticConfig :currentId="currentId" v-if="configShow"/>
    <fiberOpticConfig :currentId="currentId" v-if="configShow" :active="active"/>
  </div>
</template>
src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -4,7 +4,7 @@
      <el-row class="title">
        <el-col :span="6" style="padding-left: 20px;">光纤配置</el-col>
        <el-col :span="18" style="text-align: right;">
          <el-button size="medium" type="primary" @click="save" :loading="saveLoad">保 存</el-button>
          <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-if="active==1">保 存</el-button>
          <el-button size="medium" @click="outConfig">
            <span style="color: #3A7BFA;">返 回</span>
          </el-button>
@@ -22,7 +22,7 @@
                <label style="width: 70px;">样品型号</label>
                <span style="font-size: 14px;">{{models}}</span>
              </div>
              <el-radio-group v-model="packageInfo.radio" size="small" @change="upNum()">
              <el-radio-group v-model="packageInfo.radio" size="small" @change="upNum()" :disabled="active!=1">
                <el-radio :label="0">全检</el-radio>
                <el-radio :label="1">抽检</el-radio>
              </el-radio-group>
@@ -31,25 +31,29 @@
              style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 8px;padding: 0 12px;box-sizing: border-box;">
              <div class="search-item" style="margin-right: 10px;">
                <label>套管数目</label>
                <el-input v-model="packageInfo.num1" placeholder="请输入" size="small" @change="upNum"></el-input>
                <el-input v-model="packageInfo.num1" placeholder="请输入" size="small" @change="upNum" :disabled="active!=1"></el-input>
              </div>
              <div class="search-item" style="margin-right: 10px;">
                <label style="width: 70px;">标准量</label>
                <el-input v-model="packageInfo.standNum" placeholder="请输入" size="small" @change="upNum"></el-input>
                <el-input v-model="packageInfo.standNum" placeholder="请输入" size="small" @change="upNum" :disabled="active!=1"></el-input>
              </div>
              <div class="search-item">
                <label style="width: 70px;">检测量</label>
                <el-input v-model="packageInfo.testNum" placeholder="请输入" size="small" @change="upNum"
                  :disabled="packageInfo.radio===0"></el-input>
                  :disabled="packageInfo.radio===0||active!=1"></el-input>
              </div>
            </div>
            <el-table ref="table0" :data="bushing" tooltip-effect="dark" style="width: 100%" height="203px" size="small"
              @selection-change="handleSelectionChange1">
              <el-table-column type="selection" width="45">
              @selection-change="handleSelectionChange1"
              :header-cell-class-name="setClassName0">
              <el-table-column
              type="selection"
              width="45"
              :selectable="()=>(active==1)">
              </el-table-column>
              <el-table-column label="管色标" show-overflow-tooltip>
                <template slot-scope="scope">
                  <el-select v-model="scope.row.color" size="mini">
                  <el-select v-model="scope.row.color" size="mini" :disabled="active!=1">
                    <el-option v-for="(color,i) in colors" :key="i" :label="color.lable"
                      :value="color.value"></el-option>
                  </el-select>
@@ -74,7 +78,7 @@
              @select="upProductSelect"
              >
              <el-table-column type="selection" width="55"
              :selectable="()=>(currentDetectionItems||this.multiFiberList.length > 0)">
              :selectable="()=>((currentDetectionItems||this.multiFiberList.length > 0)&&active==1)">
              </el-table-column>
              <el-table-column label="实验室" show-overflow-tooltip prop="sonLaboratory" ></el-table-column>
              <el-table-column prop="inspectionItem" label="检验项" show-overflow-tooltip>
@@ -91,7 +95,8 @@
              </el-table-column>
              <el-table-column prop="ask" label="检测要求" show-overflow-tooltip width="200px">
                <template slot-scope="scope">
                  <el-input v-model="scope.row.ask" placeholder="请输入" size="small"></el-input>
                  <el-input v-model="scope.row.ask" placeholder="请输入" size="small" :disabled="active!=1" v-if="!isAskOnlyRead"></el-input>
                  <span v-else>{{ scope.row.ask }}</span>
                </template>
              </el-table-column>
            </el-table>
@@ -103,15 +108,15 @@
          <div class="grid-content">
            <h5>光纤带
              <el-button size="mini" type="primary" class="btns" @click="addFibers"
                :disabled="packageInfo.ismiers===false||miresModel===null||miresStandard===null">生成光纤带</el-button>
              <el-button size="mini" class="btns" @click="clearFibers" :disabled="selectBushing.length === 0">清除</el-button>
                :disabled="packageInfo.ismiers===false||miresModel===null||miresStandard===null" v-if="active==1">生成光纤带</el-button>
              <el-button size="mini" class="btns" @click="clearFibers" :disabled="selectBushing.length === 0" v-if="active==1">清除</el-button>
            </h5>
            <div
              style="display: flex;align-items: center;justify-content: space-between;margin:4px 0 6px 0;padding: 0 12px;box-sizing: border-box;">
              <div class="search-item" style="width: 50%;margin-right: 16px;">
                <label style="width: 80px;">纤带类型</label>
                <el-select v-model="miresModel" placeholder="请选择" size="small" style="width: 100%;"
                  :disabled="selectBushing.length===0">
                  :disabled="selectBushing.length===0||active!=1">
                  <el-option v-for="(item,a) in miresModels" :key="a" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
@@ -119,7 +124,7 @@
              <div class="search-item" style="width: 50%;">
                <label style="width: 80px;">参考标准</label>
                <el-select v-model="miresStandard" placeholder="请选择" size="small" style="width: 100%;"
                  :disabled="miresModel===null" @focus="selectsStandardMethodByFLSSM2()"
                  :disabled="miresModel===null||active!=1" @focus="selectsStandardMethodByFLSSM2()"
                  @change="(value)=>methodChange2(value)">
                  <el-option v-for="item in miresStandards" :key="item.id" :label="item.code" :value="item.id">
                  </el-option>
@@ -127,8 +132,12 @@
              </div>
            </div>
            <el-table ref="table2" :data="fibersList" tooltip-effect="dark" style="width: 100%" height="270px"
              size="small" @selection-change="handleSelectionChange" highlight-current-row @row-click="rowClickFiber">
              <el-table-column type="selection" width="55">
              size="small" @selection-change="handleSelectionChange" highlight-current-row @row-click="(row, column, event)=>rowClickFiber(row, column, event,0)"
              :header-cell-class-name="setClassName0">
              <el-table-column
              type="selection"
              width="55"
              :selectable="()=>(active==1)">
              </el-table-column>
              <el-table-column prop="code" label="光纤带编号" show-overflow-tooltip align="center">
              </el-table-column>
@@ -144,13 +153,13 @@
        <el-col :span="12">
          <div class="grid-content">
            <h5>光纤<el-button size="mini" type="primary" class="btns" @click="addFiber"
                :disabled="mireModel===null||mireStandard===null">光纤配色</el-button></h5>
                :disabled="mireModel===null||mireStandard===null" v-if="active==1">光纤配色</el-button></h5>
            <div
              style="display: flex;align-items: center;justify-content: space-between;margin: 4px 0 6px 0;padding: 0 12px;box-sizing: border-box;">
              <div class="search-item" style="width: 50%;margin-right: 16px;">
                <label style="width: 80px;">光纤类型</label>
                <el-select v-model="mireModel" placeholder="请选择" size="small" style="width: 100%;"
                  :disabled="selectBushing.length===0">
                  :disabled="selectBushing.length===0||active!=1">
                  <el-option v-for="(item,a) in mireModels" :key="a" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
@@ -158,7 +167,7 @@
              <div class="search-item" style="width: 50%;">
                <label style="width: 80px;">参考标准</label>
                <el-select v-model="mireStandard" placeholder="请选择" size="small" style="width: 100%;"
                  :disabled="mireModel===null" @focus="selectsStandardMethodByFLSSM()"
                  :disabled="mireModel===null||active!=1" @focus="selectsStandardMethodByFLSSM()"
                  @change="(value)=>methodChange(value)" :loading="mireStandardLoading">
                  <el-option v-for="item in mireStandards" :key="item.id" :label="item.code" :value="item.id">
                  </el-option>
@@ -167,14 +176,18 @@
            </div>
            <el-table ref="table3" :data="fiberList" tooltip-effect="dark" style="width: 100%" height="270px"
              size="small" highlight-current-row @selection-change="handleSelectionChange4"
              @row-click="rowClickFiber">
              <el-table-column type="selection" width="55">
              @row-click="(row, column, event)=>rowClickFiber(row, column, event,1)"
              :header-cell-class-name="setClassName0">
              <el-table-column
              type="selection"
              width="55"
              :selectable="()=>(active==1)">
              </el-table-column>
              <el-table-column prop="bushColor" label="管套色标" width="90" align="center">
              </el-table-column>
              <el-table-column prop="color" label="光纤色标" width="120">
                <template slot-scope="scope">
                  <el-select v-model="scope.row.color" size="mini">
                  <el-select v-model="scope.row.color" size="mini" :disabled="active!=1">
                    <el-option v-for="(color,i) in colors" :key="i" :label="color.lable"
                      :value="color.value"></el-option>
                  </el-select>
@@ -194,6 +207,12 @@
<script>
  export default {
    props: {
      active: {
        type: Number,
        default: () => 0
      },
    },
    data() {
      return {
        saveLoad: false,
@@ -231,12 +250,13 @@
        detectionItems:[],
        currentDetectionItems:null,
        mireStandardLoading:false,
        multiFiberList:[]
        multiFiberList:[],
        isAskOnlyRead:true
      }
    },
    computed: {
      isAllDisabled() {
        return this.multiFiberList.length > 0||this.currentDetectionItems
        return this.multiFiberList.length > 0||this.currentDetectionItems||this.active!=1
      },
    },
    watch: {
@@ -525,7 +545,22 @@
          }
        })
      },
      rowClickFiber(row, column, event){
      rowClickFiber(row, column, event,type){
        if(type==0){
          let standard = this.miresStandards.find(a => a.id == this.miresStandard)
          if(standard&&standard.code=='委托要求'){
            this.isAskOnlyRead = false;
          }else{
            this.isAskOnlyRead = true;
          }
        }else{
          let standard = this.mireStandards.find(a => a.id == this.mireStandard)
          if(standard&&standard.code=='委托要求'){
            this.isAskOnlyRead = false;
          }else{
            this.isAskOnlyRead = true;
          }
        }
        this.currentDetectionItems = row
        this.detectionItems = row.productList
        if(this.detectionItems === null) return
@@ -620,6 +655,11 @@
          return 'all-disabled'
        }
      },
      setClassName0({ column }){
        if (column.type == 'selection' && this.active!=1) {
          return 'all-disabled'
        }
      },
      clearFibers(){
        this.packageInfo.ismiers = false
        this.fibersList = []
src/components/do/b3-work-time-management/work-time-statistics.vue
@@ -9,16 +9,19 @@
            type="month"
            format="yyyy-MM"
            value-format="yyyy-MM"
            placeholder="选择月" size="small" style="width: 100%;">
            placeholder="选择月" size="small" style="width: 100%;"
            :clearable="false">
          </el-date-picker>
        </div>
            </div>
            <div class="search_thing">
                <div class="search_label">员工:</div>
                <el-select v-model="entity.name" placeholder="全部" size="small" @change="refreshTable()">
                <!-- <el-select v-model="entity.name" placeholder="全部" size="small" @change="refreshTable()" clearable>
                    <el-option v-for="item in personList" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                </el-select>
                </el-select> -->
        <el-input size="small" placeholder="请输入" clearable
          v-model="entity.name" @keyup.enter.native="refreshTable()"></el-input>
            </div>
            <div class="search_thing">
                <div class="search_label">部门:</div>
@@ -51,8 +54,8 @@
    <div class="table">
      <ValueTable ref="ValueTable0"
        v-if="currentTable == 'value0'"
                :url="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours"
                :componentData="componentData" :inputUrl="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :downUrl="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :key="upIndex" />
                :url="$api.auxiliaryOriginalHours.selectAuxiliaryOriginalHours"
                :componentData="componentData" :downUrl="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :key="upIndex" />
      <ValueTable ref="ValueTable1"
        v-if="currentTable == 'value1'"
                :url="$api.auxiliaryCorrectionHours.selectAuxiliaryCorrectionHours"
@@ -79,10 +82,6 @@
                        month: getYearAndMonthAndDays().split('-')[0]+'-'+getYearAndMonthAndDays().split('-')[1],
                        name: null,
                        departLims: null,
                        orderBy: {
                            field: 'id',
                            order: 'desc'
                        }
                    },
                    isIndex: true,
                    showSelect: false,
@@ -94,7 +93,10 @@
                    requiredAdd: [],
                    requiredUp: [],
          accept: '.xlsx',
          inputType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
          inputType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
          cellSpecialStyle:{
            redColorByKey:'Hours'
          }
            },
      componentData0: {
                    entity: {
@@ -152,6 +154,7 @@
    },
    refreshTable(){
      let entity = {...this.entity}
      entity.month = entity.month.split('-')[0]+'-'+entity.month.split('-')[1]
      if(this.currentTable=='value0'){
        this.componentData.entity = {...this.componentData.entity,...entity}
        this.$refs['ValueTable0'].selectList()
src/components/tool/value-table.vue
@@ -49,6 +49,9 @@
  .handleBtn.is-disabled {
    color: #C0C4CC;
  }
  .red{
    color: red !important;
  }
</style>
<style>
  /* .value-table .highlight-warning-row-border td {
@@ -136,7 +139,7 @@
              @click="handleLinkEvent(scope.row,data.linkEvent[a.label])">{{scope.row[a.label]}}</span>
            <img style="width: 40px;height: 40px;margin-top: 10px;" :src="javaApi+'/img/'+scope.row[a.label]"
              v-else-if="showUpload(a.label)&&scope.row[a.label]" alt="">
            <span v-else>{{scope.row[a.label]}}</span>
            <span v-else :class="{red:getRedColor(a.label,scope.row)}" >{{scope.row[a.label]}}</span>
          </template>
        </el-table-column>
        <el-table-column fixed="right" align="center" label="操作" :width="getWidth()" v-if="data.do.length > 0">
@@ -1094,6 +1097,13 @@
          this.$message.error('请选择要删除的数据')
        }
      },
      getRedColor(label,row){
        if(this.data.cellSpecialStyle&&this.data.cellSpecialStyle.redColorByKey&&label.includes(this.data.cellSpecialStyle.redColorByKey)&&row[(label.replace(this.data.cellSpecialStyle.redColorByKey, ""))]){
          return true
        }else{
          return false
        }
      }
    }
  }
</script>