diff --git a/src/api/abnormal.js b/src/api/abnormal.js
index 02add47..6fe2cbe 100644
--- a/src/api/abnormal.js
+++ b/src/api/abnormal.js
@@ -7,3 +7,7 @@ export const getAbnormalFeedBackList = data => createAPI(`abnormal/getAbnormalFe
export const saveAbnormalData= data => createAPI(`abnormal/saveAbnormalData`,'post',data)
export const saveAbnormalDetail= data => createAPI(`abnormal/saveAbnormalDetail`,'post',data)
+
+export const closeFeedBack= data => createAPI(`abnormal/closeFeedBack`,'post',data)
+
+export const openFeedBack= data => createAPI(`abnormal/openFeedBack`,'post',data)
diff --git a/src/views/modules/Abnormal/AbnormalFeedBack.vue b/src/views/modules/Abnormal/AbnormalFeedBack.vue
index 9b426af..d2b52dc 100644
--- a/src/views/modules/Abnormal/AbnormalFeedBack.vue
+++ b/src/views/modules/Abnormal/AbnormalFeedBack.vue
@@ -40,9 +40,9 @@
-
-
-
+
+
+
@@ -115,19 +115,21 @@
fixed="right"
header-align="center"
align="center"
- width="200"
+ width="230"
label="操作">
查看
- 紧急处理方式
- 长久处理方式
+ 紧急处理方式
+ 长久处理方式
+ 结束
+ 开启
-
+
-
+
@@ -232,6 +234,8 @@
getAbnormalFeedBackList,
saveAbnormalData,
saveAbnormalDetail,
+ openFeedBack,
+ closeFeedBack,
} from "@/api/abnormal.js"
export default {
@@ -294,6 +298,8 @@
this.addData.site='',
this.addData.resourceDesc='',
this.addData.orderNo='',
+ this.addData.abnormalRemark='',
+ this.addData.abnormalCode='',
this.getAllAbnormalItem();
this.addModalFlag=true;
},
@@ -322,6 +328,24 @@
})
},
saveAbnormalData(){
+ if( this.addData.seqNo==null||this.addData.seqNo==''){
+ this.$alert("请输入派工单号", '错误', {
+ confirmButtonText: '确定'
+ })
+ return false;
+ }
+ if( this.addData.abnormalCode==null||this.addData.abnormalCode==''){
+ this.$alert("请选择异常原因", '错误', {
+ confirmButtonText: '确定'
+ })
+ return false;
+ }
+ if( this.addData.abnormalRemark==null||this.addData.abnormalRemark==''){
+ this.$alert("请输入描述", '错误', {
+ confirmButtonText: '确定'
+ })
+ return false;
+ }
saveAbnormalData(this.addData).then(({data}) => {
if (data && data.code === 0) {
this.addModalFlag=false
@@ -350,6 +374,9 @@
},
getDetailModel2(row){
this.abnormalFeedBackData=JSON.parse(JSON.stringify(row));
+ if(this.abnormalFeedBackData.status=='已录入'){
+ this.abnormalFeedBackData.status='已填写紧急处理'
+ }
this.disableFlag1=true;
this.disableFlag2=false;
this.disableFlag3=true;
@@ -358,6 +385,9 @@
},
getDetailModel3(row){
this.abnormalFeedBackData=JSON.parse(JSON.stringify(row));
+ if(this.abnormalFeedBackData.status=='已录入'||this.abnormalFeedBackData.status=='已填写紧急处理'){
+ this.abnormalFeedBackData.status='已填写长久处理'
+ }
this.disableFlag1=true;
this.disableFlag2=true;
this.disableFlag3=false;
@@ -365,6 +395,18 @@
this.modalFlag=true;
},
saveAbnormalDetail(){
+ if( this.disableFlag2==false&&(this.abnormalFeedBackData.treatmentTemporary==null||this.abnormalFeedBackData.treatmentTemporary=='')){
+ this.$alert("请填写处理方式", '错误', {
+ confirmButtonText: '确定'
+ })
+ return false;
+ }
+ if( this.disableFlag3==false&&(this.abnormalFeedBackData.treatment==null||this.abnormalFeedBackData.treatment=='')){
+ this.$alert("请填写处理方式", '错误', {
+ confirmButtonText: '确定'
+ })
+ return false;
+ }
saveAbnormalDetail(this.abnormalFeedBackData).then(({data}) => {
if (data && data.code === 0) {
this.modalFlag=false
@@ -382,7 +424,57 @@
})
}
})
- }
+ },
+ closeFeedBack(row){
+ this.$confirm(`是否关闭此反馈单?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ closeFeedBack(row).then(({data}) => {
+ if (data && data.code === 0) {
+ this.search()
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }).catch(() => {
+ })
+ },
+ openFeedBack(row){
+ this.$confirm(`是否开启此反馈单?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ openFeedBack(row).then(({data}) => {
+ if (data && data.code === 0) {
+ this.search()
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }).catch(() => {
+ })
+ },
},
created() {
this.getAllAbnormalItem();
diff --git a/src/views/modules/production/generateReport.vue b/src/views/modules/production/generateReport.vue
index bd7580b..98c6da9 100644
--- a/src/views/modules/production/generateReport.vue
+++ b/src/views/modules/production/generateReport.vue
@@ -273,14 +273,50 @@
关闭
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- 开始
+
+
+
+
+
+
+ 保存
关闭
@@ -504,6 +540,10 @@
import {
getPhotoAddressData
} from '@/api/pad.js'
+ import {
+ getAbnormalCodeList,
+ getShopOrderData,
+ } from "@/api/abnormal.js"
export default {
name: 'generateReport',
components: {
@@ -523,6 +563,7 @@
KGApprove:'',
KGRework:'',
approveFlag:false,
+ abnormalList:[],
saveHeaderData: {
boxWeight:0,
qtyRequire:'',
@@ -625,6 +666,16 @@
height2:600,
tagNo2:'',
startModalFlag:false,
+ stopData:{
+ site:'',
+ seqNo:'',
+ orderNo:'',
+ shiftNo:'',
+ resourceDesc:'',
+ feedbackBy:this.$store.state.user.name,
+ abnormalCode:'',
+ abnormalRemark:'',
+ },
}
},
mounted () {
@@ -635,6 +686,11 @@
},
methods: {
+ getAllAbnormalItem(){
+ getAbnormalCodeList().then(({data}) => {
+ this.abnormalList = data.rows;
+ })
+ },
saveReport () {
this.saveHeaderData.qtyReported=Number(this.saveHeaderData.qtyUnApprove)+Number(this.saveHeaderData.qtyApprove);
if (this.saveHeaderData.qtyUnApprove == null || this.saveHeaderData.qtyUnApprove < 0) {
@@ -872,8 +928,39 @@
this.startModalFlag=true;
this.$nextTick(() => { this.$refs.start.focus();})
},
+ seqNoCheck(){
+ let inData={
+ seqNo:this.stopData.seqNo
+ }
+ getShopOrderData(inData).then(({data}) => {
+ let rows=data.rows;
+ if(rows.length==0){
+ this.stopData.seqNo='',
+ this.stopData.shiftNo='',
+ this.stopData.site='',
+ this.stopData.resourceDesc='',
+ this.stopData.orderNo='',
+ this.$alert('该派工单不存在!', '错误', {
+ confirmButtonText: '确定'
+ })
+ return false
+ }else {
+ this.stopData.shiftNo=data.rows[0].sShiftNo
+ this.stopData.site=data.rows[0].site
+ this.stopData.resourceDesc=data.rows[0].resourceDesc
+ this.stopData.orderNo=data.rows[0].orderNo
+ }
+ })
+ },
stopScan(){
- this.scanSeqNo='';
+ this.getAllAbnormalItem();
+ this.stopData.seqNo='',
+ this.stopData.shiftNo='',
+ this.stopData.site='',
+ this.stopData.resourceDesc='',
+ this.stopData.orderNo='',
+ this.stopData.abnormalRemark='',
+ this.stopData.abnormalCode='',
this.stopModalFlag=true;
this.$nextTick(() => { this.$refs.stop.focus();})
},
@@ -1073,13 +1160,30 @@
})
},
stopWork(){
- let inData={
- username:this.$store.state.user.name,
- seqNo:this.scanSeqNo
+ if( this.stopData.seqNo==null||this.stopData.seqNo==''){
+ this.$alert("请输入派工单号", '错误', {
+ confirmButtonText: '确定'
+ })
+ return false;
}
- stopWork(inData).then(({data}) => {
+ if( this.stopData.abnormalCode==null||this.stopData.abnormalCode==''){
+ this.$alert("请选择异常原因", '错误', {
+ confirmButtonText: '确定'
+ })
+ return false;
+ }
+ if( this.stopData.abnormalRemark==null||this.stopData.abnormalRemark==''){
+ this.$alert("请输入描述", '错误', {
+ confirmButtonText: '确定'
+ })
+ return false;
+ }
+ // let inData={
+ // username:this.$store.state.user.name,
+ // seqNo:this.scanSeqNo
+ // }
+ stopWork(this.stopData).then(({data}) => {
if (data && data.code === 0) {
- this.scanSeqNo='';
this.stopModalFlag=false;
this.$message({
message: '派工单已暂停',
diff --git a/src/views/modules/production/operator.vue b/src/views/modules/production/operator.vue
index 95cb958..78ef27c 100644
--- a/src/views/modules/production/operator.vue
+++ b/src/views/modules/production/operator.vue
@@ -12,7 +12,7 @@
-
+