Browse Source

0412 新看板

master
ruanqi 3 years ago
parent
commit
92e09d12e8
  1. 6
      src/views/modules/production/closeSchedule.vue
  2. 44
      src/views/modules/production/generateReport.vue
  3. 8
      src/views/modules/production/print_part_label.js
  4. 4
      src/views/modules/production/print_seqNo_label.js
  5. 6
      src/views/modules/production/print_stock_label.js
  6. 4
      src/views/modules/production/print_transNo_label.js
  7. 41
      src/views/modules/production/scheduleForShopOrder.vue
  8. 2
      src/views/modules/production/soscheduleRouting.vue

6
src/views/modules/production/closeSchedule.vue

@ -314,15 +314,11 @@
getAvailableResourceList,
} from "@/api/production.js"
import {
getSOScheduleRoutingData
, cancelJob,
getSOScheduleRoutingData,
circulationSchedule,
closeSchedule
} from '@/api/production/generateReport.js'
import Chooselist from '@/views/modules/common/Chooselist'
import {
printSeqNoLabel,
} from "@/views/modules/production/print_seqNo_label.js"
export default {
name: 'closeSchedule',
components: {

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

@ -214,8 +214,8 @@
label="加工中心编码">
</el-table-column>
</el-table>
<el-dialog title="扫描派工单" :close-on-click-modal="false" v-drag :visible.sync="scanModalFlag" width="215px">
<el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;">
<el-dialog title="扫描派工单" :close-on-click-modal="false" v-drag :visible.sync="scanModalFlag" width="215px" >
<el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent>
<el-form-item :label="'派工单号:'">
<el-input v-model="scanSeqNo" ref="input" type="number" style="width: 130px;" @keyup.enter.native="searchSeqNo()"></el-input>
</el-form-item>
@ -226,7 +226,7 @@
</el-footer>
</el-dialog>
<el-dialog title="开始派工单" :close-on-click-modal="false" v-drag :visible.sync="startModalFlag" width="215px">
<el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;">
<el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent>
<el-form-item :label="'派工单号:'">
<el-input v-model="scanSeqNo" ref="start" type="number" style="width: 130px;" @keyup.enter.native="startSeqNo()"></el-input>
</el-form-item>
@ -303,23 +303,23 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top">
<el-form-item label="报告数量">
<el-input type="number" class="input_left" style="width: 178px;" v-model="saveHeaderData.qtyReported" @blur="qtyReportedBlur()"></el-input>
</el-form-item>
<el-form-item label="合格数量">
<el-input type="number" style="width: 178px;" class="input_reight" v-model="saveHeaderData.qtyApprove" @blur="qtyApproveBlur()"></el-input>
</el-form-item>
<el-form-item label="不合格数量">
<el-input type="number" class="input_left" style="width: 178px;" v-model="saveHeaderData.qtyUnApprove" @blur="qtyReportedBlur()"></el-input>
</el-form-item>
<el-form-item label="返工数量">
<el-input type="number" style="width: 178px;" v-model="saveHeaderData.qtyRework" @blur="qtyReworkBlur()"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top">
<el-form-item label="报告重量(KG)">
<el-input type="number" class="input_left" style="width: 178px;" :disabled="factorFlag" v-model="KGReported" @blur="KGReportedBlur()"></el-input>
</el-form-item>
<el-form-item label="合格重量(KG)">
<el-input type="number" style="width: 178px;" class="input_reight" :disabled="factorFlag" v-model="KGApprove" @blur="KGApproveBlur()"></el-input>
</el-form-item>
<el-form-item label="不合格重量(KG)">
<el-input type="number" class="input_left" style="width: 178px;" :disabled="factorFlag" v-model="KGReported" @blur="KGReportedBlur()"></el-input>
</el-form-item>
<el-form-item label="返工重量(KG)">
<el-input type="number" style="width: 178px;" v-model="KGRework" :disabled="factorFlag" @blur="KGReworkBlur()"></el-input>
</el-form-item>
@ -450,6 +450,7 @@
KGApprove:'',
KGRework:'',
saveHeaderData: {
qtyUnApprove:'',
site: '',
seqNo: '',
itemNo: '',
@ -556,8 +557,9 @@
methods: {
saveReport () {
if (this.saveHeaderData.qtyReported == null || this.saveHeaderData.qtyReported <= 0) {
this.$alert('报告数量错误!', '错误信息', {
this.saveHeaderData.qtyReported=Number(this.saveHeaderData.qtyUnApprove)+Number(this.saveHeaderData.qtyApprove);
if (this.saveHeaderData.qtyUnApprove == null || this.saveHeaderData.qtyUnApprove <= 0) {
this.$alert('不合格数量错误!', '错误信息', {
confirmButtonText: '确定'
})
return
@ -592,12 +594,6 @@
})
return
}
if (parseFloat(this.saveHeaderData.qtyApprove) > parseFloat(this.saveHeaderData.qtyReported)) {
this.$alert('合格数量大于报告数量!', '错误信息', {
confirmButtonText: '确定'
})
return
}
if (this.saveHeaderData.planStartTime == null || this.saveHeaderData.planStartTime === '') {
this.$alert('请选择生产日期!', '错误信息', {
confirmButtonText: '确定'
@ -686,7 +682,7 @@
// this.KGApprove=0
// this.KGRework=0
// this.saveHeaderData.qtyApprove=0
// this.saveHeaderData.qtyReported=0
// this.saveHeaderData.qtyUnApprove=0
// this.saveHeaderData.qtyRework=0
// this.saveHeaderData.site = currentData.site;
// this.saveHeaderData.seqNo = currentData.seqNo;
@ -861,7 +857,7 @@
this.KGApprove=0
this.KGRework=0
this.saveHeaderData.qtyApprove=0
this.saveHeaderData.qtyReported=0
this.saveHeaderData.qtyUnApprove=0
this.saveHeaderData.qtyRework=0
this.saveHeaderData.site = currentData.site;
this.saveHeaderData.seqNo = currentData.seqNo;
@ -915,10 +911,10 @@
})
},
qtyReportedBlur(){
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyReported!=''){
this.KGReported=(this.saveHeaderData.qtyReported*this.qty3).toFixed(1)
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyUnApprove!=''){
this.KGReported=(this.saveHeaderData.qtyUnApprove*this.qty3).toFixed(1)
}
if(this.saveHeaderData.qtyReported==''){
if(this.saveHeaderData.qtyUnApprove==''){
this.KGReported=''
}
},
@ -940,10 +936,10 @@
},
KGReportedBlur(){
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.KGReported!=''){
this.saveHeaderData.qtyReported=(this.KGReported/this.qty3).toFixed(1)
this.saveHeaderData.qtyUnApprove=(this.KGReported/this.qty3).toFixed(1)
}
if(this.KGReported==''){
this.saveHeaderData.qtyReported=''
this.saveHeaderData.qtyUnApprove=''
}
},
KGApproveBlur(){

8
src/views/modules/production/print_part_label.js

@ -6,12 +6,12 @@ export function printPartLabel(printList) {
if (LODOP) {
//LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", "");
LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", "");
// LODOP.SET_PRINTER_INDEXA("大标签打印机");
LODOP.SET_PRINTER_INDEXA(printList[0].printerName);
//循环调用打印机
for(let i = 0; i < printList.length; i++){
let printData = printList[i];
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,1500,1000,"");
LODOP.SET_PRINT_PAGESIZE(0,1000,1500,"");
LODOP.ADD_PRINT_RECT(43,5,551,308,0,1);
LODOP.ADD_PRINT_TEXT(2,214,140,30,"物料状态标识卡");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
@ -127,9 +127,9 @@ export function printPartLabel(printList) {
}
LODOP.PRINT_DESIGN();
// LODOP.PRINT_DESIGN();
//LODOP.PREVIEW();
// LODOP.PRINT();
LODOP.PRINT();
console.log("操作成功!")
}
}

4
src/views/modules/production/print_seqNo_label.js

@ -65,9 +65,9 @@ export function printSeqNoLabel(printList) {
LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
}
LODOP.PRINT_DESIGN();
// LODOP.PRINT_DESIGN();
//LODOP.PREVIEW();
// LODOP.PRINT();
LODOP.PRINT();
console.log("操作成功!")
}
}

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

@ -11,7 +11,7 @@ export function printMaterialLabel(printList) {
for(let i = 0; i < printList.length; i++){
let printData = printList[i];
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,1500,1000,"");
LODOP.SET_PRINT_PAGESIZE(0,1000,700,"");
LODOP.ADD_PRINT_BARCODE(43,244,208,140,"QRCode",printData.seqNo);
LODOP.ADD_PRINT_TEXT(90,8,133,25,"WareHouse Id:");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
@ -64,9 +64,9 @@ export function printMaterialLabel(printList) {
LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
}
LODOP.PRINT_DESIGN();
// LODOP.PRINT_DESIGN();
//LODOP.PREVIEW();
// LODOP.PRINT();
LODOP.PRINT();
console.log("操作成功!")
}
}

4
src/views/modules/production/print_transNo_label.js

@ -65,9 +65,9 @@ export function printTransNoLabel(printList) {
LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
}
LODOP.PRINT_DESIGN();
// LODOP.PRINT_DESIGN();
//LODOP.PREVIEW();
// LODOP.PRINT();
LODOP.PRINT();
console.log("操作成功!")
}
}

