Browse Source

【Nev-pc】生产线零件关系

ag_report_nev
安虹睿 1 year ago
parent
commit
56512db81f
  1. 7
      fe/PC/src/components/currenDescriptions/index.vue
  2. 13
      fe/PC/src/components/filterSelect/index.vue
  3. 21
      fe/PC/src/components/umyTable/index.vue
  4. 13
      fe/PC/src/utils/tableColumns/index.js
  5. 16
      fe/PC/src/utils/tabsDesTions/index.js
  6. 123
      fe/PC/src/views/basicData/WorkshopManage/ProdLineItem.vue

7
fe/PC/src/components/currenDescriptions/index.vue

@ -23,7 +23,10 @@
<span v-else-if="item.type && item.type == 'objectDateTime'">{{ <span v-else-if="item.type && item.type == 'objectDateTime'">{{
propsData[item.prop]?propsData[item.prop][item.showProp]:"" | formatDate propsData[item.prop]?propsData[item.prop][item.showProp]:"" | formatDate
}}</span> }}</span>
<span v-if="item.type == 'price'"> <span v-else-if="item.type == 'json'">
{{ propsData[item.prop] ? JSON.parse(propsData[item.prop]).join(",") : '' }}
</span>
<span v-else-if="item.type == 'price'">
{{ (propsData[item.prop]).toFixed(item.pointe || 2) }} {{ (propsData[item.prop]).toFixed(item.pointe || 2) }}
</span> </span>
<span v-else-if="item.type && item.type == 'object'"> <span v-else-if="item.type && item.type == 'object'">
@ -163,6 +166,6 @@ export default {
} }
} }
} },
} }
</script> </script>

13
fe/PC/src/components/filterSelect/index.vue

