Browse Source

Merge branch 'hella_online_20240803' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into hella_online_20240803

hella_online_20240815
ljlong_2630 3 months ago
parent
commit
c0c526af18
  1. 4
      src/views/qms/inspectionJob/index.vue
  2. 6
      src/views/qms/inspectionMethod/index.vue
  3. 6
      src/views/qms/inspectionQ1/index.vue
  4. 6
      src/views/qms/inspectionQ2/index.vue
  5. 6
      src/views/qms/inspectionQ3/index.vue
  6. 4
      src/views/qms/inspectionRecord/index.vue
  7. 9
      src/views/qms/inspectionRecordFirst/index.vue
  8. 6
      src/views/qms/inspectionRequest/index.vue
  9. 6
      src/views/qms/inspectionScheme/index.vue
  10. 6
      src/views/qms/inspectionTemplate/index.vue
  11. 8
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  12. 8
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  13. 335
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
  14. 8
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts

4
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

6
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 = () => {

6
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 = () => {

6
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 = () => {

6
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 = () => {

4
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

9
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

6
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 = () => {

6
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 = () => {

6
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 = () => {

8
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)
}
})

8
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)
}
})

335
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue

@ -73,17 +73,26 @@
@onChange="onChangeForm"
>
<template #hahaha>
<div>
<el-button style="margin-left:90px" type="primary">选择收货单明细</el-button>
</div>
<el-button style="margin-left:90px;width:100%" type="primary" @click="chooseReceiptList">选择收货单明细</el-button>
</template>
<template #hehehe>
<div></div>
</template>
</BasicForm>
<!-- 添加明细采购收货记录单号 -->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" >
<template #searchQueryhahaha>
<el-form :inline="true">
<el-form-item label="供应商">
<el-input v-model="formRef.formRef.formModel.supplierName" placeholder="请输入供应商" disabled></el-input>
</el-form-item>
<el-form-item label="物料号">
<el-input v-model="formRef.formRef.formModel.itemCode" placeholder="请输入物料号" disabled></el-input>
</el-form-item>
</el-form>
</template>
</SearchTable>
<!-- 详情 -->
<Detail
ref="detailRef"
@ -115,7 +124,7 @@
@searchTableSuccess="searchTableSuccessLabel"
/>
<!-- 标签打印 -->
<SearchTable style="width: 905px" ref="showLabelRef" @searchTableSuccess="showLabelSuccess" />
<SearchTable style="width: 905px" ref="showLabelRef" @searchTableSuccess="showLabelSuccess"/>
<!-- 导入 -->
<ImportForm
ref="importFormRef"
@ -150,6 +159,8 @@ import * as BalanceApi from '@/api/wms/balance'
import { async } from '@antv/x6/lib/registry/marker/async'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
// 退
defineOptions({ name: 'PurchasereturnRequestMainNew' })
@ -170,12 +181,15 @@ const isShowButton = ref(true)
const updataTableColumns = (val) => {
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]
}
} 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']
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) => {

8
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' },
],

Loading…
Cancel
Save