loulijun2021
2023-08-08 68edca7409736705db50504b003cba66bb4ccd6e
src/views/makeModel/InventoryList.vue
@@ -218,7 +218,7 @@
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="total,prev, pager, next,sizes"
        layout="total,prev, pager, next,sizes,jumper"
        popper-class="select_bottom"
        @pagination="getInventoryFileSelect"
      />
@@ -336,85 +336,85 @@
        </el-form-item>
      </el-form>
      <el-collapse>
        <el-collapse-item title="一致性 Consistency" name="1">
          <template slot="title">
            <div>
              <i
                class="el-icon-s-operation"
                :style="{color:$store.state.settings.theme}"
                style="margin: -20px 10px 20px 20px"
              />高级设置:
            </div>
          </template>
          <div
            style="display: flex;flex-direction: column;height: 140px; align-content: center;justify-content: space-between"
          >
            <div style="display: flex;width: 200px;align-content: center;justify-content: flex-end">
              <div>
                <el-tooltip
                  class="item"
                  effect="dark"
                  content=""
                  placement="top"
                >
                  <div slot="content" style="width: 300px">
                    启用管理后库存数量会按标签分开显示,需要做采购到货才能入库,且生产发料需要扫码标签进行发料,不启用批次管理的不需要采购到货,可以直接选择物料采购入库,且入库后会合并显示该物料的库存,生产发料则按库位进行出库。
                  </div>
                  <i class="el-icon-question" :style="{color:$store.state.settings.theme}" />
                </el-tooltip>
              </div>
      <!--      <el-collapse>-->
      <!--        <el-collapse-item title="一致性 Consistency" name="1">-->
      <!--          <template slot="title">-->
      <!--            <div>-->
      <!--              <i-->
      <!--                class="el-icon-s-operation"-->
      <!--                :style="{color:$store.state.settings.theme}"-->
      <!--                style="margin: -20px 10px 20px 20px"-->
      <!--              />高级设置:-->
      <!--            </div>-->
      <!--          </template>-->
      <!--          <div-->
      <!--            style="display: flex;flex-direction: column;height: 140px; align-content: center;justify-content: space-between"-->
      <!--          >-->
      <!--            <div style="display: flex;width: 200px;align-content: center;justify-content: flex-end">-->
      <!--              <div>-->
      <!--                <el-tooltip-->
      <!--                  class="item"-->
      <!--                  effect="dark"-->
      <!--                  content=""-->
      <!--                  placement="top"-->
      <!--                >-->
      <!--                  <div slot="content" style="width: 300px">-->
      <!--                    启用管理后库存数量会按标签分开显示,需要做采购到货才能入库,且生产发料需要扫码标签进行发料,不启用批次管理的不需要采购到货,可以直接选择物料采购入库,且入库后会合并显示该物料的库存,生产发料则按库位进行出库。-->
      <!--                  </div>-->
      <!--                  <i class="el-icon-question" :style="{color:$store.state.settings.theme}" />-->
      <!--                </el-tooltip>-->
      <!--              </div>-->
              <div style="margin: 0 3px">批次管理:</div>
              <el-switch
                v-model="isBatchNo"
              />
            </div>
            <div style="display: flex;width: 200px;align-content: center;justify-content: flex-end">
              <div style="margin: 0 3px">先进先出:</div>
              <el-switch
                v-model="isFifo"
              />
            </div>
            <div style="display: flex;width: 200px;align-content: center;justify-content: flex-end">
              <div>
                <el-tooltip
                  class="item"
                  effect="dark"
                  content=""
                  placement="top"
                >
                  <div slot="content" style="width: 300px">开启后该物料必须做入厂检验或质量判断合格后才能做入厂反则该物料质量状态为待检状态是不允许入厂的。</div>
                  <i class="el-icon-question" :style="{color:$store.state.settings.theme}" />
                </el-tooltip>
              </div>
      <!--              <div style="margin: 0 3px">批次管理:</div>-->
      <!--              <el-switch-->
      <!--                v-model="isBatchNo"-->
      <!--              />-->
      <!--            </div>-->
      <!--            <div style="display: flex;width: 200px;align-content: center;justify-content: flex-end">-->
      <!--              <div style="margin: 0 3px">先进先出:</div>-->
      <!--              <el-switch-->
      <!--                v-model="isFifo"-->
      <!--              />-->
      <!--            </div>-->
      <!--            <div style="display: flex;width: 200px;align-content: center;justify-content: flex-end">-->
      <!--              <div>-->
      <!--                <el-tooltip-->
      <!--                  class="item"-->
      <!--                  effect="dark"-->
      <!--                  content=""-->
      <!--                  placement="top"-->
      <!--                >-->
      <!--                  <div slot="content" style="width: 300px">开启后该物料必须做入厂检验或质量判断合格后才能做入厂反则该物料质量状态为待检状态是不允许入厂的。</div>-->
      <!--                  <i class="el-icon-question" :style="{color:$store.state.settings.theme}" />-->
      <!--                </el-tooltip>-->
      <!--              </div>-->
              <div style="margin: 0 3px">入厂检验:</div>
              <el-switch
                v-model="isInCheck"
              />
            </div>
            <div style="display: flex;width: 200px;align-content: center;justify-content: flex-end">
              <div>
                <el-tooltip
                  class="item"
                  effect="dark"
                  content=""
                  placement="top"
                >
                  <div slot="content" style="width: 300px">开启后该物料必须做出厂检验或质量判断合格后才能做出厂,反则该物料质量状态为待检状态是不允许出厂的。</div>
                  <i class="el-icon-question" :style="{color:$store.state.settings.theme}" />
                </el-tooltip>
              </div>
      <!--              <div style="margin: 0 3px">入厂检验:</div>-->
      <!--              <el-switch-->
      <!--                v-model="isInCheck"-->
      <!--              />-->
      <!--            </div>-->
      <!--            <div style="display: flex;width: 200px;align-content: center;justify-content: flex-end">-->
      <!--              <div>-->
      <!--                <el-tooltip-->
      <!--                  class="item"-->
      <!--                  effect="dark"-->
      <!--                  content=""-->
      <!--                  placement="top"-->
      <!--                >-->
      <!--                  <div slot="content" style="width: 300px">开启后该物料必须做出厂检验或质量判断合格后才能做出厂,反则该物料质量状态为待检状态是不允许出厂的。</div>-->
      <!--                  <i class="el-icon-question" :style="{color:$store.state.settings.theme}" />-->
      <!--                </el-tooltip>-->
      <!--              </div>-->
              <div style="margin: 0 3px">出厂检验:</div>
              <el-switch
                v-model="isOutCheck"
              />
            </div>
          </div>
        </el-collapse-item>
      </el-collapse>
      <!--              <div style="margin: 0 3px">出厂检验:</div>-->
      <!--              <el-switch-->
      <!--                v-model="isOutCheck"-->
      <!--              />-->
      <!--            </div>-->
      <!--          </div>-->
      <!--        </el-collapse-item>-->
      <!--      </el-collapse>-->
      <!--      </div>-->
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
@@ -615,26 +615,26 @@
        </div>
      </div>
      <el-divider />
      <div>
        <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 默认工艺路线
      </div>
      <div style="margin-top: 20px">
        <el-select
          v-model="defaultroute_code"
          filterable
          style="width: 200px;"
          placeholder="请选择"
          class="defaultroute_code"
        >
          <el-option
            v-for="item in defaultroute_codeArr"
            :key="item.code"
            :label="item.name"
            :value="item.code"
          />
        </el-select>
      </div>
      <!--      <el-divider   />-->
      <!--      <div  >-->
      <!--        <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 默认工艺路线-->
      <!--      </div>-->
      <!--      <div  style="margin-top: 20px">-->
      <!--        <el-select-->
      <!--          v-model="defaultroute_code"-->
      <!--          filterable-->
      <!--          style="width: 200px;"-->
      <!--          placeholder="请选择"-->
      <!--          class="defaultroute_code"-->
      <!--        >-->
      <!--          <el-option-->
      <!--            v-for="item in defaultroute_codeArr"-->
      <!--            :key="item.code"-->
      <!--            :label="item.name"-->
      <!--            :value="item.code"-->
      <!--          />-->
      <!--        </el-select>-->
      <!--      </div>-->
      <el-divider />
      <div style="margin-bottom: 10px">
        <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 工序列表
