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"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
@detailOpenForm="detailOpenForm"
:detailValidate="detailValidate"
/>
@ -128,6 +129,7 @@ const updataTableColumns = (val) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
console.log("EEEEEEE",val[0])
//
row[formField] = val[0][searchField]
row['supplierCode'] = val[0]['supplierCode']
@ -166,6 +168,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['singlePrice'] = val[0]['singlePrice']
row['amount'] = val[0]['amount']
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 {
const setV = {}
if(formField == 'purchaseReceiptRecordNumber'){
@ -431,7 +443,9 @@ const openForm = async (type: string, row?: number) => {
/** 详情操作 */
const detailRef = ref()
const purchaseReceiptRecordNumberRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
purchaseReceiptRecordNumberRef.value = row.purchaseReceiptRecordNumber;
detailRef.value.openDetail(row, titleName, titleValue,'requestPurchasereturnMain')
}
@ -653,6 +667,33 @@ const searchFormClick = (searchData) => {
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 () => {
getList()

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

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

Loading…
Cancel
Save