小小儁爺
2024-11-14 6156331374cefbe908c5aeaebda911646c1d5f10
1.递交
已添加1个文件
已修改6个文件
2095 ■■■■■ 文件已修改
src/api/ReportManager.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/materialManager/inventoryList.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/produce/productWarehouse.vue 270 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/produce/productWarehouse2.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/produce/stepReport.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/statistic/storageRecord.vue 1081 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/statistic/storageRecordBack.vue 677 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/ReportManager.js
@@ -207,3 +207,30 @@
  })
}
// T8入库记录表头
export function StorageRecordMainSearch(data) {
  return request({
    url: 'ReportManager/StorageRecordMainSearch',
    method: 'get',
    params: data
  })
}
// T8入库记录表体
export function StorageRecordSubSearch(data) {
  return request({
    url: 'ReportManager/StorageRecordSubSearch',
    method: 'get',
    params: data
  })
}
// T8入库记录删除
export function StorageRecordDelete(data) {
  return request({
    url: 'ReportManager/StorageRecordDelete',
    method: 'post',
    data
  })
}
src/views/materialManager/inventoryList.vue
@@ -1266,10 +1266,10 @@
    async getTMaterielClassTree() {
      const res = await TMaterielClassTree()
      res.data.forEach(i => {
        i.code = i.code === '0' ? '-1' : i.code
        i.idparent = i.idparent === '0' ? '-1' : i.idparent
      })
      // res.data.forEach(i => {
      //   i.code = i.code === '0' ? '-1' : i.code
      //   i.idparent = i.idparent === '0' ? '-1' : i.idparent
      // })
      this.treeLeftArr = res.data
      // this.treeLeftArr.forEach(e => {
@@ -1281,7 +1281,7 @@
        childrenProperty: 'children'
      })
      this.$nextTick(() => {
        this.$refs.treeLeftRef.setCurrentKey('-1')
        this.$refs.treeLeftRef.setCurrentKey(this.treeLeftArr[0].code)
        this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
      })
    },
@@ -1398,7 +1398,7 @@
      this.form.partcode = ''
      this.form.partname = ''
      this.form.partspec = ''
      this.$refs.treeLeftRef.setCurrentKey('-1')
      this.$refs.treeLeftRef.setCurrentKey(this.treeLeftArr[0].code)
      this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
    },
    // å¯¹è¯æ¡†å…³é—­äº‹ä»¶
src/views/produce/productWarehouse.vue
@@ -32,6 +32,24 @@
        >
          <div class="elForm" style="display: flex;flex-direction: column;justify-content: flex-start">
            <div style="display: flex">
              <el-form-item label="入库部门" required style="display: flex;">
                <el-select
                  v-model="form.deptno"
                  :popper-append-to-body="false"
                  filterable
                  style="width: 200px"
                  placeholder="请选择"
                >
                  <!--                  @change="getProductInHouseOrderSearch"-->
                  <el-option
                    v-for="item in departmentArr"
                    :key="item.code"
                    :label="item.name"
                    :value="item.code"
                  />
                </el-select>
              </el-form-item>
              <el-form-item label="生产车间" style=" display: flex;">
                <el-select
                  v-model="form.wkshopcode"
@@ -68,6 +86,10 @@
                  style="width: 200px"
                />
              </el-form-item>
            </div>
            <div style="display: flex">
              <el-form-item
                label="销售订单"
                style="display: flex;"
@@ -78,9 +100,6 @@
                  style="width: 200px"
                />
              </el-form-item>
            </div>
            <div style="display: flex">
              <el-form-item label="产品编码" style=" display: flex;">
                <el-input v-model="form.partcode" placeholder="请输入" style="width: 200px" />
              </el-form-item>
@@ -155,23 +174,6 @@
              </el-select>
            </el-form-item>
            <el-form-item label="入库部门" required style=" display: flex;">
              <el-select
                v-model="form.deptno"
                :popper-append-to-body="false"
                filterable
                style="width: 200px"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in departmentArr"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                />
              </el-select>
            </el-form-item>
          </div>
          <div
            class="bodySearchReset"
@@ -236,39 +238,6 @@
                    label="序号"
                  />
                  <!--                  <el-table-column-->
                  <!--                    prop="stockcode"-->
                  <!--                    label="仓库"-->
                  <!--                    width="160"-->
                  <!--                    show-tooltip-when-overflow-->
                  <!--                  >-->
                  <!--                    <template slot-scope="{row}">-->
                  <!--                      <div>{{ row.stockcode ? stockcodeArr.find(i => i.code === row.stockcode).name : '/' }}</div>-->
                  <!--                      &lt;!&ndash;                      <div&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                        v-if="!(row.index === tabClickIndex && tabClickLabel === '仓库')"&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                      >&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                        {{ row.stockcode ? stockcodeArr.find(i => i.code === row.stockcode).name : '/' }}&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                      </div>&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                      <el-select&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                        v-if="row.index === tabClickIndex && tabClickLabel === '仓库'"&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                        v-model="row.stockcode"&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                        placeholder="请选择"&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                      >&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                        <el-option&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                          v-for="item in stockcodeArr"&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                          :key="item.code"&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                          :label="item.name"&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                          :value="item.code"&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                        />&ndash;&gt;-->
                  <!--                      &lt;!&ndash;                      </el-select>&ndash;&gt;-->
                  <!--                    </template>-->
                  <!--                  </el-table-column>-->
                  <!--                  <el-table-column-->
                  <!--                    prop="inbarcode"-->
                  <!--                    label="入库条码"-->
                  <!--                    width="160"-->
                  <!--                    show-tooltip-when-overflow-->
                  <!--                  />-->
                  <el-table-column
                    prop="stockcode"
                    label="入库仓库"