41
src/views/modules/production/scheduleForShopOrder.vue

@ -90,6 +90,13 @@
<el-option label="已派工完" value="ROUND(ISNULL(SL.scheduledQty,0),3) >=ROUND(a.LotSize,3)"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'订单类型:'">
<el-select filterable v-model="searchData.eLevels" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="混炼订单" value=2 ></el-option>
<el-option label="产成品订单" value=0></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 24px" type="primary">查询</el-button>
<download-excel
@ -499,6 +506,7 @@
site: this.$store.state.user.site,
planStatus: 'ROUND(a.LotSize,3) >ROUND(ISNULL(SL.scheduledQty,0),3)',
itemNo:'',
eLevels:'',
},
schedulingModalData: {
orderNo: '',
@ -688,11 +696,12 @@
})
return false
}
let flag2=false;
if(this.schedulingModalData.qty1<this.schedulingModalData.sumQty&&this.schedulingModalData.lastApproveQty!=null){
this.$alert('实际派工数量大于可派工数量!', '错误', {
confirmButtonText: '确定'
})
return false
// this.$alert('', '', {
// confirmButtonText: ''
// })
flag2=true;
}
let flag=false;
for (let i = 0; i <this.schedulingModalTableData.length; i++) {
@ -736,10 +745,30 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.doSchedule();
if(flag2){
this.$confirm(`实际派工数量大于上工序完成数量,是否继续`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.doSchedule();
})
}else {
this.doSchedule();
}
})
}else {
this.doSchedule();
if(flag2){
this.$confirm(`实际派工数量大于上工序完成数量,是否继续`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.doSchedule();
})
}else {
this.doSchedule();
}
}
},
doSchedule(){

2
src/views/modules/production/soscheduleRouting.vue

@ -460,6 +460,7 @@
let array=[];
let data={
seqNo:row.seqNo,
}
array.push(row)
printSeqNoLabel(array)
@ -473,6 +474,7 @@
if (data && data.code === 0) {
data.row.userId=this.$store.state.user.name;
let array=[];
data.row.printerName='大标签打印机';
array.push(data.row)
printPartLabel(array)
}

Loading…
Cancel
Save