问题修改

dev-scheduling
zhangdi 2 weeks ago
parent a2deeb9ea4
commit a5dbfba928
  1. 9
      src/api/processManagement/procepssPlanning.js
  2. 313
      src/views/basicData/components/warehouse.vue
  3. 48
      src/views/basicData/js/warehouseMain.js
  4. 2
      src/views/basicData/warehouseMaintenance.vue
  5. 2
      src/views/inboundOutboundManagement/components/addEditDialog.vue
  6. 2
      src/views/inboundOutboundManagement/otherIssuing/otherIssuingDailog.vue
  7. 60
      src/views/processManagement/components/processMainte/processPlanning.vue
  8. 69
      src/views/warehouseManagement/materialPreserve.vue
  9. 2
      src/views/warehouseManagement/workwearPlan/index.vue

@ -40,3 +40,12 @@ export const getPdmDocLink = params => {
params, params,
}); });
}; };
// 复制工艺信息
export const craftBatchCopy = data => {
return request({
url: '/blade-desk/dsCraft/craftBatchCopy',
method: 'post',
data:data,
});
};

@ -22,104 +22,233 @@
</template> </template>
<script> <script>
import {warehouseOption} from "../js/warehouseMain.js" // import {warehouseOption} from "../js/warehouseMain.js"
import {getWareList,addWare,editWare,deleteWare,getLocationList,delLocation, import {
editLocation,getUserByRoleAlias,getWareByUser,getWareSelect,getUserByWare,saveUserWare,getAllUser, getWareList,
saveWareUser,getMaterialSelect} from "@/api/storeManagement/warehouseMaintenance"; addWare,
editWare,
deleteWare,
getLocationList,
delLocation,
editLocation,
getUserByRoleAlias,
getWareByUser,
getWareSelect,
getUserByWare,
saveUserWare,
getAllUser,
saveWareUser,
getMaterialSelect,
} from '@/api/storeManagement/warehouseMaintenance';
export default { export default {
data() { data() {
return { return {
warehouseOption, warehouseOption: {
data: [], columnSort: true,
form: {}, tip: false,
page: { height: 'auto',
total: 0, align: 'center',
current: 1, calcHeight: 32,
size: 10, simplePage: false,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: false,
viewBtn: false,
addBtn: true,
delBtn: true,
editBtn: true,
editBtnIcon: ' ',
delBtnIcon: ' ',
labelWidth: 120,
menu: true,
menuWidth: 120,
dialogWidth: 920,
dialogClickModal: false,
searchEnter: true,
excelBtn: true,
gridBtn: false,
searchShowBtn: false,
showOverflowTooltip: true,
searchLabelPosition: 'left',
searchLabelWidth: 'auto',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
column: [
{
label: '库房编码',
prop: 'shCode',
span: 12,
overflow: true,
search: true,
rules: [
{
required: true,
message: '请输入库房编码',
trigger: 'blur',
},
],
},
{
label: '库房名称',
prop: 'shName',
span: 12,
overflow: true,
search: true,
},
{
label: '类别说明',
prop: 'memo',
span: 12,
overflow: true,
search: false,
},
{
label: '所属工装类型',
prop: 'toolingType',
span: 12,
type: 'select',
overflow: true,
search: true,
dicUrl: '/api/blade-system/dict/dictionary?code=workwear_type',
props: { label: 'dictValue', value: 'dictKey' },
},
{
label: '所属类别',
prop: 'type',
span: 12,
overflow: true,
search: true,
type: 'select',
dicUrl: '/blade-system/dict/dictionary?code=warehouse_category',
props: { label: 'dictValue', value: 'dictKey' },
},
{
label: '库房层级',
prop: 'shLevel',
span: 12,
overflow: true,
search: false,
},
{
label: '保管员',
prop: 'saveUser',
span: 12,
overflow: true,
search: true,
filterable: true,
type: 'select',
dicUrl: '/api/blade-system/user/list-all-by-role-alias?roleAlias=保管员',
props: {
label: 'codeRealName',
value: 'id',
// res: 'data',
}, },
query:{}, },
loading: false, ],
}; },
data: [],
form: {},
page: {
total: 0,
current: 1,
size: 10,
},
query: {},
loading: false,
};
},
mounted() {},
methods: {
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad();
done();
}, },
mounted() { searchReset() {
this.query = {};
this.onLoad();
}, },
methods:{ currentChange(currentPage) {
searchChange(params, done){ this.page.currentPage = currentPage;
this.query = params this.onLoad();
this.page.currentPage = 1; },
this.onLoad() sizeChange(pageSize) {
done() this.page.pageSize = pageSize;
}, this.onLoad();
searchReset(){ },
this.query = {} refreshChange() {
this.onLoad() this.onLoad();
}, },
currentChange(currentPage) { rowDel(row) {
this.page.currentPage = currentPage; this.$confirm('确定删除此条数据?', {
this.onLoad() confirmButtonText: '确定',
}, cancelButtonText: '取消',
sizeChange(pageSize) { type: 'warning',
this.page.pageSize = pageSize; }).then(() => {
this.onLoad() deleteWare({
}, ids: row.id,
refreshChange(){ }).then(res => {
this.onLoad() if (res.data.code == 200) {
}, this.$message.success('删除成功');
rowDel(row) { this.onLoad();
this.$confirm("确定删除此条数据?", { }
confirmButtonText: "确定", });
cancelButtonText: "取消", });
type: "warning", },
}).then(() => { rowSave(row, done, loading) {
deleteWare({ addWare(row)
ids:row.id .then(res => {
}).then(res =>{ if (res.data.code == 200) {
if(res.data.code == 200){ this.$message.success('新增成功');
this.$message.success('删除成功') done();
this.onLoad() this.onLoad();
} }
}) })
}) .catch(() => {
}, // loading()
rowSave(row, done, loading){ done();
addWare(row).then(res =>{ });
if(res.data.code == 200){ },
this.$message.success('新增成功') rowUpdate(row, index, done, loading) {
done() console.log('row', row);
this.onLoad() editWare(row).then(res => {
} if (res.data.code == 200) {
}).catch(() =>{ this.$message.success('修改成功');
// loading() done();
done() this.onLoad();
})
},
rowUpdate(row, index, done, loading) {
console.log('row',row)
editWare(row).then(res =>{
if(res.data.code == 200){
this.$message.success('修改成功')
done()
this.onLoad()
}
})
},
onLoad(){
getWareList({
current:this.page.currentPage,
size:this.page.pageSize,
...this.query
}).then(res =>{
res.data.data.records.map(item =>{
item.type = (item.type || item.type == 0) ? item.type + '' : item.type
item.toolingType = (item.toolingType || item.toolingType == 0) ? item.toolingType + '' : item.toolingType
})
this.data = res.data.data.records
this.page.total = res.data.data.total;
})
} }
} });
},
onLoad() {
getWareList({
current: this.page.currentPage,
size: this.page.pageSize,
...this.query,
}).then(res => {
res.data.data.records.map(item => {
item.type = item.type || item.type == 0 ? item.type + '' : item.type;
item.toolingType =
item.toolingType || item.toolingType == 0 ? item.toolingType + '' : item.toolingType;
});
this.data = res.data.data.records;
this.page.total = res.data.data.total;
});
},
},
}; };
</script> </script>

