问题修改

dev-scheduling
zhangdi 2 weeks ago
parent dc557ea31e
commit a2deeb9ea4
  1. 2
      src/api/processManagement/taskProcessing.js
  2. 18
      src/api/storeManagement/workwearPlan.js
  3. 2
      src/views/inboundOutboundManagement/materialIssuing.vue
  4. 3
      src/views/processManagement/components/assignDaialog.vue
  5. 81
      src/views/processManagement/taskProcessing.vue
  6. 84
      src/views/warehouseManagement/workwearPlan/components/checkDialog.vue
  7. 415
      src/views/warehouseManagement/workwearPlan/index.vue

@ -106,7 +106,7 @@ export const getProcessManagementAuthorized = (params) => {
// 转派
export const taskRedeploy = data => {
return request({
url: '/blade-desk/dsTasking/taskRedeploy',
url: '/blade-desk/dsTasking/batch-taskRedeploy',
method: 'post',
data
});

@ -96,4 +96,22 @@ export const getMaterialList = params => {
method: 'get',
params,
});
};
// 发送审批
export const renderApproval = data => {
return request({
url: '/api/blade-wms/stMoldApplyFor/renderApproval ',
method: 'post',
data:data,
});
};
// 审批 /stMoldApplyFor/approval/operate
export const approvalOperate = data => {
return request({
url: '/api/blade-wms/stMoldApplyFor/approval/operate',
method: 'post',
params:data,
});
};

@ -35,7 +35,7 @@
</template>
<template #location="scope">
<el-button type="text" @click="editRow(scope.row, scope.row.$index)">{{
scope.row.location == '' ? '请选择库位' : scope.row.location
scope.row.location == ''|| scope.row.location == null? '请选择库位' : scope.row.location
}}</el-button>
</template>
</avue-crud>