@@ -429,131 +398,94 @@
              </div>
            </el-tab-pane>
            <el-tab-pane label="汇总">
              <div class="elTableDiv" style="margin: 0 auto 10px;">
                <el-table
                  ref="tableDataRef"
                  class="tableFixed"
                  :data="tableDataSummary"
                  :height="(tableHeight-25)+'px'"
                  border
                  :row-class-name="tableRowClassName2"
                  :style="{width: 100+'%',height:(tableHeight-25)+'px',}"
                  highlight-current-row
                  :header-cell-style="this.$headerCellStyle"
                  :cell-style="this.$cellStyle"
                >
                  <el-table-column
                    type="index"
                    width="50"
                    fixed
                    label="序号"
                  />
                  <!--                  <el-table-column-->
                  <!--                    prop="stockcode"-->
                  <!--                    label="仓库"-->
                  <!--                    width="110"-->
            <!--            <el-tab-pane label="汇总">-->
            <!--              <div class="elTableDiv" style="margin: 0 auto 10px;">-->
            <!--                <el-table-->
            <!--                  ref="tableDataRef"-->
            <!--                  class="tableFixed"-->
            <!--                  :data="tableDataSummary"-->
            <!--                  :height="(tableHeight-25)+'px'"-->
            <!--                  border-->
            <!--                  :row-class-name="tableRowClassName2"-->
            <!--                  :style="{width: 100+'%',height:(tableHeight-25)+'px',}"-->
            <!--                  highlight-current-row-->
            <!--                  :header-cell-style="this.$headerCellStyle"-->
            <!--                  :cell-style="this.$cellStyle"-->
                  <!--                  >-->
                  <!--                    <template slot-scope="{row}">-->
                  <!--                      <div>{{ stockcodeArr.find(i => i.code === row.stockcode).name }}</div>-->
                  <!--                    </template>-->
                  <!--                  </el-table-column>-->
            <!--                  <el-table-column-->
            <!--                    type="index"-->
            <!--                    width="50"-->
            <!--                    fixed-->
            <!--                    label="序号"-->
            <!--                  />-->
            <!--                  <el-table-column-->
            <!--                    prop="partcode"-->
            <!--                    label="产品编码"-->
            <!--                    min-width="160"-->
            <!--                    show-tooltip-when-overflow-->
            <!--                  />-->
            <!--                  <el-table-column-->
            <!--                    prop="partname"-->
            <!--                    label="产品名称"-->
            <!--                    min-width="160"-->
            <!--                    show-tooltip-when-overflow-->
            <!--                  />-->
            <!--                  <el-table-column-->
            <!--                    prop="partspec"-->
            <!--                    label="产品规格"-->
            <!--                    min-width="160"-->
            <!--                    show-tooltip-when-overflow-->
            <!--                  >-->
                  <!--                    <template slot-scope="{row}">-->
                  <!--                      <div v-if="row.stockname">{{ row.stockname }}</div>-->
                  <!--                      <div v-else>/</div>-->
                  <!--                    </template>-->
                  <!--                  </el-table-column>-->
                  <!--                  <el-table-column-->
                  <!--                    prop="inbarcode"-->
                  <!--                    label="入库条码"-->
                  <!--                    width="160"-->
                  <!--                    show-tooltip-when-overflow-->
                  <!--                  />-->
                  <!--                  <el-table-column-->
                  <!--                    prop="m_po"-->
                  <!--                    label="订单编号"-->
                  <!--                    width="160"-->
            <!--                    prop="qty"-->
            <!--                    label="订单数量"-->
            <!--                    min-width="95"-->
                  <!--                    show-tooltip-when-overflow-->
                  <!--                  >-->
                  <!--                    <template slot-scope="{row}">-->
                  <!--                      <div v-if="row.m_po">{{ row.m_po }}</div>-->
            <!--                      <div v-if="row.qty">{{ row.qty }}</div>-->
                  <!--                      <div v-else>/</div>-->
                  <!--                    </template>-->
                  <!--                  </el-table-column>-->
            <!--                  &lt;!&ndash;                  <el-table-column&ndash;&gt;-->
            <!--                  &lt;!&ndash;                    prop="plan_qty"&ndash;&gt;-->
            <!--                  &lt;!&ndash;                    label="工单数量"&ndash;&gt;-->
            <!--                  &lt;!&ndash;                    min-width="95"&ndash;&gt;-->
            <!--                  &lt;!&ndash;                    fixed="right"&ndash;&gt;-->
            <!--                  &lt;!&ndash;                    show-tooltip-when-overflow&ndash;&gt;-->
            <!--                  &lt;!&ndash;                  />&ndash;&gt;-->
                  <!--                  <el-table-column-->
                  <!--                    prop="wo_code"-->
                  <!--                    label="工单编号"-->
                  <!--                    width="160"-->
                  <!--                    show-tooltip-when-overflow-->
                  <!--                  />-->
                  <el-table-column
                    prop="partcode"
                    label="产品编码"
                    min-width="160"
                    show-tooltip-when-overflow
                  />
                  <el-table-column
                    prop="partname"
                    label="产品名称"
                    min-width="160"
                    show-tooltip-when-overflow
                  />
                  <el-table-column
                    prop="partspec"
                    label="产品规格"
                    min-width="160"
                    show-tooltip-when-overflow
                  >
                    <template slot-scope="{row}">
                      <div v-if="row.stockname">{{ row.stockname }}</div>
                      <div v-else>/</div>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="qty"
                    label="订单数量"
                    min-width="95"
                    show-tooltip-when-overflow
                  >
                    <template slot-scope="{row}">
                      <div v-if="row.qty">{{ row.qty }}</div>
                      <div v-else>/</div>
                    </template>
                  </el-table-column>
                  <!--                  <el-table-column-->
                  <!--                    prop="plan_qty"-->
                  <!--                    label="工单数量"-->
            <!--                    prop="good_qty"-->
            <!--                    label="完工数量"-->
                  <!--                    min-width="95"-->
                  <!--                    fixed="right"-->
                  <!--                    show-tooltip-when-overflow-->
                  <!--                  />-->
                  <el-table-column
                    prop="good_qty"
                    label="完工数量"
                    min-width="95"
            <!--                  <el-table-column-->
            <!--                    prop="inhouseqty"-->
            <!--                    label="已入库数量"-->
            <!--                    min-width="95"-->
                    show-tooltip-when-overflow
                  />
                  <el-table-column
                    prop="inhouseqty"
                    label="已入库数量"
                    min-width="95"
            <!--                    show-tooltip-when-overflow-->
            <!--                  />-->
            <!--                  <el-table-column-->
            <!--                    prop="stinhouseqty"-->
            <!--                    label="可入库数量"-->
            <!--                    min-width="95"-->
                    show-tooltip-when-overflow
                  />
                  <el-table-column
                    prop="stinhouseqty"
                    label="可入库数量"
                    min-width="95"
                    show-tooltip-when-overflow
                  />
                </el-table>
              </div>
            </el-tab-pane>
            <!--                    show-tooltip-when-overflow-->
            <!--                  />-->
            <!--                </el-table>-->
            <!--              </div>-->
            <!--            </el-tab-pane>-->
          </el-tabs>
        </div>
@@ -627,7 +559,7 @@
    this.getProductInHouseOrderCodeSearch()
    this.getDeptSelectData()
    this.getProductInHouseOrderSearch()
    // this.getProductInHouseOrderSearch()
  },
  methods: {
    // èŽ·å–å…¥åº“éƒ¨é—¨
@@ -653,6 +585,9 @@
    },
    // èŽ·å–å¤§åˆ—è¡¨æŸ¥è¯¢
    async getProductInHouseOrderSearch() {
      if (this.form.deptno === '') {
        return this.$message.info('入库部门不能为空!')
      }
      const data = {
        saleordercode: this.form.saleordercode, // é”€å”®å•号
        wkshopcode: this.form.wkshopcode, // ç”Ÿäº§è½¦é—´
@@ -660,7 +595,8 @@
        mesordercode: this.form.mesordercode, // å·¥å•编号
        partcode: this.form.partcode, // äº§å“ç¼–码
        partname: this.form.partname, // äº§å“åç§°
        partspec: this.form.partspec // è§„格型号
        partspec: this.form.partspec, // è§„格型号
        deptno: this.form.deptno// å…¥åº“部门
      }
      const { data: res } = await ProductInHouseOrderSearch(data)
@@ -738,14 +674,16 @@
          TableDetailData// è¡¨ä½“
        ]
      }
      this.$store.state.app.buttonIsDisabled = true
      const res = await ProductInHouseOrderSeave(data)
      this.$store.state.app.buttonIsDisabled = false
      if (res.code === '200') {
        this.$message.success('入库成功!')
        this.multipleSelection = []
        this.form.deptno = ''
        this.form.stockcode = ''
        await this.getProductInHouseOrderSearch()
        // this.form.deptno = ''
        // this.form.stockcode = ''
        // await this.getProductInHouseOrderSearch()
        this.reset()
        await this.getProductInHouseOrderCodeSearch()
      }
    },
