|
@ -56,6 +56,7 @@ |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@submitForm="submitForm" |
|
|
@submitForm="submitForm" |
|
|
@formFormDateChange="formFormDateChange" |
|
|
@formFormDateChange="formFormDateChange" |
|
|
|
|
|
@onEnter="onEnter" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
@ -115,6 +116,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import * as SupplieritemApi from '@/api/wms/supplieritem' |
|
|
import * as SupplieritemApi from '@/api/wms/supplieritem' |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
|
|
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' |
|
|
|
|
|
import { PurchaseDetail } from '../../supplierdeliver/purchaseMain/purchaseMain.data' |
|
|
|
|
|
|
|
|
// 采购收货申请 |
|
|
// 采购收货申请 |
|
|
defineOptions({ name: 'PurchasereceiptRequestMain' }) |
|
|
defineOptions({ name: 'PurchasereceiptRequestMain' }) |
|
@ -147,17 +150,23 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
} else if(formField == 'poNumber') { |
|
|
} else if(formField == 'poNumber') { |
|
|
row['poNumber'] = val[0]['number'] |
|
|
row['poNumber'] = val[0]['number'] |
|
|
} else if(formField == 'poLine'){ |
|
|
} else if(formField == 'poLine'){ |
|
|
row['poLine'] = val[0]['lineNumber'] |
|
|
//添加费用明细--点击确定 |
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
val.forEach(item=>{ |
|
|
row['uom'] = val[0]['uom'] |
|
|
if(tableData.value.find(item1=>item1['id'] == item['id'])) return |
|
|
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row})) |
|
|
|
|
|
newRow['poLine'] = item['lineNumber'] |
|
|
|
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
|
|
|
newRow['uom'] = item['uom'] |
|
|
|
|
|
newRow['poNumber'] = item['number'] |
|
|
let supplierCode = formRef.formModel.supplierCode; |
|
|
let supplierCode = formRef.formModel.supplierCode; |
|
|
let itemCode = val[0]['itemCode'] |
|
|
|
|
|
let queryData = { |
|
|
let queryData = { |
|
|
supplierCode:supplierCode, |
|
|
supplierCode:supplierCode, |
|
|
itemCode:itemCode |
|
|
itemCode: item['itemCode'] |
|
|
} |
|
|
} |
|
|
SupplieritemApi.getDefaultLocationCode(queryData as SupplieritemApi.SupplieritemVO).then(res =>{ |
|
|
SupplieritemApi.getDefaultLocationCode(queryData as SupplieritemApi.SupplieritemVO).then(res =>{ |
|
|
row['defaultToLocationCode'] = res |
|
|
newRow['defaultToLocationCode'] = res |
|
|
|
|
|
tableData.value.push(newRow) |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}else if (formField == 'packQty'){ |
|
|
}else if (formField == 'packQty'){ |
|
|
row['packQty'] = val[0]['packQty'] |
|
|
row['packQty'] = val[0]['packQty'] |
|
@ -165,12 +174,59 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
if(formField == 'supplierCode'){ |
|
|
setV['supplierCode'] = val[0]['code'] |
|
|
setV['supplierCode'] = val[0]['code'] |
|
|
|
|
|
}else if(formField == 'ppNumber') { |
|
|
|
|
|
//新增--采购订单-- |
|
|
|
|
|
setV['supplierCode'] = val[0]['supplierCode'] |
|
|
|
|
|
setV['poNumber'] = val[0]['number'] |
|
|
|
|
|
const newRow = val[0] |
|
|
|
|
|
newRow['poNumber'] = val[0]['number'] |
|
|
|
|
|
// 请求明细数据 |
|
|
|
|
|
getSearchTableData(val[0]['number']) |
|
|
|
|
|
// tableData.value = [newRow] |
|
|
|
|
|
// formRef.handleAddTable() |
|
|
|
|
|
} |
|
|
|
|
|
setV[formField] = val[0][searchField] |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
const onEnter = async (field,value)=>{ |
|
|
|
|
|
console.log(field,value) |
|
|
|
|
|
getSearchTableData(value,true) |
|
|
|
|
|
} |
|
|
|
|
|
const getSearchTableData = async (number,isEnter=false)=>{ |
|
|
|
|
|
const {tableObject ,tableMethods} = useTable({ |
|
|
|
|
|
defaultParams:{number}, |
|
|
|
|
|
getListApi: PurchaseDetailApi.getPurchaseDetailPage // 分页接口 |
|
|
|
|
|
}) |
|
|
|
|
|
// 获得表格的各种操作 |
|
|
|
|
|
const { getList:getList1 } = tableMethods |
|
|
|
|
|
await getList1() |
|
|
|
|
|
const tableColumns = PurchaseDetail.allSchemas.tableFormColumns |
|
|
|
|
|
tableColumns.forEach((item) => { |
|
|
|
|
|
item.width = item.table?.width || 150 |
|
|
|
|
|
}) |
|
|
|
|
|
tableData.value = [] |
|
|
|
|
|
tableObject.tableList.forEach(row=>{ |
|
|
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row})) |
|
|
|
|
|
newRow['poLine'] = row['lineNumber'] |
|
|
|
|
|
newRow['itemCode'] = row['itemCode'] |
|
|
|
|
|
newRow['uom'] = row['uom'] |
|
|
|
|
|
newRow['poNumber'] =row['number'] |
|
|
|
|
|
newRow['defaultToLocationCode'] =row['defaultLocation'] |
|
|
|
|
|
tableData.value.push(newRow) |
|
|
|
|
|
if(isEnter){ |
|
|
|
|
|
//回车--供应商代码 |
|
|
|
|
|
const setV = {} |
|
|
|
|
|
setV['poNumber'] = number |
|
|
|
|
|
setV['supplierCode'] = row.supplierCode |
|
|
|
|
|
formRef.value.formRef.setValues(setV) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
// 查询页面返回——详情 |
|
|
// 查询页面返回——详情 |
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
@ -275,25 +331,25 @@ const butttondata = (row) => { |
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
handleClose(row.id) |
|
|
handleClose(row.masterId) |
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
handleReAdd(row.id) |
|
|
handleReAdd(row.masterId) |
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
handleSubmit(row.id) |
|
|
handleSubmit(row.masterId) |
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
handleRefused(row.id) |
|
|
handleRefused(row.masterId) |
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
handleAgree(row.id) |
|
|
handleAgree(row.masterId) |
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
handleHandle(row.id) |
|
|
handleHandle(row.masterId) |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if(val == 'ssbq'){ // 生成标签 |
|
|
} else if(val == 'ssbq'){ // 生成标签 |
|
|
// 生成标签 |
|
|
// 生成标签 |
|
|
detatableData.params = { |
|
|
detatableData.params = { |
|
|
masterId:row.id |
|
|
masterId:row.masterId |
|
|
} |
|
|
} |
|
|
genLabelId.value = row.id |
|
|
genLabelId.value = row.masterId |
|
|
await getDetailList() |
|
|
await getDetailList() |
|
|
formLabelRef.value.open('create', row, null,'createLabel')//创建标签页面 createLabel 标题 |
|
|
formLabelRef.value.open('create', row, null,'createLabel')//创建标签页面 createLabel 标题 |
|
|
}else if (val == 'point') { |
|
|
}else if (val == 'point') { |
|
|