From 15d94c0f59d2dcdb5a358e907961a6eaec808484 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com>
Date: Fri, 19 Jan 2024 10:30:20 +0800
Subject: [PATCH 1/5] =?UTF-8?q?tableform=20=E6=95=B0=E5=AD=97=E8=BE=93?=
=?UTF-8?q?=E5=85=A5=E6=A1=86=E6=B7=BB=E5=8A=A0=E6=94=B9=E5=8F=98=E4=BA=8B?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/BasicForm/src/BasicForm.vue | 9 ++++++++-
src/components/TableForm/src/TableForm.vue | 5 +++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue
index 1bb6b76b1..e747f5763 100644
--- a/src/components/BasicForm/src/BasicForm.vue
+++ b/src/components/BasicForm/src/BasicForm.vue
@@ -84,6 +84,7 @@
@inpuFocus="inpuFocus"
@buttonOperationClick="buttonOperationClick"
@inputStringBlur="inputStringBlur"
+ @inputNumberChange="inputNumberChange"
/>
@@ -466,7 +467,8 @@ const emit = defineEmits([
'tableFormChange',
'buttonOperationClick',
'inputStringBlur',
- 'onChange'
+ 'onChange',
+ 'inputNumberChange'
])
//普通下拉改变事件
const formSelectChange = (field, val, row) => {
@@ -483,6 +485,11 @@ const tableSelectionChange = (val) => {
const 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) => {
// return getDictForStatusID(val, statusID)
diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue
index 3d365ce57..4a38c18ca 100644
--- a/src/components/TableForm/src/TableForm.vue
+++ b/src/components/TableForm/src/TableForm.vue
@@ -94,6 +94,7 @@
:min="headerItem?.tableForm?.min"
:precision="headerItem?.tableForm?.precision"
:disabled="itemIsDisabled(headerItem, row)"
+ @change="(e)=>{inputNumberChange(headerItem.field, $index, row, e)}"
/>
@@ -355,6 +356,10 @@ const initSelectOptions = (item) => {
const formSelectChange = (field, val,row) => {
emit('formSelectChange', field, val,row)
}
+// 数字输入-改变事件
+const inputNumberChange = (field, index, row, e) => {
+ emit('inputNumberChange', field, index, row, e)
+}
// 点击selection框
const tableSelectionChange = (val) => {
From cbe60c1a906f96892431b2ee9a46f7bdf4f79177 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com>
Date: Fri, 19 Jan 2024 11:00:03 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E8=AF=A6=E6=83=85=20basicform=20=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=20=E6=94=B9=E5=8F=98=E4=BA=8B=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Detail/src/Detail.vue | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue
index 992da161c..bd7c864a9 100644
--- a/src/components/Detail/src/Detail.vue
+++ b/src/components/Detail/src/Detail.vue
@@ -134,6 +134,7 @@
@selectChangeDetail="selectChangeDetail"
:formTypeDetail="formTypeDetail"
:countPlanAllList="countPlanAllList"
+ @onChange="detailBasicFormOnChange"
/>
@@ -581,7 +582,8 @@ const emit = defineEmits([
'selectChangeDetail',
'detailOpenForm',
'tableFormButton',
- 'openImage'
+ 'openImage',
+ 'detailBasicFormOnChange'
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
@@ -630,6 +632,14 @@ const selectChangeDetail = (field, val) => {
const openImage=(item)=>{
emit('openImage', item)
}
+/**
+ * 监听改变事件
+ * @param field 当前操作字段
+ * @param cur 改变后值
+ */
+ const detailBasicFormOnChange = (field, cur) => {
+ emit('detailBasicFormOnChange', field, cur)
+}
//监视属性
watch(
() => props.apiPage,
From 48eec12f6081644249a5c43cced048cf68d9616e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com>
Date: Fri, 19 Jan 2024 11:14:45 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E5=A4=87=E6=96=99=E8=AE=A1=E5=88=92=20?=
=?UTF-8?q?=E4=B8=BB=E8=A1=A8=E7=BC=96=E8=BE=91=20=E7=A6=81=E7=94=A8?=
=?UTF-8?q?=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../preparetoissueMain/index.vue | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
index 50fadfb8a..a69fbcd1c 100644
--- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
+++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
@@ -314,6 +314,33 @@ const buttonTableClick = async (val, row) => {
const formRef = ref()
const openForm =async (type: string, row?: number) => {
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)
}
From ebf6680fe9003044b0dc3847f70f1cd62a264311 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com>
Date: Fri, 19 Jan 2024 11:17:34 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E8=AF=A6=E6=83=85=E7=BB=84=E4=BB=B6=20?=
=?UTF-8?q?=E5=BC=80=E6=94=BE=E9=87=8C=E9=9D=A2formRef=E5=B1=9E=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Detail/src/Detail.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue
index bd7c864a9..e5692ab1e 100644
--- a/src/components/Detail/src/Detail.vue
+++ b/src/components/Detail/src/Detail.vue
@@ -379,6 +379,7 @@ const HeadButttondata = ref()
const buttondata = ref()
/** 打开弹窗 */
+const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
@@ -458,7 +459,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
}
}
}
-defineExpose({ openDetail }) // 提供 open 方法,用于打开弹窗
+defineExpose({ openDetail, formRef }) // 提供 open 方法,用于打开弹窗
// 获取备注列表
const getRemarkList = async () => {
@@ -544,7 +545,6 @@ const buttonTableClick = async (val, row) => {
}
}
/** 添加/修改操作 */
-const formRef = ref()
const openForm = async (type: string, row?: number) => {
emit('detailOpenForm', type, row)
formRef.value.open(type, row, masterParmas.value)
From 49ee2ad66e9987e5d66eda4759c8a3332baaa134 Mon Sep 17 00:00:00 2001
From: zhaoxuebing
Date: Fri, 19 Jan 2024 11:47:32 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=85=A5?=
=?UTF-8?q?=E5=BA=93=E5=8D=95=E4=BB=B7=E5=92=8C=E9=87=91=E9=A2=9D=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../unplannedreceiptJobMain.data.ts | 22 ++++++++++
.../unplannedreceiptRequestMain/index.vue | 14 +++++++
.../unplannedreceiptRequestMain.data.ts | 42 +++++++++++++++++++
3 files changed, 78 insertions(+)
diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts
index fea632e0a..17e70ea8c 100644
--- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts
+++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts
@@ -645,6 +645,28 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([
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: '到库位代码',
field: 'toLocationCode',
diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
index c86c086a7..5740d00fc 100644
--- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
+++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
@@ -54,6 +54,7 @@
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
+ @inputNumberChange="inputNumberChange"
/>
@@ -70,6 +71,7 @@
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
+ @detailBasicFormOnChange="qtyOnChange"
/>
@@ -85,6 +87,7 @@
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@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 () => {
getList()
diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
index 5e8537215..8fb5e7200 100644
--- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
+++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
@@ -537,6 +537,48 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive