|
|
|
@ -38,6 +38,7 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button @click="search()" style="margin-left: 0px;margin-top: 0px" type="primary">查询</el-button> |
|
|
|
<el-button @click="scanReport()" style="margin-left: 0px;margin-top: 0px" type="primary">扫码报工</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
@ -185,6 +186,18 @@ |
|
|
|
<el-button @click="detailFlag = false" type="primary">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<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="scanTaskNo" ref="start" style="width: 130px;" @keyup.enter.native="doScanTaskNo()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="doScanTaskNo()">报工</el-button> |
|
|
|
<el-button type="primary" @click="scanModalFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="保存报工" :close-on-click-modal="false" v-drag :visible.sync="reportModalFlag" width="470px"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item :label="'任务单号:'"> |
|
|
|
@ -259,7 +272,9 @@ |
|
|
|
qtyOnHand:'', |
|
|
|
qtyReal:'', |
|
|
|
qtyRef:'', |
|
|
|
} |
|
|
|
}, |
|
|
|
scanModalFlag:false, |
|
|
|
scanTaskNo:'', |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
@ -452,7 +467,47 @@ |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
scanReport(){ |
|
|
|
this.scanTaskNo=''; |
|
|
|
this.scanModalFlag=true; |
|
|
|
this.$nextTick(() => { this.$refs.start.focus();}) |
|
|
|
}, |
|
|
|
doScanTaskNo(){ |
|
|
|
if(this.scanTaskNo==''||this.scanTaskNo==null){ |
|
|
|
this.$alert("请扫描任务单二维码", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
let inData={ |
|
|
|
taskNo:this.scanTaskNo, |
|
|
|
reportFlag:'N' |
|
|
|
} |
|
|
|
getHunlianTaskData(inData).then(({data}) => { |
|
|
|
let list = data.rows; |
|
|
|
if(list.length==0){ |
|
|
|
this.scanTaskNo='' |
|
|
|
this.$alert("该任务单不存在或者已经报过工!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
}else { |
|
|
|
let row=list[0] |
|
|
|
this.reportData.site=row.site; |
|
|
|
this.reportData.taskNo=row.taskNo; |
|
|
|
this.reportData.qtyRequired=row.taskQty; |
|
|
|
this.reportData.reportQty=''; |
|
|
|
this.reportData.partNo=row.partNo; |
|
|
|
this.reportData.userId=row.userId; |
|
|
|
this.reportData.qtyReal=0; |
|
|
|
this.reportData.qtyRef=0; |
|
|
|
this.getPartNoOnHand(row.site,row.partNo); |
|
|
|
this.scanModalFlag = false |
|
|
|
this.reportModalFlag=true; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
} |
|
|
|
|