| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="库位号" prop="locationCodeId"> |
| | | <a-select |
| | | :triggerChange="true" |
| | | :options="locationCodeOptions" |
| | | v-model="model.locationCodeId" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectReturnList()" v-show="returnShow && !disableSubmit">选择借出工具</a-button> |
| | |
| | | <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', |
| | |
| | | message: '请选择申请入库日期!', |
| | | }, |
| | | ], |
| | | locationCodeId:[ |
| | | { |
| | | required: true, |
| | | message: '请选择库位号!', |
| | | }, |
| | | ] |
| | | }, |
| | | url: { |
| | | addInStorage: '/tms/inboundOrder/addInStorage', |
| | |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | ], |
| | | classifyId:'' |
| | | classifyId:'', |
| | | locationCodeOptions:[], |
| | | qrList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | //备份model原始值 |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | ajaxGetDictItems("tms_goods_shelves,location_code,id", null).then((res) => { |
| | | if (res.success) { |
| | | this.locationCodeOptions = res.result |
| | | } |
| | | }) |
| | | }, |
| | | methods: { |
| | | modalFormOk() { |
| | |
| | | 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() { |
| | |
| | | toolModel: data[i].toolModel, |
| | | applicationType: data[i].applicationTypeName, |
| | | onlyCode:data[i].onlyCode, |
| | | inStorageQuantity:data[i].storageQuantity || data[i].quantity, |
| | | inStorageQuantity:data[i].storageQuantity || data[i].quantity || 1, |
| | | quantity:data[i].quantity, |
| | | accuracyClass:data[i].accuracyClass |
| | | }) |