feat: 成品库导出修改
This commit is contained in:
parent
c8bd8fa2c4
commit
d3d35950ee
|
|
@ -41,7 +41,8 @@
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
:params="params"
|
:params="params"
|
||||||
:hExportExcel="hExportExcel"
|
:hExportCols = "hExportCols"
|
||||||
|
:hExportName="'仓库成品库存'"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="批次" prop="batch">
|
<el-table-column label="批次" prop="batch">
|
||||||
|
|
@ -102,7 +103,8 @@
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:params="paramsWm"
|
:params="paramsWm"
|
||||||
stripe
|
stripe
|
||||||
:hExportExcel="hExportExcel2"
|
:hExportCols = "hExportCols2"
|
||||||
|
:hExportName="'车间成品库存'"
|
||||||
>
|
>
|
||||||
<el-table-column label="批次" prop="batch">
|
<el-table-column label="批次" prop="batch">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -158,7 +160,6 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import printDialog from "./../template/printmaterial.vue";
|
import printDialog from "./../template/printmaterial.vue";
|
||||||
import { dataToExcel } from "@/utils/exportExcel";
|
|
||||||
export default {
|
export default {
|
||||||
name: "halfgood",
|
name: "halfgood",
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -183,6 +184,58 @@ export default {
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromMb,
|
apiObjPrint:this.$API.cm.labelmat.fromMb,
|
||||||
wmId:'',
|
wmId:'',
|
||||||
showBatch: "",
|
showBatch: "",
|
||||||
|
hExportCols:[{
|
||||||
|
header: "批次",
|
||||||
|
key: "batch"
|
||||||
|
}, {
|
||||||
|
header: "物料名",
|
||||||
|
key: "material_.name"
|
||||||
|
}, {
|
||||||
|
header: "规格",
|
||||||
|
key: "material_.specification"
|
||||||
|
}, {
|
||||||
|
header: "型号",
|
||||||
|
key: "material_.model"
|
||||||
|
}, {
|
||||||
|
header: "已完成工序",
|
||||||
|
key: "material_.process_name"
|
||||||
|
}, {
|
||||||
|
header: "所在仓库",
|
||||||
|
key: "warehouse_name"
|
||||||
|
}, {
|
||||||
|
header: "存量",
|
||||||
|
key: "count"
|
||||||
|
}, {
|
||||||
|
header: "更新时间",
|
||||||
|
key: "update_time"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
hExportCols2:[{
|
||||||
|
header: "批次",
|
||||||
|
key: "batch"
|
||||||
|
}, {
|
||||||
|
header: "物料名",
|
||||||
|
key: "material_.name"
|
||||||
|
}, {
|
||||||
|
header: "规格",
|
||||||
|
key: "material_.specification"
|
||||||
|
}, {
|
||||||
|
header: "型号",
|
||||||
|
key: "material_.model"
|
||||||
|
}, {
|
||||||
|
header: "已完成工序",
|
||||||
|
key: "material_.process_name"
|
||||||
|
}, {
|
||||||
|
header: "所在车间",
|
||||||
|
key: "belong_dept_name"
|
||||||
|
}, {
|
||||||
|
header: "存量",
|
||||||
|
key: "count"
|
||||||
|
}, {
|
||||||
|
header: "更新时间",
|
||||||
|
key: "update_time"
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -230,64 +283,6 @@ export default {
|
||||||
this.$refs.printmaterial.open();
|
this.$refs.printmaterial.open();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
hExportExcel(tdata) {
|
|
||||||
let cols = [{
|
|
||||||
header: "批次",
|
|
||||||
key: "batch"
|
|
||||||
}, {
|
|
||||||
header: "物料名",
|
|
||||||
key: "material_.name"
|
|
||||||
}, {
|
|
||||||
header: "规格",
|
|
||||||
key: "material_.specification"
|
|
||||||
}, {
|
|
||||||
header: "型号",
|
|
||||||
key: "material_.model"
|
|
||||||
}, {
|
|
||||||
header: "已完成工序",
|
|
||||||
key: "material_.process_name"
|
|
||||||
}, {
|
|
||||||
header: "所在仓库",
|
|
||||||
key: "warehouse_name"
|
|
||||||
}, {
|
|
||||||
header: "存量",
|
|
||||||
key: "count"
|
|
||||||
}, {
|
|
||||||
header: "更新时间",
|
|
||||||
key: "update_time"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
dataToExcel(cols, tdata, "成品库库存")
|
|
||||||
},
|
|
||||||
hExportExcel2(tdata) {
|
|
||||||
let cols = [{
|
|
||||||
header: "批次",
|
|
||||||
key: "batch"
|
|
||||||
}, {
|
|
||||||
header: "物料名",
|
|
||||||
key: "material_.name"
|
|
||||||
}, {
|
|
||||||
header: "规格",
|
|
||||||
key: "material_.specification"
|
|
||||||
}, {
|
|
||||||
header: "型号",
|
|
||||||
key: "material_.model"
|
|
||||||
}, {
|
|
||||||
header: "已完成工序",
|
|
||||||
key: "material_.process_name"
|
|
||||||
}, {
|
|
||||||
header: "所在车间",
|
|
||||||
key: "belong_dept_name"
|
|
||||||
}, {
|
|
||||||
header: "存量",
|
|
||||||
key: "count"
|
|
||||||
}, {
|
|
||||||
header: "更新时间",
|
|
||||||
key: "update_time"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
dataToExcel(cols, tdata, "车间成品库存")
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue