Browse Source

【nev-pc】注塑计划暂存

ag_report_nev
安虹睿 1 year ago
parent
commit
27860a4e77
  1. 18
      fe/PC/src/api/wms-api.js
  2. 14
      fe/PC/src/components/tableDrawer/tableDrawer.vue
  3. 33
      fe/PC/src/filters/status.js
  4. 23
      fe/PC/src/utils/primarySearchOption/index.js
  5. 38
      fe/PC/src/utils/tableColumns/index.js
  6. 74
      fe/PC/src/views/materialIssueManage/ZS/IssuePlanZS.vue

18
fe/PC/src/api/wms-api.js

@ -682,6 +682,24 @@ export async function purchaseOrderCloseDetailld(id,detailld) {
})
}
// 注塑计划-获取子物料汇总
export function getInjectioModelPlanSumdetails(data) {
return request({
url: baseURL + 'wms/store/injection-model-plan/get-sumdetails-byNumbers',
method: 'post',
data:data
})
}
// 注塑计划-获取bom
export function getInjectioModelPlanBom(data) {
return request({
url: baseURL + 'wms/store/injection-model-plan/get-bom-by-detail',
method: 'post',
data:data
})
}
// 客户退拆任务-完成 todo
// export async function productionRecycleJobComplete(id) {
// return request({

14
fe/PC/src/components/tableDrawer/tableDrawer.vue

