loulijun2021
2023-01-30 c0ae2d732eb9fc13d3cfc0c2f2f2ab71d2592ac6
src/views/zzmx/chda.vue
@@ -96,7 +96,10 @@
              </el-select>
            </el-form-item>
          </div>
          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}">
          <div
            class="bodySearchReset"
            :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"
          >
            <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
@@ -248,8 +251,18 @@
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <i v-if="row.proute_id==='Y'" :style="{color:$store.state.settings.theme}" class="el-icon-share" @click="routeClick(row)" />
                <i v-if="row.proute_id==='N'" style="color:rgb(180 ,181, 185)" class="el-icon-share" @click="routeClick(row)" />
                <i
                  v-if="row.proute_id==='Y'"
                  :style="{color:$store.state.settings.theme}"
                  class="el-icon-share"
                  @click="routeClick(row)"
                />
                <i
                  v-if="row.proute_id==='N'"
                  style="color:rgb(180 ,181, 185)"
                  class="el-icon-share"
                  @click="routeClick(row)"
                />
              </div>
            </template>
          </el-table-column>
@@ -261,7 +274,11 @@
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i :style="{color:$store.state.settings.theme}" class="el-icon-edit-outline" @click="edit('edit',row)" />
                  <i
                    :style="{color:$store.state.settings.theme}"
                    class="el-icon-edit-outline"
                    @click="edit('edit',row)"
                  />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row)" />
@@ -295,7 +312,17 @@
      @closed="handleClose"
      @close="handleClose"
    >
      <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
      <div>
        <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" style="margin: -20px 10px 20px 20px" />基础信息:
      </div>
      <el-form
        ref="dialogForm"
        inline
        :rules="dialogFormRules"
        :model="dialogForm"
        label-width="80px"
        style="padding: 0 80px"
      >
        <el-form-item label="物料编码" prop="materialcode">
          <el-input v-model="dialogForm.materialcode" :disabled="operation!=='add'" style="width: 200px" />
        </el-form-item>
@@ -377,10 +404,91 @@
        <el-form-item label="最大库存" prop="maxstockqty">
          <el-input v-model="dialogForm.maxstockqty" oninput="value=value.replace(/[^0-9]/g,'')" style="width: 200px" />
          <el-form-item label="最小库存" prop="minstockqty" style="margin-left: 10px">
            <el-input v-model="dialogForm.minstockqty" oninput="value=value.replace(/[^0-9]/g,'')" style="width: 200px" />
            <el-input
              v-model="dialogForm.minstockqty"
              oninput="value=value.replace(/[^0-9]/g,'')"
              style="width: 200px"
            />
          </el-form-item>
        </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>
              <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="isOutCheck"
              />
            </div>
          </div>
        </el-collapse-item>
      </el-collapse>
      <!--      </div>-->
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="dialogVisibleCancel">取 消</el-button>
@@ -537,7 +645,9 @@
      @close="handleCloseRoute"
    >
      <div>
        <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" /> 产品名称:{{ dialogFormRoute.projectName }}
        <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" /> 产品名称:{{
          dialogFormRoute.projectName
        }}
      </div>
      <el-divider />
      <div style="margin-bottom: 10px">
@@ -637,10 +747,12 @@
            <template slot-scope="{row}">
              <div v-if="row.enable==='Y'">
                <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
                是</div>
                是
              </div>
              <div v-if="row.enable==='N'">
                <i class="el-icon-info" style="margin-right: 2px" />
                否</div>
                否
              </div>
            </template>
          </el-table-column>
        </el-table>
@@ -779,7 +891,11 @@
      },
      defaultroute_code: '', // 默认工艺路线选中值
      defaultroute_codeArr: '', // 默认工艺路线数组
      projectTableData: []// 设备列表
      projectTableData: [], // 设备列表
      isBatchNo: false, // 是否批次管理
      isFifo: false, // 是否先进先出
      isInCheck: false, // 是否入库检验
      isOutCheck: false// 是否出厂检验
    }
  },
  created() {
@@ -825,7 +941,7 @@
      }
    },
    // 同步存货档案
    async  syncInventoryFileSelect() {
    async syncInventoryFileSelect() {
      const loading = this.$loading({
        lock: true,
        text: '正在同步存货档案,请稍等...',
@@ -939,7 +1055,7 @@
      this.getuomSelect()
    },
    // 修改按钮
    async   edit(operation, row) {
    async edit(operation, row) {
      this.operation = operation
      this.dialogVisible = true
      // await this.stocktypecodeChange(row.stocktypecode, 'dialogForm')
@@ -954,6 +1070,10 @@
        this.dialogForm.materialtypecode = row.materialtypecode
        this.dialogForm.minstockqty = row.maxqty
        this.dialogForm.maxstockqty = row.minqty
        this.isBatchNo = row.is_batchno === 'Y'
        this.isFifo = row.is_fifo === 'Y'
        this.isInCheck = row.is_incheck === 'Y'
        this.isOutCheck = row.is_outcheck === 'Y'
      })
      await this.getuomSelect()
    },
@@ -988,6 +1108,10 @@
      this.dialogForm.materialtypecode = ''
      this.dialogForm.minstockqty = ''
      this.dialogForm.maxstockqty = ''
      this.isBatchNo = false
      this.isFifo = false
      this.isInCheck = false
      this.isOutCheck = false
      this.$refs.dialogForm.clearValidate()
    },
    // 对话框取消
@@ -1010,8 +1134,13 @@
            materialtypecode: this.dialogForm.materialtypecode,
            minstockqty: this.dialogForm.minstockqty === '' ? 0 : this.dialogForm.minstockqty,
            maxstockqty: this.dialogForm.maxstockqty === '' ? 0 : this.dialogForm.maxstockqty,
            OperType: this.operation === 'add' ? 'Add' : 'Update'
            OperType: this.operation === 'add' ? 'Add' : 'Update',
            is_batchno: this.isBatchNo ? 'Y' : 'N',
            is_fifo: this.isFifo ? 'Y' : 'N',
            is_incheck: this.isInCheck ? 'Y' : 'N',
            is_outcheck: this.isOutCheck ? 'Y' : 'N'
          }
          console.log(data, 111)
          AddUpdateInventoryFile(data).then(res => {
            if (res.code === '200') {
              this.dialogVisible = false
@@ -1339,7 +1468,7 @@
  }
}
.defaultroute_code ::v-deep .el-input__suffix-inner{
.defaultroute_code ::v-deep .el-input__suffix-inner {
  display: flex;
  align-items: center;
  justify-content: center;
@@ -1350,11 +1479,12 @@
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
.el-icon-edit-outline {
  margin-right: 15px;
}
@@ -1381,7 +1511,8 @@
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
  //padding: 20px 100px !important;
  padding: 20px 20px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
@@ -1415,8 +1546,8 @@
  background-color: #f8f8fa;
}
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
::v-deep .el-table__body .el-table__row.hover-row td {
  background-color: #eaecef;
}
::v-deep .el-form--inline .el-form-item__label {
@@ -1432,26 +1563,30 @@
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
.tableFixed{
  ::v-deep .el-table__fixed-right{
.tableFixed {
  ::v-deep .el-table__fixed-right {
    height: 100% !important;
  }
  ::v-deep .el-table__fixed{
  ::v-deep .el-table__fixed {
    height: 100% !important;
  }
}
</style>
<style>
.osloading{
.osloading {
  font-size: 26px !important;
}
.el-loading-text{
.el-loading-text {
  font-size: 26px !important;
}
.el-table .custom-row {
  background: #f8f8fa;
}