@ -116,32 +116,6 @@ export default {
search: true, search: true,
type: 'select', type: 'select',
dicUrl:'/api/blade-system/user/list-all-by-role-alias?roleAlias=保管员', dicUrl:'/api/blade-system/user/list-all-by-role-alias?roleAlias=保管员',
// props:{
// label: 'realName',
// value: 'userName',
// },
// }
// dicData: [
// {
// label: '保管员一',
// value: 1
// },
// {
// label: '保管员二',
// value: 2
// },
// {
// label: '保管员三',
// value: 3
// },
// ],
// rules: [
// {
// required: true,
// message: '请输入保管员',
// trigger: 'blur',
// },
// ],
}, },
], ],
'storageSetup': [ 'storageSetup': [
@ -380,27 +354,7 @@ export const warehouseOption = {
type:'select', type:'select',
dicUrl:'/blade-system/dict/dictionary?code=warehouse_category', dicUrl:'/blade-system/dict/dictionary?code=warehouse_category',
props: { label: 'dictValue', value: 'dictKey' }, props: { label: 'dictValue', value: 'dictKey' },
// dicData:[
// {
// label:'类别一',
// value:1
// },
// {
// label:'类别二',
// value:2
// },
// {
// label:'类别三',
// value:3
// },
// ],
// rules: [
// {
// required: true,
// message: '请输入所属类别',
// trigger: 'blur',
// },
// ],
}, },
{ {
label: '库房层级', label: '库房层级',

@ -23,7 +23,7 @@
v-if="isUser == 1" v-if="isUser == 1"
@change="changeUser" @change="changeUser"
> >
<el-option v-for="item in keepList" :key="item.id" :label="item.realName" :value="item.id"> <el-option v-for="item in keepList" :key="item.id" :label="item.codeRealName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<el-select <el-select

@ -52,7 +52,7 @@
<el-option <el-option
v-for="item in keeperList" v-for="item in keeperList"
:key="item.id" :key="item.id"
:label="item.realName" :label="item.codeRealName"
:value="item.id" :value="item.id"
></el-option> ></el-option>
</el-select> </el-select>

@ -47,7 +47,7 @@
<el-option <el-option
v-for="(item, index) in userData" v-for="(item, index) in userData"
:key="item.id" :key="item.id"
:label="`${item.realName}(${item.workNo})`" :label="`${item.codeRealName}`"
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>

@ -36,6 +36,14 @@
:style="{ top: contextMenuTop + 'px', left: contextMenuLeft + 'px' }" :style="{ top: contextMenuTop + 'px', left: contextMenuLeft + 'px' }"
> >
<div class="context-menu"> <div class="context-menu">
<el-button
link
type="primary"
@click="handleCopyNode"
v-if="contextTreeNode && contextTreeNode.level === 2"
>
复制
</el-button>
<el-button <el-button
link link
type="danger" type="danger"
@ -163,7 +171,6 @@
filterable filterable
@change="processChange(scope.row, scope.$index)" @change="processChange(scope.row, scope.$index)"
> >
<el-option <el-option
v-for="(item, index) in processSetOption" v-for="(item, index) in processSetOption"
:key="index" :key="index"
@ -499,6 +506,7 @@ import {
} from '@/api/processManagement/taskProcessing'; } from '@/api/processManagement/taskProcessing';
import { getPqList } from '@/api/qualityManagement/remindRedeem/remindRedeem'; import { getPqList } from '@/api/qualityManagement/remindRedeem/remindRedeem';
import { getDictionary } from '@/api/system/dict'; import { getDictionary } from '@/api/system/dict';
import {craftBatchCopy} from '@/api/processManagement/procepssPlanning';
export default { export default {
name: 'CraftIndex', name: 'CraftIndex',
components: {}, components: {},
@ -981,7 +989,7 @@ export default {
return { return {
...processInfo, ...processInfo,
id: generateId('process', processInfo.id, processInfo.processNo), id: generateId('process', processInfo.id, processInfo.processNo),
label: processInfo.processNo+'-'+processInfo.processName, label: processInfo.processNo + '-' + processInfo.processName,
level: 3, level: 3,
rawData: { rawData: {
processInfo, processInfo,
@ -992,7 +1000,7 @@ export default {
// //
children: (projectList || []).map(project => ({ children: (projectList || []).map(project => ({
id: generateId('project', project.id, project.projectCode), id: generateId('project', project.id, project.projectCode),
label: project.trialNo+'-'+project.projectName || '未知项目', label: project.trialNo + '-' + project.projectName || '未知项目',
level: 4, level: 4,
disabled: true, disabled: true,
rawData: project, rawData: project,
@ -1093,6 +1101,7 @@ export default {
this.contextNodeData = null; this.contextNodeData = null;
this.contextTreeNode = null; this.contextTreeNode = null;
}, },
//
async handleDeleteNode() { async handleDeleteNode() {
if (!this.contextTreeNode) { if (!this.contextTreeNode) {
this.closeContextMenu(); this.closeContextMenu();
@ -1121,6 +1130,39 @@ export default {
this.closeContextMenu(); this.closeContextMenu();
} }
}, },
//
handleCopyNode() {
if (!this.contextTreeNode) {
this.closeContextMenu();
return;
}
const node = this.contextTreeNode;
this.$prompt('请输入零件号', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
// inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
inputErrorMessage: '零件号正确',
})
.then(({ value }) => {
let query = {
craftId: node.data.id,
partCode: value,
};
console.log(9999999, node.data.id);
craftBatchCopy(query).then(res => {
this.$message.success('复制成功');
});
})
.catch(() => {
this.$message({
type: 'info',
message: '取消输入',
});
});
},
// tab // tab
handleClick(value) { handleClick(value) {
@ -1181,7 +1223,7 @@ export default {
_tempId: this.tempId, // _tempId: this.tempId, //
id: null, id: null,
processNo: this.getProcessNo(this.form1.tableData1), processNo: this.getProcessNo(this.form1.tableData1),
isMain:'0' isMain: '0',
}); });
} }
if (this.activeName == '2') { if (this.activeName == '2') {
@ -1195,11 +1237,13 @@ export default {
let trialNo_ = ''; let trialNo_ = '';
if (this.treeNodes.children.length <= 0) { if (this.treeNodes.children.length <= 0) {
trialNo_ = this.treeNodes.processNo; trialNo_ = this.treeNodes.processNo;
}else{ } else {
let projectInfo = this.treeNodes.children.filter(item => item.rawData.projectName.indexOf('尺寸检测')>-1); let projectInfo = this.treeNodes.children.filter(
if(projectInfo.length>0){ item => item.rawData.projectName.indexOf('尺寸检测') > -1
);
if (projectInfo.length > 0) {
trialNo_ = projectInfo[0].rawData.trialNo; trialNo_ = projectInfo[0].rawData.trialNo;
}else{ } else {
trialNo_ = this.treeNodes.processNo; trialNo_ = this.treeNodes.processNo;
} }
} }

@ -116,10 +116,7 @@ export default {
value: 'goodsCode', value: 'goodsCode',
res: 'data.records', res: 'data.records',
}, },
// onChange:(value =>{
// let tmp = value.dic.find(item => item.id == value.value)
// this.form.goodsName = tmp.goodsName
// })
}, },
{ {
label: '物料编码', label: '物料编码',
@ -130,7 +127,7 @@ export default {
span: 8, span: 8,
width: 200, width: 200,
search: false, search: false,
//
rules: [ rules: [
{ {
required: true, required: true,
@ -168,49 +165,7 @@ export default {
], ],
}, },
// {
// label: '',
// prop: 'bsBasicClass',
// type: 'select',
// addDisplay: true,
// editDisplay: true,
// span: 8,
// width: 200,
// search: true,
// rules: [
// {
// required: true,
// message: '',
// trigger: 'click',
// },
// ],
// props: {
// label: 'name',
// value: 'code'
// },
// dicData: [
// {
// "bcId": 49,
// "code": "11",
// "deleted": false,
// "keyValue": 49,
// "memo": "11",
// "name": "bj01",
// "type": 1,
// "updateTime": null
// },
// {
// "bcId": 69,
// "code": "bj02",
// "deleted": false,
// "keyValue": 69,
// "memo": "22",
// "name": "bj02",
// "type": 1,
// "updateTime": null
// }
// ]
// },
{ {
label: '型号/牌号', label: '型号/牌号',
prop: 'materialModel', prop: 'materialModel',
@ -251,13 +206,7 @@ export default {
span: 8, span: 8,
width: 200, width: 200,
search: false, search: false,
// rules: [
// {
// required: true,
// message: '使',
// trigger: 'click',
// },
// ],
}, },
{ {
label: '一级库存', label: '一级库存',
@ -339,15 +288,9 @@ export default {
search: true, search: true,
searchLabelWidth: 60, searchLabelWidth: 60,
remote: true, remote: true,
// rules: [
// {
// required: true,
// message: '',
// trigger: 'click',
// },
// ],
props: { props: {
label: 'realName', label: 'codeRealName',
value: 'id', value: 'id',
res: 'data.records', res: 'data.records',
}, },

@ -128,7 +128,7 @@
<el-option <el-option
v-for="item in userList" v-for="item in userList"
:key="item.id" :key="item.id"
:label="item.realName" :label="item.codeRealName"
:value="item.id" :value="item.id"
></el-option> ></el-option>
</el-select> </el-select>

Loading…
Cancel
Save