@ -89,8 +89,7 @@ export default {
if (this.title == '转派') {
let query = {
craftMan: this.$refs.from.form.userId,
id: arr[0],
// remarks:''
taskIds: arr.join(','),
};
taskRedeploy(query).then(res => {
this.$message.success('操作成功!');

@ -13,15 +13,17 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
@selection-change="selectionChange"
>
<template #menu-left>
<el-button @click="addFn()" type="primary">新增任务</el-button>
<el-button @click="setCrew()" type="primary">批量转派</el-button>
</template>
<template #menu-right="{ size }"> </template>
<template #menu="scope">
<!-- {{ scope.$index }} -->
<el-button type="primary" link @click="viewDetails(scope.row.partId, scope.row)"
>详情</el-button
>
@ -34,14 +36,6 @@
v-if="scope.row.taskStatus == 2 || scope.row.sinTerType != -1"
>编制</el-button
>
<!-- <el-button
type="primary"
link
@click="receiveFn(scope.row)"
v-if="(scope.row.taskStatus == 1)&&
(!scope.row.completed )"
>接收</el-button
> -->
<el-button
type="primary"
link
@ -122,6 +116,7 @@ import { getList, completeSet, taskReception } from '@/api/processManagement/tas
import partDetails from './components/processMainte/partDetails.vue';
import { getPdmDocLink } from '@/api/processManagement/procepssPlanning';
export default {
components: {
assignDaialog,
@ -160,7 +155,7 @@ export default {
tree: false,
border: true,
index: false,
selection: false,
selection: true,
viewBtn: false,
editBtn: false,
delBtn: false,
@ -186,6 +181,7 @@ export default {
menuAlign: 'center',
gridBtn: false,
searchLabelPosition: 'left',
searchLabelWidth:'auto',
searchGutter: 24,
searchSpan: 6,
searchMenuPosition: 'right',
@ -292,9 +288,9 @@ export default {
headerAlign: 'center',
align: 'center',
},
{
label: '备注',
prop: 'remarks',
{
label: '审理意见',
prop: 'dispose',
sortable: true,
search: false,
overHidden: true,
@ -302,6 +298,16 @@ export default {
headerAlign: 'center',
align: 'center',
},
// {
// label: '',
// prop: 'remarks',
// sortable: true,
// search: false,
// overHidden: true,
// width: 120,
// headerAlign: 'center',
// align: 'center',
// },
{
label: '状态',
prop: 'taskStatus',
@ -334,25 +340,26 @@ export default {
},
],
},
// {
// label: '',
// prop: 'assignMan',
// sortable: true,
// search: false,
// overHidden: true,
// width: 120,
// headerAlign: 'center',
// align: 'center',
// },
{
label: '处理人',
prop: 'craftMan',
sortable: true,
search: false,
search: true,
overHidden: true,
width: 120,
headerAlign: 'center',
align: 'center',
type: 'select',
filterable: true,
clearable: true,
dicUrl:'/api/blade-system/user/list-all-by-role-alias?roleAlias=sj_craft,rb_craft',
props: {
label: 'realName',
value: 'id',
},
},
{
label: '分派时间',
@ -364,17 +371,6 @@ export default {
headerAlign: 'center',
align: 'center',
},
// {
// label: '',
// prop: 'receptionTime',
// sortable: true,
// search: false,
// overHidden: true,
// width: 180,
// headerAlign: 'center',
// align: 'center',
// },
],
},
data: [],
@ -382,6 +378,7 @@ export default {
isTestOpen: false, //
detailsRow: {},
updateRow: [], //
selectionList:[],
};
},
methods: {
@ -469,6 +466,20 @@ export default {
this.updateRow.push(row);
this.title = '转派';
},
selectionChange(list) {
this.selectionList = list;
},
//
setCrew(){
if(this.selectionList.length<=0){
this.$message.error('请选择数据!');
return;
}
this.setCrewOpen = true;
this.updateRow=this.selectionList;
this.title = '转派';
},
//
searchReset() {
this.query = {};

@ -0,0 +1,84 @@
<template>
<el-dialog title="审核" append-to-body :modelValue="openShow" width="30%" @close="closeDialog">
<avue-form ref="form" v-model="form" :option="option"></avue-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
import {
approvalOperate,
} from '@/api/storeManagement/workwearPlan';
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
rowItem:{
type: Object,
default: {},
}
},
data() {
return {
openShow: false,
form:{},
option: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: '审批结果',
prop: 'approvalResult',
span: 24,
type: 'radio',
dicData: [
{ label: '通过', value: 1 },
{ label: '不通过', value: 2 },
],
rules: [{ required: true, message: '请选择', trigger: 'blur' }],
},
// {
// label: '',
// prop: 'remark',
// type: 'textarea',
// span: 24,
// },
],
},
};
},
mounted() {
this.openShow = this.showDialog;
},
methods: {
closeDialog() {
this.openShow = false;
this.$emit('closeDialog');
},
submit() {
this.$refs.form.validate(async valid => {
if (valid) {
let params = {
id: this.rowItem.id,
approvalResult: this.form.approvalResult,
};
approvalOperate(params).then((res) => {
if (res.code == 200) {
this.$message.success('操作成功');
this.closeDialog();
}
});
}
});
},
},
};
</script>
<style lang="scss" scoped></style>

@ -1,10 +1,5 @@
<template>
<basic-container>
<!-- 工装计划申报 -->
<!-- <el-tabs v-model="tabPosition" class="demo-tabs" @tab-change="tabPositionChange">
<el-tab-pane label="申报计划" name="declarationPlan"></el-tab-pane>
<el-tab-pane label="申报记录" name="declarationLog"></el-tab-pane>
</el-tabs> -->
<avue-crud
:option="option"
:table-loading="loading"
@ -24,45 +19,28 @@
>
<template #menu-left>
<el-button type="primary" @click="handleAdd">新增</el-button>
<el-button type="primary" @click="sendCheck">发送审批</el-button>
</template>
<template #menu="scope">
<el-button type="text" @click="editRow(scope.row)">修改</el-button>
<el-button type="text" @click="deleteRow(scope.row)">删除</el-button>
<el-button type="text" @click="editRow(scope.row)" v-if="scope.row.mafStatus==0||scope.row.approvalStatus==2">修改</el-button>
<el-button type="text" @click="checkRow(scope.row)" v-if="scope.row.mafStatus==1&&scope.row.approvalStatus==0">审批</el-button>
<el-button type="text" @click="deleteRow(scope.row)" v-if="scope.row.mafStatus==0">删除</el-button>
</template>
<!-- <template #keeper="{ row }">{{ row.keeper.userName }}</template>
<template #createMan="{ row }">{{ row.createMan.userName }}</template> -->
</avue-crud>
<el-dialog title="新增" append-to-body v-model="showDialog" width="80%" fullscreen>
<div style="margin-bottom: 10px">
<el-button type="primary" @click="insertEvent()">插入一行</el-button>
<el-button plain type="danger" @click="remove">删除选择行</el-button>
<!-- <el-button type="primary" @click="handleSave">保存</el-button> -->
</div>
<el-table :data="tableData" @select="selectChange">
<el-table-column type="selection"></el-table-column>
<!-- <el-table-column align="center" label="零件号" prop="partCode">
<template #default="scope">
<el-select v-model="scope.row.partCode">
<el-option v-for="item in partData" :key="item.code" :label="item.code + '-' + item.name"
:value="item.code"></el-option>
</el-select>
</template>
</el-table-column> -->
<el-table-column align="center" label="工装号" prop="moCode">
<template #header>
<span><i style="color: red">*</i>工装号</span>
</template>
<template #default="scope">
<!-- <el-select v-model="scope.row.moCode" @change="val => changeMoData(val, scope.$index)">
<el-option
v-for="item in goodsList"
:key="item.id"
:label="item.goodsCode"
:value="item.goodsCode"
></el-option>
</el-select> -->
<jhSelect
v-model="scope.row.moCode"
placeholder="请搜索选择"
@ -82,19 +60,6 @@
</template>
</el-table-column>
<el-table-column align="center" label="工装名称" prop="moName"></el-table-column>
<!-- <el-table-column align="center" label="零件号" prop="partCode">
<template #default="scope">
<el-select v-model="scope.row.partCode" @change="(val) => changeCode(val,scope.$index)">
<el-option
v-for="item in partData"
:key="item.id"
:label="item.partCode + '-' + item.partName"
:value="item.partCode"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column align="center" label="零件名称" prop="partName"></el-table-column> -->
<el-table-column align="center" label="计划类型" prop="planType">
<template #default="scope">
<el-select v-model="scope.row.planType">
@ -182,10 +147,13 @@
</span>
</template>
</el-dialog>
<!-- 审批 -->
<checkDialog v-if="checkShow" :show-dialog="checkShow" :rowItem="rowItem" @closeDialog="closeDialog"></checkDialog>
</basic-container>
</template>
<script>
import checkDialog from './components/checkDialog.vue'
import {
getList,
save,
@ -196,9 +164,10 @@ import {
getUserByRoleAlias,
getOrderMoldPlanCaDeatils,
removeByIds,
renderApproval,
} from '@/api/storeManagement/workwearPlan';
import workColumnData from './js/workColumnData';
export default {
components:{checkDialog},
data() {
return {
// tabPosition: 'declarationPlan',
@ -231,9 +200,8 @@ export default {
option: {
height: 'auto',
calcHeight: 32,
rowKey: 'twlId',
rowKey: 'id',
tip: false,
// size: 'medium',
simplePage: true,
searchShow: true,
searchMenuSpan: 6,
@ -241,8 +209,8 @@ export default {
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: false,
index: false,
selection: true,
viewBtn: false,
delBtn: false,
addBtn: false,
@ -254,7 +222,7 @@ export default {
editBtnIcon: ' ',
viewBtnText: '详情',
menu: true,
menuWidth: 110,
menuWidth: 120,
dialogWidth: 1200,
dialogClickModal: false,
searchEnter: true,
@ -280,14 +248,7 @@ export default {
search: true,
sortable: true,
overHidden: true,
width: 200,
rules: [
{
required: true,
message: '请输入工装号',
trigger: 'blur',
},
],
width: 120,
},
{
label: '工装名称',
@ -295,59 +256,15 @@ export default {
search: true,
sortable: true,
overHidden: true,
width: 200,
rules: [
{
required: true,
message: '请输入工装名称',
trigger: 'blur',
},
],
width: 120,
},
// {
// label: '',
// prop: 'partCode',
// search: true,
// sortable: true,
// overHidden: true,
// width: 200,
// rules: [
// {
// required: true,
// message: '',
// trigger: 'blur',
// },
// ],
// },
// {
// label: '',
// prop: 'partName',
// search: true,
// sortable: true,
// overHidden: true,
// width: 200,
// rules: [
// {
// required: true,
// message: '',
// trigger: 'blur',
// },
// ],
// },
{
label: '计划类型',
prop: 'planTypeName',
prop: 'planType',
search: true,
sortable: true,
overHidden: true,
width: 200,
rules: [
{
required: true,
message: '请输入计划类型',
trigger: 'blur',
},
],
width: 120,
},
{
label: '数量',
@ -355,14 +272,7 @@ export default {
search: false,
sortable: true,
overHidden: true,
width: 200,
rules: [
{
required: true,
message: '请输入数量',
trigger: 'blur',
},
],
width: 120,
},
{
label: '需求日期',
@ -376,14 +286,7 @@ export default {
valueFormat: 'YYYY-MM-DD',
sortable: true,
overHidden: true,
width: 200,
rules: [
{
required: true,
message: '请输入需求日期',
trigger: 'blur',
},
],
width: 120,
},
{
label: '生产标识',
@ -391,14 +294,7 @@ export default {
search: true,
sortable: true,
overHidden: true,
width: 200,
rules: [
{
required: true,
message: '请输入生产标识',
trigger: 'blur',
},
],
width: 120,
},
{
label: '紧急状态',
@ -406,60 +302,12 @@ export default {
search: false,
sortable: true,
overHidden: true,
width: 200,
rules: [
{
required: true,
message: '请输入紧急状态',
trigger: 'blur',
},
],
},
{
label: '保管员',
prop: 'keeperName',
search: false,
sortable: true,
overHidden: true,
width: 200,
rules: [
{
required: true,
message: '请输入保管员',
trigger: 'blur',
},
],
},
{
label: '备注',
prop: 'memo',
search: false,
sortable: true,
overHidden: true,
width: 200,
rules: [
{
required: true,
message: '请输入备注',
trigger: 'blur',
},
],
},
{
label: '创建时间',
prop: 'createTime',
search: false,
sortable: true,
overHidden: true,
width: 200,
rules: [
{
required: true,
message: '请输入建立时间',
trigger: 'blur',
},
type: 'select',
dicData: [
{ label: '正常', value: '0' },
{ label: '紧急', value: '1' },
],
width: 120,
},
{
label: '状态',
@ -467,12 +315,16 @@ export default {
search: true,
sortable: true,
overHidden: true,
width: 200,
width: 120,
searchOrder: 20,
type: 'select',
dicData: [
{
label: '新建',
value: 0,
},
{
label: '已确认',
value: 1,
},
{
@ -488,37 +340,64 @@ export default {
value: 4,
},
],
rules: [
},
{
label: '审批状态',
prop: 'approvalStatus',
search: true,
sortable: true,
overHidden: true,
width: 120,
searchOrder: 20,
type: 'select',
dicData: [
{
required: true,
message: '请输入状态',
trigger: 'blur',
label: '审批中',
value: 0,
},
{
label: '审批通过',
value: 1,
},
{
label: '审批不通过',
value: 2,
},
],
},
// {
// label: '',
// prop: 'createMan',
// search: false,
// sortable: true,
// overHidden: true,
// width: 200,
// rules: [
// {
// required: true,
// message: '',
// trigger: 'blur',
// },
// ],
// },
{
label: '保管员',
prop: 'keeperName',
search: false,
sortable: true,
overHidden: true,
width: 120,
},
{
label: '备注',
prop: 'memo',
search: false,
sortable: true,
overHidden: true,
width: 120,
},
{
label: '创建时间',
prop: 'createTime',
search: false,
sortable: true,
overHidden: true,
width: 160,
},
],
},
rowItem:{},
checkShow:false,
};
},
mounted() {
// this.option.column = workColumnData[this.tabPosition]
this.getProdIdentList();
// this.getPart()
this.getUser();
this.getGoods();
},
@ -543,69 +422,11 @@ export default {
this.partData = res.data.data;
});
},
changeCode(val, index) {
let tmp = this.partData.find(item => item.partCode == val);
this.tableData[index].partName = tmp.partName;
getMoldList({
partId: this.partData.find(item => item.partCode === val)?.id,
}).then(res => {
this.tableData[index].woData = res.data.data;
});
},
tabPositionChange(val) {
this.option.column = workColumnData[this.tabPosition];
if (this.tabPosition == 'declarationPlan') {
this.option.menu = true;
this.data = [
{
id: 1,
partCode: '001',
moCodee: '002',
planType: '备件',
quantity: 10,
quaLevel: '002',
urgentTypeText: '正常',
urgentType: '0',
needDate: '2022-10-30',
createTime: '2022-10-15',
memo: '',
mafStatusTitle: '正常',
keeper: {
userName: '张三',
},
createMan: {
userName: '李四',
},
},
{
id: 2,
partCode: '001',
moCodee: '002',
planType: '备件',
quantity: 10,
quaLevel: '002',
urgentTypeText: '正常',
urgentType: '0',
needDate: '2022-10-30',
createTime: '2022-10-15',
memo: '',
mafStatusTitle: '正常',
keeper: {
userName: '张三',
},
createMan: {
userName: '李四',
},
},
];
this.page.total = this.data.length;
} else {
this.option.menu = false;
this.data = [];
this.page.total = this.data.length;
}
checkRow(row){
this.checkShow = true
this.rowItem = row
},
//
editRow(row) {
this.tableData = [];
getOrderMoldPlanCaDeatils({
@ -614,9 +435,6 @@ export default {
this.tableData.push(res.data.data);
this.showDialog = true;
});
// this.tableData = [];
// this.tableData.push(row);
// this.showDialog = true;
},
deleteRow(row) {
this.$confirm('确定将选择数据删除?', {
@ -632,21 +450,44 @@ export default {
});
});
},
selectionChange(list) {
this.selectionList = list;
},
handleAdd() {
this.showDialog = true;
},
//
sendCheck() {
if (this.selectionList.length <= 0) {
this.$message.error('请选择需要发送审批的数据!');
return false;
}
const invalidItems = this.selectionList.filter(item =>( item.mafStatus !== 0)&&(item.approvalStatus != 2));
if (invalidItems.length > 0) {
this.$message.warning(`请选择新建或者审批不通过的数据!`);
return false;
}
this.$confirm(`确定将选中的 ${this.selectionList.length} 条数据发送审批?`, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
renderApproval(this.selectionList).then(res => {
this.$message.success('操作成功');
this.onLoad(this.page, this.query);
});
})
.catch(() => {});
},
closeDialog() {
this.showDialog = false;
this.tableData = [];
this.checkShow = false
this.onLoad(this.page,this.query)
},
submit() {
// {
// "list": [
// {"applyNo": "M001", "moldName": "1", "applyNum": 5},
// {"applyNo": "M002", "moldName": "2", "applyNum": 3}
// ],
// "deleteIds": [1, 2, 3] // "deleteIds": []
// }
//
const submitData = this.tableData.map(row => {
const { _select, woData, ...validData } = row; //
@ -666,11 +507,9 @@ export default {
});
},
changeMoData(val, tmp, row, index) {
// let tmp = this.goodsList.find(item => item.goodsCode == val);
if (tmp != undefined) {
this.tableData[index].moName = tmp.goodsName;
}
// this.tableData[index].moName = tmp.goodsName;
},
insertEvent() {
const record = { _select: false };
@ -721,7 +560,6 @@ export default {
this.query.needDate && this.query.needDate.length != 0 && this.query.needDate[1],
};
if (params.needDate) delete params.needDate;
// const {needDate,...searchParam} = params
getList({
current: this.page.currentPage,
size: this.page.pageSize,
@ -730,33 +568,6 @@ export default {
this.data = res.data.data.records;
this.page.total = res.data.data.total;
});
// this.data = [
// {
// id: 1,
// partCode: '001', moCodee: '002', planType: '', quantity: 10, quaLevel: '002',
// urgentTypeText: '', urgentType: '0', needDate: '2022-10-30', createTime: '2022-10-15',
// memo: '', mafStatusTitle: '',
// keeper: {
// userName: '',
// },
// createMan: {
// userName: ''
// }
// },
// {
// id: 2,
// partCode: '001', moCodee: '002', planType: '', quantity: 10, quaLevel: '002',
// urgentTypeText: '', urgentType: '0', needDate: '2022-10-30', createTime: '2022-10-15',
// memo: '', mafStatusTitle: '',
// keeper: {
// userName: '',
// },
// createMan: {
// userName: ''
// }
// },
// ]
// this.page.total = this.data.length
},
},
};

Loading…
Cancel
Save