123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755 |
- <template>
- <div style="height:100%;">
- <div class="searchForm-header">
- <el-form :model="query" label-width="100px" inline="">
- <el-row>
- <el-form-item label="库房名称" style="margin-left: -15px">
- <el-select v-model="query.wareName" clearable size="small" style="width:120px;margin-left: -8px">
- <el-option v-for="item in optionsWare" :key="item.id" :label="item.name" :value="item.name">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="垛位名称" style="margin-left: -35px">
- <el-input v-model="query.stackName" size="small" style="width:120px;margin-left: -8px"></el-input>
- </el-form-item>
- <el-form-item label="品名" style="margin-left: -35px">
- <el-input v-model="query.materialName" size="small" style="width:120px;margin-left: -8px">
- <el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
- </el-input>
- </el-form-item>
- <el-form-item label="钢种" style="margin-left: -35px">
- <el-input v-model="query.standard" size="small" style="width:150px;margin-left: -8px">
- <el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
- </el-input>
- </el-form-item>
- <el-form-item label="货权单位" style="margin-left: -35px">
- <el-input v-model="query.fkcustomer" size="small" style="width:170px;margin-left: -8px">
- <el-button slot="append" icon="el-icon-search" @click="showfkCustomer"></el-button>
- </el-input>
- </el-form-item>
- <el-form-item label="客户名称" style="margin-left: -35px">
- <el-input v-model="query.customerName" size="small" style="width:170px;margin-left: -8px">
- <el-button slot="append" icon="el-icon-search" @click="showCustomer"></el-button>
- </el-input>
- </el-form-item>
- <el-form-item label="规格型号" style="margin-left: -15px;margin-top: -3px">
- <el-input v-model="query.model" size="small" style="width:120px;margin-left: -8px">
- </el-input>
- </el-form-item>
- <el-form-item label="钢板号" style="margin-left: -15px;margin-top: -3px">
- <el-input v-model="query.plateNo" size="small" style="width:120px;margin-left: -8px">
- </el-input>
- </el-form-item>
- <el-form-item label="订单号" style="margin-left: -15px;margin-top: -3px">
- <el-input v-model="query.ordNo" size="small" style="width:120px;margin-left: -8px">
- </el-input>
- </el-form-item>
- <el-form-item label="" style="margin-top: 0px;margin-left: 10px">
- <el-button size="small" type="primary" @click="handleSearch">查询</el-button>
- <el-button size="small" type="info" @click="handleClear">重置</el-button>
-
- <el-button size="small" type="info" @click="handleImport" plain>导入</el-button>
-
- <el-button @click="showChangeCustomer" size="small" type="primary">货权转移</el-button>
- <el-button type="primary" size="small" @click="showDistribution">配货</el-button>
- <el-button type="success" @click="handleExport" style="margin-left: 2px" size="small">导出记录</el-button>
- <el-button type="primary" size="small" @click="showOut">出库</el-button>
- <el-button size="small" type="danger" @click="handleInBack" :disabled="backAble">取消入库</el-button>
- </el-form-item>
- </el-row>
-
- </el-form>
- </div>
- <div class="tabledata-grid">
- <el-table :data="tableData" height="100%" border style="width: 97%;" v-loading="loading" ref="multipleTable" @select="handleTableSelect" @selection-change="handleSelectionChange" @select-all = "selectAll">
- <el-table-column type="selection" width="40" header-align="center" align="center"></el-table-column>
- <el-table-column prop="plateNo" label="产品编号" width="200" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="materialName" label="品名" width="100" show-overflow-tooltip header-align="center" align="center"></el-table-column>
- <el-table-column prop="ordNo" label="订单号" width="180" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="model" label="规格型号" width="160" show-overflow-tooltip header-align="center" align="center"></el-table-column>
- <el-table-column prop="weight" label="重量" width="120" show-overflow-tooltip align="right" header-align="center"></el-table-column>
- <el-table-column prop="materialStandard" label="钢种" width="100" show-overflow-tooltip header-align="center" align="center"></el-table-column>
- <el-table-column prop="inCarNo" label="入库车号" width="200" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="addTime" label="入库时间" width="200" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="customerName" label="货主" width="300" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="productionPlace" label="产地" width="250" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="count" label="件数" width="120" show-overflow-tooltip align="right" header-align="center"></el-table-column>
- <el-table-column prop="wgtDcnMtcCd" label="计重方式" width="100" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="billRule" label="计费规则" width="100" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="edgeTy" label="切边类型" width="100" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="appDesc" label="外观描述" width="100" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip header-align="center"></el-table-column>
- </el-table>
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
- :page-sizes="pageSizes" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalRows">
- </el-pagination>
- </div>
-
- <popup-material ref="PopupMaterial" @receviceFromChild="receviceFromMaterial"></popup-material>
- <popup-customer ref="PopupCustomer" @receviceFromChild="receviceFromCustomer"></popup-customer>
- <popup-customer ref="PopupfkCustomer" @receviceFromChild="receviceFromfkCustomer"></popup-customer>
- <popup-customer ref="PopupNewCustomer" @receviceFromChild="receviceFromNewCustomer"></popup-customer>
- <popup-address ref="PopupAddress" @receviceFromChild="receviceFromAddress"></popup-address>
- <popup-distribution ref="PopupDistribution" @receviceFromChild="receviceFromDistreibution" :selectRows="selectRows"></popup-distribution>
- <popup-out ref="PopupOut" @receviceFromChild="receviceFromOut"></popup-out>
- <popup-in ref="PopupIn" @receviceFromChild="receviceFromIn" :wares="options" :wareId="query.wareId" :stack="moveFromStack"></popup-in>
- <el-dialog title="货权转移" :visible.sync="customerDialogVisible" width="500px">
- <el-form>
- <el-form-item label="货权转移">
- <el-input v-model="newCustomer.name">
- <el-button slot="append" icon="el-icon-search" @click="showNewCustomer"></el-button>
- </el-input>
- </el-form-item>
- <el-form-item label="修改目的地">
- <el-input v-model="newAddress_fir">
- <el-button slot="append" icon="el-icon-search" @click="showAddress"></el-button>
- </el-input>
- </el-form-item>
- <el-form-item label="修改地址">
- <el-input v-model="newAddress_lst">
- </el-input>
- </el-form-item>
- <el-form-item label=" ">
- <el-button type="success" @click="handleCustomerSave">保存</el-button>
- <el-button type="danger" @click="handleCustomerCancelSave">取消</el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- <el-dialog title="导入入库信息" :visible.sync="importDialogVisible" width="1000px">
- <el-upload class="upload-demo" action="" :on-change="handleChange" :on-exceed="handleExceed" :on-remove="handleRemove"
- ref="upload" :limit="1" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
- :auto-upload="false">
- <el-button slot="trigger" size="small" type="primary">选择文件</el-button>
- <el-button size="small" type="success" @click="inImport">保存</el-button>
- <div slot="tip" >只能上传xlsx/xls文 件</div>
- </el-upload>
- <!--
- <el-table :data="imTableData" border>
- <el-table-column prop="层数" label="层数" width="60" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="库房" label="库房" width="100" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="垛位" label="垛位" width="120" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="物料" label="物料" width="120" show-overflow-tooltip align="center" header-align="center"></el-table-column>
- <el-table-column prop="钢种" label="钢种" width="120" show-overflow-tooltip align="center" header-align="center"></el-table-column>
- <el-table-column prop="钢板号" label="钢板号" width="200" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="规格型号" label="规格型号" width="120" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="数量" label="数量" width="120" show-overflow-tooltip align="right" header-align="center"></el-table-column>
- <el-table-column prop="重量" label="重量" width="120" show-overflow-tooltip align="right" header-align="center"></el-table-column>
- <el-table-column prop="客户" label="客户" width="300" show-overflow-tooltip header-align="center"></el-table-column>
- <el-table-column prop="备注" label="备注" width="150" show-overflow-tooltip header-align="center"></el-table-column>
- </el-table>
- -->
- </el-dialog>
-
- </div>
- </template>
-
- <script>
- import axios from '@/axios'
- import PopupStack from '@/components/PopupStack.vue'
- import PopupMaterial from '@/components/PopupMaterial.vue'
- import PopupCustomer from '@/components/PopupCustomer.vue'
- import PopupAddress from '@/components/PopupAddress.vue'
- import PopupDistribution from '@/components/PopupDistribution.vue'
- import PopupOut from '@/components/PopupOut.vue'
- import PopupIn from '@/components/PopupIn.vue'
- import Export2Excel from '../../excel/Export2Excel.js'
- import {
- mapState
- } from 'vuex'
- export default {
- components: {
- PopupStack,
- PopupMaterial,
- PopupCustomer,
- PopupAddress,
- PopupDistribution,
- PopupOut,
- PopupIn,
- },
- computed: {
- // splitCount: function() {
- // let result = Number(this.split.originalCount) - Number(this.split.count)
- // return result
- // },
- // splitWeight: function() {
- // let result = Number(this.split.originalWeight) - Number(this.split.weight)
- // return result
- // },
- ...mapState({
- serverName: state => state.app.serverName,
- // wareBackgroundColor: state => state.color.wareBackgroundColor,
- // stackColor: state => state.color.stackColor,
- // stackSelectedColor: state => state.color.stackSelectedColor,
- // lockColor: state => state.color.lockColor,
- })
- },
- data() {
- return {
- addressDialogVisible: false,
- customerDialogVisible: false,
- query: {
- wareName: '',
- stackName: '',
- model: '',
- materialName: '',
- standard: '',
- customerName: '',
- fkcustomer: '',
- plateNo: '',
- ordNo: '',
- wareId:'',
- },
- multipleSelection: [],
- tableData: [],
- optionsWare: [],
- newCustomer: {
- id: '',
- name: ''
- },
- newAddress_fir: '',
- newAddress_lst: '',
- currentPage: 1,
- totalRows: 0,
- pageSizes: [50, 100, 200],
- pageSize: 50,
- HideAndShow: 0,
-
-
- loading: false,
- importDialogVisible: false,
- selectRows: [],
- options: [],
- moveFromStack: {}, //移除垛位
- fileTemp: [],
- imTableData: [],
- moveStore: {},
- };
- },
- //键盘监听
- mounted() {
- this.getWare()
- //this.getTableData()
- },
- methods: {
- showMaterial() {
- this.$refs.PopupMaterial.show()
- },
- receviceFromMaterial(material) {
- this.query.materialName = material.name
- this.query.standard = material.standard
- },
-
- showCustomer() {
- this.$refs.PopupCustomer.show()
- },
- receviceFromCustomer(customer) {
- this.query.customerName = customer.name
- },
-
- showfkCustomer() {
- this.$refs.PopupfkCustomer.show()
- },
- receviceFromfkCustomer(customer) {
- this.query.fkcustomer = customer.name
- },
-
- showNewCustomer() {
- this.$refs.PopupNewCustomer.show()
- },
- receviceFromNewCustomer(customer) {
- this.newCustomer = customer
- this.newAddress = customer.address
- },
- showAddress() {
- this.$refs.PopupAddress.show(this.newCustomer.id)
- },
- receviceFromAddress(address) {
- this.newAddress_fir = address.address_fir
- this.newAddress_lst = address.address_lst
- },
-
- handleSearch() {
- this.currentPage = 1
- this.getTableData()
- },
- handleImport() {
- this.importDialogVisible = true
- },
- showUpload() {
- this.dialogTravePic = true
- },
- handleDownload() {
- window.open(this.serverName.substr(0, this.serverName.lastIndexOf('/', this.serverName.lastIndexOf('/') - 1)) +
- '/import.xls')
- },
- showIn() {
- // if (this.query.wareId == '') {
- // this.$message({
- // type: 'error',
- // message: '请选择入库库房'
- // });
- // return
- // }
- // if (this.query.stackId == '') {
- // this.$message({
- // type: 'error',
- // message: '请选择入库垛位'
- // });
- // return
- // }
- this.$refs.PopupIn.show()
- },
- handleInBack() {
- if (this.selectRows.length < 1) {
- this.$message({
- type: 'error',
- message: '至少选择一条数据!',
- });
- return
- } else {
- var url = 'WareIn/back.do'
- var param = {
- json: JSON.stringify(this.selectRows),
- }
- axios.post(url, param).then(response => {
- if (response.data.code == 0) {
- this.getStoreByStackId(response.data.data)
- } else {
- this.$message({
- type: 'error',
- message: '操作失败;' + response.data.msg,
- });
- }
- });
- }
- },
- showDistribution() {
- //console.log(this.selectRows.length)
- if (this.selectRows.length < 1) {
- this.$message({
- type: 'warning',
- message: '至少选择一条数据!',
- });
- }
- this.$refs.PopupDistribution.show()
-
- },
- showOut() {
- this.$refs.PopupOut.show()
- },
- getWare() {
- var url = 'MaintWare/queryByUserId.do'
- var param = {}
- axios.get(url, param).then(response => {
- this.optionsWare = response.data.data
- console.log('optionsWare',optionsWare)
- if (response.data.data.length == 1) {
- this.wareName = response.data.data[0].name
-
- }
- });
- },
- handleSizeChange(val) {
- this.pageSize = val
- this.getTableData()
- },
-
- handleCurrentChange(val) {
- this.currentPage = val
- this.getTableData()
- },
-
- search() {
- this.currentPage = 1
- this.getTableData()
- },
-
- getTableData() {
- this.loading = true
- var url = 'WareStore/queryStore.do'
- var param = {
- page: this.currentPage,
- rows: this.pageSize,
- wareName: this.query.wareName,
- stackName: this.query.stackName,
- model: this.query.model,
- materialName: this.query.materialName,
- standard: this.query.standard,
- customerName: this.query.customerName,
- plateNo: this.query.plateNo,
- ordNo: this.query.ordNo,
- fkcompony: this.query.fkcustomer,
- }
- axios.get(url, param).then(response => {
- if (response.data.code == 0) {
- this.tableData = response.data.data.list
- this.totalRows = response.data.data.total
- } else {
- this.$message({
- type: 'error',
- message: '操作失败;' + response.data.msg,
- });
- }
- this.loading = false
- });
- },
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- showChangeCustomer() {
- if (this.multipleSelection.length < 1) {
- this.$message({
- type: 'error',
- message: '至少选择一条记录!',
- });
- return
- }
- var customerAddress = this.multipleSelection[0].customer.address
- var boolean = true
- for (var i = 0; i < this.multipleSelection.length; i++) {
- if (this.multipleSelection[i].customer.address == customerAddress) {
-
- } else {
- boolean = boolean && false
- customerAddress = this.multipleSelection[i].customer.address
- }
- }
- if (boolean) {
- this.newCustomer = this.multipleSelection[0].customer
- this.newAddress = this.multipleSelection[0].receiveAddress
- this.customerDialogVisible = true
- } else {
- this.$message({
- type: 'error',
- message: '请选择同一客户!',
- });
- }
- },
-
- handleCustomerSave() {
- var url = 'WareChange/changeCustomer.do'
- var param = {
- json: JSON.stringify(this.multipleSelection),
- customer: JSON.stringify(this.newCustomer),
- address_fir: this.newAddress_fir,
- address_lst: this.newAddress_lst
- }
- axios.post(url, param).then(response => {
- if (response.data.code == 0) {
- this.getTableData()
- this.customerDialogVisible = false
- } else {
- this.$message({
- type: 'error',
- message: '操作失败;' + response.data.msg,
- });
- }
- });
- },
- handleCustomerCancelSave() {
- this.customerDialogVisible = false
- },
- inImport() {
- var url = 'WareIn/inImport.do'
- var json = JSON.stringify(this.imTableData)
- var param = {
- json: json
- }
- axios.post(url, param).then(response => {
- if (response.data.code == '0') {
- this.$message({
- type: 'success',
- message: '入库成功!',
- });
- this.importDialogVisible = false
- this.imTableData = []
- this.fileTemp = null
- } else {
- this.$message({
- type: 'error',
- message: '入库失败!' + response.data.msg
- });
-
- }
- });
- },
- handleTableSelectionChange(val) {
- this.selectRows = val
- this.setLayerColor()
- },
- receviceFromDistreibution() {
- this.getStoreByStackId(null)
- },
- getStoreByStackId(moveSelect) {
- this.tableDataLoading = true
- var url = 'WareStore/queryByWareIdStackId.do'
- var param = {
- wareId: this.query.wareId,
- stackId: this.moveFromStack.id
- }
- axios.get(url, param).then(response => {
- if (response.data.code == 0) {
- this.tableData = response.data.data
- this.selectRows = []
- // if (this.isLayer == '0') {
- // this.drawStoreNoLayer(response.data.data)
- // } else if (this.isLayer == '1') { //1是A开头的,2是B开头的,3是C开头的。
- // this.drawStoreAutoLayer(response.data.data)
- // } else if (this.isLayer == '2') {
- // this.drawStoreManulLayer(response.data.data)
- // }
- if (moveSelect) {
- this.$refs.multipleTable.clearSelection();
- for (let i = 0; i < this.tableData.length; i++) {
- for (let j = 0; j < moveSelect.length; j++) {
- if (moveSelect[j].layer === this.tableData[i].layer) {
- this.selectRows.push(this.tableData[i])
- }
- }
- }
- this.$nextTick(() => {
- this.toggleSelection(this.selectRows, true)
- this.setLayerColor()
- })
-
- }
- } else {
- this.$message({
- type: 'error',
- message: '保存失败' + response.data.msg,
- });
- }
- this.tableDataLoading = false
- });
- },
- receviceFromOut(customer) {
- this.getStoreByStackId()
- },
- receviceFromIn() {
- this.getStoreByStackId()
- },
- handleChange(file, fileList) {
- this.fileTemp = file.raw
- if (this.fileTemp) {
- if ((this.fileTemp.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') || (this.fileTemp.type ==
- 'application/vnd.ms-excel')) {
- this.importfxx(this.fileTemp)
- } else {
- this.$message({
- type: 'warning',
- message: '附件格式错误,请删除后重新上传!'
- })
- }
- } else {
- this.$message({
- type: 'warning',
- message: '请上传附件!'
- })
- }
-
- },
- handleExceed(file, fileList) {},
- handleRemove(file, fileList) {
- this.fileTemp = null
- },
- toggleSelection(rows, selected) {
- if (rows) {
- rows.forEach(row => {
- this.$refs.multipleTable.toggleRowSelection(row, selected); //接受两个参数,row传递被勾选行的数据,selected设置是否选中
- });
- }
- },
- setLayerColor() {
- if (this.selectRows.length == 0) {
- for (let i = 0; i < this.moveStore.storage._roots.length; i++) {
- if (this.tableData[i].lockFlag == '1') {
- this.moveStore.storage._roots[i].attr('style', {
- fill: this.lockColor,
- })
- } else {
- this.moveStore.storage._roots[i].attr('style', {
- fill: this.stackColor,
- })
- }
- }
- } else {
- for (let i = 0; i < this.moveStore.storage._roots.length; i++) {
- for (let j = 0; j < this.selectRows.length; j++) {
- if (this.tableData[i] === this.selectRows[j]) {
- this.moveStore.storage._roots[i].attr('style', {
- fill: this.stackSelectedColor,
- })
- break;
- } else {
- if (this.tableData[i].lockFlag == '1') {
- this.moveStore.storage._roots[i].attr('style', {
- fill: this.lockColor,
- })
- } else {
- this.moveStore.storage._roots[i].attr('style', {
- fill: this.stackColor,
- })
- }
- }
- }
-
- }
- }
- },
- handleTableSelect(selection, row) { //第一个参数是目前所有选中的数据
- console.log(JSON.stringify(row))
- if (row.lockFlag == '1') {
- // this.$message({
- // type: 'error',
- // message: '该行已被配货锁定',
- // });
- alert("该行已被配货锁定")
- this.toggleSelection([row], false)
- // for(let i = 0;i<selection.length;i++){
- // if(selection[i]==row){
- // selection.splice(i,1)
- // }
- // }
- } else {
- this.selectRows = selection
- this.setLayerColor()
- }
- },
- selectAll(selection){
- this.selectRows = selection;
- },
- handleExport() {
- var imptData = [];
- var url = 'WareStore/queryStore.do'
- var param = {
- page: -1,
- rows: -1,
- wareName: this.query.wareName,
- stackName: this.query.stackName,
- model: this.query.model,
- materialName: this.query.materialName,
- standard: this.query.standard,
- customerName: this.query.customerName,
- plateNo: this.query.plateNo,
- ordNo: this.query.ordNo,
- fkcompony: this.query.fkcustomer,
- }
-
-
- axios.get(url, param).then(response => {
-
- if (response.data.code == 0) {
- var imptData = response.data.data;
- if (imptData.length == 0) {
- this.$alert('无法导出,选择时间段无记录', '提示', {
- confirmButtonText: '确定',
- callback: action => {}
- });
- } else {
-
- this.exportExcel(imptData)
- }
- } else {
- this.$message({
- type: 'error',
- message: '操作失败;' + response.data.msg,
- });
- }
-
- });
-
- },
- exportExcel(imptData) {
- // alert(JSON.stringify(imptData))
- const header = ["垛位"
- ,"层数"
- ,"品名"
- ,"钢种"
- ,"产品编号"
- ,"订单号"
- ,"规格型号"
- ,"数量"
- ,"重量"
- ,"货权单位"
- ,"客户"
- ,"目的地"
- ,"收货地址"
- ,"计量方式"
- ,"切边类型"
- ,"产地"
- ,"备注"
- ,"入库时间"
- ] // 导出的表头名
- const filterVal = ["stackName"
- ,"layer"
- ,"materialName"
- ,"materialStandard"
- ,"plateNo"
- ,"ordNo"
- ,"model"
- ,"count"
- ,"weight"
- ,"fkComponyId"
- ,"customerName"
- ,"receiveAddressFir"
- ,"receiveAddressLast"
- ,"wgtDcnMtcCd"
- ,"edgeTy"
- ,"productionPlace"
- ,"remark"
- ,"addTime"
- ]
-
- /* for(var i=0;i<imptData.length;i++){
- imptData[i]["stackName"] = imptData[i].stack.name;
- imptData[i]["materialName"] = imptData[i].material.name;
- imptData[i]["materialStandard"] = imptData[i].material.standard;
- imptData[i]["customerName"] = imptData[i].customer.name;
- } */
- const list = imptData
- const data = this.formatJson(filterVal, list)
-
- const filename = '库存操作' + (new Date()).toLocaleDateString();
- Export2Excel.export_json_to_excel({
- header,
- data,
- filename
- })
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map(v => filterVal.map(j => {
- return v[j]
- }))
- },
-
-
- //showChangeAddress() {},
- // handleAddressSave() {
- // },
- // handleAddressCancelSave() {
- // this.addressDialogVisible = false
- // },
- },
- }
- </script>
-
- <style>
- .option_btn{
- margin-left: 30px
- }
- .searchForm-header{
- height: auto;
- margin-left: 10px;
- }
- .tabledata-grid{
- font-size: 20px;
- margin-left: 5px;
- height: calc(100% - 100px);
-
- }
-
- .el-select-dropdown .el-scrollbar .el-scrollbar__wrap
- {
- overflow: scroll!important;
- }
- </style>
|