|
|
@ -56,7 +56,6 @@ |
|
|
|
:isBusiness="false" |
|
|
|
:apiUpdate="apiUpdate" |
|
|
|
:apiCreate="apiCreate" |
|
|
|
:masterId="masterId" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
/> |
|
|
|
</div> |
|
|
@ -72,6 +71,7 @@ import * as FileApi from '@/api/wms/file' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' |
|
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import { number } from 'vue-types' |
|
|
|
|
|
|
|
defineOptions({ name: 'Detail' }) |
|
|
|
|
|
|
@ -144,8 +144,13 @@ const props = defineProps({ |
|
|
|
required: false, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
// 回显字段 |
|
|
|
Echo: { |
|
|
|
type: Array, |
|
|
|
required: false, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
}) |
|
|
|
console.log(props.detailAllSchemas); |
|
|
|
const isShowDrawer = ref(false) |
|
|
|
const detailLoading = ref(false) |
|
|
|
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : ''))) |
|
|
@ -177,7 +182,7 @@ const remarksData = reactive({ |
|
|
|
const changeRecordData = reactive({ |
|
|
|
changeRecordList: [] |
|
|
|
}) |
|
|
|
const detailData = ref("")//详情数据 |
|
|
|
const detailData = ref({})//详情数据 |
|
|
|
// 获取附件列表篇 |
|
|
|
const getFileList = async () => { |
|
|
|
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 titleValueRef = ref() |
|
|
@ -221,9 +229,10 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
|
// 加载明细列表 |
|
|
|
if(!props.isBasic) { |
|
|
|
// 设置主表id |
|
|
|
masterId.value = row.id |
|
|
|
masterParmas.value.masterId = row.id |
|
|
|
masterParmas.value.number = row.number |
|
|
|
tableObject.params = { |
|
|
|
masterId: row.id |
|
|
|
masterId: row.id, |
|
|
|
} |
|
|
|
getList() |
|
|
|
} |
|
|
@ -310,7 +319,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
/** 添加/修改操作 */ |
|
|
|
const formRef = ref() |
|
|
|
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) => { |
|
|
@ -319,22 +328,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['ppNumber'] = val[0]['ppNumber'] |
|
|
|
setV['poLine'] = val[0]['poLine'] |
|
|
|
setV['batch'] = val[0]['batch'] |
|
|
|
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'] |
|
|
|
console.log(formField); |
|
|
|
props.Echo.forEach((item)=>{ |
|
|
|
setV[item] = val[0][item] |
|
|
|
}) |
|
|
|
formRef.setValues(setV) |
|
|
|
} |
|
|
|
}) |
|
|
|