@ -6,6 +6,8 @@
:visible="show"
:direction="direction"
@close="close"
:modal="showModal"
:close-on-press-escape="false"
>
<div class="tableDrawerContent">
<umyTable
@ -14,7 +16,7 @@
:tableColumns="tableColumns"
:selectionTable="selectionTable"
:requiredRules="false"
:setUTableHeight="260"
:setUTableHeight="setUTableHeight"
@sortChange="sortChange"
@handleSelectionChange="handleSelectionChange"
>
@ -43,6 +45,16 @@ export default {
};
},
props:{
setUTableHeight: {
type: Number,
default: () => {
return 20;
}
},
showModal:{
type: Boolean,
default: true,
},
size:{
type: String,
default: "40%",

33
fe/PC/src/filters/status.js

@ -60,6 +60,39 @@ import store from '@/store/index'
return Enum(status, index, prop)
}
//注塑计划申请状态(已过时(红色),执行中(绿色),未开启(橘色),有更新(#21DF4B),完成)
export function planStatus_ZS(index, prop) {
let status = {
1: {
label: "新增",
value: 1,
background:"#45B5F3",
},
5: {
label: "执行中",
value: 5,
background:"#5A7CF3"
},
6: {
label: "已完成",
value: 6,
background:"#31BB99",
},
10: {
label: "有更新",
value: 10,
background:"#21DF4B",
},
11: {
label: "已过时",
value: 11,
background:"#DADADA",
},
}
return Enum(status, index, prop)
}
//任务状态
/**
*

23
fe/PC/src/utils/primarySearchOption/index.js

@ -25,25 +25,6 @@
// ]
export const IssuePlanZS = [
// type == input
{ type: "input", label: "物品编码", prop: "code", action:"Like"},
// type == select 枚举options(filters/status.js)
{ type: "select", label: "状态", prop: "status", options: "itemStatus"},
// type == select 自定义options(使用userOptions参数)
// { type: "select", label: "制造件", prop: 'canMake', userOptions: [
// { "label": "是", id:'1', "value": true, },
// { "label": "不是", id:'2',"value": false,}]
// },
// //type == date
// { type: "date", label: "日期", prop: "date",},
// // type == time
// { type: "time", label: "时间", prop: "time",},
// // type == dateTime
// { type: "dateTime", label: "日期时间", prop: "dateTime",},
// // type == dateTimelimit 选择范围:当前天及以后
// { type: "dateTimelimit", label: "当前天及以后", prop: "dateTimelimit",},
// 其他参数(以上方式通用):
// 1、 value 添加默认值(默认为空),如:value:"111",默认值只为回显数据,不做查询处理
// 如需要查询默认值,请在获取界面数据的paging()中配置
// 2、 noClearable 去掉清除按钮(默认显示清除按钮)
{ type: "input", label: "注塑计划号", prop: "number", action:"Like"},
{ type: "select", label: "状态", prop: "requestStatus", options: "planStatus_ZS"},
]

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

@ -4258,39 +4258,15 @@ export const completDumpNoteZP = [
// 注塑计划
export const IssuePlanZS = [
{
label: _Names.itemCode,
prop: "code",
label: "注塑计划号",
prop: "number",
fixed: "left",
width: orderWidth
},
{ label: _Names.itemName, prop: "name" },
{ label: _Names.itemDesc1, prop: "desc1" },
{ label: _Names.itemDesc2, prop: "desc2" },
{ label: _Public.status, prop: "status", type: "filter", filters: "itemStatus" },
{ label: _Public.type, prop: 'type', type: "filter", filters: "ItemTypeBasic" },
{ label: _Names.abcClass, prop: 'abcClass', type: "filter", filters: "abcClass" },
{ label: _Names.canMake, prop: 'canMake', type: "filter", filters: "whetherOrNot" },
{ label: _Names.canBuy, prop: 'canBuy', type: "filter", filters: "whetherOrNot" },
{ label: _Names.canOutsourcing, prop: 'canOutsourcing', type: "filter", filters: "whetherOrNot" },
{ label: _Names.isRecycled, prop: 'isRecycled', type: "filter", filters: "whetherOrNot" },
{ label: _Names.isPhantom, prop: "isPhantom", type: "filter", filters: "whetherOrNot" },
{ label: _Names.productLine, prop: 'productLine' },
{ label: _Names.elevel, prop: 'elevel' },
{ label: _Names.color, prop: "color" },
// ---------------------------------------
{ label: _Public.creationTime, prop: "creationTime", type: "dateTime" },
{ label: _Public.lastModificationTime, prop: "lastModificationTime", type: "dateTime" },
{ label: _Names.category, prop: "category" },
{ label: _Names.group, prop: "group" },
{ label: _Names.configuration, prop: "configuration" },
{ label: _Names.basicUom, prop: "basicUom" },
{ label: _Names.stdPackQty, prop: "stdPackQty",isNumber:true },
{ label: _Names.project, prop: "project" },
{ label: _Names.version, prop: "version" },
{ label: _Names.eco, prop: "eco" },
{ label: _Names.validity, prop: "validity" },
{ label: _Names.validityUnit, prop: "validityUnit", type: "filter", filters: "validityUnit" },
{ label: _Names.manageType, prop: "manageType", type: "filter", filters: "manageType" },
{ label: _Public.remark, prop: "remark" },
{ label: "计划说明", prop: 'remark',width:"auto" },
{ label: "版本号", prop: 'version' },
{ label: "状态", prop: "requestStatus",type: "tagFilter", filters: "planStatus_ZS",width:"auto" },
{ label: "计划日期", prop: 'planTime', type: "dateTime",width:"auto"},
]
// 人工注塑申请
export const IssueRequestZS = [

74
fe/PC/src/views/materialIssueManage/ZS/IssuePlanZS.vue

@ -78,6 +78,8 @@
></searchPage>
<!-- 总成弹窗 -->
<tableDrawer
v-loading="loading_parent"
:size="'50%'"
:title="currentTitle"
:isShow="isShow_parent"
@setClose="closeDrawer('parent')"
@ -108,7 +110,6 @@
></tableDrawer>
<!-- bom弹窗 -->
<tableDrawer
:size="'30%'"
:title="bomTitle"
:isShow="isShow_bom"
@setClose="closeDrawer('bom')"
@ -118,6 +119,7 @@
</div>
</template>
<script>
import { getDetailed,getInjectioModelPlanBom,getInjectioModelPlanSumdetails } from "@/api/wms-api"
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"
@ -138,7 +140,7 @@ export default {
},
data () {
return {
URL: 'basedata/item-basic',
URL: 'wms/store/injection-model-plan',
//
currenButtonData: [
this.defaultFieldSettingBtn(),//
@ -153,8 +155,8 @@ export default {
isShow_parent:false,
//
tableColumns_parent:[
{ label: "总成号", prop: "number",width:'auto' },
{ label: "数量", prop: "qty",width:'auto' },
{ label: "总成号", prop: "itemCode",width:'auto' },
{ label: "数量", prop: "planQty",width:'auto' },
],
//
tableData_parent:[],
@ -162,8 +164,8 @@ export default {
isShow_son:false,
//
tableColumns_son:[
{ label: "son总成号", prop: "number",width:'auto' },
{ label: "son数量", prop: "qty",width:'auto' },
{ label: "子物料号汇总", prop: "component",width:'auto' },
{ label: "数量", prop: "componentQty",width:'auto' },
],
//
tableData_son:[],
@ -171,11 +173,14 @@ export default {
isShow_bom:false,
// bom
tableColumns_bom:[
{ label: "bom总成号", prop: "number",width:'auto' },
{ label: "bom数量", prop: "qty",width:'auto' },
{ label: "Bom-子物料号", prop: "component",width:'auto' },
{ label: "数量", prop: "componentQty",width:'auto' },
],
// bom
tableData_bom:[],
//
currentParentRow:[],
loading_parent:false,
};
},
mounted () {
@ -187,33 +192,50 @@ export default {
console.log(type,scope)
//
if(type == "parent"){
// todo:
this.currentTitle="parent"
this.tableData_parent = [
{number:'number1',qty:1},
{number:'number2',qty:2},
]
this.currentParentRow = scope.row
this.currentTitle=`注塑计划单号:${this.currentParentRow.number}`
this.Loading.appMainLoading = true
getDetailed(this.currentParentRow.id,this.URL)
.then(res=>{
this.Loading.appMainLoading = false
this.tableData_parent = res.details
this.isShow_parent = true
})
.catch(res=>{
this.Loading.appMainLoading = false
})
}
//
if(type == "son"){
// todo:
this.currentTitle="son"
this.tableData_son = [
{number:'sonnumber1',qty:11},
{number:'sonnumber2',qty:22},
]
this.currentTitle=`注塑计划单号:${scope.row.number}`
this.Loading.appMainLoading = true
getInjectioModelPlanSumdetails([scope.row.number])
.then(res=>{
this.Loading.appMainLoading = false
this.tableData_son = res
this.isShow_son = true
})
.catch(res=>{
this.Loading.appMainLoading = false
})
}
// -bom
if(type == "bom"){
// todo:
this.bomTitle="bom"
this.tableData_bom = [
{number:'bomnumber1',qty:11},
{number:'bomnumber2',qty:22},
]
this.bomTitle="Bom清单"
let _data={
number:this.currentParentRow.number,
itemCode:scope.row.itemCode,
}
this.loading_parent = true
getInjectioModelPlanBom(_data)
.then(res=>{
this.loading_parent = false
this.tableData_bom = res
this.isShow_bom = true
})
.catch(res=>{
this.loading_parent = false
})
}
},
//

Loading…
Cancel
Save