diff --git a/src/views/qms/inspectionJob/index.vue b/src/views/qms/inspectionJob/index.vue
index 47f35526a..b8e167a86 100644
--- a/src/views/qms/inspectionJob/index.vue
+++ b/src/views/qms/inspectionJob/index.vue
@@ -122,6 +122,7 @@ import AddForm from './addForm.vue'
import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
import { useUserStore } from '@/store/modules/user'
+import { formatDate } from '@/utils/formatTime'
// 采购订单
defineOptions({ name: 'inspectionJobMain' })
@@ -399,8 +400,9 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
+ const excelTitle = ref(route.meta.title)
const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params)
- download.excel(data, '检验任务.xlsx')
+ download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
diff --git a/src/views/qms/inspectionMethod/index.vue b/src/views/qms/inspectionMethod/index.vue
index 0fd66b4a8..4e3bb66ab 100644
--- a/src/views/qms/inspectionMethod/index.vue
+++ b/src/views/qms/inspectionMethod/index.vue
@@ -89,6 +89,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
+import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'InspectionMethod' })
@@ -300,8 +301,9 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
+ const excelTitle = ref(route.meta.title)
const data = await InspectionMethodApi.exportInspectionMethod(tableObject.params)
- download.excel(data, '检验方法.xlsx')
+ download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@@ -316,7 +318,7 @@ const handleImport = () => {
// 导入附件弹窗所需的参数
const importTemplateData = reactive({
templateUrl: '',
- templateTitle: '检验方法导入模版.xlsx'
+ templateTitle: `【${route.meta.title}】导入模版.xlsx`
})
// 导入成功之后
const importSuccess = () => {
diff --git a/src/views/qms/inspectionQ1/index.vue b/src/views/qms/inspectionQ1/index.vue
index 8e75df52d..2d2dbde68 100644
--- a/src/views/qms/inspectionQ1/index.vue
+++ b/src/views/qms/inspectionQ1/index.vue
@@ -79,6 +79,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
+import { formatDate } from '@/utils/formatTime'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
@@ -315,8 +316,9 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
+ const excelTitle = ref(route.meta.title)
const data = await Q1Api.exportQ1(tableObject.params)
- download.excel(data, 'Q1通知单.xlsx')
+ download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@@ -331,7 +333,7 @@ const handleImport = () => {
// 导入附件弹窗所需的参数
const importTemplateData = reactive({
templateUrl: '',
- templateTitle: 'Q1通知单导入模版.xlsx'
+ templateTitle: `【${route.meta.title}】导入模版.xlsx`
})
// 导入成功之后
const importSuccess = () => {
diff --git a/src/views/qms/inspectionQ2/index.vue b/src/views/qms/inspectionQ2/index.vue
index b82dd5bb1..fd8aa94b0 100644
--- a/src/views/qms/inspectionQ2/index.vue
+++ b/src/views/qms/inspectionQ2/index.vue
@@ -77,6 +77,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
+import { formatDate } from '@/utils/formatTime'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
@@ -310,8 +311,9 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
+ const excelTitle = ref(route.meta.title)
const data = await Q2Api.exportQ2(tableObject.params)
- download.excel(data, 'Q2通知单.xlsx')
+ download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@@ -326,7 +328,7 @@ const handleImport = () => {
// 导入附件弹窗所需的参数
const importTemplateData = reactive({
templateUrl: '',
- templateTitle: 'Q2通知单导入模版.xlsx'
+ templateTitle: `【${route.meta.title}】导入模版.xlsx`
})
// 导入成功之后
const importSuccess = () => {
diff --git a/src/views/qms/inspectionQ3/index.vue b/src/views/qms/inspectionQ3/index.vue
index 885ee2dc0..abd156ce2 100644
--- a/src/views/qms/inspectionQ3/index.vue
+++ b/src/views/qms/inspectionQ3/index.vue
@@ -80,6 +80,7 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
+import { formatDate } from '@/utils/formatTime'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
@@ -335,8 +336,9 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
+ const excelTitle = ref(route.meta.title)
const data = await Q3Api.exportQ3(tableObject.params)
- download.excel(data, 'Q3通知单.xlsx')
+ download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@@ -351,7 +353,7 @@ const handleImport = () => {
// 导入附件弹窗所需的参数
const importTemplateData = reactive({
templateUrl: '',
- templateTitle: 'Q3通知单导入模版.xlsx'
+ templateTitle: `【${route.meta.title}】导入模版.xlsx`
})
// 导入成功之后
const importSuccess = () => {
diff --git a/src/views/qms/inspectionRecord/index.vue b/src/views/qms/inspectionRecord/index.vue
index 75bc47e35..2af87c949 100644
--- a/src/views/qms/inspectionRecord/index.vue
+++ b/src/views/qms/inspectionRecord/index.vue
@@ -126,6 +126,7 @@ import AddForm from './addForm.vue'
import Detail from './detail.vue'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import { getReportUrl } from '@/utils/systemParam'
+import { formatDate } from '@/utils/formatTime'
import {
InspectionJobMain,
@@ -366,8 +367,9 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
+ const excelTitle = ref(route.meta.title)
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params)
- download.excel(data, '检验记录.xlsx')
+ download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
diff --git a/src/views/qms/inspectionRecordFirst/index.vue b/src/views/qms/inspectionRecordFirst/index.vue
index f9c4c06bf..b3ee003d1 100644
--- a/src/views/qms/inspectionRecordFirst/index.vue
+++ b/src/views/qms/inspectionRecordFirst/index.vue
@@ -77,6 +77,7 @@
import AddForm from '../inspectionRecordFirst/addForm.vue'
import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
+import { formatDate } from '@/utils/formatTime'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
@@ -184,7 +185,7 @@ const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
- qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
+ qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber
}
/** 添加/修改操作 */
const basicFormRef = ref()
@@ -233,8 +234,9 @@ const handleMainExport = async (row: any) => {
// 发起导出
exportLoading.value = true
tableObject.params.number = row.number
+ const excelTitle = ref(route.meta.title)
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params)
- download.excel(data, '首件检验记录.xlsx')
+ download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@@ -249,8 +251,9 @@ const handleMainExport = async (row: any) => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
+ const excelTitle = ref(route.meta.title)
const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params)
- download.excel(data, '首件检验记录.xlsx')
+ download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
diff --git a/src/views/qms/inspectionRequest/index.vue b/src/views/qms/inspectionRequest/index.vue
index 5f7dc751d..a50c38cee 100644
--- a/src/views/qms/inspectionRequest/index.vue
+++ b/src/views/qms/inspectionRequest/index.vue
@@ -104,6 +104,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
+import { formatDate } from '@/utils/formatTime'
// import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
defineOptions({ name: 'inspectionMain' })
@@ -418,8 +419,9 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
+ const excelTitle = ref(route.meta.title)
const data = await InspectionMainApi.exportInspectionMain(tableObject.params)
- download.excel(data, '检验申请.xlsx')
+ download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@@ -434,7 +436,7 @@ const handleImport = () => {
// 导入附件弹窗所需的参数
const importTemplateData = reactive({
templateUrl: '',
- templateTitle: '检验申请导入模版.xlsx'
+ templateTitle: `【${route.meta.title}】导入模版.xlsx`
})
// 导入成功之后
const importSuccess = () => {
diff --git a/src/views/qms/inspectionScheme/index.vue b/src/views/qms/inspectionScheme/index.vue
index 858856700..fec4ebfd9 100644
--- a/src/views/qms/inspectionScheme/index.vue
+++ b/src/views/qms/inspectionScheme/index.vue
@@ -83,6 +83,7 @@ import AddForm from './addForm.vue'
import * as InspectionSchemeApi from '@/api/qms/inspectionScheme'
import ImportForm from '../../../components/ImportForm/src/ImportForm.vue'
import * as SampleCodeApi from '@/api/qms/sampleCode'
+import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'InspectionScheme' })
@@ -286,8 +287,9 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
+ const excelTitle = ref(route.meta.title)
const data = await InspectionSchemeApi.exportInspectionScheme(tableObject.params)
- download.excel(data, '检验方案.xlsx')
+ download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@@ -311,7 +313,7 @@ const handleImport = () => {
// 导入附件弹窗所需的参数
const importTemplateData = reactive({
templateUrl: '',
- templateTitle: '检验方案导入模版.xlsx'
+ templateTitle: `【${route.meta.title}】导入模版.xlsx`
})
// 导入成功之后
const importSuccess = () => {
diff --git a/src/views/qms/inspectionTemplate/index.vue b/src/views/qms/inspectionTemplate/index.vue
index 3a506ec9c..38d59b1bf 100644
--- a/src/views/qms/inspectionTemplate/index.vue
+++ b/src/views/qms/inspectionTemplate/index.vue
@@ -85,6 +85,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import AddForm from './addForm.vue'
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate'
+import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'AgvLocationrelation' })
@@ -156,8 +157,9 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
+ const excelTitle = ref(route.meta.title)
const data = await InspectionProcessPageApi.exportInspectionTemplate(tableObject.params)
- download.excel(data, '检验模板.xlsx')
+ download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@@ -283,7 +285,7 @@ const handleImport = () => {
// 导入附件弹窗所需的参数
const importTemplateData = reactive({
templateUrl: '',
- templateTitle: '检验方案导入模版.xlsx'
+ templateTitle: `【${route.meta.title}】导入模版.xlsx`
})
// 导入成功之后
const importSuccess = () => {
diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
index 8abddc4c0..a300ebb1f 100644
--- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
+++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
@@ -251,6 +251,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else {
const setV = {}
setV[formField] = val[0][searchField]
+ if('workshopCode'==formField){
+ //车间代码
+ setV['productionLineCode'] = ''
+ tableData.value = []
+ }else if('productionLineCode'==formField){
+ //生产线代码
+ tableData.value = []
+ }
formRef.setValues(setV)
}
})
diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
index 953c73c5f..434ecb16a 100644
--- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
+++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
@@ -249,6 +249,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else {
const setV = {}
setV[formField] = val[0][searchField]
+ if('workshopCode'==formField){
+ //车间代码
+ setV['productionLineCode'] = ''
+ tableData.value = []
+ }else if('productionLineCode'==formField){
+ //生产线代码
+ tableData.value = []
+ }
formRef.setValues(setV)
}
})
diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
index cb95b32a2..c9d9383c0 100644
--- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
+++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
@@ -73,17 +73,26 @@
@onChange="onChangeForm"
>
-
- 选择收货单明细
-
+ 选择收货单明细
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
{
tableColumns.value = val
}
+
+
const onChangeForm = (field, cur, formRef)=>{
console.log('onChangeForm',field, cur, formRef)
console.log('1111')
console.log(PurchasereturnRequestMain.allSchemas)
PurchasereturnRequestMain.allSchemas.formSchema.forEach(item=>{
if(item.field == field){
+ // 物料名称赋值
let setV = {}
setV['supplierName'] = item.componentProps.options?.find(el=>el.id==cur)['nickname']
formRef.value.setValues(setV)
@@ -185,25 +199,7 @@ const onChangeForm = (field, cur, formRef)=>{
}
const onEnter = async (field, value) => {
console.log(field, value)
- if ('supplierCode' == field) {
- //供应商代码
- formRef.value.opensearchTable(
- 'purchaseReceiptRecordNumber',
- 'number',
- '采购收货记录',
- PurchasereceiptRecordMain1.allSchemas,
- PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn,
- [
- {
- key: 'supplierCode',
- value: 'supplierCode',
- isMainValue: true
- }
- ]
- )
- } else if ('purchaseReceiptRecordNumber' == field) {
- //采购收货记录
- }
+
}
// 生成标签
@@ -256,87 +252,12 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
nextTick(async () => {
if (type == 'tableForm') {
// 明细查询页赋值
-
- if (formField == 'asnNumber') {
- row[formField] = val[0][searchField]
- //搜索记录单号--回显数据
- row['purchaseReceiptRecordNumber'] = val[0]['number']
- row['asnNumber'] = val[0]['asnNumber']
- row['supplierCode'] = val[0]['supplierCode']
- row['poNumber'] = val[0]['poNumber']
- row['poLine'] = val[0]['poLine']
- row['itemCode'] = val[0]['itemCode']
- row['itemName'] = val[0]['itemName']
- row['itemDesc1'] = val[0]['itemDesc1']
- row['itemDesc2'] = val[0]['itemDesc2']
- row['batch'] = val[0]['batch']
- row['altBatch'] = val[0]['altBatch']
- row['containerNumber'] = val[0]['containerNumber']
- row['qty'] = val[0]['qty']
- row['uom'] = val[0]['uom']
- row['supplierQty'] = val[0]['supplierQty']
- row['supplierUom'] = val[0]['supplierUom']
- row['inventoryStatus'] = val[0]['inventoryStatus']
- // row['fromLocationCode'] = val[0]['toLocationCode']
- row['toLocationCode'] = val[0]['toLocationCode']
- row['fromLocationGroupCode'] = val[0]['locationGroupCode']
- row['toLocationGroupCode'] = null
- row['toWarehouseCode'] = null
- row['toAreaTypes'] = null
- row['fromAreaCode'] = val[0]['areaCode']
- row['toAreaCode'] = val[0]['toAreaCode']
- row['fromQwnerCode'] = val[0]['fromQwnerCode']
- row['toOwnerCode'] = val[0]['toOwnerCode']
- row['arriveDate'] = val[0]['arriveDate']
- row['produceDate'] = val[0]['produceDate']
- row['expireDate'] = val[0]['expireDate']
- row['convertRate'] = val[0]['convertRate']
- row['visualInspectResult'] = val[0]['visualInspectResult']
- row['visualInspectPhotos'] = val[0]['visualInspectPhotos']
- row['failedReason'] = val[0]['failedReason']
- row['singlePrice'] = val[0]['singlePrice']
- row['amount'] = val[0]['amount']
- row['projectCode'] = val[0]['projectCode']
- } else if (formField == 'itemCode') {
- row[formField] = val[0][searchField]
- row['batch'] = val[0]['toBatch']
- row['containerNumber'] = val[0]['toContainerNumber']
- row['containerNumber'] = val[0]['containerNumber']
- row['containerNumber'] = val[0]['containerNumber']
- // row['fromLocationCode'] = val[0]['fromLocationCode']
- row['toLocationCode'] = val[0]['toLocationCode']
- } else if (formField == 'fromLocationCode') {
- row[formField] = val[0][searchField]
- // let params = {
- // itemCode: row.itemCode,
- // batch: row.batch,
- // locationCode:val[0]['code']
- // }
- // let aa = await BalanceApi.getSumByConditions(params);
- // console.log('23423423',aa);
- // row['inventoryBalance'] = aa//库存余额
- } else if (formField == 'packingNumber') {
- // row[formField] = val[0][searchField]
- val.forEach((item,index)=>{
- if(index==0){
- row[formField] = item[searchField]
- row['inventoryBalance'] = item['qty'] //库存余额
- }else{
- let newRow = {...row}
- newRow[formField] = item[searchField]
- row['inventoryBalance'] = item['qty'] //库存余额
- tableData.value.push(newRow)
- }
- })
- row['fromLocationCode'] = val[0]['locationCode']
- row['batch'] = val[0]['batch']
- // row['inventoryBalance'] = val[0]['qty'] //库存余额
- }else{
- row[formField] = val[0][searchField]
- }
+ row[formField] = val[0][searchField]
} else {
const setV = {}
+ setV[formField] = val[0][searchField]
if(formField=='itemCode'){
+ // 更换查询 供应商下拉框数据
PurchasereturnRequestMain.allSchemas.formSchema.forEach(item=>{
if(item.field == 'supplierCode1'){
item.componentProps.options = [
@@ -357,63 +278,8 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
- if (formField == 'poLine' || formField == 'itemCode') {
- console.log(val)
- setV['poLine'] = val[0]['poLine']
- setV['poNumber'] = val[0]['poNumber']
- setV['itemCode'] = val[0]['itemCode']
- setV['itemName'] = val[0]['itemName']
- setV['itemDesc1'] = val[0]['itemDesc1']
- setV['itemDesc2'] = val[0]['itemDesc2']
- setV['batch'] = val[0]['toBatch']
- setV['altBatch'] = val[0]['altBatch']
- setV['containerNumber'] = val[0]['toContainerNumber']
- setV['receiptQty'] = val[0]['qty']
- setV['qty'] = val[0]['qty']
- setV['uom'] = val[0]['uom']
- setV['supplierQty'] = val[0]['supplierQty']
- setV['supplierUom'] = val[0]['supplierUom']
- setV['inventoryStatus'] = val[0]['inventoryStatus']
- // setV['fromLocationCode'] = val[0]['toLocationCode']
- // setV['toLocationCode'] = val[0]['toLocationCode']
- setV['fromLocationGroupCode'] = val[0]['locationGroupCode']
- setV['toLocationGroupCode'] = null
- setV['toWarehouseCode'] = null
- setV['toAreaTypes'] = null
- setV['fromAreaCode'] = val[0]['areaCode']
- setV['toAreaCode'] = val[0]['toAreaCode']
- setV['fromQwnerCode'] = val[0]['fromQwnerCode']
- setV['toOwnerCode'] = val[0]['toOwnerCode']
- setV['arriveDate'] = val[0]['arriveDate']
- setV['produceDate'] = val[0]['produceDate']
- setV['expireDate'] = val[0]['expireDate']
- setV['convertRate'] = val[0]['convertRate']
- setV['visualInspectResult'] = val[0]['visualInspectResult']
- setV['visualInspectPhotos'] = val[0]['visualInspectPhotos']
- setV['failedReason'] = val[0]['failedReason']
- setV['singlePrice'] = val[0]['singlePrice']
- setV['amount'] = val[0]['amount']
- setV['projectCode'] = val[0]['projectCode']
- // setV['packingNumber'] = val[0]['packingNumber']
- // setV['inventoryBalance'] = val[0]['qty']
+ setV[formField] = val[0][searchField]
- if (formField == 'itemCode') {
- setV['batch'] = val[0]['toBatch']
- setV['containerNumber'] = val[0]['toContainerNumber']
- setV['containerNumber'] = val[0]['containerNumber']
- setV['containerNumber'] = val[0]['containerNumber']
- // setV['fromLocationCode'] = val[0]['fromLocationCode']
- // setV['toLocationCode'] = val[0]['toLocationCode']
- }
- } else if (formField == 'packingNumber'){
- setV[formField] = val[0][searchField]
- setV['inventoryBalance'] = val[0]['qty']
- setV['batch'] = val[0]['batch']
- setV['fromLocationCode'] = val[0]['locationCode']
- }
- else {
- setV[formField] = val[0][searchField]
- }
formRef.setValues(setV)
})
}
@@ -573,30 +439,7 @@ const openForm = async (type: string, row?: number) => {
originTableData.value = [] // 重置明细数据
tableData.value = [] // 重置明细数据
isShowButton.value = true
- if (type == 'create') {
- PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
- // if (item.field == 'supplierCode') {
- // item.componentProps.disabled = true
- // item.componentProps.isSearchList = true
- // }
- if (item.field == 'asnNumber') {
- item.componentProps.disabled = true
- item.componentProps.isSearchList = true
- }
- })
- }
- if (type == 'update') {
- PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
- // if (item.field == 'supplierCode') {
- // item.componentProps.disabled = true
- // item.componentProps.isSearchList = false
- // }
- if (item.field == 'asnNumber') {
- item.componentProps.disabled = true
- item.componentProps.isSearchList = false
- }
- })
- }
+
formRef.value.open(type, row)
}
@@ -734,104 +577,46 @@ const originTableData = ref([])
const searchTableRef = ref()
// 添加明细
const handleAddTable = () => {
- const subTableDFata = originTableData.value.filter(
- (item) => !tableData.value.find((item1) => item1.id == item.id)
- )
- if (subTableDFata.length == 0) {
- message.warning('暂无可选择数据!')
+
+}
+// 选择收货单明细
+const chooseReceiptList = ()=>{
+ if(!formRef.value.formRef.formModel.itemCode){
+ message.error('请选择物料代码')
return
}
-
- const tableObject = {
- // 当前页
- currentPage: 1,
- // 导出加载中
- exportLoading: false,
- // 加载中
- loading: false,
- // 页数
- pageSize: subTableDFata.length,
- params: null,
- // 排序
- sort: {
- order: '', // 排序规则
- prop: '' // 排序字段
- },
- // 总条数
- total: subTableDFata.length,
- // 表格数据
- tableList: subTableDFata,
- currentRow: null
+ if(!formRef.value.formRef.formModel.supplierName){
+ message.error('请选择供应商')
+ return
}
+ searchTableRef.value.open(
+ "收货单明细",
+ Itembasic.allSchemas,
+ ItembasicApi.getItembasicPage,
+ "hahaha",
+ "hahaha",
+ false,
+ 'tableForm',
+ null,
+ [{
+ key: 'available',
+ value: 'TRUE',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ }],
+ undefined,
+ false,
+ null
+ )
- const tableColumns = PurchasereturnRequestDetail.allSchemas.tableFormColumns
- tableColumns.forEach((item) => {
- item.width = item.table?.width || 150
- })
-
- searchTableRef.value.openData('采购收货记录单号', tableObject, { tableColumns }, true)
- // searchTableRef.value.open(
- // ('供应商信息',
- // // _searchTableAllSchemas,
- // // _searchTablePage, // 接口
- // // formField,
- // // searchField,
- // true,//是否多选
- // // type,
- // // row,
- // _searchCondition
- // )
- // )
-
- // console.log(subTableDFata)
- // const {tableObject, tableMethods } = useTable({
- // getListApi: getPage.value // 分页接口
- // })
- // searchTableRef.value.open(
- // ('供应商信息',
- // // _searchTableAllSchemas,
- // // _searchTablePage, // 接口
- // // formField,
- // // searchField,
- // true,//是否多选
- // // type,
- // // row,
- // _searchCondition
- // )
- // )
- // tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
- // let purchaseReceiptRecordNumber = formRef.value.formRef.formModel.purchaseReceiptRecordNumber
- // PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => {
- // item.tableForm.disabled = true
- // if (item.field == 'remark') {
- // item.tableForm.disabled = false
- // }
- // if (item.field == 'reason') {
- // item.tableForm.disabled = false
- // }
- // if (item.field == 'qty') {
- // item.tableForm.disabled = false
- // }
- // if(purchaseReceiptRecordNumber == ''){
- // if (item.field == 'itemCode') {
- // item.tableForm.isInpuFocusShow = true
- // }
- // if(item.field == 'poLine'){
- // item.tableForm.isInpuFocusShow = false
- // }
- // }else{
- // if (item.field == 'itemCode') {
- // item.tableForm.isInpuFocusShow = false
- // }
- // if(item.field == 'poLine'){
- // item.tableForm.isInpuFocusShow = true
- // }
- // }
- // })
}
-const searchTableSuccess1 = (formField, searchField, val, formRef, type, row) => {
- console.log(val)
- tableData.value = [...tableData.value, ...val]
+// 选择收货单明细
+const searchTableSuccess1 = (formField, searchField, selections, type, row) => {
+ console.log('searchTableSuccess1',formField, searchField, selections, type, row)
+ formRef.value.formRef.setValues({
+ poNumber:111
+ })
}
// 删除明细
const handleDeleteTable = (item, index, formRef) => {
diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts
index 26d19b63d..6f80ef1ce 100644
--- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts
+++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts
@@ -209,7 +209,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(
},
{
label: '供应商1',
- field: 'supplierCode1',
+ field: 'supplierCode',
sort: 'custom',
table: {
width: 150
@@ -448,9 +448,9 @@ export const PurchasereturnRequestMainRules = reactive({
dueTime: [
{ required: true, message: '请选择截止时间', trigger: 'blur' }
],
- purchaseReceiptRecordNumber: [
- { required: true, message: '请输入采购收货记录单号', trigger: 'blur' }
- ],
+ // purchaseReceiptRecordNumber: [
+ // { required: true, message: '请输入采购收货记录单号', trigger: 'blur' }
+ // ],
carrierCode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],