Browse Source

修改明细新增选择方式

master
zhaoxuebing 10 months ago
parent
commit
71823baebd
  1. 41
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  2. 1
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

41
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -77,6 +77,7 @@
:apiDelete="PurchasereturnRequestDetailApi.deletePurchasereturnRequestDetail" :apiDelete="PurchasereturnRequestDetailApi.deletePurchasereturnRequestDetail"
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
@detailOpenForm="detailOpenForm"
:detailValidate="detailValidate" :detailValidate="detailValidate"
/> />
@ -128,6 +129,7 @@ const updataTableColumns = (val) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
console.log("EEEEEEE",val[0])
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
row['supplierCode'] = val[0]['supplierCode'] row['supplierCode'] = val[0]['supplierCode']
@ -166,6 +168,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['singlePrice'] = val[0]['singlePrice'] row['singlePrice'] = val[0]['singlePrice']
row['amount'] = val[0]['amount'] row['amount'] = val[0]['amount']
row['projectCode'] = val[0]['projectCode'] row['projectCode'] = val[0]['projectCode']
if(formField == 'itemCode'){
row['batch'] = val[0]['toBatch']
row['packingNumber'] = val[0]['toPackingNumber']
row['containerNumber'] = val[0]['toContainerNumber']
row['containerNumber'] = val[0]['containerNumber']
row['containerNumber'] = val[0]['containerNumber']
row['fromLocationCode'] = val[0]['fromLocationCode']
row['toLocationCode'] = val[0]['toLocationCode']
}
} else { } else {
const setV = {} const setV = {}
if(formField == 'purchaseReceiptRecordNumber'){ if(formField == 'purchaseReceiptRecordNumber'){
@ -431,7 +443,9 @@ const openForm = async (type: string, row?: number) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const purchaseReceiptRecordNumberRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
purchaseReceiptRecordNumberRef.value = row.purchaseReceiptRecordNumber;
detailRef.value.openDetail(row, titleName, titleValue,'requestPurchasereturnMain') detailRef.value.openDetail(row, titleName, titleValue,'requestPurchasereturnMain')
} }
@ -653,6 +667,33 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
const detailOpenForm = (type, row) =>{
console.log("type",type);
console.log("row",row);
console.log("AAAAAA",purchaseReceiptRecordNumberRef.value);
PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => {
if(purchaseReceiptRecordNumberRef.value == ''){
if (item.field == 'itemCode') {
item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = true
}
if(item.field == 'poLine'){
item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = false
}
}else{
if (item.field == 'itemCode') {
item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = false
}
if(item.field == 'poLine'){
item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = true
}
}
})
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

1
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -553,6 +553,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
disabled:true,
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择订单行', searchListPlaceholder: '请选择订单行',
searchField: 'poLine', searchField: 'poLine',

Loading…
Cancel
Save