Browse Source

生产计划修改

master
李胜楠 1 year ago
parent
commit
3276281511
  1. 31
      src/views/wms/productionManage/productionplan/productionMain/index.vue

31
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -81,6 +81,7 @@ import { ProductionMain,ProductionMainRules,ProductionDetail,ProductionDetailRul
import * as ProductionMainApi from '@/api/wms/productionMain' import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail' import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
// //
defineOptions({ name: 'ProductionMain' }) defineOptions({ name: 'ProductionMain' })
@ -100,21 +101,47 @@ const updataTableColumns = (val) => {
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(async() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
await ItemBasicApi.getItembasicPage({
code: row['itemCode']
}).then(res => {
row['uom'] = res?.list[0].uom
}).catch(err =>{
console.log(err);
})
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} else { } else {
const setV = {} const setV = {}
if(formField == 'workshop'){
setV['workshop'] = val[0]['code']
setV['productionLine'] = ''
if(tableData.value){
tableData.value.forEach(item => {
item.itemCode =''
item.bomVersion = ''
item.uom = ''
})
}
}else{
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
}
formRef.setValues(setV) formRef.setValues(setV)
} }
}) })
} }
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => { nextTick(async() => {
const setV = {} const setV = {}
await ItemBasicApi.getItembasicPage({
code: setV['itemCode']
}).then(res => {
setV['uom'] = res.list[0].uom
}).catch(err =>{
console.log(err);
})
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
}) })

Loading…
Cancel
Save