Browse Source

0412 新看板

master
ruanqi 3 years ago
parent
commit
335f9e6bea
  1. 1
      src/api/production/generateReport.js
  2. 60
      src/views/modules/production/generateReport.vue
  3. 4
      src/views/modules/production/operator.vue
  4. 6
      src/views/modules/production/print_stock_label.js
  5. 24
      src/views/modules/production/stockPrint.vue

1
src/api/production/generateReport.js

@ -17,3 +17,4 @@ export const cancelJob = data => createAPI(`dailyPlan/cancelJob`, 'post', data);
export const searchReportedQty= data => createAPI(`dailyPlan/searchReportedQty`, 'post', data); export const searchReportedQty= data => createAPI(`dailyPlan/searchReportedQty`, 'post', data);
export const getStockPrint= data => createAPI(`dailyPlan/getStockPrint`, 'post', data); export const getStockPrint= data => createAPI(`dailyPlan/getStockPrint`, 'post', data);
export const updatePrintStock= data => createAPI(`dailyPlan/updatePrintStock`, 'post', data);

60
src/views/modules/production/generateReport.vue

@ -49,7 +49,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item > <el-form-item >
<span slot="label" style="" @click="getBaseList(26)"><a herf="#">操作员姓名</a></span>
<span slot="label" style="" @click="getBaseList(26,3)"><a herf="#">操作员姓名</a></span>
<el-input v-model="searchData.operatorName" style="width: 120px"></el-input> <el-input v-model="searchData.operatorName" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item > <el-form-item >
@ -496,6 +496,7 @@
showviewer: false, showviewer: false,
url: '', url: '',
height2:600, height2:600,
tagNo2:'',
} }
}, },
mounted () { mounted () {
@ -575,6 +576,7 @@
// S // S
getBaseList (val, type) { getBaseList (val, type) {
this.tagNo = val this.tagNo = val
this.tagNo2 = type
this.$nextTick(() => { this.$nextTick(() => {
let strVal = '' let strVal = ''
if (val === 24) { if (val === 24) {
@ -584,7 +586,13 @@
strVal = this.searchData.partNo strVal = this.searchData.partNo
} }
if (val === 26) { if (val === 26) {
strVal = this.searchData.operatorName
if(type==1) {
strVal = this.saveHeaderData.operatorId
}else if(type==2){
strVal = this.saveHeaderData.operatorId2
}else {
strVal = this.searchData.operatorName
}
} }
if (val === 88) { if (val === 88) {
strVal = this.searchData.sResourceID strVal = this.searchData.sResourceID
@ -600,31 +608,39 @@
this.searchData.partNo = val.PartNo this.searchData.partNo = val.PartNo
} }
if (this.tagNo === 26) { if (this.tagNo === 26) {
this.searchData.operatorName = val.OperatorName
if(this.tagNo2==1) {
this.saveHeaderData.operatorId = val.OperatorID
this.saveHeaderData.operatorName = val.OperatorName
}else if(this.tagNo2==2){
this.saveHeaderData.operatorId2 = val.OperatorID
this.saveHeaderData.operatorIdName2 = val.OperatorName
}else {
this.searchData.operatorName = val.OperatorName
}
} }
if (this.tagNo === 88) { if (this.tagNo === 88) {
this.searchData.sResourceID = val.ResourceID this.searchData.sResourceID = val.ResourceID
} }
}, },
initReportModal (row) { initReportModal (row) {
this.setUp.reviewFlag = true
this.setUp.disabled = true
let currentData = JSON.parse(JSON.stringify(row))
this.saveHeaderData.site = currentData.site
this.saveHeaderData.seqNo = currentData.seqNo
this.saveHeaderData.itemNo = currentData.itemNo
this.saveHeaderData.operationDesc = currentData.itemDesc
this.saveHeaderData.partNo = currentData.partNo
this.saveHeaderData.partDescription = currentData.partSpec
this.saveHeaderData.workCenterNo = currentData.sWorkCenterNo
this.saveHeaderData.workCenterDesc = currentData.workCenterDesc
this.saveHeaderData.orderRef1=currentData.orderRef1
this.saveHeaderData.scheduleType=currentData.scheduleType
this.saveHeaderData.operatorId=currentData.operatorId
this.saveHeaderData.operatorName=currentData.operatorName
this.saveHeaderData.userId=this.$store.state.user.name
this.setUp.reviewFlag = true;
this.setUp.disabled = true;
let currentData = JSON.parse(JSON.stringify(row));
this.saveHeaderData.site = currentData.site;
this.saveHeaderData.seqNo = currentData.seqNo;
this.saveHeaderData.itemNo = currentData.itemNo;
this.saveHeaderData.operationDesc = currentData.itemDesc;
this.saveHeaderData.partNo = currentData.partNo;
this.saveHeaderData.partDescription = currentData.partSpec;
this.saveHeaderData.workCenterNo = currentData.sWorkCenterNo;
this.saveHeaderData.workCenterDesc = currentData.workCenterDesc;
this.saveHeaderData.orderRef1=currentData.orderRef1;
this.saveHeaderData.scheduleType=currentData.scheduleType;
this.saveHeaderData.operatorId=currentData.operatorId;
this.saveHeaderData.operatorName=currentData.operatorName;
this.saveHeaderData.userId=this.$store.state.user.name;
this.qty1='';
this.qty2 ='';
this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00') this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00')
searchReportedQty(this.saveHeaderData).then(({data}) => { searchReportedQty(this.saveHeaderData).then(({data}) => {
this.qty1 = data.row.qtyReported; this.qty1 = data.row.qtyReported;
@ -714,6 +730,8 @@
lastPicture(){ lastPicture(){
if(this.photoDatas.length==0){ if(this.photoDatas.length==0){
this.fileTitle="文件名 ("+0+"/"+0+")"; this.fileTitle="文件名 ("+0+"/"+0+")";
this.fileName='';
this.photoUrl='';
this.$alert('该物料没有上传图片!', '错误', { this.$alert('该物料没有上传图片!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })

4
src/views/modules/production/operator.vue

@ -129,10 +129,10 @@
</el-main> </el-main>
<el-main style="width: 100px"> <el-main style="width: 100px">
<div style="margin-top: 100px"> <div style="margin-top: 100px">
<el-button type="primary" @click="addSkill()">添加技能>></el-button>
<el-button type="primary" @click="addSkill()">添加>></el-button>
</div> </div>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<el-button type="primary" @click="deleteSkill()">删除技能<<</el-button>
<el-button type="primary" @click="deleteSkill()">删除<<</el-button>
</div> </div>
</el-main> </el-main>
<el-main style="width: 300px"> <el-main style="width: 300px">

6
src/views/modules/production/print_stock_label.js

@ -34,7 +34,7 @@ export function printMaterialLabel(printList) {
// //
// //
LODOP.ADD_PRINT_BARCODE(11,244,208,140,"QRCode","1|RM|batchNo|locationid|80001");
LODOP.ADD_PRINT_BARCODE(11,244,208,140,"QRCode",printData.seqNo);
LODOP.ADD_PRINT_TEXT(58,8,108,25,"WareHouseId:"); LODOP.ADD_PRINT_TEXT(58,8,108,25,"WareHouseId:");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
@ -87,9 +87,9 @@ export function printMaterialLabel(printList) {
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_LINE(186,2,187,374,0,1); LODOP.ADD_PRINT_LINE(186,2,187,374,0,1);
} }
LODOP.PRINT_DESIGN();
// LODOP.PRINT_DESIGN();
//LODOP.PREVIEW(); //LODOP.PREVIEW();
// LODOP.PRINT();
LODOP.PRINT();
console.log("操作成功!") console.log("操作成功!")
} }
} }

24
src/views/modules/production/stockPrint.vue

@ -138,7 +138,7 @@
<script> <script>
import { import {
getStockPrint getStockPrint
, cancelJob
, updatePrintStock
} from '@/api/production/generateReport.js' } from '@/api/production/generateReport.js'
import Chooselist from '@/views/modules/common/Chooselist' import Chooselist from '@/views/modules/common/Chooselist'
import { import {
@ -236,7 +236,7 @@
printStock(row){ printStock(row){
let array=[]; let array=[];
let data={ let data={
seqNo:row.site+'|'+row.wareHouseId+'|'+row.batchNo+'|'+row.locationId+'|'+row.partNo,
seqNo:row.site+'|'+row.partNo+'|'+row.wareHouseId+'|'+row.batchNo+'|'+row.locationId+'|'+row.qty,
site:row.site, site:row.site,
wareHouseId:row.wareHouseId, wareHouseId:row.wareHouseId,
batchNo:row.wareHouseId, batchNo:row.wareHouseId,
@ -248,6 +248,26 @@
} }
array.push(data) array.push(data)
printMaterialLabel(array); printMaterialLabel(array);
let inData={
transNo:row.transNo,
site:row.site
}
updatePrintStock(inData).then(({data}) => {
if (data && data.code === 0) {
this.search ();
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}, },
}, },

Loading…
Cancel
Save