| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.piroque==='1'">特级</div> |
| | | <div v-if="row.piroque==='2'">紧急</div> |
| | | <div v-if="row.piroque==='3'">正常</div> |
| | | <div v-else-if="row.piroque==='2'">紧急</div> |
| | | <div v-else-if="row.piroque==='3'">正常</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="打印工序" placement="top"> |
| | | <i |
| | | v-if="tableDataDetail.length!==row.seq" |
| | | class="el-icon-printer" |
| | | :style="{color:$store.state.settings.theme}" |
| | | style="cursor: pointer;margin-right: 15px" |
| | | @click="supplementSmallClick(row)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" content="补打生产入库条码" placement="top"> |
| | | <i |
| | | v-if="tableDataDetail.length===row.seq" |
| | | class=" el-icon-camera" |
| | | :style="{color:$store.state.settings.theme}" |
| | | style="cursor: pointer;margin-right: 15px" |
| | | @click="getProductInHouseLabCode(row.wo_code)" |
| | | /> |
| | | </el-tooltip> |
| | | </div> |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="工单编号" prop="mesordercode"> |
| | | <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | <!-- <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" />--> |
| | | <el-input v-model="dialogForm.mesordercode" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <div style="display: flex"> |
| | | <el-form-item label="工单类型" prop="mesorderstus"> |
| | |
| | | <!-- <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">预览</el-button>--> |
| | | |
| | | <el-button |
| | | v-if="!submitBottonIsDisabled" |
| | | v-if="!submitButtonIsDisabled" |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | |
| | | >确 定</el-button> |
| | | |
| | | <el-button |
| | | v-if="submitBottonIsDisabled" |
| | | v-if="submitButtonIsDisabled" |
| | | v-waves |
| | | type="primary" |
| | | disabled |
| | |
| | | v-el-drag-dialog |
| | | title="预览" |
| | | :visible.sync="dialogVisible2" |
| | | width="1140" |
| | | width="1000" |
| | | top="10vh" |
| | | :close-on-click-modal="false" |
| | | @close="dialogVisible2Close" |
| | | > |
| | | <div style="height: 300px"> |
| | | <div style="height: 650px;overflow:auto;"> |
| | | <!-- 下拉框选择打印尺寸--> |
| | | <div style="display: flex;align-items: center;margin: 0 0 20px 0"> |
| | | <div v-if="!isLastPrint" style="display: flex;align-items: center;margin: 0 0 20px 0"> |
| | | <div>选择打印尺寸:</div> |
| | | <el-select |
| | | v-model="printSize" |
| | |
| | | </div> |
| | | <!-- 要打印的区域 --> |
| | | <!-- <div id="printMe2" :style="{paddingLeft:'10px',paddingTop: '5px'}">--> |
| | | <div id="printMe2" :style="printMe2StylePadding(printSize)"> |
| | | <div v-if="!isLastPrint" :style="printMe2StylePadding(printSize)"> |
| | | <!-- 80 * 50--> |
| | | <div |
| | | v-if="printSize===0" |
| | | style="display: flex;width: 280px;height: 160px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- 78 * 60 --> |
| | | <div |
| | | v-if="printSize===1" |
| | | style="display: flex;width: 280px;height: 160px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- 60 * 40 --> |
| | | <div |
| | | v-if="printSize===2" |
| | | style="display: flex;width: 220px;height: 130px;border: 1px solid #000;text-align: center;font-size: 12px" |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-if="isLastPrint" style="display: flex;flex-direction: column"> |
| | | |
| | | <div style="display: flex;font-weight: bold;font-size: 16px;margin-bottom: 20px;"> |
| | | <div style="width: 48%;"> |
| | | 请选择入库条码 |
| | | </div> |
| | | <div style="width: 48%;margin-left: 4%;"> |
| | | 已选中的入库条码 |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="display: flex;"> |
| | | <!-- 请选择入库条码--> |
| | | <div style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;"> |
| | | <div |
| | | v-for="(item,index) in lastPrintArr" |
| | | :key="item.inbarcode" |
| | | :style="{marginTop:index===0?'':'15px'}" |
| | | style="display: flex;align-items: center;" |
| | | > |
| | | |
| | | <!-- v-if="printSize===0"--> |
| | | <div style="margin-right:40px"> |
| | | <el-checkbox |
| | | :key="item.inbarcode" |
| | | v-model="item.checked" |
| | | @change="val=>inbarcodeChange(val,item)" |
| | | /> |
| | | </div> |
| | | <div |
| | | style="display: flex;width: 280px;height: 160px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | | > |
| | | |
| | | <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div |
| | | style="display: flex;height: 96px;border-bottom:1px solid #000; |
| | | justify-content: center;align-items: center;position: relative" |
| | | > |
| | | <div |
| | | id="qrCode2" |
| | | ref="qrCodeDiv2" |
| | | style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" |
| | | /> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center" |
| | | > |
| | | <div style="margin-left: 5px;width: 28px">数量:</div> |
| | | {{ item.good_qty }} |
| | | </div> |
| | | <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center"> |
| | | <div style="margin-left: 5px;width: 42px">处理人:</div> |
| | | {{ item.username }} |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="width:190px;display: flex;flex-direction: column"> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center;text-align: left" |
| | | > |
| | | <div style="width: 60px;margin-left: 5px;">工单编号:</div> |
| | | <div>{{ item.wo_code }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center ;text-align: left" |
| | | > |
| | | <div style="width: 60px;margin-left: 5px;">产品编码:</div> |
| | | <div>{{ item.partcode }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left" |
| | | > |
| | | <div style="width:60px;margin-left: 5px;">产品名称:</div> |
| | | <div>{{ item.partname }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left" |
| | | > |
| | | <div style="width:60px;margin-left: 5px;">产品规格:</div> |
| | | <div>{{ item.partspec ? item.partspec : '/' }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left" |
| | | > |
| | | <div style="width: 60px;margin-left: 5px;">处理时间:</div> |
| | | <div>{{ item.lm_date }}</div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 已选中的入库条码--> |
| | | <div |
| | | style="display: flex;flex-direction: column;height: 600px;overflow: auto;width: 48%;margin-left: 50px;" |
| | | > |
| | | <div id="printMe2"> |
| | | <div |
| | | v-for="(item,index) in lastPrintArrSelected" |
| | | v-if="item.checked" |
| | | :key="item.inbarcode" |
| | | :style="{marginTop:index===0?'':'15px'}" |
| | | style="display: flex;align-items: center;" |
| | | > |
| | | <div |
| | | style="display: flex;width: 280px;height: 160px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | | > |
| | | |
| | | <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div |
| | | style="display: flex;height: 96px;border-bottom:1px solid #000; |
| | | justify-content: center;align-items: center;position: relative" |
| | | > |
| | | <div |
| | | id="qrCode3" |
| | | ref="qrCodeDiv3" |
| | | style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" |
| | | /> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center" |
| | | > |
| | | <div style="margin-left: 5px;width: 28px">数量:</div> |
| | | {{ item.good_qty }} |
| | | </div> |
| | | <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center"> |
| | | <div style="margin-left: 5px;width: 42px">处理人:</div> |
| | | {{ item.username }} |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="width:190px;display: flex;flex-direction: column"> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center;text-align: left" |
| | | > |
| | | <div style="width: 60px;margin-left: 5px;">工单编号:</div> |
| | | <div>{{ item.wo_code }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center ;text-align: left" |
| | | > |
| | | <div style="width: 60px;margin-left: 5px;">产品编码:</div> |
| | | <div>{{ item.partcode }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left" |
| | | > |
| | | <div style="width:60px;margin-left: 5px;">产品名称:</div> |
| | | <div>{{ item.partname }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left" |
| | | > |
| | | <div style="width:60px;margin-left: 5px;">产品规格:</div> |
| | | <div>{{ item.partspec ? item.partspec : '/' }}</div> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left" |
| | | > |
| | | <div style="width: 60px;margin-left: 5px;">处理时间:</div> |
| | | <div>{{ item.lm_date }}</div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button v-waves @click="dialogVisible2 = false">取 消</el-button> |
| | | <el-button v-waves @click="dialogVisible2 = false;">取 消</el-button> |
| | | <el-button v-waves v-print="printObj2" type="primary">打 印</el-button> |
| | | </div> |
| | | </span> |
| | |
| | | ClosedMesOrder, |
| | | DeleteMesOrder, MesBadOrderSearch, JobCreationSonAddVison, |
| | | MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, SelectRouteOrWkshop, |
| | | SelectRouteStep |
| | | } from '@/api/scgl' |
| | | import { InventoryFileAssociationRoute, PartSelect, SaveInventoryFile } from '@/api/zzmx' |
| | | SelectRouteStep, AddMesOrderCodeSearch, ProductInHouseLabCode |
| | | } from '@/api/produceManager' |
| | | import { InventoryFileAssociationRoute, PartSelect, SaveInventoryFile } from '@/api/makeModel' |
| | | import { handleDatetime, handleDatetime2, validateCode } from '@/utils/global' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { MesOrderPrintSearch1, PrintOrder } from '@/api/utils' |
| | |
| | | return time.getTime() < Date.now() - 8.64e7 |
| | | } |
| | | }, |
| | | submitBottonIsDisabled: false |
| | | submitButtonIsDisabled: false, |
| | | |
| | | isLastPrint: false, // 是否是末道打印 |
| | | lastPrintArr: [], // 末道打印的数组(所有) |
| | | lastPrintArrSelected: []// 末道打印的数组(选中) |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | // 新增按钮 |
| | | async add(operation) { |
| | | const { data: res } = await AddMesOrderCodeSearch() |
| | | this.dialogForm.mesordercode = res |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | this.dialogForm.planstartdate = handleDatetime(new Date()) |
| | |
| | | |
| | | this.dialogForm.wkshopcode = '' |
| | | |
| | | this.submitBottonIsDisabled = false |
| | | this.submitButtonIsDisabled = false |
| | | }, |
| | | // 工艺路线值改变 |
| | | async routecodeChange(val) { |
| | |
| | | this.wkshopArr = res2 |
| | | this.dialogForm.wkshopcode = '' |
| | | |
| | | this.submitBottonIsDisabled = false |
| | | this.submitButtonIsDisabled = false |
| | | }, |
| | | // 生产车间值改变时 |
| | | wkshopcodeChange(val) { |
| | |
| | | // console.log(res, 1) |
| | | }).catch(err => { |
| | | // console.log(err, 2) |
| | | this.submitBottonIsDisabled = true |
| | | this.submitButtonIsDisabled = true |
| | | }) |
| | | }, |
| | | |
| | |
| | | |
| | | this.bomIdArr = [] |
| | | this.$refs.dialogForm.clearValidate() |
| | | this.submitBottonIsDisabled = false |
| | | this.submitButtonIsDisabled = false |
| | | }, |
| | | // 对话框取消 |
| | | dialogVisibleCancel() { |
| | |
| | | this.dialogVisible2 = true |
| | | console.log(this.qrForm, 1111) |
| | | }, |
| | | // 补打生产入库条码 |
| | | async getProductInHouseLabCode(ordercode) { |
| | | const res = await ProductInHouseLabCode({ ordercode }) |
| | | console.log(res) |
| | | this.isLastPrint = true |
| | | |
| | | this.lastPrintArr = res.data |
| | | |
| | | this.dialogVisible2 = true |
| | | |
| | | // 生产二维码 |
| | | this.$nextTick(() => { |
| | | this.lastPrintArr.forEach((i, index) => { |
| | | i.checked = false |
| | | new QRCode(this.$refs.qrCodeDiv2[index], { |
| | | text: i.inbarcode, |
| | | width: this.printSize !== 2 ? 60 : 55, |
| | | height: this.printSize !== 2 ? 60 : 55, |
| | | colorDark: '#000', // 二维码颜色 |
| | | colorLight: '#ffffff', // 二维码背景色 |
| | | correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | dialogVisible2Close() { |
| | | this.qrForm.qrvalue = '' |
| | | this.qrForm.startqty = '' |
| | |
| | | this.qrForm.operator = '' |
| | | this.qrForm.operatorTime = '' |
| | | // this.$refs.qrCodeDiv2 = '' |
| | | this.isLastPrint = false |
| | | this.lastPrintArr = [] |
| | | this.lastPrintArrSelected = [] |
| | | }, |
| | | // 生成二维码 工序标签二维码 |
| | | bindQRCode2(text) { |
| | |
| | | if (val === 5) { |
| | | return { paddingLeft: '15px', paddingTop: '7px' } |
| | | } |
| | | }, |
| | | |
| | | inbarcodeChange(val, item) { |
| | | // 当 lastPrintArrSelected中未有当前勾选的值是 走push item 否则走过滤掉item |
| | | if (val) { |
| | | this.lastPrintArrSelected.push(item) |
| | | } else { |
| | | this.lastPrintArrSelected = this.lastPrintArrSelected.filter(i => i.inbarcode !== item.inbarcode) |
| | | } |
| | | |
| | | // 生产二维码 |
| | | this.$nextTick(() => { |
| | | this.lastPrintArrSelected.forEach((i, index) => { |
| | | console.log(i.inbarcode, 'i.inbarcode') |
| | | new QRCode(this.$refs.qrCodeDiv3[index], { |
| | | text: i.inbarcode, |
| | | width: 60, |
| | | height: 60, |
| | | colorDark: '#000', // 二维码颜色 |
| | | colorLight: '#ffffff', // 二维码背景色 |
| | | correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H |
| | | }) |
| | | }) |
| | | |
| | | // const div = document.getElementById('qrCode3') |
| | | // div.scrollTop = 0 // 滚动条位于最底部 |
| | | |
| | | this.$forceUpdate() |
| | | }, 500) |
| | | } |
| | | } |
| | | } |