chenfang 10 months ago
parent
commit
4c7c3cc5f6
  1. 9
      src/components/BasicForm/src/BasicForm.vue
  2. 16
      src/components/Detail/src/Detail.vue
  3. 5
      src/components/TableForm/src/TableForm.vue
  4. 22
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts
  5. 14
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  6. 42
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
  7. 27
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue

9
src/components/BasicForm/src/BasicForm.vue

@ -84,6 +84,7 @@
@inpuFocus="inpuFocus" @inpuFocus="inpuFocus"
@buttonOperationClick="buttonOperationClick" @buttonOperationClick="buttonOperationClick"
@inputStringBlur="inputStringBlur" @inputStringBlur="inputStringBlur"
@inputNumberChange="inputNumberChange"
/> />
</div> </div>
<div v-if="isBusiness && formType == 'create' && fromeWhere == 'countPlan'"> <div v-if="isBusiness && formType == 'create' && fromeWhere == 'countPlan'">
@ -466,7 +467,8 @@ const emit = defineEmits([
'tableFormChange', 'tableFormChange',
'buttonOperationClick', 'buttonOperationClick',
'inputStringBlur', 'inputStringBlur',
'onChange' 'onChange',
'inputNumberChange'
]) ])
// //
const formSelectChange = (field, val, row) => { const formSelectChange = (field, val, row) => {
@ -483,6 +485,11 @@ const tableSelectionChange = (val) => {
const tableSortChange = (column, prop, order) => { const tableSortChange = (column, prop, order) => {
emit('tableSortChange', column, prop, order) emit('tableSortChange', column, prop, order)
} }
// -
const inputNumberChange = (field, index, row, val) => {
emit('inputNumberChange', field, index, row, val)
}
// //
// const showSelect = (val, statusID) => { // const showSelect = (val, statusID) => {
// return getDictForStatusID(val, statusID) // return getDictForStatusID(val, statusID)

16
src/components/Detail/src/Detail.vue

@ -134,6 +134,7 @@
@selectChangeDetail="selectChangeDetail" @selectChangeDetail="selectChangeDetail"
:formTypeDetail="formTypeDetail" :formTypeDetail="formTypeDetail"
:countPlanAllList="countPlanAllList" :countPlanAllList="countPlanAllList"
@onChange="detailBasicFormOnChange"
/> />
</div> </div>
</template> </template>
@ -378,6 +379,7 @@ const HeadButttondata = ref()
const buttondata = ref() const buttondata = ref()
/** 打开弹窗 */ /** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref() const titleNameRef = ref()
const titleValueRef = ref() const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => { const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
@ -457,7 +459,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
} }
} }
} }
defineExpose({ openDetail }) // open defineExpose({ openDetail, formRef }) // open
// //
const getRemarkList = async () => { const getRemarkList = async () => {
@ -543,7 +545,6 @@ const buttonTableClick = async (val, row) => {
} }
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => { const openForm = async (type: string, row?: number) => {
emit('detailOpenForm', type, row) emit('detailOpenForm', type, row)
formRef.value.open(type, row, masterParmas.value) formRef.value.open(type, row, masterParmas.value)
@ -581,7 +582,8 @@ const emit = defineEmits([
'selectChangeDetail', 'selectChangeDetail',
'detailOpenForm', 'detailOpenForm',
'tableFormButton', 'tableFormButton',
'openImage' 'openImage',
'detailBasicFormOnChange'
]) ])
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (id: number) => { const handleDelete = async (id: number) => {
@ -630,6 +632,14 @@ const selectChangeDetail = (field, val) => {
const openImage=(item)=>{ const openImage=(item)=>{
emit('openImage', item) emit('openImage', item)
} }
/**
* 监听改变事件
* @param field 当前操作字段
* @param cur 改变后值
*/
const detailBasicFormOnChange = (field, cur) => {
emit('detailBasicFormOnChange', field, cur)
}
// //
watch( watch(
() => props.apiPage, () => props.apiPage,

5
src/components/TableForm/src/TableForm.vue

@ -94,6 +94,7 @@
:min="headerItem?.tableForm?.min" :min="headerItem?.tableForm?.min"
:precision="headerItem?.tableForm?.precision" :precision="headerItem?.tableForm?.precision"
:disabled="itemIsDisabled(headerItem, row)" :disabled="itemIsDisabled(headerItem, row)"
@change="(e)=>{inputNumberChange(headerItem.field, $index, row, e)}"
/> />
</el-form-item> </el-form-item>
<!-- 下拉框 --> <!-- 下拉框 -->
@ -355,6 +356,10 @@ const initSelectOptions = (item) => {
const formSelectChange = (field, val,row) => { const formSelectChange = (field, val,row) => {
emit('formSelectChange', field, val,row) emit('formSelectChange', field, val,row)
} }
// -
const inputNumberChange = (field, index, row, e) => {
emit('inputNumberChange', field, index, row, e)
}
// selection // selection
const tableSelectionChange = (val) => { const tableSelectionChange = (val) => {

22
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts

@ -645,6 +645,28 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '单价',
field: 'singlePrice',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '金额',
field: 'amount',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{ {
label: '到库位代码', label: '到库位代码',
field: 'toLocationCode', field: 'toLocationCode',

14
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -54,6 +54,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@inputNumberChange="inputNumberChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -70,6 +71,7 @@
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate" :detailValidate="detailValidate"
@detailBasicFormOnChange="qtyOnChange"
/> />
<!-- 创建标签 --> <!-- 创建标签 -->
@ -85,6 +87,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitFormLabel" @submitForm="submitFormLabel"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -569,6 +572,17 @@ const submitFormLabel = async (formType, data) => {
} }
} }
const inputNumberChange = (field, index, row, val) => {
if(field == 'qty' || field == 'singlePrice'){
row.amount = row.qty * row.singlePrice
}
}
const qtyOnChange = (field,val) =>{
if(field == 'qty' || field == 'singlePrice'){
detailRef.value.formRef.formRef.formModel.amount = detailRef.value.formRef.formRef.formModel.qty * detailRef.value.formRef.formRef.formModel.singlePrice
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

42
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

@ -537,6 +537,48 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
type: 'Select' type: 'Select'
} }
}, },
{
label: '单价',
field: 'singlePrice',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
},
},
{
label: '金额',
field: 'amount',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min: 0,
precision: 6,
}
},
tableForm: {
type: 'InputNumber',
disabled:true,
min: 0,
precision: 6,
},
},
{ {
label: '到库位代码', label: '到库位代码',
field: 'toLocationCode', field: 'toLocationCode',

27
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue

@ -314,6 +314,33 @@ const buttonTableClick = async (val, row) => {
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm =async (type: string, row?: number) => {
tableData.value = [] // tableData.value = [] //
if (type == 'update') {
// tableform
PreparetoissueMain.allSchemas.formSchema.map(item => {
if(item.field == 'productionPlanNumber' ||
item.field == 'workshop' ||
item.field == 'prodLine' ||
item.field == 'shift' ||
item.field == 'team'
){
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
} else {
// tableform
PreparetoissueMain.allSchemas.formSchema.map(item => {
if(item.field == 'productionPlanNumber' ||
item.field == 'workshop' ||
item.field == 'prodLine' ||
item.field == 'shift' ||
item.field == 'team'
){
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
})
}
formRef.value.open(type, row) formRef.value.open(type, row)
} }

Loading…
Cancel
Save