Merge remote-tracking branch 'origin/master'
| | |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | | //将当前选中的记录传到子页面 |
| | | this.$bus.$emit('getToolingStorageData', record) |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | //点击当前行变色 |
| | | let oldList = document.querySelectorAll('.checked-td-of-add-table') |
| | | if (oldList) { |
| | | for (let j = 0; j < oldList.length; j++) { |
| | | oldList[j].classList.remove('checked-td-of-add-table') |
| | | } |
| | | } |
| | | let children = e.target.parentNode.children |
| | | for (let i = 0; i < children.length; i++) { |
| | | children[i].classList.add('checked-td-of-add-table') |
| | | } |
| | | // let oldList = document.querySelectorAll('.checked-td-of-add-table') |
| | | // if (oldList) { |
| | | // for (let j = 0; j < oldList.length; j++) { |
| | | // oldList[j].classList.remove('checked-td-of-add-table') |
| | | // } |
| | | // } |
| | | // let children = e.target.parentNode.children |
| | | // for (let i = 0; i < children.length; i++) { |
| | | // children[i].classList.add('checked-td-of-add-table') |
| | | // } |
| | | }, |
| | | }, |
| | | } |
| | |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | //将当前选中的记录传到子页面 |
| | | this.$bus.$emit('getToolingStorageData', this.selectionRows[0]) |
| | | }, |
| | | handleEdit: function (record) { |
| | | this.$refs.modalForm.edit(record) |
| | |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" |
| | | class="j-table-force-nowrap" |
| | | :customRow="customRow" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | |
| | | this.$bus.$emit('queryTreeData') //刷新左侧树 |
| | | }, |
| | | |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | onSelectChange(selectedRowKeys) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | //通过id查询管理参数和参数数据 |
| | |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; // 更新表格数据 |
| | | this.ipagination.total = res.result.total |
| | | //默认选中第一条数据 |
| | | this.selectedRowKeys[0] = res.result.records[0].id |
| | | this.onSelectChange(this.selectedRowKeys) |
| | | } else { |
| | | this.$message.warning("请选择叶子节点进行查询"); |
| | | this.ipagination.total = 0 |
| | |
| | | <j-select-tooling-modal ref="toolingModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-tooling-modal> |
| | | <j-select-return-list-modal ref="returnModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-return-list-modal> |
| | | <j-select-sharpen-list-modal ref="sharpenModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-sharpen-list-modal> |
| | | |
| | | <div id="printArea" style="display: block;"> |
| | | <div v-for="(item, index) in qrList" :key="index" class="qrcode-item"> |
| | | <img :src="item.base64" alt="QR Code"> |
| | | <p>{{ item.content }}</p> |
| | | </div> |
| | | </div> |
| | | </a-modal> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | import { filterObj } from '@/utils/util' |
| | | import JSelectReturnListModal from '.././inboundOrder/JSelectReturnListModal' |
| | | import JSelectSharpenListModal from '.././inboundOrder/JSelectSharpenListModal' |
| | | import printJS from 'print-js'; |
| | | |
| | | export default { |
| | | name: 'InboundModel', |
| | |
| | | }, |
| | | ], |
| | | classifyId:'', |
| | | locationCodeOptions:[] |
| | | locationCodeOptions:[], |
| | | qrList: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | postAction(this.url.addInStorage, formData) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | if(formData.inStorehouseType === '1'){ |
| | | this.qrList = res.result.map((content, i) => ({ |
| | | content:res.result[i].content, |
| | | base64: res.result[i].image |
| | | })); |
| | | this.handleBacthPrint(); |
| | | }else{ |
| | | that.$message.success("保存成功") |
| | | } |
| | | that.$emit('ok', new Date()) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | |
| | | option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
| | | ); |
| | | }, |
| | | |
| | | // 执行打印 |
| | | handleBacthPrint() { |
| | | this.$nextTick(() => { |
| | | printJS({ |
| | | printable: 'printArea', |
| | | type: 'html', |
| | | style: ` |
| | | .qrcode-item { |
| | | page-break-inside: avoid; |
| | | margin: 10px; |
| | | text-align: center; |
| | | } |
| | | img { width: 100px; height: 100px; } |
| | | `, |
| | | scanStyles: false |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | watch: {}, |
| | | mounted() { |
| | |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; // 更新表格数据 |
| | | this.ipagination.total = res.result.total |
| | | //默认选中第一条数据 |
| | | this.selectedRowKeys[0] = res.result.records[0].id |
| | | this.onSelectChange(this.selectedRowKeys) |
| | | } else { |
| | | this.$message.warning("请选择叶子节点进行查询"); |
| | | this.ipagination.total = 0 |