Browse Source

采购订单修改

master
李胜楠 1 year ago
parent
commit
4bda1ba3f6
  1. 21
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue
  2. 186
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

21
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue

@ -50,6 +50,7 @@
import * as PurchaseMainApi from '@/api/wms/purchaseMain'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItembasicApi from '@/api/wms/itembasic'
//
defineOptions({ name: 'PurchaseMain' })
@ -68,10 +69,17 @@
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
nextTick(async() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
if(formField == 'itemCode'){
await ItembasicApi.getItembasicPage({
code: row['itemCode']
}).then(res => {
row['uom'] = res.list[0].uom
})
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
@ -81,9 +89,16 @@
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
nextTick(async() => {
const setV = {}
setV[formField] = val[0][searchField]
if(formField == 'itemCode'){
await ItembasicApi.getItembasicPage({
code: setV['itemCode']
}).then(res => {
setV['uom'] = res.list[0].uom
setV[formField] = val[0][searchField]
})
}
formRef.setValues(setV)
})
}

186
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

@ -176,7 +176,9 @@ export const PurchaseMain = useCrudSchemas(reactive<CrudSchema[]>([
style: {width:'100%'},
min: 0
}
}
},
isTableForm: false,
isForm: false,
},
{
label: '备注',
@ -334,12 +336,12 @@ export const PurchaseMainRules = reactive({
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
// number: [
// { required: true, message: '请输入单据号', trigger: 'blur' }
// ],
// businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' }
// ],
})
/**
@ -356,6 +358,74 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
isSearchList: true, // 开启查询弹窗
}
},
{
label: '物品代码',
field: 'itemCode',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商物品',
searchField: 'itemCode',
searchTitle: '供应商物品信息',
searchAllSchemas: Supplieritem.allSchemas,
searchPage: SupplieritemApi.getSupplieritemPage,
searchCondition: [{
key:'supplierCode',
value:'supplierCode',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择供应商物品',
searchField: 'itemCode',
searchTitle: '供应商物品信息',
searchAllSchemas: Supplieritem.allSchemas,
searchPage: SupplieritemApi.getSupplieritemPage,
searchCondition: [{
key:'supplierCode',
value:'supplierCode',
isMainValue: true
}]
}
}
},
{
label: '订单数量',
field: 'orderQty',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: 'ERP库位',
field: 'erpLocationCode',
@ -515,23 +585,6 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false,
isForm: false
},
{
label: '超收百分比',
field: 'overReceivingPercent',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0
}
},
tableForm: {
type: 'InputNumber',
min: 0
}
},
{
label: '单价',
field: 'singlePrice',
@ -564,74 +617,6 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false,
isForm: false
},
{
label: '物品代码',
field: 'itemCode',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商物品',
searchField: 'itemCode',
searchTitle: '供应商物品信息',
searchAllSchemas: Supplieritem.allSchemas,
searchPage: SupplieritemApi.getSupplieritemPage,
searchCondition: [{
key:'supplierCode',
value:'supplierCode',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择供应商物品',
searchField: 'itemCode',
searchTitle: '供应商物品信息',
searchAllSchemas: Supplieritem.allSchemas,
searchPage: SupplieritemApi.getSupplieritemPage,
searchCondition: [{
key:'supplierCode',
value:'supplierCode',
isMainValue: true
}]
}
}
},
{
label: '订单数量',
field: 'orderQty',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '单据号',
field: 'nuumber',
@ -699,6 +684,23 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '超收百分比',
field: 'overReceivingPercent',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0
}
},
tableForm: {
type: 'InputNumber',
min: 0
}
},
{
label: '创建者',
field: 'creator',

Loading…
Cancel
Save