Browse Source

生产计划修改

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

33
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 ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
//
defineOptions({ name: 'ProductionMain' })
@ -100,21 +101,47 @@ const updataTableColumns = (val) => {
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
nextTick(async() => {
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]
} else {
const setV = {}
setV[formField] = val[0][searchField]
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]
}
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
nextTick(async() => {
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]
formRef.setValues(setV)
})

Loading…
Cancel
Save