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

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

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

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

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

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

Loading…
Cancel
Save