@@ -758,6 +696,8 @@
      this.form.partcode = ''// äº§å“ç¼–码
      this.form.partname = '' // äº§å“åç§°
      this.form.partspec = '' // è§„格型号
      this.form.deptno = '' // è§„格型号
      this.tableDataDetail = []
    },
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
src/views/produce/productWarehouse2.vue
@@ -657,6 +657,9 @@
    },
    // èŽ·å–å¤§åˆ—è¡¨æŸ¥è¯¢
    async getProductInHouseOrderSearch() {
      if (this.form.wkshopcode === '') {
        return this.$message.info('生产车间不能为空!')
      }
      const data = {
        saleordercode: this.form.saleordercode, // é”€å”®å•号
        wkshopcode: this.form.wkshopcode, // ç”Ÿäº§è½¦é—´
@@ -664,8 +667,8 @@
        mesordercode: this.form.mesordercode, // å·¥å•编号
        partcode: this.form.partcode, // äº§å“ç¼–码
        partname: this.form.partname, // äº§å“åç§°
        partspec: this.form.partspec // è§„格型号
        partspec: this.form.partspec, // è§„格型号
        deptno: ''// å…¥åº“部门
      }
      const { data: res } = await ProductInHouseOrderSearch(data)
      this.tableDataDetail = res
@@ -765,13 +768,16 @@
      }
      // console.log(JSON.stringify(data))
      this.$store.state.app.buttonIsDisabled = true
      const res = await TProductInHouseOrderSpSeave(data)
      this.$store.state.app.buttonIsDisabled = false
      if (res.code === '200') {
        this.$message.success('入库成功!')
        this.multipleSelection = []
        this.form.deptno = ''
        this.form.stockcode = ''
        await this.getProductInHouseOrderSearch()
        // this.form.deptno = ''
        // this.form.stockcode = ''
        this.reset()
        // await this.getProductInHouseOrderSearch()
        await this.getProductInHouseOrderCodeSearch()
      }
    },