@@ -976,7 +976,7 @@
        // routeOperationSelectedArr: [] // 工艺路线选中集合数组
      },
      defaultroute_code: '', // 默认工艺路线选中值
      defaultroute_codeArr: '', // 默认工艺路线数组
      defaultroute_codeArr: [], // 默认工艺路线数组
      projectTableData: [], // 设备列表
      isBatchNo: false, // 是否批次管理
      isFifo: false, // 是否先进先出
@@ -1271,7 +1271,8 @@
        background: 'rgba(0, 0, 0, 0.7)'
      })
      this.defaultroute_code = row.default_route
      // this.defaultroute_code = row.default_route
      // this.defaultroute_code = ''
      this.dialogFormRoute.projectCode = row.partcode
      this.dialogFormRoute.projectName = row.partname
@@ -1310,7 +1311,7 @@
              }
            })
            this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y')
            // this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y')
          }, 1000)
        } else {
          loading.close()
@@ -1320,7 +1321,7 @@
    // 对话框关闭
    handleCloseRoute() {
      this.dialogFormRoute.routeOperationArr = []
      this.defaultroute_codeArr = []
      // this.defaultroute_codeArr = []
    },
    // 取消
    routeDialogVisibleCancel() {
@@ -1328,20 +1329,26 @@
    },
    // 确定
    async routeDialogVisibleConfirm() {
      console.log(this.defaultroute_code)
      if (this.defaultroute_code === null || this.defaultroute_code === 'null') {
        return this.$message.info('默认工艺路线不能为空!')
      }
      // console.log(this.defaultroute_code)
      // if (this.defaultroute_code === null || this.defaultroute_code === 'null') {
      //   return this.$message.info('默认工艺路线不能为空!')
      // }
      // 提交格式
      const data = []
      this.dialogFormRoute.routeOperationArr.forEach(item => {
        if (item.isSelected2) {
          data.push({ code: item.code, name: item.name })
          data.push({
            code: item.code,
            name: item.name,
            wkshopcode: item.wkshopcode,
            wkshopname: item.wkshopname
          })
        }
      })
      this.$store.state.app.buttonIsDisabled = true
      const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data)
      // const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data)
      const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, '', data)
      if (res.code === '200') {
        this.dialogVisibleRoute = false
        this.$message.success('保存成功!')
@@ -1368,10 +1375,11 @@
          item.flag = !item.flag
        }
      })
      if (val.code === this.defaultroute_code) {
        this.defaultroute_code = ''
      }
      this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
      // if (val.code === this.defaultroute_code) {
      //   this.defaultroute_code = ''
      // }
      // this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
      this.$forceUpdate()
    },
    /* 单位模块*/
    // 单位按钮点击事件
@@ -1562,12 +1570,12 @@
  }
}
.defaultroute_code ::v-deep .el-input__suffix-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -3px;
}
//.defaultroute_code ::v-deep .el-input__suffix-inner {
//  display: flex;
//  align-items: center;
//  justify-content: center;
//  margin-top: -3px;
//}
</style>
<!--公共页面样式-->