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. 80
      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 // 客户退拆任务-完成 todo
// export async function productionRecycleJobComplete(id) { // export async function productionRecycleJobComplete(id) {
// return request({ // return request({

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

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

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

@ -60,6 +60,39 @@ import store from '@/store/index'
return Enum(status, index, prop) 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 = [ export const IssuePlanZS = [
// type == input { type: "input", label: "注塑计划号", prop: "number", action:"Like"},
{ type: "input", label: "物品编码", prop: "code", action:"Like"}, { type: "select", label: "状态", prop: "requestStatus", options: "planStatus_ZS"},
// 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 去掉清除按钮(默认显示清除按钮)
] ]

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

@ -4258,39 +4258,15 @@ export const completDumpNoteZP = [
// 注塑计划 // 注塑计划
export const IssuePlanZS = [ export const IssuePlanZS = [
{ {
label: _Names.itemCode, label: "注塑计划号",
prop: "code", prop: "number",
fixed: "left", fixed: "left",
width: orderWidth
}, },
{ label: _Names.itemName, prop: "name" }, { label: "计划说明", prop: 'remark',width:"auto" },
{ label: _Names.itemDesc1, prop: "desc1" }, { label: "版本号", prop: 'version' },
{ label: _Names.itemDesc2, prop: "desc2" }, { label: "状态", prop: "requestStatus",type: "tagFilter", filters: "planStatus_ZS",width:"auto" },
{ label: _Public.status, prop: "status", type: "filter", filters: "itemStatus" }, { label: "计划日期", prop: 'planTime', type: "dateTime",width:"auto"},
{ 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" },
] ]
// 人工注塑申请 // 人工注塑申请
export const IssueRequestZS = [ export const IssueRequestZS = [

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

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