车间生产:
1楼装配工序,4楼各工序,5楼各工序按钮增加防重复点击
master
xs 4 weeks ago
parent 826e4e5cdb
commit e89366bf34

@ -37,7 +37,7 @@
:disabled="form.planDetailStatus === '已完成' || !form.planDetailCode"
@click="getMaterials('0')">领料
</el-button>
<el-button size="mini" type="info" v-if="(!$route.query || $route.query.id==='2')"
<el-button size="mini" type="info" :loading="submitLoading" v-if="(!$route.query || $route.query.id==='2')"
:disabled="form.planDetailStatus === '已完成' || !form.planDetailCode"
@click="completeCollectMaterials()">完成领料
</el-button>
@ -49,7 +49,7 @@
v-if="(!$route.query || $route.query.id==='2')"
:disabled="!form.planDetailCode">退料
</el-button>
<el-button size="mini" type="info" @click="completeReturnMaterials()"
<el-button size="mini" type="info" :loading="submitLoading" @click="completeReturnMaterials()"
v-if="(!$route.query || $route.query.id==='2')"
:disabled="!form.planDetailCode">完成退料
</el-button>
@ -85,16 +85,16 @@
成品条码
</el-button>
<el-button size="mini" :disabled="form.planDetailStatus !== '已开始' || !form.planDetailCode" type="success"
<el-button size="mini" :loading="submitLoading" :disabled="form.planDetailStatus !== '已开始' || !form.planDetailCode" type="success"
@click="finish">完成
</el-button>
<el-button size="mini" v-if="form.planDetailStatus === '' && form.planDetailCode" type="primary"
@click="submitProductPlanDetailPause">暂停
@click="submitProductPlanDetailPause" :loading="submitLoading">暂停
</el-button>
<el-button size="mini" v-if="form.planDetailStatus === '' && form.planDetailCode" type="primary"
@click="submitProductPlanDetailContinue">继续
@click="submitProductPlanDetailContinue" :loading="submitLoading">继续
</el-button>
<el-popover
@ -582,6 +582,7 @@ export default {
productPlanData: {},
form: {},
form1: {},
submitLoading: false,
applyRawReturnTitle: '',
applyRawReturnVisible: false,
@ -1388,6 +1389,7 @@ export default {
},
async finish() {
let processType = this.$route.query.id;
this.submitLoading = true;
this.$confirm('确认明细完成?', '提示', {
confirmButtonText: '确定',
@ -1416,6 +1418,8 @@ export default {
// this.tableClick(e.rows.find(v => v.planCode === this.form.planCode))
// })
}).catch(() => {
}).finally(e => {
this.submitLoading = false;
});
},
@ -1719,15 +1723,21 @@ export default {
completeCollectMaterials() {
const loginStationCode = this.loginStationInfo.stationCode;
//const loginStationCode = 'ZP_06';
this.submitLoading = true;
completeCollectMaterials({endStationCode: loginStationCode}).then(v => {
this.$modal.msgSuccess("操作成功");
})
}).finally(e => {
this.submitLoading = false;
});
},
completeReturnMaterials() {
this.submitLoading = true;
completeReturnMaterials({endStationCode: this.loginStationInfo.stationCode}).then(v => {
this.$modal.msgSuccess("操作成功");
})
}).finally(e => {
this.submitLoading = false;
});
},
@ -1759,6 +1769,7 @@ export default {
/** 提交暂停按钮 */
submitProductPlanDetailPause() {
this.submitLoading = true;
let pauseForm = {planDetailId:this.form.planDetailId};
this.$modal.confirm('确认要暂停么?').then(function () {
return productPlanDetailPause(pauseForm);
@ -1766,12 +1777,15 @@ export default {
this.$modal.msgSuccess("暂停成功");
this.form.planDetailStatus = setState("4");
}).catch(() => {
}).finally(e => {
this.submitLoading = false;
});
},
/** 提交继续按钮 */
submitProductPlanDetailContinue() {
this.submitLoading = true;
let continueForm = {planDetailId:this.form.planDetailId};
this.$modal.confirm('确认要继续么?').then(function () {
return productPlanDetailContinue(continueForm);
@ -1779,6 +1793,8 @@ export default {
this.form.planDetailStatus = setState("2");
this.$modal.msgSuccess("继续成功");
}).catch(() => {
}).finally(e => {
this.submitLoading = false;
});
},

@ -214,6 +214,7 @@
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
size="small"
type="text"
:loading="submitLoading"
@click="planExecute(scope.row)"
>
{{ scope.row.planDetailStatus === '1' ? '开始' : '完成' }}
@ -223,6 +224,7 @@
size="small"
type="text"
@click="submitProductPlanDetailPause(scope.row)"
:loading="submitLoading"
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED"
>
暂停
@ -232,6 +234,7 @@
size="small"
type="text"
@click="submitProductPlanDetailContinue(scope.row)"
:loading="submitLoading"
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.PAUSE"
>
继续
@ -537,7 +540,7 @@ export default {
tableData1: [],
tableData2: [],
tableData3: [],
submitLoading:false,
productInstockVisible: false,
productInstockForm: {
materialBarcode: null
@ -721,6 +724,7 @@ export default {
// /
planExecute(e) {
if (e.planDetailStatus === '1') {
this.submitLoading = true;
this.$confirm('是否开始生产明细', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -740,9 +744,12 @@ export default {
type: 'info',
message: '已取消'
});
})
}).finally(e => {
this.submitLoading = false;
});
}
if (e.planDetailStatus === '2') {
this.submitLoading = true;
this.$confirm('是否完成生产明细', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -764,7 +771,9 @@ export default {
type: 'info',
message: '已取消'
});
})
}).finally(e => {
this.submitLoading = false;
});
}
},
// /
@ -1097,6 +1106,7 @@ export default {
/** 提交暂停按钮 */
submitProductPlanDetailPause(row) {
this.submitLoading = true;
let pauseForm = {planDetailId:row.planDetailId};
this.$modal.confirm('确认要暂停么?').then(function () {
return productPlanDetailPause(pauseForm);
@ -1104,12 +1114,15 @@ export default {
this.$modal.msgSuccess("暂停成功");
row.planDetailStatus = this.PLAN_DETAIL_STATUS.PAUSE;
}).catch(() => {
}).finally(e => {
this.submitLoading = false;
});
},
/** 提交继续按钮 */
submitProductPlanDetailContinue(row) {
this.submitLoading = true;
let continueForm = {planDetailId:row.planDetailId};
this.$modal.confirm('确认要继续么?').then(function () {
return productPlanDetailContinue(continueForm);
@ -1117,6 +1130,8 @@ export default {
row.planDetailStatus = this.PLAN_DETAIL_STATUS.STARTED;
this.$modal.msgSuccess("继续成功");
}).catch(() => {
}).finally(e => {
this.submitLoading = false;
});
},

@ -163,6 +163,7 @@
size="small"
type="text"
@click="planExecute(scope.row)"
:loading="submitLoading"
>
{{ scope.row.planDetailStatus === '1' ? '开始' : '完成' }}
</el-button>
@ -171,6 +172,7 @@
size="small"
type="text"
@click="submitProductPlanDetailPause(scope.row)"
:loading="submitLoading"
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED"
>
暂停
@ -180,6 +182,7 @@
size="small"
type="text"
@click="submitProductPlanDetailContinue(scope.row)"
:loading="submitLoading"
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.PAUSE"
>
继续
@ -459,7 +462,7 @@ export default {
{required: true, message: "成品条码不能为空", trigger: "blur"}
],
},
submitLoading:false,
materialConfirmVisible: false,
materialConfirmForm: {
materialBarcode: null,
@ -821,6 +824,7 @@ export default {
// /
planExecute(e) {
if (e.planDetailStatus === '1') {
this.submitLoading = true;
this.$confirm('是否开始生产明细', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -848,9 +852,12 @@ export default {
type: 'info',
message: '已取消'
});
})
}).finally(e => {
this.submitLoading = false;
});
}
if (e.planDetailStatus === '2') {
this.submitLoading = true;
this.$confirm('是否完成生产明细', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -868,11 +875,10 @@ export default {
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消'
}).finally(e => {
this.submitLoading = false;
});
})
}
},
@ -1219,6 +1225,7 @@ export default {
/** 提交暂停按钮 */
submitProductPlanDetailPause(row) {
this.submitLoading = true;
let pauseForm = {planDetailId:row.planDetailId};
this.$modal.confirm('确认要暂停么?').then(function () {
return productPlanDetailPause(pauseForm);
@ -1226,12 +1233,15 @@ export default {
this.$modal.msgSuccess("暂停成功");
row.planDetailStatus = this.PLAN_DETAIL_STATUS.PAUSE;
}).catch(() => {
}).finally(e => {
this.submitLoading = false;
});
},
/** 提交继续按钮 */
submitProductPlanDetailContinue(row) {
this.submitLoading = true;
let continueForm = {planDetailId:row.planDetailId};
this.$modal.confirm('确认要继续么?').then(function () {
return productPlanDetailContinue(continueForm);
@ -1239,6 +1249,8 @@ export default {
row.planDetailStatus = this.PLAN_DETAIL_STATUS.STARTED;
this.$modal.msgSuccess("继续成功");
}).catch(() => {
}).finally(e => {
this.submitLoading = false;
});
},

@ -39,15 +39,15 @@
<el-button type="warning" @click="handleRawReturn"
v-if="this.form.planDetailStatus!=null">板材退库
</el-button>
<el-button type="primary" @click="accomplishPlan"
<el-button type="primary" @click="accomplishPlan" :loading="submitLoading"
v-if="this.form.planDetailStatus!=null && this.form.planDetailStatus==='已开始'">完成
</el-button>
<el-button v-if="form.planDetailStatus === '' && form.planDetailCode" type="info"
<el-button v-if="form.planDetailStatus === '' && form.planDetailCode" type="info" :loading="submitLoading"
@click="submitProductPlanDetailPause">暂停
</el-button>
<el-button v-if="form.planDetailStatus === '' && form.planDetailCode" type="info"
<el-button v-if="form.planDetailStatus === '' && form.planDetailCode" type="info" :loading="submitLoading"
@click="submitProductPlanDetailContinue">继续
</el-button>
@ -969,6 +969,7 @@ export default {
},
//
accomplishPlan() {
this.submitLoading = true;
this.$confirm('确定完成么', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -997,7 +998,9 @@ export default {
type: 'info',
message: '已取消'
});
})
}).finally(e => {
this.submitLoading = false;
});
},
//
@ -1251,6 +1254,7 @@ export default {
/** 提交暂停按钮 */
submitProductPlanDetailPause() {
this.submitLoading = true;
let pauseForm = {planDetailId:this.form.planDetailId};
this.$modal.confirm('确认要暂停么?').then(function () {
return productPlanDetailPause(pauseForm);
@ -1258,12 +1262,15 @@ export default {
this.$modal.msgSuccess("暂停成功");
this.form.planDetailStatus = setState("4");
}).catch(() => {
}).finally(e => {
this.submitLoading = false;
});
},
/** 提交继续按钮 */
submitProductPlanDetailContinue() {
this.submitLoading = true;
let continueForm = {planDetailId:this.form.planDetailId};
this.$modal.confirm('确认要继续么?').then(function () {
return productPlanDetailContinue(continueForm);
@ -1271,6 +1278,8 @@ export default {
this.form.planDetailStatus = setState("2");
this.$modal.msgSuccess("继续成功");
}).catch(() => {
}).finally(e => {
this.submitLoading = false;
});
},

@ -24,13 +24,13 @@
</el-form-item>
</el-form>
<div style="text-align: center">
<el-button v-if="form.planDetailStatus === '已开始'" type="primary" @click="finish()"></el-button>
<el-button v-if="form.planDetailStatus === '已开始'" type="primary" :loading="submitLoading" @click="finish()"></el-button>
<el-button v-if="form.planDetailStatus === '' && form.planDetailCode" type="info"
<el-button v-if="form.planDetailStatus === '' && form.planDetailCode" type="info" :loading="submitLoading"
@click="submitProductPlanDetailPause">暂停
</el-button>
<el-button v-if="form.planDetailStatus === '' && form.planDetailCode" type="info"
<el-button v-if="form.planDetailStatus === '' && form.planDetailCode" type="info" :loading="submitLoading"
@click="submitProductPlanDetailContinue">继续
</el-button>
@ -288,6 +288,7 @@ export default {
nowNum1: 1,
totalNum1: 0,
form: {},
submitLoading:false,
tableData: [],
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
//
@ -847,7 +848,7 @@ export default {
})
},
async finish() {
this.submitLoading = true;
this.$confirm('确认计划完成?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -872,6 +873,8 @@ export default {
type: 'info',
message: '已取消'
});
}).finally(e => {
this.submitLoading = false;
});
},
@ -900,6 +903,7 @@ export default {
/** 提交暂停按钮 */
submitProductPlanDetailPause() {
this.submitLoading = true;
let pauseForm = {planDetailId:this.form.planDetailId};
this.$modal.confirm('确认要暂停么?').then(function () {
return productPlanDetailPause(pauseForm);
@ -907,12 +911,15 @@ export default {
this.$modal.msgSuccess("暂停成功");
this.form.planDetailStatus = setState("4");
}).catch(() => {
}).finally(e => {
this.submitLoading = false;
});
},
/** 提交继续按钮 */
submitProductPlanDetailContinue() {
this.submitLoading = true;
let continueForm = {planDetailId:this.form.planDetailId};
this.$modal.confirm('确认要继续么?').then(function () {
return productPlanDetailContinue(continueForm);
@ -920,6 +927,8 @@ export default {
this.form.planDetailStatus = setState("2");
this.$modal.msgSuccess("继续成功");
}).catch(() => {
}).finally(e => {
this.submitLoading = false;
});
},
}

Loading…
Cancel
Save