This commit is contained in:
打豆豆 2023-11-17 16:59:02 +08:00
parent 3bc7f50a4e
commit 58cba4c0ae

View File

@ -192,8 +192,16 @@
icon="el-icon-plus"
v-if="scope.row.status =='CONFIRMED' && scope.row.workorderType =='SELF'"
@click="handleAdd(scope.row)"
v-hasPermi="['mes:pro:workorder:add']"
v-hasPermi="['mes:pro:workorder:update']"
>新增</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-circle-check"
v-if="scope.row.status =='CONFIRMED'"
@click="handleFinish(scope.row)"
v-hasPermi="['mes:pro:workorder:update']"
>完成</el-button>
<el-button
size="mini"
type="text"
@ -399,7 +407,7 @@
</template>
<script>
import { listWorkorder, getWorkorder, delWorkorder, addWorkorder, updateWorkorder } from "@/api/mes/pro/workorder";
import { listWorkorder, getWorkorder, delWorkorder, addWorkorder, updateWorkorder ,dofinish} from "@/api/mes/pro/workorder";
import Workorderbom from "./bom/bom.vue";
import WorkorderItemList from "./items/item.vue";
import ItemSelect from "@/components/itemSelect/single.vue";
@ -689,13 +697,22 @@ export default {
...this.queryParams
}, `workorder_${new Date().getTime()}.xlsx`)
},
handleFinish(){
handleConfirm(){
let that = this;
this.$modal.confirm('是否完成工单编制?【完成后将不能更改】').then(function(){
this.$modal.confirm('是确认完成工单编制?【确认后将不能更改】').then(function(){
that.form.status = 'CONFIRMED';
that.submitForm();
});
},
handleFinish(row){
const workorderIds = row.workorderId || this.ids;
this.$modal.confirm('确认完成工单?一旦完成,此工单将无法继续报工').then(function() {
return dofinish(workorderIds) //
}).then(() => {
this.getList();
this.$modal.msgSuccess("更改成功");
}).catch(() => {});
},
//
onItemSelected(obj){
if(obj != undefined && obj != null){