From 286ce5bf6ff55efe02a2f529c53541972025025e Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Fri, 28 Jun 2024 14:09:15 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=EF=BC=8C=E7=89=A9=E6=96=99=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=8C=85?=
=?UTF-8?q?=E8=A3=85=EF=BC=8C=E8=A7=84=E6=A0=BC=EF=BC=8C=E8=BE=93=E5=85=A5?=
=?UTF-8?q?=E6=A1=86=E5=8F=AF=E4=BB=A5=E8=BE=93=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/wms/balance/index.ts | 6 +-
src/api/wms/business/business.ts | 530 ++++++++++++++++++
src/api/wms/customeritem/index.ts | 7 +-
src/api/wms/itembasic/index.ts | 7 +-
src/api/wms/itempackage/index.ts | 4 +
src/api/wms/packageunit/index.ts | 5 +
src/api/wms/productionlineitem/index.ts | 5 +
src/api/wms/supplier/index.ts | 6 +
src/api/wms/supplieritem/index.ts | 8 +-
src/components/BasicForm/src/BasicForm.vue | 50 +-
src/components/Form/src/Form.vue | 10 +-
src/components/TableForm/src/TableForm.vue | 54 +-
.../itemwarehouse/itemwarehouse.data.ts | 1 +
.../callmaterials/callmaterials.data.ts | 1 +
.../supplierUser/supplierUser.data.ts | 1 +
.../customerreturnRequestMain.data.ts | 12 +-
.../customerreturnRequestMain/index.vue | 2 +-
.../inventoryinitRequestMain.data.ts | 1 +
.../packageoverRequestMain.data.ts | 2 +
.../scrapRequestMain/scrapRequestMain.data.ts | 1 +
.../transferissueRequestMain.data.ts | 1 +
.../unplannedreceiptRequestMain.data.ts | 1 +
.../issueRequestMain/issueRequestMain.data.ts | 1 +
.../productionreturnRequestMain.data.ts | 1 +
.../productionreturnRequestMainNo.data.ts | 1 +
.../repleinshRequestMain.data.ts | 1 +
.../inventorychangeRequestMain.data.ts | 2 +
.../inventorymoveRequestMain.data.ts | 1 +
.../processproductionRequestMain.data.ts | 1 +
.../productdismantleRequestMain.data.ts | 1 +
.../productionplan/productionMain/index.vue | 2 +-
.../productionMainAssemble/index.vue | 15 +-
.../productionMainAssemble.data.ts | 1 +
.../productionMainAssembleSparePart/index.vue | 17 +-
.../productionMainAssembleSparePart.data.ts | 1 +
.../productionMainPredictSparePart/index.vue | 15 +-
.../productionMainPredictSparePart.data.ts | 1 +
.../productreceiptRequestMain.data.ts | 3 +
.../productreceiptAssembleRequestMain.data.ts | 1 +
.../productreceiptscrapRequestMain.data.ts | 2 +
.../productscrapRequestMain.data.ts | 2 +
.../demandforecastingMain.data.ts | 1 +
.../purchaseMain/purchaseMain.data.ts | 1 +
.../supplierinvoiceRequestMain.data.ts | 3 +-
44 files changed, 736 insertions(+), 53 deletions(-)
create mode 100644 src/api/wms/business/business.ts
diff --git a/src/api/wms/balance/index.ts b/src/api/wms/balance/index.ts
index 839ac877a..9dab845d5 100644
--- a/src/api/wms/balance/index.ts
+++ b/src/api/wms/balance/index.ts
@@ -189,4 +189,8 @@ export const getBalanceByBusinessTypeByItemType = async (params) => {
} else {
return await request.get({ url: `/wms/balance/pageBusinessTypeToBalance`, params })
}
-}
\ No newline at end of file
+}
+// 根据code获取数据列表
+export const getBalanceItemListByCodes = async (data) => {
+ return await request.get({ url: `/wms/balance/listByCodes?itemCode=` +( data.itemCode?data.itemCode:'') + '&batch='+(data.batch?data.batch:'') + '&locationCode='+(data.locationCode?data.locationCode:'' ) + '&packingNumber='+(data.packingNumber?data.packingNumber:'') + '&warehouseCode='+(data.warehouseCode?data.warehouseCode:'') })
+ }
\ No newline at end of file
diff --git a/src/api/wms/business/business.ts b/src/api/wms/business/business.ts
new file mode 100644
index 000000000..2724d3120
--- /dev/null
+++ b/src/api/wms/business/business.ts
@@ -0,0 +1,530 @@
+// 获取供应商列表
+import { getSupplierListByCodes, importTemplate } from '@/api/wms/supplier'
+// 获取物料列表
+import { getItemListByCodes } from '@/api/wms/itembasic'
+// 获取供应商物料列表
+import { getSupplierItemListByCodes } from '@/api/wms/supplieritem'
+// 获取生产线物料
+import { getProductionLineCodelistByCodes } from '@/api/wms/productionlineitem'
+// 获取包装规格
+import { getPackageunitListByCodes } from '@/api/wms/packageunit'
+// 获取物料包装规格
+import { getItemPackageunitListByCodes } from '@/api/wms/itempackage'
+// 获取客户物料
+import { getCustomerItemListByCodes } from '@/api/wms/customeritem'
+// 获取库存余额
+import { getBalanceItemListByCodes } from '@/api/wms/balance'
+import { isString } from 'min-dash'
+const message = useMessage() // 消息弹窗
+const { t } = useI18n() // 国际化
+/**
+ * 业务组件
+ * tableFormBlur 表格表单失去焦点时候获取焦点
+ * FormBlur 表格失去焦点时候获取焦点
+ */
+export const tableFormBlurVer = async (headerItem, val, row, index,routeName,formRef,detailData,tableData,callback) => {
+ if (
+ headerItem.field == 'fromPackingNumber' ||
+ headerItem.field == 'packingNumber' ||
+ headerItem.field == 'itemCode' ||
+ headerItem.field == 'packUnit' ||
+ headerItem.field == 'secondPackUnit' ||
+ headerItem.field == 'fromPackUnit' ||
+ headerItem.field == 'toPackUnit'||
+ headerItem.field == 'toPackUnit'||
+ headerItem.field == 'supplierItemCode'
+
+ ) {
+ let searchField = headerItem.field
+ let pageApi = ref()
+ let params = ref()
+
+ if (val && isString(val)) {
+ // const obj = props.tableAllSchemas.tableFormColumns.find((item) => item.field == headerItem.field)
+ if (val.indexOf(',') > -1) {
+ message.alert('该输入框只能输入一条数据')
+ row[headerItem.field] = ''
+ return
+ }
+ // 校验
+ let params = ref({})
+ let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息
+ // 循环参数设置参数为key:value格式
+ if (searchCondition1 && searchCondition1.length > 0) {
+ for (let i = 0; i < searchCondition1.length; i++) {
+ if (searchCondition1[i].isMainValue) {
+ params.value[searchCondition1[i].key] = formRef.formModel[
+ searchCondition1[i].value
+ ]
+ ? formRef.formModel[searchCondition1[i].value]
+ : detailData
+ ? detailData[searchCondition1[i].value]
+ : row
+ ? row[searchCondition1[i].value]
+ : ''
+ // 是否含有空参数情况
+ let isNull = false
+ if (
+ params.value[searchCondition1[i].key] == '' ||
+ params.value[searchCondition1[i].key] == undefined
+ ) {
+ isNull = true
+ }
+ if (isNull) {
+ message.warning(
+ searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
+ )
+ row[headerItem.field] = ''
+ return
+ }
+ } else {
+ // 扩展 转换为筛选条件进行查询
+ if (searchCondition1[i].isSearch) {
+ if (searchCondition1[i].isFormModel) {
+ //用formModel中的值
+ if (searchCondition1[i].required) {
+ if (
+ formRef.formModel[searchCondition1[i].value] == '' ||
+ formRef.formModel[searchCondition1[i].value] == undefined
+ ) {
+ message.warning(
+ searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
+ )
+ row[headerItem.field] = ''
+ return
+ }
+ }
+ }
+ } else {
+ params.value[searchCondition1[i].key] = searchCondition1[i].value
+ }
+ }
+ }
+ }
+ params.value[headerItem.field] = val?.trim()
+ // 判断改包装号是否已经添加
+ const seen = new Set()
+ const repeatCode = new Set()
+ let arr = tableData.map((item) => item[headerItem.field]?.trim())
+ arr.forEach((item) => {
+ if (seen.has(item)) {
+ repeatCode.add(item)
+ } else {
+ seen.add(item)
+ }
+ })
+ const arr1 = Array.from(repeatCode)
+ if (arr1.length > 0) {
+ message.warning(`${arr1.join(',')}${t('ts.已经存在')}`)
+ row[headerItem.field] = ''
+ return
+ }
+ if (
+ headerItem.field == 'fromPackingNumber' ||
+ headerItem.field == 'packingNumber' ||
+ headerItem.field == 'itemCode'
+ ) {
+ // 业务
+ // 采购退货申请,制品拆解,调拨出库,报废出库申请,合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请,库存修改申请
+ if (
+ routeName == 'PurchasereturnRequestMain' ||
+ routeName == 'ProductdismantleRequestMain' ||
+ routeName == 'TransferissueRequestMain' ||
+ routeName == 'ScrapRequestMain' ||
+ routeName == 'OktoholdRequestMain' ||
+ routeName == 'HoldtookRequestMain' ||
+ routeName == 'HoldtoscrapRequestMain' ||
+ routeName == 'OktoscrapRequestMain' ||
+ routeName == 'ScraptoholdRequestMain' ||
+ routeName == 'InventorymoveRequestMain' ||
+ routeName == 'InventorychangeRequestMain'
+ ) {
+ //合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请参数稍有不同
+ if (
+ routeName == 'OktoholdRequestMain' ||
+ routeName == 'HoldtookRequestMain' ||
+ routeName == 'HoldtoscrapRequestMain' ||
+ routeName == 'OktoscrapRequestMain' ||
+ routeName == 'ScraptoholdRequestMain' ||
+ routeName == 'InventorymoveRequestMain' ||
+ routeName == 'InventorychangeRequestMain'
+ ) {
+ searchField = 'packingNumber'
+ params.value.packingNumber = val?.trim()
+ }
+ pageApi.value = getBalanceItemListByCodes
+ } else if (
+ routeName == 'RepleinshRequestMain' ||
+ routeName == 'IssueRequestMain' ||
+ routeName == 'InventoryinitRequestMain'
+ ) {
+ // 补料申请业务
+ pageApi.value = getItemListByCodes
+ searchField = 'code'
+ params.value.codes = val?.trim()
+ } else if (
+ routeName == 'ProductionMainAssemble' ||
+ routeName == 'ProductionMainASparePart' ||
+ routeName == 'ProductionMainPredictSparePart' ||
+ routeName == 'ProductreceiptRequestMain' ||
+ routeName == 'ProductreceiptRequestMainA' ||
+ routeName == 'ProductreceiptscrapRequestMain' ||
+ routeName == 'ProductscrapRequestMain'
+ ) {
+ // 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请
+ pageApi.value = getProductionLineCodelistByCodes
+ params.value.productionLineCode=
+ formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode,
+ params.value.itemCodes=val?.trim()
+ }
+ } else if (
+ headerItem.field == 'packUnit' ||
+ headerItem.field == 'secondPackUnit' ||
+ headerItem.field == 'fromPackUnit' ||
+ headerItem.field == 'toPackUnit'
+ ) {
+ searchField = 'packUnit'
+ //包装规格
+ // 预生产收货申请,装配收货申请,报修收货申请,客户退货申请,计划外入库,计划外出库,翻包申请
+ if (
+ routeName == 'ProductreceiptRequestMain' ||
+ routeName == 'ProductreceiptRequestMainA' ||
+ routeName == 'ProductreceiptscrapRequestMain' ||
+ routeName == 'CustomerreturnRequestMain' ||
+ routeName == 'UnplannedreceiptRequestMain' ||
+ routeName == 'UnplannedissueJobMain' ||
+ routeName == 'PackageoverRequestMain'
+ ) {
+ params.value.itemCode= row.itemCode
+ params.value.packUnit= val?.trim()
+ pageApi.value = getItemPackageunitListByCodes
+ }
+ } else if (
+ headerItem.field == 'supplierItemCode'
+ ) {
+ // 生产退料申请,隔离退料申请
+ if (
+ routeName == 'ProductionreturnRequestMain' ||
+ routeName == 'ProductionreturnRequestMainNo'
+ ) {
+ searchField = 'supplierCode'
+ params.value.itemCodes= row.itemCode
+ params.value.supplierCode= val?.trim()
+ pageApi.value = getSupplierItemListByCodes
+ }
+ }
+ const list = ref()
+ // 调取包装接口
+ await pageApi.value(params.value).then(async (res) => {
+ list.value = res ? res : []
+ // 只查一条数据,多条数据查询默认显示不存在
+ if (res.length == 1) {
+ callback(searchField,list.value)
+ } else {
+ message.alert('代码' + row[headerItem.field] + '没有找到对应数据')
+ row[headerItem.field] = ''
+ return
+ }
+ })
+ }
+ }
+}
+export const FormBlur = async (formField, val,routeName,formRef,detailData,formSchema,callback) => {
+ let pageApi = ref()
+ let params = ref()
+ console.log(1111,val)
+ let setV = {}
+ setV[formField] = ''
+ if (val && isString(val)) {
+ if (
+ formField == 'supplierCode' ||
+ formField == 'itemCode' ||
+ formField == 'productItemCode' ||
+ formField == 'componentItemCode' ||
+ formField == 'packUnit' ||
+ formField == 'inPackUnit' ||
+ formField == 'fromPackingNumber'
+ ) {
+ let searchField = 'code'
+ if (formField == 'supplierCode') {
+ params.value = val?.trim()
+ pageApi.value = getSupplierListByCodes
+ } else if (
+ formField == 'itemCode' ||
+ formField == 'productItemCode' ||
+ formField == 'componentItemCode'
+ ) {
+ // 销售价格单
+ if (routeName == 'Saleprice') {
+ console.log(22222,formRef.formModel.customerCode)
+ params.value = {
+ customerCode: formRef.formModel.customerCode,
+ itemCodes: val?.trim()
+ }
+ pageApi.value = getCustomerItemListByCodes
+ searchField = 'itemCode'
+ }else if (routeName == 'ProductscrapRequestMain') {
+ // 制品报废申请
+ params.value = {
+ productionLineCode:
+ detailData.productionLine || detailData.productionLineCode,
+ itemCodes: val?.trim()
+ }
+ pageApi.value = getProductionLineCodelistByCodes
+ searchField = 'itemCode'
+ }else {
+ // params.value = val.trim()
+ searchField = 'code'
+
+ params.value={
+ codes:val?.trim()
+ }
+ pageApi.value = getItemListByCodes
+ }
+ } else if (formField == 'packUnit') {
+ if(routeName == 'Itemwarehouse'||routeName == 'Callmaterials'){//物料仓库默认配置,叫料标签
+ searchField = 'packUnit'
+ params.value = {
+ itemCode: formRef.formModel.itemCode,
+ packUnit: val?.trim()
+ }
+ pageApi.value = getItemPackageunitListByCodes
+ }else{
+ params.value = val?.trim()
+ pageApi.value = getPackageunitListByCodes
+ }
+ } else if (formField == 'inPackUnit') {
+ params.value = {
+ itemCode: formRef.formModel.itemCode,
+ packUnit: val.trim()
+ }
+ pageApi.value = getItemPackageunitListByCodes
+ } else if (formField == 'fromPackingNumber') {
+ params.value = {
+ packingNumber: val?.trim()
+ }
+ pageApi.value = getBalanceItemListByCodes
+ }
+ let obj = {}
+ let searchCondition1 = formSchema.find((item) => item.field == formField).componentProps
+ .searchCondition //获取data.ts参数信息
+ // 循环参数设置参数为key:value格式
+ if (searchCondition1 && searchCondition1.length > 0) {
+ for (let i = 0; i < searchCondition1.length; i++) {
+ if (searchCondition1[i].isMainValue) {
+ obj[searchCondition1[i].key] = formRef.formModel[searchCondition1[i].value]
+ ? formRef.formModel[searchCondition1[i].value]
+ : detailData
+ ? detailData[searchCondition1[i].value]
+ : ''
+ // 是否含有空参数情况
+ let isNull = false
+ if (obj[searchCondition1[i].key] == '' || obj[searchCondition1[i].key] == undefined) {
+ isNull = true
+ }
+ if (isNull) {
+ message.warning(
+ searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
+ )
+ return
+ }
+ } else {
+ // 扩展 转换为筛选条件进行查询
+ if (searchCondition1[i].isSearch) {
+ if (searchCondition1[i].isFormModel) {
+ //用formModel中的值
+ if (searchCondition1[i].required) {
+ if (
+ formRef.formModel[searchCondition1[i].value] == '' ||
+ formRef.formModel[searchCondition1[i].value] == undefined
+ ) {
+ message.warning(
+ searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
+ )
+ return
+ }
+ }
+ }
+ } else {
+ obj[searchCondition1[i].key] = searchCondition1[i].value
+ }
+ }
+ }
+ }
+
+ let obj1 = formSchema.find((item) => item.field == formField)
+ if (!obj1.componentProps.multiple && val.indexOf(',') > -1) {
+ message.alert('该输入框只能输入一条数据')
+ formRef.setValues(setV)
+ return
+ }
+ await pageApi.value(params.value).then((res) => {
+ let arr1 = val.split(',')
+ let list = ref([])
+ list.value = res
+ if (list.value?.length == 0) {
+ message.alert('暂无数据')
+ formRef.setValues(setV)
+ return
+ }
+ if (arr1.length != list.value.length) {
+ let arr2 = list.value.map((item) => item.code)
+ let str = [
+ ...arr1.filter((item) => !arr2.includes(item)),
+ ...arr2.filter((item) => !arr1.includes(item))
+ ].join(',')
+ message.alert('代码' + str + '没有找到对应数据')
+ formRef.setValues(setV)
+ return
+ }
+ console.log(23232323)
+ // emit('searchTableSuccess', formField, searchField, list.value, formRef.value, 'form')
+ callback(searchField,list.value)
+ })
+ }
+ }
+}
+
+// 根据下方输入框失去焦点校验信息
+export const getListByBottonInput = async (headerItem, val,row,routeName,formRef,detailData,tableData,callback) => {
+ let pageApi = ref()
+ let params = ref({})
+ let list = ref([])
+ let field = 'itemCode'
+ // scp采购订单
+ if(!val)return;
+ if (routeName == 'PurchaseMain') {
+ pageApi.value = getSupplierItemListByCodes
+ params.value = {
+ supplierCode: formRef.formModel.supplierCode,
+ itemCodes: val?.trim(),
+ available: true
+ }
+ } else if (routeName == 'ProductionMain') {
+ pageApi.value = getProductionLineCodelistByCodes
+ params.value = {
+ productionLineCode: formRef.formModel.productionLine,
+ itemCodes: val?.trim()
+ }
+ } else if (
+ routeName == 'ZZBJDeliverPlanMain' ||
+ routeName == 'DeliverPlanMain' ||
+ routeName == 'DeliverRequestMain' ||
+ routeName == 'ZZBJDeliverRequestMain'
+ ) {
+ // 自制备件发货计划,发货计划,成品发货申请,自制备件发货申请
+ pageApi.value = getCustomerItemListByCodes
+ params.value = {
+ customerCode: formRef.formModel.customerCode,
+ itemCodes: val?.trim()
+ }
+ } else if (routeName == 'UnplannedissueRequestMain') {
+ // 计划外出库
+ pageApi.value = getBalanceItemListByCodes
+ params.value = {
+ packingNumber: val?.trim()
+ }
+ field = 'packingNumber'
+ } else {
+ params.value.codes = val?.trim()
+ pageApi.value = getItemListByCodes
+ }
+ let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息
+ console.log(98888,searchCondition1)
+ // 循环参数设置参数为key:value格式
+ if (searchCondition1 && searchCondition1.length > 0) {
+ for (let i = 0; i < searchCondition1.length; i++) {
+ if (searchCondition1[i].isMainValue) {
+ params.value[searchCondition1[i].key] = formRef.formModel[
+ searchCondition1[i].value
+ ]
+ ? formRef.formModel[searchCondition1[i].value]
+ : detailData
+ ? detailData[searchCondition1[i].value]
+ : ''
+ // 是否含有空参数情况
+ let isNull = false
+ if (
+ params.value[searchCondition1[i].key] == '' ||
+ params.value[searchCondition1[i].key] == undefined
+ ) {
+ isNull = true
+ }
+ if (isNull) {
+ message.warning(
+ searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
+ )
+ return
+ }
+ } else if (searchCondition1[i].isTableRowValue) {
+ if (searchCondition1[i].required) {
+ if (row[searchCondition1[i].value] == '' || row[searchCondition1[i].value] == undefined) {
+ message.warning(
+ searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
+ )
+ return
+ }
+ }
+ row[searchCondition1[i].value]
+ //查询当前table表数据的值
+ params.value[searchCondition1[i].key] = row[searchCondition1[i].value]
+ } else {
+ // 扩展 转换为筛选条件进行查询
+ if (searchCondition1[i].isSearch) {
+ if (searchCondition1[i].isFormModel) {
+ //用formModel中的值
+ if (searchCondition1[i].required) {
+ if (
+ formRef.formModel[searchCondition1[i].value] == '' ||
+ formRef.formModel[searchCondition1[i].value] == undefined
+ ) {
+ message.warning(
+ searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
+ )
+ return
+ }
+ }
+ }else {
+ params.value[searchCondition1[i].key] = searchCondition1[i].value
+ }
+ } else {
+ params.value[searchCondition1[i].key] = searchCondition1[i].value
+ }
+ }
+ }
+ }
+ console.log(788,params.value)
+ await pageApi.value(params.value).then(async (res) => {
+ list.value = res ? res : []
+ let arr1 = val.split(',').map(item=>item.trim())
+ console.log(res)
+ console.log(arr1)
+ if (arr1.length != res.length) {
+ let arr2 = res.map((item) => item[field])
+ console.log(arr2)
+ let str = [
+ ...arr1.filter((item) => !arr2.includes(item)),
+ ...arr2.filter((item) => !arr1.includes(item))
+ ].join(',')
+ console.log(str)
+ message.alert('代码' + str + '没有找到对应数据')
+ return
+ } else {
+ let repeatCode = []
+ if(tableData.length > 0){
+ tableData.forEach((item) => {
+ const findIndex = arr1.findIndex(valItem=>valItem==item[field])
+ if(findIndex > -1){
+ arr1.splice(findIndex,1)
+ repeatCode.push(item.itemCode)
+ }
+ })
+ }
+ if(repeatCode.length>0){
+ message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`);
+ return;
+ }
+ callback(list.value)
+ }
+ })
+}
diff --git a/src/api/wms/customeritem/index.ts b/src/api/wms/customeritem/index.ts
index c4c27e8a7..b9af7035d 100644
--- a/src/api/wms/customeritem/index.ts
+++ b/src/api/wms/customeritem/index.ts
@@ -72,4 +72,9 @@ export const getPageBusinessTypeToItemCode = async (params) => {
} else {
return await request.get({ url: `/wms/customeritem/pageBusinessTypeToItemCode`, params })
}
-}
\ No newline at end of file
+}
+
+// 根据code获取数据列表
+export const getCustomerItemListByCodes = async (data) => {
+ return await request.get({ url: `/wms/customeritem/listByCodes?itemCodes=` + data.itemCodes + '&customerCode='+data.customerCode + '&businessType='+(data.businessType?data.businessType:'') })
+}
diff --git a/src/api/wms/itembasic/index.ts b/src/api/wms/itembasic/index.ts
index 25f3566ec..efd0319f0 100644
--- a/src/api/wms/itembasic/index.ts
+++ b/src/api/wms/itembasic/index.ts
@@ -113,4 +113,9 @@ export const selectConfigToItembasic = async (params) => {
// 根据物料代码查计量单位
export const getQueryItemCodeInfo = async (data) => {
return await request.post({ url: 'wms/itembasic/queryItemCodeInfo', data })
-}
\ No newline at end of file
+}
+// 根据code获取数据列表
+export const getItemListByCodes = async (params) => {
+ return await request.get({ url: `/wms/itembasic/listByCodes`,params})
+}
+
diff --git a/src/api/wms/itempackage/index.ts b/src/api/wms/itempackage/index.ts
index 97eb8348e..555a174b0 100644
--- a/src/api/wms/itempackage/index.ts
+++ b/src/api/wms/itempackage/index.ts
@@ -86,3 +86,7 @@ export const exportItempackaging = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/itempackage/get-import-template' })
}
+// 根据code获取数据列表
+export const getItemPackageunitListByCodes = async (data) => {
+ return await request.get({ url: `/wms/itempackage/listByCodes?itemCode=` + data.itemCode + '&packUnit='+data.packUnit})
+}
diff --git a/src/api/wms/packageunit/index.ts b/src/api/wms/packageunit/index.ts
index 940fabef9..fa1718d35 100644
--- a/src/api/wms/packageunit/index.ts
+++ b/src/api/wms/packageunit/index.ts
@@ -69,3 +69,8 @@ export const exportPackageunit = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/packageunit/get-import-template' })
}
+
+// 根据code获取数据列表
+export const getPackageunitListByCodes = async (codes: string) => {
+ return await request.get({ url: `/wms/packageunit/listByCodes?codes=` + codes })
+}
diff --git a/src/api/wms/productionlineitem/index.ts b/src/api/wms/productionlineitem/index.ts
index cc9716fe3..0b3b03e20 100644
--- a/src/api/wms/productionlineitem/index.ts
+++ b/src/api/wms/productionlineitem/index.ts
@@ -67,3 +67,8 @@ export const exportProductionlineitem = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/productionlineitem/get-import-template' })
}
+
+
+export const getProductionLineCodelistByCodes = (data) => {
+ return request.get({ url: `/wms/productionlineitem/listByCodes?productionLineCode=`+data.productionLineCode +'&itemCodes='+data.itemCodes})
+}
diff --git a/src/api/wms/supplier/index.ts b/src/api/wms/supplier/index.ts
index 961d949a0..1287bea73 100644
--- a/src/api/wms/supplier/index.ts
+++ b/src/api/wms/supplier/index.ts
@@ -93,3 +93,9 @@ export const exportSupplierSCP = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/supplier/get-import-template' })
}
+
+// 根据code获取数据列表
+export const getSupplierListByCodes = async (codes: string) => {
+ return await request.get({ url: `/wms/supplier/listByCodes?codes=` + codes })
+}
+
diff --git a/src/api/wms/supplieritem/index.ts b/src/api/wms/supplieritem/index.ts
index e6002d3c7..81cbf3d12 100644
--- a/src/api/wms/supplieritem/index.ts
+++ b/src/api/wms/supplieritem/index.ts
@@ -99,4 +99,10 @@ export const selectItembasicTypeToSupplieritem = async (params) => {
export const getDefaultLocationCode = async(data: SupplieritemVO)=> {
return await request.post({ url: `/wms/supplieritem/getDefaultLocationCode`, data })
-}
\ No newline at end of file
+}
+
+
+// 根据code获取数据列表
+export const getSupplierItemListByCodes = async (data) => {
+ return await request.get({ url: `/wms/supplieritem/listByCodes?supplierCode=`+data.supplierCode +'&itemCodes='+data.itemCodes })
+}
diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue
index 6ec7b387c..2e94706f5 100644
--- a/src/components/BasicForm/src/BasicForm.vue
+++ b/src/components/BasicForm/src/BasicForm.vue
@@ -99,6 +99,8 @@
@tableFormSelectOnBlur="tableFormSelectOnBlur"
@formFormDateChange="formFormDateChange"
@clearInput='clearInput'
+ @batchAdd="batchAdd"
+ :routeName="routeName"
>
@@ -132,9 +134,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ButtonBase from '@/components/XButton/src/ButtonBase.vue'
import TableForm from '@/components/TableForm/src/TableForm.vue'
import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue'
-import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
-import { debounce } from 'lodash-es'
+import { tableFormBlurVer,FormBlur,getListByBottonInput } from '@/api/wms/business/business'
const props = defineProps({
// 显示窗口宽度设置
basicFormWidth: {
@@ -338,7 +339,11 @@ const formRef = ref() // 表单 Ref
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
-console.log(111,formSchema)
+const route = useRoute() // 路由信息
+const routeName = ref('')
+routeName.value = route.name
+const isExecute = ref(true)//如果走失去焦点的方法只有为true的时候才能进行保存
+console.log(44332322, routeName.value)
// 列表-按钮
// const buttondata = [
@@ -758,11 +763,42 @@ const onChange = (field, cur) => {
/**
* 监听失焦事件
* @param field 当前操作字段
- * @param e
+ * @param e
*/
-const onBlur = (field, e) => {
+ const onBlur = async (field, e) => {
+ isExecute.value = false
+ await FormBlur(field, e,routeName.value,formRef.value,props.detailData,formSchema.value,(searchField, list)=>{
+ emit('searchTableSuccess', field, searchField, list, formRef.value, 'form')
+ })
+ isExecute.value = true
emit('onBlur', field, e)
}
+
+// 批量增加
+const batchAdd = async (val) => {
+ const row = {}
+ tableAllSchemas.value.tableFormColumns.forEach((item) => {
+ row[item.field] = item.default ? item.default : ''
+ })
+ const headerItem = tableAllSchemas.value.tableColumns.find((item) => item.field == props.fieldTableColumn)
+
+
+
+ await getListByBottonInput(headerItem, val,row,routeName.value,formRef.value,props.detailData,props.tableData,(list)=>{
+ emit('searchTableSuccess',headerItem.field,'itemCode',list, formRef.value,'tableForm',row)
+ })
+}
+
+const inputStringBlur = async (headerItem, val, row, index) => {
+ // isExecute.value = false
+ await tableFormBlurVer(headerItem,val,row,index,routeName.value,formRef.value,props.detailData,props.tableData,(searchField, list)=>{
+ emit('searchTableSuccess',headerItem.field,searchField,list, formRef.value,'tableForm',row,'blur',index)
+ })
+
+ // isExecute.value = true
+}
+
+
/**
* 回车事件
* @param field 当前操作字段
@@ -791,9 +827,7 @@ const buttonOperationClick = (row, label, index)=> {
emit("buttonOperationClick", row, label, index);
}
-const inputStringBlur = (headerItem, row, index)=> {
- emit("inputStringBlur", headerItem, row, index);
-}
+
defineExpose({ open, formRef, opensearchTable, dialogVisible, formLoading ,handleAddTable,changeDialogWidth}) // 提供 open 方法,用于打开弹窗
diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue
index 479d9df73..6babae951 100644
--- a/src/components/Form/src/Form.vue
+++ b/src/components/Form/src/Form.vue
@@ -269,7 +269,10 @@ export default defineComponent({
//回车
emit('onEnter',item.field,formModel.value[item.field],event)
}
- }} v-slots={{
+ }}
+
+ onBlur={(e)=>{onBlur(item.field, e)}}
+ v-slots={{
suffix: () => (
{
if(Array.isArray(formModel.value[item.field])){
@@ -318,7 +321,10 @@ export default defineComponent({
//回车
emit('onEnter',item.field,formModel.value[item.field],event)
}
- }} disabled={item?.componentProps?.enterSearch?false:true} v-slots={{
+ }}
+
+ onBlur={(e)=>{onBlur(item.field,formModel.value[item.field])}}
+ disabled={item?.componentProps?.enterSearch?false:true} v-slots={{
suffix: () => (
{
if(Array.isArray(formModel.value[item.field])){
diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue
index 703f5f630..5de9de0c5 100644
--- a/src/components/TableForm/src/TableForm.vue
+++ b/src/components/TableForm/src/TableForm.vue
@@ -66,9 +66,9 @@
clearable
:type="headerItem?.tableForm?.inputType"
:placeholder="t(`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`).replace('ts.','')"
- :disabled="headerItem?.tableForm?.disabled ? true: headerItem?.tableForm?.isInpuFocusShow ? true : false"
+ :disabled="disabledInput(headerItem)"
style="flex:1"
- @blur="inputStringBlur(headerItem.field, row[headerItem.field], row)"
+ @blur="inputStringBlur(headerItem, row[headerItem.field], row,index)"
/>
@@ -333,6 +333,10 @@
{{t('ts.批量删除')}}
+
+
+ {{t('批量添加')}}
+
@@ -408,7 +412,13 @@ const props = defineProps({
tableFormRules: {
type: Object,
default: null
- }
+ },
+ // 业务名称
+ routeName: {
+ type: String,
+ required: false,
+ default: ''
+ },
})
// 传递给父类
const emit = defineEmits([
@@ -426,7 +436,8 @@ const emit = defineEmits([
'inputStringBlur',
'tableFormSelectOnBlur',
'formFormDateChange',
- 'clearInput'
+ 'clearInput',
+ 'batchAdd'
])
// 获取下拉列表 | type = radio | type = select
const initSelectOptions = (item) => {
@@ -528,8 +539,8 @@ const inpuFocus = (headerItem, row, index)=>{
}
// input输入失去焦点事件
-const inputStringBlur = (field, val,row) => {
- emit('inputStringBlur', field, val,row)
+const inputStringBlur = (headerItem, val,row,index) => {
+ emit('inputStringBlur', headerItem, val,row,index)
}
const clearInput= (field, row, index) => {
emit('clearInput',field, row, index)
@@ -548,10 +559,39 @@ const showTableData = ()=>{
return props.tableData
}
}
+const keyWord = ref('')
+console.log(9999,props.tableFields)
+const batchAdd = ()=>{
+ console.log(keyWord.value)
+ let field = ''
+ const itemCodeFields = props.tableFields.find(item=>item.field == 'itemCode')
+ const supplierFields = props.tableFields.find(item=>item.field == 'supplierCode')
+ if(itemCodeFields){
+ field = itemCodeFields.field
+ }else {
+ if(itemCodeFields){
+ field = supplierFields.field
+ }
+ }
+console.log(field)
+ emit('batchAdd',keyWord.value)
+}
+const disabledInput=(headerItem)=>{
+ if(headerItem.tableForm?.isInpuFocusShow){
+ if(headerItem.tableForm?.enterSearch){
+ return false
+ }else{
+ return true
+ }
+ }else{
+ return headerItem?.tableForm?.disabled || true
+ }
+}
// setup 语法糖 抛出方法
defineExpose({
TableBaseComponents_Ref,
- validateForm
+ validateForm,
+ keyWord
})
diff --git a/src/views/wms/basicDataManage/itemManage/itemwarehouse/itemwarehouse.data.ts b/src/views/wms/basicDataManage/itemManage/itemwarehouse/itemwarehouse.data.ts
index 2a2c7ab1a..1f1c1c619 100644
--- a/src/views/wms/basicDataManage/itemManage/itemwarehouse/itemwarehouse.data.ts
+++ b/src/views/wms/basicDataManage/itemManage/itemwarehouse/itemwarehouse.data.ts
@@ -86,6 +86,7 @@ export const Itemwarehouse = useCrudSchemas(reactive([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
+ enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本
searchField: 'packUnit', // 查询弹窗赋值字段
diff --git a/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts b/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
index 14fc57a8d..1524849c4 100644
--- a/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
+++ b/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
@@ -78,6 +78,7 @@ export const Callmaterials = useCrudSchemas(reactive([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
+ enterSearch:true,
isSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
diff --git a/src/views/wms/basicDataManage/systemSetting/supplierUser/supplierUser.data.ts b/src/views/wms/basicDataManage/systemSetting/supplierUser/supplierUser.data.ts
index 7358be064..1e5c4a94e 100644
--- a/src/views/wms/basicDataManage/systemSetting/supplierUser/supplierUser.data.ts
+++ b/src/views/wms/basicDataManage/systemSetting/supplierUser/supplierUser.data.ts
@@ -125,6 +125,7 @@ export const SupplierUser = useCrudSchemas(reactive([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
+ enterSearch:true,
isSearchList: true,
searchListPlaceholder: '请选供应商信息',
searchField: 'code',
diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
index f9e3ac998..8f442d8b0 100644
--- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
+++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
@@ -1290,8 +1290,8 @@ export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive
row['fromLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
- }else if(formField == 'packQty'){
+ }else if(formField == 'packUnit'){
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
}else if(formField == 'toLocationCode') {
diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts
index 214889c66..8f7b40872 100644
--- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts
+++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts
@@ -394,6 +394,7 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive(
width: 150
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'code',
diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts
index 68249d568..ad67b4e19 100644
--- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts
+++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts
@@ -561,6 +561,7 @@ export const PackageoverRequestDetail = useCrudSchemas(reactive([
width: 120
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
@@ -609,6 +610,7 @@ export const PackageoverRequestDetail = useCrudSchemas(reactive([
width: 120
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
index fe6c6a315..b50d7e642 100644
--- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
+++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
@@ -480,6 +480,7 @@ export const ScrapRequestDetail = useCrudSchemas(reactive([
width: 150
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts
index dd7828519..35679ae33 100644
--- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts
+++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts
@@ -619,6 +619,7 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive(
width: 150
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
index 437523698..bf1e6a7e4 100644
--- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
+++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
@@ -1495,6 +1495,7 @@ export const UnplannedreceiptRequestDetailLabel = useCrudSchemas(reactive([
sortSearchDefault:2,
sortTableDefault:3,
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
index e217520c7..60ce8db43 100644
--- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
+++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
@@ -1130,6 +1130,7 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive([
}
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
index 74acc42bd..23b28a715 100644
--- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
+++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
@@ -383,6 +383,7 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive(
width: 150
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts b/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts
index 091cc2b65..171aa15d8 100644
--- a/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts
+++ b/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts
@@ -53,6 +53,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive
// console.log(err);
// })
if(formField=='itemCode'){
- row[formField] = val[0][searchField]
+ // row[formField] = val[0][searchField]
val.forEach(item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
index 91b97e1da..d74384f20 100644
--- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
+++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
@@ -107,14 +107,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(async() => {
if (type == 'tableForm') {
// 明细查询页赋值
- await ItemBasicApi.getItembasicPage({
- code: row['itemCode']
- }).then(res => {
- row['uom'] = res?.list[0].uom
- }).catch(err =>{
- console.log(err);
- })
+ // await ItemBasicApi.getItembasicPage({
+ // code: row['itemCode']
+ // }).then(res => {
+ // row['uom'] = res?.list[0].uom
+ // }).catch(err =>{
+ // console.log(err);
+ // })
row[formField] = val[0][searchField]
+ row['uom'] = val[0]['uom']
} else {
const setV = {}
if(formField == 'workshop'){
diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts
index 5c1b7b009..7ef13b457 100644
--- a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts
+++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts
@@ -626,6 +626,7 @@ export const ProductionDetail = useCrudSchemas(reactive([
}
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
index 468b425b1..1c8dc8bb6 100644
--- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
+++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
@@ -106,15 +106,16 @@ const updataTableColumns = (val) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(async() => {
if (type == 'tableForm') {
- // 明细查询页赋值
- await ItemBasicApi.getItembasicPage({
- code: row['itemCode']
- }).then(res => {
- row['uom'] = res?.list[0].uom
- }).catch(err =>{
- console.log(err);
- })
+ // // 明细查询页赋值
+ // await ItemBasicApi.getItembasicPage({
+ // code: row['itemCode']
+ // }).then(res => {
+ // row['uom'] = res?.list[0].uom
+ // }).catch(err =>{
+ // console.log(err);
+ // })
row[formField] = val[0][searchField]
+ row['uom'] = val[0]['uom']
} else {
const setV = {}
if(formField == 'workshop'){
diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts
index b90683818..fb83717e3 100644
--- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts
+++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts
@@ -626,6 +626,7 @@ export const ProductionDetail = useCrudSchemas(reactive([
}
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
index 6d039de03..c9a6eb60f 100644
--- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
+++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
@@ -107,14 +107,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(async() => {
if (type == 'tableForm') {
// 明细查询页赋值
- await ItemBasicApi.getItembasicPage({
- code: row['itemCode']
- }).then(res => {
- row['uom'] = res?.list[0].uom
- }).catch(err =>{
- console.log(err);
- })
+ // await ItemBasicApi.getItembasicPage({
+ // code: row['itemCode']
+ // }).then(res => {
+ // row['uom'] = res?.list[0].uom
+ // }).catch(err =>{
+ // console.log(err);
+ // })
row[formField] = val[0][searchField]
+ row['uom'] = val[0]['uom']
} else {
const setV = {}
if(formField == 'workshop'){
diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts
index 2ab4b578d..652609905 100644
--- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts
+++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts
@@ -627,6 +627,7 @@ export const ProductionDetail = useCrudSchemas(reactive([
}
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
index 512de06d6..eb64606c0 100644
--- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
+++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
@@ -820,6 +820,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive
width: 150
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
@@ -1808,6 +1809,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive(
}
},
tableForm: {
+ enterSearch:true,
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
@@ -1876,6 +1878,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive(
}
},
tableForm: {
+ enterSearch:true,
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts
index 3cef27943..9e01199c7 100644
--- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts
+++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts
@@ -821,6 +821,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive
},
sortTableDefault:1003,
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
index 247650bce..2e93ad900 100644
--- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
+++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
@@ -778,6 +778,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive
},
sortTableDefault:1003,
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
@@ -1789,6 +1790,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive(
}
},
tableForm: {
+ enterSearch:true,
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
index 9f367f2ab..5c7911793 100644
--- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
+++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
@@ -634,6 +634,7 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
+ enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
@@ -653,6 +654,7 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([
}
},
tableForm:{
+ enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts
index 674600562..471262417 100644
--- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts
@@ -35,6 +35,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([
form: {
labelMessage: '影响明细中物料代码,需在供应商物料中维护',
componentProps: {
+ enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
index 8908f8eda..23de01ea5 100644
--- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
@@ -417,6 +417,7 @@ export const PurchaseDetail = useCrudSchemas(reactive([
width: 150
},
tableForm:{
+ disabled:true,
multiple:true,//多选
isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商物料',
diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
index 19d1e1e26..7cb5c65d7 100644
--- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
+++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
@@ -161,7 +161,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive(
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
- componentProps: {
+ componentProps: {
+ enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段