Browse Source

采购收货申请,新增时采购订单可编辑

master_hella_20240701
yufei0306 7 months ago
parent
commit
360f09a1bb
  1. 4
      src/components/BasicForm/src/BasicForm.vue
  2. 4
      src/components/Form/src/Form.vue
  3. 28
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  4. 1
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

4
src/components/BasicForm/src/BasicForm.vue

@ -678,8 +678,8 @@ const onBlur = (field, e) => {
* @param field 当前操作字段
* @param e
*/
const onEnter = (field, e) => {
emit('onEnter', field, e)
const onEnter = (field,value, e) => {
emit('onEnter', field,value, e)
}
//

4
src/components/Form/src/Form.vue

@ -248,7 +248,7 @@ export default defineComponent({
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={item?.componentProps?.enterSearch?false:true} onKeyup={(event)=>{
if(event.keyCode === 13){
//
emit('onEnter',item.field,event)
emit('onEnter',item.field,formModel.value[item.field],event)
}
}} v-slots={{
suffix: () => (
@ -282,7 +282,7 @@ export default defineComponent({
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} onKeyup={(event)=>{
if(event.keyCode === 13){
//
emit('onEnter',item.field,event)
emit('onEnter',item.field,formModel.value[item.field],event)
}
}} disabled={item?.componentProps?.enterSearch?false:true} v-slots={{
suffix: () => (

28
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -57,6 +57,7 @@
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@formFormDateChange="formFormDateChange"
@onEnter="onEnter"
/>
<!-- 详情 -->
<Detail
@ -204,7 +205,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const newRow = val[0]
newRow['poNumber'] = val[0]['number']
//
getSearchTableData(val[0]['number'],val[0]['supplierCode'])
getSearchTableData(val[0]['number'])
// tableData.value = [newRow]
// formRef.handleAddTable()
}
@ -372,7 +373,7 @@ const labelPrint = async (row) => {
}
const getSearchTableData = async (number,supplierCode)=>{
const getSearchTableData = async (number,isEnter=false)=>{
const {tableObject ,tableMethods} = useTable({
defaultParams:{number},
getListApi: PurchaseDetailApi.getPurchaseDetailPage //
@ -391,14 +392,16 @@ const getSearchTableData = async (number,supplierCode)=>{
newRow['itemCode'] = row['itemCode']
newRow['uom'] = row['uom']
newRow['poNumber'] =row['number']
let queryData = {
supplierCode,
itemCode:row['itemCode']
}
SupplieritemApi.getDefaultLocationCode(queryData as SupplieritemApi.SupplieritemVO).then(res =>{
newRow['defaultToLocationCode'] = res
tableData.value.push(newRow)
})
newRow['defaultToLocationCode'] =row['defaultLocation']
tableData.value.push(newRow)
if(isEnter){
//--
const setV = {}
setV['poNumber'] = number
setV['supplierCode'] = row.supplierCode
formRef.value.formRef.setValues(setV)
}
})
}
/** 添加/修改操作 */
@ -566,7 +569,10 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const onEnter = async (field,value)=>{
console.log(field,value)
getSearchTableData(value,true)
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

1
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -59,6 +59,7 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择采购订单', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段

Loading…
Cancel
Save