|
|
|
@ -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;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|