镀层物料需求审核调整

dev-scheduling
zhangdi 1 month ago
parent 4bd7b5cc74
commit 46d1f73281
  1. 9
      src/api/productionManagement/coatingMaterial.js
  2. 2
      src/views/basicData/components/inventory.vue
  3. 66
      src/views/productionManagement/components/coatingMater/materialRequirements.vue
  4. 1
      src/views/productionManagement/reworkOrder/index.vue
  5. 3
      src/views/workRate/index.vue

@ -85,3 +85,12 @@ export const getWorkCenter = () =>{
method:'get' method:'get'
}) })
} }
// 二级审批
export const secondConfirmBatch = row => {
return request({
url: '/blade-desk/order/plateGoodsRecord/confirmBatch',
method: 'post',
params: row,
});
};

@ -113,7 +113,7 @@ export default {
type: 'select', type: 'select',
filterable: true, filterable: true,
remote: true, remote: true,
dicUrl: `/api/blade-wms/stStorehouse/page?shName={{key}}`, dicUrl: `/api/blade-wms/stStorehouse/page?current=1&&size=999999&&shName={{key}}`,
props: { props: {
label: 'shName', label: 'shName',
value: 'id', value: 'id',

@ -23,7 +23,8 @@
</template> </template>
<template #menu-left="row"> <template #menu-left="row">
<el-button type="primary" @click="handleAdd" v-if="permission.material_demand_declaration">需求申报</el-button> <el-button type="primary" @click="handleAdd" v-if="permission.material_demand_declaration">需求申报</el-button>
<el-button type="primary" @click="handleApprove" v-if="permission.material_batch_audit">批量审核</el-button> <el-button type="primary" @click="handleApprove" v-if="permission.material_batch_audit">批量一级审核</el-button>
<el-button type="primary" @click="secondHandleApprove" v-if="permission.material_batch_audit">批量二级审核</el-button>
</template> </template>
<template #menu-right> <template #menu-right>
<el-button type="warning" @click="pendingReviewFn()" >待审核</el-button> <el-button type="warning" @click="pendingReviewFn()" >待审核</el-button>
@ -32,21 +33,26 @@
<el-button type="text" @click="handleView(row)" v-if="permission.material_details">详情</el-button> <el-button type="text" @click="handleView(row)" v-if="permission.material_details">详情</el-button>
<el-button type="text" @click="closeRow(row)" v-show="row.status != 10006 && (row.status == 10000 || row.status == 10005)" v-if="permission.material_close">关闭</el-button> <el-button type="text" @click="closeRow(row)" v-show="row.status != 10006 && (row.status == 10000 || row.status == 10005)" v-if="permission.material_close">关闭</el-button>
<el-button type="text" v-show="row.status == 10006 || row.status == 10000 || row.status == 10005" @click="deleteRow(row)" v-if="permission.material_del">删除</el-button> <el-button type="text" v-show="row.status == 10006 || row.status == 10000 || row.status == 10005" @click="deleteRow(row)" v-if="permission.material_del">删除</el-button>
<el-button type="text" v-show="row.status == 10000" @click="approveRow(row)" v-if="permission.material_audit">审核</el-button> <el-button type="text" v-show="row.status == 10000" @click="approveRow(row)" v-if="permission.material_audit">一级审核</el-button>
<el-button type="text" v-show="row.status == 10001" @click="approveRow(row)" v-if="permission.material_audit">二级审核</el-button>
</template> </template>
</avue-crud> </avue-crud>
<coating-add-dialog v-if="showDialog" :show-dialog="showDialog" @closeDialog="closeDialog"></coating-add-dialog> <coating-add-dialog v-if="showDialog" :show-dialog="showDialog" @closeDialog="closeDialog"></coating-add-dialog>
<material-detail :material-dialog="materialDialog" @closeDialog="closeDialog" :id="id"></material-detail> <material-detail :material-dialog="materialDialog" @closeDialog="closeDialog" :id="id"></material-detail>
<!-- <add-quantity :add-quantity="addQuantity" @closeDialog="closeDialog"></add-quantity> <!-- <add-quantity :add-quantity="addQuantity" @closeDialog="closeDialog"></add-quantity>
<add-dialog :add-dialog="addDialog" @closeDialog="closeDialog"></add-dialog> --> <add-dialog :add-dialog="addDialog" @closeDialog="closeDialog"></add-dialog> -->
<!-- 一级审核 -->
<el-dialog append-to-body width="550px" title="审核" v-model="approveDialog"> <el-dialog append-to-body width="550px" title="审核" v-model="approveDialog" v-if="approveDialog">
<el-form ref="approveForm" :model="approveForm" :rules="approveRules"> <el-form ref="approveForm" :model="approveForm" :rules="approveRules">
<el-form-item label="审核结果" prop="approvalStatus"> <el-form-item label="审核结果" prop="approvalStatus">
<el-radio-group v-model="approveForm.approvalStatus" @input="changeType"> <el-radio-group v-model="approveForm.approvalStatus" v-if="rowItem.status==10000">
<el-radio :label="10001">审批通过</el-radio> <el-radio :label="10001">审批通过</el-radio>
<el-radio :label="10005">审批不通过</el-radio> <el-radio :label="10005">审批不通过</el-radio>
</el-radio-group> </el-radio-group>
<el-radio-group v-model="approveForm.approvalStatus" v-if="rowItem.status==10001">
<el-radio :label="10007">审批通过</el-radio>
<el-radio :label="10008">审批不通过</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="审核意见" prop="approvalMemo"> <el-form-item label="审核意见" prop="approvalMemo">
<el-input type="textarea" v-model="approveForm.approvalMemo"></el-input> <el-input type="textarea" v-model="approveForm.approvalMemo"></el-input>
@ -59,6 +65,7 @@
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -68,7 +75,8 @@ import {
confirmBatch, confirmBatch,
closeBatchs, closeBatchs,
removeByIds, removeByIds,
getOrderMoldPlanCaDeatils getOrderMoldPlanCaDeatils,
secondConfirmBatch
} from '@/api/productionManagement/coatingMaterial'; } from '@/api/productionManagement/coatingMaterial';
import coatingAddDialog from '../coatingAddDialog.vue'; import coatingAddDialog from '../coatingAddDialog.vue';
import coatingColumnData from '../../js/coatingColumnData'; import coatingColumnData from '../../js/coatingColumnData';
@ -339,10 +347,12 @@ export default {
// { label: '', value: '3' }, // { label: '', value: '3' },
// { label: '', value: '4' }, // { label: '', value: '4' },
// { label: '', value: '5' }, // { label: '', value: '5' },
{ label: '待审核', value: 10000 }, { label: '待一级审核', value: 10000 },
{ label: '审核通过', value: 10001 }, { label: '一级审核通过', value: 10001 },
{ label: "使用中", value:10002}, { label: "使用中", value:10002},
{ label: '审核不通过', value: 10005 }, { label: '一级审核不通过', value: 10005 },
{ label: '二级审核通过', value: 10007 },
{ label: '二级审核不通过', value: 10008 },
{ label: '已完成',value:10004}, { label: '已完成',value:10004},
{ label: '已超期', value: 10003 }, { label: '已超期', value: 10003 },
{ label: '已关闭', value: 10006 }, { label: '已关闭', value: 10006 },
@ -413,7 +423,8 @@ export default {
}, },
selectionList: [], selectionList: [],
confirmBatchId: null, confirmBatchId: null,
query:{} query:{},
rowItem:{}
}; };
}, },
mounted() { mounted() {
@ -501,17 +512,34 @@ export default {
} }
}, },
approveRow(val) { approveRow(val) {
this.rowItem = val
this.selectionList = [] this.selectionList = []
this.selectionList.push(val); this.selectionList.push(val);
this.approveDialog = true; this.approveDialog = true;
}, },
//
handleApprove() { handleApprove() {
if (this.selectionList.length != 0) { if (this.selectionList.length != 0) {
let tmp = this.selectionList.find(item => item.status != 10000) let tmp = this.selectionList.find(item => item.status != 10000)
if(tmp){ if(tmp){
this.$message.error("请选择状态为【待审核】的数据") this.$message.error("请选择状态为【待一级审核】的数据")
return return
} }
this.rowItem = this.selectionList[0]
this.approveDialog = true;
} else {
this.$message.error('请至少选择一条数据!');
}
},
//
secondHandleApprove(){
if (this.selectionList.length != 0) {
let tmp = this.selectionList.find(item => item.status != 10001)
if(tmp){
this.$message.error("请选择状态为【待二级审核】的数据")
return
}
this.rowItem = this.selectionList[0]
this.approveDialog = true; this.approveDialog = true;
} else { } else {
this.$message.error('请至少选择一条数据!'); this.$message.error('请至少选择一条数据!');
@ -521,6 +549,7 @@ export default {
this.$refs.approveForm.validate(valid => { this.$refs.approveForm.validate(valid => {
if (valid) { if (valid) {
const ids = this.selectionList.map(item => item.id).join(','); const ids = this.selectionList.map(item => item.id).join(',');
if(this.rowItem.status === 10000){
confirmBatch({ confirmBatch({
ids:ids, ids:ids,
...this.approveForm ...this.approveForm
@ -532,6 +561,21 @@ export default {
this.onLoad() this.onLoad()
} }
}) })
}
if(this.rowItem.status === 10001){
secondConfirmBatch({
ids:ids,
...this.approveForm
}).then(res =>{
if(res.data.code == 200){
this.$message.success('审核成功');
this.approveDialog = false;
this.selectionList = []
this.onLoad()
}
})
}
// confirmBatch({ ...{ ids }, ...this.approveForm }).then(res => { // confirmBatch({ ...{ ids }, ...this.approveForm }).then(res => {
// if (res.code === 200) { // if (res.code === 200) {
// this.$message.success(''); // this.$message.success('');

@ -59,6 +59,7 @@ export default {
components: { updateMakeQty, reworkDetails }, components: { updateMakeQty, reworkDetails },
data() { data() {
return { return {
detailsShow: false,
loading:false, loading:false,
searchCode: '', // searchCode: '', //
updateMakeQtyVisible: false, updateMakeQtyVisible: false,

@ -171,7 +171,7 @@
selectedItemInfo.planEndTime selectedItemInfo.planEndTime
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="接收人" :span="1">{{ <el-descriptions-item label="接收人" :span="1">{{
processDetails.receiveMan processDetails.receiveName
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="实际开始" :span="1">{{ <el-descriptions-item label="实际开始" :span="1">{{
selectedItemInfo.factStartTime selectedItemInfo.factStartTime
@ -579,7 +579,6 @@ export default {
return 'color: rgb(251, 170, 8)'; return 'color: rgb(251, 170, 8)';
} }
}; };
consolog.log(9999999,this.detailsForm)
return [ return [
{ label: '车间订单号', value: this.detailsForm.woCode || '' }, { label: '车间订单号', value: this.detailsForm.woCode || '' },
{ label: '流程卡号', value: this.detailsForm.cardNo || '' }, { label: '流程卡号', value: this.detailsForm.cardNo || '' },

Loading…
Cancel
Save