src/views/produce/stepReport.vue
@@ -1410,9 +1410,9 @@
            if (res.code === '200') {
              this.$notify.success('报工成功!')
              if (this.rowData.isend === 'Y') {
                await this.handleProductInHouseOrderSeave('B', inbarcode)
              }
              // if (this.rowData.isend === 'Y') {
              //   await this.handleProductInHouseOrderSeave('B', inbarcode)
              // }
              // await this.search()
              await this.tabClick()
@@ -1523,9 +1523,9 @@
            const res = await SavaMesOrderStepIn(data)
            if (res.code === '200') {
              this.$notify.success('收料成功!')
              if (this.rowData.isend === 'Y') {
                await this.handleProductInHouseOrderSeave('S', inbarcode)
              }
              // if (this.rowData.isend === 'Y') {
              //   await this.handleProductInHouseOrderSeave('S', inbarcode)
              // }
              // await this.search()
              await this.tabClick()
              this.$store.state.app.buttonIsDisabled = false
src/views/statistic/storageRecord.vue
@@ -1,12 +1,13 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div class="bodyTopButtonGroup" style="justify-content: space-between">
        <el-button v-waves :disabled="multipleSelection.length===0" type="danger" icon="el-icon-delete" @click="del">删除</el-button>
        <el-button v-waves type="primary" icon="el-icon-download" @click="download">导出</el-button>
      </div>
      <div class="bodyTopFormGroup">
      <!--      <div class="bodyTopButtonGroup">-->
      <!--          <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>-->
      <!--          <el-button v-waves type="success" icon="el-icon-connection" @click="">派发</el-button>-->
      <!--      </div>-->
      <div class="bodyTopFormGroup" style="margin-top: 10px">
        <el-form
          ref="form"
          :model="form"
@@ -15,43 +16,14 @@
          style="display: flex;"
        >
          <div class="elForm">
            <el-form-item label="入库单号" style="display: flex;">
              <el-input v-model="form.hbillno" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="销售单号" style=" display: flex;">
              <el-input v-model="form.sono" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="订单号" style=" display: flex;">
              <el-input v-model="form.mono" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="工单号" style=" display: flex;">
              <el-input v-model="form.wocode" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="物料编码" style=" display: flex;">
              <el-input v-model="form.partcode" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="物料名称" style=" display: flex;">
              <el-input v-model="form.partname" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="仓库编码" style=" display: flex;">
              <el-select
                v-model="form.stockcode"
                :popper-append-to-body="false"
                filterable
                style="width: 200px"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in stockcodeArr"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                />
              </el-select>
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="单据日期" style="display: flex;align-items: center">
            <el-form-item label="单据日期" style="display: flex;align-items: center">
              <el-date-picker
                v-model="form.responddate"
                v-model="form.hbdate"
                type="daterange"
                range-separator="~"
                class="timeMini"
@@ -62,31 +34,52 @@
                end-placeholder="结束日期"
              />
            </el-form-item>
            <el-form-item label="操作人员" style="display: flex;">
              <el-input v-model="form.username" style="width: 200px" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="操作时间" style="display: flex;align-items: center">
              <el-date-picker
                v-model="form.userdate"
                type="daterange"
                range-separator="~"
                class="timeMini"
                size="mini"
                style="width: 200px;display: flex;line-height: 34px;height: 34px;"
                :clearable="false"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
              />
            </el-form-item>
          </div>
          <div
            class="bodySearchReset"
            :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"
          >
            <el-button v-waves type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button v-waves type="primary" icon="el-icon-search" @click="getStorageRecordMainSearch()">查询</el-button>
            <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
        </el-form>
        <div
          class="bodyTopFormExpand"
        >
          <svg-icon
            v-show="mouseHoverType==='mouseout'"
            style="cursor: pointer"
            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
            @mouseenter="mouseHoverType=$event.type"
          />
          <svg-icon
            v-show="mouseHoverType==='mouseenter'"
            style="cursor: pointer"
            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
            @click="isExpandForm=!isExpandForm"
            @mouseout="mouseHoverType=$event.type"
          />
          <!--          <svg-icon-->
          <!--            v-show="mouseHoverType==='mouseout'"-->
          <!--            style="cursor: pointer"-->
          <!--            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"-->
          <!--            @mouseenter="mouseHoverType=$event.type"-->
          <!--          />-->
          <!--          <svg-icon-->
          <!--            v-show="mouseHoverType==='mouseenter'"-->
          <!--            style="cursor: pointer"-->
          <!--            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"-->
          <!--            @click="isExpandForm=!isExpandForm"-->
          <!--            @mouseout="mouseHoverType=$event.type"-->
          <!--          />-->
        </div>
      </div>
@@ -95,165 +88,63 @@
          ref="tableDataRef"
          class="tableFixed"
          :data="tableData"
          :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
          :height="isExpandForm?tableHeight:(tableHeight+80)+'px'"
          border
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
          @sort-change="sortChange"
          @selection-change="handleSelectionChange"
          @row-click="rowClick"
        >
          <el-table-column
            type="selection"
            width="50"
            fixed
          />
          <el-table-column
            prop="rowNum"
            width="50"
            fixed
            label="序号"
            fixed
          />
          <el-table-column
            prop="hbillno"
            label="入库单号"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="hbilltype"
            label="单据类型"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="hbdate"
            label="入库日期"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="salecode"
            label="销售单号"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="mo_no"
            label="订单号"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="wocode"
            label="工单号"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="partcode"
            label="物料编码"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="partname"
            label="物料名称"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="partname"
            label="物料名称"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="partspec"
            label="规格型号"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="wkshp_name"
            label="产品名称"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="partspec"
            label="产品规格"
            width="120"
            show-tooltip-when-overflow
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.partspec">{{ row.partspec }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="wkshp_name"
            label="部门名称"
            width="130"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="stockname"
            label="仓库名称"
            width="130"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="qty"
            label="入库数量"
            width="130"
            label="单据日期"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="create_user"
            label="创建人"
            width="160"
            show-tooltip-when-overflow
            label="创建人员"
            sortable="custom"
          />
          <el-table-column
            prop="create_date"
            label="创建日期"
            width="160"
            label="创建时间"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            label="操作"
            width="120"
            width="160"
            fixed="right"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <!--                <el-tooltip class="item" effect="dark" content="编辑" placement="top">-->
                <!--                  <i-->
                <!--                    v-if="row.leve!==0"-->
                <!--                    class="el-icon-edit-outline"-->
                <!--                    :style="{color:$store.state.settings.theme}"-->
                <!--                    @click="edit('edit',row)"-->
                <!--                  />-->
                <!--                </el-tooltip>-->
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i
                    class="el-icon-delete"
                    :style="{color:$store.state.settings.theme}"
                    @click="del(row)"
                  />
                  <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click.stop="del(row)" />
                </el-tooltip>
              </div>
            </template>
@@ -266,191 +157,332 @@
        :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="getStorageRecordSearch"
        @pagination="getStorageRecordMainSearch"
      />
    </div>
    <el-dialog
      v-el-drag-dialog
      :title="operation==='add'?'新增':'人员明细'"
      :visible.sync="dialogVisible"
      width="800px"
      :close-on-click-modal="false"
      top="15vh"
      @closed="handleClose"
      @close="handleClose"
      <div class="elTableDiv">
        <el-table
          ref="tableDataRef2"
          :data="tableDataDetail"
          border
          height="210px"
          :row-class-name="tableRowClassName"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
    >
      <div style="height: 300px;width: 100%;background-color: aliceblue;padding:20px">
        <el-tag
          v-for="tag in tagArr"
          :key="tag.name"
          type="success"
          style="margin-right: 15px;min-width: 80px;text-align: center"
        >
          {{ tag }}
        </el-tag>
      </div>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button v-waves @click="dialogVisible=false">返 å›ž</el-button>
          <!--          <el-button v-waves @click="dialogVisibleCancel">取 æ¶ˆ</el-button>-->
          <!--          <el-button v-waves type="primary" @click="dialogVisibleConfirm">ç¡® å®š</el-button>-->
        </div>
      </span>
    </el-dialog>
    <!--导入组件-->
    <import-picker
      ref="importPickerFunc"
      class="importPickerClass"
      :shows.sync="shows"
      :title="title_value"
      :colos="colos"
      :code="code"
          <el-table-column
            width="50"
            prop="rownumber"
            label="序号"
            fixed
    />
          <el-table-column
            prop="stockname"
            label="入库仓库"
            width="160"
            show-tooltip-when-overflow
          >
            <template slot-scope="{row}">
              <div v-if="row.stockname">{{ row.stockname }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="salecode"
            label="销售单号"
            min-width="160"
            show-tooltip-when-overflow
          >
            <template slot-scope="{row}">
              <div v-if="row.salecode">{{ row.salecode }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="mo_no"
            label="订单编号"
            min-width="160"
            show-tooltip-when-overflow
          >
            <template slot-scope="{row}">
              <div v-if="row.mo_no">{{ row.mo_no }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="wocode"
            label="工单编号"
            min-width="160"
            show-tooltip-when-overflow
          />
          <el-table-column
            prop="partcode"
            label="产品编码"
            width="160"
            show-tooltip-when-overflow
          />
          <el-table-column
            prop="partname"
            label="产品名称"
            width="160"
            show-tooltip-when-overflow
          />
          <el-table-column
            prop="partspec"
            label="产品规格"
            width="160"
            show-tooltip-when-overflow
          >
            <template slot-scope="{row}">
              <div v-if="row.partspec">{{ row.partspec }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="unitname"
            label="单位名称"
            width="160"
            show-tooltip-when-overflow
          >
            <template slot-scope="{row}">
              <div v-if="row.unitname">{{ row.unitname }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <!--          <el-table-column-->
          <!--            prop="wkshp_name"-->
          <!--            label="部门名称"-->
          <!--            width="160"-->
          <!--            show-tooltip-when-overflow-->
          <!--          >-->
          <!--            <template slot-scope="{row}">-->
          <!--              <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>-->
          <!--              <div v-else>/</div>-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <el-table-column
            prop="stepname"
            label="工序名称"
            min-width="160"
            show-tooltip-when-overflow
          >
            <template slot-scope="{row}">
              <div v-if="row.stepname">{{ row.stepname }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="qty"
            label="入库数量"
            min-width="95"
            show-tooltip-when-overflow
          >
            <template slot-scope="{row}">
              <div v-if="row.qty">{{ row.qty }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <!--          <el-table-column-->
          <!--            prop="plan_qty"-->
          <!--            label="工单数量"-->
          <!--            min-width="95"-->
          <!--            fixed="right"-->
          <!--            show-tooltip-when-overflow-->
          <!--          />-->
          <!--          <el-table-column-->
          <!--            prop="good_qty"-->
          <!--            label="完工数量"-->
          <!--            min-width="95"-->
          <!--            fixed="right"-->
          <!--            show-tooltip-when-overflow-->
          <!--          />-->
          <!--          <el-table-column-->
          <!--            prop="inhouseqty"-->
          <!--            label="已入库数量"-->
          <!--            min-width="95"-->
          <!--            fixed="right"-->
          <!--            show-tooltip-when-overflow-->
          <!--          />-->
          <!--          <el-table-column-->
          <!--            prop="stinhouseqty"-->
          <!--            label="待入库数量"-->
          <!--            min-width="130"-->
          <!--            fixed="right"-->
          <!--          >-->
          <!--            &lt;!&ndash;                    <template slot-scope="{row}">&ndash;&gt;-->
          <!--            &lt;!&ndash;                      <el-input-number v-model="row.stinhouseqty" :min="0" :max="row.good_qty" size="small" />&ndash;&gt;-->
          <!--            &lt;!&ndash;                    </template>&ndash;&gt;-->
          <!--          </el-table-column>-->
          <!--          <el-table-column-->
          <!--            label="操作"-->
          <!--            width="120"-->
          <!--            fixed="right"-->
          <!--          >-->
          <!--            <template slot-scope="{row}">-->
          <!--              <div class="operationClass">-->
          <!--                <el-tooltip v-del-tab-index class="item" effect="dark" content="SOP预览" placement="top">-->
          <!--                  <i-->
          <!--                    class="el-icon-files"-->
          <!--                    style="cursor: pointer;color:#42b983;margin-right: 15px"-->
          <!--                  />-->
          <!--                </el-tooltip>-->
          <!--              </div>-->
          <!--            </template>-->
          <!--          </el-table-column>-->
        </el-table>
      </div>
    </div>
  </div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { getCookie } from '@/utils/auth'
import ImportPicker from '@/components/ImportPicker'
import { handleDatetime, validateCode } from '@/utils/global'
import {
  DeleteStorageRecord,
  GroupSalaryReportSearchUser, StorageRecordExcelSearch, StorageRecordSearch
} from '@/api/ReportManager'
import elDragDialog from '@/directive/el-drag-dialog'
import waves from '@/directive/waves'
import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData'
import { TSecLocaTree } from '@/api/basicSettings'
import {
  StorageRecordDelete,
  StorageRecordMainSearch,
  StorageRecordSubSearch
} from '@/api/ReportManager'
import { handleDatetime, handleDatetime2 } from '@/utils/global'
export default {
  name: 'StorageRecord',
  name: 'WorkOrderList',
  components: {
    Pagination, ImportPicker
    Pagination
  },
  directives: { elDragDialog, waves },
  directives: { waves },
  data() {
    return {
      mouseHoverType: 'mouseout',
      mouseHoverTypeDialog: 'mouseout',
      isExpandForm: false,
      isIpad: false,
      mainHeight: 0,
      tableHeight: 0,
      username: '',
      form: {
        hbillno: '', // å…¥åº“单号
        sono: '', // é”€å”®å•号
        mono: '', // è®¢å•号
        wocode: '', // å·¥å•号
        partcode: '', // äº§å“ç¼–码
        partname: '', // äº§å“åç§°
        stockcode: '', // ä»“库编码
        responddate: '', // æ“ä½œæ—¶é—´
        prop: 'create_date', // æŽ’序字段
        hbdate: '', // å•据日期
        username: '', // æ“ä½œäººå‘˜
        userdate: '', // æ“ä½œæ—¶é—´
        prop: 'hbillno', // æŽ’序字段
        order: 'desc', // æŽ’序字段
        page: 1, // ç¬¬å‡ é¡µ
        rows: 20 // æ¯é¡µå¤šå°‘条
      },
      stockcodeArr: [],
      total: 10,
      tableData: [],
      dialogVisible: false,
      tagArr: [], //
      dialogForm: {
        OrgType: '',
        OrgCode: '',
        OrgName: '',
        SupUnit: ''// ä¸Šçº§å•位
      },
      operation: '',
      dialogFormRules: {
        OrgType: [
          { required: true, message: '请输入选择类型', trigger: ['blur', 'change'] }
        ],
        OrgCode: [
          { required: true, validator: validateCode, trigger: ['blur', 'change'] }
        ],
        OrgName: [
          { required: true, message: '请输入名称', trigger: ['blur', 'change'] }
        ]
      },
      title_value: '数据导入 / ç‚¹æ£€éƒ¨ä½',
      code: '4',
      shows: false,
      multipleSelection: []
      total: 10,
      tableDataDetail: []
    }
  },
  // watch: {
  //   shows() {
  //     if (!this.shows) {
  //       this.getStorageRecordSearch()
  //     }
  //   }
  // },
  activated() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  created() {
    this.handleRequest()
    this.getStorageRecordMainSearch()
  },
  mounted() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  methods: {
    handleRequest() {
      this.getStorageRecordSearch().then(res => {
        if (res.code === '200') {
          this.getTSecLocaTree()
        }
      })
    },
    // èŽ·å–ä»“åº“ä¿¡æ¯
    async getTSecLocaTree() {
      const { data: res } = await TSecLocaTree()
      this.stockcodeArr = res.filter(i => i.depth === 0)// å±‚级为0的  æ˜¯ä»“库
    },
    async getStorageRecordSearch() {
      let tempDate = this.form.responddate
    async getStorageRecordMainSearch() {
      let tempDate = this.form.hbdate
      if (tempDate.length > 0) {
        tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
      }
      const data = {
        hbillno: this.form.hbillno,
        sono: this.form.sono,
        mono: this.form.mono,
        wocode: this.form.wocode,
        partcode: this.form.partcode,
        partname: this.form.partname,
        stockcode: this.form.stockcode,
        responddate: tempDate,
        prop: this.form.prop,
        order: this.form.order,
        page: this.form.page,
        rows: this.form.rows
      let tempDate2 = this.form.userdate
      if (tempDate2.length > 0) {
        tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
      }
      const res = await StorageRecordSearch(data)
      const data = {
        hbillno: '', // å…¥åº“单号
        hbdate: tempDate, // å•据日期
        username: '', // æ“ä½œäººå‘˜
        userdate: tempDate2, // æ“ä½œæ—¶é—´
        prop: this.form.prop, // æŽ’序字段
        order: this.form.order, // æŽ’序字段
        page: this.form.page, // ç¬¬å‡ é¡µ
        rows: this.form.rows // æ¯é¡µå¤šå°‘条
      }
      const res = await StorageRecordMainSearch(data)
      if (res.code === '200') {
      this.tableData = res.data
      this.total = res.count
      return { code: res.code }
        if (res.data.length > 0) {
          await this.getStorageRecordSubSearch(res.data[0].hbillno)
        } else {
          this.tableDataDetail = []
        }
      }
    },
    async getStorageRecordSubSearch(hbillno) {
      const { data: res } = await StorageRecordSubSearch({ hbillno })
      this.tableDataDetail = res
      console.log(123, this.tableDataDetail)
    },
    rowClick(row, event, column) {
      this.getStorageRecordSubSearch(row.hbillno)
    },
    reset() {
      this.form.hbillno = ''
      this.form.hbdate = ''
      this.form.username = ''
      this.form.userdate = ''
      this.getStorageRecordMainSearch()
    },
    async   del(row) {
      await this.getStorageRecordSubSearch(row.hbillno)
      console.log(1111)
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        const data = []
        this.tableDataDetail.forEach(i => {
          data.push({
            'hbillno': i.hbillno, // å…¥åº“单号
            'inbarcode': i.inbarcode, // å…¥åº“条码
            'wocode': i.wocode, // å·¥å•号
            'stepcode': i.step_code, // å·¥åºç¼–码
            'style': i.style, // æŠ¥å·¥ç±»åž‹(B/S)
            'qty': i.qty.toString(), // å…¥åº“数量
            'create_user': localStorage.getItem('username'), // æ“ä½œäººå‘˜
            'create_date': handleDatetime2(new Date())// --操作时间
          })
        })
        // console.log(JSON.stringify(data))
        StorageRecordDelete(data).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            if (this.form.page > 1 && this.tableData.length === 1) {
              this.form.page--
            }
            this.getStorageRecordMainSearch()
          }
        })
      }).catch(() => {
        this.$message.info('已取消删除')
      })
    },
    // async getMesOrderStepReportSelectUserGroup() {
    //   const { data: res } = await MesOrderStepReportSelectUserGroup()
    //   this.groupArr = res
    // },
    // æŽ’序改变时
    sortChange({ column, prop, order }) {
      if (order === 'descending') {
@@ -464,169 +496,13 @@
      this.form.prop = prop
      this.getStorageRecordSearch()
    },
    async download() {
      let tempDate = this.form.responddate
      if (tempDate.length > 0) {
        tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
      }
      const data = {
        hbillno: this.form.hbillno,
        sono: this.form.sono,
        mono: this.form.mono,
        wocode: this.form.wocode,
        partcode: this.form.partcode,
        partname: this.form.partname,
        stockcode: this.form.stockcode,
        responddate: tempDate
      }
      const { data: res } = await StorageRecordExcelSearch(data)
      window.location.href = res
    },
    // æŸ¥è¯¢
    search() {
      this.getStorageRecordSearch()
    },
    // å¯¼å…¥æŒ‰é’®
    upload() {
      this.shows = true
      this.$refs.importPickerFunc.newDataFunc()
    },
    colos() {
      this.shows = false
    },
    // é‡ç½®
    reset() {
      this.form.hbillno = ''
      this.form.sono = ''
      this.form.mono = ''
      this.form.wocode = ''
      this.form.partcode = ''
      this.form.partname = ''
      this.form.stockcode = ''
      this.form.responddate = ''
      this.getStorageRecordSearch()
    },
    // æ–°å¢žæŒ‰é’®
    add(operation) {
      this.operation = operation
      this.dialogVisible = true
    },
    // ä¿®æ”¹æŒ‰é’®
    async edit(operation, row) {
      this.operation = operation
      this.dialogVisible = true
      const res = await GroupSalaryReportSearchUser({ id: row.id })
      this.tagArr = res.data.map(r => r.repairname)
      // this.tagArr = ['楼李俊', '张三', '李四']
      // this.$nextTick(() => {
      //   this.dialogForm.OrgCode = row.org_code
      //   this.dialogForm.OrgName = row.org_name
      //   this.dialogForm.SupUnit = row.parent_id
      // })
    },
    handleSelectionChange(val) {
      this.multipleSelection = val
    },
    // åˆ é™¤æŒ‰é’®
    del(row) {
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        let data = []
        if (row.create_date) { // è¯´æ˜Žç‚¹å‡»çš„æ—¶ å•行删除
          data = [
            {
              'repoid': row.repoid,
              'hbillno': row.hbillno,
              'salecode': row.salecode,
              'mo_no': row.mo_no,
              'wocode': row.wocode,
              'partcode': row.partcode,
              'qty': row.qty,
              'wkshop_code': row.wkshp_code,
              'stockcode': row.stockcode,
              'inbarcode': row.inbarcode,
              'step_code': row.step_code,
              'style': row.style
            }
          ]
        } else { // è¯´æ˜Žæ˜¯æ‰¹é‡åˆ é™¤
          this.multipleSelection.forEach(row => {
            data.push({
              'repoid': row.repoid,
              'hbillno': row.hbillno,
              'salecode': row.salecode,
              'mo_no': row.mo_no,
              'wocode': row.wocode,
              'partcode': row.partcode,
              'qty': row.qty,
              'wkshop_code': row.wkshp_code,
              'stockcode': row.stockcode,
              'inbarcode': row.inbarcode,
              'step_code': row.step_code,
              'style': row.style
            })
          })
        }
        DeleteStorageRecord(data).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            if (this.form.page > 1 && this.tableData.length === 1) {
              this.form.page--
            }
            this.getStorageRecordSearch()
          }
        })
      }).catch(() => {
        this.$message.info('已取消删除')
      })
    },
    // å¯¹è¯æ¡†å…³é—­äº‹ä»¶
    handleClose() {
      this.dialogForm.OrgType = ''
      this.dialogForm.OrgCode = ''
      this.dialogForm.OrgName = ''
      this.dialogForm.SupUnit = ''
      this.$refs.dialogForm.clearValidate()
    },
    // å¯¹è¯æ¡†å–消
    dialogVisibleCancel() {
      this.dialogVisible = false
    },
    // å¯¹è¯æ¡†ç¡®è®¤
    dialogVisibleConfirm() {
      this.$refs.dialogForm.validate(valid => {
        if (valid) {
          const data = {
            OrganCode: this.dialogForm.OrgCode,
            OrganName: this.dialogForm.OrgName,
            OperType: this.operation === 'add' ? 'Add' : 'Update',
            Operator: getCookie('admin')
          }
          // AddUpdateOrganization(data).then(res => {
          //   if (res.code === '200') {
          //     this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!')
          //     this.dialogVisible = false
          //     this.getStorageRecordSearch()
          //   } else {
          //     this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!')
          //   }
          // })
        }
      })
    },
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 255
        this.tableHeight = this.mainHeight - 450
        this.$refs.tableDataRef.doLayout()
        this.$refs.tableDataRef2.doLayout()
      })
    },
    tableRowClassName({ row, rowIndex }) {
@@ -636,15 +512,165 @@
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-icon-delete{
  margin-right: 0 !important;
.stepSelectedValueClass {
  ::v-deep input {
    //min-height: 34px !important;
    height: 68px !important;
}
::v-deep .el-select__caret {
}
.dialogVisibleRoute {
  .myCheckboxGroup {
  display: flex;
  align-items: center;
  justify-content: center;
    flex-wrap: wrap;
    .myCheckbox {
      //border: 1px solid $main_color;
      border: 1px solid #eee;
      display: flex;
      min-width: 100px;
      padding: 10px;
      margin: 10px 30px 0 0;
      border-radius: 5px;
      cursor: default;
      .myCheckboxInput {
        margin: 1px 5px 0 0;
        cursor: pointer;
      }
    }
    //.myCheckbox{
    //  border: 1px solid $main_color;
    //}
    input[type=checkbox] {
      cursor: pointer;
      position: relative;
      width: 14px;
      height: 14px;
      font-size: 14px;
    }
    input[type=checkbox]::after {
      position: absolute;
      top: 0;
      //color: rgb(130, 35, 35);
      color: $main_color;
      width: 14px;
      height: 14px;
      display: inline-block;
      visibility: visible;
      padding-left: 0px;
      text-align: center;
      content: ' ';
      border-radius: 3px
    }
    input[type=checkbox]:checked::after {
      //content: "✓";
      content: "√";
      color: #fff;
      font-size: 12px;
      font-weight: bold;
      background-color: $main_color;
    }
  }
}
.dialogVisibleRoute {
  ::v-deep .el-dialog__body {
    padding: 20px 20px !important;
  }
}
.el-date-editor {
  font-size: 14px;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
.sop {
  ::v-deep .el-dialog__body {
    padding: 50px 80px !important;
  }
}
.dialogVisibleSearch ::v-deep .el-dialog__body {
  padding: 20px 20px !important;
}
.dialogVisibleConfirmClass ::v-deep .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
}
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
.elForm ::v-deep .el-form-item {
  margin-bottom: 0;
}
.elTableDiv {
  ::v-deep .el-radio__label {
    display: none;
  }
}
.el-table::before {
  height: 0;
}
//.dialogVisibleConfirmClass >>>.el-table--border, .el-table--fit {
//  border-bottom: 2px solid #000 ;
//  //outline: #000 solid 2px !important;
//}
.tableDataPrint ::v-deep div.cell {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.formContent {
  width: 240px;
}
</style>
<style>
.formContent .el-form-item__label {
  color: #000 !important;
}
</style>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-range-input {
  font-size: 14px !important;
}
::v-deep .el-range__icon {
@@ -665,12 +691,121 @@
  align-items: center;
}
::v-deep .el-progress-bar__innerText{
  display: none !important;
//::v-deep .el-button--primary, .el-button--default, .el-button--info {
//  height: 34px;
//  display: flex;
//  align-items: center;
//  padding: 0 15px;
//}
::v-deep .el-button--primary {
  //background-color: $main_color !important;
}
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
::v-deep .el-table::before {
  height: 0;
}
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-table__body .el-table__row.hover-row td {
  background-color: #eaecef;
}
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
.dateMini {
  ::v-deep .el-input__inner {
    line-height: 34px;
    height: 34px;
    width: 200px;
    display: flex;
    font-size: 14px !important;
    align-items: center !important;
  }
  ::v-deep .el-input__prefix {
    margin-top: -3px;
  }
  //::v-deep .el-range__icon{
  //  line-height: 28px;
  //}
}
::v-deep .el-select__caret {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tableFixed {
  ::v-deep .el-table__fixed-right {
    height: 100% !important;
  }
  ::v-deep .el-table__fixed {
    height: 100% !important;
  }
}
</style>
<style>
.el-table .custom-row {
  background: #f8f8fa;
}
src/views/statistic/storageRecordBack.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,677 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div class="bodyTopButtonGroup" style="justify-content: space-between">
        <el-button v-waves :disabled="multipleSelection.length===0" type="danger" icon="el-icon-delete" @click="del">删除</el-button>
        <el-button v-waves type="primary" icon="el-icon-download" @click="download">导出</el-button>
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
          label-width="100px"
          inline
          style="display: flex;"
        >
          <div class="elForm">
            <el-form-item label="入库单号" style="display: flex;">
              <el-input v-model="form.hbillno" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="销售单号" style=" display: flex;">
              <el-input v-model="form.sono" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="订单号" style=" display: flex;">
              <el-input v-model="form.mono" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="工单号" style=" display: flex;">
              <el-input v-model="form.wocode" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="物料编码" style=" display: flex;">
              <el-input v-model="form.partcode" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="物料名称" style=" display: flex;">
              <el-input v-model="form.partname" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="仓库编码" style=" display: flex;">
              <el-select
                v-model="form.stockcode"
                :popper-append-to-body="false"
                filterable
                style="width: 200px"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in stockcodeArr"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                />
              </el-select>
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="单据日期" style="display: flex;align-items: center">
              <el-date-picker
                v-model="form.responddate"
                type="daterange"
                range-separator="~"
                class="timeMini"
                size="mini"
                style="width: 200px;display: flex;line-height: 34px;height: 34px;"
                :clearable="false"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
              />
            </el-form-item>
          </div>
          <div
            class="bodySearchReset"
            :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"
          >
            <el-button v-waves type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
        </el-form>
        <div
          class="bodyTopFormExpand"
        >
          <svg-icon
            v-show="mouseHoverType==='mouseout'"
            style="cursor: pointer"
            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
            @mouseenter="mouseHoverType=$event.type"
          />
          <svg-icon
            v-show="mouseHoverType==='mouseenter'"
            style="cursor: pointer"
            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
            @click="isExpandForm=!isExpandForm"
            @mouseout="mouseHoverType=$event.type"
          />
        </div>
      </div>
      <div class="elTableDiv">
        <el-table
          ref="tableDataRef"
          class="tableFixed"
          :data="tableData"
          :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
          border
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
          @sort-change="sortChange"
          @selection-change="handleSelectionChange"
        >
          <el-table-column
            type="selection"
            width="50"
            fixed
          />
          <el-table-column
            prop="rowNum"
            width="50"
            fixed
            label="序号"
          />
          <el-table-column
            prop="hbillno"
            label="入库单号"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="hbdate"
            label="入库日期"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="salecode"
            label="销售单号"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="mo_no"
            label="订单号"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="wocode"
            label="工单号"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="partcode"
            label="物料编码"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="partname"
            label="物料名称"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="partname"
            label="物料名称"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="partspec"
            label="规格型号"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="wkshp_name"
            label="产品名称"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="partspec"
            label="产品规格"
            width="120"
            show-tooltip-when-overflow
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.partspec">{{ row.partspec }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="wkshp_name"
            label="部门名称"
            width="130"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="stockname"
            label="仓库名称"
            width="130"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="qty"
            label="入库数量"
            width="130"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="create_user"
            label="创建人"
            width="160"
            sortable="custom"
          />
          <el-table-column
            prop="create_date"
            label="创建日期"
            width="160"
            sortable="custom"
          />
          <el-table-column
            label="操作"
            width="120"
            fixed="right"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <!--                <el-tooltip class="item" effect="dark" content="编辑" placement="top">-->
                <!--                  <i-->
                <!--                    v-if="row.leve!==0"-->
                <!--                    class="el-icon-edit-outline"-->
                <!--                    :style="{color:$store.state.settings.theme}"-->
                <!--                    @click="edit('edit',row)"-->
                <!--                  />-->
                <!--                </el-tooltip>-->
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i
                    class="el-icon-delete"
                    :style="{color:$store.state.settings.theme}"
                    @click="del(row)"
                  />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!--分页-->
      <pagination
        :total="total"
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="total,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getStorageRecordSearch"
      />
    </div>
    <el-dialog
      v-el-drag-dialog
      :title="operation==='add'?'新增':'人员明细'"
      :visible.sync="dialogVisible"
      width="800px"
      :close-on-click-modal="false"
      top="15vh"
      @closed="handleClose"
      @close="handleClose"
    >
      <div style="height: 300px;width: 100%;background-color: aliceblue;padding:20px">
        <el-tag
          v-for="tag in tagArr"
          :key="tag.name"
          type="success"
          style="margin-right: 15px;min-width: 80px;text-align: center"
        >
          {{ tag }}
        </el-tag>
      </div>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button v-waves @click="dialogVisible=false">返 å›ž</el-button>
          <!--          <el-button v-waves @click="dialogVisibleCancel">取 æ¶ˆ</el-button>-->
          <!--          <el-button v-waves type="primary" @click="dialogVisibleConfirm">ç¡® å®š</el-button>-->
        </div>
      </span>
    </el-dialog>
    <!--导入组件-->
    <import-picker
      ref="importPickerFunc"
      class="importPickerClass"
      :shows.sync="shows"
      :title="title_value"
      :colos="colos"
      :code="code"
    />
  </div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { getCookie } from '@/utils/auth'
import ImportPicker from '@/components/ImportPicker'
import { handleDatetime, validateCode } from '@/utils/global'
import {
  DeleteStorageRecord,
  GroupSalaryReportSearchUser, StorageRecordExcelSearch, StorageRecordSearch
} from '@/api/ReportManager'
import elDragDialog from '@/directive/el-drag-dialog'
import waves from '@/directive/waves'
import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData'
import { TSecLocaTree } from '@/api/basicSettings'
export default {
  name: 'StorageRecord',
  components: {
    Pagination, ImportPicker
  },
  directives: { elDragDialog, waves },
  data() {
    return {
      mouseHoverType: 'mouseout',
      isExpandForm: false,
      mainHeight: 0,
      tableHeight: 0,
      form: {
        hbillno: '', // å…¥åº“单号
        sono: '', // é”€å”®å•号
        mono: '', // è®¢å•号
        wocode: '', // å·¥å•号
        partcode: '', // äº§å“ç¼–码
        partname: '', // äº§å“åç§°
        stockcode: '', // ä»“库编码
        responddate: '', // æ“ä½œæ—¶é—´
        prop: 'create_date', // æŽ’序字段
        order: 'desc', // æŽ’序字段
        page: 1, // ç¬¬å‡ é¡µ
        rows: 20 // æ¯é¡µå¤šå°‘条
      },
      stockcodeArr: [],
      total: 10,
      tableData: [],
      dialogVisible: false,
      tagArr: [], //
      dialogForm: {
        OrgType: '',
        OrgCode: '',
        OrgName: '',
        SupUnit: ''// ä¸Šçº§å•位
      },
      operation: '',
      dialogFormRules: {
        OrgType: [
          { required: true, message: '请输入选择类型', trigger: ['blur', 'change'] }
        ],
        OrgCode: [
          { required: true, validator: validateCode, trigger: ['blur', 'change'] }
        ],
        OrgName: [
          { required: true, message: '请输入名称', trigger: ['blur', 'change'] }
        ]
      },
      title_value: '数据导入 / ç‚¹æ£€éƒ¨ä½',
      code: '4',
      shows: false,
      multipleSelection: []
    }
  },
  // watch: {
  //   shows() {
  //     if (!this.shows) {
  //       this.getStorageRecordSearch()
  //     }
  //   }
  // },
  activated() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  created() {
    this.handleRequest()
  },
  mounted() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  methods: {
    handleRequest() {
      this.getStorageRecordSearch().then(res => {
        if (res.code === '200') {
          this.getTSecLocaTree()
        }
      })
    },
    // èŽ·å–ä»“åº“ä¿¡æ¯
    async getTSecLocaTree() {
      const { data: res } = await TSecLocaTree()
      this.stockcodeArr = res.filter(i => i.depth === 0)// å±‚级为0的  æ˜¯ä»“库
    },
    async getStorageRecordSearch() {
      let tempDate = this.form.responddate
      if (tempDate.length > 0) {
        tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
      }
      const data = {
        hbillno: this.form.hbillno,
        sono: this.form.sono,
        mono: this.form.mono,
        wocode: this.form.wocode,
        partcode: this.form.partcode,
        partname: this.form.partname,
        stockcode: this.form.stockcode,
        responddate: tempDate,
        prop: this.form.prop,
        order: this.form.order,
        page: this.form.page,
        rows: this.form.rows
      }
      const res = await StorageRecordSearch(data)
      this.tableData = res.data
      this.total = res.count
      return { code: res.code }
    },
    // async getMesOrderStepReportSelectUserGroup() {
    //   const { data: res } = await MesOrderStepReportSelectUserGroup()
    //   this.groupArr = res
    // },
    // æŽ’序改变时
    sortChange({ column, prop, order }) {
      if (order === 'descending') {
        order = 'desc'
      } else if (order === 'ascending') {
        order = 'asc'
      } else {
        order = 'desc'
      }
      this.form.order = order
      this.form.prop = prop
      this.getStorageRecordSearch()
    },
    async download() {
      let tempDate = this.form.responddate
      if (tempDate.length > 0) {
        tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
      }
      const data = {
        hbillno: this.form.hbillno,
        sono: this.form.sono,
        mono: this.form.mono,
        wocode: this.form.wocode,
        partcode: this.form.partcode,
        partname: this.form.partname,
        stockcode: this.form.stockcode,
        responddate: tempDate
      }
      const { data: res } = await StorageRecordExcelSearch(data)
      window.location.href = res
    },
    // æŸ¥è¯¢
    search() {
      this.getStorageRecordSearch()
    },
    // å¯¼å…¥æŒ‰é’®
    upload() {
      this.shows = true
      this.$refs.importPickerFunc.newDataFunc()
    },
    colos() {
      this.shows = false
    },
    // é‡ç½®
    reset() {
      this.form.hbillno = ''
      this.form.sono = ''
      this.form.mono = ''
      this.form.wocode = ''
      this.form.partcode = ''
      this.form.partname = ''
      this.form.stockcode = ''
      this.form.responddate = ''
      this.getStorageRecordSearch()
    },
    // æ–°å¢žæŒ‰é’®
    add(operation) {
      this.operation = operation
      this.dialogVisible = true
    },
    // ä¿®æ”¹æŒ‰é’®
    async edit(operation, row) {
      this.operation = operation
      this.dialogVisible = true
      const res = await GroupSalaryReportSearchUser({ id: row.id })
      this.tagArr = res.data.map(r => r.repairname)
      // this.tagArr = ['楼李俊', '张三', '李四']
      // this.$nextTick(() => {
      //   this.dialogForm.OrgCode = row.org_code
      //   this.dialogForm.OrgName = row.org_name
      //   this.dialogForm.SupUnit = row.parent_id
      // })
    },
    handleSelectionChange(val) {
      this.multipleSelection = val
    },
    // åˆ é™¤æŒ‰é’®
    del(row) {
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        let data = []
        if (row.create_date) { // è¯´æ˜Žç‚¹å‡»çš„æ—¶ å•行删除
          data = [
            {
              'repoid': row.repoid,
              'hbillno': row.hbillno,
              'salecode': row.salecode,
              'mo_no': row.mo_no,
              'wocode': row.wocode,
              'partcode': row.partcode,
              'qty': row.qty,
              'wkshop_code': row.wkshp_code,
              'stockcode': row.stockcode,
              'inbarcode': row.inbarcode,
              'step_code': row.step_code,
              'style': row.style
            }
          ]
        } else { // è¯´æ˜Žæ˜¯æ‰¹é‡åˆ é™¤
          this.multipleSelection.forEach(row => {
            data.push({
              'repoid': row.repoid,
              'hbillno': row.hbillno,
              'salecode': row.salecode,
              'mo_no': row.mo_no,
              'wocode': row.wocode,
              'partcode': row.partcode,
              'qty': row.qty,
              'wkshop_code': row.wkshp_code,
              'stockcode': row.stockcode,
              'inbarcode': row.inbarcode,
              'step_code': row.step_code,
              'style': row.style
            })
          })
        }
        DeleteStorageRecord(data).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            if (this.form.page > 1 && this.tableData.length === 1) {
              this.form.page--
            }
            this.getStorageRecordSearch()
          }
        })
      }).catch(() => {
        this.$message.info('已取消删除')
      })
    },
    // å¯¹è¯æ¡†å…³é—­äº‹ä»¶
    handleClose() {
      this.dialogForm.OrgType = ''
      this.dialogForm.OrgCode = ''
      this.dialogForm.OrgName = ''
      this.dialogForm.SupUnit = ''
      this.$refs.dialogForm.clearValidate()
    },
    // å¯¹è¯æ¡†å–消
    dialogVisibleCancel() {
      this.dialogVisible = false
    },
    // å¯¹è¯æ¡†ç¡®è®¤
    dialogVisibleConfirm() {
      this.$refs.dialogForm.validate(valid => {
        if (valid) {
          const data = {
            OrganCode: this.dialogForm.OrgCode,
            OrganName: this.dialogForm.OrgName,
            OperType: this.operation === 'add' ? 'Add' : 'Update',
            Operator: getCookie('admin')
          }
          // AddUpdateOrganization(data).then(res => {
          //   if (res.code === '200') {
          //     this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!')
          //     this.dialogVisible = false
          //     this.getStorageRecordSearch()
          //   } else {
          //     this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!')
          //   }
          // })
        }
      })
    },
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 255
        this.$refs.tableDataRef.doLayout()
      })
    },
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    }
  }
}
</script>
<style scoped lang="scss">
::v-deep .el-icon-delete{
  margin-right: 0 !important;
}
::v-deep .el-select__caret {
  display: flex;
  align-items: center;
  justify-content: center;
}
::v-deep .el-range__icon {
  line-height: 28px !important;
}
::v-deep .el-range-separator {
  line-height: 28px !important;
}
::v-deep .el-range-input {
  font-size: 14px;
}
::v-deep .el-range-separator {
  display: flex;
  justify-content: center;
  align-items: center;
}
::v-deep .el-progress-bar__innerText{
  display: none !important;
}
</style>
<style>
.el-table .custom-row {
  background: #f8f8fa;
}
</style>