haoyahui
2023-11-20 a6acf1f8924a8fabaa4b74f6771ddbe41ab6b204
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<template>
  <win-md :title="setting.title" @close="close" :width="'1200px'">
    <el-row :gutter="20" style="margin-bottom: 20px" type="flex" align="middle">
      <el-col :span="6">盘点单号:{{ formData.businessFormCode }}</el-col>
      <el-col :span="6">盘点任务:{{ formData.businessTaskCode }}</el-col>
      <el-col :span="6">盘点仓库:{{ formData.warehouseId }}</el-col>
      <el-col :span="3" :offset="3">
        <my-button name="导出盘点单" site="form" size="medium" type="primary" />
      </el-col>
    </el-row>
    <el-table v-loading="loading" :data="formData.tableData" height="100%" :stripe="true" class="the-table">
      <el-table-column prop="goodsTemplateName" label="物品名称"> </el-table-column>
      <el-table-column prop="baseGoodsModelsId" label="型号" align="center"> </el-table-column>
      <el-table-column prop="classification" label="类别"> </el-table-column>
      <el-table-column prop="unit" label="单位" align="center"> </el-table-column>
      <el-table-column prop="kc" label="应有库存" align="center"> </el-table-column>
      <el-table-column prop="price" label="单价" align="center"> </el-table-column>
      <el-table-column prop="inventoryResult" label="金额" align="center"> </el-table-column>
      <el-table-column prop="inventoryCounts" label="实盘数量" align="center">
        <template slot-scope="scope">
            <el-input v-model="scope.row.inventoryCounts"></el-input>
        </template>
      </el-table-column>
    </el-table>
 
    <div slot="footer" align="center" class="dialog-footer">
      <my-button name="暂存" site="form" type="primary" @click="close" />
      <my-button name="完成盘点" site="form" type="success" @click="save" />
    </div>
  </win-md>
</template>
 
<script>
import winMd from '@/components/win/win-md';
import myButton from '@/components/myButton/myButton';
import { inventorySelectPdList,inventoryTemporaryStorage,inventoryFinish } from '@/api/stock/inventory';
export default {
  components: { winMd, myButton },
  props: {
    setting: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
      loading: false,
      formData: {
        businessFormCode: '2023080812',
        businessTaskCode: '2023年9月盘点单',
        warehouseId: '开封市仓库',
        tableData: [],
      },
    };
  },
  created() {
    // for (let i = 0; i < 10; i++) {
    //   this.formData.tableData.push({
    //     goodsTemplateName: '施乐黑色碳粉',
    //     baseGoodsModelsId: '施乐c2201',
    //     classification: 'A',
    //     unit: '套',
    //     kc: 10,
    //     price: 20,
    //     inventoryResult: 200,
    //     inventoryCounts: 0,
    //   });
    // }
    inventorySelectPdList({id:this.setting.id}).then(res=>{
      this.formData = res
    })
  },
  methods: {
    close() {
      this.$emit('close');
    },
    save() {
      
    }
  },
};
</script>
 
<style></style>