|
@ -56,7 +56,6 @@ |
|
|
:isBusiness="false" |
|
|
:isBusiness="false" |
|
|
:apiUpdate="apiUpdate" |
|
|
:apiUpdate="apiUpdate" |
|
|
:apiCreate="apiCreate" |
|
|
:apiCreate="apiCreate" |
|
|
:masterId="masterId" |
|
|
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
@ -72,6 +71,7 @@ import * as FileApi from '@/api/wms/file' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' |
|
|
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
|
|
import { number } from 'vue-types' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'Detail' }) |
|
|
defineOptions({ name: 'Detail' }) |
|
|
|
|
|
|
|
@ -144,8 +144,13 @@ const props = defineProps({ |
|
|
required: false, |
|
|
required: false, |
|
|
default: null |
|
|
default: null |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 回显字段 |
|
|
|
|
|
Echo: { |
|
|
|
|
|
type: Array, |
|
|
|
|
|
required: false, |
|
|
|
|
|
default: null |
|
|
|
|
|
}, |
|
|
}) |
|
|
}) |
|
|
console.log(props.detailAllSchemas); |
|
|
|
|
|
const isShowDrawer = ref(false) |
|
|
const isShowDrawer = ref(false) |
|
|
const detailLoading = ref(false) |
|
|
const detailLoading = ref(false) |
|
|
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : ''))) |
|
|
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : ''))) |
|
@ -177,7 +182,7 @@ const remarksData = reactive({ |
|
|
const changeRecordData = reactive({ |
|
|
const changeRecordData = reactive({ |
|
|
changeRecordList: [] |
|
|
changeRecordList: [] |
|
|
}) |
|
|
}) |
|
|
const detailData = ref("")//详情数据 |
|
|
const detailData = ref({})//详情数据 |
|
|
// 获取附件列表篇 |
|
|
// 获取附件列表篇 |
|
|
const getFileList = async () => { |
|
|
const getFileList = async () => { |
|
|
detailLoading.value = true |
|
|
detailLoading.value = true |
|
@ -207,7 +212,10 @@ const change = (item, index) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const masterId=ref('')//主表id |
|
|
const masterParmas=ref({ |
|
|
|
|
|
masterId:'',//主表id |
|
|
|
|
|
number: '',//主表单据号 |
|
|
|
|
|
})//主表所需的参数 |
|
|
/** 打开弹窗 */ |
|
|
/** 打开弹窗 */ |
|
|
const titleNameRef = ref() |
|
|
const titleNameRef = ref() |
|
|
const titleValueRef = ref() |
|
|
const titleValueRef = ref() |
|
@ -221,9 +229,10 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
// 加载明细列表 |
|
|
// 加载明细列表 |
|
|
if(!props.isBasic) { |
|
|
if(!props.isBasic) { |
|
|
// 设置主表id |
|
|
// 设置主表id |
|
|
masterId.value = row.id |
|
|
masterParmas.value.masterId = row.id |
|
|
|
|
|
masterParmas.value.number = row.number |
|
|
tableObject.params = { |
|
|
tableObject.params = { |
|
|
masterId: row.id |
|
|
masterId: row.id, |
|
|
} |
|
|
} |
|
|
getList() |
|
|
getList() |
|
|
} |
|
|
} |
|
@ -310,7 +319,7 @@ const buttonTableClick = async (val, row) => { |
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const openForm = async (type: string, row?: number) => { |
|
|
const openForm = async (type: string, row?: number) => { |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row, masterParmas.value) |
|
|
} |
|
|
} |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
@ -319,22 +328,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
} else { |
|
|
} else { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
setV['ppNumber'] = val[0]['ppNumber'] |
|
|
console.log(formField); |
|
|
setV['poLine'] = val[0]['poLine'] |
|
|
props.Echo.forEach((item)=>{ |
|
|
setV['batch'] = val[0]['batch'] |
|
|
setV[item] = val[0][item] |
|
|
setV['altBatch'] = val[0]['altBatch'] |
|
|
}) |
|
|
setV['reason'] = val[0]['reason'] |
|
|
|
|
|
setV['singlePrice'] = val[0]['singlePrice'] |
|
|
|
|
|
setV['amount'] = val[0]['amount'] |
|
|
|
|
|
setV['number'] = val[0]['number'] |
|
|
|
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
|
|
|
setV['itemName'] = val[0]['itemName'] |
|
|
|
|
|
setV['itemDesc1'] = val[0]['itemDesc1'] |
|
|
|
|
|
setV['itemDesc2'] = val[0]['itemDesc2'] |
|
|
|
|
|
setV['projectCode'] = val[0]['projectCode'] |
|
|
|
|
|
setV['qty'] = val[0]['qty'] |
|
|
|
|
|
setV['uom'] = val[0]['uom'] |
|
|
|
|
|
setV['remark'] = val[0]['remark'] |
|
|
|
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|