Merge remote-tracking branch 'origin/master'
| | |
| | | }) |
| | | } |
| | | |
| | | export function submitProductMain(obj) { |
| | | return request({ |
| | | url: '/mes/product/submitProductMain', |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | } |
| | | |
| | | export function batchSaveProductOutput(obj) { |
| | | return request({ |
| | | url: '/mes/product/batchSaveProductOutput', |
| | |
| | | title="汇报产出" |
| | | :visible.sync="innerVisible" |
| | | append-to-body |
| | | @close="$emit('update:currshowlist', false)" |
| | | @close="handleClose" |
| | | :show="currshowlist" |
| | | :close-on-click-modal="false" |
| | | class="batch-product-out-form" |
| | |
| | | data() { |
| | | return { |
| | | innerVisible: false, |
| | | staffNameList: [], |
| | | personSelection: [], |
| | | saveDisabled: false, |
| | | currDutyInitproducts: [], // 用于缓存页面中原有的staff产出记录,并且是属于当前班次下的,用于勾选人员时作为原数据参照 |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | initProductList(){ |
| | | let val = this.personSelection |
| | | //按人员报工 |
| | | if(this.groupStatus){ |
| | | this.products = [] |
| | | this.addProductOutForPerson() |
| | | }else{ |
| | | //按组报工 |
| | | let nameList = [] |
| | | val.forEach(obj=>{ |
| | | nameList.push(obj.staffName) |
| | | }) |
| | | let staffName = Array.from(new Set(nameList)).join(",") |
| | | if(staffName!=''){ |
| | | this.products = this.productList |
| | | this.products.forEach(item=>{ |
| | | item.staffName = staffName |
| | | }) |
| | | }else{ |
| | | this.products = [] |
| | | } |
| | | } |
| | | }, |
| | | handleClose(){ |
| | | this.$emit('update:currshowlist', false) |
| | | this.$nextTick(()=>{ |
| | | this.$refs.productOutPersonList.clearSelection() |
| | | }) |
| | | }, |
| | | isNumber(value) { |
| | | var reg = /^[0-9]+(.[0-9]{1,4})?$/ |
| | | if ( |
| | |
| | | // 再去与products(此为页面的实时数据,用户有改动即更新)对比,将其中存在的相同人员的生产数量和生产批次同步过来,若products中生产数量或生产批次不存在值,则不进行同步,沿用原来的。 |
| | | // 最后,将组装好的选中人员信息,更新到products(按照班次进行),注意更新之后选中人员信息在products位置顺序 |
| | | this.personSelection = val |
| | | if(this.currshowlist){ |
| | | this.initProductList() |
| | | } |
| | | }, |
| | | // 根据选中的人员,生成人员产出信息,并且放在右边列表的最前面 |
| | | addProductOutForPerson() { |
| | |
| | | saveProductOuts2() { |
| | | this.clickDateArr.push(new Date().getTime()) |
| | | var productOutputList = [] |
| | | this.productList.forEach(a=>{ |
| | | this.products.forEach(a=>{ |
| | | productOutputList.push({ |
| | | partId: a.partId, |
| | | productQty: a.outNum, |
| | | outBatchNo: a.outBatchNo, |
| | | scrapQty: a.scrapQty, |
| | | remark: a.remark, |
| | | wdr: a.wdr, |
| | | wdr: a.wdr, |
| | | staffNo: a.staffNo, |
| | | staffName: a.staffName, |
| | | status: a.status, |
| | | dutyRecordId: a.dutyRecordId, |
| | | productStaffIds: a.productStaffIds, |
| | | productStaffs: a.productStaffs |
| | | productStaffs: a.productStaffs, |
| | | sortNo: a.sortNo |
| | | }) |
| | | }) |
| | | var productMains = { |
| | |
| | | this.products.push(this.productList[i]) |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.productOutPersonList.clearSelection() |
| | | this.$refs.productOutPersonList.toggleAllSelection() |
| | | }) |
| | | } else { |
| | | for (let i = 0; i < this.productList.length; i++) { |
| | | this.products.push(this.productList[i]) |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.productOutPersonList.clearSelection() |
| | | this.$refs.productOutPersonList.toggleAllSelection() |
| | | }) |
| | | } |
| | | } |
| | |
| | | </table> |
| | | |
| | | </div> |
| | | <div v-for="pel in prjdata"> |
| | | <template> |
| | | <div style="page-break-after: always;"> |
| | | <div > |
| | |
| | | <div> |
| | | <div class="bodycs-2"> |
| | | <p ><span class=x1111112 style='margin-left: 40px;'>检验项目:<br> Test Item</span></p> |
| | | <p v-for="pel in prjdata"><span class="ziti">{{pel.father}}</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 80px;"></span></span></p> |
| | | <p ><span class="ziti">{{pel.father}}</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 80px;"></span></span></p> |
| | | </div> |
| | | <div class="bodycs-3"> |
| | | <p ><span class=x1111112 style='margin-left: 36px;'>样品名称:<br>Description</span></p> |
| | |
| | | </div> |
| | | <div class="bodycs-3"> |
| | | <p ><span class=x1111112 style='margin-left: 36px;'>样品数量:<br>Quantity</span></p> |
| | | <p v-for="pel in prjdata"><span class="ziti">{{quantity}}</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | <p ><span class="ziti">{{quantity}}</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | </div> |
| | | <div class="bodycs-3"> |
| | | <p ><span class=x1111112 style='margin-left: 36px;'>检验类别:<br>Type of Test</span></p> |
| | | <p v-for="pel in prjdata"><span class="ziti">产品检验</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | <p ><span class="ziti">产品检验</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | </div> |
| | | <div> |
| | | <div class="chilen"> |
| | | <p ><span class="x1111113">批 准:<br> Approved by</span></p> |
| | | <p v-for="pel in prjdata"><span class="time"></span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | <p ><span class="time"></span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | </div> |
| | | <div class="chilen"> |
| | | <p ><span class="x1111113">核验员:<br> Inspected by</span></p> |
| | | <p v-for="pel in prjdata"><span class="time"></span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | <p ><span class="time"></span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | </div> |
| | | <div style="display: flex;margin-left: 280px;"> |
| | | <p ><span class="x1111113">检验员:<br> Tested by</span></p> |
| | |
| | | </div> |
| | | <div class="cldata"> |
| | | <p ><span class="x1111113">送样日期:<br>Delivery Date</span></p> |
| | | <p v-for="pel in prjdata"><span class="time">{{tableData.updateTime}}</span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | <p ><span class="time">{{tableData.updateTime}}</span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | </div> |
| | | <div class="cldata"> |
| | | <p ><span class="x1111113">测试日期:<br>Testing Date</span></p> |
| | | <p v-for="pel in prjdata"><span class="time">{{tableData.createTime}}</span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | <p ><span class="time">{{tableData.createTime}}</span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | itype: '', |
| | | testValueList: new Array(this.columnLength) |
| | | } |
| | | let rowNum = 30 |
| | | let rowNum = 15 |
| | | let columnNum = this.columnLength |
| | | if(list && list.length<2){ |
| | | list.forEach(item=>{ |
| | |
| | | PrintJS({ |
| | | printable: "printRaw", |
| | | type: "html", |
| | | maxWidth: 880, |
| | | maxWidth: 1000, |
| | | printSettings, |
| | | style: '@page {margin: 2.0mm 2.0mm;size:A4;}', |
| | | targetStyles: ["*"], |