| | |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="未报工数量" |
| | | label="未收料数量" |
| | | width="120" |
| | | > |
| | | <!-- sortable="custom"--> |
| | |
| | | :visible.sync="dialogVisible" |
| | | width="850px" |
| | | class="dialogVisible" |
| | | :top="dialogTitle==='自制报工'?'5vh':'15vh'" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | @close="handleClose" |
| | | @closed="handleClose" |
| | |
| | | v-model="dialogForm.eqpcode" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in ZZeqpArr" |
| | |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="下道工序:"> |
| | | <div style="width: 200px">{{ dialogForm.nextstepname }}</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" prop="productionType" label="生产类型:"> |
| | | <!-- <el-form-item v-if="dialogTitle==='自制报工'" prop="productionType" label="生产类型:">--> |
| | | <!-- <el-select--> |
| | | <!-- v-model="dialogForm.productionType"--> |
| | | <!-- style="width: 200px;"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- @change="usergroupChange111"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in productionTypeSelect"--> |
| | | <!-- :key="item.code"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item v-if="dialogTitle==='自制报工'" :prop="dialogForm.productionType==='personal'?'':'usergroupcode'" label="生产班组:">--> |
| | | <!-- <el-select--> |
| | | <!-- v-model="dialogForm.usergroupcode"--> |
| | | <!-- style="width: 200px;"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- @change="usergroupChange"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in ZZtreams"--> |
| | | <!-- :key="item.group_code"--> |
| | | <!-- :label="item.group_name"--> |
| | | <!-- :value="item.group_code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | |
| | | <el-form-item v-if="dialogTitle==='自制报工'" prop="productionType" label="报工人员:"> |
| | | <el-select |
| | | v-model="dialogForm.productionType" |
| | | v-model="dialogForm.reportuser" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | @change="usergroupChange111" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in productionTypeSelect" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | v-for="item in ZZuserArr" |
| | | :key="item.usercode" |
| | | :label="item.username+' / '+item.usercode" |
| | | :value="item.usercode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" :prop="dialogForm.productionType==='personal'?'':'usergroupcode'" label="生产班组:"> |
| | | <el-select |
| | | v-model="dialogForm.usergroupcode" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | @change="usergroupChange" |
| | | > |
| | | <el-option |
| | | v-for="item in ZZtreams" |
| | | :key="item.group_code" |
| | | :label="item.group_name" |
| | | :value="item.group_code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="设备名称:" prop="eqpcode"> |
| | | <el-select |
| | | v-model="dialogForm.eqpcode" |
| | | style="width: 200px;" |
| | | filterable |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | |
| | | :disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''" |
| | | multiple |
| | | collapse-tags |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in badArr" |
| | |
| | | <!-- <el-form-item v-if="dialogTitle==='自制报工'" label="报工人员:">--> |
| | | <!-- <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="报工人:"> |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="操作人员:"> |
| | | <el-select |
| | | v-model="dialogForm.operation" |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in OperationArr" |
| | |
| | | <el-form-item v-if="dialogTitle==='自制报工'" label="备注:"> |
| | | <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" /> |
| | | </el-form-item> |
| | | <div v-if="dialogTitle==='自制报工'"> |
| | | <!-- <div v-if="dialogTitle==='自制报工'">--> |
| | | <div v-if="false"> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 人员列表 |
| | | <el-button type="primary" style="margin: 10px 0" @click="userAdd">增行</el-button> |
| | | <el-table |
| | |
| | | @close="dialogVisible2Close" |
| | | > |
| | | <!-- 要打印的区域 --> |
| | | <div id="printMe2" style="padding: 30px;"> |
| | | <div id="printMe2"> |
| | | |
| | | <div |
| | | style="display: flex;width: 280px;height: 150px;border: 1px solid #000;text-align: center;font-size: 10px;" |
| | | style="display: flex;width: 220px;height: 130px;border: 1px solid #000;text-align: center;font-size: 12px" |
| | | > |
| | | |
| | | <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div style="width: 70px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div |
| | | style="display: flex;height: 90px;border-bottom:1px solid #000; |
| | | style="display: flex;height: 60%;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 |
| | | id="qrCode2" |
| | | ref="qrCodeDiv2" |
| | | style="overflow-y: hidden;height:71%;position: absolute;left: 7px;" |
| | | /> |
| | | </div> |
| | | <div |
| | | style="display: flex;height: 30px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center" |
| | | style="display: flex;height: 20%;justify-content: flex-start;border-bottom:1px solid #000;align-items: center" |
| | | > |
| | | <div style="margin-left: 5px;width: 28px">数量:</div> |
| | | {{ qrForm.startqty }} |
| | | <div style="margin-left: 3px; ">数量:{{ qrForm.startqty }}</div> |
| | | </div> |
| | | <div style="display: flex;height: 30px;justify-content: flex-start;align-items: center"> |
| | | <div style="margin-left: 5px;width: 42px">处理人:</div> |
| | | {{ qrForm.operator }} |
| | | <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;"> |
| | | <div style="margin-left: 3px; ">操作:{{ qrForm.operator }}</div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="width:190px;display: flex;flex-direction: column"> |
| | | <div style="width:150px;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>{{ qrForm.wo_code }}</div> |
| | | <div style="margin-left: 3px;">编号:{{ qrForm.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>{{ qrForm.partcode }}</div> |
| | | <div style="margin-left: 3px;">产品编码:{{ qrForm.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>{{ qrForm.partname }}</div> |
| | | <div style="margin-left: 3px;">产品名称:{{ qrForm.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>{{ qrForm.nextstepname }}</div> |
| | | <div style="margin-left: 3px;">下道工序:{{ qrForm.nextstepname }}</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>{{ qrForm.operatorTime }}</div> |
| | | <div style=" margin-left: 3px;">时间: {{ qrForm.operatorTime }}</div> |
| | | <!-- <div>{{ qrForm.operatorTime?qrForm.operatorTime.substring(5):'' }}</div>--> |
| | | <!-- <div>{{ qrForm.operatorTime }}</div>--> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <!-- --> |
| | | <!-- --> |
| | | <!-- <div--> |
| | | <!-- style="display: flex;width: 280px;height: 150px;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: 90px;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: 30px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"--> |
| | | <!-- >--> |
| | | <!-- <div style="margin-left: 5px;width: 28px">数量:</div>--> |
| | | <!-- {{ qrForm.startqty }}--> |
| | | <!-- </div>--> |
| | | <!-- <div style="display: flex;height: 30px;justify-content: flex-start;align-items: center">--> |
| | | <!-- <div style="margin-left: 5px;width: 42px">处理人:</div>--> |
| | | <!-- {{ qrForm.operator }}--> |
| | | <!-- </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>{{ qrForm.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>{{ qrForm.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>{{ qrForm.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>{{ qrForm.nextstepname }}</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>{{ qrForm.operatorTime }}</div>--> |
| | | <!-- </div>--> |
| | | |
| | | <!-- </div>--> |
| | | |
| | | <!-- </div>--> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | |
| | | this.dialogForm.startqty = obj.noreportqty |
| | | |
| | | this.dialogForm.nextstepname = obj.nextstepname |
| | | this.dialogForm.nextstepcode = obj.nextstepcode |
| | | this.dialogForm.nextstepcode = obj.nextstepcode ? obj.nextstepcode : obj.stepcode |
| | | |
| | | this.dialogForm.startqtySum = obj.noreportqty |
| | | }) |
| | |
| | | this.dialogForm.stepcode = obj.stepcode |
| | | |
| | | this.dialogForm.nextstepname = obj.nextstepname |
| | | this.dialogForm.nextstepcode = obj.nextstepcode |
| | | this.dialogForm.nextstepcode = obj.nextstepcode ? obj.nextstepcode : obj.stepcode |
| | | |
| | | this.dialogForm.noputqty = obj.noputqty |
| | | this.dialogForm.stepseq = obj.seq |
| | |
| | | this.dialogForm.reportqty = '', // 已报数量 |
| | | this.dialogForm.noreportqty = '', // 未报数量 |
| | | this.dialogForm.startqty = '', // 开(报)工数量 |
| | | |
| | | this.dialogForm.reportuser = '', // 报工人员 |
| | | this.dialogForm.wxcode = '', // 外协供应商编码 |
| | | this.dialogForm.outuser = '', // 发料人员 |
| | | this.dialogForm.taskqty = '', // 任务数量 |
| | |
| | | if (res.code === '200') { |
| | | this.dialogVisible = false |
| | | this.$message.success('收料成功!') |
| | | if (this.dialogForm.nextstepcode === '') { |
| | | this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username) |
| | | this.dialogVisible2 = true |
| | | } |
| | | // if (this.dialogForm.nextstepcode === '') { |
| | | this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username) |
| | | this.dialogVisible2 = true |
| | | // } |
| | | this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | |
| | | if (parseFloat(this.dialogForm.startqtySum) < parseFloat(this.dialogForm.startqty) + parseFloat(this.dialogForm.noputqty)) { |
| | | return this.$message.info('报工数量加不良数量不能大于了未报数量!') |
| | | } |
| | | if (this.userTableData.length < 1) { |
| | | return this.$message.info('人员列表不能为空!') |
| | | } |
| | | // if (this.userTableData.length < 1) { |
| | | // return this.$message.info('人员列表不能为空!') |
| | | // } |
| | | |
| | | if (parseFloat(this.dialogForm.noputqty) > 0) { |
| | | if (this.dialogForm.badcode.length < 1) { |
| | |
| | | } |
| | | } |
| | | // this.userTableData = [...new Set(this.userTableData)]// 数组去重 |
| | | this.userTableData = this.userTableData.filter(item => item.usercode !== '') |
| | | // this.userTableData = this.userTableData.filter(item => item.usercode !== '') |
| | | // 数组中对象相同的去重 |
| | | this.userTableData = this.userTableData.filter((currentValue, currentIndex, selfArr) => { |
| | | return selfArr.findIndex(item => item.usercode === currentValue.usercode) === currentIndex |
| | | }) |
| | | // this.userTableData = this.userTableData.filter((currentValue, currentIndex, selfArr) => { |
| | | // return selfArr.findIndex(item => item.usercode === currentValue.usercode) === currentIndex |
| | | // }) |
| | | // console.log(this.userTableData, 1) |
| | | const reportuser = this.userTableData.map(item => item.usercode).join(';') |
| | | // const reportuser = this.userTableData.map(item => item.usercode).join(';') |
| | | const data = { |
| | | mesordercode: this.dialogForm.wo_code, // 工单编号 |
| | | partcode: this.dialogForm.partcode, // 产品编码 |
| | |
| | | stepcode: this.dialogForm.stepcode, // 工序编码 |
| | | eqpcode: this.dialogForm.eqpcode, // 设备编码 |
| | | usergroupcode: this.dialogForm.usergroupcode, // 班组编码 |
| | | reportuser: reportuser, // 报工人员 |
| | | // reportuser: reportuser, // 报工人员 |
| | | reportuser: this.dialogForm.reportuser, // 报工人员 |
| | | taskqty: this.dialogForm.planqty, // 任务数量 |
| | | // startqty: this.dialogForm.startqty, // 开工数量 |
| | | startqty: this.dialogForm.reportqty, // 开工数量 |
| | |
| | | if (res.code === '200') { |
| | | this.dialogVisible = false |
| | | this.$message.success('报工成功!') |
| | | if (this.dialogForm.nextstepcode === '') { |
| | | this.ZZprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username) |
| | | this.dialogVisible2 = true |
| | | } |
| | | // if (this.dialogForm.nextstepcode === '') { |
| | | this.ZZprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username) |
| | | this.dialogVisible2 = true |
| | | // } |
| | | this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | |
| | | new QRCode(this.$refs.qrCodeDiv2, { |
| | | text: text, |
| | | // width: 50, |
| | | width: 60, |
| | | width: 55, |
| | | // height: 50, |
| | | height: 60, |
| | | height: 55, |
| | | colorDark: '#000', // 二维码颜色 |
| | | colorLight: '#ffffff', // 二维码背景色 |
| | | correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H |