renkang
2025-01-24 d492850f1cc64ddcfaf43798af9c76c2505414fd
admin/src/views/stock/components/inventoryDetails.vue
@@ -10,62 +10,66 @@
            <div class="list">
                <div class="item">
                    <div class="la">盘点单名称</div>
                    <div class="val">库存盘点20241212</div>
                    <div class="val">{{info.name}}</div>
                </div>
                <div class="item">
                    <div class="la">盘点日期</div>
                    <div class="val">2024-11-17</div>
                    <div class="val">{{info.planDate}}</div>
                </div>
                <div class="item">
                    <div class="la">盘点仓库</div>
                    <div class="val">仓库1</div>
                    <div class="val">{{info.warehouseName}}</div>
                </div>
                <div class="item">
                    <div class="la">盘点员</div>
                    <div class="val">张三</div>
                    <div class="val">{{info.userName}}</div>
                </div>
                <div class="item">
                    <div class="la">盘点状态</div>
                    <div class="val">已完成</div>
                    <div class="val" v-if="info.status === 0">未开始</div>
                    <div class="val" v-if="info.status === 1">进行中</div>
                    <div class="val" v-if="info.status === 2">已完成</div>
                    <div class="val" v-if="info.status === 3">已取消</div>
                </div>
            </div>
            <div class="title">盘点结果</div>
            <div class="list">
                <div class="list_search">
                    <div class="list_search_left">
                        <el-input v-model="input" style="width: 200px; margin-right: 10px;" placeholder="请输入内容"></el-input>
                        <el-select v-model="input" style="width: 200px; margin-right: 10px;" placeholder="请选择">
                            <el-option
                                v-for="item in options"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                            </el-option>
                        <el-input v-model="form.code" style="width: 200px; margin-right: 10px;" placeholder="请输入物料名称/编码"></el-input>
                        <el-select v-model="form.status" style="width: 150px; margin-right: 10px;" placeholder="盘点状态">
                            <el-option label="已盘" :value="1"></el-option>
                            <el-option label="未盘" :value="0"></el-option>
                        </el-select>
                        <el-button type="primary">查询</el-button>
                        <el-button>清空</el-button>
                        <el-select v-model="form.type" style="width: 150px; margin-right: 10px;" placeholder="盘点结果">
                            <el-option label="账实相符" :value="0"></el-option>
                            <el-option label="盘亏" :value="1"></el-option>
                            <el-option label="盘盈" :value="2"></el-option>
                        </el-select>
                        <el-button type="primary" @click="getList">查询</el-button>
                        <el-button @click="clear">清空</el-button>
                        <el-button>导出</el-button>
                    </div>
                    <div class="list_search_right">
                        <span>已盘:100</span>
                        <span>未盘:20</span>
                        <span>账实相符:88</span>
                        <span>盘盈:2</span>
                        <span>盘亏:20</span>
                        <span>已盘:{{info.finishAmount || 0}}</span>
                        <span>未盘:{{info.unFinishAmount || 0}}</span>
                        <span>账实相符:{{info.equalAmount || 0}}</span>
                        <span>盘盈:{{info.profitAmount || 0}}</span>
                        <span>盘亏:{{info.lossAmount || 0}}</span>
                    </div>
                </div>
                <div style="width: 100%; margin: 20px 0;">
                    <el-table :data="roomList" stripe>
                        <el-table-column prop="projectName" label="资产编码" show-overflow-tooltip />
                        <el-table-column prop="buildingName" label="资产名称" show-overflow-tooltip />
                        <el-table-column prop="buildingName" label="条码" show-overflow-tooltip />
                        <el-table-column prop="buildingName" label="品牌" show-overflow-tooltip />
                        <el-table-column prop="buildingName" label="规格型号" show-overflow-tooltip />
                        <el-table-column prop="buildingName" label="单位" show-overflow-tooltip />
                        <el-table-column prop="buildingName" label="所在仓库" show-overflow-tooltip />
                        <el-table-column prop="buildingName" label="账面数量" show-overflow-tooltip />
                        <el-table-column prop="buildingName" label="盘点数量" show-overflow-tooltip />
                        <el-table-column prop="buildingName" label="备注" show-overflow-tooltip />
                    <el-table :data="list" stripe>
                        <el-table-column prop="materialCode" label="资产编码" show-overflow-tooltip />
                        <el-table-column prop="materialName" label="资产名称" show-overflow-tooltip />
                        <el-table-column prop="materialQrcode" label="条码" show-overflow-tooltip />
                        <el-table-column prop="materialBrand" label="品牌" show-overflow-tooltip />
                        <el-table-column prop="materialAttr" label="规格型号" show-overflow-tooltip />
                        <el-table-column prop="materialUnitName" label="单位" show-overflow-tooltip />
                        <el-table-column prop="warehouseName" label="所在仓库" show-overflow-tooltip />
                        <el-table-column prop="stock" label="账面数量" show-overflow-tooltip />
                        <el-table-column prop="actStock" label="盘点数量" show-overflow-tooltip />
                        <el-table-column prop="remark" label="备注" show-overflow-tooltip />
                    </el-table>
                </div>
                <div class="list_pagination">
@@ -87,6 +91,7 @@
<script>
  import GlobalWindow from '@/components/common/GlobalWindow'
  import BaseOpera from '@/components/base/BaseOpera'
  import { ywStocktakingRecordPage, getById } from '@/api/ywStocktaking'
  export default {
    name: "inventoryDetails",
    components: {
@@ -95,11 +100,14 @@
    extends: BaseOpera,
    data() {
      return {
        id: null,
        info: {},
        input: '',
        options: [],
        roomList: [],
        list: [],
        form: {
          code: '',
          status: '',
          type: ''
        },
        pageSize: 10,
        total: 0,
        page: 1
@@ -108,13 +116,45 @@
    methods: {
      handleSizeChange(size) {
        this.pageSize = size
        this.getList()
      },
      handleCurrentChange(page) {
        this.page = page
        this.getList()
      },
      open (title) {
      open (title, id) {
        this.title = title
        this.visible = true
        this.id = id
        this.getDetails()
        this.getList()
      },
      getDetails() {
        getById(this.id)
            .then(res => {
              this.info = res
            })
      },
      clear() {
        this.form.name = ''
        this.form.status = ''
        this.form.type = ''
        this.page = 1
        this.getList()
      },
      getList() {
        ywStocktakingRecordPage({
          capacity: this.pageSize,
          page: this.page,
          model: {
            stocktakingId: this.id,
            code: this.form.code,
            status: this.form.status,
            type: this.form.type
          }
        }).then(res => {
          this.list = res.records
        })
      }
    }
  }