@ -95,13 +95,16 @@ export default {
}, },
methods: { methods: {
changeHandle(value){ changeHandle(value){
if(!value[0] || value[0].length <= 0)return
let _options = JSON.parse(JSON.stringify(this.selectItem)) let _options = JSON.parse(JSON.stringify(this.selectItem))
let _item = {} let _item = {}
let _prop = this.selectItem.optionsValue || this.selectItem.prop if(value[0] && value[0].length > 0){
this.options.forEach(item=>{ let _prop = this.selectItem.optionsValue || this.selectItem.prop
if(item[_prop] == value[0])_item = item if(this.options){
}) this.options.forEach(item=>{
if(item[_prop] == value[0])_item = item
})
}
}
this.$emit("filterOptionSelectHandle",_item,_options,value[0]) this.$emit("filterOptionSelectHandle",_item,_options,value[0])
}, },
isRemoteReset(){ isRemoteReset(){

21
fe/PC/src/components/umyTable/index.vue

@ -316,11 +316,13 @@
<!-- 可点出详情 --> <!-- 可点出详情 -->
<span <span
v-if="item.type == 'showDetail'" v-if="item.type == 'showDetail'"
@click="showDetailInfo(scope.row[item.prop])" @click="showDetailInfo(scope.row[item.prop],item)"
style="cursor: pointer;" style="cursor: pointer;"
:title="'点击查看详情'" :title="'点击查看详情'"
:class="{ showDetailHover: item.type == 'showDetail' }" :class="{ showDetailHover: item.type == 'showDetail' }"
>{{ scope.row[item.prop] ? scope.row[item.prop] + "" : scope.row[item.prop] }}</span> >
{{initShowDetailStr(scope,item,scope.row[item.prop])}}
</span>
<!-- 可点出json转换的table弹窗 --> <!-- 可点出json转换的table弹窗 -->
<span <span
v-if="item.type == 'showJsonTable'" v-if="item.type == 'showJsonTable'"
@ -798,11 +800,24 @@ export default {
this.$emit("inlineDialog", row); this.$emit("inlineDialog", row);
}, },
// //
showDetailInfo(row) { showDetailInfo(row,item) {
this.showDetailDialog = true this.showDetailDialog = true
this.showDetailData = row this.showDetailData = row
if(item.isJson && row){
this.showDetailData = JSON.parse(row).join(",")
}
this.$emit("showDetailInfo", row); this.$emit("showDetailInfo", row);
}, },
initShowDetailStr(scope,item,data){
if(!item.isJson){
return scope.row[item.prop] ? scope.row[item.prop] + "" : scope.row[item.prop]
}else{
if(scope.row[item.prop]){
let _arr = JSON.parse(scope.row[item.prop])
return _arr.join(",")
}
}
},
// jsontable // jsontable
showJsonTable(row){ showJsonTable(row){
this.showJsonDialog = true this.showJsonDialog = true

13
fe/PC/src/utils/tableColumns/index.js

@ -743,17 +743,16 @@ export const ProductionLine = [
// 生产线零件关系 20230328 // 生产线零件关系 20230328
export const ProductionLineItem = [ export const ProductionLineItem = [
{ label: "物品代码", prop: "itemCode", type: "name" }, { label: "物品代码", prop: "itemCode", type: "name" },
{ label: "物品名称", prop: "itemName" },
{ label: "物品描述1", prop: "itemDesc1" },
{ label: "物品描述2", prop: "itemDesc2" },
{ label: "生产线代码", prop: "prodLineCode" }, { label: "生产线代码", prop: "prodLineCode" },
{ label: "完工库位列表", prop: "productLocationCodeListJson", type:"showDetail", isJson:true},
{ label: "原材料库位列表", prop: "rawLocationCodeListJson", type:"showDetail", isJson:true },
{ label: "线边库位列表", prop: "wipLocationCodeListJson", type:"showDetail", isJson:true },
{ label: "备注", prop: "remark" }, { label: "备注", prop: "remark" },
{ label: "创建时间", prop: "creationTime", type: "dateTime" }, { label: "创建时间", prop: "creationTime", type: "dateTime" },
{ label: "上次修改时间", prop: 'lastModificationTime', type: "dateTime" }, { label: "上次修改时间", prop: 'lastModificationTime', type: "dateTime" },
// {
// label: "操作",
// type:"buttonOperation",
// buttonText:'删除',
// buttonName:'delete',
// fixed: "right"
// },
] ]
// 工作中心信息 20230328 // 工作中心信息 20230328
export const WorkCenter = [ export const WorkCenter = [

16
fe/PC/src/utils/tabsDesTions/index.js

@ -555,16 +555,16 @@ export const ProductionLine = [
// 生产线零件关系 20230328 // 生产线零件关系 20230328
export const ProductionLineItem = [ export const ProductionLineItem = [
{ label: "物品代码", prop: "itemCode" }, { label: "物品代码", prop: "itemCode" },
{ label: "物品名称", prop: "itemName" },
{ label: "物品描述1", prop: "itemDesc1" },
{ label: "物品描述2", prop: "itemDesc2" },
{ label: "生产线代码", prop: "prodLineCode" }, { label: "生产线代码", prop: "prodLineCode" },
{ label: "完工库位列表", prop: "productLocationCodeListJson", type:"json" },
{ label: "原材料库位列表", prop: "rawLocationCodeListJson", type:"json" },
{ label: "线边库位列表", prop: "wipLocationCodeListJson", type:"json" },
{ label: "备注", prop: "remark" }, { label: "备注", prop: "remark" },
{ label: "事务ID", prop: "tenantId" }, { label: "创建时间", prop: "creationTime", type: "dateTime" },
{ label: "创建时间", prop: "creationTime", type:'dateTime' }, { label: "上次修改时间", prop: 'lastModificationTime', type: "dateTime" },
{ label: "创建者ID", prop: "creatorId" },
{ label: "上次修改时间", prop: "lastModificationTime", type:'dateTime' },
{ label: "上次修改者ID", prop: "lastModifierId" },
// ************** 确认隐藏 ************************
// { label: "ID", prop: 'id' },
// ************** 确认隐藏 ************************
] ]
// 工作中心信息 20230328 // 工作中心信息 20230328
export const WorkCenter = [ export const WorkCenter = [

123
fe/PC/src/views/basicData/WorkshopManage/ProdLineItem.vue

@ -38,8 +38,10 @@
:Options="editOptions" :Options="editOptions"
:Handle="editHandle" :Handle="editHandle"
:Rules="formReveal ? editRules.cerateRule : editRules.editRule" :Rules="formReveal ? editRules.cerateRule : editRules.editRule"
@FormSubmit="FormSubmit" @FormSubmit="FormSubmitHandle"
@close="FormClose" @close="FormClose"
@push="push"
@clear="clear"
@goBack="goBack" @goBack="goBack"
></newAndEdiDialog> ></newAndEdiDialog>
<!-- 搜索按钮窗体组件 --> <!-- 搜索按钮窗体组件 -->
@ -57,7 +59,8 @@
@handleSelectionChange="prepareFormData" @handleSelectionChange="prepareFormData"
@SizeChange="searchAlterResultCount($event, searchPageListParams)" @SizeChange="searchAlterResultCount($event, searchPageListParams)"
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" @CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)"
@tableButtonClick="searchSubmit(arguments)" @tableButtonClick="searchSubmit(arguments,searchColumns)"
:isMoreSelectTable="true"
></searchPage> ></searchPage>
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用--> <!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用-->
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 --> <!-- methodValue 导入方式默认选项 是否局部导入 默认选项 -->
@ -80,7 +83,7 @@
:propsData="propsData" :propsData="propsData"
:tabsDesTions="tabsDesTions" :tabsDesTions="tabsDesTions"
@drawerShut="(val) => (displayDialog.detailsDialog = val)" @drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton" @drawerbutton="drawerbuttonHandle"
@handleCommand="drawerHandle" @handleCommand="drawerHandle"
@close-value="closeValue" @close-value="closeValue"
></curren-Drawer> ></curren-Drawer>
@ -127,9 +130,17 @@ export default {
], ],
// //
CreateFormData: { CreateFormData: {
remark: "", prodLineCode:null,
prodLineCode: "", itemCode:null,
itemCode: "", itemName:null,
itemDesc1:null,
itemDesc2:null,
productLocationCodeListJson:null,
productLocationCodeListJson_show:[],
rawLocationCodeListJson:null,
rawLocationCodeListJson_show:[],
wipLocationCodeListJson:null,
wipLocationCodeListJson_show:[],
// bomId: "", // bomId: "",
// routingId: "3fa85f64-5717-4562-b3fc-2c963f66afa6", // routingId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// enabled: true, // enabled: true,
@ -137,32 +148,78 @@ export default {
// company: "", // company: "",
// prodLineId: "", // prodLineId: "",
// itemId: "" // itemId: ""
remark: "",
}, },
// //
editFormData: { editFormData: {
prodLineCode:null,
itemCode:null,
itemName:null,
itemDesc1:null,
itemDesc2:null,
productLocationCodeListJson:null,
productLocationCodeListJson_show:[],
rawLocationCodeListJson:null,
rawLocationCodeListJson_show:[],
wipLocationCodeListJson:null,
wipLocationCodeListJson_show:[],
remark: "", remark: "",
itemCode: "",
prodLineCode: "",
}, },
editOptions: { editOptions: {
type: [] type: []
}, },
CreateForm: [ CreateForm: [
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.CreateFormData) }, colSpan: 12 },
{ type: "filterSelect", label: "生产线代码", prop: "prodLineCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "生产线代码", prop: "prodLineCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/productionLine")}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/productionLine")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/productionLine', 'ProductionLine', '生产线选择', this.CreateFormData) }, colSpan: 12 }, searchButton: (val) => { this.showSerarchPage(val, 'basedata/productionLine', 'ProductionLine', '生产线选择', this.CreateFormData) }, colSpan: 12 },
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.CreateFormData) }, colSpan: 12 },
{ label: "物料名称", prop: 'itemName', type:"input", disabled:true, colSpan: 12 },
{ label: "物料描述1", prop: 'itemDesc1', type:"input", disabled:true, colSpan: 12 },
{ label: "物料描述2", prop: 'itemDesc2', type:"input", disabled:true, colSpan: 12 },
{ type: "filterSelect", label: "完工库位列表", prop: "productLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"2"}]
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData)}, //,[{logic:"And",column:"type",action:"==",value:"2"}]
colSpan: 12,multiple:true
},
{ type: "filterSelect", label: "原材料库位列表", prop: "rawLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"2"}]
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData)}, //,[{logic:"And",column:"type",action:"==",value:"2"}]
colSpan: 12,multiple:true
},
{ type: "filterSelect", label: "线边库位列表", prop: "wipLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"2"}]
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData)}, //,[{logic:"And",column:"type",action:"==",value:"2"}]
colSpan: 12,multiple:true
},
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 }, { type: "input", label: "备注", prop: 'remark', colSpan: 12 },
], ],
editForm: [ editForm: [
{ type: "filterSelect", label: "生产线代码",disabled:true, prop: "prodLineCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/productionLine")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/productionLine', 'ProductionLine', '生产线选择', this.editFormData) }, colSpan: 12 },
{ type: "filterSelect", label: "物品代码",disabled:true, prop: "itemCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "物品代码",disabled:true, prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.editFormData) }, colSpan: 12 }, searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.editFormData) }, colSpan: 12 },
{ type: "filterSelect", label: "生产线代码", prop: "prodLineCode", optionsLabel: "name", optionsValue: "code", { label: "物料名称", prop: 'itemName', type:"input", disabled:true, colSpan: 12 },
focus: (type,val) => { return this.getFilterList(type, val, "basedata/productionLine")}, { label: "物料描述1", prop: 'itemDesc1', type:"input", disabled:true, colSpan: 12 },
searchButton: (val) => { this.showSerarchPage(val, 'basedata/productionLine', 'ProductionLine', '生产线选择', this.editFormData) }, colSpan: 12 }, { label: "物料描述2", prop: 'itemDesc2', type:"input", disabled:true, colSpan: 12 },
{ type: "filterSelect", label: "完工库位列表", prop: "productLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"2"}]
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData)}, //,[{logic:"And",column:"type",action:"==",value:"2"}]
colSpan: 12,multiple:true
},
{ type: "filterSelect", label: "原材料库位列表", prop: "rawLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"2"}]
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData)}, //,[{logic:"And",column:"type",action:"==",value:"2"}]
colSpan: 12,multiple:true
},
{ type: "filterSelect", label: "线边库位列表", prop: "wipLocationCodeListJson_show", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},//,[{logic:"And",column:"type",action:"==",value:"2"}]
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData)}, //,[{logic:"And",column:"type",action:"==",value:"2"}]
colSpan: 12,multiple:true
},
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 }, { type: "input", label: "备注", prop: 'remark', colSpan: 12 },
], ],
editRules: { editRules: {
@ -180,6 +237,44 @@ export default {
mounted () { mounted () {
this.paging(); this.paging();
}, },
methods:{
//
drawerbuttonHandle(val){
if(val == "edit"){
this.propsData.productLocationCodeListJson_show = JSON.parse(this.propsData.productLocationCodeListJson)
this.propsData.rawLocationCodeListJson_show = JSON.parse(this.propsData.rawLocationCodeListJson)
this.propsData.wipLocationCodeListJson_show = JSON.parse(this.propsData.wipLocationCodeListJson)
}
this.drawerbutton(val)
},
push(data){
if(data[1].prop == "itemCode" && this.formReveal){
this.CreateFormData.itemName = data[0].name
this.CreateFormData.itemDesc1 = data[0].desc1
this.CreateFormData.itemDesc2 = data[0].desc2
}
},
clear(data){
if(data[0].prop == "itemCode" && this.formReveal){
this.CreateFormData.itemName = null
this.CreateFormData.itemDesc1 = null
this.CreateFormData.itemDesc2 = null
}
},
//
FormSubmitHandle(val){
if(this.formReveal){
this.CreateFormData.productLocationCodeListJson = JSON.stringify(this.CreateFormData.productLocationCodeListJson_show)
this.CreateFormData.rawLocationCodeListJson = JSON.stringify(this.CreateFormData.rawLocationCodeListJson_show)
this.CreateFormData.wipLocationCodeListJson = JSON.stringify(this.CreateFormData.wipLocationCodeListJson_show)
}else{
this.editFormData.productLocationCodeListJson = JSON.stringify(this.editFormData.productLocationCodeListJson_show)
this.editFormData.rawLocationCodeListJson = JSON.stringify(this.editFormData.rawLocationCodeListJson_show)
this.editFormData.wipLocationCodeListJson = JSON.stringify(this.editFormData.wipLocationCodeListJson_show)
}
this.FormSubmit(val)
}
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

Loading…
Cancel
Save