Browse Source

制品拆解,返修,报废修改

master
zhaoxuebing 9 months ago
parent
commit
f0af527afe
  1. 16
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  2. 7
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts
  3. 15
      src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue
  4. 7
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  5. 22
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  6. 54
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

16
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

@ -133,6 +133,7 @@ const buttondataTable = ref([{
const DialogTitle = ref('Bom信息')
const bomModelVisible = ref(false)
const tableListBom = ref()
const detailQty = ref()
const lsBomSave = ref()
const rowId = ref()
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
@ -140,6 +141,7 @@ const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useT
})
const { getList:getDetailListBom } = detatableMethodsBom
/** bom 列表 表单 按钮 */
const mainStatus = ref()
const ButttondataBom = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
@ -151,7 +153,7 @@ const buttonBaseClickBom = async (val) => {
// bom
let flag = false;
detatableDataBom.tableList.forEach((item) => {
if(item.qty!=0 && item.bomQty < item.qty){
if(item.qty!=0 && (item.bomQty * detailQty.value < item.qty)){
flag = true;
return;
}
@ -160,7 +162,7 @@ const buttonBaseClickBom = async (val) => {
message.warning('数量需要小于Bom数量!')
return
}
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && item.bomQty >= item.qty))
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && item.bomQty * detailQty.value >= item.qty))
if (lsBomSave.value) {
//
tableData.value.forEach((item, index) => {
@ -190,6 +192,7 @@ const buttonOperationClick = async (row, label, index)=> {
detatableDataBom.params.bomVersion = row.bomVersion
detatableDataBom.params.masterId = ''
DialogTitle.value = '物品代码:【' + row.itemCode + '】 Bom 信息'
detailQty.value = row.qty
bomModelVisible.value = true
await getDetailListBom()
// console.log(183, detatableDataBom.tableList)
@ -208,6 +211,8 @@ const buttonOperationClick = async (row, label, index)=> {
item.qty = itemChild.qty
}
})
}else {
item.qty = item.bomQty * row.qty
}
})
}
@ -223,6 +228,7 @@ const tableFormButton = async (val , row) => {
masterId: row.id
}
rowId.value = row.id
detailQty.value = row.qty
await getDetailListBom()
}
}
@ -398,12 +404,16 @@ const openForm =async (type: string, row?: number) => {
tableData.value = [] //
// / Detailb
lsBomSave.value = true
mainStatus.value = '1'
ButttondataBom.value = [
defaultButtons.formSaveBtn({ hide : mainStatus.value != 1 }), //
defaultButtons.formCloseBtn(null) //
]
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const mainStatus = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
lsBomSave.value = false
mainStatus.value = row.status;

7
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

@ -1227,6 +1227,13 @@ export const BomDismantle = useCrudSchemas(reactive<CrudSchema[]>([
precision: 6
}
},
{
label: 'Bom版本',
field: 'version',
tableForm:{
disabled: true
}
},
{
label: '数量',
field: 'qty',

15
src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

@ -139,6 +139,7 @@ const DialogTitle = ref('Bom信息')
const bomModelVisible = ref(false)
const tableListBom = ref()
const lsBomSave = ref()
const detailQty = ref()
const rowId = ref()
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: BomDismantleApi.getBomDismantlePage
@ -157,7 +158,7 @@ const buttonBaseClickBom = (val) => {
//
let flag = false;
detatableDataBom.tableList.forEach((item) => {
if(item.qty!=0 && item.bomQty < item.qty){
if(item.qty!=0 && (item.bomQty * detailQty.value < item.qty)){
flag = true;
return;
}
@ -166,7 +167,7 @@ const buttonBaseClickBom = (val) => {
message.warning('数量需要小于Bom数量!')
return
}
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && item.bomQty >= item.qty))
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && (item.bomQty * detailQty.value >= item.qty)))
if(lsBomSave.value){
tableData.value.forEach((item, index) => {
if(tableListBom.value[0].rowId == index) {
@ -192,7 +193,9 @@ const buttonOperationClick = async (row, label, index)=> {
return
}
detatableDataBom.params.itemCode = row.itemCode
detatableDataBom.params.bomVersion = row.bomVersion
DialogTitle.value = '物品代码:【' + row.itemCode + '】 Bom 信息'
detailQty.value = row.qty
bomModelVisible.value = true
await getDetailListBom()
detatableDataBom.tableList.map(item => {
@ -203,6 +206,8 @@ const buttonOperationClick = async (row, label, index)=> {
item.qty = itemChild.qty
}
})
}else {
item.qty = item.bomQty * row.qty
}
})
}
@ -429,6 +434,11 @@ const openForm =async (type: string, row?: number) => {
tableData.value = [] //
detatableDataBom.params = []; // Bom
lsBomSave.value = true
mainStatus.value = '1'
ButttondataBom.value = [
defaultButtons.formSaveBtn({ hide : mainStatus.value != 1 }), //
defaultButtons.formCloseBtn(null) //
]
formRef.value.open(type, row)
}
@ -567,6 +577,7 @@ const tableFormButton = async (val , row) => {
bomVersion: row.bomVersion,
masterId: row.id
}
detailQty.value = row.qty
rowId.value = row.id
await getDetailListBom()
}

7
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

@ -1162,6 +1162,13 @@ export const BomDismantle = useCrudSchemas(reactive<CrudSchema[]>([
precision: 6
}
},
{
label: 'Bom版本',
field: 'bomVersion',
tableForm:{
disabled: true
}
},
{
label: '数量',
field: 'qty',

22
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -140,6 +140,7 @@ const bomModelVisible = ref(false)
const tableListBom = ref()
const lsBomSave = ref()
const rowId = ref()
const detailQty = ref()
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: BomDismantleApi.getProductscrapBomDismantlePage
})
@ -156,7 +157,7 @@ const buttonBaseClickBom = (val) => {
//
let flag = false;
detatableDataBom.tableList.forEach((item) => {
if(item.qty!=0 && item.bomQty < item.qty){
if(item.qty!=0 && (item.bomQty * detailQty.value < item.qty)){
flag = true;
return;
}
@ -165,7 +166,7 @@ const buttonBaseClickBom = (val) => {
message.warning('数量需要小于Bom数量!')
return
}
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && item.bomQty >= item.qty))
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && (item.bomQty * detailQty.value >= item.qty)))
if (lsBomSave.value) {
tableData.value.forEach((item, index) => {
if(tableListBom.value[0].rowId == index) {
@ -193,10 +194,12 @@ const buttonOperationClick = async (row, label, index)=> {
return
}
detatableDataBom.params.itemCode = row.itemCode
detatableDataBom.params.bomVersion = row.bomVersion
DialogTitle.value = '物品代码:【' + row.itemCode + '】 Bom 信息'
detailQty.value = row.qty
bomModelVisible.value = true
await getDetailListBom()
detatableDataBom.tableList.map(item => {
detatableDataBom.tableList.forEach(item => {
item.rowId = index
if(tableData.value[index].childList) {
tableData.value[index].childList.forEach(itemChild => {
@ -204,6 +207,8 @@ const buttonOperationClick = async (row, label, index)=> {
item.qty = itemChild.qty
}
})
}else {
item.qty = item.bomQty * row.qty
}
})
}
@ -219,6 +224,7 @@ const tableFormButton = async (val , row) => {
masterId: row.id
}
rowId.value = row.id
detailQty.value = row.qty
await getDetailListBom()
}
}
@ -242,7 +248,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['processCode'] = val[0]['code']
}else if(formField == 'itemCode'){
row['itemCode'] = val[0]['itemCode']
}else if(formField == 'bomVersion'){
row['bomVersion'] = val[0]['version']
}
} else {
const setV = {}
@ -266,6 +273,8 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['processCode'] = val[0]['code']
}else if(formField == 'itemCode'){
setV['itemCode'] = val[0]['itemCode']
}else if(formField == 'bomVersion'){
setV['bomVersion'] = val[0]['version']
}
formRef.setValues(setV)
})
@ -432,6 +441,11 @@ const openForm =async (type: string, row?: number) => {
tableData.value = [] //
detatableDataBom.params = []; // Bom
lsBomSave.value = true
mainStatus.value = '1'
ButttondataBom.value = [
defaultButtons.formSaveBtn({ hide : mainStatus.value != 1 }), //
defaultButtons.formCloseBtn(null) //
]
formRef.value.open(type, row)
}

54
src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

@ -36,6 +36,8 @@ import {Process} from "@/views/wms/basicDataManage/factoryModeling/process/proce
import * as ProcessApi from "@/api/wms/process";
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data";
import * as BomApi from "@/api/wms/bom";
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
@ -908,6 +910,51 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false,
isForm: false
},
{
label: 'Bom版本',
field: 'bomVersion',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'version', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'version', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
},
{
label: '操作',
field: 'action',
@ -977,6 +1024,13 @@ export const ProdcutscrapBomDismantle = useCrudSchemas(reactive<CrudSchema[]>([
precision: 6
}
},
{
label: 'Bom版本',
field: 'bomVersion',
tableForm:{
disabled: true
}
},
{
label: '数量',
field: 'qty',

Loading…
Cancel
Save